[Developers] C99

Tom Goodale goodale at cct.lsu.edu
Fri Sep 22 09:59:51 CDT 2006

On Fri, 22 Sep 2006, Erik Schnetter wrote:

> On Sep 22, 2006, at 06:49:54, Frank Loeffler wrote:
>> Hi,
>>> On 21.09.06, Frank Loeffler wrote:
>>>> Is there a way of telling Cactus to use the C99 standard? Or even better
>>>> - could we by default enable it, if it is available for a compiler?
>> Steve White wrote:
>>> If the compile fails, you tell the user
>>> what to do about it.
>> That was exacly my point - what should the user do about it?
>> He could dig through the documentation of his compiler and change his
>> compiler options by hand.
>> However, it would be nicer to have something like a configuration option
>> 'C99="yes"' for Cactus to use C99, maybe even turned on by default. Then
>> a thorn can check for that and give a suitable error message like
>> 'Please set C99 to "yes" in your configuration to use this thorn.'
> This sounds overly complicated.  Cactus knows, for each compiler on each 
> architecture, a set of default flags that it uses.  You can add the C99 flags 
> to these.  (Of course, you need to make sure things don't break etc.)
> The largest problem is finding out these flags for each compiler.  For 
> example, gcc has a "std=c99" flag, but you don't want to use that; instead, 
> you want to use "std=gnu99".
> The scripts handling this are in lib/make/known-architectures.  Have a look, 
> add the C99 flags for your favourite compilers, and submit a patch.
> I'm all for this change.

I think the C99=yes may be better, as we can't guarantee C99 everywhere so 
it would be good if it was a conscious decision to use C99 features.


More information about the Developers mailing list