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] New flag -gnatr (treat Restrictions as Warnings)


Tested on i686-linux, committed on trunk

A new compiler switch -gnatr (/TREAT_RESTRICTIONS_AS_WARNINGS in VMS)
causes pragma Restrictions to be treated as Restriction_Warnings, and
Profile as Profile_Warnings, and Ravenscar sets restriction waranings.

The following test

pragma Restrictions (No_Tasking);
procedure rwarn is
   task x is end;
   task body x is begin null; end;
begin
   null;
end;

compiled with -gnatr outputs:

     1. pragma Restrictions (No_Tasking);
     2. procedure rwarn is
     3.    task x is end;
           |
        >>> warning: violation of restriction "no_tasking" at line 1

     4.    task body x is begin null; end;
     5. begin
     6.    null;
     7. end;

2008-05-20  Robert Dewar  <dewar@adacore.com>

	* opt.ads (Treat_Restrictions_As_Warnings): New switch

	* sem_prag.adb, par-prag.adb, restrict.ads: Implement flag
	Treat_Restrictions_As_Warnings.

	* switch-c.adb: Recognize new switch -gnatr

	* usage.adb: Add line for -gnatr

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]