From patchwork Mon Feb 1 12:21:33 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Rainer Orth X-Patchwork-Id: 1434133 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=gcc.gnu.org (client-ip=8.43.85.97; helo=sourceware.org; envelope-from=gcc-patches-bounces@gcc.gnu.org; receiver=) Authentication-Results: ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=CeBiTec.Uni-Bielefeld.DE header.i=@CeBiTec.Uni-Bielefeld.DE header.a=rsa-sha256 header.s=20200306 header.b=jte7UymD; dkim-atps=neutral Received: from sourceware.org (server2.sourceware.org [8.43.85.97]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 4DTnB60X6dz9sXk for ; Mon, 1 Feb 2021 23:21:48 +1100 (AEDT) Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id B59673875467; Mon, 1 Feb 2021 12:21:41 +0000 (GMT) X-Original-To: gcc-patches@gcc.gnu.org Delivered-To: gcc-patches@gcc.gnu.org Received: from smtp.CeBiTec.Uni-Bielefeld.DE (smtp.CeBiTec.Uni-Bielefeld.DE [129.70.160.84]) by sourceware.org (Postfix) with ESMTPS id EE3EF384C005; Mon, 1 Feb 2021 12:21:37 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.3.2 sourceware.org EE3EF384C005 Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=CeBiTec.Uni-Bielefeld.DE Authentication-Results: sourceware.org; spf=none smtp.mailfrom=ro@cebitec.uni-bielefeld.de Received: from localhost (localhost [127.0.0.1]) by smtp.CeBiTec.Uni-Bielefeld.DE (Postfix) with ESMTP id 7ED0FB2FE; Mon, 1 Feb 2021 13:21:36 +0100 (CET) X-Virus-Scanned: amavisd-new at CeBiTec.Uni-Bielefeld.DE Received: from smtp.CeBiTec.Uni-Bielefeld.DE ([127.0.0.1]) by localhost (smtp.cebitec.uni-bielefeld.de [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id iVzSShe50NPz; Mon, 1 Feb 2021 13:21:35 +0100 (CET) Received: from manam.CeBiTec.Uni-Bielefeld.DE (p50855c8f.dip0.t-ipconnect.de [80.133.92.143]) by smtp.CeBiTec.Uni-Bielefeld.DE (Postfix) with ESMTPSA id C0C0DB8AC; Mon, 1 Feb 2021 13:21:33 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=CeBiTec.Uni-Bielefeld.DE; s=20200306; t=1612182093; bh=uonNOCkF/v9uELILOuCarakzwDTqQ5gGAo7Mu3lcr70=; h=From:To:Cc:Subject:Date:From; b=jte7UymDA9fvytIXgeDyBe2gajMEHL9IpXGpdG3SFhb3w2Jcz1LupXgpyu3nqX4/o Tv4v2bcgi1xUS6Uiklpl64MpKmj7BozSTSP3+Dtieg6JMfVdIvSg3n4mXpG2U4tQjB 9/pyV81Jgum4GtphOw1D6357giQKVs9yksS4l3hU+RzUela70THrzwtp1RaFZ0EzoT oQAZBWHl3Di6XTRMvDUAzoW8YzQfszBwrtceDdFQARgP4sEawGSIp9OpNkJuEbH/wY tqkdnc6Ge9MduZpQ6oIIST12AyvXtOVqvLkNBcAkW6BNIsiKbziTawCZSQZZn8khbR 8tJ7xhyvr3SOQ== From: Rainer Orth To: gcc-patches@gcc.gnu.org Subject: [PATCH] libstdc++: Don't use reserved identifiers in simd headers Date: Mon, 01 Feb 2021 13:21:33 +0100 Message-ID: User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.1.90 (usg-unix-v) MIME-Version: 1.0 X-Spam-Status: No, score=-3795.6 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, GIT_PATCH_0, RCVD_IN_DNSWL_LOW, SPF_HELO_NONE, SPF_NONE, TXREP autolearn=ham autolearn_force=no version=3.4.2 X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on server2.sourceware.org X-BeenThere: gcc-patches@gcc.gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gcc-patches mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: libstdc++@gcc.gnu.org, Matthias Kretz Errors-To: gcc-patches-bounces@gcc.gnu.org Sender: "Gcc-patches" Two simd tests FAIL on Solaris, both SPARC and x86: FAIL: experimental/simd/standard_abi_usable.cc -msse2 -O2 -Wno-psabi (test for excess errors) FAIL: experimental/simd/standard_abi_usable_2.cc -msse2 -O2 -Wno-psabi (test for excess errors) This happens because the simd headers use identifiers documented in the libstdc++ manual as reserved by system headers. Fixed as follows, tested on i386-pc-solaris2.11, sparc-sun-solaris2.11, and x86_64-pc-linux-gnu. Ok for master? As an aside, the use of vim: markers initially confused the hell out of me. As an Emacs user, I rarely use vi for much more than a pager, but when I wanted to check the lines mentioned in the g++ errors, I had no idea what was going on or how to disable the folding enabled there: // vim: foldmethod=marker sw=2 noet ts=8 sts=2 tw=80 I can't help but feel that this is just a personal preference and doesn't belong into the upstream code. For avoidance of doubt, I'd consider equivalent Emacs local variables equally inappropriate. Rainer # HG changeset patch # Parent 585afa0bd4a3567358ed9efd210d1a1dab740005 libstdc++: Don't use reserved identifiers in simd headers diff --git a/libstdc++-v3/include/experimental/bits/simd.h b/libstdc++-v3/include/experimental/bits/simd.h --- a/libstdc++-v3/include/experimental/bits/simd.h +++ b/libstdc++-v3/include/experimental/bits/simd.h @@ -201,8 +201,8 @@ template inline constexpr overaligned_tag<_Np> overaligned = {}; // }}} -template - using _SizeConstant = integral_constant; +template + using _SizeConstant = integral_constant; // unrolled/pack execution helpers // __execute_n_times{{{ @@ -4060,11 +4060,11 @@ template