This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c++/71099] Misleading diagnostic message with 'virtual' used in out-of-line definitions of class template member functions
- From: "paolo at gcc dot gnu.org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Mon, 30 May 2016 15:11:30 +0000
- Subject: [Bug c++/71099] Misleading diagnostic message with 'virtual' used in out-of-line definitions of class template member functions
- Auto-submitted: auto-generated
- References: <bug-71099-4 at http dot gcc dot gnu dot org/bugzilla/>
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=71099
--- Comment #2 from paolo at gcc dot gnu.org <paolo at gcc dot gnu.org> ---
Author: paolo
Date: Mon May 30 15:10:51 2016
New Revision: 236885
URL: https://gcc.gnu.org/viewcvs?rev=236885&root=gcc&view=rev
Log:
/cp
2016-05-30 Paolo Carlini <paolo.carlini@oracle.com>
PR c++/71099
* parser.c (cp_parser_function_specifier_opt): Use current_class_type
to improve the diagnostic about wrong uses of 'virtual'.
/testsuite
2016-05-30 Paolo Carlini <paolo.carlini@oracle.com>
PR c++/71099
* g++.dg/parse/virtual1.C: New.
Added:
trunk/gcc/testsuite/g++.dg/parse/virtual1.C
Modified:
trunk/gcc/cp/ChangeLog
trunk/gcc/cp/parser.c
trunk/gcc/testsuite/ChangeLog