------- Comment #6 from reichelt at gcc dot gnu dot org 2009-07-18 11:26 ------- GCC's history with this code is:
* GCC 2.95.3 rejects * GCC 3.0 - 3.2.3 accepts * GCC 3.3 - 3.3.6 rejects * GCC 3.4.0 - 4.3.x crashes * GCC 4.4.0 - trunk accepts Without the template, only GCC 2.93.3 rejects the code, all other versions accept it. Considering that also Intel and Comeau accept the code (template and non-template version) I doubt that the code is invalid. Jason, you said: > I was wrong; the previous paragraph says "Local variables shall not > be used in default argument expressions." > 3.3 was right to reject the testcase; IMHO "Local variables" refers to function local variables, so that you were right in the first place (comment #3) and that the code is indeed valid. This would mean that we really can close the bug as fixed in GCC 4.4.0. -- reichelt at gcc dot gnu dot org changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |jason at gcc dot gnu dot org Keywords| |accepts-invalid Known to work|3.2.3 | http://gcc.gnu.org/bugzilla/show_bug.cgi?id=39055