From owner-freebsd-bugs Thu Mar 13 13:59:00 1997 Return-Path: Received: (from root@localhost) by freefall.freebsd.org (8.8.5/8.8.5) id NAA23284 for bugs-outgoing; Thu, 13 Mar 1997 13:59:00 -0800 (PST) Received: from red.jnx.com (red.jnx.com [208.197.169.254]) by freefall.freebsd.org (8.8.5/8.8.5) with ESMTP id NAA23271 for ; Thu, 13 Mar 1997 13:58:57 -0800 (PST) Received: from base.jnx.com (base.jnx.com [208.197.169.238]) by red.jnx.com (8.8.5/8.8.3) with ESMTP id NAA01010; Thu, 13 Mar 1997 13:58:26 -0800 (PST) Received: (from pst@localhost) by base.jnx.com (8.7.6/8.7.3) id NAA08962; Thu, 13 Mar 1997 13:58:24 -0800 (PST) To: hans@brandinnovators.com cc: bugs@freebsd.org Subject: Re: bin/2979: Make gcc shut up about extensions when compiling `-pedantic -ansi' References: <199703131439.PAA01226@truk.brandinnovators.com> Mime-Version: 1.0 (generated by tm-edit 7.68) Content-Type: text/plain; charset=US-ASCII From: Paul Traina Date: 13 Mar 1997 13:58:23 -0800 In-Reply-To: hans@brandinnovators.com's message of 13 Mar 97 14:39:28 GMT Message-ID: <7yhgifihds.fsf@base.jnx.com> Lines: 17 X-Mailer: Gnus v5.4.19/XEmacs 19.14 Sender: owner-bugs@freebsd.org X-Loop: FreeBSD.org Precedence: bulk When compiling something which uses statement expressions (e.g machine/endian.h to get at ntohl()), gcc complains that braces are not allowed by ANSI C. Below is a diff. for the relevant files. Insert `__extension__' before the expression. But this is arguably defeating pedantic. Not only should your code not use extensions, but the code that you're calling should not. By placing __extension__ in, you're allowing your code to use nonportable code. I agree with you that this sucks, because all you're really likely to care about is the portability of YOUR code, not the system code, but I'm concerned about changing it. Paul