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/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, possible +to turn on such 
> > > > > > checking by using @option{-Wbidi-chars=unpaired,ucn} or 
> > > > > > +@option{-Wbidi-chars=any,ucn}.|
> > > > > 
> > > > > Hello.
> > > > > 
> > > > > Can you please extend the documentation entry and explain what 'ucn' 
> > > > > actually means?
> > > > > 
> > > > > '''
> > > > > There are three levels of warning supported by GCC@.  The default is
> > > > > @option{-Wbidi-chars=unpaired}, which warns about improperly 
> > > > > terminated
> > > > > bidi contexts.  @option{-Wbidi-chars=none} turns the warning off.
> > > > > @option{-Wbidi-chars=any} warns about any use of bidirectional control
> > > > > characters.
> > > > > '''
> > > > > 
> > > > > Right now we have 4 levels and 'ucn' is not defined the paragraph.
> > > > 
> > > > The following paragraph says
> > > > 
> > > > By default, this warning does not warn about UCNs.  It is, however, 
> > > > possible
> > > > to turn on such checking by using @option{-Wbidi-chars=unpaired,ucn} or
> > > > @option{-Wbidi-chars=any,ucn}.
> > > > 
> > > > Is that not enough?
> > > 
> > > Yeah, makes sense. Do I understand it correctly that one can't use 
> > > -Wbidi-chars=ucn?
> > 
> > You could, it just means use the default (=unpaired) with UCN checking 
> > enabled.
> > Do you want me to make a note about that in the manual?
> 
> Yes, please do so.

Done:

    doc: Update -Wbidi-chars documentation

    gcc/ChangeLog:

            * doc/invoke.texi: Update -Wbidi-chars documentation.

diff --git a/gcc/doc/invoke.texi b/gcc/doc/invoke.texi
index 9e588db4fce..cfd415110cd 100644
--- a/gcc/doc/invoke.texi
+++ b/gcc/doc/invoke.texi
@@ -7822,7 +7822,9 @@ characters.

 By default, this warning does not warn about UCNs.  It is, however, possible
 to turn on such checking by using @option{-Wbidi-chars=unpaired,ucn} or
-@option{-Wbidi-chars=any,ucn}.
+@option{-Wbidi-chars=any,ucn}.  Using @option{-Wbidi-chars=ucn} is valid,
+and is equivalent to @option{-Wbidi-chars=unpaired,ucn}, if no previous
+@option{-Wbidi-chars=any} was specified.

 @item -Wbool-compare
 @opindex Wno-bool-compare


Marek

Reply via email to