* pretty-print.c (pp_base_maybe_space): New function.
[official-gcc.git] / gcc / testsuite / g++.dg / template / qualttp20.C
blob13f07e14c5c2497e08f11213194c1de30980c03d
1 // { dg-do compile }
3 // Copyright (C) 2001 Free Software Foundation, Inc.
4 // Contributed by Nathan Sidwell 15 Dec 2001 <nathan@codesourcery.com>
6 // PR 2645
8 struct AS
10   typedef void (myT) ();
11   struct L {};
12   
16 template <typename T> struct B1 : T
18   typedef typename T::L __restrict__ r;// { dg-error "`__restrict__' qualifiers cannot" "" }
19   typedef typename T::myT __restrict__ p;// { dg-warning "ignoring `__restrict__'" "" { xfail *-*-* } }
21   // The following are DR 295 dependent
22   typedef typename T::myT volatile *myvolatile; // { dg-error "qualifiers" ""  }
23   typename T::myT volatile *a;    // { dg-error "qualifiers" "" }
24   myvolatile b;                  // { dg-error "qualifiers" "" }
26 template <typename T> struct B2 : T
28   // The following are DR 295 dependent
29   typedef typename T::myT const *myconst; // { dg-error "qualifiers" "" }
30   typename T::myT const *a; // { dg-error "qualifiers" "" }
31   myconst b; // { dg-error "qualifiers" "" }
34 B1<AS> b1;      // { dg-error "instantiated" "" }
35 B2<AS> b2;      // { dg-error "instantiated" "" }