This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: template matching variable size array
- From: Jim Wilson <wilson at specifixinc dot com>
- To: "Neal D. Becker" <ndbecker2 at verizon dot net>
- Cc: gcc at gcc dot gnu dot org
- Date: Thu, 13 May 2004 18:11:42 -0700
- Subject: Re: template matching variable size array
- References: <c7g5gg$svk$1@sea.gmane.org>
Neal D. Becker wrote:
g++34 supports variable size arrays.
There is some support, but it was never really designed. No thought was
given to how they interact with other C++ language features. As such,
you should not expect that variable size arrays will work with all C++
features, or that they will even work at all. It is probably safe if
you stick with very simple constructs, but anything complicated is
probably risky.
It is also possible that the feature will be removed or modified in
future g++ releases. VLAs were added to ISO C99, and they are different
than the old gcc dynamic arrays. I think we still have a mixture of
dynamic array and VLA support in the C front end. It is possible that
VLAs will be added to a future ISO C++ standard, and when that happens,
they will probably not be the same as the VLA support currently in the
C++ front end. In which case g++ will be modified to match the standard.
Disclaimer: I am not a C++ expert.
--
Jim Wilson, GNU Tools Support, http://www.SpecifixInc.com