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

--- Comment #3 from David Malcolm <dmalcolm at gcc dot gnu.org> ---
Author: dmalcolm
Date: Mon Aug 27 23:33:02 2018
New Revision: 263899

URL: https://gcc.gnu.org/viewcvs?rev=263899&root=gcc&view=rev
Log:
C++: fix-it hint for missing "typename" (PR c++/63392)

This patch adds a fix-it hint to missing "typename" errors in the C++
frontend, suggesting the insertion of "typename ".

This addresses part of PR c++/63392; however it does not improve the
error-recovery for such cases.

gcc/cp/ChangeLog:
        PR c++/63392
        * parser.c (cp_parser_diagnose_invalid_type_name): Add fix-it
        hint.

gcc/testsuite/ChangeLog:
        PR c++/63392
        * g++.dg/diagnostic/missing-typename.C: New test.


Added:
    trunk/gcc/testsuite/g++.dg/diagnostic/missing-typename.C
Modified:
    trunk/gcc/cp/ChangeLog
    trunk/gcc/cp/parser.c
    trunk/gcc/testsuite/ChangeLog

Reply via email to