-
Notifications
You must be signed in to change notification settings - Fork 277
C front-end: labelled declarations are only supported by Visual Studio #5931
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
Conversation
75f7615
to
99822bc
Compare
Codecov ReportBase: 78.39% // Head: 78.40% // Increases project coverage by
Additional details and impacted files@@ Coverage Diff @@
## develop #5931 +/- ##
========================================
Coverage 78.39% 78.40%
========================================
Files 1655 1655
Lines 190281 190302 +21
========================================
+ Hits 149172 149200 +28
+ Misses 41109 41102 -7
Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here. ☔ View full report at Codecov. |
99822bc
to
42dad02
Compare
d14facc
to
06e9742
Compare
06e9742
to
8201ead
Compare
8201ead
to
8cef4ab
Compare
8cef4ab
to
8e41e24
Compare
8e41e24
to
5ed44db
Compare
The link https://github.com/gcc-mirror/gcc/blob/master/gcc/c/c-parser.c#L5553 doesn't work. |
5ed44db
to
37b4773
Compare
I have updated the link in both the commit message and the PR description. |
In order to support GCC's label attributes even when the semicolon is omitted, distinguish GCC and Visual Studio modes when parsing labelled statements. See https://github.com/gcc-mirror/gcc/blob/master/gcc/c/c-parser.cc#L6070 for GCC's limitation, which we now mimic. (We already supported attributes followed by a semicolon, which GCC's documentation mandates, but the Linux kernel doesn't always follow this rule.) Fixed regression tests that had declarations immediately following a label.
Also added braces where an if condition spans multiple lines, and replace one case of if(...) return true; return false; by return (...);
37b4773
to
a5f789a
Compare
In order to support GCC's label attributes even when the semicolon is
omitted, distinguish GCC and Visual Studio modes when parsing labelled
statements. See
https://github.com/gcc-mirror/gcc/blob/master/gcc/c/c-parser.cc#L6070 for
GCC's limitation, which we now mimic. (We already supported attributes
followed by a semicolon, which GCC's documentation mandates, but the
Linux kernel doesn't always follow this rule.) Fixed regression tests
that had declarations immediately following a label.