4 ms·
I'm pretty sure the preprocessor goes first. BUT it appears to put a space in between the two -s, at least in my testing, so the result is the same.
by mikeash 14y ago
I'm pretty sure the preprocessor goes first. BUT it appears to put a space in between the two -s, at least in my testing, so the result is the same.
- viraptor 14y agoThat's the reason for ps... But either way - what I meant is that it doesn't run just a text replace, it has to split the tokens first. Otherwise SOME_MONE_TEXT would get turned into SOME_-1_TEXT too. Lexer has to detect where the whole token exists on its own and replace it with equivalent syntax.
- mrmekon 14y agoGCC explains here: http://gcc.gnu.org/onlinedocs/cppinternals/Token-Spacing.html http://gcc.gnu.org/onlinedocs/cppinternals/Token-Spacing.htm... I can't find anything in the C spec that says this is strictly required, but that doesn't mean it's not in there.
- mikeash 14y agoFigures, something that looks relatively simple (the C preprocessor) ends up having a ton of complicated stuff going on underneath.