tru64-unix-managers (formerly alpha-osf-managers) (1994-2012)
 help / color / mirror / Atom feed
From: "lbro () dscc ! dk \(Lars Bro\)" <lab () dscc ! dk>
To: tru64-unix-managers
Subject: Summary: definition of malloc(0) and ::operator new(0)
Date: Fri, 17 Jul 1998 11:53:19 +0000	[thread overview]
Message-ID: <96078715811748.tru64-unix-managers.marc@archive.invalid> (raw)

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

                 reply	other threads:[~1998-07-17 11:53 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed
read-only archive

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