This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c++/49692] Constructor call mistaken for declaration
- From: "kortink at inter dot nl.net" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Sat, 9 Jul 2011 23:08:04 +0000
- Subject: [Bug c++/49692] Constructor call mistaken for declaration
- Auto-submitted: auto-generated
- References: <bug-49692-4@http.gcc.gnu.org/bugzilla/>
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=49692
--- Comment #2 from John Kortink <kortink at inter dot nl.net> 2011-07-09 23:08:02 UTC ---
(In reply to comment #1)
> Redundant parens are always possible.
They shouldn't always be possible. It is a laxity in the grammar that
needlessly causes context dependencies. And, in this case, rejection of a
perfectly valid language construct.
Even if the context dependency is not removed, the interpretation of 'classname
(variablename)' as a constructor call should be considered by the parser.