decltype-pr66548.C: Reinstate correct version.
2019-05-22 Paolo Carlini <paolo.carlini@oracle.com> * g++.dg/cpp0x/decltype-pr66548.C: Reinstate correct version. From-SVN: r271507
This commit is contained in:
parent
9f7c6db60d
commit
fc907923f1
21
gcc/testsuite/g++.dg/cpp0x/decltype-pr66548.C
Normal file
21
gcc/testsuite/g++.dg/cpp0x/decltype-pr66548.C
Normal file
@ -0,0 +1,21 @@
|
||||
// PR c++/66548 - Invalid class member access expression in decltype
|
||||
// sometimes accepted
|
||||
// { dg-do compile }
|
||||
// { dg-options "-ftrack-macro-expansion=0" }
|
||||
|
||||
#if __cplusplus < 201103L
|
||||
# define decltype __typeof__
|
||||
#endif
|
||||
|
||||
struct Meow {};
|
||||
|
||||
void f ()
|
||||
{
|
||||
decltype (Meow.purr ()) d; // { dg-error "expected primary-expression" "pr89875" { xfail c++98_only } }
|
||||
(void)&d;
|
||||
}
|
||||
|
||||
void g ()
|
||||
{
|
||||
decltype (Meow.purr); // { dg-error "expected primary-expression" }
|
||||
}
|
Loading…
Reference in New Issue
Block a user