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: "pinskia at gcc dot gnu dot org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 20 Feb 2005 01:14:51 -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 pinskia at gcc dot gnu dot org 2005-02-20 01:14 -------
No, see the following code:
class A
{
A();
int t;
};
void f()
{
static A a;
}
So how can someone know that A will modify memory? In fact the mutex is made sure so that a is only
initialized once.
--
What |Removed |Added
----------------------------------------------------------------------------
Status|UNCONFIRMED |RESOLVED
Resolution| |INVALID
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=20099