From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 23790 invoked by alias); 20 Jan 2012 01:29:42 -0000 Received: (qmail 23778 invoked by uid 22791); 20 Jan 2012 01:29:40 -0000 X-SWARE-Spam-Status: No, hits=-2.9 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; Fri, 20 Jan 2012 01:29:27 +0000 From: "pinskia at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug c++/12577] typeof does not qualify as unqualified-id in certain contexts Date: Fri, 20 Jan 2012 01:34: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-Keywords: rejects-valid X-Bugzilla-Severity: normal X-Bugzilla-Who: pinskia at gcc dot gnu.org X-Bugzilla-Status: RESOLVED X-Bugzilla-Priority: P2 X-Bugzilla-Assigned-To: unassigned at gcc dot gnu.org X-Bugzilla-Target-Milestone: --- X-Bugzilla-Changed-Fields: Status Resolution Message-ID: In-Reply-To: References: X-Bugzilla-URL: http://gcc.gnu.org/bugzilla/ Auto-Submitted: auto-generated Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable 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-01/txt/msg02243.txt.bz2 http://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D12577 Andrew Pinski changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |RESOLVED Resolution| |WONTFIX --- Comment #2 from Andrew Pinski 2012-01-20 0= 1:29:24 UTC --- t.cc:26:45: error: redefinition of =E2=80=98void (bar::* const foo::setter)(int)=E2=80=99 t.cc:17:46: error: =E2=80=98void (bar::* const foo::setter)(int)= =E2=80=99 previously declared here t.cc:37:52: error: expected unqualified-id before =E2=80=98*=E2=80=99 token t.cc:37:54: error: expected primary-expression before =E2=80=98const=E2=80= =99 t.cc:37:72: error: =E2=80=98JustAPointer()->bar::getfoobar()=E2=80=99 = cannot be used as a function t.cc:37:74: error: expected primary-expression before =E2=80=98void=E2=80=99 t.cc:38:7: error: expected unqualified-id before =E2=80=98=3D=E2=80=99 token t.cc:42:52: error: expected unqualified-id before =E2=80=98*=E2=80=99 token t.cc:42:54: error: expected primary-expression before =E2=80=98const=E2=80= =99 t.cc:42:68: error: expected primary-expression before =E2=80=98__typeof__= =E2=80=99 t.cc:42:121: error: =E2=80=98JustAPointer()->bar::getfoobar()=E2=80=99= cannot be used as a function t.cc:42:123: error: expected primary-expression before =E2=80=98void=E2=80= =99 t.cc:43:5: error: expected unqualified-id before =E2=80=98=3D=E2=80=99 token --- CUT --- If I use decltype instead of typeof we get: t.cc:27:45: error: redefinition of =E2=80=98void (bar::* const foo::setter)(int)=E2=80=99 t.cc:18:46: error: =E2=80=98void (bar::* const foo::setter)(int)= =E2=80=99 previously declared here t.cc:43:127: error: conflicting declaration =E2=80=98int (bar::* const foo<= bar, int>::setter)()=E2=80=99 t.cc:18:46: error: =E2=80=98foo::setter=E2=80=99 has a previous d= eclaration as =E2=80=98void (bar::* const foo::setter)(int)=E2=80=99 Which looks correct so I am going to close as won't fix as decltype is the = more correct choice now.