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

Re: [RFC] Upgrade to C'90 as our minimum C language

From: Branko Čibej <brane_at_apache.org>
Date: Sun, 24 Sep 2017 19:55:58 +0200

On 24.09.2017 11:36, Stefan wrote:
> On 22/09/2017 13:29, Branko Čibej wrote:
>> On 22.09.2017 13:18, Julian Foad wrote:
>>> Julian Foad wrote:
>>>> When we released Subversion 1.0 in 2004, we were still thinking we had
>>>> better not use C'90 because it was only 14 years old and, you know,
>>>> people need to be able to compile svn on systems of a reasonable age.
>>>>
>>>> So we had a "strict C'89" policy. No "//" comments, for example.
>>>>
>>>> Now C'99 is 18 years old and C'90 is, ahem, 27 years old. Does anybody
>>>> else feel like we're trapped in the dark ages? The only reason not to
>>>> upgrade is our personal fear of "rocking the boat", it seems to me.
>>>>
>>>> Let's just do it?
>>>>
>>>> I know there is a problem with Microsoft not supporting C'99. C'90
>>>> should be fine though, and some of C'99 if we want to.
>>> Oops, I misremembered that C89==C90, while C99 is the one that brings new features.
>>>
>>> And Brane is pointing out on IRC lots of difficulties...
>>>
>>> :-(
>> Yes, we've had this discussion before, and the difficulties remain. :)
>>
>> -- Brane
> Maybe we'd consider changing our view on this topic a bit and rather
> than increment the source compatibility from C89/C90 to C99 change the
> project to state compatibility based on a chosen compiler set plus all
> compilers which are full C99 aware?
>
> I.e. we'd declare project compatibility to support:
> - any fully C99 compliant compiler
> - VS: 2010-2017

MSVC does not support C99. In C mode, it implements a subset of some
things that look like C99 features but IIRC the semantics are subtly
different in certain cases. That's a good way to grow subtle bugs.

> - GCC: 2.7-7.2
> - Clang: xxx-xxx
> -xxxxxx
>
> We then basically limit ourselves to the feature set which is supported
> by our chosen compiler set.

We don't even know how many different compilers are used to build
Subverison, and we certainly don't have access to all of them. That's
why programming languages get standardized in the first place: so you
don't have to build your code with 50 different compilers just to make a
list of what works.

-- Brane
Received on 2017-09-24 19:56:04 CEST

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