From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 24095 invoked by alias); 19 Nov 2002 00:06:12 -0000 Mailing-List: contact gcc-prs-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Archive: List-Post: List-Help: Sender: gcc-prs-owner@gcc.gnu.org Received: (qmail 24080 invoked by uid 71); 19 Nov 2002 00:06:11 -0000 Date: Mon, 25 Nov 2002 00:46:00 -0000 Message-ID: <20021119000611.24078.qmail@sources.redhat.com> To: nobody@gcc.gnu.org Cc: gcc-prs@gcc.gnu.org, From: Wolfgang Bangerth Subject: Re: c/8609: Superfluous warning when -std=c99/gnu99 and noreturn on main() Reply-To: Wolfgang Bangerth X-SW-Source: 2002-11/txt/msg00929.txt.bz2 List-Id: The following reply was made to PR c/8609; it has been noted by GNATS. From: Wolfgang Bangerth To: Agthorr Cc: bangerth@dealii.org, <141015@bugs.debian.org>, , , , Subject: Re: c/8609: Superfluous warning when -std=c99/gnu99 and noreturn on main() Date: Mon, 18 Nov 2002 18:04:56 -0600 (CST) On Mon, 18 Nov 2002, Agthorr wrote: > Well, I also compile with -Wmissing-noreturn. If I add the noreturn > attribute to main, gcc complains that the function returns. If I > remove the noreturn, gcc complains that the function does not return. > > gcc can't have it both ways. ;) However, if I remove the noreturn attribute line, I cannot make gcc complain about the code: tmp/g> cat x.c #include int main (void) { exit(1); } tmp/g> /home/bangerth/bin/gcc-3.3x-pre/bin/gcc -Wmissing-noreturn -std=gnu99 -c x.c tmp/g> What do you do differently? Regards Wolfgang ------------------------------------------------------------------------- Wolfgang Bangerth email: bangerth@ticam.utexas.edu www: http://www.ticam.utexas.edu/~bangerth