* gcc-interface/trans.c (push_range_check_info): Replace early test
[official-gcc.git] / gcc / ada / ChangeLog
blobc8568f72ee475696b07fd0bae52b039cf92fa817
1 2014-11-24  Eric Botcazou  <ebotcazou@adacore.com>
3         * gcc-interface/trans.c (push_range_check_info): Replace early test
4         with assertion.
5         (Raise_Error_to_gnu): Do not call push_range_check_info if the loop
6         stack is empty.
7         * gcc-interface/utils.c (convert_to_fat_pointer): Fix formatting.
8         * gcc-interface/utils2.c (gnat_invariant_expr): Deal with padded types
9         and revert latest change.
11 2014-11-22  Eric Botcazou  <ebotcazou@adacore.com>
13         * gcc-interface/trans.c (Call_to_gnu): Strip unchecked conversions on
14         actuals of In parameters if the destination type is an unconstrained
15         composite type.
17 2014-11-22  Eric Botcazou  <ebotcazou@adacore.com>
19         * gcc-interface/trans.c (gnat_gimplify_expr): Add 'type' variable.
20         <case NULL_EXPR>: Deal with unconstrained array types and use 'type'.
21         <case ADDR_EXPR>: Use 'type'.
22         <case DECL_EXPR>: Likewise.
24 2014-11-20  Arnaud Charlet  <charlet@adacore.com>
26         PR ada/63931
27         * gnatvsn.ads (Library_Version): Switch to "5".
29 2014-11-20  Thomas Quinot  <quinot@adacore.com>
31         * freeze.adb (Freeze_Entity): Do not reset Is_True_Constant
32         for aliased constant objects.
34 2014-11-20  Robert Dewar  <dewar@adacore.com>
36         * exp_util.adb (Following_Address_Clause): Use new Name_Table
37         boolean flag set by parser to avoid the search if there is no
38         address clause anywhere for the name.
39         * namet.adb (Name_Enter): Initialize Boolean_Info flag
40         (Name_Find): ditto (Reinitialize): ditto (Get_Name_Table_Boolean):
41         New function (Set_Name_Table_Boolean): New procedure
42         * namet.ads: Add and document new Boolean field in name table
43         (Get_Name_Table_Boolean): New function.
44         (Set_Name_Table_Boolean): New procedure.
45         * par-ch13.adb (P_Representation_Clause): Set Name_Table boolean
46         flag for an identifier name if we detect an address clause or
47         use-at clause for the identifier.
48         * sem_ch3.adb (Analyze_Object_Declaration): Remove comment about
49         Following_Address_Clause since this function is now optimized
50         and is not a performance concern.
51         * sem_prag.adb (Analyze_Pragma, case Elaborate): In SPARK
52         mode, pragma Elaborate is now allowed, but does not suppress
53         elaboration checking.
55 2014-11-20  Jerome Lambourg  <lambourg@adacore.com>
57         * gcc-interface/Makefile.in: Add some support for VxWorks7.
59 2014-11-20  Thomas Quinot  <quinot@adacore.com>
61         * sem_ch13.adb, freeze.adb: Minor reformatting.
62         * gnat_rm.texi: Minor editing.
64 2014-11-20  Robert Dewar  <dewar@adacore.com>
66         * sem_prag.adb (Analyze_Pragma): Minor reformatting.
67         (Process_Suppress_Unsuppress): Ignore suppress Elaboration_Check
68         in SPARK.
70 2014-11-20  Bob Duff  <duff@adacore.com>
72         * gnat_rm.texi: Correction to documentation of
73         'Unrestricted_Access in case of access to unconstrained array.
74         * a-cofove.adb (Capacity): Fix bug -- was always
75         returning Capacity_Range'Last.
76         (Is_Sorted): Fix bug -- was always returning True, because
77         Container.Last = Last. That test isn't even needed, because the
78         loop will go around zero times in that case, so deleted that
79         test rather than fixing it.
80         (Reverse_Elements): Make sure to use the correct array bounds.
82 2014-11-20  Ed Schonberg  <schonberg@adacore.com>
84         * sem_ch12.adb (Analyze_Associations): In GNATProve mode, build
85         wrappers for functions and operators that are actuals only if
86         expander is enabled. Wrappers play no role within a generic unit.
88 2014-11-20  Hristian Kirtchev  <kirtchev@adacore.com>
90         * sem_util.adb (Policy_In_Effect): Use the
91         configuration level assertion flag.
93 2014-11-20  Arnaud Charlet  <charlet@adacore.com>
95         * s-parame-ae653.ads: Update comments.
97 2014-11-20  Robert Dewar  <dewar@adacore.com>
99         * types.ads, einfo.ads: Minor reformatting.
100         * sem_elab.adb (Check_A_Call): Add guard for reference to Alias
101         for variable case.
103 2014-11-20  Bob Duff  <duff@adacore.com>
105         * a-cofove.adb (Elems,Elemsc): Use access-to-constrained arrays
106         instead of access-to-unconstrained, because the latter doesn't
107         work with 'Unrestricted_Access when the result is returned from
108         a function.
109         * a-cofove.ads (Vector): Move the discriminant-dependent array
110         after the other components for efficiency. Otherwise the compiler
111         will generate a lot of code to calculate the offset of the other
112         components every time they're accessed.
114 2014-11-20  Olivier Hainque  <hainque@adacore.com>
116         * opt.ads: Fix comment on Generate_SCO_Instance_Table wrt when
117         it is set to true.
119 2014-11-20  Ed Schonberg  <schonberg@adacore.com>
121         * exp_ch3.adb (Expand_N_Object_Declaration): Handle properly
122         a type invariant check on an object with default initialization
123         and an address clause.
125 2014-11-20  Robert Dewar  <dewar@adacore.com>
127         * sem_elab.adb (Check_A_Call): Handle variable ref case in
128         SPARK (Check_Elab_Call): ditto (Find_Elab_Reference): ditto
129         (Get_Referenced_Ent): ditto.
130         * sem_elab.ads: Comment fixes to account for the fact that we
131         now deal with variable references in SPARK mode.
132         * sem_res.adb (Resolve_Entity_Name): In SPARK_Mode Call
133         Check_Elab_Call for variable.
135 2014-11-20  Yannick Moy  <moy@adacore.com>
137         * a-cofove.ads (Copy): Fix precondition, which should allow
138         Capacity = 0.
139         (First_To_Previous, Current_To_Last): Add necessary preconditions.
141 2014-11-20  Hristian Kirtchev  <kirtchev@adacore.com>
143         * exp_ch3.adb (Build_Initialization_Call): Reimplement the
144         circuitry which extraacts the [underlying] full view of a
145         private type to handle a case where the private type acts as a
146         generic actual.
147         * exp_ch5.adb (Expand_Iterator_Loop_Over_Array): Inherit the
148         loop label form the original loop regardless of whether it came
149         from source.
150         * sem_attr.adb (Analyze_Attribute): When taking 'Access of an
151         expression function with a generated body that has not been
152         analyzed yet, analyze the body to freeze the expression.
153         * sem_util.adb (Set_Public_Status_Of): New routine.
154         (Transfer_Entities): Handle the case where a private type with
155         an internally generated full view is being transfered and update
156         its full view.
158 2014-11-20  Vincent Celier  <celier@adacore.com>
160         * prj-nmsc.adb (Check_Object): If a unit is in a multi-source
161         file, its object file is never the same as any other unit.
163 2014-11-20  Bob Duff  <duff@adacore.com>
165         * s-taskin.adb (Initialize_ATCB): Take into
166         account the fact that the domain of the activator can be null
167         if we're initializing a foreign task.
169 2014-11-20  Robert Dewar  <dewar@adacore.com>
171         * sem_ch12.adb: Minor reformatting.
173 2014-11-20  Jerome Lambourg  <lambourg@adacore.com>
175         * s-osinte-vxworks.ads: Add comments. Minor reformatting.
177 2014-11-20  Yannick Moy  <moy@adacore.com>
179         * sem_prag.adb, sem_elab.adb: Minor rewording of error message in
180         SPARK mode, for consistency.
182 2014-11-20  Vasiliy Fofanov  <fofanov@adacore.com>
184         * gnat_ugn.texi: New section on gnattest stubbing. Minor
185         reformatting.
187 2014-11-20  Jerome Lambourg  <lambourg@adacore.com>
189         * s-taprop-vxworks.adb (Create_Task): Fix thread comparison.
190         Minor reformatting.
192 2014-11-20  Robert Dewar  <dewar@adacore.com>
194         * s-tassta.adb, exp_aggr.adb, s-taskin.adb, exp_strm.adb: Minor
195         reformatting.
196         * comperr.adb (Compiler_Abort): New wording for bug box.
197         * par-ch13.adb: Minor reformatting.
198         * par-ch3.adb (P_Identifier_Declarations): Handle aspect
199         specifications given before initialization expression in object
200         declaration cleanly.
201         * gnat1drv.adb (Adjust_Global_Switches): Make sure static
202         elaboration mode is set if we are operating in SPARK mode.
203         * sem_ch12.adb (Analyze_Package_Instantiation): Make
204         sure static elab mode is set if we are in SPARK mode.
205         (Analyze_Subprogram_Instantiation): ditto.
206         (Set_Instance_Env): ditto.
207         * sem_elab.adb (Check_A_Call): In SPARK mode, we require
208         Elaborate_All in the case of a call during elaboration to a
209         subprogram in another unit.
211 2014-11-20  Ed Schonberg  <schonberg@adacore.com>
213         * inline.adb (Can_Split_Unconstrained_Function,
214         Build_Procedure): Copy parameter type rather than creating
215         reference to the entity, to capture class-wide reference, whose
216         name is not retrieved by visibility.
218 2014-11-20  Arnaud Charlet  <charlet@adacore.com>
220         * s-taspri-solaris.ads: Replace 64 by long_long_integer'size.
222 2014-11-20  Olivier Hainque  <hainque@adacore.com>
224         * init.c (__gnat_map_signal for VxWorks): Use a common mapping
225         scheme for VxWorks version >= 6, instead of falling back to the
226         vx5 scheme for versions > 6.
228 2014-11-20  Ed Schonberg  <schonberg@adacore.com>
230         * exp_strm.adb (Build_Mutable_Record_Read_Procedure): Use
231         base type when constructing subtype indication for constrained
232         target object.
234 2014-11-20  Jose Ruiz  <ruiz@adacore.com>
236         * projects.texi: Minor spelling fix.
238 2014-11-20  Bob Duff  <duff@adacore.com>
240         * gnat_ugn.texi: Add doc for --split-line-before-op switch in gnatpp.
242 2014-11-20  Vincent Celier  <celier@adacore.com>
244         * prj-attr.adb (Register_New_Package): Allow the registration
245         of an already unknown package and make it known.
247 2014-11-20  Trevor Saunders  <tsaunders@mozilla.com>
249         * gcc-interface/decl.c, gcc-interface/utils.c: replace htab with
250         hash_table.
252 2014-11-20  Robert Dewar  <dewar@adacore.com>
254         * sem_prag.adb (Analyze_Pragma, case Elaborate): Forbid pragma
255         Elaborate in SPARK mode.
257 2014-11-20  Bob Duff  <duff@adacore.com>
259         * s-taskin.adb, s-tassta.adb (Initialize_ATCB): If Domain
260         is null, then initialize T.Common.Domain to that of the
261         activating task (not the parent task!), as required by RM-D.16.1.
262         T.Common.Domain should never be null; so Assert. Remove similar
263         code from Create_Task in s-tassta.adb.
264         * s-mudido-affinity.adb: Remove checks for Domain = null,
265         because it can't be null.
266         * s-taskin.ads, s-taspri-dummy.ads, s-taspri-mingw.ads,
267         s-taspri-posix.ads, s-taspri-posix-noaltstack.ads,
268         s-taspri-solaris.ads, s-taspri-vxworks.ads: Mark limited types as
269         explicitly limited for clarity.
271 2014-11-20  Ed Schonberg  <schonberg@adacore.com>
273         * exp_aggr.adb (Init_Hidden_Discriminants): Code clean up.
275 2014-11-20  Robert Dewar  <dewar@adacore.com>
277         * errout.adb (Error_Msg): Don't suppress continuation msgs for
278         run-time files.
279         * sem_prag.adb (Analyze_Pragma, case Elaborate): Forbid pragma
280         Elaborate in SPARK mode.
282 2014-11-20  Yannick Moy  <moy@adacore.com>
284         * gnat_rm.texi: Update GNAT RM with rule about expressions in
285         Update attribute.
287 2014-11-20  Thomas Quinot  <quinot@adacore.com>
289         * g-socket.adb (To_Host_Entry): Guard against case of a
290         non-AF_INET entry.
292 2014-11-20  Vadim Godunko  <godunko@adacore.com>
294         * a-strunb-shared.adb (To_Unbounded_String): Use shared empty
295         object to construct return value when source string is empty or
296         requested length is zero.
297         * a-stwiun-shared.adb (To_Unbounded_Wide_String): Likewise.
298         * a-stzunb-shared.adb (To_Unbounded_Wide_Wide_String): Likewise.
300 2014-11-20  Yannick Moy  <moy@adacore.com>
302         * a-cfhase.adb, a-cfinve.adb, a-cforma.adb, a-cfhama.adb, a-cforse.adb,
303         a-cofove.adb: Skip CodePeer analysis on body of all formal containers.
305 2014-11-20  Arnaud Charlet  <charlet@adacore.com>
307         * adaint.c: Fix typo.
308         * exp_util.adb (Make_Subtype_From_Expr): Complete previous change,
309         generate constant values.
310         * sem_eval.adb (Decompose_Expr): Fix latent bug leading to a wrong
311         evaluation to '0' of some unknown values.
313 2014-11-20  Robert Dewar  <dewar@adacore.com>
315         * repinfo.adb (List_Record_Info): Do not list discriminant in
316         unchecked union.
317         * sem_ch13.adb (Has_Good_Profile): Minor reformatting
318         (Analyze_Stream_TSS_Definition): Minor reformatting
319         (Analyze_Record_Representation_Clause): Do not issue warning
320         for missing rep clause for discriminant in unchecked union.
322 2014-11-20  Vadim Godunko  <godunko@adacore.com>
324         * a-strunb-shared.adb, a-stwiun-shared.adb, a-stzunb-shared.adb
325         ("&") Use already computed value of data length to call allocation
326         subprogram.
328 2014-11-20  Ed Schonberg  <schonberg@adacore.com>
330         * exp_ch6.adb (Expand_Call, Inlined_Subprogram): Do not suppress
331         debugging information for a call to a predefined unit, if the
332         call comes from source and the unit is in the Ada hierarchy.
334 2014-11-20  Bob Duff  <duff@adacore.com>
336         * s-mudido.ads: Update signature of Create and Get_Last_CPU. Add
337         CPU_Set, another Create, and Get_CPU_Set.
338         * s-mudido.adb: Corresponding changes to the spec. New
339         operations just raise an exception.  Also minor cleanup: use
340         raise_expressions.
341         * s-mudido-affinity.adb: Implementations of new operations from
342         * s-mudido.ads, for the platforms that actually support processor
343         affinity. The new Create (which takes a set) now does all the
344         work; the old Create (which takes a range) now just calls the
345         new one. Change error messages to reflect the fact that it's an
346         arbitrary set, not just a range.
348 2014-11-20  Robert Dewar  <dewar@adacore.com>
350         * exp_attr.adb: Minor reformatting.
352 2014-11-20  Hristian Kirtchev  <kirtchev@adacore.com>
354         * exp_util.adb (Make_Subtype_From_Expr): Capture the bounds of
355         all index constracts when the expression is of an array type.
357 2014-11-20  Bob Duff  <duff@adacore.com>
359         * s-taskin.ads: Minor comment improvements.
361 2014-11-20  Bob Duff  <duff@adacore.com>
363         * exp_ch9.adb: Minor comment fixes.
364         * s-taskin.adb (Initialize): Small simplification: pass System_Domain
365         to Initialize_ATCB instead of passing null and then setting the Domain
366         to System_Domain. This requires moving the creation of System_Domain
367         earlier.
368         * s-taprop-linux.adb (Set_Task_Affinity): Only call CPU_SET for
369         processors that have a True in the Domain. This is necessary if the
370         Domain is not all-True values.
372 2014-11-20  Ed Schonberg  <schonberg@adacore.com>
374         * sem_ch13.adb (Has_Good_Profile): a) An stream attribute
375         for the class-wide type of an interface type is not a primitive
376         operation and is not subject to the restrictions of 13.13. (38/3).
377         b) A stream operation for an interface type must be a null
378         procedure, and it cannot be a function.
380 2014-11-20  Bob Duff  <duff@adacore.com>
382         * exp_attr.adb (Attribute_Max_Size_In_Storage_Elements):
383         Eliminate 'Class references from the tree, because gigi crashes on
384         'Class. Also, don't check Nkind (Attr) -- it is known to be
385         N_Attribute_Reference.  Assert that instead.
387 2014-11-20  Bob Duff  <duff@adacore.com>
389         * debug.adb: Minor comment fix.
391 2014-11-20  Arnaud Charlet  <charlet@adacore.com>
393         * a-ciorma.adb: Minor update: move pragma Annotate up.
394         * a-cfdlli.adb: Skip codepeer analysis on this body.
396 2014-11-20  Robert Dewar  <dewar@adacore.com>
398         * sem_prag.adb (Analyze_Pragma, case No_Elaboration_Code_All):
399         Allow use of this pragma with generic unit (package or subprogram).
400         * gnat_rm.texi: Clarify that pragma No_Elaboration_Code_All can
401         be applied to generics.
403 2014-11-20  Ed Schonberg  <schonberg@adacore.com>
405         * sem_aggr.adb (Valid_Limited_Ancestor): Ancestor part of
406         extension aggregate can itself be an extension aggregate, as
407         well as a call that is rewritten as a reference.
409 2014-11-20  Eric Botcazou  <ebotcazou@adacore.com>
411         * inline.adb (Add_Inlined_Subprogram): Insert all programs
412         generated as a body or whose declaration was provided along with
413         the body.
415 2014-11-20  Javier Miranda  <miranda@adacore.com>
417         * sem.adb (Semantics): Disable expansion if we are compiling a
418         separate unit under configurable runtime. By default separate
419         units are compiled with expansion disabled but under configurable
420         runtime we enable the expansion to get error messages about
421         missing entities.
423 2014-11-20  Robert Dewar  <dewar@adacore.com>
425         * sem_ch13.adb: Minor reformatting.
426         * exp_util.adb (Following_Address_Clause): Handle case of
427         package private part.
429 2014-11-20  Arnaud Charlet  <charlet@adacore.com>
431         * a-cdlili.adb, a-cihama.adb, a-coinve.adb, a-cusyqu.adb, a-ciorse.adb,
432         a-coorma.adb, a-cborma.adb, a-cidlli.adb, a-cimutr.adb, a-ciormu.adb,
433         a-cbprqu.adb, a-cihase.adb, a-cohama.adb, a-coorse.adb, a-coboho.adb,
434         a-cuprqu.adb, a-cbhama.adb, a-rbtgbo.adb, a-cborse.adb, a-comutr.adb,
435         a-ciorma.adb, a-cobove.adb, a-coormu.adb, a-convec.adb, a-cohase.adb,
436         a-coinho.adb, a-coinho-shared.adb, a-cbdlli.adb, a-cbsyqu.adb,
437         a-cbmutr.adb, a-cbhase.adb: Add pragma Annotate to prevent codepeer
438         from analyzing these bodies.
440 2014-11-20  Ed Schonberg  <schonberg@adacore.com>
442         * sem_ch6.adb (Analyze_Subprogram_Body_Helper): Do not apply
443         inlining expansion if function build in place, i.e. has a limited
444         return type.
446 2014-11-20  Hristian Kirtchev  <kirtchev@adacore.com>
448         * sem_prag.adb (Analyze_Refined_Depends_In_Decl_Part): Add
449         variables Body_Id, Body_Inputs, Body_Outputs, Spec_Inputs,
450         Spec_Outputs. Synthesize the inputs and outputs of the subprogram
451         when pragma [Refined_]Global is missing and perform legality
452         checks on output states with visible refinement.
453         (Appears_In): Update the comment on usage.
454         (Check_Output_States): New routine.
455         (Collect_Dependency_Clause): New routine.
456         (Collect_Global_Items): Relocated to
457         Analyze_Refined_Global_In_Decl_Part.
458         (Collect_Subprogram_Inputs_Outputs): Add new formal parameters
459         Synthesize and Depends_Seen. The routine can now synthesize inputs
460         and outputs from pragma [Refined_]Depends.
461         (Normalize_Clause): Update the comment on usage. The routine no longer
462         performs normalization of outputs.
463         (Normalize_Clauses): Normalize both inputs and outputs.
464         (Normalize_Output): Relocated to Normalize_Clauses.
465         * sem_prag.ads (Collect_Subprogram_Inputs_Outputs): Add new
466         formal parameters Synthesize and Depends_Seen and update the
467         comment on usage.
469 2014-11-20  Vincent Celier  <celier@adacore.com>
471         PR ada/47500
472         * back_end.adb (Scan_Back_End_Switches): Skip switch -G and
473         its argument.
475 2014-11-20  Ed Schonberg  <schonberg@adacore.com>
477         * sem_ch13.adb (Reset_Loop_Variable): New subsidiary procedure
478         in Build_Predicate_Functions, to handle properly quantified
479         expressions in dynamic predicates.
481 2014-11-20  Robert Dewar  <dewar@adacore.com>
483         * gnatcmd.adb, sem_ch6.adb, exp_dist.adb: Minor reformatting.
484         * sem_util.adb (Bad_Unordered_Enumeration_Reference): Suppress
485         warning (return False) for generic type.
487 2014-11-20  Hristian Kirtchev  <kirtchev@adacore.com>
489         * sem_res.adb (Appears_In_Check): Removed.
490         (Is_OK_Volatile_Context): Rewrite the checks which verify that
491         an effectively volatile object subject to enabled properties
492         Async_Writers or Effective_Reads appears in a suitable context to
493         properly recognize a procedure call.
494         (Within_Check): New routine.
495         (Within_Procedure_Call): New routine.
497 2014-11-20  Ed Schonberg  <schonberg@adacore.com>
499         * sem_ch6.adb: Improve better error message.
501 2014-11-20  Thomas Quinot  <quinot@adacore.com>
503         * freeze.adb, sem_ch13.adb: Minor editing.
505 2014-11-20  Vincent Celier  <celier@adacore.com>
507         * gnatcmd.adb: Remove any special processing for the ASIS tools
508         (gnatpp, gnatmetric, gnatcheck, gnatelim and gnatstup) and simply
509         invoke the tool with the provided switches and arguments.
511 2014-11-20  Ed Schonberg  <schonberg@adacore.com>
513         * sem_ch6.adb (Analyze_Expression_Function): Reject declaration
514         of expression function with identical profile as previous
515         expression function.
517 2014-11-20  Thomas Quinot  <quinot@adacore.com>
519         * sem_ch13.adb: Complete previous change.
520         * exp_dist.adb, exp_dist.ads: Rework PolyORB/DSA arguments processing
521         circuitry to correctly handle the case of non-private limited
522         unconstrained formals.
524 2014-11-20  Robert Dewar  <dewar@adacore.com>
526         * freeze.adb, exp_dbug.adb, sem_ch13.adb: Minor reformatting.
528 2014-11-20  Thomas Quinot  <quinot@adacore.com>
530         * einfo.ads: Fix minor typo in comment.
532 2014-11-20  Robert Dewar  <dewar@adacore.com>
534         * inline.adb, sem_util.adb: Minor reformatting.
536 2014-11-20  Pierre-Marie Derodat  <derodat@adacore.com>
538         * uintp.h (UI_Eq): Declare.
539         * urealp.h (Norm_Den): Declare.
540         (Norm_Num): Declare.
541         * exp_dbug.adb (Is_Handled_Scale_Factor): New.
542         (Get_Encoded_Name): Do not output ___XF GNAT encodings
543         for fixed-point types when these can be handled by GCC's DWARF
544         back-end.
546 2014-11-20  Thomas Quinot  <quinot@adacore.com>
548         * sem_ch13.db (Inherit_Aspects_At_Freeze_Point): Inherit parent
549         SSO even if set through a pragma Default_Scalar_Storage_Order.
550         * freeze.adb (Set_SSO_From_Default): For a type extension,
551         do not let the default SSO override the parent SSO.
552         * gnat_rm.texi: document the above
554 2014-11-20  Robert Dewar  <dewar@adacore.com>
556         * a-stream.ads, a-reatim.ads, a-calend.ads, sinfo.ads, s-crtl.ads,
557         interfac.ads, s-taskin.ads: Minor reformatting.
559 2014-11-20  Hristian Kirtchev  <kirtchev@adacore.com>
561         * sem_prag.adb (Analyze_Pragma): Extensions_Visible can now
562         apply to an expression function.
563         * sem_util.adb (Extensions_Visible_Status): Add special processing
564         for expression functions.
566 2014-11-20  Hristian Kirtchev  <kirtchev@adacore.com>
568         * inline.adb (Build_Body_To_Inline): Remove meaningless aspects
569         and pragmas.
570         (Generate_Subprogram_Body): Remove meaningless aspects and pragmas.
571         (Remove_Aspects_And_Pragmas): New routine.
572         (Remove_Pragmas): Removed.
573         * namet.ads, namet.adb (Nam_In): New versions of the routine.
575 2014-11-20  Thomas Quinot  <quinot@adacore.com>
577         * sem_util.adb: Minor reformatting.
579 2014-11-20  Robert Dewar  <dewar@adacore.com>
581         * sem_prag.adb (Analyze_Pragma, case Linker_Section): Detect
582         duplicate Linker_Section.
584 2014-11-20  Ed Schonberg  <schonberg@adacore.com>
586         * exp_ch4.adb: Add guard for build-in-place boolean op.
588 2014-11-20  Yannick Moy  <moy@adacore.com>
590         * checks.adb (Apply_Scalar_Range_Check): In GNATprove mode,
591         put a range check when an empty range is used, instead of an
592         error message.
593         * sinfo.ads Update comment on GNATprove mode.
595 2014-11-20  Arnaud Charlet  <charlet@adacore.com>
597         * a-stream.ads, s-osinte-linux.ads, a-reatim.ads, a-calend.ads,
598         s-crtl.ads, interfac.ads, s-taskin.ads: Replace uses of 2 ** 63 and
599         2 ** 64 by references to Long_Long_Integer instead, to allow these
600         units to be analyzed by codepeer or spark when using a target
601         configuration file with long_long_size set to 32.
603 2014-11-20  Hristian Kirtchev  <kirtchev@adacore.com>
605         * sem_util.adb (Extensions_Visible_Status): Modify the logic to account
606         for non-SPARK code.
607         (Object_Access_Level): In ASIS mode, recognize
608         a selected component with an implicit dereference so that it
609         yields the same value with and without expansion.
611 2014-11-20  Ed Schonberg  <schonberg@adacore.com>
613         * sem_prag.adb (Analyze_Pragma, case Implemented): In ASIS
614         (compile-only) mode, use original type declaration to determine
615         whether protected type implements an interface.
617 2014-11-20  Yannick Moy  <moy@adacore.com>
619         * a-cfdlli.adb, a-cfdlli.ads, a-cfinve.adb, a-cfinve.ads,
620         * a-cofove.adb, a-cofove.ads: Mark spec as SPARK_Mode, and private
621         part/body as SPARK_Mode Off.
622         * a-cfhama.adb, a-cfhama.ads, a-cfhase.adb, a-cfhase.ads,
623         * a-cforma.adb, a-cforma.ads, a-cforse.adb, a-cforse.ads: Use
624         aspect instead of pragma for uniformity.
626 2014-11-20  Hristian Kirtchev  <kirtchev@adacore.com>
628         * sem_util.adb (Is_EVF_Expression): Include
629         attributes 'Loop_Entry, 'Old and 'Update to the logic.
631 2014-11-20  Bob Duff  <duff@adacore.com>
633         * sem_res.adb (Make_Call_Into_Operator): Don't
634         call Left_Opnd in the case of unary operators, because they only
635         have Right.
637 2014-11-20  Pascal Obry  <obry@adacore.com>
639         * initialize.c (ProcListCS): New extern variable (critical section).
640         (ProcListEvt): New extern variable (handle).
641         (__gnat_initialize)[Win32]: Initialize the ProcListCS critical
642         section object and the ProcListEvt event.
643         * final.c (__gnat_finalize)[Win32]: Properly finalize the
644         ProcListCS critical section and the ProcListEvt event.
645         * adaint.c (ProcListEvt): New Win32 event handle.
646         (EnterCS): New routine to enter the critical section when dealing with
647         child processes chain list.
648         (LeaveCS): As above to exit from the critical section.
649         (SignalListChanged): Routine to signal that the chain process list has
650         been updated.
651         (add_handle): Use EnterCS/LeaveCS, also call SignalListChanged when the
652         handle has been added.
653         (__gnat_win32_remove_handle): Use EnterCS/LeaveCS,
654         also call SignalListChanged if the handle has been found and removed.
655         (remove_handle): Routine removed, implementation merged with the above.
656         (win32_wait): Use EnterCS/LeaveCS for the critical section. Properly
657         copy the PID list locally to ensure that even if the list is updated
658         the local copy remains valid. Add into the hl (handle list) the
659         ProcListEvt handle. This handle is used to signal that a change has
660         been made into the process chain list. This is to ensure that a waiting
661         call can be resumed to take into account new processes. We also make
662         sure that if the handle was not found into the list we start over
663         the wait call. Indeed another concurrent call to win32_wait()
664         could already have handled this process.
666 2014-11-20  Ed Schonberg  <schonberg@adacore.com>
668         * sem_res.adb (Resolve_Actuals): The legality rule concerning
669         the use of class-wide actuals for a non-controlling formal are
670         not rechecked in an instance.
672 2014-11-20  Pascal Obry  <obry@adacore.com>
674         * g-dirope.ads: Minor typo fix.
676 2014-11-20  Hristian Kirtchev  <kirtchev@adacore.com>
678         * exp_attr.adb (Expand_N_Attribute_Reference,
679         Expand_Update_Attribute): Preserve the tag of a prefix by offering
680         a specific view of the class-wide version of the prefix.
682 2014-11-20  Javier Miranda  <miranda@adacore.com>
684         * sem_ch6.adb (Analyze_Function_Return): For functions returning
685         an access to an interface add an implicit conversion to the target
686         type to force the displacement of the pointer to the object to
687         reference the secondary dispatch table.
688         (Check_Anonymous_Return): Skip internally built functions which handle
689         the case of null access when locating the master of a task.
690         * sem_res.adb (Valid_Conversion): Return true for internally
691         generated conversions of access to interface types added to force
692         the displacement of the pointer to reference the corresponding
693         dispatch table.
695 2014-11-20  Pascal Obry  <obry@adacore.com>
697         * adaint.c (add_handle): realloc with a size of +100.
699 2014-11-20  Ed Schonberg  <schonberg@adacore.com>
701         * sem_res.adb (Make_Call_Into_Operator): In ASIS mode, propagate
702         back the resolved operands to the original call node, taking
703         into account that the original call may have named associations.
705 2014-11-20  Hristian Kirtchev  <kirtchev@adacore.com>
707         * inline.adb (Has_Some_Contract): Change the
708         guard to test the Ekind of the entity rather than the Analyzed
709         flag. This handles partially analyzed contexts.
711 2014-11-20  Ed Schonberg  <schonberg@adacore.com>
713         * sem_ch8.adb (Analyze_Object_Renaming): In Ada 83 mode, do
714         not reject the renaming of a function result if the renaming
715         does not come for source.
717 2014-11-20  Robert Dewar  <dewar@adacore.com>
719         * exp_util.ads: Minor addition of ??? clause.
721 2014-11-20  Ed Schonberg  <schonberg@adacore.com>
723         * sem_util.adb (Is_Variable): For an Ada 2012 implicit
724         dereference introduced for an indexing opertion, check that the
725         type of the corresponding access discriminant is not an access
726         to constant.
728 2014-11-20  Hristian Kirtchev  <kirtchev@adacore.com>
730         * sem_ch6.adb (Find_Corresponding_Spec): Inherit
731         the ghostness of the matching spec, the same way convention
732         is inherited.
734 2014-11-20  Eric Botcazou  <ebotcazou@adacore.com>
736         * sem_ch3.adb (Analyze_Object_Declaration): Swap a couple of
737         tests in a condition so Following_Address_Clause is invoked
738         only if need be.
739         * exp_util.ads (Following_Address_Clause): Add small note.
741 2014-11-20  Pascal Obry  <obry@adacore.com>
743         * adaint.c (remove_handle): New local routine without a lock.
744         (win32_wait): fix the critical section to properly protect needed
745         code, use new remove_handle.
746         (__gnat_win32_remove_handle): refactor code with remove_handle.
748 2014-11-20  Eric Botcazou  <ebotcazou@adacore.com>
750         * inline.adb (Analyze_Inlined_Bodies): Iterate between loading
751         of the inlined bodies and instantiation of the generic bodies
752         until no more bodies need to be loaded.
754 2014-11-20  Vincent Celier  <celier@adacore.com>
756         * prj.adb, prj.ads, prj-conf.adb: Minor change of procedure name:
757         Update_Ignore_Missing_With becomes Set_Ignore_Missing_With.
759 2014-11-20  Robert Dewar  <dewar@adacore.com>
761         * exp_ch7.adb, sem_ch5.adb, sem_ch7.adb, sem_util.adb,
762         sem_ch6.adb: Minor reformatting.
764 2014-11-20  Javier Miranda  <miranda@adacore.com>
766         * exp_ch4.adb (Expand_N_Type_Conversion): Add missing implicit
767         conversion to force the displacement of the pointer to the object
768         to reference the secondary dispatch table.
770 2014-11-11  Simon Wright  <simon@pushface.org>
772         PR ada/42978
773         * mlib-utl.adb (ar): Output the options passed to ranlib.
775 2014-11-07  Arnaud Charlet  <charlet@adacore.com>
777         * debug.adb, snames.adb-tmpl (Is_Keyword_Name): Consider 'overriding'
778         a keyword in Ada 95 mode when -gnatd.D is used.
779         * gnat_ugn.texi: Document -gnatd.D.
781 2014-11-07  Vasiliy Fofanov  <fofanov@adacore.com>
783         * gnatls.adb: Lower severity of the program's return value in
784         some common cases.
786 2014-11-07  Ed Schonberg  <schonberg@adacore.com>
788         * sem_ch10.adb (Decorate_Type): The limited view of a tagged
789         type has an empty list of primitive operations.
791 2014-11-07  Hristian Kirtchev  <kirtchev@adacore.com>
793         * sem_ch3.adb (Analyze_Object_Declaration): Update references to SPARK
794         RM.
795         (Process_Full_View): Update references to SPARK RM.
796         * sem_ch6.adb (Analyze_Generic_Subprogram_Body): Update references
797         to SPARK RM.
798         (Analyze_Subprogram_Body_Helper): Update references
799         to SPARK RM.
800         * sem_ch7.adb (Analyze_Package_Body_Helper): Update references
801         to SPARK RM.
802         * sem_prag.adb (Check_Ghost_Constituent): Update references to
803         SPARK RM.
804         * sem_res.adb (Check_Ghost_Policy): Update references to SPARK RM.
805         (Resolve_Actuals): Ensure that the actual parameter of a Ghost
806         subprogram whose formal is of mode IN OUT or OUT is Ghost.
807         * sem_util.adb (Check_Ghost_Completion): Update references to
808         SPARK RM.
810 2014-11-07  Ed Schonberg  <schonberg@adacore.com>
812         * exp_ch7.adb (Make_Final_Call): If type of designated object is
813         derived from that of the formal of the Deep_Finalize procedure,
814         add an unchecked conversion to prevent spurious type error.
816 2014-11-07  Robert Dewar  <dewar@adacore.com>
818         * table.adb, inline.adb, einfo.adb, gnat1drv.adb, exp_ch13.adb,
819         exp_fixd.adb, prj-conf.adb, exp_strm.adb, a-cofove.adb, exp_ch3.ads:
820         Minor reformatting.
822 2014-11-07  Robert Dewar  <dewar@adacore.com>
824         * sem_ch12.adb, sem_ch13.adb, prj-tree.adb: Minor reformatting.
826 2014-11-07  Hristian Kirtchev  <kirtchev@adacore.com>
828         * einfo.adb (Set_Is_Checked_Ghost_Entity,
829         Set_Is_Ignored_Ghost_Entity): Add exceptions to the assertion
830         check.
831         * sem_ch6.adb (Check_Conformance): Consider only
832         source subprograms when checking for Ghost conformance.
833         * sem_prag.adb (Analyze_Pragma): Handle the case
834         where pragma Ghost applies to a stand alone subprogram body that
835         acts as a compilation unit.
836         * sem_res.adb: Minor reformatting (merge if statements).
838 2014-11-07  Ed Schonberg  <schonberg@adacore.com>
840         * exp_strm.adb (Build_Record_Or_Elementary_Input_Function):
841         Check whether underlying type is constrained before generating
842         the object declaration for the result object of the function.
844 2014-11-07  Robert Dewar  <dewar@adacore.com>
846         * freeze.adb: Code clean up.
848 2014-11-07  Yannick Moy  <moy@adacore.com>
850         * a-cfdlli.ads, a-cfhama.ads, a-cfhase.ads, a-cfinve.ads,
851         * a-cforma.ads, a-cforse.ads, a-cofove.ads: Mark First_To_Previous,
852         Current_To_Last and Strict_Equal as Ghost.
854 2014-11-07  Ed Schonberg  <schonberg@adacore.com>
856         * sem_ch3.adb: Code clean up.
858 2014-11-07  Hristian Kirtchev  <kirtchev@adacore.com>
860         * freeze.adb (Freeze_Entity): Issue an error regardless of the
861         SPARK_Mode when a ghost type is effectively volatile.
862         * sem_ch3.adb (Analyze_Object_Contract): Decouple the checks
863         related to Ghost from SPARK_Mode.
864         * sem_res.adb (Check_Ghost_Policy): Issue an error regardless
865         of the SPARK_Mode when the Ghost policies do not match.
866         * sem_util.adb (Check_Ghost_Completion): Issue an error regardless
867         of the SPARK_Mode when the Ghost policies do not match.
869 2014-11-07  Ed Schonberg  <schonberg@adacore.com>
871         * sem_ch5.adb (Analyze_Iterator_Specification): return if name
872         in iterator does not have any usable aspect for iteration.
874 2014-11-07  Ed Schonberg  <schonberg@adacore.com>
876         * sem_ch6.adb (Analyze_Null_Procedure): Reject a null procedure
877         that there is a previous null procedure in scope with a matching
878         profile.
880 2014-11-07  Hristian Kirtchev  <kirtchev@adacore.com>
882         * atree.adb (Copy_Separate_Tree): Copy the aspect specifications.
883         * inline.adb (Has_Some_Contract): Do the check only when the
884         related entity has been analyzed.
886 2014-11-07  Ed Schonberg  <schonberg@adacore.com>
888         * exp_fixd.adb (Expand_Multiply_Fixed_By_Fixed_Giving_Integer):
889         If the restriction No_Floating_Point is in effect, and the
890         operands have the same type, introduce a temporary to hold
891         the fixed point result, to prevent the use of floating-point
892         operations at run-time.
894 2014-11-07  Robert Dewar  <dewar@adacore.com>
896         * freeze.adb (Check_Address_Clause): Minor reformatting
897         (Find_Constant): Minor reformatting.
898         (Freeze_Array_Type): Modify check for packed declarations.
899         (Freeze_Entity): Minor reformatting.
901 2014-11-05  Eric Botcazou  <ebotcazou@adacore.com>
903         * gnatvsn.ads (Library_Version): Bump to 5.0.
905 2014-11-05  Eric Botcazou  <ebotcazou@adacore.com>
907         * gcc-interface/trans.c (Subprogram_Body_to_gnu): For a function with
908         copy-in/copy-out parameters and which returns by invisible reference,
909         do not create the variable for the return value; instead, manually
910         generate the indirect copy out statements on exit.
911         (gnat_to_gnu) <N_Simple_Return_Statement>: Adjust accordingly and build
912         a simple indirect assignment for the return value.
914 2014-11-05  Eric Botcazou  <ebotcazou@adacore.com>
916         * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Record_Type>: For a
917         derived untagged type that renames discriminants, be prepared for
918         a type derived from a private discriminated type when changing the
919         type of the stored discriminants.
921 2014-11-05  Eric Botcazou  <ebotcazou@adacore.com>
923         * gcc-interface/trans.c (Handled_Sequence_Of_Statements_to_gnu): Set
924         the SLOC of the node on the call to set_jmpbuf_address_soft emitted
925         on block entry with SJLJ.
927 2014-11-05  Eric Botcazou  <ebotcazou@adacore.com>
929         * gcc-interface/utils.c (create_subprog_decl): Move code dealing with
930         conflicting inlining status of nested subprograms to...
931         * gcc-interface/trans.c (check_inlining_for_nested_subprog): ...here.
932         (Attribute_to_gnu) <Attr_Access>: Call it.
933         (Call_to_gnu): Likewise.
934         (Subprogram_Body_to_gnu): Drop the body if it is an inlined external
935         function that has been marked uninlinable.
937 2014-10-31  Hristian Kirtchev  <kirtchev@adacore.com>
939         * aspects.adb Add an entry for aspect Ghost in table
940         Canonical_Aspect.
941         * aspects.ads Add an entry for aspect Ghost in tables
942         Aspect_Argument, Aspect_Delay, Aspect_Id, Aspect_Names and
943         Implementation_Defined_Aspect.
944         * einfo.adb: Flags 277 and 278 are now in use.
945         (Is_Checked_Ghost_Entity): New routine.
946         (Is_Ghost_Entity): Removed.
947         (Is_Ghost_Subprogram): Removed.
948         (Is_Ignored_Ghost_Entity): New routine.
949         (Set_Is_Checked_Ghost_Entity): New routine.
950         (Set_Is_Ignored_Ghost_Entity): New routine.
951         (Write_Entity_Flags): Output flags Is_Checked_Ghost_Entity and
952         Is_Ignored_Ghost_Entity.
953         * einfo.ads: Add new flags Is_Checked_Ghost_Entity
954         and Is_Ignored_Ghost_Entity along with usage in nodes.
955         (Is_Checked_Ghost_Entity): New routine and pragma Inline.
956         (Is_Ghost_Entity): Removed along with synthesized flag
957         description and usage in nodes.
958         (Is_Ghost_Subprogram): Removed along with synthesized flag description
959         and usage in nodes.
960         (Is_Ignored_Ghost_Entity): New routine and pragma Inline.
961         (Set_Is_Checked_Ghost_Entity): New routine and pragma Inline.
962         (Set_Is_Ignored_Ghost_Entity): New routine and pragma Inline.
963         * freeze.adb (Freeze_Entity): A Ghost type cannot be effectively
964         volatile.
965         * par-prag.adb Pragma Ghost does not need special handling by
966         the parser.
967         * repinfo.adb (List_Mechanisms): Remove the entry for convention Ghost.
968         * sem_attr.adb (Analyze_Access_Attribute): Remove obsolete check.
969         * sem_ch3.adb (Analyze_Full_Type_Declaration): Mark
970         the type as Ghost when its enclosing context is Ghost.
971         (Analyze_Incomplete_Type_Decl): Mark the type as Ghost when
972         its enclosing context is Ghost.
973         (Analyze_Number_Declaration): Mark the number as Ghost when its
974         enclosing context is Ghost.
975         (Analyze_Object_Declaration): Mark the object as Ghost when its
976         enclosing context is Ghost. Verify the Ghost policy between
977         initial declaration and completion of a deferred constant.
978         (Analyze_Object_Contract): A Ghost variable cannot be effectively
979         volatile, imported or exported.
980         (Build_Derived_Record_Type): Mark a type extension as Ghost when it
981         implements a Ghost interface.
982         (Build_Record_Type): Inherit volatility and "ghostness" from
983         the parent type.
984         (Check_Completion): A Ghost entity declared
985         in a non-Ghost package does not require completion in a body.
986         (Implements_Ghost_Interface): New routine.
987         (Process_Full_View): Inherit "ghostness" from the partial view. Verify
988         the Ghost policy between the partial and full views. Verify the
989         completion of a Ghost type extension.
990         * sem_ch4.adb (Check_Ghost_Subprogram_Call): Removed.
991         * sem_ch5.adb (Analyze_Assignment): Analyze the left hand side first.
992         * sem_ch6.adb (Analyze_Abstract_Subprogram_Declaration): Mark
993         the subprogram as Ghost when its enclosing context is Ghost.
994         (Analyze_Generic_Subprogram_Body): Mark the generic body as Ghost
995         when its enclosing context is Ghost. Verify the Ghost policy
996         between the spec and body.
997         (Analyze_Subprogram_Body_Helper): Mark the body as Ghost when its
998         enclosing context is Ghost. Verify the Ghost policy between the spec
999         and body.
1000         (Check_Conformance): A Ghost subprogram profile and a non-Ghost
1001         subprogram profile are not subtype conformant.
1002         (Convention_Of): Removed.
1003         * sem_ch7.adb (Analyze_Package_Body_Helper): Inherit the
1004         "ghostness" from the spec. Verify the Ghost policy between
1005         the spec and body.
1006         (Analyze_Private_Type_Declaration): Mark the type as Ghost when its
1007         enclosing context is Ghost.
1008         (Requires_Completion_In_Body): New routine.
1009         (Unit_Requires_Body): Use Requires_Completion_In_Body.
1010         (Unit_Requires_Body_Info): Rename formal parameter P to Pack_Id, update
1011         comment on usage and all uses of P in the body. Use
1012         Requires_Completion_In_Body.
1013         * sem_ch7.ads (Unit_Requires_Body): Rename formal parameter P
1014         to Pack_Id, update comment on usage and all uses of P in the body.
1015         * sem_ch8.adb (Analyze_Exception_Renaming): Inherit the "ghostness"
1016         from the renamed excention.
1017         (Analyze_Generic_Renaming): Inherit the "ghostness" from the
1018         renamed generic subprogram.
1019         (Analyze_Object_Renaming): Inherit the "ghostness" from the renamed
1020         object.
1021         (Analyze_Package_Renaming): Inherit the "ghostness" from the
1022         renamed package.
1023         (Analyze_Subprogram_Renaming): Inherit the "ghostness" from the
1024         renamed subprogram.
1025         * sem_ch11.adb (Analyze_Exception_Declaration): Mark an exception
1026         as Ghost when its enclosing context is Ghost.
1027         * sem_ch12.adb (Analyze_Generic_Package_Declaration,
1028         Analyze_Generic_Subprogram_Declaration): Mark an exception as
1029         Ghost when its enclosing context is Ghost.
1030         (Preanalyze_Actuals): Remove obsolete check.
1031         * sem_ch13.adb (Analyze_Aspect_Specifications): Add processing
1032         for aspect Ghost.
1033         (Check_Aspect_At_Freeze_Point): Aspects
1034         Depends and Global do no need special checking at freeze point.
1035         (Insert_After_SPARK_Mode): Update comment on usage.
1036         * sem_mech.adb (Set_Mechanisms): Remove the entry for convention Ghost.
1037         * sem_prag.adb Add an entry for pragma Ghost in table Sig_Flags.
1038         (Analyze_Abstract_State): Update the grammar of the pragma. Add
1039         formal parameter Pack_Id along with comment on usage. Mark an
1040         abstract state as Ghost when its enclosing context is Ghost. Add
1041         processing for option Ghost.
1042         (Analyze_Constituent): Verify
1043         that a Ghost abstract state is refined by Ghost constituents.
1044         (Analyze_Pragma): "Ghost" is now a valid policy. Add checks
1045         related to the use and placement of Check_Policy Ghost. Add
1046         processing for pragma Ghost.
1047         (Check_Ghost_Constituent): New routine.
1048         (Is_Valid_Assertion_Kind): "Ghost" is now a valid assertion.
1049         (Process_Convention): Remove obsolete check.
1050         (Set_Convention_From_Pragma): Remove the processing for convention
1051         Ghost.
1052         * sem_res.adb (Check_Ghost_Context): New routine.
1053         (Resolve_Call): Verify that a reference to a Ghost entity appears in a
1054         suitable context. Verify the Ghost polity between point of declaration
1055         and point of use.
1056         (Resolve_Entity_Name): Verify that a reference to
1057         a Ghost entity appears in a suitable context. Verify the Ghost
1058         polity between point of declaration and point of use.
1059         * sem_util.adb (Check_Ghost_Completion): New routine.
1060         (Check_Ghost_Derivation): New routine.
1061         (Incomplete_Or_Partial_View): New routine.
1062         (Incomplete_Or_Private_View): Removed.
1063         (Is_Ghost_Entity): New routine.
1064         (Is_Ghost_Statement_Or_Pragma): New routine.
1065         (Is_Subject_To_Ghost): New routine.
1066         (Policy_In_Effect): New routine.
1067         (Set_Is_Ghost_Entity): New routine.
1068         (Within_Ghost_Scope): New routine.
1069         * sem_util.ads (Check_Ghost_Completion): New routine.
1070         (Check_Ghost_Derivation): New routine.
1071         (Incomplete_Or_Partial_View): New routine.
1072         (Incomplete_Or_Private_View): Removed.
1073         (Is_Ghost_Entity): New routine.
1074         (Is_Ghost_Statement_Or_Pragma): New routine.
1075         (Is_Subject_To_Ghost): New routine.
1076         (Policy_In_Effect): New routine.
1077         (Set_Is_Ghost_Entity): New routine.
1078         (Within_Ghost_Scope): New routine.
1079         * snames.adb-tmpl (Get_Convention_Id): Remove the entry for
1080         convention Ghost.
1081         (Get_Convention_Name): Remove the entry for convention Ghost.
1082         * snames.ads-tmpl Remove the convention id for Ghost. Add a
1083         pragma id for Ghost.
1085 2014-10-31  Sergey Rybin  <rybin@adacore.com frybin>
1087         * gnat_ugn.texi: Add description of --RTS option for ASIS tools.
1089 2014-10-31  Olivier Hainque  <hainque@adacore.com>
1091         * gcc-interface/Makefile.in (arm-vxworks): Update target pairs.
1093 2014-10-31  Vincent Celier  <celier@adacore.com>
1095         * prj-part.adb (Parse_Single_Project): Call Set_Display_Name_Of.
1096         * prj-proc.adb (Recursive_Process): Call Display_Name_Of to
1097         get the project Display_Name.
1098         * prj-tree.adb (Display_Name_Of): New function
1099         (Set_Display_Name_Of): New procedure.
1100         (Create_Project): Call Set_Display_Name_Of.
1101         * prj-tree.ads (Display_Name_Of): New function.
1102         (Set_Display_Name_Of): New procedure.
1103         (Project_Node_Record): New component Display_Name.
1104         (Project_Name_And_Node): Remove component Display_Name.
1105         * prj-conf.adb (Parse_Project_And_Apply_Config): Use the full
1106         Config_File_Path as the Config_File_Name, not just its simple
1107         name.
1109 2014-10-31  Thomas Quinot  <quinot@adacore.com>
1111         * get_scos.adb: Minor reformatting.
1113 2014-10-31  Ed Schonberg  <schonberg@adacore.com>
1115         * exp_ch5.adb (Expand_Formal_Container_Loop): Create block to
1116         capture declaration for cursor to prevent spurious errors when
1117         several formal iterators that use the same cursoe name appear
1118         in the same context.
1120 2014-10-31  Vincent Celier  <celier@adacore.com>
1122         * prj-proc.adb (Recursive_Process): Make sure that the project
1123         display name is never No_Name.
1125 2014-10-31  Ed Schonberg  <schonberg@adacore.com>
1127         * sem_attr.adb (Analyze_Access_Attribute): Do not emit error
1128         message if reference does not come from source, as in the case
1129         for the controlling argument of a dispatching call. Error is
1130         diagnosed when call is resolved.
1131         * sem_ch4.adb (Complete_Object_Operation); Fix incorrect RM
1132         reference in error message.
1133         * sem_res.adb (Check_Prefixed_Call): ditto.
1135 2014-10-31  Yannick Moy  <moy@adacore.com>
1137         * sem_prag.adb (Process_Restrictions_Or_Restriction_Warnings): Do not
1138         suppress checks when pragma Restrictions (No_Exception) is used in
1139         CodePeer or GNATprove mode.
1141 2014-10-31  Yannick Moy  <moy@adacore.com>
1143         * gnat1drv.adb (Adjust_Global_Switches): Explicitly mark language
1144         checks as not suppressed in GNATprove mode.
1146 2014-10-31  Ed Schonberg  <schonberg@adacore.com>
1148         * sem_elab.adb (Check_Elab_Call): Nothing to check if call is
1149         being pre-analyzed.
1150         * sem_ch3.adb (Complete_Private_Subtype): If all rep items of full
1151         view are those of the base, use rep_item chain of partial view,
1152         which may include aspects.
1153         * sem_cat.adb (Is_non_Remote_Access_Type): Use underlying type
1154         of base type, to handle properly declared subtypes.
1156 2014-10-31  Ed Schonberg  <schonberg@adacore.com>
1158         * sem_ch12.adb (Analyze_Generic_Package_Declaration): If there
1159         is a default storage pool, add a corresponding aspect to the
1160         generic unit, to be used at the point of instantiation.
1161         (Analyze_Package_Instantiation): If generic unit has aspect
1162         specifications, propagate them to instance. If instance has a
1163         Default_Storage_Pool aspect, make sure that it overrides the
1164         one that may be inherited from the generic.
1166 2014-10-31  Vincent Celier  <celier@adacore.com>
1168         * prj-attr.adb: Minor removal of attributes of package Linker
1169         that have never been used and never been documented.
1170         * projects.texi: Add documentation for attribute Runtime.
1171         * prj-nmsc.adb (Check_Configuration): Do not report a warning
1172         for unknown compilers when the project is externally built.
1174 2014-10-31  Vasiliy Fofanov  <fofanov@adacore.com>
1176         * prj-conf.adb (Do_Autoconf): Refactor the code so that empty
1177         Normalized_Pathname doesn't inhibit the custom Selected_Target
1178         value.
1179         * prj-conf.adb (Parse_Project_And_Apply_Config): Make sure that
1180         Automatically_Generated is correctly set after the first call
1181         to Process_Project_And_Apply_Config and not modified after the
1182         second call, if any.
1184 2014-10-31  Yannick Moy  <moy@adacore.com>
1186         * Makefile.rtl, gnat_rm.texi, impunit.adb: Add mention of new library
1187         files.
1188         * a-cfinve.adb, a-cfinve.ads: New unit for formal indefinite
1189         vectors, suitable for use in client SPARK code, also more
1190         efficient than the standard vectors.
1191         * a-coboho.adb, a-coboho.ads New unit for bounded holders, that
1192         are used to define formal indefinite vectors in terms of formal
1193         definite ones.
1194         * a-cofove.adb, a-cofove.ads: Simplification of the API of formal
1195         definite vectors, similar to the API of the new indefinite ones. A
1196         new formal parameter of the generic unit called Bounded allows
1197         to define growable vectors that use dynamic allocation.
1199 2014-10-31  Vincent Celier  <celier@adacore.com>
1201         * prj-conf.adb (Look_For_Project_Paths): New procedure
1202         (Parse_Project_And_Apply_Config): Initially, parse the project
1203         files ignoring missing withs. If there are missing withs, extend
1204         the project path with directories rooted at the compiler roots,
1205         including directories rooted at the runtime roots, if there are
1206         non default runtimes, in the PATH orser.
1207         * prj-env.adb (Initialize_Default_Project_Path): Do not add
1208         any directory from the prefix if the target is "-".
1209         * prj-part.adb (Parse): Initialize the tables, as Parse may be
1210         call several times by gprbuild.
1211         * prj.adb (Update_Ignore_Missing_With): New procedure.
1213 2014-10-31  Ed Schonberg  <schonberg@adacore.com>
1215         * sem_aux.adb (First_Stored_Discriminant,
1216         Has_Completely_Hidden_Discriminant): When scanning the list of
1217         discriminants to locate possibly hidden (inherited) discriminants,
1218         ignore itypes that may appear in the entity list, when an access
1219         discriminants is constrained by an access attribute reference.
1221 2014-10-31  Javier Miranda  <miranda@adacore.com>
1223         * freeze.adb (Freeze_Record_Type): Add missing
1224         check to verify that all the primitives of an interface type
1225         are abstract or null procedures.
1227 2014-10-31  Vincent Celier  <celier@adacore.com>
1229         * s-os_lib.adb, s-os_lib.ads: New function Non_Blocking_Spawn that
1230         redirects standard output and standard error to two different files.
1232 2014-10-31  Bob Duff  <duff@adacore.com>
1234         * makeutl.ads: Minor comment fix.
1236 2014-10-31  Arnaud Charlet  <charlet@adacore.com>
1238         * system-linux-x86_64.ads, system-mingw-x86_64.ads (Word_Size,
1239         Memory_Size): Use Standard'Word_Size so that the value can be changed
1240         via a target configuration file.
1242 2014-10-31  Eric Botcazou  <ebotcazou@adacore.com>
1244         * exp_ch4.adb: Minor tweak.
1246 2014-10-31  Eric Botcazou  <ebotcazou@adacore.com>
1248         * sem_ch12.adb (Analyze_Package_Instantiation): Do not inline with
1249         back-end inlining.
1250         (Must_Inline_Subp): Delete.
1251         * sem_util.ads, sem_util.adb (Must_Inline): Likewise.
1253 2014-10-31  Ed Schonberg  <schonberg@adacore.com>
1255         * freeze.adb (Freeze_Entity): A default_pool does not apply to
1256         internal access types generated for 'access references.
1257         * sem_prag (Analyze_Pragma, case Default_Pool): If the name is
1258         not null it must designate a variable.
1260 2014-10-31  Eric Botcazou  <ebotcazou@adacore.com>
1262         * inline.adb: Minor reformatting.
1264 2014-10-31  Ed Schonberg  <schonberg@adacore.com>
1266         * sem_ch3.adb (Build_Derived_Private_Type): If the derived
1267         type has access discriminants, create itype references for their
1268         anonymous types, so that they are elaborated before the generated
1269         bodies for the primitive operations of the type.
1271 2014-10-31  Tristan Gingold  <gingold@adacore.com>
1273         * prj-conf.adb (Locate_Runtime): Remove procedure.
1275 2014-10-31  Eric Botcazou  <ebotcazou@adacore.com>
1277         * inline.adb (Has_Excluded_Declaration): With back-end inlining,
1278         only return true for nested packages.
1279         (Cannot_Inline): Issue errors/warnings whatever the optimization level
1280         for back-end inlining and remove assertion.
1282 2014-10-31  Sergey Rybin  <rybin@adacore.com frybin>
1284         * table.adb (Tree_Read, Tree_Write): Use parentheses to specify
1285         the desired order of '*' and '/' operations to avoid overflow.
1287 2014-10-31  Eric Botcazou  <ebotcazou@adacore.com>
1289         * exp_ch6.adb (Do_Inline): Remove unreachable code.
1290         (Do_Inline_Always): Likewise.
1292 2014-10-31  Vincent Celier  <celier@adacore.com>
1294         * prj-nmsc.adb (Check_Stand_Alone_Library): Change error message
1295         when library has no Ada interfaces and Library_Standalone is
1296         declared.
1298 2014-10-31  Arnaud Charlet  <charlet@adacore.com>
1300         * sem_ch13.adb (Check_Constant_Address_Clause): Disable checks
1301         on address clauses in CodePeer mode.
1303 2014-10-31  Javier Miranda  <miranda@adacore.com>
1305         * inline.adb (Expand_Inlined_Call): Do not skip
1306         inlining of calls to subprogram renamings.
1308 2014-10-31  Hristian Kirtchev  <kirtchev@adacore.com>
1310         * sem_res.adb (Resolve_Entity_Name): Account for
1311         the case where the immediate parent of a reference to an entity
1312         is a parameter association.
1314 2014-10-31  Eric Botcazou  <ebotcazou@adacore.com>
1316         * inline.adb (Check_And_Split_Unconstrained_Function): Do not
1317         test for the presence of nested subprograms.
1319 2014-10-31  Ed Schonberg  <schonberg@adacore.com>
1321         * aspects.ads, aspects.adb: Add aspect Default_Storage_Pool.
1322         * sem_ch13.adb (Analyze_One_Aspect): Generate pragma for aspect
1323         Default_Storage_Pool.
1325 2014-10-31  Eric Botcazou  <ebotcazou@adacore.com>
1327         * sem_ch6.adb: Remove obsolete comment.
1329 2014-10-31  Olivier Hainque  <hainque@adacore.com>
1331         * g-allein.ads: bind vec_sld for pixels to 8hi vsldoi instead
1332         of 4si, as pixels are short.
1334 2014-10-31  Ed Schonberg  <schonberg@adacore.com>
1336         * sem_res.adb (Resolve_Call): Do not reject a call to a protected
1337         operation in the spec of a protected type, when the call appears
1338         in a pre/postcondition for another protected operation.
1340 2014-10-31  Tristan Gingold  <gingold@adacore.com>
1342         * prj-conf.adb: Locate_Runtime: Always search the runtime in
1343         project path.
1345 2014-10-31  Eric Botcazou  <ebotcazou@adacore.com>
1347         * inline.adb (Check_Package_Body_For_Inlining): Adjust previous
1348         change to use correct idiom for back-end inlining.
1350 2014-10-31  Ed Schonberg  <schonberg@adacore.com>
1352         * freeze.adb (Freeze_Record_Type): Do not check component size
1353         if its type is generic.
1355 2014-10-31  Bob Duff  <duff@adacore.com>
1357         * gnat_rm.texi: Fix documentation w.r.t -gnatw.w.
1359 2014-10-31  Ed Schonberg  <schonberg@adacore.com>
1361         * sem_ch4.adb (Try_Container_Indexing): Use Check_Implicit_Dereference.
1362         * sem_util.adb (Check_Implicit_Dereference): a) Handle generalized
1363         indexing as well as function calls.  b)  If the context is a
1364         selected component and whe are in an instance, remove entity from
1365         selector name to force resolution of the node, so that explicit
1366         dereferences can be generated in the instance if they were in
1367         the generic unit.
1369 2014-10-31  Eric Botcazou  <ebotcazou@adacore.com>
1371         * inline.adb (Back_End_Cannot_Inline): Delete.
1372         (Add_Inlined_Subprogram): Do not call it.
1374 2014-10-31  Ed Schonberg  <schonberg@adacore.com>
1376         * exp_ch3.ads (Make_Tag_Assignment): New function, used to
1377         re-initialize the tag in a tagged object declaration with
1378         initial value.
1379         * exp_ch3.adb (Expand_N_Object_Declaration): Use
1380         Make_Tag_Assignment to simplify code for a tagged object
1381         declaration.
1382         * exp_ch13.adb (Expand_Freeze_Entity): Analyze freeze actions
1383         for the freeze node of an object.
1384         * freeze.adb (Check_Address_Clause): Use Make_Tag_Assignment when
1385         needed to extend Freeze_Actions for a tagged object declaration.
1387 2014-10-31  Eric Botcazou  <ebotcazou@adacore.com>
1389         * gnat_ugn.texi: Further minor improvement to -flto entry.
1391 2014-10-31  Gary Dismukes  <dismukes@adacore.com>
1393         * g-dynhta.adb, g-dynhta.ads: Minor typo fixes and reformatting.
1395 2014-10-30  Ed Schonberg  <schonberg@adacore.com>
1397         * exp_ch3.adb (Expand_N_Object_Declaration): Code cleanup.
1399 2014-10-30  Ed Schonberg  <schonberg@adacore.com>
1401         * sem_ch5.adb (Analyze_Iterator_Specification): If a subtype
1402         indication is provided, check properly that it covers the element
1403         type of of the container type.
1405 2014-10-30  Hristian Kirtchev  <kirtchev@adacore.com>
1407         * g-dynhta.ads, g-dynhta.adb: Add the implementation of a load facto
1408         -based hash table.
1410 2014-10-30  Ed Schonberg  <schonberg@adacore.com>
1412         * exp_util.ads, exp_util.adb (Following_Address_Clause): Modify
1413         Has_Following_Address_Clause so that it returns the address
1414         clause if present, rather than a boolean value.
1415         * sem_ch3.adb (Analyze_Object_Declaration): use
1416         Following_Address_Clause.
1417         * exp_ch3.adb (Expand_N_Object_Declaration): When a tagged object
1418         is initialized, insert tag assignment after object is frozen,
1419         which may be after an address clause that follows the declaration.
1421 2014-10-30  Tristan Gingold  <gingold@adacore.com>
1423         * system-darwin-x86.ads, system-linux-s390x.ads, system-linux-alpha.ads,
1424         system-vxworks-arm.ads, system-freebsd-x86_64.ads,
1425         system-linux-hppa.ads, system-linux-s390.ads,
1426         system-solaris-sparcv9.ads, system-mingw.ads, system-linux-ia64.ads,
1427         system-vxworks-sparcv9.ads, system-linux-ppc.ads, system-aix64.ads,
1428         system-linux-sh4.ads, system-solaris-x86.ads, system-linux-x86_64.ads,
1429         system-linux-x86.ads, system-vxworks-ppc.ads, system-hpux.ads,
1430         system-linux-armel.ads, system-darwin-ppc.ads, system-solaris-sparc.ads,
1431         system-vxworks-m68k.ads, system-hpux-ia64.ads, system.ads,
1432         system-solaris-x86_64.ads, system-mingw-x86_64.ads,
1433         system-vxworks-mips.ads, system-linux-sparc.ads, system-freebsd-x86.ads,
1434         system-aix.ads, system-darwin-x86_64.ads, system-vxworks-x86.ads: Add
1435         pragma No_Elaboration_Code_All.
1437 2014-10-30  Eric Botcazou  <ebotcazou@adacore.com>
1439         * gnat_ugn.texi: Minor improvement to -flto entry.
1441 2014-10-30  Hristian Kirtchev  <kirtchev@adacore.com>
1443         * sem_util.adb (Inherit_Subprogram_Contract):
1444         Add a guard to protect against enumeration literal overriding.
1445         * sem_ch3.adb, sem_ch4.adb, sem_res.adb, sem_util.adb:
1446         Minor reformatting (add SPARK RM references).
1448 2014-10-30  Robert Dewar  <dewar@adacore.com>
1450         * exp_dbug.adb, opt.ads: Minor reformatting.
1452 2014-10-30  Yannick Moy  <moy@adacore.com>
1454         * inline.adb (Has_Single_Return_In_GNATprove_Mode):
1455         Return False when return statement is inside one or more blocks.
1457 2014-10-30  Hristian Kirtchev  <kirtchev@adacore.com>
1459         * exp_ch7.adb (Is_Subprogram_Call): Account for the case where an
1460         object declaration initialized by a function call that returns
1461         an unconstrained result may be rewritted as a renaming of the
1462         secondary stack result.
1464 2014-10-30  Hristian Kirtchev  <kirtchev@adacore.com>
1466         * aspects.adb: Add an entry for aspect Extensions_Visible in
1467         table Canonical_Aspect.
1468         * aspects.ads: Add entry for aspect Extensions_Visible in
1469         tables Aspect_Argument, Aspect_Delay, Aspect_Id, Aspect_Names,
1470         Implementation_Defined_Aspect.
1471         * einfo.adb (Get_Pragma): Include pragma Extensions_Visible in
1472         the list of contract pragmas.
1473         * par-prag.adb Pragma Extensions_Visible does not require special
1474         processing from the parser.
1475         * sem_ch3.adb (Analyze_Object_Declaration): Prevent an
1476         implicit class-wide conversion of a formal parameter
1477         of a specific tagged type whose related subprogram is
1478         subject to pragma Extensions_Visible with value "False".
1479         (Check_Abstract_Overriding): Add various overriding checks
1480         related to pragma Extensions_Visible.
1481         (Derive_Subprogram):
1482         A subprogram subject to pragma Extensions_Visible with value
1483         False requires overriding if the subprogram has at least one
1484         controlling OUT parameter.
1485         (Is_EVF_Procedure): New routine.
1486         * sem_ch4.adb (Analyze_Type_Conversion): A formal parameter of
1487         a specific tagged type whose related subprogram is subject to
1488         pragma Extensions_Visible with value "False" cannot appear in
1489         a class-wide conversion.
1490         * sem_ch6.adb (Analyze_Subprogram_Contract): Remove
1491         the assertion to account for pragma Extensions_Visible.
1492         (Check_Overriding_Indicator): An overriding subprogram
1493         inherits the contact of the overridden subprogram.
1494         (New_Overloaded_Entity): An overriding subprogram inherits the
1495         contact of the overridden subprogram.
1496         * sem_ch13.adb (Analyze_Aspect_Specifications): Add processing
1497         for aspect Extensions_Visible.
1498         (Check_Aspect_At_Freeze_Point): Aspect Extensions_Visible does not
1499         require special processing at the freeze point.
1500         * sem_prag.adb Add an entry for pragma Extensions_Visible in
1501         table Sig_Flags.
1502         (Analyze_Pragma): Ensure that various SPARK
1503         pragmas lack identifiers in their arguments. Add processing for
1504         pragma Extensions_Visible.
1505         (Chain_CTC): Code reformatting.
1506         * sem_res.adb (Resolve_Actuals): A formal parameter of a
1507         specific tagged type whose related subprogram is subject to
1508         pragma Extensions_Visible with value "False" cannot act as an
1509         actual in a subprogram with value "True".
1510         * sem_util.adb (Add_Classification): New routine.
1511         (Add_Contract_Item): Account for pragma Extensions_Visible. Code
1512         reformatting.
1513         (Add_Contract_Test_Case): New routine.
1514         (Add_Pre_Post_Condition): New routine.
1515         (Extensions_Visible_Status): New routine.
1516         (Inherit_Subprogram_Contract): New routine.
1517         (Is_EVF_Expression): New routine.
1518         (Is_Specific_Tagged_Type): New routine.
1519         * sem_util.ads Add type Extensions_Visible_Mode and document all values.
1520         (Add_Contract_Item): Add pragma Extensions_Visible to the
1521         comment on usage.
1522         (Inherit_Subprogram_Contract): New routine.
1523         (Is_EVF_Expression): New routine.
1524         (Is_Specific_Tagged_Type): New routine.
1525         * sinfo.adb (Is_Inherited): New routine.
1526         (Set_Is_Inherited): New routine.
1527         * sinfo.ads Add flag Is_Inherited along with its usage in
1528         nodes.
1529         (Is_Inherited): New routine along with pragma Inline.
1530         (Set_Is_Inherited): New routine along with pragma Inline.
1531         * snames.ads-tmpl: Add predefined name "Extensions_Visible"
1532         and a new Pragma_Id for the pragma.
1534 2014-10-30  Vincent Celier  <celier@adacore.com>
1536         * prj-proc.adb (Process_Case_Construction): Do not look for
1537         the ultimate extending project for a case variable.
1539 2014-10-30  Pierre-Marie Derodat  <derodat@adacore.com>
1541         * exp_dbug.adb, opt.ads (GNAT_Encodings): Import from C. Define
1542         enumerators.
1543         (gnat_encodings): Define a dummy variable for the AAMP back-end.
1544         (Get_Encoded_Name): When -fgnat-encodings=all|gdb, encode names
1545         for all discrete types whose bounds do not match size and do so
1546         only for biased types when -fgnat-encodings=minimal.
1547         * gcc-interface/decl.c (gnat_to_gnu_entity): Do not create ___XA
1548         parallel types when array bounds are constant while the lower bound is
1549         not 1.  Also stop generating them because the bound type is
1550         larger than sizetype.
1551         * gcc-interface/misc.c (gnat_encodings): New.
1553 2014-10-30  Thomas Quinot  <quinot@adacore.com>
1555         * opt.adb (Set_Opt_Config_Switches): For an internal unit,
1556         always reset Default_SSO to ' '.
1558 2014-10-30  Thomas Quinot  <quinot@adacore.com>
1560         * freeze.adb (Freeze_Record_Type): Set SSO from default before
1561         checking SSO consistency.
1563 2014-10-30  Javier Miranda  <miranda@adacore.com>
1565         * inline.adb (Check_Package_Body_For_Inlining):
1566         Cleanup this subprogram to implement exactly the behavior
1567         documented in the spec.
1569 2014-10-30  Hristian Kirtchev  <kirtchev@adacore.com>
1571         * a-comutr.adb, a-cimutr.adb (Insert_Child): Add new variable First.
1572         Update the position after all insertions have taken place.
1574 2014-10-30  Ed Schonberg  <schonberg@adacore.com>
1576         * sem_prag.adb (Analyze_Pragma, case License): Do not perform
1577         analysis of pragma arguments when in CodePeer mode, pragma has
1578         different format on other compilers.
1580 2014-10-30  Thomas Quinot  <quinot@adacore.com>
1582         * s-os_lib.adb: Minor reformatting.
1584 2014-10-29  Richard Sandiford  <richard.sandiford@arm.com>
1586         * gcc-interface/decl.c, gcc-interface/gigi.h, gcc-interface/misc.c,
1587         gcc-interface/trans.c, gcc-interface/utils.c, gcc-interface/utils2.c:
1588         Remove redundant enum from machine_mode.
1590 2014-10-28  Andrew MacLeod  <amacleod@redhat.com>
1592         * gcc-interface/trans.c: Adjust include files.
1593         * gcc-interface/utils.c: Ditto.
1595 2014-10-27  Eric Botcazou  <ebotcazou@adacore.com>
1597         * gcc-interface/utils.c (create_subprog_decl): Adjust condition.
1599 2014-10-27  Eric Botcazou  <ebotcazou@adacore.com>
1601         * gcc-interface/misc.c (gnat_init_options_struct): Parameterize errno
1602         support here instead of...
1603         Do not set flag_delete_dead_exceptions to 1 unconditionally.
1604         (gnat_init_gcc_eh): Set flag_delete_dead_exceptions to 1.
1605         (gnat_init_gcc_fp): ...here.
1607 2014-10-27  Eric Botcazou  <ebotcazou@adacore.com>
1609         * gcc-interface/trans.c (gnat_to_gnu) <N_Real_Literal>: Minor tweaks.
1611 2014-10-27  Eric Botcazou  <ebotcazou@adacore.com>
1613         * gcc-interface/utils.c (create_var_decl_1): For a variable declared
1614         in the unit, set TREE_PUBLIC only if it has static storage duration.
1616 2014-10-27  Eric Botcazou  <ebotcazou@adacore.com>
1618         * gcc-interface/decl.c (gnat_to_gnu_entity): Apply special treatment
1619         of derived packed array types to constrained subtypes only.
1621 2014-10-27  Eric Botcazou  <ebotcazou@adacore.com>
1623         * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Array_Type>: Remove
1624         superfluous computation for the max size.
1625         <E_Array_Subtype>: Likewise.  Make sure that the max size calculation
1626         does not overflow at compile time.
1628 2014-10-23  Ed Schonberg  <schonberg@adacore.com>
1630         * sem_eval.adb (Check_Non_Static_Context): Do not set
1631         Is_Machine_Number on a literal of a fixed-point type.
1633 2014-10-23  Robert Dewar  <dewar@adacore.com>
1635         * mlib-prj.adb, sem_ch4.adb, exp_ch3.adb: Minor reformatting.
1637 2014-10-23  Pierre-Marie Derodat  <derodat@adacore.com>
1639         * exp_dbug.ads: Update ___XA parallel type specification.
1641 2014-10-23  Hristian Kirtchev  <kirtchev@adacore.com>
1643         * sem_ch3.adb (Copy_Array_Subtype_Attributes): Inherit the rep
1644         chain of the source type.
1645         * sem_ch13.adb (Analyze_Aspect_Specifications): Minor
1646         reformatting of an error message.
1647         * sem_util.adb (Inherit_Rep_Item_Chain): Do not inherit a rep
1648         chain that has been inherited already.
1650 2014-10-23  Ed Schonberg  <schonberg@adacore.com>
1652         * sem_ch6.adb (Analyze_Expression_Function): Simplify analysis
1653         in generic context, and generate body in this case as well,
1654         to simplify ASIS traversals on the construct.
1656 2014-10-23  Ed Schonberg  <schonberg@adacore.com>
1658         * sem_ch4.adb (Complete_Object_Operation): Indicate that the
1659         scope of the operation (s) is referenced, to prevent spurious
1660         warnings about unused units.
1662 2014-10-23  Johannes Kanig  <kanig@adacore.com>
1664         * errout.adb (Error_Msg_Internal): Copy check flag, increment
1665         check msg count.
1666         * erroutc.adb (Delete_Msg) adjust check msg count.
1667         (Output_Msg_Text) handle check msg case (do nothing).
1668         (Prescan_Message) recognize check messages with severity prefixes.
1669         * errutil.adb (Error_Msg) handle check flag, adjust counter.
1671 2014-10-23  Ed Schonberg  <schonberg@adacore.com>
1673         * sem_eval.adb (Subtypes_Statically_Match): For a generic actual
1674         type, check for the presence of discriminants in its parent type,
1675         against the presence of discriminants in the context type.
1677 2014-10-23  Tristan Gingold  <gingold@adacore.com>
1679         * adaint.c: __gnat_get_file_names_case_sensitive: Default is
1680         true on arm-darwin.
1682 2014-10-23  Arnaud Charlet  <charlet@adacore.com>
1684         * pprint.adb (Expression_Image): Add handling of quantifiers.
1686 2014-10-23  Ed Schonberg  <schonberg@adacore.com>
1688         * exp_pakd.adb (Expand_Packed_Element_Reference): If the
1689         prefix is a source entity, generate a reference to it before
1690         transformation, because rewritten node might not generate a
1691         proper reference, leading to spurious warnings.
1693 2014-10-23  Tristan Gingold  <gingold@adacore.com>
1695         * init.c: Fix thinko in previous patch.
1697 2014-10-23  Hristian Kirtchev  <kirtchev@adacore.com>
1699         * sem_ch3.adb (Decimal_Fixed_Point_Type_Declaration):
1700         Inherit the rep chain of the implicit base type.
1701         (Floating_Point_Type_Declaration): Inherit the rep chain of the
1702         implicit base type.
1703         (Ordinary_Fixed_Point_Type_Declaration): Inherit the rep chain of the
1704         implicit base type.
1705         (Signed_Integer_Type_Declaration): Inherit the rep chain of the
1706         implicit base type.
1707         * sem_util.ads, sem_util.adb (Inherit_Rep_Item_Chain): New routine.
1709 2014-10-23  Pascal Obry  <obry@adacore.com>
1711         * g-regist.adb, g-regist.ads: Add support for reading 32bit or 64bit
1712         view of the registry.
1714 2014-10-23  Ed Schonberg  <schonberg@adacore.com>
1716         * exp_ch3.adb (Expand_N_Object_Declaration): If type is abstract,
1717         return without expanding expression, to prevent subsequent crash.
1718         * freeze.adb: better error message for illegal declaration.
1720 2014-10-23  Hristian Kirtchev  <kirtchev@adacore.com>
1722         * sysdep.c (__gnat_localtime_tzoff): Properly delimit the
1723         substring which represents the time zone on VxWorks.
1725 2014-10-23  Vincent Celier  <celier@adacore.com>
1727         * gnatls.adb: If --RTS= was not used, check if there is a default
1728         runtime. If there is none, in verbose mode, indicate that the
1729         default runtime is not available and show only the current
1730         directory in the source and the object search paths.
1732 2014-10-23  Ed Schonberg  <schonberg@adacore.com>
1734         * sem_ch6.adb (Process_Formals): A thunk procedure with a
1735         parameter of a limited view does not need a freeze node.
1737 2014-10-23  Hristian Kirtchev  <kirtchev@adacore.com>
1739         * sem_ch7.adb (Analyze_Package_Body_Helper):
1740         The logic which hides local entities from external
1741         visibility is now contained in routine Hide_Public_Entities.
1742         (Hide_Public_Entities): New routine. Object and subprogram
1743         renamings are now hidden from external visibility the same way
1744         objects are.
1746 2014-10-23  Ed Schonberg  <schonberg@adacore.com>
1748         * sem_attr.adb (Analyze_Attribute): The prefix of attribute Elaborated
1749         does not require freezing, in particular if it denotes a generic
1750         function.
1752 2014-10-23  Yannick Moy  <moy@adacore.com>
1754         * sem_prag.adb (Analyze_Pragma/Pragma_Inline & Pragma_Inline_Always):
1755         Disable analysis in GNATprove mode.
1757 2014-10-23  Arnaud Charlet  <charlet@adacore.com>
1759         * mlib-prj.adb: Remove obsolete references to libdecgnat (VMS only).
1761 2014-10-23  Arnaud Charlet  <charlet@adacore.com>
1763         * gnat1drv.adb (Adjust_Global_Switches): Ignore style check
1764         pragmas in codepeer mode.
1766 2014-10-23  Gary Dismukes  <dismukes@adacore.com>
1768         * gnat_rm.texi: Minor syntax fix for pragma Annotate (missing ',').
1770 2014-10-23  Hristian Kirtchev  <kirtchev@adacore.com>
1772         * sem_ch12.adb (Inline_Instance_Body): Alphabetize
1773         local variables and constants. Add constants Save_SM and Save_SMP
1774         to capture SPARK_Mode-related attributes.  Compile the inlined
1775         body with the SPARK_Mode of the enclosing context.
1777 2014-10-23  Hristian Kirtchev  <kirtchev@adacore.com>
1779         * sinfo.adb (Elaboration_Boolean): Removed.
1780         (Set_Elaboration_Boolean): Removed.
1781         * sinfo.ads Remove attribute Elaboration_Boolean along with its
1782         occurrence in nodes.
1783         (Elaboration_Boolean): Removed along with pragma Inline.
1784         (Set_Elaboration_Boolean): Removed along with pragma Inline.
1786 2014-10-23  Ed Schonberg  <schonberg@adacore.com>
1788         * sem_ch3.adb (Constant_Redeclaration): Make error message more
1789         explicit on a deferred constant whose object_definition is an
1790         anonymous array.
1792 2014-10-23  Vincent Celier  <celier@adacore.com>
1794         * gnatls.adb: Never call Targparm.Get_Target_Parameters.
1796 2014-10-23  Ed Schonberg  <schonberg@adacore.com>
1798         * sem_ch6.adb (Analyze_Expression_Function): In a generic
1799         context do not create a body, and only pre-analyze the expression,
1800         which may include incomplete views.
1802 2014-10-23  Robert Dewar  <dewar@adacore.com>
1804         * sem_type.adb: Minor code reorganization (use Nkind_In, Ekind_In).
1805         * sem_ch3.adb: Minor reformatting.
1807 2014-10-23  Ed Schonberg  <schonberg@adacore.com>
1809         * sem_ch12.adb (Analyze_Associations): If an actual for a formal
1810         object is a call to a parameterless expression function, add
1811         the function to the list of actuals to freeze.
1812         * freeze.adb (Check_Expression_Function): Create freeze nodes of
1813         outer types that may be references in the body of the expression.
1815 2014-10-23  Hristian Kirtchev  <kirtchev@adacore.com>
1817         * exp_util.ads, checks.ads: Minor comment reformatting.
1819 2014-10-23  Javier Miranda  <miranda@adacore.com>
1821         * sem_eval (Test_In_Range): Disable removal of range_check for
1822         VM targets.
1824 2014-10-23  Robert Dewar  <dewar@adacore.com>
1826         * erroutc.adb (Validate_Specific_Warnings): Fix test for -W
1827         messages, which got disabled when we unconditionally added an
1828         asterisk at the start of the string.
1830 2014-10-23  Vincent Celier  <celier@adacore.com>
1832         * gnatls.adb: Ensure that "gnatls -l" works even when there is
1833         no default runtime.
1835 2014-10-23  Eric Botcazou  <ebotcazou@adacore.com>
1837         * sem_ch3.adb (Build_Derived_Private_Type): When the parent is
1838         untagged and has discriminants, build the implicit full view after
1839         building the derived type. Capture original declaration and type
1840         here instead of...
1841         (Copy_And_Build): ...here.
1842         * sem_type.adb (Full_View_Covers): Handle the Underlying_Full_View.
1844 2014-10-23  Hristian Kirtchev  <kirtchev@adacore.com>
1846         * checks.adb (Ensure_Valid): Update the subprogram
1847         profile. Propagate the contex attributes to Insert_Valid_Check.
1848         (Insert_Valid_Check): Update the subprogram profile. Propagate
1849         the attributes of the context to Duplicate_Subexpr_No_Checks.
1850         (Validity_Check_Range): Update the subprogram profile. Propagate
1851         the context attribute to Ensure_Valid.
1852         * checks.ads (Ensure_Valid): Update the subprogram profile
1853         along with the comment on usage.
1854         (Insert_Valid_Check): Update the subprogram profile along with the
1855         comment on usage.
1856         (Validity_Check_Range): Update the subprogram profile along with
1857         the comment on usage.
1858         * exp_util.adb (Build_Temporary): New routine.
1859         (Duplicate_Subexpr_No_Checks): Update the subprogram
1860         profile. Propagate the attributes of the context to Remove_Side_Effects.
1861         (Remove_Side_Effects): Update the subprogram profile. Update all calls
1862         to Make_Temporary to invoke Build_Temporary.
1863         * exp_util.ads (Duplicate_Subexpr_No_Checks): Update
1864         the subprogram profile along with the comment on usage.
1865         (Remove_Side_Effects): Update the subprogram profile along with
1866         the comment on usage.
1867         * sem_ch3.adb (Process_Range_Expr_In_Decl): Pass the subtype
1868         to the validity check machinery.  Explain the reason for this
1869         propagation.
1871 2014-10-23  Robert Dewar  <dewar@adacore.com>
1873         * a-strsea.adb: Minor reformatting.
1875 2014-10-23  Thomas Quinot  <quinot@adacore.com>
1877         * bcheck.adb (Check_Consistent_SSO_Default): Exclude internal
1878         units from consistency check.
1879         * gnat_rm.texi (Default_Scalar_Storage_Order): Document that
1880         consistency check excludes run-time units.
1882 2014-10-23  Ed Schonberg  <schonberg@adacore.com>
1884         * a-strsea.adb (Find_Token): Enable constraint checking in this
1885         procedure, so that even when compiling with checks suppressed, as is
1886         the case for the run-time, an exception is raised in this routine when
1887         the input meets the conditions described in RM 2005 A.4.3 (68/1).
1889 2014-10-20  Eric Botcazou  <ebotcazou@adacore.com>
1891         * sem_ch3.adb (Build_Derived_Private_Type): When the parent
1892         is untagged and has discriminants, build the implicit full
1893         view even if the derived type is a completion, and make it
1894         the Underlying_Full_View of the type.
1895         (Copy_And_Build): Fix Is_Completion actual parameter in the calls to
1896         Build_Derived_Type.
1897         (Build_Derived_Record_Type): Likewise.
1899 2014-10-20  Ed Schonberg  <schonberg@adacore.com>
1901         * sem_ch13.adb: Add guard to convention setting.
1903 2014-10-20  Robert Dewar  <dewar@adacore.com>
1905         * sem_ch3.adb, prj-proc.adb, prj-proc.ads, prj-conf.adb: Minor
1906         reformatting.
1908 2014-10-20  Robert Dewar  <dewar@adacore.com>
1910         * par-prag.adb (Add_List_Pragma_Entry): New procedure.
1911         * par.adb (P_Pragma): Document requirement to handle multiple calls.
1913 2014-10-20  Robert Dewar  <dewar@adacore.com>
1915         * sem_prag.adb (Analyze_Pragma, case No_Elaboration_Code_All):
1916         Fix error of bad inheritance of this pragma from with'ed unit.
1918 2014-10-20  Ed Schonberg  <schonberg@adacore.com>
1920         * sem_ch13.adb (Inherit_Aspects_At_Freeze_Point): For a subtype,
1921         inherit convention from parent type, because the subtype may
1922         have been declared on a partial view, prior to the pragma on
1923         the parent.
1925 2014-10-20  Olivier Hainque  <hainque@adacore.com>
1926             Tristan Gingold  <gingold@adacore.com>
1928         * gcc-interface/Makefile.in: Handle arm-darwin and VxWorks 7.
1929         Misc clean ups.
1931 2014-10-20  Nicolas Roche  <roche@adacore.com>
1933         * gcc-interface/Make-lang.in: ensure that automatically generated
1934         dependency are referencing generated gnatvsn rather than original
1935         one.
1937 2014-10-20  Gary Dismukes  <dismukes@adacore.com>
1939         * gnat_ugn.texi: Minor reformatting.
1940         * sem_ch3.adb: Minor reformatting.
1942 2014-10-20  Vincent Celier  <celier@adacore.com>
1944         * prj-attr.adb: New project level attribute Runtime.
1945         * prj-conf.adb (Get_Project_Runtimes): New procedure to get
1946         the attributes Runtime declared in the main project, to use
1947         in auto-configuration.
1948         (Get_Or_Create_Configuration_File): Call Get_Project_Runtimes.
1949         * prj-proc.adb (Runtime_Defaults): New table to store
1950         the default values of attributes Runtime (<language>).
1951         (Set_Default_Runtime_For): New procedure to store the default
1952         value of a Runtime (<language>) in table Runtime_Defaults.
1953         (Expression): Use the value stored in table Runtime_Defaults as
1954         the default for Runtime (<language>).
1955         * prj-proc.ads (Set_Default_Runtime_For): New procedure.
1956         * prj.ads (Attribute_Default_Value): New enumerated value
1957         Runtime_Value.
1959 2014-10-20  Ed Schonberg  <schonberg@adacore.com>
1961         * sem_ch3.adb (Analyze_Object_Declaration): If the type is
1962         an unconstrained unchecked_union type, rewrite declaration
1963         as a renaming to prevent attempt to retrieve non- existent
1964         discriminants from expression.
1966 2014-10-20  Ed Schonberg  <schonberg@adacore.com>
1968         * gnat_ugn.texi: Minor reformatting.
1970 2014-10-20  Tristan Gingold  <gingold@adacore.com>
1972         * init.c (__gnat_is_stack_guard): Don't use mach_vm_region_recurse on
1973         arm-darwin.
1974         * raise-gcc.c: Add ATTRIBUTE_UNUSED to remove warnings for
1975         unused arguments.
1977 2014-10-20  Hristian Kirtchev  <kirtchev@adacore.com>
1979         * sem_attr.adb (Analyze_Attribute): Replace
1980         variables CS and PS with Proc_Id and Subp_Id to better illustrate
1981         their purpose. Account for the case where _Postconditions
1982         has not been generated yet and the context is aspect/pragma
1983         Refined_Post. In that scenario the expected prefix of attribute
1984         'Result is the current scope.
1986 2014-10-20  Robert Dewar  <dewar@adacore.com>
1988         * par-ch4.adb (P_Expression): Handle extraneous comma/semicolon
1989         in middle of expression with logical operators.
1991 2014-10-20  Robert Dewar  <dewar@adacore.com>
1993         * par-ch13.adb (Possible_Misspelled_Aspect): New function.
1995 2014-10-20  Steve Baird  <baird@adacore.com>
1997         * pprint.adb: Improve Expression_Image function.
1999 2014-10-20  Robert Dewar  <dewar@adacore.com>
2001         * gnat_rm.texi: Document No_Tagged_Streams pragma and aspect.
2002         * snames.ads-tmpl: Add entry for pragma No_Tagged_Streams.
2003         * aspects.ads, aspects.adb: Add aspect No_Tagged_Streams.
2004         * einfo.adb (No_Tagged_Streams_Pragma): New field.
2005         * einfo.ads: Minor reformatting (reorder entries).
2006         (No_Tagged_Streams_Pragma): New field.
2007         * exp_ch3.adb: Minor comment update.
2008         * opt.ads (No_Tagged_Streams): New variable.
2009         * par-prag.adb: Add dummy entry for pragma No_Tagged_Streams.
2010         * sem.ads (Save_No_Tagged_Streams): New field in scope record.
2011         * sem_attr.adb (Check_Stream_Attribute): Check stream ops
2012         prohibited by No_Tagged_Streams.
2013         * sem_ch3.adb (Analyze_Full_Type_Declaration): Set
2014         No_Tagged_Streams_Pragma.
2015         (Analyze_Subtype_Declaration): ditto.
2016         (Build_Derived_Record_Type): ditto.
2017         (Record_Type_Declaration): ditto.
2018         * sem_ch8.adb (Pop_Scope): Restore No_Tagged_Streams.
2019         (Push_Scope): Save No_Tagged_Streams.
2020         * sem_prag.adb (Analyze_Pragma, case No_Tagged_Streams): Implement new
2021         pragma.
2023 2014-10-20  Robert Dewar  <dewar@adacore.com>
2025         * sem_ch3.adb, prj-proc.adb, sem_ch4.adb, prj-env.adb, lib.ads,
2026         sem_ch13.adb: Minor reformatting.
2028 2014-10-20  Javier Miranda  <miranda@adacore.com>
2030         * exp_ch3.adb (Expand_N_Object_Declaration): Expand the
2031         declaration of a class-wide limited object containing an
2032         initializing expression into a renaming declaration.  Required to
2033         avoid passing such declaration to the backend and also to avoid
2034         generating an extra copy.
2036 2014-10-20  Eric Botcazou  <ebotcazou@adacore.com>
2038         * inline.adb (List_Inlining_Info): Minor tweaks.
2039         (Add_Inlined_Body): Inline the enclosing package
2040         if it is not internally generated, even if it doesn't come
2041         from source.
2043 2014-10-20  Ed Schonberg  <schonberg@adacore.com>
2045         * sem_ch4.adb (Process_Function_Call): If the first actual
2046         denotes a discrete type, the mode must be interpreted as a slice
2047         of an array returned by a parameterless call.
2049 2014-10-20  Vasiliy Fofanov  <fofanov@adacore.com>
2051         * prj-env.ads, prj-env.adb (Get_Runtime_Path): No longer inhibit
2052         searching for runtime referenced by a simple name on a project path.
2054 2014-10-20  Olivier Hainque  <hainque@adacore.com>
2056         * vxworks-x86-link.spec: New file.
2057         * system-vxworks-x86.ads: Add pragma Linker_Options to link with
2058         vxworks-x86-link.spec.
2060 2014-10-20  Vincent Celier  <celier@adacore.com>
2062         * opt.ads (Origin_Of_Target): New type.
2063         (Target_Origin): New variable.
2064         * prj-conf.adb (Parse_Project_And_Apply_Config): Record
2065         Target_Value and Target_Origin.  If target was not specified
2066         on the command line with --target=, check if attribute Target
2067         is declared in the main project. If it is and it is not the
2068         native target, parse again the projects so that 'Target get
2069         the new value. Fail if the target has changed again.  Invoke
2070         Process_Project_And_Apply_Config with Do_Phase_1 set to False
2071         is Process_Project_Tree_Phase_1 has already been invoked.
2072         * prj-conf.ads (Process_Project_And_Apply_Config): New Boolean
2073         parameter Do_Phase_1, defaulted to True.
2074         * prj-proc.adb (Expression): Check the special values and
2075         defaults for attribute Target.
2077 2014-10-20  Ed Schonberg  <schonberg@adacore.com>
2079         * sem_ch3.adb (Handle_Late_Controlled_Primitive): Do not analyze
2080         the subprogram spec of the body in full, because it will be
2081         reanalyzed when the declaration itself is analyzed;  otherwise. a
2082         formal may end up duplicated in the list of formals leading to
2083         spurious conformance errors with an existing declaration.
2085 2014-10-20  Ed Schonberg  <schonberg@adacore.com>
2087         * sem_ch13.adb: Improve error recovery on illegal aspect.
2089 2014-10-20  Arnaud Charlet  <charlet@adacore.com>
2091         * set_targ.adb (Write_Target_Dependent_Values, Write_Line):
2092         Fix calling C APIs with no trailing NUL char by calling better
2093         wrappers instead.
2095 2014-10-20  Tristan Gingold  <gingold@adacore.com>
2097         * gnat_ugn.texi: Document that gdb users must be in group
2098         _developer on mac os.
2100 2014-10-20  Arnaud Charlet  <charlet@adacore.com>
2102         * a-tgdico.ads: Fix typo.
2104 2014-10-20  Ed Schonberg  <schonberg@adacore.com>
2106         * exp_aggr.adb (Convert_To_Assignments): Do not create a
2107         transient scope for a component whose type requires it, if the
2108         context is an initialization procedure, because the target of
2109         the assignment must be visible outside of the block.
2111 2014-10-20  Tristan Gingold  <gingold@adacore.com>
2113         * tracebak.c: Define PC_ADJUST for arm-darwin.
2114         * env.c: Remove darwin specific code.
2115         * raise-gcc.c (__gnat_Unwind_ForcedUnwind): Error on arm-darwin.
2117 2014-10-20  Ed Schonberg  <schonberg@adacore.com>
2119         * sem_ch3.adb (Analyze_Full_Type_Declaration): If previous view
2120         is incomplete rather than private, and full type declaration
2121         has aspects, analyze aspects on the full view rather than
2122         the incomplete view, to prevent freezing anomalies with the
2123         class-wide type.
2125 2014-10-17  Robert Dewar  <dewar@adacore.com>
2127         * exp_ch9.adb (Expand_N_Task_Body): Add defense against
2128         previous errors.
2129         * freeze.adb (Freeze_Entity): Add defense against checking null
2130         scope for generic.
2131         * restrict.adb (Tasking_Allowed): Add test for No_Run_Time mode.
2132         * sem_ch13.adb (Freeze_Entity_Checks): Add defense against
2133         previous errors.
2134         * sem_ch9.adb (Analyze_Task_Type_Declaration): Give error if
2135         in No_Run_Time mode.
2137 2014-10-17  Robert Dewar  <dewar@adacore.com>
2139         * prj-makr.adb: Minor reformatting.
2141 2014-10-17  Robert Dewar  <dewar@adacore.com>
2143         * gnatcmd.adb, make.adb, prj-part.adb, gnatlink.adb, prj-nmsc.adb,
2144         prj-conf.adb, prj-env.adb: Use Is_Directory_Separator where possible.
2146 2014-10-17  Ed Schonberg  <schonberg@adacore.com>
2148         * exp_prag.adb (Undo_Initialization): If Initialize_Scalars
2149         is enabled, code will be generated for some composite types
2150         to initialize an object after its declaration. If there is
2151         a subsequent Import pragma for the object, that code must be
2152         removed as specified byw the semantics of the pragma, and to
2153         prevent out-of-order elaboration issues in the back-end.
2155 2014-10-17  Hristian Kirtchev  <kirtchev@adacore.com>
2157         * exp_ch4.adb (Expand_N_Op_Concat): Keep concatenation operator
2158         wrapping mechanism under debug flag -gnatd.h.
2159         * debug.adb: Claim debug switch -gnatd.h.
2161 2014-10-17  Doug Rupp  <rupp@adacore.com>
2163         * gcc-interface/Makefile.in: Enable the socket runtime bits
2164         for Android.
2166 2014-10-17  Ed Schonberg  <schonberg@adacore.com>
2168         * sem_ch13.adb (Add_Invariants, Replace_Type_References): Do
2169         not perform the replacement on the expression for an inherited
2170         class-wide invariant if in ASIS_Mode and the type reference is
2171         already the prefix of a 'Class attribute reference: the expression
2172         has already been preanalyzed and the replacement performed when
2173         first encountered on the declaration of the parent type.
2175 2014-10-17  Robert Dewar  <dewar@adacore.com>
2177         * sem_ch5.adb, sem_ch7.adb, prj-nmsc.adb, sem_ch13.adb, exp_ch3.adb:
2178         Minor reformatting.
2180 2014-10-17  Ed Schonberg  <schonberg@adacore.com>
2182         * exp_ch3.adb (Build_Component_Invariant_Call): Retrieve Invariant
2183         subprogram from base type.
2184         * sem_ch7.adb (Analyze_Package_Specification): Build invariant
2185         subprogram for private type, not any of its subtypes.
2186         * sem_ch13.adb (Build_Invariant_Procedure_Declaration): Set type
2187         of procedure entity, because a call to it may be generated in
2188         a client unit before the corresponding subprogram declaration
2189         is analyzed.
2191 2014-10-17  Vincent Celier  <celier@adacore.com>
2193         * prj-nmsc.adb (Get_Directories): Do not create directories
2194         when a project is abstract.
2196 2014-10-17  Ed Schonberg  <schonberg@adacore.com>
2198         * sem_ch5.adb (Analyze_Iterator_Specification): If the domain
2199         of iteration is given by an expression that is not an array type,
2200         verify that its type implements an iterator iterface.
2202 2014-10-17  Robert Dewar  <dewar@adacore.com>
2204         * sem_attr.adb (Eval_Attribute): Ensure that attribute
2205         reference is not marked as being a static expression if the
2206         prefix evaluation raises CE.
2208 2014-10-17  Robert Dewar  <dewar@adacore.com>
2210         * exp_pakd.adb: Move bit packed entity tables to spec.
2211         * exp_pakd.ads: Move bit packed entity tables here from body.
2212         * freeze.adb (Freeze_Array_Type): Check that packed array type
2213         is supported.
2214         * rtsfind.adb (PRE_Id_Table): New table (Entity_Not_Defined):
2215         Specialize messages using PRE_Id_Table.
2216         * uintp.ads, uintp.adb (UI_Image): New functional form.
2218 2014-10-17  Robert Dewar  <dewar@adacore.com>
2220         * aspects.ads, aspects.adb: Add Suppress_Initialization aspect.
2221         * einfo.ads, einfo.adb (Suppress_Initialization): Now applies to
2222         E_Variable.
2223         * exp_ch3.adb (Default_Initialize_Object): Handle
2224         Suppress_Initialization.
2225         * exp_prag.adb (Expand_Pragma_Suppress_Initialization): New
2226         procedure (Expand_N_Pragma): Handle Suppress_Initialization
2227         (Expand_Pragma_Import_Or_Interface): Use Undo_Initialization
2228         (Undo_Initialization): New procedure.
2229         * sem_prag.adb (Analyze_Pragma, case Suppress_Initialization):
2230         This is now allowed for E_Variable case.
2231         * gnat_rm.texi: Document new aspect Suppress_Initialization
2232         Suppress_Initialization aspect/pragma can apply to variable.
2233         * einfo.ads: Minor reformatting.
2235 2014-10-17  Arnaud Charlet  <charlet@adacore.com>
2237         * spark_xrefs.ads: Add documentation pointer to Flow_Computed_Globals.
2239 2014-10-17  Robert Dewar  <dewar@adacore.com>
2241         * cstand.adb (Create_Standard): Mark Short_Integer as
2242         implementation defined.
2243         * sem_util.adb (Set_Entity_With_Checks): Avoid blow up for
2244         compiler built with assertions for No_Implementation_Identifiers test.
2246 2014-10-17  Robert Dewar  <dewar@adacore.com>
2248         * aspects.ads: Documentation fix, aspect Lock_Free does have a
2249         corresponding pragma.
2250         * gnat_rm.texi: Document implementation defined boolean aspects
2251         as boolean.
2253 2014-10-17  Ed Schonberg  <schonberg@adacore.com>
2255         * sem_ch13.adb (Add_Invariants): For a class-wide type invariant,
2256         preserve semantic information on the invariant expression
2257         (typically a function call) because it may be inherited by a
2258         type extension in a different unit, and it cannot be resolved
2259         by visibility elsewhere because it may refer to local entities.
2261 2014-10-17  Robert Dewar  <dewar@adacore.com>
2263         * gnat_rm.texi: Document that string literal can be used for
2264         pragma Warnings when operating in Ada 83 mode.
2266 2014-10-17  Ed Schonberg  <schonberg@adacore.com>
2268         * freeze.adb (Find_Aggregate_Component_Desig_Type): New
2269         subsidiary function to Freeze_ Expression, used to determine
2270         whether an aggregate for an array of access types also freezes the
2271         designated type, when some aggregate components are allocators.
2273 2014-10-17  Ed Schonberg  <schonberg@adacore.com>
2275         * a-strsea.adb (Find_Token): AI05-031 indicates that the
2276         procedure must raise Index_Error when Source is not empty and
2277         the From parameter is not within the range of the Source string.
2279 2014-10-17  Robert Dewar  <dewar@adacore.com>
2281         * sem_prag.adb (Is_Static_String_Expression): Allow string
2282         literal in Ada 83 mode.
2284 2014-10-17  Vincent Celier  <celier@adacore.com>
2286         * prj-conf.adb (Get_Config_Switches): In CodePeer mode, do
2287         not take into account any compiler command from package IDE.
2289 2014-10-17  Ed Schonberg  <schonberg@adacore.com>
2291         * sem_ch12.adb (Build_Function_Wrapper): The formals of the
2292         wrapper must have the same identifiers as those of the formal
2293         subprogram, because calls within the generic may use named
2294         associations.
2296 2014-10-17  Robert Dewar  <dewar@adacore.com>
2298         * sem_ch3.adb, a-strsea.adb: Minor reformatting.
2299         * par-ch6.adb (P_Subprogram): Fix bad handling of null procedures.
2301 2014-10-17  Ed Schonberg  <schonberg@adacore.com>
2303         * sem_ch3.adb (Build_Derived_Enumeration_Type): Propagate aspect
2304         specfications from original type declaration to declaration of
2305         implicit base, because original node is rewritten as a subtype
2306         declaration on which type aspects do not belong.
2308 2014-10-17  Hristian Kirtchev  <kirtchev@adacore.com>
2310         * sem_ch3.adb (Propagate_Default_Init_Cond_Attributes): A derived type
2311         inherits the attributes related to pragma Default_Initial_Condition
2312         from its parent type.
2314 2014-10-17  Ed Schonberg  <schonberg@adacore.com>
2316         * a-strsea.adb (Index - versions with a From parameter):
2317         According to AI05-056, the Index functions with a From parameter
2318         return 0 if the source is an empty string.
2320 2014-10-17  Hristian Kirtchev  <kirtchev@adacore.com>
2322         * sem_prag.adb (Analyze_Refined_Depends_In_Decl_Part): Disable
2323         the consistency checks in ASIS mode.
2325 2014-10-17  Arnaud Charlet  <charlet@adacore.com>
2327         * s-expmod.ads: Minor typo fix.
2329 2014-10-17  Robert Dewar  <dewar@adacore.com>
2331         * sem_util.adb: Minor reformatting.
2333 2014-10-17  Ed Schonberg  <schonberg@adacore.com>
2335         * sem_ch12.adb (Build_Function_Wrapper): Build wrappers for
2336         actuals that are defaulted subprograms of the formal subprogram
2337         declaration.
2339 2014-10-17  Robert Dewar  <dewar@adacore.com>
2341         * exp_ch4.adb (Expand_N_Op_Eq): Make sure we deal with the
2342         implementation base type.
2343         * sinfo.ads: Add a note for N_Op_Eq and N_Op_Ne that record
2344         operands are always expanded out into component comparisons.
2346 2014-10-17  Robert Dewar  <dewar@adacore.com>
2348         * s-vallli.adb: Minor comment correction.
2349         * s-valuti.ads: Minor comment reformatting.
2351 2014-10-17  Robert Dewar  <dewar@adacore.com>
2353         * gnat_rm.texi: Document System.Atomic_Counters.
2354         * impunit.adb: Add System.Atomic_Counters (s-atocou.ads) to the
2355         list of user- accessible units added as children of System.
2356         * s-atocou.ads: Update comment.
2358 2014-10-17  Arnaud Charlet  <charlet@adacore.com>
2360         * s-expmod.ads: Add comments.
2362 2014-10-17  Hristian Kirtchev  <kirtchev@adacore.com>
2364         * sem_ch3.adb (Build_Derived_Record_Type): Remove the propagation
2365         of all attributes related to pragma Default_Initial_Condition.
2366         (Build_Derived_Type): Propagation of all attributes related
2367         to pragma Default_Initial_Condition.
2368         (Process_Full_View): Account for the case where the full view derives
2369         from another private type and propagate the attributes related
2370         to pragma Default_Initial_Condition to the private view.
2371         (Propagate_Default_Init_Cond_Attributes): New routine.
2372         * sem_util.adb: Alphabetize various routines.
2373         (Build_Default_Init_Cond_Call): Use an unchecked type conversion
2374         when calling the default initial condition procedure of a private type.
2375         (Build_Default_Init_Cond_Procedure_Declaration): Prevent
2376         the generation of multiple default initial condition procedures.
2378 2014-10-17  Robert Dewar  <dewar@adacore.com>
2380         * prj-conf.adb: Revert previous change.
2382 2014-10-17  Robert Dewar  <dewar@adacore.com>
2384         * lib-writ.ads, s-valdec.ads: Minor reformatting.
2386 2014-10-17  Ed Schonberg  <schonberg@adacore.com>
2388         * sem_ch12.adb: Additional work on function wrappers.
2390 2014-10-17  Eric Botcazou  <ebotcazou@adacore.com>
2392         * exp_util.adb (Possible_Bit_Aligned_Component): Also recurse
2393         on the renamed object of renamings.
2395 2014-10-17  Vincent Celier  <celier@adacore.com>
2397         * prj-conf.adb (Parse_Project_And_Apply_Config): In CodePeer
2398         mode, always use the native target.
2400 2014-10-16  Andrew MacLeod  <amacleod@redhat.com>
2402         * gcc-interface/misc.c: Adjust include files.
2404 2014-10-13  Eric Botcazou  <ebotcazou@adacore.com>
2405             Alan Modra  <amodra@gmail.com>
2407         PR ada/63225
2408         * uintp.adb (Vector_To_Uint): Move from here to...
2409         * uintp.ads (UI_Vector): Make public.
2410         (Vector_To_Uint): ...here.
2412 2014-10-10  Robert Dewar  <dewar@adacore.com>
2414         * freeze.adb, sem_attr.adb: Minor reformatting.
2416 2014-10-10  Johannes Kanig  <kanig@adacore.com>
2418         * a-cfdlli.ads, a-cfhama.ads, a-cfhase.ads, a-cforma.ads,
2419         a-cforse.ads, a-cofove.ads: add "Default_Initial_Condition"
2420         to container type.
2422 2014-10-10  Vincent Celier  <celier@adacore.com>
2424         * prj-conf.adb (Do_Autoconf): In Codepeer mode, do not try to get
2425         any configuration switches from the project file.
2427 2014-10-10  Ed Schonberg  <schonberg@adacore.com>
2429         * sem_ch12.adb (Build_Wrapper): Renamed as Build_Operator_Wrapper.
2430         (Build_Function_Wrapper): New function, to construct a wrapper
2431         function for actuals that are functions with an arbitrary
2432         number of parameters. Used in GNATProve mode to simplify proof
2433         propagation in instantiations.
2435 2014-10-10  Robert Dewar  <dewar@adacore.com>
2437         * freeze.adb, gnat1drv.adb, sem_ch13.adb: Minor reformatting and
2438         code clean up.
2440 2014-10-10  Hristian Kirtchev  <kirtchev@adacore.com>
2442         * sem_res.adb (Is_OK_Volatile_Context): Allow
2443         a volatile object reference to appear as the expression of a
2444         type conversion.
2446 2014-10-10  Ed Schonberg  <schonberg@adacore.com>
2448         * sem_ch13.adb (Analyze_Aspect_Specifications, Library_Unit_Aspects):
2449         Aspect specification is legal on a local instantiation of a
2450         library-level generic unit.
2452 2014-10-10  Gary Dismukes  <dismukes@adacore.com>
2454         * gnat1drv.adb (Adjust_Global_Switches): Set Front_End_Inlining
2455         if inlining has been enabled via -gnatn and the target is not GCC.
2457 2014-10-10  Ed Schonberg  <schonberg@adacore.com>
2459         * freeze.adb (Freeze_Entity): Freezing a subprogram does
2460         not always freeze its profile.  In particular, an attribute
2461         reference that takes the access type does not freeze the types
2462         of the formals.
2464 2014-10-10  Robert Dewar  <dewar@adacore.com>
2466         * errout.adb (Adjust_Name_Case): New procedure.
2467         (Set_Msg_Node): Use Adjust_Name_Case.
2468         * errout.ads (Adjust_Name_Case): New procedure.
2469         * exp_intr.adb (Add_Source_Info): Minor code reorganization
2470         (use Ekind_In).
2471         (Write_Entity_Name): Use Errout.Adjust_Name_Case.
2472         * sem_prag.adb (Is_Non_Significant_Pragma_Reference): Review
2473         and fix up entries in Sig_Flags, and correct logical errors in
2474         function itself.
2475         * sprint.adb (Sprint_Node_Actual): Properly print string for
2476         raise statement.
2478 2014-10-10  Ed Schonberg  <schonberg@adacore.com>
2480         * sem_ch3.adb (Analyze_Object_Declaration): For an object of an
2481         anonymous array type with delayed aspects, defer freezing of
2482         type until object itself is frozen.
2483         * freeze.adb (Freeze_Entity): When freezing an object of an
2484         anonymous array type with delayed aspects, remove freeze node of
2485         object after freezing type, to prevent out-of-order elaboration
2486         in the back-end. The initialization call for the object has
2487         already been constructed when expanding the object declaration.
2489 2014-10-10  Robert Dewar  <dewar@adacore.com>
2491         * exp_intr.adb (Write_Entity_Name): Moved to outer level
2492         (Write_Entity_Name): Properly handle operator names
2493         (Expand_Source_Info): New procedure.
2494         * exp_intr.ads (Add_Source_Info): New procedure.
2496 2014-10-10  Robert Dewar  <dewar@adacore.com>
2498         * butil.ads: Minor reformatting.
2499         * sem_ch5.adb: Code clean up.
2501 2014-10-10  Robert Dewar  <dewar@adacore.com>
2503         * exp_ch11.adb (Expand_N_Raise_Statement): Handle
2504         Prefix_Exception_Messages.
2505         * opt.adb: Handle new flags Prefix_Exception_Message[_Config].
2506         * opt.ads: New flags Prefix_Exception_Message[_Config].
2507         * par-prag.adb: New dummy entry for pragma Prefix_Exception_Messages.
2508         * snames.ads-tmpl: Add entries for new pragma Prefix_Exception_Messages.
2509         * sem_prag.adb: Implement new pragma Prefix_Exception_Messages
2510         * gnat_rm.texi: Document pragma Prefix_Exception_Messages.
2512 2014-10-10  Gary Dismukes  <dismukes@adacore.com>
2514         * sinfo.ads, gnat_ugn.texi, a-except.adb, a-except-2005.adb,
2515         raise-gcc.c Spelling changes (prolog => prologue, epilog => epilogue).
2517 2014-10-10  Ed Schonberg  <schonberg@adacore.com>
2519         * sem_ch5.adb (Is_Wrapped_In_Block): Handle properly blocks that
2520         contain pragmas generated for loop invariants and type predicates.
2521         Clarify use of this subprogram.
2523 2014-10-10  Yannick Moy  <moy@adacore.com>
2525         * sem_prag.adb (Analyze_Global_Item): Accept formal objects in Global
2526         contracts.
2527         * errout.adb, errout.ads (SPARK_Msg_NE): Issue error unless
2528         SPARK_Mode is Off.
2530 2014-10-10  Vadim Godunko  <godunko@adacore.com>
2532         * a-stwima.adb (To_Sequence): Compute size of result array.
2534 2014-10-10  Javier Miranda  <miranda@adacore.com>
2536         * gnat_ugn.texi (Interfacing with C++ at the Class Level): Update the
2537         sources of the example to avoid a warning when the Ada files are
2538         automatically generated by the binding generator.
2540 2014-10-10  Ed Schonberg  <schonberg@adacore.com>
2542         * sem_attr.adb (Resolve_Attribute, case 'Update): Set
2543         Do_Range_Check on the expression of a record component
2544         association when needed, as is done for array components, when
2545         the corresponding type is a scalar type.
2547 2014-10-10  Gary Dismukes  <dismukes@adacore.com>
2549         * a-coinho-shared.adb: Minor typo fix.
2550         * prj-env.ads: Minor reformatting.
2552 2014-10-10  Hristian Kirtchev  <kirtchev@adacore.com>
2554         * sem_res.adb (Resolve_String_Literal): Do not
2555         generate a string literal subtype for the default expression of
2556         a formal parameter in GNATprove mode.
2558 2014-10-10  Yannick Moy  <moy@adacore.com>
2560         * errout.adb (SPARK_Msg_N): Issue error unless SPARK_Mode is Off.
2562 2014-10-10  Ed Schonberg  <schonberg@adacore.com>
2564         * exp_ch5.adb (Expand_Formal_Container_Element_Loop): Analyze
2565         declaration for loop parameter before rest of loop, and set
2566         entity kind to prevent assignments to it in the user code.
2567         * sem_ch3.adb (Analyze_Object_Contract): No contracts apply to the
2568         loop parameter in an element iteration over o formal container.
2570 2014-10-10  Robert Dewar  <dewar@adacore.com>
2572         * gnat_ugn.texi: Document use of user-level routines to handle
2573         e.g. col major arrays.
2575 2014-10-10  Doug Rupp  <rupp@adacore.com>
2577         * s-osinte-android.adb: Fix misspelling.
2578         * gsocket.h: Tweak the Android quirks.
2580 2014-10-10  Robert Dewar  <dewar@adacore.com>
2582         * errout.ads (SPARK_Msg_N): Fix spec to match change in body.
2584 2014-10-10  Robert Dewar  <dewar@adacore.com>
2586         * sem_ch13.adb: Minor code reorganization.
2588 2014-10-10  Pat Rogers  <rogers@adacore.com>
2590         * gnat_rm.texi: Text now indicates pragma No_Run_Time is not
2591         for users.
2593 2014-10-10  Vadim Godunko  <godunko@adacore.com>
2595         * a-coinho-shared.adb: Add minor comment.
2596         * a-stzmap.adb (To_Sequence): Compute size of result array.
2598 2014-10-10  Javier Miranda  <miranda@adacore.com>
2600         * exp_ch3.adb (Build_Init_Procedure): Complete the condition of an
2601         if-stmt to match its current documentation.
2603 2014-10-10  Robert Dewar  <dewar@adacore.com>
2605         * sem_ch7.adb, einfo.adb, einfo.ads, sem_prag.adb, sem_ch12.adb,
2606         freeze.adb, sem_util.adb, sem_res.adb, exp_ch6.adb, exp_ch13.adb,
2607         sem_ch6.adb, sem_cat.adb, sem_disp.adb
2608         (Is_Subprogram_Or_Generic_Subprogram): New primitive. Use this primitive
2609         throughout where appropriate.
2611 2014-10-10  Bob Duff  <duff@adacore.com>
2613         * a-coinho-shared.ads: Minor reformatting.
2614         * s-traceb.adb: Minor clean up.
2616 2014-10-10  Robert Dewar  <dewar@adacore.com>
2618         * ali.adb (Scan_ALI): Read and process new GP flag on ALI P line.
2619         * ali.ads (GNATprove_Mode): New component in ALI table.
2620         (GNATprove_Mode_Specified): New global.
2621         * gnatbind.adb (Gnatbind): Give fatal error if any file compiled
2622         in GNATProve mode.
2623         * lib-writ.ads, lib-writ.adb (GP): New flag on P line for
2624         GNATProve_Mode.
2626 2014-10-10  Javier Miranda  <miranda@adacore.com>
2628         * exp_ch3.adb (Build_Init_Procedure): Adding assertion.
2629         (Build_Init_Statement): Ensure that statements
2630         associated with the parent components are located at the beginning
2631         of the returned list of statements.
2633 2014-10-10  Ed Schonberg  <schonberg@adacore.com>
2635         * sem_ch13.adb (Inherit_Aspects_At_Freeze_Node): If the full
2636         view of a private type T that has a type invariant is a scalar
2637         or constrained array type, the base type created for the full
2638         view has the same type invariant.
2640 2014-10-10  Robert Dewar  <dewar@adacore.com>
2642         * exp_util.ads, sem_ch12.adb, exp_util.adb, i-fortra.ads: Minor code
2643         reorganization.
2645 2014-09-22  Eric Botcazou  <ebotcazou@adacore.com>
2647         * gcc-interface/decl.c (gnat_to_gnu_entity): Adjust comment.
2648         * gcc-interface/utils.c (gnat_write_global_declarations): Fix typo.
2650 2014-09-15  Jakub Jelinek  <jakub@redhat.com>
2652         * gcc-interface/Make-lang.in (check_acats_numbers0,
2653         check_acats_numbers1, check_acats_numbers2, check_acats_numbers3,
2654         check_acats_numbers4, check_acats_numbers5, check_acats_numbers6,
2655         check_acats_numbers, check_acats_subdirs): New variables.
2656         (check_acats_targets): Use $(check_acats_subdirs).
2657         (check-acats, check-acats%): Rewritten so that for parallelized
2658         testing each job runs all the chapters files, with
2659         GCC_RUNTEST_PARALLELIZE_DIR set in environment.  Prepare the support
2660         directory sequentially and share it.
2661         (check-acats-subtargets): Always print just check-acats.
2663 2014-08-25  Martin Liska  <mliska@suse.cz>
2665         * gcc-interface/utils.c (rest_of_subprog_body_compilation): Adjust to
2666         new cgraph interface.
2667         (gnat_write_global_declarations): Likewise.
2669 2014-08-13  Sylvestre Ledru  <sylvestre@debian.org>
2671         * 9drpc.adb: Fix a typo
2672         * s-interr.ads: Likewise
2673         * s-taskin.ads: Likewise
2674         * s-traces.ads: Likewise
2675         * sysdep.c: Likewise
2677 2014-08-12  Joel Sherrill <joel.sherrill@oarcorp.com>
2679         * socket.c: For RTEMS, use correct prototype of gethostbyname_r().
2680         * gsocket.h Add include of <unistd.h> on RTEMS.
2682 2014-08-11  Joel Sherrill <joel.sherrill@oarcorp.com>
2684         * s-osinte-rtems.adb: Correct formatting of line in license block.
2686 2014-08-04  Claire Dross  <dross@adacore.com>
2688         * exp_util.adb (Get_First_Parent_With_Ext_Axioms_For_Entity):
2689         For an instance, look at the scope before the generic parent.
2691 2014-08-04  Yannick Moy  <moy@adacore.com>
2693         * lib-writ.ads: Update comments.
2694         * sem_disp.ads, sem_disp.adb (Inherited_Subprograms): Add
2695         parameters to filter inherited subprograms.
2697 2014-08-04  Robert Dewar  <dewar@adacore.com>
2699         * gnat_rm.texi: Add section on use of address clause for memory
2700         mapped I/O.
2702 2014-08-04  Ed Schonberg  <schonberg@adacore.com>
2704         * sem_ch3.adb (Analyze_Subtype_Declaration): A subtype, in
2705         particular the subtype created for a generic actual, inherits
2706         invariant information from the base type.
2708 2014-08-04  Robert Dewar  <dewar@adacore.com>
2710         * aspects.ads, aspects.adb: Add entries for aspect Obsolescent.
2711         * gnat_rm.texi: Add documentation for aspect Obsolescent.
2712         * sem_ch13.adb (Analyze_Aspect_Specifications): Implement aspect
2713         Obsolescent.
2714         (Check_Aspect_At_Freeze_Point): Add dummy entry for pragma Obsolescent.
2715         * s-osprim-mingw.adb: Minor reformatting.
2716         * sem_res.adb (Is_Atomic_Ref_With_Address): New function
2717         (Resolve_Indexed_Component): Rework warnings for non-atomic access
2718         (Resolve_Selected_Component): Add warnings for non-atomic access.
2720 2014-08-04  Doug Rupp  <rupp@adacore.com>
2722         * g-calend.adb (timeval_to_duration, duration_to_timeval): Change sec
2723         formal to long_long.
2724         * g-calend.ads (timeval): Bump up size to accomodate sec type.
2725         * s-taprop-linux.adb (timeval_to_duration): Change sec formal to
2726         long_long
2727         * s-osprim-posix.adb (timeval): Bump up size to accomodate
2728         new sec type.
2729         (timeval_to_duration): Change sec formal to Long_Long_Integer
2730         * s-osinte-darwin.adb (timeval): Bump up
2731         size to accomodate new sec type.
2732         (timeval_to_duration): Change sec formal to long_long
2733         * s-osinte-android.adb: Likewise.
2734         * cal.c (__gnat_timeal_to_duration, __gnat_duration_to_timeval): Change
2735         sec formal from long to long long.
2737 2014-08-04  Robert Dewar  <dewar@adacore.com>
2739         * sem_res.adb (Resolve_Qualified_Expression): Make sure
2740         Do_Range_Check flag gets set.
2742 2014-08-04  Robert Dewar  <dewar@adacore.com>
2744         * einfo.ads, einfo.adb (Is_Standard_String_Type): New function.
2745         * exp_ch3.adb (Build_Array_Init_Proc): Use
2746         Is_Standard_String_Type.
2747         (Expand_Freeze_Array_Type): ditto.
2748         (Get_Simple_Init_Val): ditto.
2749         (Needs_Simple_Initialization): ditto.
2750         * sem_eval.adb (Eval_String_Literal): Use Is_Standard_String_Type.
2751         * sem_warn.adb (Is_Suspicious_Type): Use Is_Standard_String_Type.
2753 2014-08-04  Pascal Obry  <obry@adacore.com>
2755         * adaint.c (__gnat_try_lock): Use _tcscpy and _tcscat instead of
2756         _stprintf which insert garbage into the wfull_path buffer.
2758 2014-08-04  Arnaud Charlet  <charlet@adacore.com>
2760         * cal.c: Remove old VMS/nucleus code. Remove obsolete vxworks
2761         code.
2762         * fe.h: Minor reformatting.
2764 2014-08-04  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
2766         * cstreams.c: (_LARGEFILE_SOURCE): Guard definition.
2768 2014-08-04  Robert Dewar  <dewar@adacore.com>
2770         * par-ch13.adb (Get_Aspect_Specifications): Improve error
2771         recovery, fixing a -gnatQ bomb.
2773 2014-08-04  Yannick Moy  <moy@adacore.com>
2775         * sem_ch3.adb (Analyze_Object_Declaration): In GNATprove mode,
2776         do not generate two Itypes with the same name for an array
2777         definition.
2778         * sinfo.ads: Expand doc on GNATprove mode.
2780 2014-08-04  Hristian Kirtchev  <kirtchev@adacore.com>
2782         * exp_ch3.adb (Expand_Freeze_Record_Type): Set the finalization
2783         master and storage pool attributes on the root type of an
2784         anonymous access type.
2785         * exp_ch4.adb (Expand_N_Allocator): Set the finalization master
2786         and storage pool attributes on the root type of an anonymous
2787         access type.
2789 2014-08-04  Arnaud Charlet  <charlet@adacore.com>
2791         * exp_ch3.adb: Minor reformatting.
2792         * tb-alvms.c, tb-alvxw.c, tb-ivms.c: Removed.
2793         * tracebak.c: Remove use of above files.
2794         * gcc-interface/Makefile.in: Update dependencies.
2796 2014-08-04  Pierre-Marie Derodat  <derodat@adacore.com>
2798         * gcc-interface/utils.c (gnat_set_type_context): Also set the
2799         context for parallel types' TYPE_STUB_DECL.  Do not change
2800         anything if the context is already set for them.
2801         (gnat_pushdecl): Update the comment for calls to
2802         gnat_set_type_context to mention parallel types.
2803         (add_parallel_type): When adding a context-less parallel type to
2804         a type that has a context, propagate the context from the latter
2805         type to the former.
2806         (process_deferred_decl_context): Call gnat_set_type_context
2807         rather than manually setting the type context.
2808         (build_unc_object_type): Call gnat_set_type_context on the
2809         template type.
2811 2014-08-04  Ed Schonberg  <schonberg@adacore.com>
2813         * exp_ch5.adb (Expand_N_Case_Statement): If a choice is a
2814         subtype indication and the case statement has only two choices,
2815         replace subtype indication with its range, because the resulting
2816         membership test cannot have a subtype indication as an operand.
2818 2014-08-04  Arnaud Charlet  <charlet@adacore.com>
2820         * exp_ch3.adb: Update comments, minor reformatting.
2822 2014-08-04  Hristian Kirtchev  <kirtchev@adacore.com>
2824         * sem_ch3.adb (Analyze_Declarations): Explain why the bodies of
2825         the default initial condition procedures are build here.
2826         * sem_util.adb (Build_Default_Init_Cond_Procedure): Wrap the
2827         analyzed argument of pragma Default_Initial_Condition in some
2828         dummy code as GNATprove mode disables assertions, but still
2829         needs to see the argument.
2831 2014-08-04  Robert Dewar  <dewar@adacore.com>
2833         * exp_ch6.adb, sem_util.adb: Minor reformatting.
2835 2014-08-04  Olivier Hainque  <hainque@adacore.com>
2837         * a-comutr.ads: Set Root_Node_Type'Alignment to
2838         Standard'Maximum_Alignment, so that it is at least as large as
2839         the max default for Tree_Node_Type'Alignment.
2841 2014-08-04  Hristian Kirtchev  <kirtchev@adacore.com>
2843         * exp_ch3.adb (Freeze_Type): Remove the generation and inheritance
2844         of the default initial condition procedure [body].
2845         * sem_ch3.adb (Analyze_Declarations): Create the bodies of
2846         all default initial condition procedures at the end of private
2847         declaration analysis.
2848         * sem_util.adb (Build_Default_Init_Cond_Procedure_Bodies): New
2849         routine.
2850         (Build_Default_Init_Cond_Procedure_Body): Merged in the
2851         processing of routine Build_Default_Init_Cond_Procedure_Bodies.
2852         * sem_util.ads (Build_Default_Init_Cond_Procedure_Bodies):
2853         New routine.
2854         (Build_Default_Init_Cond_Procedure_Body): Removed.
2856 2014-08-04  Ed Schonberg  <schonberg@adacore.com>
2858         * sem_elab.adb (Check_Elab_Call): Do not check a call to a
2859         postcondtion.
2860         * exp_ch6.adb (Expand_Call): Clarify handling of inserted
2861         postcondition call.
2863 2014-08-04  Hristian Kirtchev  <kirtchev@adacore.com>
2865         * sem_prag.adb (Analyze_Pragma): Ensure that an
2866         internally generated spec for a stand alone body is recognized
2867         as a proper context for pragma SPARK_Mode.
2869 2014-08-04  Robert Dewar  <dewar@adacore.com>
2871         * erroutc.adb (Delete_Msg): Do not decrement Warnings_Treated_As_Errors.
2873 2014-08-04  Arnaud Charlet  <charlet@adacore.com>
2875         * adabkend.adb (Scan_Back_End_Switches): Ignore extra -o
2876         when -gnatO has already been specified, for compatibility
2877         with gcc driver.
2878         (Scan_Compiler_Args): Do not call Set_Output_Object_File_Name in
2879         codepeer mode.
2880         * g-expect.ads: Fix typo.
2882 2014-08-04  Thomas Quinot  <quinot@adacore.com>
2884         * exp_ch4.adb (Insert_Dereference_Action): the actual Size
2885         must account for the bounds template if the designated type is
2886         an unconstrained array.
2888 2014-08-04  Hristian Kirtchev  <kirtchev@adacore.com>
2890         * a-cfhama.adb, a-cfhase.adb, a-cforma.adb, a-cforse.adb Add
2891         SPARK_Mode in the body.
2892         * sem_ch7.adb (Analyze_Package_Body_Helper): Restore the original
2893         way to verify the consistency of SPARK_Mode between a spec and
2894         a body.
2895         * sem_ch12.adb (Analyze_Package_Instantiation): Remove the call
2896         to Set_Ignore_Pragma_SPARK_Mode. Set flag Ignore_Pragma_SPARK_Mode
2897         manually.
2898         (Analyze_Subprogram_Instantiation): Remove the call to
2899         Set_Ignore_Pragma_SPARK_Mode. Set flag Ignore_Pragma_SPARK_Mode
2900         manually.
2901         * sem_prag.adb (Analyze_Pragma): Remove local variable
2902         Inst_Id. SPARK_Mode can no longer be applied to a package or
2903         subprogram instantiation.
2904         * sem_util.adb, sem_util.ads (Set_Ignore_Pragma_SPARK_Mode):
2905         Removed.
2907 2014-08-04  Robert Dewar  <dewar@adacore.com>
2909         * sem_prag.adb, osint.adb, osint.ads: Minor reformatting.
2911 2014-08-04  Yannick Moy  <moy@adacore.com>
2913         * sem_ch3.adb (Derive_Type_Declaration,
2914         Process_Discriminants): Remove SPARK-specific legality checks.
2916 2014-08-04  Thomas Quinot  <quinot@adacore.com>
2918         * g-sechas.ads, g-sechas.adb (HMAC_Initial_Context): New subprogram.
2919         * gnat_rm.texi (GNAT.MD5/SHA1/SHA224/SHA256/SHA512): Document support
2920         for HMAC.
2922 2014-08-04  Hristian Kirtchev  <kirtchev@adacore.com>
2924         * sem_ch7.adb (Analyze_Package_Body_Helper): When verifying the
2925         compatibility of SPARK_Mode between a spec and a body, use the
2926         SPARK_Mode of the public part.
2927         * sem_ch12.adb (Analyze_Generic_Subprogram_Declaration): Use
2928         the already available routine to exchange the aspects between
2929         the template and its copy. Analyze the aspects of copy to
2930         ensure that the corresponding pragmas perform their semantic
2931         effects.  The partial analysis of aspects is no longer needed.
2932         (Analyze_Package_Instantiation): Save and restore the SPARK_Mode
2933         of the context.
2934         (Analyze_Subprogram_Instantiation): Save and restore the SPARK_Mode of
2935         the context.
2936         * sem_prag.adb (Analyze_Pragma): Do not bypass a subprogram
2937         instantiation which does not come from source.
2939 2014-08-04  Hristian Kirtchev  <kirtchev@adacore.com>
2941         * a-cfhama.ads, a-cfhase.ads, a-cforma.ads, a-cforse.ads Add
2942         SPARK_Mode pragmas to the public and private part of the unit.
2943         * sem_ch3.adb (Derive_Type_Declaration): Ensure that a derived
2944         type cannot have discriminants if the parent type already has
2945         discriminants.
2946         (Process_Discriminants): Ensure that the type of a discriminant is
2947         discrete.
2948         * sem_ch6.adb (Analyze_Subprogram_Body_Helper): The check on
2949         SPARK_Mode compatibility between a spec and a body can now be
2950         safely performed while processing a generic.
2951         * sem_ch7.adb (Analyze_Package_Body_Helper): The check on
2952         SPARK_Mode compatibility between a spec and a body can now be
2953         safely performed while processing a generic.
2954         * sem_prag.adb (Analyze_Pragma): Pragma SPARK_Mode can now be
2955         safely analyzed when processing a generic.
2957 2014-08-04  Nicolas Roche  <roche@adacore.com>
2959         * g-dirope.adb: Minor reformating.
2961 2014-08-04  Robert Dewar  <dewar@adacore.com>
2963         * sem_ch6.adb: Minor reformatting.
2965 2014-08-04  Ed Schonberg  <schonberg@adacore.com>
2967         * sem_prag.adb (Analyze_Pragma, case Assert and related pragmas):
2968         Before normalizing these pragmas into a pragma Check, preanalyze
2969         the optional Message argument, (which is subsequently copied)
2970         so that it has the proper semantic information for ASIS use.
2971         * sem_case.adb: Initialize flag earlier.
2972         * osint.adb, osint.ads (Find_File): Add parameter Full_Name, used when
2973         the full source path of a configuration file is requested.
2974         (Read_Source_File): Use Full_Name parameter..
2976 2014-08-04  Hristian Kirtchev  <kirtchev@adacore.com>
2978         * opt.ads Alphabetize various global flags. New flag
2979         Ignore_Pragma_SPARK_Mode along with a comment on usage.
2980         * sem_ch6.adb (Analyze_Generic_Subprogram_Body):
2981         Pragma SPARK_Mode is now allowed in generic units.
2982         (Analyze_Subprogram_Body_Helper): Do not verify the compatibility
2983         between the SPARK_Mode of a spec and that of a body when inside
2984         a generic.
2985         * sem_ch7.adb (Analyze_Package_Body_Helper): Do not verify the
2986         compatibility between the SPARK_Mode of a spec and that of a
2987         body when inside a generic.
2988         * sem_ch12.adb (Analyze_Generic_Subprogram_Declaration):
2989         Pragma SPARK_Mode is now allowed in generic units.
2990         (Analyze_Package_Instantiation): Save and restore the value of
2991         flag Ignore_ Pragma_SPARK_Mode in a stack-like fasion. Set
2992         the governing SPARK_Mode before analyzing the instance.
2993         (Analyze_Subprogram_Instantiation): Save and restore the value
2994         of flag Ignore_ Pragma_SPARK_Mode in a stack-like fasion. Set
2995         the governing SPARK_Mode before analyzing the instance.
2996         * sem_ch13.adb (Analyze_Aspect_Specifications): Emulate the
2997         placement of a source pragma when inserting the generated pragma
2998         for aspect SPARK_Mode.
2999         * sem_prag.adb (Analyze_Pragma): Reimplement the handling of
3000         pragma SPARK_Mode to allow for generics and their respective
3001         instantiations.
3002         * sem_util.ads, sem_util.adb (Check_SPARK_Mode_In_Generic): Removed.
3003         (Set_Ignore_Pragma_SPARK_Mode): New routine.
3005 2014-08-04  Eric Botcazou  <ebotcazou@adacore.com>
3007         * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Component>: Deal with
3008         renaming discriminants in tagged types first.
3009         * gcc-interface/trans.c (gnat_to_gnu) <N_Selected_Component>: Test
3010         the underlying type of the prefix.
3011         (Pragma_to_gnu, case Pragma_Warning): Ignore Reason => "..."
3012         (process_freeze_entity): Reset the nodes of all the view of a type,
3013         if any.
3015 2014-08-04  Doug Rupp  <rupp@adacore.com>
3016             Olivier Hainque  <hainque@adacore.com>
3018         * gcc-interface/Makefile.in (x86 VxWorks): Add filter-out for vxworks7
3019         and remove incorrect EH_MECHANISM macros.
3020         Add sigtramp.h to EXTRA_LIBGNAT_SRCS when we add sigtramp-vxworks.o to
3021         EXTRA_LIBGNAT_OBJS.
3023 2014-08-04  Robert Dewar  <dewar@adacore.com>
3025         * exp_attr.adb (Expand_N_Attribute_Reference): Make sure prefix
3026         of constructed 'Valid attribute in -gnatVa mode does not appear
3027         to come from source.
3028         * sem_attr.adb (Analyze_Access_Attribute): Don't set
3029         Never_Set_In_Source for non-source reference.
3030         * sem_util.adb: Minor reformatting.
3031         * sem_warn.adb (Check_References): Don't check Address_Taken,
3032         not necessary, see comment.
3034 2014-08-04  Robert Dewar  <dewar@adacore.com>
3036         * sem_util.adb, sem_case.adb: Minor reformatting.
3038 2014-08-04  Ed Schonberg  <schonberg@adacore.com>
3040         * exp_ch9.adb (Extract_Entry): If the synchronized object is a
3041         limited view, replace with non-limited view, which is available
3042         at the point of an entry call.
3044 2014-08-04  Ed Schonberg  <schonberg@adacore.com>
3046         * exp_ch6.adb (Expand_Call): If the call is to a function in
3047         a run-time unit that is marked Inline_Always, we must suppress
3048         debugging information on it, so that the code that is eventually
3049         inlined will not affect debugging of the user program.
3051 2014-08-04  Robert Dewar  <dewar@adacore.com>
3053         * inline.adb, einfo.ads, s-tassta.adb, s-tarest.adb: Minor comment
3054         fixes.
3056 2014-08-04  Ed Schonberg  <schonberg@adacore.com>
3058         * sem_prag.adb (Process_Import_Or_Interface): Handle properly
3059         an aspect Import that specifies a False value.
3061 2014-08-04  Robert Dewar  <dewar@adacore.com>
3063         * gnat_rm.texi: Add section on aspect Invariant'Class.
3065 2014-08-04  Ed Schonberg  <schonberg@adacore.com>
3067         * sem_case.adb (Check_Choice_Set): New flag Predicate_Error,
3068         for better control of cascaded error messages when some choice
3069         in a case statement over a predicated type violates the given
3070         static predicate.
3072 2014-08-04  Hristian Kirtchev  <kirtchev@adacore.com>
3074         * sem_ch3.adb (Build_Derived_Type): Modify the
3075         inheritance of the rep chain to ensure that a non-tagged type's
3076         items are not clobbered during the inheritance.
3078 2014-08-04  Robert Dewar  <dewar@adacore.com>
3080         * sem_ch3.adb, einfo.ads: Minor reformatting.
3082 2014-08-04  Yannick Moy  <moy@adacore.com>
3084         * inline.adb (Can_Be_Inlined_In_GNATprove_Mode): Fix
3085         detection of subprograms that cannot be inlined in GNATprove mode.
3087 2014-08-04  Ed Schonberg  <schonberg@adacore.com>
3089         * einfo.adb: Add guard to Returns_Limited_View.
3091 2014-08-04  Jose Ruiz  <ruiz@adacore.com>
3093         * s-tassta.adb, s-tarest.adb (Task_Wrapper): Force maximum alignment of
3094         the secondary stack to respect the alignments of the returned objects.
3096 2014-08-04  Ed Schonberg  <schonberg@adacore.com>
3098         * einfo.ads, einfo.adb (Returns_Limited_View): New flag defined
3099         on function entities whose return type is a limited view.
3100         * freeze.adb (Freeze_Entity): Use Returns_Limited_View to determine
3101         where to place the freeze node for a function that returns the
3102         limited view of a type, when the function is called and frozen
3103         in a different unit.
3105 2014-08-04  Eric Botcazou  <ebotcazou@adacore.com>
3107         * sem_ch3.adb (Build_Derived_Private_Type): Minor code
3108         refactoring.
3110 2014-08-04  Robert Dewar  <dewar@adacore.com>
3112         * gnat_ugn.texi: Clarify documentation on assertions.
3114 2014-08-04  Ed Schonberg  <schonberg@adacore.com>
3116         * sem_aggr.adb (Resolve_Record_Aggregate, Get_Value): Warn
3117         if a component association has a box initialization when the
3118         component type has no default initialization, either through an
3119         initial value, an aspect, or an implicit initialization procedure.
3121 2014-08-04  Ed Schonberg  <schonberg@adacore.com>
3123         * freeze.adb: Code clean up.
3125 2014-08-04  Thomas Quinot  <quinot@adacore.com>
3127         * sem_ch5.adb: Minor reformatting.
3129 2014-08-04  Ed Schonberg  <schonberg@adacore.com>
3131         * freeze.adb (Late_Freeze_Subprogram): Following AI05-151,
3132         a function can return a limited view of a type declared
3133         elsewhere. In that case the function cannot be frozen at the end
3134         of its enclosing package. If its first use is in a different unit,
3135         it cannot be frozen there, but if the call is legal the full view
3136         of the return type is available and the subprogram can now be
3137         frozen. However the freeze node cannot be inserted at the point
3138         of call, but rather must go in the package holding the function,
3139         so that the backend can process it in the proper context.
3141 2014-08-04  Robert Dewar  <dewar@adacore.com>
3143         * exp_ch5.adb, sem_ch5.adb, einfo.ads: Minor reformatting.
3145 2014-08-04  Arnaud Charlet  <charlet@adacore.com>
3147         * sem_ch4.adb (Operator_Check): Refine previous change.
3149 2014-08-04  Arnaud Charlet  <charlet@adacore.com>
3151         * sem_scil.ads: Improve comments.
3152         * sem_ch4.adb (Analyze_Equality_Op): Add support for
3153         Allow_Integer_Address (equality between Address and Integer).
3155 2014-08-04  Yannick Moy  <moy@adacore.com>
3157         * a-cfhama.adb, a-cforse.adb: Minor fixes to avoid using prefix
3158         notation on untagged objects.
3159         * sem.ads: Update comment.
3160         * inline.adb (Can_Be_Inlined_In_GNATprove_Mode): Do
3161         not inline subprograms declared in the visible part of a package.
3163 2014-08-04  Ed Schonberg  <schonberg@adacore.com>
3165         * exp_ch5.adb: minor reformatting.
3166         * einfo.ads, einfo.adb (Is_Processed_Transient): Applies to loop
3167         parameters.
3169 2014-08-04  Thomas Quinot  <quinot@adacore.com>
3171         * s-fatgen.adb: Minor reformatting.
3173 2014-08-04  Arnaud Charlet  <charlet@adacore.com>
3175         * exp_util.adb (Is_Possibly_Unaligned_Object): Always return
3176         False on .NET.
3178 2014-08-04  Ed Schonberg  <schonberg@adacore.com>
3180         * sem_ch5.adb (Analyze_Loop_Statement): Set properly the kind of
3181         the loop parameter for element iterators over containers and
3182         arrays, so that improper uses of it are detected in the loop
3183         body when expansion is disabled.
3184         * exp_ch5.adb (Expand_Iterator_Loop): The entity kind of the
3185         generated cursor is that of the analyzed loop parameter.
3187 2014-08-04  Hristian Kirtchev  <kirtchev@adacore.com>
3189         * exp_ch3.adb (Build_CPP_Init_Procedure): Remove
3190         Flag_Decl. Do not analyze the declaration of the flag as it is
3191         not part of the tree yet, instead add it to the freeze actions
3192         of the C++ type.
3194 2014-08-04  Robert Dewar  <dewar@adacore.com>
3196         * checks.adb (Apply_Scalar_Range_Check): Make sure we handle
3197         case of OUT and IN OUT parameter correctly (where Source_Typ is
3198         set), we were missing one case where a check must be applied.
3200 2014-08-04  Hristian Kirtchev  <kirtchev@adacore.com>
3202         * sem_ch8.adb (Build_Class_Wide_Wrapper): Update the comment on
3203         the generated code. Instead of hiding the renaming and using the
3204         wrapper as the proper association, have the subprogram renaming
3205         alias the wrapper.
3206         (Build_Spec): The entity of the wrapper is
3207         now derived from the entity of the related primitive.
3209 2014-08-04  Emmanuel Briot  <briot@adacore.com>
3211         * s-regpat.adb: s-regpat.adb (Parse): fix incorrect link when
3212         using non-capturing groups.
3214 2014-08-04  Ed Schonberg  <schonberg@adacore.com>
3216         * inline.adb (Build_Body_To_Inline): Remove Unmodified and
3217         related pragmas before copying the original body, to prevent
3218         spurious errors when the pragmas apply to formals that will not
3219         appear in the inlined body.
3221 2014-08-04  Robert Dewar  <dewar@adacore.com>
3223         * exp_prag.adb, sem_ch7.adb, einfo.adb, sem_prag.adb, sem_util.adb,
3224         exp_ch3.adb: Minor reformatting.
3226 2014-08-04  Robert Dewar  <dewar@adacore.com>
3228         * prj-strt.adb, prj-strt.ads, sem_attr.adb: Minor reformatting.
3230 2014-08-04  Hristian Kirtchev  <kirtchev@adacore.com>
3232         * aspects.adb Add an entry in table Canonical_Aspect for
3233         Default_Initial_Condition.
3234         * aspects.ads Add an entry in tables Aspect_Id, Aspect_Argument,
3235         Aspect_Names and Aspect_Delay for Default_Initial_Condition.
3236         * einfo.adb Flag3 is now Has_Default_Init_Cond. Flag132
3237         is now Is_Default_Init_Cond_ Procedure. Flag133 is now
3238         Has_Inherited_Default_Init_Cond.
3239         (Default_Init_Cond_Procedure): New routine.
3240         (Has_Default_Init_Cond): New routine.
3241         (Has_Inherited_Default_Init_Cond): New routine.
3242         (Is_Default_Init_Cond_Procedure): New routine.
3243         (Set_Default_Init_Cond_Procedure): New routine.
3244         (Set_Has_Default_Init_Cond): New routine.
3245         (Set_Has_Inherited_Default_Init_Cond): New routine.
3246         (Set_Is_Default_Init_Cond_Procedure): New routine.
3247         (Write_Entity_Flags): Output all the new flags.
3248         * einfo.ads New attributes Default_Init_Cond_Procedure,
3249         Has_Inherited_Default_Init_Cond and Is_Default_Init_Cond_Procedure
3250         along with usage in nodes.
3251         (Default_Init_Cond_Procedure): New routine.
3252         (Has_Default_Init_Cond): New routine and pragma Inline.
3253         (Has_Inherited_Default_Init_Cond): New routine and
3254         pragma Inline.
3255         (Is_Default_Init_Cond_Procedure): New routine and
3256         pragma Inline.
3257         (Set_Default_Init_Cond_Procedure): New routine.
3258         (Set_Has_Default_Init_Cond): New routine and pragma Inline.
3259         (Set_Has_Inherited_Default_Init_Cond): New routine and pragma Inline.
3260         (Set_Is_Default_Init_Cond_Procedure): New routine and pragma Inline.
3261         * exp_ch3.adb (Expand_N_Object_Declaration): New constant
3262         Next_N. Generate a call to the default initial condition procedure
3263         if the object's type is subject to the pragma.  (Freeze_Type):
3264         Generate the body of the default initial condition procedure or
3265         inherit the spec from a parent type.
3266         * exp_ch7.adb Add with and use clause for Exp_Prag.
3267         (Expand_Pragma_Initial_Condition): Removed.
3268         * exp_prag.ads, exp_prag.adb (Expand_Pragma_Initial_Condition): New
3269         routine.
3270         * par-prag.adb (Prag): Pragma Default_Initial_Condition does
3271         not need special treatment by the parser.
3272         * sem_ch3.adb (Build_Derived_Record_Type): Propagate the
3273         attributes related to pragma Default_Initial_Condition to the
3274         derived type.
3275         (Process_Full_View): Propagate the attributes
3276         related to pragma Default_Initial_Condition to the full view.
3277         * sem_ch7.adb (Analyze_Package_Specification): Build the
3278         declaration of the default initial condition procedure for all
3279         types that qualify or inherit the one from the parent type.
3280         * sem_ch13.adb (Analyze_Aspect_Specifications):
3281         Add processing for aspect Default_Initial_Condition.
3282         (Check_Aspect_At_Freeze_Point): Aspect
3283         Default_Initial_Condition does not require delayed analysis.
3284         (Replace_Type_References_Generic): Moved to spec.
3285         * sem_ch13.ads (Replace_Type_References_Generic): Moved from body.
3286         * sem_prag.adb Add an entry in table Sif_Glags for
3287         Default_Initial_Condition.
3288         (Analyze_Pragma): Pragma
3289         Default_Initial_Condition is now part of assertion
3290         policy. Add processing for pragma Default_Initial_Condition.
3291         (Is_Valid_Assertion_Kind): Pragma Default_Initial_Condition is
3292         now recognized as a proper assertion policy.
3293         * sem_util.ads, sem_util.adb (Build_Default_Init_Cond_Call): New
3294         routine.
3295         (Build_Default_Init_Cond_Procedure_Body): New routine.
3296         (Build_Default_Init_Cond_Procedure_Declaration): New routine.
3297         (Inherit_Default_Init_Cond_Procedure): New routine.
3298         * snames.ads-tmpl Add new predefined name and pragma id for
3299         Default_Initial_Condition.
3301 2014-08-04  Vincent Celier  <celier@adacore.com>
3303         * prj-dect.adb (Parse_Case_Construction): It is no longer
3304         an error if the variable for a case construction is not
3305         typed, only if the variable value is not a single string. Call
3306         Parse_Choice_List and End_Case_Construction with the new parameter
3307         to indicate that the variable is typed.
3308         * prj-strt.adb (End_Case_Construction): Only check the labels
3309         if the variable is typed.  If the variable is not typed,
3310         issue a warning when there is no "when others" allternative.
3311         (Parse_Choice_List): Manage the labels only if the variable
3312         is typed.
3313         * prj-strt.ads (End_Case_Construction): New Boolean parameter
3314         String_Type.
3315         (Parse_Choice_List): Ditto.
3317 2014-08-04  Ed Schonberg  <schonberg@adacore.com>
3319         * sem_ch5.adb: Additional fix to Check_Predicate_Use.
3321 2014-08-04  Vincent Celier  <celier@adacore.com>
3323         * projects.texi: Update documentation of case constructions with
3324         variables that are not typed.
3326 2014-08-04  Ed Schonberg  <schonberg@adacore.com>
3328         * sem_ch8.adb (Build_Class_Wide_Wrapper): If the operator carries
3329         an Eliminated pragma, indicate that the wrapper is also to be
3330         eliminated, to prevent spurious errors when using gnatelim on
3331         programs that include box-initialization of equality operators
3332         (consequence of AI05-071)..
3334 2014-08-04  Robert Dewar  <dewar@adacore.com>
3336         * checks.adb (Activate_Overflow_Check): Handle floating-point
3337         case correctly.
3338         * checks.ads (Activate_Overflow_Check): Clarify handling of
3339         floating-point cases.
3340         * exp_util.adb (Check_Float_Op_Overflow): Reset Do_Overflow_Check
3341         flag if we generate an explicit overflow check (for
3342         Check_Float_Overflow mode).
3344 2014-08-04  Robert Dewar  <dewar@adacore.com>
3346         * prj-proc.adb, prj-part.adb, prj-strt.adb, prj.adb, prj.ads,
3347         prj-attr.adb, prj-attr.ads: Minor reformatting.
3349 2014-08-04  Yannick Moy  <moy@adacore.com>
3351         * expander.adb (Expand): Always perform special
3352         expansion in GNATprove mode, even when doing pre-analysis.
3354 2014-08-04  Thomas Quinot  <quinot@adacore.com>
3356         * repinfo.adb (List_Scalar_Storage_Order): List bit order if
3357         not default. Also list bit order if SSO is specified. Do not
3358         assume that bit order is always equal to scalar storage order.
3360 2014-08-04  Thomas Quinot  <quinot@adacore.com>
3362         * freeze.adb (Set_SSO_From_Default): Do not set scalar storage
3363         order to reverse SSO for a type that has an explicit native
3364         Bit_Order.
3366 2014-08-04  Doug Rupp  <rupp@adacore.com>
3368         * cal.c: Macro check for VxWorks7.
3369         * init.c (getpid): Likewise.
3370         * mkdir.c (__gnat_mkdir): Likewise.
3371         * sysdep.c (__gnat_is_file_not_found_error): Likewise.
3373 2014-08-04  Gary Dismukes  <dismukes@adacore.com>
3375         * exp_ch3.adb (Expand_N_Object_Declaration): Inhibit generation
3376         of an invariant check in the case where No_Initialization is set,
3377         since the object is uninitialized.
3379 2014-08-04  Thomas Quinot  <quinot@adacore.com>
3381         * snames.ads-tmpl (Default_Scalar_Storage_Order): Now an attribute
3382         name, in addition to a pragma name.
3383         * snames.adb-tmpl (Get_Pragma_Id, Is_Configuration_Pragma_Name,
3384         Is_Pragma_Name): Adjust accordingly.
3385         * sem_attr.ads, sem_attr.adb, exp_attr.adb
3386         (Attribute_Default_Scalar_Storage_Order): Add handling of new
3387         attribute.
3388         * gnat_rm.texi: Document the above.
3390 2014-08-04  Arnaud Charlet  <charlet@adacore.com>
3392         * exp_util.adb (Check_Float_Op_Overflow): No-op in codepeer
3393         mode for now, to revert to previous behavior.
3394         * checks.adb: Revert previous change, no longer needed.
3396 2014-08-04  Robert Dewar  <dewar@adacore.com>
3398         * gnat1drv.adb (Adjust_Global_Switches): Don't set
3399         Check_Float_Overflow if Machine_Oveflows_On_Target is True.
3400         * sem_prag.adb (Analyze_Pragma, case Check_Float_Overflow): Don't
3401         set Check_Float_Overflow if Machine_Oveflows_On_Target is True.
3402         * switch-c.adb (Scan_Front_End_Switches): Don't set
3403         Check_Float_Overflow if Machine_Oveflows_On_Target is True.
3405 2014-08-04  Vincent Celier  <celier@adacore.com>
3407         * prj-attr.adb: Add new default indications for
3408         attributes Object_Dir, Exec_Dir, Source_Dirs and Target.
3409         (Attribute_Default_Of): New function (Initialize): Set the
3410         default for those attributes that have one specified.
3411         * prj-attr.ads (Attribute_Data): New component Default.
3412         * prj-proc.adb (Expression): Take into account the new defaults
3413         for attributes Object_Dir, Exec_Dir and Source_Dirs.
3414         * prj-strt.adb (Attribute_Reference): Set the default for
3415         the attribute.
3416         * prj-tree.ads, prj-tree.adb (Default_Of): New function.
3417         (Set_Default_Of): New procedure.
3418         * prj.adb (The_Dot_String): New global Name_Id variable,
3419         initialized in procedure Initialize.
3420         (Dot_String): New function
3421         (Initialize): Initialize The_Dot_String.
3422         (Reset): Create the string list Shared.Dot_String_List.
3423         * prj.ads (Attribute_Default_Value): New enumeration type.
3424         (Project_Qualifier): Change enumeration value Dry to Abstract_Project.
3425         (Dot_String): New function.
3426         (Shared_Project_Tree_Data): New string list component Dot_String_List.
3427         * projects.texi: Document new defaults for attribute Object_Dir,
3428         Exec_Dir and Source_Dirs.
3430 2014-08-04  Robert Dewar  <dewar@adacore.com>
3432         * sem_ch12.adb: Minor reformatting.
3434 2014-08-04  Arnaud Charlet  <charlet@adacore.com>
3436         * exp_util.adb, checks.adb (Check_Float_Op_Overflow): Add special
3437         expansion in CodePeer_Mode.
3438         (Selected_Range_Checks): Add handling of overflow checks in
3439         CodePeer_Mode.
3441 2014-08-04  Robert Dewar  <dewar@adacore.com>
3443         * exp_attr.adb (Expand_N_Attribute_Reference, case Pred):
3444         Remove special test for Float'First, no longer required.
3445         (Expand_N_Attribute_Reference, case Succ): Remove special test
3446         for Float'First, no longer required.
3447         * s-fatgen.adb (Pred): return infinity unchanged.
3448         (Succ): ditto.
3450 2014-08-04  Claire Dross  <dross@adacore.com>
3452         * sem_ch12.adb (Analyze_Associations): Defaults should only be
3453         used if there is no explicit match.
3454         * exp_util.adb (Get_First_Parent_With_Ext_Axioms_For_Entity):
3455         Also check for pragma external_axiomatization on generic units.
3457 2014-08-04  Robert Dewar  <dewar@adacore.com>
3459         * checks.adb (Activate_Overflow_Check): Remove
3460         Check_Float_Overflow processing.
3461         (Apply_Scalar_Range_Check): Ditto.
3462         (Generate_Range_Check): Ditto.
3463         * exp_ch4.adb (Expand_N_Op_Add): Add call to
3464         Check_Float_Op_Overflow.
3465         (Expand_N_Op_Divide): ditto.
3466         (Expand_N_Op_Multiply): ditto.
3467         (Expand_N_Op_Subtract): ditto.
3468         * exp_util.ads, exp_util.adb (Check_Float_Op_Overflow): New procedure.
3469         * sem_attr.adb (Analyze_Attribute, case Pred): Make sure
3470         Do_Range_Check is set for floating-point case in -gnatc or
3471         GNATprove mode.
3472         (Analyze_Attribute, case Succ): Make sure
3473         Do_Range_Check is set for floating-point case in -gnatc or
3474         GNATprove mode.
3475         * sem_res.adb (Resolve_Type_Conversion): Make sure Do_Range_Check
3476         flag is set for real to integer conversion in GNATprove or
3477         -gnatc mode.
3479 2014-08-04  Gary Dismukes  <dismukes@adacore.com>
3481         * sem_ch13.adb (Analyze_Aspect_Specifications): Resolve
3482         the expression of an Import or Export aspect as type Boolean
3483         and require it to be static. Add ??? comment. Also, set the
3484         Is_Exported flag when appropriate.
3486 2014-08-04  Robert Dewar  <dewar@adacore.com>
3488         * exp_ch4.adb: Minor reformatting.
3489         * exp_attr.adb: Minor reformatting.
3491 2014-08-04  Thomas Quinot  <quinot@adacore.com>
3493         * s-fatgen.ads, s-fatgen.adb (S, P): New visible type declarations
3494         (Unaligned_Valid): Remove now unused subprogram.
3495         * exp_attr.adb (Expand_N_Attribute_Reference, case
3496         Attribute_Valid): If the prefix is in reverse SSO or potentially
3497         unaligned, copy it using a byte copy operation to a temporary
3498         variable.
3499         * einfo.adb: Minor comment fix.
3501 2014-08-04  Hristian Kirtchev  <kirtchev@adacore.com>
3503         * freeze.adb (Freeze_Entity): Do not freeze formal subprograms.
3505 2014-08-04  Robert Dewar  <dewar@adacore.com>
3507         * s-imgrea.adb (Image_Floating_Point): Don't add space before +Inf.
3508         * s-fatgen.adb (Pred): Handle Float'First.
3509         (Succ): Handle Float'Last.
3511 2014-08-04  Ed Schonberg  <schonberg@adacore.com>
3513         * sem_util.adb (Is_Potentially_Unevaluated): If the original
3514         node of a parent node in the tree is a short-circuit operation,
3515         the node is potentially unevaluated.
3517 2014-08-04  Robert Dewar  <dewar@adacore.com>
3519         * sem_res.adb (Resolve_Type_Conversion): Set Do_Range_Check on
3520         conversion from a real type to an integer type.
3522 2014-08-04  Yannick Moy  <moy@adacore.com>
3524         * sem_aggr.adb, sem_ch3.adb, sem_ch5.adb, sem_ch7.adb, sem_ch9.adb,
3525         sem_ch12.adb, sem_util.adb, sem_util.ads, sem_res.adb, sem_attr.adb,
3526         exp_ch6.adb, sem_ch4.adb, restrict.adb, restrict.ads, sem_ch6.adb,
3527         sem_ch8.adb, sem_ch11.adb: Update some subprogram names to refer to
3528         SPARK_05 instead of SPARK.
3530 2014-08-04  Robert Dewar  <dewar@adacore.com>
3532         * sem.ads: Minor reformatting.
3533         * sem_ch13.adb (Analyze_Aspect_External_Or_Link_Name): Minor
3534         reformatting.
3535         (Analyze_Aspect_Specifications, case Convention): Put External_Name
3536         before Link_Name when constructing pragma.
3538 2014-08-04  Yannick Moy  <moy@adacore.com>
3540         * sem.adb, sem.ads (In_Default_Expr): Global flag that is set
3541         to True during analysis of a default component expression.
3542         (Semantics): Save and restore In_Default_Expr around analysis.
3543         * sem_ch3.adb, sem_ch3.ads (Analyze_Component_Declaration):
3544         Call new wrapper Preanalyze_Default_Expression.
3545         (Preanalyze_Default_Expression): New wrapper on
3546         Preanalyze_Spec_Expression which sets and restores In_Default_Expr.
3547         * sem_res.adb (Resolve_Call): Mark calls inside default
3548         expressions as not inlined in GNATprove mode.
3550 2014-08-04  Robert Dewar  <dewar@adacore.com>
3552         * exp_ch4.adb: Minor reformatting.
3554 2014-08-04  Olivier Hainque  <hainque@adacore.com>
3556         * link.c: remove const on __gnat_objlist_file_supported for AIX
3558 2014-08-04  Robert Dewar  <dewar@adacore.com>
3560         * sem_util.ads: Minor addition of comment.
3562 2014-08-04  Vincent Celier  <celier@adacore.com>
3564         * prj-dect.adb (Check_Package_Allowed): Allow package IDE in
3565         all projects, including aggregate and aggregate library projects.
3567 2014-08-04  Yannick Moy  <moy@adacore.com>
3569         * back_end.adb (Call_Back_End): Do not call gigi in GNATprove mode.
3571 2014-08-04  Robert Dewar  <dewar@adacore.com>
3573         * sem_eval.adb (Test_In_Range): Always in range for
3574         Is_Known_Valid target type, where input type has smaller or
3575         equal size and does not have biased rep.
3577 2014-08-04  Ed Schonberg  <schonberg@adacore.com>
3579         * sem_attr.adb (Eval_Attribute): Constrained is not treated as
3580         a static attribute, and the Static flag must not be set on it
3581         during resolution. It may be constant-folded during expansion,
3582         but if expansion is disabled it is not a static expression.
3584 2014-08-04  Hristian Kirtchev  <kirtchev@adacore.com>
3586         * sem_ch8.adb (Build_Class_Wide_Wrapper): Mark the primitive as
3587         referenced once resolution has taken place.
3589 2014-08-04  Gary Dismukes  <dismukes@adacore.com>
3591         * exp_ch4.adb (Expand_N_Type_Conversion): Don't
3592         compare access levels in the case where the target type is the
3593         anonymous type of an access discriminant, since the level of
3594         such types is defined based on context. Add comment.
3596 2014-08-04  Hristian Kirtchev  <kirtchev@adacore.com>
3598         * sem_ch8.adb (Build_Class_Wide_Wrapper): Handle various special
3599         cases related to equality.  Remove the special processing
3600         for dispatching abstract subprograms as it is not needed.
3601         (Interpretation_Error): Add a specialized error message for
3602         predefined operators.
3603         (Is_Intrinsic_Equality): New routine.
3604         (Is_Suitable_Candidate): New routine.
3606 2014-08-04  Gary Dismukes  <dismukes@adacore.com>
3608         * checks.adb: Minor comment reformatting.
3610 2014-08-04  Ed Schonberg  <schonberg@adacore.com>
3612         * restrict.adb (Check_Restriction): For checked max_parameter
3613         restrictions reset Violated flag, so that subsequent violations
3614         are properly detected.
3616 2014-08-04  Robert Dewar  <dewar@adacore.com>
3618         * sem_ch3.adb (Check_Initialization): Fix bad test of GNATprove
3619         mode.
3620         (Process_Discriminants): Fix bad test of GNATprove mode
3622 2014-08-04  Hristian Kirtchev  <kirtchev@adacore.com>
3624         * sem_ch12.adb (Instantiate_Formal_Subprogram):
3625         Move variable to their own section. Propagate the source
3626         location of a formal parameter to the corresponding formal of
3627         the subprogram renaming declaration. Code reformatting.
3629 2014-08-04  Arnaud Charlet  <charlet@adacore.com>
3631         * g-trasym-vms-ia64.adb, g-trasym-vms-alpha.adb: Removed.
3633 2014-08-04  Ed Schonberg  <schonberg@adacore.com>
3635         * exp_aggr.adb (Expand_Array_Aggregate): Do not attempt expansion
3636         if error already detected.  We may reach this point in spite of
3637         previous errors when compiling with -gnatq, to force all possible
3638         errors (this is the usual ACATS mode).
3640 2014-08-04  Gary Dismukes  <dismukes@adacore.com>
3642         * checks.adb (Generate_Range_Check): For the case of converting
3643         a base type with a larger range to a smaller target subtype, only
3644         use unchecked conversions of bounds in the range check followed
3645         by conversion in the case where both types are discrete. In other
3646         cases, convert to the target base type and save in a temporary
3647         followed by the range check.
3648         (Convert_And_Check_Range): New procedure factoring code to save
3649         conversion to a temporary followed by a range check (called two
3650         places in Generate_Range_Check).
3651         * exp_ch4.adb (Expand_N_Type_Conversion): Relax previous
3652         check-in, to generate range checks for conversions between
3653         any floating-point types rather than limiting it to matching
3654         base types.
3656 2014-08-02  Trevor Saunders  <tsaunders@mozilla.com>
3658         * gcc-interface/trans.c: Use hash_set instead of pointer_set.
3660 2014-08-01  Ed Schonberg  <schonberg@adacore.com>
3662         * restrict.adb (Update_Restrictions): For restrictions with a
3663         maximum parameter (e.g. number of protected entries in Ravenscar)
3664         do not compute the maximum of the violation over several objects,
3665         because the restriction is per-object.
3666         (Check_Restriction): After possible message, reset the value
3667         of of a checked max_parameter restriction to zero, to prevent
3668         cascaded errors.
3669         * sem_ch3.adb (Build_Derived_Private_Type): Use base of parent
3670         (sub)type to determine whether derived type should be on the
3671         list of private dependents of a type whose full view may become
3672         visible subsequently.
3674 2014-08-01  Olivier Hainque  <hainque@adacore.com>
3676         * gcc-interface/Make-lang.in (ADA_TOOLS_FLAGS_TO_PASS, native): use
3677         $(CXX) instead of ../../xg++ to feed CXX.
3678         (CXX_LFLAGS): Remove. Now unused as the proper flags
3679         are expected to be included in the CXX variable.
3681 2014-08-01  Pierre-Marie Derodat  <derodat@adacore.com>
3683         * gcc-interface/decl.c (elaborate_expression_1): Return the new
3684         variable when debug info is needed and the expression is not
3685         constant.  Tag as external only new variables that are global.
3686         (gnat_to_gnu_entity): Call it after the GNU declaration is saved.
3687         * gcc-interface/trans.c (Attribute_to_gnu): Do not cache
3688         attributes for IN array parameters when their actual subtype
3689         needs debug info.
3690         (Compilation_Unit_to_gnu): Call it to process all remaining nodes.
3691         * gcc-interface/gigi.h (process_deferred_decl_context): New.
3692         * gcc-interface/utils.c (gnat_write_global_declarations): Do not
3693         emit debug info for ignored global declarations.
3694         (struct deferred_decl_context_node,
3695         add_deferred_decl_context, add_deferred_type_context,
3696         compute_deferred_decl_context, defer_or_set_type_context,
3697         deferred_decl_context_queue, get_debug_scope,
3698         get_global_context, process_deferred_decl_context): New.
3699         (gnat_pushdecl): Re-implement the DECL_CONTEXT and TYPE_CONTEXT
3700         computation machinery to rely on the GNAT Scope attribute.
3702 2014-08-01  Eric Botcazou  <ebotcazou@adacore.com>
3704         * gcc-interface/utils2.c (build_simple_component_ref): Add guard.
3706 2014-08-01  Robert Dewar  <dewar@adacore.com>
3708         * sem_ch8.adb, opt.ads Minor comment updates.
3710 2014-08-01  Hristian Kirtchev  <kirtchev@adacore.com>
3712         * exp_intr.adb (Expand_Unc_Deallocation): Request a renaming
3713         from the side effects removal machinery.
3714         * exp_util.adb (Duplicate_Subexpr): Add formal parameter
3715         Renaming_Req. Update the nested call to Remove_Side_Effects.
3716         (Duplicate_Subexpr_No_Checks): Add formal parameter
3717         Renaming_Req. Update the nested call to Remove_Side_Effects.
3718         (Duplicate_Subexpr_Move_Checks): Add formal parameter
3719         Renaming_Req. Update the nested call to Remove_Side_Effects.
3720         (Remove_Side_Effects): Add formal parameter Renaming_Req. Generate
3721         an object renaming declaration when the caller requests it.
3722         * exp_util.ads (Duplicate_Subexpr): Add formal
3723         parameter Renaming_Req. Update comment on usage.
3724         (Duplicate_Subexpr_No_Checks): Add formal parameter Renaming_Req.
3725         (Duplicate_Subexpr_Move_Checks): Add formal parameter
3726         Renaming_Req.
3728 2014-08-01  Bob Duff  <duff@adacore.com>
3730         * gnat_ugn.texi: Minor updates.
3732 2014-08-01  Robert Dewar  <dewar@adacore.com>
3734         * atree.adb: Minor reformatting.
3736 2014-08-01  Ed Schonberg  <schonberg@adacore.com>
3738         * exp_aggr.adb (Init_Hidden_Discriminants): If some ancestor is a
3739         private extension, get stored constraint, if any, from full view.
3741 2014-08-01  Robert Dewar  <dewar@adacore.com>
3743         * opt.ads (No_Elab_Code_All_Pragma): New global variable.
3744         * sem_ch10.adb (Check_No_Elab_Code_All): New procedure
3745         (Analyze_Compilation_Unit): Call Check_No_Elab_Code_All
3746         (Analyze_Subunit_Context): Call Check_No_Elab_Code_All.
3747         * sem_prag.adb (Analyze_Pragma, case No_Elaboration_Code_All):
3748         Remove code for checking with's, now in sem_ch10.adb, set
3749         Opt.No_Elab_Code_All_Pragma.
3751 2014-08-01  Eric Botcazou  <ebotcazou@adacore.com>
3753         * sem_ch3.adb (Copy_And_Build): Copy the declaration for
3754         access types as well and adjust the subtype mark if there are
3755         no constraints.
3757 2014-08-01  Robert Dewar  <dewar@adacore.com>
3759         * sem_eval.adb (Test_In_Range): Return Unknown if error posted.
3761 2014-08-01  Robert Dewar  <dewar@adacore.com>
3763         * sem_ch3.adb, einfo.ads, exp_ch4.adb: Code clean ups.
3765 2014-08-01  Eric Botcazou  <ebotcazou@adacore.com>
3767         * einfo.ads (Has_Private_Ancestor): Remove obsolete usage.
3768         * exp_ch4.adb (Expand_Composite_Equality): Add conversion
3769         of the actuals in the case of untagged record types too.
3770         * sem_ch3.adb (Build_Full_Derivation): New procedure to create the
3771         full derivation of a derived private type, extracted from...
3772         (Copy_And_Build): In the case of record types and most
3773         enumeration types, copy the original declaration.  Build the
3774         full derivation according to the approach extracted from...
3775         (Build_Derived_Private_Type): ...here.  Call Build_Full_Derivation
3776         to create the full derivation in all existing cases and also
3777         create it in the no-discriminants/discriminants case instead of
3778         deriving directly from the full view.
3779         (Is_Visible_Component): Remove obsolete code.
3780         * sem_aggr.adb (Resolve_Record_Aggregate): Likewise.
3782 2014-08-01  Arnaud Charlet  <charlet@adacore.com>
3784         * fe.h (GNAT_Mode): New.
3785         * gcc-interface/decl.c (gnat_to_gnu_entity): Do not error out on
3786         reverse SSO in GNAT mode.
3788 2014-08-01  Thomas Quinot  <quinot@adacore.com>
3790         * freeze.adb: Minor reformatting.
3792 2014-08-01  Thomas Quinot  <quinot@adacore.com>
3794         * exp_ch3.adb (Default_Initialize_Object): Do not generate
3795         default initialization for an imported object.
3797 2014-08-01  Olivier Hainque  <hainque@adacore.com>
3799         * seh_init.c (__gnat_map_SEH): Cast argument of IsBadCodePtr
3800         to the expected FARPROC type instead of void *.
3801         * adaint.c (f2t): Expect __time64_t * as second argument, in line with
3802         other datastructures.
3803         (__gnat_file_time_name_attr): Adjust accordingly.
3804         (__gnat_check_OWNER_ACL): Declare pSD as PSECURITY_DESCRIPTOR,
3805         in line with uses.
3806         (__gnat_check_OWNER_ACL): Declare AccessMode
3807         parameter as ACCESS_MODE instead of DWORD, in line with callers
3808         and uses.
3809         (__gnat_set_executable): Add ATTRIBUTE_UNUSED on mode,
3810         unused on win32.  Correct cast of "args" on call to spawnvp.
3811         (add_handle): Cast realloc calls into their destination types.
3812         (win32_wait): Remove declaration and initialization of unused variable.
3813         (__gnat_locate_exec_on_path): Cast alloca calls
3814         into their destination types.
3815         * initialize.c (append_arg, __gnat_initialize): Cast xmalloc calls into
3816         their destination types.
3818 2014-08-01  Gary Dismukes  <dismukes@adacore.com>
3820         * exp_ch4.adb (Expand_N_Type_Conversion): Expand
3821         range checks for conversions between floating-point subtypes
3822         when the target and source types are the same.
3824 2014-08-01  Robert Dewar  <dewar@adacore.com>
3826         * exp_aggr.adb: Minor reformatting.
3828 2014-08-01  Eric Botcazou  <ebotcazou@adacore.com>
3830         * sem_ch13.adb (Check_Indexing_Functions): Initialize
3831         Indexing_Found.
3833 2014-08-01  Arnaud Charlet  <charlet@adacore.com>
3835         * gnat1drv.adb (Gnat1drv): In gnatprove mode, we now write the
3836         ALI file before we call the backend (so that gnat2why can append
3837         to it).
3839 2014-08-01  Thomas Quinot  <quinot@adacore.com>
3841         * exp_pakd.adb (Expand_Bit_Packed_Element_Set,
3842         Expand_Packed_Element_Reference): Pass additional Rev_SSO
3843         parameter indicating whether the packed array type has reverse
3844         scalar storage order to the s-pack* Set/Get routines.
3845         * s-pack*.ad* (Get, Set, GetU, SetU): New formal Rev_SSO
3846         indicating reverse scalar storage order.
3848 2014-08-01  Robert Dewar  <dewar@adacore.com>
3850         * sem_ch3.adb (Check_Initialization): Set Do_Range_Check
3851         for initial component value in -gnatc or GNATprove mode.
3852         (Process_Discriminants): Same fix for default discriminant values.
3853         * sem_eval.adb (Test_In_Range): Improve accuracy of results by
3854         checking subtypes.
3856 2014-08-01  Robert Dewar  <dewar@adacore.com>
3858         * sinfo.ads: Minor comment clarification.
3860 2014-08-01  Hristian Kirtchev  <kirtchev@adacore.com>
3862         * sem_ch13.adb (Analyze_Aspect_Specifications): Code
3863         reformatting. Store the generated pragma Import in the related
3864         subprogram as routine Wrap_Imported_Subprogram will need it later.
3865         * sem_prag.adb (Is_Unconstrained_Or_Tagged_Item): An item of
3866         a private type with discriminants is considered to fall in the
3867         category of unconstrained or tagged items.
3869 2014-08-01  Arnaud charlet  <charlet@adacore.com>
3871         * s-os_lib.adb (Open_Append): New functions to open a file for
3872         appending. This binds to the already existing (but not used)
3873         __gnat_open_append.
3874         * osint.ads, osint.adb (Open_File_To_Append_And_Check): New procedure
3875         to open a file for appending.
3876         * osint-c.ads, osint-c.adb (Open_Output_Library_Info): New procedure
3877         to open the ALI file for appending.
3879 2014-08-01  Robert Dewar  <dewar@adacore.com>
3881         * sem_ch8.adb: Minor reformatting.
3883 2014-08-01  Yannick Moy  <moy@adacore.com>
3885         * sem_ch13.adb (Insert_Pragma): Add special case for precondition
3886         pragmas from aspects, which need to be inserted in proper order.
3888 2014-08-01  Ed Schonberg  <schonberg@adacore.com>
3890         * exp_aggr.adb (Expand_Record_Aggregate, Init_Hidden_Discriminants):
3891         Handle properly a type extension that constrains a discriminated
3892         derived type that renames other discriminants of an ancestor.
3894 2014-08-01  Thomas Quinot  <quinot@adacore.com>
3896         * s-pack06.adb, s-pack10.adb, s-pack03.ads, s-pack12.adb, s-pack14.ads,
3897         s-pack25.adb: Fix minor inconsistencies and typos.
3899 2014-08-01  Hristian Kirtchev  <kirtchev@adacore.com>
3901         * sem_ch8.adb (Analyze_Subprogram_Renaming): Alphabetize
3902         globals and move certain variables to the "local
3903         variable" section. Call Build_Class_Wide_Wrapper when
3904         renaming a default actual subprogram with a class-wide actual.
3905         (Build_Class_Wide_Wrapper): New routine.
3906         (Check_Class_Wide_Actual): Removed.
3907         (Find_Renamed_Entity): Code reformatting.
3908         (Has_Class_Wide_Actual): Alphabetize. Change the
3909         logic of the predicate as the renamed name may not necessarely
3910         denote the correct subprogram.
3912 2014-08-01  Eric Botcazou  <ebotcazou@adacore.com>
3914         * sem_ch7.adb: Fix minor oversight in condition.
3916 2014-08-01  Bob Duff  <duff@adacore.com>
3918         * projects.texi: Minor documentation improvements.
3920 2014-08-01  Robert Dewar  <dewar@adacore.com>
3922         * aspects.ads, aspects.adb: Add aspect No_Elaboration_Code_All.
3923         * gnat_rm.texi: Document No_Elaboration_Code_All pragma and aspect.
3924         * lib-load.adb: Initialize No_Elab_Code_All field.
3925         * lib-writ.adb: Initialize No_Elab_Code_All.
3926         * lib.ads, lib.adb: New field No_Elab_Code_All.
3927         * par-prag.adb: Add dummy entry for pragma No_Elaboration_Code_All.
3928         * restrict.ads, restrict.adb: Restriction No_Elaboration_Code_All no
3929         longer exists.
3930         * sem_ch10.adb (Analyze_Context): Processing for
3931         No_Elaboration_Code_All removed.
3932         (Generate_Parent_References): Moved to Sem_Util.
3933         * sem_prag.adb: Add processing for pragma No_Elaboration_Code_All.
3934         * sem_util.ads, sem_util.adb (Get_Parent_Entity): Moved here from
3935         Sem_Ch10.
3936         * snames.ads-tmpl: Add entry for pragma No_Elaboration_Code_All.
3937         * targparm.adb: Minor comment updates Add comments on ignoring
3938         pragma No_Elaboration_Code_All.
3940 2014-08-01  Nicolas Roche  <roche@adacore.com>
3942         * adaint.c (__gnat_set_close_on_exec): Ensure that
3943         we can unset "close_on_exec" flag.
3945 2014-08-01  Ed Schonberg  <schonberg@adacore.com>
3947         * exp_ch9.adb (Build_Wrapper_Spec, Replicate_Formals): When building
3948         the parameter specs of the wrapper program for a primitive operation
3949         of a synchronized type that implements an interface, copy the
3950         null_exclusion indicator as well.
3952 2014-08-01  Robert Dewar  <dewar@adacore.com>
3954         * sem_eval.ads: Minor reformatting.
3956 2014-08-01  Eric Botcazou  <ebotcazou@adacore.com>
3958         * exp_ch3.adb (Build_Initialization_Call): Call Underlying_Type
3959         to go down the chain of private derivations.
3960         * freeze.adb (Freeze_Entity): Fix typo in comment.
3962 2014-08-01  Ed Schonberg  <schonberg@adacore.com>
3964         * sem_ch3.adb (Access_Type_Declaration): If designated type is
3965         a limited view, create a master entity (as is already done for
3966         class-wide types) in case the full view designates a type that
3967         contains tasks.
3968         * sem_ch8.adb (Find_Selected_Component): If prefix is a dereference
3969         and the designated type is a limited view, use the non-limited
3970         view if available.
3972 2014-08-01  Eric Botcazou  <ebotcazou@adacore.com>
3974         * gcc-interface/ada-tree.h (DECL_BY_DESCRIPTOR_P): Delete.
3975         (DECL_FUNCTION_STUB): Likewise.
3976         (SET_DECL_FUNCTION_STUB): Likewise.
3977         (DECL_PARM_ALT_TYPE): Likewise.
3978         (SET_DECL_PARM_ALT_TYPE): Likewise.
3979         (TYPE_VAX_FLOATING_POINT_P): Delete.
3980         (TYPE_DIGITS_VALUE): Likewise.
3981         (SET_TYPE_DIGITS_VALUE): Likewise.
3982         * gcc-interface/gigi.h (standard_datatypes): Remove ADT_malloc32_decl.
3983         (malloc32_decl): Delete.
3984         (build_vms_descriptor): Likewise.
3985         (build_vms_descriptor32): Likewise.
3986         (fill_vms_descriptor): Likewise.
3987         (convert_vms_descriptor): Likewise.
3988         (TARGET_ABI_OPEN_VMS): Likewise.
3989         (TARGET_MALLOC64): Likewise.
3990         * gcc-interface/decl.c (add_parallel_type_for_packed_array): New.
3991         (gnat_to_gnu_entity): Call it to add the original type as a parallel
3992         type to the implementation type of a packed array type.
3993         <E_Procedure>: Remove now obsolete kludge.
3994         <E_Exception>: Delete obsolete comment.
3995         <object>: Small tweak.
3996         <E_Subprogram_Type>: Remove support for stub subprograms, as well as
3997         for the descriptor passing mechanism.
3998         (gnat_to_gnu_param): Likewise.
3999         * gcc-interface/misc.c (gnat_init_gcc_fp): Remove special case.
4000         (gnat_print_type): Adjust.
4001         * gcc-interface/trans.c (gigi): Remove obsolete initializations.
4002         (vms_builtin_establish_handler_decl): Delete.
4003         (gnat_vms_condition_handler_decl): Likewise.
4004         (establish_gnat_vms_condition_handler): Likewise.
4005         (build_function_stub): Likewise.
4006         (Subprogram_Body_to_gnu): Do not call above functions.
4007         (Call_to_gnu): Remove support for the descriptor passing mechanism.
4008         * gcc-interface/utils.c (make_descriptor_field): Delete.
4009         (build_vms_descriptor32): Likewise.
4010         (build_vms_descriptor): Likewise.
4011         (fill_vms_descriptor): Likewise.
4012         (convert_vms_descriptor64): Likewise.
4013         (convert_vms_descriptor32): Likewise.
4014         (convert_vms_descriptor): Likewise.
4015         * gcc-interface/utils.c (unchecked_convert): Likewise.
4016         * gcc-interface/utils2.c (maybe_wrap_malloc): Remove obsolete stuff.
4018 2014-08-01  Eric Botcazou  <ebotcazou@adacore.com>
4020         * gcc-interface/trans.c (gigi): Use gnat_to_gnu_type for the exception
4021         type and get_unpadded_type for the longest FP type.
4022         (Attribute_to_gnu) <Machine>: Compare the precision of the types.
4023         (convert_with_check): Adjust formatting and remove FIXME.
4025 2014-08-01  Eric Botcazou  <ebotcazou@adacore.com>
4027         * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Signed_Integer_Subtype>:
4028         Do not convert the RM bounds to the base type.
4029         (E_Floating_Point_Subtype): Likewise.
4030         (E_Array_Subtype): Convert the bounds to the base type.
4031         * gcc-interface/trans.c (get_type_length): New function.
4032         (Attribute_to_gnu) <Range_Length>: Call it.
4033         <Length>: Likewise.
4034         (Loop_Statement_to_gnu): Convert the bounds to the base type.
4035         (gnat_to_gnu) <N_In>: Likewise.
4036         * gcc-interface/utils.c (make_type_from_size): Do not convert the RM
4037         bounds to the base type.
4038         (create_range_type): Likewise.
4039         (convert): Convert the bounds to the base type for biased types.
4040         * gcc-interface/utils2.c (compare_arrays): Convert the bounds to the
4041         base type.
4043 2014-08-01  Eric Botcazou  <ebotcazou@adacore.com>
4045         * gcc-interface/trans.c (gnat_to_gnu) <N_Selected_Component>: Remove
4046         incorrect implicit type derivation.
4047         * gcc-interface/utils.c (max_size) <tcc_reference>: Convert the bounds
4048         to the base type.
4050 2014-08-01  Hristian Kirtchev  <kirtchev@adacore.com>
4052         * sem_attr.adb (Analyze_Attribute): Preanalyze and resolve the
4053         prefix of attribute Loop_Entry.
4054         * sem_prag.adb (Analyze_Pragma): Verify the placement of pragma
4055         Loop_Variant with respect to an enclosing loop (if any).
4056         (Contains_Loop_Entry): Update the parameter profile and all
4057         calls to this routine.
4058         * sem_res.adb (Resolve_Call): Code reformatting. Do not ask
4059         for the corresponding body before determining the nature of the
4060         ultimate alias's declarative node.
4062 2014-08-01  Robert Dewar  <dewar@adacore.com>
4064         * gnat1drv.adb, sem_ch4.adb: Minor reformatting.
4066 2014-08-01  Robert Dewar  <dewar@adacore.com>
4068         * sem_eval.adb (Rewrite_In_Raise_CE): Don't try to reuse inner
4069         constraint error node since it is a list member.
4071 2014-08-01  Robert Dewar  <dewar@adacore.com>
4073         * sem_warn.adb: Minor reformatting.
4075 2014-08-01  Eric Botcazou  <ebotcazou@adacore.com>
4077         * einfo.adb (Underlying_Type): Return the underlying full view
4078         of a private type if present.
4079         * freeze.adb (Freeze_Entity):
4080         Build a single freeze node for partial, full and underlying full
4081         views, if any.
4082         * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Private_Type>: Add a
4083         missing guard before the access to the Underlying_Full_View.
4084         * gcc-interface/trans.c (process_freeze_entity): Deal with underlying
4085         full view if present.
4086         * gcc-interface/utils.c (make_dummy_type): Avoid superfluous work.
4088 2014-08-01  Ed Schonberg  <schonberg@adacore.com>
4090         * sem_res.adb (Resolve_Entry_Call): When an entry has
4091         preconditions, the entry call is wrapped in a procedure call
4092         that incorporates the precondition checks. To prevent a double
4093         expansion, with possible duplication of extra formals, that
4094         procedure call must only be pre-analyzed and resolved. Expansion
4095         takes place upon return to the caller Resolve_Call.
4097 2014-08-01  Hristian Kirtchev  <kirtchev@adacore.com>
4099         * sem_res.adb (Resolve_Call): Do not perform
4100         GNATprove-specific inlining while within a generic.
4102 2014-08-01  Ed Schonberg  <schonberg@adacore.com>
4104         * sem_ch4.adb (Analyze_Case_Expression): Handle properly a
4105         case expression with incompatible alternatives, when the first
4106         alternative is overloaded.
4108 2014-08-01  Ed Schonberg  <schonberg@adacore.com>
4110         * sem_res.adb (Check_Parameterless_Call): Use Relocate_Node
4111         to create the name of the parameterless call, rather than
4112         New_Copy, to preserve the tree structure when the name is a
4113         complex expression, e.g. a selected component that denotes a
4114         protected operation, whose prefix is itself a selected component.
4116 2014-08-01  Ed Schonberg  <schonberg@adacore.com>
4118         * sem_ch6.adb (Analyze_Subprogram_Body_Helper): Use
4119         Unit_Declaration_Node to retrieve body when inlining, to handle
4120         properly subprogram child units.
4122 2014-08-01  Robert Dewar  <dewar@adacore.com>
4124         * sem_attr.adb: Minor reformatting.
4126 2014-08-01  Vincent Celier  <celier@adacore.com>
4128         * debug.adb: Minor documentation addition for -dn switch.
4130 2014-08-01  Robert Dewar  <dewar@adacore.com>
4132         * sem_aggr.adb, exp_ch9.adb, sem_prag.adb, sem_util.adb,
4133         sem_attr.adb, sem_eval.ads, sem_cat.adb, sem_ch13.adb: Improve
4134         documentation of Is_Static_Expression vs Is_OK_Static_Expression.
4135         In several places, use the Is_OK version as suggested by the spec.
4137 2014-08-01  Vincent Celier  <celier@adacore.com>
4139         * gnatcmd.adb: Revert last change which was not correct.
4141 2014-08-01  Hristian Kirtchev  <kirtchev@adacore.com>
4143         * freeze.adb (Find_Constant): Ensure that the constant being
4144         inspected is still an object declaration (i.e. not a renaming).
4146 2014-08-01  Ed Schonberg  <schonberg@adacore.com>
4148         * sem_ch5.adb (Analyze_Loop_Parameter_Specification): a)
4149         An attribute_reference to Loop_Entry denotes an iterator
4150         specification: its prefix is an object, as is the case for 'Old.
4151         b) If the domain of iteration is an expression whose type has
4152         the Iterable aspect defined, this is an iterator specification.
4154 2014-08-01  Robert Dewar  <dewar@adacore.com>
4156         * gnatcmd.adb: Minor reformatting.
4158 2014-08-01  Robert Dewar  <dewar@adacore.com>
4160         * atree.ads (Info_Messages): New counter.
4161         * err_vars.ads: Minor comment update.
4162         * errout.adb (Delete_Warning_And_Continuations): Deal
4163         with new Info_Messages counter.
4164         (Error_Msg_Internal): ditto.
4165         (Delete_Warning): ditto.
4166         (Initialize): ditto.
4167         (Write_Error_Summary): ditto.
4168         (Output_Messages): ditto.
4169         (To_Be_Removed): ditto.
4170         * erroutc.adb (Delete_Msg): Deal with Info_Messages counter.
4171         (Compilation_Errors): ditto.
4172         * errutil.adb (Error_Msg): Deal with Info_Messages counter.
4173         (Finalize): ditto.
4174         (Initialize): ditto.
4175         * sem_prag.adb (Analyze_Pragma): Minor comment addition.
4176         * gnat_ugn.texi: Document that -gnatwe does not affect info
4177         messages.
4179 2014-08-01  Robert Dewar  <dewar@adacore.com>
4181         * debug.adb: Document debug switch -gnatd.Z.
4182         * sem.adb (Semantics): Force expansion on in no or configurable
4183         run time mode.
4185 2014-08-01  Ed Schonberg  <schonberg@adacore.com>
4187         * sem_ch5.adb (Analyze_Loop_Parameter_Specification): An
4188         unchecked conversion denotes an iterator specification. Such a
4189         conversion will be inserted in the context of an inlined call
4190         when needed, and its argument is always an object.
4192 2014-08-01  Robert Dewar  <dewar@adacore.com>
4194         * make.adb, makeutl.ads: Minor reformatting.
4195         * debug.adb, opt.ads: Clarify documentation of Front_End_Inlining and
4196         Back_End_Inlining.
4198 2014-08-01  Tristan Gingold  <gingold@adacore.com>
4200         * gnatcmd.adb (GNATCmd): Set AAMP_On_Target using command name.
4202 2014-08-01  Javier Miranda  <miranda@adacore.com>
4204         * gnat1drv.adb (Adjust_Global_Switches): Reverse meaning of
4205         -gnatd.z.
4206         * debug.adb: Updating documentation.
4207         * exp_ch6.adb (Expand_Call): Remove assertion.
4209 2014-08-01  Robert Dewar  <dewar@adacore.com>
4211         * sem_aggr.adb, sem_ch3.adb, sem_ch5.adb, sem_util.adb,
4212         sem_res.adb: Minor reformatting.
4214 2014-08-01  Vincent Celier  <celier@adacore.com>
4216         * make.adb (Initialize): Set Keep_Temporary_Files to True when
4217         -dn is specified.
4218         * makeusg.adb: Add line for new switch --keep-temp-files.
4219         * makeutl.ads (Keep_Temp_Files_Option): New constant String.
4220         * opt.ads (Keep_Temporary_Files): Document that it is also used
4221         by gnatmake and gprbuild.
4222         * switch-m.adb: Recognize new switch --keep-temp-files.
4224 2014-08-01  Tristan Gingold  <gingold@adacore.com>
4226         * sem_ch9.adb (Analyze_Task_Type_Declaration): Move code from ...
4227         * exp_ch9.adb (Make_Task_Create_Call): ... here.
4229 2014-08-01  Vincent Celier  <celier@adacore.com>
4231         * gnat1drv.adb: Do not try to get the target parameters when
4232         invoked with -gnats.
4234 2014-08-01  Hristian Kirtchev  <kirtchev@adacore.com>
4236         * exp_ch7.adb (Find_Last_Init): Nothing to do for an object
4237         declaration subject to No_Initialization.
4239 2014-08-01  Ed Schonberg  <schonberg@adacore.com>
4241         * sem_aggr.adb (Resolve_Array_Aggregate): Reject choice that
4242         is a subtype with dynamic predicates, or a non-static subtype
4243         with predicates.
4244         * sem_ch3.adb (Analyze_Number_Declaration): Reject qualified
4245         expression if subtype has a dynamic predicate.
4246         (Constrain_Index): Reject subtype indication if subtype mark
4247         has predicates.
4248         (Inerit_Predicate_Flags): Inherit Has_Predicates as well.
4249         (Make_Index): If index is a subtype indication, itype inhereits
4250         predicate flags for subsequent testing.
4251         * sem_ch5.adb (Analyze_Loop_Parameter_Specification): New
4252         procedure Check_Predicate_Use, to reject illegal uses of domains
4253         of iteration that have dynamic predicates.
4254         * sem_res.adb (Resolve_Slice): Reject slices given by a subtype
4255         indication to which a predicate applies.
4256         * sem_util.adb (Bad_Predicated_Subtype_Use): Add guard to
4257         prevent cascaded errors when subtype is invalid.
4259 2014-08-01  Robert Dewar  <dewar@adacore.com>
4261         * sem_ch10.adb: Minor reformatting.
4263 2014-08-01  Ed Schonberg  <schonberg@adacore.com>
4265         * sem_ch6.adb (Same_Generic_Actual): Make function symmetric,
4266         because either type may be a subtype of the other.
4268 2014-08-01  Vincent Celier  <celier@adacore.com>
4270         * makeusg.adb: Add documentation for debug switch -dn.
4272 2014-08-01  Ed Schonberg  <schonberg@adacore.com>
4274         * sem_dim.adb (Process_Minus, Process_Divide): Label dimension
4275         expression with standard operator and type, for pretty-printing
4276         use, when in ASIS_Mode. When generating code dimensional analysis
4277         is not involved and dimension expressions are handled statically,
4278         and other operators are resolved in the usual way.
4280 2014-08-01  Ed Schonberg  <schonberg@adacore.com>
4282         * sem_ch3.adb (Build_Derived_Record_Type): Remove setting of
4283         Parent_Subtype in ASIS mode, leads to several failures.
4284         * sem_ch4.adb (Analyze_Selected_Component): In an instance,
4285         if the prefix is a type extension, check whether component is
4286         declared in the parent type, possibly in a parent unit. Needed
4287         in ASIS mode when Parent_Subtype is not set.
4289 2014-08-01  Robert Dewar  <dewar@adacore.com>
4291         * sem_prag.adb: Minor reformatting.
4292         * s-regpat.adb: Minor reformatting.
4293         * sem_ch3.adb (Analyze_Object_Declaration): Do not set
4294         Treat_As_Volatile on constants.
4296 2014-08-01  Tristan Gingold  <gingold@adacore.com>
4298         * exp_ch9.adb (Make_Task_Create_Call): Improve error message.
4300 2014-08-01  Ed Schonberg  <schonberg@adacore.com>
4302         * sem_ch10.adb (Analyze_Compilation_Unit): Do not place a
4303         warning on a with_clause created for the renaming of a parent
4304         unit in an explicit with_clause.
4306 2014-08-01  Ed Schonberg  <schonberg@adacore.com>
4308         * sem_ch13.adb (Analyze_Aspect_Specifications, case Aspect_Import):
4309         Set Is_Imported flag at once, to simplify subsequent legality
4310         checks. Reject the aspect on an object whose declaration has an
4311         explicit initial value.
4312         * sem_prag.adb (Process_Import_Or_Interface): Use original node
4313         to check legality of an initial value for an imported entity.
4314         Set Is_Imported flag in case of error to prevent cascaded errors.
4315         Do not set the Is_Imported flag if the pragma comes from an
4316         aspect, because it is already done when analyzing the aspect.
4318 2014-08-01  Emmanuel Briot  <briot@adacore.com>
4320         * g-regpat.adb (Parse): Add support for non-capturing parenthesis.
4322 2014-08-01  Robert Dewar  <dewar@adacore.com>
4324         * sem_ch7.adb, einfo.adb, einfo.ads, sem_ch13.adb: Minor change of
4325         identifier name.
4327 2014-08-01  Hristian Kirtchev  <kirtchev@adacore.com>
4329         * sem_ch3.adb (Analyze_Object_Contract): Enable the volatility
4330         checks when the related variable comes from source.
4331         * sem_res.adb (Resolve_Actuals): Enable the volatility checks
4332         when the related actual parameter comes from source. Update comment.
4333         * freeze.adb (Freeze_Record_Type): Do not freeze the designated
4334         type of an array of pointers when the designated type is
4335         class-wide and its root type is the record being currently frozen.
4337 2014-08-01  Ed Schonberg  <schonberg@adacore.com>
4339         * sem_ch5.adb (Analyze_Iterator_Specification): Preserve Ekind
4340         of renaming declaration created for domain of iteration.
4341         * sem_aggr.adb (Resolve_Array_Aggregate): Better placement
4342         for error messages on aggregates whose index subtypes have
4343         predicates. The new placement avoids posting messages on previous
4344         subtype declarations rather than on the aggregate itself.
4345         * sem_disp.adb (Is_Inherited_Public_Operation): New predicate for
4346         Add_Dispatching_Operation, to handle properly the overriding of
4347         the predefined operations on controlled types, when the partial
4348         view of a type is not visibly controlled.
4350 2014-08-01  Ben Brosgol  <brosgol@adacore.com>
4352         * gnat_ugn.texi: Add tutorial on portable fixed-point types as an
4353         appendix.
4355 2014-08-01  Hristian Kirtchev  <kirtchev@adacore.com>
4357         * einfo.adb (Is_Hidden_Non_Overridden_Subprogram): Remove the
4358         assertion check as the attribute is defined for all entities.
4359         (Set_Is_Hidden_Non_Overridden_Subprogram): Remove the assertion
4360         check as the attribute is defined for all entities.
4361         * einfo.ads Update the documentation of attribute
4362         Is_Hidden_Non_Overridden_Subprogram.
4363         * sem_ch7.adb (Install_Package_Entity): No need to check the
4364         entity kind of the Id.
4365         * sem_ch13.adb (Hide_Matching_Homograph): Update the comment on
4366         usage. Ensure that the homographs are of the same entity kind
4367         and not fully conformant.
4368         (Hide_Non_Overridden_Subprograms): Update the comment on usage.
4370 2014-08-01  Robert Dewar  <dewar@adacore.com>
4372         * inline.adb: Minor code reorganization.
4373         * sem_ch12.adb, s-tasdeb.ads: Minor reformatting.
4375 2014-08-01  Robert Dewar  <dewar@adacore.com>
4377         * inline.adb, s-os_lib.ads: Minor reformatting.
4379 2014-08-01  Arnaud Charlet  <charlet@adacore.com>
4381         * s-tasdeb.ads, s-tasdeb.adb (Master_Hook, Master_Completed_Hook): New.
4382         * s-tassta.adb (Task_Wrapper, Vulnerable_Complete_Master): Call new
4383         hooks.
4385 2014-08-01  Yannick Moy  <moy@adacore.com>
4387         * inline.adb (Cannot_Inline): Issue info message instead of
4388         warning for subprograms not inlined in GNATprove mode.
4389         * sem_res.adb (Resolve_Call): Take body into account for deciding
4390         whether subprogram can be inlined in GNATprove mode or not.
4392 2014-08-01  Claire Dross  <dross@adacore.com>
4394         * exp_util.ads (Get_First_Parent_With_Ext_Axioms_For_Entity): Renaming
4395         of Get_First_Parent_With_External_Axiomatization_For_Entity for
4396         shorter.
4397         * sem_ch12.adb (Analyze_Associations): Only call Build_Wrapper
4398         for parameters of packages with external axiomatization.
4400 2014-08-01  Robert Dewar  <dewar@adacore.com>
4402         * sem_res.adb: Minor comment addition.
4404 2014-08-01  Arnaud Charlet  <charlet@adacore.com>
4406         * s-crtl.ads, i-cstrea.ads, adaint.c, adaint.h, osint.adb,
4407         s-fileio.adb (__gnat_fopen, __gnat_freopen): Remove vms_form parameter,
4408         no longer used.
4409         * s-os_lib.ads: Minor reformatting.
4411 2014-08-01  Arnaud Charlet  <charlet@adacore.com>
4413         * exp_attr.adb (Is_Inline_Floating_Point_Attribute): Restore more
4414         completely previous code since only GCC back-ends are prepared
4415         to handle e.g. 'Machine attribute.
4416         * targparm.adb, targparm.ads: Remove remaining refs and
4417         handling of OpenVMS_On_Target, VAX_Float_On_Target and
4418         RTX_RTSS_Kernel_Module_On_Target.
4419         * hostparm.ads (OpenVMS, Max_Debug_Name_Length): Removed,
4420         no longer used.
4422 2014-08-01  Robert Dewar  <dewar@adacore.com>
4424         * exp_dist.adb, exp_attr.adb: Minor reformatting.
4425         * sem_ch3.adb, mlib-tgt-specific-hpux.adb, a-direct.ads,
4426         a-synbar-posix.adb, exp_ch9.adb, sem_ch10.adb, sem_prag.adb,
4427         sem_ch12.adb, sem.ads, sem_res.adb, s-exctra.adb, s-soflin.ads,
4428         g-alveop.ads, sem_ch8.adb, vxaddr2line.adb, sem_cat.ads: Remove
4429         improper use of shall.
4431 2014-08-01  Robert Dewar  <dewar@adacore.com>
4433         * sem_aggr.adb, exp_atag.adb, layout.adb, nlists.adb, nlists.ads,
4434         exp_attr.adb, exp_ch9.adb, par-ch12.adb, exp_aggr.adb,
4435         exp_ch3.adb: Minor reformatting & code reorganization.
4437 2014-08-01  Robert Dewar  <dewar@adacore.com>
4439         * gnat_rm.texi: Remove VMS specific rules for pragma Ident.
4440         * Makefile.rtl, adaint.c, gnat_rm.texi, s-asthan.adb, s-asthan.ads,
4441         s-filofl.ads, s-fishfl.ads, s-fvadfl.ads, s-fvaffl.ads, s-fvagfl.ads,
4442         s-po32gl.adb, s-po32gl.ads, s-vaflop.adb, s-vaflop.ads, s-vmexta.adb,
4443         s-vmexta.ads, sem_vfpt.adb, sem_vfpt.ads, socket.c: Remove VMS specific
4444         code.
4445         * gcc-interface/decl.c, gcc-interface/Makefile.in,
4446         gcc-interface/Make-lang.in: Ditto. Also remove refs to rTX.
4448 2014-08-01  Pascal Obry  <obry@adacore.com>
4450         * s-os_lib.ads: Rename File_Size to Large_File_Size.
4452 2014-08-01  Robert Dewar  <dewar@adacore.com>
4454         * a-numaux-vxworks.ads, a-numaux-x86.adb, a-numaux-x86.ads,
4455         a-numaux-darwin.adb, a-numaux-darwin.ads, a-numaux.ads,
4456         a-numaux-libc-x86.ads: Fix bad package header comments.
4457         * elists.ads, elists.adb (Append_New_Elmt): New procedure.
4458         * gnat_rm.texi, a-calend.adb, gnatcmd.adb, einfo.adb, einfo.ads,
4459         checks.adb, sem_prag.adb, sem_prag.ads, rtsfind.ads, freeze.adb,
4460         sem_util.adb, sem_attr.adb, exp_dbug.adb, exp_dbug.ads, gnat1drv.adb,
4461         targparm.adb, targparm.ads, exp_ch6.adb, switch-b.adb, s-shasto.ads,
4462         stand.ads, s-auxdec.ads, opt.adb, opt.ads, mlib-tgt.ads, s-fatgen.adb,
4463         s-fatgen.ads, system.ads, snames.ads-tmpl, s-stalib.ads,
4464         s-os_lib.adb: Remove VMS-specific code.
4466 2014-08-01  Arnaud Charlet  <charlet@adacore.com>
4468         * exp_attr.adb (Is_Inline_Floating_Point_Attribute): Revert to
4469         previous state in CodePeer_Mode.
4471 2014-08-01  Robert Dewar  <dewar@adacore.com>
4473         * hostparm.ads: Put back definition of OpenVMS as False to aid
4474         the transition process.
4475         * sem_ch7.adb: Minor reformatting.
4476         * prj-env.adb: Minor code fix.
4477         * gnat_rm.texi: Complete previous change.
4478         * sem_ch3.adb: Minor reformatting.
4479         * sem_ch6.adb: Minor reformatting.
4480         * sem_elab.adb: Minor reformatting.
4481         * exp_strm.adb: Complete previous change.
4483 2014-08-01  Vincent Celier  <celier@adacore.com>
4485         * sem_warn.adb (Warn_On_Unreferenced_Entity): Do not issue a
4486         warning when a constant is unreferenced and its type has pragma
4487         Unreferenced_Objects.
4489 2014-08-01  Hristian Kirtchev  <kirtchev@adacore.com>
4491         * einfo.adb: Flag2 is now known as
4492         Is_Hidden_Non_Overridden_Subprogram.
4493         (Is_Hidden_Non_Overridden_Subprogram): New routine.
4494         (Set_Is_Hidden_Non_Overridden_Subprogram): New routine.
4495         (Write_Entity_Fields): Output Flag2.
4496         * einfo.ads: New attribute Is_Hidden_Non_Overridden_Subprogram
4497         along with occurrences in entities.
4498         (Is_Hidden_Non_Overridden_Subprogram): New routine and pragma Inline.
4499         (Set_Is_Hidden_Non_Overridden_Subprogram): New routine
4500         and pragma Inline.
4501         * sem_ch7.adb (Install_Package_Entity): Do not enter implicitly
4502         declared non-overriden homographs into visibility.
4503         * sem_ch13.adb (Freeze_Entity_Checks): Hide all
4504         implicitly declared non-overriden homographs.
4505         (Hide_Non_Overridden_Subprograms): New routine.
4507 2014-08-01  Robert Dewar  <dewar@adacore.com>
4509         * snames.ads-tmpl, s-os_lib.adb, s-os_lib.ads, s-fileio.adb: Remove
4510         VMS-specific code.
4511         * prj-conf.adb: Minor reformatting.
4512         * xr_tabls.adb (Read_File): Restore code which was enabled on
4513         non VMS platforms before.
4514         * prj-env.adb (Initialize_Default_Project_Path): Ditto.
4515         * sem_ch5.adb: Minor reformatting.
4516         * lib-writ.adb, lib-writ.ads, bindgen.adb, sem_vfpt.adb,
4517         sem_vfpt.ads, ali.adb, ali.ads, opt.ads, bcheck.adb, exp_strm.adb:
4518         Remove VMS-specific code.
4520 2014-08-01  Vincent Celier  <celier@adacore.com>
4522         * make.adb (Await_Compile): Remove loop that was only needed
4523         for VMS.
4525 2014-08-01  Robert Dewar  <dewar@adacore.com>
4527         * a-calcon.ads, a-direct.adb, a-dirval-mingw.adb, a-dirval.adb,
4528         a-dirval.ads, a-except-2005.adb, a-excpol-abort.adb,
4529         a-numaux-darwin.ads, a-numaux.ads, bindgen.adb, bindusg.adb,
4530         einfo.adb, einfo.ads, err_vars.ads, errout.ads, errutil.adb,
4531         exp_ch3.adb, exp_ch4.adb, exp_ch7.adb, exp_ch7.ads, fname-uf.adb,
4532         fname.adb, fname.ads, freeze.adb, g-debpoo.adb, g-dirope.ads,
4533         g-excact.ads, g-expect.ads, g-socket.adb, g-socket.ads, g-sothco.ads,
4534         g-traceb.ads, gnat_rm.texi, gnatlink.adb, gnatls.adb, i-cstrea.adb,
4535         krunch.adb, krunch.ads, layout.adb, lib-util.adb, make.adb,
4536         mlib.adb, osint-b.adb, osint-b.ads, osint-c.adb, osint.adb,
4537         osint.ads, output.ads, par.adb, prj-conf.adb, prj-env.adb,
4538         prj-makr.adb, prj-nmsc.adb, prj.adb, prj.ads, repinfo.adb, rtsfind.adb,
4539         rtsfind.ads, s-excmac-gcc.ads, s-fatgen.adb, s-mastop.ads,
4540         s-parame-ae653.ads, s-parame-hpux.ads, s-parame-vxworks.ads,
4541         s-parame.ads, s-soflin.ads, s-stoele.adb, s-tasini.adb,
4542         s-taspri-dummy.ads, s-taspri-hpux-dce.ads, s-taspri-mingw.ads,
4543         s-taspri-posix-noaltstack.ads, s-taspri-posix.ads,
4544         s-taspri-solaris.ads, s-taspri-vxworks.ads, s-trasym.ads,
4545         sem_ch12.adb, sem_ch4.adb, sem_eval.adb, sem_intr.adb, sem_mech.adb,
4546         sem_mech.ads, sem_prag.adb, sem_res.adb, sem_util.adb, sem_util.ads,
4547         sinfo.adb, sinfo.ads, sinput-c.adb, symbols.ads, targparm.adb,
4548         treepr.adb, types.ads, xr_tabls.adb, xr_tabls.ads: Remove VMS
4549         specific code and comments.
4551 2014-08-01  Ed Schonberg  <schonberg@adacore.com>
4553         * sem_ch5.adb (Analyze_Iterator_Specification): New procedure
4554         Check_Reverse_Iteration, to verify the legality of the Reverse
4555         indicator on various container types, and to detect illegal
4556         reverse iterations on containers that only supoort forward
4557         iteration.
4559 2014-08-01  Vincent Celier  <celier@adacore.com>
4561         * gnatcmd.adb: Remove the VMS specific stuff.  Integrate in
4562         procedure GNATCmd the relevant declarations from packages VMS_Cmds
4563         and VMS_Conv.
4564         * gnatcmd.ads: Update comments to remove any trace of VMS
4566 2014-08-01  Ed Schonberg  <schonberg@adacore.com>
4568         * sem_ch12.adb: sem_ch12.adb (Build_Wrapper): Capture entity for
4569         defaulted actual that is an operator, before building wrapper
4570         for it in GNATprove mode. Restrict construction of wrapper to
4571         actuals that are operators.
4573 2014-08-01  Vincent Celier  <celier@adacore.com>
4575         * vms_conv.adb, vms_conv.ads, vms_data.ads, vms_cmds.ads: Remove VMS
4576         specific packages no longer needed.
4578 2014-08-01  Pascal Obry  <obry@adacore.com>
4580         * s-os_lib.ads (System.CRTL): Move with clause to body.
4581         (File_Size): New type.
4582         (File_Length64): Use it.
4583         (File_Length): Restore previous spec returning a Long_Integer.
4584         * s-os_lib.adb (System.CRTL): Move with clause here.
4586 2014-08-01  Vincent Celier  <celier@adacore.com>
4588         * mlib-prj.adb: Update comments to remove any mention of VMS.
4590 2014-08-01  Arnaud Charlet  <charlet@adacore.com>
4592         * ug_words, xgnatugn.adb, gcc-interface/Make-lang.in: Remove
4593         xgnatugn.adb and ug_words.
4595 2014-08-01  Eric Botcazou  <ebotcazou@adacore.com>
4597         * exp_attr.adb (Expand_N_Attribute_Reference): Check whether
4598         expansion can be avoid for Machine, Model and Rounding.
4599         (Is_Inline_Floating_Point_Attribute): Return true for Machine
4600         & Model, as well as Rounding if wrapped in a conversion to an
4601         integer type.
4602         * sem_res.adb (Simplify_Type_Conversion): Deal with Rounding as well.
4603         * gcc-interface/gigi.h (fp_arith_may_widen): Declare.
4604         * gcc-interface/utils.c (fp_arith_may_widen): New global variable.
4605         * gcc-interface/misc.c (enumerate_modes): Compute it.
4606         * gcc-interface/trans.c (FP_ARITH_MAY_WIDEN): Delete.
4607         (lvalue_required_for_attribute_p): Deal with Descriptor_Size,
4608         Machine and Model.
4609         (Attribute_to_gnu) <Attr_Model>: New case.
4610         <Attr_Machine>): Likewise.
4611         (convert_with_check): Test
4612         fp_arith_may_widen variable.
4614 2014-08-01  Pascal Obry  <obry@adacore.com>
4616         * adaint.h (GNAT_FOPEN): New definition for Windows.
4617         (GNAT_OPEN): Likewise.
4618         (GNAT_STAT): Likewise.
4619         (GNAT_FSTAT): Likewise.
4620         (GNAT_LSTAT): Likewise.
4621         (GNAT_STRUCT_STAT): Likewise.
4622         * adaint.c (__gnat_stat): Fix computation of file size for
4623         Windows.
4625 2014-08-01  Vincent Celier  <celier@adacore.com>
4627         * Makefile.rtl: Minor comment update.
4629 2014-08-01  Vincent Celier  <celier@adacore.com>
4631         * Make-generated.in: Remove dependencies for vms-help.
4633 2014-08-01  Gary Dismukes  <dismukes@adacore.com>
4635         * makeutl.ads, opt.ads: Minor grammar fixes.
4636         * makeutl.adb: Minor code reorganization.
4638 2014-08-01  Arnaud Charlet  <charlet@adacore.com>
4640         * gcc-interface/Makefile.in, gcc-interface/Make-lang.in,
4641         gnatsym.adb: Remove gnatsym (VMS only tool).
4643 2014-08-01  Ben Brosgol  <brosgol@adacore.com>
4645         * gnat_ugn.texi, projects.texi, xgnatugn.adb: Removed all VMS
4646         conditionalization from gnat_ugn.texi and projects.texi, and updated
4647         (considerably simplified) xgnatugn.adb, to be removed soon.
4649 2014-08-01  Vincent Celier  <celier@adacore.com>
4651         * debug.adb: Remove doc for gnatmake/gprbuild switch -ds.
4652         * make.adb (List_Bad_Compilations): Use Opt.No_Exit_Message
4653         instead of Debug.Debug_Flag_S.
4654         * makeutl.adb (Finish_Program, Fail_Program): Use Opt flag
4655         No_Exit_Message instead of Debug.Debug_Flag_S to suppress exit
4656         error messages.
4657         * makeutl.ads (No_Exit_Message_Option): New constant string
4658         for switch --no-exit-message.
4659         * opt.ads (No_Exit_Message): New Boolean flag, defaulted to False.
4660         * switch-m.adb (Scan_Make_Switches): Recognize new switch
4661         --no-exit-message.
4663 2014-08-01  Arnaud Charlet  <charlet@adacore.com>
4665         * exp_vfpt.adb, exp_vfpt.ads: Removed, no longer used.
4666         * gcc-interface/Make-lang.in: Remove exp_vfpt.o
4668 2014-08-01  Javier Miranda  <miranda@adacore.com>
4670         * inline.ads (Inlined_Calls, Backend_Calls,
4671         Backend_Inlined_Subps, Backend_Not_Inlined_Subps): Declarations
4672         moved to inline.adb (Cannot_Inline): Update documentation.
4673         (Check_And_Build_Body_To_Inline): Renamed.
4674         (List_Inlining_Info): Subprogram moved here from package exp_ch6.
4675         * inline.adb (Check_Inlining_Restrictions): New local variable.
4676         (Inlined_Calls, Backend_Calls, Backend_Inlined_Subps,
4677         Backend_Not_Inlined_Subps): Declarations moved here
4678         from inline.ads (Number_Of_Statements): Removed.
4679         (Remove_Pragmas): Avoid duplicated version of this subprogram.
4680         (Build_Body_To_Inline): Code cleanup.
4681         (Build_Body_To_Inline.Has_Excluded_Statament): Removed.
4682         (Check_And_Build_Body_To_Inline): Renamed. Code cleanup.
4683         (Check_Body_To_Inline): Removed.
4684         (Generate_Body_To_Inline): Renamed as Generate_Subprogram_Body.
4685         (Has_Excluded_Declaration): No action if not
4686         Check_Inlining_Restrictions.
4687         (Has_Excluded_Statement): No action if not Check_Inlining_Restrictions.
4688         (Initialize): Initialize the lists of inlined calls and subprograms.
4689         (List_Inlining_Info): Subprogram moved here from package exp_ch6.
4690         * sem_ch6.adb (Analyze_Subprogram_Body_Helper): Update call
4691         to Check_And_Build_Body_To_Inline since it has been renamed as
4692         Check_And_Split_Unconstrained_Function
4693         * exp_ch6.ad[sb] (List_Inlining_Info): Subprogram moved to
4694         package inline.
4695         * gnat1drv.adb Update call to Inline.List_Inlining_Info.
4697 2014-08-01  Vincent Celier  <celier@adacore.com>
4699         * debug.adb: Add documentation for new debug switch -ds.
4700         * make.adb (List_Bad_Compilations): Do not issue any message
4701         when switch -ds is specified.
4702         * makeutl.adb (Fail_Program): Do not issue any message when
4703         -ds is specified.
4704         (Finish_Program): Ditto.
4706 2014-08-01  Robert Dewar  <dewar@adacore.com>
4708         * s-exnint.adb, s-exnint.ads, s-wwdwch.ads, s-carsi8.ads,
4709         s-casi32.ads, indepsw.adb, a-timoau.ads, s-explli.adb, s-explli.ads,
4710         s-casi16.ads, s-powtab.ads, g-wistsp.ads, a-ztmoau.adb,
4711         indepsw-gnu.adb, s-imgllb.ads, types.adb, gnat.ads, s-proinf.adb,
4712         indepsw-aix.adb, s-caun64.ads, s-imgllw.ads, s-traces-default.adb,
4713         s-vxwork-x86.ads, s-expllu.adb, s-exnlli.adb, s-exnlli.ads,
4714         s-traces.adb, widechar.ads, stand.adb, s-expint.adb,
4715         s-tratas-default.adb, s-expint.ads, s-geveop.ads, s-caun32.ads,
4716         s-expuns.adb, s-mantis.adb, s-mantis.ads, s-caun16.ads, s-tasinf.adb,
4717         s-memcop.ads, s-dsaser.ads, s-imgbiu.ads, a-szmzco.ads, g-strspl.ads,
4718         s-casi64.ads, g-zstspl.ads, indepsw-mingw.adb, tree_io.adb,
4719         s-boarop.ads, uname.ads, s-fore.adb, s-fore.ads, g-timsta.adb,
4720         g-timsta.ads, s-assert.adb, s-vector.ads, s-tratas.adb,
4721         s-tratas.ads: Minor fix to copyright notices.
4723 2014-08-01  Eric Botcazou  <ebotcazou@adacore.com>
4725         * sinfo.ads: Remove long obsolete comment.
4726 2014-08-01  Ed Schonberg  <schonberg@adacore.com>
4728         * sem_util.adb: Add guard to setting of No_Predicate_On_Actual.
4729         * sem_ch3.adb: Minor reformatting.
4731 2014-08-01  Pascal Obry  <obry@adacore.com>
4733         * cstreams.c: Only enable large file support on know supported
4734         platforms. Add missing defines/includes.
4736 2014-08-01  Ed Schonberg  <schonberg@adacore.com>
4738         * einfo.ads, einfo.adb New flags No_Predicate_On_Actual and
4739         No_Dynamic_Predicate_On_Actual, to enforce the generic contract
4740         on generic units that contain constructs that forbid subtypes
4741         with predicates.
4742         * sem_ch3.adb (Analyze_Subtype_Declaration, Process_Subtype):
4743         Inherit flags indicating the presence of predicates in subtype
4744         declarations with and without constraints.
4745         (Inherit_Predicate_Flags): Utility for the above.
4746         * sem_util.adb (Bad_Predicated_Subtype_Use): In a generic context,
4747         indicate that the actual cannot have predicates, and preserve
4748         warning. In an instance, report error if actual has predicates
4749         and the construct appears in a package declaration.
4750         * sem_ch12.adb (Diagnose_Predicated_Actual): Report error
4751         for an actual with predicates, if the corresponding formal
4752         carries No_Predicate_On_Actual or (in the case of a loop)
4753         No_Dynamic_Predicate_On_Actual.
4754         * sem_ch13.adb (Build_Predicate_Functions); Do not build a
4755         Static_Predicate function if the type is non-static (in the
4756         presence of previous errors),
4757         * sem_ch5.adb (Analyze_Loop_Parameter_Specification): Set flag
4758         No_Dynamic_Predicate_On_Actual in a generic context, to enforce
4759         generic contract on actuals that cannot have predicates.
4761 2014-08-01  Pascal Obry  <obry@adacore.com>
4763         * a-direct.adb (C_Size): Returns an int64.
4764         * osint.adb (System.CRTL): New with clause.
4765         (File_Length.Internal): Returns an int64.
4766         * s-os_lib.ads (File_Length): Returns an int64.
4768 2014-08-01  Robert Dewar  <dewar@adacore.com>
4770         * gnatchop.adb, gnatcmd.adb, make.adb, mlib-prj.adb, bindgen.adb,
4771         mlib.ads, butil.adb, clean.adb, binde.adb, gnatls.adb, gnatname.adb,
4772         osint.adb, krunch.adb: Minor reformatting.
4774 2014-08-01  Robert Dewar  <dewar@adacore.com>
4776         * inline.adb, inline.ads, fe.h, einfo.adb, einfo.ads, sem_util.adb,
4777         sem_util.ads, exp_ch4.adb, exp_ch11.adb, exp_ch6.adb, cstand.adb,
4778         sem_mech.adb, sem_ch6.adb, sem_ch8.adb, sem_ch11.adb, snames.ads-tmpl:
4779         Remove VMS-specific code.
4780         * gcc-interface/decl.c, gcc-interface/trans.c: Ditto.
4782 2014-08-01  Arnaud Charlet  <charlet@adacore.com>
4784         * binde.adb, bindgen.adb, butil.adb, clean.adb, gnatbind.adb,
4785         gnatchop.adb, gnatcmd.adb, gnatls.adb, gnatname.adb, krunch.adb,
4786         make.adb, makeutl.adb, memtrack.adb, mlib-prj.adb, mlib.adb,
4787         mlib.ads, tempdir.adb: Remove VMS handling.
4789 2014-08-01  Pascal Obry  <obry@adacore.com>
4791         * adaint.h, adaint.c (__gnat_file_length): Returns an __int64.
4792         (__gnat_named_file_length): Likewise.
4793         (__gnat_file_length_attr): Likewise.
4794         * a-direct.adb (C_Size): Use size_t as returned type.
4795         * osint.adb (File_Length): Adjust spec for Internal routine
4796         (returns size_t).
4797         * s-os_lib.adb (File_Length): Now returns a CRTL.size_t.
4798         (System.CRTL): With claused moved to spec.
4799         * s-os_lib.ads (System.CRTL): With clause moved to here.
4801 2014-08-01  Pascal Obry  <obry@adacore.com>
4803         * adaint.h, adaint.c (__gnat_open): Added.
4804         * s-crtl.ads (open): Import __gnat_open for large file support.
4806 2014-08-01  Robert Dewar  <dewar@adacore.com>
4808         * sem_case.adb (Dup_Choice): Improve message for integer constants.
4810 2014-08-01  Arnaud Charlet  <charlet@adacore.com>
4812         * gnatlink.adb: Remove special handling of VMS, RTX and JVM.
4814 2014-08-01  Pascal Obry  <obry@adacore.com>
4816         * adaint.h (GNAT_OPEN): Defines as open64 where supported.
4817         * adaint.c (GNAT_OPEN): Uses new macro where needed.
4819 2014-07-31  Eric Botcazou  <ebotcazou@adacore.com>
4821         * gcc-interface/utils.c (lookup_and_insert_pad_type): New function
4822         extracted from...
4823         (maybe_pad_type): ...here.  Call it to canonicalize the pad type.
4824         * gcc-interface/gigi.h: Update comment.
4826 2014-07-31  Javier Miranda  <miranda@adacore.com>
4828         * debug.adb Remove documentation of -gnatd.k (no longer needed).
4829         * sem_ch6.adb (Analyze_Subprogram_Body_Helper): Code cleanup.
4830         * inline.ads (Backend_Inlined_Subps): New
4831         Elist.  (Backend_Not_Inlined_Subps): New Elist.
4832         (Has_Excluded_Declaration): Declaration previously located in
4833         * inline.adb (Has_Excluded_Statement): Declaration previously
4834         located in inline.adb
4835         * inline.adb (Has_Single_Return): Moved out of
4836         Build_Body_To_Inline to avoid having duplicated code.
4837         (Number_Of_Statements): New subprogram.
4838         (Register_Backend_Inlined_Subprogram): New subprogram.
4839         (Register_Backend_Not_Inlined_Subprogram): New subprogram.
4840         (Add_Inlined_Subprogram): Register backend inlined subprograms and
4841         also register subprograms that cannot be inlined by the backend.
4842         (Has_Excluded_Declaration): Moved out of Build_Body_To_Inline
4843         to avoid having duplicated code.  Replace occurrences of
4844         Debug_Flag_Dot_K by Back_End_Inlining.
4845         * sem_res.adb (Resolve_Call): Code cleanup.
4846         * exp_ch6.adb (Expand_Call): Complete previous patch. Replace
4847         occurrence of Debug_Flag_Dot_K by Back_End_Inlining.
4848         (List_Inlining_Info): Add listing of subprograms passed to the
4849         backend and listing of subprograms that cannot be inlined by
4850         the backend.
4851         * sem_ch12.adb, sem_ch3.adb Replace occurrences of
4852         Debug_Flag_Dot_K by Back_End_Inlining.
4854 2014-07-31  Robert Dewar  <dewar@adacore.com>
4856         * nlists.ads: Minor code fix (remove unwise Inline for
4857         List_Length).
4859 2014-07-31  Arnaud Charlet  <charlet@adacore.com>
4861         * einfo.adb: Remove VMS specific code.
4862         * exp_attr.adb: Remove VAX specific code.
4863         * set_targ.adb: Remove handling of VAX_Float.
4864         * sem_vfpt.adb: Remove references to Vax_Native.
4865         * sem_attr.adb (Is_VAX_Float): Remove ref to VAX_Native.
4867 2014-07-31  Robert Dewar  <dewar@adacore.com>
4869         * sem_ch4.adb: Minor reformatting.
4871 2014-07-31  Arnaud Charlet  <charlet@adacore.com>
4873         * gcc-interface/trans.c, gcc-interface/misc.c: Remove references
4874         to VMS. Misc clean ups.
4875         * gcc-interface/Makefile.in (gnatlib-shared-vms): Remove.
4877 2014-07-31  Robert Dewar  <dewar@adacore.com>
4879         * cstand.adb, einfo.adb, einfo.ads, errout.adb, exp_attr.adb,
4880         exp_prag.adb, frontend.adb, interfac.ads,
4881         par-prag.adb, s-auxdec.ads, s-filofl.ads, s-fishfl.ads, s-fvadfl.ads,
4882         s-fvaffl.ads, s-fvagfl.ads, s-vaflop.ads, sem_attr.adb, sem_attr.ads,
4883         sem_ch13.adb, sem_ch3.adb, sem_ch8.adb, sem_prag.adb, snames.adb-tmpl,
4884         snames.ads-tmpl: Remove obsolete VMS-specific code.
4886 2014-07-31  Robert Dewar  <dewar@adacore.com>
4888         * sem_ch3.adb, sem_ch13.adb: Minor reformatting.
4890 2014-07-31  Arnaud Charlet  <charlet@adacore.com>
4892         * a-intnam-linux.ads: Minor: update obsolete comments.
4893         * s-taasde.adb: Minor: fix comment header.
4895 2014-07-31  Arnaud Charlet  <charlet@adacore.com>
4897         * s-auxdec-vms-ia64.adb, s-parame-vms-alpha.ads, s-asthan-vms-alpha.adb,
4898         s-tpopde-vms.adb, s-mastop-vms.adb, s-tpopde-vms.ads, s-taprop-vms.adb,
4899         mlib-tgt-vms_common.adb, mlib-tgt-vms_common.ads, s-inmaop-vms.adb,
4900         g-enblsp-vms-alpha.adb, s-ransee-vms.adb, s-osprim-vms.adb,
4901         s-osprim-vms.ads, g-socthi-vms.adb, g-socthi-vms.ads, system-vms_64.ads,
4902         s-osinte-vms.adb, s-osinte-vms.ads, g-eacodu-vms.adb,
4903         s-vaflop-vms-alpha.adb, s-parame-vms-ia64.ads, a-dirval-vms.adb,
4904         a-caldel-vms.adb, mlib-tgt-specific-vms-alpha.adb, s-tasdeb-vms.adb,
4905         symbols-vms.adb, a-intnam-vms.ads, g-expect-vms.adb,
4906         symbols-processing-vms-alpha.adb, mlib-tgt-specific-vms-ia64.adb,
4907         s-traent-vms.adb, s-traent-vms.ads, i-cstrea-vms.adb, a-numaux-vms.ads,
4908         symbols-processing-vms-ia64.adb, s-interr-vms.adb, s-memory-vms_64.adb,
4909         s-memory-vms_64.ads, g-enblsp-vms-ia64.adb, s-taspri-vms.ads,
4910         s-auxdec-vms_64.ads, s-intman-vms.adb, s-intman-vms.ads,
4911         s-tpopsp-vms.adb, s-asthan-vms-ia64.adb, a-calend-vms.adb,
4912         a-calend-vms.ads, system-vms-ia64.ads, s-auxdec-vms-alpha.adb: Removed.
4913         * namet.h (Is_Non_Ada_Error): Remove.
4915 2014-07-31  Robert Dewar  <dewar@adacore.com>
4917         * exp_util.adb, lib-writ.adb, sem_ch12.adb, s-direio.adb: Minor
4918         reformatting.
4920 2014-07-31  Hristian Kirtchev  <kirtchev@adacore.com>
4922         * exp_attr.adb (Expand_Loop_Entry_Attribute): Update the comment
4923         which demonstrates the expansion of while loops subject to
4924         attribute 'Loop_Entry. The condition of a while loop along with
4925         related condition actions is now wrapped in a function.  Instead
4926         of repeating the condition, the expansion now calls the function.
4928 2014-07-31  Ed Schonberg  <schonberg@adacore.com>
4930         * sem_case.adb (Check_Against_Predicate): Correct off-by-one
4931         error when reporting of missing values in a case statement for
4932         a type with a static predicate.
4933         (Check_Choices): Reject a choice given by a subtype to which a
4934         Dynamic_Predicate applies.
4935         * sem_ch3.adb (Analyze_Subtype_Declaration): Inherit
4936         Has_Dynamic_Predicate_Aspect flag from parent.
4938 2014-07-31  Ed Schonberg  <schonberg@adacore.com>
4940         * sem_ch13.adb (Analyze_Aspect_Specifications): A predicate
4941         cannot apply to a subtype of an incomplete type.
4942         (Is_Static_Choice): Treat an Others_Clause as static. The
4943         staticness of the expression and of the range are checked
4944         elsewhere.
4946 2014-07-31  Pascal Obry  <obry@adacore.com>
4948         * adaint.h (__gnat_ftell64): Added.
4949         (__gnat_fseek64): Added.
4950         (__int64): Added.
4951         * cstreams.c (__int64): Removed.
4953 2014-07-31  Pascal Obry  <obry@adacore.com>
4955         * a-stream.ads (Stream_Element_Offset): Now a signed 64bit type.
4956         * i-cstrea.ads, s-crtl.ads (fseek64): Offset is always a 64bit value.
4957         (ftell64): Always returns a 64bit value.
4958         * cstreams.c (int64): New definition.
4959         (_FILE_OFFSET_BITS): Set to 64 to enable 64bit offset support.
4960         (__gnat_ftell64): Always returns a 64bit value. The implemenation now
4961         uses ftello() on UNIX.
4962         (__gnat_fseek64): Offset is always a 64bit value. The
4963         implementation now uses fseeko() on UNIX.
4964         * a-ststio.adb, s-direio.adb (Set_Position): Simplify code,
4965         always use fseek64 to set the offset.
4966         (Size): Simplify code, always use fseek64/ftell64.
4967         * s-direio.ads (Count): Now an int64.
4968         * g-socket.ads (Vector_Element): Adjust definition for Length
4969         to be a size_t. This matches the C definition and avoid using
4970         a 64bit integer on 32bit platforms now that Count is always 64bit.
4971         * g-socthi-mingw.adb (Ada.Streams): Removed as not used anymore.
4972         (C_Recvmsg): Change some conversion to account for change in
4973         Vector_Element.
4974         (C_Sendmsg): Likewise.
4976 2014-07-31  Robert Dewar  <dewar@adacore.com>
4978         * cstand.adb (Create_Standard): Remove handling of -gnatdm flag.
4979         * debug.adb: Remove documentation of -gnatdm flag.
4980         * gnat1drv.adb (Adjust_Global_Switches): Remove handling of
4981         -gnatdm flag.
4983 2014-07-31  Arnaud Charlet  <charlet@adacore.com>
4985         * lib-writ.adb (Write_Unit_Information): Fix case where U =
4986         No_Unit.
4988 2014-07-31  Claire Dross  <dross@adacore.com>
4990         * exp_util.adb, exp_util.ads
4991         (Get_First_Parent_With_External_Axiomatization_For_Entity):
4992         New routine to find the first parent of an entity with
4993         a pragma Annotate (GNATprove, External_Axiomatization).
4994         (Has_Annotate_Pragma_For_External_Axiomatization): New function
4995         to check if a package has a pragma Annotate (GNATprove,
4996         External_Axiomatization).
4997         * einfo.ads, einfo.adb (Is_Generic_Actual_Subprogram): New
4998         flag on the entity for the declaration created for a formal
4999         subprogram in an instance. This is a renaming declaration,
5000         or in GNATprove_Mode the declaration of an expression function
5001         that captures the axiomatization of the actual.
5002         * sem_ch6.adb (Analyze_Expression_Function): For a
5003         Generic_Actual_Subprogram, place body immediately after the
5004         declaration because it may be used in a subsequent declaration
5005         in the instance.
5006         * sem_ch12.adb (Build_Wrapper): Add code to handle instances where
5007         the actual is a function, not an operator. Handle functions with
5008         one and two parameters and binary and unary operators.
5010 2014-07-31  Pascal Obry  <obry@adacore.com>
5012         * cstreams.c (__gnat_is_regular_file_fd): Removed.
5013         * adaint.c (__gnat_is_regular_file_fd): Added.
5015 2014-07-31  Robert Dewar  <dewar@adacore.com>
5017         * exp_strm.adb: Minor reformatting.
5019 2014-07-31  Ed Schonberg  <schonberg@adacore.com>
5021         * sem_ch12.adb (Build_Wrapper): New procedure, subsidiary to
5022         Analyze_Associations, to create a wrapper around operators that
5023         are actuals to formal subprograms. This is done in GNATProve
5024         mode in order to propagate the contracts of the operators to
5025         the body of the instance.
5027 2014-07-31  Ed Schonberg  <schonberg@adacore.com>
5029         * sem_attr.adb (Analyze_Attribute, case 'Old):  The reference is
5030         legal if within an aspect specification for a generic subprogram.
5032 2014-07-31  Javier Miranda  <miranda@adacore.com>
5034         * gnat1drv.adb (Back_End_Inlining): Set to false if
5035         Suppress_All_Inlining is set.
5036         * debug.adb: Adding documentation for -gnatd.z.
5037         * inline.adb (Add_Inlined_Body): Extend the -gnatn2
5038         processing to -gnatn1 for calls to Inline_Always routines.
5039         (Add_Inlined_Subprogram): Remove previous patch.
5041 2014-07-31  Ed Schonberg  <schonberg@adacore.com>
5043         * sem_ch13.adb (Check_One_Function): Apply properly the static
5044         semantic rules for indexing aspects and the functions they denote.
5046 2014-07-31  Javier Miranda  <miranda@adacore.com>
5048         * debug.adb: Complete documentation of -gnatd.z.
5050 2014-07-31  Bob Duff  <duff@adacore.com>
5052         * gnat_ugn.texi: Minor doc fixes.
5054 2014-07-31  Robert Dewar  <dewar@adacore.com>
5056         * sem_aggr.adb (Resolve_Array_Aggregate): Fix posting of missing
5057         index value.
5059 2014-07-31  Tristan Gingold  <gingold@adacore.com>
5061         * s-unstyp.ads (Packed_Byte): Make this type universal aliasing.
5062         (Packed_Bytes1): Make component aliased.
5064 2014-07-31  Robert Dewar  <dewar@adacore.com>
5066         * s-unstyp.ads, s-fileio.adb: Minor reformatting.
5068 2014-07-31  Robert Dewar  <dewar@adacore.com>
5070         * inline.adb, gnat1drv.adb, exp_ch6.adb, s-fileio.adb: Minor
5071         reformatting.
5073 2014-07-31  Eric Botcazou  <ebotcazou@adacore.com>
5075         * gcc-interface/utils2.c ((build_binary_op): Don't set TREE_THIS_NOTRAP
5076         on array references here, now done more selectively in trans.c.
5078 2014-07-31  Doug Rupp  <rupp@adacore.com>
5080         * gcc-interface/misc.c (gnat_init_gcc_fp(): Set flag_errno_math to 0.
5082 2014-07-31  Hristian Kirtchev  <kirtchev@adacore.com>
5084         * sem_util.adb (Is_Effectively_Volatile): New routine.
5086 2014-07-31  Fedor Rybin  <frybin@adacore.com>
5088         * gnat_ugn.texi: Document --test-duration option for gnattest.
5090 2014-07-31  Javier Miranda  <miranda@adacore.com>
5091             Eric Botcazou  <ebotcazou@adacore.com>
5093         * opt.ads (Back_End_Inlining): New variable which controls
5094         activation of inlining by back-end expansion.
5095         * gnat1drv.adb (Adjust_Global_Switches): Initialize Back_End_Inlining
5096         * sem_ch6.adb (Analyze_Subprogram_Body_Helper): Do not build
5097         the body to be inlined by the frontend if Back_End_Inlining
5098         is enabled.
5099         * exp_ch6.adb (Register_Backend_Call): Moved to inline.adb.
5100         (Expand_Call): If backend inlining is enabled let the backend to
5101         handle inlined subprograms.
5102         * inline.ads (Register_Backend_Call): Moved here from exp_ch6
5103         * inline.adb (Register_Backend_Call): Moved here from exp_ch6.
5104         (Add_Inlined_Subprogram): Add subprograms when Back_End_Inlining is set.
5105         (Must_Inline): Do not return Inline_Call if Back_End_Inlining is
5106         enabled.
5107         * debug.adb Document -gnatd.z
5108         * fe.h Import Back_End_Inlining variable.
5109         * gcc-interface/utils.c (create_subprog_decl): If Back_End_Inlining is
5110         enabled then declare attribute "always inline"
5111         * gcc-interface/decl.c, gcc-interface/trans.c,
5112         gcc-interface/gigi.h: Add handling of Inline_Always pragma.
5114 2014-07-31  Robert Dewar  <dewar@adacore.com>
5116         * a-ngelfu.ads: Minor comment fix.
5118 2014-07-31  Hristian Kirtchev  <kirtchev@adacore.com>
5120         * freeze.adb (Freeze_Record_Type): Replace all calls to
5121         Is_SPARK_Volatile with Is_Effectively_Volatile and update
5122         related comments.
5123         * sem_ch3.adb (Analyze_Object_Contract, Process_Discriminants):
5124         Replace all calls to Is_SPARK_Volatile with
5125         Is_Effectively_Volatile and update related comments.
5126         * sem_ch5.adb (Analyze_Iterator_Specification,
5127         Analyze_Loop_Parameter_Specification): Replace all calls to
5128         Is_SPARK_Volatile with Is_Effectively_Volatile and update
5129         related comments.
5130         * sem_ch6.adb (Process_Formals): Replace all calls to
5131         Is_SPARK_Volatile with Is_Effectively_Volatile and update
5132         related comments.
5133         * sem_ch12.adb (Instantiate_Object): Replace the call to
5134         Is_SPARK_Volatile_Object with Is_Effectively_Volatile_Object
5135         and update related comment.
5136         * sem_prag.adb (Analyze_External_Property_In_Decl_Part,
5137         Analyze_Global_Item): Replace all calls to Is_SPARK_Volatile
5138         with Is_Effectively_Volatile and update related comments.
5139         * sem_res.adb (Resolve_Actuals, Resolve_Entity_Name): Replace
5140         all calls to Is_SPARK_Volatile with Is_Effectively_Volatile and
5141         update related comments.
5142         * sem_util.adb (Has_Enabled_Property,
5143         Variable_Has_Enabled_Property): Replace all calls
5144         to Is_SPARK_Volatile with Is_Effectively_Volatile and
5145         update related comments.
5146         (Is_Effectively_Volatile): New routine.
5147         (Is_Effectively_Volatile_Object): New routine.
5148         (Is_SPARK_Volatile): Removed.
5149         (Is_SPARK_Volatile_Object): Removed.
5150         * sem_util.ads (Is_Effectively_Volatile): New routine.
5151         (Is_Effectively_Volatile_Object): New routine.
5152         (Is_SPARK_Volatile): Removed.
5153         (Is_SPARK_Volatile_Object): Removed.
5155 2014-07-31  Pascal Obry  <obry@adacore.com>
5157         * s-fileio.adb (Open): Make sure a shared file gets inserted into
5158         the global list atomically. This ensures that the file descriptor
5159         won't be freed because another tasks is closing the file.
5161 2014-07-31  Robert Dewar  <dewar@adacore.com>
5163         * sem_ch3.adb (Process_Range_Expr_In_Decl): Add comments on
5164         generation of _FIRST and _LAST variables even in GNATprove_Mode.
5165         * gnat_ugn.texi: Minor editing.
5166         * sem_prag.adb (Ensure_Aggregate_Form): Make sure generated
5167         aggregate is marked Comes_From_Source if argument is CFS.
5169 2014-07-31  Pascal Obry  <obry@adacore.com>
5171         * s-fileio.adb: Remove obsolete comment.
5173 2014-07-31  Vincent Celier  <celier@adacore.com>
5175         * a-strbou.ads ("=" (Bounded_String, Bounded_String): Add
5176         overriding keyword before function to avoid error when compiler
5177         is called with -gnatyO (check overriding indicators).
5179 2014-07-31  Tucker Taft  <taft@adacore.com>
5181         * gnat_ugn.texi: Add a paragraph pointing the reader
5182         to the "plugins" example.
5184 2014-07-31  Hristian Kirtchev  <kirtchev@adacore.com>
5186         * freeze.adb (Freeze_Expression): Document the
5187         purpose of the parent chain traversal.
5189 2014-07-31  Robert Dewar  <dewar@adacore.com>
5191         * checks.ads, checks.adb (Activate_Overflow_Check): Do not set flag for
5192         unconstrained fpt ops.
5194 2014-07-31  Pascal Obry  <obry@adacore.com>
5196         * s-fileio.adb (Open): Make sure a shared file gets inserted into
5197         the global list atomically. This ensures that the file descriptor
5198         won't be freed because another tasks is closing the file.
5200 2014-07-31  Vincent Celier  <celier@adacore.com>
5202         * projects.texi: Minor spelling error fix.
5204 2014-07-31  Robert Dewar  <dewar@adacore.com>
5206         * gnat_rm.texi: Document No_Elaboration_Code_All restriction.
5207         * lib-writ.adb, lib-load.adb: Initialize No_Elab_Code field in unit
5208         information.
5209         * lib.ads, lib.adb (No_Elab_Code): New field in unit information.
5210         * restrict.adb (Process_Restriction_Synonyms): Add handling
5211         of No_Elaboration_Code_All.
5212         * restrict.ads (Process_Restriction_Synonyms): Now handles
5213         No_Elaboration_Code_All.
5214         * sem_ch10.adb (Analyze_Context): Enforce transitive with for
5215         No_Elaboration_Code_All.
5216         * sem_prag.adb (Process_Restrictions_Or_Restriction_Warnings):
5217         Handle setting of No_Elab_Code in unit information. Handle
5218         No_Elaboration_Code_All.
5219         * snames.ads-tmpl (Name_No_Elaboration_Code): New name for
5220         pragma processing.
5221         (Name_No_Elaboration_Code_All): New name for pragma processing.
5223 2014-07-31  Eric Botcazou  <ebotcazou@adacore.com>
5225         * exp_aggr.adb (Aggr_Assignment_OK_For_Backend): Reject array
5226         types with a null range and use the Esize of the component
5227         instead of its RM_Size to identify appropriate values.
5229 2014-07-31  Hristian Kirtchev  <kirtchev@adacore.com>
5231         * freeze.adb Add with and use clause for Aspects.
5232         (Freeze_Expression): Emit an error when a volatile constant lacks
5233         Boolean aspect Import.
5234         (Has_Boolean_Aspect_Import): New routine.
5236 2014-07-31  Gary Dismukes  <dismukes@adacore.com>
5238         * exp_util.adb: Minor reformatting.
5240 2014-07-31  Vincent Celier  <celier@adacore.com>
5242         * errutil.adb (Error_Msg): Make sure that all components of
5243         the error message object are initialized.
5245 2014-07-31  Ed Schonberg  <schonberg@adacore.com>
5247         * sem_ch4.adb (Try_Container_Indexing): If the container type is
5248         class-wide, use specific type to locate iteration primitives.
5249         * sem_ch13.adb (Check_Indexing_Functions): Add legality checks for
5250         rules in RM 4.1.6 (Illegal_Indexing): New diagnostic procedure.
5251         Minor error message reformating.
5252         * exp_ch5.adb (Expand_Iterator_Loop): Handle properly Iterator
5253         aspect for a derived type.
5255 2014-07-31  Robert Dewar  <dewar@adacore.com>
5257         * debug.adb: Document debug flag d.X.
5259 2014-07-31  Ed Schonberg  <schonberg@adacore.com>
5261         * sem_util.ads (Find_Specific_Type): Moved here from exp_disp.adb.
5262         * sem_util.adb (Find_Specific_Type): If type is untagged private,
5263         retrieve full view so that primitive operations can be located.
5264         * exp_disp.adb Move Find_Specific_Type to sem_util.
5265         * exp_ch4.adb (Expand_N_Op_Eq): If operands are class-wide, use
5266         Find_Specific_Type to locate primitive equality.
5267         * exp_util.adb (Make_CW_Equivalent_Type): A class_wide equivalent
5268         type does not require initialization.
5269         * exp_attr.adb (Compile_Stream_Body_In_Scope): Within an instance
5270         body all visibility is established, and the enclosing package
5271         declarations must not be installed.
5273 2014-07-31  Yannick Moy  <moy@adacore.com>
5275         * sem_parg.adb, sem_prag.ads (Collect_Subprogram_Inputs_Outputs):
5276         Make subprogram public.
5278 2014-07-31  Ed Schonberg  <schonberg@adacore.com>
5280         * exp_ch9.adb (Expand_N_Protected_Type_Declaration): New
5281         predicate Discriminated_Size, to distinguish between private
5282         components that depend on discriminants from those whose size
5283         depends on some other non-static expression.
5285 2014-07-31  Nicolas Setton  <setton@adacore.com>
5287         * g-exptty.adb (Close): Fix binding to Waitpid: use the
5288         tty version.
5290 2014-07-31  Ed Schonberg  <schonberg@adacore.com>
5292         * sem_ch3.adb (Make_Index): Reject properly the use of 'Length
5293         in a discrete range, when 'range was probably intended.
5295 2014-07-31  Robert Dewar  <dewar@adacore.com>
5297         * sem_warn.adb, sem_warn.ads (Has_Junk_Name): Moved from body to spec.
5299 2014-07-31  Robert Dewar  <dewar@adacore.com>
5301         * frontend.adb: Minor reformatting.
5302         * sem.adb: Minor reformatting.
5303         * sem_ch6.adb (Analyze_Null_Procedure): Set proper sloc for
5304         identifiers on rewrite.
5305         * par.adb: Minor comment updates.
5306         * a-ngelfu.adb (Cos): Minor simplification.
5307         * par-ch13.adb (Get_Aspect_Specifications): Improve messages
5308         and recovery for bad aspect.
5309         * exp_ch3.adb: Code clean up.
5310         * sem_util.ads: Minor comment correction.
5311         * sem_ch13.adb (Check_Array_Type): Properly handle large types.
5312         * sem_ch3.adb: Code clean up.
5313         * binderr.ads: Minor comment correction.
5315 2014-07-31  Ed Schonberg  <schonberg@adacore.com>
5317         * exp_disp.adb (Expand_Interface_Conversion): A call whose
5318         prefix is a static conversion to an interface type that is not
5319         class-wide is not dispatching.
5321 2014-07-31  Robert Dewar  <dewar@adacore.com>
5323         * inline.adb, s-traceb.adb, s-traceb-hpux.adb, memtrack.adb,
5324         s-traceb-mastop.adb: Minor reformatting.
5326 2014-07-31  Ed Schonberg  <schonberg@adacore.com>
5328         * exp_ch3.adb (Expand_Record_Extension): In ASIS_Mode perform
5329         expansion, to handle properly visibility of selected components
5330         in instance bodies.
5332 2014-07-31  Robert Dewar  <dewar@adacore.com>
5334         * par-ch13.adb (Get_Aspect_Specifications): Set Inside_Depends.
5335         * par-ch2.adb (P_Pragma): Set Inside_Depends.
5336         * par-ch4.adb (P_Simple_Expression): Pass Inside_Depends to
5337         Check_Unary_Plus_Or_Minus.
5338         * scans.ads (Inside_Depends): New flag.
5339         * scng.adb (Scan): Pass Inside_Depends to Check_Arrow.
5340         * style.ads: Add Inside_Depends parameter to Check_Arrow Add
5341         Inside_Depends parameter to Check_Unary_Plus_Or_Minus.
5342         * styleg.adb (Check_Arrow): Handle Inside_Depends case.
5343         (Check_Unary_Plus_Or_Minus): Handle Inside_Depends case.
5344         * styleg.ads: Add Inside_Depends parameter to Check_Arrow Add.
5345         Inside_Depends parameter to Check_Unary_Plus_Or_Minus.
5347 2014-07-31  Javier Miranda  <miranda@adacore.com>
5349         * s-vaflop.adb Move the body of function T_To_G before
5350         T_To_D. Required for frontend inlining.
5351         * inline.adb (Has_Excluded_Contract): New subprogram used to
5352         check if a subprogram inlined by the frontend has contracts
5353         which cannot be inlined.
5355 2014-07-31  Bob Duff  <duff@adacore.com>
5357         * s-traceb.adb, s-traceb-hpux.adb, s-traceb-mastop.adb:
5358         (Call_Chain): Add 1 to number of frames to skip, to account for
5359         the fact that there's one more frame on the stack.
5360         * gcc-interface/Makefile.in (s-traceb.o): Adjust rules.
5362 2014-07-31  Robert Dewar  <dewar@adacore.com>
5364         * checks.adb (Enable_Overflow_Check): More precise setting of
5365         Do_Overflow_Check flag for division.
5367 2014-07-31  Eric Botcazou  <ebotcazou@adacore.com>
5369         * exp_aggr.adb (Aggr_Assignment_OK_For_Backend): Reject packed
5370         array types with implementation type.
5372 2014-07-31  Hristian Kirtchev  <kirtchev@adacore.com>
5374         * sem_ch10.adb (Process_State): Remove local variable Name. Add
5375         local variable Decl. Partially declare an abstract state by
5376         generating an entity and storing it in the state declaration.
5377         * sem_prag.adb (Create_Abstract_State): Fully declare a
5378         semi-declared abstract state.
5380 2014-07-31  Robert Dewar  <dewar@adacore.com>
5382         * prj-nmsc.adb: Minor reformatting.
5384 2014-07-31  Bob Duff  <duff@adacore.com>
5386         * s-tasdeb.adb (System.Tasking.Debug): Remove
5387         all usage of the secondary stack from this package.
5389 2014-07-31  Hristian Kirtchev  <kirtchev@adacore.com>
5391         * freeze.adb (Freeze_Expression): Update the loop in charge
5392         of finding a proper insertion place for freeze nodes to handle
5393         N_Expression_With_Actions nodes.
5395 2014-07-31  Robert Dewar  <dewar@adacore.com>
5397         * sem_util.adb, a-ngelfu.ads, prj-nmsc.adb, prj-conf.adb: Minor
5398         reformatting.
5400 2014-07-31  Pascal Obry  <obry@adacore.com>
5402         * prj-nmsc.adb: Minor reformatting.
5404 2014-07-31  Ed Schonberg  <schonberg@adacore.com>
5406         * sem_util.adb (Has_Preelaborable_Initialization): Check that
5407         type is tagged before checking whether a user-defined Initialize
5408         procedure is present.
5410 2014-07-31  Gary Dismukes  <dismukes@adacore.com>
5412         * a-ngelfu.ads (Sqrt): Augment postcondition.
5414 2014-07-31  Pascal Obry  <obry@adacore.com>
5416         * prj-nmsc.adb (Check_Library_Attributes): An aggegate library
5417         directory and ALI directory must be different than all object
5418         and library directories of aggregated projects.
5420 2014-07-31  Vincent Celier  <celier@adacore.com>
5422         * prj-pars.adb, prj-conf.ads, prj-conf.adb (Locate_Runtime): Move spec
5423         to package body, as it is not called from outside. Remove argument
5424         Project_Tree, no longer used. When runtime cannot be found,
5425         call Raise_Invalid_Config instead of failing the program.
5427 2014-07-31  Robert Dewar  <dewar@adacore.com>
5429         * bindgen.adb (Gen_Output_File_Ada): Generate pragma Suppress
5430         (Overflow_Check).
5431         * gnatlink.adb (Process_Args): Remove generation of -gnato0,
5432         no longer needed.
5434 2014-07-31  Robert Dewar  <dewar@adacore.com>
5436         * gnat_ugn.texi: Document new switch -gnato0.
5437         * sem_ch3.ads: Minor reformatting.
5438         * gnatlink.adb (Process_Args): Compile bind file with -gnato0
5439         (we do not want overflow checks when incrementing elaboration
5440         counters).
5441         * einfo.ads: Minor reformatting.
5443 2014-07-31  Robert Dewar  <dewar@adacore.com>
5445         * exp_ch5.adb, freeze.adb, exp_ch3.adb: Minor comment correction.
5446         * s-arit64.adb: Minor reformatting.
5448 2014-07-31  Robert Dewar  <dewar@adacore.com>
5450         * gnat1drv.adb (Adjust_Global_Switches): Default for overflow
5451         checking is enabled except in GNAT_Mode.
5452         * switch-c.adb (Scan_Front_End_Switches): Implement -gnato0
5453         (suppress overflow checks).
5455 2014-07-31  Ed Schonberg  <schonberg@adacore.com>
5457         * exp_ch3.adb (Expand_Freeze_Record_Type): Do not build an
5458         invariant procedure for an internally generated subtype that is
5459         created for an object of a class-wide type.
5461 2014-07-31  Vincent Celier  <celier@adacore.com>
5463         * prj-nmsc.adb, errutil.adb: Make code similar to Errout.
5465 2014-07-31  Gary Dismukes  <dismukes@adacore.com>
5467         * gnat_rm.texi, sem_aux.ads, einfo.ads, sem_util.ads, sem_ch6.adb,
5468         exp_disp.adb: Minor reformatting.
5470 2014-07-31  Robert Dewar  <dewar@adacore.com>
5472         * exp_ch5.adb, sem_ch3.adb, exp_ch7.adb, exp_util.adb, exp_ch9.adb,
5473         sem_ch7.adb, checks.adb, s-exctra.adb, exp_ch6.adb, exp_disp.adb,
5474         exp_dist.adb, sem_ch13.adb, exp_strm.adb, exp_ch3.adb: Minor
5475         reformatting.
5477 2014-07-31  Robert Dewar  <dewar@adacore.com>
5479         * sem_ch13.adb: Minor reformatting.
5481 2014-07-31  Ed Schonberg  <schonberg@adacore.com>
5483         * exp_ch3.adb (Build_Invariant_Checks): If the enclosing record
5484         is an unchecked_union, warn that invariants will not be checked
5485         on components that have them.
5487 2014-07-31  Robert Dewar  <dewar@adacore.com>
5489         * freeze.adb (Freeze_Entity): Check for error of
5490         Type_Invariant'Class applied to a untagged type.
5491         * sem_ch6.adb (Analyze_Null_Procedure): Unconditionally rewrite
5492         as null body, so that we perform error checks even if expansion
5493         is off.
5495 2014-07-31  Ed Schonberg  <schonberg@adacore.com>
5497         * sem_ch13.adb (Build_Invariant_Procedure): If body of procedure
5498         is already present, nothing to do.
5499         * exp_ch3.adb (Build_Component_Invariant_Call): For an access
5500         component, check whether the access type has an invariant before
5501         checking the designated type.
5502         (Build_Record_Invariant_Proc): Change suffix of generated
5503         name to prevent ambiguity when record type has invariants
5504         in addition to those of components, and two subprograms are
5505         constructed. Consistent with handling of array types.
5506         (Insert_Component_Invariant_Checks): Build invariant procedure
5507         body when one has not been created yet, in the case of composite
5508         types that are completions and whose full declarations carry
5509         invariants.
5511 2014-07-30  Thomas Quinot  <quinot@adacore.com>
5513         * gnat_rm.texi: Minor doc fixes.
5515 2014-07-30  Robert Dewar  <dewar@adacore.com>
5517         * a-rbtgbo.adb, sem_ch13.adb: Minor reformatting.
5519 2014-07-30  Vincent Celier  <celier@adacore.com>
5521         * errutil.adb (Set_Msg_Text): Process tilde ('~'): no processing
5522         of error message.
5523         * prj-nmsc.adb (Locate_Directory): Use a tilde ('~') in the
5524         message to report that a directory cannot be created, to avoid
5525         processing of the directory path that may contains special
5526         insertion characters.
5528 2014-07-30  Ed Schonberg  <schonberg@adacore.com>
5530         * a-crdlli.ads: Place declaration of Empty_List after full type
5531         declaration for Curosr, to prevent freezing error.
5533 2014-07-30  Robert Dewar  <dewar@adacore.com>
5535         * get_targ.adb: Minor code reorganization.
5536         * prj-proc.adb, prj-proc.ads, get_targ.ads, sem_ch6.adb: Minor
5537         reformatting.
5539 2014-07-30  Ed Schonberg  <schonberg@adacore.com>
5541         * a-cbhase.adb: a-cbhase.adb (Insert): Raise Constraint_Error,
5542         not Program_Error, when attempting to remove an element not in
5543         the set. This is the given semantics for all set containers.
5545 2014-07-30  Ed Schonberg  <schonberg@adacore.com>
5547         * a-rbtgbo.adb (Delete_Node_Sans_Free): If
5548         element is not present in tree return rather than violating
5549         an assertion. Constraint_Error will be raised in the caller if
5550         element is not in the container.
5552 2014-07-30  Arnaud Charlet  <charlet@adacore.com>
5554         * set_targ.adb (Read_Target_Dependent_Values): New subprogram.
5555         (elab body): Add provision for default target config file.
5556         * get_targ.ads, get_targ.adb (Get_Back_End_Config_File): New subprogram.
5558 2014-07-30  Ed Schonberg  <schonberg@adacore.com>
5560         * a-cbhase.adb (Delete): Raise Constraint_Error, not Program_Error,
5561         when attempting to remove an element not in the set. This is
5562         the given semantics for all set containers.
5563         * a-cborse.adb (Delete): Attempt removal first, to check for
5564         tampering, before checking whether this is an attempt to
5565         delete a  non-existing element, and in fthe latter case raise
5566         Constraint_Error.
5568 2014-07-30  Vincent Celier  <celier@adacore.com>
5570         * prj-proc.adb (Recursive_Process): Do not create a new
5571         Project_Id if the project is already in the list of projects of
5572         the tree.
5574 2014-07-30  Ed Schonberg  <schonberg@adacore.com>
5576         * sem_ch6.adb (Analyze_Function_Return): Reject a return expression
5577         whose type is an incomplete formal type.
5578         (Analyze_Return_Type): Reject a return type that is an untagged
5579         imcomplete formal type.
5580         (Process_Formals): Reject a formal parameter whose type is an
5581         untagged formal incomplete type.
5582         * sem_res.adb (Resolve_Actuals): Reject an actual whose type is
5583         an untagged formal incomplete type.
5585 2014-07-30  Robert Dewar  <dewar@adacore.com>
5587         * gnat_ugn.texi: Minor spelling correction.
5588         * makeutl.adb: Minor code reorganization.
5589         * exp_ch4.adb, exp_aggr.adb, exp_ch3.adb: Minor reformatting.
5591 2014-07-30  Robert Dewar  <dewar@adacore.com>
5593         * einfo.ads (Has_Unchecked_Union): Document that this is used
5594         to check for illegal Valid_Scalars attribute references.
5595         * exp_attr.adb (Build_Record_VS_Func): New function
5596         (Expand_N_Attribute_Reference, case Valid_Scalars): Call this
5597         function.
5598         * gnat_rm.texi: Document 'Valid_Scalars cannot be applied to
5599         Unchecked_Union Add note on 'Valid_Scalars generating a lot
5600         of code.
5601         * sem_attr.adb (Analyze_Attribute, case Valid_Scalars): Give
5602         error on attempt to apply Valid_Scalars to Unchecked_Union type.
5604 2014-07-30  Steve Baird  <baird@adacore.com>
5606         * exp_ch4.adb (Expand_N_Indexed_Component): Disable optimized handling
5607         of A(I..J)(K) in CodePeer_Mode.
5609 2014-07-30  Ben Brosgol  <brosgol@adacore.com>
5611         * gnat_ugn.texi: Fix typo.
5613 2014-07-30  Thomas Quinot  <quinot@adacore.com>
5615         * lib-writ.ads: document format change.
5617 2014-07-30  Pascal Obry  <obry@adacore.com>
5619         * prj-util.adb (For_Interface_Sources): Do not
5620         include sources from withed externally built projects.
5622 2014-07-30  Robert Dewar  <dewar@adacore.com>
5624         * lib.adb: Minor reformatting.
5625         * prj-util.adb: Minor reformatting.
5627 2014-07-30  Ed Schonberg  <schonberg@adacore.com>
5629         * exp_aggr.adb (Build_Record_Aggr_Code): For an array component
5630         that depends on discriminants, and which is given by an others
5631         clause, create an explicit subtype with the discriminant values
5632         of the enclosing aggregate, because the backend cannot otherwise
5633         retrieve the actual bounds of the array.
5635 2014-07-30  Fedor Rybin  <frybin@adacore.com>
5637         * gnat_ugn.texi: Improve gnattest documentation.
5639 2014-07-30  Pascal Obry  <obry@adacore.com>
5641         * makeutl.adb (Insert_Project_Sources): Properly handle sources
5642         that are aggregated. We want to include sources not only part
5643         of libraries but also if part of an aggregated project from an
5644         aggregate library.
5645         * prj.adb (For_Project_And_Aggregated_Context): Properly check
5646         state of root project.
5648 2014-07-30  Thomas Quinot  <quinot@adacore.com>
5650         * lib-load.ads: Minor reformatting.
5651         * sinfo.ads (Library_Unit): Update comment.
5652         * lib.ads (Notes): Simplify. The Unit component in Notes_Entry
5653         is redundant. Instead used the pragma Node_Id directly as the
5654         element type.
5656 2014-07-30  Thomas Quinot  <quinot@adacore.com>
5658         * lib.adb (Store_Note): Store only notes that do not come from
5659         an instance, and that are in the extended main source unit.
5660         * lib-writ (Write_Unit_Information): Annotations from subunits
5661         must be emitted along with those for the main unit, and they
5662         must carry a specific file name.
5663         * ali.ads (Notes_Record): Use a File_Name_Type instead of a
5664         Unit_Id for the source file containing the pragma, as in the
5665         case of annotations from subunits we might not have a readily
5666         available unit id.
5667         * ali.adb (Scan_ALI): Account for above change in data structure.
5669 2014-07-30  Vincent Celier  <celier@adacore.com>
5671         * makeutl.adb (Insert_Project_Sources): When the library project
5672         is an aggregate Stand-Alone Library, insert in the queue the
5673         Ada interface units, with Closure set to True;
5675 2014-07-30  Eric Botcazou  <ebotcazou@adacore.com>
5677         * sem_util.adb: Fix minor typo.
5678         * makeutl.adb: Minor reformatting.
5680 2014-07-30  Robert Dewar  <dewar@adacore.com>
5682         * exp_ch7.adb, checks.adb, makeutl.adb, makeutl.ads: Minor reformatting.
5684 2014-07-30  Yannick Moy  <moy@adacore.com>
5686         * checks.ads: Fix typo in comment.
5688 2014-07-30  Pierre-Marie Derodat  <derodat@adacore.com>
5690         * sem_util.adb (Set_Debug_Info_Needed): For scalar types, recurse on
5691         entities that materialize range bounds, if any.
5693 2014-07-30  Vincent Celier  <celier@adacore.com>
5695         * projects.texi: Minor spelling fix.
5697 2014-07-30  Hristian Kirtchev  <kirtchev@adacore.com>
5699         * checks.adb (Make_Bignum_Block): Use the new secondary stack
5700         build routines to manage the mark.
5701         * exp_ch7.adb (Create_Finalizer, Expand_Cleanup_Actions):
5702         Use the new secodary stack build routines to manage the mark.
5703         (Insert_Actions_In_Scope_Around): Add new formal parameter
5704         Manage_SS along with comment on its usage. Code and comment
5705         reformatting. Mark and release the secondary stack when the
5706         context warrants it.
5707         (Make_Transient_Block): Update the call
5708         to Insert_Actions_In_Scope_Around to account for parameter Manage_SS.
5709         (Wrap_Transient_Declaration): Remove local variable
5710         Uses_SS. Ensure that the secondary stack is marked and released
5711         when the related object declaration appears in a library level
5712         package or package body. Code and comment reformatting.
5713         * exp_util.ads, exp_util.adb (Build_SS_Mark_Call): New routine.
5714         (Build_SS_Release_Call): New routine.
5716 2014-07-30  Steve Baird  <baird@adacore.com>
5718         * exp_attr.adb: Revert previous change, not needed after all.
5720 2014-07-30  Vincent Celier  <celier@adacore.com>
5722         * makeutl.adb (Queue.Insert_Project_Sources): Insert with
5723         Closure => True for interfaces of Stand-Alone Libraries.
5724         * makeutl.ads (Source_Info (Format => Gprbuild)): Add new
5725         Boolean component Closure, defaulted to False.
5727 2014-07-30  Yannick Moy  <moy@adacore.com>
5729         * sem_res.adb: Fix typo in error message.
5731 2014-07-30  Robert Dewar  <dewar@adacore.com>
5733         * sem_ch3.adb (Process_Range_Expr_In_Decl): Use _FIRST/_LAST
5734         as name suffixes rather than L/H for subtype bounds.
5735         * tbuild.ads: Minor comment improvements and fixes
5736         (Make_External_Name): Document that suffix can start with an
5737         underscore.
5739 2014-07-30  Bob Duff  <duff@adacore.com>
5741         * gnat_ugn.texi: Document --rep-clauses switch.
5743 2014-07-30  Ed Schonberg  <schonberg@adacore.com>
5745         * sem_ch13.adb (Analyze_Aspect_Specifications): Default_Value and
5746         Default_Component_Value can only be specified for scalar type or
5747         arrays of scalar types respectively.  This legality check must
5748         be performed at the point the aspect is analyzed, in order to
5749         reject aspect specifications that apply to a partial view.
5751 2014-07-30  Thomas Quinot  <quinot@adacore.com>
5753         * freeze.adb: Minor reformatting.
5755 2014-07-30  Robert Dewar  <dewar@adacore.com>
5757         * exp_attr.adb (Expand_Attribute, case First/Last): Don't expand in
5758         codepeer mode.
5760 2014-07-30  Ed Schonberg  <schonberg@adacore.com>
5762         * freeze.adb (Check_Expression_Function): At the freeze point
5763         of an expression function, verify that the expression in the
5764         function does not contain references to any deferred constants
5765         that have no completion yet.
5766         (Freeze_Expression, Freeze_Before): call
5767         Check_Expression_Function.
5768         * a-ciorse.ads: Add Reference_Control_Type to detect tampering.
5769         * a-ciorse.adb: Add Adjust and Finalize routines for
5770         Reference_Control_Type. Use it in the construction of Reference
5771         and Constant_Reference values.
5773 2014-07-30  Robert Dewar  <dewar@adacore.com>
5775         * exp_aggr.adb: Update comments.
5776         * a-chtgbo.adb, a-chtgbo.ads, a-cbhase.adb, a-cbhase.ads: Minor
5777         reformatting.
5779 2014-07-30  Robert Dewar  <dewar@adacore.com>
5781         * cstand.adb (New_Standard_Entity): New version takes name
5782         string to call Make_Name.
5783         (Create_Standard): Use this routine to set name before setting other
5784         fields.
5786 2014-07-30  Robert Dewar  <dewar@adacore.com>
5788         * exp_attr.adb (Expand_Attribute, case First): Rewrite simple
5789         entity reference.
5790         (Expand_Attribute, case Last): Ditto.
5791         * exp_ch3.adb (Constrain_Index): New calling sequence for
5792         Process_Range_Expr_In_Decl.
5793         (Expand_N_Object_Declaration): Avoid setting Is_Known_Valid in one
5794         problematical case.
5795         * sem_ch3.adb (Constrain_Index): New calling sequence for
5796         Process_Range_Expr_In_Decl.
5797         (Set_Scalar_Range_For_Subtype): ditto.
5798         (Process_Range_Expr_In_Decl): Create constants to hold bounds for
5799         subtype.
5800         * sem_ch3.ads (Process_Range_Expr_In_Decl): Add Subtyp parameter.
5801         * sem_eval.adb (Compile_Time_Compare): Make sure we use base
5802         types if we are not assuming no invalid values.
5804 2014-07-30  Robert Dewar  <dewar@adacore.com>
5806         * clean.adb: Minor reformatting.
5807         * opt.ads: Minor fix to incorrect comment.
5809 2014-07-30  Ed Schonberg  <schonberg@adacore.com>
5811         * a-chtgbo.ads, a-chtgbo.adb (Delete_Node_At_Index): New
5812         subprogram, used by bounded hashed sets, to delete a node at
5813         a given index, whose element may have been improperly updated
5814         through a Reference_Preserving key.
5815         * a-cbhase.ads: Add Reference_Control_Type to package Generic_Keys.
5816         * a-cbhase.adb: Add Adjust and Finalize routines for
5817         Reference_Control_Type.
5818         (Delete, Insert): Raise Program_Error, not Constraint_Error,
5819         when operation is illegal.
5820         (Reference_Preserving_Key): Build aggregate for Reference_Control_Type
5821         * a-cmbutr.ads: Add Reference_Control_Type to detect tampering. Add
5822         private with_clause for Ada.Finalization.
5823         * a-cbmutr.adb: Add Adjust and Finalize routines for
5824         Reference_Control_Type. Use it in the construction of Reference
5825         and Constant_Reference values.
5827 2014-07-30  Robert Dewar  <dewar@adacore.com>
5829         * sem_ch3.adb, sem_ch3.ads: Minor code reorganization.
5831 2014-07-30  Pascal Obry  <obry@adacore.com>
5833         * clean.adb (Clean_Project): Properly check for directory
5834         existence before trying to enter it.
5836 2014-07-30  Robert Dewar  <dewar@adacore.com>
5838         * sem_ch3.ads, prj.ads, prj-nmsc.adb: Minor reformatting.
5840 2014-07-30  Robert Dewar  <dewar@adacore.com>
5842         * par-ch5.adb (P_Sequence_Of_Statements): Properly handle
5843         missing semicolon after name.
5845 2014-07-30  Pascal Obry  <obry@adacore.com>
5847         * prj.ads (Gprinstall_Flags): New constant.
5848         * prj-nmsc.adb (Check_Library_Attributes): Do not fails for
5849         missing library dir if Directories_Must_Exist_In_Projects
5850         is false.
5852 2014-07-30  Bob Duff  <duff@adacore.com>
5854         * a-except-2005.adb, a-except.adb: Remove obsolete comments.
5855         * s-traceb.ads: Updagte comments.
5857 2014-07-30  Robert Dewar  <dewar@adacore.com>
5859         * checks.adb, a-cihase.adb, a-cihase.ads, a-chtgop.adb, a-chtgop.ads,
5860         a-except.adb, a-except-2005.adb, a-cborse.adb, a-cborse.ads,
5861         a-exexda.adb, a-elchha.adb, exp_aggr.adb, a-cohase.adb: Minor
5862         reformatting.
5864 2014-07-30  Ed Schonberg  <schonberg@adacore.com>
5866         * a-chtgop.ads, a-chtgop.adb (Delete_Node_At_Index): New
5867         subprogram, used by all versions of hashed sets, to delete a node
5868         whose element has been improperly updated through a Reference_
5869         Preserving key.
5870         * a-cohase.adb: Remove Delete_Node, use new common procedure
5871         Delete_Node_At_Index.
5872         * a-cihase.ads: Add Reference_Control_Type to package Generic_Keys.
5873         * a-cihase.adb: Add Adjust and Finalize routines for
5874         Reference_Control_Type.
5875         (Reference_Preserving_Key): Build aggregate for
5876         Reference_Control_Type
5878 2014-07-30  Yannick Moy  <moy@adacore.com>
5880         * checks.adb, checks.ads (Determine_Range_R): New procedure to
5881         determine the possible range of a floating-point expression.
5883 2014-07-30  Ed Schonberg  <schonberg@adacore.com>
5885         * a-cborse.ads: Add Reference_Control_Type to package Generic_Keys.
5886         * a-cborse.adb: Add Adjust and Finalize routines for
5887         Reference_Control_Type.
5888         (Reference_Preserving_Key): Build aggregate for
5889         Reference_Control_Type.
5890         (Delete): Check for tampering, and raise Program_Error (not
5891         Constraint_Error) when attempting to delete an element not in
5892         the set.
5893         (Insert): Ditto.
5895 2014-07-30  Bob Duff  <duff@adacore.com>
5897         * a-elchha.adb, a-except-2005.adb, a-except.adb, a-exexda.adb,
5898         * a-exextr.adb, a-exstat.adb, exp_intr.ads, s-tassta.adb:
5899         Exception_Information is used to produce useful debugging
5900         information for the programmer. However, it was also used to
5901         implement the stream attributes for type Exception_Occurrence. The
5902         latter requires a stable and portable interface, which meant
5903         that we couldn't include a symbolic traceback. A separate set of
5904         routines was used to provide symbolic tracebacks under program
5905         control (i.e. not automatically). The goal of this ticket is
5906         to provide such automatic tracebacks, so the change here is to
5907         split the two functionalities: Exception_Information gives the
5908         maximally useful information for debugging (i.e. it now includes
5909         a symbolic traceback when a decorator is set, and it can be
5910         improved freely in the future without disturbing streaming).
5911         Untailored_Exception_Information always uses hexadecimal addresses
5912         in the traceback, has a stable and portable output, and is now
5913         used for streaming.
5915 2014-07-30  Eric Botcazou  <ebotcazou@adacore.com>
5917         * exp_aggr.adb (Expand_Array_Aggregate): Add missing test
5918         on the target of the assignment to find out whether it
5919         can be directly done by the back-end.
5920         * exp_util.adb (Is_Possibly_Unaligned_Slice): Remove obscure test.
5922 2014-07-30  Robert Dewar  <dewar@adacore.com>
5924         * inline.adb, a-coorse.adb, a-coorse.ads, a-cohase.adb, a-cohase.ads,
5925         a-tasatt.adb: Minor reformatting.
5927 2014-07-30  Robert Dewar  <dewar@adacore.com>
5929         * exp_ch4.adb: Minor reformatting.
5931 2014-07-30  Ed Schonberg  <schonberg@adacore.com>
5933         * a-coorse.adb, a-coorse.ads (Generic_Keys): Add a
5934         Reference_Control_Type to generic package, to keep additional
5935         information for Reference_Types that manipulate keys. Add Adjust and
5936         Finalize procedures for this type.
5937         (Finalize): When finalizing a reference_preserving_key, verify
5938         that the key of the new value is equivalent to the key of the
5939         original element, raise Program_Error otherwise.
5940         (Insert): Detect tampering.
5941         (Reference_Preserving_Key): Build proper Reference_Control_Type,
5942         and update Busy and Lock bits to detect tampering.
5943         * a-cohase.ads: Keep with-clause private.
5945 2014-07-30  Hristian Kirtchev  <kirtchev@adacore.com>
5947         * exp_ch4.adb (Expand_N_Op_Eq): Emit a warning when the operands
5948         of an equality are of an Unchecked_Union type and lack inferable
5949         discriminants.
5951 2014-07-30  Bob Duff  <duff@adacore.com>
5953         * g-exctra.adb, g-exctra.ads, s-exctra.adb, s-exctra.ads, Makefile.rtl,
5954         g-trasym.adb, g-trasym.ads, s-trasym.adb, s-trasym.ads: Move
5955         GNAT.Traceback.Symbolic and GNAT.Exception_Traces into the System
5956         hierarchy (System.Traceback.Symbolic and System.Exception_Traces), so
5957         we can call them from the runtimes. Leave renamings in place under GNAT.
5959 2014-07-30  Yannick Moy  <moy@adacore.com>
5961         * inline.adb (Check_And_Build_Body_To_Inline): Include code for
5962         inlining in GNATprove mode.
5964 2014-07-30  Ed Schonberg  <schonberg@adacore.com>
5966         * a-cohase.adb, a-cohase.ads (Generic_Keys): Add a
5967         Reference_Control_Type to generic package, to keep additional
5968         information for Reference_Types that manipulate keys. Add Adjust and
5969         Finalize procedures for this type.
5970         (Delete_Node): New procedure called when finalizing a
5971         Reference_Control_Type, to remove a node whose element has been
5972         improperly updated through a Reference.
5973         (Insert): Detect tampering.
5974         (Reference_Preserving_Key): Build proper Reference_Control_Type,
5975         and update Busy and Lock bits to detect tampering.
5977 2014-07-30  Bob Duff  <duff@adacore.com>
5979         * exp_intr.ads: Minor comment fix.
5981 2014-07-30  Gary Dismukes  <dismukes@adacore.com>
5983         * exp_prag.adb, a-tags.ads: Minor typo fixes.
5985 2014-07-30  Bob Duff  <duff@adacore.com>
5987         * a-excach.adb, a-excach-cert.adb, a-except-2005.ads,
5988         a-except.ads, g-traceb.adb, memtrack.adb,
5989         s-traceb.adb, s-traceb.ads, s-traceb-hpux.adb, s-traceb-mastop.adb:
5990         Cleanup: Make the three versions of System.Traceback.Call_Chain
5991         have the same interface. Use an array for the Traceback parameter
5992         instead of an Address.  This will enable reduction in code
5993         duplication.
5995 2014-07-30  Pat Rogers  <rogers@adacore.com>
5997         * gnat_ugn.texi: Corrected minor textual error in description
5998         of switch -gnatwl.
6000 2014-07-30  Bob Duff  <duff@adacore.com>
6002         * Makefile.rtl: Sort file names.
6004 2014-07-30  Arnaud Charlet  <charlet@adacore.com>
6006         * a-tasatt.adb: Complete previous change: kill spurious warning
6007         on e.g. sparc, and make sure we only use the fast path when the
6008         alignment is compatible.
6010 2014-07-30  Yannick Moy  <moy@adacore.com>
6012         * sem_ch6.adb (Analyze_Subprogram_Body_Helper): Mark new Spec_Id as
6013         coming from source.
6015 2014-07-30  Yannick Moy  <moy@adacore.com>
6017         * inline.adb (Build_Body_To_Inline): Issue more precise messages
6018         for declarations that prevent inlining.
6019         (Cannot_Inline): Change usual start of message to refer to contextual
6020         analysis in GNATprove mode.
6021         * sem_res.adb (Resolve_Call): Change usual start of message to
6022         refer to contextual analysis in GNATprove mode, when inlining
6023         not possible.
6025 2014-07-30  Robert Dewar  <dewar@adacore.com>
6027         * sem_res.adb, sem_ch6.adb: Minor code reorganization.
6028         * inline.adb: Minor reformatting.
6030 2014-07-30  Javier Miranda  <miranda@adacore.com>
6032         * a-tags.ads: Add comments.
6034 2014-07-30  Pat Rogers  <rogers@adacore.com>
6036         * gnat_rm.texi: Minor word error.
6038 2014-07-30  Ed Schonberg  <schonberg@adacore.com>
6040         * exp_prag.adb (Expand_Old): Insert declarationss of temporaries
6041         created to capture the value of the prefix of 'Old at the
6042         beginning of the current declarative part, to prevent data flow
6043         anomalies in the postcondition procedure that will follow.
6045 2014-07-30  Yannick Moy  <moy@adacore.com>
6047         * debug.adb: Retire debug flag -gnatdQ.
6048         * inline.adb (Can_Be_Inlined_In_GNATprove_Mode): Check SPARK_Mode
6049         on decl, not on body.  Ignore predicate functions.
6050         * sem_ch6.adb (Analyze_Subprogram_Body_Helper): Remove use of
6051         debug flag -gnatdQ.  Correctly analyze SPARK_Mode on decl and
6052         body when generating a decl for a body on which SPARK_Mode aspect
6053         is given.
6054         * sem_prag.adb (Analyze_Pragma|SPARK_Mode): Reorder tests for
6055         attaching pragma to entity, to account for declaration not coming
6056         from source.
6057         * sem_res.adb (Resolve_Call): Issue warning and flag subprogram
6058         as not always inlined in GNATprove mode, when called in an
6059         assertion context.
6061 2014-07-30  Vincent Celier  <celier@adacore.com>
6063         * debug.adb: Minor comment update.
6065 2014-07-30  Robert Dewar  <dewar@adacore.com>
6067         * s-tasuti.adb, s-tassta.adb: Minor reformatting.
6068         * sprint.adb (Sprint_Node): Handle N_Contract case.
6069         * exp_prag.adb: Minor reformatting.
6070         * freeze.adb (Freeze_Entity): Check useless postcondition for
6071         No_Return subprogram.
6072         * sem_prag.adb: Minor reformatting.
6074 2014-07-30  Javier Miranda  <miranda@adacore.com>
6076         * a-tags.ads: Complete comments about performance.
6078 2014-07-30  Fedor Rybin  <frybin@adacore.com>
6080         * gnat_ugn.texi: Adding description for --exit-status option to
6081         gnattest section.  Fixing index entry of --passed-tests option
6082         in gnattest section.
6084 2014-07-30  Javier Miranda  <miranda@adacore.com>
6086         * Makefile.rtl, gnat_rm.texi, i-cpp.adb, i-cpp.ads, impunit.adb,
6087         rtsfind.ads: Remove references to package Interfaces.CPP since this
6088         package is no longer needed.
6090 2014-07-30  Bob Duff  <duff@adacore.com>
6092         * s-taasde.adb (Timer_Queue): Don't use a
6093         build-in-place function call to initialize the Timer_Queue.
6094         * s-traent.adb, s-traent.ads, s-traent-vms.adb, s-traent-vms.ads:
6095         Turn off polling in these units, because otherwise we get
6096         elaboration circularities with Ada.Exceptions when the -gnatP
6097         switch is used.
6098         * s-tassta.adb (Create_Task): Make sure independent tasks
6099         are created with Parent = Environment_Task. This was not true,
6100         for example, in s-interr.adb, when Interrupt_Manager does "new
6101         Server_Task"; the Server_Task had Parent = Interrupt_Manager,
6102         which is wrong because the master is determined by the access
6103         type, which is at library level.
6104         * s-tasuti.adb (Make_Independent): Avoid setting Parent; it is
6105         now set correctly by Create_Task.
6106         (Make_Passive): Remove the workaround for the race condition in
6107         Make_Independent.
6108         * frontend.adb (Frontend): Revert to previous method of detecting
6109         temporary configuration pragma files, recognizing such files by
6110         ".tmp" in the name. This is more general than detecting pragmas
6111         Source_File_Name_Project, because it allows any tool to use
6112         this naming convention, no matter the content of the file.
6113         * gnat_ugn.texi: Document this naming convention.
6115 2014-07-30  Robert Dewar  <dewar@adacore.com>
6117         * exp_ch7.adb, s-tataat.adb, s-tataat.ads, s-parame-vms-alpha.ads,
6118         inline.adb, s-parame-hpux.ads, exp_smem.adb, s-tasini.adb,
6119         s-tasini.ads, s-parame-vms-ia64.ads, s-parame.ads, s-taskin.ads,
6120         s-parame-vxworks.ads, a-tasatt.adb, a-tasatt.ads: Minor reformatting.
6121         * a-suenco.adb (Convert): Handle overlong encodings in UTF8-UTF8
6122         conversion.
6124 2014-07-30  Ed Schonberg  <schonberg@adacore.com>
6126         * sem_ch5.adb: Improve error recovery.
6127         * inline.adb (Build_Body_To_Inline): Set Full_Analysis to false
6128         before analyzing the body, so that in GNATprove mode there is
6129         no light expansion. Whatever expansion is required by SPARK will
6130         be performed when analysing the inlined code.
6132 2014-07-30  Bob Duff  <duff@adacore.com>
6134         * s-tataat.adb, s-tataat.ads, a-tasatt.adb: Minor comment fixes.
6136 2014-07-30  Ed Schonberg  <schonberg@adacore.com>
6138         * sem_ch5.adb (Analyze_Loop_Statement): If loop has a label,
6139         verify that it is not hidden by an inner implicit declaration.
6141 2014-07-30  Thomas Quinot  <quinot@adacore.com>
6143         * sem.ads (Scope_Table_Entry): New component Locked_Shared_Objects.
6144         * sem_ch8.adb (Push_Scope): Initialize Locked_Shared_Objects.
6145         * exp_smem.adb (Add_Shared_Var_Lock_Procs): Handle the case where
6146         the call returns an unconstrained type: in this case there is
6147         already a transient scope, and we should not establish a new one.
6148         * exp_ch7.adb (Insert_Actions_In_Scope_Around): New formal Clean. If
6149         True, also insert cleanup actions in the tree.
6150         (Wrap_Transient_Declaration): Call Insert_Actions_In_Scope_Around
6151         with Clean set True.
6153 2014-07-30  Arnaud Charlet  <charlet@adacore.com>
6155         * s-taskin.ads (Direct_Index, Direct_Index_Range,
6156         Direct_Attribute_Element, Direct_Attribute_Array,
6157         Direct_Index_Vector, Direct_Attributes, Is_Defined,
6158         Indirect_Attributes): Removed.  (Atomic_Address,
6159         Attribute_Array, Attributes): New.
6160         * s-tasini.ads, s-tasini.adb (Proc_T, Initialize_Attributes,
6161         Finalize_Attributes_Link, Initialize_Attributes_Link): Removed.
6162         (Finalize_Attributes): Reimplement.
6163         * s-tassta.adb (Create_Task): Remove call to
6164         Initialize_Attributes_Link (Free_Task, Vulnerable_Free_Task):
6165         Replace Finalize_Attributes_Link by Finalize_Attributes.
6166         * a-tasatt.ads, a-tasatt.adb, s-tataat.ads, s-tataat.adb:
6167         Reimplement from scratch, using a simpler and more efficient
6168         implementation.
6169         * s-tporft.adb (Register_Foreign_Thread): Remove now obsolete comment.
6170         * s-parame.ads, s-parame-hpux.ads,
6171         * s-parame-vms-alpha.ads, s-parame-vms-ia64.ads,
6172         * s-parame-vxworks.ads (Max_Attribute_Count): New, replace
6173         Default_Attribute_Count.
6175 2014-07-30  Olivier Hainque  <hainque@adacore.com>
6177         * vxworks-ppc-link.spec: New file. Extra link
6178         instructions for ppc-vxworks.
6179         * vxworks-crtbe-link.spec: Likewise, for ZCX related support.
6180         * system-vxworks-ppc.ads: Adjust linker options to use spec files.
6181         * system-vxworks-arm.ads: Likewise.
6182         * gcc-interface/Makefile.in: Enable .spec files.
6184 2014-07-30  Ed Schonberg  <schonberg@adacore.com>
6186         * sem_aggr.adb: Minor comment reformatting.
6188 2014-07-30  Robert Dewar  <dewar@adacore.com>
6190         * sem_util.ads, sem_util.adb (Is_Junk_Name): Removed.
6191         * sem_warn.adb (Has_Junk_Name): New function
6192         (Check_References): Use Has_Junk_Name to delete junk warnings
6193         (Check_Unset_Reference): ditto.
6194         (Warn_On_Unreferenced_Entity): ditto.
6195         (Warn_On_Useless_Assignment): ditto.
6197 2014-07-30  Ed Schonberg  <schonberg@adacore.com>
6199         * checks.adb (Insert_Valid_Check): Do not check for the packed
6200         array type of a prefix that is an access type.
6202 2014-07-30  Ed Schonberg  <schonberg@adacore.com>
6204         * sem_attr.adb (Eval_Attribute): Evaluate the GNAT attribute
6205         Unconstrained_Array even if prefix is not frozen yet, as can
6206         occur with a private subtype used as a generic actual.
6208 2014-07-30  Gary Dismukes  <dismukes@adacore.com>
6210         * sem_attr.adb: Minor reformatting.
6212 2014-07-30  Pat Rogers  <rogers@adacore.com>
6214         * gnat_rm.texi: Corrected minor wording error in description
6215         of No_Exception_Registration.
6217 2014-07-30  Yannick Moy  <moy@adacore.com>
6219         * einfo.ads, einfo.adb: New flag Is_Inlined_Always for use in GNATprove
6220         mode. Realphabetize two subprograms.
6221         * inline.adb (Cannot_Inline): Use Is_Inlined_Always in GNATprove mode.
6222         (Can_Be_Inlined_In_GNATprove_Mode): Adapt to possible Empty Body_Id.
6223         (Check_And_Build_Body_To_Inline): Use Is_Inlined_Always in GNATprove
6224         mode.
6225         (Expand_Inline_Call): Use Is_Inlined_Always in GNATprove mode.
6226         * sem_ch6.adb (Analyze_Subprogram_Body_Helper): Do not use
6227         Is_Inline in GNATprove mode.
6228         (Analyze_Subprogram_Specification):
6229         Set Is_Inlined_Always at subprogram entity creation.
6230         * sem_res.adb (Resolve_Call): Do not deal with inlining during
6231         pre-analysis.  Issue warning on call to possibly inlined
6232         subprogram when body not seen.
6234 2014-07-30  Yannick Moy  <moy@adacore.com>
6236         * lib-xref.adb (Generate_Reference): Add special
6237         case for compiler-generated formals in GNATprove mode.
6239 2014-07-30  Yannick Moy  <moy@adacore.com>
6241         * sem_ch6.adb: Add comments.
6243 2014-07-30  Thomas Quinot  <quinot@adacore.com>
6245         * s-os_lib.ads (GM_Time_Of): Clarify documentation.
6247 2014-07-30  Robert Dewar  <dewar@adacore.com>
6249         * sem_aggr.adb, sem_res.adb: Minor reformatting.
6251 2014-07-30  Thomas Quinot  <quinot@adacore.com>
6253         * sem_ch13.adb (Analyze_Attribute_Definition_Clause, case
6254         Bit_Order): Set Reverse_Bit_Order on the base type of the
6255         specified first subtype.
6257 2014-07-30  Ed Schonberg  <schonberg@adacore.com>
6259         * inline.adb (Expand_Inlined_Call): Use a renaming declaration
6260         to capture the value of actuals of a limited type rather than
6261         an object declaration, to prevent spurious errors when analyzing
6262         the inlined body.
6264 2014-07-30  Ed Schonberg  <schonberg@adacore.com>
6266         * sem_ch4.adb (Analyze_Type_Conversion): Treat an inlined body
6267         as an instance, and inhibit semantic checks on already analyzed
6268         code to prevent spurious errors.
6270 2014-07-30  Arnaud Charlet  <charlet@adacore.com>
6272         * a-exctra.ads ("="): New function, to restore compatibility.
6274 2014-07-30  Pascal Obry  <obry@adacore.com>
6276         * adaint.c (__gnat_to_os_time): Set isdst to -1 for the mktime
6277         routine to use the OS dst setting.
6279 2014-07-30  Pat Rogers  <rogers@adacore.com>
6281         * gnat_ugn.texi: Minor correction to description of -gnatw.K.
6283 2014-07-30  Ed Schonberg  <schonberg@adacore.com>
6285         * sem_util.adb (Wrong_Type): Disable some checks equally within
6286         instances and within inlined bodies, to suppress spurious type
6287         errors on already analyzed code.
6288         * sem_aggr.adb (Check_Expr_OK_In_Limited_Aggregate): Expression
6289         is legal in an inlined body, juts as it is in an instance body.
6291 2014-07-30  Ed Schonberg  <schonberg@adacore.com>
6293         * sem_res.adb (Resolve_Unchecked_Conversion): Within an inlined
6294         body the operand of an unchecked conversion may be a literal, in
6295         which case its type is the target type of the conversion. This
6296         is in contrast to conversions in other contexts, where the
6297         operand cannot be a literal and must be resolvable independent
6298         of the context.
6300 2014-07-30  Pierre-Marie Derodat  <derodat@adacore.com>
6302         * gcc-interface/decl.c (gnat_to_gnu_entity) <object>: Create a
6303         mere scalar constant instead of a reference for a renaming of
6304         scalar literal.
6305         * gcc-interface/utils.c (renaming_from_generic_instantiation_p): New.
6306         * gcc-interface/gigi.h (renaming_from_generic_instantiation_p): New.
6308 2014-07-30  Robert Dewar  <dewar@adacore.com>
6310         * s-tasuti.adb, s-tasuti.ads, einfo.ads, sem_prag.adb, s-taasde.adb,
6311         g-socthi-vms.adb, s-taprop-mingw.adb, s-interr.adb, s-interr-hwint.adb,
6312         g-decstr.adb, s-tasdeb-vms.adb, g-expect-vms.adb, makeutl.adb,
6313         s-interr-vms.adb, g-socthi.adb, exp_aggr.adb, s-tasdeb.adb,
6314         g-awk.adb, gnatls.adb, s-taspri-posix.ads, g-catiio.adb,
6315         s-interr-sigaction.adb, s-os_lib.adb, s-fileio.adb: Minor reformatting
6316         & code reorganization.
6318 2014-07-30  Bob Duff  <duff@adacore.com>
6320         * s-tassta.adb, sem_util.ads: Minor reformatting.
6322 2014-07-30  Yannick Moy  <moy@adacore.com>
6324         * inline.adb (Build_Body_To_Inline): Detect when
6325         subprogram has multiple returns, or not a single last return
6326         statement, in GNATprove mode.
6327         (Cannot_Inline): Simplify logic to handle case of GNATprove
6328         inlining first.
6330 2014-07-30  Ed Schonberg  <schonberg@adacore.com>
6332         * sem_ch6.adb: Stubs are not subject to inlining.
6334 2014-07-30  Bob Duff  <duff@adacore.com>
6336         * s-tasuti.ads, s-tasuti.adb (Make_Independent): Change this
6337         from a procedure to a function, so that it can more easily be
6338         called before the "begin" of a task.
6339         * s-taasde.ads (Delay_Block): Make this type immutably limited,
6340         so we can use a build-in-place function call to initialize
6341         Timer_Queue in the body.
6342         * a-rttiev.adb, s-asthan-vms-alpha.adb, s-asthan-vms-ia64.adb,
6343         * s-interr.adb, s-interr-hwint.adb, s-interr-sigaction.adb,
6344         * s-interr-vms.adb, s-taasde.adb: Each independent task now calls
6345         Make_Independent before reaching its "begin", to avoid race
6346         conditions. This causes the activating task to wait until after
6347         Make_Independent is complete before proceeding.  In addition,
6348         we initialize data structures used by independent tasks before
6349         activating those tasks, to avoid possible use of uninitialized data.
6350         * s-interr.ads, s-intman.ads, s-taspri-posix.ads, s-tasdeb.ads:
6351         Minor comment fixes.
6353 2014-07-30  Bob Duff  <duff@adacore.com>
6355         * a-exctra.ads, s-traent-vms.ads, s-traent.ads (Tracebacks_Array): Move
6356         the declaration of Tracebacks_Array from Ada.Exceptions.Traceback to
6357         System.Traceback_Entries (s-traent.ads and s-traent-vms.ads).  Add
6358         subtypes renaming Tracebacks_Array in Ada.Exceptions.Traceback.
6359         * g-debpoo.adb: Refer to Tracebacks_Array in its new home.
6361 2014-07-30  Arnaud Charlet  <charlet@adacore.com>
6363         * a-tasatt.adb: Remove old comments.
6365 2014-07-30  Yannick Moy  <moy@adacore.com>
6367         * einfo.ads (Is_Inlined): Document new use in GNATprove mode.
6368         * inline.adb (Can_Be_Inlined_In_GNATprove_Mode): Add comments
6369         to explain rationale for inlining or not in GNATprove mode.
6370         (Expand_Inlined_Call): In GNATprove mode, set Is_Inlined flag
6371         to False when inlining is not possible.
6372         * sem_ch6.adb (Analyze_Subprogram_Body_Helper): Set Is_Inlined
6373         flag to indicate that subprogram is fully inlined. To be reversed
6374         if inlining problem is found.
6375         * sem_res.adb (Resolve_Call): Set Is_Inlined flag to False when
6376         call in potentially unevaluated context.
6378 2014-07-30  Jose Ruiz  <ruiz@adacore.com>
6380         * s-tarest.adb, s-tarest.ads: Fix comments.
6382 2014-07-30  Robert Dewar  <dewar@adacore.com>
6384         * exp_attr.adb, checks.adb, sem_util.adb, sem_util.ads, sem_attr.adb:
6385         Change No_Scalar_Parts predicate to Scalar_Part_Present and
6386         invert sense of test. This avoids the "not No_xxx" situation
6387         which is always ugly.
6389 2014-07-30  Ed Schonberg  <schonberg@adacore.com>
6391         * inline.adb (Expand_Inlined_Call): When generating code for
6392         an internal subprogram the expansion uses the location of the
6393         call, so that gdb can skip over it. In GNATprove mode we want to
6394         preserve slocs of original subprogram when expanding an inlined
6395         call, to obtain better warnings, even though subprogram appears
6396         not to come from source if it is the inlining of a subprogram
6397         body without a previous spec.
6399 2014-07-30  Eric Botcazou  <ebotcazou@adacore.com>
6401         * exp_aggr.adb (Aggr_Assignment_OK_For_Backend): Reject array
6402         types with atomic components.
6404 2014-07-30  Thomas Quinot  <quinot@adacore.com>
6406         * Make-generated.in: Remove now unnecessary targets after s-oscons
6407         reorg.
6409 2014-07-30  Yannick Moy  <moy@adacore.com>
6411         * sem_res.adb (Resolve_Call): Use ultimate alias
6412         of callee when available.
6414 2014-07-30  Ed Schonberg  <schonberg@adacore.com>
6416         * sem_ch6.adb (Analyze_Expression_Function): To check whether
6417         an expression function is a completion, use the specification of
6418         the previous declaration, not its entity, which may be internally
6419         generated in an inlined context.
6421 2014-07-30  Doug Rupp  <rupp@adacore.com>
6423         * adaint.c (__gnat_tmp_name) [__ANDROID__]: Default to putting
6424         temp files in /cache directory unless overridden by TMPDIR.
6426 2014-07-30  Jose Ruiz  <ruiz@adacore.com>
6428         * s-tassta.adb, s-tarest.adb (Initialize, Create_Task,
6429         Create_Restricted_Task): Remove redundant check. Number_Of_CPUs returns
6430         type CPU, so it can never be greater than CPU_Range'Last.
6432 2014-07-30  Bob Duff  <duff@adacore.com>
6434         * s-taskin.ads: Minor comment fix.
6436 2014-07-30  Thomas Quinot  <quinot@adacore.com>
6438         * g-socket.adb: Remove now useless WITH, USE, and USE TYPE
6439         clauses.
6441 2014-07-30  Yannick Moy  <moy@adacore.com>
6443         * debug.adb: Free debug flag dQ used for frontend inlining in
6444         GNATprove mode..
6445         * sem_ch6.adb (Analyze_Subprogram_Body_Helper): Remove test of
6446         debug flag..
6448 2014-07-30  Thomas Quinot  <quinot@adacore.com>
6450         * Make-generated.in: Remove generation of s-oscons.ads, only
6451         generate the xoscons utility, in runtime-agnostic rules.
6452         * gcc-interface/Makefile.in: Clean up rules. Remove VMS parts,
6453         no longer supported.
6455 2014-07-30  Bob Duff  <duff@adacore.com>
6457         * exp_ch6.adb (Add_Task_Actuals_To_Build_In_Place_Call): New
6458         parameter Chain to be used in the allocator case.
6459         (Make_Build_In_Place_Call_In_Allocator): If the allocated object
6460         has tasks, wrap the code in a block that will activate them,
6461         including the usual finalization code to kill them off in case
6462         of exception or abort.
6464 2014-07-30  Robert Dewar  <dewar@adacore.com>
6466         * treepr.adb, treepr.ads; Reorganize documentation for new pp routines
6467         Remove renamings (don't work for gdb).
6468         (par): New synonym for p (avoid gdb ambiguities).
6469         * inline.adb, sem_ch6.adb, sem_ch13.adb: Minor reformatting.
6471 2014-07-30  Bob Duff  <duff@adacore.com>
6473         * exp_ch9.ads, sem_prag.adb, exp_ch4.adb, sem_ch13.adb: Minor comment
6474         fixes.
6475         * treepr.ads, treepr.adb (ppp): Make this debugging routine
6476         accept any type covered by Union_Id.
6478 2014-07-30  Robert Dewar  <dewar@adacore.com>
6480         * sem_ch4.adb (Analyze_If_Expression): Resolve condition before
6481         analyzing branches.
6482         * sem_eval.adb (Out_Of_Range): Check for statically unevaluated
6483         expression case.
6485 2014-07-30  Robert Dewar  <dewar@adacore.com>
6487         * sem_ch13.adb (Analyze_Aspect, predicate cases): Diagnose use
6488         of predicate aspect on entity other than a type.
6490 2014-07-30  Ed Schonberg  <schonberg@adacore.com>
6492         * sem_ch6.adb (Body_Has_Contract): New predicate to determine
6493         when a subprogram body without a previous spec cannot be inlined
6494         in GNATprove mode, because it includes aspects or pragmas that
6495         generate a SPARK contract clause.
6496         * inline.adb (Can_Be_Inlined_In_GNATprove_Mode): A subprogram
6497         instance cannot be inlined.
6499 2014-07-30  Robert Dewar  <dewar@adacore.com>
6501         * debug.adb: Document that d7 suppresses compilation time output.
6502         * errout.adb (Write_Header): Include compilation time in
6503         header output.
6504         * exp_intr.adb (Expand_Intrinsic_Call): Add
6505         Compilation_Date/Compilation_Time (Expand_Source_Info): Expand
6506         Compilation_Date/Compilation_Time.
6507         * g-souinf.ads (Compilation_Date): New function
6508         (Compilation_Time): New function.
6509         * gnat1drv.adb (Gnat1drv): Set Opt.Compilation_Time.
6510         * gnat_rm.texi (Compilation_Date): New function
6511         (Compilation_Time): New function.
6512         * opt.ads (Compilation_Time): New variable.
6513         * s-os_lib.ads, s-os_lib.adb (Current_Time_String): New function.
6514         * sem_intr.adb (Compilation_Date): New function.
6515         (Compilation_Time): New function.
6516         * snames.ads-tmpl (Name_Compilation_Date): New entry.
6517         (Name_Compilation_Time): New entry.
6519 2014-07-30  Yannick Moy  <moy@adacore.com>
6521         * inline.adb: Add comment.
6523 2014-07-30  Ed Schonberg  <schonberg@adacore.com>
6525         * par-ch4.adb (Is_Parameterless_Attribute): 'Result is a
6526         parameterless attribute, and a postondition can mention an
6527         indexed component or a slice whose prefix is an attribute
6528         reference F'Result.
6530 2014-07-30  Robert Dewar  <dewar@adacore.com>
6532         * sprint.adb (Sprint_Node_Actual, case Object_Declaration):
6533         Avoid bomb when printing package Standard.
6535 2014-07-30  Ed Schonberg  <schonberg@adacore.com>
6537         * sem_elab.adb (Check_Internal_Call_Continue): If an elaboration
6538         entity is created at this point, ensure that the name of the
6539         flag is unique, because the subprogram may be overloaded and
6540         other homonyms may also have elaboration flags created on the fly.
6542 2014-07-30  Hristian Kirtchev  <kirtchev@adacore.com>
6544         * sem_attr.adb (Analyze_Array_Component_Update): New routine.
6545         (Analyze_Attribute): Major cleanup of attribute
6546         'Update. The logic is now split into two distinct routines
6547         depending on the type of the prefix. The use of <> is now illegal
6548         in attribute 'Update.
6549         (Analyze_Record_Component_Update): New routine.
6550         (Check_Component_Reference): Removed.
6551         (Resolve_Attribute): Remove the return statement and ??? comment
6552         following the processing for attribute 'Update. As a result,
6553         the attribute now freezes its prefix.
6555 2014-07-30  Javier Miranda  <miranda@adacore.com>
6557         * exp_ch4.adb (Apply_Accessibility_Check): Do
6558         not call Base_Address() in VM targets.
6560 2014-07-30  Yannick Moy  <moy@adacore.com>
6562         * gnat1drv.adb (Adjust_Global_Switches): Set
6563         Ineffective_Inline_Warnings to True in GNATprove mode.
6564         * inline.adb (Cannot_Inline): Prepare new semantics for GNATprove
6565         mode of inlining.
6566         * opt.ads (Ineffective_Inline_Warnings): Add comment that
6567         describes use in GNATprove mode.
6568         * sem_prag.adb (Analyze_Pragma|SPARK_Mode): Ignore
6569         pragma when applied to the special body created for inlining.
6571 2014-07-30  Robert Dewar  <dewar@adacore.com>
6573         * inline.adb, exp_ch4.adb, sinput.adb, sem_ch6.adb, sem_ch13.adb:
6574         Minor reformatting.
6576 2014-07-30  Hristian Kirtchev  <kirtchev@adacore.com>
6578         * aspects.ads Add a comment explaining why SPARK 2014 aspects are
6579         not delayed. Update the delay status of most SPARK 2014 aspects.
6580         * sem_ch13.adb (Analyze_Aspect_Specifications): Update all calls
6581         to Decorate_Aspect_And_Pragma and Insert_Delayed_Pragma to refert
6582         to Decorate and Insert_Pragma. Add various comments concerning
6583         the delay status of several SPARK 2014 aspects. The insertion
6584         of Refined_State now uses routine Insert_After_SPARK_Mode.
6585         (Decorate): New routine.
6586         (Decorate_Aspect_And_Pragma): Removed.
6587         (Insert_Delayed_Pragma): Removed.
6588         (Insert_Pragma): New routine.
6590 2014-07-30  Ed Schonberg  <schonberg@adacore.com>
6592         * inline.adb (Expand_Inlined_Call): In GNATprove mode, emit
6593         only a warning, not an error on an attempt to inline a recursive
6594         subprogram.
6596 2014-07-30  Robert Dewar  <dewar@adacore.com>
6598         * g-forstr.adb: Minor code reorganization (use J rather than I
6599         as a variable name).
6600         * gnat_rm.texi, sem_prag.adb, sem_util.adb, sem_ch13.adb,
6601         g-forstr.ads: Minor reformatting.
6603 2014-07-30  Eric Botcazou  <ebotcazou@adacore.com>
6605         * sprint.adb (Set_Debug_Sloc): Also reset the end location if
6606         we are debugging the generated code.
6608 2014-07-30  Yannick Moy  <moy@adacore.com>
6610         * sinput.ads, sinput.adb (Comes_From_Inlined_Body): New function that
6611         returns True for source pointer for an inlined body.
6613 2014-07-30  Javier Miranda  <miranda@adacore.com>
6615         * exp_ch4.adb (Apply_Accessibility_Check): Add
6616         missing calls to Base_Address().
6618 2014-07-30  Ed Schonberg  <schonberg@adacore.com>
6620         * sem_ch6.adb (Hanalyze_Subprogram_Body_Helper): In GNATprove
6621         mode, subprogram bodies without a previous declaration are also
6622         candidates for front-end inlining.
6624 2014-07-30  Hristian Kirtchev  <kirtchev@adacore.com>
6626         * aspects.ads Aspects Async_Readers, Async_Writers,
6627         Effective_Reads and Effective_Writes do not need to be delayed.
6628         * sem_ch13.adb (Analyze_Aspect_Specifications): Propagate the
6629         optional Boolean expression when generating the corresponding
6630         pragma for an external property aspect.
6631         * sem_prag.adb (Analyze_External_Property_In_Decl_Part): Remove
6632         local constant Obj. Add local constant Obj_Id. Reimplement the
6633         check which ensures that the related variable is in fact volatile.
6634         (Analyze_Pragma): Reimplement the analysis of external property pragmas.
6635         * sem_util.adb (Is_Enabled): New routine.
6636         (Variable_Has_Enabled_Property): Reimplement the detection of
6637         an enabled external property.
6639 2014-07-30  Sergey Rybin  <rybin@adacore.com frybin>
6641         * gnat_ugn.texi, vms_data.ads: gnatstub: describe generating subunits
6642         for body stubs.
6644 2014-07-30  Pascal Obry  <obry@adacore.com>
6646         * g-forstr.adb, g-forstr.ads: New.
6647         * gnat_rm.texi, impunit.adb Makefile.rtl: Add new unit
6648         GNAT.Formatted_String.
6650 2014-07-30  Eric Botcazou  <ebotcazou@adacore.com>
6652         * exp_aggr.adb (Aggr_Assignment_OK_For_Backend): New predicate.
6653         (Expand_Array_Aggregate): Also enable in-place expansion for
6654         code generated by the compiler.  For an object declaration,
6655         set the kind of the object in addition to its type.  If an
6656         in-place assignment is to be generated and it can be directly
6657         done by the back-end, do not expand the aggregate.
6658         * fe.h (Is_Others_Aggregate): Declare.
6659         * gcc-interface/trans.c
6660         (gnat_to_gnu) <N_Assignment_Statement>: Add support for an
6661         aggregate with a single Others choice on the RHS by means of
6662         __builtin_memset.  Tidy up.
6664 2014-07-30  Ed Schonberg  <schonberg@adacore.com>
6666         * gnat_rm.texi: minor reformatting.
6668 2014-07-30  Yannick Moy  <moy@adacore.com>
6670         * sem_ch6.adb (Analyze_Subprogram_Helper_Body): Remove body to inline
6671         in SPARK_Mode Off.
6673 2014-07-30  Robert Dewar  <dewar@adacore.com>
6675         * gnat_rm.texi: Document additional implementation-defined use
6676         of Constrained.
6678 2014-07-30  Robert Dewar  <dewar@adacore.com>
6680         * prj-proc.adb, prj-strt.adb: Update comments.
6682 2014-07-30  Gary Dismukes  <dismukes@adacore.com>
6684         * sinfo.ads, einfo.ads, checks.ads: Minor typo fix and reformatting.
6686 2014-07-30  Vincent Celier  <celier@adacore.com>
6688         * prj-proc.adb (Imported_Or_Extended_Project_From): New Boolean
6689         parameter No_Extending, defaulted to False. When No_Extending
6690         is True, do not look for an extending project.
6691         (Expression): For a variable reference that is not for the current
6692         project, get its Id calling Imported_Or_Extended_Project_From
6693         with No_Extending set to True.
6694         * prj-strt.adb (Parse_Variable_Reference): If a referenced
6695         variable is not found in the current project, check if it is
6696         defined in one of the projects it extends.
6698 2014-07-30  Robert Dewar  <dewar@adacore.com>
6700         * sem_util.adb (Predicate_Tests_On_Arguments): Omit tests for
6701         some additional cases of internally generated routines.
6703 2014-07-30  Ed Schonberg  <schonberg@adacore.com>
6705         * sem_ch10.adb (Analyze_Proper_Body): When compiling for ASIS,
6706         if the compilation unit is a subunit, extend optional processing
6707         to all subunits of the current one. This allows gnatstub to
6708         supress generation of spurious bodies.
6710 2014-07-30  Hristian Kirtchev  <kirtchev@adacore.com>
6712         * a-cbmutr.adb (Insert_Child): Use local variable First to keep
6713         track of the initial element's index within the tree.
6715 2014-07-29  Hristian Kirtchev  <kirtchev@adacore.com>
6717         * a-cbmutr.adb (Allocate_Node): Remove the two parameter version.
6718         (Insert_Child): Add local variable First. Capture the index of the
6719         first node being created to ensure correct cursor construction
6720         later on. Use the three parameter version of Allocate_Node
6721         when creating multiple children as this method allows aspect
6722         Default_Value to take effect (if applicable).
6724 2014-07-29  Eric Botcazou  <ebotcazou@adacore.com>
6726         * exp_aggr.adb (Safe_Slice_Assignment): Remove.
6727         (Expand_Array_Aggregate): For a safe slice assignment, just set
6728         the target and use the common code path.
6730 2014-07-29  Robert Dewar  <dewar@adacore.com>
6732         * sem_util.adb, sem_util.ads, sem_res.adb, exp_ch6.adb: Invert
6733         predicate No_Predicate_Test_On_Arguments, new name is
6734         Predicate_Tests_On_Arguments (with the opposite sense).
6736 2014-07-29  Hristian Kirtchev  <kirtchev@adacore.com>
6738         * sem_attr.adb (Resolve_Attribute): Clean up the code for
6739         attribute 'Access. Do not generate an elaboration flag for a
6740         stand alone expression function. The expression of an expression
6741         function is now frozen when the expression function appears as
6742         the prefix of attribute 'Access.
6743         * sem_ch6.adb (Analyze_Expression_Function): Remove local
6744         variable New_Decl and update all references to it after the
6745         rewriting has taken place. Establish the linkages between the
6746         generated spec and body.
6748 2014-07-29  Robert Dewar  <dewar@adacore.com>
6750         * sem_prag.adb (ip, rv): Prevent from being optimized away.
6751         * gnatls.adb (gnatls): Set E_Fatal exit status if ali file not found.
6752         * s-imgllb.adb, s-imgllw.adb, s-imgwiu.adb, s-imgbiu.adb: Minor
6753         reformatting.
6755 2014-07-29  Vincent Celier  <celier@adacore.com>
6757         * prj-pp.adb: Minor comment update.
6758         * frontend.adb: If a target dependency info file has been read
6759         through switch -gnateT= add it to the dependencies of the source
6760         being compiled.
6762 2014-07-29  Robert Dewar  <dewar@adacore.com>
6764         * sem_ch3.adb, prj.adb: Minor reformatting.
6766 2014-07-29  Vincent Celier  <celier@adacore.com>
6768         * prj-pp.adb (Pretty_Print.Output_Project_File): New
6769         procedure to output project file names between quotes without
6770         concatenation, even if the line is too long.
6771         (Pretty_Print): Use Output_Project_File for project being extended and
6772         project imported.
6774 2014-07-29  Vincent Celier  <celier@adacore.com>
6776         * gnat_ugn.texi: Document that configuration pragmas files are
6777         added to the dependencies, unless they contain only pragmas
6778         Source_File_Name_Project.
6780 2014-07-29  Robert Dewar  <dewar@adacore.com>
6782         * frontend.adb: Minor reformatting.
6784 2014-07-29  Robert Dewar  <dewar@adacore.com>
6786         * exp_ch6.adb (Add_Call_By_Copy_Code): Minor reformatting
6787         (Expand_Actuals): Make sure predicate checks are properly applied
6788         for the case of OUT or IN OUT parameters.
6789         * sem_res.adb: Minor reformatting (Resolve_Actuals): Skip
6790         predicate tests on arguments for Finalize
6791         * sem_util.adb (No_Predicate_Test_On_Arguments): Returns True
6792         if predicate tests on subprogram arguments should be skipped.
6793         * sem_util.ads (No_Predicate_Test_On_Arguments): New function
6795 2014-07-29  Ed Schonberg  <schonberg@adacore.com>
6797         * sem_ch3.adb (Analyze_Object_Declaration): If there is an address
6798         clause for the object and the expression is an aggregate, defer
6799         resolution and expansion of the aggregate until the freeze point
6800         of the entity.
6801         * sem_aggr.adb (Resolve_Aggregate): An others_clause is legal if
6802         the parent node is an N_Reference generated during expansion.
6804 2014-07-29  Vincent Celier  <celier@adacore.com>
6806         * prj.adb (Add_To_Buffer): Effectively double the size of the buffer.
6808 2014-07-29  Robert Dewar  <dewar@adacore.com>
6810         * frontend.adb, inline.adb, sem_util.adb, sem_res.adb,
6811         prepcomp.ads: Minor reformatting and code clean up.
6812         * exp_ch6.adb (Expand_Actuals): Generate predicate test
6813         unconditionally for case of OUT or IN OUT actual (before this
6814         was generated only for certain subcases, which is wrong, the
6815         test is always needed).
6817 2014-07-29  Ed Schonberg  <schonberg@adacore.com>
6819         * sem_ch3.adb: Move Has_Defaulted_Discriminants to sem_util.
6820         * sem_ch4.adb (Analyze_Allocator): Defer resolution of expression
6821         until context type is available.
6822         * sem_res.adb (Resolve_Allocator): In the case of a qualified
6823         expression, complete resolution of expression.
6824         (Check_Aliased_Parameter): New procedure within Resolve_Actuals,
6825         to apply Ada2012 checks on aliased formals, as well as
6826         accesibility checks when the context of the call is an allocator
6827         or a qualified expression.
6828         * sem_util.ads, sem_util.adb (Has_Defaulted_Discriminants):
6829         Moved here from sem_ch3.
6830         (Object_Access_Level): Handle properly aliased formals and
6831         aggregates.
6832         * exp_ch6.adb (Expand_Call): Remove check on aliased parameters,
6833         now properly performed in sem_res (Resolve_Actuals,
6834         Check_Aliased_Parameter).
6836 2014-07-29  Yannick Moy  <moy@adacore.com>
6838         * debug.adb Enable GNATprove inlining under debug flag -gnatdQ for now.
6839         * inline.ads, inline.adb (Can_Be_Inlined_In_GNATprove_Mode): New
6840         function to decide when a subprogram can be inlined in GNATprove mode.
6841         (Check_And_Build_Body_To_Inline): Include GNATprove_Mode as a
6842         condition for possible inlining.
6843         * sem_ch10.adb (Analyze_Compilation_Unit): Remove special case
6844         for Inline_Always in GNATprove mode.
6845         * sem_ch6.adb (Analyze_Subprogram_Body_Helper): Build inlined
6846         body for subprograms in GNATprove mode, under debug flag -gnatdQ.
6847         * sem_prag.adb Minor change in comments.
6848         * sem_res.adb (Resolve_Call): Only perform GNATprove inlining
6849         inside subprograms marked as SPARK_Mode On.
6850         * sinfo.ads: Minor typo fix.
6852 2014-07-29  Vincent Celier  <celier@adacore.com>
6854         * frontend.adb: Add dependency on gnat.adc when taken into account
6855         and on non-temporary configuration pragmas files specified in
6856         switches -gnatec.
6857         * prepcomp.ads, prepcomp.adb (Add_Dependency): New procedure to add
6858         dependencies on configuration pragmas files.
6860 2014-07-29  Pat Rogers  <rogers@adacore.com>
6862         * gnat_ugn.texi: Minor clarification to the explanation for the
6863         GNATtest -v switch.
6865 2014-07-29  Robert Dewar  <dewar@adacore.com>
6867         * types.ads (Mechanism_Type): Change range back to -18 .. Int'Last with
6868         documentation that explains the need for this extended range
6869         (use by C_Pass_By_Copy).
6871 2014-07-29  Robert Dewar  <dewar@adacore.com>
6873         * gnat_rm.texi, sem_prag.adb: Minor reformatting.
6875 2014-07-29  Sergey Rybin  <rybin@adacore.com frybin>
6877         * gnat_ugn.texi: gnatmetric: clarify documentation for cyclomatic
6878         complexity metrics.
6880 2014-07-29  Thomas Quinot  <quinot@adacore.com>
6882         PR ada/60652
6883         * s-oscons-tmplt.c: For Linux, define _BSD_SOURCE in order for
6884         CRTSCTS to be visible.
6886 2014-07-29  Bob Duff  <duff@adacore.com>
6888         * g-trasym.adb, g-trasym.ads: Code cleanup.
6890 2014-07-29  Doug Rupp  <rupp@adacore.com>
6892         * sigtramp-vxworks.c: Minor reformatting.
6894 2014-07-29  Ed Schonberg  <schonberg@adacore.com>
6896         * gnat_rm.texi: No doc needed for Ada2012 aspect
6897         Implicit_dereference.
6899 2014-07-29  Robert Dewar  <dewar@adacore.com>
6901         * sem_attr.adb (Attribute_12): New array
6902         (Analyze_Attribute): Check impl-defined Ada 2012 attributes.
6903         (Check_Ada_2012_Attribute): Removed.
6905 2014-07-29  Doug Rupp  <rupp@adacore.com>
6907         * init.c (vxworks6): Call sigtramp for RTP (as well as DKM) for ARM,
6908         PPC, and e500.
6909         * sigtramp-vxworks.c: New file.
6910         * sigtramp-armvxw.c, sigtramp-ppcvxw.c: removed files.
6912 2014-07-29  Ed Schonberg  <schonberg@adacore.com>
6914         * lib-xref.adb (Output_Refs, Check_Type_Reference): For a
6915         derived array type, add information about component type, which
6916         was previously missing in ali file.
6917         * gnat_rm.texi: Add documentation for Atomic_Always_Lock_Free.
6919 2014-07-29  Thomas Quinot  <quinot@adacore.com>
6921         * sem_ch3.adb (Constrain_Corresponding_Record): For the case
6922         of the subtype created for a record component, do not mark
6923         the subtype as frozen. For one thing, this is anomalous (in
6924         particular, the base type might not itself be frozen yet);
6925         furthermore, proper freezing of the subtype must happen in any
6926         case. So, we just mark the subtype as requiring delayed freezing
6927         (and we'll actually freeze it when generating the init_proc of
6928         the enclosing record).
6929         Also change the name of the constrained record subtype (append a
6930         'C' so that it is clearly different from the unconstrained record
6931         type, "related_idV") to make debugging easier.
6932         (Process_Full_View): When creating a full subtype for a pending
6933         private subtype, re-establish the scope of the private subtype
6934         so that we get proper visibility on outer discriminants.
6935         * exp_ch3.adb (Build_Init_Statements): Freeze any component
6936         subtype that is not frozen yet.
6938 2014-07-29  Vincent Celier  <celier@adacore.com>
6940         * prj-proc.adb (Recursive_Process): Always initialize the
6941         environment when the project is an aggregate project, even when
6942         it is not the root tree.
6943 2014-07-29  Robert Dewar  <dewar@adacore.com>
6945         * exp_ch5.adb, exp_ch9.adb: Minor comment additions.
6946         * gnat_rm.texi: Complete list of implementation aspects.
6947         * aspects.ads: Minor comment clarification.
6949 2014-07-29  Ed Schonberg  <schonberg@adacore.com>
6951         * exp_ch5.adb (Expand_N_Assignment_Statement): If the target type
6952         is a null-excluding access type, do not generate a constraint
6953         check if Suppress_Assignment_Checks is set on assignment node.
6954         * exp_ch9.adb (Build_Simple_Entry_Call): If actual is an out
6955         parameter of a null-excluding access type, there is access check
6956         on entry, so set Suppress_Assignment_Checks on generated statement
6957         that assigns actual to parameter block.
6958         * sinfo.ads: Document additional use of Suppress_Assignment_Checks.
6960 2014-07-29  Robert Dewar  <dewar@adacore.com>
6962         * gnat_rm.texi: Change theta to @ in documentation of aspect
6963         Dimension_System.
6965 2014-07-29  Robert Dewar  <dewar@adacore.com>
6967         * sem_attr.adb (Uneval_Old_Msg): Flags Uneval_Old_Accept/Warn
6968         are now on pragma.
6969         * sem_ch13.adb (Analyze_Aspect_Specifications): Remove setting
6970         of Uneval_Old_*
6971         * sem_prag.adb (Analyze_Pragma): Set Uneval_Old_* flags
6972         * sinfo.ads, sinfo.adb: Move Uneval_Old_Accept/Warn to N_Pragma node.
6974 2014-07-29  Javier Miranda  <miranda@adacore.com>
6976         * types.ads Update documentation on how to add new reason codes
6977         for exceptions.
6978         (RT_Exception_Code): Keep values ordered by their
6979         reason code.  Required by the .NET backend.
6980         (RT_CE_Exceptions): Subtype declaration removed.
6981         (RT_PE_Exceptions): Subtype declaration removed.
6982         (RT_SE_Exceptions): Subtype declaration removed.
6983         (Kind): New mapping table of RT_Exception_Codes.
6984         * exp_ch11.adb (Get_RT_Exception_Entity): Updated to use the
6985         new mapping table.
6986         * tbuild.adb (Make_Raise_Storage_Error): Updated to use the new
6987         mapping table.  (Make_Raise_Program_Error): Updated to use the
6988         new mapping table.
6989         (Make_Raise_Storage_Error): Updated to use the new mapping table.
6990         * a-except.adb Keep Rcheck_CE_xxx entities ordered according to
6991         their reason code.
6993 2014-07-29  Thomas Quinot  <quinot@adacore.com>
6995         * gnat_rm.texi: Document internal attributes used for PolyORB/DSA
6996         distributed stubs generation.
6997         * exp_ch3.adb: Minor reformatting.
6999 2014-07-29  Yannick Moy  <moy@adacore.com>
7001         * sinfo.ads: Document constraint between frontend and GNATprove.
7003 2014-07-29  Robert Dewar  <dewar@adacore.com>
7005         * a-except.adb: Minor comment clarification.
7007 2014-07-29  Robert Dewar  <dewar@adacore.com>
7009         * gnat_rm.texi: Complete list of implementation attributes.
7010         * snames.ads-tmpl: Clean up list of impl-defined attributes.
7012 2014-07-29  Hristian Kirtchev  <kirtchev@adacore.com>
7014         * freeze.adb (Freeze_Record_Type): Perform various
7015         volatility-related checks.
7017 2014-07-29  Robert Dewar  <dewar@adacore.com>
7019         * sem_ch3.adb, sem_eval.adb: Minor reformatting.
7021 2014-07-29  Ed Schonberg  <schonberg@adacore.com>
7023         * sem_attr.adb: sem_attr.adb (Access_Attribute): Handle properly
7024         the case where the attribute reference appears in a nested scope
7025         from that of the subprogram prefix.
7026         * sem_attr.adb: Minor reformatting.
7028 2014-07-29  Robert Dewar  <dewar@adacore.com>
7030         * gnat_ugn.texi: Clarify documentation of Initialize_Scalar
7031         initialization options.
7033 2014-07-29  Robert Dewar  <dewar@adacore.com>
7035         * sinfo.ads: Minor comment addition.
7037 2014-07-29  Bob Duff  <duff@adacore.com>
7039         * sem_eval.adb, sem_ch13.adb: Minor reformatting.
7041 2014-07-29  Doug Rupp  <rupp@adacore.com>
7043         * init.c: Complete previous change.
7045 2014-07-29  Robert Dewar  <dewar@adacore.com>
7047         * exp_ch4.adb (Expand_N_If_Expression): Deal with unconstrained
7048         array case.
7050 2014-07-29  Ed Schonberg  <schonberg@adacore.com>
7052         * sem_attr.adb (Access_Attribute): If the prefix is a subprogram
7053         and the completion will appear in the same declarative part,
7054         create elaboration flag.
7055         * exp_util.adb (Set_Elaboration_Flag): If the subprogram body
7056         is a completion of a declaration in the same declarative part,
7057         and the subprogram has had its address taken, add elaboration
7058         check inside the subprogram body, to detect elaboration errors
7059         that may occur through indirect calls.
7061 2014-07-29  Doug Rupp  <rupp@adacore.com>
7063         * sigtramp-armvxw.c: Enhance to handle RTP trampolining.
7064         * init.c: Remove guard on sigtramp for ARM VxWorks RTP.
7066 2014-07-29  Vincent Celier  <celier@adacore.com>
7068         * switch-c.adb (Scan_Front_End_Switches): Do not fail when two
7069         runtime directorie specified with two switches --RTS= designate
7070         the same directory, even when there are no literarily the same.
7072 2014-07-29  Robert Dewar  <dewar@adacore.com>
7074         * gnat_ugn.texi: Minor documentation clarification.
7075         * switch-c.adb: Minor reformatting.
7077 2014-07-29  Robert Dewar  <dewar@adacore.com>
7079         * sem_prag.adb (Analyze_Pragma, case Allow_Integer_Address):
7080         Fix incorrect RTE call which caused bomb if pragma was in
7081         configuration pragma file.
7083 2014-07-29  Jerome Lambourg  <lambourg@adacore.com>
7085         * expect.c (__gnat_expect_poll): Fix typo in previous change.
7086         * g-expect.adb: Update comments.
7088 2014-07-29  Arnaud Charlet  <charlet@adacore.com>
7090         * s-parame-hpux.ads, s-parame-vms-ia64.ads, s-parame.ads
7091         (Default_Attribute_Count): Bump to 16 on native platforms.
7093 2014-07-29  Ed Schonberg  <schonberg@adacore.com>
7095         * sem_res.adb: Add guard to front-end inlining for SPARK.
7097 2014-07-29  Robert Dewar  <dewar@adacore.com>
7099         * sem_ch10.adb, debug.adb, sem_prag.adb, sem_res.adb, sem_ch6.adb:
7100         Minor reformatting.
7102 2014-07-29  Ed Schonberg  <schonberg@adacore.com>
7104         * sem_ch6.adb (Analyze_Subprogram_Body_Helper): Build body to
7105         inline in GNATprove mode when subprogran is marked Inline_Always.
7106         * sem_res.adb (Resolve_Call): Expand call in place in GNATProve
7107         mode if body to inline is available.
7108         * sem_prag.adb (Analyze_Pragma, case Inline_Always): Make pragma
7109         effective in GNATprove mode.
7110         * sem_ch10.adb (Analyze_Compilation_Unit): Call
7111         Check_Package_Body_For_Inlining in GNATprove mode, so that body
7112         containing subprograms with Inline_Always can be available before
7113         calls to them.
7115 2014-07-29  Ed Schonberg  <schonberg@adacore.com>
7117         * inline.ads, inline.adb, sem_ch10.adb: Rename Check_Body_For_Inlining
7118         to Check_Package_Body_For_Inlining, to prevent confusion with other
7119         inlining subprograms.
7121 2014-07-29  Robert Dewar  <dewar@adacore.com>
7123         * opt.ads: Minor comment update.
7124         * sem_attr.adb (Uneval_Old_Msg): Deal with case of aspect, where
7125         we want setting of Uneval_Old at time of encountering the aspect.
7126         * sem_ch13.adb (Analyze_Aspect_Specifications): Capture setting
7127         of Opt.Uneval_Old.
7128         * sinfo.adb (Uneval_Old_Accept): New function (Uneval_Old_Warn):
7129         New function (Set_Uneval_Old_Accept): New procedure.
7130         (Set_Uneval_Old_Warn): New procedure.
7131         * sinfo.ads: Uneval_Old_Accept: New flag Uneval_Old_Warn: New flag.
7133 2014-07-29  Robert Dewar  <dewar@adacore.com>
7135         * sinfo.ads, inline.adb, inline.ads, sem_ch6.adb: Minor reformatting.
7136         * snames.ads-tmpl: Minor reformatting.
7137         * xsnamest.adb (XSnamesT): Remove special casing of Name_Error
7138         to give <Error>.  Not clear why this was there, but the compiler
7139         sources do not reference Name_Error, and this interfered with
7140         the circuits for pragma Unevaluated_Use_Of_Old.
7142 2014-07-29  Hristian Kirtchev  <kirtchev@adacore.com>
7144         * sem_prag.adb (Process_Atomic_Shared_Volatile): Allow volatile
7145         types in SPARK 2014 (again).
7146         * sem_res.adb (Is_OK_Volatile_Context): New routine.
7147         (Resolve_Entity_Name): Ensure that a volatile object with
7148         enabled properties Async_Writers or Effectire_Reads appears in
7149         a non-interfering context.
7151 2014-07-29  Ed Schonberg  <schonberg@adacore.com>
7153         * sem_ch6.adb: Move Build_Body_To_Inline,
7154         Check_And_Buid_Body_To_Inline, and Cannot_Inline to package Inline.
7155         * exp_ch6.adb: Mode Expand_Inlined_Body to package Inline.
7156         * inline.ads, inline.adb: Package now contains subprograms that
7157         implement front-end inlining.  No functional changes, no test
7158         needed.
7160 2014-07-29  Robert Dewar  <dewar@adacore.com>
7162         * exp_dbug.adb, g-expect.adb, sem_elab.adb: Minor typo fix.
7164 2014-07-29  Ed Schonberg  <schonberg@adacore.com>
7166         * sem_ch6.adb (Analyze_Return_Type): Reject a return type that
7167         is a limited view when the context is a package body, because
7168         there is no subsequent place at which the non-limited view may
7169         become visible.
7170         (Process_Formals): Ditto.
7171         * sinfo.ads, par-ch3.adb: Minor reformatting.
7173 2014-07-29  Jerome Lambourg  <lambourg@adacore.com>
7175         * expect.c (__gnat_expect_poll): New parameter dead_process
7176         used to return the dead process among the array of file
7177         descriptors. The Windows, VMS and HPUX implementations now
7178         properly report the dead process via this parameter. Other unixes
7179         don't need it.
7180         * g-expect.adb (Poll): Adapt to the C profile.
7181         (Expect_Internal): Use the new parameter to properly close the
7182         File Descriptor.  This then can be properly reported by the
7183         function First_Dead_Process as is expected.
7185 2014-07-29  Robert Dewar  <dewar@adacore.com>
7187         * gnat_ugn.texi: Minor clarification of -gnatQ switch.
7189 2014-07-29  Robert Dewar  <dewar@adacore.com>
7191         * einfo.adb (Derived_Type_Link): New function
7192         (Set_Derived_Type_Link): New procedure.
7193         (Write_Field31_Name): Output Derived_Type_Link.
7194         * einfo.ads: New field Derived_Type_Link.
7195         * exp_ch6.adb (Expand_Call): Warn if change of representation
7196         needed on call.
7197         * sem_ch13.adb: Minor addition of ??? comment.
7198         (Rep_Item_Too_Late): Warn on case that is legal but could cause an
7199         expensive implicit conversion.
7200         * sem_ch3.adb (Build_Derived_Type): Set Derived_Type_Link if needed.
7202 2014-07-29  Hristian Kirtchev  <kirtchev@adacore.com>
7204         * exp_ch3.adb (Build_Init_Procedure): Renamed Local_DF_Id
7205         to DF_Id. Add new local variable DF_Call. Do not perform any
7206         elaboration-related checks on the call to the partial finalization
7207         routine within an init proc to avoid generating bogus elaboration
7208         warnings on expansion-related code.
7209         * sem_elab.adb (Check_A_Call): Move constant Access_Case to
7210         the top level of the routine.  Ensure that Output_Calls takes
7211         into account flags -gnatel and -gnatwl when emitting warnings
7212         or info messages.
7213         (Check_Internal_Call_Continue): Update the call to Output_Calls.
7214         (Elab_Warning): Moved to the top level of routine Check_A_Call.
7215         (Emit): New routines.
7216         (Output_Calls): Add new formal parameter Check_Elab_Flag along with a
7217         comment on usage. Output all warnings or info messages only when the
7218         caller context demands it and the proper elaboration flag is set.
7220 2014-07-29  Yannick Moy  <moy@adacore.com>
7222         * sem_attr.adb (Analyze_Attribute/Attribute_Old):
7223         Check rule about Old appearing in potentially unevaluated
7224         expression everywhere, not only in Post.
7226 2014-07-29  Arnaud Charlet  <charlet@adacore.com>
7228         * sem_prag.adb: Update comment.
7229         * a-except.adb, a-except-2005.adb: Minor editing.
7231 2014-07-29  Pierre-Marie Derodat  <derodat@adacore.com>
7233         * exp_dbug.adb (Debug_Renaming_Declaration):
7234         Do not create renaming entities for renamings of non-packed
7235         objects and for exceptions.
7237 2014-07-29  Robert Dewar  <dewar@adacore.com>
7239         * sem_ch3.adb, sinfo.ads, types.ads, sem_prag.adb, a-except-2005.adb,
7240         sem_ch6.adb, par-ch3.adb: Minor reformatting.
7242 2014-07-29  Ed Schonberg  <schonberg@adacore.com>
7244         * sem_ch6.adb (Check_Return_Subtype_Indication): Reject a return
7245         subtype indication in an extended return statement when the
7246         return value is an ancestor of the return type of the function,
7247         and that return type is a null record extension.
7249 2014-07-29  Thomas Quinot  <quinot@adacore.com>
7251         * sem_ch13.adb (Rep_Item_Too_Late): Specialize/clarify error
7252         message produced for the case of a type-related representation
7253         item that is made illegal by 13.10(1).
7254         * gnat_rm.texi (Scalar_Storage_Order): Minor change in
7255         documentation.
7257 2014-07-29  Robert Dewar  <dewar@adacore.com>
7259         * gnat_ugn.texi: Add section on Wide_Wide_Character encodings.
7260         * erroutc.adb (Output_Error_Msgs): Take wide characters into
7261         account in computing position of error flags.
7262         * sinput.adb (Get_Column_Number): Take wide characters into
7263         account.
7265 2014-07-29  Ed Schonberg  <schonberg@adacore.com>
7267         * par-ch3.adb (P_Access_Type_Definition): The subtype indication
7268         in an access type definition can carry a null_exclusion indicator.
7269         * sem_ch3.adb (Access_Type_Declaration): If the subtype indication
7270         carries a null_exclusion indicator, verify that the subtype
7271         indication denotes an access type, and create a null-excluding
7272         subtype for it.
7273         * sinfo.ads, sinfo.adb: New attribute Null_Excluding_Subtype,
7274         defined on N_Access_To_Object_Definition to indicate that the
7275         subtype indication carries a null_exclusion indicator.
7277 2014-07-29  Hristian Kirtchev  <kirtchev@adacore.com>
7279         * exp_ch6.adb (Add_Extra_Actual): Do not construct
7280         the extra actual by name, generate a reference instead.
7282 2014-07-29  Arnaud Charlet  <charlet@adacore.com>
7284         * sem_prag.adb (Analyze_Pragma): Do not crash analyzing
7285         Allow_Integer_Address if already set.
7286         * a-except-2005.adb (Rcheck_PE_Stream_Operation_Not_Allowed):
7287         Fix order, for consistency with Rmsg_xx declarations.
7289 2014-07-29  Ed Schonberg  <schonberg@adacore.com>
7291         * sem_ch4.adb (Complete_Object_Operation): If the type of the
7292         candidate subprogram is a limited view, use non-limited view
7293         when available.
7295 2014-07-29  Robert Dewar  <dewar@adacore.com>
7297         * sem_ch13.adb: Minor change in RM reference.
7298         * sem_mech.ads: Minor reformatting.
7299         * einfo.ads: Minor comment fix.
7300         * types.ads: Minor correction to range given for Mechanism_Type.
7301         * exp_ch6.adb (Add_Invariant_And_Predicate_Checks): Do not
7302         check predicate on way out for OUT or IN OUT parameters.
7303         * par-ch3.adb (P_Constraint_Opt): Handle missing RANGE keyword
7304         better (P_Range_Constraint): Corresponding fix.
7305         * checks.ads: Minor comment clarification.
7307 2014-07-29  Gary Dismukes  <dismukes@adacore.com>
7309         * sem_ch8.adb (Analyze_Object_Renaming): Set the Is_Volatile
7310         and Treat_As_Volatile flags based on whether the renamed object
7311         is a volatile object.
7313 2014-07-29  Olivier Hainque  <hainque@adacore.com>
7315         * g-debpoo.adb
7316         (Default_Alignment): Rename as Storage_Alignment. This is not
7317         a "default" that can be overriden. Augment comment to clarify
7318         intent and document why we need to manage alignment padding.
7319         (Header_Offset): Set to Header'Object_Size instead of 'Size
7320         rounded up to Storage_Alignment. Storage_Alignment on the
7321         allocation header is not required by our internals so was
7322         overkill. 'Object_Size is enough to ensure proper alignment
7323         of the header address when substracted from a storage address
7324         aligned on Storage_Alignment.
7325         (Minimum_Allocation): Rename as Extra_Allocation, conveying that
7326         this is always added on top of the incoming allocation requests.
7327         (Align): New function, to perform alignment rounding operations.
7328         (Allocate): Add comments on the Storage_Address computation
7329         scheme and adjust so that the alignment padding applies to that
7330         (Storage_Address) only.
7332 2014-07-29  Robert Dewar  <dewar@adacore.com>
7334         * exp_ch3.adb (Default_Initialize_Object): Remove incorrect
7335         pragma Unreferenced.
7336         * cstand.adb (Create_Standard): Use E_Array_Type for standard
7337         string types. Make sure index of Any_String/Any_Array is in a list.
7338         * errout.adb: Minor reformatting.
7340 2014-07-29  Robert Dewar  <dewar@adacore.com>
7342         * gnat_ugn.texi: Clean up and correct documentation of warnings.
7343         * usage.adb: Minor corrections to make sure warnings are properly
7344         documented.
7345         * warnsw.adb (Set_Warning_Switch): Remove redundant return statement.
7346         (WA_Warnings): Add Warn_On_Suspicious_Modulus_Value.
7348 2014-07-29  Ed Schonberg  <schonberg@adacore.com>
7350         * exp_ch3.adb (Expand_N_Object_Declaration): The dummy block
7351         created to match internal sequence numbers between compilations
7352         with/without abort must have its type properly set.
7354 2014-07-29  Robert Dewar  <dewar@adacore.com>
7356         * ali.adb (Initialize_ALI): Initialize SSO_Default_Specified
7357         (Scan_ALI): Set SSO_Default in ALIs_Record (Scan_ALI): Set
7358         SSO_Default_Specified.
7359         * ali.ads (ALIs_Record): Add field SSO_Default
7360         (SSO_Default_Specified): New global switch.
7361         * bcheck.adb (Check_Consistent_SSO_Default): New procedure
7362         (Check_Configuration_Consistency): Call this procedure
7363         * einfo.adb (SSO_Set_High_By_Default): New
7364         function (SSO_Set_Low_By_Default): New function
7365         (Set_SSO_Set_High_By_Default): New procedure
7366         (Set_SSO_Set_Low_By_Default): New procedure (Write_Entity_Flags):
7367         List new flags
7368         * einfo.ads (SSO_Set_Low_By_Default): New flag
7369         (SSO_Set_High_By_Default): New flag
7370         * freeze.adb (Set_SSO_From_Default): New procedure
7371         (Freeze_Array_Type): Call Set_SSO_From_Default
7372         (Freeze_Record_Type): Call Set_SSO_From_Default
7373         * gnat_rm.texi: Document pragma Default_Scalar_Storage_Order
7374         * lib-writ.adb (Write_ALI): Set OL/OH in P line as needed
7375         * lib-writ.ads: Add OL/OH parameters to P line
7376         * opt.adb: Set Default_SSO, Default_SSO_Config as appropriate
7377         * opt.ads (Default_SSO): New global switch (Default_SSO_Config):
7378         New global switch
7379         * repinfo.adb (List_Scalar_Storage_Order): List SSO when it is
7380         set by default using pragma Default_Scalar_Storage_Order.
7381         * sem.ads (Scope_Stack_Entry): Add component Save_Default_SSO
7382         * sem_ch13.adb (Inherit_Delayed_Rep_Aspects):
7383         Clear SSO defaults when explicit SSO is inherited.
7384         (Analyze_Attribute_Definition_Clause): Clear SSO defaults when
7385         explicit SSO is specified.
7386         (Inherit_Aspects_At_Freeze_Point):
7387         Clear SSO default when inheriting SSO.
7388         * sem_ch3.adb (Set_Default_SSO): New procedure
7389         (Analyze_Private_Extension_Declaration): Set defualt SSO
7390         (Array_Type_Declaration): ditto (Build_Derived_Array_Type): ditto
7391         (Build_Derived_Private_Type): ditto (Build_Derived_Record_Type):
7392         ditto (Build_Derived_Type): ditto (Make_Class_Wide_Type): ditto
7393         (Record_Type_Declaration): ditto
7394         * sem_ch8.adb (Pop_Scope): Restore Default_SSO (Push_Scope):
7395         Save Default_SSO
7396         * sem_prag.adb (Analyze_Pragma, case
7397         Default_Scalar_Storage_Order): Set Default_SSO
7399 2014-07-29  Ed Schonberg  <schonberg@adacore.com>
7401         * sem_ch6.adb (Valid_Operator_Definition): Verify that
7402         all parameter have mode IN. This check must be done here for
7403         subprogram instantiations that have operator names, because their
7404         analysis does not follow the same path as that for subprogram
7405         declarations.
7407 2014-07-29  Robert Dewar  <dewar@adacore.com>
7409         * freeze.adb (Freeze_Entity, Concurrent_Type case): Add a guard
7410         to make sure that the Etype of a component of the corresponding
7411         record type is present before trying to freeze it.
7412         * sem_ch5.adb: Minor reformatting.
7414 2014-07-29  Robert Dewar  <dewar@adacore.com>
7416         * exp_attr.adb, types.ads, types.h, exp_ch11.adb, a-except.adb,
7417         a-except-2005.adb: Add new reason code PE_Stream_Operation_Not_Allowed,
7418         and then use it when a stream operation is used from a library generic
7419         when the restriction (No_Streams) is active.
7421 2014-07-29  Thomas Quinot  <quinot@adacore.com>
7423         * projects.texi: Fix minor typo.
7425 2014-07-29  Yannick Moy  <moy@adacore.com>
7427         * sem_attr.adb (Analyze_Attribute): Fix generation of warning.
7429 2014-07-29  Arnaud Charlet  <charlet@adacore.com>
7431         * sem_ch5.adb (Check_Unreachable_Code): Do not remove code in
7432         CodePeer mode.
7434 2014-07-29  Hristian Kirtchev  <kirtchev@adacore.com>
7436         * exp_ch7.adb (Find_Last_Init): Add local variable
7437         Deep_Init_Found. Check the statement immediately following the
7438         declaration if [Deep_]Initialization was not found.
7440 2014-07-29  Hristian Kirtchev  <kirtchev@adacore.com>
7442         * exp_util.adb (Is_Aliased): It appears that
7443         'reference-d and renamed objects still play some role in Boolean
7444         expression with actions and cannot be finalized immediately.
7446 2014-07-29  Ed Schonberg  <schonberg@adacore.com>
7448         * exp_dbug.adb (Qualify_Needed):  For debugging purposes,
7449         Loop names are not part of the full qualification of entity names.
7451 2014-07-29  Robert Dewar  <dewar@adacore.com>
7453         * einfo.adb (Has_Protected): Test base type.
7454         * sem_ch4.adb (Analyze_Allocator): Reorganize code to make sure
7455         that we always properly check No_Protected_Type_Allocators.
7457 2014-07-29  Ed Schonberg  <schonberg@adacore.com>
7459         * sem_util.ads, sem_util.adb (Defining_Entity): Now applies to
7460         loop declarations as well.
7461         * exp_ch5.adb (Expand_Loop_Statement): Apply Qualify_Entity_Names
7462         to an iterator loop, because it may contain local renaming
7463         declarations that require debugging information.
7465 2014-07-29  Robert Dewar  <dewar@adacore.com>
7467         * sem_util.ads, exp_util.adb, sem_attr.adb: Minor reformatting.
7469 2014-07-29  Robert Dewar  <dewar@adacore.com>
7471         * einfo.ads, einfo.adb (Static_Real_Or_String_Predicate): New function
7472         (Set_Static_Real_Or_String_Predicate): New procedure
7473         * sem_ch13.adb (Build_Predicate_Functions): Accomodate static
7474         string predicates (Is_Predicate_Static): Handle static string
7475         predicates.
7476         * sem_eval.adb (Real_Or_String_Static_Predicate_Matches):
7477         New procedure (Check_Expression_Against_Static_Predicate):
7478         Deal with static string predicates, now fully implemented
7479         (Eval_Relational_Op): Allow string equality/inequality as static
7480         if not comes from source.
7482 2014-07-29  Robert Dewar  <dewar@adacore.com>
7484         * sem_aggr.adb, exp_ch5.adb, sem_ch5.adb, exp_util.adb, einfo.adb,
7485         einfo.ads, sem_util.adb, sem_attr.adb, sem_case.adb, sem_eval.adb,
7486         sem_eval.ads, sem_ch13.adb: General cleanup of static predicate
7487         handling. Change name of Discrete_Predicate to
7488         Discrete_Static_Predicate, and replace testing of the presence of this
7489         field by testing the flag Has_Static_Expression.
7491 2014-07-29  Robert Dewar  <dewar@adacore.com>
7493         * gnat_rm.texi: Document pragma Unevaluated_Use_Of_Old.
7494         * opt.adb: Handle Uneval_Old.
7495         * opt.ads (Uneval_Old, Uneval_Old_Config): New variables.
7496         * par-prag.adb: Add dummy entry for pragma Unevaluated_Use_Of_Old.
7497         * sem.ads (Save_Uneval_Old): New field in Scope_Stack_Entry.
7498         * sem_attr.adb (Uneval_Old_Msg): New procedure.
7499         * sem_ch8.adb (Push_Scope): Save Uneval_Old.
7500         (Pop_Scope): Restore Uneval_Old.
7501         * sem_prag.adb (Analyze_Pragma, case Unevaluated_Use_Of_Old):
7502         Implemented.
7503         * snames.ads-tmpl: Add entries for pragma Unevaluated_Use_Of_Old
7504         Add entries for Name_Warn, Name_Allow.
7506 2014-07-29  Robert Dewar  <dewar@adacore.com>
7508         * sem_aggr.adb (Resolve_Array_Aggregate): Change Is_Static_Range
7509         to Is_OK_Static_Range.
7510         * sem_attr.adb (Eval_Attribute): Make sure we properly flag
7511         static attributes (Eval_Attribute, case Size): Handle size of
7512         zero properly (Eval_Attribute, case Value_Size): Handle size of
7513         zero properly.
7514         * sem_ch13.adb: Minor reformatting.
7515         * sem_ch3.adb (Process_Range_Expr_In_Decl): Change
7516         Is_Static_Range to Is_OK_Static_Range.
7517         * sem_eval.adb (Eval_Case_Expression): Total rewrite, was
7518         wrong in several ways (Is_Static_Range): Moved here from spec
7519         (Is_Static_Subtype): Moved here from spec Change some incorrect
7520         Is_Static_Subtype calls to Is_OK_Static_Subtype.
7521         * sem_eval.ads: Add comments to section on
7522         Is_Static_Expression/Raises_Constraint_Error (Is_OK_Static_Range):
7523         Add clarifying comments (Is_Static_Range): Moved to body
7524         (Is_Statically_Unevaluated): New function.
7525         * sem_util.ads, sem_util.adb (Is_Preelaborable_Expression): Change
7526         Is_Static_Range to Is_OK_Static_Range.
7527         * sinfo.ads: Additional commments for Is_Static_Expression noting
7528         that clients should almost always use Is_OK_Static_Expression
7529         instead. Many other changes throughout front end units to obey
7530         this rule.
7531         * tbuild.ads, tbuild.adb (New_Occurrence_Of): Set Is_Static_Expression
7532         for enumeration literal.
7533         * exp_ch5.adb, sem_intr.adb, sem_ch5.adb, exp_attr.adb, exp_ch9.adb,
7534         lib-writ.adb, sem_ch9.adb, einfo.ads, checks.adb, checks.ads,
7535         sem_prag.adb, sem_ch12.adb, freeze.adb, sem_res.adb, exp_ch4.adb,
7536         exp_ch6.adb, sem_ch4.adb, sem_ch6.adb, exp_aggr.adb, sem_cat.adb:
7537         Replace all occurrences of Is_Static_Expression by
7538         Is_OK_Static_Expression.
7540 2014-07-29  Hristian Kirtchev  <kirtchev@adacore.com>
7542         * exp_ch4.adb (Process_Transient_Object): Remove constant
7543         In_Cond_Expr, use its initialization expression in place.
7544         * exp_ch7.adb (Process_Declarations): There is no need to check
7545         that a transient object being hooked is controlled as it would
7546         not have been hooked in the first place.
7547         * exp_util.adb (Is_Aliased): 'Reference-d or renamed transient
7548         objects are not considered aliased when the related context is
7549         a Boolean expression_with_actions.
7550         (Requires_Cleanup_Actions): There is no need to check that a transient
7551         object being hooked is controlled as it would not have been hooked in
7552         the first place.
7554 2014-07-29  Robert Dewar  <dewar@adacore.com>
7556         * errout.adb: Minor reformatting.
7558 2014-07-29  Hristian Kirtchev  <kirtchev@adacore.com>
7560         * exp_ch3.adb (Default_Initialize_Object): Add new variables
7561         Abrt_Blk and Dummy. Generate a dummy temporary when aborts are
7562         not allowed to ensure the symmetrical generation of symbols.
7563         * exp_ch7.adb (Build_Object_Declarations): Remove variables A_Expr
7564         and E_Decl. Add new variables Decl and Dummy. Generate a dummy
7565         temporary when aborts are not allowed to ensure symmertrical
7566         generation of symbols.
7567         * exp_intr.adb (Expand_Unc_Deallocation): Add new variable
7568         Dummy. Generate a dummy temporary when aborts are not allowed
7569         to ensure symmertrical generation of symbols.
7571 2014-07-29  Ed Schonberg  <schonberg@adacore.com>
7573         * exp_dbug.adb (Debug_Renaming_Declaration): For an object
7574         renaming, indicate that the renamed entity itself needs debug
7575         information. This is necessary if that entity is a temporary,
7576         e.g. part of the expansion of an explicit dereference in an
7577         iterator.
7579 2014-07-29  Thomas Quinot  <quinot@adacore.com>
7581         * errout.adb (Set_Error_Posted): When propagating flag to
7582         an enclosing named association, also propagate to the parent
7583         of that node, so that named and positional associations are
7584         treated consistently.
7586 2014-07-29  Ed Schonberg  <schonberg@adacore.com>
7588         * sem_attr.adb (Resolve_Attribute, case 'Update):  Set
7589         Do_Range_Check properly on array component expressions that
7590         have a scalar type. In GNATprove mode, only checks on scalar
7591         components must be marked by the front-end.
7593 2014-07-29  Ed Schonberg  <schonberg@adacore.com>
7595         * sem_res.adb (Resolve_Type_Conversion): If the type of the
7596         expression is a limited view, use the non-limited view when
7597         available.
7599 2014-07-29  Hristian Kirtchev  <kirtchev@adacore.com>
7601         * exp_ch4.adb (Expand_N_Case_Expression): Mark the generated
7602         case statement as coming from a conditional expression.
7603         (Expand_N_If_Expression): Mark the generated if statement as
7604         coming from a conditional expression.
7605         * exp_ch5.adb (Expand_N_Case_Statement): Do not process controlled
7606         objects found in case statement alternatives when the case
7607         statement is actually a case expression.
7608         (Expand_N_If_Statement):
7609         Do not process controlled objects found in an if statement when
7610         the if statement is actually an if expression.
7611         * sinfo.adb (From_Conditional_Expression): New routine.
7612         (Set_From_Conditional_Expression): New routine.
7613         * sinfo.ads Add new semantic flag From_Conditional_Expression and
7614         update related nodes.
7615         (From_Conditional_Expression): New routine along with pragma Inline.
7616         (Set_From_Conditional_Expression): New routine along with pragma Inline.
7618 2014-07-29  Hristian Kirtchev  <kirtchev@adacore.com>
7620         * exp_ch7.adb (Build_BIP_Cleanup_Stmts): Remove
7621         formal parameter Obj_Id and update the comment on usage. Renamed
7622         Obj_Typ to Func_Typ and update all occurrences.
7623         (Find_Last_Init): Remove formal parameter Decl and update the comment
7624         on usage.
7625         Remove local constants Obj_Id and Obj_Typ. Remove local variables
7626         Init_Typ and Is_Conc. Remove the extraction of the initialization type.
7627         (Find_Last_Init_In_Block): Remove formal parameter
7628         Init_Typ and update the comment on usage.
7629         (Is_Init_Call): Remove formal parameter Init_Typ and update the comment
7630         on usage. Check whether the procedure call is an initialization
7631         procedure of either the object type or the initialization type.
7632         (Is_Init_Proc_Of): New routine.
7633         (Process_Object_Declaration): Obj_Id and Obj_Typ are now global to this
7634         routine. Add new variable Init_Typ. Add circuitry to extract the object
7635         type as well as the initialization type.
7637 2014-07-29  Robert Dewar  <dewar@adacore.com>
7639         * sem_case.adb: Minor reformatting.
7640         * sem_aux.ads: Minor reformatting.
7642 2014-07-29  Ed Schonberg  <schonberg@adacore.com>
7644         * sinfo.adb (Set_Else_Actions, Set_Then_Actions): Set parent
7645         pointer on these fields, even though they are semantic, because
7646         subsequent analysis and expansion of action nades may require
7647         exploring the tree, for example to locate a node to be wrapped
7648         when a function with controlled result is called.
7650 2014-07-29  Claire Dross  <dross@adacore.com>
7652         * sem_aux.adb (Get_Binary_Nkind): Use case on
7653         Name_Id instead of an intermediate string.
7654         (Get_Unary_Nkind): Use case on Name_Id instead of an intermediate
7655         string.
7657 2014-07-29  Sergey Rybin  <rybin@adacore.com frybin>
7659         * gnat_ugn.texi (gnatelim, gnatstub, gnatmetric): Add note
7660         about processing sources with preprocessor directives.
7662 2014-07-24  Martin Liska  <mliska@suse.cz>
7664         * gcc-interface/trans.c (finalize_nrv): Adjust function call.
7665         * gcc-interface/utils.c (rest_of_subprog_body_compilation): Likewise.
7666         (gnat_write_global_declarations): Likewise.
7668 2014-07-19  David Wohlferd  <dw@LimeGreenSocks.com>
7670         * gnat_rm.texi: Clean up for makeinfo 5.2.
7672 2014-07-19  David Wohlferd  <dw@LimeGreenSocks.com>
7674         * gnat_rm.texi (Machine Code Insertions): Clean up.
7676 2014-07-18  Robert Dewar  <dewar@adacore.com>
7678         * exp_ch7.adb: Minor reformatting.
7680 2014-07-18  Claire Dross  <dross@adacore.com>
7682         * sem_aux.ads (Get_Binary_Nkind): New function that returns
7683         the Node_Kind value of an entity defining a binary operator.
7684         (Get_Unary_Nkind): New function that returns the Node_Kind value
7685         of an entity defining a unary operator.
7687 2014-07-18  Pascal Obry  <obry@adacore.com>
7689         * sysdep.c: comment update.
7690         * adaint.c (__gnat_fputwc): Use wchar_t on a limited set of
7691         platforms where it is known to be supported.
7693 2014-07-18  Thomas Quinot  <quinot@adacore.com>
7695         * sem_dist.adb (Process_Remote_AST_Declaration): Need
7696         to set Fat_Type's Ekind in order to be able to use its
7697         Corresponding_Remote_Type attribute.
7699 2014-07-18  Hristian Kirtchev  <kirtchev@adacore.com>
7701         * einfo.adb Last_Aggregate_Assignment is now Node 30.
7702         (Last_Aggregate_Assignment): Include
7703         constants in the assertion. Update the underlying node.
7704         (Set_Last_Aggregate_Assignment): Include constants in the
7705         assertion. Update the underlying node.  (Write_Field11_Name):
7706         Remove the entry for Last_Aggregate_Assignment.
7707         (Write_Field30_Name): Add an entry for Last_Aggregate_Assignment.
7708         * einfo.ads Update the node designation and usage of attribute
7709         Last_Aggregate_Assignment.
7710         * exp_aggr.adb (Expand_Array_Aggregate): Store the last
7711         assignment statement used to initialize a controlled object.
7712         (Late_Expansion): Store the last assignment statement used to
7713         initialize a controlled record or an array of controlled objects.
7714         * exp_ch3.adb (Expand_N_Object_Declaration): Default
7715         initialization of objects is now performed in a separate routine.
7716         (Default_Initialize_Object): New routine.
7717         * exp_ch7.adb (Build_BIP_Cleanup_Stmts): Add formal parameter
7718         Obj_Id. Update the comment on usage.
7719         (Find_Last_Init): Remove formal parameter Typ. Update comment on usage.
7720         Reimplement the logic.  (Find_Last_Init_In_Block): New routine.
7721         (Is_Init_Call): Add formal parameter Init_Typ. Update the
7722         comment on usage.  Account for the type init proc when trying
7723         to determine whether a statement is an initialization call.
7724         (Make_Adjust_Call): Rename formal parameter For_Parent to
7725         Skip_Self. Update all occurrences of For_Parent. Account for
7726         non-tagged types. Update the call to Make_Call.
7727         (Make_Call): Rename formal parameter For_Parent to Skip_Self. Update
7728         comment on usage. Update all occurrences of For_Parent.
7729         (Make_Final_Call): Rename formal parameter For_Parent to
7730         Skip_Self. Update all occurrences of For_Parent. Account
7731         for non-tagged types. Update the call to Make_Call.
7732         (Process_Object_Declaration): Most variables and constants are
7733         now local to the routine.
7734         * exp_ch7.ads (Make_Adjust_Call): Rename formal parameter
7735         For_Parent to Skip_Self. Update the comment on usage.
7736         (Make_Final_Call): Rename formal parameter For_Parent to
7737         Skip_Self. Update the comment on usage.
7739 2014-07-18  Ed Schonberg  <schonberg@adacore.com>
7741         * sem_ch9.adb (Analyze_Requeue): The entry being referenced
7742         can be a procedure that is implemented by entry, and have a
7743         formal that is a synchronized interface.  It does not have to
7744         be declared as a protected operation.
7746 2014-07-18  Robert Dewar  <dewar@adacore.com>
7748         * gnat_rm.texi: Remove mention of obsolete attributes
7749         Max[_Interrupt]_Priority, which have never been implemented
7750         (or at the very least were removed long ago if they ever were
7751         implemented.  Add documentation of Max[_Interrupt]_Priority
7752         constants in package System.
7753         * ttypes.ads: Document actual handling of package System,
7754         rather than a historical fantasy version.  Remove mention of
7755         non-existent attributes Max[_Interrupt]_Priority.
7757 2014-07-18  Pascal Obry  <obry@adacore.com>
7759         * a-witeio.adb (Put): No 16-bit character output when text
7760         translation is disabled.
7761         * i-cstrea.ads: Code clean up.
7763 2014-07-18  Robert Dewar  <dewar@adacore.com>
7765         * gnat_rm.texi: Document that Wchar_T_Size and Word_Size are
7766         static attributes.
7768 2014-07-18  Arnaud Charlet  <charlet@adacore.com>
7770         * a-witeio.adb, initialize.c: Update comments. Minor clean ups.
7772 2014-07-18  Pascal Obry  <obry@adacore.com>
7774         * adaint.c: Do not include wchar.h on VxWorks.
7775         * mingw32.h: Remove obsolete definition.
7777 2014-07-18  Pascal Obry  <obry@adacore.com>
7779         * a-textio.adb, a-witeio.adb, a-ztexio.adb: Use C_Streams Default_Text.
7780         * i-cstrea.ads (Content_Encoding): Moved here, add convention C.
7781         * s-ficobl.ads (Content_Encoding): Moved to C_Streams.
7782         * s-fileio.adb (Open): Adjust to use Content_Encoding from C_Streams.
7784 2014-07-18  Pascal Obry  <obry@adacore.com>
7786         * a-textio.adb: Rename Is_Text_File to Text_Encoding.
7787         * a-ztexio.adb: Likewise.
7788         * a-witeio.adb: Likewise.
7789         (Open): Pass file's translation mode to set_text_mode.
7790         * s-ficobl.ads (Content_Encoding): New type.
7791         (Text_Content_Encoding): New subtype.
7792         (AFCB): Rename Is_Text_File to Text_Encoding.
7793         * s-fileio.adb (Open): Handles new text_translation
7794         values. Remove Is_Text_File which is equivalent to Text_Encoding
7795         in Text_Content_Encoding.
7796         * adaint.h (__gnat_set_mode): New routine.
7797         * sysdep.c (__gnat_set_wide_text_mode): Removed.
7798         (__gnat_set_mode): New routine.
7800 2014-07-18  Arnaud Charlet  <charlet@adacore.com>
7802         * gcc-interface/decl.c, gcc-interface/trans.c,
7803         gcc-interface/utils.c (Is_Packed_Array_Type): Renamed 
7804         Is_Packed_Array_Impl_Type.
7806 2014-07-18  Gary Dismukes  <dismukes@adacore.com>
7808         * sem_util.adb: Minor typo correction.
7810 2014-07-18  Ben Brosgol  <brosgol@adacore.com>
7812         * gnat_rm.texi: Complete previous change.
7814 2014-07-18  Pascal Obry  <obry@adacore.com>
7816         * s-fileio.adb: Minor style fix.
7818 2014-07-18  Ed Schonberg  <schonberg@adacore.com>
7820         * sem_ch13.adb (Analyze_Aspect_Specifications): Detect improper
7821         specification of stream attributes for subtypes that are not
7822         first subtypes, to prevent malformed rep_item chains in the case
7823         of such illegal specifications for discriminated private subtypes.
7824         (Check_Overloaded_Name): Verify that the name is an entity name
7825         before other checks.
7827 2014-07-18  Pascal Obry  <obry@adacore.com>
7829         * adaint.c (__gnat_fputwc) Do not disable on cross-build.
7831 2014-07-18  Robert Dewar  <dewar@adacore.com>
7833         * sem_prag.adb, sem_attr.adb,
7834         sem_aggr.adb, sinfo.ads, sem_eval.ads: Minor reformatting.
7836 2014-07-18  Pascal Obry  <obry@adacore.com>
7838         * sysdep.c (__gnat_wide_text_translation_required): Removed from here.
7839         * initialize.c (__gnat_wide_text_translation_required): Defined here.
7841 2014-07-18  Pascal Obry  <obry@adacore.com>
7843         * adaint.c (__gnat_fputwc): New routine.
7844         * s-crtl.ads (fputwc): Now imported as __gnat_fputwc.
7846 2014-07-18  Hristian Kirtchev  <kirtchev@adacore.com>
7848         * einfo.adb: Flag 270 is now used as Stores_Attribute_Old_Prefix.
7849         (Set_Stores_Attribute_Old_Prefix): New routine.
7850         (Stores_Attribute_Old_Prefix): New routine.
7851         (Write_Entity_Flags):
7852         Output flag Stores_Attribute_Old_Prefix.
7853         * einfo.ads Add new flag Stores_Attribute_Old_Prefix along with
7854         comment on usage.
7855         (Set_Stores_Attribute_Old_Prefix): New routine
7856         along with pragma Inline.
7857         (Stores_Attribute_Old_Prefix): New
7858         routine along with pragma Inline.
7859         * exp_attr.adb (Expand_N_Attribute_Reference): Mark the generated
7860         constant which captures the result of attribute 'Old's prefix.
7861         * sem_util.adb (In_Assertion_Expression_Pragma): Recognize a
7862         relocated expression which acted as a prefix of attribute 'Old.
7864 2014-07-18  Bob Duff  <duff@adacore.com>
7866         * s-spsufi.adb (Finalize_And_Deallocate): Set Subpool.Owner to
7867         null before dispatching to Deallocate_Subpool.
7868         * s-stposu.ads (Default_Subpool_For_Pool): Change mode of
7869         parameter of Default_Subpool_For_Pool to 'in out'.
7870         * s-stposu.adb (Set_Pool_Of_Subpool): Use raise expression. Add
7871         a message to the raise.
7872         * sem_util.adb: Minor reformatting.
7874 2014-07-18  Robert Dewar  <dewar@adacore.com>
7876         * sem_util.adb (Check_Expression_Against_Static_Predicate):
7877         Mark expression as non-static if it fails static predicate check,
7878         and issue additional warning.
7880 2014-07-18  Pascal Obry  <obry@adacore.com>
7882         * a-witeio.adb (Put): Control translation based on
7883         wide_text_translation_required.
7884         * adaint.c (CurrentCCSEncoding): New variable.
7885         * initialize.c (__gnat_initialize): On Windows initialize
7886         CurrentCCSEncoding based on values in GNAT_CCS_ENCODING
7887         environment variable.
7888         * mingw32.h (CurrentCCSEncoding): New external.
7889         (__gnat_wide_text_translation_required): Likewise.
7890         * sysdep.c (wide_text_translation_required): New variable.
7891         (__gnat_set_wide_text_mode): Set mode based on CurrentCCSEncoding.
7893 2014-07-18  Hristian Kirtchev  <kirtchev@adacore.com>
7895         * sem_prag.adb (Analyze_Refined_Depends_In_Decl_Part): Remove global
7896         variable Refined_States.  Add global variable Matched_Items.
7897         (Check_Dependency_Clause): Account for dependency
7898         clauses utilizing states with visible null refinements.
7899         (Is_Null_Refined_State): New routine.
7900         (Match_Items): Record each successfully matched item of pragma Depends.
7901         (Record_Item): New routine.
7903 2014-07-18  Ed Schonberg  <schonberg@adacore.com>
7905         * sem_attr.adb (Analyze_Attribute, case 'Update): Set
7906         Do_Range_Check flag on a dynamic index expression used in a
7907         component association in the argument of Update.
7909 2014-07-18  Gary Dismukes  <dismukes@adacore.com>
7911         * einfo.ads, sem_eval.ads, sem_ch13.adb: Minor reformatting.
7913 2014-07-18  Hristian Kirtchev  <kirtchev@adacore.com>
7915         * exp_ch6.adb (Expand_Simple_Function_Return): Redo the marking
7916         of enclosing blocks, loops and the enclosing function using a
7917         parent-based traversal.
7918         * exp_util.adb (Wrap_Statements_In_Block): Suppress the secondary
7919         stack reclamation if the iterator loop contains a return statement
7920         that uses the stack.
7921         * sem_ch5.adb (Analyze_Loop_Statement): There is no need to
7922         patch up the scope stack as the secondary stack management now
7923         takes into account the enclosing function of the iterator loop.
7925 2014-07-18  Robert Dewar  <dewar@adacore.com>
7927         * sem_ch3.adb, g-memdum.ads, i-cstrea.ads: Minor reformatting.
7929 2014-07-18  Robert Dewar  <dewar@adacore.com>
7931         * einfo.adb (Has_Static_Predicate): New function.
7932         (Set_Has_Static_Predicate): New procedure.
7933         * einfo.ads (Has_Static_Predicate): New flag.
7934         * sem_ch13.adb (Is_Predicate_Static): New function
7935         (Build_Predicate_Functions): Use Is_Predicate_Static to reorganize
7936         (Add_Call): Minor change in Sloc of generated expression
7937         (Add_Predicates): Remove setting of Static_Pred, no longer used.
7938         * sem_ch4.adb (Has_Static_Predicate): Removed this function,
7939         replace by use of the entity flag Has_Static_Predicate_Aspect.
7940         * sem_eval.adb (Eval_Static_Predicate_Check): Check real case
7941         and issue warning that predicate is not checked for now.
7942         * sem_eval.ads (Eval_Static_Predicate_Check): Fix comments in
7943         spec.
7944         * sem_util.adb (Check_Expression_Against_Static_Predicate):
7945         Carry out check for any case where there is a static predicate,
7946         and output appropriate message.
7947         * sinfo.ads: Minor comment corrections.
7949 2014-07-18  Ed Schonberg  <schonberg@adacore.com>
7951         * exp_ch3.adb (Expand_Freeze_Record_Type): If the type is derived
7952         from an untagged private type whose full view is tagged, the type
7953         is marked tagged for layout reasons, but it has no dispatch table,
7954         so Set_All_DT_Position must not be called.
7955         * exp_ch13.adb: If the freeze node is for a type internal to a
7956         record declaration, as is the case for a class-wide subtype
7957         of a parent component, the relevant scope is the scope of the
7958         enclosing record.
7960 2014-07-18  Thomas Quinot  <quinot@adacore.com>
7962         * g-memdum.adb, g-memdum.ads: Code clean ups.
7964 2014-07-18  Hristian Kirtchev  <kirtchev@adacore.com>
7966         * sem_prag.adb (Check_Dependency_Clause):
7967         Update the comment on usage. Reimplement the mechanism which
7968         attempts to match a single clause of Depends against one or
7969         more clauses of Refined_Depends.
7970         (Input_Match): Removed.
7971         (Inputs_Match): Removed.
7972         (Is_Self_Referential): Removed.
7973         (Normalize_Clause): Update the call to Split_Multiple_Outputs.
7974         (Normalize_Outputs): Rename variable Split to New_Claue and update
7975         all its occurrences.
7976         (Report_Extra_Clauses): Update the comment on usage.
7977         (Split_Multiple_Outputs): Renamed to Normalize_Outputs.
7979 2014-07-18  Gary Dismukes  <dismukes@adacore.com>
7981         * i-cstrea.ads: Minor reformatting.
7983 2014-07-18  Hristian Kirtchev  <kirtchev@adacore.com>
7985         * exp_util.adb (Wrap_Statements_In_Block): Propagate both
7986         secondary stack-related flags to the generated block.
7987         * sem_ch5.adb (Analyze_Loop_Statement): Update the scope chain
7988         once the loop is relocated in a block.
7990 2014-07-18  Robert Dewar  <dewar@adacore.com>
7992         * repinfo.ads: Add documentation on handling of back annotation
7993         for dynamic case.
7995 2014-07-18  Ed Schonberg  <schonberg@adacore.com>
7997         * sinfo.ads, sinfo.adb (Incomplete_View): New semantic attribute
7998         of full type declaration, denotes previous declaration for
7999         incomplete view of the type.
8000         * sem_ch3.adb (Analyze_Full_Type_Declaration): Set Incomplete_View
8001         of declaration if one is present.
8002         (Replace_Type): When constructing the signature of an inherited
8003         operation, handle properly the case where the operation has a
8004         formal whose type is an incomplete view.
8005         * sem_util.adb (Collect_Primitive_Operations): Handle properly
8006         the case of an operation declared after an incomplete declaration
8007         for a type T and before the full declaration of T.
8009 2014-07-18  Pascal Obry  <obry@adacore.com>
8011         * i-cstrea.ads: Add documentation for set_wide_text_mode.
8013 2014-07-18  Robert Dewar  <dewar@adacore.com>
8015         * a-witeio.adb: Minor code reorganization.
8016         * i-cstrea.ads: Add comment.
8018 2014-07-18  Thomas Quinot  <quinot@adacore.com>
8020         * s-oscons-tmplt.c (NAME_MAX): Minor cleaup and comment
8021         clarifications.
8023 2014-07-18  Robert Dewar  <dewar@adacore.com>
8025         * g-memdum.adb, g-memdum.ads, exp_strm.adb: Minor reformatting.
8027 2014-07-18  Pascal Obry  <obry@adacore.com>
8029         * s-crtl.ads, i-cstrea.ads (fputwc): New routine.
8030         * a-witeio.adb (Put): On platforms where there is translation
8031         done by the OS output the raw text.
8032         (New_Line): Use Put above to properly handle the LM wide characters.
8034 2014-07-18  Thomas Quinot  <quinot@adacore.com>
8036         * g-memdum.adb, g-memdum.ads (Dump): New parameter Prefix, defaulted
8037         to Absolute_Address.
8039 2014-07-18  Eric Botcazou  <ebotcazou@adacore.com>
8041         * opt.ads (Suppress_Back_Annotation): Remove as unused.
8042         * fe.h (Back_Annotate_Rep_Info): Likewise.
8043         (Global_Discard_Names): Likewise.
8045 2014-07-18  Robert Dewar  <dewar@adacore.com>
8047         * sem_ch13.adb (Is_Type_Ref): Check that type name is not
8048         parenthesized.
8050 2014-07-18  Vincent Celier  <celier@adacore.com>
8052         * s-osinte-vms.ads: Fix style errors.
8054 2014-07-18  Thomas Quinot  <quinot@adacore.com>
8056         * s-oscons-tmplt.c (_POSIX_SOURCE): Define in order to get
8057         NAME_MAX and PATH_MAX.
8059 2014-07-18  Bob Duff  <duff@adacore.com>
8061         * exp_strm.adb (Build_Record_Or_Elementary_Input_Function,
8062         Build_Record_Or_Elementary_Output_Procedure): For Input and
8063         Output attributes, do not read/write the discriminants if they
8064         have default values; that will be done by Read/Write.
8066 2014-07-18  Robert Dewar  <dewar@adacore.com>
8068         * sem_aggr.adb, exp_ch5.adb, sem_ch3.adb, layout.adb, sem_type.adb,
8069         exp_util.adb, exp_attr.adb, einfo.adb, einfo.ads, exp_pakd.adb,
8070         checks.adb, exp_pakd.ads, freeze.adb, sem_util.adb, exp_dbug.adb,
8071         exp_dbug.ads, exp_ch4.adb, sem_ch8.adb, exp_aggr.adb, sem_eval.adb,
8072         sem_ch13.adb: Change name Packed_Array_Type to Packed_Array_Impl_Type.
8074 2014-07-18  Robert Dewar  <dewar@adacore.com>
8076         * lib-writ.adb, makeutl.adb, ali.ads: Minor reformatting.
8078 2014-07-18  Vincent Celier  <celier@adacore.com>
8080         * lib-writ.ads: Update documentation about the D lines.
8082 2014-07-18  Ed Schonberg  <schonberg@adacore.com>
8084         * sem_ch13.adb (Replace_Type_References_Generic): Use type entity
8085         as a parameter, rather than its Chars field, in order to locate
8086         freeze node of type. If the predicate or invariant has references
8087         to types other than the one to which the contract applies, these
8088         types must be frozen, and the corresponding predicate functions
8089         created, before that freeze node.
8091 2014-07-18  Robert Dewar  <dewar@adacore.com>
8093         * freeze.adb, einfo.ads, einfo.adb: Minor code reorganization.
8094         * par_sco.adb: Minor reformatting.
8096 2014-07-18  Gary Dismukes  <dismukes@adacore.com>
8098         * exp_ch4.adb (Real_Range_Check): Turn off
8099         the Do_Range_Check flag on the conversion's current Expression
8100         argument rather than on the originally captured Operand node,
8101         as Expression may reflect a rewriting (as in conversions to a
8102         fixed-point type).
8104 2014-07-18  Vincent Celier  <celier@adacore.com>
8106         * ali.adb (Scan_ALI): Set Sdep_Record.Unit_Name, when the unit
8107         is not a subunit.
8108         * ali.ads (Sdep_Record): New component Unit_Name.
8109         * lib-writ.adb (Write_ALI): Write the unit name in D lines.
8110         * makeutl.adb (Check_Source_Info_In_ALI): Return False if a
8111         dependent unit is in a project and the source file name is not
8112         one of its sources.
8114 2014-07-18  Bob Duff  <duff@adacore.com>
8116         * s-addima.ads: Minor: add comment.
8118 2014-07-18  Thomas Quinot  <quinot@adacore.com>
8120         * freeze.adb (Check_Component_Storage_Order): Fix enforcement
8121         of nesting rules for composites with different SSOs.
8123 2014-07-18  Thomas Quinot  <quinot@adacore.com>
8125         * par_sco.adb (Is_Logical_Operator): An If_Expression is not
8126         a proper logical operator.
8127         (Has_Decision): An If_Expression indicates the presence of a decision
8128         although it is not a logical operator.
8130 2014-07-18  Robert Dewar  <dewar@adacore.com>
8132         * gnat_ugn.texi: Remove note that -gnatR not allowed with -gnatc.
8133         * switch-c.adb: Remove prohibition of -gnatR and -gnatc together.
8135 2014-07-18  Eric Botcazou  <ebotcazou@adacore.com>
8137         * sem_ch13.adb (Kill_Rep_Clause): Clear Comes_From_Source flag
8138         on the null statement.
8140 2014-07-18  Thomas Quinot  <quinot@adacore.com>
8142         * adaint.c: Minor comment rewording.
8143         * socket.c: Define macros _REENTRANT and _THREAD_SAFE so that
8144         use of errno in this file is thread safe.
8146 2014-07-18  Arnaud Charlet  <charlet@adacore.com>
8148         * gnat_ugn.texi: Doc clarification.
8149         * sem_ch13.adb (Kill_Rep_Clause): Use Replace not Rewrite.
8150         * sem_ch13.ads: Minor comment update.
8152 2014-07-18  Robert Dewar  <dewar@adacore.com>
8154         * repinfo.ads: Minor comment fix.
8156 2014-07-18  Robert Dewar  <dewar@adacore.com>
8158         * par-prag.adb: Add dummy entry for Default_Scalar_Storage_Order.
8159         * sem_prag.adb: Add dummy implementation of
8160         Default_Scalar_Storage_Order.
8161         * snames.ads-tmpl: Add dummy entry for
8162         Default_Scalar_Storage_Order pragma.
8164 2014-07-18  Robert Dewar  <dewar@adacore.com>
8166         * opt.adb (Tree_Read): Read Address_Is_Private,
8167         Ignore_Rep_Clauses, Ignore_Style_Check_Pragmas, Multiple_Unit_Index.
8168         (Tree_Write): Corresponding writes
8169         * opt.ads: Minor comment reformatting and fixes.
8170         * tree_io.ads: Increment ASIS_Version_Number.
8172 2014-07-18  Robert Dewar  <dewar@adacore.com>
8174         * sem_attr.adb, s-os_lib.ads, prj-tree.adb: Minor reformatting.
8175         * types.h: Fix typo.
8177 2014-07-18  Robert Dewar  <dewar@adacore.com>
8179         * freeze.adb (Check_Address_Clause): Use Kill_Rep_Clause (no
8180         functional change).
8181         * gnat_ugn.texi: Document that -gnatI removes rep clauses from
8182         ASIS trees.
8183         * sem_ch13.adb (Kill_Rep_Clause): New procedure
8184         (Analyze_Attribute_Definition_Clause): Use
8185         Kill_Rep_Clause. This is just a cleanup, no functional effect.
8186         (Analyze_Enumeration_Representation_Clause):
8187         Use Kill_Rep_Clause. This means that enum rep
8188         clauses are now properly removed from -gnatct trees.
8189         (Analyze_Record_Representation_Clause): Same change.
8190         * sem_ch13.ads (Kill_Rep_Clause): New procedure.
8192 2014-07-18  Pascal Obry  <obry@adacore.com>
8194         * s-os_lib.ads, s-os_lib.adb (GM_Time_Of): New routine to create an
8195         OS_Time from time parts.
8196         * adaint.h, adaint.c (__gnat_to_os_time): New routine.
8198 2014-07-18  Ed Schonberg  <schonberg@adacore.com>
8200         * sem_ch4.adb (Try_Container_Indexing): Refine previous patch for
8201         indexing over containers that are derived types: check whether
8202         signature of found operation has the correct first parameter
8203         before retrieving directly a primitive operation.
8205 2014-07-18  Ed Schonberg  <schonberg@adacore.com>
8207         * sem_attr.adb (Analyze_Attribute, case 'Update): Set
8208         Do_Range_Check flag on dynamic bounds of a range used in a
8209         component association in the argument of Update.
8211 2014-07-18  Thomas Quinot  <quinot@adacore.com>
8213         * adaint.c: #define _REENTRANT and _THREAD_SAFE in order for
8214         accesses to errno(3) to be thread safe.
8216 2014-07-18  Vincent Celier  <celier@adacore.com>
8218         * prj-tree.adb (Imported_Or_Extended_Project_Of): For each non
8219         limited imported project that is an extending project, return
8220         a project being extended if it has the expected name.
8222 2014-07-18  Pascal Obry  <obry@adacore.com>
8224         * s-os_lib.ads, s-os_lib.adb (Set_File_Last_Modify_Time_Stamp): New
8225         routine to set the last modification time stamp for the given file.
8226         * gnatchop.adb (File_Time_Stamp): Removed.
8227         (Write_Unit): Use
8228         Set_File_Last_Modify_Time_Stamp instead of ad-hoc implementation.
8230 2014-07-18  Ed Schonberg  <schonberg@adacore.com>
8232         * sem_aggr.adb (Aggregate_Constraint_Checks): Moved to sem_util.
8233         * sem_util.ads, sem_util.adb (Aggregate_Constraint_Checks):
8234         Moved here, so it can be shared with the resolution of 'Update,
8235         whose argument shares some features with aggregates.
8236         * sem_attr.adb (Resolve_Attribute, case 'Update): Apply
8237         Aggregate_Constraint_Checks with the expression of each
8238         association, so that the Do_Range_Check flag is set when needed.
8240 2014-07-18  Ed Schonberg  <schonberg@adacore.com>
8242         * sem_ch4.adb (Try_Container_Indexing):  If the container
8243         type is a derived type, the value of the inherited  aspect is
8244         the Reference operation declared for the parent type. However,
8245         Reference is also a primitive operation of the new type, and
8246         the inherited operation has a different signature. We retrieve
8247         the right one from the list of primitive operations of the
8248         derived type.
8250 2014-07-18  Vincent Celier  <celier@adacore.com>
8252         * debug.adb: Update comment.
8254 2014-07-18  Hristian Kirtchev  <kirtchev@adacore.com>
8256         * exp_util.adb (Needs_Finalization): There is no reason why a
8257         C type should not benefit from finalization actions.
8259 2014-07-18  Thomas Quinot  <quinot@adacore.com>
8261         * s-oscons-tmplt.c (NAME_MAX): Fix definition for Solaris
8262         (FILENAME_MAX): Remove unneeded definition.
8264 2014-07-18  Robert Dewar  <dewar@adacore.com>
8266         * exp_attr.adb, debug.adb: Update comments.
8268 2014-07-18  Vincent Celier  <celier@adacore.com>
8270         * par-ch4.adb (Simple_Expression): Add missing style check
8271         for binary adding operators.
8272         (Term): Add missing style check for multiplying operators.
8274 2014-07-18  Robert Dewar  <dewar@adacore.com>
8276         * impunit.adb: Minor comment correction.
8277         * widechar.adb, s-wchcon.ads: Minor comment corrections.
8279 2014-07-18  Robert Dewar  <dewar@adacore.com>
8281         * sem_ch13.adb (Build_Discrete_Static_Predicate): New name
8282         for Build_Static_Predicate (Build_Predicate_Functions):
8283         Don't try to build discrete predicate for real type.
8284         (Build_Predicate_Functions): Report attempt to use
8285         Static_Predicate function on real type as unimplemented.
8286         * sem_util.adb (Check_Expression_Against_Static_Predicate):
8287         Add guard to prevent blow up on predicate for real type.
8289 2014-07-18  Ed Schonberg  <schonberg@adacore.com>
8291         * einfo.adb (Set_Static_Predicate): Simplify assertion to handle
8292         properly static predicate on enumeration types and modular types
8293         (not subtypes).
8295 2014-07-18  Pierre-Marie Derodat  <derodat@adacore.com>
8297         * scos.ads (SCO_Unit_Table_Entry): Add a field to keep track of
8298         the corresponding source file index.
8299         * get_scos.ads (Get_SCOs): Add a default value for it.
8300         * par_sco.adb (SCO_Record): Fill the corresponding value.
8301         * scos.h: New.
8303 2014-07-18  Vincent Celier  <celier@adacore.com>
8305         * a-strunb-shared.adb, s-auxdec.ads, s-rannum.adb, atree.ads,
8306         urealp.adb, vms_data.ads, lib.ads, s-auxdec-vms_64.ads: Minor
8307         reformatting.
8308         * gnat_ugn.texi: Add documentation for new gnatmem switch -t.
8310 2014-07-18  Thomas Quinot  <quinot@adacore.com>
8312         * g-sercom.ads (Set): document possible data loss.
8314 2014-07-18  Ed Schonberg  <schonberg@adacore.com>
8316         * exp_attr.adb (Expand_N_Attribute_Reference, cases Input,
8317         Output, Read, Write): If the restriction No_Streams is active,
8318         replace each occurrence of a stream attribute by an explicit
8319         Raise statement.
8321 2014-07-18  Robert Dewar  <dewar@adacore.com>
8323         * par_sco.adb, a-reatim.ads, exp_attr.adb, sem_util.adb: Minor
8324         reformatting.
8326 2014-07-18  Robert Dewar  <dewar@adacore.com>
8328         * einfo.ads, einfo.adb (Has_Out_Or_In_Out_Parameter): New flag and
8329         function.
8330         (Set_Has_Out_Or_In_Out_Parameter): New procedure.
8331         * sem_ch6.adb (Set_Formal_Mode): Set Has_Out_Or_In_Out_Parameter flag.
8332         * sem_res.adb (Resolve_Call): Error if call of Ada 2012 function
8333         with OUT or IN OUT from earlier Ada mode (e.g. Ada 2005)
8335 2014-07-18  Robert Dewar  <dewar@adacore.com>
8337         * bcheck.adb (Check_Consistent_Restrictions):
8338         Remove obsolete code checking for violation of
8339         No_Standard_Allocators_After_Elaboration (main program)
8340         * bindgen.adb (Gen_Adainit): Handle
8341         No_Standard_Allocators_After_Elaboration
8342         (Gen_Output_File_Ada): ditto.
8343         * exp_ch4.adb (Expand_N_Allocator): Handle
8344         No_Standard_Allocators_After_Elaboration.
8345         * Makefile.rtl: Add entry for s-elaall
8346         * rtsfind.ads: Add entry for Check_Standard_Allocator.
8347         * s-elaall.ads, s-elaall.adb: New files.
8348         * sem_ch4.adb (Analyze_Allocator): Handle
8349         No_Standard_Allocators_After_Elaboration.
8351 2014-07-18  Robert Dewar  <dewar@adacore.com>
8353         * lib.adb, lib.ads, lib-writ.adb, lib-writ.ads, ali.adb,
8354         ali.ads, lib-load.adb: Remove Lib.Has_Allocator and all uses.
8355         Remove AB parameter from ali files and all uses.
8356         Remove Allocator_In_Body and all uses.
8358 2014-07-18  Robert Dewar  <dewar@adacore.com>
8360         * g-expect-vms.adb: Add comment.
8362 2014-07-18  Thomas Quinot  <quinot@adacore.com>
8364         * par_sco.adb (Is_Logical_Operation): return True for
8365         N_If_Expression.
8367 2014-07-18  Ed Schonberg  <schonberg@adacore.com>
8369         * sem_attr.adb (Resolve_Attribute, case 'Update): Do full
8370         analysis and resolution of each choice in the associations within
8371         the argument of Update, because they may be variable names.
8373 2014-07-18  Hristian Kirtchev  <kirtchev@adacore.com>
8375         * exp_attr.adb (Expand_Loop_Entry_Attribute): Insert any condition
8376         actions before the generated if statement.
8378 2014-07-18  Hristian Kirtchev  <kirtchev@adacore.com>
8380         * gnat_ugn.texi Enhance the documentation of
8381         switches -gnateA and -gnateV.
8383 2014-07-18  Ed Schonberg  <schonberg@adacore.com>
8385         * sem_util.adb (Build_Default_Subtype): Add missing condition
8386         so that code matches description: use the full view of the base
8387         only if the base is private and the subtype is not.
8389 2014-07-17  Gary Dismukes  <dismukes@adacore.com>
8391         * exp_disp.adb: Minor reformatting.
8392         * exp_disp.adb: Minor code reorganization.
8394 2014-07-17  Thomas Quinot  <quinot@adacore.com>
8396         * gnat_rm.texi, freeze.adb (Check_Component_Storage_Order): Do not
8397         require an explicit SSO attribute definition clause on a composite type
8398         just because one of its components has one.
8400 2014-07-17  Robert Dewar  <dewar@adacore.com>
8402         * sem_attr.adb (Analyze_Attribute, case Loop_Entry): Rewrite
8403         attribute out of existence if the enclosing pragma is ignored.
8404         * sem_util.adb: Minor reformatting.
8406 2014-07-17  Ed Schonberg  <schonberg@adacore.com>
8408         * exp_aggr.adb (Expand_Array_Aggregate): Handle properly an
8409         array aggregate expanded into assignments when it appears as a
8410         local declaration in an inlined body.
8412 2014-07-17  Doug Rupp  <rupp@adacore.com>
8414         * init.c [__ANDROID__]: Modify for ZCX.
8415         * exp_aggr.adb: Minor reformatting
8416         * sigtramp-armvxw.c, sigtramp-ppcvxw.c: Update comments.
8418 2014-07-17  Robert Dewar  <dewar@adacore.com>
8420         * a-strunb-shared.ads, a-stwiun-shared.ads, a-stzunb-shared.ads,
8421         exp_ch7.adb, g-pehage.ads, g-socket.ads, gnat_ugn.texi, gnat_ugx.texi,
8422         scng.adb: Remove incorrect usage "allow to" and "allows to".
8424 2014-07-17  Robert Dewar  <dewar@adacore.com>
8426         * exp_dist.adb: Minor reformatting.
8428 2014-07-17  Bob Duff  <duff@adacore.com>
8430         * gnat_ugn.texi: Improve documentation of Unrestricted_Access.
8432 2014-07-17  Robert Dewar  <dewar@adacore.com>
8434         * sem_ch13.adb (Build_Invariant_Procedure): Add variable Nam
8435         (Add_Invariants): Set Nam to Name_Type_Invariant if from aspect.
8437 2014-07-17  Thomas Quinot  <quinot@adacore.com>
8439         * exp_pakd.adb (Create_Packed_Array_Type.Install_PAT): For a
8440         non-bit-packed array, propagate Reverse_Storage_Order to the
8441         packed array type.
8443 2014-07-17  Javier Miranda  <miranda@adacore.com>
8445         * exp_disp.adb: Fix comment.
8446         * exp_pakd.adb: Minor reformatting.
8448 2014-07-17  Robert Dewar  <dewar@adacore.com>
8450         * bindgen.adb (Gen_Elab_Calls): Skip reference to elab
8451         entity if none exists (Gen_Elab_Calls): Complain if clash with
8452         No_Multiple_Elaboration.
8453         * s-rident.ads, restrict.ads: Add restriction No_Multiple_Elaboration.
8454         * sem_util.adb (Build_Elaboration_Entity): Skip building entity
8455         if not needed.
8456         * gnat_rm.texi: Document restriction No_Multiple_Elaboration.
8457         * sem_ch4.adb: Minor comment updates.
8459 2014-07-17  Ed Schonberg  <schonberg@adacore.com>
8461         * exp_ch9.adb (Buid_Protected_Subprogram_Call): Preserve type
8462         of function call for later use when shared passive objects
8463         are involved.
8465 2014-07-17  Hristian Kirtchev  <kirtchev@adacore.com>
8467         * par-ch13.adb (Get_Aspect_Specifications):
8468         Catch a case where the argument of SPARK aspect Refined_State
8469         is not properly parenthesized.
8471 2014-07-17  Hristian Kirtchev  <kirtchev@adacore.com>
8473         * exp_ch6.adb (Expand_Ctrl_Function_Call): Do not extend
8474         the lifetime of a reference to an Ada 2012 container element.
8475         (Is_Element_Reference): New routine.
8477 2014-07-17  Robert Dewar  <dewar@adacore.com>
8479         * ali.ads: Minor comment fix.
8480         * lib-writ.adb: Minor reformatting.
8482 2014-07-17  Ed Schonberg  <schonberg@adacore.com>
8484         * sem_ch10.adb (Analyze_Proper_Body): When analyzing a subunit
8485         in ASIS mode, load another subunit only if it a subunit of the
8486         current one, not a sibling that has been reached through the
8487         analysis of an ancestor. This allows the construction of the
8488         ASIS tree for the subunit even when sibling subunits have errors.
8490 2014-07-17  Hristian Kirtchev  <kirtchev@adacore.com>
8492         * sem_ch3.adb (Analyze_Declarations): Remove the guard which
8493         prevents the analysis of various contracts when the associated
8494         construct is erroneous.
8495         * sem_util.adb (Save_SPARK_Mode_And_Set): Do not query the
8496         SPARK_Pragma of an illegal or a partially decorated construct.
8498 2014-07-17  Robert Dewar  <dewar@adacore.com>
8500         * s-imguns.ads: Minor reformatting.
8502 2014-07-17  Hristian Kirtchev  <kirtchev@adacore.com>
8504         * exp_ch7.adb (Build_Finalization_Master): Move all local
8505         variables to the proper code section. When looking for an existing
8506         finalization master, inspect the ultimate ancestor type of the
8507         full view.
8508         * sem_util.ads, sem_util.adb (Root_Type_Of_Full_View): New routine.
8510 2014-07-17  Robert Dewar  <dewar@adacore.com>
8512         * aspects.ads, aspects.adb: Add entries for aspect Annotate.
8513         * gnat_rm.texi: Document Entity argument for pragma Annotate and
8514         Annotate aspect.
8515         * sem_ch13.adb (Analyze_Aspect_Specification): Add processing
8516         for Annotate aspect.
8517         * sem_prag.adb (Analyze_Pragma, case Annotate): Allow optional
8518         Entity argument at end.
8519         * sinfo.ads (N_Aspect_Specification): Add note on Annotate aspect.
8521 2014-07-17  Tristan Gingold  <gingold@adacore.com>
8523         * s-imguns.ads: Fix minor typo.
8525 2014-07-17  Thomas Quinot  <quinot@adacore.com>
8527         * sprint.adb: Minor reformatting.
8529 2014-07-17  Robert Dewar  <dewar@adacore.com>
8531         * sprint.adb (Write_Itype): Print proper header for string
8532         literal subtype.
8534 2014-07-17  Steve Baird  <baird@adacore.com>
8536         * sinfo.ads, sem_scil.ads: Improve comments, minor reformatting.
8538 2014-07-17  Vincent Celier  <celier@adacore.com>
8540         * gnatbind.adb: Change in message "try ... for more information".
8542 2014-07-17  Robert Dewar  <dewar@adacore.com>
8544         * sprint.adb: Code clean up.
8546 2014-07-17  Hristian Kirtchev  <kirtchev@adacore.com>
8548         * exp_ch7.adb (Find_Last_Init): Relocate local variables to
8549         the relevant code section. Add new local constant Obj_Id. When
8550         a limited controlled object is initialized by a function call,
8551         the build-in-place object access function call acts as the last
8552         initialization statement.
8553         * exp_util.adb (Is_Object_Access_BIP_Func_Call): New routine.
8554         (Is_Secondary_Stack_BIP_Func_Call): Code reformatting.
8555         * exp_util.ads (Is_Object_Access_BIP_Func_Call): New routine.
8557 2014-07-17  Ed Schonberg  <schonberg@adacore.com>
8559         * sem_ch8.adb (Analyze_Generic_Renaming): For generic subprograms,
8560         propagate intrinsic flag to renamed entity, to allow e.g. renaming
8561         of Unchecked_Conversion.
8562         * sem_ch3.adb (Analyze_Declarations): Do not analyze contracts
8563         if the declaration has errors.
8565 2014-07-17  Ed Schonberg  <schonberg@adacore.com>
8567         * a-rbtgbk.adb: a-rbtgbk.adb (Generic_Insert_Post): Check whether
8568         container is busy before checking whether capacity allows for
8569         a further insertion. Insertion in a busy container that is full
8570         raises Program_Error rather than Capacity_Error. Previous to that
8571         patch which exception was raised varied among container types.
8573 2014-07-17  Robert Dewar  <dewar@adacore.com>
8575         * g-comlin.ads, g-comlin.adb: Minor clean up.
8577 2014-07-17  Bob Duff  <duff@adacore.com>
8579         * gnat_ugn.texi: Update gnatpp doc.
8581 2014-07-17  Robert Dewar  <dewar@adacore.com>
8583         * gnat_rm.texi: Document new restriction No_Long_Long_Integers.
8584         * exp_ch4.adb (Make_Array_Comparison_Op): Add note that we
8585         could do this by actually expanding a real generic.
8586         * a-tags.ads: Add comments about performance.
8587         * sprint.adb (Sprint_Node_Actual, case N_Object_Declaration):
8588         Print Etype of defining identifier, rather than the object
8589         definition. More information.
8591 2014-07-17  Thomas Quinot  <quinot@adacore.com>
8593         * exp_dist.adb: Minor documentation clarification.
8595 2014-07-17  Hristian Kirtchev  <kirtchev@adacore.com>
8597         * exp_util.adb (Is_Aliased): Revert previous change.
8599 2014-07-17  Vincent Celier  <celier@adacore.com>
8601         * g-comlin.adb (Try_Help): New procedure.
8602         (Getopt): Use new procedure Try_Help.
8603         * g-comlin.ads (Try_Help): New procedure.
8605 2014-07-17  Bob Duff  <duff@adacore.com>
8607         * gnat_ugn.texi: Minor update.
8609 2014-07-17  Robert Dewar  <dewar@adacore.com>
8611         * gnat_rm.texi: Improve documentation of Unrestricted_Access.
8612         * sinfo.ads: Document restriction on aggregates (must expand to
8613         assignments if one or more assignments needs expansion, e.g. for
8614         controlled types).
8615         * sem_ch13.adb: All warning messages regarding bit order should
8616         be info: messages.
8617         * gnat_ugn.texi: Minor correction of missing @ on @code
8619 2014-07-17  Robert Dewar  <dewar@adacore.com>
8621         * restrict.ads (Implementation_Restriction): Add No_Long_Long_Integer.
8622         * s-rident.ads (Partition_Boolean_Restrictions): Add
8623         No_Long_Long_Integer.
8624         * sem_ch3.adb (Modular_Type_Declaration): Size must be <=
8625         Long_Integer'Size if restriction No_Long_Long_Integer is active.
8626         (Signed_Integer_Type_Declaration): Do not allow Long_Long_Integer
8627         as the implicit base type for a signed integer type declaration
8628         if restriction No_Long_Long_Integer is active.
8629         * sem_util.ads, sem_util.adb (Set_Entity_With_Checks): Include check for
8630         No_Long_Long_Integer.
8632 2014-07-17  Robert Dewar  <dewar@adacore.com>
8634         * sem_ch3.adb, a-ztexio.ads, exp_imgv.adb, casing.adb, casing.ads,
8635         einfo.ads, checks.adb, sem_ch12.adb, a-textio.ads, freeze.adb,
8636         repinfo.adb, exp_ch6.adb, sem_ch4.adb, a-witeio.ads, sem_ch8.adb,
8637         sem_warn.adb, exp_aggr.adb, exp_dist.adb, par-tchk.adb, s-fatgen.adb,
8638         treepr.adb, lib-xref.adb: Remove the word kludge from ada sources.
8640 2014-07-17  Robert Dewar  <dewar@adacore.com>
8642         * debug.adb: Remove -gnatdQ.
8643         * exp_disp.adb: Remove -gnatdQ.
8644         * a-ztenio.ads, a-wtinio.ads, a-wtmoio.ads, a-ztcoau.ads, a-tiinio.ads,
8645         a-wtfiio.ads, a-timoio.ads, sem_ch12.adb, a-tifiio.ads, a-ztinio.ads,
8646         rtsfind.adb, rtsfind.ads, a-ztmoio.ads, a-wtdeio.ads, a-ztfiio.ads,
8647         a-tideio.ads, a-wtflio.ads, a-ztdeio.ads, sem_ch8.adb, a-tiflio.ads,
8648         sprint.adb, a-ztflio.ads, snames.ads-tmpl, a-wtenio.ads,
8649         a-tienio.ads: Rename Text_IO_Kludge to Text_IO_Special_Unit.
8651 2014-07-17  Robert Dewar  <dewar@adacore.com>
8653         * back_end.adb: Minor reformatting and comment additions.
8654         * checks.ads, checks.adb (Duplicated_Tag_Checks_Suppressed): New
8655         function.
8656         * exp_disp.adb (Make_DT): Use Duplicated_Tag_Checks_Suppressed.
8657         (Make_VM_TSD): Use Duplicated_Tag_Checks_Suppressed.
8658         * gnat_rm.texi: Document new check Duplicated_Tag_Checks_Suppressed.
8659         * gnat_ugn.texi: Additional documentation for Duplicated_Tag_Check.
8660         * snames.ads-tmpl (Duplicated_Tag_Checks_Suppressed): New check.
8661         * types.ads (Duplicated_Tag_Checks_Suppressed): New check.
8663 2014-07-17  Robert Dewar  <dewar@adacore.com>
8665         * gnat_rm.texi: Minor comment updates.
8667 2014-07-17  Ed Schonberg  <schonberg@adacore.com>
8669         * sem_util.adb (Make_Explicit_Dereference): If the expression
8670         being dereferenced is a generalized indexing, reset the overloaded
8671         flag on the generalized indexing call, consistent with the
8672         resetting of the flag on the original indexed component.
8674 2014-07-17  Robert Dewar  <dewar@adacore.com>
8676         * gnat_ugn.texi: Document advise not to mix -gnatV? and
8677         optimization.
8679 2014-07-17  Robert Dewar  <dewar@adacore.com>
8681         * checks.adb (Insert_Valid_Check): Don't insist on a name
8682         for the prefix when we make calls to Force_Evaluation and
8683         Duplicate_Subexpr_No_Checks.
8684         * exp_util.adb (Is_Volatile_Reference): Handle all cases properly
8685         (Remove_Side_Effects): Handle all volatile references right
8686         (Side_Effect_Free): Volatile reference is never side effect free
8687         * sinfo.ads (N_Attribute_Reference): Add comments explaining
8688         that in the tree, the prefix can be a general expression.
8690 2014-07-17  Hristian Kirtchev  <kirtchev@adacore.com>
8692         * sem_ch6.adb (Analyze_Subprogram_Body_Contract,
8693         Analyze_Subprogram_Contract): Add comments on SPARK_Mode save/restore.
8694         * sem_ch7.adb (Analyze_Package_Body_Contract,
8695         Analyze_Package_Contract): Add comments on SPARK_Mode save/restore.
8697 2014-07-17  Robert Dewar  <dewar@adacore.com>
8699         * exp_ch7.ads, exp_util.ads: Document Insert_Action_After,
8700         Store_After_Actions_In_Scope.
8702 2014-07-17  Robert Dewar  <dewar@adacore.com>
8704         * sem_aux.ads: Minor comment addition.
8706 2014-07-17  Ed Schonberg  <schonberg@adacore.com>
8708         * sem_res.adb (Make_Call_Into_Operator): If the call is already
8709         a rewriting of an operator node, there are no actuals to be
8710         propagated from original node to rewritten node when in ASIS mode.
8712 2014-07-17  Hristian Kirtchev  <kirtchev@adacore.com>
8714         * sem_ch6.adb (Analyze_Subprogram_Body_Contract,
8715         Analyze_Subprogram_Contract): Add new local variable Mode. Save
8716         and restore the SPARK mode of the related construct in a
8717         stack-like fashion.
8718         * sem_ch7.adb (Analyze_Package_Body_Contract,
8719         Analyze_Package_Contract): Add new local variable Mode. Save and
8720         restore the SPARK mode of the related construct in a stack-like fashion.
8721         * sem_util.adb Remove with and use clause for Opt.
8722         (Restore_SPARK_Mode): New routine.
8723         (Save_SPARK_Mode_And_Set): New routine.
8724         * sem_util.ads Add with and use clause for Opt.
8725         (Restore_SPARK_Mode): New routine.
8726         (Save_SPARK_Mode_And_Set): New routine.
8728 2014-07-17  Hristian Kirtchev  <kirtchev@adacore.com>
8730         * exp_util.adb (Is_Aliased): Transient objects
8731         within an expression with actions cannot be considered aliased.
8733 2014-07-17  Thomas Quinot  <quinot@adacore.com>
8735         * sem.ads (Scope_Stack_Entry): Reorganize storage of action lists;
8736         introduce a new list (cleanup actions) for each (transient) scope.
8737         * sinfo.ads, sinfo.adb (Cleanup_Actions): New attribute for
8738         N_Block_Statement
8739         * exp_ch7.ads (Store_Cleanup_Actions_In_Scope): New subprogram.
8740         * exp_ch7.adb (Store_Actions_In_Scope): New subprogram, common
8741         processing for Store_xxx_Actions_In_Scope.
8742         (Build_Cleanup_Statements): Allow for a list of additional
8743         cleanup statements to be passed by the caller.
8744         (Expand_Cleanup_Actions): Take custom cleanup actions associated
8745         with an N_Block_Statement into account.
8746         (Insert_Actions_In_Scope_Around): Account for Scope_Stack_Entry
8747         reorganization (refactoring only, no behaviour change).
8748         (Make_Transient_Block): Add assertion to ensure that the current
8749         scope is indeed a block (namely, the entity for the transient
8750         block being constructed syntactically, which has already been
8751         established as a scope).  If cleanup actions are present in the
8752         transient scope, transfer them now to the transient block.
8753         * exp_ch6.adb (Expand_Protected_Subprogram_Call): Freeze the
8754         called function while it is still present as the name in a call
8755         in the tree. This may not be the case later on if the call is
8756         rewritten into a transient block.
8757         * exp_smem.adb (Add_Shared_Var_Lock_Procs): The post-actions
8758         inserted after calling a protected operation on a shared passive
8759         protected must be performed in a block finalizer, not just
8760         inserted in the tree, so that they are executed even in case of
8761         a normal (RETURN) or abnormal (exception) transfer of control
8762         outside of the current scope.
8763         * exp_smem.ads (Add_Shared_Var_Lock_Procs): Update documentation
8764         * sem_ch8.adb, expander.adb, exp_ch11.adb: Adjust for
8765         Scope_Stack_Entry reorganization.
8767 2014-07-17  Thomas Quinot  <quinot@adacore.com>
8769         * exp_disp.adb (Make_DT, Make_VM_TSD): Do not omit Check_TSD
8770         call for types that do not have an explicit attribute definition
8771         clause for External_Tag, as their default tag may clash with an
8772         explicit tag defined for some other type.
8774 2014-07-17  Hristian Kirtchev  <kirtchev@adacore.com>
8776         * exp_util.adb (Is_Controlled_Function_Call): Recognize a
8777         controlled function call with multiple actual parameters that
8778         appears in Object.Operation form.
8780 2014-07-17  Thomas Quinot  <quinot@adacore.com>
8782         * einfo.ads, einfo.adb (Has_External_Tag_Rep_Clause): Remove
8783         entity flag.
8784         * sem_ch13.adb (Analyze_Attribute_Definition_Clause, case
8785         External_Tag): No need to set entity flag.
8786         * sem_aux.ads, sem_aux.adb (Has_External_Tag_Rep_Clause):
8787         Reimplement correctly in terms of Has_Rep_Item.
8789 2014-07-17  Thomas Quinot  <quinot@adacore.com>
8791         * exp_ch7.adb (Establish_Transient_Scope.Find_Node_To_Be_Wrapped):
8792         Start examining the tree at the node passed to
8793         Establish_Transient_Scope (not its parent).
8794         * exp_ch6.adb (Make_Build_In_Place_Call_In_Object_Declaration):
8795         The access type for the variable storing the reference to
8796         the call must be declared and frozen prior to establishing a
8797         transient scope.
8798         * exp_ch9.adb: Minor reformatting.
8800 2014-07-17  Pascal Obry  <obry@adacore.com>
8802         * s-os_lib.ads: Minor comment update.
8804 2014-07-17  Tristan Gingold  <gingold@adacore.com>
8806         * sysdep.c: Add ATTRIBUTE_UNUSED to avoid warnings.  Fix some
8807         indentation.
8808         * socket.c: Remove #warning to avoid warning.
8809         * expect.c: Indent some preprocessor directives to clarify
8810         nested if.  Do not use wait.h on PikeOS.  Add ATTRIBUTE_UNUSED
8811         to remove warnings.
8812         * env.c: Fix indentation.  Port to PikeOS.
8813         * gsocket.h: Port to PikeOS.  Remove #warning.
8814         * terminals.c: Port to PikeOS.  Fix indentation of the stubs.
8815         Add ATTRIBUTE_UNUSED to stubs arguments.  Fix return statement
8816         of stubbed __gnat_setup_parent_communication.
8817         * adaint.c: Port to PikeOS.  Reindent some preprocessor
8818         directives to clarify nested if.  Fix indentation.  Add missing
8819         ATTRIBUTE_UNUSED.
8821 2014-07-17  Robert Dewar  <dewar@adacore.com>
8823         * sem_attr.adb: Minor reformatting.
8825 2014-07-17  Robert Dewar  <dewar@adacore.com>
8827         * exp_ch7.adb, exp_ch7.ads, sinfo.ads: Minor reformatting.
8829 2014-07-17  Ed Schonberg  <schonberg@adacore.com>
8831         * sem_case.adb (Check_Choice_Set): If the case expression is the
8832         expression in a predicate, do not recheck coverage against itself,
8833         to prevent spurious errors.
8834         * sem_ch13.adb (Check_Aspect_At_End_Of_Declarations): Indicate that
8835         expression comes from an aspect specification, to prevent spurious
8836         errors when expression is a case expression in a predicate.
8838 2014-07-17  Pascal Obry  <obry@adacore.com>
8840         * adaint.c, adaint.h (__gnat_set_executable): Add mode parameter.
8841         * s-os_lib.ads, s-os_lib.adb (Set_Executable): Add Mode parameter.
8843 2014-07-17  Vincent Celier  <celier@adacore.com>
8845         * gnatchop.adb, make.adb, gnatbind.adb, clean.adb, gprep.adb,
8846         gnatxref.adb, gnatls.adb, gnatfind.adb, gnatname.adb: Do not output
8847         the usage for an erroneous invocation of a gnat tool.
8849 2014-07-16  Vincent Celier  <celier@adacore.com>
8851         * gnatls.adb: Get the target parameters only if -nostdinc was
8852         not specified.
8854 2014-07-16  Ed Schonberg  <schonberg@adacore.com>
8856         * checks.adb (Insert_Valid_Check): If the expression is a packed
8857         component of a modular type of the right size the data is always
8858         valid. This os particularly useful if the component is part of
8859         a volatile variable.
8861 2014-07-16  Robert Dewar  <dewar@adacore.com>
8863         * gnat_rm.texi, sinfo.ads, freeze.adb, exp_aggr.adb: Minor reformatting
8865 2014-07-16  Thomas Quinot  <quinot@adacore.com>
8867         * exp_ch7.ads: Minor documentation fix.
8869 2014-07-16  Ed Schonberg  <schonberg@adacore.com>
8871         * sem_ch3.adb (Find_Type_Name): Diagnose properly
8872         a private extension completion that is an interface definition
8873         with an interface list.
8875 2014-07-16  Arnaud Charlet  <charlet@adacore.com>
8877         * gnatls.adb (Gnatls): Code clean ups.
8879 2014-07-16  Thomas Quinot  <quinot@adacore.com>
8881         * sinfo.ads, sinfo.adb (N_Compound_Statement): New node kind.
8882         * sem.adb (Analyze): Handle N_Compound_Statement.
8883         * sprint.adb (Sprint_Node_Actual): Ditto.
8884         * sem_ch5.ads, sem_ch5.adb (Analyze_Compound_Statement): New
8885         procedure to handle N_Compound_Statement.
8886         * exp_aggr.adb (Collect_Initialization_Statements):
8887         Use a proper compound statement node, instead of a bogus
8888         expression-with-actions with a NULL statement as its expression,
8889         to wrap collected initialization statements.
8890         * freeze.ads, freeze.adb
8891         (Explode_Initialization_Compound_Statement): New public procedure,
8892         lifted from Freeze_Entity.
8893         (Freeze_Entity): When freezing
8894         an object with captured initialization statements and without
8895         delayed freezing, explode compount statement.
8896         * sem_ch4.adb (Analyze_Expression_With_Actions): Remove special
8897         case that used to handle bogus EWAs with NULL statement as
8898         the expression.
8899         * exp_ch13.adb (Expand_N_Freeze_Entity): For an object with
8900         delayed freezing and captured initialization statements, explode
8901         compound statement.
8903 2014-07-16  Gary Dismukes  <dismukes@adacore.com>
8905         * g-rewdat.adb, g-rewdat.ads: Minor reformatting.
8907 2014-07-16  Doug Rupp  <rupp@adacore.com>
8909         * s-interr-hwint.adb: Casing error on parameter.
8911 2014-07-16  Pascal Obry  <obry@adacore.com>
8913         * Makefile.rtl: Add g-rewdat.o dependencies in
8914         GNATRTL_NONTASKING_OBJS.
8916 2014-07-16  Ed Schonberg  <schonberg@adacore.com>
8918         * sem_case.adb: Code clean up.
8920 2014-07-16  Vincent Celier  <celier@adacore.com>
8922         * make.adb: Do not read gnat.adc when gnatmake is invoked
8923         with -gnatA.
8925 2014-07-16  Pascal Obry  <obry@adacore.com>
8927         * gnat_rm.texi, impunit.adb, g-rewdat.adb, g-rewdat.ads: Initial
8928         implementation of GNAT.Rewrite_Data.
8930 2014-07-16  Vincent Celier  <celier@adacore.com>
8932         * gnatls.adb (Normalize): New function.
8933         (Gnatls): Get the target parameters. On targets other than VMS,
8934         normalize the path names in the source search path, the object search
8935         path and the project search path.
8937 2014-07-16  Ed Schonberg  <schonberg@adacore.com>
8939         * sem_case.adb: Avoid self-checking of case expressions in
8940         dynamic predicates.
8942 2014-07-16  Robert Dewar  <dewar@adacore.com>
8944         * gnat_rm.texi: Document effect of Suppress_Initialization on tags and
8945         discriminants.
8947 2014-07-16  Eric Botcazou  <ebotcazou@adacore.com>
8949         * switch-b.adb (Scan_Binder_Switches): Add missing guard.
8951 2014-07-16  Ben Brosgol  <brosgol@adacore.com>
8953         * gnat_ugn.texi: Fix typo.
8955 2014-07-16  Ed Schonberg  <schonberg@adacore.com>
8957         * exp_ch4.adb (Expand_N_Case_Expression): Do not expand case
8958         expression if it is the specification of a subtype predicate:
8959         it will be expanded when the return statement is analyzed, or
8960         when a static predicate is transformed into a static expression
8961         for evaluation by the front-end.
8962         * sem_ch13.adb (Get_RList): If the expression for a static
8963         predicate is a case expression, extract the alternatives of the
8964         branches with a True value to create the required statically
8965         evaluable expression.
8967 2014-07-16  Thomas Quinot  <quinot@adacore.com>
8969         * exp_prag.adb (Expand_Pragma_Check): Use the location of the
8970         expression, not the location of the aspect, for all generated
8971         code, so that in particular the call to raise_assert_failure
8972         gets the sloc of the associated condition.
8973         * exp_ch6.adb
8974         (Expand_Subprogram_Contract.Build_Postconditions_Procedure):
8975         Set an explicit End_Label on the handled sequence of statements
8976         for the _Postconditions procedure so that the implicit return
8977         statement does not erroneously get associated with code generated
8978         for the last condition in postconditions.
8980 2014-07-16  Thomas Quinot  <quinot@adacore.com>
8982         * ug_words: Fix name of VMS synonym for -gnatw.z (SIZE_ALIGNMENT,
8983         not SIZE_ALIGN) and -gnatw.Z (NOSIZE_ALIGNMENT, not NOSIZE_ALIGN).
8984         * vms_data.ads: Add missing spaces in VMS synonyms for -gnatw.z /
8985         -gnatw.Z.
8987 2014-07-16  Robert Dewar  <dewar@adacore.com>
8989         * sem_ch3.adb, sem_prag.adb, sem_util.adb, sem_res.adb, sem_ch13.adb:
8990         Minor code reorganization (use Is_Access_Type, not in Access_Kind).
8991         * exp_ch3.adb: Minor code reorganization, use Is_Access_Type,
8992         not in Access_Kind.
8993         * par-ch4.adb (At_Start_Of_Attribute): New function
8994         (P_Simple_Expression): Better msg for bad attribute prefix.
8995         * scans.ads: Minor reformatting.
8997 2014-07-16  Ed Schonberg  <schonberg@adacore.com>
8999         * sem_attr.adb (Resolve_Attribute, case 'Update): If choice is a
9000         static constant, check that in belongs to the corresponding index
9001         subtype, to produce the proer warning when expansion is disabled.
9003 2014-07-16  Robert Dewar  <dewar@adacore.com>
9005         * freeze.adb (Freeze_Entity): Warn on incompatible size/alignment.
9006         * gnat_ugn.texi: Document -gnatw.z and -gnatw.Z.
9007         * ug_words: VMS synonyms (WARNINGS=[NO]SIZE_ALIGN) for -gnatw.z/-gnatw.Z
9008         * usage.adb: Add lines for -gnatw.z/-gnatw.Z.
9009         * vms_data.ads: VMS synonyms (WARNINGS=[NO]SIZE_ALIGN) for
9010         -gnatw.z/-gnatw.Z
9011         * warnsw.adb: Set Warn_On_Size_Alignment appropriately.
9012         * warnsw.ads (Warn_On_Size_Alignment): New flag Minor
9013         reformatting.
9015 2014-07-16  Hristian Kirtchev  <kirtchev@adacore.com>
9017         * exp_ch7.adb (Process_Declarations): Reinstate the check on
9018         a hook object to ensure that the related transient declaration
9019         is finalizable.
9020         * exp_util.adb (Is_Aliased): Do not consider expresison with
9021         actions as a special context.
9022         (Requires_Cleanup_Actions): Reinstate the check on a hook object to
9023         ensure that the related transient declaration is finalizable.
9025 2014-07-16  Robert Dewar  <dewar@adacore.com>
9027         * checks.ads, checks.adb (Allocation_Checks_Suppressed): New function.
9028         * snames.ads-tmpl: Add Allocation_Check to list of check names.
9029         * types.ads: Add Allocation_Check to list of check names.
9031 2014-07-16  Thomas Quinot  <quinot@adacore.com>
9033         * sem_util.adb (Enter_Name): replace bogus test for presence of
9034         Corresponding_Remote_Type with correct test on Ekind.
9035         * sem_res.adb (Valid_Conversion): ditto; also clarify validity
9036         of calls to Corresponding_ Remote_Type (documentation fix).
9038 2014-07-16  Robert Dewar  <dewar@adacore.com>
9040         * gnat_rm.texi: Document illegal case of Unrestricted_Access.
9041         * sem_attr.adb (Analyze_Access_Attribute): Set_Non_Aliased_Prefix
9042         where it applies.
9043         (Resolve_Attribute, case Access): Flag illegal Unrestricted_Access use.
9044         * sinfo.ads, sinfo.adb (Non_Aliased_Prefix): New flag.
9046 2014-07-16  Robert Dewar  <dewar@adacore.com>
9048         * gnat_ugn.texi: Document binder switch -Ra.
9049         * gnatbind.adb (List_Closure_Display): Implement -Ra switch
9050         (List_Closure_All).
9051         * opt.ads (List_Closure_All): New switch.
9052         * switch-b.adb (Scan_Binder_Switches): Recognize -Ra to set
9053         List_Closure_All.
9055 2014-07-16  Ben Brosgol  <brosgol@adacore.com>
9057         * gnat_rm.texi: Minor edits, to make case consistent in names
9058         of types and fields.
9060 2014-07-16  Robert Dewar  <dewar@adacore.com>
9062         * gnat_rm.texi: Document erroneous mixing of thin pointers and
9063         unrestricted access
9064         * gnat_ugn.texi: Add note on size of access types about thin
9065         pointers and the use of attribute Unrestricted_Access.
9067 2014-07-16  Ed Schonberg  <schonberg@adacore.com>
9069         * a-cbdlli.ads, a-cbdlli.adb, a-cbhama.ads, a-cbhama.adb,
9070         * a-cbhase.ads, a-cbhase.adb, a-cborma.ads, a-cborma.adb,
9071         * a-cborse.ads, a-cborse.adb, a-cobove.ads a-cobove.adb: Add Control
9072         machinery to detect tampering on bounded vectors.
9074 2014-07-16  Robert Dewar  <dewar@adacore.com>
9076         * gnat_rm.texi: Document that leading/trailing asterisks are
9077         now implied for the pattern match string for pragma Warnings
9078         and Warning_As_Error.
9079         * sem_prag.adb (Acquire_Warning_Match_String): New procedure.
9080         (Analyze_Pragma, case Warning_As_Error): Call
9081         Acquire_Warning_Match_String.
9082         (Analyze_Pragma, case Warnings): Call Acquire_Warning_Match_String.
9084 2014-07-16  Bob Duff  <duff@adacore.com>
9086         * gnat_ugn.texi: Document need for project file
9087         for --incremental switch for gnat2xml.
9089 2014-07-16  Robert Dewar  <dewar@adacore.com>
9091         * gnat_rm.texi: Fix example of non-packable components in packed
9092         records section.
9094 2014-07-16  Robert Dewar  <dewar@adacore.com>
9096         * s-tpoben.adb, s-tasren.adb, s-interr.adb, s-interr-hwint.adb,
9097         s-shasto.adb, s-interr-vms.adb, s-interr-sigaction.adb: Avoid use of
9098         upper case in exception messages.
9100 2014-07-16  Robert Dewar  <dewar@adacore.com>
9102         * snames.ads-tmpl, sem_attr.adb, exp_attr.adb: Same_Storage attribute
9103         is renamed Has_Same_Storage.
9104         * gnat_rm.texi: Document missing SPARK pragmas and attributes.
9105         * sem_prag.adb: Minor comment fix (use LOCAL_NAME in syntax
9106         descriptions).
9108 2014-07-16  Robert Dewar  <dewar@adacore.com>
9110         * exp_util.adb, sem_attr.adb, exp_ch4.adb, a-cohase.ads,
9111         a-coinho-shared.adb, a-coinho-shared.ads: Minor reformatting.
9113 2014-07-16  Robert Dewar  <dewar@adacore.com>
9115         * gnat_ugn.texi: Add note that integrated
9116         preprocessing cannot be applied to configuration pragma files.
9118 2014-07-16  Yannick Moy  <moy@adacore.com>
9120         * sem_attr.adb (Analyze_Attribute/cases Pred
9121         and Succ): Always enable range check on fixed-point types if
9122         not suppressed for the type.
9124 2014-07-16  Hristian Kirtchev  <kirtchev@adacore.com>
9126         * sem_util.adb (State_Has_Enabled_Property):
9127         Account for an external property denoted by an others choice.
9129 2014-07-16  Hristian Kirtchev  <kirtchev@adacore.com>
9131         * exp_ch4.ads, exp_ch4.adb (Find_Hook_Context): Relocated to Exp_Util.
9132         * exp_ch7.adb (Process_Declarations): There is no need to check
9133         that a transient object being hooked is controlled as it would
9134         not have been hooked in the first place.
9135         * exp_ch9.adb Remove with and use clause for Exp_Ch4.
9136         * exp_util.adb (Find_Hook_Context): Relocated from Exp_Ch4.
9137         (Is_Aliased): A renaming of a transient controlled object is
9138         not considered aliasing when it occurs within an expression
9139         with actions.
9140         (Requires_Cleanup_Actions): There is no need to
9141         check that a transient object being hooked is controlled as it
9142         would not have been hooked in the first place.
9143         * exp_util.ads (Find_Hook_Context): Relocated from Exp_Ch4.
9145 2014-07-16  Hristian Kirtchev  <kirtchev@adacore.com>
9147         * sem_ch13.adb (Insert_After_SPARK_Mode): Moved to
9148         the outer level of routine Analyze_Aspect_Specifications. Ensure
9149         that the corresponding pragmas of aspects Initial_Condition and
9150         Initializes are inserted after pragma SPARK_Mode.
9152 2014-07-16  Ed Schonberg  <schonberg@adacore.com>
9154         * sem_attr.adb (Analyze_Attribute, case 'Update): Handle
9155         properly a choice list with more than one choice, where each
9156         is an aggregate denoting a sequence of array indices for a
9157         multidimentional array. For SPARK use.
9159 2014-07-16  Vadim Godunko  <godunko@adacore.com>
9161         * a-coinho-shared.adb (Adjust): Create
9162         copy of internal shared object and element when source container
9163         is locked.
9164         (Copy): Likewise.
9165         (Query_Element): Likewise.
9166         (Update_Element): Likewise.
9167         (Constant_Reference): Likewise. Raise Constraint_Error on attempt
9168         to get reference for empty holder.
9169         (Reference): Likewise.
9171 2014-07-16  Thomas Quinot  <quinot@adacore.com>
9173         * exp_ch4.adb (Find_Hook_Context): New subprogram, extracted
9174         from Process_Transient_Oject.
9175         * exp_ch4.ads: Ditto.
9176         * exp_ch9.adb (Build_Class_Wide_Master): Insert the _master
9177         declaration as an action on the topmost enclosing expression,
9178         not on a possibly conditional subexpreession.
9180 2014-07-16  Vadim Godunko  <godunko@adacore.com>
9182         * a-coinho.adb, a-coinho-shared.adb, a-coinho.ads, a-coinho-shared.ads:
9183         Fix parameter mode of Update_Element.
9185 2014-07-16  Robert Dewar  <dewar@adacore.com>
9187         * a-coinho.adb, a-coinho-shared.adb, a-coinho-shared.ads: Minor
9188         reformatting.
9190 2014-07-16  Ed Schonberg  <schonberg@adacore.com>
9192         * a-cohase.ads: Type Iterator must be controlled, so that the
9193         tampering bit is properly set through an iteration.
9194         * a-cohase.adb: Add Finalize operation for type Iterator.
9196 2014-07-16  Ed Schonberg  <schonberg@adacore.com>
9198         * a-coinho-shared.adb, a-coinho-shared.ads: Proper structures for
9199         tampering checks.
9201 2014-07-16  Ed Schonberg  <schonberg@adacore.com>
9203         * a-coinho-shared.adb: Fix spurious accessibility check.
9205 2014-06-15  Jan Hubicka  <hubicka@ucw.cz>
9207         * gcc-interface/utils.c (process_attributes): Use set_decl_tls_model.
9209 2014-06-14  Bernd Edlinger  <bernd.edlinger@hotmail.de>
9211         PR ada/61505
9212         * gnat_rm.texi: Fix errors with makeinfo 5.1.
9214 2014-06-14  Arnaud Charlet  <charlet@adacore.com>
9216         PR ada/61505
9217         * gnat_rm.texi: Attempt to fix error with makeinfo 5.1.
9219 2014-06-13  Yannick Moy  <moy@adacore.com>
9221         * exp_attr.adb: Fix typo in comment.
9222         * gnat1drv.adb (Adjust_Global_Switches): Force float overflow
9223         checking in GNATprove_Mode.
9225 2014-06-13  Ed Schonberg  <schonberg@adacore.com>
9227         * a-coinho-shared.adb, a-coinho-shared.ads: Update shared version.
9229 2014-06-13  Robert Dewar  <dewar@adacore.com>
9231         * sem_ch3.adb, sem_ch9.adb, a-coinho.adb, a-coinho.ads: Minor
9232         reformatting.
9234 2014-06-13  Hristian Kirtchev  <kirtchev@adacore.com>
9236         * sem_prag.adb (Analyze_Pragma): Add local
9237         variable Missing_Parentheses. Emit an error when a state
9238         declaration with options appears without parentheses. Add a
9239         guard to prevent a bogus error when a state declaration may be
9240         interpreted as an option if a previous declaration with options
9241         was not parenthesized.
9243 2014-06-13  Robert Dewar  <dewar@adacore.com>
9245         * checks.adb: Validate_Alignment_Check_Warnings: New procedure
9246         (Apply_Address_Clause_Check): Make Aligment_Warnings table entry.
9247         * checks.ads (Alignment_Warnings_Record): New type.
9248         (Alignment_Warnings): New table
9249         (Validate_Alignment_Check_Warnings): New procedure.
9250         * errout.adb (Delete_Warning_And_Continuations): New procedure
9251         (Error_Msg_Internal): Set Warning_Msg (Delete_Warning): Handle
9252         Warnings_Treated_As_Errors (Finalize): Minor reformatting
9253         * errout.ads (Warning_Msg): New variable
9254         (Delete_Warning_And_Continuations): New procedure
9255         * erroutc.adb (Delete_Msg): Handle Warnings_Treated_As_Errors count.
9256         * gnat1drv.adb (Post_Compilation_Validation_Checks): New procedure.
9258 2014-06-13  Ed Schonberg  <schonberg@adacore.com>
9260         * a-coinho.adb, a-coinho.ads: Add Reference machinery.
9262 2014-06-13  Hristian Kirtchev  <kirtchev@adacore.com>
9264         * errout.adb (SPARK_Msg_N): New routine.
9265         (SPARK_Msg_NE): New routine.
9266         * errout.ads Add a section on SPARK-related error routines.
9267         (SPARK_Msg_N): New routine.
9268         (SPARK_Msg_NE): New routine.
9269         * sem_ch13.adb (Analyze_Aspect_Specifications): Ensure that
9270         pragma Abstract_State is always inserted after SPARK_Mode.
9271         (Insert_After_SPARK_Mode): New routine.
9272         * sem_prag.adb (Analyze_Abstract_State,
9273         Analyze_Constituent, Analyze_External_Property,
9274         Analyze_External_Property_In_Decl_Part, Analyze_Global_Item,
9275         Analyze_Global_List, Analyze_Initialization_Item,
9276         Analyze_Initialization_Item_With_Inputs, Analyze_Input_Item,
9277         Analyze_Input_List, Analyze_Input_Output, Analyze_Part_Of,
9278         Analyze_Pragma, Analyze_Refined_Depends_In_Decl_Part,
9279         Analyze_Refined_Global_In_Decl_Part,
9280         Analyze_Refined_State_In_Decl_Part, Analyze_Refinement_Clause,
9281         Check_Aspect_Specification_Order, Check_Constituent_Usage,
9282         Check_Declaration_Order, Check_Dependency_Clause,
9283         Check_Duplicate_Mode, Check_Duplicate_Option,
9284         Check_Duplicate_Property, Check_External_Properties,
9285         Check_External_Property, Check_Function_Return,
9286         Check_Matching_Constituent, Check_Matching_State,
9287         Check_Mode_Restriction_In_Enclosing_Context,
9288         Check_Mode_Restriction_In_Function, Check_Refined_Global_Item,
9289         Check_State_And_Constituent_Use, Create_Or_Modify_Clause,
9290         Has_Extra_Parentheses, Inconsistent_Mode_Error,
9291         Match_Error, Propagate_Part_Of, Report_Extra_Clauses,
9292         Report_Extra_Constituents_In_List, Report_Extra_Inputs,
9293         Report_Unrefined_States, Report_Unused_Constituents,
9294         Report_Unused_States, Role_Error, Usage_Error):
9295         Convert Error_Msg_XXX calls to SPARK_Msg_XXX calls
9296         to report semantic errors only when SPARK_Mode is on.
9297         (Analyze_Depends_In_Decl_Part): Do not check the syntax of
9298         pragma Depends explicitly, this is now done by the analysis.
9299         (Analyze_Global_In_Decl_List): Do not check the syntax of
9300         pragma Global explicitly, this is now done by the analysis.
9301         (Analyze_Initializes_In_Decl_Part): Do not check the syntax of
9302         pragma Initializes explicitly, this is now done by the analysis.
9303         (Analyze_Part_Of): Do not check the syntax of the encapsulating
9304         state, this is now done by the analysis.
9305         (Analyze_Pragma): Do
9306         not check the syntax of a state declaration, this is now done
9307         by the analysis.
9308         (Analyze_Refined_Depends_In_Decl_Part): Do not
9309         check the syntax of pragma Refined_Depends explicitly, this is now
9310         done by the analysis.
9311         (Analyze_Refined_Global_In_Decl_Part): Do
9312         not check the syntax of pragma Refined_Global explicitly, this is
9313         now done by the analysis.
9314         (Analyze_Refined_State_In_Decl_Part):
9315         Do not check the syntax of pragma Refined_State explicitly, this
9316         is now done by the analysis.
9317         (Check_Dependence_List_Syntax): Removed.
9318         (Check_Global_List_Syntax): Removed.
9319         (Check_Initialization_List_Syntax): Removed.
9320         (Check_Item_Syntax): Removed.
9321         (Check_Missing_Part_Of): Do not consider items from an instance.
9322         (Check_Refinement_List_Syntax): Removed.
9323         (Check_State_Declaration_Syntax): Removed.
9324         (Collect_Global_List): Do not raise Program_Error when the input is
9325         malformed.
9326         (Process_Global_List): Do not raise Program_Error when the input
9327         is malformed.
9328         * sem_ch13.adb: Minor reformatting.
9330 2014-06-13  Ed Schonberg  <schonberg@adacore.com>
9332         * sem_ch3.adb (Find_Type_Name): Diagnose a private type completion
9333         that is an interface definition with an interface list.
9334         (Process_Full_View): Move error message on missmatched interfaces
9335         between views to the declaration of full view, for clarity.
9336         * sem_ch9.adb (Check_Interfaces): Move error message to full view,
9337         for clarity.
9339 2014-06-13  Robert Dewar  <dewar@adacore.com>
9341         * exp_attr.adb (Expand_N_Attribute_Reference, case Pred/Succ): Change
9342         reason to Overflow.
9344 2014-06-13  Robert Dewar  <dewar@adacore.com>
9346         * makeutl.adb: Minor reformatting.
9348 2014-06-13  Gail Schenker  <schenker@adacore.com>
9350         * debug.adb, sem_eval.adb (Why_Not_Static): Remove temporary code and
9351         associated flag (d.z), no longer needed.
9353 2014-06-13  Ed Schonberg  <schonberg@adacore.com>
9355         * sem_ch13.adb (Analyze_Aspect_Specifications): For Import and
9356         Export aspects, do not check whether a corresponding Convention
9357         aspect has been specified. Convention is optional in Ada2012,
9358         and defaults to Convention_Ada.
9360 2014-06-13  Eric Botcazou  <ebotcazou@adacore.com>
9362         * checks.adb (Apply_Address_Clause_Check): Only issue the new
9363         warning if the propagation warning is issued.
9365 2014-06-13  Thomas Quinot  <quinot@adacore.com>
9367         * exp_ch4.adb: Minor reformatting.
9369 2014-06-13  Robert Dewar  <dewar@adacore.com>
9371         * exp_attr.adb (Expand_N_Attribute_Reference, case Pred):
9372         Handle float range check case (Expand_N_Attribute_Reference,
9373         case Succ): Handle float range check case.
9374         * sem_attr.adb (Analyze_Attribute, case Pred/Succ): Handle float
9375         range check case.
9377 2014-06-13  Vincent Celier  <celier@adacore.com>
9379         * makeutl.ads (Compute_Builder_Switches): Change name of
9380         parameter Root_Environment to Env.
9381         * prj-conf.adb (Check_Switches): Call Locate_Runtime with the
9382         Env parameter of procedure Get_Or_Create_Configuration_File.
9383         (Locate_Runtime): Call Find_Rts_In_Path with the Project_Path
9384         of new parameter Env.
9385         * prj-conf.ads (Locate_Runtime): New parameter Env of type
9386         Prj.Tree.Environment.
9388 2014-06-13  Robert Dewar  <dewar@adacore.com>
9390         * gnat_rm.texi: Minor comment clarification for Check_Float_Overflow.
9392 2014-06-13  Robert Dewar  <dewar@adacore.com>
9394         * exp_attr.adb, exp_ch9.adb, lib-writ.adb, g-comlin.adb: Minor
9395         reformatting.
9396         * sem_attr.adb: Minor code reformatting and simplification.
9397         * checks.adb: Fix minor typo.
9399 2014-06-13  Emmanuel Briot  <briot@adacore.com>
9401         * g-comlin.adb (Get_Argument): fix expansion
9402         of command line arguments (e.g. "*.adb") when using a custom
9403         parser. The parser was not passed to the recursive call, and
9404         thus we were trying to do the expansion on the default command
9405         line parser.
9407 2014-06-13  Thomas Quinot  <quinot@adacore.com>
9409         * exp_ch9.adb: Minor reformatting.
9411 2014-06-13  Ed Schonberg  <schonberg@adacore.com>
9413         * exp_attr.adb (Expand_N_Attribute_Reference, case 'Old):
9414         To determine whether the attribute should be expanded, examine
9415         whether the enclosing postcondition pragma is to be checked,
9416         rather than using the internal flag Assertions_Enabled.
9418 2014-06-13  Ben Brosgol  <brosgol@adacore.com>
9420         * gnat_rm.texi: Minor fixes.
9421         * gnat_ugn.texi: Added a missing "@itemize".
9423 2014-06-13  Robert Dewar  <dewar@adacore.com>
9425         * debug.adb: Remove -gnatd.1 flag documentation.
9426         * layout.adb (Layout_Type): Remove special handling of size
9427         for anonymous access type.
9428         * sem_ch3.adb (Replace_Type): Remove special handling of size
9429         for anonymous access type.
9431 2014-06-13  Robert Dewar  <dewar@adacore.com>
9433         * debug.adb: Document debug flag -gnatd.1.
9434         * layout.adb (Layout_Type): Size change for anonymous access
9435         types under -gnatd.1.
9436         * sem_ch3.adb (Replace_Type): Size change for anonymous access
9437         types under -gnatd.1.
9439 2014-06-13  Robert Dewar  <dewar@adacore.com>
9441         * layout.adb (Layout_Type): Anonymous access types designating
9442         unconstrained arrays are always thin pointers.
9443         * sem_ch3.adb (Replace_Type): Anonymous access types designating
9444         unconstrained arrays are always thin pointers.
9446 2014-06-13  Ed Schonberg  <schonberg@adacore.com>
9448         * sem_attr.adb (Analyze_Attribute): Use Check_Parameterless_Call
9449         to resolve the prefix of an attribute that is an entity name
9450         and may be a parameterless call.  Minor code reorganization.
9452 2014-06-13  Robert Dewar  <dewar@adacore.com>
9454         * lib.ads, lib.adb, lib-writ.adb, lib-load.adb (Is_Compiler_Unit):
9455         Removed.
9456         * opt.ads (Compiler_Unit): New flag.
9457         * par-ch5.adb (Test_Statement_Required): Call Check_Compiler_Unit
9458         for null statement sequence (not allowed in compiler unit).
9459         * par-prag.adb (Prag): Handle Compiler_Unit[_Warning] during
9460         parsing.
9461         * restrict.ads, restrict.adb (Check_Compiler_Unit): New version and new
9462         calling sequence.
9463         * sem_ch11.adb, sem_ch3.adb, sem_ch4.adb: New calling sequence for
9464         Check_Compiler_Unit.
9465         * sem_ch6.adb (Analyze_Extended_Return_Statement): Call
9466         Check_Compiler_Unit (this construct is not allowed in compiler
9467         units).
9468         * sem_prag.adb (Analyze_Pragma, case Compiler_Unit[_Warning]):
9469         Set Opt.Compiler_Unit.
9471 2014-06-13  Geert Bosch  <bosch@adacore.com>
9473         * gnat_rm.texi, s-tasinf-solaris.ads, sem_prag.adb, gnat_ugn.texi,
9474         s-tasinf-mingw.ads, s-tasinf.ads, s-tasinf-linux.ads,
9475         s-tasinf-vxworks.ads: Make Task_Info pragma and package obsolescent.
9477 2014-06-13  Robert Dewar  <dewar@adacore.com>
9479         * s-tasini.adb, s-tarest.adb, s-taprob.adb: Minor reformatting.
9481 2014-06-13  Hristian Kirtchev  <kirtchev@adacore.com>
9483         * freeze.adb (Freeze_Entity): Remove the check concerning volatile
9484         types in SPARK as it is poorly placed and poorly formulated. The
9485         check was flagging ALL volatile entities as illegal in SPARK.
9486         * sem_prag.adb (Process_Atomic_Shared_Volatile): Flag volatile
9487         types as illegal in SPARK.
9489 2014-06-13  Robert Dewar  <dewar@adacore.com>
9491         * sem_cat.adb: Minor reformatting.
9493 2014-06-13  Yannick Moy  <moy@adacore.com>
9495         * sem_prag.adb (Analyze_Pragma/Post_Class): Fix typo.
9497 2014-06-13  Arnaud Charlet  <charlet@adacore.com>
9499         * gnat_rm.texi: Add detail on SPARK_05 restriction.
9501 2014-06-13  Bob Duff  <duff@adacore.com>
9503         * s-solita.adb (Get_Sec_Stack_Addr, Init_Tasking_Soft_Links):
9504         Add assertions requiring the secondary stack to be initialized.
9505         * s-solita.ads (Init_Tasking_Soft_Links): Comment.
9506         * s-taprob.adb, s-tarest.adb, s-tasini.adb (elab code): Make sure the
9507         secondary stack is initialized before calling Init_Tasking_Soft_Links,
9508         by adding pragmas Elaborate_Body.
9510 2014-06-13  Thomas Quinot  <quinot@adacore.com>
9512         * sem_ch13.adb (Analyze_Stream_TSS_Definition): Remove temporary
9513         kludge disabling new legality check.
9515 2014-06-13  Hristian Kirtchev  <kirtchev@adacore.com>
9517         * freeze.adb (Freeze_Record_Type): Remove checks related to SPARK
9518         volatile types.
9519         (Freeze_Type): Volatile types are now illegal in SPARK.
9521 2014-06-13  Robert Dewar  <dewar@adacore.com>
9523         * aspects.ads, aspects.adb: Add aspect Thread_Local_Storage.
9524         * gnat_rm.texi: Document aspect Thread_Local_Storage.
9526 2014-06-13  Ed Schonberg  <schonberg@adacore.com>
9528         * sem_cat.adb (Validate_Static_Object_Name): A constant whose
9529         value is a temporary that renames an aggregate is legal in a
9530         preelaborated unit. Illegalities, if any will be detected in
9531         the aggregate components.
9533 2014-06-13  Ed Schonberg  <schonberg@adacore.com>
9535         * einfo.ads: Minor reformatting an comment expansion.
9537 2014-06-13  Robert Dewar  <dewar@adacore.com>
9539         * back_end.ads, back_end.adb: Make_Id, Make_SC, Set_RND are moved to
9540         Tbuild.
9541         * tbuild.ads, tbuild.adb: Make_Id, Make_SC, Set_RND are moved here from
9542         Back_End.
9543         * gnat1drv.adb: Make_Id, Make_SC, Set_RND are moved to Tbuild
9544         * sem_warn.adb: Minor reformatting.
9546 2014-06-13  Doug Rupp  <rupp@adacore.com>
9548         * adaint.c (__gnat_open_new_temp) [VMS]: Open binary
9549         files with rfm=udf.
9551 2014-06-13  Yannick Moy  <moy@adacore.com>
9553         * sem_warn.adb (Check_Unset_References): Take
9554         case of Refined_Post into account in Within_Postcondition check.
9556 2014-06-13  Hristian Kirtchev  <kirtchev@adacore.com>
9558         * freeze.adb (Freeze_Record_Type): Volatile types are not allowed in
9559         SPARK.
9561 2014-06-13  Yannick Moy  <moy@adacore.com>
9563         * sem_ch13.adb (Analyze_Aspect_Specifications/Aspect_Import,
9564         Aspect_Export): Consider that variables may be set outside the program.
9566 2014-06-13  Robert Dewar  <dewar@adacore.com>
9568         * back_end.adb (Make_Id): New function.
9569         (Make_SC): New function.
9570         (Set_RND): New procedure.
9571         * back_end.ads (Make_Id): New function.
9572         (Make_SC): New function.
9573         (Set_RND): New procedure.
9574         * einfo.ads: Minor comment updates.
9575         * frontend.adb: Move Atree.Initialize call to Gnat1drv.
9576         * gnat1drv.adb (Gnat1drv): New calling sequence for
9577         Get_Target_Parameters.
9578         (Gnat1drv): Move Atree.Initialize here from Frontend.
9579         * targparm.adb (Get_Target_Parameters): New calling
9580         sequence (Get_Target_Parameters): Handle pragma Restriction
9581         (No_Dependence,..)
9582         * targparm.ads (Get_Target_Parameters): New calling sequence.
9584 2014-06-13  Gary Dismukes  <dismukes@adacore.com>
9586         * sem_prag.adb (Process_Import_Or_Interface): Exit the homonym
9587         loop if the pragma does not come from source, so that an implicit
9588         pragma Import only applies to the first declaration, avoiding
9589         possible conflicts with earlier explicit and implicit declarations
9590         due to multiple Provide_Shift_Operators pragmas.
9591         (Set_Imported): Remove previous fix that bypassed pragma duplication
9592         error.
9593         * gnat_rm.texi: Change 'equivalent' to 'similar' in description
9594         of Provide_Shift_Operators.
9596 2014-06-12  Jan Hubicka  <hubicka@ucw.cz>
9598         * gcc-interface/utils.c (process_attributes) <ATTR_LINK_SECTION>: Pass
9599         string pointer directly to set_decl_section_name.
9601 2014-06-11  Robert Dewar  <dewar@adacore.com>
9603         * sem_ch13.adb: Minor reformatting.
9605 2014-06-11  Hristian Kirtchev  <kirtchev@adacore.com>
9607         * sem_prag.adb (Check_Clause_Syntax): Add new
9608         local variable Outputs. Account for the case where multiple
9609         output items appear as an aggregate.
9611 2014-06-11  Robert Dewar  <dewar@adacore.com>
9613         * sem_warn.adb (Output_Obsolescent_Entity_Warnings): Tag warning
9614         with ?j? not ??.
9616 2014-06-11  Ed Schonberg  <schonberg@adacore.com>
9618         * einfo.ads: Minor reformatting.
9620 2014-06-11  Hristian Kirtchev  <kirtchev@adacore.com>
9622         * a-cbdlli.adb, a-cdlili.adb, a-cidlli.adb, a-crdlli.adb (Insert): Add
9623         new variable First_Node. Update the position after all insertions have
9624         taken place to First_Node.
9626 2014-06-11  Robert Dewar  <dewar@adacore.com>
9628         * debug.adb: Remove debug flag -gnatd.1, no longer needed.
9629         * layout.adb (Layout_Type): Remove test of -gnatd.1.
9631 2014-06-11  Robert Dewar  <dewar@adacore.com>
9633         * sem_ch13.adb: Minor reformatting.
9635 2014-06-11  Hristian Kirtchev  <kirtchev@adacore.com>
9637         * sem_prag.adb (Check_Clause_Syntax): Add new
9638         local variable Outputs. Account for the case where multiple
9639         output items appear as an aggregate.
9641 2014-06-11  Robert Dewar  <dewar@adacore.com>
9643         * sem_warn.adb (Output_Obsolescent_Entity_Warnings): Tag warning
9644         with ?j? not ??.
9646 2014-06-11  Ed Schonberg  <schonberg@adacore.com>
9648         * einfo.ads: Minor reformatting.
9650 2014-06-11  Hristian Kirtchev  <kirtchev@adacore.com>
9652         * a-cbdlli.adb, a-cdlili.adb, a-cidlli.adb, a-crdlli.adb (Insert): Add
9653         new variable First_Node. Update the position after all insertions have
9654         taken place to First_Node.
9656 2014-06-11  Robert Dewar  <dewar@adacore.com>
9658         * debug.adb: Remove debug flag -gnatd.1, no longer needed.
9659         * layout.adb (Layout_Type): Remove test of -gnatd.1.
9661 2014-06-11  Thomas Quinot  <quinot@adacore.com>
9663         * freeze.ads: Minor reformatting.
9664         * checks.adb (Determine_Range): Do not attempt to determine
9665         the range of a deferred constant whose full view has not been
9666         seen yet.
9667         * sem_res.adb (Resolve): Remove undesirable guard against
9668         resolving expressions from expression functions.
9670 2014-06-11  Robert Dewar  <dewar@adacore.com>
9672         * debug.adb (Debug_Flag_Dot_1): Set to enable fix for anonymous
9673         access types.
9674         * layout.adb (Layout_Type): Make anonymous access types for
9675         subprogram formal types and return types always thin. For now
9676         only enabled if -gnatd.1 set.
9678 2014-06-11  Ed Schonberg  <schonberg@adacore.com>
9680         * sem_ch13.adb (Analyze_Stream_TSS_Definition): Apply legality
9681         rule for stream attributes of interface types (RM 13.13.2 (38/3)):
9682         subprogram must be a null procedure.
9684 2014-06-11  Hristian Kirtchev  <kirtchev@adacore.com>
9686         * sem_prag.adb (Analyze_Input_Item): Allow formal
9687         parameters to appear as input_items in an initialization_list
9688         of pragma Initializes. Encapsulation now applies to states and
9689         variables only (as it should). Add RM references to key errors.
9690         * sem_prag.adb (Set_Imported): Suppress errors
9691         about preceding Imports when the pragma does not come from source,
9692         which can happen through use of pragma Provide_Shift_Operators.
9694 2014-06-11  Thomas Quinot  <quinot@adacore.com>
9696         * sem_ch3.adb: Minor reformatting.
9697         * einfo.ads (Full_View): Minor comment update.
9699 2014-06-11  Robert Dewar  <dewar@adacore.com>
9701         * einfo.adb (Is_Independent): New flag.
9702         * einfo.ads (Is_Independent): New flag.
9703         (Has_Independent_Components): Clean up and fix comments.
9704         * sem_prag.adb (Fix_Error): Deal with changing argument
9705         [of] to entity [for].
9706         (Analyze_Pragma, case Independent): Set Is_Independent flag
9707         (Analyze_Pragma, case Independent_Components): Set Is_Independent flag
9708         in all components of specified record.
9710 2014-06-11  Thomas Quinot  <quinot@adacore.com>
9712         * sem_ch12.adb (Analyze_Formal_Decimal_Fixed_Point_Type):
9713         Set proper Etype on bounds of dummy type created for analysis
9714         of the generic.
9716 2014-06-11  Robert Dewar  <dewar@adacore.com>
9718         * debug.adb: Minor comment fix (add missing section of dot
9719         numeric flags).
9721 2014-06-11  Robert Dewar  <dewar@adacore.com>
9723         * gnat_rm.texi, switch-c.adb, sem_prag.adb, a-tgdico.ads, par-prag.adb,
9724         opt.ads, a-finali.ads, snames.ads-tmpl: Remove all traces of
9725         pragma/aspects Pure_05 Pure_12 Preelaborate_05.
9726         * errout.adb (Output_Messages): Avoid duplicate output for
9727         library level instance.
9728         * sem_elab.adb (Is_Call_Of_Generic_Formal): Moved to outer level
9729         (Check_Elab_Call): Add call to Is_Call_Of_Generic_Formal
9730         * exp_ch4.adb (Expand_N_Op_Expon): New interface for Exp_Modular.
9731         * s-expmod.ads, s-expmod.adb (Exp_Modular): Change interface to
9732         accomodate largest modulus value.
9733         * gnat_ugn.texi: Minor updates.
9735 2014-06-11  Ed Schonberg  <schonberg@adacore.com>
9737         * sem_ch12.adb (Instantiate_Package_Body): Do not attempt to
9738         load body of generic package or its parent, if body is optional
9739         and the unit does not require a body.
9741 2014-06-11  Robert Dewar  <dewar@adacore.com>
9743         * gnat_rm.texi: Document System.Unsigned_Types.
9744         * impunit.adb: System.Unsigned_Types (s-unstyp.ads) is user accessible.
9745         * s-unstyp.ads: Update comments (this is now user available unit).
9747 2014-06-11  Robert Dewar  <dewar@adacore.com>
9749         * make.adb, sem_res.adb: Minor reformatting.
9751 2014-06-11  Thomas Quinot  <quinot@adacore.com>
9753         * a-astaco.ads, a-tags.ads, s-excdeb.ads, a-tgdico.ads, a-stmaco.ads,
9754         a-except-2005.ads, s-except.ads, a-taside.ads, a-dynpri.ads,
9755         a-chahan.ads, a-sytaco.ads, s-stalib.ads, a-strmap.ads: Change pragmas
9756         Preelaborate_05 to just Preelaborate in runtime units, and similarly
9757         change Pure_05 to just Pure.
9759 2014-06-11  Ed Schonberg  <schonberg@adacore.com>
9761         * sem_ch6.adb (Analyze_Subprogram_Body_Contract): Do not attempt
9762         analysis if error has been posted on subprogram body.
9764 2014-06-11  Ed Schonberg  <schonberg@adacore.com>
9766         * sem_ch13.adb (Analyze_Stream_TSS_Definition): Apply legality
9767         rule given in RM 13.1 (8/1) for operational attributes to stream
9768         attributes: the attribute must apply to a first subtype. Fixes
9769         missing errors in ACATS test bdd2004.
9771 2014-06-11  Robert Dewar  <dewar@adacore.com>
9773         * exp_ch3.adb (Build_Record_Init_Proc): Don't build for variant
9774         record type if restriction No_Implicit_Conditionals is active.
9775         (Expand_N_Object_Declaration): Don't allow default initialization
9776         for variant record type if restriction No_Implicit_Condition is active.
9777         (Build_Variant_Record_Equality): Don't build for variant
9778         record type if restriction No_Implicit_Conditionals is active.
9779         * exp_ch4.adb (Expand_N_Op_Eq): Error if variant records with
9780         No_Implicit_Conditionals.
9781         * sem_aux.ads, sem_aux.adb (Has_Variant_Part): New function.
9783 2014-06-11  Ramon Fernandez  <fernandez@adacore.com>
9785         * i-cstrin.ads: Update comments.
9787 2014-06-11  Ed Schonberg  <schonberg@adacore.com>
9789         * sem_res.adb (Resolve_Selected_Component): Handle properly a
9790         selected component whose prefix is overloaded, when none of the
9791         interpretations matches the expected type.
9793 2014-06-11  Bob Duff  <duff@adacore.com>
9795         * make.adb (Wait_For_Available_Slot): Give a more
9796         informative error message; if the ALI file is not found, print
9797         the full path of what it's looking for.
9799 2014-06-11  Sergey Rybin  <rybin@adacore.com frybin>
9801         * gnat_ugn.texi, vms_data.ads: add description of gnatstub -W<par>
9802         option to specify the result file encoding.
9804 2014-06-11  Robert Dewar  <dewar@adacore.com>
9806         * errout.ads, sem_ch12.adb: Minor reformatting.
9807         * debug.adb, erroutc.adb: Remove -gnatd.q debug switch.
9808         * lib-xref.adb: Minor reformatting.
9809         * restrict.adb: Minor code reorganization (put routines in
9810         alpha order).
9812 2014-06-11  Yannick Moy  <moy@adacore.com>
9814         * einfo.ads: Minor typo in comment
9816 2014-06-11  Ed Schonberg  <schonberg@adacore.com>
9818         * sinfo.ads, sinfo.adb: New attribute Uninitialized_Variable, for
9819         formal private types and private type extensions, to indicate
9820         variable in a generic unit whose uninitialized use suggest that
9821         actual type should be fully initialized.
9822         Needs_Initialized_Actual:  removed, functionaity replaced by
9823         the above.
9824         * lib-xref.adb (Generate_Reference): Generate a reference for
9825         variables of a formal type when the unit is not the main unit,
9826         to enable appropriate warnings in an instance.
9827         * sem_ch12.adb (Check_Ininialized_Type): Improve warning on use
9828         of variable in a generic unit that suggests that actual type
9829         should be full initialized.
9830         * sem_warn.adb; (May_Need_Initialized_Actual): Make into procedure
9831         and do not emot warning, which now only appears in an instance.
9833 2014-06-11  Eric Botcazou  <ebotcazou@adacore.com>
9835         * gnat_ugn.texi: Fix minor typo.
9837 2014-06-11  Hristian Kirtchev  <kirtchev@adacore.com>
9839         * sem_ch3.adb Add with and use clause for Sem_Ch10.
9840         (Analyze_Declarations): Code reformatting. Analyze the contract
9841         of a subprogram body stub at the end of the declarative region.
9842         * sem_ch6.adb (Analyze_Subprogram_Body_Contract): Spec_Id is
9843         now a variable. Do not process the body if its contract is not
9844         available. Account for subprogram body stubs when extracting
9845         the corresponding spec.
9846         * sem_ch6.ads (Analyze_Subprogram_Contract): Update the comment
9847         on usage.
9848         * sem_ch10.ads, sem_ch10.adb (Analyze_Subprogram_Body_Stub_Contract):
9849         New routine.
9850         * sem_prag.adb (Analyze_Depends_In_Decl_Part):
9851         Account for subprogram body stubs when extracting the
9852         corresponding spec.
9853         (Analyze_Global_In_Decl_List):
9854         Account for subprogram body stubs when extracting the
9855         corresponding spec.
9856         (Analyze_Refined_Depends_In_Decl_Part):
9857         Use Find_Related_Subprogram_Or_Body to retrieve the declaration
9858         of the related body. Spec_Is now a variable. Account for
9859         subprogram body stubs when extracting the corresponding spec.
9860         (Analyze_Refined_Global_In_Decl_Part): Use
9861         Find_Related_Subprogram_Or_Body to retrieve the declaration
9862         of the related body. Spec_Is now a variable. Account for
9863         subprogram body stubs when extracting the corresponding spec.
9864         (Collect_Subprogram_Inputs_Output): Account for subprogram body
9865         stubs when extracting the corresponding spec.
9867 2014-06-11  Vincent Celier  <celier@adacore.com>
9869         * gnatcmd.adb (Process_Link): Do not invoke gnatlink with
9870         -lgnarl or -lgnat.
9872 2014-06-11  Robert Dewar  <dewar@adacore.com>
9874         * debug.adb: Add debug flag -gnatd.q.
9875         * erroutc.adb (Prescan_Message): Bomb if untagged warning with
9876         -gnatd.q set.
9877         * styleg.adb (Check_Xtra_Parens): Message should be a style
9878         message.
9879         * sem_aggr.adb, sem_ch3.adb, exp_ch9.adb, checks.adb, sem_prag.adb,
9880         par-endh.adb, eval_fat.adb, freeze.adb, sem_util.adb, sem_attr.adb,
9881         sem_elab.adb, sem_ch6.adb, sem_warn.adb, sem_cat.adb,
9882         sem_ch13.adb, lib-xref.adb: Add remaining warning tags.
9884 2014-06-11  Ben Brosgol  <brosgol@adacore.com>
9886         * gnat_rm.texi: Revised chapter on Implementation Defined
9887         Characteristics.
9889 2014-06-11  Geert Bosch  <bosch@adacore.com>
9891         * s-exctab.adb: avoid race conditions in exception registration.
9893 2014-06-11  Robert Dewar  <dewar@adacore.com>
9895         * errout.adb (Warn_Insertion): New function.
9896         (Error_Msg): Use Warn_Insertion and Prescan_Message.
9897         (Error_Msg_Internal): Set Info field of error object.
9898         (Error_Msg_NEL): Use Prescan_Message.
9899         (Set_Msg_Text): Don't store info: at start of message.
9900         (Skip_Msg_Insertion_Warning): New name for Set_Msg_Insertion_Warning.
9901         (Skip_Msg_Insertion_Warning): Now just skips warning insertion.
9902         * errout.ads: Document new ?$? and >$> insertion sequences
9903         Document use of "(style)" and "info: "
9904         * erroutc.adb (dmsg): Print several missing fields
9905         (Get_Warning_Tag): Handle -gnatel case (?$?)  (Output_Msg_Text):
9906         Deal with new tagging of info messages
9907         * erroutc.ads: Is_Info_Msg: New global (Error_Msg_Object):
9908         Add field Info (Prescan_Message): New procedure, this procedure
9909         replaces the old Test_Style_Warning_Serious_Unconditional_Msg
9910         * errutil.adb, exp_util.adb, par-ch7.adb, sem_ch13.adb, sem_ch7.adb,
9911         sem_elab.adb: Follow new rules for info message (info belongs
9912         only at the start of a message, and only in the first message,
9913         not in any of the continuations).
9914         * gnat_ugn.texi: Document full set of warning tags.
9916 2014-06-11  Gary Dismukes  <dismukes@adacore.com>
9918         * sem_util.adb: Minor typo fix.
9920 2014-06-11  Ed Schonberg  <schonberg@adacore.com>
9922         * sem_warn.adb (Check_References): Do not emit spurious warnings
9923         on uninitialzed variable of a formal private type if variable
9924         is not read.
9926 2014-06-09  Jan Hubicka  <hubicka@ucw.cz>
9928         * gcc-interface/utils.c (process_attributes) <ATTR_LINK_SECTION>: Use
9929         set_decl_section_name accessor.
9931 2014-05-22  Thomas Schwinge  <thomas@codesourcery.com>
9933         * gcc-interface/utils.c (DEF_FUNCTION_TYPE_0, DEF_FUNCTION_TYPE_6)
9934         (DEF_FUNCTION_TYPE_7, DEF_FUNCTION_TYPE_8)
9935         (DEF_FUNCTION_TYPE_VAR_5): Cosmetic fixes.
9937 2014-05-21  Robert Dewar  <dewar@adacore.com>
9939         * layout.adb: Minor reformatting.
9940         * sem_prag.adb (Analyze_Pragma, case Inspection_Point): Call
9941         dummy procedure ip.
9943 2014-05-21  Robert Dewar  <dewar@adacore.com>
9945         * restrict.ads (Implementation_Restriction): Add entry for
9946         No_Fixed_IO.
9947         * rtsfind.ads: Add entries for Fixed_IO and Decimal_IO in
9948         Ada.[Wide_[Wide_]Text_IO.
9949         * s-rident.ads (Restriction_Id): Add entry for No_Fixed_IO.
9950         * sem_attr.adb (Analyze_Attribute): Disallow fixed point types
9951         for Img, Image, Value, Wide_Image, Wide_Value, Wide_Wide_Image,
9952         Wide_Wide_Value if restriction No_Fixed_IO is set.
9953         * sem_util.adb (Set_Entity_Checks): Check restriction No_Fixed_IO.
9955 2014-05-21  Robert Dewar  <dewar@adacore.com>
9957         * gnatcmd.adb: Minor error msg changes (no upper case letter
9958         at start).
9959         * sem_ch12.adb, sem_ch5.adb, sem_res.adb, sem_util.adb: Minor
9960         reformatting.
9962 2014-05-21  Robert Dewar  <dewar@adacore.com>
9964         * debug.adb: Debug flag -gnatd.G inhibits static elab tracing
9965         via generic formals.
9966         * sem_elab.adb (Is_Call_Of_Generic_Formal): Return False if
9967         -gnatd.G is set.
9969 2014-05-21  Thomas Quinot  <quinot@adacore.com>
9971         * exp_pakd.adb (Revert_Storage_Order): Renamed from Byte_Swap to
9972         more accurately describe that this subprogram needs to come into
9973         play also in cases where no byte swapping is involved, because
9974         it also takes care of some required shifts (left-justification
9975         of values).
9977 2014-05-21  Thomas Quinot  <quinot@adacore.com>
9979         * freeze.adb (Check_Component_Storage_Order): Indicate whether
9980         a Scalar_Storage_Order attribute definition is present for the
9981         component's type.
9982         (Freeze_Record_Type): Suppress junk warnings
9983         about purportedly junk Bit_Order / Scalar_Storage_Order attribute
9984         definitions.
9986 2014-05-21  Robert Dewar  <dewar@adacore.com>
9988         * sem_ch8.adb (Analyze_Subprogram_Renaming): Put back call
9989         to Kill_Elaboration_Checks.
9991 2014-05-21  Gary Dismukes  <dismukes@adacore.com>
9993         * layout.adb (Assoc_Add): Suppress the optimization of the (E
9994         - C1) + C2 case, when the expression type is unsigned and C1 <
9995         C2, to avoid creating a negative literal when folding.
9997 2014-05-21  Hristian Kirtchev  <kirtchev@adacore.com>
9999         * freeze.adb (Freeze_Record_Type): Update the use of
10000         Is_SPARK_Volatile.
10001         * sem_ch3.adb (Analyze_Object_Contract): Update the use of
10002         Is_SPARK_Volatile.
10003         (Process_Discriminants): Update the use of Is_SPARK_Volatile.
10004         * sem_ch5.adb (Analyze_Iterator_Specification): Update the use
10005         of Is_SPARK_Volatile.
10006         (Analyze_Loop_Parameter_Specification):
10007         Update the use of Is_SPARK_Volatile.
10008         * sem_ch6.adb (Process_Formals): Catch an illegal use of an IN
10009         formal parameter when its type is volatile.
10010         * sem_prag.adb (Analyze_Global_Item): Update the use of
10011         Is_SPARK_Volatile.
10012         * sem_res.adb (Resolve_Entity_Name): Correct the guard which
10013         determines whether an entity is a volatile source SPARK object.
10014         * sem_util.adb (Has_Enabled_Property): Accout for external
10015         properties being set on objects other than abstract states
10016         and variables. An example would be a formal parameter.
10017         (Is_SPARK_Volatile): New routine.
10018         (Is_SPARK_Volatile_Object):
10019         Remove the entity-specific tests. Call routine Is_SPARK_Volatile
10020         when checking entities and/or types.
10021         * sem_util.ads (Is_SPARK_Volatile): New routine.
10023 2014-05-21  Robert Dewar  <dewar@adacore.com>
10025         * sem_warn.adb: Minor fix to warning messages (use ?? instead
10026         of ?).
10028 2014-05-21  Vincent Celier  <celier@adacore.com>
10030         * gnatcmd.adb (GNATCmd): For platforms other than VMS, recognize
10031         switch --version and --help.
10033 2014-05-21  Robert Dewar  <dewar@adacore.com>
10035         * sem_elab.adb (Is_Call_Of_Generic_Formal): New function.
10037 2014-05-21  Ed Schonberg  <schonberg@adacore.com>
10039         * sem_ch5.adb (Analyze_Iterator_Specification): Set type of
10040         iterator variable when the domain of iteration is a formal
10041         container and this is an element iterator.
10043 2014-05-21  Bob Duff  <duff@adacore.com>
10045         * sem_ch12.adb: Minor reformatting.
10047 2014-05-21  Robert Dewar  <dewar@adacore.com>
10049         * sinfo.ads, sem_ch12.adb, sem_warn.adb: Minor reformatting.
10051 2014-05-21  Robert Dewar  <dewar@adacore.com>
10053         * sem_elab.adb: Minor reformatting.
10054         * s-taprop.ads: Minor comment fix.
10055         * sem_ch8.adb (Analyze_Subprogram_Renaming): Remove call to
10056         Kill_Elaboration_Checks.
10057         * errout.adb, erroutc.adb: Minor reformatting.
10059 2014-05-21  Thomas Quinot  <quinot@adacore.com>
10061         * exp_pakd.adb (Byte_Swap): Handle the case of a sub-byte
10062         component. No byte swapping occurs, but this procedure also takes
10063         care of appropriately justifying the argument.
10065 2014-05-21  Hristian Kirtchev  <kirtchev@adacore.com>
10067         * sem_ch6.adb: sem_ch6.adb (Analyze_Aspects_On_Body_Or_Stub):
10068         New routine.
10069         (Analyze_Subprogram_Body_Helper): Move the
10070         analysis of aspect specifications and the processing of the
10071         subprogram body contract after inlining has taken place.
10072         (Diagnose_Misplaced_Aspect_Specifications): Removed.
10074 2014-05-21  Javier Miranda  <miranda@adacore.com>
10076         * sem_ch3.adb (Build_Derived_Record_Type): Revert previous change.
10078 2014-05-21  Robert Dewar  <dewar@adacore.com>
10080         * sem_eval.ads, sem_eval.adb (Why_Not_Static): Messages are not
10081         continuations any more.
10083 2014-05-21  Ed Schonberg  <schonberg@adacore.com>
10085         * sinfo.ads, sinfo.adb: New flag Needs_Initialized_Actual,
10086         present in formal_Private_Definitions and on private extension
10087         declarations of a formal derived type. Set when the use of the
10088         formal type in a generic suggests that the actual should be a
10089         fully initialized type.
10090         * sem_warn.adb (May_Need_Initialized_Actual): new subprogram
10091         to indicate that an entity of a generic type has default
10092         initialization, and that the corresponing actual type in any
10093         subsequent instantiation should be fully initialized.
10094         * sem_ch12.adb (Check_Initialized_Type): new subprogram,
10095         to emit a warning if the actual for a generic type on which
10096         Needs_Initialized_Actual is set is not a fully initialized type.
10098 2014-05-21  Robert Dewar  <dewar@adacore.com>
10100         * sem_elab.adb, prj-dect.adb: Minor reformatting.
10102 2014-05-21  Robert Dewar  <dewar@adacore.com>
10104         * erroutc.ads: Minor comment addition.
10106 2014-05-21  Robert Dewar  <dewar@adacore.com>
10108         * errout.ads: Add documentation for use of >*> tag.
10109         * restrict.adb: Make sure we use >*> tag for restriction warnings.
10111 2014-05-21  Gary Dismukes  <dismukes@adacore.com>
10113         * debug.adb: Add case of illegal overriding_indicator for a
10114         protected subprogram body to description of -gnatd.E switch.
10115         * sem_ch6.adb (Verify_Overriding_Indicator): Issue error message
10116         for cases of giving overriding_indicators on protected subprogram
10117         bodies, but change this to a warning if -gnatd.E is enabled. No
10118         longer give a style warning about missing indicators on protected
10119         subprogram bodies.
10121 2014-05-21  Robert Dewar  <dewar@adacore.com>
10123         * prj.ads, sem_ch12.adb, prj.adb, exp_pakd.adb,
10124         sem_elab.ads: Minor reformatting.
10125         * erroutc.adb, erroutc.ads (Warning_Specifically_Suppressed): Make Tag
10126         parameter optional.
10128 2014-05-21  Pascal Obry  <obry@adacore.com>
10130         * prj-dect.adb: Allow package Install in aggregate project.
10132 2014-05-21  Robert Dewar  <dewar@adacore.com>
10134         * sem_ch13.adb (Analyze_Aspect_Specifications):
10135         Insert_Delayed_Pragma is now used for the case of Attach_Handler.
10136         * sem_prag.adb: Minor comment improvements.
10138 2014-05-21  Ed Schonberg  <schonberg@adacore.com>
10140         * sem_ch12.adb (Install_Body): When checking whether freezing of
10141         instantiation must be delayed, verify that the common enclosing
10142         subprogram to generic and instance is in fact an overloadable
10143         entity.
10145 2014-05-21  Vincent Celier  <celier@adacore.com>
10147         * makeutl.adb (Mains.Complete_Mains.Do_Complete): Look for all
10148         mains with the same name and fail if there is more than one.
10149         * prj.ads, prj.adb (Find_All_Sources): New function
10151 2014-05-21  Robert Dewar  <dewar@adacore.com>
10153         * sem_ch13.adb: Minor reformatting.
10154         * lib-xref-spark_specific.adb, sem_util.adb: Minor reformatting.
10155         * sem_prag.adb: Minor error message improvement.
10157 2014-05-21  Yannick Moy  <moy@adacore.com>
10159         * lib-xref-spark_specific.adb, lib-xref.ads, lib-xref.adb
10160         (Enclosing_Subprogram_Or_Package): Only return a library-level
10161         package.
10163 2014-05-21  Javier Miranda  <miranda@adacore.com>
10165         * sem_ch3.adb (Build_Derived_Record_Type): Initialize Parent_Base
10166         to the full view of the parent type when processing a derived type
10167         which is the full view of a private type not defined in a generic
10168         unit which is derived from a private type with discriminants
10169         whose full view is a non-tagged record type.
10171 2014-05-21  Javier Miranda  <miranda@adacore.com>
10173         * exp_ch4.adb (Expand_Allocator_Expression.Apply_Accessibility_Check):
10174         Complete previous patch.
10176 2014-05-21  Thomas Quinot  <quinot@adacore.com>
10178         PR ada/9535
10179         * g-socket.adb (Read and Write for Datagram_Socket_Stream_Type):
10180         Provide a behaviour more consistent with underlying datagram
10181         socket: do not attempt to loop over Send_Socket/Receive_Socket
10182         iterating along the buffer.
10184 2014-05-21  Hristian Kirtchev  <kirtchev@adacore.com>
10186         * freeze.adb (Freeze_Record_Type): Ensure that a discriminated
10187         or a tagged type is not labelled as volatile. Ensure that a
10188         non-volatile type has no volatile components.
10189         * sem_ch3.adb (Analyze_Object_Contract): Add local constant
10190         Obj_Typ. Code reformatting.  Ensure that a discriminated or
10191         tagged object is not labelled as volatile.
10192         * sem_prag.adb (Process_Atomic_Shared_Volatile): Ensure that
10193         pragma Volatile applies to a full type declaration or an object
10194         declaration when SPARK mode is on.
10196 2014-05-21  Sergey Rybin  <rybin@adacore.com frybin>
10198         * gnat_ugn.texi: For ASIS tools, reword the paragraph about
10199         providing options needed for compiling the argument source for
10200         the situation when a project file can be used as a tool parameter.
10202 2014-05-21  Gary Dismukes  <dismukes@adacore.com>
10204         * gnat_rm.texi: Minor typo fix.
10206 2014-05-21  Robert Dewar  <dewar@adacore.com>
10208         * stand.adb (Tree_Read): Read missing entities.
10209         (Tree_Write): Write missing entities.
10211 2014-05-21  Ben Brosgol  <brosgol@adacore.com>
10213         * gnat_ugn.texi: Wordsmithing edits to Coupling Metrics Control
10214         section in gnatmetric chapter.
10216 2014-05-21  Robert Dewar  <dewar@adacore.com>
10218         * exp_ch6.adb (Expand_Actuals): Spec moved here, since not used
10219         outside Exp_Ch6 (Expand_Actuals): Deal with proper insertion of
10220         post-call copy write back (see detailed comment in code).
10221         * exp_ch6.ads (Expand_Actuals): Moved to body, not used outside
10222         Exp_Ch6.
10223         * tbuild.ads: Minor reformatting.
10225 2014-05-21  Robert Dewar  <dewar@adacore.com>
10227         * stand.ads: Add warning about adding new entities and
10228         Tree_Read/Tree_Write.
10230 2014-05-21  Robert Dewar  <dewar@adacore.com>
10232         * sem_util.adb (Set_Entity_With_Checks): Don't complain about
10233         references to restricted entities within the units in which they
10234         are declared.
10236 2014-05-21  Robert Dewar  <dewar@adacore.com>
10238         * gnat1drv.adb (Check_Bad_Body): Use Source_File_Is_Body to
10239         simplify the needed test, and also deal with failure to catch
10240         situations with non-standard names.
10241         * sinput-l.ads, sinput-l.adb (Source_File_Is_No_Body): New function
10242         (Source_File_Is_Subunit): Removed, no longer used.
10244 2014-05-21  Javier Miranda  <miranda@adacore.com>
10246         * exp_ch4.adb
10247         (Expand_Allocator_Expression.Apply_Accessibility_Check): for a
10248         renaming of an access to interface object there is no need to
10249         generate extra code to reference the tag.
10251 2014-05-21  Robert Dewar  <dewar@adacore.com>
10253         * errout.adb, erroutc.adb, erroutc.ads: Allow warning tag in pragma
10254         Warnings (Off, string).
10256 2014-05-21  Robert Dewar  <dewar@adacore.com>
10258         * osint.adb: Fix three error messages to say invalid instead
10259         of erroneous.
10260         * par-ch4.adb, exp_aggr.adb, sem_attr.adb, sem_aux.adb, sem_ch3.adb,
10261         sem_ch5.adb, sem_ch6.adb, sem_ch7.adb, sem_dim.adb, sem_res.adb,
10262         sem_util.adb, sem_util.ads: Fix incorrect use of erroneous in comments.
10264 2014-05-21  Ed Schonberg  <schonberg@adacore.com>
10266         * freeze.adb, sem_ch13.adb, sem_ch13.ads, sem_ch9.adb,
10267         sem_ch9.ads: Move discriminant manipulation routines for analysis of
10268         aspect specifications from sem_ch9 to sem_ch13, where they belong.
10270 2014-05-21  Robert Dewar  <dewar@adacore.com>
10272         * gnat_ugn.texi: Clearly document -gnatw.g (GNAT warnings).
10273         Clearly document -gnatyg (GNAT style switches).
10274         * usage.adb: Add line line for -gnatw.g (GNAT warnings) More
10275         detail for line for -gnatyg (GNAT style switches) -gnatw.d/D is
10276         available for VMS after all.
10277         * warnsw.adb: Reorganize to eliminate duplicated code
10278         (Restore_Warnings): Add a couple of missing entries
10279         (Save_Warnings): Add a couple of missing entries.
10280         * warnsw.ads: Add missing entries to Warning_Record (not clear
10281         what the impact is).
10283 2014-05-21  Robert Dewar  <dewar@adacore.com>
10285         * errout.adb (Set_Msg_Insertion_Warning): Handle ?*? (restriction
10286         warning) case.
10287         * errout.ads: Document ?*? (restriction warning) insertion.
10288         * erroutc.adb (Get_Warning_Tag): Deal with ?*? (restriction
10289         warning) case.
10290         * erroutc.ads: Document use of * for restriction warning tag.
10291         * restrict.adb (Restriction_Msg): Tag with ?*? instead of ??.
10293 2014-05-21  Ed Schonberg  <schonberg@adacore.com>
10295         * sem_ch9.adb (Push_Scope_And_Install_Discriminants): Do not
10296         make discriminants immediately visible when analyzing an aspect
10297         of a subtype declaration.
10298         (Uninstall_Discriminants): Do not apply to the entity in a
10299         subtype declaration.
10301 2014-05-21  Ed Schonberg  <schonberg@adacore.com>
10303         * sem_util.adb: Code clean up.
10305 2014-05-21  Eric Botcazou  <ebotcazou@adacore.com>
10307         * gnat_ugn.texi: Document -Werror.
10309 2014-05-21  Bob Duff  <duff@adacore.com>
10311         * sem_util.adb (Is_Dependent_Component_Of_Mutable_Object):
10312         This was returning False if the Object is a constant view. Fix
10313         it to return True in that case, because it might be a view of
10314         a variable.
10315         (Has_Discriminant_Dependent_Constraint): Fix latent
10316         bug; this function was crashing when passed a discriminant.
10318 2014-05-21  Robert Dewar  <dewar@adacore.com>
10320         * gnat_ugn.texi: Remove misplaced section that is now obsolete.
10321         * s-arit64.adb: Minor code reorganization.
10322         * sem_prag.adb: Minor comment fix (remove erroneous use of the
10323         term erroneous).
10325 2014-05-21  Robert Dewar  <dewar@adacore.com>
10327         * g-table.adb, g-dyntab.adb (Reallocate): Fix possible overflow in
10328         computing new table size.
10330 2014-05-21  Robert Dewar  <dewar@adacore.com>
10332         * einfo.ads: Minor reformatting.
10333         * ceinfo.adb: Deal with slight format change of einfo.ads.
10335 2014-05-21  Ed Schonberg  <schonberg@adacore.com>
10337         * sem_prag.adb (Analyze_Part_Of): Further work on the proper
10338         implementation of the SPARK 2014 rule concerning private child
10339         units (LRM 7.2.6).
10341 2014-05-21  Vincent Celier  <celier@adacore.com>
10343         * makeusg.adb: Add switch -d to usage.
10345 2014-05-21  Ed Schonberg  <schonberg@adacore.com>
10347         * sem_util.adb (Find_Actual): If an actual that is the prefix
10348         of an enclosing prefixed call has been rewritten, use Nkind
10349         and Sloc to identify the corresponding formal, when handling
10350         deferred references.
10352 2014-05-21  Robert Dewar  <dewar@adacore.com>
10354         * debug.adb: Document -gnatd.z switch.
10355         * sem_eval.adb (Why_Non_Static): Test -gnatd.z switch.
10357 2014-05-21  Robert Dewar  <dewar@adacore.com>
10359         * einfo.ads (Can_Never_Be_Null): Minor comment update.
10360         * sem_prag.adb (Check_Arg_Is_Task_Dispatching_Policy): Minor
10361         error message change.
10362         * s-arit64.adb ("abs"): New function. Use expression functions
10363         for the simple conversions and arithmetic.
10365 2014-05-18  Eric Botcazou  <ebotcazou@adacore.com>
10367         * gcc-interface/trans.c (Subprogram_Body_to_gnu): Rework comment and
10368         set function_start_locus.
10370 2014-05-18  Eric Botcazou  <ebotcazou@adacore.com>
10372         * utils.c (gnat_write_global_declarations): Adjust the flags put on
10373         dummy_global.
10375 2014-05-18  Eric Botcazou  <ebotcazou@adacore.com>
10377         * gcc-interface/decl.c (change_qualified_type): New static function.
10378         (gnat_to_gnu_entity): Use it throughout to add qualifiers on types.
10379         <E_Array_Type>: Set TYPE_VOLATILE on the array type directly.
10380         <E_Array_Subtype>: Likewise.
10381         Do not set flags on an UNCONSTRAINED_ARRAY_TYPE directly.
10382         (gnat_to_gnu_component_type): Likewise.
10383         (gnat_to_gnu_param): Likewise.
10385 2014-05-18  Eric Botcazou  <ebotcazou@adacore.com>
10387         * fe.h (Set_Present_Expr): Move around.
10388         (End_Location): New macro.
10389         * gcc-interface/trans.c (Case_Statement_to_gnu): Use End_Location.
10391 2014-05-18  Eric Botcazou  <ebotcazou@adacore.com>
10393         * gcc-interface/decl.c (gnat_to_gnu_entity): Use Underlying_Type in
10394         lieu of more verbose construct.
10395         * gcc-interface/trans.c (Call_to_gnu): Likewise.
10396         (gnat_to_gnu): Likewise.  Remove obsolete code.
10398 2014-05-18  Eric Botcazou  <ebotcazou@adacore.com>
10400         * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Array_Subtype>: Do not
10401         consider that regular packed arrays can never be superflat.
10403 2014-05-17  Trevor Saunders  <tsaunders@mozilla.com>
10405         * gcc-interface/ada-tree.h: Remove usage of variable_size gty
10406         annotation.
10407         * gcc-interface/decl.c (annotate_value): Adjust.
10408         * gcc-interface/trans.c (Attribute_to_gnu): Likewise.
10409         (push_range_check_info): Likewise.
10410         (Loop_Statement_to_gnu): Likewise.
10411         (Subprogram_Body_to_gnu): Likewise.
10412         (Compilation_Unit_to_gnu): Likewise.
10413         (start_stmt_group): Likewise.
10414         * gcc-interface/utils.c (init_gnat_utils): Likewise.
10415         (gnat_pushlevel): Likewise.
10416         (maybe_pad_type): Likewise.
10418 2014-05-14  Eric Botcazou  <ebotcazou@adacore.com>
10420         * seh_init.c: Fix copyright year.
10422 2014-05-14  Bernd Edlinger  <bernd.edlinger@hotmail.de>
10424         * seh_init.c (__gnat_map_SEH): Compile also when __CYGWIN__ and __SEH__
10425         are defined.  Move include windows.h before system.h.
10426         * s-oscons-tmplt.c (DTR_CONTROL_ENABLE, RTS_CONTROL_ENABLE): Compile
10427         also when __CYGWIN__ is defined.  Include windef.h before winbase.h.
10429 2014-05-14  Richard Sandiford  <r.sandiford@uk.ibm.com>
10431         * gcc-interface/decl.c (gnat_to_gnu_entity): Convert integer_one_node
10432         to the appropriate type.
10433         * gcc-interface/trans.c (gnat_to_gnu): Likewise.
10434         (pos_to_constructor): Likewise.
10436 2014-05-13  Eric Botcazou  <ebotcazou@adacore.com>
10438         * gcc-interface/decl.c (annotate_value): Fix thinko in latest change.
10440 2014-05-06  Kenneth Zadeck  <zadeck@naturalbridge.com>
10441             Mike Stump  <mikestump@comcast.net>
10442             Richard Sandiford  <rdsandiford@googlemail.com>
10444         * gcc-interface/cuintp.c (UI_From_gnu): Use wide-int interfaces.
10445         * gcc-interface/decl.c (gnat_to_gnu_entity): Use TYPE_SIGN.
10446         (annotate_value): Use wide-int interfaces.
10447         * gcc-interface/utils.c (get_nonnull_operand): Use tree_fits_uhwi_p.
10449 2014-04-28  Richard Henderson  <rth@redhat.com>
10451         * gcc-interface/Makefile.in: Support aarch64-linux.
10453 2014-04-28  Eric Botcazou  <ebotcazou@adacore.com>
10455         * exp_dbug.ads (Get_External_Name): Add 'False' default to Has_Suffix,
10456         add 'Suffix' parameter and adjust comment.
10457         (Get_External_Name_With_Suffix): Delete.
10458         * exp_dbug.adb (Get_External_Name_With_Suffix): Merge into...
10459         (Get_External_Name): ...here.  Add 'False' default to Has_Suffix, add
10460         'Suffix' parameter.
10461         (Get_Encoded_Name): Remove 2nd argument in call to Get_External_Name.
10462         Call Get_External_Name instead of Get_External_Name_With_Suffix.
10463         (Get_Secondary_DT_External_Name): Likewise.
10464         * exp_cg.adb (Write_Call_Info): Likewise.
10465         * exp_disp.adb (Export_DT): Likewise.
10466         (Import_DT): Likewise.
10467         * comperr.ads (Compiler_Abort): Remove Code parameter and add From_GCC
10468         parameter with False default.
10469         * comperr.adb (Compiler_Abort): Likewise.  Adjust accordingly.
10470         * types.h (Fat_Pointer): Rename into...
10471         (String_Pointer): ...this.  Add comment on interfacing rules.
10472         * fe.h (Compiler_Abort): Adjust for above renaming.
10473         (Error_Msg_N): Likewise.
10474         (Error_Msg_NE): Likewise.
10475         (Get_External_Name): Likewise.  Add third parameter.
10476         (Get_External_Name_With_Suffix): Delete.
10477         * gcc-interface/decl.c (STDCALL_PREFIX): Define.
10478         (create_concat_name): Adjust call to Get_External_Name, remove call to
10479         Get_External_Name_With_Suffix, use STDCALL_PREFIX, adjust for renaming.
10480         * gcc-interface/trans.c (post_error): Likewise.
10481         (post_error_ne): Likewise.
10482         * gcc-interface/misc.c (internal_error_function): Likewise.
10484 2014-04-28  Richard Biener  <rguenther@suse.de>
10486         PR middle-end/60092
10487         * gcc-interface/utils.c: Define flag_isoc11.
10489 2014-04-26  Eric Botcazou  <ebotcazou@adacore.com>
10491         * gnatvsn.ads (Library_Version): Bump to 4.10.
10493 2014-04-23  Eric Botcazou  <ebotcazou@adacore.com>
10495         Revert
10496         2014-04-22  Richard Henderson  <rth@redhat.com>
10498         * gcc-interface/Makefile.in: Support aarch64-linux.
10500         2014-04-22  Eric Botcazou  <ebotcazou@adacore.com>
10502         * fe.h (Compiler_Abort): Replace Fat_Pointer with String_Pointer.
10503         (Error_Msg_N): Likewise.
10504         (Error_Msg_NE): Likewise.
10505         (Get_External_Name_With_Suffix): Likewise.
10506         * types.h (Fat_Pointer): Delete.
10507         (String_Pointer): New type.
10508         (DECLARE_STRING_POINTER): New macro.
10509         * gcc-interface/decl.c (create_concat_name): Adjust.
10510         * gcc-interface/trans.c (post_error): Likewise.
10511         (post_error_ne): Likewise.
10512         * gcc-interface/misc.c (internal_error_function): Likewise.
10514 2014-04-22  Richard Henderson  <rth@redhat.com>
10516         * gcc-interface/Makefile.in: Support aarch64-linux.
10518         * init.c [__linux__] (HAVE_GNAT_ALTERNATE_STACK): New define.
10519         (__gnat_alternate_stack): Enable for all linux except ia64.
10521 2014-04-22  Eric Botcazou  <ebotcazou@adacore.com>
10523         * fe.h (Compiler_Abort): Replace Fat_Pointer with String_Pointer.
10524         (Error_Msg_N): Likewise.
10525         (Error_Msg_NE): Likewise.
10526         (Get_External_Name_With_Suffix): Likewise.
10527         * types.h (Fat_Pointer): Delete.
10528         (String_Pointer): New type.
10529         (DECLARE_STRING_POINTER): New macro.
10530         * gcc-interface/decl.c (create_concat_name): Adjust.
10531         * gcc-interface/trans.c (post_error): Likewise.
10532         (post_error_ne): Likewise.
10533         * gcc-interface/misc.c (internal_error_function): Likewise.
10535 2014-04-15  Eric Botcazou  <ebotcazou@adacore.com>
10536             Pierre-Marie de Rodat  <derodat@adacore.com>
10538         * gcc-interface/decl.c (gnat_to_gnu_entity) <object>: Create a mere
10539         scalar constant instead of a reference for renaming of scalar literal.
10540         Do not create a new object for constant renaming except for a function
10541         call.  Make sure a VAR_DECL is created for the renaming pointer.
10542         * gcc-interface/trans.c (constant_decl_with_initializer_p): New.
10543         (fold_constant_decl_in_expr): New function.
10544         (Identifier_to_gnu): Use constant_decl_with_initializer_p.
10545         For a constant renaming, try to fold a constant DECL in the result.
10546         (lvalue_required_p) <N_Object_Renaming_Declaration>: Always return 1.
10547         (Identifier_to_gnu): Reference the renamed object of constant renaming
10548         pointers directly.
10549         * gcc-interface/utils.c (invalidate_global_renaming_pointers): Do not
10550         invalidate constant renaming pointers.
10552 2014-04-15  Eric Botcazou  <ebotcazou@adacore.com>
10554         * gcc-interface/utils.c (type_for_vector_element_p): New predicate.
10555         (build_vector_type_for_size): New function.
10556         (build_vector_type_for_array): Likewise.
10557         (unchecked_convert): Build an intermediate vector type to convert
10558         from a generic array type to a vector type.
10559         (handle_vector_size_attribute): Reimplement.
10560         (handle_vector_type_attribute): Likewise.
10562 2014-04-15  Eric Botcazou  <ebotcazou@adacore.com>
10564         * gcc-interface/decl.c (prepend_one_attribute_pragma): Call
10565         Is_OK_Static_Expression in lieu of Is_Static_Expression to
10566         detect valid arguments.
10568 2014-04-15  Eric Botcazou  <ebotcazou@adacore.com>
10570         * gcc-interface/trans.c (gnat_gimplify_stmt): Propagate loop hints.
10572 2014-04-14  Paolo Carlini  <paolo.carlini@oracle.com>
10574         * gcc-interface/decl.c (gnat_to_gnu_entity): Use TYPE_IDENTIFIER.
10575         (components_to_record): Likewise.
10576         * gcc-interface/utils.c (make_aligning_type): Likewise.
10577         (maybe_pad_type): Likewise.
10578         (finish_record_type): Likewise.
10579         (rest_of_record_type_compilation): Likewise.
10581 2014-04-14  Eric Botcazou  <ebotcazou@adacore.com>
10583         * snames.ads-tmpl (Name_Ivdep): New pragma-related name.
10584         * sem_prag.adb (Analyze_Pragma) <Pragma_Loop_Optimize>: Add support
10585         for Ivdep hint.
10586         * gnat_rm.texi (Implementation Defined Pragmas): Document new Ivdep
10587         hint for Loop_Optimize.
10588         * gnat_ugn.texi (Vectorization of loops): Mention new Ivdep hint.
10589         * gcc-interface/trans.c (Pragma_to_gnu) <Pragma_Loop_Optimize>: Deal
10590         with new Ivdep hint.
10591         * gcc-interface/ada-tree.h (LOOP_STMT_IVDEP): New macro.
10592         * gcc-interface/trans.c (Pragma_to_gnu) <Pragma_Loop_Optimize>: Deal
10593         with new Ivdep hint.
10594         (gnat_gimplify_stmt) <LOOP_STMT>: Propagate loop hints.
10596 2014-04-14  Eric Botcazou  <ebotcazou@adacore.com>
10597             Robert Dewar  <dewar@adacore.com>
10599         * opt.ads (Suppress_Back_Annotation): Remove as unused.
10600         * fe.h (Back_Annotate_Rep_Info): Likewise.
10601         (Global_Discard_Names): Likewise.
10602         (List_Representation_Info): Declare.
10603         * types.h (Uint_Minus_1): Likewise.
10604         * repinfo.ads: Document back-annotation change.
10605         * gcc-interface/gigi.h (init_gnat_decl): Declare.
10606         (destroy_gnat_decl): Likewise.
10607         * gcc-interface/decl.c (annotate_value): Do not create the cache of
10608         annotated values here but...
10609         <CALL_EXPR>: Only inline the call if -gnatR3 is specified or we are
10610         in ASIS mode.
10611         (init_gnat_decl): ...here instead.  New function.
10612         (destroy_gnat_decl): Likewise.
10613         * gcc-interface/trans.c (gigi): Call {init|destroy}_gnat_decl.
10614         * gcc-interface/utils.c (init_gnat_utils): Minor reformatting.
10616 2014-04-14  Eric Botcazou  <ebotcazou@adacore.com>
10618         * gcc-interface/decl.c (create_field_decl_from): Finalize non-constant
10619         offset for the field, if any.
10621 2014-04-09  Eric Botcazou  <ebotcazou@adacore.com>
10622             Svante Signell  <svante.signell@gmail.com>
10624         PR ada/54040
10625         PR ada/59346
10626         * s-osinte-x32.adb: New file.
10627         * s-linux.ads (Time): New section.
10628         * s-linux-alpha.ads (Time): Likewise.
10629         * s-linux-android.ads (Time: Likewise.
10630         * s-linux-hppa.ads (Time): Likewise.
10631         * s-linux-mipsel.ads (Time): Likewise.
10632         * s-linux-sparc.ads (Time): Likewise.
10633         * s-linux-x32.ads (Time): Likewise.
10634         * s-osprim-x32.ads (timespec): Adjust.
10635         (Clock): Likewise.
10636         (To_Timespec): Likewise.
10637         * s-osinte-linux.ads (Time): Define local subtypes for those defined
10638         in System.Linux.
10639         * s-taprop-linux.adb (Monotonic_Clock): Do not define timeval.
10640         * s-osinte-hpux.ads (timespec): Revert POSIX breakage.
10641         * s-osinte-kfreebsd-gnu.ads (timespec): Likewise.
10642         * s-osinte-solaris-posix.ads (timespec): Likewise.
10643         * s-osinte-posix.adb (To_Timespec): Likewise.
10644         * gcc-interface/Makefile.in (x32/Linux): Use s-osinte-x32.adb.
10646 2014-04-08  Eric Botcazou  <ebotcazou@adacore.com>
10648         PR ada/60411
10649         * gcc-interface/Makefile.in (arm% linux-android): Switch to EHABI.
10650         * s-linux-android.ads: New file.
10651         * s-intman-android.adb: Likewise.
10652         * s-osinte-android.ads: Adjust.
10653         * sigtramp-armdroid.c: Likewise.
10654         * sigtramp.h: Add Android support.
10656 2014-04-07  Eric Botcazou  <ebotcazou@adacore.com>
10658         * gcc-interface/Makefile.in (alpha-vms): Add missing line.
10660 2014-03-30  Eric Botcazou  <ebotcazou@adacore.com>
10662         PR ada/60703
10663         * system-linux-alpha.ads: Adjust for Ada 2005.
10664         * system-linux-mips.ads: Likewise.
10665         * system-linux-mips64el.ads: Likewise.
10666         * system-linux-mipsel.ads: Likewise.
10667         * system-linux-s390.ads: Likewise.
10668         * system-linux-s390x.ads: Likewise.
10669         * system-linux-sparc.ads: Likewise.
10670         * system-linux-sparcv9.ads: Likewise.
10671         * system-rtems.ads: Likewise.
10672         * system-vxworks-arm.ads: Likewise.
10674 2014-03-16  Andreas Schwab  <schwab@linux-m68k.org>
10676         PR ada/39172
10677         * gcc-interface/Makefile.in (target_cpu_default): Revert
10678         2013-10-11 change.
10680 2014-03-13  Eric Botcazou  <ebotcazou@adacore.com>
10682         PR ada/51483
10683         * cstand.adb (Register_Float_Type): Add 'precision' parameter and use
10684         it to set the RM size.  Use directly 'size' for the Esize.
10685         (Create_Back_End_Float_Types): Adjust call to above.
10686         * get_targ.ads (Register_Type_Proc): Add 'precision' parameter.
10687         * set_targ.ads (FPT_Mode_Entry): Add 'precision' component.
10688         (Write_Target_Dependent_Values): Adjust comment.
10689         * set_targ.adb (Register_Float_Type): Add 'precision' parameter and
10690         deal with it.
10691         (Write_Target_Dependent_Values): Write the precision in lieu of size.
10692         (Initialization): Read the precision in lieu of size and compute the
10693         size from the precision and the alignment.
10694         * gcc-interface/gigi.h (enumerate_modes): Add integer parameter.
10695         * gcc-interface/misc.c (enumerate_modes): Likewise.  Do not register
10696         types for vector modes, pass the size in addition to the precision.
10698 2014-03-10  Eric Botcazou  <ebotcazou@adacore.com>
10700         * gcc-interface/Make-lang.in (ADA_DEPFILES): Fix typo.
10702 2014-03-07  Doug Rupp  <rupp@adacore.com>
10704         PR ada/60411
10705         * system-linux-armel.ads (Backend_Overflow_Checks): Set to True.
10706         (Support_64_Bit_Divides): Removed, no longer used.
10707         (ZCX_By_Default): Enabled.
10709 2014-02-25  Doug Rupp  <rupp@adacore.com>
10711         * gcc-interface/Makefile.in (arm-linux):
10712         (EH_MECHANISM): Use ARM unwinder (-arm)
10713         (LIBGNAT_TARGET_PAIRS: Override defaults with a-exexpr-gcc.adb and
10714         s-excmac-arm.ads.
10715         (EXTRA_LIBGNAT_OBJS): Add raise-gcc.o
10716         (EXTRA_GNATRTL_NONTASKING_OBJS): Add g-cppexc.o s-excmac.o.
10717         (arm-wrs-vxworks): Add EH_MECHANISM=-gcc for kernel mode.
10718         (EXTRA_LIBGNAT_OBJS): Add sigtramp-armvxw.o
10719         Add dependencies for sigtramp-armvxw.o.
10721 2014-02-25  Eric Botcazou  <ebotcazou@adacore.com>
10723         * gcc-interface/trans.c (Pragma_to_gnu): Deal with Warning_As_Error.
10725 2014-02-25  Robert Dewar  <dewar@adacore.com>
10727         * rtsfind.adb (Is_RTE): Protect against entity with no scope
10728         field (previously this call blew up on the Standard entity).
10729         * sem_attr.adb (Analyze_Attribute, case Access): Remove
10730         test for No_Abort_Statements, this is now handled in
10731         Set_Entity_With_Checks.
10732         * exp_ch6.adb, sem_ch10.adb, sem_ch4.adb, sem_ch8.adb, sem_res.adb:
10733         Change name Set_Entity_With_Style_Check => Set_Entity_With_Checks.
10734         * sem_util.ads, sem_util.adb: Change name Set_Entity_With_Style_Check =>
10735         Set_Entity_With_Checks.
10736         (Set_Entity_With_Checks): Add checks for No_Dynamic_Attachment,
10737         Add checks for No_Abort_Statements.
10739 2014-02-25  Robert Dewar  <dewar@adacore.com>
10741         * exp_ch9.adb (Expand_Entry_Barrier): Add comment that call to
10742         Check_Restriction is OK.
10744 2014-02-25  Ed Schonberg  <schonberg@adacore.com>
10746         * sem_ch3.adb (Process_Full_View): Better error message when
10747         the full view of  a private type without discriminants is an
10748         unconstrained type.
10749         * sem_ch7.adb (Uninstall_Declarations): Ditto.
10751 2014-02-25  Eric Botcazou  <ebotcazou@adacore.com>
10753         * sigtramp-armvxw.c: Also restore r0.
10755 2014-02-25  Robert Dewar  <dewar@adacore.com>
10757         * errout.adb (Error_Msg_Internal): Warning_Msg_Char set
10758         unconditionally (Set_Msg_Insertion_Warning): Warning_Msg_Char
10759         set unconditionally.
10760         * erroutc.adb (Get_Warning_Tag): Does not give a leading space
10761         any more (Output_Msg_Text): Rewritten with new convention on
10762         output of warnings that are treated as errors.
10763         * erroutc.ads (Error_Msg_Object): Warn_Chr is always set even
10764         if Warn is False.
10765         * gnat_rm.texi: Updates to documentation on pragma
10766         Warning_As_Error.
10767         * warnsw.adb (Set_Dot_Warning_Switch): -gnatw.e should not
10768         set Warning_Doc_Switch.
10769         * lib-writ.ads: Add documentation note on ALI file generation
10770         for C.
10771         * exp_ch6.adb (Expand_Call): Remove check for No_Abort_Statements
10772         (belongs in Sem).
10773         * sem_attr.adb (Resolve_Attribute, case Access):
10774         Abort_Task'Access violates the No_Abort_Statements restriction.
10775         * sem_res.adb (Resolve_Call): Check restriction
10776         No_Abort_Statements for call to Abort_Task or a renaming of it.
10778 2014-02-25  Robert Dewar  <dewar@adacore.com>
10780         * sem_ch3.adb (Array_Type_Declaration): Check for case of using
10781         type name as index.
10782         * lib.ads: Minor reformatting.
10783         * einfo.ads: Minor reformatting.
10785 2014-02-25  Doug Rupp  <rupp@adacore.com>
10787         * sem_mech.adb (Set_Mechanisms): For convention Fortran on VMS
10788         use Short_Descriptor(S) as the argument passing mechanism.
10790 2014-02-25  Eric Botcazou  <ebotcazou@adacore.com>
10792         * sigtramp-ppcvxw.c (CFI_COMMON_REGS): Also include r0.
10794 2014-02-25  Robert Dewar  <dewar@adacore.com>
10796         * atree.ads (Warnings_Treated_As_Errors): New variable.
10797         * errout.adb (Error_Msg_Internal): Set Warn_Err flag in
10798         error object (Initialize): Initialize Warnings_As_Errors_Count
10799         (Write_Error_Summary): Include count of warnings treated as errors.
10800         * erroutc.adb (Warning_Treated_As_Error): New function.
10801         (Matches): Function moved to outer level of package.
10802         * erroutc.ads (Error_Msg_Object): Add Warn_Err flag.
10803         (Warning_Treated_As_Error): New function.
10804         * gnat_rm.texi: Document pragma Treat_Warning_As_Error.
10805         * opt.adb: Add handling of Warnings_As_Errors_Count[_Config].
10806         * opt.ads (Config_Switches_Type): Add entry for
10807         Warnings_As_Errors_Count.
10808         (Warnings_As_Errors_Count): New variable.
10809         (Warnings_As_Errors): New array.
10810         * par-prag.adb: Add dummy entry for Warning_As_Error.
10811         * sem_prag.adb (Analyze_Pragma): Implement new pragma
10812         Warning_As_Error.
10813         * snames.ads-tmpl: Add entries for Warning_As_Error pragma.
10815 2014-02-25  Eric Botcazou  <ebotcazou@adacore.com>
10817         * sigtramp.h: Fix minor inaccuracy.
10819 2014-02-25  Ben Brosgol  <brosgol@adacore.com>
10821         * gnat_ugn.texi: Added description of kill command.
10823 2014-02-25  Robert Dewar  <dewar@adacore.com>
10825         * gnat_rm.texi (Address_Clauses): Add a section discussing the
10826         problem of address clauses causing unexpected initialization,
10827         including the effect of Initialize_Scalars.
10829 2014-02-25  Robert Dewar  <dewar@adacore.com>
10831         * errout.adb: Various changes for better msgs for anonmous access
10832         subprogram types.
10833         * erroutc.ads, erroutc.adb (Buffer_Ends_With): Version with character
10834         argument.
10835         (Buffer_Remove): Version with character argument.
10836         * sem_attr.adb (Resolve_Attribute, case Access): Better handling
10837         of mismatching conventions for access-to-subprogram case.
10838         * sem_prag.adb (Set_Convention_From_Pragma): Deal with anonymous
10839         access types in record.
10840         * sem_util.ads, sem_util.adb (Set_Convention): Handle anonymous access
10841         types, including in records.
10843 2014-02-25  Doug Rupp  <rupp@adacore.com>
10845         * sigtramp-ppcvxw.c, sigtramp.h, sigtramp-armvxw.c: Comment
10846         enhancements and corrections.
10848 2014-02-25  Robert Dewar  <dewar@adacore.com>
10850         * gnat_rm.texi: New section "Conventions and Anonymous Access Types"
10852 2014-02-25  Robert Dewar  <dewar@adacore.com>
10854         * gnat_rm.texi: First set of documentation additions for
10855         predefined RM units.
10856         * checks.adb: Minor reformatting.
10857         * sem_elab.adb (Check_Task_Activation): Minor fix to error
10858         message.
10859         * sem_util.adb: Minor reformatting.
10861 2014-02-25  Arnaud Charlet  <charlet@adacore.com>
10863         * usage.adb (Usage): Add help on -gnateC.
10864         * switch-c.adb (Scan_Front_End_Switches): Add handling of -gnateC.
10865         * opt.ads (Generate_CodePeer_Messages): New flag.
10866         * gnat_ugn.texi: Document new switch -gnateC.
10868 2014-02-25  Ben Brosgol  <brosgol@adacore.com>
10870         * gnat_rm.texi: Corrected minor typos in Implementation Defined
10871         Aspects.
10872         * opt.ads: Minor reformatting.
10874 2014-02-25  Robert Dewar  <dewar@adacore.com>
10876         * binde.adb: Change messages to mention -gnatel instead of -gnatwl.
10877         * gnat_ugn.texi: Update documentation of -gnatwl Add documentation
10878         of -gnatel/-gnateL.
10879         * opt.ads (Warn_Info_Messages): New flag.
10880         * sem_elab.adb: Use Elab_Warnings, Elab_Info_Messages to control
10881         messages.
10882         * sem_prag.adb: Use Elab_Warnings, Elab_Info_Messages to control
10883         messages.
10884         * switch-m.ad, switch-c.adb: Recognize new -gnatel/EL switches.
10885         * usage.adb: Add documentation of -gnatel/-gnateL Update
10886         documentation of -gnatwl/-gnatwL.
10887         * warnsw.adb: New handling of Elab_Warnings, Elab_Info_Messages
10888         * warnsw.ads (Elab_Info_Messages): New field in Warning_Record
10890 2014-02-25  Robert Dewar  <dewar@adacore.com>
10892         * einfo.ads, einfo.adb (Has_Shift_Operator): New flag.
10893         * gnat_rm.texi: Document pragma Provide_Shift_Operators.
10894         * interfac.ads: Minor code reorganization (add pragma
10895         Compiler_Unit_Warning).
10896         * par-prag.adb: Add dummy entry for Provide_Shift_Operators.
10897         * sem_ch3.adb (Build_Derived_Numeric_Type): Copy
10898         Has_Shift_Operator flag.
10899         * sem_intr.adb (Check_Intrinsic_Subprogram): Make sure
10900         Check_Shift is always called (Check_Shift): Set Has_Shift_Operator.
10901         * sem_prag.adb: Implement pragma Provide_Shift_Operators.
10902         * snames.ads-tmpl: Add entries for pragma Provide_Shift_Operators
10903         Add entry for Name_Amount.
10904         * checks.adb (Selected_Range_Checks): When checking for a null
10905         range, make sure we use the base type, and not the subtype for
10906         deciding a range is null.
10907         * sem_ch5.adb (Analyze_Loop_Parameter_Specification): Check
10908         for suspicious loop bound which is outside the range of the
10909         loop subtype.
10910         * gnat_ugn.texi: Add documentation section "Determining the
10911         Chosen Elaboration Order"
10912         * sem_ch13.adb (UC_Entry): Add field Act_Unit
10913         (Validate_Unchecked_Conversion): Store Act_Unit
10914         (Validate_Unchecked_Conversions): Test Warnings_Off in Act_Unit
10915         * treepr.adb: Minor reformatting.
10917 2014-02-25  Arnaud Charlet  <charlet@adacore.com>
10919         * usage.adb: Minor: fix typo.
10921 2014-02-25  Robert Dewar  <dewar@adacore.com>
10923         * lib.ads, s-bitops.adb, s-bitops.ads, s-conca5.adb, gnat_rm.texi,
10924         s-conca5.ads, s-conca7.adb, s-conca7.ads, s-crc32.adb, s-crc32.ads,
10925         s-conca9.adb, s-conca9.ads, g-dyntab.adb, s-crtl.ads, g-dyntab.ads,
10926         s-excdeb.adb, s-addope.adb, s-addope.ads, s-carun8.adb, s-carun8.ads,
10927         g-htable.adb, g-htable.ads, g-hesora.adb, g-hesora.ads, s-conca2.adb,
10928         s-conca2.ads, a-comlin.adb, a-chlat1.ads, a-comlin.ads, errout.ads,
10929         a-except.adb, s-conca4.adb, a-except.ads, s-conca4.ads, s-conca6.adb,
10930         s-conca6.ads, g-spchge.adb, g-spchge.ads, g-u3spch.adb, g-u3spch.ads,
10931         a-strhas.ads, restrict.adb, aspects.adb, aspects.ads, s-conca8.adb,
10932         s-conca8.ads, back_end.adb, par-prag.adb, g-byorma.adb, g-byorma.ads,
10933         a-elchha.adb, a-elchha.ads, g-speche.adb, g-speche.ads, s-casuti.adb,
10934         s-assert.adb, s-casuti.ads, s-assert.ads, a-clrefi.adb, a-clrefi.ads,
10935         s-conca3.adb, s-conca3.ads, a-ioexce.ads: Implement pragma
10936         Compiler_Unit_Warning, change Compiler_Unit everywhere to
10937         Compiler_Unit_Warning.
10939 2014-02-25  Sergey Rybin  <rybin@adacore.com frybin>
10941         * sem_prag.adb (Analyze_Depends_In_Decl_Part): Do not normalize
10942         in ASIS mode aggregates that are used as aspect definitions.
10944 2014-02-25  Robert Dewar  <dewar@adacore.com>
10946         * exp_ch7.adb, sem_util.adb, sem_util.ads, exp_ch6.adb: Minor
10947         reformatting.
10949 2014-02-25  Ed Schonberg  <schonberg@adacore.com>
10951         * freeze.adb (Freeze_Entity): If the return type of a function
10952         is a limited view, and the non-limited view has not been seen yet,
10953         defer freezing to some later point.
10955 2014-02-25  Robert Dewar  <dewar@adacore.com>
10957         * sem_ch3.adb: Minor reformatting.
10959 2014-02-25  Robert Dewar  <dewar@adacore.com>
10961         * s-excdeb.ads, s-except.ads, s-exctab.adb, s-exctab.ads, s-finmas.ads,
10962         s-htable.adb, s-htable.ads, s-imenne.adb, s-imenne.ads, s-imgenu.adb,
10963         s-imgenu.ads, s-mastop.adb, s-mastop.ads, s-memory-vms_64.adb,
10964         s-memory-vms_64.ads, s-memory.adb, s-memory.ads, s-os_lib.adb,
10965         s-os_lib.ads, s-parame.adb, s-parame.ads, s-purexc.ads, s-restri.adb,
10966         s-restri.ads, s-rident.ads, s-secsta.adb, s-secsta.ads, s-soflin.adb,
10967         s-soflin.ads, s-sopco3.adb, s-sopco3.ads, s-sopco4.adb, s-sopco4.ads,
10968         s-sopco5.adb, s-sopco5.ads, s-spsufi.ads, s-stache.adb, s-stache.ads,
10969         s-stalib.adb, s-stalib.ads, s-stoele.adb, s-stoele.ads, s-strcom.adb,
10970         s-strcom.ads, s-strhas.adb, s-string.adb, s-string.ads, s-strops.adb,
10971         s-strops.ads, s-ststop.adb, s-ststop.ads, s-traceb.adb, s-traceb.ads,
10972         s-traent.adb, s-traent.ads, s-unstyp.ads, s-utf_32.adb, s-utf_32.ads,
10973         s-wchcnv.adb, s-wchcnv.ads, s-wchcon.adb, s-wchcon.ads, s-wchjis.adb,
10974         s-wchjis.ads, sem_ch11.adb, sem_ch4.adb, sem_ch5.adb, sem_prag.adb,
10975         snames.ads-tmpl: Change Compiler_Unit everywhere to
10976         Compiler_Unit_Warning.
10978 2014-02-25  Hristian Kirtchev  <kirtchev@adacore.com>
10980         * exp_ch6.adb (Add_Or_Save_Precondition): New routine.
10981         (Collect_Body_Postconditions_In_Decls): New routine.
10982         (Collect_Body_Postconditions_Of_Kind): Factor out code. Handle
10983         postcondition aspects or pragmas that appear on a subprogram
10984         body stub.
10985         (Collect_Spec_Preconditions): Factor out code. Handle
10986         precondition aspects or pragmas that appear on a subprogram
10987         body stub.
10988         * sem_ch6.adb (Analyze_Subprogram_Body_Helper): The analysis of
10989         aspects that apply to a subprogram body stub is no longer delayed,
10990         the aspects are analyzed on the spot.
10991         (SPARK_Aspect_Error):
10992         Aspects that apply to a subprogram declaration cannot appear in
10993         a subunit.
10994         * sem_ch10.adb Remove with and use clause for Sem_Ch13.
10995         (Analyze_Proper_Body): Add local variable Comp_Unit. Unum
10996         is now a local variable. Code cleanup. Analysis related to
10997         the aspects of a subprogram body stub is now carried out by
10998         Analyze_Subprogram_Body_Helper. Do not propagate the aspects
10999         and/or pragmas of a subprogram body stub to the proper body
11000         as this is no longer needed. Do not analyze the aspects of a
11001         subprogram stub when the corresponding source unit is missing.
11002         (Analyze_Protected_Body_Stub): Flag the illegal use of aspects
11003         on a stub.
11004         (Analyze_Task_Body_Stub): Flag the illegal use of
11005         aspects on a stub.
11006         (Optional_Subunit): Add local variable Unum.
11007         * sem_ch13.adb (Insert_Delayed_Pragma): Do not analyze a generated
11008         pragma when it applies to a subprogram body stub.
11009         * sem_prag.adb (Analyze_Pragma): Pragmas Contract_Cases,
11010         Depends and Global can now apply to a subprogram body stub as
11011         long as it acts as its own spec.
11012         (Analyze_Refined_Pragma):
11013         Code reformatting. Refinement pragmas cannot apply to a subunit.
11015 2014-02-25  Hristian Kirtchev  <kirtchev@adacore.com>
11017         * einfo.ads Update the usage of flag
11018         Uses_Sec_Stack. Uses_Sec_Stack now applies to E_Loop entities.
11019         * exp_ch5.adb (Expand_Iterator_Loop): The temporary for a cursor
11020         now starts with the letter 'C'. This makes reading expanded
11021         code easier.
11022         * exp_ch7.adb (Establish_Transient_Scope): Add local variable
11023         Iter_Loop. Signal that an Ada 2012 iterator loop requires
11024         secondary stack management when creating a transient scope for
11025         an element reference.
11026         * exp_util.adb (Process_Statements_For_Controlled_Objects):
11027         When wrapping the statements of a loop, pass the E_Loop entity
11028         to the wrapping machinery.
11029         (Wrap_Statements_In_Block): Add
11030         formal parameter Scop along with comment on usage. Add local
11031         variables Block_Id, Block_Nod and Iter_Loop. Mark the generated
11032         block as requiring secondary stack management when the block is
11033         created inside an Ada 2012 iterator loop. This ensures that any
11034         reference objects are reclaimed on each iteration of the loop.
11035         * sem_ch5.adb (Analyze_Loop_Statement): Mark the generated block
11036         tasked with the handling of container iterators as requiring
11037         secondary stack management. This ensures that iterators are
11038         reclaimed when the loop terminates or is exited in any fashion.
11039         * sem_util.adb (Add_Block_Identifier): New routine.
11040         (Find_Enclosing_Iterator_Loop): New routine.
11041         * sem_util.ads (Add_Block_Identifier): New routine.
11042         (Find_Enclosing_Iterator_Loop): New routine.
11044 2014-02-25  Robert Dewar  <dewar@adacore.com>
11046         * sinfo.ads: Minor reformatting.
11048 2014-02-25  Tristan Gingold  <gingold@adacore.com>
11050         * s-expllu.ads, s-expuns.ads, s-expmod.ads: Minor comment fix.
11052 2014-02-25  Pascal Obry  <obry@adacore.com>
11054         * sinput-l.adb, osint.adb, osint.ads: Add Prep_Suffix to factorize code.
11056 2014-02-25  Tristan Gingold  <gingold@adacore.com>
11058         * sem_ch10.adb: Minor comment fix.
11060 2014-02-25  Bob Duff  <duff@adacore.com>
11062         * s-tasdeb.adb: Misc cleanup of this package,
11063         including printing addresses in hexadecimal.
11064         (Write): Fix minor bug when taking 'Address of an empty string.
11066 2014-02-25  Ed Schonberg  <schonberg@adacore.com>
11068         * sem_prag.adb (Analyze_Part_Of): Reject state refinement in a
11069         public child unit when it does not refer to the abstract state
11070         of a public ancestor.
11072 2014-02-25  Yannick Moy  <moy@adacore.com>
11074         * sem_prag.adb (Analyze_Pragma/Pragma_Validity_Checks): Ignore pragma
11075         Validity_Checks in GNATprove and CodePeer modes.
11077 2014-02-25  Pascal Obry  <obry@adacore.com>
11079         * prj-attr.adb, projects.texi, snames.ads-tmpl: Add package Install's
11080         Artifacts attribute.
11082 2014-02-25  Yannick Moy  <moy@adacore.com>
11084         * sem_prag.adb: Minor reformatting to get consistent messages.
11086 2014-02-25  Robert Dewar  <dewar@adacore.com>
11088         * checks.adb: Minor reformatting.
11089         * sinfo.ads (Do_Range_Check): Document that this flag is never
11090         passed to the back end.
11092 2014-02-25  Yannick Moy  <moy@adacore.com>
11094         * sem_ch3.adb, sem_ch5.adb, sem_ch9.adb, sem_prag.adb, sem_attr.adb,
11095         sem_ch6.adb: Remove useless references to SPARK RM in error messages.
11097 2014-02-25  Hristian Kirtchev  <kirtchev@adacore.com>
11099         * sem_res.adb (Appears_In_Check): New routine.
11100         (Resolve_Entity_Name): Remove local variables Prev and
11101         Usage_OK. Par is now a constant. Remove the parent chain traversal
11102         as the placement of a volatile object with enabled property
11103         Async_Writers and/or Effective_Reads must appear immediately
11104         within a legal construct.
11106 2014-02-25  Hristian Kirtchev  <kirtchev@adacore.com>
11108         * checks.adb (Apply_Selected_Range_Checks):
11109         Alphabetize local constants and variables. Add comments.
11110         Always insert a range check that requires runtime evaluation into
11111         the tree.
11113 2014-02-25  Robert Dewar  <dewar@adacore.com>
11115         * sem_attr.adb, sem_ch6.adb, par-ch3.adb: Minor reformatting.
11117 2014-02-25  Bob Duff  <duff@adacore.com>
11119         * s-tassta.adb (Finalize_Global_Tasks): Limit the number of loop
11120         iterations while waiting for independent tasks to terminate;
11121         if an independent task does not terminate, we do not want to
11122         hang here. In that case, the thread will be terminated when the
11123         process exits.
11124         * s-taprop-linux.adb (Abort_Task): Fix Assert to allow for ESRCH.
11126 2014-02-25  Ed Schonberg  <schonberg@adacore.com>
11128         * sem_prag.adb (Check_SPARK_Aspect_For_ASIS): New subprogram,
11129         used to perform pre-analysis of the expression for SPARK
11130         aspects that have a non-standard syntax, such as GLobal and
11131         Initializes. The procedure applies to the original expression
11132         in an aspect specification, prior to the analysis of the
11133         corresponding pragma, in order to provide semantic information
11134         for ASIS navigation purposes.
11135         (Analyze_Global_In_Decl_List, Analyze_Initializes_In_Decl_Part):
11136         Call new subprogram.
11138 2014-02-25  Yannick Moy  <moy@adacore.com>
11140         * sem_prag.adb: Remove obsolete reference to SPARK RM in error message.
11142 2014-02-25  Doug Rupp  <rupp@adacore.com>
11144         * init.c (HAVE_GNAT_ADJUST_CONTEXT_FOR_RAISE): Enable for ARM.
11145         (__gnat_adjust_context_for_raise): Bump the PC by 2.
11147 2014-02-25  Ed Schonberg  <schonberg@adacore.com>
11149         * par-ch3.adb (P_Basic_Declarative_Items): In the case of a
11150         misplaced IS, add a statement sequence to improper body only if
11151         one has not been parsed already.
11153 2014-02-25  Ed Schonberg  <schonberg@adacore.com>
11155         * sem_attr.adb (Analyze_Attribute, case 'Update): Check for
11156         mismatch when multidimensional array is updated with a single
11157         index.
11159 2014-02-25  Yannick Moy  <moy@adacore.com>
11161         * sem_ch3.adb, sem_ch5.adb, sem_prag.adb, sem_attr.adb, errout.ads,
11162         sem_ch6.adb: Mark most references to SPARK RM in error messages
11163         for removal.
11165 2014-02-24  Ed Schonberg  <schonberg@adacore.com>
11167         * par-ch3.adb (P_Basic_Declarative_Items): If an improper body
11168         appears in a list of basic declarations, complete the tree with
11169         an empty statement list, to prevent cascaded errors and crashes
11170         if semantic analysis is attempted.
11172 2014-02-24  Thomas Quinot  <quinot@adacore.com>
11174         * g-sercom-mingw.adb (Open): Fix incorrect test for error return
11175         value.
11176         * erroutc.adb: Minor reformatting.
11178 2014-02-24  Hristian Kirtchev  <kirtchev@adacore.com>
11180         * sem_prag.adb (Check_Clause_Syntax): Account
11181         for a solitary input item in a dependency list.
11183 2014-02-24  Yannick Moy  <moy@adacore.com>
11185         * gnat1drv.adb (Adjust_Global_Switches): Do not
11186         use validity checks at all in GNATprove_Mode.
11188 2014-02-24  Robert Dewar  <dewar@adacore.com>
11190         * g-sercom-mingw.adb, g-sercom-linux.adb, sem_prag.adb, freeze.adb,
11191         atree.adb, atree.ads: Minor reformatting.
11193 2014-02-24  Hristian Kirtchev  <kirtchev@adacore.com>
11195         * sem_ch6.adb (Analyze_Subprogram_Body_Contract): Do not enforce
11196         global and dependence refinement when SPARK_Mode is off.
11197         * sem_ch7.adb (Analyze_Package_Body_Contract): Do not enforce
11198         state refinement when SPARK_Mode is off.
11199         * sem_ch13.adb (Analyze_Aspect_Specifications): Add local
11200         variable Decl. Insert the generated pragma for Refined_State
11201         after a potential pragma SPARK_Mode.
11202         * sem_prag.adb (Analyze_Depends_In_Decl_Part): Add local
11203         constant Deps. Remove local variable Expr. Check the syntax
11204         of pragma Depends when SPARK_Mode is off. Factor out the
11205         processing for extra parenthesis around individual clauses.
11206         (Analyze_Global_In_Decl_List): Items is now a constant. Check
11207         the syntax of pragma Global when SPARK_Mode is off.
11208         (Analyze_Initializes_In_Decl_Part): Check the syntax of pragma
11209         Initializes when SPARK_Mode is off.
11210         (Analyze_Part_Of): Check
11211         the syntax of the encapsulating state when SPARK_Mode is off.
11212         (Analyze_Pragma): Check the syntax of pragma Abstract_State when
11213         SPARK_Mode is off. Move the declaration order check with respect
11214         to pragma Initializes to the end of the processing. Do not verify
11215         the declaration order for pragma Initial_Condition when SPARK_Mode
11216         is off. Do not complain about a useless package refinement when
11217         SPARK_Mode is off.
11218         (Analyze_Refined_Depends_In_Decl_Part): Refs
11219         is now a constant. Check the syntax of pragma Refined_Depends
11220         when SPARK_Mode is off.
11221         (Analyze_Refined_Global_In_Decl_Part):
11222         Check the syntax of pragma Refined_Global when SPARK_Mode is off.
11223         (Analyze_Refined_State_In_Decl_Part): Check the syntax of pragma
11224         Refined_State when SPARK_Mode is off.
11225         (Check_Dependence_List_Syntax): New routine.
11226         (Check_Global_List_Syntax): New routine.
11227         (Check_Initialization_List_Syntax): New routine.
11228         (Check_Item_Syntax): New routine.
11229         (Check_State_Declaration_Syntax): New routine.
11230         (Check_Refinement_List_Syntax): New routine.
11231         (Has_Extra_Parentheses): Moved to the top level of Sem_Prag.
11233 2014-02-24  Robert Dewar  <dewar@adacore.com>
11235         * a-tags.adb, s-os_lib.adb: Minor reformatting.
11237 2014-02-24  Thomas Quinot  <quinot@adacore.com>
11239         * g-sercom-mingw.adb, g-sercom-linux.adb (Raise_Error): Include
11240         strerror message, not just numeric errno value.
11242 2014-02-24  Doug Rupp  <rupp@adacore.com>
11244         * raise-gcc.c (exception_class_eq): Make endian neutral.
11246 2014-02-24  Ed Schonberg  <schonberg@adacore.com>
11248         * atree.ads, atree,adb (Copy_Separate_Tree): Remove Syntax_Only
11249         flag, and reset Etype and Analyzed attributes unconditionally
11250         when copying a tree that may be partly analyzed.
11251         * freeze.adb: Change calls to Copy_Separate_Tree accordingly.
11252         * sem_ch6.adb (Check_Inline_Pragma): If the Inline pragma appears
11253         within a subprogram body and applies to it, remove it from the
11254         body before making a copy of it, to prevent spurious errors when
11255         analyzing the copied body.
11257 2014-02-24  Thomas Quinot  <quinot@adacore.com>
11259         * s-os_lib.adb (Errno_Message): Do not depend on Integer'Image.
11260         * s-oscons-tmplt.c: On VxWorks, include adaint.h only after
11261         vxWorks.h has been included.  Also ensure that file attributes
11262         related definitions are output even in cases where socket support
11263         is not enabled.
11264         * a-tags.adb: Code clean up.
11265         * Make-generated.in (OSCONS_CPP, OSCONS_EXTRACT): Use -iquote
11266         instead of -I to add the main ada source directory to the header
11267         search path, in order to avoid conflict between our own "types.h"
11268         and VxWork's <types.h>.
11270 2014-02-24  Robert Dewar  <dewar@adacore.com>
11272         * atree.ads, atree.adb (Copy_Separate_Tree): Add Syntax_Only parameter.
11273         * debug.adb: Remove documentation of -gnatd.X, no longer used.
11274         * freeze.adb (Wrap_Imported_Subprogram): Fixed and activated.
11276 2014-02-24  Bob Duff  <duff@adacore.com>
11278         * gnat_ugn.texi: Improve documentation of gnatpp.
11280 2014-02-24  Thomas Quinot  <quinot@adacore.com>
11282         * g-stheme.adb, g-socthi-vms.adb, g-socthi-vms.ads,
11283         g-socthi-vxworks.adb, g-socthi-vxworks.ads, g-stseme.adb,
11284         g-socthi-mingw.adb, g-socthi-mingw.ads, g-socthi.adb,
11285         g-socthi.ads, g-socket.adb (Host_Error_Message): Return a string, not
11286         a chars_ptr, because on Windows this is a renaming of
11287         Socket_Error_Message.
11289 2014-02-24  Robert Dewar  <dewar@adacore.com>
11291         * a-direct.adb, sem_ch5.adb, a-cfdlli.adb, a-cfhase.adb, a-tags.adb,
11292         s-filatt.ads, a-cforma.adb, sem_ch6.adb, g-socthi-mingw.adb,
11293         a-cfhama.adb, a-cforse.adb, a-cofove.adb: Minor reformatting and code
11294         reorganization.
11296 2014-02-24  Thomas Quinot  <quinot@adacore.com>
11298         * Make-generated.in (OSCONS_CPP, OSCONS_EXTRACT): Make sure
11299         that the source directory containing s-oscons-tmplt.c is on the
11300         include path, so that all internal header files are available.
11302 2014-02-24  Ed Schonberg  <schonberg@adacore.com>
11304         * sem_ch5.adb (Analyze_Loop_Parameter_Specification): If the
11305         domain of iteration is an attribute reference 'Old, this is an
11306         Ada 2012 iterator and the loop must be rewritten as such.
11308 2014-02-24  Thomas Quinot  <quinot@adacore.com>
11310         * s-fileio.adb (Errno_Message): Remove, use shared version from
11311         s-os_lib instead.
11312         * s-crtrun.ads, Makefile.rtl: Remove now unused unit.
11313         * g-stseme (Socket_Error_Message): Reimplement in terms of new
11314         s-os_lib function.
11315         * g-socthi.ads, g-socthi.adb: Change profile of
11316         Socket_Error_Message to return String to allow the above.
11317         * g-socket.adb, g-socthi-mingw.adb, g-socthi-mingw.ads,
11318         * g-socthi-vms.adb, g-socthi-vms.ads, g-socthi-vxworks.adb,
11319         * g-socthi-vxworks.ads: Update to account for the above profile
11320         change.
11321         * a-tags.adb: Use strlen builtin binding provided by s-crtl.
11322         * s-crtl.ads (strncpy): New procedure.
11323         * s-os_lib.adb (Copy_Attributes): Import just once (strncpy):
11324         Use import from s-crtl.
11325         * a-envvar.adb, osint.adb: Use imports of C runtime functions
11326         from s-crtl instead of re-importing locally.
11328 2014-02-24  Hristian Kirtchev  <kirtchev@adacore.com>
11330         * sem_prag.adb (Analyze_Global_Item): Emit the
11331         variable related checks concerning volatile objects only when
11332         SPARK_Mode is on.
11334 2014-02-24  Robert Dewar  <dewar@adacore.com>
11336         * sem_ch5.adb (Analyze_Iterator_Specification): use
11337         Error_Msg_Ada_2012_Feature.
11339 2014-02-24  Jose Ruiz  <ruiz@adacore.com>
11341         * s-rident.ads (Profile_Info): For Ravenscar, the restrictions
11342         No_Local_Timing_Events and No_Specific_Termination_Handlers
11343         must be set, according to the Ravenscar profile definition
11344         in D.13(6/3).
11346 2014-02-24  Ed Schonberg  <schonberg@adacore.com>
11348         * sem_ch6.adb (Analyze_Expression_Function): If this is a
11349         completion, freeze return type and its designated type if needed.
11351 2014-02-24  Thomas Quinot  <quinot@adacore.com>
11353         * sem_ch13.adb (Analyze_Attribute_Definition_Clause, case
11354         'Address): When moving initialization statements to a freeze
11355         entity, keep them under a single node (i.e. do not unwrap
11356         expressions with actions), and set the Initialization_Statements
11357         attribute again so that processing of a later pragma Import can
11358         still remove them.
11360 2014-02-24  Claire Dross  <dross@adacore.com>
11362         * a-cfdlli.adb, a-cfdlli.ads, a-cfhama.adb, a-cfhama.ads,
11363         a-cfhase.adb, a-cfhase.ads, a-cforma.adb, a-cforma.ads,
11364         a-cforse.adb, a-cforse.ads, a-cofove.adb, a-cofove.ads: Rename
11365         Left/Right to First_To_Previous/Current_To_Last.
11367 2014-02-24  Thomas Quinot  <quinot@adacore.com>
11369         * adaint.h (struct file_attributes): New component "error"
11370         (__gnat_error_attributes): Accessor for the above.
11371         * adaint.c (__gnat_error_attributes): New subprogram
11372         (__gnat_stat): Fix returned value (expect errno value)
11373         (__gnat_stat_to_attr): Add management of error component (set to
11374         stat errno value, except for missing files where it is set to 0,
11375         and exists is set to 0).
11376         * osint.ads (File_Attributes_Size): Update per change above,
11377         also clarify documentation.
11378         * s-filatt.ads: New file, binding to file attributes related
11379         functions.
11380         * Makefile.rtl (s-filatt): New runtime unit.
11381         * s-crtl.ads (strlen): Expose binding to GCC builtin (falls back
11382         to library function if not available on target).
11383         * s-os_lib.ads, s-os_lib.adb (Errno_Message): New subprogram.
11384         * s-oscons-tmplt.c (SIZEOF_struct_file_attributes,
11385         SIZEOF_struct_dirent_alloc): New constants.
11386         * Make-generated.in (s-oscons.ads): Now requires adaint.h.
11387         * a-direct.adb (Fetch_Next_Entry): Fix incorrect buffer sizes.
11388         Perform appropriate error checking if stat fails (do not just
11389         ignore existing files if stat fails)
11390         * gcc-interface/Make-lang.in (GNAT_ADA_OBJS, GNATBIND_OBJS): Update
11391         dependencies.
11393 2014-02-24  Hristian Kirtchev  <kirtchev@adacore.com>
11395         * sem_prag.adb (Analyze_Global_Item): Move the check concerning
11396         the use of volatile objects as global items in a function to
11397         the variable related checks section.
11398         * sem_util.adb (Async_Readers_Enabled): Directly call
11399         Has_Enabled_Property.
11400         (Async_Writers_Enabled): Directly call Has_Enabled_Property.
11401         (Effective_Reads_Enabled): Directly call Has_Enabled_Property.
11402         (Effective_Writes_Enabled): Directly call Has_Enabled_Property.
11403         (Has_Enabled_Property): Rename formal parameter State_Id to Item_Id.
11404         Update the comment on usage. State_Has_Enabled_Property how handles
11405         the original logic of the routine. Add processing for variables.
11406         (State_Has_Enabled_Property): New routine.
11407         (Variable_Has_Enabled_Property): New routine.
11409 2014-02-24  Robert Dewar  <dewar@adacore.com>
11411         * sinfo.ads, sem_ch12.adb, sem_res.adb, sem_ch4.adb, par-ch12.adb:
11412         Minor reformatting.
11413         * atree.ads, atree.adb (Node35): New function.
11414         (Set_Node35): New procedure.
11415         * debug.adb: Define new debug flag -gnatd.X.
11416         * einfo.ads, einfo.adb (Import_Pragma): New field.
11417         * freeze.adb (Wrap_Imported_Procedure): New procedure (not
11418         really active yet, has to be activated with -gnatd.X.
11419         * sem_prag.adb (Set_Imported): Set new Import_Pragma
11420         field (Set_Imported): Don't set Is_Public (see
11421         Freeze.Wrap_Imported_Subprogram)
11422         * par-ch3.adb (P_Component_List): Handle unexpected null component.
11424 2014-02-24  Yannick Moy  <moy@adacore.com>
11426         * sem_ch3.adb: Correct reference to SPARK RM in error messages.
11427         * gnat_rm.texi: Correct documentation of attribute Update.
11429 2014-02-24  Ed Schonberg  <schonberg@adacore.com>
11431         * sem_ch5.adb (Analyze_Iterator_Specification): Reject container
11432         iterator in older versions of Ada.
11434 2014-02-24  Gary Dismukes  <dismukes@adacore.com>
11436         * sem_ch5.adb, sem_aux.ads, sem_ch12.adb, gnat_ugn.texi, par.adb,
11437         par-ch12.adb: Change spelling 'parametrization' to 'parameterization'.
11439 2014-02-24  Ed Schonberg  <schonberg@adacore.com>
11441         * sinfo.ads, sinfo.adb: New attribute Generalized_Indexing, for
11442         indexed_components that are instances of Ada 2012 container
11443         indexing operations. Analysis and resolution of such nodes
11444         is performed on the attribute, and the original source is
11445         preserved for ASIS operations. If expansion is enabled, the
11446         indexed component is replaced by the value of this attribute,
11447         which is in a call to an Indexing aspect, in most case wrapped
11448         in a dereference operation.
11449         * sem_ch4.adb (Analyze_Indexed_Component): Create
11450         Generalized_Indexing attribute when appropriate.
11451         (Analyze_Call): If prefix is not overloadable and has an indexing
11452         aspect, transform into an indexed component so it can be analyzed
11453         as a potential container indexing.
11454         (Analyze_Expression): If node is an indexed component with a
11455         Generalized_ Indexing, do not re-analyze.
11456         * sem_res.adb (Resolve_Generalized_Indexing): Complete resolution
11457         of an indexed_component that has been transformed into a container
11458         indexing operation.
11459         (Resolve_Indexed_Component): Call the above when required.
11460         (Resolve): Do not insert an explicit dereference operation on
11461         an indexed_component whose type has an implicit dereference:
11462         the operation is inserted when resolving the related
11463         Generalized_Indexing.
11465 2014-02-24  Olivier Ramonat  <ramonat@adacore.com>
11467         * gnat_rm.texi, gnat_ugn.texi: Replace Ada Compiler by Ada Development
11468         Environment.
11470 2014-02-24  Hristian Kirtchev  <kirtchev@adacore.com>
11472         * sem_prag.adb (Check_Constituent_Usage): Remove leading spaces in
11473         error messages.
11474         (Inconsistent_Mode_Error): Remove leading spaces in error messages.
11475         Merge the expected and available mode errors.
11476         (Report_Unused_Constituents): Remove leading spaces in error messages.
11477         (Report_Unused_States): Remove leading spaces in error messages.
11479 2014-02-24  Thomas Quinot  <quinot@adacore.com>
11481         * par_sco.adb (Traverse_One): Refine categorization of statement
11482         SCOs.
11484 2014-02-24  Robert Dewar  <dewar@adacore.com>
11486         * aspects.ads, aspects.adb: Remove aspects Ada_2005 and Ada_2012,
11487         Pure_05, Pure_12 and Preelaborate_05.
11488         * gnat_rm.texi: Update accordingly.
11489         * sem_prag.adb: Document one argument form of Ada_05/Ada_2005
11490         pragmas Document one argument form of Ada_12/Ada_2012 pragmas
11491         Recognize one argument form of these pragmas only in GNAT mode
11492         (-gnatg).
11494 2014-02-24  Ed Schonberg  <schonberg@adacore.com>
11496         * s-dimmks.ads: Replace symbol for temperature, previously the
11497         Greek letter Theta, by the ASCII @ sign.
11498         * s-diflio.ads: ditto.
11500 2014-02-24  Robert Dewar  <dewar@adacore.com>
11502         * exp_ch4.adb: Minor code reorganization (use OR for boolean
11503         variables).
11504         * sem_ch3.adb, sem_prag.adb, freeze.adb: Minor reformatting.
11506 2014-02-24  Ben Brosgol  <brosgol@adacore.com>
11508         * gnat_ugn.texi, projects.texi: Added the necessary conditionalization
11509         so that references to gnatmem and ASIS tools do not appear in the FSF
11510         edition of the GNAT User's Guide.
11512 2014-02-24  Yannick Moy  <moy@adacore.com>
11514         * freeze.adb (Freeze_Entity): Do not issue warning
11515         for pre/post being ignored on imported subprogram in GNATprove
11516         mode.
11518 2014-02-24  Robert Dewar  <dewar@adacore.com>
11520         * exp_ch5.adb, sem_ch5.adb, sem_type.adb, sem_res.adb, sem_attr.adb,
11521         stand.ads, sem_eval.adb: Minor reformatting.
11523 2014-02-24  Yannick Moy  <moy@adacore.com>
11525         * sem_prag.adb: Minor rewording in error message.
11527 2014-02-24  Johannes Kanig  <kanig@adacore.com>
11529         * exp_util.adb (Expand_Subtype_From_Expr): Do not expand subtypes in
11530         GNATprove_mode, gnat2why doesn't need nor use these types.
11532 2014-02-24  Gary Dismukes  <dismukes@adacore.com>
11534         * exp_ch4.adb (Expand_N_Op_Expon): On the AAMP
11535         target, in the case of signed integer exponentiation that uses a
11536         run-time routine, always select the Exp_* versions, since overflow
11537         checking is automatically done by AAMP arithmetic instructions.
11539 2014-02-24  Hristian Kirtchev  <kirtchev@adacore.com>
11541         * sem_ch13.adb (Analyze_Aspect_Specifications):
11542         When the related context is a package instace, insert pragma
11543         Abstract_State after all internally-generated renamings related
11544         to the instance "header".
11546 2014-02-24  Ed Schonberg  <schonberg@adacore.com>
11548         * sem_ch3.adb (Analyze_Declarations): Analyze Contract of abstract
11549         subprograms.
11550         * sem_disp.adb (Check_Dispatching_Context): A non-dispatching
11551         call to an abstract subprogram is legal if it appears in a
11552         pre/postcondition of another abstract operation.
11554 2014-02-24  Sergey Rybin  <rybin@adacore.com frybin>
11556         * gnat_ugn.texi: Misc updates.
11558 2014-02-24  Hristian Kirtchev  <kirtchev@adacore.com>
11560         * exp_prag.adb (Expand_Old): Set the type of the generated temporary.
11562 2014-02-24  Gary Dismukes  <dismukes@adacore.com>
11564         * layout.adb (Layout_Variant_Record): Instantiate
11565         Generic_Check_Choices and call Check_Choices before calling
11566         Build_Discr_Checking_Funcs, since we need Others_Discrete_Choices
11567         set to prevent generating incorrect discriminant-checking
11568         functions for 'others' variants (functions that unconditionally
11569         return True rather than accounting for the values covered by the
11570         'others' choice).
11571         * sem_eval.ads (Subtypes_Statically_Compatible): Add formal
11572         Formal_Derived_Matching.
11573         (Subtypes_Statically_Match): Add formal Formal_Derived_Matching.
11574         * sem_eval.adb (Subtypes_Statically_Compatible): Pass new
11575         Formal_Derived_Matching formal to Subtypes_Statically_Match.
11576         (Subtypes_Statically_Match): Suppress the Object_Size matching
11577         test in the case where Formal_Derived_Matching is True.
11578         * sem_ch12.adb (Validate_Derived_Type_Instance): Pass
11579         True for Formal_Derived_Matching_Formal on the call to
11580         Subtypes_Statically_Compatible.
11582 2014-02-23  Eric Botcazou  <ebotcazou@adacore.com>
11584         * gcc-interface/Make-lang.in (ADA_TOOLS_FLAGS_TO_PASS): Robustify.
11586 2014-02-23  Eric Botcazou  <ebotcazou@adacore.com>
11588         * gcc-interface/utils2.c (build_simple_component_ref): Fix formatting.
11589         Look through a conversion between original and packable version to get
11590         the base object.
11591         (build_component_ref): Rework comment and fix formatting.
11593 2014-02-20  Sergey Rybin  <rybin@adacore.com frybin>
11595         * gnat_ugn.texi, vms_data.ads (gnatelim): Add description of
11596         project-specific options.
11598 2014-02-20  Ed Schonberg  <schonberg@adacore.com>
11600         * a-cbdlli.adb (Insert): When capacity exceeded, raise Capacity_Error,
11601         not Constraint_Error.
11602         * a-cbmutr.adb (Append_Child, Insert_Child, Prepend_Child): Ditto.
11603         * sem_ch5.adb: Code clean up.
11605 2014-02-20  Hristian Kirtchev  <kirtchev@adacore.com>
11607         * sem_prag.adb (Usage_Error): Remove local
11608         constant Typ. Remove the specialized diagnostics for unconstrained
11609         or tagged items as those are not part of the explicit input set
11610         of the related subprogram and should not be flagged.
11612 2014-02-20  Ed Schonberg  <schonberg@adacore.com>
11614         * sem_attr.adb: Add guard to preserve all errors.
11616 2014-02-20  Vincent Celier  <celier@adacore.com>
11618         * switch-m.adb (Normalize_Compiler_Switches): Take into account
11619         switches that are recorded in ALI files: -gnateA, -gnateE,
11620         -gnateF, -gnateinn, -gnateu, -gnateV and -gnateY.
11622 2014-02-20  Ed Schonberg  <schonberg@adacore.com>
11624         * sem_ch5.adb (Analyze_Iterator_Specification): Check legality
11625         of an element iterator form over a formal container with an
11626         Iterable aspect.
11627         * exp_ch5.adb (Build_Formal_Container_Iteration): Utility
11628         to create declaration and loop statements for both forms of
11629         container iterators.
11630         (Expand_Formal_Container_Element_Iterator): New procedure
11631         to handle loops of the form  "for E of C" when C is a formal
11632         container.
11633         (Expand_Formal_Container_Iterator): Code cleanup.
11635 2014-02-20  Hristian Kirtchev  <kirtchev@adacore.com>
11637         * sem_prag.adb (Add_Item_To_Name_Buffer): New routine.
11638         (Analyze_Contract_Case): Remove the use of
11639         "may". Replace "aspect Contract_Cases" to avoid categorization
11640         of aspect vs pragma.
11641         (Analyze_External_Property_In_Decl_Part): Remove the use of "formal".
11642         (Analyze_Global_Item): Remove
11643         the use of "formal", specify the subprogram.  Split the
11644         error message about a state with visible refinement into
11645         two. Remove the use of "global" from "volatile global item".
11646         (Analyze_Initialization_Item): Ensure that the SPARK RM reference
11647         is on one line.
11648         (Analyze_Input_Output): Update the call to
11649         Check_Mode. Specify the duplicated item. Reword the error
11650         message concerning an input of a null output list. Use "\"
11651         for error message continuation.
11652         (Analyze_Part_Of): Remove
11653         the use of "may". Use "\" for error message continuation.
11654         (Analyze_Refined_Depends_In_Decl_Part): Update the error
11655         message concerning a useless refinement to match the format
11656         of Refined_Global.
11657         (Analyze_Refined_Global_In_Decl_Part): Reword the error message
11658         concerning a useless refinement.
11659         (Analyze_Refinement_Clause): Use "\" for error message continuation.
11660         (Check_Constituent_Usage): Use "\" for error message continuation.
11661         (Check_Dependency_Clause): Use "\" for error message continuation.
11662         (Check_Matching_Constituent): Use "\" for error message continuation.
11663         (Check_Missing_Part_Of): Use "\" for error message continuation.
11664         (Check_Mode): Renamed to
11665         Check_Role. Update the comment on usage. Redo the error reporting
11666         to use Role_Error.
11667         (Check_Mode_Restriction_In_Enclosing_Context): Use "\" for error
11668         message continuation.
11669         (Find_Mode): Renamed to Find_Role. Update the parameter profile along
11670         with comment on usage. Update all occurrences of Is_Input and Is_Output.
11671         (Inconsistent_Mode_Error): Use "\" for error message continuation.
11672         (Input_Match): Use "\" for error message continuation.
11673         (Role_Error): New routine.
11674         (Set_Convention_From_Pragma): Use "\" for error message continuation.
11675         (Usage_Error): Add local variable Error_Msg. Build specialized error
11676         message showcasing the offending item kind. Redo the diagnostics for
11677         unconstrained types.
11679 2014-02-20  Ed Schonberg  <schonberg@adacore.com>
11681         * exp_util.adb (Is_Iterated_Container): Use high-level primitives
11682         to determine whether a type is a container type, rather than
11683         examining only its type declaration, so that subtypes and derived
11684         types are handled properly.
11686 2014-02-20  Sergey Rybin  <rybin@adacore.com frybin>
11688         * gnat_ugn.texi: gnatmetric: add description of project-specific
11689         options.
11691 2014-02-20  Ed Schonberg  <schonberg@adacore.com>
11693         * sem_attr.adb (Analyze_Attribute, case 'Update): Verify that
11694         all choices in an association for a record type have the same
11695         type, as is done for record aggregates.
11697 2014-02-20  Robert Dewar  <dewar@adacore.com>
11699         * a-cborma.adb, a-cbhama.adb, a-cbdlli.adb, a-cbmutr.adb: Use pragma
11700         Unmodified rather than Warnings (Off). Make comments
11701         uniform in the four affected units.
11703 2014-02-20  Robert Dewar  <dewar@adacore.com>
11705         * sem_ch13.adb (Analyze_Attribute_Definition_Clause, case
11706         Object_Size): For non-scalar types allow any value that is a
11707         multiple of 8.
11708         * gnat_rm.texi: Document Object_Size for composites more clearly.
11710 2014-02-20  Yannick Moy  <moy@adacore.com>
11712         * sem_util.ads, sem_util.adb (Default_Initialization): Remove function.
11714 2014-02-20  Ed Schonberg  <schonberg@adacore.com>
11716         * stand.ads: Raise_Type: new predefined entity, used as the type
11717         of a Raise_Expression prior to resolution.
11718         * cstand.adb: Build entity for Raise_Type.
11719         * sem_ch11.adb (Analyze_Raise_Expression): use Raise_Type as the
11720         initial type of the node.
11721         * sem_type.adb (Covers): Raise_Type is compatible with all
11722         other types.
11723         * sem_res.adb (Resolve): Remove special handling of Any_Type on
11724         Raise_Expression nodes.
11725         (Resolve_Raise_Expression): Signal ambiguity if the type of the
11726         context is still Raise_Type.
11728 2014-02-20  Robert Dewar  <dewar@adacore.com>
11730         * sem_ch12.adb (Validate_Access_Type_Instance): Add message if
11731         mismatching predicates.
11732         * sem_ch6.adb (Check_Conformance): Give better messages on
11733         predicate mismatch.
11734         * sem_eval.adb (Predicates_Match): Move to spec.
11735         * sem_eval.ads (Predicates_Match): Moved here from body.
11737 2014-02-20  Ed Schonberg  <schonberg@adacore.com>
11739         * a-cbmutr.adb: Use default value in Insert_Child.
11741 2014-02-20  Vincent Celier  <celier@adacore.com>
11743         * gnatcmd.adb, make.adb, prj-makr.adb, clean.adb: Call
11744         Stringt.Initialize in all project aware tools.
11746 2014-02-20  Doug Rupp  <rupp@adacore.com>
11748         * gnat_ugn.texi: Document gnatbind -X option.
11749         * vms_data.ads: Minor warnings documentation reformatting.
11751 2014-02-20  Ed Schonberg  <schonberg@adacore.com>
11753         * exp_ch3.adb (Expand_Freeze_Array_Type): Only create invariant
11754         procedure for a base type.
11756 2014-02-20  Robert Dewar  <dewar@adacore.com>
11758         * sem_ch4.adb (Analyze_Case_Expression): Get type from first
11759         expression with type info.
11760         * sem_ch13.adb: Minor reformatting.
11761         * sem_eval.adb (Subtypes_Statically_Match): Make sure we return
11762         False if predicates do not match on the two types.
11764 2014-02-20  Arnaud Charlet  <charlet@adacore.com>
11766         * sem_prag.adb (Analyze_Pragma [pragma Attach_Handler]):
11767         In Relaxed_RM_Semantics mode, allow any static integer value,
11768         for compatibility with other compilers.
11770 2014-02-20  Vincent Celier  <celier@adacore.com>
11772         * errutil.adb (Initialize): Properly initialize entry in table
11773         Warnings when warnings are suppressed.
11775 2014-02-20  Robert Dewar  <dewar@adacore.com>
11777         * s-os_lib.ads: Add warning about non-portability of Rename_File.
11778         * sem_util.ads, sem_util.adb (Is_Junk_Name): New function.
11779         * sem_warn.adb: Use Is_Junk_Name to suppress some warnings.
11780         * gnat_ugn.texi: Document no warnings on junk variable names.
11781         * layout.adb: Minor code reorganization (use Ekind_In).
11782         * stringt.adb: Move initialization of Null_String_Id to Initialize
11783         routine.
11785 2014-02-20  Ed Schonberg  <schonberg@adacore.com>
11787         * sem_ch13.adb: Initialize optional Element_Id.
11789 2014-02-20  Robert Dewar  <dewar@adacore.com>
11791         * s-os_lib.ads (Rename_File): Minor commment addition.
11793 2014-02-20  Thomas Quinot  <quinot@adacore.com>
11795         * einfo.ads: Minor reformatting.
11797 2014-02-20  Hristian Kirtchev  <kirtchev@adacore.com>
11799         * aspects.adb (Exchange_Aspects): New routine.
11800         * aspects.ads (Exchange_Aspects): New routine.
11801         * atree.adb (Rewrite): Do not check whether the save node has
11802         aspects as it never will, instead check the node about to be clobbered.
11803         * einfo.adb (Write_Field25_Name): Abstract_States can appear in
11804         entities of generic packages.
11805         * sem_ch6.adb (Analyze_Expression_Function): Fix the parent
11806         pointer of an aspect specification list after rewriting takes place.
11807         * sem_ch7.adb (Analyze_Package_Body_Helper): Swap the aspect
11808         specifications of the generic template and the copy used for analysis.
11809         * sem_ch12.adb (Analyze_Generic_Package_Declaration): Swap
11810         the aspect specifications of the generic template and the
11811         copy used for analysis.
11812         (Analyze_Package_Instantiation): Propagate the aspect specifications
11813         from the generic template to the instantiation.
11814         (Build_Instance_Compilation_Unit_Nodes): Propagate the aspect
11815         specifications from the generic template to the instantiation.
11816         * sem_ch13.adb (Analyze_Aspect_Specifications): Handle aspects
11817         Abstract_State, Initializes and Initial_Condition when they
11818         apply to a package instantiation.
11820 2014-02-20  Robert Dewar  <dewar@adacore.com>
11822         * stringt.adb: Add call to Initialize in package initialization.
11824 2014-02-20  Robert Dewar  <dewar@adacore.com>
11826         * a-crbtgk.adb, a-cihama.adb, a-coinve.adb, a-ciorse.adb, a-crbtgo.adb,
11827         a-cidlli.adb, a-cimutr.adb, a-cihase.adb, a-cohama.adb, a-coorse.adb,
11828         a-chtgke.adb, a-chtgop.adb, a-comutr.adb, a-ciorma.adb, a-cobove.adb,
11829         a-convec.adb, a-cohase.adb, a-chtgbk.adb, a-chtgbo.adb: Minor
11830         reformatting.
11832 2014-02-20  Bob Duff  <duff@adacore.com>
11834         * s-os_lib.ads: Minor: Remove incorrect comment.
11836 2014-02-20  Robert Dewar  <dewar@adacore.com>
11838         * sem_elab.adb (Check_Elab_Assign): Clearer warning message.
11840 2014-02-20  Ed Schonberg  <schonberg@adacore.com>
11842         * a-cborma.adb (Assign): When creating a node without a specified
11843         element, insert an uninitialized element in the map, because
11844         the instance may provide an element type with a default
11845         initialization, e.g a scalar with a Default_Value aspect.
11846         * a-cbhama.adb (Assign_Key): Remove useless Allocate procedure.
11847         (Insert): In the version without explicit element, provide an
11848         uninitialized element, as above.
11849         * a-cbdlli.adb (Append): In the version without explicit element,
11850         provide an uninitalized element, as above.
11851         (Allocate): Remove unused version.
11853 2014-02-20  Robert Dewar  <dewar@adacore.com>
11855         * sem_elab.adb: Minor code reorganization (use Nkind_In).
11856         * stringt.adb: Remove temporary pragma Warnings (Off).
11857         * stringt.ads: Add pragma Elaborate_Body to ensure initialization
11858         of Null_String_Id.
11860 2014-02-20  Matthew Heaney  <heaney@adacore.com>
11862         * a-chtgbk.adb (Replace): Use correct offset when calculating bucket
11863         index.
11865 2014-02-20  Ed Schonberg  <schonberg@adacore.com>
11867         * sem_ch5.adb (Analyze_Iterator_Specification): Initialize
11868         properly the cursor type for subsequent volatile testing in SPARK
11869         mode, when domain is a formal container with an Iterabe aspect.
11871 2014-02-20  Robert Dewar  <dewar@adacore.com>
11873         * errout.adb (Set_Warnings_Mode_Off): Add Reason argument.
11874         (Set_Specific_Warning_Off): Add Reason argument.
11875         * errout.ads (Set_Warnings_Mode_Off): Add Reason argument.
11876         (Set_Specific_Warning_Off): Add Reason argument.
11877         * erroutc.adb (Warnings_Entry): Add Reason field
11878         (Specific_Warning_Entry): Add Reason field.
11879         (Warnings_Suppressed): return String_Id for Reason.
11880         (Warning_Specifically_Suppressed): return String_Id for Reason.
11881         * erroutc.ads (Warnings_Entry): Add Reason field.
11882         (Specific_Warning_Entry): Add Reason field.
11883         (Set_Specific_Warning_Off): Add Reason argument.
11884         (Set_Warnings_Mode_Off): Add Reason argument.
11885         (Warnings_Suppressed): return String_Id for Reason.
11886         (Warning_Specifically_Suppressed): return String_Id for Reason.
11887         * errutil.adb (Warnings_Suppressed): returns String_Id for Reason
11888         (Warning_Specifically_Suppressed): returns String_Id for Reason
11889         * gnat_rm.texi: Document that Warning parameter is string literal
11890         or a concatenation of string literals.
11891         * par-prag.adb: New handling for Reason argument.
11892         * sem_prag.adb (Analyze_Pragma, case Warning): New handling
11893         for Reason argument.
11894         * sem_util.ads, sem_util.adb (Get_Reason_String): New procedure.
11895         * sem_warn.ads (Warnings_Off_Entry): Add reason field.
11896         * stringt.adb: Set Null_String_Id.
11897         * stringt.ads (Null_String_Id): New constant.
11899 2014-02-20  Robert Dewar  <dewar@adacore.com>
11901         * einfo.ads: Minor comment addition: Etype of package is
11902         Standard_Void_Type.
11903         * checks.adb, exp_aggr.adb, exp_atag.adb, exp_attr.adb, exp_ch13.adb,
11904         exp_ch2.adb, exp_ch3.adb, exp_ch4.adb, exp_ch5.adb, exp_ch6.adb,
11905         exp_ch7.adb, exp_ch9.adb, exp_dbug.adb, exp_disp.adb, exp_imgv.adb,
11906         exp_intr.adb, exp_prag.adb, exp_sel.adb, exp_strm.adb, exp_util.adb,
11907         freeze.adb, rtsfind.adb, sem_aggr.adb, sem_attr.adb, sem_ch10.adb,
11908         sem_ch12.adb, sem_ch13.adb, sem_ch3.adb, sem_ch4.adb, sem_ch5.adb,
11909         sem_ch6.adb, sem_ch8.adb, sem_dim.adb, sem_prag.adb, sem_res.adb,
11910         sem_util.adb, tbuild.adb, tbuild.ads: Remove New_Reference_To.
11911         Replace all calls with calls to New_Occurrence_Of.
11913 2014-02-20  Robert Dewar  <dewar@adacore.com>
11915         * par-util.adb (Ignore, case of right paren): Make this a
11916         serious error.
11918 2014-02-19  Robert Dewar  <dewar@adacore.com>
11920         * sem_ch5.adb, sem_prag.adb, sem_attr.adb: Minor reformatting.
11921         * debug.adb: Remove -gnatd.X switch, no longer used.
11922         * styleg.adb (Check_Then): Remove check of -gnatd.X, check is
11923         now always made.
11925 2014-02-19  Bob Duff  <duff@adacore.com>
11927         * g-socket.ads: Minor: Correct some comments.
11929 2014-02-19  Ed Schonberg  <schonberg@adacore.com>
11931         * sem_ch5.adb: Inhibit iterator rewriting in ASIS mode.
11933 2014-02-19  Arnaud Charlet  <charlet@adacore.com>
11935         * sem_ch13.adb (Analyze_Aspect_Specifications): Do not generate
11936         an error on out of range priorities if Relaxed_RM_Semantics.
11937         * sem_prag.adb (Analyze_Pragma): Ditto.
11939 2014-02-19  Bob Duff  <duff@adacore.com>
11941         * sem_attr.adb (Resolve_Attribute): Detect the case of F'Access
11942         where F denotes the renaming of an enumeration literal, and
11943         issue a specialized error message.
11945 2014-02-19  Matthew Heaney  <heaney@adacore.com>
11947         * a-chtgop.ads (Checked_Index): New operation.
11948         (Next): Changed mode of hash table.
11949         * a-chtgop.adb (Adjust, Delete_Node_Sans_Free): Detect tampering
11950         (Generic_Read, Reserve_Capacity): Ditto.
11951         (Generic_Equal): Detect tampering.
11952         (Next): Changed mode of hash table, detect tampering.
11953         * a-chtgke.ads (Checked_Index, Checked_Equivalent_Keys): New
11954         operation.
11955         (Find): Changed mode of hash table.
11956         * a-chtgke.adb (Checked_Equivalent_Keys): New operation
11957         (Delete_Key_Sans_Free, Generic_Conditional_Insert): Detect
11958         tampering.
11959         (Find): Changed mode of hash table, check for tampering.
11960         (Generic_Replace_Element): Check for tampering.
11961         * a-chtgbk.ads (Checked_Index, Checked_Equivalent_Keys): New operation.
11962         * a-chtgbk.adb (Checked_Index, Checked_Equivalent_Keys): New
11963         operation (Delete_Key_Sans_Free, Generic_Conditional_Insert):
11964         Detect tampering.
11965         (Find, Generic_Replace_Element): Check for tampering.
11966         * a-chtgbo.ads (Checked_Index): New operation.
11967         * a-chtgbo.adb (Checked_Index): New operation
11968         (Delete_Node_Sans_Free, Generic_Equal): Detect tampering.
11969         (Generic_Read, Next): Ditto.
11970         * a-cohase.adb, a-cihase.adb (Is_In): Changed mode of hash
11971         table (Difference, Intersection): Use variable view of
11972         source, detect tampering (Find, Is_Subset, Overlap): Use
11973         variable view of container (Symmetric_Difference, Union):
11974         Detect tampering (Vet): Use Checked_Index to detect tampering
11975         (Constant_Reference, Element, Find): Use variable view of
11976         container.
11977         (Update_Element_Preserving_Key): Detect tampering.
11978         * a-cbhase.adb (Difference, Find, Is_In): Use variable view
11979         of container.
11980         (Is_Subset): Ditto.
11981         (Equivalent_Sets, Overlap): Use Node's Next component.
11982         (Vet): Use Checked_Index to detect tampering.
11983         (Constant_Reference, Element, Find): Use variable view of container.
11984         (Update_Element_Preserving_Key): Detect tampering.
11985         * a-cohama.adb, a-cihama.adb, a-cbhama.adb (Constant_Reference,
11986         Element, Find): Use variable view of container.
11987         (Reference): Rename hash table component.
11988         (Vet): Use Checked_Index to detect tampering.
11990 2014-02-19  Arnaud Charlet  <charlet@adacore.com>
11992         * adabkend.adb (Scan_Compiler_Arguments): Add missing handling
11993         of -nostdinc.
11995 2014-02-19  Thomas Quinot  <quinot@adacore.com>
11997         * tbuild.adb (New_Occurrence_Of, New_Rerefence_To): Guard
11998         against calls without Def_Id.
12000 2014-02-19  Claire Dross  <dross@adacore.com>
12002         * a-cfdlli.ads, a-cfhase.ads, a-cforma.ads, a-cfhama.ads, a-cforse.ads,
12003         a-cofove.ads: Add global annotations to subprograms.
12005 2014-02-19  Hristian Kirtchev  <kirtchev@adacore.com>
12007         * sem_prag.adb (Analyze_Initial_Condition_In_Decl_Part): Remove
12008         constants Errors, Pack_Id and Pack_Init. Remove variable Vars.
12009         Initial_Condition no longer requires the presence of pragma
12010         Initialized. Do not try to diagnose whether all variables mentioned in
12011         pragma Initializes also appear in Initial_Condition.
12012         (Collect_Variables): Removed.
12013         (Match_Variable): Removed.
12014         (Match_Variables): Removed.
12015         (Report_Unused_Variables): Removed.
12017 2014-02-19  Thomas Quinot  <quinot@adacore.com>
12019         * gnat_rm.texi (pragma Stream_Convert): Minor rewording.
12021 2014-02-19  Robert Dewar  <dewar@adacore.com>
12023         * sem_util.adb, sem_util.ads, prj-conf.adb, s-os_lib.adb: Minor
12024         reformatting.
12026 2014-02-19  Vincent Celier  <celier@adacore.com>
12028         * prj-part.adb (Parse_Single_Project): Use the fully resolved
12029         project path, with all symbolic links resolved, to check if the
12030         same project is imported with a different unresolved path.
12031         * prj-tree.ads (Project_Name_And_Node): Component Canonical_Path
12032         changed to Resolved_Path to reflect that all symbolic links
12033         are resolved.
12035 2014-02-19  Ed Schonberg  <schonberg@adacore.com>
12037         * sem_util.ads, sem_util.adb (Get_Cursor_Type): Moved to sem_util
12038         from sem_ch13, for use elsewhere.
12039         * sem_ch13.adb (Get_Cursor_Type): Moved to sem_util.
12040         * sem_ch5.adb (Analyze_Iterator_Specification): Set properly the
12041         cursor type on the loop variable when the iteration is over o
12042         formal container.
12044 2014-02-19  Vincent Celier  <celier@adacore.com>
12046         * prj-conf.adb (Add_Default_GNAT_Naming_Scheme): Add declaration
12047         for an empty Target (Check_Target): Never fail when an empty
12048         target is declared in the configuration project.
12050 2014-02-19  Ed Schonberg  <schonberg@adacore.com>
12052         * sem_prag.adb (Check_Arg_Is_Local_Name): Argument is local if
12053         the pragma comes fron a predicate aspect and the context is a
12054         record declaration within the scope that declares the type.
12056 2014-02-19  Robert Dewar  <dewar@adacore.com>
12058         * gnat_rm.texi: Minor clarifications.
12059         * expander.adb, sem_aggr.adb: Add comments.
12061 2014-02-19  Ed Schonberg  <schonberg@adacore.com>
12063         * sem_prag.adb (Check_Arg_Is_Local_Name): For an aspect that
12064         applies to a subprogram body, the name is the current scope,
12065         rather than being declared in the current scope.
12066         (Analyze_Pragma, case No_Return): Handle properly a No_Return
12067         aspect applied to a subprogram body.
12069 2014-02-19  Ed Schonberg  <schonberg@adacore.com>
12071         * sem_ch13.adb (Resolve_Iterable_Operation): Improve resolution
12072         of overloaded subprograms, and fix bug in handling of primitive
12073         operation Element.
12075 2014-02-19  Pascal Obry  <obry@adacore.com>
12077         * s-os_lib.adb: Minor reformatting.
12079 2014-02-19  Yannick Moy  <moy@adacore.com>
12081         * expander.adb (Expand): Do nothing inside generics.
12082         * sem_aggr.adb (Aggregate_Constraint_Checks): Do nothing inside
12083         generics.
12085 2014-02-19  Yannick Moy  <moy@adacore.com>
12087         * exp_ch2.adb: Remove useless 'with' of unit Uintp.
12089 2014-02-19  Robert Dewar  <dewar@adacore.com>
12091         * sem_ch3.adb, style.adb, sem_prag.adb, sem_ch13.adb: Minor reformatting
12092         * a-sequio.adb: Remove useless pragma Extensions_Allowed (no
12093         longer needed).
12095 2014-02-19  Claire Dross  <dross@adacore.com>
12097         * a-cfdlli.ads, a-cfhase.ads, a-cforma.ads, a-cfhama.ads,
12098         a-cforse.ads, a-cofove.ads: Add Iterable aspect to formal containers.
12100 2014-02-19  Hristian Kirtchev  <kirtchev@adacore.com>
12102         * sem_ch3.adb (Analyze_Declarations): Analyze
12103         a package contract at the end of the private declarations (if
12104         applicable), otherwise analyze it and the end of the visible
12105         declarations.
12107 2014-02-19  Ed Schonberg  <schonberg@adacore.com>
12109         * style.adb (Missing_Overriding): If subprogram is an
12110         instantiation, place warning on the instance node itself,
12111         without mention of the original generic. Do not emit message
12112         if explicit Ada version is older than the introduction of the
12113         overriding indicator.
12115 2014-02-19  Yannick Moy  <moy@adacore.com>
12117         * gnat_rm.texi: Doc clarifications.
12119 2014-02-19  Yannick Moy  <moy@adacore.com>
12121         * exp_util.adb (Remove_Side_Effects): Do not remove side-effects
12122         inside a generic.
12124 2014-02-19  Ed Schonberg  <schonberg@adacore.com>
12126         * sem_ch13.adb (Get_Cursor_Type): Obtain cursor type from
12127         specified First primitive, rather than by name.
12128         (Validate_Iterable_Aspect, Resolve_Iterable_Operation): Use it,
12129         and extend error checking for missing primitives and incorrect
12130         signatures.
12132 2014-02-19  Ed Schonberg  <schonberg@adacore.com>
12134         * sem_ch3.adb (Check_Pragma_Implemented): Detect additional
12135         errors when a Synchronization aspect on an overriding protected
12136         operation does not match the given aspect on the overridden
12137         operation of an ancestor interface.
12139 2014-02-19  Hristian Kirtchev  <kirtchev@adacore.com>
12141         * sem_prag.adb (Check_Loop_Pragma_Grouping): New routine.
12142         (Check_Loop_Pragma_Placement): Update
12143         comment on usage. Remove local variables Orig_Stmt and
12144         Within_Same_Sequence. Check that the current Loop_Invariant or
12145         Loop_Variant pragma is grouped together with other such pragmas.
12146         (Is_Loop_Pragma): New routine.
12147         (Prev_In_Loop): Removed.
12149 2014-02-19  Robert Dewar  <dewar@adacore.com>
12151         * par-ch6.adb (P_Return): For extended return, end column lines
12152         up with RETURN.
12153         * par.adb: Minor documentation clarification.
12155 2014-02-19  Yannick Moy  <moy@adacore.com>
12157         * sem_prag.adb (Check_Loop_Pragma_Placement): Add check
12158         that Loop_Invariant and Loop_Variant appear consecutively.
12159         * gnat_rm.texi Update documentation of Loop_Invariant and
12160         Loop_Variant pragmas.
12162 2014-02-19  Robert Dewar  <dewar@adacore.com>
12164         * debug.adb: Document -gnatd.X.
12165         * par-ch5.adb (P_If_Statement): Always check THEN, even if not
12166         first token
12167         (Check_Then_Column): Ditto.
12168         * styleg.adb (Check_Then): Allow THEN on line after IF.
12169         (Check_Then): Check THEN placement under control of -gnatd.X
12170         * styleg.ads (Check_Then): Now called even if THEN is not first
12171         token on line.
12172         * stylesw.ads (Style_Check_If_Then_Layout): Document new
12173         relaxed rules.
12174         * gnat_ugn.texi: For -gnatyi, THEN can now be on line after IF.
12176 2014-02-19  Robert Dewar  <dewar@adacore.com>
12178         * a-cfhama.adb, a-cfhase.adb, a-cforse.adb, a-cofove.adb, a-ngcefu.adb,
12179         a-teioed.adb, a-wtedit.adb, a-ztedit.adb, exp_ch5.adb, inline.adb,
12180         prj-pp.adb, prj-tree.adb, sem_ch12.adb, sem_ch8.adb,
12181         vms_conv.adb: Fix bad layout of IF statements
12183 2014-02-19  Robert Dewar  <dewar@adacore.com>
12185         * exp_util.adb (Side_Effect_Free): Scalar if expressions can be SEF.
12187 2014-02-19  Robert Dewar  <dewar@adacore.com>
12189         * exp_util.adb: Update comments.
12191 2014-02-19  Doug Rupp  <rupp@adacore.com>
12193         * bindgen.adb (Gen_Adainit) [VMS] New global Float_Format.
12194         * init.c (__gl_float_format): [VMS] New global.
12195         (__gnat_set_features): Call FP_CONTROL to set FPSR for the float
12196         representation in effect.
12198 2014-02-19  Hristian Kirtchev  <kirtchev@adacore.com>
12200         * exp_ch6.adb Add with and use clause for Exp_Prag.
12201         (Expand_Contract_Cases): Relocated to Exp_Prag.
12202         * exp_ch6.ads (Expand_Contract_Cases): Relocated to Exp_Prag.
12203         * exp_prag.adb Add with and use clauses for Checks and Validsw.
12204         (Expand_Contract_Cases): Relocated from Exp_Ch6. Update the
12205         structure of the expanded code to showcase the evaluation of
12206         attribute 'Old prefixes. Add local variable Old_Evals. Expand
12207         any attribute 'Old references found within a consequence. Add
12208         circuitry to evaluate the prefixes of attribute 'Old that
12209         belong to a selected consequence.
12210         (Expand_Old_In_Consequence): New routine.
12211         * exp_prag.ads (Expand_Contract_Cases): Relocated from Exp_Ch6.
12212         * sem_attr.adb (Check_Use_In_Contract_Cases): Warn that a
12213         potentially unevaluated prefix is always evaluated.
12215 2014-02-19  Robert Dewar  <dewar@adacore.com>
12217         * exp_attr.adb (Expand_Min_Max_Attribute): Use Insert_Declaration
12218         (Expand_Min_Max_Attribute): Use Matching_Standard_Type.
12219         * exp_ch4.adb (Expand_N_Expression_With_Actions): Remove special
12220         handling for the case of Modify_Tree_For_C, this approach did
12221         not work.
12222         * exp_util.adb (Matching_Standard_Type): New function
12223         (Side_Effect_Free): New top level functions (from
12224         Remove_Side_Effects).
12225         * exp_util.ads (Side_Effect_Free): New top level functions
12226         (moved from body).
12227         * sinfo.ads: Minor comment updates.
12229 2014-02-19  Ed Schonberg  <schonberg@adacore.com>
12231         * exp_ch6.adb (Expand_Simple_Function_Return): If return
12232         type is unconstrained and uses the secondary stack, mark the
12233         enclosing function accordingly, to ensure that the value is not
12234         prematurely removed.
12236 2014-02-19  Hristian Kirtchev  <kirtchev@adacore.com>
12238         * par.adb Alphabetize the routines in Par.Sync.
12239         (Resync_Past_Malformed_Aspect): New routine.
12240         * par-ch13.adb (Get_Aspect_Specifications): Alphabetize local
12241         variables. Code and comment reformatting. Detect missing
12242         parentheses on aspects [Refined_]Global and [Refined_]Depends
12243         with a non-null definition.
12244         * par-sync.adb: Alphabetize all routines in this separate unit.
12245         (Resync_Past_Malformed_Aspect): New routine.
12247 2014-02-19  Robert Dewar  <dewar@adacore.com>
12249         * sem_eval.ads, sem_eval.adb (Subtypes_Statically_Match): Return False
12250         if Esize values do not match.
12252 2014-02-19  Yannick Moy  <moy@adacore.com>
12254         * sinfo.ads: Minor comment update.
12256 2014-02-19  Hristian Kirtchev  <kirtchev@adacore.com>
12258         * atree.ads: Minor reformatting (change Entity_Info to Einfo).
12260 2014-02-19  Thomas Quinot  <quinot@adacore.com>
12262         * exp_ch7.adb (Find_Node_To_Be_Wrapped): An assignment statement
12263         that has the No_Ctrl_Actions flag is a suitable node to be
12264         wrapped if the assigned expression has no finalization actions.
12265         * sem_eval.adb (Eval_Entity_Name): For a compile time known
12266         boolean value, mark the corresponding condition SCO as constant.
12268 2014-02-19  Robert Dewar  <dewar@adacore.com>
12270         * exp_util.adb: Minor reformatting.
12271         * exp_util.ads (Matching_Standard_Type): New function.
12272         * exp_ch7.adb: Minor reformatting.
12274 2014-02-19  Ed Schonberg  <schonberg@adacore.com>
12276         * sem_ch13.adb (Get_Cursor_Type): Use scope of iterable type
12277         to find declaration for Cursor, to handle properly the case of
12278         a discriminated iterable type.
12280 2014-02-19  Vincent Celier  <celier@adacore.com>
12282         * gnatcmd.adb (GNATCmd): Always replace the object dirs of
12283         imported library projects with the library ALI dirs, when setting
12284         the object paths.
12285         * prj-env.ads (Ada_Objects_Path): Correct comments about
12286         argument Including_Libraries.
12288 2014-02-19  Gary Dismukes  <dismukes@adacore.com>
12290         * gnat_rm.texi: Minor spelling fixes.
12292 2014-02-19  Doug Rupp  <rupp@adacore.com>
12294         * init.c: Remove unneeded code.
12295         * fe.h (Float_Format): New macro
12296         * gcc-interface/trans.c (gigi): On VMS, set vms_float_format.
12298 2014-02-19  Hristian Kirtchev  <kirtchev@adacore.com>
12300         * sem_prag.adb (Check_Refined_Global_Item):
12301         A state or variable acts as a constituent only it is part of an
12302         encapsulating state and the state has visible refinement.
12304 2014-02-19  Ed Schonberg  <schonberg@adacore.com>
12306         * sem_ch6.adb (Analyze_Subprogram_Contract): Do not warn on a
12307         postcondition for a function when the expression does not mention
12308         'Result but the function has in-out parameters.
12310 2014-02-19  Robert Dewar  <dewar@adacore.com>
12312         * gnat_rm.texi: Add documentation on Value_Size forcing biased
12313         representation.
12315 2014-02-19  Hristian Kirtchev  <kirtchev@adacore.com>
12317         * lib-xref.ads Remove the small table of letter and symbol usage as we
12318         already have one.
12320 2014-02-19  Hristian Kirtchev  <kirtchev@adacore.com>
12322         * sem_ch6.adb (Analyze_Subprogram_Body_Helper): Emit specific error
12323         messages depending on the offending misplaced aspect specifications.
12324         (Diagnose_Misplaced_Aspect_Specifications): New routine.
12326 2014-02-19  Ed Schonberg  <schonberg@adacore.com>
12328         * sem_ch13.adb (Get_Cursor): Utility to retrieve cursor type
12329         for iterable aspect primitives.
12330         (Resolve_Iterable_Operation): Use expected signature of iterable
12331         aspect to resolve primitive when overloading is present.
12332         (Validate_Iterable_Aspect, Analyze_Aspects_At_Freeze_Point): use it.
12333         (Check_Signature): Removed.
12335 2014-02-19  Yannick Moy  <moy@adacore.com>
12337         * sem_ch10.adb (Analyze_Proper_Body): Issue error on missing
12338         subunit in GNATprove_Mode.
12339         * sinfo.ads (GNATprove_Mode): Document error issued in GNATprove_Mode.
12341 2014-02-19  Hristian Kirtchev  <kirtchev@adacore.com>
12343         * lib-xref.ads Alphabetize the contents of table
12344         Xref_Entity_Letters. Add an entry in table Xref_Entity_Letters
12345         for E_Abstract_State. List all letters and symbols in use.
12346         * sem_prag.adb (Analyze_Abstract_State): Update all calls
12347         to Create_Abstract_State to reflect the new signature.
12348         (Create_Abstract_State): Change subprogram profile and update
12349         the comment on usage. Use the proper location of the state
12350         declaration when creating a new abstract state entity. Do not
12351         generate an external name, but simply reuse the name coming from
12352         the state declaration.
12354 2014-02-19  Robert Dewar  <dewar@adacore.com>
12356         * exp_ch4.adb (Expand_N_Expression_With_Actions): Make sure
12357         declarations get properly inserted in Modify_Tree_For_C mode.
12358         * sinfo.ads: Minor comment addition.
12360 2014-02-19  Robert Dewar  <dewar@adacore.com>
12362         * par-ch9.adb, exp_ch5.adb, sem_ch5.adb, exp_attr.adb, sem_util.adb,
12363         sem_util.ads, sem_ch13.adb, sem_ch13.ads: Minor reformatting.
12365 2014-02-19  Ed Schonberg  <schonberg@adacore.com>
12367         * style.adb (Missing_Overriding): Warning does not apply in
12368         language versions prior to Ada 2005.
12369         * snames.ads-tmpl: Add Name_Iterable and Attribute_Iterable.
12370         * sem_attr.adb: Add Attribute_Iterable where needed.
12371         * exp_attr.adb: ditto.
12372         * exp_ch5.adb (Expand_Formal_Container_Loop): New procedure to
12373         handle loops and quantified expressions over types that have an
12374         iterable aspect.  Called from Expand_Iterator_Loop.
12375         * sem_ch5.adb (Analyze_Iterator_Specification): Recognize types
12376         with Iterable aspect.
12377         * sem_ch13.adb (Validate_Iterable_Aspect): Verify that the
12378         subprograms specified in the Iterable aspect have the proper
12379         signature involving container and cursor.
12380         (Check_Aspect_At_Freeze_Point): Analyze value of iterable aspect.
12381         * sem_ch13.ads (Validate_Iterable_Aspect): New subprogram.
12382         * sem_util.ads, sem_util.adb (Get_Iterable_Type_Primitive):
12383         New procedure to retrieve one of the primitives First, Last,
12384         or Has_Element, from the value of the iterable aspect of a
12385         formal container.
12386         (Is_Container_Element): Predicate to recognize expressions
12387         that denote an element of one of the predefined containers,
12388         for possible optimization.  This subprogram is not currently
12389         used, pending ARG discussions on the legality of the proposed
12390         optimization. Worth preserving for eventual use.
12391         (Is_Iterator): Recognize formal container types.
12392         * aspects.ads, aspects.adb: Add Aspect_Iterable where needed.
12394 2014-02-19  Robert Dewar  <dewar@adacore.com>
12396         * exp_attr.adb (Expand_Min_Max_Attribute): New procedure
12397         (Expand_N_Attribute_Reference): Use this procedure for Min and Max.
12398         * exp_ch4.adb (Expand_N_Expression_With_Actions): Remove object
12399         declarations from list of actions.
12400         * output.ads, output.adb (Delete_Last_Char): New procedure.
12401         * sinfo.ads: Document handling of Mod and expression with actions
12402         in Modify_Tree_For_C mode.
12404 2014-02-19  Ed Schonberg  <schonberg@adacore.com>
12406         * par-ch9.adb (P_Task): Add a null statement to produce a
12407         well-formed task body when due to a previous syntax error the
12408         statement list is empty.
12410 2014-02-19  Hristian Kirtchev  <kirtchev@adacore.com>
12412         * sem_prag.adb (Check_Dependency_Clause): Account
12413         for the case where a state with a non-null refinement matches a
12414         null output list. Comment reformatting.
12415         (Inputs_Match): Copy a solitary input to avoid an assertion failure
12416         when trying to match the same input in multiple clauses.
12418 2014-02-19  Gary Dismukes  <dismukes@adacore.com>
12420         * sem_attr.adb: Minor typo fix.
12422 2014-02-18  Robert Dewar  <dewar@adacore.com>
12424         * cstand.adb (Build_Signed_Integer_Type): Minor change of formal
12425         from Int to Nat (Build_Unsigned_Integer_Type): New procedure
12426         (Create_Standard): Create new unsigned types.
12427         * exp_ch4.adb (Expand_N_Op_Mod): Expand mod in Modify_Tree_For_C
12428         mode (Expand_N_Reference): Removed, problematic and not needed
12429         for now.
12430         * exp_ch4.ads (Expand_N_Reference): Removed, problematic and
12431         not needed for now.
12432         * exp_util.ads, exp_util.adb (Power_Of_Two): New function.
12433         * expander.adb: Remove call to Expand_N_Reference (problematic,
12434         and not needed now).
12435         * sem_aux.ads, sem_aux.adb (Corresponding_Unsigned_Type): New function.
12436         * stand.adb: Read and write unsigned type entities.
12437         * stand.ads: Add new unsigned types.
12439 2014-02-18  Hristian Kirtchev  <kirtchev@adacore.com>
12441         * sem_ch4.adb (Analyze_Call): Do not mark a function call
12442         as being inside an assertion expression as the flag is now removed.
12443         (Check_Ghost_Subprogram_Call): Do not query the
12444         In_Assertion_Expression flag as it is now removed, instead use
12445         a predicate function.
12446         * sem_elab.adb (Check_Internal_Call_Continue): Do not query the
12447         In_Assertion_Expression flag as it is now removed, instead use
12448         a predicate function.
12449         * sem_prag.ads: Add new table Assertion_Expression_Pragma.
12450         * sem_util.adb Add with and use clause for Sem_Prag.
12451         (In_Assertion_Expression_Pragma): New routine.
12452         * sem_util.ads (In_Assertion_Expression_Pragma): New routine.
12453         * sinfo.adb (In_Assertion_Expression): Removed.
12454         (Set_In_Assertion_Expression): Removed.
12455         * sinfo.ads Remove flag In_Assertion_Expression along with its
12456         use in nodes.
12457         (In_Assertion_Expression): Removed along with
12458         pragma Inline.  (Set_In_Assertion_Expression): Removed along
12459         with pragma Inline.
12461 2014-02-18  Sergey Rybin  <rybin@adacore.com frybin>
12463         * gnat_ugn.texi: gnatpp section: add note that '-j' cannot be
12464         used together with '-r', '-rf' or '-rnb' options.
12466 2014-02-18  Hristian Kirtchev  <kirtchev@adacore.com>
12468         * sem_attr.adb (Analyze_Attribute): Comment
12469         and code reformatting. Use separate routines to check the
12470         legality of attribute 'Old in certain pragmas. Verify
12471         the use of 'Old, 'Result and locally declared entities
12472         within the prefix of 'Old.
12473         (Check_References_In_Prefix): New routine.
12474         (Check_Use_In_Contract_Cases): New routine.
12475         (Check_Use_In_Test_Case): New routine.
12477 2014-02-18  Vincent Celier  <celier@adacore.com>
12479         * sem_aux.adb (Is_By_Reference_Type): For each components of
12480         a record type, check also if the component is volatile as it
12481         may have an aspect that makes it volatile. If it is, then the
12482         record type is a by reference type.
12484 2014-02-18  Robert Dewar  <dewar@adacore.com>
12486         * exp_attr.adb: Minor reformatting.
12487         * exp_ch4.ads, exp_ch4.adb (Expand_N_Reference): New procedure.
12488         * exp_util.adb (Remove_Side_Effects): Add conditional expressions
12489         as another case where we don't generate N_Reference nodes for
12490         primitive types.
12491         * expander.adb (Expand): Add call to Expand_N_Reference.
12493 2014-02-06  Hristian Kirtchev  <kirtchev@adacore.com>
12495         * sem_prag.adb (Analyze_Refined_Pragma): Remove
12496         local variable Pack_Spec. Refinement pragmas may now apply to
12497         bodies of both visible and private subprograms.
12499 2014-02-06  Robert Dewar  <dewar@adacore.com>
12501         * exp_attr.adb (Expand_Loop_Entry_Attribute):
12502         Minor change (Attr => N) (Expand_Pred_Succ): New name
12503         Expand_Pred_Succ_Attribute (Expand_N_Attribute_Reference, case
12504         Max): Expand into if expression if Modify_Tree_For_C mode.
12505         (Expand_N_Attribute_Reference, case Min): ditto
12506         * sinfo.ads: Modify_Tree_For_C takes care of expanding Min and
12507         Max attributes.
12509 2014-02-06  Ed Schonberg  <schonberg@adacore.com>
12511         * sem_ch3.adb (Analyze_Object_Declaration): Do not generate
12512         predicate check if this is an internal declaration with
12513         No_Initialization set, as for an expanded aggregate component.
12515 2014-02-06  Doug Rupp  <rupp@adacore.com>
12517         * init.c (__gnat_default_resignal_p) [VMS]: Test for and resignal
12518         conditions with severity of "SUCCESS" or "INFORMATIONAL".
12520 2014-02-06  Yannick Moy  <moy@adacore.com>
12522         * sem_prag.adb (Analyze_Pragma): Analyze pragma
12523         Debug rewritten node before rewriting it as a null statement in
12524         GNATprove mode.
12526 2014-02-06  Robert Dewar  <dewar@adacore.com>
12528         * sem_attr.adb (Min_Max): New procedure.
12529         (Max_Alignment_For_Allocation_Max_Size_In_Storage_Elements): New
12530         procedure.
12532 2014-02-06  Sergey Rybin  <rybin@adacore.com frybin>
12534         * gnat_ugn.texi, vms_data.ads: Add documentation of '-t' option for
12535         gnatmetric/gnatpp.
12537 2014-02-06  Hristian Kirtchev  <kirtchev@adacore.com>
12539         * sem_prag.adb (Analyze_Abstract_State): Update
12540         all calls to Create_Abstract_State to pass the proper state
12541         "declaration".
12542         (Create_Abstract_State): Add new formal parameter
12543         State_Decl along with comment on usage. Establish a link between
12544         the abstract state entity and the state declaration.
12546 2014-02-06  Robert Dewar  <dewar@adacore.com>
12548         * sem_attr.adb (Analyze_Attribute, case Max): Check for improper
12549         comparison of unordered enumeration type.
12550         (Analyze_Attribute, case Max): Check for improper comparison of
12551         unordered enumeration type.
12552         * sem_res.adb (Bad_Unordered_Enumeration_Reference): Moved to
12553         sem_util.adb.
12554         * sem_util.ads, sem_util.adb (Bad_Unordered_Enumeration_Reference):
12555         Moved here from Sem_Res.
12557 2014-02-06  Robert Dewar  <dewar@adacore.com>
12559         * sem_ch3.adb, sem_prag.adb, sem_res.adb, lib-xref.adb: Minor
12560         reformatting.
12562 2014-02-06  Hristian Kirtchev  <kirtchev@adacore.com>
12564         * sem_ch6.adb (Process_Formals): Error message reformatting.
12566 2014-02-06  Hristian Kirtchev  <kirtchev@adacore.com>
12568         * sem_ch3.adb (Handle_Late_Controlled_Primitive): Add local
12569         variable Spec. Do not inherit the null indicator from the
12570         subprogram body when generating the spec.
12572 2014-02-06  Robert Dewar  <dewar@adacore.com>
12574         * casing.adb (Determine_Casing): Consider SPARK_Mode to be
12575         mixed case.
12577 2014-02-06  Ed Schonberg  <schonberg@adacore.com>
12579         * exp_ch6.adb (Is_Build_In_Place_Function): Predicate is false
12580         when the function has a foreign convention, but not if only the
12581         limited return type has such a convention.
12583 2014-02-06  Hristian Kirtchev  <kirtchev@adacore.com>
12585         * sem_ch3.adb (Handle_Late_Controlled_Primitive): Remove local
12586         variable Spec. Comment reformatting. Use Copy_Separate_Tree
12587         rather than New_Copy_Tree when building the corresponding
12588         subprogram declaration.
12590 2014-02-06  Hristian Kirtchev  <kirtchev@adacore.com>
12592         * sem_prag.adb (Analyze_Global_Item): Remove
12593         the mode-related checks on abstract states with enabled external
12594         properties.
12595         (Property_Error): Removed.
12597 2014-02-06  Javier Miranda  <miranda@adacore.com>
12599         * lib-xref.adb (Generate_Reference): When
12600         generating the reference to the first private entity take care
12601         of handling swapped entities.
12603 2014-02-06  Sergey Rybin  <rybin@adacore.com frybin>
12605         * gnat_ugn.texi, vms_data.ads: Add documentation of -j option for
12606         gnatmetric.
12608 2014-02-06  Robert Dewar  <dewar@adacore.com>
12610         * exp_ch4.adb (Expand_N_Shift_Left): Handle shift counts greater
12611         than the word size when operating in Modify_Tree_For_C mode.
12612         * sinfo.ads: Add documentation section on Modify_Tree_For_C mode.
12614 2014-02-06  Robert Dewar  <dewar@adacore.com>
12616         * erroutc.adb (Warning_Specifically_Suppressed.Matches):
12617         compare is case insensitive.
12618         * gnat_rm.texi: Document that string compare for Warnings Off
12619         is now case insensitive.
12621 2014-02-06  Eric Botcazou  <ebotcazou@adacore.com>
12623         * gnat_rm.texi: Small wording tweak.
12625 2014-02-06  Pascal Obry  <obry@adacore.com>
12627         * prj-attr.adb, projects.texi, snames.ads-tmpl: Add Included_Patterns
12628         and Included_Artifact_Patterns attribute definitions.
12630 2014-02-06  Yannick Moy  <moy@adacore.com>
12632         * sem_ch6.adb (Analyze_Subprogram_Body_Helper): Set
12633         SPARK_Mode pragma component for all subprograms, including stubs.
12635 2014-02-06  Hristian Kirtchev  <kirtchev@adacore.com>
12637         * sem_ch10.adb (Analyze_Package_Body_Stub): Maintain
12638         the configuration options of the enclosing context in a
12639         stack-like fasion.
12640         (Analyze_Subprogram_Body_Stub): Maintain the
12641         configuration options of the enclosing context in a stack-like
12642         fashion.
12644 2014-02-06  Robert Dewar  <dewar@adacore.com>
12646         * debug.adb: -gnatd.u sets Modify_Tree_For C
12647         * exp_ch4.adb (Expand_N_Op_Rotate_Left): Expand out
12648         if Modify_Tree_For_C (Expand_N_Op_Rotate_Right): ditto.
12649         (Expand_N_Op_Arithmetic_Right_Shift): ditto.
12650         * exp_intr.adb (Expand_Shift): Call expander so we do
12651         Modify_Tree_For_C expansions.
12652         * gnat1drv.adb (Adjust_Global_Switches): Set Modify_Tree_For_C
12653         if -gnatd.u set.
12655 2014-02-06  Fedor Rybin  <frybin@adacore.com>
12657         * prj-proc.ads (Tree_Loaded_Callback): new type Callback used
12658         after the phase 1 of the processing of each aggregated project
12659         to get access to project trees of aggregated projects.
12660         (Process_Project_Tree_Phase_1): new parameter On_New_Tree_Loaded
12661         If specified, On_New_Tree_Loaded is called after each aggregated
12662         project has been processed succesfully.
12663         (Process): new parameter On_New_Tree_Loaded.
12664         * prj-proc.adb (Process_Aggregated_Projects): On_New_Tree_Loaded
12665         callback added after processing of each aggregated project.
12666         (Recursive_Process): new parameter On_New_Tree_Loaded.
12667         (Process): new parameter On_New_Tree_Loaded.
12668         (Process_Project_Tree_Phase_1): new parameter On_New_Tree_Loaded.
12669         * prj-conf.ads (Parse_Project_And_Apply_Config): new parameter
12670         On_New_Tree_Loaded.
12671         * prj-conf.adb (Parse_Project_And_Apply_Config): new parameter
12672         On_New_Tree_Loaded.
12674 2014-02-06  Bob Duff  <duff@adacore.com>
12676         * gnat_ugn.texi: Implement --insert-blank-lines and
12677         --preserve-blank-lines switches.
12679 2014-02-06  Sergey Rybin  <rybin@adacore.com frybin>
12681         * gnat_ugn.texi, vms_data.ads: Add documentation of -j option for
12682         gnatelim.
12684 2014-02-06  Eric Botcazou  <ebotcazou@adacore.com>
12686         * gnat_rm.texi (Pragma Optimize_Alignment): Document the effect
12687         of the pragma on individual objects.
12689 2014-02-06  Hristian Kirtchev  <kirtchev@adacore.com>
12691         * einfo.adb Node29 is now used as BIP_Initialization_Call.
12692         (BIP_Initialization_Call): New routine.
12693         (Set_BIP_Initialization_Call): New routine.
12694         (Write_Field29_Name): Add an entry for constants and variables.
12695         * einfo.ads Add new attribute BIP_Initialization_Call and update
12696         its usage in nodes.
12697         (BIP_Initialization_Call): New routine along with pragma Inline.
12698         (Set_BIP_Initialization_Call): New routine along with pragma Inline.
12699         * exp_ch6.adb (Make_Build_In_Place_Call_In_Object_Declaration):
12700         Add local declaration Res_Decl. Capture the build-in-place
12701         initialization call when the related object declaration has
12702         created a transient block.
12703         * exp_ch7.adb (Process_Transient_Objects): Add local variable
12704         Fin_Insrt. Recognize a scenario where an object declaration acts
12705         as a transient context and is initialized by a build-in-place
12706         function call.
12708 2014-02-06  Pascal Obry  <obry@adacore.com>
12710         * prj-util.adb (For_Interface_Sources): Fix handling of required
12711         bodies for aggregate libs.
12713 2014-02-06  Robert Dewar  <dewar@adacore.com>
12715         * nlists.ads: Minor comment clarifications.
12717 2014-02-06  Robert Dewar  <dewar@adacore.com>
12719         * gnat1drv.adb (Adjust_Global_Switches): Set Modify_Tree_For_C
12720         if gnatd.V set.
12721         * opt.ads (Modify_Tree_For_C): New flag.
12722         * output.ads, output.adb (Last_Char): New function.
12724 2014-02-06  Pascal Obry  <obry@adacore.com>
12726         * projects.texi, prj-env.adb (Initialize_Default_Project_Path): Add
12727         share/gpr for cross-builds.
12729 2014-02-06  Robert Dewar  <dewar@adacore.com>
12731         * exp_util.ads, checks.adb, sem_prag.adb, prj-util.adb, sem_ch13.adb:
12732         Minor reformatting and code clean ups.
12734 2014-02-06  Pascal Obry  <obry@adacore.com>
12736         * prj-util.adb (For_Interface_Sources): Skip non compilable languages.
12737         * prj.ads: Minor typo fix in comment.
12739 2014-02-06  Hristian Kirtchev  <kirtchev@adacore.com>
12741         * sem_prag.adb (Analyze_Depends_In_Decl_Part): Add
12742         local variable Expr. Flag clauses with extra parenthesis as this
12743         is not allowed by the syntax of the pragma. Code reformatting.
12745 2014-02-06  Hristian Kirtchev  <kirtchev@adacore.com>
12747         * exp_attr.adb (Expand_N_Attribute_Reference): Alphabetize
12748         variables. Rename variabme Tnn to Temp. Do not create a temporary
12749         if assertions are disabled. Find enclosing routine _Postconditions
12750         and insert the temporary that captures the value of the prefix
12751         before the routine.
12752         * exp_ch6.adb (Build_Postconditions_Procedure):
12753         Insert the generated _Postconditions routine
12754         before the first source declaration of the related
12755         subprogram.
12756         (Insert_After_Last_Declaration): Removed.
12757         (Insert_Before_First_Source_Declaration): New routine.
12759 2014-02-06  Ed Schonberg  <schonberg@adacore.com>
12761         * exp_util.adb, exp_util.ads (Within_Internal_Subprogram):
12762         Utility to determine whether current expansion is for the body
12763         of a predefined primitive operation.
12764         (Make_Predicate_Check): Use Within_Internal_Subpgram
12765         * checks.adb (Apply_Predicate_Check): Use
12766         Within_Internal_Subprogram
12767         * sem_ch13.adb (Freeze_Entity_Checks): Ditto.
12769 2014-02-06  Pascal Obry  <obry@adacore.com>
12771         * prj.ads, prj-util.adb: Minor reformatting.
12773 2014-02-06  Ed Schonberg  <schonberg@adacore.com>
12775         * exp_ch6.adb (Expand_Subprogram_Contract, Append_Enabled_Item):
12776         Take into account the Split_PPC flag to ensure that conjuncts
12777         in a composite postcondition aspect are tested in source order.
12779 2014-02-06  Hristian Kirtchev  <kirtchev@adacore.com>
12781         * sem_ch6.adb (Analyze_Generic_Subprogram_Body): Flag illegal
12782         use of SPARK_Mode.
12783         * sem_ch12.adb (Analyze_Generic_Subprogram_Declaration): Flag
12784         illegal use of SPARK_Mode.
12785         (Instantiate_Subprogram_Body): Flag illegal use of SPARK_Mode.
12786         * sem_prag.adb (Analyze_Pragma): Code reformatting.
12787         * sem_util.adb Add with and use clause for Aspects.
12788         (Check_SPARK_Mode_In_Generic): New routine.
12789         * sem_util.ads (Check_SPARK_Mode_In_Generic): New routine.
12791 2014-02-06  Thomas Quinot  <quinot@adacore.com>
12793         * a-calend.adb (Formatting_Operations.Split): Ensure that
12794         Time_Error is raised for invalid time values.
12796 2014-02-06  Arnaud Charlet  <charlet@adacore.com>
12798         * sem_prag.adb (Analyze_Pragma): Rewrite as a null statement
12799         in GNATprove_Mode.
12801 2014-02-06  Robert Dewar  <dewar@adacore.com>
12803         * einfo.ads, einfo.adb (Is_Discriminant_Check_Function): New flag.
12804         * exp_ch3.adb (Build_Dcheck_Function): Set
12805         Is_Discriminant_Check_Function.
12807 2014-02-06  Hristian Kirtchev  <kirtchev@adacore.com>
12809         * exp_ch7.adb (Is_Subprogram_Call): Inspect
12810         the original tree in certain cases where a construct has been
12811         factored out and replaced by a reference to a temporary.
12813 2014-02-06  Ed Schonberg  <schonberg@adacore.com>
12815         * sem_ch3.adb (Process_Full_View): Fix typo in the order of
12816         parameters when propagating predicate function to full view.
12817         (Find_Type_Of_Object): Freeze base type of object type to catch
12818         premature use of discriminated private type without a full view.
12820 2014-02-06  Robert Dewar  <dewar@adacore.com>
12822         * sprint.adb: Minor reformatting.
12824 2014-02-06  Hristian Kirtchev  <kirtchev@adacore.com>
12826         * exp_ch4.adb (Process_Transient_Object): Add local variable
12827         Temp_Ins. When the transient object is initialized by an
12828         aggregate, the hook must capture the object after the last
12829         component assignment takes place.
12830         * exp_ch7.adb (Detect_Subprogram_Call): Expose the subprogram to
12831         routine Is_Subprogram_Call.
12832         (Is_Subprogram_Call): Inspect an
12833         aggregate that has been heavily expanded for subprogram calls.
12834         (Process_Transient_Objects): Add local variables Expr, Ptr_Id
12835         and Temp_Ins.  Remove the nested declare block and adjust the
12836         indentation. When the transient object is initialized by an
12837         aggregate, the hook must capture the object after the last
12838         component assignment takes place.
12840 2014-02-06  Hristian Kirtchev  <kirtchev@adacore.com>
12842         * sem_prag.adb (Analyze_Global_Item): Detect illegal uses of
12843         external states with enabled properties that do not match the
12844         global mode.
12845         (Property_Error): New routine.
12846         * sem_res.adb (Property_Error): New routine.
12847         (Resolve_Actuals): Detect illegal uses of external variables with
12848         enabled properties in procedure calls that do not match the mode of
12849         the corresponding formal parameter.
12851 2014-02-06  Hristian Kirtchev  <kirtchev@adacore.com>
12853         * sem_util.adb (Has_Enabled_Property): Rename
12854         formal parameter Prop_Nam to Property. Update the comment on usage
12855         and all occurrences in the body. Add local variable Prop_Nam. When
12856         inspecting a property with an expression, the property name
12857         appears as the first choice of the component association.
12859 2014-02-04  Robert Dewar  <dewar@adacore.com>
12861         * exp_ch5.adb, einfo.ads, freeze.adb, sem_ch8.adb: Minor reformatting.
12863 2014-02-04  Gary Dismukes  <dismukes@adacore.com>
12865         * sem_aggr.adb: Change "runtime" to "run time" in warning message,
12866         for consistency with other messages.
12868 2014-02-04  Ed Schonberg  <schonberg@adacore.com>
12870         * exp_ch5.adb  (Expand_Iterator_Loop):  For a container element
12871         iterator, indicate that the element is a constant if the container
12872         type does not have a variable indexing aspect.
12873         * sem_ch8.adb (Analyze_Object_Renaming): If the entity is already
12874         marked as constant, do not reset its Ekind, to ensure that
12875         container elements in an element loop are not modified if the
12876         container (e.g. a hashed set) only has a constant indexing aspect.
12878 2014-02-04  Arnaud Charlet  <charlet@adacore.com>
12880         * g-souinf.ads: Subprograms in this unit are actually not pure.
12881         * freeze.adb (Freeze_Subprogram): Do not reset Is_Pure for Intrinsics.
12882         * einfo.ads (Is_Pure): Update doc to match implementation.
12884 2014-02-04  Gary Dismukes  <dismukes@adacore.com>
12886         * exp_ch13.adb: Minor spelling fix.
12888 2014-02-04  Robert Dewar  <dewar@adacore.com>
12890         * opt.ads: Minor comment update.
12892 2014-02-04  Robert Dewar  <dewar@adacore.com>
12894         * exp_ch4.adb (Expand_N_Expression_With_Actions): Use Rewrite
12895         instead of Replace.
12897 2014-02-04  Ed Schonberg  <schonberg@adacore.com>
12899         * sem_aggr.adb (Resolve_Array_Aggregate): Suppress warnings
12900         on null expressions if component type is non-null, when the
12901         corresponding association covers an empty range of index values.
12903 2014-02-04  Robert Dewar  <dewar@adacore.com>
12905         * sinfo.ads: Further comments on N_Expression_With_Actions node.
12907 2014-02-04  Hristian Kirtchev  <kirtchev@adacore.com>
12909         * sem_prag.adb (Analyze_Refined_Depends_In_Decl_Part): Remove global
12910         variables Out_Items and Ref_Global. Remove local constant
12911         Body_Id along with dummy variables D1, D2, D3, D4, D5, D6, D7
12912         and D8. Remove the useless collection of global items as this
12913         was a leftover from an earlier version of the routine. Move
12914         several routines out to avoid deep nesting and indentation.
12915         (Inputs_Match): Add formal parameter Dep_Clause. Rename formal
12916         parameter Do_Checks to Post_Errors. Update the comment on usage.
12917         (Is_Matching_Input): Renamed to Input_Match. Add formal parameters
12918         Ref_Inputs and Do_Checks. Rename formal parameter Do_Checks
12919         to Post_Errors. Update the comment on usage. Account for the
12920         case where a self referential state may have a null input_list.
12921         (Is_Self_Referential): New routine.
12923 2014-02-04  Ed Schonberg  <schonberg@adacore.com>
12925         * sem_ch13.adb (Analyze_Attribute_Definition_Clause): If the
12926         entity renames an expression, as in the case of an object of
12927         an unconstrained type initialized by a function call, defer the
12928         rewriting of the expression to the expander.
12929         * exp_ch13.adb (Expand_N_Attribute_Definition_Clause, case
12930         'Alignment): If the entity renames an expression, introduce
12931         temporary to capture value, and rewrite original declaration to
12932         use temporary.
12934 2014-02-04  Gary Dismukes  <dismukes@adacore.com>
12936         * g-comlin.adb: Minor typo fix.
12938 2014-02-04  Ed Schonberg  <schonberg@adacore.com>
12940         * freeze.adb (Freeze_All): Types derived from a formal
12941         access_to_classwide type do not have a finalization master.
12943 2014-02-04  Robert Dewar  <dewar@adacore.com>
12945         * sprint.adb: Minor reformatting.
12947 2014-02-04  Robert Dewar  <dewar@adacore.com>
12949         * exp_ch4.adb (Expand_N_Expression_With_Actions): Eliminate
12950         cases where Actions is a null list.
12951         * sinfo.ads (N_Expression_With_Actions): Actions can be
12952         temporarily empty during semantic analysis, but must be non-empty
12953         in the final expanded tree.
12955 2014-01-31  Robert Dewar  <dewar@adacore.com>
12957         * exp_ch9.adb: Minor reformatting.
12959 2014-01-31  Emmanuel Briot  <briot@adacore.com>
12961         * g-comlin.adb (Set_Command_Line): Take the switches
12962         configuration from the Command_Line_Config.
12964 2014-01-31  Hristian Kirtchev  <kirtchev@adacore.com>
12966         * sem_prag.adb (Analyze_Refinement_Clause): Guard against a malformed
12967         refinement clause.
12969 2014-01-31  Vincent Celier  <celier@adacore.com>
12971         * projects.texi: Add more documentation about others used as an
12972         index in indexed attributes.
12974 2014-01-31  Robert Dewar  <dewar@adacore.com>
12976         * gnat_ugn.texi: Minor update.
12977         * gnat_rm.texi: Add example to Restriction_Warnings documentation.
12978         * exp_util.adb: Minor reformatting.
12980 2014-01-31  Ed Schonberg  <schonberg@adacore.com>
12982         * exp_ch9.adb (Expand_Entry_Barrier): Warn if the barrier
12983         depends on data that is not private to the protected object,
12984         and potentially modifiable in unsynchronized fashion.
12986 2014-01-31  Yannick Moy  <moy@adacore.com>
12988         * erroutc.adb (Validate_Specific_Warnings): Remove special case for
12989         GNATprove_Mode.
12991 2014-01-31  Robert Dewar  <dewar@adacore.com>
12993         * prj-attr.ads (First_Attribute_Of): Returns Empty_Attribute
12994         for Unknown_Package.
12995         * sem_ch6.adb, sem_attr.adb: Minor comment addition.
12997 2014-01-31  Hristian Kirtchev  <kirtchev@adacore.com>
12999         * exp_util.adb (Build_Allocate_Deallocate_Proc): Rewrite
13000         the logic that generates a runtime check to determine the
13001         controlled status of the object about to be allocated or
13002         deallocated. Class-wide types now always use a runtime check
13003         even if they appear as generic actuals.
13004         (Find_Object): Detect
13005         a special case that involves interface class-wide types because
13006         the object appears as a complex expression.
13008 2014-01-31  Ed Schonberg  <schonberg@adacore.com>
13010         * sem_ch6.adb (Process_Formals): In Ada2012 mode, place
13011         subprogram with an incomplete untagged formals on the list of
13012         private dependents, to verify that the type is properly completed
13013         in the private part.
13014         * sem_attr.adb: Code clean up.
13016 2014-01-31  Robert Dewar  <dewar@adacore.com>
13018         * exp_ch6.adb: Minor reformatting.
13020 2014-01-31  Vincent Celier  <celier@adacore.com>
13022         * prj-attr.adb (First_Attribute_Of): Return Unknown_Attribute
13023         when Pkg is unknown.
13025 2014-01-31  Hristian Kirtchev  <kirtchev@adacore.com>
13027         * sem_res.adb (Resolve_Entity_Name): Comment
13028         reformatting. Allow volatile objects in various generated checks.
13030 2014-01-31  Ed Schonberg  <schonberg@adacore.com>
13032         * sem_attr.adb (Analyze_Attribute, case 'Update): For a record
13033         component association, set the etype of the identifier, for
13034         SPARK use.
13036 2014-01-31  Ed Schonberg  <schonberg@adacore.com>
13038         * exp_ch6.adb (Has_Visibility_Of_Subprogram): If type is not
13039         declared in a package, not checks can apply to the subprogram.
13041 2014-01-31  Robert Dewar  <dewar@adacore.com>
13043         * erroutc.adb (Validate_Specific_Warnings): Warnings are
13044         controlled -gnatw.W.
13045         * gnat_ugn.texi: Document new warnings controlled by -gnatw.w.
13046         * opt.ads (Warn_On_Warnings_Off): Now controls more cases.
13048 2014-01-31  Arnaud Charlet  <charlet@adacore.com>
13050         * exp_disp.adb: Update comments.
13052 2014-01-31  Yannick Moy  <moy@adacore.com>
13054         * sem_ch12.adb (Analyze_Generic_Subprogram_Declaration,
13055         Save_Global_References): Guard access to expression in aspect.
13057 2014-01-31  Yannick Moy  <moy@adacore.com>
13059         * sem_prag.adb (Analyze_Pragma/Pragma_SPARK_Mode):
13060         Issue an error when the pragma is applied to a generic unit,
13061         a generic declaration, or inside a generic.
13063 2014-01-31  Yannick Moy  <moy@adacore.com>
13065         * sem_ch8.adb (Analyze_Subprogram_Renaming): Set SPARK_Mode on renaming
13066         entity.
13068 2014-01-31  Robert Dewar  <dewar@adacore.com>
13070         * exp_ch9.adb, s-tassta.adb, s-tposen.adb, s-tposen.ads: Minor
13071         reformatting.
13073 2014-01-31  Tristan Gingold  <gingold@adacore.com>
13075         * exp_disp.adb: Add a historic note.
13077 2014-01-31  Robert Dewar  <dewar@adacore.com>
13079         * sem_warn.adb (Warn_On_Useless_Assignments): Add call to
13080         Process_Deferred_References.
13082 2014-01-31  Yannick Moy  <moy@adacore.com>
13084         * erroutc.adb (Validate_Specific_Warnings): Do not issue a message for
13085         ineffective pragma Warnings(Off) in GNATprove_Mode.
13087 2014-01-31  Bob Duff  <duff@adacore.com>
13089         * s-taskin.ads: Minor comment fix.
13090         * s-tassta.adb (Abort_Dependents): Don't abort all dependents;
13091         just direct dependents. If this is actually an abort, each task
13092         will take care of aborting its dependents, so all dependents will
13093         get aborted, as before. However, when this is called the second
13094         time from Vulnerable_Complete_Master "for convenience" (i.e. to
13095         kill off tasks waiting at terminate alternatives), aborting
13096         indirect dependents is wrong, because it causes some unrelated
13097         tasks to get aborted.
13099 2014-01-31  Robert Dewar  <dewar@adacore.com>
13101         * sem_ch4.adb: Minor reformatting.
13103 2014-01-31  Robert Dewar  <dewar@adacore.com>
13105         * exp_ch2.adb: New calling sequence for Is_LHS.
13106         * frontend.adb: Add call to Process_Deferred_References.
13107         * lib-xref.ads, lib-xref.adb (Process_Deferred_References): New.
13108         (Deferred_References): New table.
13109         * sem_ch8.adb (Find_Direct_Name): Make deferred reference table
13110         entries.
13111         (Find_Expanded_Name): Ditto.
13112         * sem_res.adb: New calling sequence for Is_LHS.
13113         * sem_util.ads, sem_util.adb (Is_LHS): New calling sequence.
13114         * sem_warn.adb: Call Process_Deferred_References before issuing
13115         warnings.
13117 2014-01-31  Tristan Gingold  <gingold@adacore.com>
13119         * exp_util.adb (Corresponding_Runtime_Package): Restrict the
13120         use of System_Tasking_Protected_Objects_Single_Entry.
13121         * exp_ch9.adb (Build_Simple_Entry_Call): Remove Mode parameter
13122         of Protected_Single_Entry_Call.
13123         (Expand_N_Timed_Entry_Call): Remove single_entry case.
13124         * exp_disp.adb (Make_Disp_Asynchronous_Select_Body): Remove
13125         single_entry case.
13126         (Make_Disp_Timed_Select_Body): Likewise.
13127         * rtsfind.ads (RE_Timed_Protected_Single_Entry_Call): Remove.
13128         * s-tposen.adb (Send_Program_Error, PO_Do_Or_Queue): Remove
13129         Self_Id parameter.
13130         (Wakeup_Entry_Caller): Remove Self_ID and New_State parameters.
13131         (Wait_For_Completion_With_Timeout): Remove.
13132         (Protected_Single_Entry_Call): Remove Mode parameter
13133         (always Simple_Call).
13134         (Service_Entry): Remove Self_Id constant (not used anymore).
13135         (Timed_Protected_Single_Entry_Call): Remove.
13136         * s-tposen.ads (Timed_Protected_Single_Entry_Call): Remove.
13137         (Protected_Single_Entry_Call): Remove Mode parameter.
13139 2014-01-29  Hristian Kirtchev  <kirtchev@adacore.com>
13141         * einfo.adb (Get_Pragma): Handle the retrieval of pragma Refined_Post.
13142         * einfo.ads (Get_Pragma): Update the comment on special pragmas
13143         handled by this routine.
13144         * sem_prag.adb (Analyze_Pragma): Add a legal pragma Refined_Post
13145         to the contract of the related subprogram body.
13146         * sem_util.adb (Add_Contract_Item): Handle the insertion of
13147         pragma Refined_Post into the contract of a subprogram body.
13148         * sinfo.ads Update the documentation of node N_Contract.
13149         * sem_res.adb (Resolve_Entity_Name): Add a guard
13150         to detect abstract states and variables only when checking the
13151         SPARK 2014 rules concerning volatile object placement.
13153 2014-01-29  Ed Schonberg  <schonberg@adacore.com>
13155         * sem_ch4.adb (Find_Equality_Types, Try_One_Interp): within an instance,
13156         null is compatible with any access type.
13158 2014-01-29  Hristian Kirtchev  <kirtchev@adacore.com>
13160         * sem_util.adb (Find_Placement_In_State_Space): Assume that the default
13161         placement is not in a package.
13163 2014-01-29  Hristian Kirtchev  <kirtchev@adacore.com>
13165         * sem_util.adb (Has_Enabled_Property): Compare the character field of
13166         the sole property.
13168 2014-01-29  Robert Dewar  <dewar@adacore.com>
13170         * sem_intr.adb, a-ztexio.ads, sinfo.ads, sem_res.adb, gnatlink.adb,
13171         vms_conv.adb, a-except.ads, a-except-2005.ads, a-teioed.adb,
13172         sem_warn.ads, treepr.ads, erroutc.ads, a-excach.adb: Minor reformatting.
13174 2014-01-29  Robert Dewar  <dewar@adacore.com>
13176         * sem_util.ads, sem_util.adb (In_Pragma_Expression): New function.
13177         * sem_warn.adb (Check_References): Suppress warnings if inside
13178         Initial_Condition pragma.
13180 2014-01-29  Hristian Kirtchev  <kirtchev@adacore.com>
13182         * sem_prag.adb (Check_Missing_Part_Of): List all values of
13183         State_Space_Kind for readability reasons. Do not emit an error on
13184         a private item when the enclosing package lacks aspect/pragma
13185         Abstract_State. Do not emit an error on a private package
13186         instantiation when the corresponding generic template lacks
13187         visible state.
13188         (Has_Visible_State): New routine.
13189         * sem_util.adb (Find_Placement_In_State_Space): The visible
13190         declarations of any kind of child units in general act as proper
13191         placement location.
13193 2014-01-29  Robert Dewar  <dewar@adacore.com>
13195         * a-except-2005.adb, a-except.adb, a-excpol-abort.adb, a-exstat.adb,
13196         ali.adb, a-numaux.ads, a-numaux-darwin.ads, a-numaux-libc-x86.ads,
13197         a-numaux-vms.ads, a-numaux-vxworks.ads, a-numaux-x86.ads, aspects.ads,
13198         a-taside.adb, a-teioed.adb, a-textio.adb, a-textio.ads, atree.adb,
13199         atree.ads, a-witeio.adb, a-witeio.ads, a-wtedit.adb, a-ztedit.adb,
13200         a-ztexio.adb, bcheck.adb, binde.adb, checks.adb, comperr.adb,
13201         cstand.adb, debug_a.adb, einfo.ads, errout.adb, erroutc.adb,
13202         eval_fat.adb, exp_aggr.adb, exp_attr.adb, exp_ch11.adb, exp_ch3.adb,
13203         exp_ch4.adb, exp_ch5.adb, exp_ch6.adb, exp_ch9.adb, exp_dbug.adb,
13204         exp_disp.adb, exp_fixd.adb, exp_imgv.adb, exp_intr.adb, exp_util.adb,
13205         freeze.adb, frontend.adb, g-comlin.ads, g-mbdira.adb, gnat1drv.adb,
13206         gprep.adb, g-spipat.adb, i-cpp.ads, i-vxwork.ads, i-vxwork-x86.ads,
13207         krunch.ads, layout.adb, lib-load.adb, lib-writ.adb, lib-writ.ads,
13208         live.adb, namet.ads, osint.adb, osint-c.adb, output.ads, par.adb,
13209         par-ch10.adb, par-ch13.adb, par-ch3.adb, par-ch4.adb, par-ch5.adb,
13210         par-ch6.adb, par-ch9.adb, par-endh.adb, par-labl.adb, par-prag.adb,
13211         par-sync.adb, par-tchk.adb, par-util.adb, prj.adb, repinfo.adb,
13212         rtsfind.adb, s-arit64.adb, s-asthan-vms-alpha.adb,
13213         s-asthan-vms-ia64.adb, s-bignum.adb, scans.adb, scng.adb, s-dimmks.ads,
13214         sem_aggr.adb, sem_attr.adb, sem_aux.adb, sem_cat.adb, sem_ch10.adb,
13215         sem_ch12.adb, sem_ch13.adb, sem_ch13.ads, sem_ch3.adb, sem_ch4.adb,
13216         sem_ch5.adb, sem_ch6.adb, sem_ch8.adb, sem_disp.adb, sem_elab.adb,
13217         sem_elim.adb, sem_eval.adb, sem_intr.adb, sem_prag.adb, sem_res.adb,
13218         sem_type.adb, sem_util.adb, sem_warn.adb, set_targ.adb, s-fatgen.adb,
13219         s-fatgen.ads, s-fileio.adb, s-imgcha.adb, s-imgrea.adb, sinfo.ads,
13220         sinput-c.adb, snames.ads-tmpl, s-os_lib.adb, sprint.adb,
13221         s-regpat.adb, s-secsta.adb, s-stalib.ads,
13222         s-stchop.adb, s-stoele.ads, stand.ads, s-taprop-solaris.adb,
13223         s-tasdeb-vms.adb, s-tasini.adb, s-tassta.adb, s-valdec.adb,
13224         s-valuti.adb, s-wchjis.adb, s-wchwts.adb, system.ads, system-vms_64.ads,
13225         system-vms-ia64.ads, treepr.adb, types.ads, uintp.adb, uname.adb,
13226         urealp.adb, usage.adb, vxaddr2line.adb: Minor reformatting.
13228 2014-01-29  Robert Dewar  <dewar@adacore.com>
13230         * expander.adb: Minor reformatting.
13232 2014-01-29  Javier Miranda  <miranda@adacore.com>
13234         * exp_ch3.adb (Predefined_Primitive_Bodies): Adding documentation to
13235         previous patch.
13237 2014-01-29  Javier Miranda  <miranda@adacore.com>
13239         * exp_ch3.adb (Predefined_Primitive_Bodies): Complete the code
13240         that checks if an interface types defines the predefined "="
13241         function because the compiler was erroneously not generating the
13242         predefined "=" primitive as soon as the name of some interface
13243         primitive is "=" (formals were not checked).
13245 2014-01-29  Ed Schonberg  <schonberg@adacore.com>
13247         * expander.adb (Expander): In GNATprove mode, do not process
13248         transient scopes: they are in general not created in this mode,
13249         and an attempt to examine them will lead to constraint errors when
13250         processing configuration pragmas that have analyzable expressions.
13252 2014-01-29  Vincent Celier  <celier@adacore.com>
13254         * clean.adb (Gnatclean): Fail if main project is an aggregate
13255         project or if there is an aggregate library project in the
13256         project tree.
13257         * gnatcmd.adb: Fail if the main project is an aggregate project
13258         or if there is an aggegate library project in the project tree.
13259         * make.adb (Initialize): : Fail if main project is an aggregate
13260         project or if there is an aggregate library project in the
13261         project tree.
13262         * makeutl.ads (Aggregate_Libraries_In): New Boolean function.
13263         * prj-makr.adb (Initialize): Fail if the main project is an
13264         aggregate project or an aggregate library project.
13266 2014-01-29  Vincent Celier  <celier@adacore.com>
13268         * prj-part.adb (Check_Import_Aggregate): New procedure
13269         to check if an imported project is an aggregate project.
13270         (Parse_Single_Project): Call Check_Import_Aggregate
13271         * projects.texi: Document that aggregate projects cannot be
13272         extended or imported.
13274 2014-01-29  Robert Dewar  <dewar@adacore.com>
13276         * exp_ch9.adb, sem_ch7.ads, s-regexp.adb, sem_ch13.adb: Minor
13277         reformatting and code clean up.
13278         * gnat_ugn.texi: Add documentation section on Atomic Variables
13279         and Optimization.
13281 2014-01-29  Hristian Kirtchev  <kirtchev@adacore.com>
13283         * einfo.adb Flag264 is now unused.
13284         (Has_Body_References): Removed.
13285         (Set_Has_Body_References): Removed.
13286         (Write_Entity_Flags): Remove the output for flag Has_Body_References.
13287         * einfo.ads Update the comment on usage of attribute
13288         Body_References. Remove attribute Has_Body_References and its
13289         usage in nodes.
13290         (Has_Body_References): Removed along with pragma Inline.
13291         (Set_Has_Body_References): Removed along with pragma Inline.
13292         * sem_prag.adb (Analyze_Global_Item): Move the call to
13293         Record_Possible_Body_Reference in the state related checks
13294         section. Add a comment intended function.
13295         (Analyze_Input_Output): Move the call to Record_Possible_Body_Reference
13296         in the state related checks section. Add a comment intended function.
13297         (Analyze_Refinement_Clause): Cleanup the illegal body reference
13298         reporting. Add a comment on timing of error reporting.
13299         (Record_Possible_Body_Reference): Reimplement the routine.
13301 2014-01-29  Vincent Celier  <celier@adacore.com>
13303         * makeutl.adb (Mains.Find_File_Add_Extension): Only look for specs for
13304         unit-based languages.
13305         (Mains.Complete_Mains.Do_Complete): Use the source file project
13306         tree when calling Find_File_Add_Extension. Use the correct
13307         project name when reporting an error.
13309 2014-01-29  Hristian Kirtchev  <kirtchev@adacore.com>
13311         * aspects.adb Add an entry for aspect Part_Of in table
13312         Canonical_Aspect.
13313         * aspects.ads Add an entry for aspect Part_Of in tables Aspect_Id,
13314         Aspect_Argument, Aspect_Names and Aspect_Delay.
13315         * atree.h Define Elist9.
13316         * atree.adb (Elist9): New routine.
13317         (Set_Elist9): New routine.
13318         * atree.ads (Elist9): New routine.
13319         (Set_Elist9): New routine.
13320         * einfo.adb Add Part_Of_Constituents and Encapsulating_State to
13321         the list of node usage.  Remove Refined_State from the list of
13322         node usage.
13323         (Encapsulating_State): New routine.
13324         (Get_Pragma):
13325         Handle pragma Part_Of; (Part_Of_Constituents): New routine.
13326         (Refined_State): Removed.
13327         (Set_Encapsulating_State): New routine.
13328         (Set_Part_Of_Constituents): New routine.
13329         (Set_Refined_State): Removed.
13330         (Write_Field9_Name): Add an entry
13331         for Part_Of_Constituents (Write_Field10_Name): Add an entry for
13332         Encapsulating_State. Remove the entry for Refined_State.
13333         * einfo.ads Add new attributes Encapsulating_State
13334         and Part_Of_Constituents alond with their usage in
13335         entities. Remove attribute Refined_State along with its
13336         usage in entities.
13337         (Encapsulating_State): New routine and
13338         pragma Inline.  (Get_Pragma): Update the comment on usage.
13339         (Part_Of_Constituents): New routine and pragma Inline.
13340         (Refined_State): Removed along with pragma Inline.
13341         (Set_Encapsulating_State): New routine and pragma Inline.
13342         (Set_Part_Of_Constituents): New routine and pragma Inline.
13343         (Set_Refined_State): Removed along with pragma Inline.
13344         * par-prag.adb Pragma Part_Of does not need any special processing
13345         by the parser.
13346         * sem_ch3.adb (Analyze_Declarations): Remove local variables
13347         Body_Id and Prag. Call separate routines to analyze the
13348         contract of a package [body].
13349         (Analyze_Object_Contract):
13350         Update the comment on usage. Remove local variables
13351         Items and Nam. Use Get_Pragma rather than traversing the
13352         classification list.  Verify whether the lack of indicator
13353         Part_Of agrees with the placement of the variable in state space.
13354         (Analyze_Object_Declaration): Initialize the encapsulating state
13355         of a variable.  (Requires_State_Refinement): Moved to sem_util.
13356         * sem_ch7.adb (Analyze_Package_Body_Contract): New routine.
13357         (Analyze_Package_Contract): New routine.
13358         * sem_ch7.ads (Analyze_Package_Body_Contract): New routine.
13359         (Analyze_Package_Contract): New routine.
13360         * sem_ch10.adb (Decorate_State): Initialize the encapsulating
13361         state and Part_Of constituents.
13362         * sem_ch13.adb (Analyze_Aspect_Specifications):
13363         Add processing for aspect Part_Of. Update all
13364         calls to Decorate_Delayed_Aspect_And_Pragma.
13365         (Check_Aspect_At_Freeze_Point): Aspect Part_Of does
13366         not need any special processing at freeze time.
13367         (Decorate_Delayed_Aspect_And_Pragma): Renamed to
13368         Decorate_Aspect_And_Pragma.  Add formal parameter Delayed and
13369         update the associated comment.
13370         * sem_prag.adb Add an entry for pragma Part_Of in table Sig_Flags.
13371         (Analyze_Abstract_State): Add new global variable State_Id. Remove
13372         local constants Errors and Loc. Remove local variables Is_Null
13373         and State_Nam. Create the entity of the abstract state on the
13374         spot, before all remaining checks are performed. Verify that a
13375         missing Part_Of option agrees with the placement of the abstract
13376         state within the state space.
13377         (Analyze_Depends_In_Decl_Part):
13378         Add new global variables Constits_Seen and States_Seen. Check
13379         that a state and a corresponding constituent do not appear
13380         in pragma [Refined_]Depends.
13381         (Analyze_Global_In_Decl_Part):
13382         Add new global variables Constits_Seen and States_Seen. Check
13383         that a state and a corresponding constituent do not appear
13384         in pragma [Refined_]Global.
13385         (Analyze_Global_Item):
13386         Remove the now obsolete code that deals with Part_Of.
13387         Add the entity of the global item to the list of processed
13388         items.  (Analyze_Initializes_In_Decl_Part): Add new global
13389         variables Constits_Seen and States_Seen. Check that a state
13390         and a corresponding constituent do not appear in pragma
13391         Initializes.
13392         (Analyze_Initialization_Item): Add the entity
13393         of the initialization item to the list of processed items.
13394         (Analyze_Input_Item): Add the entity of the initialization
13395         item to the list of processed items.
13396         (Analyze_Input_Output):
13397         Remove the now obsolete code that deals with Part_Of.  Add the
13398         entity of the input/output to the list of processed items.
13399         (Analyze_Part_Of): New routine.
13400         (Analyze_Part_Of_Option): Remove
13401         local constant Par_State. Add local constant Encaps and local
13402         variables Encaps_Id and Legal. Use Analyze_Part of to analyze
13403         the option. Turn the related state into a Part_Of constituent
13404         if the option is legal.
13405         (Analyze_Pragma): Add processing
13406         for pragma Part_Of.
13407         (Analyze_Refined_State_In_Decl_Part):
13408         Remove global constants Pack_Body and Spec_Id. Remove
13409         global variables Abstr_States and Hidden_States. Add new
13410         global variables Available_States, Body_Id, Body_States and
13411         Spec_Id. Add new local constant Body_Decl. Reimplement the
13412         logic that extracts the states available for refinement from
13413         the related package and the body hidden states of the said
13414         package.
13415         (Analyze_Refinement_Clause): Add local variable Part_Of_Constits.
13416         (Check_Applicable_Policy): Alphabetize body.
13417         (Check_Dependency_Clause): Replace Refined_State
13418         with Encapsulating_State.
13419         (Check_Matching_Constituent):
13420         Reimplement the logic that determines whether an item is a valid
13421         / invalid constituent of the current refined state. Return when
13422         a construct does not denote a valid abstract state. Extract the
13423         list of Part_Of constituents for further analysis. Check that all
13424         Part_Of constituents of a state have been used in its refinement.
13425         (Check_Matching_State): Update the comment on usage. Operate
13426         on the list of available states.
13427         (Check_Missing_Part_Of): New routine.
13428         (Check_Refined_Global_Item): Replace Refined_State
13429         with Encapsulating_State.
13430         (Check_State_And_Constituent_Use): New routine.
13431         (Create_Abstract_State): New routine.
13432         (Is_Matching_Input): Replace Refined_State with Encapsulating_State.
13433         (Is_Part_Of): Removed.
13434         (Collect_Body_States): New routine.
13435         (Collect_Constituent): Replace Refined_State with Encapsulating_State.
13436         (Collect_Hidden_States): Removed.
13437         (Report_Unrefined_States): Change the profile of the procedure along
13438         with the comment on usage.
13439         (Report_Unused_Constituents): New routine.
13440         (Report_Unused_Hidden_States): Removed.
13441         (Report_Unused_States): New routine.
13442         * sem_prag.ads (Check_Missing_Part_Of): New routine.
13443         * sem_util.adb (Add_Contract_Item): Pragma Part_Of can now
13444         appear in the classification pragmas of a package instantiation
13445         or a variable.
13446         (Find_Placement_In_State_Space): New routine.
13447         (Is_Child): Removed.
13448         (Is_Child_Or_Sibling): Remove formal
13449         parameter Private_Child. Remove the private child checks.
13450         (Requires_State_Refinement): Moved from sem_ch3.
13451         * sem_util.ads Add new type State_Space_Kind along with
13452         comment on its usage and values.
13453         (Add_Contract_Item): Update the comment on usage.
13454         (Find_Body_Discriminal): Alphabetize spec.
13455         (Find_Placement_In_State_Space): New routine.
13456         (Is_Child_Or_Sibling): Remove formal parameter Private_Child
13457         and update the comment on usage.
13458         (Requires_State_Refinement): Moved from sem_ch3.
13459         * sinfo.ads: Update the documentation of N_Contract.
13460         * snames.ads-tmpl The predefined name for Part_Of is now used
13461         to denote a pragma. Add Pragma_Id for Part_Of.
13463 2014-01-29  Emmanuel Briot  <briot@adacore.com>
13465         * s-regexp.adb (Create_Secondary_Table): Automatically grow the state
13466         machine as needed.
13467         (Dump): New subprogram.
13469 2014-01-29  Tristan Gingold  <gingold@adacore.com>
13471         * exp_ch9.adb (Expand_N_Protected_Type_Declaration): Add
13472         Expand_Entry_Declaration to factorize code.
13474 2014-01-29  Ed Schonberg  <schonberg@adacore.com>
13476         * checks.adb: minor clarification.
13477         * sem_ch7.adb (Declare_Inherited_Private_Subprograms): Limit
13478         search for primitive operations to the entities that immediately
13479         follow the type declaration.
13481 2014-01-29  Tristan Gingold  <gingold@adacore.com>
13483         * exp_ch9.adb (Build_Protected_Entry): Do not call
13484         Complete_Entry_Body anymore.
13485         * rtsfind.ads (RE_Complete_Single_Entry_Body): Remove.
13486         * s-tposen.ads, s-tposen.adb (Complete_Single_Entry_Body): Remove.
13488 2014-01-29  Pierre-Marie Derodat  <derodat@adacore.com>
13490         * s-os_lib.adb, s-os_lib.ads (Normalize_Pathname): Return an empty
13491         string when the Name input bigger than allowed. Adapt the function
13492         specification.
13494 2014-01-29  Ed Schonberg  <schonberg@adacore.com>
13496         * checks.adb (Install_Null_Excluding_Check): Do not emit warning
13497         if expression is within a case_expression of if_expression.
13499 2014-01-29  Robert Dewar  <dewar@adacore.com>
13501         * exp_ch9.adb, inline.ads: Minor reformatting.
13503 2014-01-29  Tristan Gingold  <gingold@adacore.com>
13505         * exp_ch9.adb (Is_Exception_Safe): Return true if no exceptions.
13507 2014-01-29  Yannick Moy  <moy@adacore.com>
13509         * inline.ads (Pending_Body_Info): Add SPARK_Mode and
13510         SPARK_Mode_Pragma components to be able to analyze generic
13511         instance.
13512         * sem_ch12.adb (Analyze_Package_Instantiation,
13513         Inline_Instance_Body, Need_Subprogram_Instance_Body,
13514         Load_Parent_Of_Generic): Pass in SPARK_Mode from instantiation
13515         for future analysis of the instance.
13516         (Instantiate_Package_Body,
13517         Instantiate_Subprogram_Body, Set_Instance_Inv): Set SPARK_Mode
13518         from instantiation to analyze the instance.
13520 2014-01-29  Robert Dewar  <dewar@adacore.com>
13522         * sem_ch7.adb, sem_prag.adb, sem_ch4.adb, sem_ch6.adb: Minor code
13523         reorganization.
13525 2014-01-29  Yannick Moy  <moy@adacore.com>
13527         * gnat_rm.texi: Update description of SPARK_Mode pragma.
13529 2014-01-29  Tristan Gingold  <gingold@adacore.com>
13531         * exp_ch9.adb (Expand_N_Protected_Body): Remove Num_Entries.
13533 2014-01-29  Thomas Quinot  <quinot@adacore.com>
13535         * sem_ch4.adb (Find_Component_In_Instance): Update comment.
13537 2014-01-29  Ed Schonberg  <schonberg@adacore.com>
13539         * exp_util.adb (Build_Task_Image_Prefix): Indicate that the
13540         resulting string is an internal entity. and thus requires no
13541         initialization. This is relevant when Initialize_ Scalars is
13542         enabled, because the resultant spurious initialization may lead to
13543         secondary stack anomalies that produce a mangled name for a task.
13545 2014-01-29  Yannick Moy  <moy@adacore.com>
13547         * sem_ch6.adb (Analyze_Subprogram_Body_Helper): SPARK_Mode
13548         not inherited from spec anymore. Check consistency
13549         rules after processing of declarations.
13550         * sem_ch7.adb (Analyze_Package_Body_Helper): SPARK_Mode not inherited
13551         from spec anymore. Check consistency rules after processing of
13552         declarations.
13553         (Analyze_Package_Declaration): Set SPARK_Mode only for non-generic
13554         packages.
13555         * sem_prag.adb (Analyze_Pragma/Pragma_SPARK_Mode): Implement new
13556         consistency rules.
13558 2014-01-27  Robert Dewar  <dewar@adacore.com>
13560         * sem_res.adb (Resolve_Comparison_Op): Add type name/location
13561         to unordered msg.
13562         (Resolve_Range): Add type name/location to unordered msg.
13564 2014-01-27  Claire Dross  <dross@adacore.com>
13566         * a-cofove.adb/s (Copy): Add precondition so that Copy (Source,
13567         Capacity) is only called with Capacity >= Length (Source) and
13568         Capacity in Capacity_Range.
13569         * a-cfdlli.adb/s, a-cfhase.adb/s, a-cfhama.adb/s, a-cforse.adb/s,
13570         a-cforma.adb/s (Copy): Add precondition so that Copy (Source, Capacity)
13571         is only called with Capacity >= Source.Capacity. Raise Capacity_Error
13572         in the code is this is not the case.
13574 2014-01-27  Thomas Quinot  <quinot@adacore.com>
13576         * sem_ch4.adb (Analyze_Selected_Component): Fix handling of
13577         selected component in an instance where the component of the
13578         actual is not visibile at instantiation.
13580 2014-01-27  Ed Schonberg  <schonberg@adacore.com>
13582         * sem_ch6.adb: sem_ch6.adb (Set_Actual_Subtypes): If the type
13583         has a dynamic predicate, generate freeze node for Actual_Subtype
13584         at once, because the declaration of the corresponding predicate
13585         function will make reference to it.
13587 2014-01-27  Tristan Gingold  <gingold@adacore.com>
13589         * exp_ch7.adb, exp_ch9.adb: Adjust comments.
13591 2014-01-27  Robert Dewar  <dewar@adacore.com>
13593         * exp_ch4.adb (Expand_N_Op_Expon): Remove unsigned type test
13594         for 2**X optimization.
13596 2014-01-27  Ed Schonberg  <schonberg@adacore.com>
13598         * a-suenst.adb: strings.utf_encoding.strings (Decode): Check
13599         explicitly whether value is in range of Character, because the
13600         library is typically compiled with range checks disabled, and
13601         we cannot rely on the implicit check on the argument of 'Val.
13603 2014-01-27  Vincent Celier  <celier@adacore.com>
13605         * a-ciorma.adb, a-cihama.adb (Assign): Copy the Source to the Target,
13606         not the Target to itself.
13608 2014-01-27  Robert Dewar  <dewar@adacore.com>
13610         * vms_conv.ads, ali.adb, sem_ch6.ads, opt.ads, vms_cmds.ads: Minor
13611         changes to avoid incorrect use of unordered enum types.
13613 2014-01-27  Thomas Quinot  <quinot@adacore.com>
13615         * sem_ch4.adb: Minor reformatting.
13617 2014-01-27  Robert Dewar  <dewar@adacore.com>
13619         * scn.adb (Check_End_Of_Line): Removed.
13620         (Error_Long_Line): Removed.
13621         (Determine_License): Use versions of above routines from Scanner.
13622         * scng.adb (Check_End_Of_Line): Moved to spec.
13623         (Error_Long_Line): Removed, no longer used.
13624         * scng.ads (Check_End_Of_Line): Moved here from body.
13626 2014-01-27  Tristan Gingold  <gingold@adacore.com>
13628         * exp_ch7.adb (Build_Cleanup_Statements): Call
13629         Build_Protected_Subprogram_Call_Cleanup to insert the cleanup
13630         for protected body.
13631         * exp_ch9.adb (Build_Protected_Subprogram_Body): Likewise.
13632          Remove Service_Name variable.
13633         (Build_Protected_SUbprogam_Call_Cleanup): New procedure that
13634         factorize code from the above subprograms.
13635         * exp_ch9.ads (Build_Protected_Subprogram_Call_Cleanup): New procedure.
13637 2014-01-27  Hristian Kirtchev  <kirtchev@adacore.com>
13639         * einfo.adb (Has_Option): Reimplemented.
13640         * sem_prag.adb (Analyze_Refinement_Clause): Add global
13641         variables AR_Constit, AW_Constit, ER_Constit, EW_Constit,
13642         External_Constit_Seen and State. Add local variables Body_Ref,
13643         Body_Ref_Elmt and Extra_State. Reimplement part of the logic to
13644         avoid a cumbersome while pool. Verify the legality of an external
13645         state and relevant properties.
13646         (Check_External_Property): New routine.
13647         (Check_Matching_State): Remove parameter profile
13648         and update comment on usage.
13649         (Collect_Constituent): Store the
13650         relevant external property of a constituent.
13651         * sem_util.adb (Async_Readers_Enabled): Update the call to
13652         Has_Enabled_Property.
13653         (Async_Writers_Enabled): Update the call to Has_Enabled_Property.
13654         (Effective_Reads_Enabled): Update the call to Has_Enabled_Property.
13655         (Effective_Writes_Enabled): Update the call to Has_Enabled_Property.
13656         (Has_Enabled_Property): Rename formal parameter Extern to State_Id.
13657         Update comment on usage. Reimplement the logic to recognize the various
13658         formats of properties.
13660 2014-01-27  Ed Schonberg  <schonberg@adacore.com>
13662         * par-ch5.adb: Minor reformatting.
13664 2014-01-27  Tristan Gingold  <gingold@adacore.com>
13666         * s-tposen.ads: Harmonize style and comments.
13668 2014-01-27  Vincent Celier  <celier@adacore.com>
13670         * projects.texi: Document that shared library projects, by
13671         default, cannot import projects that are not shared library
13672         projects.
13674 2014-01-27  Robert Dewar  <dewar@adacore.com>
13676         * sem_ch8.adb (Find_Selected_Component): Use Replace instead
13677         of Rewrite.
13679 2014-01-27  Ed Schonberg  <schonberg@adacore.com>
13681         * a-suenco.adb, a-suenst.adb (Decode): Raise encoding error if
13682         any other exception is raised.
13683         (Convert): If both Input_Scheme and Output_Scheme are UTF_8 it is
13684         still necessary to perform a conversion in order to remove overlong
13685         encodings.
13687 2014-01-27  Robert Dewar  <dewar@adacore.com>
13689         * exp_smem.adb: Minor reformatting.
13691 2014-01-27  Thomas Quinot  <quinot@adacore.com>
13693         * a-calfor.ads: Fix incorrect reference to operator "-" in comment.
13695 2014-01-27  Ed Schonberg  <schonberg@adacore.com>
13697         * sem_res.adb (Make_Call_Into_Operator): In ASIS mode, relocate
13698         nodes for operands to the original node for the call, to preserve
13699         Original_Node pointers within the resolved operands, given that
13700         they may have been rewritten as well. Previous approach copied
13701         the operands into a new tree and lost those pointers.
13703 2014-01-27  Claire Dross  <dross@adacore.com>
13706         * a-cofove.adb, a-cofove.ads: Add Strict_Equal function to the API.
13708 2014-01-27  Ed Schonberg  <schonberg@adacore.com>
13710         * sem_util.adb (Check_Internal_Protected_Use): A call through
13711         an anonymous access parameter of the current protected function
13712         is not a potential modification of the current object.
13714 2014-01-27  Ed Schonberg  <schonberg@adacore.com>
13716         * a-cobove.adb (Reserve_Capacity): Procedure raises
13717         Capacity_Error, not Constraint_Error, when request cannot be
13718         satisfied.
13720 2014-01-27  Vincent Celier  <celier@adacore.com>
13722         * a-coorma.adb, a-cohama.adb (Assign): Copy the Source to the Target,
13723         not the Target to itself.
13725 2014-01-27  Ed Schonberg  <schonberg@adacore.com>
13727         * exp_ch4.adb (Expand_Concatenate): If the target of the
13728         concatenation is a library-level entity, always use the off-line
13729         version of concatenation, regardless of optimization level. This
13730         is space-efficient, and prevents linking problems when some
13731         units are compiled with different optimization levels.
13733 2014-01-27  Ed Schonberg  <schonberg@adacore.com>
13735         * sem_ch5.adb: Code clean up.
13737 2014-01-27  Ed Schonberg  <schonberg@adacore.com>
13739         * par-ch5.adb (P_Iterator_Specification): Improve error recovery
13740         when an array or container iterator includes a subtype indication,
13741         which is only legal in an element iterator.
13743 2014-01-27  Thomas Quinot  <quinot@adacore.com>
13745         * exp_ch7.adb: Minor reformatting.
13747 2014-01-27  Robert Dewar  <dewar@adacore.com>
13749         * opt.adb (SPARK_Mode): Default for library units is None rather
13750         than Off.
13751         * opt.ads: Remove AUTO from SPARK_Mode_Type SPARK_Mode_Type is
13752         no longer ordered.
13753         * sem_prag.adb (Analyze_Pragma, case SPARK_Mode): Remove AUTO
13754         possibility.
13755         * snames.ads-tmpl (Name_Auto): Removed, no longer used.
13757 2014-01-27  Robert Dewar  <dewar@adacore.com>
13759         * par-ch5.adb (P_Sequence_Of_Statements): Make entry in
13760         Suspicious_Labels table if we have identifier; followed by loop
13761         or block.
13762         * par-endh.adb (Evaluate_End_Entry): Search Suspicious_Labels table.
13763         * par.adb (Suspicious_Labels): New table.
13765 2014-01-27  Robert Dewar  <dewar@adacore.com>
13767         * exp_aggr.adb (Check_Bounds): Reason is range check, not
13768         length check.
13770 2014-01-27  Yannick Moy  <moy@adacore.com>
13772         * get_spark_xrefs.adb (Get_SPARK_Xrefs): Accept new type 'c' for
13773         reference.
13774         * lib-xref-spark_specific.adb (Is_Global_Constant): Remove useless
13775         function now.
13776         (Add_SPARK_Xrefs): Include references to constants.
13777         * spark_xrefs.ads Document new character 'c' for references to
13778         constants.
13780 2014-01-27  Thomas Quinot  <quinot@adacore.com>
13782         * exp_smem.adb (Add_Write_After): For a function call, insert write as
13783         an after action in a transient scope.
13785 2014-01-27  Thomas Quinot  <quinot@adacore.com>
13787         * exp_smem.adb (Expand_Shared_Passive_Variable): For a reference
13788         to a shared variable as an OUT formal in a call to an init proc,
13789         the 'Read call must be emitted after, not before, the call.
13791 2014-01-27  Robert Dewar  <dewar@adacore.com>
13793         * gnat_rm.texi: Remove mention of AUTO mode for SPARK_Mode pragma.
13795 2014-01-27  Robert Dewar  <dewar@adacore.com>
13797         * a-wichha.adb (Character_Set_Version): Change to output proper
13798         value.
13800 2014-01-27  Hristian Kirtchev  <kirtchev@adacore.com>
13802         * einfo.adb (Is_Input_Only_State): Removed.
13803         (Is_Non_Volatile_State): Removed.
13804         (Is_Output_State): Removed.
13805         * einfo.ads (Is_Input_Only_State): Remove attribute and
13806         subprogram. Update related entity.
13807         (Is_Non_Volatile_State):
13808         Remove attribute and subprogram. Update related entity.
13809         (Is_Output_State): Removed attribute and subprogram. Update
13810         related entity.
13811         * exp_ch6.adb (Expand_Subprogram_Contract): Update comment on
13812         generated code.
13813         * sem_ch3.adb (Analyze_Declarations): Analyze the contract of
13814         an object, not just variables.
13815         (Analyze_Object_Contract): New routine.
13816         (Analyze_Variable_Contract): Removed.
13817         (Process_Discriminants): Detect an illegal use of volatile
13818         discriminant in SPARK mode.
13819         * sem_ch5.adb (Analyze_Iterator_Specification):
13820         Detect an illegal use of volatile loop variable.
13821         (Analyze_Loop_Parameter_Specification): Detect an illegal use
13822         of volatile loop variable.
13823         * sem_ch6.adb (Process_Formals): Update the volatile object
13824         detection. Detect an illegal formal of mode IN OUT or OUT in
13825         SPARK mode. Enhance the error messages with references.
13826         * sem_ch12.adb (Instantiate_Object): Update the volatile object
13827         detection. Enhance the error messages with references.
13828         * sem_prag.adb (Analyze_Abstract_State): Enhance the error
13829         messages with references.
13830         (Analyze_Contract_Case): Enhance the error messages with references.
13831         (Analyze_External_Property): Call Check_Duplicate_Property to process
13832         an external property.
13833         (Analyze_External_Property_In_Decl_Part): New routine.
13834         (Analyze_External_State_In_Decl_Part): Removed.
13835         (Analyze_Global_Item): Detect an illegal
13836         use of a volatile constant. Detect an illegal use
13837         of a variable with enabled Effective_Reads. Enhance
13838         the error messages with references. Remove obsolete
13839         checks concerning Input_Only and Output_Only states.
13840         (Analyze_Initialization_Item): Enhance the error messages
13841         with references.
13842         (Analyze_Initializes_In_Decl_Part): Do not
13843         collect the states and variables when the initialization list
13844         is null.
13845         (Analyze_Input_Item): Enhance the error messages with references.
13846         (Analyze_Input_Output): Enhance the error messages with references.
13847         (Analyze_Pragma): Enhance the error messages with references.
13848         (Analyze_Refinement_Clause): Code reformatting.
13849         (Analyze_Refined_Depends_In_Decl_Part):
13850         Rename global variable Global to Reg_Global and update all
13851         occurrences. Add local variables D7 and D8. Update the error
13852         messages with references. Update the call to Collect_Global_Items.
13853         (Analyze_Refined_Global_In_Decl_Part): Add local variables
13854         Has_Proof_In_State, Proof_In_Constits and Proof_In_Items. Update
13855         the call to Collect_Global_Items.  Account for a Proof_In state
13856         in null / useless refinement checks. Verify the coverage of
13857         Proof_In states.
13858         (Check_Dependency_Clause): Remove local variable
13859         Out_Constits. Remove the retrieval and removal of constituents
13860         for an Output_Only state. Remove the reporting of unused
13861         Output_Only state constituents.
13862         (Check_Duplicate_Mode): Enhance
13863         the error message with a reference.
13864         (Check_Duplicate_Property): New routine.
13865         (Check_Duplicate_Option): Enhance the error message with a reference.
13866         (Check_External_Properties): Enhance the error message with a reference.
13867         (Check_Function_Return): Enhance the error message with a reference.
13868         (Check_In_Out_States): Update
13869         comment on usage. Add a specialized error message for Proof_In
13870         constituents. Enhance the error message with a reference.
13871         (Check_Input_States): Update comment on usage. Account for
13872         possible Proof_In constituents. Enhance the error message
13873         with a areference.
13874         (Check_Matching_Constituent): Enhance the error message with a
13875         reference.
13876         (Check_Matching_State): Enchance the error message with a reference.
13877         (Check_Mode): Add local variable From_Global. Update the call to
13878         Find_Mode.  Emit more precise error messages concerning extra items
13879         (Check_Mode_Restriction_In_Enclosing_Context): Consider
13880         pragma Refined_Global.  Enhance the error message with a
13881         reference.
13882         (Check_Mode_Restriction_In_Function): Enhance the error message with
13883         a reference.
13884         (Check_Output_States): Update comment on usage. Add local variable
13885         Posted.  Account for possible Proof_In constituents. Produce a detailed
13886         list of missing constituents.
13887         (Check_Proof_In_States): New routine.
13888         (Check_Refined_Global_Item): Handle Proof_In
13889         constituents. Enchance the error message with a reference.
13890         (Collect_Global_Items): Add formal parameters Proof_In_Items
13891         and Has_Proof_In_State. Update the comment on usage. Account
13892         for Proof_In items.
13893         (Create_Or_Modify_Clause): Enchance
13894         the error message with a reference.
13895         (Find_Mode): Add
13896         formal parameter From_Global. Update the comment on usage.
13897         Detect when the mode is governed by pragma [Refined_]Global.
13898         (Output_Constituents): Removed.
13899         (Report_Extra_Constituents):
13900         Report extra Proof_In constituents.
13901         (Report_Unused_Constituents): Removed.
13902         (Usage_Error): Code reformatting. Enhance the error
13903         messages with reference.
13904         * sem_prag.ads (Analyze_External_Property_In_Decl_Part): New routine.
13905         (Analyze_External_State_In_Decl_Part): Removed.
13906         * sem_res.adb (Resolve_Actuals): Update the volatile object
13907         detection. Enhance the error message with a reference.
13908         (Resolve_Entity_Name): Update the volatile object
13909         detection. Enhance the error message with a reference.
13910         * sem_util.adb (Is_Refined_State): Add a guard to avoid a crash.
13911         (Is_SPARK_Volatile_Object): New routine.
13912         (Has_Volatile_Component): New routine.
13913         * sem_util.ads (Is_Delegate): Alphabetized.
13914         (Is_SPARK_Volatile_Object): New routine.
13915         (Has_Volatile_Component): New routine.
13916         * snames.ads-tmpl: Remove names Name_Input_Only and Name_Output_Only.
13918 2014-01-27  Ed Schonberg  <schonberg@adacore.com>
13920         * sem_attr.adb: Resolve fully prefix of 'Update.
13922 2014-01-27  Ben Brosgol  <brosgol@adacore.com>
13924         * gnat_rm.texi: Minor clarifications.
13926 2014-01-27  Robert Dewar  <dewar@adacore.com>
13928         * sem_elab.adb (Check_Internal_Call_Continue): Avoid complaining
13929         about call that is generated as part of an Initial_Condition
13930         check.
13931         * sem_prag.adb: Minor spelling correction.
13933 2014-01-27  Robert Dewar  <dewar@adacore.com>
13935         * sem_prag.adb (Set_Convention_From_Pragma): Check that
13936         convention Ghost can only apply to functions.
13937         * einfo.ads, einfo.adb (Is_Ghost_Subprogram): Add clarifying comment.
13939 2014-01-27  Robert Dewar  <dewar@adacore.com>
13941         * gnat_ugn.texi: Add Short_Enums to documentation of
13942         -gnatet/-gnateT.
13944 2014-01-27  Robert Dewar  <dewar@adacore.com>
13946         * sem_prag.adb (Analyze_Input_Item): Correct check for input
13947         item in same package.
13948         * sem_util.ads, sem_util.adb (Within_Scope): New function.
13950 2014-01-26  Arnaud Charlet  <charlet@adacore.com>
13952         * a-intnam-lynxos.ads, mlib-tgt-specific-lynxos.adb,
13953         s-osinte-lynxos-3.adb, s-osinte-lynxos-3.ads, s-osinte-lynxos.adb,
13954         s-osinte-lynxos.ads, s-taprop-lynxos.adb, s-tpopsp-lynxos.adb,
13955         system-lynxos-ppc.ads, system-lynxos-x86.ads: Removed, no longer
13956         maintained.
13958 2014-01-25  Eric Botcazou  <ebotcazou@adacore.com>
13960         * gcc-interface/Makefile.in: Fix oversight.
13962 2014-01-25  Eric Botcazou  <ebotcazou@adacore.com>
13964         * gcc-interface/utils.c (convert_to_fat_pointer): Un-obfuscate the
13965         conversion from a thin pointer with a shifted value.
13966         * gcc-interface/utils2.c (gnat_build_constructor): Propagate the
13967         read-only flag from the values onto the result.
13968         (gnat_invariant_expr): Accept read-only CONSTRUCTORs.
13970 2014-01-25  Tristan Gingold  <gingold@adacore.com>
13972         * gcc-interface/decl.c (gnat_to_gnu_entity): Always build a variable
13973         for E_Variable with a pragma Linker_Section.
13975 2014-01-25  Robert Dewar  <dewar@adacore.com>
13977         * gcc-interface/decl.c (gnat_to_gnu_param): Make sure an Out parameter
13978         with Default_Value aspect is passed in by copy.
13980 2014-01-24  Eric Botcazou  <ebotcazou@adacore.com>
13982         * set_targ.adb: Set Short_Enums.
13983         * gcc-interface/lang.opt (fshort-enums): New option.
13984         * gcc-interface/misc.c (gnat_handle_option): Handle it.
13985         (gnat_post_options): Do not modify the global settings.
13987 2014-01-24  Robert Dewar  <dewar@adacore.com>
13989         * g-rannum.ads, g-rannum.adb (Random_Ordinary_Fixed): New generic
13990         function.
13991         (Random_Decimal_Fixed): New generic function.
13992         * s-rannum.ads: Minor comment clarifications.
13994 2014-01-24  Robert Dewar  <dewar@adacore.com>
13996         * back_end.adb: Remove Short_Enums handling (handled in
13997         Ttypes/Get_Targ now) Minor added comments.
13998         * freeze.adb: Change name Short_Enums_On_Target to
13999         Target_Short_Enums.
14000         * get_targ.ads, get_targ.adb (Get_Short_Enums): New function.
14001         * opt.ads: Minor comment updates.
14002         * sem_ch13.adb: Change name Short_Enums_On_Target to
14003         Target_Short_Enums.
14004         * set_targ.adb: Set Short_Enums from gcc back end.
14005         * set_targ.ads (Short_Enums): New variable.
14006         * targparm.ads, targparm.adb: Remove Short_Enums entries (handled in
14007         Ttypes/Get_Targ now).
14008         * ttypes.ads (Target_Short_Enums): New constant boolean switch
14010 2014-01-24  Pascal Obry  <obry@adacore.com>
14012         * g-sercom-mingw.adb: Fix serial port name for port number > 10.
14014 2014-01-24  Gary Dismukes  <dismukes@adacore.com>
14016         * exp_disp.adb (Expand_Dispatching_Call): Call Unqualify on Param when
14017         comparing it with Ctrl_Arg, since Ctrl_Arg may have had qualification
14018         stripped off.
14020 2014-01-24  Robert Dewar  <dewar@adacore.com>
14022         * sinfo.ads, make.adb, prj-env.adb: Minor reformatting.
14024 2014-01-24  Vincent Celier  <celier@adacore.com>
14026         * prj.adb (Add_Aggregated_Project): Do not add a project in
14027         the list if it is already there.
14029 2014-01-24  Yannick Moy  <moy@adacore.com>
14031         * lib-xref-spark_specific.adb (Enclosing_Subprogram_Or_Package):
14032         Correct the search for a subrogram declaration to which a pragma is
14033         attached.
14035 2014-01-24  Bob Duff  <duff@adacore.com>
14037         * gnat_ugn.texi: Document --decimal-grouping and
14038         --based-grouping switches in gnatpp.
14040 2014-01-24  Ed Schonberg  <schonberg@adacore.com>
14042         * sinfo.ads: Documentation update.
14044 2014-01-24  Ed Schonberg  <schonberg@adacore.com>
14046         * sem_ch3.adb (Constant_Redeclaration): New declaration is
14047         illegal if previous one has an initial expression that is an
14048         aggregate expanded into assignments.
14050 2014-01-24  Ed Schonberg  <schonberg@adacore.com>
14052         * sem_ch5.adb (Analyze_Loop_Parameter_Specification): Small
14053         code reorganization to remove spurious warning on a loop with
14054         an array element iterator that has a null range.
14056 2014-01-24  Vincent Celier  <celier@adacore.com>
14058         * make.adb (Binding_Phase): When setting the Ada paths, use
14059         the library ALI dir, not the object dir in libraries.
14061 2014-01-24  Yannick Moy  <moy@adacore.com>
14063         * sinfo.ads: Add documentation of check flag fields.
14065 2014-01-24  Ed Schonberg  <schonberg@adacore.com>
14067         * sem_res.adb (Resolve_Actuals): If an actual is a view
14068         conversion of a discriminated object, and the formal type is
14069         discriminated and constrained, apply a discriminant check to
14070         the object itself.
14072 2014-01-24  Robert Dewar  <dewar@adacore.com>
14074         * prj.adb, prj-env.adb, back_end.adb: Add comment, minor code clean ups.
14076 2014-01-24  Ed Schonberg  <schonberg@adacore.com>
14078         * sem_ch3.adb (Analyze_Declarations): At the end of an
14079         appropriate declarative part, call Freeze_All from the first
14080         declaration in the scope, not from the first unfrozen one. This
14081         is necessary to apply visibility checks to entities with delayed
14082         aspects. Otherwise, in the presence of instantiations and cleanups
14083         that they may generate, the delayed aspects may be analyzed too
14084         late and produce spurious visibility errors.
14085         * sem_attr.adb: Place etype on range.
14086         * sem_ch6.adb: Documentation expression functions.
14088 2014-01-24  Robert Dewar  <dewar@adacore.com>
14090         * exp_ch7.adb: Minor change of Indices to Indexes (preferred
14091         terminology in compiler).
14093 2014-01-24  Robert Dewar  <dewar@adacore.com>
14095         * scans.ads: Remove Tok_Raise from Sterm, Eterm, After_SM
14096         categories, now that Ada 95 supports raise expressions.
14098 2014-01-24  Robert Dewar  <dewar@adacore.com>
14100         * freeze.adb (Freeze_Enumeration_Type): Use new target parameter
14101         Short_Enums_On_Target.
14102         * sem_ch13.adb (Set_Enum_Esize): Take Short_Enums_On_Target
14103         into account.
14104         * targparm.ads, targparm.adb: Add new target parameter Short_Enums.
14106 2014-01-24  Ed Schonberg  <schonberg@adacore.com>
14108         * sem_ch5.adb (Analyze_Iterator_Specification): If subtype
14109         indication is given explicity, check that it matches the array
14110         component type or the container element type of the domain
14111         of iteration.
14113 2014-01-24  Tristan Gingold  <gingold@adacore.com>
14115         * back_end.adb (Scan_Compiler_Arguments): Set Short_Enums_On_Target.
14116         * gcc-interface/misc.c (flag_short_enums): Declare.
14117         (gnat_post_options): Set it.
14119 2014-01-24  Vincent Celier  <celier@adacore.com>
14121         * prj-env.adb (Ada_Objects_Path): Use Ada_Objects_Path_No_Libs
14122         to cache the result when Including_Libraries is False.
14123         * prj-env.ads (Ada_Objects_Path): Update documentation
14124         * prj.adb (Free (Project_Id)): Also free Ada_Objects_Path_No_Libs
14125         (Get_Object_Directory): Return the Library_Ali_Dir only when
14126         when Including_Libraries is True.
14127         * prj.ads (Get_Object_Directory): Fix and complete documentation
14128         (Project_Data): New component Ada_Objects_Path_No_Libs
14130 2014-01-24  Robert Dewar  <dewar@adacore.com>
14132         * checks.adb (Expr_Known_Valid): Result of fpt operator never
14133         considered valid.
14135 2014-01-24  Eric Botcazou  <ebotcazou@adacore.com>
14137         * back_end.adb: Minor fix in comment.
14139 2014-01-24  Javier Miranda  <miranda@adacore.com>
14141         * sem_ch3.adb (Check_Abstract_Overriding): Code reestructuration
14142         required to report the error in case of task types.
14144 2014-01-24  Ed Schonberg  <schonberg@adacore.com>
14146         * sem_attr.adb: Additional index checking.
14148 2014-01-24  Ed Schonberg  <schonberg@adacore.com>
14150         * sem_attr.adb (Analyze_Attribute, case 'Update): Analyze
14151         expressions in each component association, and for records note
14152         the entity in each association choice, for subsequent resolution.
14153         (Resolve_Attribute, case 'Update): Complete resolution of
14154         expressions in each component association.
14156 2014-01-24  Robert Dewar  <dewar@adacore.com>
14158         * sem.adb (Sem): Avoid premature reference to Current_Sem_Unit
14159         (this was causing Is_Main_Unit_Or_Main_Unit_Spec to be set wrong,
14160         leading to wrong handling of SPARK_Mode for library units).
14162 2014-01-24  Robert Dewar  <dewar@adacore.com>
14164         * sem_ch6.adb (Analyze_Subprogram_Body_Helper): Set SPARK_Mode
14165         on generic instances (do not consider them to be internally
14166         generated)
14168 2014-01-24  Doug Rupp  <rupp@adacore.com>
14170         * s-osinte-android.ads (pthread_sigmask): Import sigprocmask
14171         vice pthread_sigmask.
14173 2014-01-24  Vincent Celier  <celier@adacore.com>
14175         * prj.adb (Debug_Output (Str, Str2)): Output if verbosity is
14176         not default.
14178 2014-01-24  Vincent Celier  <celier@adacore.com>
14180         * prj-ext.adb (Add): Do not output anything when Silent is True,
14181         whatever the verbosity. When Source is From_External_Attribute,
14182         set the corresponding environment variable if it is not already set.
14183         * prj-ext.ads (Add): New Boolean parameter Silent, defaulted
14184         to False
14185         * prj-proc.adb (Process_Expression_For_Associative_Array):
14186         For attribute External, call Prj.Ext.Add with Silent set to
14187         True for the child environment, to avoid useless output in non
14188         default verbosity.
14190 2014-01-24  Ed Schonberg  <schonberg@adacore.com>
14192         * sem_res.adb (Set_Slice_Subtype): Handle properly a discrete
14193         range given by a subtype indication, and force evaluation of
14194         the bounds, as for a simple range.
14195         * exp_util.adb (Evaluate_Slice_Bounds): Utility to force evaluation
14196         of bounds of slice for various kinds of discrete ranges.
14197         (Evaluate_Name, Evaluate_Subtype_From_Expr): use
14198         Evaluate_Slice_Bounds.
14200 2014-01-24  Bob Duff  <duff@adacore.com>
14202         * s-taskin.ads (Activator): Make this Atomic, because
14203         Activation_Is_Complete reads it, and that can be called
14204         from any task. Previously, this component was only
14205         modified by the activator before activation, and by
14206         Self after activation.
14207         * a-taside.ads, a-taside.adb (Environment_Task,
14208         Activation_Is_Complete): Implement these missing functions.
14210 2014-01-24  Doug Rupp  <rupp@adacore.com>
14212         * init.c: Add a handler section for Android.
14214 2014-01-24  Arnaud Charlet  <charlet@adacore.com>
14216         * i-cexten.ads (Unsigned_33..64, Unsigned_33..64): New types.
14218 2014-01-24  Ed Schonberg  <schonberg@adacore.com>
14220         * sem_ch4.adb (Operator_Check): If one operand is a
14221         Raise_Expression, set its type to that of the other operand.
14222         * sem_res.adb (Resolve_Raise_Expression): new procedure.
14223         (Resolve_Actuals): For an actual that is a Raise_Expression,
14224         set the type to that of the formal.
14225         * sem_type.adb (Find_Unique_Type): If one of the operands is a
14226         Raise_Expression, return type of the other operand.
14228 2014-01-24  Ed Schonberg  <schonberg@adacore.com>
14230         * sem_aggr.adb (Resolve_Record_Aggregate): If a scalar
14231         component of the record has a type with a default aspect, and
14232         the corresponding aggregate component is initiaized with a box,
14233         use the default value in the rewritten aggregate.
14235 2014-01-24  Tristan Gingold  <gingold@adacore.com>
14237         * s-interr.ads, s-interr.adb, s-interr-hwint.adb, s-interr-vms.adb,
14238         s-interr-sigaction.adb,
14239         s-interr-dummy.adb (Install_Restricted_Handlers): Add Prio parameter.
14240         * exp_ch9.adb (Make_Initialize_Protection): Add Prio parameter
14241         to the call to Install_Restricted_Handlers.
14243 2014-01-24  Emmanuel Briot  <briot@adacore.com>
14245         * prj-nmsc.adb (Check_File): Add protection when the source is
14246         not fully initialized.
14248 2014-01-24  Ed Schonberg  <schonberg@adacore.com>
14250         * sem_util.adb (Is_Post_State): In a postcondition, a selected
14251         component that denotes an implicit dereference is a reference
14252         to the post state of the subprogram.
14254 2014-01-24  Robert Dewar  <dewar@adacore.com>
14256         * sem_ch6.adb (Analyze_Subprogram_Body_Helper): SPARK_Mode OFF
14257         for generated subprograms.
14258         (Analyze_Subprogram_Specification): Ditto.
14260 2014-01-24  Vincent Celier  <celier@adacore.com>
14262         * prj-dect.adb (Check_Attribute_Allowed): Detect more forbidden
14263         attributes in package Builder of aggregate and aggregate library
14264         projects.
14265         * prj-nmsc.adb (Process_Naming_Scheme.Check.Check_Aggregate):
14266         Remove procedure (Process_Naming_Scheme.Check.Check_Aggregated):
14267         Remove parameters.  Change error message from "... externally
14268         build library ..." to "... externally built project ...".
14269         (Process_Naming_Scheme.Check): Do not do any check in aggregate
14270         project, as attribute Library_Dir and Library_Name have already
14271         been detected as forbidden.
14273 2014-01-24  Vincent Celier  <celier@adacore.com>
14275         * prj-env.adb (Find_Project): If cached project path is not in
14276         project directory, look in current directory first and use cached
14277         project path only if project is not found in project directory.
14279 2014-01-24  Robert Dewar  <dewar@adacore.com>
14281         * sem_util.adb, lib-xref.adb: Correct false positive warnings.
14283 2014-01-24  Vincent Celier  <celier@adacore.com>
14285         * projects.texi: Document that aggregate projects are only
14286         supported by gprbuild, but not by gnatmake.  Document that the
14287         only attribute Switches in package Binder of aggregate projects
14288         will be ignored if its index is not others.  Document that
14289         attribute Global_Config_File is allowed in package Binder of
14290         aggregate projects.
14292 2014-01-24  Robert Dewar  <dewar@adacore.com>
14294         * sem_prag.adb: Minor code reorganization.
14295         * sem_util.adb: Minor fix of potential latent bug in Is_LHS.
14297 2014-01-24  Pascal Obry  <obry@adacore.com>
14299         * prj-attr.adb, projects.texi, snames.ads-tmpl: Add Excluded_Patterns
14300         attribute definition.
14302 2014-01-24  Vincent Celier  <celier@adacore.com>
14304         * makeutl.adb (Queue.Insert_No_Roots): In gprbuild, do not put
14305         in the Queue the same source (same path, same multi-source index)
14306         from the same project file, to avoid compiling several times
14307         the same source.
14309 2014-01-24  Eric Botcazou  <ebotcazou@adacore.com>
14311         * einfo.ads (First_Rep_Item): Remove obsolete stuff.
14312         (Has_Gigi_Rep_Item): Likewise.
14313         * sem_prag.adb (Analyze_Pragma) <Pragma_Linker_Section>: Do not set
14314         Has_Gigi_Rep_Item for objects.
14315         * gcc-interface/decl.c (prepend_one_attribute_to): Rename into...
14316         (prepend_one_attribute): ...this.
14317         (prepend_one_attribute_pragma): New function extracted from...
14318         (prepend_attributes): ...here.  Swap the parameters for consistency.
14319         (gnat_to_gnu_entity): Adjust calls to prepend_one_attribute_to and to
14320         prepend_attributes.
14321         <object>: Deal with a pragma Linker_Section on a constant
14322         or variable.  <E_Function>: Deal with a pragma Linker_Section
14323         on a subprogram.
14324         (get_minimal_subprog_decl): Adjust calls to prepend_one_attribute_to.
14326 2014-01-24  Vincent Celier  <celier@adacore.com>
14328         * opt.ads: Minor comment update.
14330 2014-01-24  Robert Dewar  <dewar@adacore.com>
14332         * sem_prag.adb (Analyze_Input_Output): Add missing error check
14333         for junk operand.
14334         * sem_util.adb (Is_Refined_State): Add defense against junk
14335         tree from error.
14337 2014-01-24  Pascal Obry  <obry@adacore.com>
14339         * projects.texi: Removes Build_Slaves attribute documentation.
14341 2014-01-23  Robert Dewar  <dewar@adacore.com>
14343         * opt.adb (Register_Opt_Config_Switches): Save SPARK_Mode_Pragma
14344         setting.
14346 2014-01-23  Ed Schonberg  <schonberg@adacore.com>
14348         * sem_util.adb (Is_Potentially_Unevaluated): Predicate only
14349         applies to expressions that come from source.
14350         * sem_attr.adb (Analyze_Attribute, case 'Old): Improve error
14351         message.
14352         (Analyze_Attribute, case 'Loop_Entry): Apply SPARK 2014 legality
14353         rule regarding potentially unevaluated expressions, to prefix
14354         of attribute.
14356 2014-01-23  Ed Schonberg  <schonberg@adacore.com>
14358         * exp_util.adb (Make_Invqriant_Call): If type of expression is
14359         a private extension, get invariant from base type.
14361 2014-01-23  Robert Dewar  <dewar@adacore.com>
14363         * sem_util.adb, sem_attr.adb: Minor reformatting.
14365 2014-01-23  Robert Dewar  <dewar@adacore.com>
14367         * opt.adb (Save_Opt_Config_Switches): Save SPARK_Mode_Pragma
14368         (Restore_Opt_Config_Switches): Restore SPARK_Mode_Pragma.
14369         * sem.adb (Semantics): Remove save/restore of
14370         SPARK_Mode[_Pragma]. Not needed since already done in
14371         Save/Restore_Opt_Config_Switches.
14373 2014-01-23  Robert Dewar  <dewar@adacore.com>
14375         * gnat_rm.texi, einfo.adb, einfo.ads, sem_prag.adb, gnat_ugn.texi,
14376         freeze.adb, repinfo.adb, aspects.adb, aspects.ads, sem_ch13.adb:
14377         Linker_Section enhancements.
14379 2014-01-23  Tristan Gingold  <gingold@adacore.com>
14381         * gnat_rm.texi: Minor editing.
14383 2014-01-23  Robert Dewar  <dewar@adacore.com>
14385         * opt.adb (Set_Opt_Config_Switches): Reset SPARK mode for
14386         with'ed internal units.
14387         * sem.adb (Semantics): Save and restore SPARK_Mode[_Pragma].
14389 2014-01-23  Javier Miranda  <miranda@adacore.com>
14391         * lib-xref.adb (Generate_Reference): As part of processing the
14392         "end-of-spec" reference generate an extra reference to the first
14393         private entity of the package.
14394         * xr_tabls.adb (Add_Reference): No action needed for the extra
14395         'E' reference associated; similar to the processing of the
14396         'e' reference.
14398 2014-01-23  Bob Duff  <duff@adacore.com>
14400         * gnat_ugn.texi: Change "--&pp off" to "--!pp off".
14402 2014-01-23  Ed Schonberg  <schonberg@adacore.com>
14404         * sem_util.ads, sem_util.adb (Is_Potentially_Unevaluated): new
14405         predicate to implement rule given in 6.1.1 (20/3).
14406         * sem_attr.adb (Analyze_Attribute, case 'Old): Reject prefix of
14407         'Old in a postcondition, if it is potentially unevaluated and
14408         it is not an entity name.
14410 2014-01-23  Bob Duff  <duff@adacore.com>
14412         * gnat_ugn.texi: Document the new "--&pp off" feature of gnatpp.
14414 2014-01-23  Robert Dewar  <dewar@adacore.com>
14416         * gnatlink.adb (Gnatlink): Fix problem of generating bad name
14417         msg on VMS.
14419 2014-01-23  Bob Duff  <duff@adacore.com>
14421         * g-dynhta.ads: Minor comment fix.
14423 2014-01-23  Yannick Moy  <moy@adacore.com>
14425         * sem_ch6.adb (Analyze_Subprogram_Body_Helper): Inherit SPARK_Mode
14426         from spec on body only when not already inherited on spec. Set
14427         SPARK_Mode from context on body without previous spec.  *
14428         * sem_prag.adb (Analyze_Pragma): Check placement of pragma on
14429         library-level entities.  Correct retrieval of entity from
14430         declaration, for cases where the declaration is not a unit.
14431         * sem_ch12.adb (Instantiate_Object): Avoid
14432         calling Is_Volatile_Object on an empty node.
14434 2014-01-23  Robert Dewar  <dewar@adacore.com>
14436         * gnatlink.adb (Gnatlink): Check for suspicious executable file
14437         names on windows.
14439 2014-01-23  Robert Dewar  <dewar@adacore.com>
14441         * a-ngelfu.ads: Remove bad uses of AND which should be AND THEN.
14442         * sem_res.adb (Check_No_Direct_Boolean_Operators): Don't give
14443         style errors in instances.
14444         * g-dynhta.ads (Static_HTable): Comment updates.
14446 2014-01-23  Vincent Celier  <celier@adacore.com>
14448         * prj-conf.adb (Get_Or_Create_Configuration_File): Do not attempt
14449         to find a configuration project file when Config_File_Name is
14450         No_Configuration_File.
14451         * prj-conf.ads (No_Configuration_File): New constant String.
14452         * prj-pars.adb (Parse): Call Get_Or_Create_Configuration_File
14453         with Config_File_Name set to No_Configuration_File, so that
14454         no existing configuration project file will be used, and the
14455         configuration project will be only created in memory when
14456         Add_Default_GNAT_Naming_Scheme is called.
14457         * projects.texi: Minor reformatting.
14459 2014-01-23  Vincent Celier  <celier@adacore.com>
14461         * prj-conf.adb (Get_Or_Create_Configuration_File): Never parse
14462         a config project file if On_Load_Config is not null.
14463         * prj-pars.adb: Minor comment changes.
14465 2014-01-23  Ed Schonberg  <schonberg@adacore.com>
14467         * lib-xref.adb (Output_References): Output progenitors of
14468         synchronized tagged types, for source navigation.
14470 2014-01-23  Robert Dewar  <dewar@adacore.com>
14472         * exp_util.adb, sinfo.adb, sinfo.ads, sem.adb, sem_res.adb,
14473         expander.adb, exp_ch11.adb, exp_ch11.ads, sem_ch11.adb, sem_ch11.ads,
14474         sprint.adb, sprint.ads: Remove unused node N_Subprogram_Info.
14476 2014-01-23  Emmanuel Briot  <briot@adacore.com>
14478         * prj-conf.adb (Get_Or_Create_Configuration_File): call
14479         On_Load_Config later.
14481 2014-01-23  Hristian Kirtchev  <kirtchev@adacore.com>
14483         * sem_ch3.adb (Analyze_Declarations): Do not
14484         generate the spec of the late primitive in ASIS mode. Add two
14485         comments to explain the special cases when the expansion is
14486         not performed.
14488 2014-01-23  Robert Dewar  <dewar@adacore.com>
14490         * sem_util.adb (Note_Possible_Modification): Fix error of
14491         misbehaving for implicit dereference cases in -gnatc mode.
14493 2014-01-23  Emmanuel Briot  <briot@adacore.com>
14495         * prj-pars.adb: Minor reformatting.
14497 2014-01-22  Ed Schonberg  <schonberg@adacore.com>
14499         * sem_ch6.adb (Analyze_Subprogram_Body_Helper): A subprogram
14500         body generated for an expression function within a protected body
14501         needs a set of renaming declarations if the expression function
14502         comes from source.
14504 2014-01-22  Ed Schonberg  <schonberg@adacore.com>
14506         * lib-xref.adb (Get_Type_Reference): In semantics-only mode,
14507         list interface progenitor of a tagged concurrent type, for better
14508         source navigation.
14510 2014-01-22  Robert Dewar  <dewar@adacore.com>
14512         * lib.adb (In_Extended_Main_Code_Unit): Return False for
14513         Standard_Location.
14514         (In_Extended_Main_Source_Unit): Return False for Standard_Location.
14515         * lib.ads (In_Extended_Main_Code_Unit): Add documentation on
14516         treatment of Slocs No_Location and Standard_Location.
14517         * restrict.adb (Check_Restriction_No_Dependence): Explicitly
14518         check for entity with Standard_Location Sloc, rather than relying
14519         on Lib routines to do that.
14520         * sem_res.adb (Resolve_Call): Implement SPARK_05 restriction
14521         that a call cannot occur before a later occuring body within
14522         the same unit.
14524 2014-01-22  Thomas Quinot  <quinot@adacore.com>
14526         * rtsfind.adb: Update comment.
14528 2014-01-22  Hristian Kirtchev  <kirtchev@adacore.com>
14530         * sem_aux.ads, sem_aux.adb (Is_Body): New routine.
14531         * sem_ch3.adb (Analyze_Declarations): Add local variable
14532         Body_Seen. Generate the spec of a late controlled
14533         primitive body that is about to freeze its related type.
14534         (Handle_Late_Controlled_Primitive): New routine.
14536 2014-01-22  Robert Dewar  <dewar@adacore.com>
14538         * a-stream.adb: Minor reformatting.
14540 2014-01-22  Ed Schonberg  <schonberg@adacore.com>
14542         * sem_ch8.adb (From_Actual_Package): Introduce a recursive
14543         sub-procedure Declared_In_Actual to handle properly the visibility
14544         of actuals in actual packages, that are themselves actuals to a
14545         actual package of the current instance. This mimics properly the
14546         visibility of formals of formal packages declared with a box,
14547         within the corresponding generic unit.
14549 2014-01-22  Robert Dewar  <dewar@adacore.com>
14551         * checks.adb: Do not assume that a volatile variable is valid.
14553 2014-01-22  Thomas Quinot  <quinot@adacore.com>
14555         * g-catiio.ads (Image, Value): Clarify that these functions
14556         operate in the local time zone.  Minor documentation update.
14558 2014-01-22  Thomas Quinot  <quinot@adacore.com>
14560         * csets.adb, csets.ads, opt.ads: Minor documentation fixes.
14562 2014-01-22  Robert Dewar  <dewar@adacore.com>
14564         * sem_aux.adb, sem_aux.ads, sem_ch3.adb (Has_Unconstrained_Elements):
14565         Moved to sem_aux.adb.
14567 2014-01-22  Robert Dewar  <dewar@adacore.com>
14569         * vms_data.ads: Minor reformatting.
14571 2014-01-22  Robert Dewar  <dewar@adacore.com>
14573         * debug.adb: Document messages affected by -gnatd.E including
14574         the new ones that relate to late definition of equality.
14575         * sem_ch6.adb (Check_Untagged_Equality): In Ada 2012 mode, if
14576         debug flag -gnatd.E is set, then generate warnings rather than
14577         errors.
14578         (Check_Untagged_Equality): In earlier versions of Ada,
14579         generate warnings if Warn_On_Ada_2012_Incompatibility flag is set.
14581 2014-01-22  Robert Dewar  <dewar@adacore.com>
14583         * sem_prag.adb (Usage_Error): Output additional messages for
14584         unconstrained OUT parameters lacking an input dependency.
14586 2014-01-22  Robert Dewar  <dewar@adacore.com>
14588         * sem_ch4.adb: Minor reformatting.
14590 2014-01-22  Robert Dewar  <dewar@adacore.com>
14592         * restrict.ads: Minor reformatting.
14593         * sem_res.adb (Resolve_Call): Check for SPARK_05 restriction that
14594         forbids a call from within a subprogram to the same subprogram.
14596 2014-01-22  Thomas Quinot  <quinot@adacore.com>
14598         * a-stream.ads (Read_SEA, Write_SEA): New subprograms, optimized
14599         stream attributes for Stream_Element_Array.
14600         * a-stream.adb (Read_SEA, Write_SEA): Bodies for the above.
14601         * rtsfind.adb (Check_CRT): Do not reject a reference to an entity
14602         defined in the current scope.
14604 2014-01-22  Robert Dewar  <dewar@adacore.com>
14606         * debug.adb, exp_ch4.adb, erroutc.adb: Minor reformatting.
14608 2014-01-22  Thomas Quinot  <quinot@adacore.com>
14610         * sem_ch7.adb, sem_ch8.adb, exp_ch3.adb: Minor reformatting.
14612 2014-01-22  Thomas Quinot  <quinot@adacore.com>
14614         * sem_ch3.adb (Analyze_Object_Declaration): For a constant
14615         declaration initialized with a function call, whose type
14616         has variable size, need to remove side effects so that the
14617         initialization expression becomes a dereference of a temporary
14618         reference to the function result.
14620 2014-01-22  Yannick Moy  <moy@adacore.com>
14622         * errout.adb (Initialize): Remove trick to add dummy entry
14623         in Warnings table.
14624         * erroutc.adb (Set_Warnings_Mode_Off,
14625         Set_Warnings_Mode_On): Do nothing if warnings are suppressed by
14626         command line switch.
14627         * opt.ads (Warning_Mode): Document behavior
14628         wrt pragma Warnings, in normal mode and in GNATprove_Mode.
14630 2014-01-22  Robert Dewar  <dewar@adacore.com>
14632         * sem_ch3.adb, errout.adb, erroutc.adb: Minor reformatting.
14634 2014-01-22  Robert Dewar  <dewar@adacore.com>
14636         * sem_ch13.adb (Check_Pool_Size_Clash): New procedure
14637         (Analyze_Attribute_Definition_Clause, case Storage_Pool): call
14638         Check_Pool_Size_Clash (Analyze_Attribute_Definition_Clause,
14639         case Storage_Size): call Check_Pool_Size_Clash.
14641 2014-01-22  Robert Dewar  <dewar@adacore.com>
14643         * sem_ch3.adb, exp_util.adb, sem_dim.adb, sem_elab.adb, sem_ch8.adb,
14644         sem_eval.ads: Minor reformatting.
14646 2014-01-22  Thomas Quinot  <quinot@adacore.com>
14648         * sem_eval.adb (Compile_Time_Known_Bounds): Return False for
14649         Any_Composite to prevent cascaded errors.
14651 2014-01-22  Yannick Moy  <moy@adacore.com>
14653         * errout.adb (Initialize): Do not insert special entry in Warnings
14654         table in GNATprove_Mode.
14655         * erroutc.adb (Set_Warnings_Mode_On): Add info in Warnings table in
14656         GNATprove_Mode.
14657         * gnat1drv.adb (Adjust_Global_Switches): Do not suppress frontend
14658         warnings anymore.
14660 2014-01-22  Robert Dewar  <dewar@adacore.com>
14662         * sem_prag.adb (Analyze_Initializes_In_Decl_Part): Handle null
14663         initializes case.
14665 2014-01-22  Robert Dewar  <dewar@adacore.com>
14667         * snames.ads-tmpl: Update header.
14669 2014-01-22  Thomas Quinot  <quinot@adacore.com>
14671         * exp_util.adb (Insert_Actions): When inserting actions on a
14672         short circuit operator that has already been analyzed, do not park
14673         actions in node; instead introduce an N_Expression_With_Actions
14674         and insert actions immediately.
14675         Add guard for unexpected case of climbing up through statement
14676         in Actions list of an N_Expression_With_Actions.
14677         * sem_elab.adb (Insert_Elab_Check): Remove complex
14678         specialized circuitry for the case where the context is already
14679         analyzed, as it is not needed and introduces irregularities in
14680         finalization. Instead rely on the above change to Insert_Actions
14681         to ensure that late insertion on short circuit operators works
14682         as expected.
14684 2014-01-22  Ed Schonberg  <schonberg@adacore.com>
14686         * sem_ch4.adb (Operator_Check): Improve error message when an
14687         operand of concatenation is an access type.
14689 2014-01-22  Thomas Quinot  <quinot@adacore.com>
14691         * sem_dim.adb (Analyze_Dimension_Identifier): Add guard against
14692         cascaded error.
14694 2014-01-22  Ed Schonberg  <schonberg@adacore.com>
14696         * sem_ch8.adb (Find_Selected_Component): Handle properly the case
14697         of an expanded name in a proper body, whose prefix is a package
14698         in the context of the proper body, when there is a homonym of
14699         the package declared in the parent unit.
14701 2014-01-22  Robert Dewar  <dewar@adacore.com>
14703         * sem_warn.adb (Check_Use_Clause): Don't give no entities used
14704         msg if errors found.
14705         (Check_One_Unit): Same change.
14707 2014-01-22  Robert Dewar  <dewar@adacore.com>
14709         * ug_words: Add missing/wrong entries for VMS warning switches.
14710         * sem_prag.adb (Check_Duplicate_Pragma): Avoid flagging parent type.
14712 2014-01-22  Jerome Guitton  <guitton@adacore.com>
14714         * mlib-tgt-specific-vxworks.adb (Get_Target_Suffix): Replace xscale by
14715         arm.
14717 2014-01-22  Robert Dewar  <dewar@adacore.com>
14719         * gnat_rm.texi, gnat_ugn.texi: Document passive task optimization
14721 2014-01-22  Eric Botcazou  <ebotcazou@adacore.com>
14723         * gcc-interface/Makefile.in: Minor fixes.
14725 2014-01-21  Robert Dewar  <dewar@adacore.com>
14727         * par-ch4.adb (P_If_Expression): Rewritten to improve error recovery.
14728         * par-ch5.adb (P_Condition): New version with expression prescanned.
14729         * par.adb (P_Condition): New version with expression prescanned.
14731 2014-01-21  Robert Dewar  <dewar@adacore.com>
14733         * gnat_rm.texi: Document that Allow_Integer_Address is ignored
14734         if Address is not a private type.
14735         * sem_prag.adb (Analyze_Pragma, case Allow_Integer_Address):
14736         Ignore pragma if System.Address is not a private type.
14738 2014-01-21  Arnaud Charlet  <charlet@adacore.com>
14740         * namet.ads (Name_Len): Initialize to 0 to avoid accessing an
14741         uninitialized value.
14743 2014-01-21  Thomas Quinot  <quinot@adacore.com>
14745         * gnat_rm.texi (Scalar_Storage_Order): Update documentation.
14747 2014-01-21  Ed Schonberg  <schonberg@adacore.com>
14749         * sem_ch12.adb (Set_Instance_Env): In Ada 2012 mode, preserve
14750         the value of Assertions_Enabled flag when compiling an instance of
14751         an internal unit. This facilitates the use of pre/postconditions
14752         in generic internal units, such as the new elementary function
14753         libraries.
14755 2014-01-21  Robert Dewar  <dewar@adacore.com>
14757         * exp_aggr.adb: Minor reformatting.
14758         * sem_attr.adb: Minor reformatting.
14759         * sem_res.adb: Minor comment addition.
14760         * einfo.adb: Minor comment updates.
14761         * freeze.adb: Minor reformatting and code reorganization.
14763 2014-01-21  Ed Schonberg  <schonberg@adacore.com>
14765         * par-ch4.adb (P_If_Expression): Handle more gracefully an
14766         elsif clause that does not have an else part.
14768 2014-01-21  Robert Dewar  <dewar@adacore.com>
14770         * checks.adb, sem_util.ads, sem_ch4.adb: Minor reformatting.
14771         * gcc-interface/Makefile.in: clean up target pairs.
14773 2014-01-21  Pascal Obry  <obry@adacore.com>
14775         * projects.texi: Minor typo fix.
14777 2014-01-21  Thomas Quinot  <quinot@adacore.com>
14779         * freeze.adb (Check_Component_Storage_Order): If a record type
14780         has an explicit Scalar_Storage_Order attribute definition clause,
14781         reject any component that itself is of a composite type and does
14782         not have one.
14784 2014-01-21  Ed Schonberg  <schonberg@adacore.com>
14786         * sem_ch10.adb (Generate_Parent_Reference): Make public so it
14787         can be used to generate proper cross-reference information for
14788         the parent units of proper bodies.
14790 2014-01-21  Thomas Quinot  <quinot@adacore.com>
14792         * exp_pakd.adb (Expand_Packed_Element_Set,
14793         Expand_Packed_Element_Reference): No byte swapping required in
14794         the front-end for the case of a reverse storage order array,
14795         as this is now handled uniformly in the back-end.  However we
14796         still need to swap back an extracted element if it is itself a
14797         nested composite with reverse storage order.
14799 2014-01-21  Hristian Kirtchev  <kirtchev@adacore.com>
14801         * sem_prag.adb (Analyze_External_Property): Add processing for "others".
14802         (Analyze_Pragma): Update the grammar of pragma Abstract_State to
14803         include "others".
14805 2014-01-21  Arnaud Charlet  <charlet@adacore.com>
14807         * gnat_ugn.texi: Minor updates.
14809 2014-01-21  Thomas Quinot  <quinot@adacore.com>
14811         * exp_pakd.adb: Update comment, minor reformatting.
14813 2014-01-21  Hristian Kirtchev  <kirtchev@adacore.com>
14815         * sem_ch3.adb (Analyze_Variable_Contract): Trigger the volatile
14816         object check when SPARK_Mode is on.
14817         * sem_ch6.adb (Process_Formals): Trigger the volatile object
14818         check when SPARK_Mode is on.
14819         * sem_ch12.adb (Instantiate_Object): Trigger the volatile object
14820         check when SPARK_Mode is on.
14821         * sem_ch13.adb (Analyze_Aspect_Specifications): Insert the
14822         corresponding pragma of aspect SPARK_Mode in the visible
14823         declarations of a package declaration.
14824         * sem_prag.adb (Analyze_Pragma): Trigger the volatile object
14825         check when SPARK_Mode is on.
14826         * sem_res.adb (Resolve_Actuals): Trigger the volatile object
14827         check when SPARK_Mode is on.
14828         (Resolve_Entity_Name): Trigger
14829         the volatile object check when SPARK_Mode is on.
14831 2014-01-21  Robert Dewar  <dewar@adacore.com>
14833         * sem_ch3.adb, sem_prag.adb, sem_prag.ads, sem_ch12.adb, sem_res.adb,
14834         sem_ch6.adb, a-except-2005.adb: Minor reformatting.
14836 2014-01-21  Ed Schonberg  <schonberg@adacore.com>
14838         * exp_ch3.adb (Expand_N_Object_Declaration): When a class-wide
14839         object is declared, it is rewritten as a renaming of an dynamic
14840         expression that wraps the initial value.  The renaming declaration
14841         is first given an internal name, to prevent collisions with the
14842         entity already declared, and then the name is modified to reflect
14843         the original one. the modification of the name must preserve
14844         the source location of the original, to prevent spurious errors
14845         when compiling with style checks if the declaration involves
14846         more than one entity.
14848 2014-01-21  Hristian Kirtchev  <kirtchev@adacore.com>
14850         * aspects.adb Add entries for Async_Readers, Async_Writers,
14851         Effective_Reads and Effective_Writes in table Canonical_Aspect.
14852         * aspects.ads Add entries for Async_Readers, Async_Writers,
14853         Effective_Reads and Effective_Writes in tables Aspect_Id,
14854         Aspect_Names, Aspect_Delay and Implementation_Defined_Aspect.
14855         * atree.adb (Ekind_In): New version with 8 parameters.
14856         (Node34): New routine.
14857         (Set_Node34): New routine.
14858         * atree.ads (Ekind_In): New version with 8 parameters.
14859         (Node34): New routine.
14860         (Set_Node34): New routine.
14861         * einfo.adb Contract is now Node34.
14862         (Contract): Update the assertion and node usage.
14863         (Get_Pragma): Include pragmas Async_Readers, Async_Writers,
14864         Effective_Reads and Effective_Writes.
14865         (Set_Contract): Update the assertion and node usage.
14866         (Write_Field24_Name): Remove the output for a contract.
14867         (Write_Field34_Name): Add output for a contract.
14868         * einfo.ads Contract is now Node34. Update the comment on
14869         attribute usage and related node structures.
14870         (Get_Pragma): Update the comment on usage.
14871         * par-prag.adb (Prag): Pragmas Async_Readers, Async_Writers,
14872         Effective_Reads and Effective_Writes do not require special
14873         processing by the parser.
14874         * sem_ch3.adb (Analyze_Variable_Contract): New routine.
14875         (Analyze_Declarations): Analyze the contract of a variable at
14876         the end of the declarative region.
14877         (Analyze_Object_Declaration): Create a contract for a variable.
14878         * sem_ch6.adb (Analyze_Subprogram_Contract): Update the retrieval
14879         of classification pragmas.
14880         (Process_Formals): Detect an illegal
14881         use of a volatile object as a formal in a function.
14882         * sem_ch12.adb (Instantiate_Object): Detect an illegal use of
14883         a volatile object as an actual in generic instantiation.
14884         * sem_prag.adb Add entries for Async_Readers, Async_Writers,
14885         Effective_Reads and Effective_Writes in table Sig_Flags.
14886         (Analyze_External_State_In_Decl_Part): New routine.
14887         (Analyze_Global_Item): Detect an illegal use of a volatile object
14888         as a global item of a function.
14889         (Analyze_Pragma): Reimplement
14890         pragma Abstract_State. Add support for pragmas Async_Readers,
14891         Async_Writers, Effective_Reads and Effective_Writes.
14892         (Check_External_Properties): New routine.
14893         * sem_prag.ads (Analyze_External_State_In_Decl_Part): New routine.
14894         (Check_External_Properties): New routine.
14895         * sem_res.adb (Resolve_Actuals): Detect an illegal use of a
14896         volatile object as an actual in a call.
14897         (Resolve_Entity_Name):
14898         Add local variables Par, Prev and Usage_OK. Detect illegal
14899         contexts of volatile objects.
14900         * sem_util.adb (Add_Contract_Item): Add support for
14901         pragmas associated with the contract of a variable.
14902         (Async_Readers_Enabled): New routine.
14903         (Async_Writers_Enabled): New routine.
14904         (Effective_Reads_Enabled): New routine.
14905         (Effective_Writes_Enabled): New routine.
14906         (Has_Enabled_Property):
14907         New routine.
14908         (Is_Unchecked_Conversion_Instance): New routine.
14909         (Is_Volatile_Object): Add support for entities that may denote
14910         a volatile object.
14911         * sem_util.ads (Add_Contract_Item): Update the
14912         comment on usage.
14913         (Async_Readers_Enabled): New routine.
14914         (Async_Writers_Enabled): New routine.
14915         (Effective_Reads_Enabled): New routine.
14916         (Effective_Writes_Enabled): New routine.
14917         (Is_Unchecked_Conversion_Instance): New routine.
14918         * sinfo.ads Update the comment on the structure of N_Contract.
14919         * snames.ads-tmpl Add predefined names for Async_Readers,
14920         Async_Writers, Effective_Reads and Effective_Writes. Add
14921         pragma ids for Async_Readers, Async_Writers, Effective_Reads
14922         and Effective_Writes.
14924 2014-01-21  Robert Dewar  <dewar@adacore.com>
14926         * exp_ch4.adb (Eval_Op_Expon): Use CRT_Safe_Compile_Time_Known_Value
14927         * sem_eval.adb (Compile_Time_Known_Value): Remove special
14928         handling of CRT mode (CRT_Safe_Compile_Time_Known_Value): New
14929         function (Eval_Op_Expon): Add CRT_Safe in call to Test_Foldable
14930         (Test_Foldable): Add CRT_Safe parameter
14931         * sem_eval.ads (Compile_Time_Known_Value): Remove special
14932         handling of CRT mode.
14933         (CRT_Safe_Compile_Time_Known_Value): New function.
14935 2014-01-21  Robert Dewar  <dewar@adacore.com>
14937         * sem_prag.adb (Analyze_Pragma, case SPARK_Mode): Fix problem
14938         with pragma or aspect that applies to package spec or subprogram
14939         spec.
14941 2014-01-21  Robert Dewar  <dewar@adacore.com>
14943         * exp_aggr.adb: Minor reformatting.
14945 2014-01-21  Johannes Kanig  <kanig@adacore.com>
14947         * gnat1drv.adb (Gnat1drv) remove obsolete reference to -gnatd.H.
14949 2014-01-21  Bob Duff  <duff@adacore.com>
14951         * gnat_ugn.texi: Document the "checks" attribute in gnat2xml.
14953 2014-01-21  Steve Baird  <baird@adacore.com>
14955         * gnat_rm.texi: Improve description of SPARK_Mode pragma.
14957 2014-01-21  Vincent Celier  <celier@adacore.com>
14959         * prj-part.adb (Parse_Single_Project): Accept to extend a project
14960         if it has only be imported by an project being extended. When a
14961         project that has only been imported by a project being extended
14962         is imported by another project that is not being extended,
14963         reset the previous indication, so that it will be an error if
14964         this project is extended later.
14965         * prj-tree.adb (Create_Project): Include component From_Extended
14966         in table Projects_HT
14967         * prj-tree.ads (Project_Name_And_Node): New Boolean component
14968         From_Extended
14970 2014-01-21  Robert Dewar  <dewar@adacore.com>
14972         * atree.ads, atree.adb: Add Node33 and Set_Node33.
14973         * einfo.ads, einfo.adb (SPARK_Pragma): New field (SPARK_Aux_Pragma):
14974         New field (SPARK_Pragma_Inherited): New flag
14975         (SPARK_Aux_Pragma_Inherited): New flag (SPARK_Mode_Pragmas):
14976         Removed.
14977         * lib.ads, lib.adb: Remove SPARK_Mode_Pragma, no longer used.
14978         * opt.ads (SPARK_Mode_Pragma): New global variable.
14979         * sem.ads: Add Save_SPARK_Mode_Pragma field to Scope_Stack_Entry.
14980         * sem_ch3.adb: Use new SPARK_Mode data structures.
14981         * sem_ch6.adb: Set SPARK_Mode fields in subprogram specs and bodies.
14982         * sem_ch7.adb: Set SPARK_Mode fields in package spec and body entities.
14983         * sem_ch8.adb (Push_Scope): Save SPARK_Mode_Pragma.
14984         (Pop_Scope): Restore SPARK_Mode_Pragma.
14985         * sem_prag.adb (Analyze_Pragma, case SPARK_Mode): Rewrite for
14986         new data structures.
14988 2014-01-21  Arnaud Charlet  <charlet@adacore.com>
14990         * back_end.adb: Undo previous change, not needed. Minor reformatting.
14992 2014-01-21  Thomas Quinot  <quinot@adacore.com>
14994         * exp_ch5.adb: Fix comment.
14995         * switch-c.adb: Minor comment update.
14996         * exp_ch3.adb: Minor reformatting.
14998 2014-01-21  Arnaud Charlet  <charlet@adacore.com>
15000         * back_end.adb (Scan_Compiler_Arguments): Do not store object
15001         filename in gnatprove mode.
15003 2014-01-21  Thomas Quinot  <quinot@adacore.com>
15005         * sinfo.ads (No_Ctrl_Actions): Clarify documentation (flag also
15006         suppresses usage of primitive _assign for tagged types).
15007         * exp_aggr.adb (Build_Array_Aggr_Code.Gen_Assign): Set
15008         No_Ctrl_Actions for a tagged type that does not require
15009         finalization, as we want to disable usage of _assign (which
15010         may cause undesirable discriminant checks on an uninitialized,
15011         invalid target).
15013 2014-01-21  Ed Schonberg  <schonberg@adacore.com>
15015         * sem_prag.adb: Reject invariant'class on completion.
15017 2014-01-21  Javier Miranda  <miranda@adacore.com>
15019         * exp_ch3.adb (Build_Init_Procedure): For
15020         derivations of interfaces, do not move the the initialization
15021         of the _parent field since such assignment is not generated.
15023 2014-01-21  Ed Schonberg  <schonberg@adacore.com>
15025         * sem_res.adb (Rewrite_Renamed_Operator): Do not replace entity
15026         with the operator it renames if we are within an expression of
15027         a pre/postcondition, because the expression will be reanalyzed
15028         at a later point, and the analysis of the renaming may affect
15029         the visibility of the operator when in an instance.
15031 2014-01-21  Robert Dewar  <dewar@adacore.com>
15033         * sinfo.ads, sinfo.adb: Change Do_Discriminant_Check to use new Flag1.
15034         Add this flag to type conversion nodes and assignment nodes.
15035         * treepr.adb: Deal properly with Flag 1,2,3.
15036         * treeprs.adt: Minor comment update.
15038 2014-01-21  Robert Dewar  <dewar@adacore.com>
15040         * sem_eval.adb (Compile_Time_Known_Value): Add Ignore_CRT
15041         parameter.
15042         * sem_eval.ads (Compile_Time_Known_Value): Add Ignore_CRT
15043         parameter, completely rewrite spec.
15045 2014-01-21  Ed Schonberg  <schonberg@adacore.com>
15047         * sem_ch10.adb (Install_Withed_Unit): If the unit is a subprogram
15048         instance that is inlined, it may have been rewritten as a wrapper
15049         package. In that case the unit that must be made visible is the
15050         related instance of the package.
15052 2014-01-21  Arnaud Charlet  <charlet@adacore.com>
15054         * exp_ch9.adb (Expand_N_Selective_Accept.Add_Accept): Refine
15055         previous change in codepeer mode.
15057 2014-01-21  Arnaud Charlet  <charlet@adacore.com>
15059         * exp_ch9.adb (Expand_N_Selective_Accept.Add_Accept): Always add
15060         call to Abort_Undefer, as expected by the runtime.
15061         * s-tasren.adb (Local_Complete_Rendezvous): Replace
15062         Defer_Abort_Nestable by Defer_Abort, since we do not expect abort to be
15063         deferred at this point. Update comments.
15065 2014-01-21  Thomas Quinot  <quinot@adacore.com>
15067         * exp_ch4.adb, exp_ch5.adb, checks.adb: Minor reformatting.
15069 2014-01-21  Arnaud Charlet  <charlet@adacore.com>
15071         * switch-c.adb, usage.adb, gnat_ugn.texi: Mark -gnates as internal,
15072         remove from doc.
15074 2014-01-21  Robert Dewar  <dewar@adacore.com>
15076         * switch-c.adb, usage.adb, atree.adb, atree.ads: Minor reformatting.
15078 2014-01-21  Thomas Quinot  <quinot@adacore.com>
15080         * atree.adb, atree.ads (Num_Extension_Nodes): Switch to Node_Id, since
15081         this is value is used in Node_Id arithmetic operations.
15082         (Copy_Node, Exchange_Entities): Use loops indexed by Num_Extension_Nodes
15083         instead of hard-coded unrolled code.
15085 2014-01-21  Yannick Moy  <moy@adacore.com>
15087         * gnat1drv.adb: Minor code cleanup, removing useless code.
15089 2014-01-21  Arnaud Charlet  <charlet@adacore.com>
15091         * opt.ads (SPARK_Switches_File_Name): New.
15092         * switch-c.adb (Scan_Front_End_Switches): Add handling of -gnates=xxx *
15093         * usage.adb (Usage): Document -gnates, in gnatprove mode only.
15094         * gnat_ugn.texi: Document -gnates.
15096 2014-01-21  Yannick Moy  <moy@adacore.com>
15098         * errout.adb (Special_Msg_Delete): Update comment. Remove
15099         special case for GNATprove which should not ignore mismatch
15100         in sizes for representation clauses.
15101         * sem_prag.adb (Analyze_Pragma): Remove special case for GNATprove
15102         which should not ignore pragma Pack.
15104 2014-01-21  Ed Schonberg  <schonberg@adacore.com>
15106         * sem_ch4.adb: Code clean up.
15108 2014-01-21  Steve Baird  <baird@adacore.com>
15110         * gnat_rm.texi: Improve GNAT RM description of SPARK_Mode pragma.
15112 2014-01-21  Robert Dewar  <dewar@adacore.com>
15114         * gcc-interface/gigi.h: Get Flags array address.
15115         * gcc-interface/trans.c: Acquire Flags array address.
15116         * atree.adb: Add support for Flags array and Flag0,1,2,3.
15117         * atree.ads: Add support for Flags array and Flag0,1,2,3.
15118         * atree.h: Add support for Flags array and Flag0,1,2,3.
15119         * back_end.adb: Pass Flags array address to gigi.
15121 2014-01-21  Ed Schonberg  <schonberg@adacore.com>
15123         * sem_ch8.adb (Attribute_Renaming): Transfer original attribute
15124         reference to generated body so that legality checks on stream
15125         attributes are properly applied. If type is tagged and already
15126         frozen, insert generated body at the point of the renaming
15127         declaration.
15129 2014-01-21  Ed Schonberg  <schonberg@adacore.com>
15131         * sem_ch12.adb: Code clean up.
15132         * sem_ch8.adb: Minor reformatting
15134 2014-01-20  Robert Dewar  <dewar@adacore.com>
15136         * checks.adb: Check SPARK_Mode instead of GNATProve_Mode for
15137         converting warnings on inevitable exceptions to errors.
15138         * exp_ch4.adb: Check SPARK_Mode instead of GNATProve_Mode for
15139         converting warnings on inevitable exceptions to errors.
15140         * opt.adb (SPARK_Mode_Config): Handled like other config flags
15141         * opt.ads (SPARK_Mode_Type): Moved here from types (renamed from
15142         SPARK_Mode_Id) (SPARK_Mode_Type): Add pragma Ordered, remove
15143         SPARK_ from names (SPARK_Mode): New flag (SPARK_Mode_Config):
15144         New flag (Config_Switches_Type): Add SPARK_Mode field
15145         * sem.adb: Minor code reorganization (remove unnecessary with)
15146         * sem.ads (Scope_Stack_Entry): Add Save_SPARK_Mode field
15147         * sem_aggr.adb: Check SPARK_Mode instead of GNATProve_Mode for
15148         converting warnings on inevitable exceptions to errors.
15149         * sem_attr.adb: Check SPARK_Mode instead of GNATProve_Mode for
15150         converting warnings on inevitable exceptions to errors.
15151         * sem_ch3.adb: Check SPARK_Mode instead of GNATProve_Mode for
15152         converting warnings on inevitable exceptions to errors.
15153         * sem_ch4.adb: Check SPARK_Mode instead of GNATProve_Mode for
15154         converting warnings on inevitable exceptions to errors.
15155         * sem_ch6.adb (Analyze_Subprogram_Body_Helper): Reset SPARK_Mode
15156         from spec if needed
15157         * sem_ch7.adb (Analyze_Package_Body_Helper): Reset SPARK_Mode
15158         from spec if needed
15159         * sem_ch8.adb (Push_Scope): Save SPARK_Mode (Pop_Scope):
15160         Restore SPARK_Mode
15161         * sem_elab.adb: Check SPARK_Mode instead of GNATProve_Mode for
15162         converting warnings on inevitable exceptions to errors.
15163         * sem_prag.adb (Get_SPARK_Mode_From_Pragma): New function
15164         (Get_SPARK_Mode_Id): Removed (Get_SPARK_Mode_Type): New name
15165         of Get_SPARK_Mode_Id
15166         * sem_prag.ads (Get_SPARK_Mode_From_Pragma): New function
15167         * sem_res.adb: Check SPARK_Mode instead of GNATProve_Mode for
15168         converting warnings on inevitable exceptions to errors.
15169         * sem_util.adb: Check SPARK_Mode instead of GNATProve_Mode for
15170         converting warnings on inevitable exceptions to errors.
15171         * types.ads (SPARK_Mode_Id): Moved to opt.ads and renamed
15172         SPARK_Mode_Type
15174 2014-01-20  Ed Schonberg  <schonberg@adacore.com>
15176         * sem_ch13.adb: Add semantic information to rewritten type
15177         reference.
15179 2014-01-20  Ed Schonberg  <schonberg@adacore.com>
15181         * exp_ch5.adb (Expand_N_Assignment_Statement): If both sides
15182         are of a type with unknown discriminants, convert both to the
15183         underlying view of the type, so that the proper constraint check
15184         can be applied to the right-hand side.
15186 2014-01-20  Robert Dewar  <dewar@adacore.com>
15188         * atree.adb (Copy_Node): Fix failure to copy last component
15189         (Exchange_Entities): Fix failure to exchange last entity
15191 2014-01-20  Ed Schonberg  <schonberg@adacore.com>
15193         * sem_ch12.adb: Code clean up.
15195 2014-01-20  Robert Dewar  <dewar@adacore.com>
15197         * gnat_rm.texi, sem_ch4.adb: Minor reformatting.
15199 2014-01-20  Ed Schonberg  <schonberg@adacore.com>
15201         * sem_ch4.adb (Analyze_Quantified_Expression): If after
15202         pre-analysis  the loop parameter specification has been
15203         rewritten as a iterator specification, propagate the change to
15204         the quantified expression, for ASIS navigtion needs.
15206 2014-01-20  Vincent Celier  <celier@adacore.com>
15208         * par-ch10.adb: Minor error message change: escape [ and ].
15210 2014-01-20  Robert Dewar  <dewar@adacore.com>
15212         * checks.adb: Make warnings on exceptions into errors in GNATprove mode.
15213         * errout.adb: Implement [ and ] insertion characters.
15214         * errout.ads: Document new [ and ] insertion characters.
15215         * sem_ch12.adb, restrict.adb, frontend.adb, exp_ch7.adb: Minor
15216         addition of ??? comment.
15217         * lib-xref.adb, exp_util.adb, gnat1drv.adb: Minor reformatting
15218         * exp_ch4.adb, sem_ch3.adb, sem_ch4.adb, sem_ch6.adb, sem_elab.adb,
15219         sem_eval.adb, sem_res.adb, sem_util.adb, sem_attr.adb, sem_aggr.adb:
15220         Make warnings on exceptions into errors in GNATprove mode.
15221         * sem_dim.adb: Minor reformatting throughout Quote [ and ]
15222         in error messages.
15224 2014-01-20  Ed Schonberg  <schonberg@adacore.com>
15226         * sem_ch13.adb: Code clean up.
15228 2014-01-20  Robert Dewar  <dewar@adacore.com>
15230         * errout.ads, errout.adb: Implement >? >x? >X? sequences in error
15231         messages.
15232         * sem_ch6.adb (Check_Statement_Sequence): Missing return is an
15233         error in GNATprove mode.
15235 2014-01-20  Ed Schonberg  <schonberg@adacore.com>
15237         * par-ch4.adb (Is_Parameterless_Attribute): The Ada2012 attribute
15238         reference 'Old takes no parameters, and thus can appear as a
15239         prefix of a slice.
15241 2014-01-20  Eric Botcazou  <ebotcazou@adacore.com>
15243         * exp_aggr.adb: Fix minor typos.
15245 2014-01-20  Ed Schonberg  <schonberg@adacore.com>
15247         * sem_attr.adb (Analyze_Attribute, case 'Constrained): In an
15248         instance the attribute is legal, and its value is determined
15249         statically if the type has no discriminants. This choice is
15250         more useful than rechecking the legality rule in the instance,
15251         is consistent with older usage, and is also consistent with all
15252         existing tests.
15254 2014-01-20  Arnaud Charlet  <charlet@adacore.com>
15256         * sem_cat.adb (Validate_Static_Object_Name): Change error into
15257         warning in Relaxed_Semantic_Mode.
15259 2014-01-20  Ed Schonberg  <schonberg@adacore.com>
15261         * sem_attr.adb: Code and comments cleanup.
15263 2014-01-20  Yannick Moy  <moy@adacore.com>
15265         * debug.adb Free debug flags -gnatd.D, -gnatd.G and -gnatd.V *
15266         * errout.adb (Compilation_Errors): Remove special handling in
15267         GNATprove mode.
15268         * gnat1drv.adb (Adjust_Global_Switches): Remove handling of the
15269         removed debug flags.
15270         * gnat_rm.texi: Initial documentation for Abstract_State, Depends,
15271         Global, Initial_Condition, Initializes and Refined_State pragmas and
15272         aspects.
15273         * opt.ads (Frame_Condition_Mode, Formal_Extensions,
15274         SPARK_Strict_Mode): Remove global flags.
15275         * sem_ch3.adb (Analyze_Object_Declaration): Check of no hidden state
15276         always performed now, on packages declaring a null state.
15277         (Signed_Integer_Type_Declaration): Remove ill-designed attempt
15278         at providing pedantic mode for bounds of integer types.
15279         * sem_ch4.adb (Analyze_Quantified_Expression): Warning on suspicious
15280         "some" quantified expression now issued under control of -gnatw.t,
15281         like the other warning on unused bound variable.
15282         * sem_prag.adb (Check_Precondition_Postcondition): Remove useless test
15283         on removed flag.
15284         (Analyze_Pragma): Remove tests for SPARK 2014
15285         pragmas, not officially allowed by GNAT.
15287 2014-01-20  Hristian Kirtchev  <kirtchev@adacore.com>
15289         * sem_prag.adb (Analyze_Pragma): Ensure that
15290         the sole argument of pragmas Abstract_State, Contract_Cases,
15291         Depends, Global and Initializes in in aggregate form.
15292         (Analyze_Refined_Pragma): Ensure that the sole argument of
15293         pragmas Refined_Depends, Refined_Global and Refined_State is in
15294         aggregate form.
15295         (Ensure_Aggregate_Form): New routine.
15297 2014-01-20  Doug Rupp  <rupp@adacore.com>
15299         * sem_attr.adb (Analyze_Attribute): case
15300         Attribute_Constrained => treat all prefixes as legal for Declib
15301         compatibility.
15303 2014-01-20  Hristian Kirtchev  <kirtchev@adacore.com>
15305         * sem_prag.adb (Check_Mode): Reimplement the routine.
15306         (Find_Mode): New routine.
15308 2014-01-20  Robert Dewar  <dewar@adacore.com>
15310         * sem_ch4.adb (Operator_Check): Handle additional
15311         Allow_Integer_Address cases.
15313 2014-01-20  Robert Dewar  <dewar@adacore.com>
15315         * gnat_rm.texi (Allow_Integer_Address): Remove note about not
15316         allowed if address is non-private, no longer true.
15317         * sem_prag.adb (Analyze_Pragma, case Allow_Integer_Address):
15318         Remove check for address being private, causes difficulty when
15319         pragma used in gnat.adc file and is not needed, since we guard
15320         this in Address_Integer_Convert_OK.
15321         * exp_ch7.adb: Minor reformatting.
15322         * sem_ch4.adb: Handle operator operands in Allow_Integer_Address mode.
15324 2014-01-20  Robert Dewar  <dewar@adacore.com>
15326         * checks.adb (Apply_Range_Check): Remove gnatprove special
15327         casing of exponentiation.
15328         * sem_res.adb (Resolve_Op_Expon): Apply range check to right
15329         operand for integer case to check range against Natural.
15331 2014-01-20  Robert Dewar  <dewar@adacore.com>
15333         * s-tataat.adb: Minor reformatting.
15335 2014-01-20  Robert Dewar  <dewar@adacore.com>
15337         * einfo.adb (Is_Descendent_Of_Address): Now applies to all
15338         entities, and also fix documentation to remove mention of visible
15339         integer type, since this is not what the implementation does.
15340         * einfo.ads (Is_Descendent_Of_Address): Now applies to all
15341         entities, and also fix documentation to remove mention of visible
15342         integer type, since this is not what the implementation does.
15343         * gnat_rm.texi: Minor clarification of Allow_Integer_Address
15344         function.
15345         * sem_ch4.adb (Analyze_One_Call): Handle Allow_Integer_Address
15346         case for parameter type check.
15347         * sem_res.adb (Resolve): Use new function
15348         Address_Integer_Convert_OK.
15349         * sem_type.adb: Minor code reorganization (use Ekind_In) Minor
15350         reformatting throughout.
15351         * sem_util.adb (Address_Integer_Convert_OK): New function.
15352         * sem_util.ads: Minor reformatting (put specs in alpha order)
15353         (Address_Integer_Convert_OK): New function.
15355 2014-01-20  Thomas Quinot  <quinot@adacore.com>
15357         * exp_ch7.adb (Wrap_Transient_Expression):
15358         Insertion extra conditional expression only if
15359         Opt.Suppress_Control_Flow_Optimizations is set.
15361 2014-01-20  Arnaud Charlet  <charlet@adacore.com>
15363         * s-tataat.adb (Initialize_Attributes): Abort might already be
15364         deferred in Create_Task.
15366 2014-01-20  Hristian Kirtchev  <kirtchev@adacore.com>
15368         * checks.adb (Apply_Scalar_Range_Check): Flag
15369         the exponent as requiring a range check when the expression is
15370         an exponentiation.
15372 2014-01-20  Fedor Rybin  <frybin@adacore.com>
15374         * gnat_ugn.texi: Documenting --passed-tests option for gnattest.
15376 2014-01-20  Hristian Kirtchev  <kirtchev@adacore.com>
15378         * sem_util.adb (Default_Initialization): New routine.
15379         * sem_util.ads: Add new type Default_Initialization_Kind.
15380         (Default_Initialization): New routine.
15382 2014-01-20  Hristian Kirtchev  <kirtchev@adacore.com>
15384         * sem_prag.adb (Check_Mode): Correct all error
15385         message logic dealing with in/in out parameters that may appear
15386         as inputs or have a self reference.
15388 2014-01-20  Robert Dewar  <dewar@adacore.com>
15390         * exp_ch9.adb, checks.adb, exp_intr.adb: Minor reformatting.
15391         * sem_res.adb (Resolve): Fix error causing infinite loop for
15392         integer used as address. Allow addresses as integers.
15394 2014-01-20  Arnaud Charlet  <charlet@adacore.com>
15396         * s-osinte-linux.ads (struct_sigaction): Fix rep clause.
15398 2014-01-20  Bob Duff  <duff@adacore.com>
15400         * par-ch8.adb (P_Use_Type_Clause): Detect syntax
15401         error when "use all" is not followed by "type".
15403 2014-01-20  Bob Duff  <duff@adacore.com>
15405         * exp_intr.adb (Expand_Unc_Deallocation): Remove warning on abort
15406         followed by free.
15408 2014-01-20  Ed Schonberg  <schonberg@adacore.com>
15410         * checks.adb (Apply_Address_Clause_Check): If there is an
15411         alignment check on the expression in an address clause, and there
15412         is no local exception propagation, add an additional explanatory
15413         message to clarify the cause of previous warning.
15415 2014-01-20  Robert Dewar  <dewar@adacore.com>
15417         * exp_ch7.adb: Minor reformatting.
15418         * opt.ads: Minor comment updates.
15419         * sem.adb: Minor name change Is_Main_Unit =>
15420         Is_Main_Unit_Or_Main_Unit_Spec.
15421         * sem_ch6.adb: Minor reformatting and code reorganization.
15423 2014-01-20  Bob Duff  <duff@adacore.com>
15425         * gnat_ugn.texi: Update gnatpp switches.
15427 2014-01-20  Thomas Quinot  <quinot@adacore.com>
15429         * exp_ch9.adb: Minor comment edit.
15431 2014-01-20  Robert Dewar  <dewar@adacore.com>
15433         * gnat_rm.texi: Document that Allow_Integer_Address is permitted
15434         only if System.Address is a private type.
15435         * opt.ads (Allow_Integer_Address): No longer set by -gnates.
15436         * sem_prag.adb (Analyze_Pragma, case Allow_Integer_Address):
15437         Allowed only if type System.Address is private, since otherwise
15438         it makes no sense.
15439         * sem_res.adb: Fix failure to properly Analyze unchecked
15440         conversions that were introduced by Allow_Integer_Address.
15441         * switch-c.adb: Remove -gnates switch.
15442         * usage.adb: Remove -gnates switch.
15443         * gnat_ugn.texi: Remove documentation of -gnates flag.
15445 2014-01-20  Ed Schonberg  <schonberg@adacore.com>
15447         * sem_ch6.adb (Analyze_Expression_Function): Pre-analyze and
15448         resolve expression to perform proper name capture.
15450 2014-01-20  Ed Schonberg  <schonberg@adacore.com>
15452         * sem.adb (Semantics): When saving/restoring configuration
15453         switches, the spec of a pre- defined unit that is the main unit
15454         must be treated as a predefined unit as well.
15456 2014-01-20  Thomas Quinot  <quinot@adacore.com>
15458         * exp_ch7.adb (Wrap_Transient_Expression): For a Boolean
15459         expression, insert an extra conditional expression when saving
15460         the value of the expression, for the benefit of control flow
15461         graph based coverage analysis.
15462         * exp_ch3.adb: Minor reformatting.
15464 2014-01-20  Robert Dewar  <dewar@adacore.com>
15466         * gnat1drv.adb: Set Allow_Integer_Address in relaxed semantics mode.
15467         * gnat_rm.texi: Document pragma Allow_Integer_Address.
15468         * gnat_ugn.texi: Document pragma Allow_Integer_Address, -gnates.
15469         * opt.ads: New flag Allow_Integer_Address.
15470         * par-prag.adb: Dummy entry for pragma Allow_Integer_Address.
15471         * sem_ch5.adb: Minor reformatting.
15472         * sem_prag.adb: Implement pragma Allow_Integer_Address.
15473         * sem_res.adb (Resolve): Allow integer address value if
15474         switch set.
15475         * sem_util.adb: Minor reformatting.
15476         * snames.ads-tmpl: Add entry for pragma Allow_Integer_Address.
15477         * switch-c.adb: Recognize flag -gnates.
15478         * usage.adb: Document flag -gnates.
15480 2014-01-20  Thomas Quinot  <quinot@adacore.com>
15482         * s-tadeca.adb: Fix minor typos in comment.
15484 2014-01-20  Pascal Obry  <obry@adacore.com>
15486         * s-win32.ads (FreeLibrary): New import.
15488 2014-01-20  Robert Dewar  <dewar@adacore.com>
15490         * sem_res.adb, sem_cat.adb: Minor reformatting.
15491         * sem_ch11.adb (Analyze_Raise_Statement): Only give warning about
15492         assigning to OUT parameters for the current subprogram scope.
15493         * exp_ch4.adb: Minor reformatting.
15495 2014-01-20  Ed Schonberg  <schonberg@adacore.com>
15497         * exp_ch4.adb (Process_Transient_Object,
15498         Find_Enclosing_Contexts): If the top-level if-expression that
15499         generated the transient object is an actual in a call, the proper
15500         Hook_Context is a construct enclosing the call.
15501         * einfo.ads: Indicate that Related_Expression is used to link a
15502         loop variable to the container expression over which the loop
15503         takes place.
15504         (Analyze_Iterator_Specification): Set the Related_Expression of
15505         the loop variable in a container element iterator.
15506         (Note_Possible_Modification): If the variable is the loop
15507         variable in a container element iterator, indicate that the
15508         enclosing container is also modified.
15510 2014-01-20  Hristian Kirtchev  <kirtchev@adacore.com>
15512         * aspects.adb (Move_Or_Merge_Aspects): Reimplemented.
15514 2014-01-20  Robert Dewar  <dewar@adacore.com>
15516         * s-taasde.ads, gnat_ugn.texi, s-tadeca.adb, sem_res.adb, s-tadeca.ads:
15517         Minor reformatting and code clean up.
15519 2014-01-20  Arnaud Charlet  <charlet@adacore.com>
15521         * sem_cat.adb (Validate_Object_Declaration): Relax semantics
15522         of objects of private type if Relaxed_RM_Semantics.
15524 2014-01-20  Claire Dross  <dross@adacore.com>
15526         * a-cofove.ads (Vector): Capacity discriminant
15527         should be in range of the index.
15529 2014-01-20  Thomas Quinot  <quinot@adacore.com>
15531         * a-caldel.ads(To_Duration), s-taasde.ads(Time_Enqueue):
15532         Clarify specs s-tadeca.adb(Enqueue_Calendar): Compensate for
15533         possible difference between epoch of Ada.Calendar clock and Ada
15534         real-time/tasking clock.
15535         * s-taprop-posix.adb: Minor comment fix.
15537 2014-01-20  Doug Rupp  <rupp@adacore.com>
15539         * sysdep.c [vxworks]: Remove Vxworks version noise for RTP.
15541 2014-01-20  Hristian Kirtchev  <kirtchev@adacore.com>
15543         * exp_attr.adb (Expand_N_Attribute_Reference): Generate validity
15544         checks on the prefix of attribute 'Old.
15545         * sem_ch3.adb (Process_Range_Expr_In_Decl): Suppress the
15546         generation of validity checks on a range that belongs to the
15547         iteration scheme of a quantified expression.
15548         * sem_ch5.adb (One_Bound): Suppress the generation of validity
15549         checks on a bound that belongs to the iteration scheme of a
15550         quantified expression, generate the check in all other cases.
15552 2014-01-20  Bob Duff  <duff@adacore.com>
15554         * gnat_ugn.texi: Enable --pp-new by default. Minor reorganization.
15556 2014-01-20  Ed Schonberg  <schonberg@adacore.com>
15558         * sem_res.adb (Resolve): When compiling a predefined unit, ignore
15559         interpretations that do not come from other predefined units,
15560         to prevent spurious ambiguities in the presence of user-defined
15561         operators in the context of (an instance of) a predefined unit.
15563 2014-01-20  Robert Dewar  <dewar@adacore.com>
15565         * gnat_rm.texi: Document that Loop_Variant is included in
15566         Statement_Assertions.
15567         * sem_prag.adb (Check_Kind): Add Loop_Variant to
15568         Statement_Assertions (Check_Applicable_Policy): Add Loop_Variant
15569         to Statement_Assertions.
15571 2014-01-20  Doug Rupp  <rupp@adacore.com>
15573         * sysdep.c (__gnat_is_file_not_found_error) [vxworks6]: Add case
15574         for errno ENOENT from RTP on NFS mounted file system.
15576 2014-01-20  Ed Schonberg  <schonberg@adacore.com>
15578         * sem_util.adb (Check_Function_Writable_Actuals): 1) Do not
15579         examine code that does not come from source. The check does not
15580         apply to code generated for constraint checks, and such code may
15581         generate spurious error messages when compiled with expansion
15582         disabled (as in a generic unit) because side effects may not
15583         have been removed.
15584         2) Make error messages more explicit: indicate the component
15585         of the  construct whose value is indeterminate because of a
15586         call to a function with in-out parameter in another component,
15587         when there is no mandated order of execution between the two
15588         components (actuals, aggregate components, alternatives).
15590 2014-01-20  Robert Dewar  <dewar@adacore.com>
15592         * gnat_rm.texi: Minor cleanup.
15594 2014-01-20  Hristian Kirtchev  <kirtchev@adacore.com>
15596         * sem_attr.adb (Analyze_Attribute): Attributes 'Old and 'Result
15597         can now apply to a refined postcondition.
15598         * sem_ch6.adb (Analyze_Subprogram_Contract): Remove local
15599         variable Result_Seen. Add variables Case_Prag, Post_Prag,
15600         Seen_In_Case and Seen_In_Post. Update the mechanism that detects
15601         whether postconditions and/or constract-cases mention attribute
15602         'Result and introduce a post-state when applied to functions.
15603         (Check_Result_And_Post_State): Removed.
15604         * sem_prag.adb (Analyze_Pragma): Add local variable
15605         Result_Seen. Verify that the expression of pragma Refined_Post
15606         mentions attribute 'Result and introduces a post-state.
15607         * sem_util.ads, sem_util.adb (Check_Result_And_Post_State): New routine.
15609 2014-01-20  Hristian Kirtchev  <kirtchev@adacore.com>
15611         * exp_ch7.adb (Is_Subprogram_Call): New routine.
15612         (Process_Transient_Objects): Make variable Must_Hook global with
15613         respect to all locally declared subprograms. Search the context
15614         for at least one subprogram call.
15615         (Requires_Hooking): Removed.
15617 2014-01-20  Claire Dross  <dross@adacore.com>
15619         * a-cfdlli.ads a-cfhama.ads a-cfhase.ads a-cforma.ads
15620         * a-cforse.ads a-cofove.ads: Add pragma Annotate (GNATprove,
15621         External_Axiomatization);
15623 2014-01-20  Robert Dewar  <dewar@adacore.com>
15625         * sem_attr.adb (Analyze_Attribute, case Loop_Entry): Allow
15626         Loop_Entry in Assert, Assert_And_Cut, and Assume pragmas.
15627         * sem_prag.adb (Analyze_Pragma, case Assert[_And_Cut], Assume):
15628         Allow Loop_Entry to be used in these pragmas if they appear in
15629         an appropriate context.
15630         (Placement_Error): Specialize error
15631         message for pragma Assert[_And_Cut] or pragma Assume containing
15632         Loop_Entry attribute.
15633         * a-exexpr-gcc.adb, sinput.adb: Minor reformatting.
15634         * s-excmac-arm.ads, s-except.ads, s-excmac-gcc.ads: Minor reformatting
15635         and code clean ups.
15637 2014-01-20  Robert Dewar  <dewar@adacore.com>
15639         * gnat1drv.adb: Minor comment update.
15641 2014-01-20  Tristan Gingold  <gingold@adacore.com>
15643         * raise-gcc.c (PERSONALITY_FUNCTION/arm): Remove unused
15644         variables, comment out unused code.
15645         * a-exexpr-gcc.adb: Move declarations to s-excmac-gcc.ads
15646         * s-excmac-gcc.ads: New file, extracted from a-exexpr-gcc.adb
15647         * s-excmac-arm.ads: New file.
15649 2014-01-20  Hristian Kirtchev  <kirtchev@adacore.com>
15651         * exp_ch4.adb (Expand_N_Slice): Remove constant D and variables
15652         Drange and Index_Typ. Remove the circuitry which creates a
15653         range check to compare the index type of the array against the
15654         discrete_range.
15655         * sem_res.adb (Resolve_Slice): Add local variable Dexpr. Update
15656         the circuitry which creates a range check to handle a
15657         discrete_range denoted by a subtype indication.
15659 2014-01-20  Pierre-Marie Derodat  <derodat@adacore.com>
15661         * sinput.adb, sinput.ads (Sloc_Range): Traverse the tree of original
15662         nodes to get the original sloc range.
15664 2014-01-20  Hristian Kirtchev  <kirtchev@adacore.com>
15666         * sem_prag.adb (Analyze_Pragma): Use Defining_Entity to obtain the
15667         entity of a [library level] package.
15669 2014-01-20  Tristan Gingold  <gingold@adacore.com>
15671         * raise-gcc.c (exception_class_eq): New function.
15672         (is_handled_by): Use it to compare exception classes.
15673         (PERSONALITY_STORAGE): Define.  (continue_unwind): New function to
15674         be called to return URC_CONTINUE_UNWIND.
15675         (personality_body): New function, extracted from PERSONALITY_ROUTINE.
15676         (PERSONALITY_ROUTINE): Add an implementation for the ARM unwinder.
15678 2014-01-20  Robert Dewar  <dewar@adacore.com>
15680         * opt.ads: Minor comment update.
15682 2014-01-20  Hristian Kirtchev  <kirtchev@adacore.com>
15684         * exp_ch4.adb (Expand_N_Slice): Relocate some variables and
15685         constants to the "Local variables" area. Add new constant D. Add
15686         new variables Drange and Index_Typ.  Rename Pfx to Rep and Ptp
15687         to Pref_Typ and update all occurrences. Add circuitry to extract
15688         the discrete_range and the index type and build a range check.
15690 2014-01-20  Arnaud Charlet  <charlet@adacore.com>
15692         * gnat1drv.adb (Adjust_Global_Switches): Enable
15693         Treat_Categorization_Errors_As_Warnings when Relaxed_RM_Semantics
15694         is set.
15696 2014-01-20  Thomas Quinot  <quinot@adacore.com>
15698         * sem_ch5.adb, sem_ch4.adb: Minor reformatting.
15700 2014-01-20  Hristian Kirtchev  <kirtchev@adacore.com>
15702         * sem_ch13.adb (Analyze_Aspect_Specifications):
15703         When aspect SPARK_Mode appears on a package body, insert the
15704         generated pragma at the top of the body declarations.
15706 2014-01-20  Robert Dewar  <dewar@adacore.com>
15708         * sem_aggr.adb, exp_prag.adb, sem_aux.adb, sinfo.ads, sem_ch10.adb,
15709         checks.adb, sem_prag.adb, sem_ch12.adb, freeze.adb, g-arrspl.adb,
15710         expander.adb, gnat1drv.adb, exp_ch4.adb, sem_ch6.adb,
15711         sem_ch8.adb, exp_dist.adb: Minor reformatting.
15713 2014-01-20  Yannick Moy  <moy@adacore.com>
15715         * gnat1drv.adb (Gnat1drv): Call Write_ALI with Object=True in GNATprove
15716         mode.
15718 2014-01-20  Pascal Obry  <obry@adacore.com>
15720         * g-arrspl.ads (Slice_Set): New definition (will use a copy on
15721         write scheme).
15722         * g-arrspl.adb: Adapt all routine to this new implementation.
15723         (Set): Copy the Slice_Set definition before reusing it.
15725 2014-01-20  Arnaud Charlet  <charlet@adacore.com>
15727         * sem_prag.adb (Process_Import_Or_Interface): In
15728         Relaxed_RM_Semantics, support old Ada 83 style of pragma Import.
15729         (Analyze_Pragma): Ditto for pragma Export.
15730         * exp_prag.adb (Expand_Pragma_Import_Or_Interface): Handle old pragma
15731         Import style.
15733 2014-01-20  Hristian Kirtchev  <kirtchev@adacore.com>
15735         * einfo.ads: E_Abstract_State is now part of the entities that
15736         can be overloaded. Update type Overloadable_Kind to reflect the
15737         inclusion of abstract states.
15738         * sem_ch6.adb (New_Overloaded_Entity): A function can now
15739         overload an abstract state.
15740         * sem_prag.adb (Analyze_Constituent): Handle the overloading
15741         of states by functions. Use Entity_Of to obtain the entity of
15742         a constituent.  (Analyze_Global_Item): Handle the overloading of
15743         states by functions.
15744         (Analyze_Initialization_Item): Handle the
15745         overloading of states by functions.  Use Entity_Of to obtain the
15746         entity of an item.
15747         (Analyze_Input_Item): Handle the overloading
15748         of states by functions. Use Entity_Of to obtain the entity of an item.
15749         (Analyze_Input_Output): Handle the overloading of states by functions.
15750         (Analyze_Refinement_Clause): Handle the overloading
15751         of states by functions.  Use Entity_Of to obtain the entity of an item.
15752         (Appears_In): Use Entity_Of to obtain the entity of an element.
15753         (Check_Usage): Use Entity_Of to obtain the entity of
15754         an item. Add a guard to prevent a crash due to a previous error.
15755         (Resolve_State): New routine.
15757 2014-01-20  Yannick Moy  <moy@adacore.com>
15759         * spark_xrefs.ads, debug.adb, gnat1drv.adb, errout.adb, errout.ads,
15760         opt.ads: Minor comments updates.
15762 2014-01-20  Hristian Kirtchev  <kirtchev@adacore.com>
15764         * einfo.adb (Non_Limited_View): Applies to abstract states.
15765         (Set_From_Limited_With): Applies to abstract states.
15766         (Set_Non_Limited_View): Applies to abstract states.
15767         (Write_Field17): Output the non-limited view of an abstract state.
15768         * einfo.ads: Update the comment on usage and occurrences in
15769         nodes for attributes From_Limited_With and Non_Limited_View.
15770         * sem_aux.adb (Available_View): This routine can now handle
15771         abstract states.
15772         * sem_aux.ads (Available_View): This routine can now handle
15773         abstract states. Update the comment on usage.
15774         * sem_ch8.adb (Find_Expanded_Name): Handle abstract views
15775         of states and variables.
15776         (In_Pragmas_Depends_Or_Global): New routine.
15777         * sem_ch10.adb (Build_Limited_Views): Implement
15778         abstract (limited) views of variables and states.
15779         (Build_Shadow_Entity): This routine is now a procedure. Add
15780         formal parameter Shadow. Update the comment on usage. Add
15781         context-specific decoration for states and variables.
15782         (Decorate_State): New routine.  (Decorate_Variable): New routine.
15783         (Find_And_Process_States): New routine.
15784         (Process_Declarations): Renamed to Process_Declarations_And_States.
15785         (Process_Declarations_And_States): Add formal parameters
15786         Pack and Create_Abstract_Views. Update the comment on usage.
15787         (Process_States): New routine.
15788         * sem_prag.adb (Check_Dependency_Clause): Handle abstract
15789         views of states and variables. Match the abstract view of a state
15790         against its corresponding non-abstract view.
15791         (Is_Matching_Input):
15792         Handle abstract views of states and variables. Match the abstract
15793         view of a state against its corresponding non-abstract view.
15794         (Process_Global_Item): Handle abstract views of states and
15795         variables.
15797 2014-01-20  Bob Duff  <duff@adacore.com>
15799         * sem_ch10.adb (Expand_With_Clause): Don't
15800         recurse on the prefix if the current with-ed name refers to a
15801         package that renames its own parent, eg "package P.Q renames P;".
15803 2014-01-20  Yannick Moy  <moy@adacore.com>
15805         * exp_spark.adb (Expand_SPARK_Call): Remove procedure.
15806         * opt.adb, opt.ads (Full_Expander_Active): Remove function.
15807         * checks.adb, exp_ch6.adb, exp_ch9.adb, exp_disp.adb, sem_aggr.adb,
15808         * sem_ch10.adb, sem_ch5.adb, sem_ch6.adb, sem_ch8.adb, sem_ch9.adb,
15809         * sem_disp.adb, sem_res.adb Replace Full_Expander_Active by
15810         Expander_Active.
15812 2014-01-20  Yannick Moy  <moy@adacore.com>
15814         * sinfo.ads Update documentation of GNATprove mode.
15816 2014-01-20  Yannick Moy  <moy@adacore.com>
15818         * adabkend.adb, ali-util.adb, errout.adb, exp_ch7.adb,
15819         * exp_dbug.adb, freeze.adb, lib-xref.adb, restrict.adb,
15820         * sem_attr.adb, sem_ch4.adb, sem_ch5.adb, sem_ch6.adb, sem_ch8.adb,
15821         * sem_prag.adb, sem_res.adb, sem_util.adb Rename SPARK_Mode into
15822         GNATprove_Mode.
15823         * sem_ch13.adb: Remove blank.
15824         * exp_spark.adb, exp_spark.ads (Expand_SPARK_Call): Only replace
15825         subprograms by alias for renamings, not for inherited primitive
15826         operations.
15827         * exp_util.adb (Expand_Subtype_From_Expr): Apply the expansion
15828         in GNATprove mode.
15829         (Remove_Side_Effects): Apply the removal in
15830         GNATprove mode, for the full analysis of expressions.
15831         * expander.adb (Expand): Call the light SPARK expansion in GNATprove
15832         mode.
15833         (Expander_Mode_Restore, Expander_Mode_Save_And_Set): Ignore
15834         save/restore actions for Expander_Active flag in GNATprove mode,
15835         similar to what is done in ASIS mode.
15836         * frontend.adb (Frontend): Generic bodies are instantiated in
15837         GNATprove mode.
15838         * gnat1drv.adb (Adjust_Global_Switches): Set operating
15839         mode to Check_Semantics in GNATprove mode, although a light
15840         expansion is still performed.
15841         (Gnat1drv): Set Back_End_Mode to
15842         Declarations_Only in GNATprove mode, and later on special case
15843         the GNATprove mode to continue analysis anyway.
15844         * lib-writ.adb (Write_ALI): Always generate ALI files in
15845         GNATprove mode.
15846         * opt.adb, opt.ads (Full_Expander_Active): Make it equivalent to
15847         Expander_Active.
15848         (SPARK_Mode): Renamed as GNATprove_Mode.
15849         * sem_aggr.adb (Aggregate_Constraint_Checks): Add checks in the
15850         tree in GNATprove_Mode.
15851         * sem_ch12.adb (Analyze_Package_Instantiation): Always instantiate
15852         body in GNATprove mode.
15853         (Need_Subprogram_Instance_Body): Always instantiate body in GNATprove
15854         mode.
15855         * sem_ch3.adb (Constrain_Index, Process_Range_Expr_In_Decl):
15856         Make sure side effects are removed in GNATprove mode.
15858 2014-01-20  Eric Botcazou  <ebotcazou@adacore.com>
15860         * gcc-interface/decl.c (gnat_to_gnu_entity) <object>: Robustify tests
15861         for aliased objects with an unconstrained nominal subtype.
15862         * gcc-interface/trans.c (Call_to_gnu): Likewise.
15863         (gnat_to_gnu) <case N_Op_Not>: Robustify test for private type.
15864         <case N_Op_Minus>: Remove useless code.
15865         (Exception_Handler_to_gnu_zcx): Minor tweaks.
15867 2014-01-20  Eric Botcazou  <ebotcazou@adacore.com>
15869         * gcc-interface/decl.c (gnat_to_gnu_entity) <case E_Record_Subtype>:
15870         Tidy up.  For a subtype with discriminants and variant part, if a
15871         variant is statically selected and the fields all have a constant
15872         position, put them in order of increasing position.  Likewise if
15873         no variant part but representation clause is present.
15874         * gcc-interface/utils.c (make_packable_type): Robustify.
15875         (maybe_pad_type): Use local variable and tidy up condition.  If no
15876         alignment is specified, use the original one.
15877         (create_type_stub_decl): Minor tweak.
15878         (convert) <case VECTOR_CST>: Fix typo.
15879         <case CONSTRUCTOR>: Deal with padding types around the same type.
15880         Do not punt on missing fields.
15881         (unchecked_convert): Call finish_record_type to lay out the special
15882         record types made for conversions from/to problematic integer types.
15883         Bump the alignment of CONSTRUCTORs before converting them to a more
15884         aligned type.
15886 2014-01-20  Eric Botcazou  <ebotcazou@adacore.com>
15888         * gcc-interface/decl.c (gnat_to_gnu_entity) <case E_Component>: Remove
15889         obsolete code for type_annotate_only mode, simplify code and slightly
15890         improve wording of comments.
15892 2014-01-12  Eric Botcazou  <ebotcazou@adacore.com>
15894         PR ada/59772
15895         * gcc-interface/cuintp.c (build_cst_from_int): Use 32-bit integer type
15896         as intermediate type.
15897         (UI_To_gnu): Likewise.
15899 2014-01-03  Eric Botcazou  <ebotcazou@adacore.com>
15901         * gnatvsn.ads (Current_Year): Bump to 2014.
15903 2014-01-02  Tobias Burnus  <burnus@net-b.de>
15905         * gnat_ugn.texi: Bump @copying's copyright year.
15907 Copyright (C) 2014 Free Software Foundation, Inc.
15909 Copying and distribution of this file, with or without modification,
15910 are permitted in any medium without royalty provided the copyright
15911 notice and this notice are preserved.