diff options
author | Nathan Sidwell <nathan@acm.org> | 2020-01-24 04:19:36 -0800 |
---|---|---|
committer | Nathan Sidwell <nathan@acm.org> | 2020-01-24 04:19:36 -0800 |
commit | a1f6eff20e3bb32c5051e77093ee28faec2abca0 (patch) | |
tree | 2d0e39fd06f67a7cdae178eaa9c2dd86289a9be4 /libcpp | |
parent | e8e66971cdc6d1390d47a227899e2e340ff44d66 (diff) | |
download | gcc-a1f6eff20e3bb32c5051e77093ee28faec2abca0.zip gcc-a1f6eff20e3bb32c5051e77093ee28faec2abca0.tar.gz gcc-a1f6eff20e3bb32c5051e77093ee28faec2abca0.tar.bz2 |
Remove bogus __has_include controlling macro
I noticed, but ignored this code when addressing p80005, but having
fixed up defined(X) on the modules branch, I could see where it came
from, and it's obviously wrong as we've just pulled out a string
contant from the token.
* expr.c (parse_has_include): Remove bogus controlling macro code.
Diffstat (limited to 'libcpp')
-rw-r--r-- | libcpp/ChangeLog | 4 | ||||
-rw-r--r-- | libcpp/expr.c | 5 |
2 files changed, 4 insertions, 5 deletions
diff --git a/libcpp/ChangeLog b/libcpp/ChangeLog index 27a841b..e84c0da 100644 --- a/libcpp/ChangeLog +++ b/libcpp/ChangeLog @@ -1,3 +1,7 @@ +2020-01-24 Nathan Sidwell <nathan@acm.org> + + * expr.c (parse_has_include): Remove bogus controlling macro code. + 2020-01-20 Nathan Sidwell <nathan@acm.org> PR preprocessor/80005 diff --git a/libcpp/expr.c b/libcpp/expr.c index df21a4b..6c56803 100644 --- a/libcpp/expr.c +++ b/libcpp/expr.c @@ -2211,14 +2211,12 @@ parse_has_include (cpp_reader *pfile, cpp_hashnode *op, include_type type) pfile->state.angled_headers = false; bool bracket = token->type != CPP_STRING; - cpp_hashnode *node = NULL; char *fname = NULL; if (token->type == CPP_STRING || token->type == CPP_HEADER_NAME) { fname = XNEWVEC (char, token->val.str.len - 1); memcpy (fname, token->val.str.text + 1, token->val.str.len - 2); fname[token->val.str.len - 2] = '\0'; - node = token->val.node.node; } else if (token->type == CPP_LESS) fname = _cpp_bracket_include (pfile); @@ -2241,8 +2239,5 @@ parse_has_include (cpp_reader *pfile, cpp_hashnode *op, include_type type) cpp_error (pfile, CPP_DL_ERROR, "missing ')' after \"%s\" operand", NODE_NAME (op)); - if (node) - pfile->mi_ind_cmacro = node; - return result; } |