aboutsummaryrefslogtreecommitdiff
path: root/gcc
diff options
context:
space:
mode:
authorMartin Sebor <msebor@redhat.com>2017-03-20 18:33:31 +0000
committerMartin Sebor <msebor@gcc.gnu.org>2017-03-20 12:33:31 -0600
commit9f5af26dacc26944d1a9db6e937afc6909d18e48 (patch)
tree6ee543e4fca8d5fd69365dce056667fcac68ee26 /gcc
parentb0ba96c2f1c648533eba004d93a29a11ee51b2f0 (diff)
downloadgcc-9f5af26dacc26944d1a9db6e937afc6909d18e48.zip
gcc-9f5af26dacc26944d1a9db6e937afc6909d18e48.tar.gz
gcc-9f5af26dacc26944d1a9db6e937afc6909d18e48.tar.bz2
PR c++/52477 - Wrong initialization order __attribute__((constructor)) vs static data access
* doc/extend.texi (attribute constructor): Document present limitation. From-SVN: r246288
Diffstat (limited to 'gcc')
-rw-r--r--gcc/ChangeLog5
-rw-r--r--gcc/doc/extend.texi6
2 files changed, 10 insertions, 1 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index 77952ff..188a561 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -1,3 +1,8 @@
+2017-03-20 Martin Sebor <msebor@redhat.com>
+
+ PR c++/52477
+ * doc/extend.texi (attribute constructor): Document present limitation.
+
2017-03-20 Kelvin Nilsen <kelvin@gcc.gnu.org>
PR target/79963
diff --git a/gcc/doc/extend.texi b/gcc/doc/extend.texi
index 143a7b7..dbeec60 100644
--- a/gcc/doc/extend.texi
+++ b/gcc/doc/extend.texi
@@ -2510,7 +2510,11 @@ if you have a constructor that allocates a resource and a destructor
that deallocates the same resource, both functions typically have the
same priority. The priorities for constructor and destructor
functions are the same as those specified for namespace-scope C++
-objects (@pxref{C++ Attributes}).
+objects (@pxref{C++ Attributes}). However, at present, the order in which
+constructors for C++ objects with static storage duration and functions
+decorated with attribute @code{constructor} are invoked is unspecified.
+In mixed declarations, attribute @code{init_priority} can be used to
+impose a specific ordering.
@item deprecated
@itemx deprecated (@var{msg})