@@ -388,7 +388,7 @@ package body Tree_Walk is
388
388
procedure Process_Declarations (L : List_Id; Block : Irep);
389
389
-- Processes the declarations and is used for both a package specification
390
390
-- where only basic declarations are allowed (no subprogram bodies etc.)
391
- -- and declarative parts where such declaratios are allowed .
391
+ -- and declarative parts where subprogram bodies etc. may be declared .
392
392
-- The Gnat front end will check that only allowed declarations are used
393
393
-- where only basic declarations permitted.
394
394
-- Process_Declarations is a procedure rather than a function like its
@@ -1570,11 +1570,6 @@ package body Tree_Walk is
1570
1570
end Create_Dummy_Irep ;
1571
1571
1572
1572
function Do_Expression (N : Node_Id) return Irep is
1573
- procedure Warn_Unhandled_Expression (M : String);
1574
- procedure Warn_Unhandled_Expression (M : String) is
1575
- begin
1576
- Put_Line (Standard_Error, " Warning: " & M & " expressions unhandled" );
1577
- end Warn_Unhandled_Expression ;
1578
1573
begin
1579
1574
Declare_Itype (Etype (N));
1580
1575
case Nkind (N) is
@@ -1590,14 +1585,14 @@ package body Tree_Walk is
1590
1585
when Attribute_Access => return Do_Address_Of (N);
1591
1586
when Attribute_Length => return Do_Array_Length (N);
1592
1587
when Attribute_Range =>
1593
- Warn_Unhandled_Expression ( " Range attribute " );
1594
- return Create_Dummy_Irep ;
1588
+ return Report_Unhandled_Node_Irep (N, " Do_Expression " ,
1589
+ " Range attribute " ) ;
1595
1590
when Attribute_First =>
1596
- Warn_Unhandled_Expression ( " First attribute " );
1597
- return Create_Dummy_Irep ;
1591
+ return Report_Unhandled_Node_Irep (N, " Do_Expression " ,
1592
+ " First attribute " ) ;
1598
1593
when Attribute_Last =>
1599
- Warn_Unhandled_Expression ( " Last attribute " );
1600
- return Create_Dummy_Irep ;
1594
+ return Report_Unhandled_Node_Irep (N, " Do_Expression " ,
1595
+ " Last attribute " ) ;
1601
1596
when others =>
1602
1597
return Report_Unhandled_Node_Irep (N, " Do_Expression" ,
1603
1598
" Unknown attribute" );
@@ -1608,20 +1603,20 @@ package body Tree_Walk is
1608
1603
when N_Indexed_Component => return Do_Indexed_Component (N);
1609
1604
when N_Slice => return Do_Slice (N);
1610
1605
when N_In =>
1611
- Warn_Unhandled_Expression ( " In " );
1612
- return Create_Dummy_Irep ;
1606
+ return Report_Unhandled_Node_Irep (N, " Do_Expression " ,
1607
+ " In " ) ;
1613
1608
when N_Real_Literal => return Do_Real_Constant (N);
1614
1609
when N_If_Expression => return Do_If_Expression (N);
1615
1610
when N_And_Then => return Do_And_Then (N);
1616
1611
when N_Or_Else =>
1617
- Warn_Unhandled_Expression ( " Or else " );
1618
- return Create_Dummy_Irep ;
1612
+ return Report_Unhandled_Node_Irep (N, " Do_Expression " ,
1613
+ " Or else " ) ;
1619
1614
when N_Qualified_Expression =>
1620
- Warn_Unhandled_Expression ( " Qualified " );
1621
- return Create_Dummy_Irep ;
1615
+ return Report_Unhandled_Node_Irep (N, " Do_Expression " ,
1616
+ " Qualified " ) ;
1622
1617
when N_Quantified_Expression =>
1623
- Warn_Unhandled_Expression ( " Quantified " );
1624
- return Create_Dummy_Irep ;
1618
+ return Report_Unhandled_Node_Irep (N, " Do_Expression " ,
1619
+ " Quantified " ) ;
1625
1620
when others =>
1626
1621
return Report_Unhandled_Node_Irep (N, " Do_Expression" ,
1627
1622
" Unknown expression kind" );
@@ -4000,8 +3995,8 @@ package body Tree_Walk is
4000
3995
-- populate the symbol table instead.
4001
3996
Register_Subprogram_Specification (Specification (N));
4002
3997
end if ;
4003
- -- Todo aspect_specification
4004
- -- Now the subprogram should registered in the stmbol table
3998
+ -- Todo aspect_specification, i.e. pre/post-conditions
3999
+ -- Now the subprogram should registered in the symbol table
4005
4000
-- whether a separate declaration was provided or not.
4006
4001
if not Global_Symbol_Table.Contains (Proc_Name) then
4007
4002
Report_Unhandled_Node_Empty (N, " Do_Subprogram_Body" ,
@@ -4312,10 +4307,11 @@ package body Tree_Walk is
4312
4307
if Defining_Entity (N) = Stand.Standard_Standard or else
4313
4308
Unit_Name = " system%s"
4314
4309
then
4315
- null ;
4316
- -- At the moment Standard or System are not processed - to be done
4310
+ -- At the moment Standard or System are not processed: TODO
4311
+ Put_Line (Standard_Error,
4312
+ " At the moment Standard or System library units are not processed." );
4317
4313
else
4318
-
4314
+ -- Withed library unit that has no separate declaration
4319
4315
case Nkind (N) is
4320
4316
when N_Subprogram_Body =>
4321
4317
if Acts_As_Spec (N) then
0 commit comments