This is the mail archive of the gcc-prs@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]

c++/9109: parse ambiguity


>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=


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