[wwwdocs] Document some gcc-6 changes
diff mbox

Message ID CAESRpQCru07fmC6jffRNnbr7sxBraprC-9H=vSvtWLQDJeunHw@mail.gmail.com
State New
Headers show

Commit Message

Manuel López-Ibáñez Sept. 8, 2015, 5:14 p.m. UTC
I also took the liberty of rewriting the list of new command-line
options to be less repetitive.

OK?


<code>-fdelete-null-pointer-checks</code> is active, which is enabled
by optimizations in most targets. The precision of the warnings
depends on the optimization options used.</li>
+</ul></li>
   </ul>

 <h3 id="c">C</h3>

Comments

Gerald Pfeifer Sept. 8, 2015, 5:25 p.m. UTC | #1
On Tue, 8 Sep 2015, Manuel López-Ibáñez wrote:
> I also took the liberty of rewriting the list of new command-line
> options to be less repetitive.

Nice!  (Aka "Thanks for doing this, please go ahead and commit.")

There is one question, but that is not introduced by your change:
Does the language now suggest that -Wshift-overflow=2 is enabled
by default, and hence shifting 1 into the sign bit?  Let's address
this separately, though, your change is fine as is, Manuel!

> +    <li><code>-Wshift-overflow</code> warns about left shift
>         overflows.  <code>-Wshift-overflow=2</code> also warns about
>         left-shifting 1 into the sign bit.  This warning is enabled by
>         default.</li>

David, what do you think?

Gerald
Martin Sebor Sept. 8, 2015, 5:26 p.m. UTC | #2
On 09/08/2015 11:14 AM, Manuel López-Ibáñez wrote:
> I also took the liberty of rewriting the list of new command-line
> options to be less repetitive.
>
...
>          a negative value.</li>
> -    <li>A new command-line option <code>-Wshift-overflow</code> has been
> -       added for the C and C++ compilers, which warns about left shift
> +    <li><code>-Wshift-overflow</code> warns about left shift
>          overflows.  <code>-Wshift-overflow=2</code> also warns about
>          left-shifting 1 into the sign bit.  This warning is enabled by
>          default.</li>

While unrelated to your change, this might be a good opportunity
to also tweak the last sentence and clarify that "this warning"
refers to -Wshift-overflow and not to -Wshift-overflow=2.

Martin
Manuel López-Ibáñez Sept. 8, 2015, 6:01 p.m. UTC | #3
On 8 September 2015 at 19:26, Martin Sebor <msebor@gmail.com> wrote:
> On 09/08/2015 11:14 AM, Manuel López-Ibáñez wrote:
>>          a negative value.</li>
>> -    <li>A new command-line option <code>-Wshift-overflow</code> has been
>> -       added for the C and C++ compilers, which warns about left shift
>> +    <li><code>-Wshift-overflow</code> warns about left shift
>>          overflows.  <code>-Wshift-overflow=2</code> also warns about
>>          left-shifting 1 into the sign bit.  This warning is enabled by
>>          default.</li>
>
>
> While unrelated to your change, this might be a good opportunity
> to also tweak the last sentence and clarify that "this warning"
> refers to -Wshift-overflow and not to -Wshift-overflow=2.

Implemented by transposing the last two sentences.

Cheers,

Manuel.

Patch
diff mbox

Index: htdocs/gcc-6/changes.html
===================================================================
RCS file: /cvs/gcc/wwwdocs/htdocs/gcc-6/changes.html,v
retrieving revision 1.26
diff -u -r1.26 changes.html
--- htdocs/gcc-6/changes.html   4 Sep 2015 09:33:28 -0000       1.26
+++ htdocs/gcc-6/changes.html   8 Sep 2015 17:12:23 -0000
@@ -43,18 +43,26 @@ 
   oldval __attribute__ ((deprecated ("too old")))
 };
 </pre></blockquote></li>
-    <li>A new command-line option <code>-Wshift-negative-value</code> has been
-       added for the C and C++ compilers, which warns about left shifting
+<li>Initial support for precise diagnostic locations within strings:
+<blockquote><pre>
+<b>format-strings.c:3:14:</b> <b style='color:magenta'>warning:</b>
field width specifier <b>'*'</b> expects a matching <b>'int'</b>
argument [-Wformat=]
+   printf("%*d");
+            <b style='color:lime'>^</b>
+</pre></blockquote></li>
+
+    <li>New command-line options have been added for the C and C++ compilers:
+<ul>
+    <li><code>-Wshift-negative-value</code>  warns about left shifting
        a negative value.</li>
-    <li>A new command-line option <code>-Wshift-overflow</code> has been
-       added for the C and C++ compilers, which warns about left shift
+    <li><code>-Wshift-overflow</code> warns about left shift
        overflows.  <code>-Wshift-overflow=2</code> also warns about
        left-shifting 1 into the sign bit.  This warning is enabled by
        default.</li>
-    <li>A new command-line option <code>-Wtautological-compare</code> has been
-       added for the C and C++ compilers, which warns if a self-comparison
+    <li><code>-Wtautological-compare</code> warns if a self-comparison
        always evaluates to true or false.  This warning is enabled by
        <code>-Wall</code>.</li>
+    <li><code>-Wnull-dereference</code> warns if the compiler detects
paths that trigger erroneous or undefined behavior due to
dereferencing a null pointer. This option is only active when