aboutsummaryrefslogtreecommitdiff
path: root/gcc/testsuite/gcc.dg/c23-octal-constants-2.c
blob: 8ee9609f3adb6f3614e6288f0a1e2e87a27e3f76 (plain)
1
2
3
4
5
6
7
8
9
10
11
/* Test that octal constants are diagnosed in C23 mode: -pedantic-errors.  */
/* { dg-do compile } */
/* { dg-options "-std=c23 -pedantic-errors" } */

int a = 0o7; /* { dg-error "'0o' prefixed constants" } */
#if 0o107 /* { dg-error "'0o' prefixed constants" } */
#endif

int b = 0O7; /* { dg-error "'0o' prefixed constants" } */
#if 0O107 /* { dg-error "'0o' prefixed constants" } */
#endif