This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c++/28903] [4.2 Regression] Rejects VLA in template class's member with using
- From: "pinskia at gcc dot gnu dot org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 4 Sep 2006 02:32:29 -0000
- Subject: [Bug c++/28903] [4.2 Regression] Rejects VLA in template class's member with using
- References: <bug-28903-6528@http.gcc.gnu.org/bugzilla/>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- Comment #5 from pinskia at gcc dot gnu dot org 2006-09-04 02:32 -------
The problem is here:
/* The array dimension behaves like a non-type template arg,
in that we want to fold it as much as possible. */
max = tsubst_template_arg (omax, args, complain, in_decl);
max = fold_decl_constant_value (max);
It actually does not behave like one if we the decl is inside a function so
that you can use VLAs.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=28903