This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c++/17395] Incorrect lookup for parameters
- From: "bangerth at dealii dot org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 10 Sep 2004 14:40:50 -0000
- Subject: [Bug c++/17395] Incorrect lookup for parameters
- References: <20040910133354.17395.gdr@gcc.gnu.org>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- 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" <gcc-bugzilla@gcc.gnu.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
------- Additional Comments From bangerth at dealii dot org 2004-09-10 14:40 -------
> No, GCC is wrong :-)
> We had a thread on this issue on the Core reflector, no later than two
> days ago.
Ah, I should have guessed :-)
In that case, I think I should confirm the bug.
W.
--
What |Removed |Added
----------------------------------------------------------------------------
Status|UNCONFIRMED |NEW
Ever Confirmed| |1
Last reconfirmed|0000-00-00 00:00:00 |2004-09-10 14:40:44
date| |
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=17395