fixinc required for new FreeBSD 4.x bootstrap failures
David O'Brien
obrien@freebsd.org
Mon Sep 13 15:05:00 GMT 2004
On Mon, Sep 13, 2004 at 01:02:14PM +0200, Gerald Pfeifer wrote:
> FreeBSD 4.x has constructs of the following kind in system headers like
> /usr/include/stdlib.h:
>
> int abs __P((int)) __pure2;
>
> where /usr/include/sys/cdefs.h has the following definitions
>
> #if __GNUC__ < 2 || __GNUC__ == 2 && __GNUC_MINOR__ < 5
> #define __dead2
> #define __pure2
> #define __unused
> #endif
> #if __GNUC__ == 2 && __GNUC_MINOR__ >= 5 && __GNUC_MINOR__ < 7
> #define __dead2 __attribute__((__noreturn__))
> #define __pure2 __attribute__((__const__))
> #define __unused
> #endif
> #if __GNUC__ == 2 && __GNUC_MINOR__ >= 7 || __GNUC__ == 3
> #define __dead2 __attribute__((__noreturn__))
> #define __pure2 __attribute__((__const__))
> #define __unused __attribute__((__unused__))
> #endif
>
> I'm sure everyone will spot the obvious, most silly mistake: in the
> case of __GNUC__ being >= nothing happens, and __pure2 will just stay
> in the output after preprocessing, leading to compile failures.
I'm sorry, I don't quite follow (but then its early in the morning). My
read of the above catches all cases. What value of __GNUC__ breaks
things?
--
-- David (obrien@FreeBSD.org)
More information about the Gcc
mailing list