aboutsummaryrefslogtreecommitdiff
path: root/gcc/tree.h
diff options
context:
space:
mode:
authorManuel López-Ibáñez <manu@gcc.gnu.org>2012-10-29 20:17:23 +0000
committerManuel López-Ibáñez <manu@gcc.gnu.org>2012-10-29 20:17:23 +0000
commitf7c1b935ac06644a819d85dbcb20793731d691e0 (patch)
tree505d7a759421766b1f73cc99ae4e8492d75f4a37 /gcc/tree.h
parentdf78bbe8f44a31a06e98a519347fe6f46dc8318c (diff)
2012-10-29 Manuel López-Ibáñez <manu@gcc.gnu.org>
PR c/53066 c/ * c-decl.c (warn_if_shadowing): Do not warn if a variable shadows a function, unless the variable is a function or a pointer-to-function. gcc/ * tree.h (FUNCTION_POINTER_TYPE_P): New. testsuite/ * gcc.dg/Wshadow-4.c: New. * gcc.dg/Wshadow-4.h: New. git-svn-id: https://gcc.gnu.org/svn/gcc/trunk@192963 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/tree.h')
-rw-r--r--gcc/tree.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/gcc/tree.h b/gcc/tree.h
index c6a5eab5024..d921886c2ea 100644
--- a/gcc/tree.h
+++ b/gcc/tree.h
@@ -1066,6 +1066,10 @@ extern void omp_clause_range_check_failed (const_tree, const char *, int,
#define POINTER_TYPE_P(TYPE) \
(TREE_CODE (TYPE) == POINTER_TYPE || TREE_CODE (TYPE) == REFERENCE_TYPE)
+/* Nonzero if TYPE represents a pointer to function. */
+#define FUNCTION_POINTER_TYPE_P(TYPE) \
+ (POINTER_TYPE_P (TYPE) && TREE_CODE (TREE_TYPE (TYPE)) == FUNCTION_TYPE)
+
/* Nonzero if this type is a complete type. */
#define COMPLETE_TYPE_P(NODE) (TYPE_SIZE (NODE) != NULL_TREE)