Subject: Re: bagder: curl/ares CHANGES,1.102,1.103 configure.ac,1.78,1.79 (fwd)

Re: bagder: curl/ares CHANGES,1.102,1.103 configure.ac,1.78,1.79 (fwd)

From: Doug Goldstein <cardoe_at_gentoo.org>
Date: Thu, 08 May 2008 23:13:04 -0400

Daniel Stenberg wrote:
> On Thu, 8 May 2008, Doug Goldstein wrote:
>
>> Essentially, AC_PROG_CC_STDC will attempt to use a C standard C99
>> following by C89 (well gnu99 on gcc)
>
> Uhm. I want C89 standard and nothing later. I'd rather have the compiler
> enforce -std=c89 so that violations against that standard cause
> errors/warnings to help us write portable code.
>
> What's the possible benefit to raise the standard to gnu99 which this
> seems to do on my host? Then it even allows (horrible) gnu extensions!
>

Fair enough. I was merely trying to include something that would adhere
to a known standard. There's also a AC_PROG_CC_C89 flag that's available
as well that you might be interested in.

My guess why you're getting the u_char error is that u_char was never in
a standard and Intel's default mode probably defines u_char but when
using a standards mode (even c89).

However, you should be aware that "long long" and "bool/_Bool" is not
allowed per c89 and you should not rely on it. "long long" and
"bool/_Bool" is available in gnu89, which is c89 + some GNU stuff and
some c99 stuff. So most likely you're better off relying on some random
mode that a compiler provides by default. gcc will provide "gnu89" by
default and in future versions will switch to "gnu99" per their website.
As far as Intel's compiler, I have no idea what modes they default to.

-- 
Doug Goldstein <cardoe_at_gentoo.org>
http://dev.gentoo.org/~cardoe/
Received on 2008-05-09