@@ -1457,7 +1457,10 @@ package body Tree_Walk is
1457
1457
when N_Quantified_Expression =>
1458
1458
return Report_Unhandled_Node_Irep (N, " Do_Expression" ,
1459
1459
" Quantified" );
1460
- when N_Null =>
1460
+ when N_Null |
1461
+ -- gnat2goto does not process freeze nodes at present.
1462
+ -- Possibly of use when package initialisationis considered.
1463
+ N_Freeze_Entity | N_Freeze_Generic_Entity =>
1461
1464
return Do_Null_Expression (N);
1462
1465
when others =>
1463
1466
return Report_Unhandled_Node_Irep (N, " Do_Expression" ,
@@ -2879,29 +2882,36 @@ package body Tree_Walk is
2879
2882
-- language. Need to be detected.
2880
2883
Report_Unhandled_Node_Empty (N, " Do_Pragma" ,
2881
2884
" Known but unsupported pragma: Export" );
2882
- when Name_Linker_Options =>
2883
- -- Used to specify the system linker parameters needed when a
2884
- -- given compilation unit is included in a partition. We want to
2885
- -- know that code manipulates the linking.
2886
- Report_Unhandled_Node_Empty (N, " Do_Pragma" ,
2887
- " Known but unsupported pragma: Linker Options" );
2888
2885
when Name_Annotate |
2889
2886
-- Ignore here. Rather look for those when we process a node.
2890
2887
Name_Assertion_Policy |
2891
2888
-- Control the pragma Assert according to the policy identifier
2892
2889
-- which can be Check, Ignore, or implementation-defined.
2893
2890
-- Ignore means that assertions are ignored at run-time -> Ignored
2891
+ Name_Compile_Time_Warning |
2892
+ -- Used to issue a compile time warning from the compiler
2893
+ -- front-end. The warning will be issued by the front-end but has
2894
+ -- no affect on the AST. It can be ignored safely by gnat2goto.
2894
2895
Name_Discard_Names |
2895
2896
-- Used to request a reduction in storage used for the names of
2896
2897
-- certain entities. -> Ignored
2897
- Name_Inline |
2898
+ Name_Inline |
2898
2899
-- Indicates that inline expansion is desired for all calls to
2899
2900
-- that entity. -> Ignored
2900
- Name_Inspection_Point |
2901
+ Name_Inspection_Point |
2901
2902
-- Identifies a set of objects each of whose values is to be
2902
2903
-- available at the point(s) during program execution
2903
2904
-- corresponding to the position of the pragma in the compilation
2904
2905
-- unit. -> Ignored
2906
+ Name_Linker_Options |
2907
+ -- Used to specify the system linker parameters needed when a
2908
+ -- given compilation unit is included in a partition. We want to
2909
+ -- know that code manipulates the linking. The
2910
+ -- goto functions produced by gnat2goto are linked by symtab2gb.
2911
+ -- Currently there very few options for this linker and none that
2912
+ -- apply to most linkers. Currently the pragma can ignored,
2913
+ -- but in the future, if symtab2gb was to take more options
2914
+ -- this pragma could be reinstated.
2905
2915
Name_List |
2906
2916
-- Takes one of the identifiers On or Off as the single
2907
2917
-- argument. It specifies that listing of the compilation is to be
@@ -5936,12 +5946,6 @@ package body Tree_Walk is
5936
5946
-- language. Need to be detected.
5937
5947
Put_Line (Standard_Error,
5938
5948
" Warning: Multi-language analysis unsupported." );
5939
- when Name_Linker_Options =>
5940
- -- Used to specify the system linker parameters needed when a
5941
- -- given compilation unit is included in a partition. We want to
5942
- -- know that code manipulates the linking.
5943
- Report_Unhandled_Node_Empty (N, " Process_Pragma_Declaration" ,
5944
- " Known but unsupported pragma: Linker Options" );
5945
5949
when Name_Machine_Attribute =>
5946
5950
Handle_Pragma_Machine_Attribute (N);
5947
5951
when Name_Check =>
@@ -5958,8 +5962,33 @@ package body Tree_Walk is
5958
5962
null ;
5959
5963
5960
5964
when Name_Suppress_Initialization =>
5961
- Report_Unhandled_Node_Empty (N, " Process_Pragma_Declaration" ,
5962
- " Unsupported pragma: Suppress initialization" );
5965
+ -- pragma Suppress_Initialization can be ignored if it is
5966
+ -- appied to an array or scalar type which do not have a
5967
+ -- default value aspect applied.
5968
+ -- If these conditions are not met an unsupported pragma is
5969
+ -- reported.
5970
+ declare
5971
+ Arg : constant Node_Id :=
5972
+ First (Pragma_Argument_Associations (N));
5973
+ E : constant Entity_Id := Entity
5974
+ (if Present (Arg) and then
5975
+ Nkind (Arg) = N_Pragma_Argument_Association
5976
+ then
5977
+ Expression (Arg)
5978
+ else
5979
+ Arg);
5980
+ begin
5981
+ if not ((Is_Array_Type (E) and then
5982
+ not Present (Default_Aspect_Component_Value (E)))
5983
+ or else
5984
+ (Is_Scalar_Type (E) and then
5985
+ not Present (Default_Aspect_Value (E))))
5986
+ then
5987
+ Report_Unhandled_Node_Empty
5988
+ (N, " Process_Pragma_Declaration" ,
5989
+ " Unsupported pragma: Suppress initialization" );
5990
+ end if ;
5991
+ end ;
5963
5992
when Name_Obsolescent =>
5964
5993
Report_Unhandled_Node_Empty (N, " Process_Pragma_Declaration" ,
5965
5994
" Unsupported pragma: Obsolescent" );
@@ -5972,6 +6001,10 @@ package body Tree_Walk is
5972
6001
-- Control the pragma Assert according to the policy identifier
5973
6002
-- which can be Check, Ignore, or implementation-defined.
5974
6003
-- Ignore means that assertions are ignored at run-time -> Ignored
6004
+ Name_Compile_Time_Warning |
6005
+ -- Used to issue a compile time warning from the compiler
6006
+ -- front-end. The warning will be issued by the front-end but has
6007
+ -- no affect on the AST. It can be ignored safely by gnat2goto.
5975
6008
Name_Discard_Names |
5976
6009
-- Used to request a reduction in storage used for the names of
5977
6010
-- certain entities. -> Ignored
@@ -5980,6 +6013,17 @@ package body Tree_Walk is
5980
6013
-- available at the point(s) during program execution
5981
6014
-- corresponding to the position of the pragma in the compilation
5982
6015
-- unit. -> Ignored
6016
+ Name_Linker_Options |
6017
+ -- Used to specify the system linker parameters needed when a
6018
+ -- given compilation unit is included in a partition. We want to
6019
+ -- know that code manipulates the linking.Name_Linker_Options =>
6020
+ -- Used to specify the system linker parameters needed when a
6021
+ -- given compilation unit is included in a partition. The
6022
+ -- goto functions produced by gnat2goto are linked by symtab2gb.
6023
+ -- Currently there very few options for this linker and none that
6024
+ -- apply to most linkers. Currently the pragma can ignored,
6025
+ -- but in the future, if symtab2gb was to take more options
6026
+ -- this pragma could be reinstated.
5983
6027
Name_List |
5984
6028
-- Takes one of the identifiers On or Off as the single
5985
6029
-- argument. It specifies that listing of the compilation is to be
@@ -6192,6 +6236,10 @@ package body Tree_Walk is
6192
6236
when N_Object_Declaration =>
6193
6237
Do_Object_Declaration (N, Block);
6194
6238
6239
+ when N_Freeze_Entity | N_Freeze_Generic_Entity =>
6240
+ -- gnat2goto does not process freeze nodes as
6241
+ -- the information contained therein is not needed by gnat2goto.
6242
+ null ;
6195
6243
when others =>
6196
6244
Report_Unhandled_Node_Empty (N, " Process_Statement" ,
6197
6245
" Unknown expression kind" );
0 commit comments