This is very cool, although a more compact way to check for single line comments (introduced in C99) versus division using "//* */". I used that trick here:
https://github.com/ioccc-src/winner/blob/a1c86c8a7a533e3c2cd...
This is very cool, although a more compact way to check for single line comments (introduced in C99) versus division using "//* */". I used that trick here:
https://github.com/ioccc-src/winner/blob/a1c86c8a7a533e3c2cd...
You gave an IOCCC snippet as an example of a C99 coding trick you know? I mean, the code looks visually cool, but it's funny to explain a code concept using code shaped like an anime character. (At least that's what I think it is.)
I don't know how to link to just a specific part of the line, but the interesting bit is at the end of line 16 and the start of line 17:
With C89, this is evaluated as "x *= 02 / 2 - 1", or "x *= 0".With C99, this is evaluated as "x *= 02 / -1", or "x *= -2".