From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 10170 invoked by alias); 11 Feb 2010 14:00:40 -0000 Received: (qmail 10161 invoked by uid 22791); 11 Feb 2010 14:00:39 -0000 X-SWARE-Spam-Status: No, hits=-2.1 required=5.0 tests=AWL,BAYES_00 X-Spam-Check-By: sourceware.org Received: from comm.purplecow.org (HELO comm.purplecow.org) (210.87.62.131) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Thu, 11 Feb 2010 14:00:35 +0000 MIME-version: 1.0 Content-transfer-encoding: 8BIT Content-type: text/plain; charset=iso-8859-1 Received: from interact.purplecow.org ([127.0.0.1]) by comm.purplecow.org (Sun Java(tm) System Messaging Server 6.3-6.03 (built Mar 14 2008; 32bit)) with ESMTPA id <0KXO00D6PK8WCSC0@comm.purplecow.org> for gcc-help@gcc.gnu.org; Fri, 12 Feb 2010 01:00:33 +1100 (EST) Received: from interact.purplecow.org ([10.0.66.17] helo=interact.purplecow.org) with IPv4:25 by ASSP.nospam; Fri, 12 Feb 2010 01:00:32 +1100 Received: from 10.0.66.17 (proxying for unknown) (SquirrelMail authenticated user dclarke@blastwave.org) by interact.purplecow.org with HTTP; Thu, 11 Feb 2010 09:00:32 -0500 (EST) Message-id: <52552.10.0.66.17.1265896832.squirrel@interact.purplecow.org> Date: Thu, 11 Feb 2010 14:14:00 -0000 Subject: Re: Why is gcc going to default to "GNU dialect of ISO C99?" From: Dennis Clarke To: Alexey Salmin Cc: dclarke@blastwave.org, gcc-help@gcc.gnu.org, aph@redhat.com, david.kirkby@onetel.net, ams@gnu.org Reply-to: dclarke@blastwave.org User-Agent: SquirrelMail/1.4.11 Mailing-List: contact gcc-help-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-help-owner@gcc.gnu.org X-SW-Source: 2010-02/txt/msg00164.txt.bz2 > On Thu, Feb 11, 2010 at 7:40 PM, Dennis Clarke > wrote: >> >>> It all reminds me a story when I won a bottle of beer from my >>> scientific adviser back in 2005. We had a bet: will gcc compile this >>> code: >>> #include >>>  int main() { >>>   printf("a"); >>>   int a; >>>   printf("b"); >>>   return 0; >>> } >>> He was so sure that gcc won't allow it that didn't ever tried :) Thus, >>> I think gnu extensions by default are not so bad :) >>> >>> Alexey >> >> Let's have a look at that. I don't see any issues really. You call >> printf() with a literal string, then define some simple integer, then >> print another literal string with a call to printf() and finally return >> back to the calling process with a status of 0. Very nice. >> > > 334 lines of research for 7 lines of code :) > > Alexey Here are 7 more :-) $ lint -v -Nlevel=4 -Xc99=all sample1.c variable unused in function (9) a in main function returns value which is always ignored printf -- Dennis Clarke dclarke@opensolaris.ca <- Email related to the open source Solaris dclarke@blastwave.org <- Email related to open source for Solaris