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

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

From: Greg Stein <gstein_at_lyra.org>
Date: 2002-09-26 23:23:23 CEST

On Thu, Sep 26, 2002 at 03:59:35PM -0400, Michael Price wrote:
>...
> > * adm_ops.c (svn_wc_delete): umm, don't declare a variable after a
> > function call. This wouldn't compile in my gcc 2.95.4.
>
> Because c99 support wasn't added until the 3.X series in gcc.
>...
> $ gcc -Wall -std=c89 -pedantic test.c
> test.c: In function `main':
> test.c:8: warning: ISO C89 forbids mixed declarations and code
> $ gcc -Wall -std=c99 -pedantic test.c
> $ ./a.out
> just testing

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...)

Cheers,
-g

-- 
Greg Stein, http://www.lyra.org/
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Received on Thu Sep 26 23:22:55 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.