From f1ee30b65803785f18cddb7ba541c6b4275c52f2 Mon Sep 17 00:00:00 2001 From: David Malcolm Date: Mon, 6 Nov 2017 17:12:46 -0500 Subject: [PATCH 15/25] {[07/14], approved} v2: reject_gcc_builtin: strip any location wrappers Otherwise pr70144-1.c breaks. gcc/c-family/ChangeLog: * c-common.c (reject_gcc_builtin): Strip any location from EXPR. --- gcc/c-family/c-common.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/gcc/c-family/c-common.c b/gcc/c-family/c-common.c index 6a343a3..dc4aa17 100644 --- a/gcc/c-family/c-common.c +++ b/gcc/c-family/c-common.c @@ -7830,6 +7830,8 @@ reject_gcc_builtin (const_tree expr, location_t loc /* = UNKNOWN_LOCATION */) if (TREE_CODE (expr) == ADDR_EXPR) expr = TREE_OPERAND (expr, 0); + STRIP_ANY_LOCATION_WRAPPER (expr); + if (TREE_TYPE (expr) && TREE_CODE (TREE_TYPE (expr)) == FUNCTION_TYPE && TREE_CODE (expr) == FUNCTION_DECL -- 1.8.5.3