public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
From: "pinskia at gcc dot gnu.org" <gcc-bugzilla@gcc.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	[thread overview]
Message-ID: <bug-12577-4-DvWMtBCFe5@http.gcc.gnu.org/bugzilla/> (raw)
In-Reply-To: <bug-12577-4@http.gcc.gnu.org/bugzilla/>

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=12577

Andrew Pinski <pinskia at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
         Resolution|                            |WONTFIX

--- Comment #2 from Andrew Pinski <pinskia at gcc dot gnu.org> 2012-01-20 01:29:24 UTC ---
t.cc:26:45: error: redefinition of ‘void (bar::* const foo<bar,
int>::setter)(int)’
t.cc:17:46: error: ‘void (bar::* const foo<bar, int>::setter)(int)’ previously
declared here
t.cc:37:52: error: expected unqualified-id before ‘*’ token
t.cc:37:54: error: expected primary-expression before ‘const’
t.cc:37:72: error: ‘JustAPointer<bar>()->bar::getfoobar()’ cannot be used as a
function
t.cc:37:74: error: expected primary-expression before ‘void’
t.cc:38:7: error: expected unqualified-id before ‘=’ token
t.cc:42:52: error: expected unqualified-id before ‘*’ token
t.cc:42:54: error: expected primary-expression before ‘const’
t.cc:42:68: error: expected primary-expression before ‘__typeof__’
t.cc:42:121: error: ‘JustAPointer<bar>()->bar::getfoobar()’ cannot be used as a
function
t.cc:42:123: error: expected primary-expression before ‘void’
t.cc:43:5: error: expected unqualified-id before ‘=’ token

--- CUT ---
If I use decltype instead of typeof we get:
t.cc:27:45: error: redefinition of ‘void (bar::* const foo<bar,
int>::setter)(int)’
t.cc:18:46: error: ‘void (bar::* const foo<bar, int>::setter)(int)’ previously
declared here
t.cc:43:127: error: conflicting declaration ‘int (bar::* const foo<bar,
int>::setter)()’
t.cc:18:46: error: ‘foo<bar, int>::setter’ has a previous declaration as ‘void
(bar::* const foo<bar, int>::setter)(int)’

Which looks correct so I am going to close as won't fix as decltype is the more
correct choice now.


       reply	other threads:[~2012-01-20  1:29 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <bug-12577-4@http.gcc.gnu.org/bugzilla/>
2012-01-20  1:34 ` pinskia at gcc dot gnu.org [this message]
2003-10-11 12:59 [Bug c++/12577] New: " gabor dot greif at lucent dot com
2003-10-11 16:26 ` [Bug c++/12577] " pinskia at gcc dot gnu dot org
2003-10-11 16:29 ` pinskia at gcc dot gnu dot org
2003-11-12  3:16 ` mmitchel at gcc dot gnu dot org

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=bug-12577-4-DvWMtBCFe5@http.gcc.gnu.org/bugzilla/ \
    --to=gcc-bugzilla@gcc.gnu.org \
    --cc=gcc-bugs@gcc.gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).