Possible pitfall due to trigraphssuggest change
// delimited comments, it is possible to make a typographical error that affects their expected operation. If one types:
int x = 20; // Why did I do this??/
/ at the end was a typo but now will get interpreted into
\\. This is because the
??/ forms a trigraph.
??/ trigraph is actually a longhand notation for
\\, which is the line continuation symbol. This means that the compiler thinks the next line is a continuation of the current line, that is, a continuation of the comment, which may not be what is intended.
int foo = 20; // Start at 20 ??/ int bar = 0; // The following will cause a compilation error (undeclared variable 'bar') // because 'int bar = 0;' is part of the comment on the preceding line bar += foo;
Found a mistake? Have a question or improvement idea? Let me know.
Table Of Contents