Subject: Re: 'restrict' problem compiling current on sparc64
To: abs <abs@mono.org>
From: Rick Byers <rb-netbsd@BigScaryChildren.net>
List: tech-toolchain
Date: 10/27/2001 23:06:10
I get the exact same problem on my i386.  Those __restrict qualifiers were
added earlier today.  I'm not sure what they're supposed to do (__restrict
isn't in the gcc manpage or info page), but obviously there is something
wrong with them.  It compiles fine with egcs-1.1.2 but not with
gcc-2.95.3.  I just backed up to rev 1.13 of glob.h and it seems to be
working fine.

Rick

On Sun, 28 Oct 2001, abs wrote:

> Date: Sun, 28 Oct 2001 01:13:14 +0100 (BST)
> From: abs <abs@mono.org>
> To: tech-toolchain@netbsd.org
> Subject: 'restrict' problem compiling current on sparc64
>
> 	Attempting to compile -current on sparc64 with the following env:
> 	export MACHINE=sparc64
> 	export DESTDIR=/var/obj/destdir
> 	export MAKEOBJDIRPREFIX=/var/obj/src
> 	export TOOLDIR=/var/obj/tooldir
>
> 	Chokes with "invalid use of `restrict'" in glob.h
>
> /var/obj/tooldir/bin/sparc64--netbsd-gcc -O -mcpu=v9 -DALL_STATE
> -DUSG_COMPAT  -Wall -Wstrict-prototypes -Wmissing-prototypes
> -Wpointer-arith -Wno-uninitialized -Werror   -D_LIBC -DNLS -DYP -DHESIOD
> -DLIBC_SCCS -DSYSLIBC_SCCS  -D_REENTRANT
> -I/home/netbsd/current/lib/libc/include -DINET6 -D__DBINTERFACE_PRIVATE
> -I/home/netbsd/current/lib/libc/../../libexec/ld.elf_so
> -I/home/netbsd/current/lib/libc/dlfcn -DWITH_RUNE -DRUNEMOD_MAJOR=3
> -D_PATH_LOCALEMODULE=\"/usr/lib/runemodule\" -DRESOLVSORT -I.
> -DPOSIX_MISTAKE -DPORTMAP -DFLOATING_POINT   -nostdinc -idirafter
> /var/obj/destdir/usr/include -c
> /home/netbsd/current/lib/libc/gen/__glob13.c
> In file included from /home/netbsd/current/lib/libc/gen/__glob13.c:78:
> /var/obj/destdir/usr/include/glob.h:107: invalid use of `restrict'
>
> 	The relevant line reads:
>
> int     glob __P((const char * __restrict, int,
>             int (* __restrict)(const char *, int), glob_t * __restrict));
>
> 	Am I doing anything obviously wrong here??
>
> 	Thanks
>
>