Commit c2658843 by Arnaud Charlet

[multiple changes]

2013-04-12  Bob Duff  <duff@adacore.com>

	* par-ch7.adb (P_Package): Initialize Sloc in the newly-pushed scope
	stack entry.

2013-04-12  Robert Dewar  <dewar@adacore.com>

	* switch-c.adb: Minor fix to wording of error message for
	-gnatet/eT.

2013-04-12  Robert Dewar  <dewar@adacore.com>

	* impunit.adb: Add s-multip and s-mudido to list of impl defined
	system units.
	* gnat_rm.texi: Add documentation for
	System.Multiprocessors[.Dispatching_Domains].

2013-04-12  Ben Brosgol  <brosgol@adacore.com>

	* gnat_ugn.texi: Completion of menu cleanups.

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

	* sem_prag.adb (Diagnose_Multiple_Pragmas): Relax the rules
	in Relaxed_RM_Semantics.

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

	* set_targ.adb (elab code): Add support for non gcc back-ends
	where save_argv is null.

From-SVN: r197899
parent 340772c0
2013-04-12 Bob Duff <duff@adacore.com>
* par-ch7.adb (P_Package): Initialize Sloc in the newly-pushed scope
stack entry.
2013-04-12 Robert Dewar <dewar@adacore.com>
* switch-c.adb: Minor fix to wording of error message for
-gnatet/eT.
2013-04-12 Robert Dewar <dewar@adacore.com>
* impunit.adb: Add s-multip and s-mudido to list of impl defined
system units.
* gnat_rm.texi: Add documentation for
System.Multiprocessors[.Dispatching_Domains].
2013-04-12 Ben Brosgol <brosgol@adacore.com>
* gnat_ugn.texi: Completion of menu cleanups.
2013-04-12 Arnaud Charlet <charlet@adacore.com>
* sem_prag.adb (Diagnose_Multiple_Pragmas): Relax the rules
in Relaxed_RM_Semantics.
2013-04-12 Arnaud Charlet <charlet@adacore.com>
* set_targ.adb (elab code): Add support for non gcc back-ends
where save_argv is null.
2013-04-12 Robert Dewar <dewar@adacore.com>
* gnat1drv.adb (Gnat1drv): Test Target_Dependent_Info_Write_Name.
......
......@@ -548,6 +548,8 @@ The GNAT Library
* System.Address_Image (s-addima.ads)::
* System.Assertions (s-assert.ads)::
* System.Memory (s-memory.ads)::
* System.Multiprocessors (s-multip.ads)::
* System.Multiprocessors.Dispatching_Domains (s-mudido.ads)::
* System.Partition_Interface (s-parint.ads)::
* System.Pool_Global (s-pooglo.ads)::
* System.Pool_Local (s-pooloc.ads)::
......@@ -15508,6 +15510,8 @@ of GNAT, and will generate a warning message.
* System.Address_Image (s-addima.ads)::
* System.Assertions (s-assert.ads)::
* System.Memory (s-memory.ads)::
* System.Multiprocessors (s-multip.ads)::
* System.Multiprocessors.Dispatching_Domains (s-mudido.ads)::
* System.Partition_Interface (s-parint.ads)::
* System.Pool_Global (s-pooglo.ads)::
* System.Pool_Local (s-pooloc.ads)::
......@@ -16970,6 +16974,22 @@ allocation mechanisms for the default pool, and in addition, direct
calls to this unit may be made for low level allocation uses (for
example see the body of @code{GNAT.Tables}).
@node System.Multiprocessors (s-multip.ads)
@section @code{System.Multiprocessors} (@file{s-multip.ads})
@cindex @code{System.Multiprocessors} (@file{s-multip.ads})
@cindex Multiprocessor interface
This is an Ada 2012 unit defined in the Ada 2012 Reference Manual, but
in GNAT we also make it available in Ada 95 and Ada 2005 (where it is
technically an implementation-defined addition).
@node System.Multiprocessors.Dispatching_Domains (s-mudido.ads)
@section @code{System.Multiprocessors.Dispatching_Domains} (@file{s-mudido.ads})
@cindex @code{System.Multiprocessors.Dispatching_Domains} (@file{s-mudido.ads})
@cindex Multiprocessor interface
This is an Ada 2012 unit defined in the Ada 2012 Reference Manual, but
in GNAT we also make it available in Ada 95 and Ada 2005 (where it is
technically an implementation-defined addition).
@node System.Partition_Interface (s-parint.ads)
@section @code{System.Partition_Interface} (@file{s-parint.ads})
@cindex @code{System.Partition_Interface} (@file{s-parint.ads})
......
......@@ -6,7 +6,7 @@
-- --
-- B o d y --
-- --
-- Copyright (C) 2000-2012, Free Software Foundation, Inc. --
-- Copyright (C) 2000-2013, 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- --
......@@ -380,7 +380,14 @@ package body Impunit is
("s-ststop", F), -- System.Strings.Stream_Ops
("s-tasinf", F), -- System.Task_Info
("s-wchcnv", F), -- System.Wch_Cnv
("s-wchcon", F)); -- System.Wch_Con
("s-wchcon", F), -- System.Wch_Con
-- The following are strictly speaking Ada 2012 units, but we are allowed
-- to add children to system, so we consider them to be implementation
-- defined additions to System in earlier versions of Ada.
("s-multip", T), -- System.Multiprocessors
("s-mudido", T)); -- System.Multiprocessors.Dispatching_Domains
--------------------
-- Ada 2005 Units --
......@@ -544,8 +551,6 @@ package body Impunit is
-- The following units should be used only in Ada 2012 mode
Non_Imp_File_Names_12 : constant File_List := (
("s-multip", T), -- System.Multiprocessors
("s-mudido", T), -- System.Multiprocessors.Dispatching_Domains
("s-stposu", T), -- System.Storage_Pools.Subpools
("a-cobove", T), -- Ada.Containers.Bounded_Vectors
("a-cbdlli", T), -- Ada.Containers.Bounded_Doubly_Linked_Lists
......
......@@ -6,7 +6,7 @@
-- --
-- B o d y --
-- --
-- Copyright (C) 1992-2011, Free Software Foundation, Inc. --
-- Copyright (C) 1992-2013, 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- --
......@@ -138,6 +138,7 @@ package body Ch7 is
end if;
T_Body;
Scope.Table (Scope.Last).Sloc := Token_Ptr;
Name_Node := P_Defining_Program_Unit_Name;
Scope.Table (Scope.Last).Labl := Name_Node;
TF_Is;
......@@ -182,6 +183,7 @@ package body Ch7 is
-- Cases other than Package_Body
else
Scope.Table (Scope.Last).Sloc := Token_Ptr;
Name_Node := P_Defining_Program_Unit_Name;
Scope.Table (Scope.Last).Labl := Name_Node;
......
......@@ -3456,8 +3456,12 @@ package body Sem_Prag is
end if;
-- Give message if needed if we fall through those tests
-- except on Relaxed_RM_Semantics where we let go: either this
-- is a case accepted/ignored by other Ada compilers (e.g.
-- a mix of Convention and Import), or another error will be
-- generated later (e.g. using both Import and Export).
if Err then
if Err and not Relaxed_RM_Semantics then
Error_Pragma_Arg
("at most one Convention/Export/Import pragma is allowed",
Arg2);
......
......@@ -487,18 +487,26 @@ begin
pragma Import (C, save_argv);
-- Saved value of argv (argument pointers), imported from misc.c
function Len_Arg (Arg : Pos) return Nat;
-- Determine length of argument number Arg on original gnat1 command
-- line.
gnat_argc : Nat;
gnat_argv : Arg_Array_Ptr;
pragma Import (C, gnat_argc);
pragma Import (C, gnat_argv);
-- If save_argv is not set, default to gnat_argc/argv
argc : Nat;
argv : Arg_Array_Ptr;
function Len_Arg (Arg : Big_String_Ptr) return Nat;
-- Determine length of argument Arg (a nul terminated C string).
-------------
-- Len_Arg --
-------------
function Len_Arg (Arg : Pos) return Nat is
function Len_Arg (Arg : Big_String_Ptr) return Nat is
begin
for J in 1 .. Nat'Last loop
if save_argv (Arg).all (Natural (J)) = ASCII.NUL then
if Arg (Natural (J)) = ASCII.NUL then
return J - 1;
end if;
end loop;
......@@ -507,12 +515,21 @@ begin
end Len_Arg;
begin
if save_argv /= null then
argv := save_argv;
argc := save_argc;
else
-- Case of a non gcc compiler, e.g. gnat2why or gnat2scil
argv := gnat_argv;
argc := gnat_argc;
end if;
-- Loop through arguments looking for -gnateT, also look for -gnatd.b
for Arg in 1 .. save_argc - 1 loop
for Arg in 1 .. argc - 1 loop
declare
Argv_Ptr : constant Big_String_Ptr := save_argv (Arg);
Argv_Len : constant Nat := Len_Arg (Arg);
Argv_Ptr : constant Big_String_Ptr := argv (Arg);
Argv_Len : constant Nat := Len_Arg (Argv_Ptr);
begin
if Argv_Len > 8
......
......@@ -652,8 +652,7 @@ package body Switch.C is
when 't' =>
if not First_Switch then
Osint.Fail
("-gnatet must be first if combined with "
& "other switches");
("-gnatet must not be combined with other switches");
end if;
-- Check for '='
......@@ -674,8 +673,7 @@ package body Switch.C is
when 'T' =>
if not First_Switch then
Osint.Fail
("-gnateT must be first if combined with "
& "other switches");
("-gnateT must not be combined with other switches");
end if;
-- Check for '='
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment