From mboxrd@z Thu Jan 1 00:00:00 1970 From: "Martin v. Loewis" To: NixonJ@EM.AGR.CA Cc: gcc-bugs@gcc.gnu.org Subject: Re: Bug report Date: Fri, 07 Jul 2000 14:34:00 -0000 Message-id: <200007072129.XAA02660@loewis.home.cs.tu-berlin.de> References: X-SW-Source: 2000-07/msg00223.html List-Id: Thanks for your bug report. I've put it into GNATS. > I am using a computer with Red Hat Linux release 6.0 (Hedwig). My > code attached caused the compiler to generate the message above, > hence this email. If you are aware of a way to solve this problem > please let me know. Just write T **x; T *y[200]; T z[200][200]; and later x=&(y[0]); ... y[0]=&(z[0][0]); If your code is correct, no cast is needed. Regards, Martin >>From geoffk@cygnus.com Fri Jul 07 15:53:00 2000 From: Geoff Keating To: mvishnu@bbcr11.uwaterloo.ca (Meenaradchagan Vishnu) Cc: gcc-bugs@gcc.gnu.org Subject: Re: long long constants Date: Fri, 07 Jul 2000 15:53:00 -0000 Message-id: References: <8k5gv3$iov$1.cygnus.bug-gcc@watserv3.uwaterloo.ca> X-SW-Source: 2000-07/msg00224.html Content-length: 583 mvishnu@bbcr11.uwaterloo.ca (Meenaradchagan Vishnu) writes: > The gnu c++ compiler complains > "integer constant out of range" > > when compiling the following program: > > #include > #include > > int main() > { > assert( sizeof( long long ) == 8 ); > unsigned long long x1 = 0xffffffff00000000; > cout << x1 << endl; > } > > Is this a bug or a feature? It's a feature. 0xffffffff00000000 is a constant of type 'unsigned int', and it's way too big. You probably meant 0xffffffff00000000ULL. -- - Geoffrey Keating >>From diep@xs4all.nl Fri Jul 07 16:28:00 2000 From: Vincent Diepeveen To: gcc-bugs@gcc.gnu.org Subject: question about snapshot egcs 20 june 2000 Date: Fri, 07 Jul 2000 16:28:00 -0000 Message-id: <3.0.32.20000708013032.009899a0@pop.xs4all.nl> X-SW-Source: 2000-07/msg00225.html Content-length: 1392 Hello, I tried to compile my chess program with egcs 20 june 2000 and when optimizing code it crashes. I tried other snapshots and old egcs 2.91 which standard is in redhat 6.1 and it runs fine. In core dump i could only see what function it crashed. As it didn't crash without using optimizations i could not see what exactly caused the crash. Adding printf's i didn't figure out much. It crashes at an initialization function. Some variables there are volatile, and a lot of loops are after each other using the same variable. so like: i = 0 ; do { .. } while( ++i < 64 ); for( j = white ; j <= black ; j++ ) { .. for( i = 0 ; i < 16 ; i++ ) .. etcetera, many loops/lusses after each other, code is called only once at initialization of search, so it crashes long before it starts searching, which is even weirder. It crashes direct after startup. Nothing had changed at this initialization code past months, so i found it weird it crashed there, and the program had been running 24 hours a day at the internet past 6 months in different compiles from different compilers (both msvc 6.0 and different gcc snapshots). Despite that info i have been checking out my source, but can't find a bug in it, so i assume it is a bug in the Not all compiler switches causes it to crash. Hope i'm not telling something new here? Greetings, Vincent >>From diep@xs4all.nl Fri Jul 07 16:37:00 2000 From: Vincent Diepeveen To: gcc-bugs@gcc.gnu.org Subject: addition to snapshot egcs 20 june 2000 Date: Fri, 07 Jul 2000 16:37:00 -0000 Message-id: <3.0.32.20000708013921.0098c100@pop.xs4all.nl> X-SW-Source: 2000-07/msg00226.html Content-length: 1710 Hello, 2 small additions to what i said previous mail: a) it doesn't crash when i add -g b) it doesn't crash when between the loops/luses i put a bit of code. The loops/luses as they are now are right after each other using 2 loop/lus variables Both -O2 makes it crash as well as -O5. Any non-optimizing code addition to the compile string prevents it from crashing. This is how my makefile looks now (after using egcs which creates an exe that runs fine). # Makefile for VC++ 5.0, 6.0 Windows NT which i also use for linux target = linux #msvc 6.0 CC = egcs CPP = g++ CFLAGS = -O3 -Wall -mpentiumpro -DUNIXPII -march=pentiumpro # -fbranch-probabilities #CFLAGS = -O5 -pg -mpentiumpro -DUNIXPII -march=pentiumpro -fprofile-arcs CPPFLAGS = -D_CONSOLE -DUNIXPII -mpentiumpro -O3 -march=pentiumpro #-fbranch-probabilities #CPPFLAGS = -D_CONSOLE -DUNIXPII -mpentiumpro -pg -O5 -march=pentiumpro -fprofile-arcs #borland 5.5 #CC = bcc32 #CFLAGS = -6 -O2 #CPPFLAGS= -6 -O2 -D_CONSOLE -DWIN32 -DNT_i386 -g0 #CFLAGS = -D_CONSOLE -DWIN32 -O2 #CFLAGS = -D_CONSOLE -DWIN32 # #-Og -Oi -Gs -Gf -Gr # -Ox #CFLAGS = -O2 -G6 -Gs -Ot -Og cobjs = diepab.o diepasci.o diepauto.o diepbook.o diepcns.o \ diepdbas.o diepegtb.o diepeind.o diepeval.o diepexec.o \ diepgame.o diepinit.o diepmove.o dieprand.o diepslow.o \ diepsmp.o diepsort.o dieptabl.o dieptime.o nalimov.o \ rand.o includes = diep.h data.h function.h diep: $(cobjs) tbindex.o $(CC) -o diep -O3 $(cobjs) tbindex.o $(cobjs): $(includes) .c.o: $(includes) $(CC) $(CFLAGS) -c $*.c tbindex.o: $(CPP) $(CPPFLAGS) -c tbindex.cpp clean: rm -rf $(cobjs) rm -rf *.o*