On Aug 10, 5:27pm, t...@netbsd.org (Matthias Scheler) wrote: -- Subject: Re: CVS commit: src/sys/sys
| On Sun, Aug 09, 2009 at 09:20:02PM +0000, Christos Zoulas wrote: | > In article <20090809210918.gc22...@drowsy.duskware.de>, | > Martin Husemann <mar...@duskware.de> wrote: | > >On Sun, Aug 09, 2009 at 09:29:50PM +0200, Tonnerre LOMBARD wrote: | > >> Unfortunately, these are widely used headers. We don't want to break | > >> -Wold-style-casts in general. | > > | > >Why not? | > > | > >It is IMHO a very useless and stupid warning. | > | > The new style casts are very useful because they show programming intent. | | Can't we instead do what Solaris does? | | #ifdef __cplusplus | extern "C" { | #endif | | [...] | #define __byte_swap_u64_constant(x) \ | ((uint64_t) \ | [...] | | #ifdef __cplusplus | } | #endif | | That should allows us to keep the old-casts and avoid warnings. This cannot possibly work because the syntax parsing happens after the macro is expanded and the macro is expanded in c++ code. christos