public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug libstdc++/113283] New: missing C++26 freestanding headers.
@ 2024-01-08 21:40 unlvsur at live dot com
  2024-01-08 22:57 ` [Bug libstdc++/113283] " redi at gcc dot gnu.org
                   ` (11 more replies)
  0 siblings, 12 replies; 13+ messages in thread
From: unlvsur at live dot com @ 2024-01-08 21:40 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=113283

            Bug ID: 113283
           Summary: missing C++26 freestanding headers.
           Product: gcc
           Version: 14.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: libstdc++
          Assignee: unassigned at gcc dot gnu.org
          Reporter: unlvsur at live dot com
  Target Milestone: ---

C++26 adds things like cerrno to be freestanding. I do not know how you are
going to support that.

libcxx wants to forward the errno.h to the compiler side.

^ permalink raw reply	[flat|nested] 13+ messages in thread

* [Bug libstdc++/113283] missing C++26 freestanding headers.
  2024-01-08 21:40 [Bug libstdc++/113283] New: missing C++26 freestanding headers unlvsur at live dot com
@ 2024-01-08 22:57 ` redi at gcc dot gnu.org
  2024-01-08 23:40 ` unlvsur at live dot com
                   ` (10 subsequent siblings)
  11 siblings, 0 replies; 13+ messages in thread
From: redi at gcc dot gnu.org @ 2024-01-08 22:57 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=113283

Jonathan Wakely <redi at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Blocks|                            |110339

--- Comment #1 from Jonathan Wakely <redi at gcc dot gnu.org> ---
We can just make up our own numbers, since we won't be getting errno values
from the OS.


Referenced Bugs:

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=110339
[Bug 110339] Implement C++26 library features

^ permalink raw reply	[flat|nested] 13+ messages in thread

* [Bug libstdc++/113283] missing C++26 freestanding headers.
  2024-01-08 21:40 [Bug libstdc++/113283] New: missing C++26 freestanding headers unlvsur at live dot com
  2024-01-08 22:57 ` [Bug libstdc++/113283] " redi at gcc dot gnu.org
@ 2024-01-08 23:40 ` unlvsur at live dot com
  2024-01-08 23:44 ` unlvsur at live dot com
                   ` (9 subsequent siblings)
  11 siblings, 0 replies; 13+ messages in thread
From: unlvsur at live dot com @ 2024-01-08 23:40 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=113283

--- Comment #2 from cqwrteur <unlvsur at live dot com> ---
(In reply to Jonathan Wakely from comment #1)
> We can just make up our own numbers, since we won't be getting errno values
> from the OS.

i would like to make libcxx to have the same numbers as libstdc++.

My proposed patches before to libcxx was using linux's errno numbers as the
fallback if __has_include_next(<errno.h>) does not exist.

What do you think?

^ permalink raw reply	[flat|nested] 13+ messages in thread

* [Bug libstdc++/113283] missing C++26 freestanding headers.
  2024-01-08 21:40 [Bug libstdc++/113283] New: missing C++26 freestanding headers unlvsur at live dot com
  2024-01-08 22:57 ` [Bug libstdc++/113283] " redi at gcc dot gnu.org
  2024-01-08 23:40 ` unlvsur at live dot com
@ 2024-01-08 23:44 ` unlvsur at live dot com
  2024-01-09  0:13 ` unlvsur at live dot com
                   ` (8 subsequent siblings)
  11 siblings, 0 replies; 13+ messages in thread
From: unlvsur at live dot com @ 2024-01-08 23:44 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=113283

--- Comment #3 from cqwrteur <unlvsur at live dot com> ---
I do not see errno.h in freestanding C. Am i correct?

Should compiler provide an errno.h?

https://en.cppreference.com/w/c/language/conformance

^ permalink raw reply	[flat|nested] 13+ messages in thread

* [Bug libstdc++/113283] missing C++26 freestanding headers.
  2024-01-08 21:40 [Bug libstdc++/113283] New: missing C++26 freestanding headers unlvsur at live dot com
                   ` (2 preceding siblings ...)
  2024-01-08 23:44 ` unlvsur at live dot com
@ 2024-01-09  0:13 ` unlvsur at live dot com
  2024-01-09  3:01 ` pinskia at gcc dot gnu.org
                   ` (7 subsequent siblings)
  11 siblings, 0 replies; 13+ messages in thread
From: unlvsur at live dot com @ 2024-01-09  0:13 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=113283

--- Comment #4 from cqwrteur <unlvsur at live dot com> ---
Created attachment 57012
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=57012&action=edit
Proposed errno numbers

These numbers come from Linux Kernel Headers and redhat Newlib-Cygwin.

I guess these numbers would be ok and commonly agreed.

If you think this is ok, i will start working on clang and libcxx to use these
numbers.

^ permalink raw reply	[flat|nested] 13+ messages in thread

* [Bug libstdc++/113283] missing C++26 freestanding headers.
  2024-01-08 21:40 [Bug libstdc++/113283] New: missing C++26 freestanding headers unlvsur at live dot com
                   ` (3 preceding siblings ...)
  2024-01-09  0:13 ` unlvsur at live dot com
@ 2024-01-09  3:01 ` pinskia at gcc dot gnu.org
  2024-01-09 12:18 ` arsen at gcc dot gnu.org
                   ` (6 subsequent siblings)
  11 siblings, 0 replies; 13+ messages in thread
From: pinskia at gcc dot gnu.org @ 2024-01-09  3:01 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=113283

Andrew Pinski <pinskia at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Severity|normal                      |enhancement

^ permalink raw reply	[flat|nested] 13+ messages in thread

* [Bug libstdc++/113283] missing C++26 freestanding headers.
  2024-01-08 21:40 [Bug libstdc++/113283] New: missing C++26 freestanding headers unlvsur at live dot com
                   ` (4 preceding siblings ...)
  2024-01-09  3:01 ` pinskia at gcc dot gnu.org
@ 2024-01-09 12:18 ` arsen at gcc dot gnu.org
  2024-01-09 13:30 ` unlvsur at live dot com
                   ` (5 subsequent siblings)
  11 siblings, 0 replies; 13+ messages in thread
From: arsen at gcc dot gnu.org @ 2024-01-09 12:18 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=113283

Arsen Arsenović <arsen at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |arsen at gcc dot gnu.org

--- Comment #5 from Arsen Arsenović <arsen at gcc dot gnu.org> ---
C does not have a freestanding error.h, indeed.

We were considering making up some numbers in a high-up range so that we can
provide some non-OS-provided errors that the standard requires, too

why do you think having the same numbers for both libraries in freestanding
would be beneficial?  this seems odd to me

^ permalink raw reply	[flat|nested] 13+ messages in thread

* [Bug libstdc++/113283] missing C++26 freestanding headers.
  2024-01-08 21:40 [Bug libstdc++/113283] New: missing C++26 freestanding headers unlvsur at live dot com
                   ` (5 preceding siblings ...)
  2024-01-09 12:18 ` arsen at gcc dot gnu.org
@ 2024-01-09 13:30 ` unlvsur at live dot com
  2024-01-09 13:56 ` unlvsur at live dot com
                   ` (4 subsequent siblings)
  11 siblings, 0 replies; 13+ messages in thread
From: unlvsur at live dot com @ 2024-01-09 13:30 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=113283

--- Comment #6 from cqwrteur <unlvsur at live dot com> ---
if someone writes an operating system or libc,he can ensure the abi being the
same.

Get Outlook for Android<https://aka.ms/AAb9ysg>
________________________________
From: arsen at gcc dot gnu.org <gcc-bugzilla@gcc.gnu.org>
Sent: Tuesday, January 9, 2024 7:18:46 AM
To: unlvsur@live.com <unlvsur@live.com>
Subject: [Bug libstdc++/113283] missing C++26 freestanding headers.

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=113283

Arsen Arsenović <arsen at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |arsen at gcc dot gnu.org

--- Comment #5 from Arsen Arsenović <arsen at gcc dot gnu.org> ---
C does not have a freestanding error.h, indeed.

We were considering making up some numbers in a high-up range so that we can
provide some non-OS-provided errors that the standard requires, too

why do you think having the same numbers for both libraries in freestanding
would be beneficial?  this seems odd to me

--
You are receiving this mail because:
You reported the bug.
You are on the CC list for the bug.

^ permalink raw reply	[flat|nested] 13+ messages in thread

* [Bug libstdc++/113283] missing C++26 freestanding headers.
  2024-01-08 21:40 [Bug libstdc++/113283] New: missing C++26 freestanding headers unlvsur at live dot com
                   ` (6 preceding siblings ...)
  2024-01-09 13:30 ` unlvsur at live dot com
@ 2024-01-09 13:56 ` unlvsur at live dot com
  2024-01-09 19:15 ` cjdb.ns at gmail dot com
                   ` (3 subsequent siblings)
  11 siblings, 0 replies; 13+ messages in thread
From: unlvsur at live dot com @ 2024-01-09 13:56 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=113283

--- Comment #7 from cqwrteur <unlvsur at live dot com> ---
(In reply to Arsen Arsenović from comment #5)
> C does not have a freestanding error.h, indeed.
> 
> We were considering making up some numbers in a high-up range so that we can
> provide some non-OS-provided errors that the standard requires, too
> 
> why do you think having the same numbers for both libraries in freestanding
> would be beneficial?  this seems odd to me

Whatever, i will make clang/libc++ be compatible to gcc/libstdc++ here. The
LLVM folks wants to put errno.h into the compiler side as an extension for a
freestanding C header.

^ permalink raw reply	[flat|nested] 13+ messages in thread

* [Bug libstdc++/113283] missing C++26 freestanding headers.
  2024-01-08 21:40 [Bug libstdc++/113283] New: missing C++26 freestanding headers unlvsur at live dot com
                   ` (7 preceding siblings ...)
  2024-01-09 13:56 ` unlvsur at live dot com
@ 2024-01-09 19:15 ` cjdb.ns at gmail dot com
  2024-01-10  8:50 ` arsen at gcc dot gnu.org
                   ` (2 subsequent siblings)
  11 siblings, 0 replies; 13+ messages in thread
From: cjdb.ns at gmail dot com @ 2024-01-09 19:15 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=113283

Christopher Di Bella <cjdb.ns at gmail dot com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |cjdb.ns at gmail dot com

--- Comment #8 from Christopher Di Bella <cjdb.ns at gmail dot com> ---
I briefly suggested moving `<errno.h>` into Clang like `<stddef.h>` is, but
nothing concrete was ever put into place. As it stands, I do not expect this to
be actioned.

For folks who are interested in what LLVM folks have discussed, please see the
relevant [GitHub issue](https://github.com/llvm/llvm-project/issues/77373).

^ permalink raw reply	[flat|nested] 13+ messages in thread

* [Bug libstdc++/113283] missing C++26 freestanding headers.
  2024-01-08 21:40 [Bug libstdc++/113283] New: missing C++26 freestanding headers unlvsur at live dot com
                   ` (8 preceding siblings ...)
  2024-01-09 19:15 ` cjdb.ns at gmail dot com
@ 2024-01-10  8:50 ` arsen at gcc dot gnu.org
  2024-01-10 13:38 ` unlvsur at live dot com
  2024-01-14 16:13 ` arsen at gcc dot gnu.org
  11 siblings, 0 replies; 13+ messages in thread
From: arsen at gcc dot gnu.org @ 2024-01-10  8:50 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=113283

--- Comment #9 from Arsen Arsenović <arsen at gcc dot gnu.org> ---
(In reply to cqwrteur from comment #6)
> if someone writes an operating system or libc,he can ensure the abi being
> the same.

that's a job of theirs.  they can and should add OS defines for their OS.

^ permalink raw reply	[flat|nested] 13+ messages in thread

* [Bug libstdc++/113283] missing C++26 freestanding headers.
  2024-01-08 21:40 [Bug libstdc++/113283] New: missing C++26 freestanding headers unlvsur at live dot com
                   ` (9 preceding siblings ...)
  2024-01-10  8:50 ` arsen at gcc dot gnu.org
@ 2024-01-10 13:38 ` unlvsur at live dot com
  2024-01-14 16:13 ` arsen at gcc dot gnu.org
  11 siblings, 0 replies; 13+ messages in thread
From: unlvsur at live dot com @ 2024-01-10 13:38 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=113283

--- Comment #10 from cqwrteur <unlvsur at live dot com> ---
also. how do deal with other headers. like cstdlib which C++26 requires qsort
to be freestanding.

^ permalink raw reply	[flat|nested] 13+ messages in thread

* [Bug libstdc++/113283] missing C++26 freestanding headers.
  2024-01-08 21:40 [Bug libstdc++/113283] New: missing C++26 freestanding headers unlvsur at live dot com
                   ` (10 preceding siblings ...)
  2024-01-10 13:38 ` unlvsur at live dot com
@ 2024-01-14 16:13 ` arsen at gcc dot gnu.org
  11 siblings, 0 replies; 13+ messages in thread
From: arsen at gcc dot gnu.org @ 2024-01-14 16:13 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=113283

--- Comment #11 from Arsen Arsenović <arsen at gcc dot gnu.org> ---
could be implemented in libstdc++ when no libc impl is present

^ permalink raw reply	[flat|nested] 13+ messages in thread

end of thread, other threads:[~2024-01-14 16:13 UTC | newest]

Thread overview: 13+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-01-08 21:40 [Bug libstdc++/113283] New: missing C++26 freestanding headers unlvsur at live dot com
2024-01-08 22:57 ` [Bug libstdc++/113283] " redi at gcc dot gnu.org
2024-01-08 23:40 ` unlvsur at live dot com
2024-01-08 23:44 ` unlvsur at live dot com
2024-01-09  0:13 ` unlvsur at live dot com
2024-01-09  3:01 ` pinskia at gcc dot gnu.org
2024-01-09 12:18 ` arsen at gcc dot gnu.org
2024-01-09 13:30 ` unlvsur at live dot com
2024-01-09 13:56 ` unlvsur at live dot com
2024-01-09 19:15 ` cjdb.ns at gmail dot com
2024-01-10  8:50 ` arsen at gcc dot gnu.org
2024-01-10 13:38 ` unlvsur at live dot com
2024-01-14 16:13 ` arsen at gcc dot gnu.org

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).