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] |
| Other format: | [Raw text] | |
// A poorly formatted comment \\ int x = 0; int y = 1; ...
Howard,
Have you tested the sequence above with various compilers?
I just have. The behavior depends on whether there is whitespace after the \\ or not. If there is none, then EDG-based compilers will comment out the declaration of x. If there is whitespace, gcc 3.x comments it out and the others don't.
I personally like the fact that gcc's behavior does not depend on invisible characters; on the other hand, there's a good argument that this behavior is ordinarily not desirable and should be warned about, except to continue strings.
I have difficulty believing that it is desirable for production code to contain surprises like this.
| Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
|---|---|---|
| Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |