Skip to content

Commit d074537

Browse files
Daniel Kroeningtautschnig
Daniel Kroening
authored andcommitted
test for signature conflict with undeclared function
1 parent 37a11f9 commit d074537

File tree

3 files changed

+23
-0
lines changed

3 files changed

+23
-0
lines changed

regression/cbmc/return6/f_def.c

+4
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
unsigned f()
2+
{
3+
return 0x34;
4+
}

regression/cbmc/return6/main.c

+11
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
#include <assert.h>
2+
3+
// Do not declare f().
4+
// This is invalid from C99 upwards, but kind of ok before.
5+
6+
int main()
7+
{
8+
int return_value;
9+
return_value=f();
10+
assert(return_value==0x34);
11+
}

regression/cbmc/return6/test.desc

+8
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
KNOWNBUG
2+
main.c
3+
f_def.c
4+
^EXIT=0$
5+
^SIGNAL=0$
6+
^VERIFICATION SUCCESSFUL$
7+
--
8+
^warning: ignoring

0 commit comments

Comments
 (0)