2013-09-12 Richard Biener <rguenther@suse.de>
[official-gcc.git] / gcc / testsuite / g++.dg / parse / error2.C
blob713957a319dbd90f079645f5eabf613da448019a
1 // { dg-do compile }
2 // { dg-options "-fshow-column -std=c++98" }
3 // Properly print CALL_EXPRs while dumping expressions
5 double g;
6 int func(double);
8 template <int>
9 struct Foo {};
11 Foo<func(g)> f; // { dg-error "5:'int func.double.' cannot appear in a constant-expression" "func double" { target *-*-* } 11 }
12 // { dg-error "10:'g' cannot appear in a constant-expression" "g" { target *-*-* } 11 }
13 // { dg-error "11:a function call cannot appear in a constant-expression" "call" { target *-*-* } 11 }
14 // { dg-error "12:template argument 1 is invalid" "invalid template argument" { target *-*-* } 11 }
15 // { dg-error "15:invalid type in declaration before ';' token" "invalid type" { target *-*-* } 11 }