[m-rev.] diff: do not pass -ansi to GCC on any system

Peter Wang novalazy at gmail.com
Tue Sep 23 17:12:23 AEST 2014


On Tue, 23 Sep 2014 15:51:48 +1000 (EST), Julien Fischer <jfischer at opturion.com> wrote:
> 
> Do not pass -ansi to GCC on any system.
> 
> Passing -ansi to GCC restricts us to the C90 dialect of C and prevents us from
> using C99 library features with GCC.  Since every version of GCC we support
> provides the relevant C99 features there is not much point to imposing this
> restriction.  As already noted in the configure script the use of -ansi was
> also causing problems with the header files on MinGW systems.  Finally, I do
> think it is reasonable to require users to use the C90 dialect of C in
> foreign_proc and foreign_code pragma bodies by default.

Do or do not?

> NOTE: this is *not* an invitation to start using C99 language features
> throughout the runtime and library -- at this point, we (unfortunately) still
> maintain compatibility with older versions of MSVC that don't support these
> features.
> 
> configure.ac:
>  	Do not pass -ansi to GCC.  Add an explanation of why.
> 
> scripts/mgnuc.in:
>  	Update the description of the what the --no-ansi option does.
>  	(XXX there's _a lot_ of out-of-date stuff in this script.)

So after this change, mmc --ansi-c is still the default but actually
does nothing with any compiler, and mgnuc --ansi is the default but it
doesn't pass -ansi anywhere, but does pass -D__EXTENSIONS__ -D_GNU_SOURCE?

I assume this is an interim step.  I would like to see --ansi-c and
--ansi removed, but treated as a no-op indefinitely for backwards
compatibility.

Peter



More information about the reviews mailing list