From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 28660 invoked by alias); 10 Sep 2004 14:35:33 -0000 Mailing-List: contact gcc-bugs-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Archive: List-Post: List-Help: Sender: gcc-bugs-owner@gcc.gnu.org Received: (qmail 28602 invoked by alias); 10 Sep 2004 14:35:28 -0000 Date: Fri, 10 Sep 2004 14:35:00 -0000 Message-ID: <20040910143528.28600.qmail@sourceware.org> From: "gdr at integrable-solutions dot net" To: gcc-bugs@gcc.gnu.org In-Reply-To: <20040910133354.17395.gdr@gcc.gnu.org> References: <20040910133354.17395.gdr@gcc.gnu.org> Reply-To: gcc-bugzilla@gcc.gnu.org Subject: [Bug c++/17395] Incorrect lookup for parameters X-Bugzilla-Reason: CC X-SW-Source: 2004-09/txt/msg00953.txt.bz2 List-Id: ------- Additional Comments From gdr at integrable-solutions dot net 2004-09-10 14:35 ------- Subject: Re: Incorrect lookup for parameters "bangerth at dealii dot org" writes: | I would guess gcc is right: No, GCC is wrong :-) We had a thread on this issue on the Core reflector, no later than two days ago. John Spicer came with the following other example for which GCC is confused about. void* a = 0; void f(int a, int* b = a); | the names of parameters can't be used | in the rest of the argument list, can they? They can be used, except for specifying default arguments -- nothing in the standard forbid that. The exemption for default arguments was made explicit. The rest follows from 3.3.1/1 The point of declaration for a name is immediately after its complete declarator (clause 8) and before its initializer (if any), except as noted below. and below, there is no exemption for function parameters. | Note that this is | different to template argument lists, in which this is explicitly | allowed (and the standard writers felt the need to state so in a | note). yes, I know. But I also checked with the stadard writers before reporting the issue here :-) That Comeau online is rejecting #4 is a bug in EDG front-end -- which, as I understand it will be corrected. -- Gaby -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=17395