Forums
New posts
Search forums
Members
Current visitors
Log in
Register
What's new
Search
Search
Search titles only
By:
New posts
Search forums
Menu
Log in
Register
Install the app
Install
Forums
Archive
Archive
C Programming
Question about the clc string lib
JavaScript is disabled. For a better experience, please enable JavaScript in your browser before proceeding.
Reply to thread
Message
[QUOTE="Michael Wojcik, post: 2446979"] It's my understanding that this invokes undefined behavior. Whether it's a problem for any actual existing implementation is another question, of course. Redefining a keyword is only "legal" because they're only reserved in translation phases 7 and 8 (C99 6.4.1#2). (This is a "shall" requirement, so violating it causes UB, by 4#2.) Since macros are expanded in translation phase 4, by the time phase 7 is reached, macros that have the same names as keywords (eg "#define if foo") no longer appear as identifiers in the translation unit. No such special rule exists for other reserved identifiers, as far as I can see. [/QUOTE]
Verification
Post reply
Forums
Archive
Archive
C Programming
Question about the clc string lib
Top