diff options
Diffstat (limited to 'gcc/testsuite/g++.dg/cpp0x/alignof2.C')
-rw-r--r-- | gcc/testsuite/g++.dg/cpp0x/alignof2.C | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/gcc/testsuite/g++.dg/cpp0x/alignof2.C b/gcc/testsuite/g++.dg/cpp0x/alignof2.C new file mode 100644 index 000000000..7c5aad3de --- /dev/null +++ b/gcc/testsuite/g++.dg/cpp0x/alignof2.C @@ -0,0 +1,7 @@ +// { dg-do compile } +// { dg-options "-std=c++0x -pedantic" } +int main(void) +{ + alignof(int); //ok with a type but not with an expression + alignof(3); // { dg-warning "alignof" } +} |