g++ allows variable array creation

Andrew Pinski pinskia@physics.uc.edu
Mon Jan 19 12:12:00 GMT 2004


On Jan 19, 2004, at 03:31, Omar Shaikh wrote:

> Dear All
>
> I found something in the GNU compiler that I am not
> sure is a bug or the latest change to the C++
> standard. However, the same did not work in Microsoft
> C++ (v. 13.10.3077), the C++ compiler that comes with
> Microsoft .NET product. I ran this code on both Win32
> and Linux platforms with full warnings on (-Wall).
> Surprisingly, there were no warnings either.


That is because VLA is part of GNU C, C99, and GNU C++ and will most 
likely part of a future
C++ standard (if not already part of a draft).  To get a warning from 
GCC use -pedantic.

Thanks,
Andrew Pinski



More information about the Gcc-bugs mailing list