Re: [PATCH] libcpp: Add -Winvalid-utf8 warning [PR106655]

2022-08-29 Thread Jason Merrill via Gcc-patches
On 8/29/22 17:35, Jakub Jelinek wrote: On Mon, Aug 29, 2022 at 05:15:26PM -0400, Jason Merrill wrote: On 8/29/22 04:15, Jakub Jelinek wrote: Hi! The following patch introduces a new warning - -Winvalid-utf8 similarly to what clang now has - to diagnose invalid UTF-8 byte sequences in comments.

Re: [PATCH] libcpp: Add -Winvalid-utf8 warning [PR106655]

2022-08-29 Thread Jakub Jelinek via Gcc-patches
On Mon, Aug 29, 2022 at 11:35:44PM +0200, Jakub Jelinek wrote: > I guess I should try what happens with 0x11 and 0x7fff in > identifiers and string literals. It is rejected in identifiers, but happily accepted in string literals: const char32_t *a = U""; const char32_t *b = U"��";

Re: [PATCH] libcpp: Add -Winvalid-utf8 warning [PR106655]

2022-08-29 Thread Jakub Jelinek via Gcc-patches
On Mon, Aug 29, 2022 at 05:15:26PM -0400, Jason Merrill wrote: > On 8/29/22 04:15, Jakub Jelinek wrote: > > Hi! > > > > The following patch introduces a new warning - -Winvalid-utf8 similarly > > to what clang now has - to diagnose invalid UTF-8 byte sequences in > > comments. In identifiers and

Re: [PATCH] libcpp: Add -Winvalid-utf8 warning [PR106655]

2022-08-29 Thread Jason Merrill via Gcc-patches
On 8/29/22 04:15, Jakub Jelinek wrote: Hi! The following patch introduces a new warning - -Winvalid-utf8 similarly to what clang now has - to diagnose invalid UTF-8 byte sequences in comments. In identifiers and in string literals it should be diagnosed already but comment content hasn't been r

[PATCH] libcpp: Add -Winvalid-utf8 warning [PR106655]

2022-08-29 Thread Jakub Jelinek via Gcc-patches
Hi! The following patch introduces a new warning - -Winvalid-utf8 similarly to what clang now has - to diagnose invalid UTF-8 byte sequences in comments. In identifiers and in string literals it should be diagnosed already but comment content hasn't been really verified. I'm not sure if this is