From patchwork Fri Nov 4 14:02:40 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Arnaud Charlet X-Patchwork-Id: 123644 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from sourceware.org (server1.sourceware.org [209.132.180.131]) by ozlabs.org (Postfix) with SMTP id 045CEB6F90 for ; Sat, 5 Nov 2011 01:03:11 +1100 (EST) Received: (qmail 27301 invoked by alias); 4 Nov 2011 14:03:03 -0000 Received: (qmail 27219 invoked by uid 22791); 4 Nov 2011 14:03:01 -0000 X-SWARE-Spam-Status: No, hits=-1.8 required=5.0 tests=AWL,BAYES_00 X-Spam-Check-By: sourceware.org Received: from rock.gnat.com (HELO rock.gnat.com) (205.232.38.15) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Fri, 04 Nov 2011 14:02:41 +0000 Received: from localhost (localhost.localdomain [127.0.0.1]) by filtered-rock.gnat.com (Postfix) with ESMTP id 53EF52BB20D; Fri, 4 Nov 2011 10:02:40 -0400 (EDT) Received: from rock.gnat.com ([127.0.0.1]) by localhost (rock.gnat.com [127.0.0.1]) (amavisd-new, port 10024) with LMTP id Y1gBUrEuFjCT; Fri, 4 Nov 2011 10:02:40 -0400 (EDT) Received: from kwai.gnat.com (kwai.gnat.com [205.232.38.4]) by rock.gnat.com (Postfix) with ESMTP id 40C932BB090; Fri, 4 Nov 2011 10:02:40 -0400 (EDT) Received: by kwai.gnat.com (Postfix, from userid 4192) id 3C20E3FEE8; Fri, 4 Nov 2011 10:02:40 -0400 (EDT) Date: Fri, 4 Nov 2011 10:02:40 -0400 From: Arnaud Charlet To: gcc-patches@gcc.gnu.org Cc: Robert Dewar Subject: [Ada] Message on rewriting loops is now an info message Message-ID: <20111104140240.GA22064@adacore.com> MIME-Version: 1.0 Content-Disposition: inline User-Agent: Mutt/1.5.20 (2009-06-14) 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 This patch changes the message for rewriting loops into an info message (really no reason to give a warning!). The following test was compiled with -gnatld7 -gnatj60 1. procedure SCOGoto is 2. X : Integer; 3. begin 4. X := 1; 5. <> | >>> info: code between label and backwards goto rewritten as loop 6. X := X + 1; 7. goto LUPE; 8. end SCOGoto; Tested on x86_64-pc-linux-gnu, committed on trunk 2011-11-04 Robert Dewar * par-labl.adb (Rewrite_As_Loop): Generate info msg rather than warning message. Index: par-labl.adb =================================================================== --- par-labl.adb (revision 180934) +++ par-labl.adb (working copy) @@ -6,7 +6,7 @@ -- -- -- B o d y -- -- -- --- Copyright (C) 1992-2010, Free Software Foundation, Inc. -- +-- Copyright (C) 1992-2011, Free Software Foundation, Inc. -- -- -- -- GNAT is free software; you can redistribute it and/or modify it under -- -- terms of the GNU General Public License as published by the Free Soft- -- @@ -340,6 +340,7 @@ New_Node (N_Loop_Statement, Sloc (Loop_Header)); Stat : Node_Id; Next_Stat : Node_Id; + begin Stat := Next (Loop_Header); while Stat /= Loop_End loop @@ -355,7 +356,7 @@ Remove (Loop_Header); Rewrite (Loop_End, Loop_Stmt); Error_Msg_N - ("code between label and backwards goto rewritten as loop?", + ("info: code between label and backwards goto rewritten as loop?", Loop_End); end Rewrite_As_Loop;