[ET Trac] [Einstein Toolkit] #1128: Require C99 for Cactus C thorns

Einstein Toolkit trac-noreply at einsteintoolkit.org
Tue Oct 23 10:19:52 CDT 2012


#1128: Require C99 for Cactus C thorns
--------------------------+-------------------------------------------------
  Reporter:  hinder       |       Owner:        
      Type:  enhancement  |      Status:  closed
  Priority:  major        |   Milestone:        
 Component:  Cactus       |     Version:        
Resolution:  fixed        |    Keywords:        
--------------------------+-------------------------------------------------
Changes (by hinder):

  * status:  new => closed
  * resolution:  => fixed


Comment:

 According to http://gcc.gnu.org/onlinedocs/gcc/Standards.html,

 > The default, if no C language dialect options are given, is -std=gnu90;
 this will change to -std=gnu99 or -std=gnu11 in some future release when
 the C99 or C11 support is complete.

 I very much want the user to be able to compile using gcc without having
 to specify an optionlist.  Now that I check this, it looks like Cactus
 enables C99 plus GNU extensions if the compiler is called "gcc" or "cc":

 From lib/make/known-architectures/linux:
 {{{
  # C compiler
  # Set the appropriate dependency, warning, and debugging flags
  # Note that the defaults settings are for gcc/g++ and set by configure
  case `basename $CC` in
    # GNU
    gcc | cc)
      : ${CFLAGS='-pipe -std=gnu99'}
 }}}

 The same applies to darwin.  Assuming I am interpreting this code
 correctly, this is what I wanted.

 For linux, the intel compiler is also invoked with C99 by default, though
 for darwin it looks like it is not.  I'm not so worried about the intel
 compiler, as it will never be automatically chosen by Cactus, so the user
 needs to do something anyway.

-- 
Ticket URL: <https://trac.einsteintoolkit.org/ticket/1128#comment:4>
Einstein Toolkit <http://einsteintoolkit.org>
The Einstein Toolkit


More information about the Trac mailing list