diff mbox

[wwwdocs] Update GCC5 changes.html

Message ID 20140822134721.GA15033@redhat.com
State New
Headers show

Commit Message

Marek Polacek Aug. 22, 2014, 1:47 p.m. UTC
On Fri, Aug 22, 2014 at 01:11:28AM +0200, Gerald Pfeifer wrote:
> > +      <li><code>-fsanitize=float-cast-overflow</code>: check that the result
> > +	   of floating-point type to integer conversion does not overflow;</li>
> 
> "conversions" (plural)?

Ok, changed.
 
> > +    <li>A new <code>-Wswitch-bool</code> option has been added for the C and C++
> > +	compilers, which warns whenever a <code>switch</code> statement has an
> > +	index of boolean type.</li>
> 
> Here, and in the other cases, "A new option <code>..." might be less
> ambigous -- someone might read this as an option for this command-line
> option.  This is just a suggestion, feel free to ignore.
> 
> I would say "command-line option" instead of just option, though.
 
Done.

> > +    <li>A new <code>-Wlogical-not-parentheses</code> option has been added for the
> > +	C and C++ compilers, which warns about logical not used on the left hand
> > +	side operand of a comparison.</li>
> 
> "logical not" in quotes, perhaps?  Otherwise this may be a bit hard to
> parse.
> 
 
Done.

> > +    <li>A new <code>-Wsizeof-array-argument</code> option has been added for the
> > +	C and C++ compilers, which warns when the <code>sizeof</code> operator is
> > +	applied to a parameter that is declared as an array in a function definition.
> 
> "has been" instead of "is declard"?
> 
 
Done.

> > +    <li>It is possible to disable warnings about conversions between pointers
> > +	that have incompatible types via a new warning option
> > +	<code>-Wno-incompatible-pointer-types</code>; warnings about implicit
> > +	incompatible integer to pointer and pointer to integer conversions via
> > +	a new warning option <code>-Wno-int-conversion</code>; and warnings about
> > +	qualifiers on pointers being discarded via a new warning option
> 
> Should we write "pointer-to-integer" and the like, here and in other
> parts of the patch?  Probably best a question for Joseph (and if he
> has approved code/document patches where that was not the case, than
> the answer pretty likely is now. ;-)

Elsewhere in the code base I see mainly "pointer to integer" so I
haven't changed this.

The following patch contains two more options: -Wc99-c11-compat and
-Wbool-compare.

Ok?


	Marek

Comments

Gerald Pfeifer Aug. 25, 2014, 7:19 a.m. UTC | #1
On Fri, 22 Aug 2014, Marek Polacek wrote:
> Elsewhere in the code base I see mainly "pointer to integer" so I
> haven't changed this.

Sounds good.

> The following patch contains two more options: -Wc99-c11-compat and
> -Wbool-compare.
> 
> Ok?

Nice!  Thanks you.  

Oh, yes, okay.  Can you just check that lines are <80 columns?

Gerald
Marek Polacek Aug. 25, 2014, 9:01 a.m. UTC | #2
On Mon, Aug 25, 2014 at 09:19:08AM +0200, Gerald Pfeifer wrote:
> On Fri, 22 Aug 2014, Marek Polacek wrote:
> Nice!  Thanks you.  

Thanks for review.

> Oh, yes, okay.  Can you just check that lines are <80 columns?

Sure.  (I actually had to re-indent a few of them.)
Committed.

	Marek
diff mbox

Patch

--- changes.html.mp	2014-08-22 15:29:07.345371623 +0200
+++ changes.html	2014-08-22 15:46:14.242458840 +0200
@@ -16,11 +16,59 @@ 
 
 <h2 id="general">General Optimizer Improvements</h2>
 
+  <ul>
+    <li>UndefinedBehaviorSanitizer gained a few new sanitization options:
+    <ul>
+      <li><code>-fsanitize=float-divide-by-zero</code>: detect floating-point
+	   division by zero;</li>
+      <li><code>-fsanitize=float-cast-overflow</code>: check that the result
+	   of floating-point type to integer conversions do not overflow;</li>
+      <li><code>-fsanitize=bounds</code>: enable instrumentation of array bounds
+	  and detect out-of-bounds accesses;</li>
+      <li><code>-fsanitize=alignment</code>: enable alignment checking, detect
+	  various misaligned objects.</li>
+    </ul>
+    </li>
+  </ul>
+
 <h2 id="languages">New Languages and Language specific improvements</h2>
 
 <!-- h3 id="ada">Ada</h3 -->
-<!-- h3 id="c-family">C family</h3 -->
-<!-- h3 id="c">C</h3-->
+<h3 id="c-family">C family</h3>
+
+  <ul>
+    <li>A new command-line option <code>-Wswitch-bool</code> has been added for
+	the C and C++ compilers, which warns whenever a <code>switch</code> statement
+	has an index of boolean type.</li>
+    <li>A new command-line option <code>-Wlogical-not-parentheses</code> has been added
+	for the C and C++ compilers, which warns about "logical not" used on the left hand
+	side operand of a comparison.</li>
+    <li>A new command-line option <code>-Wsizeof-array-argument</code> has been added
+	for the C and C++ compilers, which warns when the <code>sizeof</code> operator
+	is applied to a parameter that has been declared as an array in a function
+	definition.
+    <li>A new command-line option <code>-Wbool-compare</code> has been added for
+	the C and C++ compilers, which warns about boolean expressions compared with
+	an integer value different from <code>true</code>/<code>false</code>.</li>
+  </ul>
+
+<h3 id="c">C</h3>
+
+  <ul>
+    <li>A new command-line option <code>-Wc90-c99-compat</code> has been added to warn
+	about features not present in ISO C90, but present in ISO C99.</li>
+    <li>A new command-line option <code>-Wc99-c11-compat</code> has been added to warn
+	about features not present in ISO C99, but present in ISO C11.</li>
+    <li>It is possible to disable warnings about conversions between pointers
+	that have incompatible types via a new warning option
+	<code>-Wno-incompatible-pointer-types</code>; warnings about implicit
+	incompatible integer to pointer and pointer to integer conversions via
+	a new warning option <code>-Wno-int-conversion</code>; and warnings about
+	qualifiers on pointers being discarded via a new warning option
+	<code>-Wno-discarded-qualifiers</code>.</li>
+    <li>The C front end now generates more precise caret diagnostics.</li>
+  </ul>
+
 <!-- h3 id="cxx">C++</h3-->
   <!-- h4 id="libstdcxx">Runtime Library (libstdc++)</h4-->
 <h3 id="fortran">Fortran</h3>