Re: [committed] libstdc++: Implement C++23 header [PR107760]

2023-12-16 Thread David Edelsohn
On Sat, Dec 16, 2023 at 7:04 PM Jonathan Wakely wrote: > On Sun, 17 Dec 2023 at 00:02, Jonathan Wakely wrote: > > > > On Sat, 16 Dec 2023 at 23:06, David Edelsohn wrote: > > > > > > On Sat, Dec 16, 2023 at 4:44 PM Jakub Jelinek > wrote: > > >> > > >> On Sat, Dec 16, 2023 at 04:24:13PM -0500, D

Re: [committed] libstdc++: Implement C++23 header [PR107760]

2023-12-16 Thread Jonathan Wakely
On Sun, 17 Dec 2023 at 00:02, Jonathan Wakely wrote: > > On Sat, 16 Dec 2023 at 23:06, David Edelsohn wrote: > > > > On Sat, Dec 16, 2023 at 4:44 PM Jakub Jelinek wrote: > >> > >> On Sat, Dec 16, 2023 at 04:24:13PM -0500, David Edelsohn wrote: > >> > AIX stdio.h defines fileno as a macro althoug

Re: [committed] libstdc++: Implement C++23 header [PR107760]

2023-12-16 Thread Jonathan Wakely
On Sat, 16 Dec 2023 at 23:06, David Edelsohn wrote: > > On Sat, Dec 16, 2023 at 4:44 PM Jakub Jelinek wrote: >> >> On Sat, Dec 16, 2023 at 04:24:13PM -0500, David Edelsohn wrote: >> > AIX stdio.h defines fileno as a macro although there is a symbol in libc. >> > >> > I think that print.cc at leas

Re: [committed] libstdc++: Implement C++23 header [PR107760]

2023-12-16 Thread David Edelsohn
On Sat, Dec 16, 2023 at 4:44 PM Jakub Jelinek wrote: > On Sat, Dec 16, 2023 at 04:24:13PM -0500, David Edelsohn wrote: > > AIX stdio.h defines fileno as a macro although there is a symbol in libc. > > > > I think that print.cc at least needs to > > > > > > #undef fileno > > > > > > before the usa

Re: [committed] libstdc++: Implement C++23 header [PR107760]

2023-12-16 Thread Jakub Jelinek
On Sat, Dec 16, 2023 at 04:24:13PM -0500, David Edelsohn wrote: > AIX stdio.h defines fileno as a macro although there is a symbol in libc. > > I think that print.cc at least needs to > > > #undef fileno > > > before the usage. Or (::fileno)(f) ? Jakub

Re: [committed] libstdc++: Implement C++23 header [PR107760]

2023-12-16 Thread David Edelsohn
Hi, Jonathan Unfortunately this patch broke bootstrap on AIX. In file included from /tmp/GCC/gcc/include-fixed/wchar.h:64, from /tmp/GCC/powerpc-ibm-aix7.2.5.0/libstdc++-v3/include/cwchar:44, from /tmp/GCC/powerpc-ibm-aix7.2.5.0/libstdc++-v3/include/bits/postyp

Re: [committed] libstdc++: Implement C++23 header [PR107760]

2023-12-16 Thread Jonathan Wakely
On Fri, 15 Dec 2023 at 14:49, Tim Song wrote: > > > > On Fri, Dec 15, 2023 at 4:43 AM Jonathan Wakely wrote: >> >> On Fri, 15 Dec 2023 at 01:17, Tim Song wrote: >> > >> > On Thu, Dec 14, 2023 at 6:05 PM Jonathan Wakely wrote: >> >> + inline void >> >> + vprint_unicode(ostream& __os, string_vie

Re: [committed] libstdc++: Implement C++23 header [PR107760]

2023-12-15 Thread Tim Song
On Fri, Dec 15, 2023 at 4:43 AM Jonathan Wakely wrote: > On Fri, 15 Dec 2023 at 01:17, Tim Song wrote: > > > > On Thu, Dec 14, 2023 at 6:05 PM Jonathan Wakely > wrote: > >> + inline void > >> + vprint_unicode(ostream& __os, string_view __fmt, format_args __args) > >> + { > >> +ostream::se

Re: [committed] libstdc++: Implement C++23 header [PR107760]

2023-12-15 Thread Jonathan Wakely
On Fri, 15 Dec 2023 at 01:17, Tim Song wrote: > > On Thu, Dec 14, 2023 at 6:05 PM Jonathan Wakely wrote: >> + inline void >> + vprint_unicode(ostream& __os, string_view __fmt, format_args __args) >> + { >> +ostream::sentry __cerb(__os); >> +if (__cerb) >> + { >> + >> + const

Re: [committed] libstdc++: Implement C++23 header [PR107760]

2023-12-14 Thread Tim Song
On Thu, Dec 14, 2023 at 6:05 PM Jonathan Wakely wrote: > Tested x86_64-linux. Pushed to trunk. > > -- >8 -- > > This adds the C++23 std::print functions, which use std::format to write > to a FILE stream or std::ostream (defaulting to stdout). > > The new extern symbols are in the libstdc++exp.a

[committed] libstdc++: Implement C++23 header [PR107760]

2023-12-14 Thread Jonathan Wakely
Tested x86_64-linux. Pushed to trunk. -- >8 -- This adds the C++23 std::print functions, which use std::format to write to a FILE stream or std::ostream (defaulting to stdout). The new extern symbols are in the libstdc++exp.a archive, so we aren't committing to stable symbols in the DSO yet. The