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 792913858C5F for ; Thu, 16 Feb 2023 12:03:01 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 792913858C5F 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-lj1-f198.google.com (mail-lj1-f198.google.com [209.85.208.198]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_128_GCM_SHA256) id us-mta-605-1bPzs-EMNDK_pPSgB4M7Uw-1; Thu, 16 Feb 2023 07:03:00 -0500 X-MC-Unique: 1bPzs-EMNDK_pPSgB4M7Uw-1 Received: by mail-lj1-f198.google.com with SMTP id f22-20020a05651c161600b002945cfdc512so406960ljq.20 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=OLU0m0eIkqr3rbePWnAxhbc+izDQrMo1SgI4L83YdcxTTEfNH5rrzIsosu7iYfpfQA 7QsMDRtNvEHi9LX8L3Banvm3NorwERS/0NWeyCjyVhGAaubzdPOJVu7HMiGM8AFRfpzK Wi++6WHvAswjLxDevYZhhSjXwcVa/nlPKPXTclkob8KB9/7PCcmLsE15vGBtcXnxkn+9 QT03gbwVNwzSCfG1nbOSwmdX1mFJ2Wbw2hoKvhFck2WjNsYp0sOKZ6QWZFH2VN/flrpd QUWOb9OBW13UkHlqiQhAEYzyDgk8ImoPTWTD3+1X1x+upqTpgXT69dhTE17bN0AVqLOS fpGw== X-Gm-Message-State: AO0yUKUkaLgYoeEBeBnZCR//iIja2KFk2agtwIQzIzFcBt/iymPzu5Jx NytHfEBf2aYkALldH1EAa400+yG1sDo87ofprYCY0Zyt/+u3q9PMYiiFDsjdolfyV6CDsKLQ0rX M3+Yx/GHhPHauQBsf5qutjsZfRjtXkjfV/A== X-Received: by 2002:ac2:54a7:0:b0:4db:1a8b:1b87 with SMTP id w7-20020ac254a7000000b004db1a8b1b87mr1414605lfk.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=-6.0 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=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 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.