From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 18474 invoked by alias); 10 Nov 2003 09:40:52 -0000 Mailing-List: contact gcc-help-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Archive: List-Post: List-Help: Sender: gcc-help-owner@gcc.gnu.org Received: (qmail 18466 invoked from network); 10 Nov 2003 09:40:51 -0000 Received: from unknown (HELO smtp1.libero.it) (193.70.192.51) by sources.redhat.com with SMTP; 10 Nov 2003 09:40:51 -0000 Received: from libero.it (193.70.192.39) by smtp1.libero.it (7.0.020-DD01) id 3F6F0E45005C2DFE for gcc-help@gcc.gnu.org; Mon, 10 Nov 2003 10:41:17 +0100 Date: Mon, 10 Nov 2003 09:40:00 -0000 Message-Id: Subject: Emulating diab compiler behaviour memory-is-volatile MIME-Version: 1.0 X-Sensitivity: 3 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: quoted-printable From: "lapo_pasqui\@libero\.it" To: "gcc-help" X-XaM3-API-Version: 4.1 (B16) X-type: 0 X-SenderIP: 192.106.52.2 X-SW-Source: 2003-11/txt/msg00126.txt.bz2 Hi, I'm trying to build an application written whith the diab compiler using g= cc version 3.3. The whole software has been written in the assumption every global variable should be threaten as volatile, thanks to the diab compiler specific option -Xmemory-is-volatile. As the diab manual states: =ABDo not perform optimizations that can cause device drivers, etc., to fail. By default, the compiler keeps data in registers as long as possible whenever it is safe. Difficulties can arise if a memory=0D location changes because it is mapped to an external hardware device and the compiler, unaware of this change, continues to use the old value that is stored in a register. These situations can be handled with the keyword volatile. However, in order to allow for the compilation of older programs - compiler provides the -Xmemory-is-volatile option=BB Do you know if there is a similar option in the gcc? Thanks Lapo