From patchwork Mon Apr 29 17:59:58 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ian Lance Taylor X-Patchwork-Id: 1929128 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@legolas.ozlabs.org Authentication-Results: legolas.ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=golang-org.20230601.gappssmtp.com header.i=@golang-org.20230601.gappssmtp.com header.a=rsa-sha256 header.s=20230601 header.b=0DxltlBk; 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 4VSrj22GkJz1ymX for ; Tue, 30 Apr 2024 04:00:36 +1000 (AEST) Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 5A5A6385842A for ; Mon, 29 Apr 2024 18:00:34 +0000 (GMT) X-Original-To: gcc-patches@gcc.gnu.org Delivered-To: gcc-patches@gcc.gnu.org Received: from mail-yb1-xb31.google.com (mail-yb1-xb31.google.com [IPv6:2607:f8b0:4864:20::b31]) by sourceware.org (Postfix) with ESMTPS id 722E63858D37 for ; Mon, 29 Apr 2024 18:00:11 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 722E63858D37 Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=golang.org Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=golang.org ARC-Filter: OpenARC Filter v1.0.0 sourceware.org 722E63858D37 Authentication-Results: server2.sourceware.org; arc=none smtp.remote-ip=2607:f8b0:4864:20::b31 ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1714413617; cv=none; b=HM0TSPzMXV3tvQbRxI4vzwtRbpkz2ulp6E9HC5CLb7dgQ4YeNDOlO1tvQX7U8tBvsBQaKkEmAqgR0CfXVs5m1v1jeNC7CqSYXy4q1QS6TBFluW8kaLBabTrx6X8S/qaxtDjbvEbtSJR6DKGJUscB60Bpayk6mykRoyuyQaDIfnM= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1714413617; c=relaxed/simple; bh=JwJSh5Tpe3hHTczqhwdWPllElovsomAkczvaQAAS0rE=; h=DKIM-Signature:MIME-Version:From:Date:Message-ID:Subject:To; b=njrpfZNMYp6rZhTpWxADFPTqNOrYB4tN5ztw+OS1RG8zmp0e4LSTD5En1ZNUosGXZ04xzaanxEUUEFGnlzdgdSDSlwsJJPDn2NHRGbWbEct4zMX+B41wSU9u8vsMKxkSa1/w+Nfhh3+1pdHmpsRjna1DIoucDY04NEbUjDNlXfg= ARC-Authentication-Results: i=1; server2.sourceware.org Received: by mail-yb1-xb31.google.com with SMTP id 3f1490d57ef6-de45f3f092bso5772873276.0 for ; Mon, 29 Apr 2024 11:00:11 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=golang-org.20230601.gappssmtp.com; s=20230601; t=1714413610; x=1715018410; darn=gcc.gnu.org; h=to:subject:message-id:date:from:mime-version:from:to:cc:subject :date:message-id:reply-to; bh=edRbafisI+K5Gh7sslqSCxRPYFO/klIsPD6yeEOGEw8=; b=0DxltlBk9Riq8i8PRtAPav8uRU0NcX1f+metH3z9uEV7525l/hjGivkme+/WBIzL0/ iepyAD/dEudCkjLCdEkbdfQuEOmSUlZ0QOIUxL3FuIT11lGXgBaD90UzeqOKSPpsxH0l rmhFUg2ELGcw4d0okDoEs0TNqXbYgxjrpet5q4d8dKUKVJziQyUm5Kh2mukdeT0H3hEC ud7dsb+qBgOhdwe0Q9dq7415BC8Cyp3bI1v/1TS0NsjHts7o8mL6t92/w7eLOWf+PTLC dsSKxBkiVUTLHQX+edUc0ilhiV8GQMIOK/a6q2gdHFR/m+odZNy0obZzBoo9jBLpDccp as0w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1714413610; x=1715018410; h=to:subject:message-id:date:from:mime-version:x-gm-message-state :from:to:cc:subject:date:message-id:reply-to; bh=edRbafisI+K5Gh7sslqSCxRPYFO/klIsPD6yeEOGEw8=; b=eGtsIPp6I7IVttQWc06TvlsHTt8W4D3XNw0VfiyIlroMuemFAbKK2GsN3DSPartmY3 XXaC8HFTSU9b5LUekqRuXGIr/QWxxAaa0llLuf7EaFydXMqqje35pk+c3tSt04Mf1p5u 7t2ZR1n4/f0cWAlTGfedS7iVtAYrPL/57+6qSzyz0T0tXzaoPCildIMSjPsCGL1XbaJM 0J9wzA9L5cZ1MCusboOcecd6Si2TPpH/6QWCqcJBZ4NYaYfkE0XsDZ2l5+0huncwV6O4 nNu+dL67mAY8wq69ceZMPo9QYt1Fh1dNzjnWQlWeWG9Hkgiugz7FfmbeJcuGD3dabtDw 5KoA== X-Gm-Message-State: AOJu0YxjrluyBqNbq79mElUrW3iqZClcajL+C1BwPa45u+Ovy689ZJd3 Ga4ymdMBfP50o19k3TVMBHBmo87DXzVATzDxrWT1p+3pgAlAVrMD4naeQ8vBEFNXJduj/EUuNpF 6BoGZEZTGVqrOiRS5Ovwnt1gy7Or4DPrI9IK8yNwfPDFDcGEvDYk= X-Google-Smtp-Source: AGHT+IH/p4LVVKWbbk1moD0AX3PzGTDspCYucttiXkd97V+SfA+ySOF+FSxPLkQo5b5+052SZNYpiDjj34kJ4DEpsR8= X-Received: by 2002:a25:b7c5:0:b0:de5:5878:a938 with SMTP id u5-20020a25b7c5000000b00de55878a938mr8126855ybj.10.1714413610068; Mon, 29 Apr 2024 11:00:10 -0700 (PDT) MIME-Version: 1.0 From: Ian Lance Taylor Date: Mon, 29 Apr 2024 10:59:58 -0700 Message-ID: Subject: libgo patch committed: Use in runtime/runtime.h To: gcc-patches , gofrontend-dev X-Spam-Status: No, score=-9.1 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, GIT_PATCH_0, RCVD_IN_DNSWL_NONE, SPF_HELO_NONE, SPF_PASS, 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 This libgo patch changes runtime/runtime.h to use the C99 header file rather than defining a bool type and true/false constants itself. C99 was a long time ago and in case this file is always compiled by the newly built GCC. This should fix GCC PR 114875. Bootstrapped on x86_64-pc-linux-gnu. Committed to mainline. Ian ef246d48fd487805f1c4181c7482545c54a4d4a9 diff --git a/gcc/go/gofrontend/MERGE b/gcc/go/gofrontend/MERGE index 50d430d5034..8a2810d5b2d 100644 --- a/gcc/go/gofrontend/MERGE +++ b/gcc/go/gofrontend/MERGE @@ -1,4 +1,4 @@ -98e92493db2ab7857a5934a950a830fc1f95a4e5 +1f0c8364cd35026a647aa4e66ee4d8563c8a5d27 The first line of this file holds the git revision number of the last merge done from the gofrontend repository. diff --git a/libgo/runtime/runtime.h b/libgo/runtime/runtime.h index 699770d53ad..da31e11bb77 100644 --- a/libgo/runtime/runtime.h +++ b/libgo/runtime/runtime.h @@ -7,6 +7,7 @@ #include "go-assert.h" #include #include +#include #include #include #include @@ -51,7 +52,6 @@ typedef uintptr uintreg; /* Defined types. */ -typedef _Bool bool; typedef uint8 byte; typedef struct g G; typedef struct mutex Lock; @@ -114,11 +114,6 @@ extern M* runtime_m(void); extern G* runtime_g(void) __asm__(GOSYM_PREFIX "runtime.getg"); -enum -{ - true = 1, - false = 0, -}; enum { PtrSize = sizeof(void*),