https://gcc.gnu.org/bugzilla/show_bug.cgi?id=55820
Dominik Czarnota <dominik.b.czarnota+bugzilla at gmail dot com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |dominik.b.czarnota+bugzilla | |@gmail.com --- Comment #2 from Dominik Czarnota <dominik.b.czarnota+bugzilla at gmail dot com> --- Six years later this is still unconfirmed :(. >(In reply to Andrew Pinski from comment #1) > yes this code is undefined at compile time. GCC used to reject #define in a > macro usage but it was decided we will accept that. I can find the old bugs > if needed. Shall this be then changed to WONTFIX (or INVALID)? It would be nice if someone provide some C standard reference if there is something regarding to this. Just for reference, I stumbled across this when analysing a CTF challenge solution (https://twitter.com/disconnect3d_pl/status/1212880292593229825) and wanted to do: #define TOSTR(a) #a #define hxp TOSTR( #include "flag" ); where the `flag` file contained: `hxp{flag}` (without backticks).