Sign in
gnu
/
gcc
/
1f16a020acbea0af26209478990b83b1a1ba3a2b
/
.
/
gcc
/
testsuite
/
g++.dg
/
conversion
/
nullptr1.C
blob: f1dd60238d2f287d2dd650ff53715b6cc6063550 [
file
] [
log
] [
blame
]
/* Test for overflow in NULL pointer constant. */
/* { dg-do compile } */
#include
<limits.h>
void
*
p
=
0
;
void
*
q
=
0
*
(
INT_MAX
+
1
);
// { dg-error "invalid conversion" }
// { dg-warning "integer overflow in expression" "" { target *-*-* } .-1 }