Patchwork [Ada] Message on rewriting loops is now an info message

login
register
mail settings
Submitter Arnaud Charlet
Date Nov. 4, 2011, 2:02 p.m.
Message ID <20111104140240.GA22064@adacore.com>
Download mbox | patch
Permalink /patch/123644/
State New
Headers show

Comments

Arnaud Charlet - Nov. 4, 2011, 2:02 p.m.
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.    <<LUPE>>
           |
        >>> 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  <dewar@adacore.com>

	* par-labl.adb (Rewrite_As_Loop): Generate info msg rather than
	warning message.

Patch

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;