Merge from the pain train
[official-gcc.git] / gcc / testsuite / g++.dg / template / qualttp20.C
blobae20d7629020fe28badceebb28669c7b1e14247f
1 // { dg-do compile }
2 // { dg-options "-pedantic -pedantic-errors" }
4 // Copyright (C) 2001 Free Software Foundation, Inc.
5 // Contributed by Nathan Sidwell 15 Dec 2001 <nathan@codesourcery.com>
7 // PR 2645
9 struct AS
11   typedef void (myT) ();
12   struct L {};
13   
17 template <typename T> struct B1 : T
19   typedef typename T::L __restrict__ r;// { dg-error "'__restrict__' qualifiers cannot" "" }
20   typedef typename T::myT __restrict__ p;// { dg-error "ignoring '__restrict__'" }
22   // The following are DR 295 dependent
23   typedef typename T::myT volatile *myvolatile;
24   typename T::myT volatile *a;
25   myvolatile b;
27 template <typename T> struct B2 : T
29   // The following are DR 295 dependent
30   typedef typename T::myT const *myconst;
31   typename T::myT const *a;
32   myconst b;
35 B1<AS> b1;      // { dg-error "instantiated" "" }
36 B2<AS> b2;