From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 23899 invoked by alias); 30 Dec 2002 18:06:02 -0000 Mailing-List: contact gcc-prs-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Archive: List-Post: List-Help: Sender: gcc-prs-owner@gcc.gnu.org Received: (qmail 23868 invoked by uid 71); 30 Dec 2002 18:06:00 -0000 Resent-Date: 30 Dec 2002 18:06:00 -0000 Resent-Message-ID: <20021230180600.23867.qmail@sources.redhat.com> Resent-From: gcc-gnats@gcc.gnu.org (GNATS Filer) Resent-Cc: gcc-prs@gcc.gnu.org, gcc-bugs@gcc.gnu.org Resent-Reply-To: gcc-gnats@gcc.gnu.org, nathan@codesourcery.com Received: (qmail 20070 invoked by uid 61); 30 Dec 2002 18:00:02 -0000 Message-Id: <20021230180002.20069.qmail@sources.redhat.com> Date: Mon, 30 Dec 2002 10:06:00 -0000 From: nathan@codesourcery.com Reply-To: nathan@codesourcery.com To: gcc-gnats@gcc.gnu.org X-Send-Pr-Version: gnatsweb-2.9.3 (1.1.1.1.2.31) Subject: c++/9109: parse ambiguity X-SW-Source: 2002-12/txt/msg01425.txt.bz2 List-Id: >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=