From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-ed1-x52e.google.com (mail-ed1-x52e.google.com [IPv6:2a00:1450:4864:20::52e]) by sourceware.org (Postfix) with ESMTPS id 7B4FD3954464 for ; Thu, 2 Jun 2022 09:09:19 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 7B4FD3954464 Received: by mail-ed1-x52e.google.com with SMTP id z7so5395080edm.13 for ; Thu, 02 Jun 2022 02:09:19 -0700 (PDT) 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=FBgl35VK+AjIl+FxYIMc48VLKS2vBnEZRcC8Tnj/Xjg=; b=cNPidUY8B+7jnfajuKv8hoH8z9Ep7ru8JbpAVxw01PZ8VkzH326nPmUYFLgBjXF6RM sqIPJChKodzdx8tm7QTQe1yCyB4k3j+BGfDmZ1OBp8XOkl4vGaeTJm+X4z41di80tzkk fxFL1ysgwhgEh5a0SeaG3g78n76JT1bzEj3fO+c8CSGiul3JJ3LRPGHVs9Q73WpSZit1 NVYxe6SxTAUkhoagL+W7uLrPAEhH6bqGfo/bllfOc1P8utqdA8RPkuJb8FCiT3qxyAtq pjtyN6KFNoAwr88lDOMuygsbPag7igV8hlkphoOOQ9EvPSHVu6jneFz52FPgmBUDfYZN rFwg== X-Gm-Message-State: AOAM533wy8l1IYyaLTNNawpXknqqx/7ygEg8bFdtBNKKZCDPE++arzfU pE7zcE+G+6rx+It+M1PJ9dbzycm6uJUVMA== X-Google-Smtp-Source: ABdhPJzagaR3HFidpGHgFjrauHq2/tqVEjqamDf9za6H7nWzsbPb14OO1BZEFIff7fVGKjM5qGUDVQ== X-Received: by 2002:a50:fb99:0:b0:42d:e4fd:c368 with SMTP id e25-20020a50fb99000000b0042de4fdc368mr4178056edq.138.1654160958295; Thu, 02 Jun 2022 02:09:18 -0700 (PDT) Received: from adacore.com ([45.147.211.82]) by smtp.gmail.com with ESMTPSA id b9-20020a056402138900b0042acd78014esm2161692edv.11.2022.06.02.02.09.17 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 02 Jun 2022 02:09:17 -0700 (PDT) Date: Thu, 2 Jun 2022 09:09:17 +0000 From: Pierre-Marie de Rodat To: gcc-patches@gcc.gnu.org Cc: Ghjuvan Lacambre Subject: [Ada] Fix record layout warnings not being tagged Message-ID: <20220602090917.GA1011046@adacore.com> MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="qDbXVdCdHGoSgWSk" Content-Disposition: inline X-Spam-Status: No, score=-13.2 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, T_SCC_BODY_TEXT_LINE 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.29 Precedence: list List-Id: Gcc-patches mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 02 Jun 2022 09:09:20 -0000 --qDbXVdCdHGoSgWSk Content-Type: text/plain; charset=us-ascii Content-Disposition: inline This allows tools ingesting GNAT's output to properly classify these messages. Tested on x86_64-pc-linux-gnu, committed on trunk gcc/ada/ * gcc-interface/decl.cc (warn_on_field_placement): Add insertion character '.q' to warning string. --qDbXVdCdHGoSgWSk Content-Type: text/x-diff; charset=us-ascii Content-Disposition: attachment; filename="patch.diff" diff --git a/gcc/ada/gcc-interface/decl.cc b/gcc/ada/gcc-interface/decl.cc --- a/gcc/ada/gcc-interface/decl.cc +++ b/gcc/ada/gcc-interface/decl.cc @@ -7770,20 +7770,20 @@ warn_on_field_placement (tree gnu_field, Node_Id gnat_component_list, const char *msg1 = in_variant - ? "??variant layout may cause performance issues" - : "??record layout may cause performance issues"; + ? "?.q?variant layout may cause performance issues" + : "?.q?record layout may cause performance issues"; const char *msg2 = Ekind (gnat_field) == E_Discriminant - ? "??discriminant & whose length is not multiple of a byte" + ? "?.q?discriminant & whose length is not multiple of a byte" : field_has_self_size (gnu_field) - ? "??component & whose length depends on a discriminant" + ? "?.q?component & whose length depends on a discriminant" : field_has_variable_size (gnu_field) - ? "??component & whose length is not fixed" - : "??component & whose length is not multiple of a byte"; + ? "?.q?component & whose length is not fixed" + : "?.q?component & whose length is not multiple of a byte"; const char *msg3 = do_reorder - ? "??comes too early and was moved down" - : "??comes too early and ought to be moved down"; + ? "?.q?comes too early and was moved down" + : "?.q?comes too early and ought to be moved down"; post_error (msg1, gnat_field); post_error_ne (msg2, gnat_field, gnat_field); --qDbXVdCdHGoSgWSk--