Add -Wabsolute-value
authorMartin Jambor <mjambor@suse.cz>
Mon, 17 Sep 2018 13:12:12 +0000 (15:12 +0200)
committerMartin Jambor <jamborm@gcc.gnu.org>
Mon, 17 Sep 2018 13:12:12 +0000 (15:12 +0200)
commit80c6d1f4463b5a848451513d788d38bb366dbefb
tree829a703a921957e67d4691d0a217fb0560e7c5aa
parent3ab3a92e8ee19d942c89b0feb99f7a10bde794a8
Add -Wabsolute-value

2018-09-17  Martin Jambor  <mjambor@suse.cz>

gcc/
* doc/invoke.texi (Warning Options): Likewise.

gcc/c-family/
* c.opt (Wabsolute-value): New.

gcc/c/
* c-parser.c: (warn_for_abs): New function.
(c_parser_postfix_expression_after_primary): Call it.

testsuite/
* gcc.dg/warn-abs-1.c: New test.
* gcc.dg/dfp/warn-abs-2.c: Likewise.

From-SVN: r264368
gcc/ChangeLog
gcc/c-family/ChangeLog
gcc/c-family/c.opt
gcc/c/ChangeLog
gcc/c/c-parser.c
gcc/doc/invoke.texi
gcc/testsuite/ChangeLog
gcc/testsuite/gcc.dg/dfp/warn-abs-2.c [new file with mode: 0644]
gcc/testsuite/gcc.dg/warn-abs-1.c [new file with mode: 0644]