--- Comment #6 from manu at gcc dot gnu dot org 2008-02-08 09:01 ---
(In reply to comment #5)
> As i know C++ doesn't support VLA. Please update me if i m wrong.
That is why it is an extension. There are many things that GCC supports and ISO
C++ doesn't. Read the GCC's manual for inform
--- Comment #5 from amitondemand at gmail dot com 2008-02-08 07:20 ---
As i know C++ doesn't support VLA. Please update me if i m wrong.
(In reply to comment #2)
> VLA in C++ is an extension, if you use -pedantic, you will get an error.
> Also VLA uses the value at the time at definitio
--- Comment #4 from amitondemand at gmail dot com 2008-02-08 06:59 ---
i think this should not work. you should get an error that array size must be
constant.
(In reply to comment #1)
> This code doesn't work reliably. Change it to
> int main()
> {
> int size;
> cout<<"Enter si
--- Comment #3 from manu at gcc dot gnu dot org 2008-02-07 16:07 ---
Also, you should get a warning when using -Wuninitialized -O (or -Wall -O).
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=35125
--- Comment #2 from pinskia at gcc dot gnu dot org 2008-02-07 15:22 ---
VLA in C++ is an extension, if you use -pedantic, you will get an error.
Also VLA uses the value at the time at definition and no other value after
wards.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=35125
--- Comment #1 from rguenth at gcc dot gnu dot org 2008-02-07 14:16 ---
This code doesn't work reliably. Change it to
int main()
{
int size;
cout<<"Enter size of array: ";
cin>>size;
int arr[size];
...
--
rguenth at gcc dot gnu dot org changed:
What