delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp-workers/2001/06/28/06:26:44

X-Sent: 28 Jun 2001 10:26:36 GMT
Message-ID: <001101c0ffbc$edec6140$e33e1d18@nycap.rr.com>
From: "Matthew Conte" <matt AT conte DOT com>
To: <djgpp-workers AT delorie DOT com>
Cc: <rodney DOT leadbeater AT convergys DOT com>
References: <41FBBB1B17AFD4119ECE000347088836F5A916 AT wbnsmail DOT gtl DOT com>
Subject: Re: Array declarations allow non-constant expressions for dimensioning
Date: Thu, 28 Jun 2001 06:27:26 -0400
MIME-Version: 1.0
X-Priority: 3
X-MSMail-Priority: Normal
X-Mailer: Microsoft Outlook Express 6.00.2479.0006
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2479.0006
Reply-To: djgpp-workers AT delorie DOT com

> Why does gcc allow the following? I was amazed that it allowed the
> following. Very dangerous!!!

Variable-size array definitions are a gcc extension.  It's the programmer's
responsibility to ensure that the dimension variables contain valid values.

I've found this feature to be extremely useful in my work.  And after all,
it's just making a minor change to the way stack-allocated arrays are setup.

Also, this message would be better suited for another mailing list or
newsgroup.

regards,
matthew.

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019