This is the mail archive of the gcc@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: Preprocessor Problem?


> I am attempting to port some c++ code that uses the following construct:
> 
> #define whatever(x) \
> class _whatever_x { \
>   void something() {} \
> }

> For some reason, it appears that gcc does not accept backslash
> escaped newlines in macro definitions?!?!?!

Sure it does. There is a chance that a Carriage Return character
follows the backslash, so there is whitespace after the backslash,
before the newline character. Of course, without seeing the original
source code, it is hard to tell.

Regards,
Martin


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]