summaryrefslogtreecommitdiff
path: root/gcc/testsuite/g++.dg/conversion/nullptr2.C
blob: 74ceff49dba63c020d8906689c1f98819e164329 (plain)
1
2
3
4
5
6
7
8
9
10
/* Test for enumeration as NULL pointer constant.  */
/* PR c++/14644 */
/* { dg-do compile } */

enum { NULL = 0 };

void *p = 0;

void *q = NULL;  // { dg-error "cannot convert" }