PR c++/89511 - ICE with using-declaration and unscoped enumerator.
authorMarek Polacek <polacek@redhat.com>
Wed, 27 Feb 2019 19:07:18 +0000 (19:07 +0000)
committerMarek Polacek <mpolacek@gcc.gnu.org>
Wed, 27 Feb 2019 19:07:18 +0000 (19:07 +0000)
commit867a4ad28e118776bedc3bb2571d91c898aa3398
tree0d568ea85489f61ec8f75d64251330a09338dbfb
parentec3029103841b4298baff9adc37bfa7d357bdbe3
PR c++/89511 - ICE with using-declaration and unscoped enumerator.

* parser.c (cp_parser_using_declaration): For an unscoped enum
only use its context if it's not a function declaration.

* g++.dg/cpp0x/using-enum-3.C: New test.

From-SVN: r269262
gcc/cp/ChangeLog
gcc/cp/parser.c
gcc/testsuite/ChangeLog
gcc/testsuite/g++.dg/cpp0x/using-enum-3.C [new file with mode: 0644]