--- Additional Comments From nathan at gcc dot gnu dot org 2005-06-06
09:34 ---
ug. This looks like a defect in the std. As has been pointed out, we cannot
parse the default argument until the outer class is complete -- because the
default argument of the nested class can legitimately
--- Additional Comments From giovannibajo at libero dot it 2005-06-06
09:45 ---
Not a regression.
--
What|Removed |Added
Known to fail|
--- Additional Comments From giovannibajo at libero dot it 2005-06-04
10:46 ---
I can't find anything in the standard which says that this should be an error,
regardless of what Comeau does. This looks like a genuine bug in the parser,
see parser.c:cp_parser_class_specifier: the
--- Additional Comments From giovannibajo at libero dot it 2005-06-04
10:48 ---
(In reply to comment #7)
There is some code which also delays inner functions until the outer function
is finished:
Of course I meant classes: There is some code which also delays inner
classes until
--- Additional Comments From SSacek at appsecinc dot com 2005-06-04 18:28
---
I would like to thank you folks at gcc.gnu.org for taking a serious look at
this issue.
I wanted to write here a little bit about what I do and how this matter came
to light. It is my occupation to write
--- Additional Comments From SSacek at appsecinc dot com 2005-06-04 19:17
---
Dear Giovanni Bajo,
Thank you for that detailed explanation. Based on what you said, it sounds
like a complex problem to solve; however, it may not be as difficult as it
first appears. Take the example
--- Additional Comments From pinskia at gcc dot gnu dot org 2005-06-03
20:22 ---
This is invalid code and the error is correct. The default argument has not
been parsed at the point you
called it.
ICC and Comeau gives a slightly different error message which I think is
misleading:
--- Additional Comments From bangerth at dealii dot org 2005-06-03 21:51
---
Here's the same testcase again, but shorter:
---
struct O {
templatetypename T struct B {
void set (T, bool=true);
};
struct D : public Bint {};
};
--- Additional Comments From pinskia at gcc dot gnu dot org 2005-06-03
22:03 ---
The error comes from:
tree
convert_default_arg (tree type, tree arg, tree fn, int parmnum)
{
/* If the ARG is an unparsed default argument expression, the
conversion cannot be performed. */
if
--- Additional Comments From bangerth at dealii dot org 2005-06-03 22:27
---
In private mail, I got another testcase that is even weirder:
---
struct O {
templatetypename T struct B {
void set (T, bool=true);
};
struct D : public Bint
--
What|Removed |Added
CC||giovannibajo at gcc dot gnu
||dot org
--- Additional Comments From pinskia at gcc dot gnu dot org 2005-06-03
23:08 ---
This code is still invalid, Bint is instantiated while in the class which
means that the default
argument is not going to be parsed at all. ICC and Comeau give the same error.
Now the off by one
error
--- Additional Comments From bangerth at dealii dot org 2005-06-04 04:37
---
I'm sorry, but I have no idea what you mean by that. If you want to say
that O::Bint is instantiated by O::D, which is still inside O, yes, of
course that's the case. And I'm happy if the default arguments
13 matches
Mail list logo