From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 16073 invoked by alias); 11 Oct 2005 22:37:51 -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 16044 invoked by uid 48); 11 Oct 2005 22:37:48 -0000 Date: Tue, 11 Oct 2005 22:37:00 -0000 Message-ID: <20051011223748.16043.qmail@sourceware.org> X-Bugzilla-Reason: CC References: Subject: [Bug c++/8057] [3.4/4.0/4.1 regression] Templates/non-templates and warnings about statements without effects In-Reply-To: Reply-To: gcc-bugzilla@gcc.gnu.org To: gcc-bugs@gcc.gnu.org From: "ian at airs dot com" X-SW-Source: 2005-10/txt/msg01427.txt.bz2 List-Id: ------- Comment #13 from ian at airs dot com 2005-10-11 22:37 ------- With your suggested test case, and my suggested patch, you will get the warning foo.cc: In function ‘void f()’: foo.cc:3: warning: value computed is not used It's easy to emit the warning only for template instantiations and not for template declarations. That wasn't my first choice because it means that you will get a warning each time the template is instantiated. I will submit a new patch. -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=8057