From c86cf71483eb73bf8d637e4c9d6caef3b67b09a2 Mon Sep 17 00:00:00 2001 From: Robert Dewar Date: Fri, 13 Jun 2014 10:02:31 +0000 Subject: lib.ads, [...] (Is_Compiler_Unit): Removed. 2014-06-13 Robert Dewar * 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 --- gcc/ada/par-ch5.adb | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'gcc/ada/par-ch5.adb') 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); -- cgit v1.1