From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 2714 invoked by alias); 21 Jan 2004 07:44:30 -0000 Mailing-List: contact gcc-bugs-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Archive: List-Post: List-Help: Sender: gcc-bugs-owner@gcc.gnu.org Received: (qmail 2694 invoked by uid 48); 21 Jan 2004 07:44:29 -0000 Date: Wed, 21 Jan 2004 07:44:00 -0000 Message-ID: <20040121074429.2693.qmail@sources.redhat.com> From: "pinskia at gcc dot gnu dot org" To: gcc-bugs@gcc.gnu.org In-Reply-To: <20040120110040.13768.igodard@pacbell.net> References: <20040120110040.13768.igodard@pacbell.net> Reply-To: gcc-bugzilla@gcc.gnu.org Subject: [Bug optimization/13768] [3.4/3.5 Regression] -funit-at-a-time compiles unused inline function X-Bugzilla-Reason: CC X-SW-Source: 2004-01/txt/msg02564.txt.bz2 List-Id: ------- 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