Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 15 Feb 1997 15:32:00 +1100
From:      Bruce Evans <bde@zeta.org.au>
To:        hackers@FreeBSD.ORG, j@uriah.heep.sax.de
Subject:   Re: NULL as ((void*)0) (was Re: strlen() question)
Message-ID:  <199702150432.PAA04488@godzilla.zeta.org.au>

next in thread | raw e-mail | index | archive | help
>anyway.  Passing (void *)0 into a vararg list is as invalid as passing
>0 there if the target type is e.g. char *.

I think `char *' is required to have the same representation as `void *',
so this particular pointer mismatch must work.

>encouraged) C code.  Inside a function call, you only need to cast it
>into the correct target type if: 1) it's in a vararg list, or 2) it's
>in an arg list of a function declared with obsolete K&R style only.

If it's in an arg list of a function declared with obsolescent K&R style
period.  `void foo __P((bar_t *));' is declared with obsolescent K&R
style if __P(x) expands to ().  There is not much point in using __P()
if you don't write K&R code (or in using prototypes and depending on
K&R misfeatures).

Bruce



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199702150432.PAA04488>