This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Ada] pragma Warnings Off (str) should delete continuations


This patch improves the behavior of the form of pragma
Warnings where a string is given to match error text.
Now continuation lines preceding and following the deleted
message are also deleted (including the "in instantion" line)

These test programs should both compile without any warnings

pragma Warnings (Off, "*is an internal GNAT unit");
with System.OS_Lib;
procedure Warn2 is begin null; end;

procedure Bar4 is

   generic
      type F is (<>);
      type T is (<>);
   procedure Foo;

   procedure Foo is
      function Conv is new Unchecked_Conversion (F, T);
   begin
      null;
   end Foo;

   pragma Warnings (Off, "*types for unchecked conversion*");
   procedure Glorp is new Foo(Integer_32, Unsigned_64);
   pragma Warnings (On, "*types for unchecked conversion*");

begin
   null;
end Bar4;

Tested on x86_64-pc-linux-gnu, committed on trunk

2010-06-22  Robert Dewar  <dewar@adacore.com>

	* errout.adb (Finalize): Set Prev pointers.
	(Finalize): Delete continuations for deletion by warnings off(str).
	* erroutc.ads: Add Prev pointer to error message structure.

Attachment: difs
Description: Text document


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]