gcc/testsuite/gcc.dg/c23-octal-constants-1.c
raw| 1 | /* Test that octal constants are diagnosed in C23 mode: -pedantic. */ |
| 2 | /* { dg-do compile } */ |
| 3 | /* { dg-options "-std=c23 -pedantic" } */ |
| 4 | |
| 5 | int a = 0o7; /* { dg-warning "'0o' prefixed constants" } */ |
| 6 | #if 0o107 /* { dg-warning "'0o' prefixed constants" } */ |
| 7 | #endif |
| 8 | |
| 9 | int b = 0O7; /* { dg-warning "'0o' prefixed constants" } */ |
| 10 | #if 0O107 /* { dg-warning "'0o' prefixed constants" } */ |
| 11 | #endif |