This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug c++/87781] template disambiguator not after `::`, `.` or `->` is incorrectly accepted in an elaborated-type-specifier


https://gcc.gnu.org/bugzilla/show_bug.cgi?id=87781

--- Comment #1 from Marek Polacek <mpolacek at gcc dot gnu.org> ---
Author: mpolacek
Date: Mon Nov 19 21:37:01 2018
New Revision: 266285

URL: https://gcc.gnu.org/viewcvs?rev=266285&root=gcc&view=rev
Log:
        PR c++/87781 - detect invalid elaborated-type-specifier.
        * parser.c (cp_parser_elaborated_type_specifier): Ensure that
        typename follows a nested-name-specifier.

        * g++.dg/parse/elab3.C: New test.
        * g++.dg/template/crash115.C: Adjust dg-error.

Added:
    trunk/gcc/testsuite/g++.dg/parse/elab3.C
Modified:
    trunk/gcc/cp/ChangeLog
    trunk/gcc/cp/parser.c
    trunk/gcc/testsuite/ChangeLog
    trunk/gcc/testsuite/g++.dg/template/crash115.C

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]