This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug c++/35125] Violating standards



------- 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 size of array: ";
>     cin>>size;
>     int arr[size];
> ...


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=35125


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]