This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug c++/49692] Constructor call mistaken for declaration


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.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]