Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 14 Sep 2001 16:26:23 +0200
From:      Jeroen Ruigrok van der Werven <asmodai@FreeBSD.org>
To:        Bruce Evans <bde@zeta.org.au>
Cc:        Brian Somers <brian@freebsd-services.com>, cvs-committers@FreeBSD.org, cvs-all@FreeBSD.org
Subject:   Re: cvs commit: src/sys/sys cdefs.h
Message-ID:  <20010914162623.K17490@daemon.ninth-circle.org>
In-Reply-To: <20010914221545.G18664-100000@delplex.bde.org>
References:  <200109141122.f8EBMYd29701@hak.lan.Awfulhak.org> <20010914221545.G18664-100000@delplex.bde.org>

next in thread | previous in thread | raw e-mail | index | archive | help
-On [20010914 14:58], Bruce Evans (bde@zeta.org.au) wrote:
>Yes, this change is backward.  It undoes the main part of rev.1.17.
>No special #define's are required to correctly break the compiles,
>since __attribute__(()) is already a syntax error.

Of course, __attribute__ is, for all I know, a GCC'ism.  C90 and C99
don't have it in their description.

This is merely a solution to fix the exposure of
__attribute__((__format_arg__(2))) in stdio.h, which, due to not being
properly wrapped, breaks compilers or other tools, which do not know the
__attribute__ keyword, e.g. TenDRA. [Which is what I was trying to fix.]

>This regression may be related to breakage of lint(1).  lint(1) now
>uses a wrong version of cpp, one that pre-defines __GNUC__.  Since lint
>is not gcc, this defeats all the __GNUC__ ifdefs in <sys/cdefs.h>.  In
>particular, __attributes__'s in important macros like __printflike are
>exposed to lint and lint barfs on important headers like <stdio.h> that
>expand these macros.

lint's set-up is something I am still looking at and working on.

I looked at the output of cpp -dD -E of stdio.h and the resulting code
appears to be valid for the compiler, but the best solution, if judging
by the proper specs, would be to wrap the __attribute__ occurence in
stdio.h then, right?  And provide a non-gcc version of fmtcheck.

Or am I totally missing your point?

-- 
Jeroen Ruigrok van der Werven/Asmodai asmodai@[wxs.nl|freebsd.org|xmach.org]
Documentation nutter/C-rated Coder, finger asmodai@ninth-circle.dnsalias.net
http://www.freebsd.org/doc/en_US.ISO8859-1/books/developers-handbook/
Nothing yet from nothing ever came...


To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe cvs-all" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20010914162623.K17490>