On Sun, Aug 09, 2009 at 09:20:02PM +0000, Christos Zoulas wrote:
> In article <[email protected]>,
> Martin Husemann <[email protected]> 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.
Kind regards
--
Matthias Scheler http://zhadum.org.uk/