This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug c++/13684] local static object variable constructed once but ctors and dtors called multiple times on same memory when called in multiple threads


------- Additional Comments From adah at netstd dot com  2005-04-18 09:06 -------
Function calls, memory barriers, (and "lock" operations?) are all overheads. I 
would like that

* GCC provide extensions so that GCC users can use memory barriers and 
threading calls in a platform-independent way, and
*
  - Revert the patch, or at least
  - Provide a command-line option (or pragma/attribute?) to disable/enable 
static initialization protection.

With the former, users can implement the protection as efficiently as
the compiler can (correct me if I am wrong). With the latter, the new GCC is 
still usable in some applications that require performance no less than C.

I am really worried that with the improvements introduced to GCC beginning with 
GCC 3, some of my applications are running slower and slower, though some 
problems only show up on Windows.

-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=13684


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]