Skip to content

Commit 0340e0f

Browse files
author
Daniel Kroening
committed
comparison check
1 parent 0c7b06c commit 0340e0f

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

regression/cpp/nullptr1/main.cpp

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
#include <cassert>
2+
13
typedef decltype(nullptr) nullptr_t;
24

35
static_assert(nullptr==0, "nullptr==0");
@@ -16,7 +18,9 @@ int main()
1618
my_null=nullptr;
1719
my_null=0;
1820

19-
void *p=my_null;
21+
char buffer[10];
22+
void *p=my_null, *q=buffer;
23+
assert(q!=nullptr);
2024

2125
something(nullptr);
2226
}

0 commit comments

Comments
 (0)