Skip to content

Commit 0c7b06c

Browse files
author
Daniel Kroening
committed
test for conversion from 0 to pointers
1 parent 25539f3 commit 0c7b06c

File tree

2 files changed

+21
-0
lines changed

2 files changed

+21
-0
lines changed
Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
struct some_struct {int whatnot;};
2+
3+
int main()
4+
{
5+
void *ptr1;
6+
int some_struct::* ptr2;
7+
int (*ptr3)(int);
8+
9+
// The number '0' can be converted to any pointer
10+
ptr1=0;
11+
ptr2=0;
12+
ptr3=0;
13+
}
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
KNOWNBUG
2+
main.cpp
3+
4+
^EXIT=0$
5+
^SIGNAL=0$
6+
--
7+
^warning: ignoring
8+
^CONVERSION ERROR$

0 commit comments

Comments
 (0)