build: Fix missing variable quotes and typo
[official-gcc.git] / gcc / testsuite / g++.dg / template / qualttp20.C
blob52989bae538daaf0da159f33bb8fbe058729843b
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;
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-message "required" }
36 B2<AS> b2;