-------------
#ifdef COMMENT
This is a really strange way to make a comment, wouldn't you say?
#endif
-------------
GCC will report an unterminated character constant in the code
fragment above, regardless of whether or not COMMENT is defined.
The fix is to turn this pseudo-comment into a real comment.
In some cases comments like the above also exist in code to force
deliberate errors if a certain required macro is not defined.
-------------
#ifndef MEM_SIZE
You forgot to define MEM_SIZE, didn't you?
#endif
-------------
Since this nasty device can appear in older (or just plain uglier)
source code, you may want to issue an anti-brain-damage warning in GCC
documentation.
Frank
>GCC will report an unterminated character constant in the code
>fragment above, regardless of whether or not COMMENT is defined.
This actually comes from cpp, not gcc. The reason is that gcc (and its
cpp) are ANSI C by default, which means that cpp has to tokenize to
correctly behave as an ANSI C cpp. In other words, it has to parse
the text being #ifdef'ed out.
If you use the -traditional flag, this code will compile OK.
Eduardo Krell AT&T Bell Laboratories, Murray Hill, NJ
UUCP: {att,decvax,ucbvax}!ulysses!ekrell Internet: ekr...@ulysses.att.com