Re: [PATCH v5 2/5] libcpp: add a function to determine UTF-8 validity of a C string

2023-10-23 Thread Jason Merrill
On 10/23/23 11:16, David Malcolm wrote: On Wed, Jan 25, 2023 at 4:09 PM Ben Boeckel via Gcc wrote: This simplifies the interface for other UTF-8 validity detections when a simple "yes" or "no" answer is sufficient. libcpp/ * charset.cc: Add `_cpp_valid_utf8_str` which determines whe

Re: [PATCH RESEND 0/1] RFC: P1689R5 support

2022-10-10 Thread Jason Merrill via Fortran
On 10/4/22 11:11, Ben Boeckel wrote: This patch adds initial support for ISO C++'s [P1689R5][], a format for describing C++ module requirements and provisions based on the source code. This is required because compiling C++ with modules is not embarrassingly parallel and need to be ordered to ens

Re: [PATCH RESEND 1/1] p1689r5: initial support

2022-10-10 Thread Jason Merrill via Fortran
On 10/4/22 11:12, Ben Boeckel wrote: This patch implements support for [P1689R5][] to communicate to a build system the C++20 module dependencies to build systems so that they may build `.gcm` files in the proper order. Thanks! Support is communicated through the following three new flags: -

Re: [PATCH RESEND 1/1] p1689r5: initial support

2022-10-20 Thread Jason Merrill via Fortran
On 10/18/22 08:18, Ben Boeckel wrote: On Tue, Oct 11, 2022 at 07:42:43 -0400, Ben Boeckel wrote: On Mon, Oct 10, 2022 at 17:04:09 -0400, Jason Merrill wrote: Can we share utf8 parsing code with decode_utf8_char in pretty-print.cc? I can look at factoring that out. I'll have to decod

Re: [PATCH RESEND 1/1] p1689r5: initial support

2022-10-20 Thread Jason Merrill via Fortran
On 10/20/22 13:31, Ben Boeckel wrote: On Thu, Oct 20, 2022 at 11:39:25 -0400, Jason Merrill wrote: Oops, I was thinking this was in gcc as well. In libcpp there's _cpp_valid_utf8 (which calls one_utf8_to_cppchar). This routine has a lot more logic (including UCN decoding) an

Re: [PATCH v2 1/3] libcpp: reject codepoints above 0x10FFFF

2022-11-07 Thread Jason Merrill via Fortran
On 10/27/22 13:16, Ben Boeckel wrote: Unicode does not support such values because they are unrepresentable in UTF-16. Signed-off-by: Ben Boeckel --- libcpp/ChangeLog | 6 ++ libcpp/charset.cc | 4 ++-- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/libcpp/ChangeLog b/l

Re: [PATCH v2 2/3] libcpp: add a function to determine UTF-8 validity of a C string

2022-11-07 Thread Jason Merrill via Fortran
On 10/27/22 13:16, Ben Boeckel wrote: This simplifies the interface for other UTF-8 validity detections when a simple "yes" or "no" answer is sufficient. Signed-off-by: Ben Boeckel --- libcpp/ChangeLog | 6 ++ libcpp/charset.cc | 18 ++ libcpp/internal.h | 2 ++ 3 fi

Re: [PATCH 2/5] c++: Set the locus of the function result decl

2022-11-15 Thread Jason Merrill via Fortran
Cc: Jason Merrill --- gcc/cp/decl.cc | 15 ++- 1 file changed, 14 insertions(+), 1 deletion(-) diff --git a/gcc/cp/decl.cc b/gcc/cp/decl.cc index 6e98ea35a39..ed40815e645 100644 --- a/gcc/cp/decl.cc +++ b/gcc/cp/decl.cc @@ -17449,6 +17449,8 @@ start_function (cp_decl_specifier_seq

Re: [PATCH v3 2/3] libcpp: add a function to determine UTF-8 validity of a C string

2022-11-15 Thread Jason Merrill via Fortran
On 11/8/22 16:10, Ben Boeckel wrote: This simplifies the interface for other UTF-8 validity detections when a simple "yes" or "no" answer is sufficient. libcpp/ * charset.cc: Add `_cpp_valid_utf8_str` which determines whether a C string is valid UTF-8 or not. * internal.

Re: [PATCH v3 1/3] libcpp: reject codepoints above 0x10FFFF

2022-11-15 Thread Jason Merrill via Fortran
On 11/8/22 16:10, Ben Boeckel wrote: Unicode does not support such values because they are unrepresentable in UTF-16. libcpp/ * charset.cc: Reject encodings of codepoints above 0x10. UTF-16 does not support such codepoints and therefore all Unicode rejects such value

git out-of-order commit (was Re: [PATCH] Fortran: Remove unused declaration)

2023-01-19 Thread Jason Merrill via Fortran
On Sat, Nov 12, 2022 at 4:24 PM Harald Anlauf via Gcc-patches wrote: > > Am 12.11.22 um 22:05 schrieb Bernhard Reutner-Fischer via Gcc-patches: > > This function definition was removed years ago, remove it's prototype. > > > > gcc/fortran/ChangeLog: > > > > * gfortran.h (gfc_check_include):

Re: git out-of-order commit (was Re: [PATCH] Fortran: Remove unused declaration)

2023-01-20 Thread Jason Merrill via Fortran
On Thu, Jan 19, 2023 at 11:26 PM Bernhard Reutner-Fischer wrote: > > On 19 January 2023 20:39:08 CET, Jason Merrill wrote: > >On Sat, Nov 12, 2022 at 4:24 PM Harald Anlauf via Gcc-patches > > wrote: > >> > >> Am 12.11.22 um 22:05 schrieb Bernhard Reutner-

Re: [PATCH v5 1/5] libcpp: reject codepoints above 0x10FFFF

2023-02-13 Thread Jason Merrill via Fortran
On 1/25/23 13:06, Ben Boeckel wrote: Unicode does not support such values because they are unrepresentable in UTF-16. libcpp/ * charset.cc: Reject encodings of codepoints above 0x10. UTF-16 does not support such codepoints and therefore all Unicode rejects such value

Re: [PATCH v5 4/5] c++modules: report imported CMI files as dependencies

2023-02-13 Thread Jason Merrill via Fortran
On 1/25/23 13:06, Ben Boeckel wrote: They affect the build, so report them via `-MF` mechanisms. gcc/cp/ * module.cc (do_import): Report imported CMI files as dependencies. Both this and the mapper dependency patch seem to cause most of the modules testcases to crash; please

Re: [PATCH v5 3/5] p1689r5: initial support

2023-02-14 Thread Jason Merrill via Fortran
On 1/25/23 13:06, Ben Boeckel wrote: This patch implements support for [P1689R5][] to communicate to a build system the C++20 module dependencies to build systems so that they may build `.gcm` files in the proper order. Thanks again. Support is communicated through the following three new fla

Re: [PATCH v6 0/4] P1689R5 support

2023-06-16 Thread Jason Merrill via Fortran
On Fri, Jun 16, 2023 at 3:49 PM Ben Boeckel wrote: > > On Thu, Jun 08, 2023 at 21:59:13 +0400, Maxim Kuvyrkov wrote: > > This patch series causes ICEs on arm-linux-gnueabihf. Would you > > please investigate? Please let me know if you need any in reproducing > > these. > > Finally back at it. I

Re: [PATCH v5 3/5] p1689r5: initial support

2023-06-19 Thread Jason Merrill via Fortran
On 5/12/23 10:24, Ben Boeckel wrote: On Tue, Feb 14, 2023 at 16:50:27 -0500, Jason Merrill wrote: I notice that the actual flags are all -fdep-*, though some of them are -fdeps-* here, and the internal variables all seem to be fdeps_*. I lean toward harmonizing on "deps", I think.

Re: [PATCH v6 1/4] libcpp: reject codepoints above 0x10FFFF

2023-06-19 Thread Jason Merrill via Fortran
On 6/6/23 16:50, Ben Boeckel wrote: Unicode does not support such values because they are unrepresentable in UTF-16. Pushed. libcpp/ * charset.cc: Reject encodings of codepoints above 0x10. UTF-16 does not support such codepoints and therefore all Unicode rejects

Re: [PATCH v6 0/4] P1689R5 support

2023-06-19 Thread Jason Merrill via Fortran
On 6/17/23 10:43, Ben Boeckel wrote: On Fri, Jun 16, 2023 at 23:55:53 -0400, Jason Merrill wrote: I see the same thing with patch 4 on x86_64-pc-linux-gnu, e.g. FAIL: g++.dg/modules/ben-1_a.C -std=c++17 (test for excess errors) Excess errors: /home/jason/gt/gcc/testsuite/g++.dg/modules/ben

Re: [PATCH v5 4/5] c++modules: report imported CMI files as dependencies

2023-06-22 Thread Jason Merrill via Fortran
On 1/25/23 16:06, Ben Boeckel wrote: They affect the build, so report them via `-MF` mechanisms. Why isn't this covered by the existing code in preprocessed_module? gcc/cp/ * module.cc (do_import): Report imported CMI files as dependencies. Signed-off-by: Ben Boeckel ---

Re: [PATCH v5 5/5] c++modules: report module mapper files as a dependency

2023-06-23 Thread Jason Merrill via Fortran
On 1/25/23 16:06, Ben Boeckel wrote: It affects the build, and if used as a static file, can reliably be tracked using the `-MF` mechanism. Hmm, this seems a bit like making all .o depend on the Makefile; it shouldn't be necessary to rebuild all TUs that use modules when we add another module

Re: [PATCH v5 3/5] p1689r5: initial support

2023-06-23 Thread Jason Merrill via Fortran
On 6/20/23 15:46, Ben Boeckel wrote: On Tue, Feb 14, 2023 at 16:50:27 -0500, Jason Merrill wrote: On 1/25/23 13:06, Ben Boeckel wrote: Header units (including the standard library headers) are 100% unsupported right now because the `-E` mechanism wants to import their BMIs. A new mode (i.e

Re: [PATCH v5 4/5] c++modules: report imported CMI files as dependencies

2023-07-18 Thread Jason Merrill via Fortran
On 6/25/23 12:36, Ben Boeckel wrote: On Fri, Jun 23, 2023 at 08:12:41 -0400, Nathan Sidwell wrote: On 6/22/23 22:45, Ben Boeckel wrote: On Thu, Jun 22, 2023 at 17:21:42 -0400, Jason Merrill wrote: On 1/25/23 16:06, Ben Boeckel wrote: They affect the build, so report them via `-MF` mechanisms

Re: [PATCH v5 4/5] c++modules: report imported CMI files as dependencies

2023-07-27 Thread Jason Merrill via Fortran
On 7/23/23 20:26, Ben Boeckel wrote: On Fri, Jul 21, 2023 at 16:23:07 -0400, Nathan Sidwell wrote: It occurs to me that the model I am envisioning is similar to CMake's object libraries. Object libraries are a convenient name for a bunch of object files. IIUC they're linked by naming the indivi

Re: [PATCH v7 2/4] p1689r5: initial support

2023-08-23 Thread Jason Merrill via Fortran
On 7/2/23 12:32, Ben Boeckel wrote: This patch implements support for [P1689R5][] to communicate to a build system the C++20 module dependencies to build systems so that they may build `.gcm` files in the proper order. Support is communicated through the following three new flags: - `-fdeps-for

Re: [PATCH v8 0/4] P1689R5 support

2023-09-19 Thread Jason Merrill via Fortran
On 9/1/23 09:04, Ben Boeckel wrote: Hi, This patch series adds initial support for ISO C++'s [P1689R5][], a format for describing C++ module requirements and provisions based on the source code. This is required because compiling C++ with modules is not embarrassingly parallel and need to be ord