From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 8636 invoked by alias); 17 Jun 2013 05:51:15 -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 8546 invoked by uid 48); 17 Jun 2013 05:51:09 -0000 From: "basv@odd-e.com" To: gcc-bugs@gcc.gnu.org Subject: [Bug c++/57632] New: Operator new overloads with stdc++11 enabled looses exception specifier (MacOsX) Date: Mon, 17 Jun 2013 05:51: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-Version: 4.8.2 X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: basv@odd-e.com X-Bugzilla-Status: UNCONFIRMED 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: bug_id short_desc product version bug_status bug_severity priority component assigned_to reporter Message-ID: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Bugzilla-URL: http://gcc.gnu.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 X-SW-Source: 2013-06/txt/msg00893.txt.bz2 http://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D57632 Bug ID: 57632 Summary: Operator new overloads with stdc++11 enabled looses exception specifier (MacOsX) Product: gcc Version: 4.8.2 Status: UNCONFIRMED Severity: normal Priority: P3 Component: c++ Assignee: unassigned at gcc dot gnu.org Reporter: basv@odd-e.com G++ on MacOsX acts different when enabling the new c++11 related to operator new overloads. If I compile the following code: #include "stdlib.h" #include void* operator new(size_t mem) throw(std::bad_alloc); void* operator new(size_t mem) throw(std::bad_alloc); Then when compiling g++ new.cpp, it compiles fine. But when I compile g++ -std=3Dc++11 new.cpp, then it results in this error: new.cpp:6:52: error: declaration of =E2=80=98void* operator new(size_t) thr= ow (std::bad_alloc)=E2=80=99 has a different exception specifier void* operator new(size_t mem) throw(std::bad_alloc); ^ new.cpp:5:7: error: from previous declaration =E2=80=98void* operator new(s= td::size_t)=E2=80=99 void* operator new(size_t mem) throw(std::bad_alloc); ^ ------------ I've not been able to replicate this under linux and digging into it a bit,= it seems to relate to the c++config.h definitions of _GLIBCXX_THROW. >>From gcc-bugs-return-424515-listarch-gcc-bugs=gcc.gnu.org@gcc.gnu.org Mon Jun 17 06:48:50 2013 Return-Path: Delivered-To: listarch-gcc-bugs@gcc.gnu.org Received: (qmail 30775 invoked by alias); 17 Jun 2013 06:48:50 -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 Delivered-To: mailing list gcc-bugs@gcc.gnu.org Received: (qmail 30107 invoked by uid 48); 17 Jun 2013 06:48:43 -0000 From: "jbeulich at novell dot com" To: gcc-bugs@gcc.gnu.org Subject: [Bug target/53425] No warnings are given for -mno-sse Date: Mon, 17 Jun 2013 06:48:00 -0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: target X-Bugzilla-Version: 4.8.0 X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: jbeulich at novell dot com X-Bugzilla-Status: RESOLVED X-Bugzilla-Priority: P3 X-Bugzilla-Assigned-To: unassigned at gcc dot gnu.org X-Bugzilla-Target-Milestone: 4.8.0 X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: cc 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-06/txt/msg00894.txt.bz2 Content-length: 686 http://gcc.gnu.org/bugzilla/show_bug.cgi?id=53425 jbeulich at novell dot com changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |jbeulich at novell dot com --- Comment #4 from jbeulich at novell dot com --- I don't think this is quite right for 32-bit: For one, MMX types should be handled separately in that case. And there are now two warnings for both MMX and SSE types, i.e. the new one is redundant with the ones generated by function_arg_32(). I believe all that's needed is adding TARGET_64BIT to the conditional in type_natural_mode().