Mercurial > hg > CbC > CbC_gcc
comparison gcc/testsuite/g++.dg/warn/Wzero-as-null-pointer-constant-7.C @ 131:84e7813d76e9
gcc-8.2
author | mir3636 |
---|---|
date | Thu, 25 Oct 2018 07:37:49 +0900 |
parents | |
children | 1830386684a0 |
comparison
equal
deleted
inserted
replaced
111:04ced10e8804 | 131:84e7813d76e9 |
---|---|
1 // { dg-options "-Wzero-as-null-pointer-constant" } | |
2 // { dg-do compile { target c++11 } } | |
3 | |
4 #include <cstddef> | |
5 | |
6 void test01() | |
7 { | |
8 char* x(NULL); | |
9 char* x2{NULL}; | |
10 char* x3 = NULL; | |
11 char* x4(0); // { dg-warning "zero as null pointer" } | |
12 char* x5 = 0; // { dg-warning "zero as null pointer" } | |
13 } |