From patchwork Fri Jan 7 16:27:05 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Pierre-Marie de Rodat X-Patchwork-Id: 1576703 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: bilbo.ozlabs.org; dkim=pass (1024-bit key; unprotected) header.d=gcc.gnu.org header.i=@gcc.gnu.org header.a=rsa-sha256 header.s=default header.b=gYSyUAdC; dkim-atps=neutral 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+incoming=patchwork.ozlabs.org@gcc.gnu.org; receiver=) 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 bilbo.ozlabs.org (Postfix) with ESMTPS id 4JVpnj5t8Mz9t25 for ; Sat, 8 Jan 2022 03:38:49 +1100 (AEDT) Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id E2A723858037 for ; Fri, 7 Jan 2022 16:38:46 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org E2A723858037 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1641573526; bh=96ZjZFHRpa7DdCPOtelqrSPs1RdcmqCluI7Um7jsSV0=; h=Date:To:Subject:List-Id:List-Unsubscribe:List-Archive:List-Post: List-Help:List-Subscribe:From:Reply-To:Cc:From; b=gYSyUAdC6GmB0xXx2M8zg/ogLFwUp3hCHrK9YQMyuQMbJzG1WJA2GkbLmuc1Faejk 6ka7hzS84plP6hzt1v81jnpSpjP9ltn6CR+7WJNEvMYDcUL4+VGzvzi20dtS0f1Zkd 8inYJTngNA1lL9pZuIedWALEm8XRSCyuV4klnEqM= X-Original-To: gcc-patches@gcc.gnu.org Delivered-To: gcc-patches@gcc.gnu.org Received: from mail-wr1-x42e.google.com (mail-wr1-x42e.google.com [IPv6:2a00:1450:4864:20::42e]) by sourceware.org (Postfix) with ESMTPS id 0BE8C3857C5B for ; Fri, 7 Jan 2022 16:27:08 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 0BE8C3857C5B Received: by mail-wr1-x42e.google.com with SMTP id h10so1893394wrb.1 for ; Fri, 07 Jan 2022 08:27:07 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:date:from:to:cc:subject:message-id:mime-version :content-disposition; bh=96ZjZFHRpa7DdCPOtelqrSPs1RdcmqCluI7Um7jsSV0=; b=kQAAY6v+7T700VUAIr1TtahFIwBUdCU6tjMCjoV3EMG3UXyXWDCzFIPyOMDxlpEP72 kdvC3p8fg1ySPCevBp01XKbT44L3iT/DuoHWij7GVVxzTd1eF7oXn7h7fDJQb6ve/yMJ QgbXiayjaT7KzfT4MY/JZ38bqm6izucbstYy+99jo9vqqSB09g6mO+yn3n0+yhuEaTGV Zxu+lvKJPU+j09WSg1F6EX1HO+WfSCd9lfaqA4Gcb5Ij0ktO+e8e7pGdbJq0Awg1iYeW G2ljmuciAs6YzrZvn/9M+JaQSWIqmGD5z3nt2bZXfwHHDrmhGij8nb1eZgUjkjWx4HCG b/Gg== X-Gm-Message-State: AOAM5339l9cGvk2dNMDThq95zhwoyIzA9qN+1vsNbcwTw3VotcazwMK0 0T/v3WXY8Hxpn22fy7lsbQQ4mNJhSKdPJQ== X-Google-Smtp-Source: ABdhPJzVxqpzOBtyinbAdoe7H4zUic2Let9EskbIaDrY4Tu2rU0MkvlI8mEIMgek6WcEmQKiebEIPw== X-Received: by 2002:a05:6000:186e:: with SMTP id d14mr57033566wri.205.1641572827129; Fri, 07 Jan 2022 08:27:07 -0800 (PST) Received: from adacore.com ([45.147.211.82]) by smtp.gmail.com with ESMTPSA id b4sm5208295wrw.4.2022.01.07.08.27.06 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 07 Jan 2022 08:27:06 -0800 (PST) Date: Fri, 7 Jan 2022 16:27:05 +0000 To: gcc-patches@gcc.gnu.org Subject: [Ada] Fix inconsistent quoting in messages about compile-time errors Message-ID: <20220107162705.GA948351@adacore.com> MIME-Version: 1.0 Content-Disposition: inline X-Spam-Status: No, score=-13.1 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.4 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) 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: , X-Patchwork-Original-From: Pierre-Marie de Rodat via Gcc-patches From: Pierre-Marie de Rodat Reply-To: Pierre-Marie de Rodat Cc: Piotr Trojanek Errors-To: gcc-patches-bounces+incoming=patchwork.ozlabs.org@gcc.gnu.org Sender: "Gcc-patches" In some messages of the form "XXX_Error will be raised at run time" the XXX_Error was enclosed in quotes, in other it was not. Now all messages of this form are emitted without quotes. Note: in messages emitted from routine Possible_Local_Raise we still quote names of exceptions, but there indeed any exception name can appear and quotes seem to be the right choice. Tested on x86_64-pc-linux-gnu, committed on trunk gcc/ada/ * exp_ch4.adb (Raise_Accessibility_Error): Move exception name to the message string; move << control characters to the end, for consistency. * sem_ch6.adb (Analyze_Function_Return): Likewise. * sem_util.adb (Compile_Time_Constraint_Error): Likewise. * gcc-interface/decl.c (gnat_to_gnu_entity): Remove quotes around Storage_Error. * gcc-interface/trans.c (gnat_to_gnu): Remove quotes around Constraint_Error. gcc/testsuite/ * gnat.dg/aggr26.adb: Update expected error message. diff --git a/gcc/ada/exp_ch4.adb b/gcc/ada/exp_ch4.adb --- a/gcc/ada/exp_ch4.adb +++ b/gcc/ada/exp_ch4.adb @@ -11885,8 +11885,8 @@ package body Exp_Ch4 is Reason => PE_Accessibility_Check_Failed)); Set_Etype (N, Target_Type); - Error_Msg_N ("< (others => 0)); -- { dg-warning "\"Storage_Error\" will be raised at run time" } + H : array (Positive) of Row := (others => (others => 0)); -- { dg-warning "Storage_Error will be raised at run time" } begin null;