[Bug c/20523] gcc 3.4.3 optimizes volatile vars away (gcc 3.4.3 >= -O2)
ltg at zes dot uni-bremen dot de
gcc-bugzilla@gcc.gnu.org
Thu Mar 17 21:37:00 GMT 2005
------- Additional Comments From ltg at zes dot uni-bremen dot de 2005-03-17 21:37 -------
Subject: RE: gcc 3.4.3 optimizes volatile vars away (gcc 3.4.3 >= -O2)
On 17-Mar-2005 pinskia at gcc dot gnu dot org wrote:
>
> ------- Additional Comments From pinskia at gcc dot gnu dot org 2005-03-17
> 20:58 -------
> You need to mark the variable as used.
Hmmm, I thought "volatile" is suffient in order to prevent the
compiler from optimizing those variables away.
Anyway, I checked the docs and found that I can mark a function
as used (with __attribute__ ((used)) ), but not variables (and types).
Either it´s not in the docs or I looked in the wrong place.
Can you tell me how to mark a variable as used?
Thanks.
Lothar
----------------------------------
E-Mail: ltg@zes.uni-bremen.de
Date: 17-Mar-2005
Time: 22:20:02
This message was sent by XFMail
----------------------------------
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=20523
More information about the Gcc-bugs
mailing list