This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [C++ Patch] PR 71109 ("Misleading diagnostic message with 'virtual' used in out-of-line definitions of class template member functions")
- From: Jason Merrill <jason at redhat dot com>
- To: Paolo Carlini <paolo dot carlini at oracle dot com>
- Cc: "gcc-patches at gcc dot gnu dot org" <gcc-patches at gcc dot gnu dot org>
- Date: Mon, 30 May 2016 10:21:10 -0400
- Subject: Re: [C++ Patch] PR 71109 ("Misleading diagnostic message with 'virtual' used in out-of-line definitions of class template member functions")
- Authentication-results: sourceware.org; auth=none
- References: <574B7203 dot 7060101 at oracle dot com>
OK.
On Sun, May 29, 2016 at 6:49 PM, Paolo Carlini <paolo.carlini@oracle.com> wrote:
> Hi,
>
> submitter noticed that for wrong uses of 'virtual' outside of template
> classes (B in the testcase) vs plain classes (A) we wrongly emit the
> "templates may not be %<virtual%>" error message. Simply checking
> current_class_type seems enough to solve the problem. Case C in the extended
> testcase double checks that we still give the "templates may not be
> %<virtual%>" error message when appropriate. Tested x86_64-linux.
>
> Thanks,
> Paolo.
>
> //////////////////////////