public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
From: "redi at gcc dot gnu.org" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug libstdc++/44952] #include <iostream> implies global constructor.
Date: Thu, 10 Dec 2020 16:03:44 +0000	[thread overview]
Message-ID: <bug-44952-4-8P6FtR6P3G@http.gcc.gnu.org/bugzilla/> (raw)
In-Reply-To: <bug-44952-4@http.gcc.gnu.org/bugzilla/>

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=44952

--- Comment #16 from Jonathan Wakely <redi at gcc dot gnu.org> ---
(In reply to Jonathan Wakely from comment #5)
> 27.4 [iostream.objects] paragraph 2
> The results of including <iostream> in a translation unit shall be as if
> <iostream> defined an instance of ios_base::Init with static storage
> duration. Similarly, the entire program shall behave as if there were at
> least one instance of ios_base::Init with static storage duration.

N.B. https://wg21.link/lwg2765 removed that last sentence, so we are no longer
required to run the stream initialization in all programs. Only in programs
which include <iostream> in at least one TU.

  parent reply	other threads:[~2020-12-10 16:03 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <bug-44952-4@http.gcc.gnu.org/bugzilla/>
2010-12-14 18:50 ` ccoutant at gcc dot gnu.org
2020-12-10 16:03 ` redi at gcc dot gnu.org [this message]
2022-11-03 14:38 ` jason at gcc dot gnu.org
2022-11-03 18:36 ` ppalka at gcc dot gnu.org
2022-11-06 16:16 ` cvs-commit at gcc dot gnu.org
2010-07-15 15:51 [Bug libstdc++/44952] New: #include <iostream.h> imply " hubicka at gcc dot gnu dot org
2010-07-15 18:26 ` [Bug libstdc++/44952] #include <iostream> implies " paolo dot carlini at oracle dot com
2010-07-22  0:02 ` pinskia at gcc dot gnu dot org
2010-07-22 11:04 ` jakub at gcc dot gnu dot org
2010-07-22 11:25 ` paolo dot carlini at oracle dot com
2010-07-22 11:41 ` jakub at gcc dot gnu dot org
2010-08-19  9:39 ` hubicka at gcc dot gnu dot org

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=bug-44952-4-8P6FtR6P3G@http.gcc.gnu.org/bugzilla/ \
    --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).