From owner-cvs-all Fri Sep 14 8:54:48 2001 Delivered-To: cvs-all@freebsd.org Received: from mailman.zeta.org.au (mailman.zeta.org.au [203.26.10.16]) by hub.freebsd.org (Postfix) with ESMTP id 686DC37B407; Fri, 14 Sep 2001 08:54:41 -0700 (PDT) Received: from bde.zeta.org.au (bde.zeta.org.au [203.2.228.102]) by mailman.zeta.org.au (8.9.3/8.8.7) with ESMTP id BAA17985; Sat, 15 Sep 2001 01:54:18 +1000 Date: Sat, 15 Sep 2001 01:53:54 +1000 (EST) From: Bruce Evans X-X-Sender: To: Jeroen Ruigrok van der Werven Cc: Brian Somers , , Subject: Re: cvs commit: src/sys/sys cdefs.h In-Reply-To: <20010914162623.K17490@daemon.ninth-circle.org> Message-ID: <20010915012754.C19795-100000@delplex.bde.org> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: owner-cvs-all@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG On Fri, 14 Sep 2001, Jeroen Ruigrok van der Werven wrote: > -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.] The correct fix for that is to properly wrap it. > >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 . In > >particular, __attributes__'s in important macros like __printflike are > >exposed to lint and lint barfs on important headers like 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. Running cpp directly normally gives a correct version of cpp, but lint doesn't use it (it uses cc -E -x c -D...). I think fmtcheck()'s attributes are only useful for gcc. fmtcheck() can be implemented in Standard C. fmtcheck.c already seems to be portable -- TenDRA compiles it OK. Bruce To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe cvs-all" in the body of the message