www.delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1996/06/13/16:22:58

Xref: news2.mv.net comp.os.msdos.djgpp:4927
From: Lennart Steinke <steinke AT zeus DOT adv-boeblingen DOT de>
Newsgroups: comp.os.msdos.djgpp
Subject: How to tell djgpp NOT to optimate a line of code
Date: Thu, 13 Jun 1996 13:12:58 -0500
Organization: InterNetNews at News.BelWue.DE (Stuttgart, Germany)
Lines: 27
Message-ID: <Pine.VUL.3.91.960613123358.3422E-100000@zeus.adv-boeblingen.de>
NNTP-Posting-Host: zeus.adv-boeblingen.de
Mime-Version: 1.0
To: djgpp AT delorie DOT com
DJ-Gateway: from newsgroup comp.os.msdos.djgpp

Hi!

I wrote a ISR which hook into the timer interrupt and updates
a global variable.

say this var is <g> ... my code looks something like

int b;

b=g;
while (b==g);


this loop is always optimazed to 
while(1);

ist there a possibilty to tell gcc not to touch the code
(similar to the __volatile__ keyword)?



Lenny
-- 
Lennart Steinke (steinke AT adv-boeblingen DOT de)



- Raw text -


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