This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [PATCH] Fix PR/11067 Strange warning with pure virtual inlinefunction
- From: Mark Mitchell <mark at codesourcery dot com>
- To: Jason Merrill <jason at redhat dot com>
- Cc: Wolfgang Bangerth <bangerth at ices dot utexas dot edu>, Andrew Pinski <pinskia at physics dot uc dot edu>, gcc-patches at gcc dot gnu dot org
- Date: 24 Jun 2003 11:24:07 -0700
- Subject: Re: [PATCH] Fix PR/11067 Strange warning with pure virtual inlinefunction
- References: <200306220150.04649.bangerth@ices.utexas.edu> <wvl7k7e2gb1.fsf@prospero.boston.redhat.com>
On Sun, 2003-06-22 at 10:05, Jason Merrill wrote:
> On Sun, 22 Jun 2003 01:50:04 -0500, Wolfgang Bangerth <bangerth@ices.utexas.edu> wrote:
>
> >> When a pure virtual function is also marked as inline, gcc should not warn
> >> about it not being defined with -Winline. The problem is the function is
> >> declared inline but this warning does not make sense for pure virtual
> >> functions.
> >
> > Why? It's admittedly rare, but it's legal to have a definition for a pure
> > virtual function, and then it can also be inlined. The warning is just as
> > useful (or not useful, IMHO) as for any other function.
>
> Indeed. The standard doesn't make any exception to the inline linkage
> rules for pure virtual functions.
I agree as well. I would suggest that this PR be closed as not-a-bug.
--
Mark Mitchell
CodeSourcery, LLC
mark@codesourcery.com