[DGD] Comment/Preprocessor Bug
Blain
blain20 at gmail.com
Wed Apr 24 06:04:40 CEST 2013
Shentino says the line endings are messed up in my last post (I'm using
Gmail so I don't see it!). Sorry for the repost.
===
I found a bug with the preprocessor and C++-style comments near them:
BREAKS:
#ifdef DEBUG_WRAP
} //comment
#endif /* DEBUG_WRAP */
(Note: The above just causes the #endif to disappear, so the compiler runs
into EOF. I can place another #endif after to fix it.)
WORKS:
#ifdef DEBUG_WRAP
} /* comment */
#endif /* DEBUG_WRAP */
===
BREAKS:
#define FOO BLAH //comment
WORKS:
#define FOO BLAH /* comment */
On Wed, Apr 24, 2013 at 10:51 AM, Blain <blain20 at gmail.com> wrote:
> I found a bug with the precprocessor and C++-style comments near them:
>
> BREAKS: #ifdef DEBUG_WRAP } //comment #endif /* DEBUG_WRAP */
> (Note: The above just causes the #endif to disappear, so the compiler runs
> into EOF. I can place another #endif after to fix it.) WORKS: #ifdef
> DEBUG_WRAP } /* comment */ #endif /* DEBUG_WRAP */ === BREAKS: #define FOO
> BLAH //comment WORKS: #define FOO BLAH /* comment */
>
>
More information about the DGD
mailing list