G
Grumble
Hello,
I recently came across code that defined a peculiar macro:
#define local static
gcc had no problem with it, but another (experimental) compiler I am
evaluating output a lengthy list of errors.
Apparently, the identifier 'local' is used in several places within that
compiler's headers. Hell breaks loose when the identifier is changed to
a reserved keyword.
Should the compiler implementers be more careful in their choice of
identifiers, or is the macro definition somehow illegal?
I recently came across code that defined a peculiar macro:
#define local static
gcc had no problem with it, but another (experimental) compiler I am
evaluating output a lengthy list of errors.
Apparently, the identifier 'local' is used in several places within that
compiler's headers. Hell breaks loose when the identifier is changed to
a reserved keyword.
Should the compiler implementers be more careful in their choice of
identifiers, or is the macro definition somehow illegal?