From 60d4173b756e7dde2eb263b6c913cc84be79be12 Mon Sep 17 00:00:00 2001 From: Jakub Jelinek Date: Mon, 26 Nov 2018 22:25:22 +0100 Subject: [PATCH] re PR testsuite/88090 (obj-c++.dg/attributes/method-nonnull-1.mm FAILs) PR testsuite/88090 * obj-c++.dg/attributes/method-nonnull-1.mm (my_size_t): New typedef. (MyArray::removeObjectAtIndex): Use my_size_t instead of size_t and expect it in diagnostics. From-SVN: r266486 --- gcc/testsuite/ChangeLog | 5 +++++ gcc/testsuite/obj-c++.dg/attributes/method-nonnull-1.mm | 6 ++++-- 2 files changed, 9 insertions(+), 2 deletions(-) diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index 7d65607b138..4043524049d 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,5 +1,10 @@ 2018-11-26 Jakub Jelinek + PR testsuite/88090 + * obj-c++.dg/attributes/method-nonnull-1.mm (my_size_t): New typedef. + (MyArray::removeObjectAtIndex): Use my_size_t instead of size_t and + expect it in diagnostics. + PR c++/86900 * g++.dg/debug/dwarf2/pr86900.C: New test. diff --git a/gcc/testsuite/obj-c++.dg/attributes/method-nonnull-1.mm b/gcc/testsuite/obj-c++.dg/attributes/method-nonnull-1.mm index f83c8537706..917416d74a1 100644 --- a/gcc/testsuite/obj-c++.dg/attributes/method-nonnull-1.mm +++ b/gcc/testsuite/obj-c++.dg/attributes/method-nonnull-1.mm @@ -5,6 +5,8 @@ #include #include +typedef __SIZE_TYPE__ my_size_t; + @interface MyArray { Class isa; @@ -25,8 +27,8 @@ + (void) removeObject: (id)object __attribute__ ((nonnull (2))); /* { dg-warning "exceeds the number of function parameters 3" } */ - (void) removeObject: (id)object __attribute__ ((nonnull (2))); /* { dg-warning "exceeds the number of function parameters 3" } */ -+ (void) removeObjectAtIndex: (size_t)object __attribute__ ((nonnull (1))); /* { dg-warning "refers to parameter type .size_t." } */ -- (void) removeObjectAtIndex: (size_t)object __attribute__ ((nonnull (1))); /* { dg-warning "refers to parameter type .size_t." } */ ++ (void) removeObjectAtIndex: (my_size_t)object __attribute__ ((nonnull (1))); /* { dg-warning "refers to parameter type .my_size_t." } */ +- (void) removeObjectAtIndex: (my_size_t)object __attribute__ ((nonnull (1))); /* { dg-warning "refers to parameter type .my_size_t." } */ + (void) removeObject: (id)object __attribute__ ((nonnull (MyArray))); /* { dg-error "" } */ /* { dg-warning "attribute argument is invalid" "" { target *-*-* } .-1 } */ -- 2.30.2