@@ -1514,7 +1514,10 @@ package body Tree_Walk is
1514
1514
when N_Quantified_Expression =>
1515
1515
return Report_Unhandled_Node_Irep (N, " Do_Expression" ,
1516
1516
" Quantified" );
1517
- when N_Null =>
1517
+ when N_Null |
1518
+ -- gnat2goto does not process freeze nodes at present.
1519
+ -- Possibly of use when package initialisationis considered.
1520
+ N_Freeze_Entity | N_Freeze_Generic_Entity =>
1518
1521
return Do_Null_Expression (N);
1519
1522
when others =>
1520
1523
return Report_Unhandled_Node_Irep (N, " Do_Expression" ,
@@ -2936,29 +2939,36 @@ package body Tree_Walk is
2936
2939
-- language. Need to be detected.
2937
2940
Report_Unhandled_Node_Empty (N, " Do_Pragma" ,
2938
2941
" Known but unsupported pragma: Export" );
2939
- when Name_Linker_Options =>
2940
- -- Used to specify the system linker parameters needed when a
2941
- -- given compilation unit is included in a partition. We want to
2942
- -- know that code manipulates the linking.
2943
- Report_Unhandled_Node_Empty (N, " Do_Pragma" ,
2944
- " Known but unsupported pragma: Linker Options" );
2945
2942
when Name_Annotate |
2946
2943
-- Ignore here. Rather look for those when we process a node.
2947
2944
Name_Assertion_Policy |
2948
2945
-- Control the pragma Assert according to the policy identifier
2949
2946
-- which can be Check, Ignore, or implementation-defined.
2950
2947
-- Ignore means that assertions are ignored at run-time -> Ignored
2948
+ Name_Compile_Time_Warning |
2949
+ -- Used to issue a compile time warning from the compiler
2950
+ -- front-end. The warning will be issued by the front-end but has
2951
+ -- no affect on the AST. It can be ignored safely by gnat2goto.
2951
2952
Name_Discard_Names |
2952
2953
-- Used to request a reduction in storage used for the names of
2953
2954
-- certain entities. -> Ignored
2954
- Name_Inline |
2955
+ Name_Inline |
2955
2956
-- Indicates that inline expansion is desired for all calls to
2956
2957
-- that entity. -> Ignored
2957
- Name_Inspection_Point |
2958
+ Name_Inspection_Point |
2958
2959
-- Identifies a set of objects each of whose values is to be
2959
2960
-- available at the point(s) during program execution
2960
2961
-- corresponding to the position of the pragma in the compilation
2961
2962
-- unit. -> Ignored
2963
+ Name_Linker_Options |
2964
+ -- Used to specify the system linker parameters needed when a
2965
+ -- given compilation unit is included in a partition. We want to
2966
+ -- know that code manipulates the linking. The
2967
+ -- goto functions produced by gnat2goto are linked by symtab2gb.
2968
+ -- Currently there very few options for this linker and none that
2969
+ -- apply to most linkers. Currently the pragma can ignored,
2970
+ -- but in the future, if symtab2gb was to take more options
2971
+ -- this pragma could be reinstated.
2962
2972
Name_List |
2963
2973
-- Takes one of the identifiers On or Off as the single
2964
2974
-- argument. It specifies that listing of the compilation is to be
@@ -6022,12 +6032,6 @@ package body Tree_Walk is
6022
6032
-- language. Need to be detected.
6023
6033
Put_Line (Standard_Error,
6024
6034
" Warning: Multi-language analysis unsupported." );
6025
- when Name_Linker_Options =>
6026
- -- Used to specify the system linker parameters needed when a
6027
- -- given compilation unit is included in a partition. We want to
6028
- -- know that code manipulates the linking.
6029
- Report_Unhandled_Node_Empty (N, " Process_Pragma_Declaration" ,
6030
- " Known but unsupported pragma: Linker Options" );
6031
6035
when Name_Machine_Attribute =>
6032
6036
Handle_Pragma_Machine_Attribute (N);
6033
6037
when Name_Check =>
@@ -6044,8 +6048,33 @@ package body Tree_Walk is
6044
6048
null ;
6045
6049
6046
6050
when Name_Suppress_Initialization =>
6047
- Report_Unhandled_Node_Empty (N, " Process_Pragma_Declaration" ,
6048
- " Unsupported pragma: Suppress initialization" );
6051
+ -- pragma Suppress_Initialization can be ignored if it is
6052
+ -- appied to an array or scalar type which do not have a
6053
+ -- default value aspect applied.
6054
+ -- If these conditions are not met an unsupported pragma is
6055
+ -- reported.
6056
+ declare
6057
+ Arg : constant Node_Id :=
6058
+ First (Pragma_Argument_Associations (N));
6059
+ E : constant Entity_Id := Entity
6060
+ (if Present (Arg) and then
6061
+ Nkind (Arg) = N_Pragma_Argument_Association
6062
+ then
6063
+ Expression (Arg)
6064
+ else
6065
+ Arg);
6066
+ begin
6067
+ if not ((Is_Array_Type (E) and then
6068
+ not Present (Default_Aspect_Component_Value (E)))
6069
+ or else
6070
+ (Is_Scalar_Type (E) and then
6071
+ not Present (Default_Aspect_Value (E))))
6072
+ then
6073
+ Report_Unhandled_Node_Empty
6074
+ (N, " Process_Pragma_Declaration" ,
6075
+ " Unsupported pragma: Suppress initialization" );
6076
+ end if ;
6077
+ end ;
6049
6078
when Name_Obsolescent =>
6050
6079
Report_Unhandled_Node_Empty (N, " Process_Pragma_Declaration" ,
6051
6080
" Unsupported pragma: Obsolescent" );
@@ -6058,6 +6087,10 @@ package body Tree_Walk is
6058
6087
-- Control the pragma Assert according to the policy identifier
6059
6088
-- which can be Check, Ignore, or implementation-defined.
6060
6089
-- Ignore means that assertions are ignored at run-time -> Ignored
6090
+ Name_Compile_Time_Warning |
6091
+ -- Used to issue a compile time warning from the compiler
6092
+ -- front-end. The warning will be issued by the front-end but has
6093
+ -- no affect on the AST. It can be ignored safely by gnat2goto.
6061
6094
Name_Discard_Names |
6062
6095
-- Used to request a reduction in storage used for the names of
6063
6096
-- certain entities. -> Ignored
@@ -6066,6 +6099,17 @@ package body Tree_Walk is
6066
6099
-- available at the point(s) during program execution
6067
6100
-- corresponding to the position of the pragma in the compilation
6068
6101
-- unit. -> Ignored
6102
+ Name_Linker_Options |
6103
+ -- Used to specify the system linker parameters needed when a
6104
+ -- given compilation unit is included in a partition. We want to
6105
+ -- know that code manipulates the linking.Name_Linker_Options =>
6106
+ -- Used to specify the system linker parameters needed when a
6107
+ -- given compilation unit is included in a partition. The
6108
+ -- goto functions produced by gnat2goto are linked by symtab2gb.
6109
+ -- Currently there very few options for this linker and none that
6110
+ -- apply to most linkers. Currently the pragma can ignored,
6111
+ -- but in the future, if symtab2gb was to take more options
6112
+ -- this pragma could be reinstated.
6069
6113
Name_List |
6070
6114
-- Takes one of the identifiers On or Off as the single
6071
6115
-- argument. It specifies that listing of the compilation is to be
@@ -6278,6 +6322,10 @@ package body Tree_Walk is
6278
6322
when N_Object_Declaration =>
6279
6323
Do_Object_Declaration (N, Block);
6280
6324
6325
+ when N_Freeze_Entity | N_Freeze_Generic_Entity =>
6326
+ -- gnat2goto does not process freeze nodes as
6327
+ -- the information contained therein is not needed by gnat2goto.
6328
+ null ;
6281
6329
when others =>
6282
6330
Report_Unhandled_Node_Empty (N, " Process_Statement" ,
6283
6331
" Unknown expression kind" );
0 commit comments