From patchwork Thu Oct 17 20:15:52 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Joseph Myers X-Patchwork-Id: 1998758 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@legolas.ozlabs.org Authentication-Results: legolas.ozlabs.org; dkim=pass (1024-bit key; unprotected) header.d=redhat.com header.i=@redhat.com header.a=rsa-sha256 header.s=mimecast20190719 header.b=JMbLF37S; dkim-atps=neutral Authentication-Results: legolas.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=gcc.gnu.org (client-ip=2620:52:3:1:0:246e:9693:128c; helo=server2.sourceware.org; envelope-from=gcc-patches-bounces~incoming=patchwork.ozlabs.org@gcc.gnu.org; receiver=patchwork.ozlabs.org) Received: from server2.sourceware.org (server2.sourceware.org [IPv6:2620:52:3:1:0:246e:9693:128c]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (secp384r1) server-digest SHA384) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4XTzhS2Kg6z1xw2 for ; Fri, 18 Oct 2024 07:19:36 +1100 (AEDT) Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 802473858C48 for ; Thu, 17 Oct 2024 20:19:34 +0000 (GMT) X-Original-To: gcc-patches@gcc.gnu.org Delivered-To: gcc-patches@gcc.gnu.org Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) by sourceware.org (Postfix) with ESMTP id C1C7A3858D20 for ; Thu, 17 Oct 2024 20:19:14 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org C1C7A3858D20 Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=redhat.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=redhat.com ARC-Filter: OpenARC Filter v1.0.0 sourceware.org C1C7A3858D20 Authentication-Results: server2.sourceware.org; arc=none smtp.remote-ip=170.10.129.124 ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1729196356; cv=none; b=kdr6J8D9TkvImJvjQbCjhfB1vT7cJDj1eePxFNO1Ssrlo8jEL+HH6+rWDO2tvvysBsphfP7hUOwDlB2gu0xaTXqOXlLZyihF7d6ne3nP6KjCH+Ainf+A2OnNeUh5x/jgjpUQyu3wK0cggvKHqSgNleayCsb2TTos+Bz0FPoCLPo= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1729196356; c=relaxed/simple; bh=0hesEZiCr/jlQGuf1swyEkiTi8DKVgTlejuPHM0fRVc=; h=DKIM-Signature:Date:From:To:Subject:Message-ID:MIME-Version; b=FBrXJ4KCNrjlU9FvDJfHBlglKOfavqJcncoIV/p8gYFbzayx3IdTn5VkKb4n6cleHqANvBXx2wRjQFgS3DwC3/reABt07g64eA57jqi7GoU9BePULOyVWZSOTkH5y1cXtGiOC7IKmPCxV6I7kg1KfM/gQBJkVjcFWF6y+mtX2wc= ARC-Authentication-Results: i=1; server2.sourceware.org DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1729196354; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type; bh=L/MSicO8tPU1HKPPM7KlxglSlSBXBqnWW1h4OYm+eQU=; b=JMbLF37S4b4Fcuz7sPTZSLHTRUCizBsVM9ubIzZTMtlIe9xGZRNTPjaw1iJtOQi0x7s65O n7LZderuWCDlz8dCi34Q1U8gFZ+ZnzmyjBNMGISZSZ17wDJPoLVl9GAcMxlrjDfWP+0S4h S2K51bNWbPtZfVJIzekwalSicrzs7Rw= Received: from mail-wr1-f70.google.com (mail-wr1-f70.google.com [209.85.221.70]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-609-RbiU2iwuOcWT9k5bdQJd5Q-1; Thu, 17 Oct 2024 16:19:11 -0400 X-MC-Unique: RbiU2iwuOcWT9k5bdQJd5Q-1 Received: by mail-wr1-f70.google.com with SMTP id ffacd0b85a97d-37d537292d7so920146f8f.2 for ; Thu, 17 Oct 2024 13:19:11 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1729196350; x=1729801150; h=mime-version:message-id:subject:to:from:date:x-gm-message-state :from:to:cc:subject:date:message-id:reply-to; bh=L/MSicO8tPU1HKPPM7KlxglSlSBXBqnWW1h4OYm+eQU=; b=H+eXbZcgAfpLFYv0Lw6lsdPI+6JE97Z6+3v9PnoL78l9HpZ2IStNL5sl0Jpdl3klzu GFn9h47la4E0lK7HAw9u3DkWQQcESUEABFWbGIJkPXnFSV0zXRlFtJ6rMO/W4gF/lC6o JTcgv/sn0g2KkSOhIKLRO36aPmUrtWHOQdRFAU8AItKVbxiZD54+BeVngcee4ZFzKml2 QbMMWk6h2nVdtQtzbZXWENjxDwyWO6TKI6Q624SA54eCxPgb/f7hWQAxrgei7Y688r4w UZrO6r+DD2cW6XJdTvPcZzXfNqLe7OAGPsatdb2xSGfhTOCMNKQVgD6WtHlVHYglsWvC a5/w== X-Gm-Message-State: AOJu0YwDK2I6jvVN2t4ziGBlj6HKCMNgSmfzvMKKDPoWq+fnOQgKJkTR ClmOSZgJkJ2Rc0xBvEWGSFhXmnIumqJb9qx59nWAPI1rv6AXWeiIkWyu8VdJhT68BkKBkZVhOil ylE1k7RY+GsCbM4wJpm5U92RqRAkZ81oC801cpYxalMdpMUI/oRRg6VYgE3uiG1yfZTL8vFT4ED ZC3q6OjFlPHjwzHbH6ZqjNZkWRjdwbBWaAvmXZCV8= X-Received: by 2002:adf:8b96:0:b0:37d:4376:6e1d with SMTP id ffacd0b85a97d-37eab755c62mr121914f8f.41.1729196349739; Thu, 17 Oct 2024 13:19:09 -0700 (PDT) X-Google-Smtp-Source: AGHT+IFjRo9o2DJ/L/z0XsEAV9Nf8iqYgK6p2zKxN6mJqZLY6VdnbVEfglhPlglY2PuOV8km8XWBow== X-Received: by 2002:adf:8b96:0:b0:37d:4376:6e1d with SMTP id ffacd0b85a97d-37eab755c62mr121895f8f.41.1729196349239; Thu, 17 Oct 2024 13:19:09 -0700 (PDT) Received: from digraph.polyomino.org.uk (digraph.polyomino.org.uk. [2001:8b0:bf73:93f7::51bb:e332]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-37d7fa9053csm8251618f8f.59.2024.10.17.13.19.08 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 17 Oct 2024 13:19:08 -0700 (PDT) Received: from jsm28 (helo=localhost) by digraph.polyomino.org.uk with local-esmtp (Exim 4.97) (envelope-from ) id 1t1WuW-00000000BMR-1Ct2; Thu, 17 Oct 2024 20:15:52 +0000 Date: Thu, 17 Oct 2024 20:15:52 +0000 (UTC) From: Joseph Myers To: gcc-patches@gcc.gnu.org, iant@golang.org Subject: libgo: fix for C23 nullptr keyword Message-ID: <5400ca56-94f0-44ce-39a2-f340135345d5@redhat.com> MIME-Version: 1.0 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com X-Spam-Status: No, score=-9.0 required=5.0 tests=BAYES_00, DKIMWL_WL_HIGH, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, GIT_PATCH_0, RCVD_IN_DNSWL_NONE, RCVD_IN_MSPIKE_H3, RCVD_IN_MSPIKE_WL, SPF_HELO_NONE, SPF_NONE, TXREP autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org X-BeenThere: gcc-patches@gcc.gnu.org X-Mailman-Version: 2.1.30 Precedence: list List-Id: Gcc-patches mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: gcc-patches-bounces~incoming=patchwork.ozlabs.org@gcc.gnu.org Making GCC default to -std=gnu23 for C code produces Go test failures because of C code used by Go that uses a variable called nullptr, which is a keyword in C23. I've submitted this fix upstream at https://github.com/golang/go/pull/69927 using the GitHub mirror workflow. Ian, once some form of such a fix is upstream, could you backport it to GCC's libgo? diff --git a/libgo/go/runtime/testdata/testprogcgo/threadprof.go b/libgo/go/runtime/testdata/testprogcgo/threadprof.go index d62d4b4be83..f61c51b8b62 100644 --- a/libgo/go/runtime/testdata/testprogcgo/threadprof.go +++ b/libgo/go/runtime/testdata/testprogcgo/threadprof.go @@ -36,10 +36,10 @@ __attribute__((constructor)) void issue9456() { } } -void **nullptr; +void **nullpointer; void *crash(void *p) { - *nullptr = p; + *nullpointer = p; return 0; }