diff options
author | Paolo Carlini <paolo.carlini@oracle.com> | 2012-10-09 10:01:31 +0000 |
---|---|---|
committer | Paolo Carlini <paolo@gcc.gnu.org> | 2012-10-09 10:01:31 +0000 |
commit | 5d9de0d0a5b5e807c92f01712e8dad06e0dfae75 (patch) | |
tree | 4a7ba5472d1488e9d3da4e504e9a346b75459b6b /gcc/tree.h | |
parent | 3b86789289cb2469341283dd2ee86d5c5b1bd30f (diff) | |
download | gcc-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.h | 5 |
1 files changed, 4 insertions, 1 deletions
@@ -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) |