From owner-cvs-all Sun Sep 16 2:28:43 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 AF0ED37B409; Sun, 16 Sep 2001 02:28:35 -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 TAA26707; Sun, 16 Sep 2001 19:28:31 +1000 Date: Sun, 16 Sep 2001 19:28:06 +1000 (EST) From: Bruce Evans X-X-Sender: To: "David O'Brien" Cc: , Subject: Re: cvs commit: src/sys/sys cdefs.h In-Reply-To: <20010915162704.B77307@dragon.nuxi.com> Message-ID: <20010916191106.S33976-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 Sat, 15 Sep 2001, David O'Brien wrote: > On Sun, Sep 16, 2001 at 07:50:17AM +1000, Bruce Evans wrote: > > All the code that correctly uses __FBSDID() with a ';' is now uncompilable > > by C compilers since it has null declarations. > > Please show me compiler errors as I tested it both with and without `;'. %%% Script started on Sun Sep 16 19:13:21 2001 ttyp1:bde@gamplex:/usr/src/lib/libc> CC='cc -pedantic -DLIBC_SCCS' WARNS=2 make wmemcpy.o cc -pedantic -DLIBC_SCCS -O -pipe -DLIBC_RCS -DSYSLIBC_RCS -I/usr/src/lib/libc/include -DLIBC_MAJOR=5 -D__DBINTERFACE_PRIVATE -DINET6 -I/c/obj/usr/src/lib/libc -DPOSIX_MISTAKE -I/usr/src/lib/libc/../libc/locale -DBROKEN_DES -DPORTMAP -DDES_BUILTIN -DYP -DHESIOD -W -Wall -Wstrict-prototypes -Wmissing-prototypes -Wpointer-arith -Wno-uninitialized -Werror -Wreturn-type -Wcast-qual -Wwrite-strings -Wswitch -Wshadow -c /usr/src/lib/libc/../libc/string/wmemcpy.c -o wmemcpy.o cc1: warnings being treated as errors /usr/src/lib/libc/../libc/string/wmemcpy.c:31: warning: ANSI C does not allow extra `;' outside of a function *** Error code 1 Stop in /usr/src/lib/libc. ttyp1:bde@gamplex:/usr/src/lib/libc> CC='tcc -Ysystem -DLIBC_SCCS' make wmemcpy .o tcc -Ysystem -DLIBC_SCCS -O -pipe -DLIBC_RCS -DSYSLIBC_RCS -I/usr/src/lib/libc/include -DLIBC_MAJOR=5 -D__DBINTERFACE_PRIVATE -DINET6 -I/c/obj/usr/src/lib/libc -DPOSIX_MISTAKE -I/usr/src/lib/libc/../libc/locale -DBROKEN_DES -DPORTMAP -DDES_BUILTIN -DYP -DHESIOD -c /usr/src/lib/libc/../libc/string/wmemcpy.c -o wmemcpy.o tcc: Warning: Unknown option, -pipe. "/usr/src/lib/libc/../libc/string/wmemcpy.c", line 34: Error: [ISO 6.5]: Can't have empty declaration. "/usr/include/wchar.h", line 111: Error: [ISO 6.5]: '__restrict' has already been declared (at line 111). "/usr/include/wchar.h", line 114: Error: [ISO 6.5]: '__restrict' has already been declared (at line 114). "/usr/include/wchar.h", line 117: Error: [ISO 6.5]: '__restrict' has already been declared (at line 117). "/usr/include/wchar.h", line 120: Error: [ISO 6.5]: '__restrict' has already been declared (at line 120). "/usr/include/wchar.h", line 133: Error: [ISO 6.5]: '__restrict' has already been declared (at line 133). *** Error code 1 Stop in /usr/src/lib/libc. ttyp1:bde@gamplex:/usr/src/lib/libc> exit Script done on Sun Sep 16 19:13:57 2001 %%% Notes: 1) CC='cc -pedantic' WARNS=2 makes cc almost a C compiler. 2) -DLIBC_SCCS enables some __RCSID's (I can't test __FBSDID easily because cvsup.au.org is not delivering some files, mainly important files in src/sys/sys). 3) CC='tcc -Ysystem' gives TenDRA with system headers. 4) isn't written in C (90). __restrict is a gcc feature. CC='cc -pedantic' WARNS=2 doesn't make cc enough of a C compiler to reject it. The corresponding feature in C99 is spelled "restrict". It will probably be spelled __restrict in headers, but doesn't support it yet. > > Please back this out. > > Fine. I was just trying to reduce the line length due to your being > upset by it. Oh. Bruce To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe cvs-all" in the body of the message