[cfe-dev] New array/struct initializer parser bug
Keith Bauer
onesadcookie at gmail.com
Fri Oct 26 19:15:28 PDT 2007
... or were initializers not even being parsed before?
CookieJar:~/Desktop keith$ cat > structinit.c
struct s { int i; };
struct s a[1] =
{
{ 3 }
};
CookieJar:~/Desktop keith$ clang -fsyntax-only structinit.c
structinit.c:5:7: error: incompatible types assigning 'int' to 'struct s'
{ 3 }
^
structinit.c:5:7: warning: excess elements in array initializer
{ 3 }
^
2 diagnostics generated.
CookieJar:~/Desktop keith$ gcc -fsyntax-only -Wall -Wextra structinit.c
CookieJar:~/Desktop keith$
-Keith
More information about the cfe-dev
mailing list