This is the mail archive of the gcc@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: complex support when using -std=c++11


Dear Marc,

Thanks for the prompt reply. I am not an expert here, so I probably don't know the correct solution for gcc. We are using std=c++11 to maximise source compatibility for any users seeking to recompile our code on whatever compiler/toolchain they have.


As to your suggestions for possible fixes, my thoughts are as follows:

> * _Complex_I is defined as (__extension__ 1.0iF). Maybe __extension__
> could imply -fext-numeric-literals?

I am unsure if such extensions might cause problems elsewhere due to preprocessor substitution. This would be my concern here.


> * glibc could define _Complex_I some other way, or libstdc++ could
> redefine it to some other safer form (for some reason __builtin_complex
> is currently C-only).

This seems totally reasonable, but as an end-user , I am not certain if this can be achieved within the specifications. It sounds good though.

Thanks!


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]