public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug go/114875] New: runtime/runtime.h
@ 2024-04-28 2:09 jeffrey.cliff at gmail dot com
2024-04-28 2:12 ` [Bug go/114875] runtime/runtime.h pinskia at gcc dot gnu.org
` (5 more replies)
0 siblings, 6 replies; 7+ messages in thread
From: jeffrey.cliff at gmail dot com @ 2024-04-28 2:09 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=114875
Bug ID: 114875
Summary: runtime/runtime.h
Product: gcc
Version: 14.0
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: go
Assignee: ian at airs dot com
Reporter: jeffrey.cliff at gmail dot com
Target Milestone: ---
^ permalink raw reply [flat|nested] 7+ messages in thread
* [Bug go/114875] runtime/runtime.h
2024-04-28 2:09 [Bug go/114875] New: runtime/runtime.h jeffrey.cliff at gmail dot com
@ 2024-04-28 2:12 ` pinskia at gcc dot gnu.org
2024-04-28 4:34 ` jeffrey.cliff at gmail dot com
` (4 subsequent siblings)
5 siblings, 0 replies; 7+ messages in thread
From: pinskia at gcc dot gnu.org @ 2024-04-28 2:12 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=114875
Andrew Pinski <pinskia at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|UNCONFIRMED |WAITING
Ever confirmed|0 |1
Last reconfirmed| |2024-04-28
--- Comment #1 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
There is no comment on what is the issue here ...
^ permalink raw reply [flat|nested] 7+ messages in thread
* [Bug go/114875] runtime/runtime.h
2024-04-28 2:09 [Bug go/114875] New: runtime/runtime.h jeffrey.cliff at gmail dot com
2024-04-28 2:12 ` [Bug go/114875] runtime/runtime.h pinskia at gcc dot gnu.org
@ 2024-04-28 4:34 ` jeffrey.cliff at gmail dot com
2024-04-28 4:44 ` [Bug go/114875] runtime/runtime.h should be updated to compile under C23 pinskia at gcc dot gnu.org
` (3 subsequent siblings)
5 siblings, 0 replies; 7+ messages in thread
From: jeffrey.cliff at gmail dot com @ 2024-04-28 4:34 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=114875
--- Comment #2 from jeffrey.cliff at gmail dot com ---
whoops, accidentally hit submit before I had all the details
tl;dr at least in gcc 14.1 [but probably elsewhere]
in
libgo/runtime/runtime.h
defines an enum of
enum
{
true = 1,
false = 0,
};
which means that it doesn't compile under -std=gnu2x similar to
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=114216
and more importantly - it's a header, which means *any code that uses it* also
won't build.
it's an easy enough fix
add an if guard
#if __STDC_VERSION__ <= 201710L
enum
{
true = 1,
false = 0,
};
#endif
this allows for runtime/runtime.h to be compliant with c23 and previous
versions.
testing the fix now
^ permalink raw reply [flat|nested] 7+ messages in thread
* [Bug go/114875] runtime/runtime.h should be updated to compile under C23
2024-04-28 2:09 [Bug go/114875] New: runtime/runtime.h jeffrey.cliff at gmail dot com
2024-04-28 2:12 ` [Bug go/114875] runtime/runtime.h pinskia at gcc dot gnu.org
2024-04-28 4:34 ` jeffrey.cliff at gmail dot com
@ 2024-04-28 4:44 ` pinskia at gcc dot gnu.org
2024-04-28 4:46 ` pinskia at gcc dot gnu.org
` (2 subsequent siblings)
5 siblings, 0 replies; 7+ messages in thread
From: pinskia at gcc dot gnu.org @ 2024-04-28 4:44 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=114875
Andrew Pinski <pinskia at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Severity|normal |enhancement
Status|WAITING |NEW
Summary|runtime/runtime.h |runtime/runtime.h should be
| |updated to compile under
| |C23
--- Comment #3 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
Considering this file is written in C11 (or C17), the changes does not need to
happen right away.
^ permalink raw reply [flat|nested] 7+ messages in thread
* [Bug go/114875] runtime/runtime.h should be updated to compile under C23
2024-04-28 2:09 [Bug go/114875] New: runtime/runtime.h jeffrey.cliff at gmail dot com
` (2 preceding siblings ...)
2024-04-28 4:44 ` [Bug go/114875] runtime/runtime.h should be updated to compile under C23 pinskia at gcc dot gnu.org
@ 2024-04-28 4:46 ` pinskia at gcc dot gnu.org
2024-04-28 4:48 ` pinskia at gcc dot gnu.org
2024-04-29 18:35 ` ian at airs dot com
5 siblings, 0 replies; 7+ messages in thread
From: pinskia at gcc dot gnu.org @ 2024-04-28 4:46 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=114875
--- Comment #4 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
(In reply to jeffrey.cliff from comment #2)
> and more importantly - it's a header, which means *any code that uses it*
> also won't build.
Considering it is an internal header to libgo and not installed, it just means
any code that uses it must be written in C11/C17 rather than C23.
^ permalink raw reply [flat|nested] 7+ messages in thread
* [Bug go/114875] runtime/runtime.h should be updated to compile under C23
2024-04-28 2:09 [Bug go/114875] New: runtime/runtime.h jeffrey.cliff at gmail dot com
` (3 preceding siblings ...)
2024-04-28 4:46 ` pinskia at gcc dot gnu.org
@ 2024-04-28 4:48 ` pinskia at gcc dot gnu.org
2024-04-29 18:35 ` ian at airs dot com
5 siblings, 0 replies; 7+ messages in thread
From: pinskia at gcc dot gnu.org @ 2024-04-28 4:48 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=114875
--- Comment #5 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
Also it is not just true/false.
It is:
typedef _Bool bool;
The rest looks ok too.
^ permalink raw reply [flat|nested] 7+ messages in thread
* [Bug go/114875] runtime/runtime.h should be updated to compile under C23
2024-04-28 2:09 [Bug go/114875] New: runtime/runtime.h jeffrey.cliff at gmail dot com
` (4 preceding siblings ...)
2024-04-28 4:48 ` pinskia at gcc dot gnu.org
@ 2024-04-29 18:35 ` ian at airs dot com
5 siblings, 0 replies; 7+ messages in thread
From: ian at airs dot com @ 2024-04-29 18:35 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=114875
Ian Lance Taylor <ian at airs dot com> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|NEW |RESOLVED
Resolution|--- |FIXED
--- Comment #6 from Ian Lance Taylor <ian at airs dot com> ---
Should be fixed on tip by 678dc5e85053f1a1ca76997eec95ba8823bb6830. Thanks.
^ permalink raw reply [flat|nested] 7+ messages in thread
end of thread, other threads:[~2024-04-29 18:35 UTC | newest]
Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-04-28 2:09 [Bug go/114875] New: runtime/runtime.h jeffrey.cliff at gmail dot com
2024-04-28 2:12 ` [Bug go/114875] runtime/runtime.h pinskia at gcc dot gnu.org
2024-04-28 4:34 ` jeffrey.cliff at gmail dot com
2024-04-28 4:44 ` [Bug go/114875] runtime/runtime.h should be updated to compile under C23 pinskia at gcc dot gnu.org
2024-04-28 4:46 ` pinskia at gcc dot gnu.org
2024-04-28 4:48 ` pinskia at gcc dot gnu.org
2024-04-29 18:35 ` ian at airs dot com
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).