This is the mail archive of the glibc-bugs@sourceware.org mailing list for the glibc project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug math/23277] nan function should not have const attribute


https://sourceware.org/bugzilla/show_bug.cgi?id=23277

--- Comment #1 from cvs-commit at gcc dot gnu.org <cvs-commit at gcc dot gnu.org> ---
This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "GNU C Library master sources".

The branch, master has been updated
       via  48b12ed54ceb605ec3566249c0387612fd9c0ced (commit)
      from  cb8f6affed52d81819037b2f5d6f3a089abb8811 (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
https://sourceware.org/git/gitweb.cgi?p=glibc.git;h=48b12ed54ceb605ec3566249c0387612fd9c0ced

commit 48b12ed54ceb605ec3566249c0387612fd9c0ced
Author: Joseph Myers <joseph@codesourcery.com>
Date:   Tue Jun 12 16:57:26 2018 +0000

    Do not use const attribute for nan functions (bug 23277).

    As in https://gcc.gnu.org/bugzilla/show_bug.cgi?id=86113 for
    __builtin_nan, bits/mathcalls.h wrongly declares the nan function with
    the __const__ attribute.  Because the function reads memory pointed to
    by an argument, it's only pure, not const.  This patch removes the
    incorrect attribute and adds a testcase for the bug.  No __pure__
    attribute is added to replace the incorrect __const__ one, since that
    would introduce problems when using GCC versions that have the
    incorrect built-in __const__ attribute and warn for the combination of
    those two attributes.

    Tested for x86_64.

        [BZ #23277]
        * math/bits/mathcalls.h [__USE_ISOC99] (nan): Do not use __const__
        attribute.
        * math/test-nan-const.c: New file.
        * math/Makefile (tests): Add test-nan-const.
        (CFLAGS-test-nan-const.c): New variable.

-----------------------------------------------------------------------

Summary of changes:
 ChangeLog                                         |    9 +++++++++
 math/Makefile                                     |    4 +++-
 math/bits/mathcalls.h                             |    2 +-
 wcsmbs/test-char-types.c => math/test-nan-const.c |   15 ++++++++-------
 4 files changed, 21 insertions(+), 9 deletions(-)
 copy wcsmbs/test-char-types.c => math/test-nan-const.c (77%)

-- 
You are receiving this mail because:
You are on the CC list for the bug.

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