[llvm-bugs] [Bug 51931] -Wdeclaration-after-statement doesn't work when used with -std=c99
via llvm-bugs
llvm-bugs at lists.llvm.org
Wed Sep 22 01:33:07 PDT 2021
https://bugs.llvm.org/show_bug.cgi?id=51931
Luka Kudra <luka.kudra at gmail.com> changed:
What |Removed |Added
----------------------------------------------------------------------------
Resolution|INVALID |FIXED
--- Comment #2 from Luka Kudra <luka.kudra at gmail.com> ---
Yes, gcc and clang behave the same if I compile the code with just -std=c99
-pedantic, but if I explicitly add -Wdeclaration-after-statement gcc throws a
warning and clang doesn't.
I modified your code by adding -Wdeclaration-after-statement in the first two
columns, you can see that the behavior is different between gcc and clang:
https://godbolt.org/z/5dzjvfYYq
--
You are receiving this mail because:
You are on the CC list for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-bugs/attachments/20210922/6d0d48bd/attachment.html>
More information about the llvm-bugs
mailing list