public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/52131] New: dynamic allocation?
@ 2012-02-06 7:25 paulmc at walla dot co.il
2012-02-06 8:21 ` [Bug c++/52131] " redi at gcc dot gnu.org
0 siblings, 1 reply; 2+ messages in thread
From: paulmc at walla dot co.il @ 2012-02-06 7:25 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=52131
Bug #: 52131
Summary: dynamic allocation?
Classification: Unclassified
Product: gcc
Version: 4.1.2
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: c++
AssignedTo: unassigned@gcc.gnu.org
ReportedBy: paulmc@walla.co.il
Hi,
It’s seems that the next lines don’t arise any error or warnings -
int bufSize = strlen(username) + 1 + strlen(column) + 1 ;
char buf[bufSize];
As far as I know, a buffer cannot be declared with size that known only on
runtime.
^ permalink raw reply [flat|nested] 2+ messages in thread
* [Bug c++/52131] dynamic allocation?
2012-02-06 7:25 [Bug c++/52131] New: dynamic allocation? paulmc at walla dot co.il
@ 2012-02-06 8:21 ` redi at gcc dot gnu.org
0 siblings, 0 replies; 2+ messages in thread
From: redi at gcc dot gnu.org @ 2012-02-06 8:21 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=52131
Jonathan Wakely <redi at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|UNCONFIRMED |RESOLVED
Resolution| |INVALID
--- Comment #1 from Jonathan Wakely <redi at gcc dot gnu.org> 2012-02-06 08:20:49 UTC ---
This is a documented extension, see
http://gcc.gnu.org/onlinedocs/gcc-4.6.2/gcc/Variable-Length.html#Variable-Length
Use -pedantic to get a diagnostic.
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2012-02-06 8:21 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-02-06 7:25 [Bug c++/52131] New: dynamic allocation? paulmc at walla dot co.il
2012-02-06 8:21 ` [Bug c++/52131] " redi at gcc dot gnu.org
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).