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 Sun, Aug 09, 2009 at 09:20:02PM +0000, Christos Zoulas wrote:
> In article <20090809210918.GC22320%drowsy.duskware.de@localhost>,
> Martin Husemann  <martin%duskware.de@localhost> 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/


Home | Main Index | Thread Index | Old Index