This is the mail archive of the gcc@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: How to not fold constants?


  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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]