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: "igodard at pacbell dot net" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 21 Jan 2004 05:22:45 -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 igodard at pacbell dot net 2004-01-21 05:22 -------
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 :-)
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.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=13768