From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 10471 invoked by alias); 14 Nov 2013 15:30:24 -0000 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 Received: (qmail 10340 invoked by uid 48); 14 Nov 2013 15:30:20 -0000 From: "3dw4rd at verizon dot net" To: gcc-bugs@gcc.gnu.org Subject: [Bug libstdc++/59087] Issues including complex.h in C++11/1y mode because of C's complex.h Date: Thu, 14 Nov 2013 15:30:00 -0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: libstdc++ X-Bugzilla-Version: 4.8.0 X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: 3dw4rd at verizon dot net X-Bugzilla-Status: NEW X-Bugzilla-Priority: P3 X-Bugzilla-Assigned-To: unassigned at gcc dot gnu.org X-Bugzilla-Target-Milestone: --- X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: Message-ID: In-Reply-To: References: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 7bit X-Bugzilla-URL: http://gcc.gnu.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 X-SW-Source: 2013-11/txt/msg01391.txt.bz2 http://gcc.gnu.org/bugzilla/show_bug.cgi?id=59087 --- Comment #7 from Ed Smith-Rowland <3dw4rd at verizon dot net> --- OK, it took me a while to remember this (even though I put it in myself). By default, g++ -std=c++11/1y intercepts numeric suffixes for C++11 user-defined literals. By default g++ -std=gnu++11/1y allow complex and fixed-point literals suffixes to be interpreted by the implementation - Allowing iF suffix for example to be _Complex. This is why http://melpon.org/wandbox/permlink/CnsddYRxUohlCGF1 "worked" and my tree (where I used -std=c++1*) "didn't work". See http://gcc.gnu.org/gcc-4.8/changes.html. Using g++ -std=c++11 -fext-numeric-literals allows your code. Using g++ -std=gnu++11 -fno-numeric-literals allows iF to be searched for user-defined literal (there isn't one so error). g++ is working as intended.