delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1998/01/10/14:49:01

From: Thomas Demmer <demmer AT LSTM DOT Ruhr-UNI-Bochum DOT De>
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: <Pine DOT GSO DOT 3 DOT 95 DOT 980108130328 DOT 17326A-100000 AT kempelen DOT inf DOT bme DOT hu> <Pine DOT GSO DOT 3 DOT 95 DOT iB1 DOT 0 DOT 980109181740 DOT 28291A-100000 AT vtn1>
NNTP-Posting-Host: bvb.lstm.ruhr-uni-bochum.de
Mime-Version: 1.0
To: djgpp AT delorie DOT com
DJ-Gateway: from newsgroup comp.os.msdos.djgpp

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                *
*************************************************************

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019