This is the mail archive of the
libc-alpha@sources.redhat.com
mailing list for the glibc project.
__restrict_arr and C++
- To: Gordon Sadler <gbsadler1 at lcisp dot com>, <libc-alpha at sources dot redhat dot com>
- Subject: __restrict_arr and C++
- From: "Joseph S. Myers" <jsm28 at cam dot ac dot uk>
- Date: Thu, 31 May 2001 19:32:48 +0100 (BST)
On Thu, 31 May 2001, Gordon Sadler wrote:
> Last night libjava failed with:
> /usr/local/src/build/gcc/gcc/g++ -B/usr/local/src/build/gcc/gcc/ -nostdinc++ -nostdinc++ -I/usr/local/src/build/gcc/i686-pc-linux-gnu/libstdc++-v3/include -I/usr/src/cvs/gcc/libstdc++-v3/include -I/usr/src/cvs/gcc/libstdc++-v3/include/std -I/usr/src/cvs/gcc/libstdc++-v3/include/c_std -I/usr/src/cvs/gcc/libstdc++-v3/libsupc++ -I/usr/src/cvs/gcc/libstdc++-v3/libio -I/usr/src/cvs/gcc/libstdc++-v3/testsuite -I/usr/src/cvs/gcc/libstdc++-v3/include/backwards -I/usr/src/cvs/gcc/libstdc++-v3/include/ext -L/usr/local/src/build/gcc/i686-pc-linux-gnu/libstdc++-v3/src -L/usr/local/src/build/gcc/i686-pc-linux-gnu/libstdc++-v3/src/.libs -B/usr/local/i686-pc-linux-gnu/bin/ -B/usr/local/i686-pc-linux-gnu/lib/ -isystem /usr/local/i686-pc-linux-gnu/include -DHAVE_CONFIG_H -I. -I/usr/src/cvs/gcc/libjava -I./include -I./gcj -I/usr/src/cvs/gcc/libjava -Iinclude -I/usr/src/cvs/gcc/libjava/include -I/usr/src/cvs/gcc/libjava/../boehm-gc/include -DLINUX_THREADS=1 -D_REENTRANT=1 -DSILENT=1 -DNO_SIGNALS=1 -DJAVA_FINALIZATION=1 -DGC_GCJ_SUPPORT=1 -I/usr/src/cvs/gcc/libjava/libltdl -I/usr/src/cvs/gcc/libjava/libltdl -I/usr/src/cvs/gcc/libjava/../gcc -I/usr/src/cvs/gcc/libjava/../libffi/include -I../libffi/include -fno-rtti -fnon-call-exceptions -fdollars-in-identifiers -D__NO_MATH_INLINES -ffloat-store -W -Wall -D_GNU_SOURCE -O2 -march=i686 -D_GNU_SOURCE -Wp,-MD,.deps/natInetAddress.pp -c /usr/src/cvs/gcc/libjava/java/net/natInetAddress.cc -fPIC -DPIC -o java/net/.libs/natInetAddress.o
> In file included from /usr/src/cvs/gcc/libjava/java/net/natInetAddress.cc:42:
> /usr/include/netdb.h:497: parse error before `]' token
> make[3]: *** [java/net/natInetAddress.lo] Error 1
Try this patch.
2001-05-31 Joseph S. Myers <jsm28@cam.ac.uk>
* misc/sys/cdefs.h (__restrict_arr): Define to empty for C++.
--- misc/sys/cdefs.h.orig Sun May 27 11:26:33 2001
+++ misc/sys/cdefs.h Thu May 31 18:30:08 2001
@@ -196,7 +196,7 @@
/* ISO C99 also allows to declare arrays as non-overlapping. The syntax is
array_name[restrict]
GCC 3.1 supports this. */
-#if __GNUC_PREREQ (3,1)
+#if __GNUC_PREREQ (3,1) && !defined __GNUG__
# define __restrict_arr __restrict
#else
# ifdef __GNUC__
--
Joseph S. Myers
jsm28@cam.ac.uk