This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: Loop unrolling
- To: Joe Buck <jbuck at synopsys dot com>
- Subject: Re: Loop unrolling
- From: Jeffrey A Law <law at cygnus dot com>
- Date: Sun, 07 Jun 1998 02:48:25 -0600
- cc: egcs at cygnus dot com
- Reply-To: law at cygnus dot com
In message <199806042119.OAA03778@atrus.synopsys.com>you write:
> > 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 d one
> so for a reason, so we should give them what they expect (don't optimize
> redundant reads and writes).
Right. Principle of least suprise.
IMHO, if I've stuck "volatile" on something, the optimizers should
treat it as potentially changing at any time, regardless of the
storage class of the object.
jeff