Skip to content

Instantly share code, notes, and snippets.

@wvdschel
Created March 30, 2012 11:09
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save wvdschel/2250827 to your computer and use it in GitHub Desktop.
Save wvdschel/2250827 to your computer and use it in GitHub Desktop.
Trigraph trickery
/* Always change a */
// Do we need to change a??/
if(aChanged)
foo->a = a;
/* Never change a */
// Do we need to change a??/
if(aChanged) foo->a = a;
@itkovian
Copy link

This is why // should not be used :-)

@wvdschel
Copy link
Author

This is why trigraphs should no longer be allowed and the compiler should warn against them. I'm OK with single line comments using //.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment