This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
Re: g++ compiling code that is wrong.
- From: Andrew Pinski <pinskia at physics dot uc dot edu>
- To: biitar at home dot se (Joel Jansson)
- Cc: gcc-bugs at gcc dot gnu dot org
- Date: Wed, 27 Apr 2005 17:22:05 -0400 (EDT)
- Subject: Re: g++ compiling code that is wrong.
>
> Hello.
>
> I dont know if I am to write here, but I think I found a bug that I know
> is not related to my hardware or my system. Problem is that I don't know
> how to report it or if it allready been reported(Kind of hard to search
> for a bug when you dont know how to describe it.).
>
> Backstory : I am a bit of a newbie on C++ and was doing a
> schoolassigment where I was to make a dynamic array. I didn't do it
> right but the code compile(and work on gentoo, didn't work on windowsXP)
> anyway.
>
> Instead of using new and delete[] when making the array, I wrote a code
> that was something like this :
>
> {
> int b;
> char a[b];
>
> cout << "bla bla bla";
> cin.getline(a,b);
> }
This is a GNU extension which is now the bases for the VLAs in C99.
-- Pinski