diff options
author | Arnaud Charlet <charlet@gcc.gnu.org> | 2017-09-07 12:09:17 +0200 |
---|---|---|
committer | Arnaud Charlet <charlet@gcc.gnu.org> | 2017-09-07 12:09:17 +0200 |
commit | ed323421344929d7b6104566d8301ce4f88fd00c (patch) | |
tree | 0f38ba31444dfb438c849f40a21b0eeeaab079ff /gcc/ada/styleg.adb | |
parent | c8e072dafbfc0b07d56d457c5b92d3ac77fb4cfe (diff) | |
download | gcc-ed323421344929d7b6104566d8301ce4f88fd00c.zip gcc-ed323421344929d7b6104566d8301ce4f88fd00c.tar.gz gcc-ed323421344929d7b6104566d8301ce4f88fd00c.tar.bz2 |
[multiple changes]
2017-09-07 Yannick Moy <moy@adacore.com>
* a-exetim-mingw.ads: Add contract Global=>null
on all operations that are modeled as having no read or write
of global variables in SPARK.
2017-09-07 Raphael Amiard <amiard@adacore.com>
* a-chtgop.adb, a-chtgop.ads (Generic_Iteration_With_Position): Added
to Hmaps.Generic_Ops.
* a-cohama.adb (Ada.Containers.Hmaps.Iterate): Pass proper position in
cursors.
* a-cihama.adb (Ada.Containers.Indefinite_Hmaps.Iterate): Pass pos in
cursors.
* a-cohase.adb (Ada.Containers.Hashed_Sets.Iterate): Pass proper
position in cursors.
2017-09-07 Javier Miranda <miranda@adacore.com>
* sem_elab.adb (Check_Task_Activation): Adding switch -gnatd.y to
allow disabling the generation of implicit pragma Elaborate_All
on task bodies.
2017-09-07 Javier Miranda <miranda@adacore.com>
* exp_disp.adb (Make_Tags): Avoid suffix counter
in the external name of the elaboration flag. Required to fix
the regressions introduced by the initial version of this patch.
2017-09-07 Bob Duff <duff@adacore.com>
* sem_ch6.adb (Analyze_Function_Return): Do not
insert an explicit conversion to force the displacement of the
"this" pointer to reference the secondary dispatch table in the
case where the return statement is returning a raise expression,
as in "return raise ...".
2017-09-07 Arnaud Charlet <charlet@adacore.com>
* sem_disp.adb (Is_User_Defined_Equality): Removed procedure.
* sem_util.ads, sem_util.adb (Is_User_Defined_Equality): Copied
procedure from sem_disp.adb.
* sem_ch12.ads (Get_Unit_Instantiation_Node): rename Package
with Unit.
* sem_ch12.adb (Get_Unit_Instantiation_Node): function extended to
return the instantiation node for subprograms. Update references
to Get_Unit_Instantiation_Node.
* sem_ch7.adb (Install_Parent_Private_Declarations): update
reference to Get_Unit_Instantiation_Node.
* exp_dist.adb (Build_Package_Stubs): update reference to
Get_Unit_Instantiation_Node.
* sem_ch9.adb: minor typo in comment.
* lib-xref-spark_specific.adb
(Traverse_Declaration_Or_Statement): traverse into task type
definition.
2017-09-07 Ed Schonberg <schonberg@adacore.com>
* sem_dim.adb (Analyze_Dimension_Type_Conversion): New procedure
to handle properly various cases of type conversions where the
target type and/or the expression carry dimension information.
(Dimension_System_Root); If a subtype carries dimension
information, obtain the source parent type that carries the
Dimension aspect.
2017-09-07 Dmitriy Anisimkov <anisimko@adacore.com>
* g-socket.adb, g-socket.ads (GNAT.Sockets.To_Ada): New routine.
2017-09-07 Ed Schonberg <schonberg@adacore.com>
* exp_attr.adb (Expand_N_Attribute_Reference, case 'Constrained):
If the prefix is a reference to an object, rewrite it as an
explicit dereference, as required by 3.7.2 (2) and as is done
with most other attributes whose prefix is an access value.
2017-09-07 Bob Duff <duff@adacore.com>
* par-ch13.adb: Set the Inside_Depends flag if we are inside a
Refined_Depends aspect.
* par-ch2.adb: Set the Inside_Depends flag if we are inside a
Refined_Depends pragma.
* scans.ads: Fix documentation of Inside_Depends flag.
* styleg.adb, styleg.ads: Minor reformatting and comment fixes.
2017-09-07 Hristian Kirtchev <kirtchev@adacore.com>
* exp_ch7.adb (Insert_Actions_In_Scope_Around):
Account for the case where the are no lists to insert, but the
secondary stack still requires management.
* a-chtgop.adb, a-cihama.adb, a-cohama.adb, a-cohase.adb, a-tags.adb,
comperr.adb, einfo.adb, exp_aggr.adb, exp_ch3.adb, exp_disp.adb,
lib-xref.adb, lib-xref-spark_specific.adb, sem_ch12.adb, sem_ch13.adb,
sem_ch6.adb, sem_dim.adb, sem_dim.ads, sem_elab.adb, sem_prag.adb:
Minor reformatting.
From-SVN: r251842
Diffstat (limited to 'gcc/ada/styleg.adb')
-rw-r--r-- | gcc/ada/styleg.adb | 29 |
1 files changed, 16 insertions, 13 deletions
diff --git a/gcc/ada/styleg.adb b/gcc/ada/styleg.adb index f785205..14a63c0 100644 --- a/gcc/ada/styleg.adb +++ b/gcc/ada/styleg.adb @@ -6,7 +6,7 @@ -- -- -- B o d y -- -- -- --- Copyright (C) 1992-2016, Free Software Foundation, Inc. -- +-- Copyright (C) 1992-2017, 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- -- @@ -127,20 +127,17 @@ package body Styleg is ----------------- -- In check tokens mode (-gnatys), arrow must be surrounded by spaces, - -- except that within the argument of a Depends macro the required format - -- is =>+ rather than => +). + -- except that within the argument of a Depends or Refined_Depends aspect + -- or pragma the required format is "=>+ " rather than "=> +"). procedure Check_Arrow (Inside_Depends : Boolean := False) is begin if Style_Check_Tokens then Require_Preceding_Space; - if not Inside_Depends then - Require_Following_Space; - - -- Special handling for Inside_Depends + -- Special handling for Depends and Refined_Depends - else + if Inside_Depends then if Source (Scan_Ptr) = ' ' and then Source (Scan_Ptr + 1) = '+' then @@ -151,6 +148,11 @@ package body Styleg is then Require_Following_Space; end if; + + -- Normal case + + else + Require_Following_Space; end if; end if; end Check_Arrow; @@ -1054,16 +1056,17 @@ package body Styleg is -- In check token mode (-gnatyt), unary plus or minus must not be -- followed by a space. - -- Annoying exception: if we have the sequence =>+ within a Depends pragma - -- or aspect, then we insist on a space rather than forbidding it. + -- Annoying exception: if we have the sequence =>+ within a Depends or + -- Refined_Depends pragma or aspect, then we insist on a space rather + -- than forbidding it. procedure Check_Unary_Plus_Or_Minus (Inside_Depends : Boolean := False) is begin if Style_Check_Tokens then - if not Inside_Depends then - Check_No_Space_After; - else + if Inside_Depends then Require_Following_Space; + else + Check_No_Space_After; end if; end if; end Check_Unary_Plus_Or_Minus; |