From fa0a064ae8968d49a838d6b4272ea79c547a721b Mon Sep 17 00:00:00 2001 From: Martin Liska Date: Thu, 29 Sep 2016 14:58:28 +0200 Subject: [PATCH] objc: update documetation and add test-case of * doc/extend.texi: Remove limitation of Objective C for __attribute__((constructor)) and __attribute__((destructor)). * objc/execute/construct1.m: New test. From-SVN: r240618 --- gcc/ChangeLog | 5 +++++ gcc/doc/extend.texi | 2 -- gcc/testsuite/ChangeLog | 4 ++++ gcc/testsuite/objc/execute/construct1.m | 11 +++++++++++ 4 files changed, 20 insertions(+), 2 deletions(-) create mode 100644 gcc/testsuite/objc/execute/construct1.m diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 26dc3f95368..432b79047ed 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,8 @@ +2016-09-29 Martin Liska + + * doc/extend.texi: Remove limitation of Objective C for + __attribute__((constructor)) and __attribute__((destructor)). + 2016-09-29 Richard Biener PR tree-optimization/77768 diff --git a/gcc/doc/extend.texi b/gcc/doc/extend.texi index fcf86d320fe..49e68d7f947 100644 --- a/gcc/doc/extend.texi +++ b/gcc/doc/extend.texi @@ -2508,8 +2508,6 @@ same priority. The priorities for constructor and destructor functions are the same as those specified for namespace-scope C++ objects (@pxref{C++ Attributes}). -These attributes are not currently implemented for Objective-C@. - @item deprecated @itemx deprecated (@var{msg}) @cindex @code{deprecated} function attribute diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index 2fd9e97eede..3841aaf3b95 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,3 +1,7 @@ +2016-09-29 Martin Liska + + * objc/execute/construct1.m: New test. + 2016-09-29 Richard Biener PR tree-optimization/77768 diff --git a/gcc/testsuite/objc/execute/construct1.m b/gcc/testsuite/objc/execute/construct1.m new file mode 100644 index 00000000000..3de036dfdee --- /dev/null +++ b/gcc/testsuite/objc/execute/construct1.m @@ -0,0 +1,11 @@ +int i; + +void hello (void) __attribute__ ((constructor)); +void hello (void) { i = 1; } + +int main (void) { + if (i != 1) + return 1; + + return 0; +} -- 2.30.2