diff options
author | Michael Meissner <meissner@linux.vnet.ibm.com> | 2016-06-13 19:17:11 +0000 |
---|---|---|
committer | Michael Meissner <meissner@linux.vnet.ibm.com> | 2016-06-13 19:17:11 +0000 |
commit | 96f074375cbd78b6d762d5c0896ff9b4be1ffdd6 (patch) | |
tree | e942205a85b1a2f2bd259b3da2e31b7303905c69 /gcc/ada/gcc-interface/utils.c | |
parent | 342a6bf41b8a442ff4325d51d6ee59a4f1402ff6 (diff) | |
parent | c7a32e1a058ac615030cdedc9194ac4d3bda0604 (diff) |
Merge up to 237393ibm/stage-test
git-svn-id: https://gcc.gnu.org/svn/gcc/branches/ibm/stage-test@237398 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/ada/gcc-interface/utils.c')
-rw-r--r-- | gcc/ada/gcc-interface/utils.c | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/gcc/ada/gcc-interface/utils.c b/gcc/ada/gcc-interface/utils.c index 831b6e035aa..1f1e4d3b814 100644 --- a/gcc/ada/gcc-interface/utils.c +++ b/gcc/ada/gcc-interface/utils.c @@ -5833,10 +5833,14 @@ handle_nonnull_attribute (tree *node, tree ARG_UNUSED (name), /* If no arguments are specified, all pointer arguments should be non-null. Verify a full prototype is given so that the arguments - will have the correct types when we actually check them later. */ + will have the correct types when we actually check them later. + Avoid diagnosing type-generic built-ins since those have no + prototype. */ if (!args) { - if (!prototype_p (type)) + if (!prototype_p (type) + && (!TYPE_ATTRIBUTES (type) + || !lookup_attribute ("type generic", TYPE_ATTRIBUTES (type)))) { error ("nonnull attribute without arguments on a non-prototype"); *no_add_attrs = true; |