[svn.haxx.se] · SVN Dev · SVN Users · SVN Org · TSVN Dev · TSVN Users · Subclipse Dev · Subclipse Users · this month's index

Re: ansi compilers (was: svn commit: rev 3235 ...)

From: Michael Price <mprice_at_atl.lmco.com>
Date: 2002-09-27 02:15:28 CEST

Greg Stein writes:
> Hmm. I think that if we find the compiler is GCC 3.X, then we should add
> that -std=c89 to the command line. That will help us catch these problems,
> and remain compatible with more ANSI compilers.
>
> (while APR removes our need for a solid ANSI library, we have to deal with
> the compiler...)

If that is really what you want then specifying '-ansi -pedantic' will
produce the desired effect.

Here are the relevant portions of the gcc manual on the '-ansi' flag:

  In C mode, support all ISO C89 programs. In C++ mode, remove GNU
  extensions that conflict with ISO C++.

  [snip]

  The -ansi option does not cause non-ISO programs to be rejected
  gratuitously. For that, -pedantic is required in addition to -ansi. See
  Warning Options.

However, I think encouraging people (and vendors) to support C99 is far
better than supporting compilers vendors have chosen to forget.

Just my $.02

Michael

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Received on Fri Sep 27 02:17:27 2002

This is an archived mail posted to the Subversion Dev mailing list.

This site is subject to the Apache Privacy Policy and the Apache Public Forum Archive Policy.