From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 20283 invoked by alias); 7 Jan 2003 13:16:06 -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 20254 invoked by uid 71); 7 Jan 2003 13:16:06 -0000 Resent-Date: 7 Jan 2003 13:16:06 -0000 Resent-Message-ID: <20030107131606.20253.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, carlo@alinoe.com Received: (qmail 17756 invoked by uid 61); 7 Jan 2003 13:06:24 -0000 Message-Id: <20030107130624.17755.qmail@sources.redhat.com> Date: Tue, 07 Jan 2003 13:16:00 -0000 From: carlo@alinoe.com Reply-To: carlo@alinoe.com To: gcc-gnats@gcc.gnu.org X-Send-Pr-Version: gnatsweb-2.9.3 (1.1.1.1.2.31) Subject: c++/9217: Possible Ambiguity leads to confusing error, or - compiler rejects legal-code: fails to solve ambiguity. X-SW-Source: 2003-01/txt/msg00436.txt.bz2 List-Id: >Number: 9217 >Category: c++ >Synopsis: Possible Ambiguity leads to confusing error, or - compiler rejects legal-code: fails to solve ambiguity. >Confidential: no >Severity: serious >Priority: medium >Responsible: unassigned >State: open >Class: rejects-legal >Submitter-Id: net >Arrival-Date: Tue Jan 07 05:16:04 PST 2003 >Closed-Date: >Last-Modified: >Originator: Carlo Wood >Release: 3.2.1 >Organization: >Environment: >Description: I don't know if this is a compiler bug - but we thought that the real guru's should have a look at it, just in case. g++ -c troep.cc troep.cc: In function `void f()': troep.cc:10: cannot declare static function inside another function >How-To-Repeat: Compile the following code with g++ -c troep.cc struct A { A(char const*); }; struct B { B(A const&); }; struct C { C(B const&); }; void f() { char const* const str = "t"; static C c1( B("t") ); // Works. static C c2( (B(str)) ); // Works. static C c3( B(str) ); // Fails. } >Fix: >Release-Note: >Audit-Trail: >Unformatted: