aboutsummaryrefslogtreecommitdiff
path: root/gcc/objc
diff options
context:
space:
mode:
authorMarek Polacek <polacek@redhat.com>2017-08-09 08:51:20 +0000
committerMarek Polacek <mpolacek@gcc.gnu.org>2017-08-09 08:51:20 +0000
commita32c8316ff282ec3eb60e222e91fb19998c12f46 (patch)
tree5c9606b760b22332192173cec1c9c8ba76d9dcb4 /gcc/objc
parentbc47a525cbd41692135f24607a52bd42e93400cb (diff)
downloadgcc-a32c8316ff282ec3eb60e222e91fb19998c12f46.zip
gcc-a32c8316ff282ec3eb60e222e91fb19998c12f46.tar.gz
gcc-a32c8316ff282ec3eb60e222e91fb19998c12f46.tar.bz2
re PR c/81417 (-Wsign-compare should print types being compared)
PR c/81417 * c-array-notation.c (fix_builtin_array_notation_fn): Update calls to build_conditional_expr. * c-parser.c (c_parser_conditional_expression): Create locations for EXP1 and EXP2 from their source ranges. Pass the locations down to build_conditional_expr. * c-tree.h (build_conditional_expr): Update declaration. * c-typeck.c (build_conditional_expr): Add location_t parameters. For -Wsign-compare, also print the types. * input.c (make_location): New overload. * input.h (make_location): Declare. * objc-next-runtime-abi-02.c (build_v2_build_objc_method_call): Update a call to build_conditional_expr. * Wsign-compare-1.c: New test. * gcc.dg/compare1.c: Adjust dg-bogus. * gcc.dg/compare2.c: Likewise. * gcc.dg/compare3.c: Likewise. * gcc.dg/compare7.c: Likewise. * gcc.dg/compare8.c: Likewise. * gcc.dg/compare9.c: Likewise. * gcc.dg/pr11492.c: Likewise. From-SVN: r250984
Diffstat (limited to 'gcc/objc')
-rw-r--r--gcc/objc/ChangeLog6
-rw-r--r--gcc/objc/objc-next-runtime-abi-02.c4
2 files changed, 8 insertions, 2 deletions
diff --git a/gcc/objc/ChangeLog b/gcc/objc/ChangeLog
index 5d632a6..0fc51e65bd 100644
--- a/gcc/objc/ChangeLog
+++ b/gcc/objc/ChangeLog
@@ -1,3 +1,9 @@
+2017-08-09 Marek Polacek <polacek@redhat.com>
+
+ PR c/81417
+ * objc-next-runtime-abi-02.c (build_v2_build_objc_method_call): Update
+ a call to build_conditional_expr.
+
2017-08-08 Martin Liska <mliska@suse.cz>
* objc-gnu-runtime-abi-01.c: Include header files.
diff --git a/gcc/objc/objc-next-runtime-abi-02.c b/gcc/objc/objc-next-runtime-abi-02.c
index a2245a4..0e7fd54 100644
--- a/gcc/objc/objc-next-runtime-abi-02.c
+++ b/gcc/objc/objc-next-runtime-abi-02.c
@@ -1647,8 +1647,8 @@ build_v2_build_objc_method_call (int super_flag, tree method_prototype,
/* ??? CHECKME. */
ret_val = build_conditional_expr (input_location,
ifexp, 1,
- ret_val, NULL_TREE,
- ftree, NULL_TREE);
+ ret_val, NULL_TREE, input_location,
+ ftree, NULL_TREE, input_location);
#endif
}
return ret_val;