(unknown)

"Viking >:)" <[email protected]>
Newsgroups gmane.comp.programming.cppug
Message-ID <[email protected]>
Hello Group,

I am a new member to this group. 

Can any one please explain me about the volatile keyword.  According 
Mr.StrousStrup in "The C++ Programming Language"  the definition is 
as follows.

"A Volatile specifier is a hint to the Compiler that an object my 
change its value in ways not specified by the language, so aggressive 
optimizations to be avoided."


My doubts are 

"an object my change its value in ways not specified by the language"

1) What is this ? How will an object change  its ways in ways not 
specified by the language ? 

If some example is given about this , that would be greatful.

"so aggressive optimizations to be avoided."

2) Who does optimizations ? Compiler ? Does it does it automatically 
or by Specifing some switches...?


Thanks in Advance.

Cheers,
Blue Viking




------------------------ Yahoo! Groups Sponsor ---------------------~-->
Buy Ink Cartridges or Refill Kits for your HP, Epson, Canon or Lexmark
Printer at MyInks.com. Free s/h on orders $50 or more to the US & Canada.
http://www.c1tracking.com/l.asp?cid=5511
http://us.click.yahoo.com/mOAaAA/3exGAA/qnsNAA/EbFolB/TM
---------------------------------------------------------------------~->

To unsubscribe from this group, send an email to:
[email protected]

 

Your use of Yahoo! Groups is subject to http://docs.yahoo.com/info/terms/
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.