This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug optimization/13768] [3.4/3.5 Regression] -funit-at-a-time compiles unused inline function
- From: "pinskia at gcc dot gnu dot org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 21 Jan 2004 07:44:29 -0000
- Subject: [Bug optimization/13768] [3.4/3.5 Regression] -funit-at-a-time compiles unused inline function
- References: <20040120110040.13768.igodard@pacbell.net>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- Additional Comments From pinskia at gcc dot gnu dot org 2004-01-21 07:44 -------
(In reply to comment #8)
> Beg pardon, but code is *not* invalid. Standard clearly states that unused template functions are
not compiled and may be invalid for particular template arguments. In the reduced example the
template function is invoked from a non-inline function, but in the original the template is invoked
from another template that is not itself instantiated. I think :-)
The above is correct but note the the function is virtual.
> Even in the reduced - what's the point of "inline" if it causes unused template intantiations to
clutter the executable with template bodies that cannot be called? If the standard required that the
template be syntax checked just because it appears in an (uncalled) inline, then syntax check it -
but don't instantiate it and clutter the executable.
I could not find any where in my reading of the standard which says that inline functions are just
syntax checked and not done the full name lookup and such. Note nothing ever gets emitted for
code that is corrected.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=13768