http://gcc.gnu.org/bugzilla/show_bug.cgi?id=54413
Bug #: 54413
Summary: Option for turning off compiler extensions for
-std=c++11 with respect to complex/fixed-point numbers
missing
Classification: Unclassified
Product: gcc
Version: 4.7.1
Status: UNCONFIRMED
Severity: major
Priority: P3
Component: c++
AssignedTo: [email protected]
ReportedBy: [email protected]
All versions of g++ that support UDL operators should have such an option to
turn off GNU complex literals and fixed point literals extensions.
I am prototyping C++1x library extensions for user-defined literals. While it
is possible to turn off GCC's extensions for complex numbers for "old" C++ it
is impossible to combine the effects of -ansi with -std=c++11. Especially the
syntax extensions for complex numbers, e.g., 1.1i cannot be turned off and thus
do not allow testing of UDL operators for the purpose of creating
std::complex<> literals, such as
constexpr std::complex<double> operator"" i(long double d){
return std::complex<double>(0,d);
}
>From the fixed-point extension also number suffixes r and R are occupied.
More info at my proposal,
http://wiki.hsr.ch/PeterSommerlad/files/N3402_UDLsuffixes.pdf
All versions of g++ that support UDL operators should have such an option to
turn off GNU complex literals and fixed point literals extensions.