From patchwork Mon May 27 11:13:47 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Eric Botcazou X-Patchwork-Id: 1105750 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (mailfrom) smtp.mailfrom=gcc.gnu.org (client-ip=209.132.180.131; helo=sourceware.org; envelope-from=gcc-patches-return-501715-incoming=patchwork.ozlabs.org@gcc.gnu.org; receiver=) Authentication-Results: ozlabs.org; dmarc=none (p=none dis=none) header.from=adacore.com Authentication-Results: ozlabs.org; dkim=pass (1024-bit key; unprotected) header.d=gcc.gnu.org header.i=@gcc.gnu.org header.b="qj7xMDK3"; dkim-atps=neutral Received: from sourceware.org (server1.sourceware.org [209.132.180.131]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 45CDr86yrfz9s3Z for ; Mon, 27 May 2019 21:13:58 +1000 (AEST) DomainKey-Signature: a=rsa-sha1; c=nofws; d=gcc.gnu.org; h=list-id :list-unsubscribe:list-archive:list-post:list-help:sender:from :to:subject:date:message-id:mime-version:content-type :content-transfer-encoding; q=dns; s=default; b=m4S3R2H519HMZoaA sbsc6EIg/wWROe0TaHWGgffHx4lE+fORBADoWCXMITik8+bv+5MjoOxQYs26YkYW jfE0caEP6QvQE2lCJiAA5pyO8pPGGpjUxufzxgGJXiiJKp08YHhq1iuTwuneiKWc jIbFWWwX1s6oJV2A8jU18Kejg0o= DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=gcc.gnu.org; h=list-id :list-unsubscribe:list-archive:list-post:list-help:sender:from :to:subject:date:message-id:mime-version:content-type :content-transfer-encoding; s=default; bh=T3tMzk02Zk351ixOXXk+3+ 84GII=; b=qj7xMDK30lUvqH1RfD7ffjMbbTsLGW/c7YxVny8UHttWDDu5pZtCKz 4/K/AeejtVC2ojqGxz0d4zBsmfaT7Lek/1CIy6VuKkLio6haU9vq5IUFJOVMHv2h RkBwH5PylmqEyouUajelWAt9J8DwvELVk7nrBx2596VT4cqWhAO2Q= Received: (qmail 31166 invoked by alias); 27 May 2019 11:13:51 -0000 Mailing-List: contact gcc-patches-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Unsubscribe: List-Archive: List-Post: List-Help: Sender: gcc-patches-owner@gcc.gnu.org Delivered-To: mailing list gcc-patches@gcc.gnu.org Received: (qmail 31158 invoked by uid 89); 27 May 2019 11:13:51 -0000 Authentication-Results: sourceware.org; auth=none X-Spam-SWARE-Status: No, score=-6.9 required=5.0 tests=AWL, BAYES_00, GIT_PATCH_2, GIT_PATCH_3, RCVD_IN_DNSWL_NONE, SPF_PASS autolearn=ham version=3.3.1 spammy=preferably X-HELO: smtp.eu.adacore.com Received: from mel.act-europe.fr (HELO smtp.eu.adacore.com) (194.98.77.210) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Mon, 27 May 2019 11:13:50 +0000 Received: from localhost (localhost [127.0.0.1]) by filtered-smtp.eu.adacore.com (Postfix) with ESMTP id 795908137A for ; Mon, 27 May 2019 13:13:48 +0200 (CEST) Received: from smtp.eu.adacore.com ([127.0.0.1]) by localhost (smtp.eu.adacore.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id zFz0FiSkA4AA for ; Mon, 27 May 2019 13:13:48 +0200 (CEST) Received: from polaris.localnet (bon31-6-88-161-99-133.fbx.proxad.net [88.161.99.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.eu.adacore.com (Postfix) with ESMTPSA id 5C9A181343 for ; Mon, 27 May 2019 13:13:48 +0200 (CEST) From: Eric Botcazou To: gcc-patches@gcc.gnu.org Subject: [Ada] Fix minor warning issue Date: Mon, 27 May 2019 13:13:47 +0200 Message-ID: <5416066.6An7qLVlpd@polaris> MIME-Version: 1.0 Tested on x86_64-suse-linux, applied on the mainline, 9 and 8 branches. 2019-05-27 Eric Botcazou * gcc-interface/utils.c (maybe_pad_type): Issue the warning for the specific case of component types preferably. Index: gcc-interface/utils.c =================================================================== --- gcc-interface/utils.c (revision 271528) +++ gcc-interface/utils.c (working copy) @@ -1530,14 +1530,14 @@ built: generated for some other corresponding source entity. */ if (Comes_From_Source (gnat_entity)) { - if (Present (gnat_error_node)) - post_error_ne_tree ("{^ }bits of & unused?", - gnat_error_node, gnat_entity, - size_diffop (size, orig_size)); - else if (is_component_type) + if (is_component_type) post_error_ne_tree ("component of& padded{ by ^ bits}?", gnat_entity, gnat_entity, size_diffop (size, orig_size)); + else if (Present (gnat_error_node)) + post_error_ne_tree ("{^ }bits of & unused?", + gnat_error_node, gnat_entity, + size_diffop (size, orig_size)); } }