aboutsummaryrefslogtreecommitdiff
path: root/gcc/ada/par-ch5.adb
diff options
context:
space:
mode:
authorRobert Dewar <dewar@adacore.com>2014-06-13 10:02:31 +0000
committerArnaud Charlet <charlet@gcc.gnu.org>2014-06-13 12:02:31 +0200
commitc86cf71483eb73bf8d637e4c9d6caef3b67b09a2 (patch)
tree5763142f34ae94b7103a174f78d7a22414f8261f /gcc/ada/par-ch5.adb
parent65ede00530bf84ad6fb7a04f6f1ff92cb5b095d6 (diff)
downloadgcc-c86cf71483eb73bf8d637e4c9d6caef3b67b09a2.zip
gcc-c86cf71483eb73bf8d637e4c9d6caef3b67b09a2.tar.gz
gcc-c86cf71483eb73bf8d637e4c9d6caef3b67b09a2.tar.bz2
lib.ads, [...] (Is_Compiler_Unit): Removed.
2014-06-13 Robert Dewar <dewar@adacore.com> * lib.ads, lib.adb, lib-writ.adb, lib-load.adb (Is_Compiler_Unit): Removed. * opt.ads (Compiler_Unit): New flag. * par-ch5.adb (Test_Statement_Required): Call Check_Compiler_Unit for null statement sequence (not allowed in compiler unit). * par-prag.adb (Prag): Handle Compiler_Unit[_Warning] during parsing. * restrict.ads, restrict.adb (Check_Compiler_Unit): New version and new calling sequence. * sem_ch11.adb, sem_ch3.adb, sem_ch4.adb: New calling sequence for Check_Compiler_Unit. * sem_ch6.adb (Analyze_Extended_Return_Statement): Call Check_Compiler_Unit (this construct is not allowed in compiler units). * sem_prag.adb (Analyze_Pragma, case Compiler_Unit[_Warning]): Set Opt.Compiler_Unit. From-SVN: r211617
Diffstat (limited to 'gcc/ada/par-ch5.adb')
-rw-r--r--gcc/ada/par-ch5.adb6
1 files changed, 5 insertions, 1 deletions
diff --git a/gcc/ada/par-ch5.adb b/gcc/ada/par-ch5.adb
index 517e58a..1d5504d 100644
--- a/gcc/ada/par-ch5.adb
+++ b/gcc/ada/par-ch5.adb
@@ -6,7 +6,7 @@
-- --
-- B o d y --
-- --
--- Copyright (C) 1992-2013, Free Software Foundation, Inc. --
+-- Copyright (C) 1992-2014, 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- --
@@ -240,6 +240,10 @@ package body Ch5 is
and then Statement_Seen)
or else All_Pragmas)
then
+ -- This Ada 2012 construct not allowed in a compiler unit
+
+ Check_Compiler_Unit ("null statement list", Token_Ptr);
+
declare
Null_Stm : constant Node_Id :=
Make_Null_Statement (Token_Ptr);