Message-ID: <3ACAD2A7.7256A296@hotmail.com> From: Gustavsson Tommy Ext X-Mailer: Mozilla 4.7 [en] (X11; I; Linux 2.2.14 i686) X-Accept-Language: en MIME-Version: 1.0 Newsgroups: comp.os.msdos.djgpp Subject: volatile Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Lines: 12 Date: Wed, 04 Apr 2001 05:50:13 GMT NNTP-Posting-Host: 172.24.85.83 X-Complaints-To: newsmaster AT nokia DOT com X-Trace: news1.nokia.com 986363413 172.24.85.83 (Wed, 04 Apr 2001 08:50:13 EET DST) NNTP-Posting-Date: Wed, 04 Apr 2001 08:50:13 EET DST Organization: Nokia To: djgpp AT delorie DOT com DJ-Gateway: from newsgroup comp.os.msdos.djgpp Reply-To: djgpp AT delorie DOT com In my c++ project I have started to optimize my code with -O2 flag (Linux gcc) and due to this some pointers were not uploaded in the memory. The gcc-compiler dit not think that they were used. I could of course prevent this with volatile before every pointer, but I would like to prevent this in all of my code. I have tried to add flag -fvolatile and -fvolatile-global, but they are not working. I need help ..... Thanks