← Back to team overview

kicad-developers team mailing list archive

Re: Using compiler specific c++ extensions

 

On 07/21/2012 01:21 PM, Carl Rash wrote:
>
> I have an issue compiling the common library. In the file include/plot_common.h in the
> PSLIKE_PLOTTER class definition a floating constant literal is declared as follows:
>
> “static const double postscriptTextAscent = 0.718;”
>
> My compiler complains ISO C++ forbids initialization of constant member of non-integral
> type. My work around is to comment out the initialization in the class definition and
> perform the instantiation and initialization in the file common_plotPS_functions.cpp.
>
> Apparently this is allowed in GCC without the –pedantic directive. I don’t mind the work
> around, I just wanted to see what the philosophy of the developers is on this issue.
>
> Thanks
>


I think we should accept a patch from you. This is not Java, it is C++. C++ cannot do
this, Java can.

It is really that simple. GCC maintainers probably know Java, but that does not give them
a license to bend the language on their own, counter-current to the rest of the C++
language supporters.


Dick




Follow ups

References