Date: Sun, 16 Sep 2001 19:28:06 +1000 (EST) From: Bruce Evans <bde@zeta.org.au> To: "David O'Brien" <obrien@FreeBSD.org> Cc: <cvs-committers@FreeBSD.org>, <cvs-all@FreeBSD.org> Subject: Re: cvs commit: src/sys/sys cdefs.h Message-ID: <20010916191106.S33976-100000@delplex.bde.org> In-Reply-To: <20010915162704.B77307@dragon.nuxi.com>
next in thread | previous in thread | raw e-mail | index | archive | help
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) <wchar.h> 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 <sys/cdefs.h> 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
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20010916191106.S33976-100000>