New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
declaration of vars with undefined structured type is rejected #3682
Comments
assigned to @DougGregor |
the parser rejects are all reduced to this simple test case: struct foo bar; 'gcc -fsyntax-only' accepts this with no warning (weird..), while clang rejects it. |
This is invalid code per C99 6.7p7. Note that, for example,extern struct foo bar;
|
*** Bug llvm/llvm-bugzilla-archive#3349 has been marked as a duplicate of this bug. *** |
I think you reduced that a bit too much... that's actually a bug in gcc's "-fsyntax-only". Try "gcc -S -o /dev/null" instead. |
Proper reduced testcase: struct a x; And as far as I can tell, this is actually legal; 6.7p7 doesn't apply here because x has linkage. |
Should be fixed by: http://lists.cs.uiuc.edu/pipermail/cfe-commits/Week-of-Mon-20090309/013735.html |
mentioned in issue llvm/llvm-bugzilla-archive#3349 |
Extended Description
We scanned our firmware coreboot (See http://www.coreboot.org/) and it finds 11 analyzer failures. Complete logs are at http://www.coresystems.de/~patrick/scan-build-2009-01-09-1/
Please let me know if you need more information
The text was updated successfully, but these errors were encountered: