On Thu, Feb 02, 2017 at 10:24:34PM +0100, Gerald Pfeifer wrote:
> Hi Marek,
> 
> a couple of comments (and minor changes) below.  Once you have made
> those, this is okay to commit.  Quite some stuff going into GCC 7!
>
> On Fri, 27 Jan 2017, Marek Polacek wrote:
> > Index: changes.html
> > ===================================================================
> > +<li>New command-line options have been added for the C and C++ compilers:
> > +  <ul>
> > +    <li><code>-Wimplicit-fallthrough</code> warns when a switch case falls
> > +        through.  This warning has five different levels.  The compiler is
> > +   able to parse a wide range of falls through comments, depending on
> 
> Perhaps say "fall through" (in quotes)?
> 
> And why is it 'fallthrough' in doc/invoke.texi and 'falls through' here?
 
I don't think there's one established term.  I changed this to fallthrough.

> > +   the level.  It also handles control-flow statements, such as ifs.
> 
> I have to admit I am not sure what the above means practically, i.e.,
> in what manner control-flow statement interact here.
> 
> (So I did check doc/invoke.texi and there is an example, alas no
> explanation.  Is the point that GCC only warns about the "i < 1"
> arm?  That may be good describing in the documentation.)
 
Yeah, it means that the warning can figure out that only some (or none)
of the branches of an if can fall through.  (In the future it should also
handle switches much in the same way.)

> > +   It's possible to suppres the warning by either adding a falls through
> > +   comment, or by using a null statement: <code>__attribute__
> 
> Same as above.
 
Changed, too.

> > +    <li><code>-Wpointer-compare</code> warns when a pointer is compared 
> > with
> > +        a zero character constant.  This code is now invalid in C++11 and
> > +   GCC rejects such code.  This warning is enabled by default.</li>
> 
> How about "Such code is now invalid in C++11 and GCC rejects it"?
 
Ok. 
 
> > +    <li><code>-Wrestrict</code> warns when an argument passed to a
> > +        restrict-qualified parameter aliases with another argument.</li>
> 
> <code>restrict</code>-qualified
> 
> > +    <li><code>-Wmemset-elt-size</code> warns for memset calls, when the 
> > first
> 
> <code>memset</code>
> 
> > +    <li><code>-Wswitch-unreachable</code> warns when a switch statement has
> 
> <code>switch</code>
> 
> > +    <li><code>-Wregister</code> warns about uses of <code>register</code>
> > +        storage specifier.  In C++17 this keyword has been removed and for 
> > C++17
> 
> "the...storage specified" (adding "the")
> 
> > +        has duplicate const, volatile, restrict or _Atomic specifier.
> 
> <code>const</code>
> <code>volatile</code>
> <code>restrict</code>
> <code>_Atomic</code>
> 
> > +<li>The new <code>-Wdangling-else</code> command-line option has been split
> > +out of <code>-Wparentheses</code> and warns about dangling else.</li>
> 
> <code>else</code>

All fixed & committed.

        Marek

Reply via email to