PATCH: malloc.c cleanups

Andreas Schwab schwab@suse.de
Wed Jul 19 02:23:00 GMT 2000


Wolfram Gloger <wmglo@dent.med.uni-muenchen.de> writes:

|> OK, I see.  It's probably a matter of taste, but I would prefer to see
|> sizeof(main_arena.av[0]) used rather than the cast NULL pointer.  My C
|> standard draft says that expressions `usually' aren't evaluated within
|> sizeof, but only in a footnote.

The sizeof expression is only evaluated if it contains a VLA.  This is
clearly stated in the semantics section (6.5.3.4#2).

Andreas.

-- 
Andreas Schwab                                  "And now for something
SuSE Labs                                        completely different."
Andreas.Schwab@suse.de
SuSE GmbH, Schanzäckerstr. 10, D-90443 Nürnberg


More information about the Libc-hacker mailing list