Date: 13 Mar 1997 13:58:23 -0800 From: Paul Traina <pst@jnx.com> To: hans@brandinnovators.com Cc: bugs@freebsd.org Subject: Re: bin/2979: Make gcc shut up about extensions when compiling `-pedantic -ansi' Message-ID: <7yhgifihds.fsf@base.jnx.com> In-Reply-To: hans@brandinnovators.com's message of 13 Mar 97 14:39:28 GMT References: <199703131439.PAA01226@truk.brandinnovators.com>
next in thread | previous in thread | raw e-mail | index | archive | help
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
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?7yhgifihds.fsf>