Why is C90 enforced in KDE?

Patrick Spendrin ps_ml at gmx.de
Mon Dec 7 20:56:52 GMT 2015


Am 07.12.2015 um 21:36 schrieb Thomas L├╝bking:
> On Montag, 7. Dezember 2015 17:22:47 CEST, Boudewijn Rempt wrote:
> 
>> There are two sides, of course: if making it easier for a distribution
>> to package KDE software makes it harder for an application to be packaged
>> for another distribution, where do we go? What's most important? Just
>> adding a dependency because all linux distributions have it so it's no
>> sweat can cause huge problems.
> 
> Back on topic: do you actually have trouble with invoking flex/yacc* to
> generate code or do you have a problem with the generated (C99) code
> (what seems to be a pretty new problem - and is on Linux/any distro
> because KF5 does --std=c90)?
> 
> Or was this just a general "Hey, there's a world beyond Linux" remark?
> 
> You also may have some (personal, at least) data on relevant MSVC 2013
> is in practice?
> Because every gcc in the wild as well as clang should be able to handle
> C99 - and so should MSVC 2015 and the intel compiler(s of the past).
> Afaics, MSVC 2013 is the deal breaker here; but no warranty on that
> statement...

IIRC the problem here is(was) the version of flex/bison used. There was
only a very outdated version of flex/bison available for a long time,
and this one produced different results from a more modern version. When
I looked last, there was a newer build available for both, which was
recent enough and which also produced valid results (in at least some
cases).
I would recommend thus to test those two first, to see if there is a
problem at that point at all (and if needed, then it is possible to
decide that on a case by case basis - there shouldn't be to many
flex/bison uses in total KDE code).

About C99:
I am not sure which compiler is currently required with MSVC, but if it
is 2013 or below, then only some C99 features are supported.

I tried to create a C99-to-C90 compiler with the help of clang, but this
failed pretty early.

So my advice would be to not make C90 default, but to allow some C99
features, but with improved CI instead.

regards,
Patrick




More information about the kde-core-devel mailing list