diff options
author | Marek Polacek <polacek@redhat.com> | 2015-04-24 11:49:52 +0000 |
---|---|---|
committer | Marek Polacek <mpolacek@gcc.gnu.org> | 2015-04-24 11:49:52 +0000 |
commit | b878781346e97ade9087d5c010e29ff09492b6fb (patch) | |
tree | 2730887c7a54380acf79d1530758243bbd147d1a /gcc/input.h | |
parent | 841e98017e81d5ef253119525e8d189c031a7fa2 (diff) | |
download | gcc-b878781346e97ade9087d5c010e29ff09492b6fb.zip gcc-b878781346e97ade9087d5c010e29ff09492b6fb.tar.gz gcc-b878781346e97ade9087d5c010e29ff09492b6fb.tar.bz2 |
re PR c/61534 (Wlogical-op should not warn when either operand comes from macro expansion)
PR c/61534
* input.h (from_macro_expansion_at): Define.
* c-common.c (warn_logical_operator): Bail if either operand comes
from a macro expansion.
* c-c++-common/pr61534-1.c: New test.
From-SVN: r222406
Diffstat (limited to 'gcc/input.h')
-rw-r--r-- | gcc/input.h | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/gcc/input.h b/gcc/input.h index 7a0483f..93eb6ed 100644 --- a/gcc/input.h +++ b/gcc/input.h @@ -70,6 +70,10 @@ extern location_t input_location; header, but expanded in a non-system file. */ #define in_system_header_at(LOC) \ (linemap_location_in_system_header_p (line_table, LOC)) +/* Return a positive value if LOCATION is the locus of a token that + comes from a macro expansion, O otherwise. */ +#define from_macro_expansion_at(LOC) \ + ((linemap_location_from_macro_expansion_p (line_table, LOC))) void dump_line_table_statistics (void); |