diff options
Diffstat (limited to 'test/CXX/drs/dr2xx.cpp')
-rw-r--r-- | test/CXX/drs/dr2xx.cpp | 15 |
1 files changed, 10 insertions, 5 deletions
diff --git a/test/CXX/drs/dr2xx.cpp b/test/CXX/drs/dr2xx.cpp index bb1f13a..25c8535 100644 --- a/test/CXX/drs/dr2xx.cpp +++ b/test/CXX/drs/dr2xx.cpp @@ -999,15 +999,20 @@ namespace dr294 { // dr294: no } } -namespace dr295 { // dr295: no +namespace dr295 { // dr295: 3.7 typedef int f(); - // FIXME: This warning is incorrect. - const f g; // expected-warning {{unspecified behavior}} - const f &r = g; // expected-warning {{unspecified behavior}} + const f g; // expected-warning {{'const' qualifier on function type 'f' (aka 'int ()') has no effect}} + f &r = g; template<typename T> struct X { const T &f; }; - X<f> x = {g}; // FIXME: expected-error {{drops qualifiers}} + X<f> x = {g}; + + typedef int U(); + typedef const U U; // expected-warning {{'const' qualifier on function type 'U' (aka 'int ()') has no effect}} + + typedef int (*V)(); + typedef volatile U *V; // expected-warning {{'volatile' qualifier on function type 'U' (aka 'int ()') has no effect}} } namespace dr296 { // dr296: yes |