From patchwork Mon Jan 13 10:53:44 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: =?utf-8?q?Marc_Poulhi=C3=A8s?= X-Patchwork-Id: 104677 Return-Path: X-Original-To: patchwork@sourceware.org Delivered-To: patchwork@sourceware.org Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 008B83857713 for ; Mon, 13 Jan 2025 11:08:17 +0000 (GMT) X-Original-To: gcc-patches@gcc.gnu.org Delivered-To: gcc-patches@gcc.gnu.org Received: from mail-wm1-x330.google.com (mail-wm1-x330.google.com [IPv6:2a00:1450:4864:20::330]) by sourceware.org (Postfix) with ESMTPS id C88853857711 for ; Mon, 13 Jan 2025 10:54:12 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org C88853857711 Authentication-Results: sourceware.org; dmarc=pass (p=quarantine dis=none) header.from=adacore.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=adacore.com ARC-Filter: OpenARC Filter v1.0.0 sourceware.org C88853857711 Authentication-Results: server2.sourceware.org; arc=none smtp.remote-ip=2a00:1450:4864:20::330 ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1736765653; cv=none; b=L0mOguHfaOYtWPg5F13dKRkZxWQnTJ7KhnYL0/Ko/oTSM1Df6VPXxMWcHSQX62g9TTo40QzVDfSxIAAxALnu0JSktPytfQEbJR0ti33Wiwc/OV+fA2fXlK8/8jFwzLbq5/qMfRi/MksyIkrWB1BJ23pNSB4B7E95GCdRMAKXRzs= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1736765653; c=relaxed/simple; bh=rWjZNKf1G38SoIUWFD9V9rl2wYvt9WgtUwWEhg2e5QY=; h=DKIM-Signature:From:To:Subject:Date:Message-ID:MIME-Version; b=A67hO3OIv9uTxW80jNBbrqXbkl0yyI9WI+9UoEvVXoj1/8QrqCF6naHP/Qq9v/Hezg8Rr+8lnzRuIUg/uUeYVep9XNIarZ+NeJoLvSKDf1Qkl/U2udsMZSJyC/oPhx9GFw6xYHUngTl2LwuIRodQ2UuNzI6tmdgAv1Y7OwY83U4= ARC-Authentication-Results: i=1; server2.sourceware.org DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org C88853857711 Authentication-Results: sourceware.org; dkim=pass (2048-bit key, secure) header.d=adacore.com header.i=@adacore.com header.a=rsa-sha256 header.s=google header.b=Oq1ML5gn Received: by mail-wm1-x330.google.com with SMTP id 5b1f17b1804b1-43618283d48so29187785e9.1 for ; Mon, 13 Jan 2025 02:54:12 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=adacore.com; s=google; t=1736765651; x=1737370451; darn=gcc.gnu.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=wb2LZSkaO/oIJZgv5te77c9rZiZPxdvleDgvADV2qVs=; b=Oq1ML5gnXEW1dDYCG6b0kDHc/eXd0WOX2zpTL8GXWMHTyGIv11Gjk71Cxz/YCxhabC TiaAfWrAAuNXx5vNd/QebuE34N8VpjGZuk2fY+1cuZ75v48Cob8hajvHTRC7Cqsy7xbM I1LcYuGF08FuIrSGpJuc3C+XhfzIuW9aIcEx/2w6L99coIIdhdXf1IB2kyKXx4NkZzdB 4qh6ekOWCIw/OuUkWwsJt/Va/rd5PcPdFv49Tim6Mikf6i+5ooDQoOKLwQg/kqOKDp8T FA2eY3KkPonYLlZa88AHTYhwkoCsgWEpCvs0Qa70TNJXapT+FFSYUfvkV6cKJrAFFy3m duzQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1736765651; x=1737370451; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=wb2LZSkaO/oIJZgv5te77c9rZiZPxdvleDgvADV2qVs=; b=P9+QXONLPqPt9bVcgdQu0RJh0lWMtSTJnH0Q4KML54CmRtQnJ4PTVCttnTMW2e2Zi2 uvrwZ08ncbUceULHstl6nENtJ6k6Kq7LlKSewa5fNmg36MRmy4LuZHOCkkcqiYaYYE0Q WwPOCjHNI8QkLPrSSL4URoLA6jTLgfX/F3eHzsh94BEhysQaRM5YUCTBN/eNt58KuKnS p6R49wzCePogqIRw2UJWaX0ybrcGcId9yJSbTa+Rcl3A3hhQ52QGS7uRyvyMlxdGZXW8 j5pmDQVrg7l6iJIvZiUD4YedqHW5mlbiXNWDX9j/hYCDnhkBo5gsT2bGRLnCXLdhl0tZ jiRA== X-Gm-Message-State: AOJu0YzcNgf49FX+TeDO4NnL9bkeU/h13RF0V6VsT8X2F3ae3P4vtnLl G3NjPybJf22wqMETqbSQvC/Zl34/kpkkgiCOpM+7KUBal8HWO+HOV40zANlg58aIbd0wmwuHobc = X-Gm-Gg: ASbGncsJtoJbefDoAysVLQlAovzuJOl2c7vKMK4ZnTClve+V7KzBemBw264QzGYNgf+ WeUiSeAxJWjfHzYLAVOyVaZwYoQLEB8V9rAzGHosnlwW1AsMpazzN/8y8I1KCOeB2atx6o7Updg 4Zl4JlJaJicOIAZ4vQNWJNA+tc/P2dOOjiwoEIlVsxyb9RMvMp+clICdJoe2Ef0x0kV5jZucpAA Arh2le+5LNINX82fX/PfPKp31zTGsyI9FQnInIT6+VusFGlyTErEbAAvD+3QQwnLt7UrJYPOgQC Xxc0y5taf5x5Zx5UG/2PyyMuyx0ojPukyIqaN61ZB4xvPoYJE7VExbeTt5e0dSz7gkOZFwxm X-Google-Smtp-Source: AGHT+IHYfYD6f9qkZtQ4qkUw/HWwKjaH23ZC6KWv3zykhrqGQjqllhe1meVWCmaLh4982dxbt356vQ== X-Received: by 2002:a05:600c:3ca2:b0:434:9499:9e87 with SMTP id 5b1f17b1804b1-436e26e5159mr158568645e9.25.1736765651411; Mon, 13 Jan 2025 02:54:11 -0800 (PST) Received: from poulhies-Precision-5550.telnowedge.local (lmontsouris-659-1-24-67.w81-250.abo.wanadoo.fr. [81.250.175.67]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-38a8e3834fbsm11709138f8f.26.2025.01.13.02.54.10 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 13 Jan 2025 02:54:10 -0800 (PST) From: =?utf-8?q?Marc_Poulhi=C3=A8s?= To: gcc-patches@gcc.gnu.org Cc: Piotr Trojanek Subject: [COMMITTED 11/14] ada: Remove redundant parentheses inside unary operators (cont.) Date: Mon, 13 Jan 2025 11:53:44 +0100 Message-ID: <20250113105349.928779-11-poulhies@adacore.com> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20250113105349.928779-1-poulhies@adacore.com> References: <20250113105349.928779-1-poulhies@adacore.com> MIME-Version: 1.0 X-Spam-Status: No, score=-13.8 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, GIT_PATCH_0, RCVD_IN_DNSWL_NONE, SPF_HELO_NONE, SPF_PASS, 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 X-BeenThere: gcc-patches@gcc.gnu.org X-Mailman-Version: 2.1.30 Precedence: list List-Id: Gcc-patches mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: gcc-patches-bounces~patchwork=sourceware.org@gcc.gnu.org From: Piotr Trojanek GNAT already emits a style warning when redundant parentheses appear inside logical and short-circuit operators. A similar warning will be soon emitted for unary operators as well. This patch removes the redundant parentheses to avoid build errors. gcc/ada/ChangeLog: * libgnat/a-strunb.ads: Remove redundant parentheses inside NOT operators. Tested on x86_64-pc-linux-gnu, committed on master. --- gcc/ada/libgnat/a-strunb.ads | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/gcc/ada/libgnat/a-strunb.ads b/gcc/ada/libgnat/a-strunb.ads index 5a1427c31a2..60d57954e5c 100644 --- a/gcc/ada/libgnat/a-strunb.ads +++ b/gcc/ada/libgnat/a-strunb.ads @@ -432,8 +432,8 @@ is then J <= Index'Result - 1 else J - 1 in Index'Result .. Length (Source) - Pattern'Length) - then not (Search.Match - (To_String (Source), Pattern, Mapping, J)))), + then not Search.Match + (To_String (Source), Pattern, Mapping, J))), -- Otherwise, 0 is returned @@ -485,8 +485,8 @@ is then J <= Index'Result - 1 else J - 1 in Index'Result .. Length (Source) - Pattern'Length) - then not (Search.Match - (To_String (Source), Pattern, Mapping, J)))), + then not Search.Match + (To_String (Source), Pattern, Mapping, J))), -- Otherwise, 0 is returned @@ -591,8 +591,8 @@ is then J in From .. Index'Result - 1 else J - 1 in Index'Result .. From - Pattern'Length) - then not (Search.Match - (To_String (Source), Pattern, Mapping, J)))), + then not Search.Match + (To_String (Source), Pattern, Mapping, J))), -- Otherwise, 0 is returned @@ -655,8 +655,8 @@ is then J in From .. Index'Result - 1 else J - 1 in Index'Result .. From - Pattern'Length) - then not (Search.Match - (To_String (Source), Pattern, Mapping, J)))), + then not Search.Match + (To_String (Source), Pattern, Mapping, J))), -- Otherwise, 0 is returned