diff options
author | Martin Jambor <mjambor@suse.cz> | 2019-02-27 11:07:01 +0100 |
---|---|---|
committer | Martin Jambor <jamborm@gcc.gnu.org> | 2019-02-27 11:07:01 +0100 |
commit | 736da58676fafcde26049a198ae01a38551e2e0f (patch) | |
tree | d666d53eeb09d8ceef722b79101bced83bdb82b8 /gcc | |
parent | 65b309f7a50600adc8d0ae4dd8f62149875dc120 (diff) | |
download | gcc-736da58676fafcde26049a198ae01a38551e2e0f.zip gcc-736da58676fafcde26049a198ae01a38551e2e0f.tar.gz gcc-736da58676fafcde26049a198ae01a38551e2e0f.tar.bz2 |
[doc] Reword description of -Wno-absolute-value
2019-02-27 Martin Jambor <mjambor@suse.cz>
Martin Sebor <msebor@redhat.com>
* doc/invoke.texi (Warning Options): Reword description of
-Wno-absolute-value.
Co-Authored-By: Martin Sebor <msebor@redhat.com>
From-SVN: r269246
Diffstat (limited to 'gcc')
-rw-r--r-- | gcc/ChangeLog | 6 | ||||
-rw-r--r-- | gcc/doc/invoke.texi | 10 |
2 files changed, 13 insertions, 3 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 961131b..6117300 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,9 @@ +2019-02-27 Martin Jambor <mjambor@suse.cz> + Martin Sebor <msebor@redhat.com> + + * doc/invoke.texi (Warning Options): Reword description of + -Wno-absolute-value. + 2019-02-27 Jakub Jelinek <jakub@redhat.com> PR tree-optimization/89280 diff --git a/gcc/doc/invoke.texi b/gcc/doc/invoke.texi index dedf3c4..a8efa1a 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 |