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]

Preprocessor Problem?


It seems odd that I did not find this issue in the FAQ, but I did not.  If
it is in there please sed -e 's/flame/where it is/' your reply.

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?!?!?!  I haven't heard of anything in the new standard about this, have I missed something?

Joining all the lines, and removing the backslashes causes the (now even more horrible looking) code to compile, what what's up with that?




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