tech-userlevel archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

definition of NULL correct?

We define NULL as "(void *)0" rather than "((void *)0)", and that causes

  sizeof NULL

to fail.

I found this in libunistring:

Here is an example program, which fails to build on NetBSD 5 (i386).

Some of the gnulib people think that this is a failure of NetBSD to
comply with POSIX 2008.


#include <stdlib.h>
#include <stdio.h>

  printf("null size is %zd\n", sizeof NULL);

  return 0;

Attachment: pgpzrRGkklfYQ.pgp
Description: PGP signature

Home | Main Index | Thread Index | Old Index