Path: utzoo!utgpu!water!watmath!clyde!att!osu-cis!tut.cis.ohio-state.edu!rutgers!bellcore!tness7!texbell!sugar!ficc!uunet!mcvax!enea!kth!sics!uplog!thomas From: thomas@uplog.se (Thomas Hameenaho) Newsgroups: comp.lang.c Subject: Re: What does Z["ack"] = 5 mean? Keywords: Obfuscated C, wierd Message-ID: <310@uplog.se> Date: 13 Oct 88 09:54:41 GMT References: <14999@agate.BERKELEY.EDU> Reply-To: thomas@uplog.UUCP (Thomas Hameenaho) Organization: TeleLOGIC Uppsala AB Lines: 26 In article <14999@agate.BERKELEY.EDU> laba-3aw@web.berkeley.edu (Sam Shen) writes: #Exactly what does this mean: # #main() #{ # char Z; # # Z["ack!"] = 5; #} # #Worse yet, the executable produced by gcc core dumps. Oh, by the way, this #is all on a Sun-3/50. # The problem in the gcc case is that gcc puts strings in the text segment and text is normally read-only. Our gcc/cc for 68k also doesn't initialize Z to anything useful, it just grabs what happens to be on the stack. -- Real life: Thomas Hameenaho Email: thomas@uplog.{se,uucp} Snail mail: TeleLOGIC Uppsala AB Phone: +46 18 189406 Box 1218 Fax: +46 18 132039 S - 751 42 Uppsala, Sweden