Commit 4351c21b by Arnaud Charlet

checks.adb (Determine_Range): Deal with values that might be invalid

2008-08-22  Robert Dewar  <dewar@adacore.com>

	* checks.adb (Determine_Range): Deal with values that might be invalid

	* opt.adb, opt.ads (Assume_No_Invalid_Values[_Config]): New configuration
	switches.

	* par-prag.adb: Dummy entry for pragma Assume_No_Invalid_Values

	* sem_prag.adb: Implement pragma Assume_No_Default_Values

	* snames.adb, snames.ads, snames.h:
	Add entries for pragma Assume_No_Invalid_Values

	* switch-c.adb: Add processing for -gnatB switch

	* usage.adb: Add entry for flag -gnatB (no bad invalid values)

From-SVN: r139484
parent 575a1b32
2008-08-22 Robert Dewar <dewar@adacore.com>
* checks.adb (Determine_Range): Deal with values that might be invalid
* opt.adb, opt.ads (Assume_No_Invalid_Values[_Config]): New configuration
switches.
* par-prag.adb: Dummy entry for pragma Assume_No_Invalid_Values
* sem_prag.adb: Implement pragma Assume_No_Default_Values
* snames.adb, snames.ads, snames.h:
Add entries for pragma Assume_No_Invalid_Values
* switch-c.adb: Add processing for -gnatB switch
* usage.adb: Add entry for flag -gnatB (no bad invalid values)
2008-08-22 Javier Miranda <miranda@adacore.com>
* exp_ch3.adb (Build_Init_Statements): Transfer to the body of the
init procedure all the expanded code associated with the spec of
task types and protected types.
2008-08-22 Gary Dismukes <dismukes@adacore.com> 2008-08-22 Gary Dismukes <dismukes@adacore.com>
* exp_aggr.adb (Static_Array_Aggregate): Call Analyze_And_Resolve on the * exp_aggr.adb (Static_Array_Aggregate): Call Analyze_And_Resolve on the
...@@ -3125,10 +3125,9 @@ package body Checks is ...@@ -3125,10 +3125,9 @@ package body Checks is
-- First step, change to use base type if the expression is an entity -- First step, change to use base type if the expression is an entity
-- which we do not know is valid. -- which we do not know is valid.
-- For now, we do not do this if Is_Entity_Name (N)
if False and then Is_Entity_Name (N)
and then not Is_Known_Valid (Entity (N)) and then not Is_Known_Valid (Entity (N))
and then not Assume_No_Invalid_Values
then then
Typ := Base_Type (Typ); Typ := Base_Type (Typ);
end if; end if;
......
...@@ -49,6 +49,7 @@ package body Opt is ...@@ -49,6 +49,7 @@ package body Opt is
Ada_Version_Config := Ada_Version; Ada_Version_Config := Ada_Version;
Ada_Version_Explicit_Config := Ada_Version_Explicit; Ada_Version_Explicit_Config := Ada_Version_Explicit;
Assertions_Enabled_Config := Assertions_Enabled; Assertions_Enabled_Config := Assertions_Enabled;
Assume_No_Invalid_Values_Config := Assume_No_Invalid_Values;
Check_Policy_List_Config := Check_Policy_List; Check_Policy_List_Config := Check_Policy_List;
Debug_Pragmas_Enabled_Config := Debug_Pragmas_Enabled; Debug_Pragmas_Enabled_Config := Debug_Pragmas_Enabled;
Dynamic_Elaboration_Checks_Config := Dynamic_Elaboration_Checks; Dynamic_Elaboration_Checks_Config := Dynamic_Elaboration_Checks;
...@@ -78,6 +79,7 @@ package body Opt is ...@@ -78,6 +79,7 @@ package body Opt is
Ada_Version := Save.Ada_Version; Ada_Version := Save.Ada_Version;
Ada_Version_Explicit := Save.Ada_Version_Explicit; Ada_Version_Explicit := Save.Ada_Version_Explicit;
Assertions_Enabled := Save.Assertions_Enabled; Assertions_Enabled := Save.Assertions_Enabled;
Assume_No_Invalid_Values := Save.Assume_No_Invalid_Values;
Check_Policy_List := Save.Check_Policy_List; Check_Policy_List := Save.Check_Policy_List;
Debug_Pragmas_Enabled := Save.Debug_Pragmas_Enabled; Debug_Pragmas_Enabled := Save.Debug_Pragmas_Enabled;
Dynamic_Elaboration_Checks := Save.Dynamic_Elaboration_Checks; Dynamic_Elaboration_Checks := Save.Dynamic_Elaboration_Checks;
...@@ -102,6 +104,7 @@ package body Opt is ...@@ -102,6 +104,7 @@ package body Opt is
Save.Ada_Version := Ada_Version; Save.Ada_Version := Ada_Version;
Save.Ada_Version_Explicit := Ada_Version_Explicit; Save.Ada_Version_Explicit := Ada_Version_Explicit;
Save.Assertions_Enabled := Assertions_Enabled; Save.Assertions_Enabled := Assertions_Enabled;
Save.Assume_No_Invalid_Values := Assume_No_Invalid_Values;
Save.Check_Policy_List := Check_Policy_List; Save.Check_Policy_List := Check_Policy_List;
Save.Debug_Pragmas_Enabled := Debug_Pragmas_Enabled; Save.Debug_Pragmas_Enabled := Debug_Pragmas_Enabled;
Save.Dynamic_Elaboration_Checks := Dynamic_Elaboration_Checks; Save.Dynamic_Elaboration_Checks := Dynamic_Elaboration_Checks;
...@@ -145,14 +148,17 @@ package body Opt is ...@@ -145,14 +148,17 @@ package body Opt is
Optimize_Alignment_Local := True; Optimize_Alignment_Local := True;
-- For an internal unit, assertions/debug pragmas are off unless this -- For an internal unit, assertions/debug pragmas are off unless this
-- is the main unit and they were explicitly enabled. -- is the main unit and they were explicitly enabled. We also make
-- sure we do not assume that values are necessarily valid.
if Main_Unit then if Main_Unit then
Assertions_Enabled := Assertions_Enabled_Config; Assertions_Enabled := Assertions_Enabled_Config;
Assume_No_Invalid_Values := Assume_No_Invalid_Values_Config;
Debug_Pragmas_Enabled := Debug_Pragmas_Enabled_Config; Debug_Pragmas_Enabled := Debug_Pragmas_Enabled_Config;
Check_Policy_List := Check_Policy_List_Config; Check_Policy_List := Check_Policy_List_Config;
else else
Assertions_Enabled := False; Assertions_Enabled := False;
Assume_No_Invalid_Values := False;
Debug_Pragmas_Enabled := False; Debug_Pragmas_Enabled := False;
Check_Policy_List := Empty; Check_Policy_List := Empty;
end if; end if;
...@@ -163,6 +169,7 @@ package body Opt is ...@@ -163,6 +169,7 @@ package body Opt is
Ada_Version := Ada_Version_Config; Ada_Version := Ada_Version_Config;
Ada_Version_Explicit := Ada_Version_Explicit_Config; Ada_Version_Explicit := Ada_Version_Explicit_Config;
Assertions_Enabled := Assertions_Enabled_Config; Assertions_Enabled := Assertions_Enabled_Config;
Assume_No_Invalid_Values := Assume_No_Invalid_Values_Config;
Check_Policy_List := Check_Policy_List_Config; Check_Policy_List := Check_Policy_List_Config;
Debug_Pragmas_Enabled := Debug_Pragmas_Enabled_Config; Debug_Pragmas_Enabled := Debug_Pragmas_Enabled_Config;
Dynamic_Elaboration_Checks := Dynamic_Elaboration_Checks_Config; Dynamic_Elaboration_Checks := Dynamic_Elaboration_Checks_Config;
......
...@@ -158,6 +158,15 @@ package Opt is ...@@ -158,6 +158,15 @@ package Opt is
-- GNAT -- GNAT
-- Enable assertions made using pragma Assert -- Enable assertions made using pragma Assert
Assume_No_Invalid_Values : Boolean := True;
-- ??? true for now, enable by setting to false later
-- GNAT
-- Normallly, in accordance with (RM 13.9.1 (9-11)) the front end assumes
-- that values could have invalid representations, unless it can clearly
-- prove that the values are valid. If this switch is set (by -gnatB or by
-- pragma Assume_No_Invalid_Values (Off)), then the compiler assumes values
-- are valid and in range of their representations.
Back_Annotate_Rep_Info : Boolean := False; Back_Annotate_Rep_Info : Boolean := False;
-- GNAT -- GNAT
-- If set True, enables back annotation of representation information -- If set True, enables back annotation of representation information
...@@ -1414,6 +1423,13 @@ package Opt is ...@@ -1414,6 +1423,13 @@ package Opt is
-- mode, as possibly set by the command line switch -gnata, and possibly -- mode, as possibly set by the command line switch -gnata, and possibly
-- modified by the use of the configuration pragma Assertion_Policy. -- modified by the use of the configuration pragma Assertion_Policy.
Assume_No_Invalid_Values_Config : Boolean;
-- GNAT
-- This is the value of the configuration switch for assuming no invalid
-- values enabled mode mode, as possibly set by the command line switch
-- -gnatB, and possibly modified by the use of the configuration pragma
-- Assume_No_Invalid_Values.
Check_Policy_List_Config : Node_Id; Check_Policy_List_Config : Node_Id;
-- GNAT -- GNAT
-- This points to the list of N_Pragma nodes for Check_Policy pragmas -- This points to the list of N_Pragma nodes for Check_Policy pragmas
...@@ -1612,6 +1628,7 @@ private ...@@ -1612,6 +1628,7 @@ private
Ada_Version : Ada_Version_Type; Ada_Version : Ada_Version_Type;
Ada_Version_Explicit : Ada_Version_Type; Ada_Version_Explicit : Ada_Version_Type;
Assertions_Enabled : Boolean; Assertions_Enabled : Boolean;
Assume_No_Invalid_Values : Boolean;
Check_Policy_List : Node_Id; Check_Policy_List : Node_Id;
Debug_Pragmas_Enabled : Boolean; Debug_Pragmas_Enabled : Boolean;
Dynamic_Elaboration_Checks : Boolean; Dynamic_Elaboration_Checks : Boolean;
......
...@@ -1050,6 +1050,7 @@ begin ...@@ -1050,6 +1050,7 @@ begin
when Pragma_Abort_Defer | when Pragma_Abort_Defer |
Pragma_Assertion_Policy | Pragma_Assertion_Policy |
Pragma_Assume_No_Invalid_Values |
Pragma_AST_Entry | Pragma_AST_Entry |
Pragma_All_Calls_Remote | Pragma_All_Calls_Remote |
Pragma_Annotate | Pragma_Annotate |
......
...@@ -5289,6 +5289,25 @@ package body Sem_Prag is ...@@ -5289,6 +5289,25 @@ package body Sem_Prag is
Opt.Check_Policy_List := N; Opt.Check_Policy_List := N;
end Assertion_Policy; end Assertion_Policy;
------------------------------
-- Assume_No_Invalid_Values --
------------------------------
-- pragma Assume_No_Invalid_Values (On | Off);
when Pragma_Assume_No_Invalid_Values =>
GNAT_Pragma;
Check_Valid_Configuration_Pragma;
Check_Arg_Count (1);
Check_No_Identifiers;
Check_Arg_Is_One_Of (Arg1, Name_On, Name_Off);
if Chars (Expression (Arg1)) = Name_On then
Assume_No_Invalid_Values := True;
else
Assume_No_Invalid_Values := False;
end if;
--------------- ---------------
-- AST_Entry -- -- AST_Entry --
--------------- ---------------
...@@ -6315,8 +6334,8 @@ package body Sem_Prag is ...@@ -6315,8 +6334,8 @@ package body Sem_Prag is
-- pragma Discard_Names [([On =>] LOCAL_NAME)]; -- pragma Discard_Names [([On =>] LOCAL_NAME)];
when Pragma_Discard_Names => Discard_Names : declare when Pragma_Discard_Names => Discard_Names : declare
E_Id : Entity_Id;
E : Entity_Id; E : Entity_Id;
E_Id : Entity_Id;
begin begin
Check_Ada_83_Warning; Check_Ada_83_Warning;
...@@ -6346,6 +6365,7 @@ package body Sem_Prag is ...@@ -6346,6 +6365,7 @@ package body Sem_Prag is
Check_Arg_Count (1); Check_Arg_Count (1);
Check_Optional_Identifier (Arg1, Name_On); Check_Optional_Identifier (Arg1, Name_On);
Check_Arg_Is_Local_Name (Arg1); Check_Arg_Is_Local_Name (Arg1);
E_Id := Expression (Arg1); E_Id := Expression (Arg1);
if Etype (E_Id) = Any_Type then if Etype (E_Id) = Any_Type then
...@@ -6355,8 +6375,8 @@ package body Sem_Prag is ...@@ -6355,8 +6375,8 @@ package body Sem_Prag is
end if; end if;
if (Is_First_Subtype (E) if (Is_First_Subtype (E)
and then (Is_Enumeration_Type (E) and then
or else Is_Tagged_Type (E))) (Is_Enumeration_Type (E) or else Is_Tagged_Type (E)))
or else Ekind (E) = E_Exception or else Ekind (E) = E_Exception
then then
Set_Discard_Names (E); Set_Discard_Names (E);
...@@ -6364,6 +6384,7 @@ package body Sem_Prag is ...@@ -6364,6 +6384,7 @@ package body Sem_Prag is
Error_Pragma_Arg Error_Pragma_Arg
("inappropriate entity for pragma%", Arg1); ("inappropriate entity for pragma%", Arg1);
end if; end if;
end if; end if;
end if; end if;
end Discard_Names; end Discard_Names;
...@@ -12200,6 +12221,7 @@ package body Sem_Prag is ...@@ -12200,6 +12221,7 @@ package body Sem_Prag is
Pragma_Annotate => -1, Pragma_Annotate => -1,
Pragma_Assert => -1, Pragma_Assert => -1,
Pragma_Assertion_Policy => 0, Pragma_Assertion_Policy => 0,
Pragma_Assume_No_Invalid_Values => 0,
Pragma_Asynchronous => -1, Pragma_Asynchronous => -1,
Pragma_Atomic => 0, Pragma_Atomic => 0,
Pragma_Atomic_Components => 0, Pragma_Atomic_Components => 0,
......
...@@ -179,6 +179,7 @@ package body Snames is ...@@ -179,6 +179,7 @@ package body Snames is
"ada_05#" & "ada_05#" &
"ada_2005#" & "ada_2005#" &
"assertion_policy#" & "assertion_policy#" &
"assume_no_invalid_values#" &
"c_pass_by_copy#" & "c_pass_by_copy#" &
"check_name#" & "check_name#" &
"check_policy#" & "check_policy#" &
......
This source diff could not be displayed because it is too large. You can view the blob instead.
...@@ -229,170 +229,171 @@ extern unsigned char Get_Pragma_Id (int); ...@@ -229,170 +229,171 @@ extern unsigned char Get_Pragma_Id (int);
#define Pragma_Ada_05 2 #define Pragma_Ada_05 2
#define Pragma_Ada_2005 3 #define Pragma_Ada_2005 3
#define Pragma_Assertion_Policy 4 #define Pragma_Assertion_Policy 4
#define Pragma_C_Pass_By_Copy 5 #define Pragma_Assume_No_Invalid_Values 5
#define Pragma_Check_Name 6 #define Pragma_C_Pass_By_Copy 6
#define Pragma_Check_Policy 7 #define Pragma_Check_Name 7
#define Pragma_Compile_Time_Error 8 #define Pragma_Check_Policy 8
#define Pragma_Compile_Time_Warning 9 #define Pragma_Compile_Time_Error 9
#define Pragma_Compiler_Unit 10 #define Pragma_Compile_Time_Warning 10
#define Pragma_Component_Alignment 11 #define Pragma_Compiler_Unit 11
#define Pragma_Convention_Identifier 12 #define Pragma_Component_Alignment 12
#define Pragma_Debug_Policy 13 #define Pragma_Convention_Identifier 13
#define Pragma_Detect_Blocking 14 #define Pragma_Debug_Policy 14
#define Pragma_Discard_Names 15 #define Pragma_Detect_Blocking 15
#define Pragma_Elaboration_Checks 16 #define Pragma_Discard_Names 16
#define Pragma_Eliminate 17 #define Pragma_Elaboration_Checks 17
#define Pragma_Extend_System 18 #define Pragma_Eliminate 18
#define Pragma_Extensions_Allowed 19 #define Pragma_Extend_System 19
#define Pragma_External_Name_Casing 20 #define Pragma_Extensions_Allowed 20
#define Pragma_Favor_Top_Level 21 #define Pragma_External_Name_Casing 21
#define Pragma_Float_Representation 22 #define Pragma_Favor_Top_Level 22
#define Pragma_Implicit_Packing 23 #define Pragma_Float_Representation 23
#define Pragma_Initialize_Scalars 24 #define Pragma_Implicit_Packing 24
#define Pragma_Interrupt_State 25 #define Pragma_Initialize_Scalars 25
#define Pragma_License 26 #define Pragma_Interrupt_State 26
#define Pragma_Locking_Policy 27 #define Pragma_License 27
#define Pragma_Long_Float 28 #define Pragma_Locking_Policy 28
#define Pragma_No_Run_Time 29 #define Pragma_Long_Float 29
#define Pragma_No_Strict_Aliasing 30 #define Pragma_No_Run_Time 30
#define Pragma_Normalize_Scalars 31 #define Pragma_No_Strict_Aliasing 31
#define Pragma_Optimize_Alignment 32 #define Pragma_Normalize_Scalars 32
#define Pragma_Persistent_BSS 33 #define Pragma_Optimize_Alignment 33
#define Pragma_Polling 34 #define Pragma_Persistent_BSS 34
#define Pragma_Priority_Specific_Dispatching 35 #define Pragma_Polling 35
#define Pragma_Profile 36 #define Pragma_Priority_Specific_Dispatching 36
#define Pragma_Profile_Warnings 37 #define Pragma_Profile 37
#define Pragma_Propagate_Exceptions 38 #define Pragma_Profile_Warnings 38
#define Pragma_Queuing_Policy 39 #define Pragma_Propagate_Exceptions 39
#define Pragma_Ravenscar 40 #define Pragma_Queuing_Policy 40
#define Pragma_Restricted_Run_Time 41 #define Pragma_Ravenscar 41
#define Pragma_Restrictions 42 #define Pragma_Restricted_Run_Time 42
#define Pragma_Restriction_Warnings 43 #define Pragma_Restrictions 43
#define Pragma_Reviewable 44 #define Pragma_Restriction_Warnings 44
#define Pragma_Source_File_Name 45 #define Pragma_Reviewable 45
#define Pragma_Source_File_Name_Project 46 #define Pragma_Source_File_Name 46
#define Pragma_Style_Checks 47 #define Pragma_Source_File_Name_Project 47
#define Pragma_Suppress 48 #define Pragma_Style_Checks 48
#define Pragma_Suppress_Exception_Locations 49 #define Pragma_Suppress 49
#define Pragma_Task_Dispatching_Policy 50 #define Pragma_Suppress_Exception_Locations 50
#define Pragma_Universal_Data 51 #define Pragma_Task_Dispatching_Policy 51
#define Pragma_Unsuppress 52 #define Pragma_Universal_Data 52
#define Pragma_Use_VADS_Size 53 #define Pragma_Unsuppress 53
#define Pragma_Validity_Checks 54 #define Pragma_Use_VADS_Size 54
#define Pragma_Warnings 55 #define Pragma_Validity_Checks 55
#define Pragma_Wide_Character_Encoding 56 #define Pragma_Warnings 56
#define Pragma_Abort_Defer 57 #define Pragma_Wide_Character_Encoding 57
#define Pragma_All_Calls_Remote 58 #define Pragma_Abort_Defer 58
#define Pragma_Annotate 59 #define Pragma_All_Calls_Remote 59
#define Pragma_Assert 60 #define Pragma_Annotate 60
#define Pragma_Asynchronous 61 #define Pragma_Assert 61
#define Pragma_Atomic 62 #define Pragma_Asynchronous 62
#define Pragma_Atomic_Components 63 #define Pragma_Atomic 63
#define Pragma_Attach_Handler 64 #define Pragma_Atomic_Components 64
#define Pragma_Check 65 #define Pragma_Attach_Handler 65
#define Pragma_CIL_Constructor 66 #define Pragma_Check 66
#define Pragma_Comment 67 #define Pragma_CIL_Constructor 67
#define Pragma_Common_Object 68 #define Pragma_Comment 68
#define Pragma_Complete_Representation 69 #define Pragma_Common_Object 69
#define Pragma_Complex_Representation 70 #define Pragma_Complete_Representation 70
#define Pragma_Controlled 71 #define Pragma_Complex_Representation 71
#define Pragma_Convention 72 #define Pragma_Controlled 72
#define Pragma_CPP_Class 73 #define Pragma_Convention 73
#define Pragma_CPP_Constructor 74 #define Pragma_CPP_Class 74
#define Pragma_CPP_Virtual 75 #define Pragma_CPP_Constructor 75
#define Pragma_CPP_Vtable 76 #define Pragma_CPP_Virtual 76
#define Pragma_Debug 77 #define Pragma_CPP_Vtable 77
#define Pragma_Elaborate 78 #define Pragma_Debug 78
#define Pragma_Elaborate_All 79 #define Pragma_Elaborate 79
#define Pragma_Elaborate_Body 80 #define Pragma_Elaborate_All 80
#define Pragma_Export 81 #define Pragma_Elaborate_Body 81
#define Pragma_Export_Exception 82 #define Pragma_Export 82
#define Pragma_Export_Function 83 #define Pragma_Export_Exception 83
#define Pragma_Export_Object 84 #define Pragma_Export_Function 84
#define Pragma_Export_Procedure 85 #define Pragma_Export_Object 85
#define Pragma_Export_Value 86 #define Pragma_Export_Procedure 86
#define Pragma_Export_Valued_Procedure 87 #define Pragma_Export_Value 87
#define Pragma_External 88 #define Pragma_Export_Valued_Procedure 88
#define Pragma_Finalize_Storage_Only 89 #define Pragma_External 89
#define Pragma_Ident 90 #define Pragma_Finalize_Storage_Only 90
#define Pragma_Implemented_By_Entry 91 #define Pragma_Ident 91
#define Pragma_Import 92 #define Pragma_Implemented_By_Entry 92
#define Pragma_Import_Exception 93 #define Pragma_Import 93
#define Pragma_Import_Function 94 #define Pragma_Import_Exception 94
#define Pragma_Import_Object 95 #define Pragma_Import_Function 95
#define Pragma_Import_Procedure 96 #define Pragma_Import_Object 96
#define Pragma_Import_Valued_Procedure 97 #define Pragma_Import_Procedure 97
#define Pragma_Inline 98 #define Pragma_Import_Valued_Procedure 98
#define Pragma_Inline_Always 99 #define Pragma_Inline 99
#define Pragma_Inline_Generic 100 #define Pragma_Inline_Always 100
#define Pragma_Inspection_Point 101 #define Pragma_Inline_Generic 101
#define Pragma_Interface_Name 102 #define Pragma_Inspection_Point 102
#define Pragma_Interrupt_Handler 103 #define Pragma_Interface_Name 103
#define Pragma_Interrupt_Priority 104 #define Pragma_Interrupt_Handler 104
#define Pragma_Java_Constructor 105 #define Pragma_Interrupt_Priority 105
#define Pragma_Java_Interface 106 #define Pragma_Java_Constructor 106
#define Pragma_Keep_Names 107 #define Pragma_Java_Interface 107
#define Pragma_Link_With 108 #define Pragma_Keep_Names 108
#define Pragma_Linker_Alias 109 #define Pragma_Link_With 109
#define Pragma_Linker_Constructor 110 #define Pragma_Linker_Alias 110
#define Pragma_Linker_Destructor 111 #define Pragma_Linker_Constructor 111
#define Pragma_Linker_Options 112 #define Pragma_Linker_Destructor 112
#define Pragma_Linker_Section 113 #define Pragma_Linker_Options 113
#define Pragma_List 114 #define Pragma_Linker_Section 114
#define Pragma_Machine_Attribute 115 #define Pragma_List 115
#define Pragma_Main 116 #define Pragma_Machine_Attribute 116
#define Pragma_Main_Storage 117 #define Pragma_Main 117
#define Pragma_Memory_Size 118 #define Pragma_Main_Storage 118
#define Pragma_No_Body 119 #define Pragma_Memory_Size 119
#define Pragma_No_Return 120 #define Pragma_No_Body 120
#define Pragma_Obsolescent 121 #define Pragma_No_Return 121
#define Pragma_Optimize 122 #define Pragma_Obsolescent 122
#define Pragma_Pack 123 #define Pragma_Optimize 123
#define Pragma_Page 124 #define Pragma_Pack 124
#define Pragma_Passive 125 #define Pragma_Page 125
#define Pragma_Postcondition 126 #define Pragma_Passive 126
#define Pragma_Precondition 127 #define Pragma_Postcondition 127
#define Pragma_Preelaborable_Initialization 128 #define Pragma_Precondition 128
#define Pragma_Preelaborate 129 #define Pragma_Preelaborable_Initialization 129
#define Pragma_Preelaborate_05 130 #define Pragma_Preelaborate 130
#define Pragma_Psect_Object 131 #define Pragma_Preelaborate_05 131
#define Pragma_Pure 132 #define Pragma_Psect_Object 132
#define Pragma_Pure_05 133 #define Pragma_Pure 133
#define Pragma_Pure_Function 134 #define Pragma_Pure_05 134
#define Pragma_Relative_Deadline 135 #define Pragma_Pure_Function 135
#define Pragma_Remote_Call_Interface 136 #define Pragma_Relative_Deadline 136
#define Pragma_Remote_Types 137 #define Pragma_Remote_Call_Interface 137
#define Pragma_Share_Generic 138 #define Pragma_Remote_Types 138
#define Pragma_Shared 139 #define Pragma_Share_Generic 139
#define Pragma_Shared_Passive 140 #define Pragma_Shared 140
#define Pragma_Source_Reference 141 #define Pragma_Shared_Passive 141
#define Pragma_Static_Elaboration_Desired 142 #define Pragma_Source_Reference 142
#define Pragma_Stream_Convert 143 #define Pragma_Static_Elaboration_Desired 143
#define Pragma_Subtitle 144 #define Pragma_Stream_Convert 144
#define Pragma_Suppress_All 145 #define Pragma_Subtitle 145
#define Pragma_Suppress_Debug_Info 146 #define Pragma_Suppress_All 146
#define Pragma_Suppress_Initialization 147 #define Pragma_Suppress_Debug_Info 147
#define Pragma_System_Name 148 #define Pragma_Suppress_Initialization 148
#define Pragma_Task_Info 149 #define Pragma_System_Name 149
#define Pragma_Task_Name 150 #define Pragma_Task_Info 150
#define Pragma_Task_Storage 151 #define Pragma_Task_Name 151
#define Pragma_Time_Slice 152 #define Pragma_Task_Storage 152
#define Pragma_Title 153 #define Pragma_Time_Slice 153
#define Pragma_Unchecked_Union 154 #define Pragma_Title 154
#define Pragma_Unimplemented_Unit 155 #define Pragma_Unchecked_Union 155
#define Pragma_Universal_Aliasing 156 #define Pragma_Unimplemented_Unit 156
#define Pragma_Unmodified 157 #define Pragma_Universal_Aliasing 157
#define Pragma_Unreferenced 158 #define Pragma_Unmodified 158
#define Pragma_Unreferenced_Objects 159 #define Pragma_Unreferenced 159
#define Pragma_Unreserve_All_Interrupts 160 #define Pragma_Unreferenced_Objects 160
#define Pragma_Volatile 161 #define Pragma_Unreserve_All_Interrupts 161
#define Pragma_Volatile_Components 162 #define Pragma_Volatile 162
#define Pragma_Weak_External 163 #define Pragma_Volatile_Components 163
#define Pragma_AST_Entry 164 #define Pragma_Weak_External 164
#define Pragma_Fast_Math 165 #define Pragma_AST_Entry 165
#define Pragma_Interface 166 #define Pragma_Fast_Math 166
#define Pragma_Priority 167 #define Pragma_Interface 167
#define Pragma_Storage_Size 168 #define Pragma_Priority 168
#define Pragma_Storage_Unit 169 #define Pragma_Storage_Size 169
#define Pragma_Storage_Unit 170
/* End of snames.h (C version of Snames package spec) */ /* End of snames.h (C version of Snames package spec) */
...@@ -212,6 +212,12 @@ package body Switch.C is ...@@ -212,6 +212,12 @@ package body Switch.C is
Ptr := Ptr + 1; Ptr := Ptr + 1;
Brief_Output := True; Brief_Output := True;
-- Processing for B switch
when 'B' =>
Ptr := Ptr + 1;
Assume_No_Invalid_Values := True;
-- Processing for c switch -- Processing for c switch
when 'c' => when 'c' =>
......
...@@ -137,6 +137,11 @@ begin ...@@ -137,6 +137,11 @@ begin
Write_Switch_Char ("b"); Write_Switch_Char ("b");
Write_Line ("Generate brief messages to stderr even if verbose mode set"); Write_Line ("Generate brief messages to stderr even if verbose mode set");
-- Line for -gnatB switch
Write_Switch_Char ("B");
Write_Line ("Assume no bad (invalid) values except in 'Valid attribute");
-- Line for -gnatc switch -- Line for -gnatc switch
Write_Switch_Char ("c"); Write_Switch_Char ("c");
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment