public inbox for gcc@gcc.gnu.org
 help / color / mirror / Atom feed
* C++: variable length arrays and operator new[]
@ 2009-09-20  9:59 Florian Weimer
  2009-09-21 21:56 ` Ian Lance Taylor
  0 siblings, 1 reply; 4+ messages in thread
From: Florian Weimer @ 2009-09-20  9:59 UTC (permalink / raw)
  To: gcc

G++ currently accepts the following code:

char *
alloc(unsigned a, unsigned b)
{
  typedef char array[a];
  return &**(new array[b]);
}

Is this intentional?  The equivalent "new char[a][b]" is rejected (as
required by the C++ standard).

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2009-09-22 17:03 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2009-09-20  9:59 C++: variable length arrays and operator new[] Florian Weimer
2009-09-21 21:56 ` Ian Lance Taylor
2009-09-21 22:36   ` Gabriel Dos Reis
2009-09-22 17:03     ` Florian Weimer

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).