tru64-unix-managers (formerly alpha-osf-managers) (1994-2012)
 help / color / mirror / Atom feed
* Summary: definition of malloc(0) and ::operator new(0)
@ 1998-07-17 11:53 lbro () dscc ! dk (Lars Bro)
  0 siblings, 0 replies; only message in thread
From: lbro () dscc ! dk (Lars Bro) @ 1998-07-17 11:53 UTC (permalink / raw)
  To: tru64-unix-managers

It is uncertain what malloc(0) must return but according to:


 Accredited Standards Committee*        Doc No:X3J16/96-0225
  X3, INFORMATION PROCESSING SYSTE      WG21/N1043
                                        Date:  2 December 1996
                                        Project:Programming Language C++
                                        Reply to:Andrew Koenig
                                        AT&T Research
                                        PO Box 636
                                        600 Mountain Avenue
                                        Room 2C-306
                                        Murray Hill, NJ 07974  USA
                                        ark@research.att.com

(Which is the December 1996 version of the ANSI draft C++ standard)

5.3.4 New
...
...

8 When the value of the expression in a direct-new-declarator  is  zero,
  the  allocation  function  is called to allocate an array with no ele-
  ments.  The pointer returned by the  new-expression  is  non-null  and
  distinct from the pointer to any other object.
...
...

-- 
Lars Bro, DSC Communications a/s Denmark
e-mail: lab@dscc.dk  tel: +45 44 77 29 67

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~1998-07-17 11:53 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
1998-07-17 11:53 Summary: definition of malloc(0) and ::operator new(0) lbro () dscc ! dk (Lars Bro)

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox