Path: utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!purdue!haven!adm!smoke!gwyn From: gwyn@smoke.BRL.MIL (Doug Gwyn) Newsgroups: comp.lang.c Subject: Re: Short code to determine compiler's Message-ID: <10590@smoke.BRL.MIL> Date: 23 Jul 89 10:48:24 GMT References: <396@uop.uop.EDU> <225800197@uxe.cso.uiuc.edu> <579@targon.UUCP> <171@bms-at.UUCP> <14497@dartvax.Dartmouth.EDU> <1038@cernvax.UUCP> Reply-To: gwyn@brl.arpa (Doug Gwyn) Organization: Ballistic Research Lab (BRL), APG, MD. Lines: 12 In article <1038@cernvax.UUCP> hjm@cernvax.UUCP (Hubert Matthews) writes: >So, does "register" help or hinder? You already answered your own question. The appearance of the "register" storage-class specifier allows the compiler to know of certain constraints on the variable's usage, which can never hurt optimization. There are already compilers that ignore "register" (except for diagnosing attempts to take its address), showing that it can't really hinder optimization. There are also a large number of compilers in daily use that do take the "register" specification into account when generating code. For such compilers it obviously helps, assuming that the programmer has applied "register" wisely.