Re: [PATCH 1/1 v2] c++/106423: Fix pragma suppression of -Wc++20-compat diagnostics.

2022-08-11 Thread Tom Honermann via Gcc-patches
If there are no further concerns, could a C++ or libcpp maintainer please commit this for me? Thank you! Tom. On 8/4/22 12:42 PM, Tom Honermann via Gcc-patches wrote: Are there any further concerns with this patch? If not, I extend my gratitude to anyone so kind as to commit this for me as I

Re: [PATCH v4 2/2] preprocessor/106426: Treat u8 character literals as unsigned in char8_t modes.

2022-08-08 Thread Tom Honermann via Gcc-patches
On 8/2/22 6:14 PM, Joseph Myers wrote: On Tue, 2 Aug 2022, Tom Honermann via Gcc-patches wrote: This patch corrects handling of UTF-8 character literals in preprocessing directives so that they are treated as unsigned types in char8_t enabled C++ modes (C++17 with -fchar8_t or C++20 without

Re: [PATCH 1/1 v2] c++/106423: Fix pragma suppression of -Wc++20-compat diagnostics.

2022-08-04 Thread Tom Honermann via Gcc-patches
the patch with that update if desired. Tom. On 8/1/22 2:49 PM, Tom Honermann wrote: Gcc's '#pragma GCC diagnostic' directives are processed in "early mode" (see handle_pragma_diagnostic_early) for the C++ frontend and, as such, require that the target diagnostic option

[PATCH v4 2/2] preprocessor/106426: Treat u8 character literals as unsigned in char8_t modes.

2022-08-02 Thread Tom Honermann via Gcc-patches
This patch corrects handling of UTF-8 character literals in preprocessing directives so that they are treated as unsigned types in char8_t enabled C++ modes (C++17 with -fchar8_t or C++20 without -fno-char8_t). Previously, UTF-8 character literals were always treated as having the same type as

[PATCH v4 1/2] C: Implement C2X N2653 char8_t and UTF-8 string literal changes

2022-08-02 Thread Tom Honermann via Gcc-patches
This patch implements the core language and compiler dependent library changes adopted for C2X via WG14 N2653. The changes include: - Change of type for UTF-8 string literals from array of const char to array of const char8_t (unsigned char). - A new atomic_char8_t typedef. - A new

[PATCH v4 0/2] Implement C2X N2653 (char8_t) and correct UTF-8 character literal type in preprocessor directives for C++

2022-08-02 Thread Tom Honermann via Gcc-patches
with -fchar8_t or in C++20 or later without -fno-char8_t). Tom Honermann (2): C: Implement C2X N2653 char8_t and UTF-8 string literal changes preprocessor/106426: Treat u8 character literals as unsigned in char8_t modes. gcc/c-family/c-lex.cc | 13 -- gcc/c-family/c

Re: [PATCH 2/3 v3] testsuite: Add tests for C2X N2653 char8_t and UTF-8 string literal changes

2022-08-02 Thread Tom Honermann via Gcc-patches
On 8/2/22 12:53 PM, Joseph Myers wrote: On Mon, 1 Aug 2022, Tom Honermann via Gcc-patches wrote: This change provides new tests for the core language and compiler dependent library changes adopted for C2X via WG14 N2653. Could you please send a complete patch series? I'm not sure what

[PATCH 2/3 v3] testsuite: Add tests for C2X N2653 char8_t and UTF-8 string literal changes

2022-08-01 Thread Tom Honermann via Gcc-patches
This change provides new tests for the core language and compiler dependent library changes adopted for C2X via WG14 N2653. gcc/testsuite/ChangeLog: * gcc.dg/atomic/c2x-stdatomic-lockfree-char8_t.c: New test. * gcc.dg/atomic/gnu2x-stdatomic-lockfree-char8_t.c: New test. *

Re: [PATCH 2/3 v2] testsuite: Add tests for C2X N2653 char8_t and UTF-8 string literal changes

2022-08-01 Thread Tom Honermann via Gcc-patches
On 8/1/22 3:13 PM, Joseph Myers wrote: On Mon, 1 Aug 2022, Tom Honermann via Gcc-patches wrote: diff --git a/gcc/testsuite/gcc.dg/c2x-predefined-macros.c b/gcc/testsuite/gcc.dg/c2x-predefined-macros.c new file mode 100644 index 000..3456105563a --- /dev/null +++ b/gcc/testsuite/gcc.dg

[PATCH 1/1 v2] c++/106423: Fix pragma suppression of -Wc++20-compat diagnostics.

2022-08-01 Thread Tom Honermann via Gcc-patches
Gcc's '#pragma GCC diagnostic' directives are processed in "early mode" (see handle_pragma_diagnostic_early) for the C++ frontend and, as such, require that the target diagnostic option be enabled for the preprocessor (see c_option_is_from_cpp_diagnostics). This change modifies the -Wc++20-compat

[PATCH 2/3 v2] testsuite: Add tests for C2X N2653 char8_t and UTF-8 string literal changes

2022-08-01 Thread Tom Honermann via Gcc-patches
This change provides new tests for the core language and compiler dependent library changes adopted for C2X via WG14 N2653. gcc/testsuite/ChangeLog: * gcc.dg/atomic/c2x-stdatomic-lockfree-char8_t.c: New test. * gcc.dg/atomic/gnu2x-stdatomic-lockfree-char8_t.c: New test. *

[PATCH 1/3 v2] C: Implement C2X N2653 char8_t and UTF-8 string literal changes

2022-08-01 Thread Tom Honermann via Gcc-patches
This patch implements the core language and compiler dependent library changes adopted for C2X via WG14 N2653. The changes include: - Change of type for UTF-8 string literals from array of const char to array of const char8_t (unsigned char). - A new atomic_char8_t typedef. - A new

Re: [PATCH 2/3] testsuite: Add tests for C2X N2653 char8_t and UTF-8 string literal changes

2022-07-31 Thread Tom Honermann via Gcc-patches
On 7/27/22 7:23 PM, Joseph Myers wrote: On Mon, 25 Jul 2022, Tom Honermann via Gcc-patches wrote: This change provides new tests for the core language and compiler dependent library changes adopted for C2X via WG14 N2653. I'd expect this patch also to add tests verifying that u8"&quo

Re: [PATCH 1/1] c++/106423: Fix pragma suppression of -Wc++20-compat diagnostics.

2022-07-31 Thread Tom Honermann via Gcc-patches
On 7/31/22 11:05 AM, Lewis Hyatt wrote: On Sat, Jul 30, 2022 at 7:06 PM Tom Honermann via Gcc-patches wrote: On 7/27/22 7:09 PM, Joseph Myers wrote: On Sun, 24 Jul 2022, Tom Honermann via Gcc-patches wrote: Gcc's '#pragma GCC diagnostic' directives are processed in "early mode&

Re: [PATCH 1/3] C: Implement C2X N2653 char8_t and UTF-8 string literal changes

2022-07-30 Thread Tom Honermann via Gcc-patches
On 7/27/22 7:20 PM, Joseph Myers wrote: On Mon, 25 Jul 2022, Tom Honermann via Gcc-patches wrote: diff --git a/gcc/ginclude/stdatomic.h b/gcc/ginclude/stdatomic.h index bfcfdf664c7..75ed7965689 100644 --- a/gcc/ginclude/stdatomic.h +++ b/gcc/ginclude/stdatomic.h @@ -49,6 +49,10 @@ typedef

Re: [PATCH 1/1] c++/106423: Fix pragma suppression of -Wc++20-compat diagnostics.

2022-07-30 Thread Tom Honermann via Gcc-patches
On 7/27/22 7:09 PM, Joseph Myers wrote: On Sun, 24 Jul 2022, Tom Honermann via Gcc-patches wrote: Gcc's '#pragma GCC diagnostic' directives are processed in "early mode" (see handle_pragma_diagnostic_early) for the C++ frontend and, as such, require that the target diagnostic option

Re: [PATCH 3/3] c++/106426: Treat u8 character literals as unsigned in char8_t modes.

2022-07-25 Thread Tom Honermann via Gcc-patches
On 7/25/22 2:05 PM, Andrew Pinski wrote: On Mon, Jul 25, 2022 at 11:01 AM Tom Honermann via Gcc-patches wrote: This patch corrects handling of UTF-8 character literals in preprocessing directives so that they are treated as unsigned types in char8_t enabled C++ modes (C++17 with -fchar8_t or C

Re: [PATCH 3/3 v2] preprocessor/106426: Treat u8 character literals as unsigned in char8_t modes.

2022-07-25 Thread Tom Honermann via Gcc-patches
This patch corrects handling of UTF-8 character literals in preprocessing directives so that they are treated as unsigned types in char8_t enabled C++ modes (C++17 with -fchar8_t or C++20 without -fno-char8_t). Previously, UTF-8 character literals were always treated as having the same type as

[PATCH 2/3] testsuite: Add tests for C2X N2653 char8_t and UTF-8 string literal changes

2022-07-25 Thread Tom Honermann via Gcc-patches
This change provides new tests for the core language and compiler dependent library changes adopted for C2X via WG14 N2653. gcc/testsuite/ChangeLog: * gcc.dg/atomic/c2x-stdatomic-lockfree-char8_t.c: New test. * gcc.dg/atomic/gnu2x-stdatomic-lockfree-char8_t.c: New test. *

[PATCH 1/3] C: Implement C2X N2653 char8_t and UTF-8 string literal changes

2022-07-25 Thread Tom Honermann via Gcc-patches
This patch implements the core language and compiler dependent library changes adopted for C2X via WG14 N2653. The changes include: - Change of type for UTF-8 string literals from array of const char to array of const char8_t (unsigned char). - A new atomic_char8_t typedef. - A new

[PATCH 3/3] c++/106426: Treat u8 character literals as unsigned in char8_t modes.

2022-07-25 Thread Tom Honermann via Gcc-patches
This patch corrects handling of UTF-8 character literals in preprocessing directives so that they are treated as unsigned types in char8_t enabled C++ modes (C++17 with -fchar8_t or C++20 without -fno-char8_t). Previously, UTF-8 character literals were always treated as having the same type as

[PATCH 0/3] Implement C2X N2653 (char8_t) and correct UTF-8 character literal type in preprocessor directives for C++

2022-07-25 Thread Tom Honermann via Gcc-patches
with -fchar8_t or in C++20 or later without -fno-char8_t). Tom Honermann (3): C: Implement C2X N2653 char8_t and UTF-8 string literal changes testsuite: Add tests for C2X N2653 char8_t and UTF-8 string literal changes c++/106426: Treat u8 character literals as unsigned in char8_t modes. gcc/c

[PATCH 1/1] c++/106423: Fix pragma suppression of -Wc++20-compat diagnostics.

2022-07-23 Thread Tom Honermann via Gcc-patches
Gcc's '#pragma GCC diagnostic' directives are processed in "early mode" (see handle_pragma_diagnostic_early) for the C++ frontend and, as such, require that the target diagnostic option be enabled for the preprocessor (see c_option_is_from_cpp_diagnostics). This change modifies the -Wc++20-compat

[PATCH 0/1] c++/106423: Fix pragma suppression of -Wc++20-compat diagnostics

2022-07-23 Thread Tom Honermann via Gcc-patches
the diagnostic using '#pragma GCC diagnostic ignored "-Wc++20-compat"', but attempting to do so currently fails. This patch corrects that. Tom Honermann (1): c++/106423: Fix pragma suppression of -Wc++20-compat diagnostics. gcc/c-family/c-opts.cc | 7 +++ gc

Re: [PATCH] C++ P0482R6 char8_t: declare std::c8rtomb and std::mbrtoc8 if provided by the C library

2022-01-11 Thread Tom Honermann via Gcc-patches
On 1/10/22 4:38 PM, Jonathan Wakely wrote: On Mon, 10 Jan 2022 at 21:24, Tom Honermann via Libstdc++ wrote: On 1/10/22 8:23 AM, Jonathan Wakely wrote: On Sat, 8 Jan 2022 at 00:42, Tom Honermann via Libstdc++ mailto:libstdc%2b...@gcc.gnu.org>> wrote: This patch completes implemen

Re: [PATCH 0/2]: C N2653 char8_t implementation

2022-01-11 Thread Tom Honermann via Gcc-patches
On 1/10/22 9:23 PM, Joseph Myers wrote: Please repost these patches after GCC 12 branches (updated as appropriate depending on whether the feature is accepted at the two-week Jan/Feb WG14 meeting, which doesn't yet have an agenda), since we're currently stabilizing for the release and so not

Re: [PATCH] C++ P0482R6 char8_t: declare std::c8rtomb and std::mbrtoc8 if provided by the C library

2022-01-10 Thread Tom Honermann via Gcc-patches
On 1/10/22 8:23 AM, Jonathan Wakely wrote: On Sat, 8 Jan 2022 at 00:42, Tom Honermann via Libstdc++ mailto:libstdc%2b...@gcc.gnu.org>> wrote: This patch completes implementation of the C++20 proposal P0482R6 [1] by adding declarations of std::c8rtomb() and std::m

[PATCH 2/2]: C N2653 char8_t: New tests​

2022-01-07 Thread Tom Honermann via Gcc-patches
This patch provides new tests for the core language and compiler dependent library changes proposed in WG14 N2653 [1] for C2x. Tested on Linux x86_64. gcc/testsuite/ChangeLog: 2021-05-31 Tom Honermann * gcc.dg/atomic/c2x-stdatomic-lockfree-char8_t.c: New test. * gcc.dg

[PATCH 1/2]: C N2653 char8_t: Language support

2022-01-07 Thread Tom Honermann via Gcc-patches
ATOMIC_CHAR8_T_LOCK_FREE macro defined in terms of the existing __GCC_ATOMIC_CHAR8_T_LOCK_FREE predefined macro. Tested on Linux x86_64. gcc/ChangeLog: 2022-01-07 Tom Honermann * ginclude/stdatomic.h (atomic_char8_t, ATOMIC_CHAR8_T_LOCK_FREE): New typedef and macro. gcc/c

[PATCH 0/2]: C N2653 char8_t implementation

2022-01-07 Thread Tom Honermann via Gcc-patches
This series of patches implements the core language features for the WG14 N2653 [1] proposal to provide char8_t support in C. These changes are intended to align char8_t support in C with the support provided in C++20 via WG21 P0482R6 [2]. These patches addresses feedback provided in response

[PATCH] C++ P0482R6 char8_t: declare std::c8rtomb and std::mbrtoc8 if provided by the C library

2022-01-07 Thread Tom Honermann via Gcc-patches
3.html [Patch 3/3]: https://sourceware.org/pipermail/libc-alpha/2022-January/135064.html Tom. commit 3d40bc9bf5c79343ea5a6cc355539542f4b56c9b Author: Tom Honermann Date: Sat Jan 1 17:26:31 2022 -0500 P0482R6 char8_t: declare std::c8rtomb and std::mbrtoc8 if provi

Re: [PATCH 0/3]: C N2653 char8_t implementation

2021-06-13 Thread Tom Honermann via Gcc-patches
On 6/11/21 1:27 PM, Joseph Myers wrote: On Fri, 11 Jun 2021, Tom Honermann via Gcc-patches wrote: The option is needed because it impacts core language backward compatibility (for both C and C++, the type of u8 string literals; for C++, the type of u8 character literals and the new char8_t

Re: [PATCH 1/3]: C N2653 char8_t: Language support

2021-06-13 Thread Tom Honermann via Gcc-patches
On 6/11/21 12:53 PM, Jakub Jelinek wrote: On Fri, Jun 11, 2021 at 12:20:48PM -0400, Tom Honermann wrote: I'm open to whatever signaling mechanism would be preferred.  It took me a while to settle on _CHAR8_T_SOURCE as the mechanism to propose as I didn't find much for other precedents. I agree

Re: [PATCH 1/3]: C N2653 char8_t: Language support

2021-06-11 Thread Tom Honermann via Gcc-patches
On 6/11/21 12:01 PM, Jakub Jelinek wrote: On Fri, Jun 11, 2021 at 11:52:41AM -0400, Tom Honermann via Gcc-patches wrote: On 6/7/21 5:11 PM, Joseph Myers wrote: On Sun, 6 Jun 2021, Tom Honermann via Gcc-patches wrote: When -fchar8_t support is enabled for non-C++ modes, the _CHAR8_T_SOURCE

Re: [PATCH 1/3]: C N2653 char8_t: Language support

2021-06-11 Thread Tom Honermann via Gcc-patches
On 6/7/21 5:12 PM, Joseph Myers wrote: Also, it seems odd to add a new field to cpp_options without any code in libcpp that uses the value of that field. Ah, thank you.  That appears to be leftover code from prior experimentation and I failed to identify it as such when preparing the patch. 

Re: [PATCH 1/3]: C N2653 char8_t: Language support

2021-06-11 Thread Tom Honermann via Gcc-patches
On 6/7/21 5:11 PM, Joseph Myers wrote: On Sun, 6 Jun 2021, Tom Honermann via Gcc-patches wrote: When -fchar8_t support is enabled for non-C++ modes, the _CHAR8_T_SOURCE macro is predefined. This is the mechanism proposed to glibc to opt-in to declarations of the char8_t typedef and c8rtomb

Re: [PATCH 0/3]: C N2653 char8_t implementation

2021-06-11 Thread Tom Honermann via Gcc-patches
On 6/7/21 5:03 PM, Joseph Myers wrote: On Sun, 6 Jun 2021, Tom Honermann via Gcc-patches wrote: These changes do not impact default gcc behavior. The existing -fchar8_t option is extended to C compilation to enable the N2653 changes, and -fno-char8_t is extended to explicitly disable them

[PATCH 3/3]: C N2653 char8_t: Documentation updates

2021-06-06 Thread Tom Honermann via Gcc-patches
This patch updates documentation for the -fchar8_t and -fno-char8_t options to describe their effect on C code as proposed in WG14 N2653 [1]. Tested on Linux x86_64. 2021-05-31 Tom Honermann * doc/invoke.texi (-fchar8_t): update for char8_t support for C. Tom. [1]: WG14 N2653

[PATCH 2/3]: C N2653 char8_t: New tests​

2021-06-06 Thread Tom Honermann via Gcc-patches
. Tested on Linux x86_64. gcc/testsuite/ChangeLog: 2021-05-31 Tom Honermann * gcc.dg/atomic/stdatomic-lockfree-char8_t.c: New test. * gcc.dg/char8_t-init-string-literal-1.c: New test. * gcc.dg/char8_t-predefined-macros-1.c: New test. * gcc.dg/char8_t-predefined

[PATCH 1/3]: C N2653 char8_t: Language support

2021-06-06 Thread Tom Honermann via Gcc-patches
is predefined. This is the mechanism proposed to glibc to opt-in to declarations of the char8_t typedef and c8rtomb and mbrtoc8 functions proposed in N2653. See [2]. Tested on Linux x86_64. gcc/ChangeLog: 2021-05-31 Tom Honermann * ginclude/stdatomic.h (atomic_char8_t

[PATCH 0/3]: C N2653 char8_t implementation

2021-06-06 Thread Tom Honermann via Gcc-patches
This series of patches implements the core language features for the WG14 N2653 [1] proposal to provide char8_t support in C. These changes are intended to align char8_t support in C with the support provided in C++20 via WG21 P0482R6 [2]. These changes do not impact default gcc behavior.

Re: [PATCH 2/4]: C++ P1423R3 char8_t remediation: Update feature test macro, add deleted operators, update u8path

2019-09-15 Thread Tom Honermann
, Tom Honermann wrote: This patch increments the __cpp_lib_char8_t feature test macro, adds deleted operator<< overloads for basic_ostream, and modifies u8path to accept sequences of char8_t for both the C++17 implementation of std::filesystem, and the filesystem TS implemen

Re: [PATCH 4/4]: C++ P1423R3 char8_t remediation: New tests

2019-09-15 Thread Tom Honermann
A revised patch is attached that modifies the tests for deleted ostream inserters to require C++2a. This is required by the revision of patch 2/4 that adds proper preprocessor conditionals to the definitions. Tom. On 9/15/19 3:40 PM, Tom Honermann wrote: This patch adds new tests to validate

[PATCH 3/4]: C++ P1423R3 char8_t remediation: Updates to existing tests

2019-09-15 Thread Tom Honermann
This patch updates existing tests to validate the new value for the __cpp_lib_char8_t feature test macros and to exercise u8path factory function invocations with std::string, std::string_view, and interator pair arguments. libstdc++-v3/ChangeLog: 2019-09-15 Tom Honermann * libstdc

[PATCH 4/4]: C++ P1423R3 char8_t remediation: New tests

2019-09-15 Thread Tom Honermann
and filesystem TS implementations. libstdc++-v3/ChangeLog: 2019-09-15 Tom Honermann * libstdc++-v3/testsuite/27_io/basic_ostream/inserters_character/char/deleted.cc: New test to validate deleted overloads of character and string inserters for narrow ostreams. * libstdc

[PATCH 2/4]: C++ P1423R3 char8_t remediation: Update feature test macro, add deleted operators, update u8path

2019-09-15 Thread Tom Honermann
m used for u8path differs between the C++17 and filesystem TS implementations. The changes to the former take advantage of C++17 'if constexpr'. The changes to the latter retain C++11 compatibility and rely on tag dispatching. libstdc++-v3/ChangeLog: 2019-09-15 Tom Honermann * l

[PATCH 1/4]: C++ P1423R3 char8_t remediation: Decouple constraints for u8path from path constructors

2019-09-15 Thread Tom Honermann
specializations). libstdc++-v3/ChangeLog: 2019-09-15 Tom Honermann * include/bits/fs_path.h: Moved helper utilities out of std::filesystem::path into a detail namespace to make them available for use by u8path. * include/experimental/bits/fs_path.h: Moved helper utilities

[PATCH 0/4]: C++ P1423R3 char8_t remediation implementation

2019-09-15 Thread Tom Honermann
This series of patches provides an implementation of the changes for C++ proposal P1423R3 [1]. These changes do not impact default libstdc++ behavior for C++17 and earlier; they are only active for C++2a or when the -fchar8_t option is specified. Tested x86_64-linux. Patch 1: Decouple

Re: [PATCH]: Fix PR c++/88095, class template argument deduction for literal operator templates per P0732 for C++2a

2019-08-06 Thread Tom Honermann
On 8/5/19 3:05 PM, Jason Merrill wrote: On 8/2/19 9:59 AM, Tom Honermann wrote: This patch fixes PR c++/88095: - Bug 88095 - class nontype template parameter UDL string literals doesn't accepts deduction placeholder - https://gcc.gnu.org/bugzilla/show_bug.cgi?id=88095. It also addresses

[PATCH]: Fix PR c++/88095, class template argument deduction for literal operator templates per P0732 for C++2a

2019-08-02 Thread Tom Honermann
/p1423#emulate Tested on x86_64-linux. Thanks to Jeff Snyder for providing an initial patch in the 88059 PR. gcc/cp/ChangeLog: 2019-08-02 Tom Honermann * parser.c (cp_parser_template_declaration_after_parameters): Enable class template argument deduction for non-type template

Re: [REVISED PATCH 7/9]: C++ P0482R5 char8_t: New standard library tests

2019-02-07 Thread Tom Honermann
On 2/7/19 4:54 AM, Jonathan Wakely wrote: On 23/12/18 21:27 -0500, Tom Honermann wrote: Attached is a revised patch that addresses changes in P0482R6.  Changes from the prior patch include: - Updated the value of the __cpp_char8_t feature test macro to 201811. Tested on x86_64-linux

Re: [REVISED PATCH 5/9]: C++ P0482R5 char8_t: Standard library support

2019-02-07 Thread Tom Honermann
On 2/7/19 4:44 AM, Jonathan Wakely wrote: On 23/12/18 21:27 -0500, Tom Honermann wrote: Attached is a revised patch that addresses changes in P0482R6.  Changes from the prior patch include: - Updated the value of the __cpp_char8_t feature test macro to 201811. Tested on x86_64-linux. Thanks

Re: [REVISED PATCH 2/9]: C++ P0482R5 char8_t: Core language support

2019-01-15 Thread Tom Honermann
On 1/15/19 1:51 AM, Christophe Lyon wrote: On Mon, 14 Jan 2019 at 20:59, Jason Merrill wrote: On 12/23/18 9:27 PM, Tom Honermann wrote: Attached is a revised patch that addresses changes in P0482R6 as well as feedback provided by Jason. Changes from the prior patch include: - Updated

Re: [REVISED PATCH 1/9]: C++ P0482R5 char8_t: Documentation updates

2019-01-14 Thread Tom Honermann
On 1/4/19 7:40 PM, Martin Sebor wrote: On 12/23/18 7:27 PM, Tom Honermann wrote: Attached is a revised patch that addresses feedback provided by Jason and Sandra.  Changes from the prior patch include: - Updates to the -fchar8_t option documentation as requested by Jason. - Corrections

Re: PATCH: Updated error messages for ill-formed cases of array initialization by string literal

2019-01-14 Thread Tom Honermann
On 1/4/19 7:25 PM, Martin Sebor wrote: On 12/27/18 1:49 PM, Tom Honermann wrote: As requested by Jason in the review of the P0482 (char8_t) core language changes, this patch includes updates to the error messages emitted for ill-formed cases of array initialization with a string literal

Re: [REVISED PATCH 2/9]: C++ P0482R5 char8_t: Core language support

2019-01-14 Thread Tom Honermann
On 1/14/19 2:58 PM, Jason Merrill wrote: On 12/23/18 9:27 PM, Tom Honermann wrote: Attached is a revised patch that addresses changes in P0482R6 as well as feedback provided by Jason. Changes from the prior patch include: - Updated the value of the __cpp_char8_t feature test macro to 201811

PATCH: Updated error messages for ill-formed cases of array initialization by string literal

2018-12-27 Thread Tom Honermann
h the C and C++ front ends. These changes have dependencies on the (revised) set of patches submitted for P0482 (char8_t) and will not apply cleanly without them. Tested on x86_64-linux. gcc/c/ChangeLog: 2018-12-26 Tom Honermann * c-typeck.c (digest_init): Revised the error messag

Re: [PATCH 1/9]: C++ P0482R5 char8_t: Documentation updates

2018-12-23 Thread Tom Honermann
PM, Tom Honermann wrote: This patch adds documentation for new -fchar8_t and -fno-char8_t options. gcc/ChangeLog: 2018-11-04  Tom Honermann    * doc/invoke.texi (-fchar8_t): Document new option. My comments are all about nitpicky formatting things. diff --git a/gcc/doc/invoke.texi b

Re: [PATCH 2/9]: C++ P0482R5 char8_t: Core language support

2018-12-23 Thread Tom Honermann
Thanks, Jason.  I just sent a revised set of patches addressing most of your feedback with exceptions as described inline below. On 12/17/18 4:47 PM, Tom Honermann wrote: On 12/17/18 4:02 PM, Jason Merrill wrote: On 12/5/18 11:16 AM, Jason Merrill wrote: On 12/5/18 2:09 AM, Tom Honermann

Re: [REVISED PATCH 7/9]: C++ P0482R5 char8_t: New standard library tests

2018-12-23 Thread Tom Honermann
Attached is a revised patch that addresses changes in P0482R6. Changes from the prior patch include: - Updated the value of the __cpp_char8_t feature test macro to 201811. Tested on x86_64-linux. libstdc++-v3/ChangeLog: 2018-11-04 Tom Honermann * testsuite/18_support/numeric_limits

Re: [REVISED PATCH 5/9]: C++ P0482R5 char8_t: Standard library support

2018-12-23 Thread Tom Honermann
Attached is a revised patch that addresses changes in P0482R6. Changes from the prior patch include: - Updated the value of the __cpp_char8_t feature test macro to 201811. Tested on x86_64-linux. gcc/cp/ChangeLog: 2018-11-04 Tom Honermann * name-lookup.c (get_std_name_hint): Added

Re: [REVISED PATCH 4/9]: C++ P0482R5 char8_t: Updates to existing core language tests

2018-12-23 Thread Tom Honermann
/ChangeLog: 2018-11-04 Tom Honermann * c-c++-common/raw-string-13.c: Added test cases for u8 raw string literals. * c-c++-common/raw-string-15.c: Likewise. * g++.dg/cpp0x/constexpr-wstring2.C: Added test cases for u8 literals. * g++.dg/cpp2a/feat-cxx2a.C: Added test

Re: [REVISED PATCH 3/9]: C++ P0482R5 char8_t: New core language tests

2018-12-23 Thread Tom Honermann
/char8_t-init-1.C - gcc/testsuite/g++.dg/ext/char8_t-init-2.C Tested on x86_64-linux. gcc/testsuite/ChangeLog: 2018-11-04 Tom Honermann * g++.dg/cpp0x/udlit-implicit-conv-neg-char8_t.C: New test cloned from udlit-implicit-conv-neg.C. Validates handling of ill-formed uses

Re: [REVISED PATCH 1/9]: C++ P0482R5 char8_t: Documentation updates

2018-12-23 Thread Tom Honermann
on x86_64-linux. gcc/ChangeLog: 2018-11-04 Tom Honermann * doc/invoke.texi (-fchar8_t): Document new option. Tom. diff --git a/gcc/doc/invoke.texi b/gcc/doc/invoke.texi index 57491f1033c..95374951d98 100644 --- a/gcc/doc/invoke.texi +++ b/gcc/doc/invoke.texi @@ -206,7 +206,7

Re: [REVISED PATCH 2/9]: C++ P0482R5 char8_t: Core language support

2018-12-23 Thread Tom Honermann
on x86_64-linux. gcc/ChangeLog: 2018-11-04 Tom Honermann * defaults.h: Define CHAR8_TYPE. gcc/c-family/ChangeLog: 2018-11-04 Tom Honermann * c-family/c-common.c (c_common_reswords): Add char8_t. (fix_string_type): Use char8_t for the type of u8 string literals

Re: [PATCH 2/9]: C++ P0482R5 char8_t: Core language support

2018-12-17 Thread Tom Honermann
On 12/17/18 4:02 PM, Jason Merrill wrote: On 12/5/18 11:16 AM, Jason Merrill wrote: On 12/5/18 2:09 AM, Tom Honermann wrote: On 12/3/18 5:01 PM, Jason Merrill wrote: On 12/3/18 4:51 PM, Jason Merrill wrote: On 11/5/18 2:39 PM, Tom Honermann wrote: This patch adds support for the P0482R5 core

Re: [PATCH 2/9]: C++ P0482R5 char8_t: Core language support

2018-12-04 Thread Tom Honermann
On 12/3/18 5:01 PM, Jason Merrill wrote: On 12/3/18 4:51 PM, Jason Merrill wrote: On 11/5/18 2:39 PM, Tom Honermann wrote: This patch adds support for the P0482R5 core language changes.  This includes: - The -fchar8_t and -fno_char8_t command line options. - char8_t as a keyword

Re: [PATCH 1/9]: C++ P0482R5 char8_t: Documentation updates

2018-12-04 Thread Tom Honermann
On 12/3/18 2:59 PM, Jason Merrill wrote: On 11/5/18 2:39 PM, Tom Honermann wrote: This patch adds documentation for new -fchar8_t and -fno-char8_t options. gcc/ChangeLog: 2018-11-04  Tom Honermann    * doc/invoke.texi (-fchar8_t): Document new option. +Enable support for the P0482

[PATCH 9/9]: C++ P0482R5 char8_t: Updates to gdb pretty printing support

2018-11-05 Thread Tom Honermann
This patch adds recognition of the u8string and u8string_view type aliases to the gdb pretty printer extension. libstdc++-v3/ChangeLog: 2018-11-04 Tom Honermann * python/libstdcxx/v6/printers.py (register_type_printers): Add type printers for u8string and u8string_view

[PATCH 7/9]: C++ P0482R5 char8_t: New standard library tests

2018-11-05 Thread Tom Honermann
: 2018-11-04 Tom Honermann * testsuite/18_support/numeric_limits/char8_t.cc: New test cloned from char16_32_t.cc; validates numeric_limits. * testsuite/21_strings/basic_string/literals/types-char8_t.cc: New test cloned from types.cc; validates operator""s f

[PATCH 8/9]: C++ P0482R5 char8_t: Updates to existing standard library tests

2018-11-05 Thread Tom Honermann
This patch augments existing tests to validate behavior for char8_t. In all cases, added test cases are cloned from existing tests for wchar_t or char16_t. A few tests required updates to line numbers for diagnostic messages. libstdc++-v3/ChangeLog: 2018-11-04 Tom Honermann

[PATCH 4/9]: C++ P0482R5 char8_t: Updates to existing core language tests

2018-11-05 Thread Tom Honermann
/ChangeLog: 2018-11-04 Tom Honermann * c-c++-common/raw-string-13.c: Added test cases for u8 raw string literals. * c-c++-common/raw-string-15.c: Likewise. * g++.dg/cpp0x/constexpr-wstring2.C: Added test cases for u8 literals. * g++.dg/ext/utf-array-short-wchar.C: Likewise

[PATCH 6/9]: C++ P0482R5 char8_t: A small correction to a common testsuite header file

2018-11-05 Thread Tom Honermann
This patch corrects ambiguous partial specializations of typelist::detail::append_. Previously, neither append_, Typelist_Chain> nor append_ was a better match for append_, null_type>. libstdc++-v3/ChangeLog: 2018-11-04 Tom Honermann * include/ext/typelist.h: Constrained a p

[PATCH 5/9]: C++ P0482R5 char8_t: Standard library support

2018-11-05 Thread Tom Honermann
ay be needed in gnu-versioned-namespace.ver and whether I'm correct in adding a new CXXABI_1.3.12 section in gnu.ver. If I'm not mistaken, CXXABI has not already been bumped for gcc 9, so needs to be, but GLIBCXX has already been bumped and therefore does not need to be. gcc/cp/ChangeLog: 2018-

[PATCH 3/9]: C++ P0482R5 char8_t: New core language tests

2018-11-05 Thread Tom Honermann
to validate behavior when char8_t is enabled. In other cases, tests are added to validate behavior both when char8_t support is and is not enabled. gcc/testsuite/ChangeLog: 2018-11-04 Tom Honermann * g++.dg/cpp0x/udlit-implicit-conv-neg-char8_t.C: New test cloned from udlit-implicit

[PATCH 2/9]: C++ P0482R5 char8_t: Core language support

2018-11-05 Thread Tom Honermann
macros . - Name mangling and demangling for char8_t (using Du). gcc/ChangeLog: 2018-11-04 Tom Honermann * defaults.h: Define CHAR8_TYPE. gcc/c-family/ChangeLog: 2018-11-04 Tom Honermann * c-family/c-common.c (c_common_reswords): Add char8_t. (fix_string_type): Use char8_t

[PATCH 0/9]: C++ P0482R5 char8_t implementation

2018-11-05 Thread Tom Honermann
This series of patches provides an implementation of the core language and library changes for C++ proposal P0482R5 [1]. These changes are believed to be complete with the exception of the proposed mbrtoc8() and c8rtomb() functions (the expectation is that the C library will provide mbrtoc8()

[PATCH 1/9]: C++ P0482R5 char8_t: Documentation updates

2018-11-05 Thread Tom Honermann
This patch adds documentation for new -fchar8_t and -fno-char8_t options. gcc/ChangeLog: 2018-11-04 Tom Honermann * doc/invoke.texi (-fchar8_t): Document new option. Tom. diff --git a/gcc/doc/invoke.texi b/gcc/doc/invoke.texi index 57491f1033c..cd3a2a715db 100644 --- a/gcc/doc