[Bug c++/21903] Default argument of template function causes a compile-time error

2005-06-06 Thread nathan at gcc dot gnu dot org
--- 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

[Bug c++/21903] Default argument of template function causes a compile-time error

2005-06-06 Thread giovannibajo at libero dot it
--- Additional Comments From giovannibajo at libero dot it 2005-06-06 09:45 --- Not a regression. -- What|Removed |Added Known to fail|

[Bug c++/21903] Default argument of template function causes a compile-time error

2005-06-04 Thread giovannibajo at libero dot it
--- 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

[Bug c++/21903] Default argument of template function causes a compile-time error

2005-06-04 Thread giovannibajo at libero dot it
--- 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

[Bug c++/21903] Default argument of template function causes a compile-time error

2005-06-04 Thread SSacek at appsecinc dot com
--- 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

[Bug c++/21903] Default argument of template function causes a compile-time error

2005-06-04 Thread SSacek at appsecinc dot com
--- 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

[Bug c++/21903] Default argument of template function causes a compile-time error

2005-06-03 Thread pinskia at gcc dot gnu dot org
--- 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:

[Bug c++/21903] Default argument of template function causes a compile-time error

2005-06-03 Thread bangerth at dealii dot org
--- 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 {}; };

[Bug c++/21903] Default argument of template function causes a compile-time error

2005-06-03 Thread pinskia at gcc dot gnu dot org
--- 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

[Bug c++/21903] Default argument of template function causes a compile-time error

2005-06-03 Thread bangerth at dealii dot org
--- 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

[Bug c++/21903] Default argument of template function causes a compile-time error

2005-06-03 Thread bangerth at dealii dot org
-- What|Removed |Added CC||giovannibajo at gcc dot gnu ||dot org

[Bug c++/21903] Default argument of template function causes a compile-time error

2005-06-03 Thread pinskia 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

[Bug c++/21903] Default argument of template function causes a compile-time error

2005-06-03 Thread bangerth at dealii dot org
--- 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