From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-wm1-x333.google.com (mail-wm1-x333.google.com [IPv6:2a00:1450:4864:20::333]) by sourceware.org (Postfix) with ESMTPS id DA935385840D for ; Mon, 13 Dec 2021 11:09:09 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org DA935385840D Received: by mail-wm1-x333.google.com with SMTP id 133so11646646wme.0 for ; Mon, 13 Dec 2021 03:09:09 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:mime-version:subject:from:in-reply-to:date:cc :content-transfer-encoding:message-id:references:to; bh=8d2dfJnEvgEBXOZJIeu/0sjeEVb7k8stMPSUH1XGOQs=; b=l96LVpXilt39wRPwOJeYvLrV68mEr5FnTAWbTNtbia012hisymogZRA3cD9rpqf0WA F9PTo/NpFpdeVw3Vl01ifYABdZf7xfkOPEy+aSfhTWl59opZweaQwqrNGvDmLJ3BdIYA pA6D8dKuJE0A3mtthoiooqu4VbUY3l+PWZEPbOSM5Br5ugYsP7CfCTkmcwhxd9M8TBmX k3SIppycNn8caeyqQFIyN7f+9pIf9+VWAxUFSuF1Uyx1zIdvO1ZaVlVTUoGR7x12DKv2 quO83fI13AzR/dShlhaDjF0ml/PdXNydGETN/DarNh/5C2x0JlpCfXqxUySNwiry7MpI n4OA== X-Gm-Message-State: AOAM531mGsczFkP6FhZRL+o8OVoLOJPcTfCC9LWIHBVopgvAcRI6eKoV JW1BjOrB+bJIs+RFNHyBQtwYVg== X-Google-Smtp-Source: ABdhPJy6B/CRiSamqcyo2CJBe3aAAaRGIilbQuz9L4P2g0p/N6Quaw08/UATsUaZTzZwIh6VejBacQ== X-Received: by 2002:a1c:9a89:: with SMTP id c131mr36188179wme.80.1639393748193; Mon, 13 Dec 2021 03:09:08 -0800 (PST) Received: from smtpclient.apple ([2a02:2ab8:224:1:3d16:8778:21b1:218f]) by smtp.gmail.com with ESMTPSA id a1sm7623291wru.113.2021.12.13.03.09.07 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Mon, 13 Dec 2021 03:09:07 -0800 (PST) Content-Type: text/plain; charset=us-ascii Mime-Version: 1.0 (Mac OS X Mail 14.0 \(3654.100.0.2.22\)) Subject: Re: [PATCH] #undef isblank before def or decl in libstdc++ headers From: Olivier Hainque In-Reply-To: Date: Mon, 13 Dec 2021 12:09:07 +0100 Cc: Olivier Hainque , Jonathan Wakely , libstdc++ , gcc-patches Content-Transfer-Encoding: quoted-printable Message-Id: <23CB6D92-BE23-401F-8B8B-D2959203527D@adacore.com> References: <3913529E-3CB1-4758-B675-A8862869B238@adacore.com> To: Jonathan Wakely X-Mailer: Apple Mail (2.3654.100.0.2.22) X-Spam-Status: No, score=-2.4 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, RCVD_IN_DNSWL_NONE, SPF_HELO_NONE, SPF_PASS, TXREP autolearn=unavailable autolearn_force=no version=3.4.4 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on server2.sourceware.org X-BeenThere: libstdc++@gcc.gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Libstdc++ mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 13 Dec 2021 11:09:11 -0000 > On 11 Dec 2021, at 18:09, Jonathan Wakely = wrote: >=20 > * config/vxworks.h (VXWORKS_OS_CPP_BUILTINS): Define > _C99 for C++. >=20 > Makes sense? >=20 > Yes. I can't approve patches outside libstdc++, but that looks = definitely correct for C++11 and later, because C++11 incorporates the = whole C99 library by reference. So if that macro is needed to get the = C99 library (because the vxworks libc doesn't check the__cplusplus macro = and enable C99 features that way), then I agree _C99 should be defined = for C++11. Defining it for C++11 is sufficient to solve the isblank = problem, because std::isblank is only declared for C++11 and later. = (std::tr1::isblank is declared for C++98 if the C library supports it, = but nobody really cares about TR1 nowadays, and probably hardly anybody = cares about C++98). >=20 > Defining _C99 is not strictly correct for C++98 mode, because C++98 = incorporates the C89 library by reference. But as you noted in the = earlier patch, libstdc++ likes to have full C99 facilities available = even for C++98 mode (so it can use them for std::tr1 features, among = other things). So I think defining it even for C++98 is fine too. Testing looks good so far and libstdc++ configure is a lot happier indeed. Inspecting the logs spotted an inaccuracy in another area, which I'll address separately. Thanks a lot for your feedback! With Kind Regards, Olivier