From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-pg1-x536.google.com (mail-pg1-x536.google.com [IPv6:2607:f8b0:4864:20::536]) by sourceware.org (Postfix) with ESMTPS id E1D843858C54 for ; Wed, 26 Apr 2023 19:10:34 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org E1D843858C54 Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=gmail.com Received: by mail-pg1-x536.google.com with SMTP id 41be03b00d2f7-517bdc9e81dso4454400a12.1 for ; Wed, 26 Apr 2023 12:10:34 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20221208; t=1682536233; x=1685128233; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:from:to:cc:subject:date :message-id:reply-to; bh=s0tQGGEI9p5Rq265ymbVA8/ieQLIExADOmwY/yu7JMM=; b=e7KQqU9nGaQXMqS1TLbrTL3btI31QQx23hMs8MMaxrfCMwAZXxjA5ws1sBxaPMqbmE D0ittC+Slafb1XSq1NvH/l15rhXFgnWnCe12uu8bTaC9ICu4XKQcEldwacYD4fbqvAZf HrJCPlTmggzQcZBV1VPBusnGO4mp/f23D9nZXjh3eYRmMs3h4N1S+uorw8fSo8MoP15/ P5oQS8j9p1L7tuJLX1iVFZF2gpPAPIrV9h5PpMhOEQQzIISZymwHywjO2i1ZpY4Xyp+f 7HX0rqbzDz/MqcB4uBEYIsBheytsK6QzJ/ZRI5DoptLspn6OqkcfsaY25KnXP/sySyy7 yAOQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1682536233; x=1685128233; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=s0tQGGEI9p5Rq265ymbVA8/ieQLIExADOmwY/yu7JMM=; b=NFwx19gdYj0IvuY+JJ8tSGrfkRFhB8vw9Fk9jjhQpyQXu0BaUDJA+xwiWE/sqmVG8h zbhnaRVCwdbzwVVULelQWHaeAKmEcoMDTejzDHZ64lap2abPMrWHKPz480QDdViKJUj+ 9w1HavnQjuJOynmX3lZOd3hlkrfCXb85i4cHfLe+pMy0PLKf2w3C+fedra4OfsC24Bki OWIN3r4D8ZXpdCm1+4XD28MckkOZ3eorpqSGfvsXkBbo4LxXVK48G7HMwcXKmoOmFpj8 rUIp/BaHI7p2/vqlrSCcguWEU+t3AxWf6cGPeQh/4vg8bDxhHnYMKG+20RZcs1xH/+kX 02jA== X-Gm-Message-State: AAQBX9f6CqK4WUpCc3JlnKdogX1XsS3+Y8+PvvkyrL6p63IJY1ty0CJY zVewnikbjs4K4up7LVUhtpsxQTbOjTJ90p3d5DI= X-Google-Smtp-Source: AKy350bTCEejTMBVyXSQL9Evi/LofmeHWSs30R0R2gB9AtwAMPtZ64BbamqGe5o9YPk6HZFVctHBhOmonIBAvznkCqY= X-Received: by 2002:a17:90b:1957:b0:23f:b609:e707 with SMTP id nk23-20020a17090b195700b0023fb609e707mr20495881pjb.2.1682536232741; Wed, 26 Apr 2023 12:10:32 -0700 (PDT) MIME-Version: 1.0 References: <20230426165347.599616-1-apinski@marvell.com> In-Reply-To: From: Andrew Pinski Date: Wed, 26 Apr 2023 12:10:20 -0700 Message-ID: Subject: Re: [PATCH] GCC-13/changes: Add note about iostream usage To: Jonathan Wakely Cc: Andrew Pinski , gcc-patches@gcc.gnu.org Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Spam-Status: No, score=-7.6 required=5.0 tests=BAYES_00,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_FROM,GIT_PATCH_0,KAM_SHORT,RCVD_IN_DNSWL_NONE,SPF_HELO_NONE,SPF_PASS,TXREP,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org List-Id: On Wed, Apr 26, 2023 at 12:07=E2=80=AFPM Jonathan Wakely via Gcc-patches wrote: > > On 26/04/23 09:53 -0700, Andrew Pinski wrote: > >This adds a note about iostream usage so it does not catch others > >in surpise like it has already. > > > >OK? > > Thanks, I agree we should add something, but have some comments below. > > >--- > > htdocs/gcc-13/changes.html | 5 +++++ > > 1 file changed, 5 insertions(+) > > > >diff --git a/htdocs/gcc-13/changes.html b/htdocs/gcc-13/changes.html > >index 70732ec0..7c83f7c4 100644 > >--- a/htdocs/gcc-13/changes.html > >+++ b/htdocs/gcc-13/changes.html > >@@ -25,6 +25,11 @@ You may also want to check out our > > > >

Caveats

> >
    > >+
  • libstdc++ uses constructors inside the library to initialize st= d::cout/std::cin, etc. > >+ instead of having it done in each source which uses iostream heade= r. > > We should use code font for std::cout, std::cin and iostream, and > style it as not just iostream. > > >+ This requires you to make sure the dynamic loader to load the new = libstdc++v3 library > >+ (examples of how to do this is to use -Wl,-rpath,... while linking= or LD_LIBRARY_PATH > >+ while running the program).
  • > > I think it would be better to link to > https://gcc.gnu.org/onlinedocs/libstdc++/manual/using_dynamic_or_shared.h= tml#manual.intro.using.linkage.dynamic > > How about: > >
  • For C++, construction of the global iostream objects > std::cout, std::cin etc. is now done > inside the standard library, instead of in every source file that > includes the <iostream> header. This change > improves the start-up performance of C++ programs, but it means that > code compiled with GCC 13.1 will crash if the correct version of > libstdc++.so is not used at runtime. See the > documentation > about using the right libstdc++.so at runtime. >
  • This looks better than my version. Thanks, Andrew > >