From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 6521 invoked by alias); 13 Feb 2003 09:16:01 -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 6490 invoked by uid 71); 13 Feb 2003 09:16:01 -0000 Resent-Date: 13 Feb 2003 09:16:01 -0000 Resent-Message-ID: <20030213091601.6489.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, marc.durantez@jp.sony.com Received: (qmail 4669 invoked by uid 48); 13 Feb 2003 09:12:00 -0000 Message-Id: <20030213091200.4668.qmail@sources.redhat.com> Date: Thu, 13 Feb 2003 09:16:00 -0000 From: marc.durantez@jp.sony.com Reply-To: marc.durantez@jp.sony.com To: gcc-gnats@gcc.gnu.org X-Send-Pr-Version: gnatsweb-2.9.3 (1.1.1.1.2.31) Subject: c++/9687: The & operator does not accept parentheses on operand X-SW-Source: 2003-02/txt/msg00556.txt.bz2 List-Id: >Number: 9687 >Category: c++ >Synopsis: The & operator does not accept parentheses on operand >Confidential: no >Severity: serious >Priority: medium >Responsible: unassigned >State: open >Class: rejects-legal >Submitter-Id: net >Arrival-Date: Thu Feb 13 09:16:01 UTC 2003 >Closed-Date: >Last-Modified: >Originator: Marc Durantez >Release: g++ (GCC) 3.2.2 >Organization: >Environment: Turbolinux 7.0 >Description: The & operator followed by an operand enclosed in parentheses causes a parse error. The following code gives a parse error on the line with the &. #include class MyClass { int i; }; int main() { std::cout << (&(MyClass())) << "\n"; return 0; } The error message is printLocal.cpp: In function `int main()': printLocal.cpp:10: parse error before `)' token As far as I understand ISO14882 the code above should be legal. The code compiled without error on a different compiler. >How-To-Repeat: >Fix: >Release-Note: >Audit-Trail: >Unformatted: