Path: utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!tut.cis.ohio-state.edu!bloom-beacon!adam.pika.mit.edu!scs From: scs@adam.pika.mit.edu (Steve Summit) Newsgroups: comp.lang.c Subject: Re: C optimizer Summary: use #pragma, not keyword Keywords: C pure function optimization pragma Message-ID: <9326@bloom-beacon.MIT.EDU> Date: 19 Feb 89 01:04:40 GMT References: <515@larry.UUCP> <9648@smoke.BRL.MIL> <13134@steinmetz.ge.com> Sender: daemon@bloom-beacon.MIT.EDU Reply-To: scs@adam.pika.mit.edu (Steve Summit) Lines: 17 In article <13134@steinmetz.ge.com> davidsen@crdos1.UUCP (bill davidsen) writes: > I agree. One solution would be to provide a keyword, perhaps something >like 'pure' or 'deterministic', which would indicate... Just Say No to new keywords. This sort of optimization is a fine idea, and it does require a hint to the compiler, for the reasons already discussed. However, outside-the-language mucking around is exactly what #pragmas are for: #pragma pure(sin) (Someone, probably Karl Heuer, already made passing reference to the use of #pragmas for this example.) Extra keywords are messy, even if they do follow the rules and use leading underscores. Steve Summit scs@adam.pika.mit.edu