From owner-freebsd-chat Tue Mar 16 22:35:22 1999 Delivered-To: freebsd-chat@freebsd.org Received: from iquest3.iquest.net (iquest3.iquest.net [209.43.20.203]) by hub.freebsd.org (Postfix) with SMTP id 9DFAA150AF for ; Tue, 16 Mar 1999 22:34:54 -0800 (PST) (envelope-from toor@y.dyson.net) Received: (qmail 23084 invoked from network); 17 Mar 1999 06:34:34 -0000 Received: from dyson.iquest.net (HELO y.dyson.net) (198.70.144.127) by iquest3.iquest.net with SMTP; 17 Mar 1999 06:34:34 -0000 Received: (from toor@localhost) by y.dyson.net (8.9.3/8.9.1) id BAA03100; Wed, 17 Mar 1999 01:34:33 -0500 (EST) Message-Id: <199903170634.BAA03100@y.dyson.net> Subject: Re: Use of "register" in code In-Reply-To: <14063.12923.464399.183283@avalon.east> from Anthony Kimball at "Mar 16, 99 10:55:18 pm" To: alk@pobox.com Date: Wed, 17 Mar 1999 01:34:33 -0500 (EST) Cc: chat@freebsd.org From: "John S. Dyson" Reply-To: dyson@iquest.net X-Mailer: ELM [version 2.4ME+ PL38 (25)] MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Sender: owner-freebsd-chat@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.org Anthony Kimball said: > > > > I doubt it would make performance worse. I think GCC basically just > > > ignores it for IA32. > > > It does ignore it. > > This is categorically wrong. GCC does not ignore "register" > declarations. It honors the ANSI standard C semantics for > register-qualified types in at least some circumstances, even without > supplying -ansi or -pedantic options. I just tried it. > In the sense of "optimization" it does ignore it. I agree that register is considered to be something like "auto" from certain standpoints. However, it seemed that the context was optimization, and choosing "register" to produce better code. There should be *few* cases of the *need* to use "register" in code. Again, the context was optimization. -- John | Never try to teach a pig to sing, dyson@iquest.net | it makes one look stupid jdyson@nc.com | and it irritates the pig. To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-chat" in the body of the message