https://gcc.gnu.org/bugzilla/show_bug.cgi?id=105863
Jakub Jelinek <jakub at gcc dot gnu.org> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |jakub at gcc dot gnu.org --- Comment #7 from Jakub Jelinek <jakub at gcc dot gnu.org> --- _Embed opens the pandorra box what should happen when you stringify it or try to token paste it together with something else etc. Anyway, for GCC implementation of what C23 specifies, I wonder if we shouldn't implement it in separate steps, first in a dumb way of just expanding it always into preprocessor token, a path that could perhaps then be kept for the smaller sizes when it isn't worth doing something smart. And only in the second step try to add optimizations to it (guess for C those could be easier than for C++ because C doesn't try to tokenize everything first, so for C when we peek at the large embed token outside of the language contexts where we know how to handle those (e.g. most importantly inside of aggregate initializers) we could simply replace the token with expanded form of it, say if one uses void foo (...); void bar () { foo ( #embed "foo_arguments" ); } it would work without having to bother too much about that specific case. The LLVM current pull request for this is https://github.com/llvm/llvm-project/pull/68620 I think we should try to use same options where reasonable.