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

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

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