Why is C90 enforced in KDE?

Michael Pyne mpyne at kde.org
Thu Dec 10 01:50:53 GMT 2015

On Sun, December 6, 2015 16:08:04 Antonio Rojas wrote:
> Hi,
>  Kipi-plugins fails to build with flex 2.6. This is due to the autogenerated
> code in libpanorama containing //-style comments, which are disallowed in
> C90. Adding -std=c99 to the CFLAGS at compile time doesn't have any effect,
> since it is overriden by kdelibs (and by extra-cmake-modules in KF5). What
> is the reason for this? And is there any way to force using C99?

I'm not sure offhand... it may be due to trying to support builds using MSVC 
on Windows (which has poor C99 or later support). On the other hand even MSVC 
supports //comments in C code.

I think there's some way to get CMake to add compiler flags for .c files in 
particular; another option is to have flex generate a .cpp file, assuming that 
the code being generated is safely in the common subset of C and C++.

 - Michael Pyne

More information about the kde-core-devel mailing list