From: Martin Liska Date: Thu, 29 Sep 2016 12:58:28 +0000 (+0200) Subject: objc: update documetation and add test-case of X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=fa0a064ae8968d49a838d6b4272ea79c547a721b;p=gcc.git 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 --- 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; +}