diff options
author | mpolacek <mpolacek@138bc75d-0d04-0410-961f-82ee72b054a4> | 2015-04-24 11:49:52 +0000 |
---|---|---|
committer | mpolacek <mpolacek@138bc75d-0d04-0410-961f-82ee72b054a4> | 2015-04-24 11:49:52 +0000 |
commit | 439606a90c79c921dc1d0bed9a3871448d8858c1 (patch) | |
tree | 2730887c7a54380acf79d1530758243bbd147d1a /gcc/input.h | |
parent | 81e2b8ad7daf06021e77d0629cc537d75dfa327c (diff) | |
download | gcc-439606a90c79c921dc1d0bed9a3871448d8858c1.tar.gz |
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.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@222406 138bc75d-0d04-0410-961f-82ee72b054a4
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 7a0483f730c..93eb6ed4c32 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); |