From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 8793 invoked by alias); 17 May 2007 17:53:38 -0000 Received: (qmail 8722 invoked by uid 48); 17 May 2007 17:53:09 -0000 Date: Thu, 17 May 2007 17:53:00 -0000 Message-ID: <20070517175309.8721.qmail@sourceware.org> X-Bugzilla-Reason: CC References: Subject: [Bug c/31977] can return OK from "int main()" without a return statement by using a goto before the return In-Reply-To: Reply-To: gcc-bugzilla@gcc.gnu.org To: gcc-bugs@gcc.gnu.org From: "pinskia 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: 2007-05/txt/msg01342.txt.bz2 ------- Comment #4 from pinskia at gcc dot gnu dot org 2007-05-17 18:53 ------- [pinskia-laptop:~/src] pinskia% gcc -Wreturn-type t.c t.c: In function 'main': t.c:15: warning: control reaches end of non-void function This code is only undefined at runtime which means you cannot error out. -- pinskia at gcc dot gnu dot org changed: What |Removed |Added ---------------------------------------------------------------------------- Status|UNCONFIRMED |RESOLVED Resolution| |INVALID http://gcc.gnu.org/bugzilla/show_bug.cgi?id=31977