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
This commit is contained in:
Martin Liska 2016-09-29 14:58:28 +02:00 committed by Martin Liska
parent 0ce1ecc7be
commit fa0a064ae8
4 changed files with 20 additions and 2 deletions

View File

@ -1,3 +1,8 @@
2016-09-29 Martin Liska <mliska@suse.cz>
* doc/extend.texi: Remove limitation of Objective C for
__attribute__((constructor)) and __attribute__((destructor)).
2016-09-29 Richard Biener <rguenther@suse.de>
PR tree-optimization/77768

View File

@ -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

View File

@ -1,3 +1,7 @@
2016-09-29 Martin Liska <mliska@suse.cz>
* objc/execute/construct1.m: New test.
2016-09-29 Richard Biener <rguenther@suse.de>
PR tree-optimization/77768

View File

@ -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;
}