From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 5404 invoked by alias); 29 Apr 2010 20:36:52 -0000 Received: (qmail 5376 invoked by uid 48); 29 Apr 2010 20:36:43 -0000 Date: Thu, 29 Apr 2010 20:36:00 -0000 Message-ID: <20100429203643.5375.qmail@sourceware.org> X-Bugzilla-Reason: CC References: Subject: [Bug c++/43943] "warning: no return statement in function returning non-void" should be an error In-Reply-To: Reply-To: gcc-bugzilla@gcc.gnu.org To: gcc-bugs@gcc.gnu.org From: "redi at gcc dot gnu dot org" Mailing-List: contact gcc-bugs-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-bugs-owner@gcc.gnu.org X-SW-Source: 2010-04/txt/msg03195.txt.bz2 ------- Comment #2 from redi at gcc dot gnu dot org 2010-04-29 20:36 ------- that should be -Werror=return-type but spelling aside, this is not a bug now the compiler MUST NOT reject it by default, since a function with a missing return is valid as long as the caller does not use the (missing) return value. making this an unconditional error would be non-conforming if you want that behaviour, use -Werror=return-type -- redi at gcc dot gnu dot org changed: What |Removed |Added ---------------------------------------------------------------------------- Status|UNCONFIRMED |RESOLVED Resolution| |WORKSFORME http://gcc.gnu.org/bugzilla/show_bug.cgi?id=43943