This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug optimization/13768] [3.4/3.5 Regression] -funit-at-a-time compiles unused inline function


------- 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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]