From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 5C3E0385841E; Wed, 1 May 2024 15:44:26 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 5C3E0385841E DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1714578266; bh=UEFGjFD54wDCbP1G5Bs6oCo5+XJ4azNOIt6P7PE4iFY=; h=From:To:Subject:Date:In-Reply-To:References:From; b=K/z0vKNSyNwuVwgi5zzJudvDZYR9j5BxU0YwL95IzjyPx7HQDRCWYfwP5q3FXEWMm rYaeVMaG/eRX4Z/uNq1IsfF2v8iPUKDavxtDvLBNb9LVTjyHYfPjaGXktCAXFpT61s rOKpgwYQcEtO6xlcHr3/pPYwnWjQOPefWPkPW8dQ= From: "cvs-commit at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug c++/113706] c-c++-common/pr103798-2.c FAILs as C++ Date: Wed, 01 May 2024 15:44:24 +0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: c++ X-Bugzilla-Version: 14.0 X-Bugzilla-Keywords: testsuite-fail X-Bugzilla-Severity: normal X-Bugzilla-Who: cvs-commit at gcc dot gnu.org X-Bugzilla-Status: ASSIGNED X-Bugzilla-Resolution: X-Bugzilla-Priority: P3 X-Bugzilla-Assigned-To: jason at gcc dot gnu.org X-Bugzilla-Target-Milestone: 15.0 X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: Message-ID: In-Reply-To: References: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Bugzilla-URL: http://gcc.gnu.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 List-Id: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D113706 --- Comment #12 from GCC Commits --- The trunk branch has been updated by Jason Merrill : https://gcc.gnu.org/g:c3bc2787b8beb7aae67fdf2a7f7271a9a4edca7c commit r15-91-gc3bc2787b8beb7aae67fdf2a7f7271a9a4edca7c Author: Jason Merrill Date: Mon Feb 12 18:24:00 2024 -0500 c++: const void* memchr [PR113706] The C++ standard specifies that the functions have const and non-const overloads, unlike C's single function with const argument and non-const return. Many systems don't actually implement this, but only= add an overload with non-const argument, so both end up having non-const return. Solaris does what the standard says, but we were penalizing = it by not recognizing the const overload as the built-in memchr. PR c++/113706 gcc/cp/ChangeLog: * decl.cc (decls_match): Handle memchr return type being const-qualified. gcc/testsuite/ChangeLog: * g++.dg/opt/const-builtin1.C: New test. * c-c++-common/pr103798-2.c: Remove xfail.=