aboutsummaryrefslogtreecommitdiff
path: root/gcc/testsuite/gcc.dg/c2x-binary-constants-3.c
blob: 7604791fa85ce51a37880c53cb160d5528b7df14 (plain)
1
2
3
4
5
6
7
8
9
/* Test C2x binary constants.  Invalid constants.  */
/* { dg-do compile } */
/* { dg-options "-std=c2x -pedantic-errors" } */

int a = 0b; /* { dg-error "invalid suffix" } */
int b = 0B2; /* { dg-error "invalid suffix" } */
int c = 0B02; /* { dg-error "invalid digit" } */
int d = 0b1.1; /* { dg-error "invalid prefix" } */
int e = 0B0p0; /* { dg-error "invalid suffix" } */