diff options
author | manu <manu@138bc75d-0d04-0410-961f-82ee72b054a4> | 2012-10-29 20:17:23 +0000 |
---|---|---|
committer | manu <manu@138bc75d-0d04-0410-961f-82ee72b054a4> | 2012-10-29 20:17:23 +0000 |
commit | 08fc53907357671236aa02a1873455b195211ab6 (patch) | |
tree | 505d7a759421766b1f73cc99ae4e8492d75f4a37 /gcc/tree.h | |
parent | 9ee27052cc24e1f93b22db6b30edfecc410add75 (diff) | |
download | gcc-08fc53907357671236aa02a1873455b195211ab6.tar.gz |
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: svn+ssh://gcc.gnu.org/svn/gcc/trunk@192963 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/tree.h')
-rw-r--r-- | gcc/tree.h | 4 |
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) |