[Developers] C99

Erik Schnetter schnetter at cct.lsu.edu
Fri Sep 22 09:48:16 CDT 2006


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.

-erik

-- 
Erik Schnetter <schnetter at cct.lsu.edu>

My email is as private as my paper mail.  I therefore support encrypting
and signing email messages.  Get my PGP key from www.keyserver.net.



-------------- next part --------------
A non-text attachment was scrubbed...
Name: PGP.sig
Type: application/pgp-signature
Size: 186 bytes
Desc: This is a digitally signed message part
Url : http://www.cactuscode.org/pipermail/developers/attachments/20060922/c3a4bece/attachment.bin 


More information about the Developers mailing list