This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c++/20099] -pthreads should imply -fno-threadsafe-statics
- From: "gniccolai at yahoo dot com" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 20 Feb 2005 23:36:32 -0000
- Subject: [Bug c++/20099] -pthreads should imply -fno-threadsafe-statics
- References: <20050220004607.20099.davids@webmaster.com>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- Additional Comments From gniccolai at yahoo dot com 2005-02-20 23:36 -------
This comment is relevant regarding the C++ ABI closure on which this idea has
been derived:
http://groups.google.it/groups?q=g:thl3050439784d&dq=&hl=it&lr=&client=firefox-a&rls=org.mozilla:it-IT:official_s&selm=95e4efda.0502191504.315f1f3%40posting.google.com
That thing must be reopened and fixed asap.
Also, please read the thread carefully.
Locking arbitrarily any section of code, for any reason, outside the control of
the user is just wrong, because:
1) it prevents the code to use more efficient schemes if needed.
2) it prevents the code to forfait any locking if not needed.
3) it may even force different approaches and encapsulations into the final
code, which is not what C++ is meant.
This holds even if the code is inside a static initializer.
Bests,
Giancarlo Niccolai.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=20099