Path: utzoo!utgpu!news-server.csri.toronto.edu!mailrus!umich!samsung!cs.utexas.edu!tut.cis.ohio-state.edu!ucbvax!UB.CC.UMICH.EDU!Mary_Kay_Anderson From: Mary_Kay_Anderson@UB.CC.UMICH.EDU Newsgroups: comp.sys.sgi Subject: Character pointer c core dump Message-ID: <5051930@ub.cc.umich.edu> Date: 12 Apr 90 04:07:24 GMT Sender: daemon@ucbvax.BERKELEY.EDU Organization: The Internet Lines: 32 What's wrong with this picture, or what's wrong with this cc compiler? The following dumps core at *lp=5: char buf[1024]; main() { long *lp; int i; lp = (long *)&buf[6]; *lp = 5; printf("%ld\n", *lp); } However.... If you replace the &buf[6] with &buf[0], it works the way you would expect and prints 5 to the screen. Looks like a bug? Thanks for any help you can give me. Tim Buxton OptiMetrics, Inc. Tim_Buxton@um.cc.umich.edu