From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) by sourceware.org (Postfix) with ESMTPS id A41AC3858C60 for ; Thu, 16 Feb 2023 12:03:01 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org A41AC3858C60 Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=redhat.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=redhat.com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1676548981; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=L3djbPc7jJQH1rTMRil7D9WoZyvGBhSanwHYCGbZVxc=; b=ZO5+NI8uzrpxhe4VI+7L/xjb4f95L9s40z5fF78QNgoEFOGS9GhQD0yk3cuFoVmoqwK6uC 2cA65dTzBsMFRrS1l+eM/bNNvpomFf2KegQRnS184G6ophyS6QbtkwEzNRMX217w71AqWu BAhuMWeNtjs8T6Z3FPwXZKsw7HIp0jg= Received: from mail-lf1-f70.google.com (mail-lf1-f70.google.com [209.85.167.70]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_128_GCM_SHA256) id us-mta-635-YNXfoAdWPKaroGljB9z66w-1; Thu, 16 Feb 2023 07:03:00 -0500 X-MC-Unique: YNXfoAdWPKaroGljB9z66w-1 Received: by mail-lf1-f70.google.com with SMTP id i13-20020a056512340d00b004b8825890a1so815372lfr.1 for ; Thu, 16 Feb 2023 04:02:59 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=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=L3djbPc7jJQH1rTMRil7D9WoZyvGBhSanwHYCGbZVxc=; b=YuBFlQNfVdXeyff6xef8VkDeVzCRd7HWhU6UDBtImqStVDWZ38ASP3aR0QejCrUbHf WaF90leeOy2p4etqmNtdT4hhSo9DDGYjKXA+D03nq8P53QEzvnud9+9/Y2Fv6iNYLg2c MQJD/TO4g93WSQ84bpkeBKj/Be9L1IfqeVbZiIDPNBqm4KgDrrdLXCqJyRAQh7RTm3Da M2nc6dP1HVQr7vc9Nzmgj5cqV2jnxmFFWHI0xdoLgKIPpN+6W+0fwTkMVSUTNKG9WkXi 4WUAPGJCcR2rvNsOY5Z/PFepcFZL1BVyNpCFu9Ql9FR0S2eCxe83FgIqzVyAIGJxX7G7 6ctA== X-Gm-Message-State: AO0yUKUgZZ+O4zMIhs6rZpNEWkx1NQ+4DIcS4sNA5TJjR6kuqiMk/J8H 13Pr21noyjegPQADTmLZ4J2FBY3PFRA4Whj1hqsPiy/ZqLDur7dOkRWd+JE6zgWy83kTBaQwlTJ ugQHJ1f7040oOiRx4kZOxbmwysZgcrdo= X-Received: by 2002:ac2:54a7:0:b0:4db:1a8b:1b87 with SMTP id w7-20020ac254a7000000b004db1a8b1b87mr1414604lfk.8.1676548978675; Thu, 16 Feb 2023 04:02:58 -0800 (PST) X-Google-Smtp-Source: AK7set9Neq80bhsfLU/l/xm2ooPnc66LF95t6qBfSrk+ycxFrj+pKE/EAicCpkR5TlIEks3MB6u3qRdL0iO4EF2onj0= X-Received: by 2002:ac2:54a7:0:b0:4db:1a8b:1b87 with SMTP id w7-20020ac254a7000000b004db1a8b1b87mr1414596lfk.8.1676548978362; Thu, 16 Feb 2023 04:02:58 -0800 (PST) MIME-Version: 1.0 References: <20230216103030.94868-1-jwakely@redhat.com> In-Reply-To: From: Jonathan Wakely Date: Thu, 16 Feb 2023 12:02:47 +0000 Message-ID: Subject: Re: [committed] libstdc++: Fix uses of non-reserved names in headers To: Jakub Jelinek Cc: libstdc++@gcc.gnu.org, gcc-patches@gcc.gnu.org X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Type: text/plain; charset="UTF-8" X-Spam-Status: No, score=-3.4 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_NONE,RCVD_IN_MSPIKE_H2,SPF_HELO_NONE,SPF_NONE,TXREP autolearn=unavailable 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 Thu, 16 Feb 2023 at 11:45, Jakub Jelinek wrote: > > On Thu, Feb 16, 2023 at 11:47:54AM +0100, Jakub Jelinek via Gcc-patches wrote: > > On Thu, Feb 16, 2023 at 10:30:30AM +0000, Jonathan Wakely via Gcc-patches wrote: > > > Tested powerpc64le-linux. Pushed to trunk. > > > > > > These should be backported too. > > > > > > -- >8 -- > > > > > > The non-reserved names 'val' and 'dest' were being used in our headers > > > but haven't been added to the 17_intro/names.cc test. That's because > > > they are used by and > > > respecitvely on glibc-based systems. > > > > So, can't we for such problematic names add hacks, like some directory > > which the test adds as -isystem before the standard ones and contains > > Or do it the way you just did for PSTL, by including all the non-libstdc++ > headers used in libstdc++ headers before defining all the macros for the > non-reserved names, hopefully the system headers use include guards and > won't be included again. Yes, I tried that last week, and it didn't work. There was a diagnostic about __GLIBCXX__ being redefined, because of the { dg-add-options no_pch } directive. I can try again, or we can just use the existing solution of doing #undef val #undef dest for glibc and/or linux targets, so that we still test those names on other targets.