delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/2003/01/20/01:01:09

Date: Mon, 20 Jan 2003 00:12:48 -0500
Message-Id: <200301200512.h0K5CmK27584@envy.delorie.com>
X-Authentication-Warning: envy.delorie.com: dj set sender to dj AT delorie DOT com using -f
From: DJ Delorie <dj AT delorie DOT com>
To: djgpp AT delorie DOT com
In-reply-to: <b0ffom$m18$1@news.online.de> (lars.o.hansen@gmx.de)
Subject: Re: several questions (symify, dynamic labels, cpu clock)
References: <b0ff15$lql$1 AT news DOT online DOT de> <b0ffom$m18$1 AT news DOT online DOT de>
Reply-To: djgpp AT delorie DOT com
Errors-To: nobody AT delorie DOT com
X-Mailing-List: djgpp AT delorie DOT com
X-Unsubscribes-To: listserv AT delorie DOT com

> how is it possible to define paragraphs in source code in which the
> compiler should not optimize but translate "straight" from C to
> machine code, if at all?

You can't.  GCC optimizes the whole file, or none of the file.

You can use the "volatile" keyword to tell gcc that certain memory
accesses can't be optimized away.  You can also use volatile asms
similarly, or "asm volatile ("")" to put in a "block" that gcc cannot
optimize across.

- Raw text -


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