Source-Changes-D archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
Re: CVS commit: src/sys/sys
On Mon, Aug 10, 2009 at 12:24:47AM +0200, Martin Husemann wrote:
> On Sun, Aug 09, 2009 at 09:20:02PM +0000, Christos Zoulas wrote:
> > The new style casts are very useful because they show programming intent.
So do C casts! provided what you are casting is an integer type or a
pointer to a struct (rather than a class).
> Yes, new style casts are fine.
Hmm... even writing a bit of C++ I used C casts when passing buffers
to send() etc - casts which are needed because C++ doesn't have a
working 'void *'.
> But warning about old style casts in a language that is designed to be C
> compatible is plain stupid.
>
> Besides, there should be no casts in system headers ;-}
What happens if these casts are put into inline functions inside the
'exterrn "C"' block. The compiler really has no excuse to warn
then, if it does it is a compler bug.
David
--
David Laight: david%l8s.co.uk@localhost
Home |
Main Index |
Thread Index |
Old Index