From: Martin Jambor Date: Wed, 27 Feb 2019 10:07:01 +0000 (+0100) Subject: [doc] Reword description of -Wno-absolute-value X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=736da58676fafcde26049a198ae01a38551e2e0f;p=gcc.git [doc] Reword description of -Wno-absolute-value 2019-02-27 Martin Jambor Martin Sebor * doc/invoke.texi (Warning Options): Reword description of -Wno-absolute-value. Co-Authored-By: Martin Sebor From-SVN: r269246 --- diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 961131bcf03..611730062de 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,9 @@ +2019-02-27 Martin Jambor + Martin Sebor + + * doc/invoke.texi (Warning Options): Reword description of + -Wno-absolute-value. + 2019-02-27 Jakub Jelinek PR tree-optimization/89280 diff --git a/gcc/doc/invoke.texi b/gcc/doc/invoke.texi index dedf3c4d912..a8efa1afd11 100644 --- a/gcc/doc/invoke.texi +++ b/gcc/doc/invoke.texi @@ -6656,9 +6656,13 @@ example, warn if an unsigned variable is compared against zero with @item -Wabsolute-value @r{(C and Objective-C only)} @opindex Wabsolute-value @opindex Wno-absolute-value -Warn when a wrong absolute value function seems to be used or when it -does not have any effect because its argument is an unsigned type. -This warning be suppressed with an explicit type cast and it is also +Warn for calls to standard functions that compute the absolute value +of an argument when a more appropriate standard function is available. +For example, calling @code{abs(3.14)} triggers the warning because the +appropriate function to call to compute the absolute value of a double +argument is @code{fabs}. The option also triggers warnings when the +argument in a call to such a function has an unsigned type. This +warning can be suppressed with an explicit type cast and it is also enabled by @option{-Wextra}. @include cppwarnopts.texi