Mail Archives: djgpp/1998/01/31/07:15:28

From: David Powell <dapowell AT usa DOT net>
Newsgroups: comp.os.msdos.djgpp
Subject: Re: A modifier -- volatile
Date: Sat, 31 Jan 1998 23:01:46 +1100
Organization: The University of Melbourne
Lines: 18
Message-ID: <>
References: <199801252242 DOT RAA29221 AT delorie DOT com>
Mime-Version: 1.0
To: djgpp AT delorie DOT com
DJ-Gateway: from newsgroup comp.os.msdos.djgpp

VAMPYR wrote:

> A syntax:
> volatile int variable;
> But what is the "volatile" means?

  It means that the compiler won't optimize the variable by loading it
into a register.  This is usually used when you have an interrupt
handler etc. which might make changes to the value of the variable which
an optimizing compiler would be unable to predict


- Raw text -

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