r/C_Programming • • 27d ago

Could someone explain the practical differences between #pragma once and traditional include guards (#ifndef, #define, and #endif)?

81 Upvotes

58 comments sorted by

View all comments

Show parent comment

16

u/UltimaN3rd 27d ago

It's been supported since GCC 3.4 (2004): https://gcc.gnu.org/gcc-3.4/changes.html

11

u/Feer_C9 27d ago

lol I thought it didn't, looks like I didn't search right