From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 11964 invoked by alias); 30 Aug 2012 08:19:59 -0000 Received: (qmail 11951 invoked by uid 22791); 30 Aug 2012 08:19:55 -0000 X-SWARE-Spam-Status: No, hits=-3.6 required=5.0 tests=ALL_TRUSTED,AWL,BAYES_00 X-Spam-Check-By: sourceware.org Received: from localhost (HELO gcc.gnu.org) (127.0.0.1) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Thu, 30 Aug 2012 08:19:42 +0000 From: "p4spam at hispeed dot ch" To: gcc-bugs@gcc.gnu.org Subject: [Bug c++/54413] New: Option for turning off compiler extensions for -std=c++11 with respect to complex/fixed-point numbers missing Date: Thu, 30 Aug 2012 08:19:00 -0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: new X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: c++ X-Bugzilla-Keywords: X-Bugzilla-Severity: major X-Bugzilla-Who: p4spam at hispeed dot ch X-Bugzilla-Status: UNCONFIRMED X-Bugzilla-Priority: P3 X-Bugzilla-Assigned-To: unassigned at gcc dot gnu.org X-Bugzilla-Target-Milestone: --- X-Bugzilla-Changed-Fields: Message-ID: X-Bugzilla-URL: http://gcc.gnu.org/bugzilla/ Auto-Submitted: auto-generated Content-Type: text/plain; charset="UTF-8" MIME-Version: 1.0 Mailing-List: contact gcc-bugs-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-bugs-owner@gcc.gnu.org X-SW-Source: 2012-08/txt/msg01962.txt.bz2 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: unassigned@gcc.gnu.org ReportedBy: p4spam@hispeed.ch 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 operator"" i(long double d){ return std::complex(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.