public inbox for gcc-bugs@sourceware.org help / color / mirror / Atom feed
From: "kortink at inter dot nl.net" <gcc-bugzilla@gcc.gnu.org> To: gcc-bugs@gcc.gnu.org Subject: [Bug c++/49692] New: Constructor call mistaken for declaration Date: Sat, 09 Jul 2011 21:10:00 -0000 [thread overview] Message-ID: <bug-49692-4@http.gcc.gnu.org/bugzilla/> (raw) http://gcc.gnu.org/bugzilla/show_bug.cgi?id=49692 Summary: Constructor call mistaken for declaration Product: gcc Version: 4.6.1 Status: UNCONFIRMED Severity: normal Priority: P3 Component: c++ AssignedTo: unassigned@gcc.gnu.org ReportedBy: kortink@inter.nl.net The compiler interprets MyObject(variable_name) as MyObject variable_name If variable_name exists as an int, this causes a 'redeclaration' error instead of a call to the constructor MyObject::MyObject(int). Am I missing some syntactic aspect here ? The root cause may very well be that e.g. int (variable_name) is accepted by the compiler as a declaration. It doesn't look like one to me.
next reply other threads:[~2011-07-09 21:10 UTC|newest] Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top 2011-07-09 21:10 kortink at inter dot nl.net [this message] 2011-07-09 21:39 ` [Bug c++/49692] " schwab@linux-m68k.org 2011-07-09 23:08 ` kortink at inter dot nl.net 2011-07-10 4:30 ` redi at gcc dot gnu.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-49692-4@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: linkBe 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).