-
Notifications
You must be signed in to change notification settings - Fork 20
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
Add assignment and floating-point constant attributes #171
Changes from all commits
7a522fc
659e310
bfb5f54
551e460
e684426
ce1c7f7
a1b28f2
70a4303
453a777
f441f54
ac3a40a
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
// From some new MacOS headers: https://github.com/goblint/cil/issues/168 | ||
|
||
void foo(void) __attribute__((availability(macos,introduced=10.15))); | ||
|
||
void foo(void) { | ||
return; | ||
} | ||
|
||
// Version numbers may have multiple dots: https://github.com/goblint/cil/pull/171#issuecomment-2250670652 | ||
void bar(void) __attribute__((availability(macos,introduced=10.13.4))); | ||
|
||
void bar(void) { | ||
return; | ||
} |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
|
||
// This test is nonsense: DECLARE_WAIT_QUEUE_HEAD is a macro in Linux kernel | ||
DECLARE_WAIT_QUEUE_HEAD(log_wait); | ||
|
||
|
||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -222,6 +222,7 @@ sub addToGroup { | |
addTest("test/attr11 _GNUCC=1"); | ||
addTest("test/attr12 _GNUCC=1"); | ||
addTest("test/attr13 _GNUCC=1"); | ||
# addTest("test/attr-assign"); # TODO: only on OSX, Linux GCC errors on introduced | ||
addTest("testrun/packed _GNUCC=1 WARNINGS_ARE_ERRORS=1"); | ||
addTest("test/packed2 _GNUCC=1"); | ||
addTest("test/bitfield"); | ||
|
@@ -657,7 +658,7 @@ sub addToGroup { | |
addBadComment("scott/globalprob", "Notbug. Not a bug if fails on a non-Linux machine ;-)"); | ||
addTest("scott/bisonerror $gcc"); | ||
addTest("scott/cmpzero"); | ||
addTest("scott/kernel1 $gcc"); | ||
# addTest("scott/kernel1 $gcc"); | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Why is this test no longer of interest? I would guess McPeak had a reason for adding it? In what way does it fail if it is left there? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. It fails on GCC 14 with some of the new error types that aren't so easy to suppress in backwards-compatible way. The main line of the test is DECLARE_WAIT_QUEUE_HEAD(log_wait); which comes from the Linux kernel, where So this test has never been about parsing actual kernel sources (which have the macro that expands to something else entirely). In it, CIL is just successfully parsing some unpreprocessed code in a completely different way from its original meaning. This could be made conditional to not run on GCC 14+ (or run with different |
||
addTest("scott/kernel2 $gcc"); | ||
addTest("scott/xcheckers $gcc"); | ||
addTest("scott/memberofptr $gcc"); | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What happens with old GCC versions? Do they already have these options?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, I checked with GCC 7-13 (everything older we still look for in our
RealGccConfigure
) in Godbolt, that these already existed, but just weren't errors by default, so these shouldn't be a problem.GCC 14 added a few new ones I had to exclude here (in order to avoid needing GCC-version specific configuration logic here).