From owner-freebsd-current@FreeBSD.ORG Mon Nov 10 16:54:23 2008 Return-Path: Delivered-To: current@FreeBSD.ORG Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 85DEE106564A; Mon, 10 Nov 2008 16:54:23 +0000 (UTC) (envelope-from des@des.no) Received: from tim.des.no (tim.des.no [194.63.250.121]) by mx1.freebsd.org (Postfix) with ESMTP id 39EC88FC0A; Mon, 10 Nov 2008 16:54:23 +0000 (UTC) (envelope-from des@des.no) Received: from ds4.des.no (des.no [84.49.246.2]) by smtp.des.no (Postfix) with ESMTP id 042ED6D43F; Mon, 10 Nov 2008 16:54:22 +0000 (UTC) Received: by ds4.des.no (Postfix, from userid 1001) id E0D8E8448F; Mon, 10 Nov 2008 17:54:21 +0100 (CET) From: =?utf-8?Q?Dag-Erling_Sm=C3=B8rgrav?= To: Roman Divacky References: <20081106185512.GA33153@freebsd.org> <867i7b4qau.fsf@ds4.des.no> <863ahz4q4i.fsf@ds4.des.no> <20081110162304.GA4169@zim.MIT.EDU> Date: Mon, 10 Nov 2008 17:54:21 +0100 In-Reply-To: <20081110162304.GA4169@zim.MIT.EDU> (David Schultz's message of "Mon, 10 Nov 2008 11:23:04 -0500") Message-ID: <86myg734jm.fsf@ds4.des.no> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.0.60 (berkeley-unix) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Cc: current@FreeBSD.ORG Subject: Re: [RFC]: c99 compiled world X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 10 Nov 2008 16:54:23 -0000 David Schultz writes: > The default is -std=3Dgnu89, which as far as I know is almost identical > to -std=3Dgnu99. Actually, the only difference I'm aware of is that in > more recent gcc releases, GNU99 mode uses the C99 rules for inline > functions. No, the differences are far greater. Try compiling the following program in gnu89 mode: void *restrict p; int main(void) { for (int i =3D 0; i < 1; ++i) continue; } Right off the bat, I can't think of a language construct that is legal in gnu99 but not in c99, but I'm sure they exist. BTW, the definition of gnu89 has changed over time. I believe that early versions of gcc 3 would accept the following: int main(void) { for (int i =3D 0; i < 1; ++i) continue; return i; } DES --=20 Dag-Erling Sm=C3=B8rgrav - des@des.no