From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 14278 invoked by alias); 11 Oct 2005 22:34:00 -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 14249 invoked by alias); 11 Oct 2005 22:33:57 -0000 Date: Tue, 11 Oct 2005 22:34:00 -0000 Message-ID: <20051011223357.14248.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: "mark at codesourcery dot com" X-SW-Source: 2005-10/txt/msg01426.txt.bz2 List-Id: ------- Comment #12 from mark at codesourcery dot com 2005-10-11 22:33 ------- Subject: Re: [3.4/4.0/4.1 regression] Templates/non-templates and warnings about statements without effects With the proposed patch, what happens with something like: template void f() { T(); /* Has side-effects only if T is a class type. */ } In general, I'm concerned about warning only at template-declaration time because I don't think we can be sure we can see all side effects at that point. I think it would be more reliable (and more consistent with the overall approach in G++) to warn only in the instantiations. -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=8057