Doesn't support `#define THING`
AndrewRayCode opened this issue · 3 comments
AndrewRayCode commented
I believe this is valid in glsl:
#define THING
#ifdef THING
...
#end
But this raises
Error: Macro definition "#define THING" is malformed
dy commented
Is the #define THING
correct?
I followed https://gcc.gnu.org/onlinedocs/cpp/Macros.html and did not find anything like that.
What is the expected result? THING === true
?
AndrewRayCode commented
It's valid. It doesn't expand, it's just used for future #ifdef
etc checks. For example search http://tigcc.ticalc.org/doc/cpp.html for FILE_FOO_SEEN
edit: https://gcc.gnu.org/onlinedocs/cpp/Once-Only-Headers.html#Once-Only-Headers