[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: Branko Čibej <brane_at_xbc.nu>
Date: 2002-09-26 23:42:54 CEST

Greg Stein wrote:

>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.
>
Can I vote for --std=c90, and compatibility with ISO compiler's instead? :-)

>(while APR removes our need for a solid ANSI library, we have to deal with
> the compiler...)
>
>

-- 
Brane Čibej   <brane_at_xbc.nu>   http://www.xbc.nu/brane/
---------------------------------------------------------------------
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:43:41 2002

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