aboutsummaryrefslogtreecommitdiff
path: root/gcc/builtins.c
diff options
context:
space:
mode:
authorTom de Vries <tom@codesourcery.com>2016-09-10 14:38:56 +0000
committerTom de Vries <vries@gcc.gnu.org>2016-09-10 14:38:56 +0000
commit5b28efbbf4abec11f013f4e76f5b55e2974737cf (patch)
tree3c42070a9bfa92bf3029b74813fd60d1dd925ccc /gcc/builtins.c
parentaf4b8a523322d6100b52d41ad12d7b602d01331b (diff)
downloadgcc-5b28efbbf4abec11f013f4e76f5b55e2974737cf.zip
gcc-5b28efbbf4abec11f013f4e76f5b55e2974737cf.tar.gz
gcc-5b28efbbf4abec11f013f4e76f5b55e2974737cf.tar.bz2
Make canonical_va_list_type more strict
2016-09-10 Tom de Vries <tom@codesourcery.com> PR C/71602 * builtins.c (std_canonical_va_list_type): Strictly return non-null for va_list type only. * config/i386/i386.c (ix86_canonical_va_list_type): Same. * gimplify.c (gimplify_va_arg_expr): Handle &va_list. * c-common.c (build_va_arg): Handle more strict targetm.canonical_va_list_type. Replace first argument type error with assert. * c-c++-common/va-arg-va-list-type.c: New test. From-SVN: r240072
Diffstat (limited to 'gcc/builtins.c')
-rw-r--r--gcc/builtins.c4
1 files changed, 0 insertions, 4 deletions
diff --git a/gcc/builtins.c b/gcc/builtins.c
index 4a2a398..e779c71 100644
--- a/gcc/builtins.c
+++ b/gcc/builtins.c
@@ -4087,10 +4087,6 @@ std_canonical_va_list_type (tree type)
{
tree wtype, htype;
- if (INDIRECT_REF_P (type))
- type = TREE_TYPE (type);
- else if (POINTER_TYPE_P (type) && POINTER_TYPE_P (TREE_TYPE (type)))
- type = TREE_TYPE (type);
wtype = va_list_type_node;
htype = type;
/* Treat structure va_list types. */