From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 514553858407; Thu, 3 Nov 2022 14:38:30 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 514553858407 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1667486316; bh=TK2HkfO9CQc858joykJYDVuK8kDzTOHrvm173Ii8I34=; h=From:To:Subject:Date:In-Reply-To:References:From; b=xXuAu5hWZ64GX2EIB/5NpS3QRq2oVrm0G7UHvEwnCJtEncI3msIJlZ9RCuCv3X0Rh tFMLG8iV/Rjg/MpruzFDuVgAZxaO1kwA8r6F3viGrud09cUkWH6Y04lJT0x5xYmJ88 2P0qBWTW2MQgFavno/EF8kXsokpyZaSb+j5K1RX0= From: "jason at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug libstdc++/44952] #include implies global constructor. Date: Thu, 03 Nov 2022 14:38:27 +0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: libstdc++ X-Bugzilla-Version: 4.6.0 X-Bugzilla-Keywords: X-Bugzilla-Severity: enhancement X-Bugzilla-Who: jason at gcc dot gnu.org X-Bugzilla-Status: NEW X-Bugzilla-Resolution: X-Bugzilla-Priority: P3 X-Bugzilla-Assigned-To: unassigned at gcc dot gnu.org X-Bugzilla-Target-Milestone: --- X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: everconfirmed cf_reconfirmed_on cc bug_status Message-ID: In-Reply-To: References: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Bugzilla-URL: http://gcc.gnu.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 List-Id: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D44952 Jason Merrill changed: What |Removed |Added ---------------------------------------------------------------------------- Ever confirmed|0 |1 Last reconfirmed| |2022-11-03 CC| |jason at gcc dot gnu.org, | |ppalka at gcc dot gnu.org Status|UNCONFIRMED |NEW --- Comment #17 from Jason Merrill --- The __ioinit hack won't work with the move to modules, and it doesn't seem necessary either: For programs that use libstdc++ as a shared library, it should be fine for = the initialization to run in the library, before the main program is loaded. For programs that use a static libstdc++, attribute init_priority should be sufficient to make sure it runs first.=