gcc/testsuite/g++.dg/cpp0x/udlit-preproc-neg.C
raw| 1 | // { dg-do compile { target c++11 } } |
| 2 | |
| 3 | int |
| 4 | operator ""_badpreproc(const char *str) |
| 5 | { return 0; } |
| 6 | |
| 7 | #if 123_badpreproc // { dg-error "user-defined literal in preprocessor expression" } |
| 8 | # error ("user-defined literal in preprocessor expression") // { dg-error "user-defined literal in preprocessor expression" } |
| 9 | #endif |