Syntax error with #if and designated initializer
Closed this issue · 0 comments
chrchr-github commented
From the forum: https://sourceforge.net/p/cppcheck/discussion/general/thread/2cc604d687
struct S { int i; };
struct S s = {
#if 1
.i = 1,
#endif
};
bar.cpp:3:0: error: Syntax error in #if [preprocessorErrorDirective]
#if 1
^
The tokens 1
and .
are combined.