summaryrefslogtreecommitdiff
path: root/gcc/ada/ceinfo.adb
diff options
context:
space:
mode:
authorcharlet <charlet@138bc75d-0d04-0410-961f-82ee72b054a4>2010-10-26 12:19:56 +0000
committercharlet <charlet@138bc75d-0d04-0410-961f-82ee72b054a4>2010-10-26 12:19:56 +0000
commit5b990e0882fb69becb677434142fa028ae1e236e (patch)
tree3f8b90ada92674382721d695cfa5f7417e9e04d6 /gcc/ada/ceinfo.adb
parentb38e41313a2674d6547ba6ed6abc433284018207 (diff)
downloadgcc-5b990e0882fb69becb677434142fa028ae1e236e.tar.gz
2010-10-26 Robert Dewar <dewar@adacore.com>
* einfo.ads, einfo.adb (Is_Base_Type): New function, use it where appropriate. * exp_ch6.adb, exp_dbug.adb, exp_disp.adb, freeze.adb, lib-xref.adb, sem_aux.adb, sem_ch3.adb, sem_ch7.adb, sem_ch8.adb (Is_Base_Type): Use this new abstraction where appropriate. 2010-10-26 Ed Schonberg <schonberg@adacore.com> * sem_ch12.adb: Code clean up. 2010-10-26 Paul Hilfinger <hilfinger@adacore.com> * exp_dbug.ads: Document effect of 'pragma Unchecked_Union' on debugging data. 2010-10-26 Ed Schonberg <schonberg@adacore.com> * sem_util.adb (Note_Possible_Modification): If the target of an assignment is the bound variable in an iterator, the domain of iteration, i.e. array or container, is modified as well. 2010-10-26 Bob Duff <duff@adacore.com> * Make-generated.in: Make the relevant make targets depend on ceinfo.adb and csinfo.adb. * csinfo.adb, ceinfo.adb: Make sure it raises an exception on failure, so when called from xeinfo, the failure will be noticed. * sinfo.ads: Update comments to reflect the fact that xsinfo runs csinfo * xsinfo.adb, xeinfo.adb: Run ceinfo to check for errors. Close files. 2010-10-26 Ed Schonberg <schonberg@adacore.com> * exp_ch4.adb: Set properly parent field of operands of concatenation. 2010-10-26 Ed Schonberg <schonberg@adacore.com> * sem_res.adb (Check_Infinite_Recursion): A recursive call within a conditional expression or a case expression should not generate an infinite recursion warning. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@165946 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/ada/ceinfo.adb')
-rw-r--r--gcc/ada/ceinfo.adb19
1 files changed, 16 insertions, 3 deletions
diff --git a/gcc/ada/ceinfo.adb b/gcc/ada/ceinfo.adb
index 78e3faeb8cd..47f134a37e2 100644
--- a/gcc/ada/ceinfo.adb
+++ b/gcc/ada/ceinfo.adb
@@ -6,7 +6,7 @@
-- --
-- B o d y --
-- --
--- Copyright (C) 1998-2008, Free Software Foundation, Inc. --
+-- Copyright (C) 1998-2010, Free Software Foundation, Inc. --
-- --
-- GNAT is free software; you can redistribute it and/or modify it under --
-- terms of the GNU General Public License as published by the Free Soft- --
@@ -23,8 +23,12 @@
-- --
------------------------------------------------------------------------------
--- Program to check consistency of einfo.ads and einfo.adb. Checks that
--- field name usage is consistent, including comments mentioning fields.
+-- Check consistency of einfo.ads and einfo.adb. Checks that field name usage
+-- is consistent, including comments mentioning fields.
+
+-- Note that this is used both as a standalone program, and as a procedure
+-- called by XEinfo. This raises an unhandled exception if it finds any
+-- errors; we don't attempt any sophisticated error recovery.
with Ada.Strings.Unbounded; use Ada.Strings.Unbounded;
with Ada.Strings.Unbounded.Text_IO; use Ada.Strings.Unbounded.Text_IO;
@@ -42,6 +46,9 @@ procedure CEinfo is
Infil : File_Type;
Lineno : Natural := 0;
+ Err : exception;
+ -- Raised on error
+
Fieldnm : VString;
Accessfunc : VString;
Line : VString;
@@ -126,6 +133,7 @@ begin
Put_Line
("*** unknown field name " & Fieldnm & " at line " & Lineno);
end if;
+ raise Err;
end if;
end if;
end loop;
@@ -153,6 +161,7 @@ begin
Put_Line
("*** unknown field name " & Fieldnm & " at line " & Lineno);
end if;
+ raise Err;
end if;
end loop;
@@ -172,6 +181,7 @@ begin
Put_Line ("*** incorrect field at line " & Lineno);
Put_Line (" found field " & Accessfunc);
Put_Line (" expecting field " & Get (Fields, Fieldnm));
+ raise Err;
end if;
end loop;
@@ -196,9 +206,12 @@ begin
Put_Line ("*** incorrect field at line " & Lineno);
Put_Line (" found field " & Accessfunc);
Put_Line (" expecting field " & Get (Fields, Fieldnm));
+ raise Err;
end if;
end loop;
+ Close (Infil);
+
Put_Line ("All tests completed successfully, no errors detected");
end CEinfo;