aboutsummaryrefslogtreecommitdiff
path: root/gcc/tree.h
diff options
context:
space:
mode:
authorPaolo Carlini <paolo.carlini@oracle.com>2012-10-09 10:01:31 +0000
committerPaolo Carlini <paolo@gcc.gnu.org>2012-10-09 10:01:31 +0000
commit5d9de0d0a5b5e807c92f01712e8dad06e0dfae75 (patch)
tree4a7ba5472d1488e9d3da4e504e9a346b75459b6b /gcc/tree.h
parent3b86789289cb2469341283dd2ee86d5c5b1bd30f (diff)
downloadgcc-5d9de0d0a5b5e807c92f01712e8dad06e0dfae75.zip
gcc-5d9de0d0a5b5e807c92f01712e8dad06e0dfae75.tar.gz
gcc-5d9de0d0a5b5e807c92f01712e8dad06e0dfae75.tar.bz2
re PR c++/54194 (misleading suggestion about arithmetic in operand of '|')
2012-10-09 Paolo Carlini <paolo.carlini@oracle.com> PR c++/54194 * tree.h: Add EXPR_LOC_OR_LOC. c-family/ 2012-10-09 Paolo Carlini <paolo.carlini@oracle.com> PR c++/54194 * c-common.c (warn_about_parentheses): Add location_t parameter; use EXPR_LOC_OR_LOC. * c-common.h: Update declaration. c/ 2012-10-09 Paolo Carlini <paolo.carlini@oracle.com> PR c++/54194 * c-typeck.c (parser_build_binary_op): Update warn_about_parentheses call. /cp 2012-10-09 Paolo Carlini <paolo.carlini@oracle.com> PR c++/54194 * typeck.c (build_x_binary_op): Update warn_about_parentheses call. * parser.c (cp_parser_binary_expression): Use SET_EXPR_LOCATION on current.lhs. /testsuite 2012-10-09 Paolo Carlini <paolo.carlini@oracle.com> PR c++/54194 * g++.dg/warn/Wparentheses-26.C: Adjust. * g++.dg/warn/Wparentheses-27.C: New. From-SVN: r192246
Diffstat (limited to 'gcc/tree.h')
-rw-r--r--gcc/tree.h5
1 files changed, 4 insertions, 1 deletions
diff --git a/gcc/tree.h b/gcc/tree.h
index e7cef18..12e7948 100644
--- a/gcc/tree.h
+++ b/gcc/tree.h
@@ -1619,7 +1619,10 @@ struct GTY(()) tree_constructor {
!= UNKNOWN_LOCATION)
/* The location to be used in a diagnostic about this expression. Do not
use this macro if the location will be assigned to other expressions. */
-#define EXPR_LOC_OR_HERE(NODE) (EXPR_HAS_LOCATION (NODE) ? (NODE)->exp.locus : input_location)
+#define EXPR_LOC_OR_HERE(NODE) (EXPR_HAS_LOCATION (NODE) \
+ ? (NODE)->exp.locus : input_location)
+#define EXPR_LOC_OR_LOC(NODE, LOCUS) (EXPR_HAS_LOCATION (NODE) \
+ ? (NODE)->exp.locus : (LOCUS))
#define EXPR_FILENAME(NODE) LOCATION_FILE (EXPR_CHECK ((NODE))->exp.locus)
#define EXPR_LINENO(NODE) LOCATION_LINE (EXPR_CHECK (NODE)->exp.locus)