Hacker News new | past | comments | ask | show | jobs | submit login

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.



GCC explains here:

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.


Figures, something that looks relatively simple (the C preprocessor) ends up having a ton of complicated stuff going on underneath.


That'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.




Join us for AI Startup School this June 16-17 in San Francisco!

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: