Re: [PATCH v2] preprocessor: -Wbidi-chars and UCNs [PR104030]

2022-01-28 Thread Marek Polacek via Gcc-patches
On Fri, Jan 28, 2022 at 05:12:41PM +0100, Martin Liška wrote: > On 1/28/22 16:26, Marek Polacek wrote: > > On Fri, Jan 28, 2022 at 04:08:18PM +0100, Martin Liška wrote: > > > On 1/28/22 15:59, Marek Polacek wrote: > > > > On Fri, Jan 28, 2022 at 02:53:16PM +0100, Martin Liška wrote: > > > > > On 1/

Re: [PATCH v2] preprocessor: -Wbidi-chars and UCNs [PR104030]

2022-01-28 Thread Martin Liška
On 1/28/22 16:26, Marek Polacek wrote: On Fri, Jan 28, 2022 at 04:08:18PM +0100, Martin Liška wrote: On 1/28/22 15:59, Marek Polacek wrote: On Fri, Jan 28, 2022 at 02:53:16PM +0100, Martin Liška wrote: On 1/24/22 23:36, Marek Polacek via Gcc-patches wrote: |@@ -7820,6 +7820,10 @@ bidi context

Re: [PATCH v2] preprocessor: -Wbidi-chars and UCNs [PR104030]

2022-01-28 Thread Marek Polacek via Gcc-patches
On Fri, Jan 28, 2022 at 04:08:18PM +0100, Martin Liška wrote: > On 1/28/22 15:59, Marek Polacek wrote: > > On Fri, Jan 28, 2022 at 02:53:16PM +0100, Martin Liška wrote: > > > On 1/24/22 23:36, Marek Polacek via Gcc-patches wrote: > > > > |@@ -7820,6 +7820,10 @@ bidi contexts. @option{-Wbidi-chars=n

Re: [PATCH v2] preprocessor: -Wbidi-chars and UCNs [PR104030]

2022-01-28 Thread Martin Liška
On 1/28/22 15:59, Marek Polacek wrote: On Fri, Jan 28, 2022 at 02:53:16PM +0100, Martin Liška wrote: On 1/24/22 23:36, Marek Polacek via Gcc-patches wrote: |@@ -7820,6 +7820,10 @@ bidi contexts. @option{-Wbidi-chars=none} turns the warning off. @option{-Wbidi-chars=any} warns about any use of

Re: [PATCH v2] preprocessor: -Wbidi-chars and UCNs [PR104030]

2022-01-28 Thread Marek Polacek via Gcc-patches
On Fri, Jan 28, 2022 at 02:53:16PM +0100, Martin Liška wrote: > On 1/24/22 23:36, Marek Polacek via Gcc-patches wrote: > > |@@ -7820,6 +7820,10 @@ bidi contexts. @option{-Wbidi-chars=none} turns the > > warning off. @option{-Wbidi-chars=any} warns about any use of bidirectional > > control charac

Re: [PATCH v2] preprocessor: -Wbidi-chars and UCNs [PR104030]

2022-01-28 Thread Martin Liška
On 1/24/22 23:36, Marek Polacek via Gcc-patches wrote: |@@ -7820,6 +7820,10 @@ bidi contexts. @option{-Wbidi-chars=none} turns the warning off. @option{-Wbidi-chars=any} warns about any use of bidirectional control characters. +By default, this warning does not warn about UCNs. It is, however,

Re: [PATCH v2] preprocessor: -Wbidi-chars and UCNs [PR104030]

2022-01-24 Thread Jakub Jelinek via Gcc-patches
On Mon, Jan 24, 2022 at 05:36:58PM -0500, Marek Polacek wrote: > The implementation is done by using the new EnumSet feature. > > PR preprocessor/104030 > > gcc/c-family/ChangeLog: > > * c.opt (Wbidi-chars): Mark as EnumSet. Also accept =ucn. > > gcc/ChangeLog: > > * doc/inv

[PATCH v2] preprocessor: -Wbidi-chars and UCNs [PR104030]

2022-01-24 Thread Marek Polacek via Gcc-patches
Here's an updated version of the patch which uses EnumSet (great to have it, thanks Jakub!) rather than hardcoding strings. With this patch we accept -Wbidi-chars=none,ucn as well as -Wbidi-chars=ucn. I think that's OK. Bootstrapped/regtested on x86_64-pc-linux-gnu, ok for trunk? -- >8 -- Stepha