From: Thomas Demmer Newsgroups: comp.os.msdos.djgpp Subject: Re: Register variables with -O2 Date: Sat, 10 Jan 1998 18:14:18 +0100 Organization: Lehrstuhl fuer Stroemungsmechanik Lines: 34 Message-ID: <34B7AC6A.B2D4EE69@LSTM.Ruhr-UNI-Bochum.De> References: NNTP-Posting-Host: bvb.lstm.ruhr-uni-bochum.de Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit To: djgpp AT delorie DOT com DJ-Gateway: from newsgroup comp.os.msdos.djgpp Precedence: bulk William A. Barath wrote: > > On Thu, 8 Jan 1998, Geza Herman wrote: > > |How can I tell the compiler which variables use as register and which > |not when I use the option -O2? > [...] > > If your question is more along the lines of "How can I tell gcc to not > registerize a variable for me" then I'd say "don't use the -O1 or -O2 > options" That is a rather tough constraint sometimes. It is better to say volatile int foo; to be sure foo won't end up as a register variable. [...] -- Ciao Tom ************************************************************* * Thomas Demmer * * Lehrstuhl fuer Stroemungsmechanik * * Ruhr-Uni-Bochum * * Universitaetsstr. 150 * * D-44780 Bochum * * Tel: +49 234 700 6434 * * Fax: +49 234 709 4162 * * http://www.lstm.ruhr-uni-bochum.de/~demmer * *************************************************************