[multiple changes]
2014-10-10 Gary Dismukes <dismukes@adacore.com> * a-coinho-shared.adb: Minor typo fix. * prj-env.ads: Minor reformatting. 2014-10-10 Hristian Kirtchev <kirtchev@adacore.com> * sem_res.adb (Resolve_String_Literal): Do not generate a string literal subtype for the default expression of a formal parameter in GNATprove mode. 2014-10-10 Yannick Moy <moy@adacore.com> * errout.adb (SPARK_Msg_N): Issue error unless SPARK_Mode is Off. 2014-10-10 Ed Schonberg <schonberg@adacore.com> * exp_ch5.adb (Expand_Formal_Container_Element_Loop): Analyze declaration for loop parameter before rest of loop, and set entity kind to prevent assignments to it in the user code. * sem_ch3.adb (Analyze_Object_Contract): No contracts apply to the loop parameter in an element iteration over o formal container. 2014-10-10 Robert Dewar <dewar@adacore.com> * gnat_ugn.texi: Document use of user-level routines to handle e.g. col major arrays. 2014-10-10 Doug Rupp <rupp@adacore.com> * s-osinte-android.adb: Fix misspelling. * gsocket.h: Tweak the Android quirks. 2014-10-10 Robert Dewar <dewar@adacore.com> * errout.ads (SPARK_Msg_N): Fix spec to match change in body. From-SVN: r216083
This commit is contained in:
parent
06a04ce75a
commit
79904ebc48
11 changed files with 91 additions and 14 deletions
|
@ -1,3 +1,40 @@
|
|||
2014-10-10 Gary Dismukes <dismukes@adacore.com>
|
||||
|
||||
* a-coinho-shared.adb: Minor typo fix.
|
||||
* prj-env.ads: Minor reformatting.
|
||||
|
||||
2014-10-10 Hristian Kirtchev <kirtchev@adacore.com>
|
||||
|
||||
* sem_res.adb (Resolve_String_Literal): Do not
|
||||
generate a string literal subtype for the default expression of
|
||||
a formal parameter in GNATprove mode.
|
||||
|
||||
2014-10-10 Yannick Moy <moy@adacore.com>
|
||||
|
||||
* errout.adb (SPARK_Msg_N): Issue error unless SPARK_Mode is Off.
|
||||
|
||||
2014-10-10 Ed Schonberg <schonberg@adacore.com>
|
||||
|
||||
* exp_ch5.adb (Expand_Formal_Container_Element_Loop): Analyze
|
||||
declaration for loop parameter before rest of loop, and set
|
||||
entity kind to prevent assignments to it in the user code.
|
||||
* sem_ch3.adb (Analyze_Object_Contract): No contracts apply to the
|
||||
loop parameter in an element iteration over o formal container.
|
||||
|
||||
2014-10-10 Robert Dewar <dewar@adacore.com>
|
||||
|
||||
* gnat_ugn.texi: Document use of user-level routines to handle
|
||||
e.g. col major arrays.
|
||||
|
||||
2014-10-10 Doug Rupp <rupp@adacore.com>
|
||||
|
||||
* s-osinte-android.adb: Fix misspelling.
|
||||
* gsocket.h: Tweak the Android quirks.
|
||||
|
||||
2014-10-10 Robert Dewar <dewar@adacore.com>
|
||||
|
||||
* errout.ads (SPARK_Msg_N): Fix spec to match change in body.
|
||||
|
||||
2014-10-10 Robert Dewar <dewar@adacore.com>
|
||||
|
||||
* sem_ch13.adb: Minor code reorganization.
|
||||
|
|
|
@ -26,7 +26,7 @@
|
|||
------------------------------------------------------------------------------
|
||||
|
||||
-- Note: special attention must be paid to the case of simultaneous access
|
||||
-- to internal shared objects and elements by difference tasks. The Reference
|
||||
-- to internal shared objects and elements by different tasks. The Reference
|
||||
-- counter of internal shared object is the only component protected using
|
||||
-- atomic operations; other components and elements can be modified only when
|
||||
-- reference counter is equal to one (so there are no other references to this
|
||||
|
|
|
@ -3138,7 +3138,7 @@ package body Errout is
|
|||
|
||||
procedure SPARK_Msg_N (Msg : String; N : Node_Or_Entity_Id) is
|
||||
begin
|
||||
if SPARK_Mode = On then
|
||||
if SPARK_Mode /= Off then
|
||||
Error_Msg_N (Msg, N);
|
||||
end if;
|
||||
end SPARK_Msg_N;
|
||||
|
|
|
@ -868,8 +868,8 @@ package Errout is
|
|||
|
||||
procedure SPARK_Msg_N (Msg : String; N : Node_Or_Entity_Id);
|
||||
pragma Inline (SPARK_Msg_N);
|
||||
-- Same as Error_Msg_N, but the error is reported only when SPARK_Mode is
|
||||
-- "on". The routine is inlined because it acts as a simple wrapper.
|
||||
-- Same as Error_Msg_N, but the error is suppressed if SPARK_Mode is Off.
|
||||
-- The routine is inlined because it acts as a simple wrapper.
|
||||
|
||||
procedure SPARK_Msg_NE
|
||||
(Msg : String;
|
||||
|
@ -878,6 +878,7 @@ package Errout is
|
|||
pragma Inline (SPARK_Msg_NE);
|
||||
-- Same as Error_Msg_NE, but the error is reported only when SPARK_Mode is
|
||||
-- "on". The routine is inlined because it acts as a simple wrapper.
|
||||
-- Is it right that this is so different from SPARK_Msg_N???
|
||||
|
||||
------------------------------------
|
||||
-- Utility Interface for Back End --
|
||||
|
|
|
@ -2889,7 +2889,17 @@ package body Exp_Ch5 is
|
|||
Statements => New_List (New_Loop)));
|
||||
|
||||
Rewrite (N, New_Loop);
|
||||
Analyze (New_Loop);
|
||||
|
||||
-- The loop parameter is declared by an object declaration, but within
|
||||
-- the loop we must prevent user assignments to it, so we analyze the
|
||||
-- declaration and reset the entity kind, before analyzing the rest of
|
||||
-- the loop;
|
||||
|
||||
Analyze (Elmt_Decl);
|
||||
Set_Ekind (Defining_Identifier (Elmt_Decl), E_Loop_Parameter);
|
||||
Set_Assignment_OK (Name (Elmt_Ref));
|
||||
|
||||
Analyze (N);
|
||||
end Expand_Formal_Container_Element_Loop;
|
||||
|
||||
-----------------------------
|
||||
|
|
|
@ -20865,6 +20865,14 @@ that denote descendant nodes and parent node, as well as varied
|
|||
semantic information. To study this example in more detail, you might want to
|
||||
look at the body of the PN procedure in the stated file.
|
||||
|
||||
Another useful application of this capability is to deal with situations of
|
||||
complex data which are not handled suitably by GDB. For example, if you specify
|
||||
Convention Fortran for a multi-dimensional array, GDB does not know that
|
||||
the ordering of array elements has been switched and will not properly
|
||||
address the array elements. In such a case, instead of trying to print the
|
||||
elements directly from GDB, you can write a callable procedure that prints
|
||||
the elements in the desired format.
|
||||
|
||||
@node Using the Next Command in a Function
|
||||
@section Using the Next Command in a Function
|
||||
|
||||
|
|
|
@ -29,8 +29,7 @@
|
|||
* *
|
||||
****************************************************************************/
|
||||
|
||||
#if defined(__nucleus__) || defined(VTHREADS) || defined(__ANDROID__) \
|
||||
|| defined(__PikeOS__)
|
||||
#if defined(__nucleus__) || defined(VTHREADS) || defined(__PikeOS__)
|
||||
|
||||
/* Sockets not supported on these platforms. */
|
||||
#undef HAVE_SOCKETS
|
||||
|
@ -204,8 +203,13 @@
|
|||
#include <netdb.h>
|
||||
#endif
|
||||
|
||||
#ifdef __ANDROID__
|
||||
#include <unistd.h>
|
||||
#include <sys/select.h>
|
||||
#endif
|
||||
|
||||
#if defined (_AIX) || defined (__FreeBSD__) || defined (__hpux__) || \
|
||||
defined (_WIN32) || defined (__APPLE__)
|
||||
defined (_WIN32) || defined (__APPLE__) || defined (__ANDROID__)
|
||||
# define HAVE_THREAD_SAFE_GETxxxBYyyy 1
|
||||
|
||||
#elif defined (linux) || defined (__GLIBC__) || \
|
||||
|
|
|
@ -6,7 +6,7 @@
|
|||
-- --
|
||||
-- S p e c --
|
||||
-- --
|
||||
-- Copyright (C) 2001-2013, Free Software Foundation, Inc. --
|
||||
-- Copyright (C) 2001-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- --
|
||||
|
@ -243,10 +243,10 @@ package Prj.Env is
|
|||
function Get_Runtime_Path
|
||||
(Self : Project_Search_Path;
|
||||
Name : String) return String_Access;
|
||||
-- Compute the full path for the project-based runtime name. It first
|
||||
-- checks that name is not a simple name (must has a path separator in it),
|
||||
-- and returns null in case of failure. This check might be removed in the
|
||||
-- future. The name is simply searched on the project path.
|
||||
-- Compute the full path for the project-based runtime name. It first
|
||||
-- checks that Name is not a simple file name (must have a path separator
|
||||
-- in it), and returns null in case of failure. This check might be removed
|
||||
-- in the future. Name is simply searched on the project path.
|
||||
|
||||
private
|
||||
package Projects_Paths is new GNAT.Dynamic_HTables.Simple_HTable
|
||||
|
|
|
@ -39,7 +39,7 @@ pragma Polling (Off);
|
|||
-- that are needed by children of System.
|
||||
|
||||
with Interfaces.C; use Interfaces.C;
|
||||
with Interfaces.C.Extentions; use Interfaces.C.Extentions;
|
||||
with Interfaces.C.Extensions; use Interfaces.C.Extensions;
|
||||
|
||||
package body System.OS_Interface is
|
||||
|
||||
|
|
|
@ -3062,6 +3062,12 @@ package body Sem_Ch3 is
|
|||
Error_Msg_N ("constant cannot be volatile", Obj_Id);
|
||||
end if;
|
||||
|
||||
-- The loop parameter in an element iterator over a formal container
|
||||
-- is declared with an object declaration but no contracts apply.
|
||||
|
||||
elsif Ekind (Obj_Id) = E_Loop_Parameter then
|
||||
null;
|
||||
|
||||
else pragma Assert (Ekind (Obj_Id) = E_Variable);
|
||||
|
||||
-- The following checks are only relevant when SPARK_Mode is on as
|
||||
|
|
|
@ -9947,6 +9947,17 @@ package body Sem_Res is
|
|||
then
|
||||
Subtype_Id := Typ;
|
||||
|
||||
-- Do not generate a string literal subtype for the default expression
|
||||
-- of a formal parameter in GNATprove mode. This is because the string
|
||||
-- subtype is associated with the freezing actions of the subprogram,
|
||||
-- however freezing is disabled in GNATprove mode and as a result the
|
||||
-- subtype is unavailable.
|
||||
|
||||
elsif GNATprove_Mode
|
||||
and then Nkind (Parent (N)) = N_Parameter_Specification
|
||||
then
|
||||
Subtype_Id := Typ;
|
||||
|
||||
-- Otherwise we must create a string literal subtype. Note that the
|
||||
-- whole idea of string literal subtypes is simply to avoid the need
|
||||
-- for building a full fledged array subtype for each literal.
|
||||
|
|
Loading…
Add table
Reference in a new issue