OSDN Git Service

* parser.c (cp_parser_class_specifier): Set class location to that
[pf3gnuchains/gcc-fork.git] / gcc / testsuite / g++.dg / template / function1.C
1 // PR c++/38647
2 // { dg-do compile }
3
4 template<const char *, int> struct A {};
5 const char func[] = "abc";
6 template<int N> struct A<func, N> {};   // { dg-error "cannot appear|is invalid" }
7
8 char a1[1];
9 A<a1, 0> a;
10
11 template<const char *, int> struct B {};
12 template<int N> struct B<__FUNCTION__, N> {};   // { dg-error "cannot appear|is invalid" }
13
14 char b1[1];
15 B<b1, 0> b;
16
17 template<const char *, int> struct C {};
18 template<int N> struct C<__PRETTY_FUNCTION__, N> {};    // { dg-error "cannot appear|is invalid" }
19
20 char c1[1];
21 C<c1, 0> c;
22
23 template<const char *, int> struct D {};
24 template<int N> struct D<__func__, N> {};       // { dg-error "cannot appear|is invalid" }
25
26 char d1[1];
27 D<d1, 0> d;