Message-ID: <373967C1.7024A77F@tls.msk.ru> Date: Wed, 12 May 1999 15:36:33 +0400 From: "Michael Ju. Tokarev" Organization: Telecom Service, JSC X-Mailer: Mozilla 4.5 [en] (Win95; I) X-Accept-Language: ru,en MIME-Version: 1.0 To: pgcc AT delorie DOT com CC: Martin Kahlert Subject: Re: Strange preprocessor bug? Content-Type: text/plain; charset=koi8-r Content-Transfer-Encoding: 7bit Reply-To: pgcc AT delorie DOT com Martin Kahlert wrote: > Hi, > a very strange bug from the snapshot (10.May): > > ./xgcc -B./ -B/sw/pgcc/i686-pc-linux-gnulibc1/bin/ -DIN_GCC -DUSE_GNULIBC_1 > -g -W -Wall -I./include -I. -I../../pgcc/gcc -I../../pgcc/gcc/config > -I../../pgcc/gcc/../include \ > -aux-info SYSCALLS.c.X -E -S -o tmp-SYSCALLS.s SYSCALLS.c > In file included from SYSCALLS.c:86: > include/stddef.h:28: machine/ansi.h: No such file or directory > make: *** [SYSCALLS.c.X] Error 1 > > O.k. i thought, such things can happen. > But then i changed the lines around 28 from gcc/include/stddef.h from > #if defined (__BSD_NET2__) || defined (____386BSD____) || \ > defined (__FreeBSD__) || defined (__NetBSD__) > #include > #endif > > into > #if 0 > #include > #endif > > And the same problem again! This seems to indicate a cpp > miscompilation, since the first stage went o.k. > > What is my problem here? > > Bye, > Martin. > > PS: > My build procedure: > ../pgcc/configure --prefix=/sw/pgcc --enable-shared --disable-debug > gmake LANGUAGES='c c++ f77 proto' bootstrap-lean > > System is a Linux-PPro/2.0.36 kernel. > I found almost the same thing: "#if defined(A) || !defined(B) && 0", for example, evaluates to 0 (false) with 'gcc -OX' (with any X from 0 to 9), 'gcc -OX -m[arch=]pentium', BUT evaluates to _1_ (that's wrong!) for 'gcc -OX -march=pentiumpro' (but it is Ok for 'gcc -O0 -march=pentiumpro'). Note also that different machines cause different results (I'm now at office and experiment on Solaris 2.6 x86 on Intel PentiumII/322 machine; at home I have IntelMMX/166 with Linux, and got different results (but with pentium option ofcause, not pentiumpro!) -- sorry, I do not remember this). Another interesting thing -- I was unable to compile pgcc at Solaris/x86 at all starting from november, 1998 (what version it was?) -- stage2 always failed with different results (different from version to version) if I include any optimization for pentium/ppro; but it was compiled and worked well on Linux (but on another hardware -- at my home). pgcc-2.90.29 980515 (egcs-1.0.3 release) is worked well on both machines (and this is what I'm using now...). Regards, Michael Ju. Tokarev, System Administrator, JCS "Telecom-Service", Moscow, Russia.