How to not fold constants?
Jeffrey A Law
law@cygnus.com
Tue Aug 31 23:20:00 GMT 1999
In message < Pine.LNX.4.05.9908102002570.16852-100000@moshier.ne.mediaone.net >
you write:
>
> > It's not clear from your mail what the C9X standard requires
>
> The C9X rule says, roughly speaking, that float constant expressions
> may be folded only if nothing can possibly go wrong. It goes on to
> say that not ever folding at all is an acceptable way to implement
> that rule -- except for the case of static initializations.
>
> So I am asking, how do we figure out that an expression is a
> static initializer?
I'm not aware of any such way off the top of my head. You may need to create
one, probably by extending "fold" to accept and pass through an argument
which indicates that you're trying to fold an initializer. Then change the
callers in an appropriate manner.
jeff
More information about the Gcc
mailing list