But if Oliver is right that there is no macro X but a function X, it would seem to work.Evert wrote:Yes, that's true. I think I made a leap in logic because the compiler "not allowing to #undef the symbol" suggested to me that it wasn't actually a macro. Otherwise #undef X after including the headers should work.syzygy wrote:But that will not replace "#define X bla" that supposedly is present somewhere in the included headers with "#define _X_rename bla".Evert wrote:Sounds like a compiler bug, but anyway try something likehgm wrote: Does there exist an option to switch off this rogue behavior w.r.t. the X macro?at the top of your code.Code: Select all
#define X _X_rename #include "standardheaders" #undef X #define X ... // Your definition
But judging from what little information HGM gives, it seems to be neither a macro X nor a function X, but a problem with what HGM's macro X expands to.
Or there is just a bad line ending somewhere that messes up compilation on Windows.