@@ -391,7 +391,7 @@ package body Tree_Walk is
391
391
procedure Process_Declarations (L : List_Id; Block : Irep);
392
392
-- Processes the declarations and is used for both a package specification
393
393
-- where only basic declarations are allowed (no subprogram bodies etc.)
394
- -- and declarative parts where such declaratios are allowed .
394
+ -- and declarative parts where subprogram bodies etc. may be declared .
395
395
-- The Gnat front end will check that only allowed declarations are used
396
396
-- where only basic declarations permitted.
397
397
-- Process_Declarations is a procedure rather than a function like its
@@ -1596,11 +1596,6 @@ package body Tree_Walk is
1596
1596
end Create_Dummy_Irep ;
1597
1597
1598
1598
function Do_Expression (N : Node_Id) return Irep is
1599
- procedure Warn_Unhandled_Expression (M : String);
1600
- procedure Warn_Unhandled_Expression (M : String) is
1601
- begin
1602
- Put_Line (Standard_Error, " Warning: " & M & " expressions unhandled" );
1603
- end Warn_Unhandled_Expression ;
1604
1599
begin
1605
1600
Declare_Itype (Etype (N));
1606
1601
case Nkind (N) is
@@ -1616,14 +1611,14 @@ package body Tree_Walk is
1616
1611
when Attribute_Access => return Do_Address_Of (N);
1617
1612
when Attribute_Length => return Do_Array_Length (N);
1618
1613
when Attribute_Range =>
1619
- Warn_Unhandled_Expression ( " Range attribute " );
1620
- return Create_Dummy_Irep ;
1614
+ return Report_Unhandled_Node_Irep (N, " Do_Expression " ,
1615
+ " Range attribute " ) ;
1621
1616
when Attribute_First =>
1622
- Warn_Unhandled_Expression ( " First attribute " );
1623
- return Create_Dummy_Irep ;
1617
+ return Report_Unhandled_Node_Irep (N, " Do_Expression " ,
1618
+ " First attribute " ) ;
1624
1619
when Attribute_Last =>
1625
- Warn_Unhandled_Expression ( " Last attribute " );
1626
- return Create_Dummy_Irep ;
1620
+ return Report_Unhandled_Node_Irep (N, " Do_Expression " ,
1621
+ " Last attribute " ) ;
1627
1622
when others =>
1628
1623
return Report_Unhandled_Node_Irep (N, " Do_Expression" ,
1629
1624
" Unknown attribute" );
@@ -1634,20 +1629,20 @@ package body Tree_Walk is
1634
1629
when N_Indexed_Component => return Do_Indexed_Component (N);
1635
1630
when N_Slice => return Do_Slice (N);
1636
1631
when N_In =>
1637
- Warn_Unhandled_Expression ( " In " );
1638
- return Create_Dummy_Irep ;
1632
+ return Report_Unhandled_Node_Irep (N, " Do_Expression " ,
1633
+ " In " ) ;
1639
1634
when N_Real_Literal => return Do_Real_Constant (N);
1640
1635
when N_If_Expression => return Do_If_Expression (N);
1641
1636
when N_And_Then => return Do_And_Then (N);
1642
1637
when N_Or_Else =>
1643
- Warn_Unhandled_Expression ( " Or else " );
1644
- return Create_Dummy_Irep ;
1638
+ return Report_Unhandled_Node_Irep (N, " Do_Expression " ,
1639
+ " Or else " ) ;
1645
1640
when N_Qualified_Expression =>
1646
- Warn_Unhandled_Expression ( " Qualified " );
1647
- return Create_Dummy_Irep ;
1641
+ return Report_Unhandled_Node_Irep (N, " Do_Expression " ,
1642
+ " Qualified " ) ;
1648
1643
when N_Quantified_Expression =>
1649
- Warn_Unhandled_Expression ( " Quantified " );
1650
- return Create_Dummy_Irep ;
1644
+ return Report_Unhandled_Node_Irep (N, " Do_Expression " ,
1645
+ " Quantified " ) ;
1651
1646
when others =>
1652
1647
return Report_Unhandled_Node_Irep (N, " Do_Expression" ,
1653
1648
" Unknown expression kind" );
@@ -4026,8 +4021,8 @@ package body Tree_Walk is
4026
4021
-- populate the symbol table instead.
4027
4022
Register_Subprogram_Specification (Specification (N));
4028
4023
end if ;
4029
- -- Todo aspect_specification
4030
- -- Now the subprogram should registered in the stmbol table
4024
+ -- Todo aspect_specification, i.e. pre/post-conditions
4025
+ -- Now the subprogram should registered in the symbol table
4031
4026
-- whether a separate declaration was provided or not.
4032
4027
if not Global_Symbol_Table.Contains (Proc_Name) then
4033
4028
Report_Unhandled_Node_Empty (N, " Do_Subprogram_Body" ,
@@ -4338,10 +4333,10 @@ package body Tree_Walk is
4338
4333
if Defining_Entity (N) = Stand.Standard_Standard or else
4339
4334
Unit_Name = " system%s"
4340
4335
then
4336
+ -- At the moment Standard or System are not processed: TODO
4341
4337
null ;
4342
- -- At the moment Standard or System are not processed - to be done
4343
4338
else
4344
-
4339
+ -- Handle all other withed library unit declarations
4345
4340
case Nkind (N) is
4346
4341
when N_Subprogram_Body =>
4347
4342
if Acts_As_Spec (N) then
0 commit comments