complex support when using -std=c++11

D Haley mycae@gmx.com
Sun Nov 15 21:09:00 GMT 2015


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!



More information about the Gcc mailing list