This is the mail archive of the 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: FENV_ACCESS questions in C and Fortran

  If you could point out where the standard gives pertinent
  information on the code hoisting question, that would be very
  helpful.  I find statements like the following, that seem to
  speak against the behaviors that you were advocating.

                              Floating-point operations implicitly
          set the status  flags;  modes  affect  result  values  of
          floating-point  operations.  Implementations that support
          such floating-point state are required to regard  changes
          to  it as side effects  --  see annex F for details.  The
          floating-point environment library  <fenv.h>  provides  a
          programming  facility  for  indicating  when  these  side
          effects matter,  freeing  the  implementations  in  other

       [#2]  The  FENV_ACCESS pragma provides a means to inform the
       implementation when a program  might  access  the  floating-
       point  environment  to  test  flags or run under non-default

       163The purpose of the FENV_ACCESS pragma is to allow certain
          optimizations,  for  example  global common subexpression
          elimination, code  motion,  and  constant  folding,  that
          could  subvert  flag tests and mode changes.

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