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 Jakub Jelinek via Gcc-patches
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 that having _CHAR8_T_SOURCE be impl

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 mac

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

2021-06-11 Thread Jakub Jelinek via Gcc-patches
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 > > > macro > > > is predefined.

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

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 and

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

2021-06-07 Thread Joseph Myers
Also, it seems odd to add a new field to cpp_options without any code in libcpp that uses the value of that field. -- Joseph S. Myers jos...@codesourcery.com

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

2021-06-07 Thread Joseph Myers
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 and mbrtoc8 functions proposed > in N26

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

2021-06-06 Thread Tom Honermann via Gcc-patches
This patch implements the core language and compiler dependent library changes proposed in WG14 N2653 [1] for C. The changes include: - Use of the existing -fchar8_t and -fno-char8_t options to opt-in to (or opt-out of) the following changes when compiling C code. - Change of type for UTF-8 st