c++/9109: parse ambiguity
nathan@codesourcery.com
nathan@codesourcery.com
Mon Dec 30 10:06:00 GMT 2002
>Number: 9109
>Category: c++
>Synopsis: parse ambiguity
>Confidential: no
>Severity: serious
>Priority: medium
>Responsible: unassigned
>State: open
>Class: rejects-legal
>Submitter-Id: net
>Arrival-Date: Mon Dec 30 10:06:00 PST 2002
>Closed-Date:
>Last-Modified:
>Originator: nathan
>Release: HEAD
>Organization:
>Environment:
>Description:
In the attached program the parameter 'int (T)' is parsed
as a parameter of type int called T with redundent parentheses. This is incorrect. It should be parsed as an unnamed parameter of type 'function taking T and returning int'. [8.2]/7 gives this ambiguity and resolution. An example
class C {};
void f(int (C)); //void f (int (*)(C))
is given
>How-To-Repeat:
>Fix:
>Release-Note:
>Audit-Trail:
>Unformatted:
----gnatsweb-attachment----
Content-Type: application/octet-stream; name="4672-3.ii"
Content-Transfer-Encoding: base64
Content-Disposition: attachment; filename="4672-3.ii"
dGVtcGxhdGUgPHR5cGVuYW1lIFQ+IHZvaWQgRm9vIChpbnQgKFQpKSB7fQo=
More information about the Gcc-prs
mailing list