gcc/g++ not ISO compliance?
Mon Jan 13 05:17:00 GMT 2003
I'm not sure if this is a bug or a feature, but I wanted to report it (and
see what the response was).
There is a thread on a university class discussion board that I
administrate for the Computer Science Department at Virginia Tech that
discusses dynamic array dimensions.
Here's the thread: https://forum.cs.vt.edu/topic_show.pl?tid=4731
Would anyone care to give me an explanation?
PS: The two posts that most interest me:
> See ISO Standard Item 184.108.40.206; the dimension if present must be a
> constant expression. Period. No exceptions. If g++ 3.2 accepts this
> code then it is out of compliance.
> FYI, I tried to compile and run
> this code (with proper header of course):
> int i;
> int array[ i ]; // i is dynamic
> for (int j=0; j<i; j++) // see if there is any run-time error
> It works perfectly.
More information about the Gcc-bugs