Conversation
cbba9f8 to
b949d48
Compare
|
Asking here so as not to delay #8621 any further:
|
|
Also, while working on this piece of code we might fix #8308? |
Yes, some tokens come with an IREP and some don't -- and it's prone to error to keep that in sync. I am minded to give an IREP to all identifier-like tokens to remove that ambiguity.
For clarity, could be renamed to |
67cd3f5 to
1de6619
Compare
Yes, but not what I was after: |
|
54026f1 to
7c8b661
Compare
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## develop #8623 +/- ##
===========================================
- Coverage 80.38% 80.37% -0.02%
===========================================
Files 1686 1686
Lines 206764 206872 +108
Branches 75 73 -2
===========================================
+ Hits 166207 166268 +61
- Misses 40557 40604 +47 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
ddec5f3 to
a556e81
Compare
| // C23 introduces the "static_assert" keyword. | ||
|
|
||
| struct S | ||
| { | ||
| // Visual Studio does not support static_assert in compound bodies. | ||
| #ifndef _MSC_VER | ||
| static_assert(1, "in struct"); | ||
| #endif | ||
| int x; | ||
| } asd; | ||
|
|
||
| static_assert(1, "global scope"); | ||
|
|
||
| int main() | ||
| { | ||
| static_assert(1, "in function"); | ||
| } |
There was a problem hiding this comment.
Shouldn't this go in the ansi-c regression test folder instead of cbmc?
There was a problem hiding this comment.
Yes, that was my first attempt. But we run various compilers over that folder, and they don't do C23.
| typedef int INTTYPE; | ||
|
|
||
| int func1(); | ||
|
|
||
| // C23 typeof | ||
| typeof(int) v1; | ||
| typeof(INTTYPE) v2; | ||
| typeof(v2) v3; | ||
| typeof(1 + 1) v4; | ||
| typeof(1 + 1 + func1()) v5; | ||
| const typeof(int) v6; | ||
| typeof(int) const v7; | ||
| static typeof(int) const v8; | ||
| static typeof(int) const *v9; | ||
| static volatile typeof(int) const *v10; | ||
|
|
||
| void func2(typeof(int) *some_arg) | ||
| { | ||
| } | ||
|
|
||
| int main() | ||
| { | ||
| } |
There was a problem hiding this comment.
Should probably go in ansi-c?
| return integer2string(binary2integer(binary, false)); | ||
| } | ||
| else | ||
| return convert_norep(src, precedence); |
There was a problem hiding this comment.
I think previously this would handle __CPROVER_bitvector in some way?
There was a problem hiding this comment.
Those map to signedbv/unsignedv.
45c3fe6 to
5a39bdd
Compare
669e233 to
0c3d48c
Compare
6ee8f9d to
d070209
Compare
This adds scanner, parser and typechecker support for the new C23 keywords.
| INVARIANT_WITH_DIAGNOSTICS( | ||
| !assertion.is_false(), | ||
| "static assertion " + id2string(get_string_constant(code.op1())), | ||
| "static assertion is false", |
There was a problem hiding this comment.
Hmm, shouldn't we keep the message when there is one?
There was a problem hiding this comment.
This should never be executed, and is presumably dead code.
This release adds C17 and C23 support to our C front-end (via diffblue#8620, diffblue#8623). We have no longer provide Ubuntu 20.04 pre-built binaries as security support for that distribution has ended.
This adds scanner, parser and typechecker support for the new C23 keywords.