Source-Changes archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: CVS commit: src



Klaus Klein writes:

> Module Name:  src
> Committed By: kleink
> Date:         Wed Dec 16 11:11:02 UTC 1998
> 
> Modified Files:
>       src/sys/arch/i386/include: endian.h
>       src/sys/arch/pc532/include: endian.h
>       src/sys/arch/vax/include: endian.h
> Log Message:
> Support for compound statements enclosed in parenthes to appear as
> expressions is a GNU C extension; mark as such them with
> __extension__ to suppress portability warnings.  Addresses kern/3562
> and misc/6185, as suggested by Dave Sainty <dave%dtsp.co.nz@localhost>.

When I suggested that I didn't realise quite how new that gcc feature
is, but it's actually missing as recently as gcc 2.7.x.

Too early to sup and check whether you already have, but it might be
prudent to protect __extension__ with something like (and given that
it's already protected as gcc specific code in the header):

#if (__GNUC__ == 2 && __GNUC_MINOR__ >= 8) || __GNUC__ > 2

Or alternatively, #define away __extension__ in
/usr/include/sys/cdefs.h.  Actually, I see this is already done for
__attribute__ in cdefs.h, perhaps this is the correct place to do it?



Home | Main Index | Thread Index | Old Index