[multiple changes]

2013-04-12  Hristian Kirtchev  <kirtchev@adacore.com>

	* sem_ch13.adb (Analyze_Aspect_Specifications):
	Insert the corresponding pragma for aspect Abstract_State at
	the top of the visible declarations of the related package.
	Previously this was only done when the package is a compilation
	unit.

2013-04-12  Arnaud Charlet  <charlet@adacore.com>

	* gnat_ugn.texi: Further menu clean ups.
	* sem_prag.adb, opt.ads: Minor reformatting.
	* sem_util.ads: Minor comment fix.

From-SVN: r197901
This commit is contained in:
Arnaud Charlet 2013-04-12 14:55:34 +02:00
parent fd8b40539c
commit 0c68c6135f
6 changed files with 45 additions and 372 deletions

View File

@ -1,3 +1,17 @@
2013-04-12 Hristian Kirtchev <kirtchev@adacore.com>
* sem_ch13.adb (Analyze_Aspect_Specifications):
Insert the corresponding pragma for aspect Abstract_State at
the top of the visible declarations of the related package.
Previously this was only done when the package is a compilation
unit.
2013-04-12 Arnaud Charlet <charlet@adacore.com>
* gnat_ugn.texi: Further menu clean ups.
* sem_prag.adb, opt.ads: Minor reformatting.
* sem_util.ads: Minor comment fix.
2013-04-12 Hristian Kirtchev <kirtchev@adacore.com>
* sem_ch13.adb (Analyze_Aspect_Specifications): Aspect

View File

@ -216,347 +216,6 @@ AdaCore@*
* Mac OS Topics::
* GNU Free Documentation License::
* Index::
--- Detailed Contents ---
About This Guide
* What This Guide Contains::
* What You Should Know before Reading This Guide::
* Related Information::
* Conventions::
Getting Started with GNAT
* Running GNAT::
* Running a Simple Ada Program::
* Running a Program with Multiple Units::
* Using the gnatmake Utility::
@ifset vms
* Editing with Emacs::
@end ifset
@ifclear vms
* Introduction to GPS::
@end ifclear
The GNAT Compilation Model
* Source Representation::
* Foreign Language Representation::
* File Naming Rules::
* Using Other File Names::
* Alternative File Naming Schemes::
* Generating Object Files::
* Source Dependencies::
* The Ada Library Information Files::
* Binding an Ada Program::
* Mixed Language Programming::
@ifclear vms
* Building Mixed Ada & C++ Programs::
* Comparison between GNAT and C/C++ Compilation Models::
@end ifclear
* Comparison between GNAT and Conventional Ada Library Models::
@ifset vms
* Placement of temporary files::
@end ifset
Compiling with gcc
* Compiling Programs::
* Switches for gcc::
* Search Paths and the Run-Time Library (RTL)::
* Order of Compilation Issues::
* Examples::
Binding with gnatbind
* Running gnatbind::
* Switches for gnatbind::
* Command-Line Access::
* Search Paths for gnatbind::
* Examples of gnatbind Usage::
Linking with gnatlink
* Running gnatlink::
* Switches for gnatlink::
The GNAT Make Program gnatmake
* Running gnatmake::
* Switches for gnatmake::
* Mode Switches for gnatmake::
* Notes on the Command Line::
* How gnatmake Works::
* Examples of gnatmake Usage::
Improving Performance
* Performance Considerations::
* Text_IO Suggestions::
* Reducing Size of Ada Executables with gnatelim::
* Reducing Size of Executables with unused subprogram/data elimination::
Renaming Files with gnatchop
* Handling Files with Multiple Units::
* Operating gnatchop in Compilation Mode::
* Command Line for gnatchop::
* Switches for gnatchop::
* Examples of gnatchop Usage::
Configuration Pragmas
* Handling of Configuration Pragmas::
* The Configuration Pragmas Files::
Handling Arbitrary File Naming Conventions with gnatname
* Arbitrary File Naming Conventions::
* Running gnatname::
* Switches for gnatname::
* Examples of gnatname Usage::
GNAT Project Manager
* Introduction::
* Building With Projects::
* Organizing Projects into Subsystems::
* Scenarios in Projects::
* Library Projects::
* Project Extension::
* Aggregate Projects::
* Aggregate Library Projects::
* Project File Reference::
Tools Supporting Project Files
* gnatmake and Project Files::
* The GNAT Driver and Project Files::
The Cross-Referencing Tools gnatxref and gnatfind
* Switches for gnatxref::
* Switches for gnatfind::
* Project Files for gnatxref and gnatfind::
* Regular Expressions in gnatfind and gnatxref::
* Examples of gnatxref Usage::
* Examples of gnatfind Usage::
The GNAT Pretty-Printer gnatpp
* Switches for gnatpp::
* Formatting Rules::
The GNAT Metrics Tool gnatmetric
* Switches for gnatmetric::
File Name Krunching with gnatkr
* About gnatkr::
* Using gnatkr::
* Krunching Method::
* Examples of gnatkr Usage::
Preprocessing with gnatprep
* Preprocessing Symbols::
* Using gnatprep::
* Switches for gnatprep::
* Form of Definitions File::
* Form of Input Text for gnatprep::
The GNAT Library Browser gnatls
* Running gnatls::
* Switches for gnatls::
* Examples of gnatls Usage::
Cleaning Up with gnatclean
* Running gnatclean::
* Switches for gnatclean::
@c * Examples of gnatclean Usage::
@ifclear vms
GNAT and Libraries
* Introduction to Libraries in GNAT::
* General Ada Libraries::
* Stand-alone Ada Libraries::
* Rebuilding the GNAT Run-Time Library::
Using the GNU make Utility
* Using gnatmake in a Makefile::
* Automatically Creating a List of Directories::
* Generating the Command Line Switches::
* Overcoming Command Line Length Limits::
@end ifclear
Memory Management Issues
* Some Useful Memory Pools::
* The GNAT Debug Pool Facility::
@ifclear vms
* The gnatmem Tool::
@end ifclear
Stack Related Facilities
* Stack Overflow Checking::
* Static Stack Usage Analysis::
* Dynamic Stack Usage Analysis::
Verifying Properties with gnatcheck
Creating Sample Bodies with gnatstub
* Running gnatstub::
* Switches for gnatstub::
Creating Unit Tests with gnattest
* Running gnattest::
* Switches for gnattest::
* Project Attributes for gnattest::
* Simple Example::
* Setting Up and Tearing Down the Testing Environment::
* Regenerating Tests::
* Default Test Behavior::
* Testing Primitive Operations of Tagged Types::
* Testing Inheritance::
* Tagged Types Substitutability Testing::
* Testing with Contracts::
* Additional Tests::
@ifclear vms
* Support for other platforms/run-times::
@end ifclear
* Current Limitations::
Performing Dimensionality Analysis in GNAT
Generating Ada Bindings for C and C++ headers
* Running the binding generator::
* Generating bindings for C++ headers::
* Switches::
Other Utility Programs
* Using Other Utility Programs with GNAT::
* The External Symbol Naming Scheme of GNAT::
* Converting Ada Files to html with gnathtml::
* Installing gnathtml::
@ifset vms
* LSE::
* Profiling::
@end ifset
@ifclear vms
Code Coverage and Profiling
* Code Coverage of Ada Programs with gcov::
* Profiling an Ada Program with gprof::
@end ifclear
Running and Debugging Ada Programs
* The GNAT Debugger GDB::
* Running GDB::
* Introduction to GDB Commands::
* Using Ada Expressions::
* Calling User-Defined Subprograms::
* Using the Next Command in a Function::
* Ada Exceptions::
* Ada Tasks::
* Debugging Generic Units::
* Remote Debugging with gdbserver::
* GNAT Abnormal Termination or Failure to Terminate::
* Naming Conventions for GNAT Source Files::
* Getting Internal Debugging Information::
* Stack Traceback::
@ifset vms
Compatibility with HP Ada
* Ada Language Compatibility::
* Differences in the Definition of Package System::
* Language-Related Features::
* The Package STANDARD::
* The Package SYSTEM::
* Tasking and Task-Related Features::
* Pragmas and Pragma-Related Features::
* Library of Predefined Units::
* Bindings::
* Main Program Definition::
* Implementation-Defined Attributes::
* Compiler and Run-Time Interfacing::
* Program Compilation and Library Management::
* Input-Output::
* Implementation Limits::
* Tools and Utilities::
@end ifset
Platform-Specific Information for the Run-Time Libraries
* Summary of Run-Time Configurations::
* Specifying a Run-Time Library::
* Choosing the Scheduling Policy::
* Solaris-Specific Considerations::
* Linux-Specific Considerations::
* AIX-Specific Considerations::
* RTX-Specific Considerations::
* HP-UX-Specific Considerations::
Example of Binder Output File
Elaboration Order Handling in GNAT
* Elaboration Code::
* Checking the Elaboration Order::
* Controlling the Elaboration Order::
* Controlling Elaboration in GNAT - Internal Calls::
* Controlling Elaboration in GNAT - External Calls::
* Default Behavior in GNAT - Ensuring Safety::
* Treatment of Pragma Elaborate::
* Elaboration Issues for Library Tasks::
* Mixing Elaboration Models::
* What to Do If the Default Elaboration Behavior Fails::
* Elaboration for Dispatching Calls::
* Summary of Procedures for Elaboration Control::
* Other Elaboration Order Considerations::
Overflow Check Handling in GNAT
* Background::
* Overflow Checking Modes in GNAT::
* Specifying the Desired Mode::
* Default Settings::
* Implementation Notes::
Conditional Compilation
* Use of Boolean Constants::
* Debugging - A Special Case::
* Conditionalizing Declarations::
* Use of Alternative Implementations::
* Preprocessing::
Inline Assembler
* Basic Assembler Syntax::
* A Simple Example of Inline Assembler::
* Output Variables in Inline Assembler::
* Input Variables in Inline Assembler::
* Inlining Inline Assembler Code::
* Other Asm Functionality::
Compatibility and Porting Guide
* Compatibility with Ada 83::
* Compatibility between Ada 95 and Ada 2005::
* Implementation-dependent characteristics::
* Compatibility with Other Ada Systems::
* Representation Clauses::
@ifclear vms
@c This brief section is only in the non-VMS version
@c The complete chapter on HP Ada issues is in the VMS version
* Compatibility with HP Ada 83::
@end ifclear
@ifset vms
* Transitioning to 64-Bit GNAT for OpenVMS::
@end ifset
Microsoft Windows Topics
@ifclear FSFEDITION
* Installing from the Command Line::
@end ifclear
* Using GNAT on Windows::
* Using a network installation of GNAT::
* CONSOLE and WINDOWS subsystems::
* Temporary Files::
* Mixed-Language Programming on Windows::
* Windows Calling Conventions::
* Introduction to Dynamic Link Libraries (DLLs)::
* Using DLLs with GNAT::
* Building DLLs with GNAT::
* Building DLLs with gnatdll::
* GNAT and Windows Resources::
* Debugging a DLL::
* Setting Stack Size from gnatlink::
* Setting Heap Size from gnatlink::
Mac OS Topics
* Codesigning the Debugger::
GNU Free Documentation License
Index
@end menu
@end ifnottex
@ -31080,7 +30739,7 @@ the location where you installed GNAT.
@include fdl.texi
@c GNU Free Documentation License
@node Index,,GNU Free Documentation License, Top
@node Index
@unnumbered Index
@printindex cp

View File

@ -602,21 +602,20 @@ package Opt is
Float_Format : Character := ' ';
-- GNAT
-- A non-blank value indicates that a Float_Format pragma has been
-- processed, in which case this variable is set to 'I' for IEEE or
-- to 'V' for VAX. The setting of 'V' is only possible on OpenVMS
-- versions of GNAT.
-- processed, in which case this variable is set to 'I' for IEEE or to
-- 'V' for VAX. The setting of 'V' is only possible on OpenVMS versions
-- of GNAT.
Float_Format_Long : Character := ' ';
-- GNAT
-- A non-blank value indicates that a Long_Float pragma has been
-- processed (this pragma is recognized only in OpenVMS versions
-- of GNAT), in which case this variable is set to D or G for
-- D_Float or G_Float.
-- A non-blank value indicates that a Long_Float pragma has been processed
-- (this pragma is recognized only in OpenVMS versions of GNAT), in which
-- case this variable is set to D or G for D_Float or G_Float.
Force_ALI_Tree_File : Boolean := False;
-- GNAT
-- Force generation of ALI file even if errors are encountered.
-- Also forces generation of tree file if -gnatt is also set.
-- Force generation of ALI file even if errors are encountered. Also forces
-- generation of tree file if -gnatt is also set. Set on by use of -gnatQ.
Disable_ALI_File : Boolean := False;
-- GNAT
@ -1404,12 +1403,12 @@ package Opt is
-- Flag set to force attempt at semantic analysis, even if parser errors
-- occur. This will probably cause blowups at this stage in the game. On
-- the other hand, most such blowups will be caught cleanly and simply
-- say compilation abandoned. This flag is set to True by -gnatq or -gnatQ.
-- say compilation abandoned. This flag is set on by -gnatq or -gnatQ.
Unchecked_Shared_Lib_Imports : Boolean := False;
-- GPRBUILD
-- Set to True when shared library projects are allowed to import projects
-- that are not shared library projects. Set by switch
-- that are not shared library projects. Set on by use of the switch
-- --unchecked-shared-lib-imports.
Undefined_Symbols_Are_False : Boolean := False;

View File

@ -1968,12 +1968,27 @@ package body Sem_Ch13 is
end if;
end if;
-- Aspect Abstract_State introduces implicit declarations for all
-- state abstraction entities it defines. To emulate this behavior
-- insert the pragma at the start of the visible declarations of
-- the related package.
if Nam = Name_Abstract_State
and then Nkind (N) = N_Package_Declaration
then
if No (Visible_Declarations (Specification (N))) then
Set_Visible_Declarations (Specification (N), New_List);
end if;
Prepend (Aitem, Visible_Declarations (Specification (N)));
goto Continue;
-- In the context of a compilation unit, we directly put the
-- pragma in the Pragmas_After list of the
-- N_Compilation_Unit_Aux node (no delay is required here)
-- except for aspects on a subprogram body (see below).
if Nkind (Parent (N)) = N_Compilation_Unit
elsif Nkind (Parent (N)) = N_Compilation_Unit
and then (Present (Aitem) or else Is_Boolean_Aspect (Aspect))
then
declare
@ -2014,20 +2029,6 @@ package body Sem_Ch13 is
Prepend (Aitem, Declarations (N));
-- Aspect Abstract_State produces implicit declarations for
-- all state abstraction entities it defines. To emulate
-- this behavior, insert the pragma at the start of the
-- visible declarations of the related package.
elsif Nam = Name_Abstract_State
and then Nkind (N) = N_Package_Declaration
then
if No (Visible_Declarations (Specification (N))) then
Set_Visible_Declarations (Specification (N), New_List);
end if;
Prepend (Aitem, Visible_Declarations (Specification (N)));
else
if No (Pragmas_After (Aux)) then
Set_Pragmas_After (Aux, New_List);

View File

@ -9330,9 +9330,8 @@ package body Sem_Prag is
begin
if Is_Input then
if Ekind (Item_Id) = E_Out_Parameter
or else
(Global_Seen
and then not Appears_In (Subp_Inputs, Item_Id))
or else (Global_Seen
and then not Appears_In (Subp_Inputs, Item_Id))
then
Error_Msg_NE
("item & must have mode in or in out", Item, Item_Id);

View File

@ -1453,7 +1453,8 @@ package Sem_Util is
procedure Set_Entity_With_Style_Check (N : Node_Id; Val : Entity_Id);
-- This procedure has the same calling sequence as Set_Entity, but
-- if Style_Check is set, then it calls a style checking routine which
-- can check identifier spelling style.
-- can check identifier spelling style. This procedure also takes care
-- of checking the restriction No_Implementation_Identifiers.
procedure Set_Name_Entity_Id (Id : Name_Id; Val : Entity_Id);
pragma Inline (Set_Name_Entity_Id);