~vcs-imports-ii/mpfr/trunk

« back to all changes in this revision

Viewing changes to src/mpfr-impl.h

  • Committer: vlefevre
  • Date: 2020-10-21 10:53:21 UTC
  • Revision ID: svn-v4:280ebfd0-de03-0410-8827-d642c229c3f4:trunk:14168
[src/mpfr-impl.h] Updated UBF comment about aliasing rules.

Show diffs side-by-side

added added

removed removed

Lines of Context:
2687
2687
   (see changeset r13820 in the ubf2 branch). So, for the time being,
2688
2688
   as long as the code does not break, do not change anything.
2689
2689
 
 
2690
   Note: The condition "use mpfr_ptr to access the usual mpfr_t members and
 
2691
   mpfr_ubf_ptr to access the additional member _mpfr_zexp" may be ignored
 
2692
   if the union type is visible within the function (see ISO C99 6.5.2.3#5
 
2693
   and 6.5.2.3#8 for the example, this implementation being very similar to
 
2694
   the valid fragment of this example), which must be the case as the union
 
2695
   is declared globally. However, this seems to be buggy in GCC:
 
2696
 
 
2697
     https://gcc.gnu.org/bugzilla/show_bug.cgi?id=14319
 
2698
     https://gcc.gnu.org/bugzilla/show_bug.cgi?id=65892
 
2699
 
2690
2700
   Alternatively, GCC's may_alias attribute could conditionally be used
2691
2701
   on the __mpfr_ubf_struct and __mpfr_struct types (though it would be
2692
2702
   much stronger than needed since only these two types may alias each