This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: Loop unrolling
- To: gavin at cygnus dot com (Gavin Romig-Koch)
- Subject: Re: Loop unrolling
- From: Joe Buck <jbuck at synopsys dot com>
- Date: Thu, 4 Jun 98 14:19:48 PDT
- Cc: egcs at cygnus dot com
> Kaz Kylheku writes:
> > Of course, the compiler in question is GCC, which must meet additional
> > requirements because it is intended to support access to hardware
> > and threading. For that reason it must honor the volatile attribute
> > for static objects, objects referred to through pointers and auto
> > objects whose address is taken, to be safe.
>
> Why can't GCC go a step farther and honor the volatile attribute for
> any auto object?
Yes, if someone writes an automatic volatile variable, they've presumably done
so for a reason, so we should give them what they expect (don't optimize
redundant reads and writes).