Path: utzoo!utgpu!watserv1!watmath!att!linac!pacific.mps.ohio-state.edu!zaphod.mps.ohio-state.edu!wuarchive!uunet!overload!dillon From: dillon@overload.Berkeley.CA.US (Matthew Dillon) Newsgroups: comp.sys.amiga.tech Subject: Re: C compilers code generation Message-ID: Date: 27 Nov 90 04:00:53 GMT References: <1990Nov19.130657.19380@sisd.kodak.com> <90324.204949GIAMPAL@auvm.auvm.edu> <1990Nov21.131206.2634@sisd.kodak.com> <530@ssp9.idca.tds.philips.nl> Lines: 26 In article <530@ssp9.idca.tds.philips.nl> dolf@idca.tds.PHILIPS.nl (Dolf Grunbauer) writes: > >Our compiler (for Unix, not for my Amiga) allows 'sizeof("constant")' >which is eliminated at compile time. This obviously doesn't work for dynamic >strings. >-- > _ _ > / U | Dolf Grunbauer Tel: +31 55 433233 Internet dolf@idca.tds.philips.nl > /__'< Philips Information Systems UUCP ...!mcsun!philapd!dolf >88 |_\ If you are granted one wish do you know what to wish for right now ? -- Actually, *all* compilers do sizeof("constant") at compile time. Unfortunately, many also declare storage for the string even though it is never referenced. That has always amused me. Perhaps you were talking about strlen("constant"); ?? This whole argument is over builtins and compiler optimization of said. -Matt Matthew Dillon dillon@Overload.Berkeley.CA.US 891 Regal Rd. uunet.uu.net!overload!dillon Berkeley, Ca. 94708 USA