File tree Expand file tree Collapse file tree 11 files changed +55
-49
lines changed Expand file tree Collapse file tree 11 files changed +55
-49
lines changed Original file line number Diff line number Diff line change @@ -86,19 +86,6 @@ test_script:
8686 rmdir /s /q cbmc\byte_update7
8787 rmdir /s /q cbmc\pipe1
8888 rmdir /s /q cbmc\unsigned___int128
89- rmdir /s /q cbmc-cpp
90- rmdir /s /q cpp\Decltype1
91- rmdir /s /q cpp\Decltype2
92- rmdir /s /q cpp\Function_Overloading1
93- rmdir /s /q cpp\Resolver10
94- rmdir /s /q cpp\Resolver11
95- rmdir /s /q cpp\Template_Parameters1
96- rmdir /s /q cpp\enum2
97- rmdir /s /q cpp\enum7
98- rmdir /s /q cpp\enum8
99- rmdir /s /q cpp\nullptr1
100- rmdir /s /q cpp\sizeof1
101- rmdir /s /q cpp\static_assert1
10289 rmdir /s /q goto-gcc
10390 rmdir /s /q goto-instrument\slice08
10491 cd ..
Original file line number Diff line number Diff line change 1- #include < cassert>
2-
31int const C=10 ;
42
53int main ()
64{
7- assert (C== 10 );
5+ __CPROVER_assert (C == 10 , " " );
86
97 // this is *not* allowed
108 ((int &)C)=20 ;
Original file line number Diff line number Diff line change 1+ #ifdef __GNUC__
2+ #define NOTHROW __attribute__ ((nothrow))
3+ #else
4+ #define NOTHROW
5+ #endif
6+
17namespace std {
28 // cmath
3- __inline float abs (float x) __attribute__((nothrow)) ;
4- __inline double abs (double x) __attribute__((nothrow)) ;
5- __inline long double abs (long double x) __attribute__((nothrow)) ;
9+ __inline float abs (float x) NOTHROW ;
10+ __inline double abs (double x) NOTHROW ;
11+ __inline long double abs (long double x) NOTHROW ;
612}
713
814namespace std {
915 extern " C" {
10- int abs (int ) __attribute__((nothrow)) ;
16+ int abs (int ) NOTHROW ;
1117 }
1218 extern " C++" {
13- inline long abs (long n) __attribute__((nothrow)) ;
14- inline long long abs (long long n) __attribute__((nothrow)) ;
19+ inline long abs (long n) NOTHROW ;
20+ inline long long abs (long long n) NOTHROW ;
1521 }
1622}
1723
Original file line number Diff line number Diff line change 1- #include < cassert>
2-
31struct A
42{
53 int i;
Original file line number Diff line number Diff line change 1- #include < cassert>
2-
31struct A
42{
53 bool func () { return false ; }
Original file line number Diff line number Diff line change 1- #include < cassert>
2-
31// V depends on Ty
42template <typename Ty, Ty V>
53class T
Original file line number Diff line number Diff line change 1- CORE
1+ KNOWNBUG
22main.cpp
33
44^EXIT=0$
Original file line number Diff line number Diff line change 1- #include < cassert>
2-
31enum E1 { e1 } e1_var;
42enum E2 { e2 } e2_var;
53
@@ -23,19 +21,19 @@ struct some_struct
2321
2422int main ()
2523{
26- assert (f (0 )== 0 );
27- assert (f (e1 )== 1 );
28- assert (f (e2 )== 2 );
29- assert (f (e1_var)== 1 );
30- assert (f (e2_var)== 2 );
31-
32- assert (g (0 )== 0 );
33- assert (g (e1 )== 1 );
34- assert (g (e2 )== 0 );
35- assert (g (e1_var)== 1 );
36- assert (g (e2_var)== 0 );
37-
38- assert (f (some_struct_var.i )== 0 );
39- assert (f (some_struct_var.e1 )== 1 );
40- assert (f (some_struct_var.e2 )== 2 );
24+ __CPROVER_assert (f (0 ) == 0 , " " );
25+ __CPROVER_assert (f (e1 ) == 1 , " " );
26+ __CPROVER_assert (f (e2 ) == 2 , " " );
27+ __CPROVER_assert (f (e1_var) == 1 , " " );
28+ __CPROVER_assert (f (e2_var) == 2 , " " );
29+
30+ __CPROVER_assert (g (0 ) == 0 , " " );
31+ __CPROVER_assert (g (e1 ) == 1 , " " );
32+ __CPROVER_assert (g (e2 ) == 0 , " " );
33+ __CPROVER_assert (g (e1_var) == 1 , " " );
34+ __CPROVER_assert (g (e2_var) == 0 , " " );
35+
36+ __CPROVER_assert (f (some_struct_var.i ) == 0 , " " );
37+ __CPROVER_assert (f (some_struct_var.e1 ) == 1 , " " );
38+ __CPROVER_assert (f (some_struct_var.e2 ) == 2 , " " );
4139}
Original file line number Diff line number Diff line change 1- #include < cassert>
2-
31typedef decltype (nullptr ) nullptr_t;
42
53static_assert (nullptr ==0 , " nullptr==0" );
@@ -20,7 +18,7 @@ int main()
2018
2119 char buffer[10 ];
2220 void *p=my_null, *q=buffer;
23- assert (q!= nullptr );
21+ __CPROVER_assert (q != nullptr , " " );
2422
2523 something (nullptr );
2624}
Original file line number Diff line number Diff line change @@ -406,6 +406,7 @@ const char *ms_cl_prefixes[]=
406406 " MT" , // link with LIBCMT.LIB
407407 " MDd" , // link with MSVCRTD.LIB debug lib
408408 " MTd" , // link with LIBCMTD.LIB debug lib
409+ " std" , // specify C++ language standard
409410 nullptr
410411};
411412
You can’t perform that action at this time.
0 commit comments