From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 2288 invoked by alias); 13 Nov 2014 03:06:37 -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 2233 invoked by uid 48); 13 Nov 2014 03:06:33 -0000 From: "redi at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug c++/33911] attribute deprecated vs. templates Date: Thu, 13 Nov 2014 03:06:00 -0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: c++ X-Bugzilla-Version: 4.3.0 X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: redi at gcc dot gnu.org 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: quoted-printable X-Bugzilla-URL: http://gcc.gnu.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 X-SW-Source: 2014-11/txt/msg01072.txt.bz2 https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D33911 --- Comment #16 from Jonathan Wakely --- I've fixed most of the tests but I think the remaining ones reveal that the warning is a bit too eager: template struct B { B(T t) { } } __attribute__ ((__deprecated__)); template B b(T t) { return B(t); } int main() { } dep.cc:9:11: warning: =E2=80=98B=E2=80=99 is deprecated (declared at dep.cc= :2) [-Wdeprecated-declarations] B b(T t) ^ dep.cc: In function =E2=80=98B b(T)=E2=80=99: dep.cc:11:16: warning: =E2=80=98B=E2=80=99 is deprecated (declared at dep.c= c:2) [-Wdeprecated-declarations] return B(t); ^ The warning comes even when b() isn't instantiated and can't be disabled wi= th a #pragma. I have no idea why this only affects 3 tests, not all the -std=3Dgnu++11 te= sts, so maybe I should just add -D_GLIBCXX_USE_DEPRECATED=3D0 to the dg-options = for those three tests to prevent the deprecated components being included. >>From gcc-bugs-return-466601-listarch-gcc-bugs=gcc.gnu.org@gcc.gnu.org Thu Nov 13 03:55:13 2014 Return-Path: Delivered-To: listarch-gcc-bugs@gcc.gnu.org Received: (qmail 18844 invoked by alias); 13 Nov 2014 03:55:12 -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 18814 invoked by uid 48); 13 Nov 2014 03:55:07 -0000 From: "hjl.tools at gmail dot com" To: gcc-bugs@gcc.gnu.org Subject: [Bug tree-optimization/63843] [5 Regression] wrong code generation at -O1 and higher Date: Thu, 13 Nov 2014 03:55:00 -0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: tree-optimization X-Bugzilla-Version: 5.0 X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: hjl.tools at gmail dot com X-Bugzilla-Status: NEW X-Bugzilla-Priority: P3 X-Bugzilla-Assigned-To: unassigned at gcc dot gnu.org X-Bugzilla-Target-Milestone: 5.0 X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: bug_status cf_reconfirmed_on target_milestone short_desc everconfirmed 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: 2014-11/txt/msg01073.txt.bz2 Content-length: 738 https://gcc.gnu.org/bugzilla/show_bug.cgi?id=63843 H.J. Lu changed: What |Removed |Added ---------------------------------------------------------------------------- Status|UNCONFIRMED |NEW Last reconfirmed| |2014-11-13 Target Milestone|--- |5.0 Summary|wrong code generation at |[5 Regression] wrong code |-O1 and higher |generation at -O1 and | |higher Ever confirmed|0 |1 --- Comment #1 from H.J. Lu --- It is caused by r217118.