diff options
Diffstat (limited to 'gcc/testsuite/g++.dg/parse/error2.C')
-rw-r--r-- | gcc/testsuite/g++.dg/parse/error2.C | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/gcc/testsuite/g++.dg/parse/error2.C b/gcc/testsuite/g++.dg/parse/error2.C new file mode 100644 index 000000000..7b08df454 --- /dev/null +++ b/gcc/testsuite/g++.dg/parse/error2.C @@ -0,0 +1,15 @@ +// { dg-do compile } +// { dg-options "-fshow-column -std=c++98" } +// Properly print CALL_EXPRs while dumping expressions + +double g; +int func(double); + +template <int> +struct Foo {}; + +Foo<func(g)> f; // { dg-error "5:'int func.double.' cannot appear in a constant-expression" "" { target *-*-* } 11 } +// { dg-error "10:'g' cannot appear in a constant-expression" "" { target *-*-* } 11 } +// { dg-error "11:a function call cannot appear in a constant-expression" "" { target *-*-* } 11 } +// { dg-error "12:template argument 1 is invalid" "" { target *-*-* } 11 } +// { dg-error "15:invalid type in declaration before ';' token" "" { target *-*-* } 11 } |