You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The contents of definition are tokenized and processed as if they appeared during translation phase three in a ‘#define’ directive. In particular, the definition is truncated by embedded newline characters.`
So newline splicing should not happen for -D definitions.
For a program that contains the single token FOO, clang produces the following output (gcc is the same but does not issue a warning):
➜ ~ clang -E -DFOO="F\\
OO" test.c
warning: macro 'FOO' contains embedded newline; text after the newline is ignored
F\
1 warning generated.
The text was updated successfully, but these errors were encountered:
From the GCC docs for
-D name=definition
:So newline splicing should not happen for
-D
definitions.For a program that contains the single token
FOO
, clang produces the following output (gcc is the same but does not issue a warning):The text was updated successfully, but these errors were encountered: