Article View: gnu.g++
Article #359Help! Bug
From: john hall
Date: Sat, 18 Feb 1989 00:44
Date: Sat, 18 Feb 1989 00:44
39 lines
1389 bytes
1389 bytes
Help! Compiler bug in g++ /* unknown revision */
The inclusion or exclusion of a simple printf statement
has drastic consequences on program correctness
/* ( DPR9 is just a print statement ) */
DPR9((" station %x\n", station));
DPR9((" display %x window %x\n", DISP, window));
DPR9((" display %x \n", DISP));
#if 1
DPR9((" black %x \n", station->black));
#endif
new_gc = XCreateGC( station->mydisplay, window, 0, 0);
DPR9((" display %x \n", DISP));
DPR9((" display %x window %x\n", DISP, window));
DPR9((" GC create\n"));
exit(0);
when #if 1, the program works:
station efff9f8
display 25cc4 window 1
display 25cc4
black 1
display 25cc4
display 25cc4 window 1
GC create
when #if 0, the program core dumps shortly after this code
station efff9f8
display 25cc4 window 1
display 25cc4
display 0
display 0 window 74
GC create
Technical Details
Message-ID:
<35878@tut.cis.ohio-state.edu>Path:
arc1-ca.pugleaf.net!utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!tut.cis.ohio-state.edu!clipper.cis.ohio-state.edu!hallShow Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!tut.cis.ohio-state.edu!clipper.cis.ohio-state.edu!hall From: hall@clipper.cis.ohio-state.edu (john hall) Newsgroups: gnu.g++,gnu.g++.bug Subject: Help! Bug Message-ID: <35878@tut.cis.ohio-state.edu> Date: 18 Feb 89 00:44:32 GMT Sender: news@tut.cis.ohio-state.edu Reply-To: <hall@cis.ohio-state.edu> Followup-To: gnu.g++ Distribution: usa Organization: Ohio State University Computer and Information Science Lines: 39