https://gcc.gnu.org/bugzilla/show_bug.cgi?id=126824

            Bug ID: 126824
           Summary: Incorrect rounding behavior documented for __trunc*
                    routines
           Product: gcc
           Version: 17.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: libgcc
          Assignee: unassigned at gcc dot gnu.org
          Reporter: evonatarius at gmail dot com
  Target Milestone: ---

The GCC internals manual documents the following functions:

__truncxfdf2
__trunctfdf2
__truncxfsf2
__trunctfsf2
__truncdfsf2

as follows:

> These functions truncate `a` to the narrower mode of their return type, 
> rounding toward zero.

This statement doesn't match the current libgcc implementation. The rounding
behavior of these functions depends on the target configuration and, on some
targets, the active rounding mode.

This report concerns documentation only.

Reply via email to