[Bug c++/56239] [4.6/4.7/4.8 Regression] parse error calling operator() on parenthesized value-initialized temporary

jason at gcc dot gnu.org gcc-bugzilla@gcc.gnu.org
Thu Feb 7 15:03:00 GMT 2013


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

--- Comment #4 from Jason Merrill <jason at gcc dot gnu.org> 2013-02-07 15:02:53 UTC ---
(In reply to comment #3)
> gcc48-pr56239.patch

OK.

> BTW, I wonder where the standard resolves the ambiguity between parsing it as a
> function call with parenthesized ctor and between a cast.

8.2/2:

The ambiguity arising from the similarity between a function-style cast and a
type-id can occur in different contexts. The ambiguity appears as a choice
between a function-style cast expression and a declaration of a type. The
resolution is that any construct that could possibly be a type-id in its
syntactic context shall be considered a type-id.



More information about the Gcc-bugs mailing list