Skip to content

Commit 2f36e51

Browse files
author
Daniel Kroening
authored
Merge pull request #3182 from tautschnig/cprover_bool-output
Distinguish __CPROVER_bool from _Bool in output
2 parents 5e84ac2 + a86c4d9 commit 2f36e51

File tree

3 files changed

+19
-1
lines changed

3 files changed

+19
-1
lines changed

regression/cbmc/cprover_bool1/main.c

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
#include <assert.h>
2+
3+
int main()
4+
{
5+
int y;
6+
__CPROVER_bool x = y;
7+
assert(x != (__CPROVER_bool)y);
8+
}
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
CORE
2+
main.c
3+
--trace
4+
^EXIT=10$
5+
^SIGNAL=0$
6+
^VERIFICATION FAILED$
7+
x != \(__CPROVER_bool\)y
8+
--
9+
x != \(_Bool\)y
10+
^warning: ignoring

src/ansi-c/expr2c.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -205,7 +205,7 @@ std::string expr2ct::convert_rec(
205205

206206
if(src.id()==ID_bool)
207207
{
208-
return q+"_Bool"+d;
208+
return q + CPROVER_PREFIX + "bool" + d;
209209
}
210210
else if(src.id()==ID_c_bool)
211211
{

0 commit comments

Comments
 (0)