gcc/testsuite/gcc.dg/c2y-octal-constants-2.c
raw| 1 | /* Test that octal constants are accepted in C2Y mode: compat warnings. */ |
| 2 | /* { dg-do compile } */ |
| 3 | /* { dg-options "-std=c2y -Wc23-c2y-compat" } */ |
| 4 | |
| 5 | int a = 0o7; /* { dg-warning "C2Y feature" } */ |
| 6 | #if 0o107 /* { dg-warning "C2Y feature" } */ |
| 7 | #endif |
| 8 | |
| 9 | int b = 0O7; /* { dg-warning "C2Y feature" } */ |
| 10 | #if 0O107 /* { dg-warning "C2Y feature" } */ |
| 11 | #endif |