From: Ian Lance Taylor <iant@golang.org>
To: gcc-patches <gcc-patches@gcc.gnu.org>,
gofrontend-dev <gofrontend-dev@googlegroups.com>
Subject: libgo patch committed: Use <stdbool.h> in runtime/runtime.h
Date: Mon, 29 Apr 2024 10:59:58 -0700 [thread overview]
Message-ID: <CAOyqgcUt8bFcPmwMHa5xiBUrmuw0_QgpNTBXc4LvnrpRqiE-qw@mail.gmail.com> (raw)
[-- Attachment #1: Type: text/plain, Size: 336 bytes --]
This libgo patch changes runtime/runtime.h to use the C99 <stdbool.h>
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
[-- Attachment #2: patch.txt --]
[-- Type: text/plain, Size: 1107 bytes --]
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 <complex.h>
#include <signal.h>
+#include <stdbool.h>
#include <stdint.h>
#include <stdio.h>
#include <stdlib.h>
@@ -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*),
reply other threads:[~2024-04-29 18:00 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=CAOyqgcUt8bFcPmwMHa5xiBUrmuw0_QgpNTBXc4LvnrpRqiE-qw@mail.gmail.com \
--to=iant@golang.org \
--cc=gcc-patches@gcc.gnu.org \
--cc=gofrontend-dev@googlegroups.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).