From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 9237 invoked by alias); 20 Feb 2005 02:46:37 -0000 Mailing-List: contact gcc-bugs-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Archive: List-Post: List-Help: Sender: gcc-bugs-owner@gcc.gnu.org Received: (qmail 9229 invoked by uid 48); 20 Feb 2005 02:46:33 -0000 Date: Sun, 20 Feb 2005 15:07:00 -0000 Message-ID: <20050220024633.9228.qmail@sourceware.org> From: "davids at webmaster dot com" To: gcc-bugs@gcc.gnu.org In-Reply-To: <20050220004607.20099.davids@webmaster.com> References: <20050220004607.20099.davids@webmaster.com> Reply-To: gcc-bugzilla@gcc.gnu.org Subject: [Bug c++/20099] -pthreads should imply -fno-threadsafe-statics X-Bugzilla-Reason: CC X-SW-Source: 2005-02/txt/msg02337.txt.bz2 List-Id: ------- Additional Comments From davids at webmaster dot com 2005-02-20 02:46 ------- In your example: class A { A(); int t; }; void f() { static A a; } I don't get it. What's the problem with this? Obviously, if you plan to call 'f()' from multiple threads, you must do it while holding a mutex because it might modify 'a'. This is just like any other function that modifies (or might modify) data. -- What |Removed |Added ---------------------------------------------------------------------------- Status|RESOLVED |UNCONFIRMED Resolution|INVALID | http://gcc.gnu.org/bugzilla/show_bug.cgi?id=20099