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

--- Comment #8 from GCC Commits <cvs-commit at gcc dot gnu.org> ---
The master branch has been updated by Rainer Orth <r...@gcc.gnu.org>:

https://gcc.gnu.org/g:ab0c2c367a87b03f38a486a118b89335837619dc

commit r14-8971-gab0c2c367a87b03f38a486a118b89335837619dc
Author: Rainer Orth <r...@cebitec.uni-bielefeld.de>
Date:   Wed Feb 14 09:25:03 2024 +0100

    testsuite: xfail c-c++-common/pr103798-2.c for C++ on Solaris [PR113706]

    c-c++-common/pr103798-2.c FAILs on Solaris when compiled as C++:

    FAIL: c-c++-common/pr103798-2.c  -std=gnu++14  scan-assembler-not memchr
    FAIL: c-c++-common/pr103798-2.c  -std=gnu++17  scan-assembler-not memchr
    FAIL: c-c++-common/pr103798-2.c  -std=gnu++20  scan-assembler-not memchr
    FAIL: c-c++-common/pr103798-2.c  -std=gnu++98  scan-assembler-not memchr

    As Jason analyzed, Solaris <string.h> declares memchr for C++ as returning
    const void * as specified by the C++ standard, while gcc expects the return
    type to be void * like in C.

    So this patch xfails the test for C++ on Solaris.

    Tested on sparc-sun-solaris2.11 and x86_64-pc-linux-gnu.

    2024-02-12  Rainer Orth  <r...@cebitec.uni-bielefeld.de>

            gcc/testsuite:
            PR c++/113706
            * c-c++-common/pr103798-2.c (scan-assembler-not): xfail for C++ on
            Solaris.

Reply via email to