public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
From: "qrczak at knm dot org dot pl" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug c++/20099] -pthreads should imply -fno-threadsafe-statics
Date: Fri, 25 Feb 2005 01:41:00 -0000	[thread overview]
Message-ID: <20050224210642.32182.qmail@sourceware.org> (raw)
In-Reply-To: <20050220004607.20099.davids@webmaster.com>


------- Additional Comments From qrczak at knm dot org dot pl  2005-02-24 21:06 -------
> First, if we're talking about pthreads programs, which is the only case I'm
> suggesting removing the locking for, then those programs are already broken.

They are non-portable no matter how static initializers are done: C++ doesn't
include threads and POSIX doesn't include C++.

> If GCC/G++ are going to have non-portable features that make code work
> when they're enabled and break when they're disabled, they definitely
> should not be on by default.

Taking portability aside (as they are already non-portable), this is a wonderful
quote when taken out of context. Yeah, if an option makes more code working and
its negation makes more code break, let's make the breaking variant the default :-)

> (Or are you seriously arguing that the C++ standard and the
> POSIX standard *require* this behavior?)

Of course not. Not yet anyhow.

For me static locals in C++ are the equivalent of pthread_once in C/POSIX. A
hypothetical C++/POSIX should make them MT-safe.

-- 


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


  parent reply	other threads:[~2005-02-24 21:06 UTC|newest]

Thread overview: 28+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-02-20 13:52 [Bug c++/20099] New: " davids at webmaster dot com
2005-02-20 14:17 ` [Bug c++/20099] " pinskia at gcc dot gnu dot org
2005-02-20 14:18 ` davids at webmaster dot com
2005-02-20 14:18 ` pinskia at gcc dot gnu dot org
2005-02-20 14:22 ` pinskia at gcc dot gnu dot org
2005-02-20 15:07 ` davids at webmaster dot com
2005-02-20 15:11 ` davids at webmaster dot com
2005-02-20 15:37 ` pinskia at gcc dot gnu dot org
2005-02-20 17:07 ` qrczak at knm dot org dot pl
2005-02-20 17:15 ` davids at webmaster dot com
2005-02-20 18:12 ` qrczak at knm dot org dot pl
2005-02-21  9:29 ` davids at webmaster dot com
2005-02-21 12:04 ` qrczak at knm dot org dot pl
2005-02-21 15:45 ` gniccolai at yahoo dot com
2005-02-21 16:34 ` davids at webmaster dot com
2005-02-22 15:59 ` gniccolai at yahoo dot com
2005-02-23 11:55 ` davids at webmaster dot com
2005-02-23 11:57 ` qrczak at knm dot org dot pl
2005-02-23 12:26 ` pinskia at gcc dot gnu dot org
2005-02-23 12:28 ` davids at webmaster dot com
2005-02-24 15:28 ` gniccolai at yahoo dot com
2005-02-24 20:00 ` gniccolai at yahoo dot com
2005-02-24 22:02 ` qrczak at knm dot org dot pl
2005-02-25  1:37 ` davids at webmaster dot com
2005-02-25  1:41 ` qrczak at knm dot org dot pl [this message]
2005-02-25  3:30 ` davids at webmaster dot com
2005-02-25  4:37 ` qrczak at knm dot org dot pl
2005-02-25  8:06 ` davids at webmaster dot com

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20050224210642.32182.qmail@sourceware.org \
    --to=gcc-bugzilla@gcc.gnu.org \
    --cc=gcc-bugs@gcc.gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).