Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!wuarchive!zaphod.mps.ohio-state.edu!mips!servitude!rogerk From: rogerk@mips.COM (Roger B.A. Klorese) Newsgroups: comp.sys.mips Subject: Re: cc bug? Message-ID: <40106@mips.mips.COM> Date: 12 Jul 90 20:18:25 GMT References: <2742@uakari.primate.wisc.edu> Sender: news@mips.COM Reply-To: rogerk@mips.COM (Roger B.A. Klorese) Organization: MIPS Computer Systems, Inc. Lines: 27 In article <2742@uakari.primate.wisc.edu> bin@primate.wisc.edu (Brain in Neutral) writes: >RISC/os 4.01 >cc 2.0 > ># include > >main () >{ >char *str; > > fprintf (stderr, "why does this compile?\n"< str); >} > >Note the < rather than , after the \n ... it compiles but dumps core when >run. Why does it even compile? It compiles because "why does this compile?\n" < str is a boolean-valued expression, and your fprintf is now missing a third argument, which is why it dumps core. -- ROGER B.A. KLORESE MIPS Computer Systems, Inc. phone: +1 408 720-2939 MS 4-02 950 DeGuigne Dr. Sunnyvale, CA 94086 voicemail: +1 408 524-7421 rogerk@mips.COM {ames,decwrl,pyramid}!mips!rogerk "I'm the NLA" "Maybe this world is another planet's hell." -- Aldous Huxley