Subject: Re: toolchain/22118: make won't compile with -Wcast-qual -Wstrict-prototypes and more
To: None <tech-toolchain@netbsd.org>
From: David Laight <david@l8s.co.uk>
List: tech-toolchain
Date: 07/16/2003 11:53:22
> C++ has const_cast for these circumstances (explicitly and safely casting 
> away const-ness).  Unfortunately, C has no direct equivalent.

ISTM that these gcc warnings are OTT, or is C99 just plain broken?
Surely the C way to remove 'const' is just a cast?

I also think it is unecessary, and indeed more likely cause problems,
to require casts on Integral Promotions, Integral Conversions and
Arithmetic Conversions.

These sort of casts (along with (void) casts of ignored function results)
just make code unreadable.

	David

-- 
David Laight: david@l8s.co.uk