@@ -1499,7 +1499,10 @@ package body Tree_Walk is
1499
1499
when N_Quantified_Expression =>
1500
1500
return Report_Unhandled_Node_Irep (N, " Do_Expression" ,
1501
1501
" Quantified" );
1502
- when N_Null =>
1502
+ when N_Null |
1503
+ -- gnat2goto does not process freeze nodes at present.
1504
+ -- Possibly of use when package initialisationis considered.
1505
+ N_Freeze_Entity | N_Freeze_Generic_Entity =>
1503
1506
return Do_Null_Expression (N);
1504
1507
when others =>
1505
1508
return Report_Unhandled_Node_Irep (N, " Do_Expression" ,
@@ -2794,29 +2797,36 @@ package body Tree_Walk is
2794
2797
-- language. Need to be detected.
2795
2798
Report_Unhandled_Node_Empty (N, " Do_Pragma" ,
2796
2799
" Known but unsupported pragma: Export" );
2797
- when Name_Linker_Options =>
2798
- -- Used to specify the system linker parameters needed when a
2799
- -- given compilation unit is included in a partition. We want to
2800
- -- know that code manipulates the linking.
2801
- Report_Unhandled_Node_Empty (N, " Do_Pragma" ,
2802
- " Known but unsupported pragma: Linker Options" );
2803
2800
when Name_Annotate |
2804
2801
-- Ignore here. Rather look for those when we process a node.
2805
2802
Name_Assertion_Policy | Name_Check_Policy |
2806
2803
-- Control the pragma Assert according to the policy identifier
2807
2804
-- which can be Check, Ignore, or implementation-defined.
2808
2805
-- Ignore means that assertions are ignored at run-time -> Ignored
2806
+ Name_Compile_Time_Warning |
2807
+ -- Used to issue a compile time warning from the compiler
2808
+ -- front-end. The warning will be issued by the front-end but has
2809
+ -- no affect on the AST. It can be ignored safely by gnat2goto.
2809
2810
Name_Discard_Names |
2810
2811
-- Used to request a reduction in storage used for the names of
2811
2812
-- certain entities. -> Ignored
2812
- Name_Inline |
2813
+ Name_Inline |
2813
2814
-- Indicates that inline expansion is desired for all calls to
2814
2815
-- that entity. -> Ignored
2815
- Name_Inspection_Point |
2816
+ Name_Inspection_Point |
2816
2817
-- Identifies a set of objects each of whose values is to be
2817
2818
-- available at the point(s) during program execution
2818
2819
-- corresponding to the position of the pragma in the compilation
2819
2820
-- unit. -> Ignored
2821
+ Name_Linker_Options |
2822
+ -- Used to specify the system linker parameters needed when a
2823
+ -- given compilation unit is included in a partition. We want to
2824
+ -- know that code manipulates the linking. The
2825
+ -- goto functions produced by gnat2goto are linked by symtab2gb.
2826
+ -- Currently there very few options for this linker and none that
2827
+ -- apply to most linkers. Currently the pragma can ignored,
2828
+ -- but in the future, if symtab2gb was to take more options
2829
+ -- this pragma could be reinstated.
2820
2830
Name_List |
2821
2831
-- Takes one of the identifiers On or Off as the single
2822
2832
-- argument. It specifies that listing of the compilation is to be
@@ -5950,7 +5960,7 @@ package body Tree_Walk is
5950
5960
-- given compilation unit is included in a partition. We want to
5951
5961
-- know that code manipulates the linking.
5952
5962
Report_Unhandled_Node_Empty (N, " Process_Pragma_Declaration" ,
5953
- " Known but unsupported pragma: Linker Options" );
5963
+ " Known but unsupported pragma: Linker Options" );
5954
5964
when Name_Machine_Attribute =>
5955
5965
Handle_Pragma_Machine_Attribute (N);
5956
5966
when Name_Check =>
@@ -5967,8 +5977,33 @@ package body Tree_Walk is
5967
5977
null ;
5968
5978
5969
5979
when Name_Suppress_Initialization =>
5970
- Report_Unhandled_Node_Empty (N, " Process_Pragma_Declaration" ,
5971
- " Unsupported pragma: Suppress initialization" );
5980
+ -- pragma Suppress_Initialization can be ignored if it is
5981
+ -- appied to an array or scalar type which do not have a
5982
+ -- default value aspect applied.
5983
+ -- If these conditions are not met an unsupported pragma is
5984
+ -- reported.
5985
+ declare
5986
+ Arg : constant Node_Id :=
5987
+ First (Pragma_Argument_Associations (N));
5988
+ E : constant Entity_Id := Entity
5989
+ (if Present (Arg) and then
5990
+ Nkind (Arg) = N_Pragma_Argument_Association
5991
+ then
5992
+ Expression (Arg)
5993
+ else
5994
+ Arg);
5995
+ begin
5996
+ if not ((Is_Array_Type (E) and then
5997
+ not Present (Default_Aspect_Component_Value (E)))
5998
+ or else
5999
+ (Is_Scalar_Type (E) and then
6000
+ not Present (Default_Aspect_Value (E))))
6001
+ then
6002
+ Report_Unhandled_Node_Empty
6003
+ (N, " Process_Pragma_Declaration" ,
6004
+ " Unsupported pragma: Suppress initialization" );
6005
+ end if ;
6006
+ end ;
5972
6007
when Name_Obsolescent =>
5973
6008
Report_Unhandled_Node_Empty (N, " Process_Pragma_Declaration" ,
5974
6009
" Unsupported pragma: Obsolescent" );
@@ -6013,6 +6048,10 @@ package body Tree_Walk is
6013
6048
-- Control the pragma Assert according to the policy identifier
6014
6049
-- which can be Check, Ignore, or implementation-defined.
6015
6050
-- Ignore means that assertions are ignored at run-time -> Ignored
6051
+ Name_Compile_Time_Warning |
6052
+ -- Used to issue a compile time warning from the compiler
6053
+ -- front-end. The warning will be issued by the front-end but has
6054
+ -- no affect on the AST. It can be ignored safely by gnat2goto.
6016
6055
Name_Discard_Names |
6017
6056
-- Used to request a reduction in storage used for the names of
6018
6057
-- certain entities. -> Ignored
@@ -6021,6 +6060,17 @@ package body Tree_Walk is
6021
6060
-- available at the point(s) during program execution
6022
6061
-- corresponding to the position of the pragma in the compilation
6023
6062
-- unit. -> Ignored
6063
+ Name_Linker_Options |
6064
+ -- Used to specify the system linker parameters needed when a
6065
+ -- given compilation unit is included in a partition. We want to
6066
+ -- know that code manipulates the linking.Name_Linker_Options =>
6067
+ -- Used to specify the system linker parameters needed when a
6068
+ -- given compilation unit is included in a partition. The
6069
+ -- goto functions produced by gnat2goto are linked by symtab2gb.
6070
+ -- Currently there very few options for this linker and none that
6071
+ -- apply to most linkers. Currently the pragma can ignored,
6072
+ -- but in the future, if symtab2gb was to take more options
6073
+ -- this pragma could be reinstated.
6024
6074
Name_List |
6025
6075
-- Takes one of the identifiers On or Off as the single
6026
6076
-- argument. It specifies that listing of the compilation is to be
@@ -6233,6 +6283,10 @@ package body Tree_Walk is
6233
6283
when N_Object_Declaration =>
6234
6284
Do_Object_Declaration (N, Block);
6235
6285
6286
+ when N_Freeze_Entity | N_Freeze_Generic_Entity =>
6287
+ -- gnat2goto does not process freeze nodes as
6288
+ -- the information contained therein is not needed by gnat2goto.
6289
+ null ;
6236
6290
when others =>
6237
6291
Report_Unhandled_Node_Empty (N, " Process_Statement" ,
6238
6292
" Unknown expression kind" );
0 commit comments