Merge from trunk:
[official-gcc.git] / main / gcc / ada / ChangeLog
blob70db1c1f456686b790af567992370567a62a2fe4
1 2014-08-04  Claire Dross  <dross@adacore.com>
3         * exp_util.adb (Get_First_Parent_With_Ext_Axioms_For_Entity):
4         For an instance, look at the scope before the generic parent.
6 2014-08-04  Yannick Moy  <moy@adacore.com>
8         * lib-writ.ads: Update comments.
9         * sem_disp.ads, sem_disp.adb (Inherited_Subprograms): Add
10         parameters to filter inherited subprograms.
12 2014-08-04  Robert Dewar  <dewar@adacore.com>
14         * gnat_rm.texi: Add section on use of address clause for memory
15         mapped I/O.
17 2014-08-04  Ed Schonberg  <schonberg@adacore.com>
19         * sem_ch3.adb (Analyze_Subtype_Declaration): A subtype, in
20         particular the subtype created for a generic actual, inherits
21         invariant information from the base type.
23 2014-08-04  Robert Dewar  <dewar@adacore.com>
25         * aspects.ads, aspects.adb: Add entries for aspect Obsolescent.
26         * gnat_rm.texi: Add documentation for aspect Obsolescent.
27         * sem_ch13.adb (Analyze_Aspect_Specifications): Implement aspect
28         Obsolescent.
29         (Check_Aspect_At_Freeze_Point): Add dummy entry for pragma Obsolescent.
30         * s-osprim-mingw.adb: Minor reformatting.
31         * sem_res.adb (Is_Atomic_Ref_With_Address): New function
32         (Resolve_Indexed_Component): Rework warnings for non-atomic access
33         (Resolve_Selected_Component): Add warnings for non-atomic access.
35 2014-08-04  Doug Rupp  <rupp@adacore.com>
37         * g-calend.adb (timeval_to_duration, duration_to_timeval): Change sec
38         formal to long_long.
39         * g-calend.ads (timeval): Bump up size to accomodate sec type.
40         * s-taprop-linux.adb (timeval_to_duration): Change sec formal to
41         long_long
42         * s-osprim-posix.adb (timeval): Bump up size to accomodate
43         new sec type.
44         (timeval_to_duration): Change sec formal to Long_Long_Integer
45         * s-osinte-darwin.adb (timeval): Bump up
46         size to accomodate new sec type.
47         (timeval_to_duration): Change sec formal to long_long
48         * s-osinte-android.adb: Likewise.
49         * cal.c (__gnat_timeal_to_duration, __gnat_duration_to_timeval): Change
50         sec formal from long to long long.
52 2014-08-04  Robert Dewar  <dewar@adacore.com>
54         * sem_res.adb (Resolve_Qualified_Expression): Make sure
55         Do_Range_Check flag gets set.
57 2014-08-04  Robert Dewar  <dewar@adacore.com>
59         * einfo.ads, einfo.adb (Is_Standard_String_Type): New function.
60         * exp_ch3.adb (Build_Array_Init_Proc): Use
61         Is_Standard_String_Type.
62         (Expand_Freeze_Array_Type): ditto.
63         (Get_Simple_Init_Val): ditto.
64         (Needs_Simple_Initialization): ditto.
65         * sem_eval.adb (Eval_String_Literal): Use Is_Standard_String_Type.
66         * sem_warn.adb (Is_Suspicious_Type): Use Is_Standard_String_Type.
68 2014-08-04  Pascal Obry  <obry@adacore.com>
70         * adaint.c (__gnat_try_lock): Use _tcscpy and _tcscat instead of
71         _stprintf which insert garbage into the wfull_path buffer.
73 2014-08-04  Arnaud Charlet  <charlet@adacore.com>
75         * cal.c: Remove old VMS/nucleus code. Remove obsolete vxworks
76         code.
77         * fe.h: Minor reformatting.
79 2014-08-04  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
81         * cstreams.c: (_LARGEFILE_SOURCE): Guard definition.
83 2014-08-04  Robert Dewar  <dewar@adacore.com>
85         * par-ch13.adb (Get_Aspect_Specifications): Improve error
86         recovery, fixing a -gnatQ bomb.
88 2014-08-04  Yannick Moy  <moy@adacore.com>
90         * sem_ch3.adb (Analyze_Object_Declaration): In GNATprove mode,
91         do not generate two Itypes with the same name for an array
92         definition.
93         * sinfo.ads: Expand doc on GNATprove mode.
95 2014-08-04  Hristian Kirtchev  <kirtchev@adacore.com>
97         * exp_ch3.adb (Expand_Freeze_Record_Type): Set the finalization
98         master and storage pool attributes on the root type of an
99         anonymous access type.
100         * exp_ch4.adb (Expand_N_Allocator): Set the finalization master
101         and storage pool attributes on the root type of an anonymous
102         access type.
104 2014-08-04  Arnaud Charlet  <charlet@adacore.com>
106         * exp_ch3.adb: Minor reformatting.
107         * tb-alvms.c, tb-alvxw.c, tb-ivms.c: Removed.
108         * tracebak.c: Remove use of above files.
109         * gcc-interface/Makefile.in: Update dependencies.
111 2014-08-04  Pierre-Marie Derodat  <derodat@adacore.com>
113         * gcc-interface/utils.c (gnat_set_type_context): Also set the
114         context for parallel types' TYPE_STUB_DECL.  Do not change
115         anything if the context is already set for them.
116         (gnat_pushdecl): Update the comment for calls to
117         gnat_set_type_context to mention parallel types.
118         (add_parallel_type): When adding a context-less parallel type to
119         a type that has a context, propagate the context from the latter
120         type to the former.
121         (process_deferred_decl_context): Call gnat_set_type_context
122         rather than manually setting the type context.
123         (build_unc_object_type): Call gnat_set_type_context on the
124         template type.
126 2014-08-04  Ed Schonberg  <schonberg@adacore.com>
128         * exp_ch5.adb (Expand_N_Case_Statement): If a choice is a
129         subtype indication and the case statement has only two choices,
130         replace subtype indication with its range, because the resulting
131         membership test cannot have a subtype indication as an operand.
133 2014-08-04  Arnaud Charlet  <charlet@adacore.com>
135         * exp_ch3.adb: Update comments, minor reformatting.
137 2014-08-04  Hristian Kirtchev  <kirtchev@adacore.com>
139         * sem_ch3.adb (Analyze_Declarations): Explain why the bodies of
140         the default initial condition procedures are build here.
141         * sem_util.adb (Build_Default_Init_Cond_Procedure): Wrap the
142         analyzed argument of pragma Default_Initial_Condition in some
143         dummy code as GNATprove mode disables assertions, but still
144         needs to see the argument.
146 2014-08-04  Robert Dewar  <dewar@adacore.com>
148         * exp_ch6.adb, sem_util.adb: Minor reformatting.
150 2014-08-04  Olivier Hainque  <hainque@adacore.com>
152         * a-comutr.ads: Set Root_Node_Type'Alignment to
153         Standard'Maximum_Alignment, so that it is at least as large as
154         the max default for Tree_Node_Type'Alignment.
156 2014-08-04  Hristian Kirtchev  <kirtchev@adacore.com>
158         * exp_ch3.adb (Freeze_Type): Remove the generation and inheritance
159         of the default initial condition procedure [body].
160         * sem_ch3.adb (Analyze_Declarations): Create the bodies of
161         all default initial condition procedures at the end of private
162         declaration analysis.
163         * sem_util.adb (Build_Default_Init_Cond_Procedure_Bodies): New
164         routine.
165         (Build_Default_Init_Cond_Procedure_Body): Merged in the
166         processing of routine Build_Default_Init_Cond_Procedure_Bodies.
167         * sem_util.ads (Build_Default_Init_Cond_Procedure_Bodies):
168         New routine.
169         (Build_Default_Init_Cond_Procedure_Body): Removed.
171 2014-08-04  Ed Schonberg  <schonberg@adacore.com>
173         * sem_elab.adb (Check_Elab_Call): Do not check a call to a
174         postcondtion.
175         * exp_ch6.adb (Expand_Call): Clarify handling of inserted
176         postcondition call.
178 2014-08-04  Hristian Kirtchev  <kirtchev@adacore.com>
180         * sem_prag.adb (Analyze_Pragma): Ensure that an
181         internally generated spec for a stand alone body is recognized
182         as a proper context for pragma SPARK_Mode.
184 2014-08-04  Robert Dewar  <dewar@adacore.com>
186         * erroutc.adb (Delete_Msg): Do not decrement Warnings_Treated_As_Errors.
188 2014-08-04  Arnaud Charlet  <charlet@adacore.com>
190         * adabkend.adb (Scan_Back_End_Switches): Ignore extra -o
191         when -gnatO has already been specified, for compatibility
192         with gcc driver.
193         (Scan_Compiler_Args): Do not call Set_Output_Object_File_Name in
194         codepeer mode.
195         * g-expect.ads: Fix typo.
197 2014-08-04  Thomas Quinot  <quinot@adacore.com>
199         * exp_ch4.adb (Insert_Dereference_Action): the actual Size
200         must account for the bounds template if the designated type is
201         an unconstrained array.
203 2014-08-04  Hristian Kirtchev  <kirtchev@adacore.com>
205         * a-cfhama.adb, a-cfhase.adb, a-cforma.adb, a-cforse.adb Add
206         SPARK_Mode in the body.
207         * sem_ch7.adb (Analyze_Package_Body_Helper): Restore the original
208         way to verify the consistency of SPARK_Mode between a spec and
209         a body.
210         * sem_ch12.adb (Analyze_Package_Instantiation): Remove the call
211         to Set_Ignore_Pragma_SPARK_Mode. Set flag Ignore_Pragma_SPARK_Mode
212         manually.
213         (Analyze_Subprogram_Instantiation): Remove the call to
214         Set_Ignore_Pragma_SPARK_Mode. Set flag Ignore_Pragma_SPARK_Mode
215         manually.
216         * sem_prag.adb (Analyze_Pragma): Remove local variable
217         Inst_Id. SPARK_Mode can no longer be applied to a package or
218         subprogram instantiation.
219         * sem_util.adb, sem_util.ads (Set_Ignore_Pragma_SPARK_Mode):
220         Removed.
222 2014-08-04  Robert Dewar  <dewar@adacore.com>
224         * sem_prag.adb, osint.adb, osint.ads: Minor reformatting.
226 2014-08-04  Yannick Moy  <moy@adacore.com>
228         * sem_ch3.adb (Derive_Type_Declaration,
229         Process_Discriminants): Remove SPARK-specific legality checks.
231 2014-08-04  Thomas Quinot  <quinot@adacore.com>
233         * g-sechas.ads, g-sechas.adb (HMAC_Initial_Context): New subprogram.
234         * gnat_rm.texi (GNAT.MD5/SHA1/SHA224/SHA256/SHA512): Document support
235         for HMAC.
237 2014-08-04  Hristian Kirtchev  <kirtchev@adacore.com>
239         * sem_ch7.adb (Analyze_Package_Body_Helper): When verifying the
240         compatibility of SPARK_Mode between a spec and a body, use the
241         SPARK_Mode of the public part.
242         * sem_ch12.adb (Analyze_Generic_Subprogram_Declaration): Use
243         the already available routine to exchange the aspects between
244         the template and its copy. Analyze the aspects of copy to
245         ensure that the corresponding pragmas perform their semantic
246         effects.  The partial analysis of aspects is no longer needed.
247         (Analyze_Package_Instantiation): Save and restore the SPARK_Mode
248         of the context.
249         (Analyze_Subprogram_Instantiation): Save and restore the SPARK_Mode of
250         the context.
251         * sem_prag.adb (Analyze_Pragma): Do not bypass a subprogram
252         instantiation which does not come from source.
254 2014-08-04  Hristian Kirtchev  <kirtchev@adacore.com>
256         * a-cfhama.ads, a-cfhase.ads, a-cforma.ads, a-cforse.ads Add
257         SPARK_Mode pragmas to the public and private part of the unit.
258         * sem_ch3.adb (Derive_Type_Declaration): Ensure that a derived
259         type cannot have discriminants if the parent type already has
260         discriminants.
261         (Process_Discriminants): Ensure that the type of a discriminant is
262         discrete.
263         * sem_ch6.adb (Analyze_Subprogram_Body_Helper): The check on
264         SPARK_Mode compatibility between a spec and a body can now be
265         safely performed while processing a generic.
266         * sem_ch7.adb (Analyze_Package_Body_Helper): The check on
267         SPARK_Mode compatibility between a spec and a body can now be
268         safely performed while processing a generic.
269         * sem_prag.adb (Analyze_Pragma): Pragma SPARK_Mode can now be
270         safely analyzed when processing a generic.
272 2014-08-04  Nicolas Roche  <roche@adacore.com>
274         * g-dirope.adb: Minor reformating.
276 2014-08-04  Robert Dewar  <dewar@adacore.com>
278         * sem_ch6.adb: Minor reformatting.
280 2014-08-04  Ed Schonberg  <schonberg@adacore.com>
282         * sem_prag.adb (Analyze_Pragma, case Assert and related pragmas):
283         Before normalizing these pragmas into a pragma Check, preanalyze
284         the optional Message argument, (which is subsequently copied)
285         so that it has the proper semantic information for ASIS use.
286         * sem_case.adb: Initialize flag earlier.
287         * osint.adb, osint.ads (Find_File): Add parameter Full_Name, used when
288         the full source path of a configuration file is requested.
289         (Read_Source_File): Use Full_Name parameter..
291 2014-08-04  Hristian Kirtchev  <kirtchev@adacore.com>
293         * opt.ads Alphabetize various global flags. New flag
294         Ignore_Pragma_SPARK_Mode along with a comment on usage.
295         * sem_ch6.adb (Analyze_Generic_Subprogram_Body):
296         Pragma SPARK_Mode is now allowed in generic units.
297         (Analyze_Subprogram_Body_Helper): Do not verify the compatibility
298         between the SPARK_Mode of a spec and that of a body when inside
299         a generic.
300         * sem_ch7.adb (Analyze_Package_Body_Helper): Do not verify the
301         compatibility between the SPARK_Mode of a spec and that of a
302         body when inside a generic.
303         * sem_ch12.adb (Analyze_Generic_Subprogram_Declaration):
304         Pragma SPARK_Mode is now allowed in generic units.
305         (Analyze_Package_Instantiation): Save and restore the value of
306         flag Ignore_ Pragma_SPARK_Mode in a stack-like fasion. Set
307         the governing SPARK_Mode before analyzing the instance.
308         (Analyze_Subprogram_Instantiation): Save and restore the value
309         of flag Ignore_ Pragma_SPARK_Mode in a stack-like fasion. Set
310         the governing SPARK_Mode before analyzing the instance.
311         * sem_ch13.adb (Analyze_Aspect_Specifications): Emulate the
312         placement of a source pragma when inserting the generated pragma
313         for aspect SPARK_Mode.
314         * sem_prag.adb (Analyze_Pragma): Reimplement the handling of
315         pragma SPARK_Mode to allow for generics and their respective
316         instantiations.
317         * sem_util.ads, sem_util.adb (Check_SPARK_Mode_In_Generic): Removed.
318         (Set_Ignore_Pragma_SPARK_Mode): New routine.
320 2014-08-04  Eric Botcazou  <ebotcazou@adacore.com>
322         * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Component>: Deal with
323         renaming discriminants in tagged types first.
324         * gcc-interface/trans.c (gnat_to_gnu) <N_Selected_Component>: Test
325         the underlying type of the prefix.
326         (Pragma_to_gnu, case Pragma_Warning): Ignore Reason => "..."
327         (process_freeze_entity): Reset the nodes of
328         all the view of a type, if any.
330 2014-08-04  Doug Rupp  <rupp@adacore.com>
331             Olivier Hainque  <hainque@adacore.com>
333         * gcc-interface/Makefile.in (x86 VxWorks): Add filter-out for vxworks7
334         and remove incorrect EH_MECHANISM macros.
335         Add sigtramp.h to EXTRA_LIBGNAT_SRCS when we add sigtramp-vxworks.o to
336         EXTRA_LIBGNAT_OBJS.
338 2014-08-04  Robert Dewar  <dewar@adacore.com>
340         * exp_attr.adb (Expand_N_Attribute_Reference): Make sure prefix
341         of constructed 'Valid attribute in -gnatVa mode does not appear
342         to come from source.
343         * sem_attr.adb (Analyze_Access_Attribute): Don't set
344         Never_Set_In_Source for non-source reference.
345         * sem_util.adb: Minor reformatting.
346         * sem_warn.adb (Check_References): Don't check Address_Taken,
347         not necessary, see comment.
349 2014-08-04  Robert Dewar  <dewar@adacore.com>
351         * sem_util.adb, sem_case.adb: Minor reformatting.
353 2014-08-04  Ed Schonberg  <schonberg@adacore.com>
355         * exp_ch9.adb (Extract_Entry): If the synchronized object is a
356         limited view, replace with non-limited view, which is available
357         at the point of an entry call.
359 2014-08-04  Ed Schonberg  <schonberg@adacore.com>
361         * exp_ch6.adb (Expand_Call): If the call is to a function in
362         a run-time unit that is marked Inline_Always, we must suppress
363         debugging information on it, so that the code that is eventually
364         inlined will not affect debugging of the user program.
366 2014-08-04  Robert Dewar  <dewar@adacore.com>
368         * inline.adb, einfo.ads, s-tassta.adb, s-tarest.adb: Minor comment
369         fixes.
371 2014-08-04  Ed Schonberg  <schonberg@adacore.com>
373         * sem_prag.adb (Process_Import_Or_Interface): Handle properly
374         an aspect Import that specifies a False value.
376 2014-08-04  Robert Dewar  <dewar@adacore.com>
378         * gnat_rm.texi: Add section on aspect Invariant'Class.
380 2014-08-04  Ed Schonberg  <schonberg@adacore.com>
382         * sem_case.adb (Check_Choice_Set): New flag Predicate_Error,
383         for better control of cascaded error messages when some choice
384         in a case statement over a predicated type violates the given
385         static predicate.
387 2014-08-04  Hristian Kirtchev  <kirtchev@adacore.com>
389         * sem_ch3.adb (Build_Derived_Type): Modify the
390         inheritance of the rep chain to ensure that a non-tagged type's
391         items are not clobbered during the inheritance.
393 2014-08-04  Robert Dewar  <dewar@adacore.com>
395         * sem_ch3.adb, einfo.ads: Minor reformatting.
397 2014-08-04  Yannick Moy  <moy@adacore.com>
399         * inline.adb (Can_Be_Inlined_In_GNATprove_Mode): Fix
400         detection of subprograms that cannot be inlined in GNATprove mode.
402 2014-08-04  Ed Schonberg  <schonberg@adacore.com>
404         * einfo.adb: Add guard to Returns_Limited_View.
406 2014-08-04  Jose Ruiz  <ruiz@adacore.com>
408         * s-tassta.adb, s-tarest.adb (Task_Wrapper): Force maximum alignment of
409         the secondary stack to respect the alignments of the returned objects.
411 2014-08-04  Ed Schonberg  <schonberg@adacore.com>
413         * einfo.ads, einfo.adb (Returns_Limited_View): New flag defined
414         on function entities whose return type is a limited view.
415         * freeze.adb (Freeze_Entity): Use Returns_Limited_View to determine
416         where to place the freeze node for a function that returns the
417         limited view of a type, when the function is called and frozen
418         in a different unit.
420 2014-08-04  Eric Botcazou  <ebotcazou@adacore.com>
422         * sem_ch3.adb (Build_Derived_Private_Type): Minor code
423         refactoring.
425 2014-08-04  Robert Dewar  <dewar@adacore.com>
427         * gnat_ugn.texi: Clarify documentation on assertions.
429 2014-08-04  Ed Schonberg  <schonberg@adacore.com>
431         * sem_aggr.adb (Resolve_Record_Aggregate, Get_Value): Warn
432         if a component association has a box initialization when the
433         component type has no default initialization, either through an
434         initial value, an aspect, or an implicit initialization procedure.
436 2014-08-04  Ed Schonberg  <schonberg@adacore.com>
438         * freeze.adb: Code clean up.
440 2014-08-04  Thomas Quinot  <quinot@adacore.com>
442         * sem_ch5.adb: Minor reformatting.
444 2014-08-04  Ed Schonberg  <schonberg@adacore.com>
446         * freeze.adb (Late_Freeze_Subprogram): Following AI05-151,
447         a function can return a limited view of a type declared
448         elsewhere. In that case the function cannot be frozen at the end
449         of its enclosing package. If its first use is in a different unit,
450         it cannot be frozen there, but if the call is legal the full view
451         of the return type is available and the subprogram can now be
452         frozen. However the freeze node cannot be inserted at the point
453         of call, but rather must go in the package holding the function,
454         so that the backend can process it in the proper context.
456 2014-08-04  Robert Dewar  <dewar@adacore.com>
458         * exp_ch5.adb, sem_ch5.adb, einfo.ads: Minor reformatting.
460 2014-08-04  Arnaud Charlet  <charlet@adacore.com>
462         * sem_ch4.adb (Operator_Check): Refine previous change.
464 2014-08-04  Arnaud Charlet  <charlet@adacore.com>
466         * sem_scil.ads: Improve comments.
467         * sem_ch4.adb (Analyze_Equality_Op): Add support for
468         Allow_Integer_Address (equality between Address and Integer).
470 2014-08-04  Yannick Moy  <moy@adacore.com>
472         * a-cfhama.adb, a-cforse.adb: Minor fixes to avoid using prefix
473         notation on untagged objects.
474         * sem.ads: Update comment.
475         * inline.adb (Can_Be_Inlined_In_GNATprove_Mode): Do
476         not inline subprograms declared in the visible part of a package.
478 2014-08-04  Ed Schonberg  <schonberg@adacore.com>
480         * exp_ch5.adb: minor reformatting.
481         * einfo.ads, einfo.adb (Is_Processed_Transient): Applies to loop
482         parameters.
484 2014-08-04  Thomas Quinot  <quinot@adacore.com>
486         * s-fatgen.adb: Minor reformatting.
488 2014-08-04  Arnaud Charlet  <charlet@adacore.com>
490         * exp_util.adb (Is_Possibly_Unaligned_Object): Always return
491         False on .NET.
493 2014-08-04  Ed Schonberg  <schonberg@adacore.com>
495         * sem_ch5.adb (Analyze_Loop_Statement): Set properly the kind of
496         the loop parameter for element iterators over containers and
497         arrays, so that improper uses of it are detected in the loop
498         body when expansion is disabled.
499         * exp_ch5.adb (Expand_Iterator_Loop): The entity kind of the
500         generated cursor is that of the analyzed loop parameter.
502 2014-08-04  Hristian Kirtchev  <kirtchev@adacore.com>
504         * exp_ch3.adb (Build_CPP_Init_Procedure): Remove
505         Flag_Decl. Do not analyze the declaration of the flag as it is
506         not part of the tree yet, instead add it to the freeze actions
507         of the C++ type.
509 2014-08-04  Robert Dewar  <dewar@adacore.com>
511         * checks.adb (Apply_Scalar_Range_Check): Make sure we handle
512         case of OUT and IN OUT parameter correctly (where Source_Typ is
513         set), we were missing one case where a check must be applied.
515 2014-08-04  Hristian Kirtchev  <kirtchev@adacore.com>
517         * sem_ch8.adb (Build_Class_Wide_Wrapper): Update the comment on
518         the generated code. Instead of hiding the renaming and using the
519         wrapper as the proper association, have the subprogram renaming
520         alias the wrapper.
521         (Build_Spec): The entity of the wrapper is
522         now derived from the entity of the related primitive.
524 2014-08-04  Emmanuel Briot  <briot@adacore.com>
526         * s-regpat.adb: s-regpat.adb (Parse): fix incorrect link when
527         using non-capturing groups.
529 2014-08-04  Ed Schonberg  <schonberg@adacore.com>
531         * inline.adb (Build_Body_To_Inline): Remove Unmodified and
532         related pragmas before copying the original body, to prevent
533         spurious errors when the pragmas apply to formals that will not
534         appear in the inlined body.
536 2014-08-04  Robert Dewar  <dewar@adacore.com>
538         * exp_prag.adb, sem_ch7.adb, einfo.adb, sem_prag.adb, sem_util.adb,
539         exp_ch3.adb: Minor reformatting.
541 2014-08-04  Robert Dewar  <dewar@adacore.com>
543         * prj-strt.adb, prj-strt.ads, sem_attr.adb: Minor reformatting.
545 2014-08-04  Hristian Kirtchev  <kirtchev@adacore.com>
547         * aspects.adb Add an entry in table Canonical_Aspect for
548         Default_Initial_Condition.
549         * aspects.ads Add an entry in tables Aspect_Id, Aspect_Argument,
550         Aspect_Names and Aspect_Delay for Default_Initial_Condition.
551         * einfo.adb Flag3 is now Has_Default_Init_Cond. Flag132
552         is now Is_Default_Init_Cond_ Procedure. Flag133 is now
553         Has_Inherited_Default_Init_Cond.
554         (Default_Init_Cond_Procedure): New routine.
555         (Has_Default_Init_Cond): New routine.
556         (Has_Inherited_Default_Init_Cond): New routine.
557         (Is_Default_Init_Cond_Procedure): New routine.
558         (Set_Default_Init_Cond_Procedure): New routine.
559         (Set_Has_Default_Init_Cond): New routine.
560         (Set_Has_Inherited_Default_Init_Cond): New routine.
561         (Set_Is_Default_Init_Cond_Procedure): New routine.
562         (Write_Entity_Flags): Output all the new flags.
563         * einfo.ads New attributes Default_Init_Cond_Procedure,
564         Has_Inherited_Default_Init_Cond and Is_Default_Init_Cond_Procedure
565         along with usage in nodes.
566         (Default_Init_Cond_Procedure): New routine.
567         (Has_Default_Init_Cond): New routine and pragma Inline.
568         (Has_Inherited_Default_Init_Cond): New routine and
569         pragma Inline.
570         (Is_Default_Init_Cond_Procedure): New routine and
571         pragma Inline.
572         (Set_Default_Init_Cond_Procedure): New routine.
573         (Set_Has_Default_Init_Cond): New routine and pragma Inline.
574         (Set_Has_Inherited_Default_Init_Cond): New routine and pragma Inline.
575         (Set_Is_Default_Init_Cond_Procedure): New routine and pragma Inline.
576         * exp_ch3.adb (Expand_N_Object_Declaration): New constant
577         Next_N. Generate a call to the default initial condition procedure
578         if the object's type is subject to the pragma.  (Freeze_Type):
579         Generate the body of the default initial condition procedure or
580         inherit the spec from a parent type.
581         * exp_ch7.adb Add with and use clause for Exp_Prag.
582         (Expand_Pragma_Initial_Condition): Removed.
583         * exp_prag.ads, exp_prag.adb (Expand_Pragma_Initial_Condition): New
584         routine.
585         * par-prag.adb (Prag): Pragma Default_Initial_Condition does
586         not need special treatment by the parser.
587         * sem_ch3.adb (Build_Derived_Record_Type): Propagate the
588         attributes related to pragma Default_Initial_Condition to the
589         derived type.
590         (Process_Full_View): Propagate the attributes
591         related to pragma Default_Initial_Condition to the full view.
592         * sem_ch7.adb (Analyze_Package_Specification): Build the
593         declaration of the default initial condition procedure for all
594         types that qualify or inherit the one from the parent type.
595         * sem_ch13.adb (Analyze_Aspect_Specifications):
596         Add processing for aspect Default_Initial_Condition.
597         (Check_Aspect_At_Freeze_Point): Aspect
598         Default_Initial_Condition does not require delayed analysis.
599         (Replace_Type_References_Generic): Moved to spec.
600         * sem_ch13.ads (Replace_Type_References_Generic): Moved from body.
601         * sem_prag.adb Add an entry in table Sif_Glags for
602         Default_Initial_Condition.
603         (Analyze_Pragma): Pragma
604         Default_Initial_Condition is now part of assertion
605         policy. Add processing for pragma Default_Initial_Condition.
606         (Is_Valid_Assertion_Kind): Pragma Default_Initial_Condition is
607         now recognized as a proper assertion policy.
608         * sem_util.ads, sem_util.adb (Build_Default_Init_Cond_Call): New
609         routine.
610         (Build_Default_Init_Cond_Procedure_Body): New routine.
611         (Build_Default_Init_Cond_Procedure_Declaration): New routine.
612         (Inherit_Default_Init_Cond_Procedure): New routine.
613         * snames.ads-tmpl Add new predefined name and pragma id for
614         Default_Initial_Condition.
616 2014-08-04  Vincent Celier  <celier@adacore.com>
618         * prj-dect.adb (Parse_Case_Construction): It is no longer
619         an error if the variable for a case construction is not
620         typed, only if the variable value is not a single string. Call
621         Parse_Choice_List and End_Case_Construction with the new parameter
622         to indicate that the variable is typed.
623         * prj-strt.adb (End_Case_Construction): Only check the labels
624         if the variable is typed.  If the variable is not typed,
625         issue a warning when there is no "when others" allternative.
626         (Parse_Choice_List): Manage the labels only if the variable
627         is typed.
628         * prj-strt.ads (End_Case_Construction): New Boolean parameter
629         String_Type.
630         (Parse_Choice_List): Ditto.
632 2014-08-04  Ed Schonberg  <schonberg@adacore.com>
634         * sem_ch5.adb: Additional fix to Check_Predicate_Use.
636 2014-08-04  Vincent Celier  <celier@adacore.com>
638         * projects.texi: Update documentation of case constructions with
639         variables that are not typed.
641 2014-08-04  Ed Schonberg  <schonberg@adacore.com>
643         * sem_ch8.adb (Build_Class_Wide_Wrapper): If the operator carries
644         an Eliminated pragma, indicate that the wrapper is also to be
645         eliminated, to prevent spurious errors when using gnatelim on
646         programs that include box-initialization of equality operators
647         (consequence of AI05-071)..
649 2014-08-04  Robert Dewar  <dewar@adacore.com>
651         * checks.adb (Activate_Overflow_Check): Handle floating-point
652         case correctly.
653         * checks.ads (Activate_Overflow_Check): Clarify handling of
654         floating-point cases.
655         * exp_util.adb (Check_Float_Op_Overflow): Reset Do_Overflow_Check
656         flag if we generate an explicit overflow check (for
657         Check_Float_Overflow mode).
659 2014-08-04  Robert Dewar  <dewar@adacore.com>
661         * prj-proc.adb, prj-part.adb, prj-strt.adb, prj.adb, prj.ads,
662         prj-attr.adb, prj-attr.ads: Minor reformatting.
664 2014-08-04  Yannick Moy  <moy@adacore.com>
666         * expander.adb (Expand): Always perform special
667         expansion in GNATprove mode, even when doing pre-analysis.
669 2014-08-04  Thomas Quinot  <quinot@adacore.com>
671         * repinfo.adb (List_Scalar_Storage_Order): List bit order if
672         not default. Also list bit order if SSO is specified. Do not
673         assume that bit order is always equal to scalar storage order.
675 2014-08-04  Thomas Quinot  <quinot@adacore.com>
677         * freeze.adb (Set_SSO_From_Default): Do not set scalar storage
678         order to reverse SSO for a type that has an explicit native
679         Bit_Order.
681 2014-08-04  Doug Rupp  <rupp@adacore.com>
683         * cal.c: Macro check for VxWorks7.
684         * init.c (getpid): Likewise.
685         * mkdir.c (__gnat_mkdir): Likewise.
686         * sysdep.c (__gnat_is_file_not_found_error): Likewise.
688 2014-08-04  Gary Dismukes  <dismukes@adacore.com>
690         * exp_ch3.adb (Expand_N_Object_Declaration): Inhibit generation
691         of an invariant check in the case where No_Initialization is set,
692         since the object is uninitialized.
694 2014-08-04  Thomas Quinot  <quinot@adacore.com>
696         * snames.ads-tmpl (Default_Scalar_Storage_Order): Now an attribute
697         name, in addition to a pragma name.
698         * snames.adb-tmpl (Get_Pragma_Id, Is_Configuration_Pragma_Name,
699         Is_Pragma_Name): Adjust accordingly.
700         * sem_attr.ads, sem_attr.adb, exp_attr.adb
701         (Attribute_Default_Scalar_Storage_Order): Add handling of new
702         attribute.
703         * gnat_rm.texi: Document the above.
705 2014-08-04  Arnaud Charlet  <charlet@adacore.com>
707         * exp_util.adb (Check_Float_Op_Overflow): No-op in codepeer
708         mode for now, to revert to previous behavior.
709         * checks.adb: Revert previous change, no longer needed.
711 2014-08-04  Robert Dewar  <dewar@adacore.com>
713         * gnat1drv.adb (Adjust_Global_Switches): Don't set
714         Check_Float_Overflow if Machine_Oveflows_On_Target is True.
715         * sem_prag.adb (Analyze_Pragma, case Check_Float_Overflow): Don't
716         set Check_Float_Overflow if Machine_Oveflows_On_Target is True.
717         * switch-c.adb (Scan_Front_End_Switches): Don't set
718         Check_Float_Overflow if Machine_Oveflows_On_Target is True.
720 2014-08-04  Vincent Celier  <celier@adacore.com>
722         * prj-attr.adb: Add new default indications for
723         attributes Object_Dir, Exec_Dir, Source_Dirs and Target.
724         (Attribute_Default_Of): New function (Initialize): Set the
725         default for those attributes that have one specified.
726         * prj-attr.ads (Attribute_Data): New component Default.
727         * prj-proc.adb (Expression): Take into account the new defaults
728         for attributes Object_Dir, Exec_Dir and Source_Dirs.
729         * prj-strt.adb (Attribute_Reference): Set the default for
730         the attribute.
731         * prj-tree.ads, prj-tree.adb (Default_Of): New function.
732         (Set_Default_Of): New procedure.
733         * prj.adb (The_Dot_String): New global Name_Id variable,
734         initialized in procedure Initialize.
735         (Dot_String): New function
736         (Initialize): Initialize The_Dot_String.
737         (Reset): Create the string list Shared.Dot_String_List.
738         * prj.ads (Attribute_Default_Value): New enumeration type.
739         (Project_Qualifier): Change enumeration value Dry to Abstract_Project.
740         (Dot_String): New function.
741         (Shared_Project_Tree_Data): New string list component Dot_String_List.
742         * projects.texi: Document new defaults for attribute Object_Dir,
743         Exec_Dir and Source_Dirs.
745 2014-08-04  Robert Dewar  <dewar@adacore.com>
747         * sem_ch12.adb: Minor reformatting.
749 2014-08-04  Arnaud Charlet  <charlet@adacore.com>
751         * exp_util.adb, checks.adb (Check_Float_Op_Overflow): Add special
752         expansion in CodePeer_Mode.
753         (Selected_Range_Checks): Add handling of overflow checks in
754         CodePeer_Mode.
756 2014-08-04  Robert Dewar  <dewar@adacore.com>
758         * exp_attr.adb (Expand_N_Attribute_Reference, case Pred):
759         Remove special test for Float'First, no longer required.
760         (Expand_N_Attribute_Reference, case Succ): Remove special test
761         for Float'First, no longer required.
762         * s-fatgen.adb (Pred): return infinity unchanged.
763         (Succ): ditto.
765 2014-08-04  Claire Dross  <dross@adacore.com>
767         * sem_ch12.adb (Analyze_Associations): Defaults should only be
768         used if there is no explicit match.
769         * exp_util.adb (Get_First_Parent_With_Ext_Axioms_For_Entity):
770         Also check for pragma external_axiomatization on generic units.
772 2014-08-04  Robert Dewar  <dewar@adacore.com>
774         * checks.adb (Activate_Overflow_Check): Remove
775         Check_Float_Overflow processing.
776         (Apply_Scalar_Range_Check): Ditto.
777         (Generate_Range_Check): Ditto.
778         * exp_ch4.adb (Expand_N_Op_Add): Add call to
779         Check_Float_Op_Overflow.
780         (Expand_N_Op_Divide): ditto.
781         (Expand_N_Op_Multiply): ditto.
782         (Expand_N_Op_Subtract): ditto.
783         * exp_util.ads, exp_util.adb (Check_Float_Op_Overflow): New procedure.
784         * sem_attr.adb (Analyze_Attribute, case Pred): Make sure
785         Do_Range_Check is set for floating-point case in -gnatc or
786         GNATprove mode.
787         (Analyze_Attribute, case Succ): Make sure
788         Do_Range_Check is set for floating-point case in -gnatc or
789         GNATprove mode.
790         * sem_res.adb (Resolve_Type_Conversion): Make sure Do_Range_Check
791         flag is set for real to integer conversion in GNATprove or
792         -gnatc mode.
794 2014-08-04  Gary Dismukes  <dismukes@adacore.com>
796         * sem_ch13.adb (Analyze_Aspect_Specifications): Resolve
797         the expression of an Import or Export aspect as type Boolean
798         and require it to be static. Add ??? comment. Also, set the
799         Is_Exported flag when appropriate.
801 2014-08-04  Robert Dewar  <dewar@adacore.com>
803         * exp_ch4.adb: Minor reformatting.
804         * exp_attr.adb: Minor reformatting.
806 2014-08-04  Thomas Quinot  <quinot@adacore.com>
808         * s-fatgen.ads, s-fatgen.adb (S, P): New visible type declarations
809         (Unaligned_Valid): Remove now unused subprogram.
810         * exp_attr.adb (Expand_N_Attribute_Reference, case
811         Attribute_Valid): If the prefix is in reverse SSO or potentially
812         unaligned, copy it using a byte copy operation to a temporary
813         variable.
814         * einfo.adb: Minor comment fix.
816 2014-08-04  Hristian Kirtchev  <kirtchev@adacore.com>
818         * freeze.adb (Freeze_Entity): Do not freeze formal subprograms.
820 2014-08-04  Robert Dewar  <dewar@adacore.com>
822         * s-imgrea.adb (Image_Floating_Point): Don't add space before +Inf.
823         * s-fatgen.adb (Pred): Handle Float'First.
824         (Succ): Handle Float'Last.
826 2014-08-04  Ed Schonberg  <schonberg@adacore.com>
828         * sem_util.adb (Is_Potentially_Unevaluated): If the original
829         node of a parent node in the tree is a short-circuit operation,
830         the node is potentially unevaluated.
832 2014-08-04  Robert Dewar  <dewar@adacore.com>
834         * sem_res.adb (Resolve_Type_Conversion): Set Do_Range_Check on
835         conversion from a real type to an integer type.
837 2014-08-04  Yannick Moy  <moy@adacore.com>
839         * sem_aggr.adb, sem_ch3.adb, sem_ch5.adb, sem_ch7.adb, sem_ch9.adb,
840         sem_ch12.adb, sem_util.adb, sem_util.ads, sem_res.adb, sem_attr.adb,
841         exp_ch6.adb, sem_ch4.adb, restrict.adb, restrict.ads, sem_ch6.adb,
842         sem_ch8.adb, sem_ch11.adb: Update some subprogram names to refer to
843         SPARK_05 instead of SPARK.
845 2014-08-04  Robert Dewar  <dewar@adacore.com>
847         * sem.ads: Minor reformatting.
848         * sem_ch13.adb (Analyze_Aspect_External_Or_Link_Name): Minor
849         reformatting.
850         (Analyze_Aspect_Specifications, case Convention): Put External_Name
851         before Link_Name when constructing pragma.
853 2014-08-04  Yannick Moy  <moy@adacore.com>
855         * sem.adb, sem.ads (In_Default_Expr): Global flag that is set
856         to True during analysis of a default component expression.
857         (Semantics): Save and restore In_Default_Expr around analysis.
858         * sem_ch3.adb, sem_ch3.ads (Analyze_Component_Declaration):
859         Call new wrapper Preanalyze_Default_Expression.
860         (Preanalyze_Default_Expression): New wrapper on
861         Preanalyze_Spec_Expression which sets and restores In_Default_Expr.
862         * sem_res.adb (Resolve_Call): Mark calls inside default
863         expressions as not inlined in GNATprove mode.
865 2014-08-04  Robert Dewar  <dewar@adacore.com>
867         * exp_ch4.adb: Minor reformatting.
869 2014-08-04  Olivier Hainque  <hainque@adacore.com>
871         * link.c: remove const on __gnat_objlist_file_supported for AIX
873 2014-08-04  Robert Dewar  <dewar@adacore.com>
875         * sem_util.ads: Minor addition of comment.
877 2014-08-04  Vincent Celier  <celier@adacore.com>
879         * prj-dect.adb (Check_Package_Allowed): Allow package IDE in
880         all projects, including aggregate and aggregate library projects.
882 2014-08-04  Yannick Moy  <moy@adacore.com>
884         * back_end.adb (Call_Back_End): Do not call gigi in GNATprove mode.
886 2014-08-04  Robert Dewar  <dewar@adacore.com>
888         * sem_eval.adb (Test_In_Range): Always in range for
889         Is_Known_Valid target type, where input type has smaller or
890         equal size and does not have biased rep.
892 2014-08-04  Ed Schonberg  <schonberg@adacore.com>
894         * sem_attr.adb (Eval_Attribute): Constrained is not treated as
895         a static attribute, and the Static flag must not be set on it
896         during resolution. It may be constant-folded during expansion,
897         but if expansion is disabled it is not a static expression.
899 2014-08-04  Hristian Kirtchev  <kirtchev@adacore.com>
901         * sem_ch8.adb (Build_Class_Wide_Wrapper): Mark the primitive as
902         referenced once resolution has taken place.
904 2014-08-04  Gary Dismukes  <dismukes@adacore.com>
906         * exp_ch4.adb (Expand_N_Type_Conversion): Don't
907         compare access levels in the case where the target type is the
908         anonymous type of an access discriminant, since the level of
909         such types is defined based on context. Add comment.
911 2014-08-04  Hristian Kirtchev  <kirtchev@adacore.com>
913         * sem_ch8.adb (Build_Class_Wide_Wrapper): Handle various special
914         cases related to equality.  Remove the special processing
915         for dispatching abstract subprograms as it is not needed.
916         (Interpretation_Error): Add a specialized error message for
917         predefined operators.
918         (Is_Intrinsic_Equality): New routine.
919         (Is_Suitable_Candidate): New routine.
921 2014-08-04  Gary Dismukes  <dismukes@adacore.com>
923         * checks.adb: Minor comment reformatting.
925 2014-08-04  Ed Schonberg  <schonberg@adacore.com>
927         * restrict.adb (Check_Restriction): For checked max_parameter
928         restrictions reset Violated flag, so that subsequent violations
929         are properly detected.
931 2014-08-04  Robert Dewar  <dewar@adacore.com>
933         * sem_ch3.adb (Check_Initialization): Fix bad test of GNATprove
934         mode.
935         (Process_Discriminants): Fix bad test of GNATprove mode
937 2014-08-04  Hristian Kirtchev  <kirtchev@adacore.com>
939         * sem_ch12.adb (Instantiate_Formal_Subprogram):
940         Move variable to their own section. Propagate the source
941         location of a formal parameter to the corresponding formal of
942         the subprogram renaming declaration. Code reformatting.
944 2014-08-04  Arnaud Charlet  <charlet@adacore.com>
946         * g-trasym-vms-ia64.adb, g-trasym-vms-alpha.adb: Removed.
948 2014-08-04  Ed Schonberg  <schonberg@adacore.com>
950         * exp_aggr.adb (Expand_Array_Aggregate): Do not attempt expansion
951         if error already detected.  We may reach this point in spite of
952         previous errors when compiling with -gnatq, to force all possible
953         errors (this is the usual ACATS mode).
955 2014-08-04  Gary Dismukes  <dismukes@adacore.com>
957         * checks.adb (Generate_Range_Check): For the case of converting
958         a base type with a larger range to a smaller target subtype, only
959         use unchecked conversions of bounds in the range check followed
960         by conversion in the case where both types are discrete. In other
961         cases, convert to the target base type and save in a temporary
962         followed by the range check.
963         (Convert_And_Check_Range): New procedure factoring code to save
964         conversion to a temporary followed by a range check (called two
965         places in Generate_Range_Check).
966         * exp_ch4.adb (Expand_N_Type_Conversion): Relax previous
967         check-in, to generate range checks for conversions between
968         any floating-point types rather than limiting it to matching
969         base types.
971 2014-08-02  Trevor Saunders  <tsaunders@mozilla.com>
973         * gcc-interface/trans.c: Use hash_set instead of pointer_set.
975 2014-08-01  Ed Schonberg  <schonberg@adacore.com>
977         * restrict.adb (Update_Restrictions): For restrictions with a
978         maximum parameter (e.g. number of protected entries in Ravenscar)
979         do not compute the maximum of the violation over several objects,
980         because the restriction is per-object.
981         (Check_Restriction): After possible message, reset the value
982         of of a checked max_parameter restriction to zero, to prevent
983         cascaded errors.
984         * sem_ch3.adb (Build_Derived_Private_Type): Use base of parent
985         (sub)type to determine whether derived type should be on the
986         list of private dependents of a type whose full view may become
987         visible subsequently.
989 2014-08-01  Olivier Hainque  <hainque@adacore.com>
991         * gcc-interface/Make-lang.in (ADA_TOOLS_FLAGS_TO_PASS, native): use
992         $(CXX) instead of ../../xg++ to feed CXX.
993         (CXX_LFLAGS): Remove. Now unused as the proper flags
994         are expected to be included in the CXX variable.
996 2014-08-01  Pierre-Marie Derodat  <derodat@adacore.com>
998         * gcc-interface/decl.c (elaborate_expression_1): Return the new
999         variable when debug info is needed and the expression is not
1000         constant.  Tag as external only new variables that are global.
1001         (gnat_to_gnu_entity): Call it after the GNU declaration is saved.
1002         * gcc-interface/trans.c (Attribute_to_gnu): Do not cache
1003         attributes for IN array parameters when their actual subtype
1004         needs debug info.
1005         (Compilation_Unit_to_gnu): Call it to process all remaining nodes.
1006         * gcc-interface/gigi.h (process_deferred_decl_context): New.
1007         * gcc-interface/utils.c (gnat_write_global_declarations): Do not
1008         emit debug info for ignored global declarations.
1009         (struct deferred_decl_context_node,
1010         add_deferred_decl_context, add_deferred_type_context,
1011         compute_deferred_decl_context, defer_or_set_type_context,
1012         deferred_decl_context_queue, get_debug_scope,
1013         get_global_context, process_deferred_decl_context): New.
1014         (gnat_pushdecl): Re-implement the DECL_CONTEXT and TYPE_CONTEXT
1015         computation machinery to rely on the GNAT Scope attribute.
1017 2014-08-01  Eric Botcazou  <ebotcazou@adacore.com>
1019         * gcc-interface/utils2.c (build_simple_component_ref): Add guard.
1021 2014-08-01  Robert Dewar  <dewar@adacore.com>
1023         * sem_ch8.adb, opt.ads Minor comment updates.
1025 2014-08-01  Hristian Kirtchev  <kirtchev@adacore.com>
1027         * exp_intr.adb (Expand_Unc_Deallocation): Request a renaming
1028         from the side effects removal machinery.
1029         * exp_util.adb (Duplicate_Subexpr): Add formal parameter
1030         Renaming_Req. Update the nested call to Remove_Side_Effects.
1031         (Duplicate_Subexpr_No_Checks): Add formal parameter
1032         Renaming_Req. Update the nested call to Remove_Side_Effects.
1033         (Duplicate_Subexpr_Move_Checks): Add formal parameter
1034         Renaming_Req. Update the nested call to Remove_Side_Effects.
1035         (Remove_Side_Effects): Add formal parameter Renaming_Req. Generate
1036         an object renaming declaration when the caller requests it.
1037         * exp_util.ads (Duplicate_Subexpr): Add formal
1038         parameter Renaming_Req. Update comment on usage.
1039         (Duplicate_Subexpr_No_Checks): Add formal parameter Renaming_Req.
1040         (Duplicate_Subexpr_Move_Checks): Add formal parameter
1041         Renaming_Req.
1043 2014-08-01  Bob Duff  <duff@adacore.com>
1045         * gnat_ugn.texi: Minor updates.
1047 2014-08-01  Robert Dewar  <dewar@adacore.com>
1049         * atree.adb: Minor reformatting.
1051 2014-08-01  Ed Schonberg  <schonberg@adacore.com>
1053         * exp_aggr.adb (Init_Hidden_Discriminants): If some ancestor is a
1054         private extension, get stored constraint, if any, from full view.
1056 2014-08-01  Robert Dewar  <dewar@adacore.com>
1058         * opt.ads (No_Elab_Code_All_Pragma): New global variable.
1059         * sem_ch10.adb (Check_No_Elab_Code_All): New procedure
1060         (Analyze_Compilation_Unit): Call Check_No_Elab_Code_All
1061         (Analyze_Subunit_Context): Call Check_No_Elab_Code_All.
1062         * sem_prag.adb (Analyze_Pragma, case No_Elaboration_Code_All):
1063         Remove code for checking with's, now in sem_ch10.adb, set
1064         Opt.No_Elab_Code_All_Pragma.
1066 2014-08-01  Eric Botcazou  <ebotcazou@adacore.com>
1068         * sem_ch3.adb (Copy_And_Build): Copy the declaration for
1069         access types as well and adjust the subtype mark if there are
1070         no constraints.
1072 2014-08-01  Robert Dewar  <dewar@adacore.com>
1074         * sem_eval.adb (Test_In_Range): Return Unknown if error posted.
1076 2014-08-01  Robert Dewar  <dewar@adacore.com>
1078         * sem_ch3.adb, einfo.ads, exp_ch4.adb: Code clean ups.
1080 2014-08-01  Eric Botcazou  <ebotcazou@adacore.com>
1082         * einfo.ads (Has_Private_Ancestor): Remove obsolete usage.
1083         * exp_ch4.adb (Expand_Composite_Equality): Add conversion
1084         of the actuals in the case of untagged record types too.
1085         * sem_ch3.adb (Build_Full_Derivation): New procedure to create the
1086         full derivation of a derived private type, extracted from...
1087         (Copy_And_Build): In the case of record types and most
1088         enumeration types, copy the original declaration.  Build the
1089         full derivation according to the approach extracted from...
1090         (Build_Derived_Private_Type): ...here.  Call Build_Full_Derivation
1091         to create the full derivation in all existing cases and also
1092         create it in the no-discriminants/discriminants case instead of
1093         deriving directly from the full view.
1094         (Is_Visible_Component): Remove obsolete code.
1095         * sem_aggr.adb (Resolve_Record_Aggregate): Likewise.
1097 2014-08-01  Arnaud Charlet  <charlet@adacore.com>
1099         * fe.h (GNAT_Mode): New.
1100         * gcc-interface/decl.c (gnat_to_gnu_entity): Do not error out on
1101         reverse SSO in GNAT mode.
1103 2014-08-01  Thomas Quinot  <quinot@adacore.com>
1105         * freeze.adb: Minor reformatting.
1107 2014-08-01  Thomas Quinot  <quinot@adacore.com>
1109         * exp_ch3.adb (Default_Initialize_Object): Do not generate
1110         default initialization for an imported object.
1112 2014-08-01  Olivier Hainque  <hainque@adacore.com>
1114         * seh_init.c (__gnat_map_SEH): Cast argument of IsBadCodePtr
1115         to the expected FARPROC type instead of void *.
1116         * adaint.c (f2t): Expect __time64_t * as second argument, in line with
1117         other datastructures.
1118         (__gnat_file_time_name_attr): Adjust accordingly.
1119         (__gnat_check_OWNER_ACL): Declare pSD as PSECURITY_DESCRIPTOR,
1120         in line with uses.
1121         (__gnat_check_OWNER_ACL): Declare AccessMode
1122         parameter as ACCESS_MODE instead of DWORD, in line with callers
1123         and uses.
1124         (__gnat_set_executable): Add ATTRIBUTE_UNUSED on mode,
1125         unused on win32.  Correct cast of "args" on call to spawnvp.
1126         (add_handle): Cast realloc calls into their destination types.
1127         (win32_wait): Remove declaration and initialization of unused variable.
1128         (__gnat_locate_exec_on_path): Cast alloca calls
1129         into their destination types.
1130         * initialize.c (append_arg, __gnat_initialize): Cast xmalloc calls into
1131         their destination types.
1133 2014-08-01  Gary Dismukes  <dismukes@adacore.com>
1135         * exp_ch4.adb (Expand_N_Type_Conversion): Expand
1136         range checks for conversions between floating-point subtypes
1137         when the target and source types are the same.
1139 2014-08-01  Robert Dewar  <dewar@adacore.com>
1141         * exp_aggr.adb: Minor reformatting.
1143 2014-08-01  Eric Botcazou  <ebotcazou@adacore.com>
1145         * sem_ch13.adb (Check_Indexing_Functions): Initialize
1146         Indexing_Found.
1148 2014-08-01  Arnaud Charlet  <charlet@adacore.com>
1150         * gnat1drv.adb (Gnat1drv): In gnatprove mode, we now write the
1151         ALI file before we call the backend (so that gnat2why can append
1152         to it).
1154 2014-08-01  Thomas Quinot  <quinot@adacore.com>
1156         * exp_pakd.adb (Expand_Bit_Packed_Element_Set,
1157         Expand_Packed_Element_Reference): Pass additional Rev_SSO
1158         parameter indicating whether the packed array type has reverse
1159         scalar storage order to the s-pack* Set/Get routines.
1160         * s-pack*.ad* (Get, Set, GetU, SetU): New formal Rev_SSO
1161         indicating reverse scalar storage order.
1163 2014-08-01  Robert Dewar  <dewar@adacore.com>
1165         * sem_ch3.adb (Check_Initialization): Set Do_Range_Check
1166         for initial component value in -gnatc or GNATprove mode.
1167         (Process_Discriminants): Same fix for default discriminant values.
1168         * sem_eval.adb (Test_In_Range): Improve accuracy of results by
1169         checking subtypes.
1171 2014-08-01  Robert Dewar  <dewar@adacore.com>
1173         * sinfo.ads: Minor comment clarification.
1175 2014-08-01  Hristian Kirtchev  <kirtchev@adacore.com>
1177         * sem_ch13.adb (Analyze_Aspect_Specifications): Code
1178         reformatting. Store the generated pragma Import in the related
1179         subprogram as routine Wrap_Imported_Subprogram will need it later.
1180         * sem_prag.adb (Is_Unconstrained_Or_Tagged_Item): An item of
1181         a private type with discriminants is considered to fall in the
1182         category of unconstrained or tagged items.
1184 2014-08-01  Arnaud charlet  <charlet@adacore.com>
1186         * s-os_lib.adb (Open_Append): New functions to open a file for
1187         appending. This binds to the already existing (but not used)
1188         __gnat_open_append.
1189         * osint.ads, osint.adb (Open_File_To_Append_And_Check): New procedure
1190         to open a file for appending.
1191         * osint-c.ads, osint-c.adb (Open_Output_Library_Info): New procedure
1192         to open the ALI file for appending.
1194 2014-08-01  Robert Dewar  <dewar@adacore.com>
1196         * sem_ch8.adb: Minor reformatting.
1198 2014-08-01  Yannick Moy  <moy@adacore.com>
1200         * sem_ch13.adb (Insert_Pragma): Add special case for precondition
1201         pragmas from aspects, which need to be inserted in proper order.
1203 2014-08-01  Ed Schonberg  <schonberg@adacore.com>
1205         * exp_aggr.adb (Expand_Record_Aggregate, Init_Hidden_Discriminants):
1206         Handle properly a type extension that constrains a discriminated
1207         derived type that renames other discriminants of an ancestor.
1209 2014-08-01  Thomas Quinot  <quinot@adacore.com>
1211         * s-pack06.adb, s-pack10.adb, s-pack03.ads, s-pack12.adb, s-pack14.ads,
1212         s-pack25.adb: Fix minor inconsistencies and typos.
1214 2014-08-01  Hristian Kirtchev  <kirtchev@adacore.com>
1216         * sem_ch8.adb (Analyze_Subprogram_Renaming): Alphabetize
1217         globals and move certain variables to the "local
1218         variable" section. Call Build_Class_Wide_Wrapper when
1219         renaming a default actual subprogram with a class-wide actual.
1220         (Build_Class_Wide_Wrapper): New routine.
1221         (Check_Class_Wide_Actual): Removed.
1222         (Find_Renamed_Entity): Code reformatting.
1223         (Has_Class_Wide_Actual): Alphabetize. Change the
1224         logic of the predicate as the renamed name may not necessarely
1225         denote the correct subprogram.
1227 2014-08-01  Eric Botcazou  <ebotcazou@adacore.com>
1229         * sem_ch7.adb: Fix minor oversight in condition.
1231 2014-08-01  Bob Duff  <duff@adacore.com>
1233         * projects.texi: Minor documentation improvements.
1235 2014-08-01  Robert Dewar  <dewar@adacore.com>
1237         * aspects.ads, aspects.adb: Add aspect No_Elaboration_Code_All.
1238         * gnat_rm.texi: Document No_Elaboration_Code_All pragma and aspect.
1239         * lib-load.adb: Initialize No_Elab_Code_All field.
1240         * lib-writ.adb: Initialize No_Elab_Code_All.
1241         * lib.ads, lib.adb: New field No_Elab_Code_All.
1242         * par-prag.adb: Add dummy entry for pragma No_Elaboration_Code_All.
1243         * restrict.ads, restrict.adb: Restriction No_Elaboration_Code_All no
1244         longer exists.
1245         * sem_ch10.adb (Analyze_Context): Processing for
1246         No_Elaboration_Code_All removed.
1247         (Generate_Parent_References): Moved to Sem_Util.
1248         * sem_prag.adb: Add processing for pragma No_Elaboration_Code_All.
1249         * sem_util.ads, sem_util.adb (Get_Parent_Entity): Moved here from
1250         Sem_Ch10.
1251         * snames.ads-tmpl: Add entry for pragma No_Elaboration_Code_All.
1252         * targparm.adb: Minor comment updates Add comments on ignoring
1253         pragma No_Elaboration_Code_All.
1255 2014-08-01  Nicolas Roche  <roche@adacore.com>
1257         * adaint.c (__gnat_set_close_on_exec): Ensure that
1258         we can unset "close_on_exec" flag.
1260 2014-08-01  Ed Schonberg  <schonberg@adacore.com>
1262         * exp_ch9.adb (Build_Wrapper_Spec, Replicate_Formals): When building
1263         the parameter specs of the wrapper program for a primitive operation
1264         of a synchronized type that implements an interface, copy the
1265         null_exclusion indicator as well.
1267 2014-08-01  Robert Dewar  <dewar@adacore.com>
1269         * sem_eval.ads: Minor reformatting.
1271 2014-08-01  Eric Botcazou  <ebotcazou@adacore.com>
1273         * exp_ch3.adb (Build_Initialization_Call): Call Underlying_Type
1274         to go down the chain of private derivations.
1275         * freeze.adb (Freeze_Entity): Fix typo in comment.
1277 2014-08-01  Ed Schonberg  <schonberg@adacore.com>
1279         * sem_ch3.adb (Access_Type_Declaration): If designated type is
1280         a limited view, create a master entity (as is already done for
1281         class-wide types) in case the full view designates a type that
1282         contains tasks.
1283         * sem_ch8.adb (Find_Selected_Component): If prefix is a dereference
1284         and the designated type is a limited view, use the non-limited
1285         view if available.
1287 2014-08-01  Eric Botcazou  <ebotcazou@adacore.com>
1289         * gcc-interface/ada-tree.h (DECL_BY_DESCRIPTOR_P): Delete.
1290         (DECL_FUNCTION_STUB): Likewise.
1291         (SET_DECL_FUNCTION_STUB): Likewise.
1292         (DECL_PARM_ALT_TYPE): Likewise.
1293         (SET_DECL_PARM_ALT_TYPE): Likewise.
1294         (TYPE_VAX_FLOATING_POINT_P): Delete.
1295         (TYPE_DIGITS_VALUE): Likewise.
1296         (SET_TYPE_DIGITS_VALUE): Likewise.
1297         * gcc-interface/gigi.h (standard_datatypes): Remove ADT_malloc32_decl.
1298         (malloc32_decl): Delete.
1299         (build_vms_descriptor): Likewise.
1300         (build_vms_descriptor32): Likewise.
1301         (fill_vms_descriptor): Likewise.
1302         (convert_vms_descriptor): Likewise.
1303         (TARGET_ABI_OPEN_VMS): Likewise.
1304         (TARGET_MALLOC64): Likewise.
1305         * gcc-interface/decl.c (add_parallel_type_for_packed_array): New.
1306         (gnat_to_gnu_entity): Call it to add the original type as a parallel
1307         type to the implementation type of a packed array type.
1308         <E_Procedure>: Remove now obsolete kludge.
1309         <E_Exception>: Delete obsolete comment.
1310         <object>: Small tweak.
1311         <E_Subprogram_Type>: Remove support for stub subprograms, as well as
1312         for the descriptor passing mechanism.
1313         (gnat_to_gnu_param): Likewise.
1314         * gcc-interface/misc.c (gnat_init_gcc_fp): Remove special case.
1315         (gnat_print_type): Adjust.
1316         * gcc-interface/trans.c (gigi): Remove obsolete initializations.
1317         (vms_builtin_establish_handler_decl): Delete.
1318         (gnat_vms_condition_handler_decl): Likewise.
1319         (establish_gnat_vms_condition_handler): Likewise.
1320         (build_function_stub): Likewise.
1321         (Subprogram_Body_to_gnu): Do not call above functions.
1322         (Call_to_gnu): Remove support for the descriptor passing mechanism.
1323         * gcc-interface/utils.c (make_descriptor_field): Delete.
1324         (build_vms_descriptor32): Likewise.
1325         (build_vms_descriptor): Likewise.
1326         (fill_vms_descriptor): Likewise.
1327         (convert_vms_descriptor64): Likewise.
1328         (convert_vms_descriptor32): Likewise.
1329         (convert_vms_descriptor): Likewise.
1330         * gcc-interface/utils.c (unchecked_convert): Likewise.
1331         * gcc-interface/utils2.c (maybe_wrap_malloc): Remove obsolete stuff.
1333 2014-08-01  Eric Botcazou  <ebotcazou@adacore.com>
1335         * gcc-interface/trans.c (gigi): Use gnat_to_gnu_type for the exception
1336         type and get_unpadded_type for the longest FP type.
1337         (Attribute_to_gnu) <Machine>: Compare the precision of the types.
1338         (convert_with_check): Adjust formatting and remove FIXME.
1340 2014-08-01  Eric Botcazou  <ebotcazou@adacore.com>
1342         * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Signed_Integer_Subtype>:
1343         Do not convert the RM bounds to the base type.
1344         (E_Floating_Point_Subtype): Likewise.
1345         (E_Array_Subtype): Convert the bounds to the base type.
1346         * gcc-interface/trans.c (get_type_length): New function.
1347         (Attribute_to_gnu) <Range_Length>: Call it.
1348         <Length>: Likewise.
1349         (Loop_Statement_to_gnu): Convert the bounds to the base type.
1350         (gnat_to_gnu) <N_In>: Likewise.
1351         * gcc-interface/utils.c (make_type_from_size): Do not convert the RM
1352         bounds to the base type.
1353         (create_range_type): Likewise.
1354         (convert): Convert the bounds to the base type for biased types.
1355         * gcc-interface/utils2.c (compare_arrays): Convert the bounds to the
1356         base type.
1358 2014-08-01  Eric Botcazou  <ebotcazou@adacore.com>
1360         * gcc-interface/trans.c (gnat_to_gnu) <N_Selected_Component>: Remove
1361         incorrect implicit type derivation.
1362         * gcc-interface/utils.c (max_size) <tcc_reference>: Convert the bounds
1363         to the base type.
1365 2014-08-01  Hristian Kirtchev  <kirtchev@adacore.com>
1367         * sem_attr.adb (Analyze_Attribute): Preanalyze and resolve the
1368         prefix of attribute Loop_Entry.
1369         * sem_prag.adb (Analyze_Pragma): Verify the placement of pragma
1370         Loop_Variant with respect to an enclosing loop (if any).
1371         (Contains_Loop_Entry): Update the parameter profile and all
1372         calls to this routine.
1373         * sem_res.adb (Resolve_Call): Code reformatting. Do not ask
1374         for the corresponding body before determining the nature of the
1375         ultimate alias's declarative node.
1377 2014-08-01  Robert Dewar  <dewar@adacore.com>
1379         * gnat1drv.adb, sem_ch4.adb: Minor reformatting.
1381 2014-08-01  Robert Dewar  <dewar@adacore.com>
1383         * sem_eval.adb (Rewrite_In_Raise_CE): Don't try to reuse inner
1384         constraint error node since it is a list member.
1386 2014-08-01  Robert Dewar  <dewar@adacore.com>
1388         * sem_warn.adb: Minor reformatting.
1390 2014-08-01  Eric Botcazou  <ebotcazou@adacore.com>
1392         * einfo.adb (Underlying_Type): Return the underlying full view
1393         of a private type if present.
1394         * freeze.adb (Freeze_Entity):
1395         Build a single freeze node for partial, full and underlying full
1396         views, if any.
1397         * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Private_Type>: Add a
1398         missing guard before the access to the Underlying_Full_View.
1399         * gcc-interface/trans.c (process_freeze_entity): Deal with underlying
1400         full view if present.
1401         * gcc-interface/utils.c (make_dummy_type): Avoid superfluous work.
1403 2014-08-01  Ed Schonberg  <schonberg@adacore.com>
1405         * sem_res.adb (Resolve_Entry_Call): When an entry has
1406         preconditions, the entry call is wrapped in a procedure call
1407         that incorporates the precondition checks. To prevent a double
1408         expansion, with possible duplication of extra formals, that
1409         procedure call must only be pre-analyzed and resolved. Expansion
1410         takes place upon return to the caller Resolve_Call.
1412 2014-08-01  Hristian Kirtchev  <kirtchev@adacore.com>
1414         * sem_res.adb (Resolve_Call): Do not perform
1415         GNATprove-specific inlining while within a generic.
1417 2014-08-01  Ed Schonberg  <schonberg@adacore.com>
1419         * sem_ch4.adb (Analyze_Case_Expression): Handle properly a
1420         case expression with incompatible alternatives, when the first
1421         alternative is overloaded.
1423 2014-08-01  Ed Schonberg  <schonberg@adacore.com>
1425         * sem_res.adb (Check_Parameterless_Call): Use Relocate_Node
1426         to create the name of the parameterless call, rather than
1427         New_Copy, to preserve the tree structure when the name is a
1428         complex expression, e.g. a selected component that denotes a
1429         protected operation, whose prefix is itself a selected component.
1431 2014-08-01  Ed Schonberg  <schonberg@adacore.com>
1433         * sem_ch6.adb (Analyze_Subprogram_Body_Helper): Use
1434         Unit_Declaration_Node to retrieve body when inlining, to handle
1435         properly subprogram child units.
1437 2014-08-01  Robert Dewar  <dewar@adacore.com>
1439         * sem_attr.adb: Minor reformatting.
1441 2014-08-01  Vincent Celier  <celier@adacore.com>
1443         * debug.adb: Minor documentation addition for -dn switch.
1445 2014-08-01  Robert Dewar  <dewar@adacore.com>
1447         * sem_aggr.adb, exp_ch9.adb, sem_prag.adb, sem_util.adb,
1448         sem_attr.adb, sem_eval.ads, sem_cat.adb, sem_ch13.adb: Improve
1449         documentation of Is_Static_Expression vs Is_OK_Static_Expression.
1450         In several places, use the Is_OK version as suggested by the spec.
1452 2014-08-01  Vincent Celier  <celier@adacore.com>
1454         * gnatcmd.adb: Revert last change which was not correct.
1456 2014-08-01  Hristian Kirtchev  <kirtchev@adacore.com>
1458         * freeze.adb (Find_Constant): Ensure that the constant being
1459         inspected is still an object declaration (i.e. not a renaming).
1461 2014-08-01  Ed Schonberg  <schonberg@adacore.com>
1463         * sem_ch5.adb (Analyze_Loop_Parameter_Specification): a)
1464         An attribute_reference to Loop_Entry denotes an iterator
1465         specification: its prefix is an object, as is the case for 'Old.
1466         b) If the domain of iteration is an expression whose type has
1467         the Iterable aspect defined, this is an iterator specification.
1469 2014-08-01  Robert Dewar  <dewar@adacore.com>
1471         * gnatcmd.adb: Minor reformatting.
1473 2014-08-01  Robert Dewar  <dewar@adacore.com>
1475         * atree.ads (Info_Messages): New counter.
1476         * err_vars.ads: Minor comment update.
1477         * errout.adb (Delete_Warning_And_Continuations): Deal
1478         with new Info_Messages counter.
1479         (Error_Msg_Internal): ditto.
1480         (Delete_Warning): ditto.
1481         (Initialize): ditto.
1482         (Write_Error_Summary): ditto.
1483         (Output_Messages): ditto.
1484         (To_Be_Removed): ditto.
1485         * erroutc.adb (Delete_Msg): Deal with Info_Messages counter.
1486         (Compilation_Errors): ditto.
1487         * errutil.adb (Error_Msg): Deal with Info_Messages counter.
1488         (Finalize): ditto.
1489         (Initialize): ditto.
1490         * sem_prag.adb (Analyze_Pragma): Minor comment addition.
1491         * gnat_ugn.texi: Document that -gnatwe does not affect info
1492         messages.
1494 2014-08-01  Robert Dewar  <dewar@adacore.com>
1496         * debug.adb: Document debug switch -gnatd.Z.
1497         * sem.adb (Semantics): Force expansion on in no or configurable
1498         run time mode.
1500 2014-08-01  Ed Schonberg  <schonberg@adacore.com>
1502         * sem_ch5.adb (Analyze_Loop_Parameter_Specification): An
1503         unchecked conversion denotes an iterator specification. Such a
1504         conversion will be inserted in the context of an inlined call
1505         when needed, and its argument is always an object.
1507 2014-08-01  Robert Dewar  <dewar@adacore.com>
1509         * make.adb, makeutl.ads: Minor reformatting.
1510         * debug.adb, opt.ads: Clarify documentation of Front_End_Inlining and
1511         Back_End_Inlining.
1513 2014-08-01  Tristan Gingold  <gingold@adacore.com>
1515         * gnatcmd.adb (GNATCmd): Set AAMP_On_Target using command name.
1517 2014-08-01  Javier Miranda  <miranda@adacore.com>
1519         * gnat1drv.adb (Adjust_Global_Switches): Reverse meaning of
1520         -gnatd.z.
1521         * debug.adb: Updating documentation.
1522         * exp_ch6.adb (Expand_Call): Remove assertion.
1524 2014-08-01  Robert Dewar  <dewar@adacore.com>
1526         * sem_aggr.adb, sem_ch3.adb, sem_ch5.adb, sem_util.adb,
1527         sem_res.adb: Minor reformatting.
1529 2014-08-01  Vincent Celier  <celier@adacore.com>
1531         * make.adb (Initialize): Set Keep_Temporary_Files to True when
1532         -dn is specified.
1533         * makeusg.adb: Add line for new switch --keep-temp-files.
1534         * makeutl.ads (Keep_Temp_Files_Option): New constant String.
1535         * opt.ads (Keep_Temporary_Files): Document that it is also used
1536         by gnatmake and gprbuild.
1537         * switch-m.adb: Recognize new switch --keep-temp-files.
1539 2014-08-01  Tristan Gingold  <gingold@adacore.com>
1541         * sem_ch9.adb (Analyze_Task_Type_Declaration): Move code from ...
1542         * exp_ch9.adb (Make_Task_Create_Call): ... here.
1544 2014-08-01  Vincent Celier  <celier@adacore.com>
1546         * gnat1drv.adb: Do not try to get the target parameters when
1547         invoked with -gnats.
1549 2014-08-01  Hristian Kirtchev  <kirtchev@adacore.com>
1551         * exp_ch7.adb (Find_Last_Init): Nothing to do for an object
1552         declaration subject to No_Initialization.
1554 2014-08-01  Ed Schonberg  <schonberg@adacore.com>
1556         * sem_aggr.adb (Resolve_Array_Aggregate): Reject choice that
1557         is a subtype with dynamic predicates, or a non-static subtype
1558         with predicates.
1559         * sem_ch3.adb (Analyze_Number_Declaration): Reject qualified
1560         expression if subtype has a dynamic predicate.
1561         (Constrain_Index): Reject subtype indication if subtype mark
1562         has predicates.
1563         (Inerit_Predicate_Flags): Inherit Has_Predicates as well.
1564         (Make_Index): If index is a subtype indication, itype inhereits
1565         predicate flags for subsequent testing.
1566         * sem_ch5.adb (Analyze_Loop_Parameter_Specification): New
1567         procedure Check_Predicate_Use, to reject illegal uses of domains
1568         of iteration that have dynamic predicates.
1569         * sem_res.adb (Resolve_Slice): Reject slices given by a subtype
1570         indication to which a predicate applies.
1571         * sem_util.adb (Bad_Predicated_Subtype_Use): Add guard to
1572         prevent cascaded errors when subtype is invalid.
1574 2014-08-01  Robert Dewar  <dewar@adacore.com>
1576         * sem_ch10.adb: Minor reformatting.
1578 2014-08-01  Ed Schonberg  <schonberg@adacore.com>
1580         * sem_ch6.adb (Same_Generic_Actual): Make function symmetric,
1581         because either type may be a subtype of the other.
1583 2014-08-01  Vincent Celier  <celier@adacore.com>
1585         * makeusg.adb: Add documentation for debug switch -dn.
1587 2014-08-01  Ed Schonberg  <schonberg@adacore.com>
1589         * sem_dim.adb (Process_Minus, Process_Divide): Label dimension
1590         expression with standard operator and type, for pretty-printing
1591         use, when in ASIS_Mode. When generating code dimensional analysis
1592         is not involved and dimension expressions are handled statically,
1593         and other operators are resolved in the usual way.
1595 2014-08-01  Ed Schonberg  <schonberg@adacore.com>
1597         * sem_ch3.adb (Build_Derived_Record_Type): Remove setting of
1598         Parent_Subtype in ASIS mode, leads to several failures.
1599         * sem_ch4.adb (Analyze_Selected_Component): In an instance,
1600         if the prefix is a type extension, check whether component is
1601         declared in the parent type, possibly in a parent unit. Needed
1602         in ASIS mode when Parent_Subtype is not set.
1604 2014-08-01  Robert Dewar  <dewar@adacore.com>
1606         * sem_prag.adb: Minor reformatting.
1607         * s-regpat.adb: Minor reformatting.
1608         * sem_ch3.adb (Analyze_Object_Declaration): Do not set
1609         Treat_As_Volatile on constants.
1611 2014-08-01  Tristan Gingold  <gingold@adacore.com>
1613         * exp_ch9.adb (Make_Task_Create_Call): Improve error message.
1615 2014-08-01  Ed Schonberg  <schonberg@adacore.com>
1617         * sem_ch10.adb (Analyze_Compilation_Unit): Do not place a
1618         warning on a with_clause created for the renaming of a parent
1619         unit in an explicit with_clause.
1621 2014-08-01  Ed Schonberg  <schonberg@adacore.com>
1623         * sem_ch13.adb (Analyze_Aspect_Specifications, case Aspect_Import):
1624         Set Is_Imported flag at once, to simplify subsequent legality
1625         checks. Reject the aspect on an object whose declaration has an
1626         explicit initial value.
1627         * sem_prag.adb (Process_Import_Or_Interface): Use original node
1628         to check legality of an initial value for an imported entity.
1629         Set Is_Imported flag in case of error to prevent cascaded errors.
1630         Do not set the Is_Imported flag if the pragma comes from an
1631         aspect, because it is already done when analyzing the aspect.
1633 2014-08-01  Emmanuel Briot  <briot@adacore.com>
1635         * g-regpat.adb (Parse): Add support for non-capturing parenthesis.
1637 2014-08-01  Robert Dewar  <dewar@adacore.com>
1639         * sem_ch7.adb, einfo.adb, einfo.ads, sem_ch13.adb: Minor change of
1640         identifier name.
1642 2014-08-01  Hristian Kirtchev  <kirtchev@adacore.com>
1644         * sem_ch3.adb (Analyze_Object_Contract): Enable the volatility
1645         checks when the related variable comes from source.
1646         * sem_res.adb (Resolve_Actuals): Enable the volatility checks
1647         when the related actual parameter comes from source. Update comment.
1648         * freeze.adb (Freeze_Record_Type): Do not freeze the designated
1649         type of an array of pointers when the designated type is
1650         class-wide and its root type is the record being currently frozen.
1652 2014-08-01  Ed Schonberg  <schonberg@adacore.com>
1654         * sem_ch5.adb (Analyze_Iterator_Specification): Preserve Ekind
1655         of renaming declaration created for domain of iteration.
1656         * sem_aggr.adb (Resolve_Array_Aggregate): Better placement
1657         for error messages on aggregates whose index subtypes have
1658         predicates. The new placement avoids posting messages on previous
1659         subtype declarations rather than on the aggregate itself.
1660         * sem_disp.adb (Is_Inherited_Public_Operation): New predicate for
1661         Add_Dispatching_Operation, to handle properly the overriding of
1662         the predefined operations on controlled types, when the partial
1663         view of a type is not visibly controlled.
1665 2014-08-01  Ben Brosgol  <brosgol@adacore.com>
1667         * gnat_ugn.texi: Add tutorial on portable fixed-point types as an
1668         appendix.
1670 2014-08-01  Hristian Kirtchev  <kirtchev@adacore.com>
1672         * einfo.adb (Is_Hidden_Non_Overridden_Subprogram): Remove the
1673         assertion check as the attribute is defined for all entities.
1674         (Set_Is_Hidden_Non_Overridden_Subprogram): Remove the assertion
1675         check as the attribute is defined for all entities.
1676         * einfo.ads Update the documentation of attribute
1677         Is_Hidden_Non_Overridden_Subprogram.
1678         * sem_ch7.adb (Install_Package_Entity): No need to check the
1679         entity kind of the Id.
1680         * sem_ch13.adb (Hide_Matching_Homograph): Update the comment on
1681         usage. Ensure that the homographs are of the same entity kind
1682         and not fully conformant.
1683         (Hide_Non_Overridden_Subprograms): Update the comment on usage.
1685 2014-08-01  Robert Dewar  <dewar@adacore.com>
1687         * inline.adb: Minor code reorganization.
1688         * sem_ch12.adb, s-tasdeb.ads: Minor reformatting.
1690 2014-08-01  Robert Dewar  <dewar@adacore.com>
1692         * inline.adb, s-os_lib.ads: Minor reformatting.
1694 2014-08-01  Arnaud Charlet  <charlet@adacore.com>
1696         * s-tasdeb.ads, s-tasdeb.adb (Master_Hook, Master_Completed_Hook): New.
1697         * s-tassta.adb (Task_Wrapper, Vulnerable_Complete_Master): Call new
1698         hooks.
1700 2014-08-01  Yannick Moy  <moy@adacore.com>
1702         * inline.adb (Cannot_Inline): Issue info message instead of
1703         warning for subprograms not inlined in GNATprove mode.
1704         * sem_res.adb (Resolve_Call): Take body into account for deciding
1705         whether subprogram can be inlined in GNATprove mode or not.
1707 2014-08-01  Claire Dross  <dross@adacore.com>
1709         * exp_util.ads (Get_First_Parent_With_Ext_Axioms_For_Entity): Renaming
1710         of Get_First_Parent_With_External_Axiomatization_For_Entity for
1711         shorter.
1712         * sem_ch12.adb (Analyze_Associations): Only call Build_Wrapper
1713         for parameters of packages with external axiomatization.
1715 2014-08-01  Robert Dewar  <dewar@adacore.com>
1717         * sem_res.adb: Minor comment addition.
1719 2014-08-01  Arnaud Charlet  <charlet@adacore.com>
1721         * s-crtl.ads, i-cstrea.ads, adaint.c, adaint.h, osint.adb,
1722         s-fileio.adb (__gnat_fopen, __gnat_freopen): Remove vms_form parameter,
1723         no longer used.
1724         * s-os_lib.ads: Minor reformatting.
1726 2014-08-01  Arnaud Charlet  <charlet@adacore.com>
1728         * exp_attr.adb (Is_Inline_Floating_Point_Attribute): Restore more
1729         completely previous code since only GCC back-ends are prepared
1730         to handle e.g. 'Machine attribute.
1731         * targparm.adb, targparm.ads: Remove remaining refs and
1732         handling of OpenVMS_On_Target, VAX_Float_On_Target and
1733         RTX_RTSS_Kernel_Module_On_Target.
1734         * hostparm.ads (OpenVMS, Max_Debug_Name_Length): Removed,
1735         no longer used.
1737 2014-08-01  Robert Dewar  <dewar@adacore.com>
1739         * exp_dist.adb, exp_attr.adb: Minor reformatting.
1740         * sem_ch3.adb, mlib-tgt-specific-hpux.adb, a-direct.ads,
1741         a-synbar-posix.adb, exp_ch9.adb, sem_ch10.adb, sem_prag.adb,
1742         sem_ch12.adb, sem.ads, sem_res.adb, s-exctra.adb, s-soflin.ads,
1743         g-alveop.ads, sem_ch8.adb, vxaddr2line.adb, sem_cat.ads: Remove
1744         improper use of shall.
1746 2014-08-01  Robert Dewar  <dewar@adacore.com>
1748         * sem_aggr.adb, exp_atag.adb, layout.adb, nlists.adb, nlists.ads,
1749         exp_attr.adb, exp_ch9.adb, par-ch12.adb, exp_aggr.adb,
1750         exp_ch3.adb: Minor reformatting & code reorganization.
1752 2014-08-01  Robert Dewar  <dewar@adacore.com>
1754         * gnat_rm.texi: Remove VMS specific rules for pragma Ident.
1755         * Makefile.rtl, adaint.c, gnat_rm.texi, s-asthan.adb, s-asthan.ads,
1756         s-filofl.ads, s-fishfl.ads, s-fvadfl.ads, s-fvaffl.ads, s-fvagfl.ads,
1757         s-po32gl.adb, s-po32gl.ads, s-vaflop.adb, s-vaflop.ads, s-vmexta.adb,
1758         s-vmexta.ads, sem_vfpt.adb, sem_vfpt.ads, socket.c: Remove VMS specific
1759         code.
1760         * gcc-interface/decl.c, gcc-interface/Makefile.in,
1761         gcc-interface/Make-lang.in: Ditto. Also remove refs to rTX.
1763 2014-08-01  Pascal Obry  <obry@adacore.com>
1765         * s-os_lib.ads: Rename File_Size to Large_File_Size.
1767 2014-08-01  Robert Dewar  <dewar@adacore.com>
1769         * a-numaux-vxworks.ads, a-numaux-x86.adb, a-numaux-x86.ads,
1770         a-numaux-darwin.adb, a-numaux-darwin.ads, a-numaux.ads,
1771         a-numaux-libc-x86.ads: Fix bad package header comments.
1772         * elists.ads, elists.adb (Append_New_Elmt): New procedure.
1773         * gnat_rm.texi, a-calend.adb, gnatcmd.adb, einfo.adb, einfo.ads,
1774         checks.adb, sem_prag.adb, sem_prag.ads, rtsfind.ads, freeze.adb,
1775         sem_util.adb, sem_attr.adb, exp_dbug.adb, exp_dbug.ads, gnat1drv.adb,
1776         targparm.adb, targparm.ads, exp_ch6.adb, switch-b.adb, s-shasto.ads,
1777         stand.ads, s-auxdec.ads, opt.adb, opt.ads, mlib-tgt.ads, s-fatgen.adb,
1778         s-fatgen.ads, system.ads, snames.ads-tmpl, s-stalib.ads,
1779         s-os_lib.adb: Remove VMS-specific code.
1781 2014-08-01  Arnaud Charlet  <charlet@adacore.com>
1783         * exp_attr.adb (Is_Inline_Floating_Point_Attribute): Revert to
1784         previous state in CodePeer_Mode.
1786 2014-08-01  Robert Dewar  <dewar@adacore.com>
1788         * hostparm.ads: Put back definition of OpenVMS as False to aid
1789         the transition process.
1790         * sem_ch7.adb: Minor reformatting.
1791         * prj-env.adb: Minor code fix.
1792         * gnat_rm.texi: Complete previous change.
1793         * sem_ch3.adb: Minor reformatting.
1794         * sem_ch6.adb: Minor reformatting.
1795         * sem_elab.adb: Minor reformatting.
1796         * exp_strm.adb: Complete previous change.
1798 2014-08-01  Vincent Celier  <celier@adacore.com>
1800         * sem_warn.adb (Warn_On_Unreferenced_Entity): Do not issue a
1801         warning when a constant is unreferenced and its type has pragma
1802         Unreferenced_Objects.
1804 2014-08-01  Hristian Kirtchev  <kirtchev@adacore.com>
1806         * einfo.adb: Flag2 is now known as
1807         Is_Hidden_Non_Overridden_Subprogram.
1808         (Is_Hidden_Non_Overridden_Subprogram): New routine.
1809         (Set_Is_Hidden_Non_Overridden_Subprogram): New routine.
1810         (Write_Entity_Fields): Output Flag2.
1811         * einfo.ads: New attribute Is_Hidden_Non_Overridden_Subprogram
1812         along with occurrences in entities.
1813         (Is_Hidden_Non_Overridden_Subprogram): New routine and pragma Inline.
1814         (Set_Is_Hidden_Non_Overridden_Subprogram): New routine
1815         and pragma Inline.
1816         * sem_ch7.adb (Install_Package_Entity): Do not enter implicitly
1817         declared non-overriden homographs into visibility.
1818         * sem_ch13.adb (Freeze_Entity_Checks): Hide all
1819         implicitly declared non-overriden homographs.
1820         (Hide_Non_Overridden_Subprograms): New routine.
1822 2014-08-01  Robert Dewar  <dewar@adacore.com>
1824         * snames.ads-tmpl, s-os_lib.adb, s-os_lib.ads, s-fileio.adb: Remove
1825         VMS-specific code.
1826         * prj-conf.adb: Minor reformatting.
1827         * xr_tabls.adb (Read_File): Restore code which was enabled on
1828         non VMS platforms before.
1829         * prj-env.adb (Initialize_Default_Project_Path): Ditto.
1830         * sem_ch5.adb: Minor reformatting.
1831         * lib-writ.adb, lib-writ.ads, bindgen.adb, sem_vfpt.adb,
1832         sem_vfpt.ads, ali.adb, ali.ads, opt.ads, bcheck.adb, exp_strm.adb:
1833         Remove VMS-specific code.
1835 2014-08-01  Vincent Celier  <celier@adacore.com>
1837         * make.adb (Await_Compile): Remove loop that was only needed
1838         for VMS.
1840 2014-08-01  Robert Dewar  <dewar@adacore.com>
1842         * a-calcon.ads, a-direct.adb, a-dirval-mingw.adb, a-dirval.adb,
1843         a-dirval.ads, a-except-2005.adb, a-excpol-abort.adb,
1844         a-numaux-darwin.ads, a-numaux.ads, bindgen.adb, bindusg.adb,
1845         einfo.adb, einfo.ads, err_vars.ads, errout.ads, errutil.adb,
1846         exp_ch3.adb, exp_ch4.adb, exp_ch7.adb, exp_ch7.ads, fname-uf.adb,
1847         fname.adb, fname.ads, freeze.adb, g-debpoo.adb, g-dirope.ads,
1848         g-excact.ads, g-expect.ads, g-socket.adb, g-socket.ads, g-sothco.ads,
1849         g-traceb.ads, gnat_rm.texi, gnatlink.adb, gnatls.adb, i-cstrea.adb,
1850         krunch.adb, krunch.ads, layout.adb, lib-util.adb, make.adb,
1851         mlib.adb, osint-b.adb, osint-b.ads, osint-c.adb, osint.adb,
1852         osint.ads, output.ads, par.adb, prj-conf.adb, prj-env.adb,
1853         prj-makr.adb, prj-nmsc.adb, prj.adb, prj.ads, repinfo.adb, rtsfind.adb,
1854         rtsfind.ads, s-excmac-gcc.ads, s-fatgen.adb, s-mastop.ads,
1855         s-parame-ae653.ads, s-parame-hpux.ads, s-parame-vxworks.ads,
1856         s-parame.ads, s-soflin.ads, s-stoele.adb, s-tasini.adb,
1857         s-taspri-dummy.ads, s-taspri-hpux-dce.ads, s-taspri-mingw.ads,
1858         s-taspri-posix-noaltstack.ads, s-taspri-posix.ads,
1859         s-taspri-solaris.ads, s-taspri-vxworks.ads, s-trasym.ads,
1860         sem_ch12.adb, sem_ch4.adb, sem_eval.adb, sem_intr.adb, sem_mech.adb,
1861         sem_mech.ads, sem_prag.adb, sem_res.adb, sem_util.adb, sem_util.ads,
1862         sinfo.adb, sinfo.ads, sinput-c.adb, symbols.ads, targparm.adb,
1863         treepr.adb, types.ads, xr_tabls.adb, xr_tabls.ads: Remove VMS
1864         specific code and comments.
1866 2014-08-01  Ed Schonberg  <schonberg@adacore.com>
1868         * sem_ch5.adb (Analyze_Iterator_Specification): New procedure
1869         Check_Reverse_Iteration, to verify the legality of the Reverse
1870         indicator on various container types, and to detect illegal
1871         reverse iterations on containers that only supoort forward
1872         iteration.
1874 2014-08-01  Vincent Celier  <celier@adacore.com>
1876         * gnatcmd.adb: Remove the VMS specific stuff.  Integrate in
1877         procedure GNATCmd the relevant declarations from packages VMS_Cmds
1878         and VMS_Conv.
1879         * gnatcmd.ads: Update comments to remove any trace of VMS
1881 2014-08-01  Ed Schonberg  <schonberg@adacore.com>
1883         * sem_ch12.adb: sem_ch12.adb (Build_Wrapper): Capture entity for
1884         defaulted actual that is an operator, before building wrapper
1885         for it in GNATprove mode. Restrict construction of wrapper to
1886         actuals that are operators.
1888 2014-08-01  Vincent Celier  <celier@adacore.com>
1890         * vms_conv.adb, vms_conv.ads, vms_data.ads, vms_cmds.ads: Remove VMS
1891         specific packages no longer needed.
1893 2014-08-01  Pascal Obry  <obry@adacore.com>
1895         * s-os_lib.ads (System.CRTL): Move with clause to body.
1896         (File_Size): New type.
1897         (File_Length64): Use it.
1898         (File_Length): Restore previous spec returning a Long_Integer.
1899         * s-os_lib.adb (System.CRTL): Move with clause here.
1901 2014-08-01  Vincent Celier  <celier@adacore.com>
1903         * mlib-prj.adb: Update comments to remove any mention of VMS.
1905 2014-08-01  Arnaud Charlet  <charlet@adacore.com>
1907         * ug_words, xgnatugn.adb, gcc-interface/Make-lang.in: Remove
1908         xgnatugn.adb and ug_words.
1910 2014-08-01  Eric Botcazou  <ebotcazou@adacore.com>
1912         * exp_attr.adb (Expand_N_Attribute_Reference): Check whether
1913         expansion can be avoid for Machine, Model and Rounding.
1914         (Is_Inline_Floating_Point_Attribute): Return true for Machine
1915         & Model, as well as Rounding if wrapped in a conversion to an
1916         integer type.
1917         * sem_res.adb (Simplify_Type_Conversion): Deal with Rounding as well.
1918         * gcc-interface/gigi.h (fp_arith_may_widen): Declare.
1919         * gcc-interface/utils.c (fp_arith_may_widen): New global variable.
1920         * gcc-interface/misc.c (enumerate_modes): Compute it.
1921         * gcc-interface/trans.c (FP_ARITH_MAY_WIDEN): Delete.
1922         (lvalue_required_for_attribute_p): Deal with Descriptor_Size,
1923         Machine and Model.
1924         (Attribute_to_gnu) <Attr_Model>: New case.
1925         <Attr_Machine>): Likewise.
1926         (convert_with_check): Test
1927         fp_arith_may_widen variable.
1929 2014-08-01  Pascal Obry  <obry@adacore.com>
1931         * adaint.h (GNAT_FOPEN): New definition for Windows.
1932         (GNAT_OPEN): Likewise.
1933         (GNAT_STAT): Likewise.
1934         (GNAT_FSTAT): Likewise.
1935         (GNAT_LSTAT): Likewise.
1936         (GNAT_STRUCT_STAT): Likewise.
1937         * adaint.c (__gnat_stat): Fix computation of file size for
1938         Windows.
1940 2014-08-01  Vincent Celier  <celier@adacore.com>
1942         * Makefile.rtl: Minor comment update.
1944 2014-08-01  Vincent Celier  <celier@adacore.com>
1946         * Make-generated.in: Remove dependencies for vms-help.
1948 2014-08-01  Gary Dismukes  <dismukes@adacore.com>
1950         * makeutl.ads, opt.ads: Minor grammar fixes.
1951         * makeutl.adb: Minor code reorganization.
1953 2014-08-01  Arnaud Charlet  <charlet@adacore.com>
1955         * gcc-interface/Makefile.in, gcc-interface/Make-lang.in,
1956         gnatsym.adb: Remove gnatsym (VMS only tool).
1958 2014-08-01  Ben Brosgol  <brosgol@adacore.com>
1960         * gnat_ugn.texi, projects.texi, xgnatugn.adb: Removed all VMS
1961         conditionalization from gnat_ugn.texi and projects.texi, and updated
1962         (considerably simplified) xgnatugn.adb, to be removed soon.
1964 2014-08-01  Vincent Celier  <celier@adacore.com>
1966         * debug.adb: Remove doc for gnatmake/gprbuild switch -ds.
1967         * make.adb (List_Bad_Compilations): Use Opt.No_Exit_Message
1968         instead of Debug.Debug_Flag_S.
1969         * makeutl.adb (Finish_Program, Fail_Program): Use Opt flag
1970         No_Exit_Message instead of Debug.Debug_Flag_S to suppress exit
1971         error messages.
1972         * makeutl.ads (No_Exit_Message_Option): New constant string
1973         for switch --no-exit-message.
1974         * opt.ads (No_Exit_Message): New Boolean flag, defaulted to False.
1975         * switch-m.adb (Scan_Make_Switches): Recognize new switch
1976         --no-exit-message.
1978 2014-08-01  Arnaud Charlet  <charlet@adacore.com>
1980         * exp_vfpt.adb, exp_vfpt.ads: Removed, no longer used.
1981         * gcc-interface/Make-lang.in: Remove exp_vfpt.o
1983 2014-08-01  Javier Miranda  <miranda@adacore.com>
1985         * inline.ads (Inlined_Calls, Backend_Calls,
1986         Backend_Inlined_Subps, Backend_Not_Inlined_Subps): Declarations
1987         moved to inline.adb (Cannot_Inline): Update documentation.
1988         (Check_And_Build_Body_To_Inline): Renamed.
1989         (List_Inlining_Info): Subprogram moved here from package exp_ch6.
1990         * inline.adb (Check_Inlining_Restrictions): New local variable.
1991         (Inlined_Calls, Backend_Calls, Backend_Inlined_Subps,
1992         Backend_Not_Inlined_Subps): Declarations moved here
1993         from inline.ads (Number_Of_Statements): Removed.
1994         (Remove_Pragmas): Avoid duplicated version of this subprogram.
1995         (Build_Body_To_Inline): Code cleanup.
1996         (Build_Body_To_Inline.Has_Excluded_Statament): Removed.
1997         (Check_And_Build_Body_To_Inline): Renamed. Code cleanup.
1998         (Check_Body_To_Inline): Removed.
1999         (Generate_Body_To_Inline): Renamed as Generate_Subprogram_Body.
2000         (Has_Excluded_Declaration): No action if not
2001         Check_Inlining_Restrictions.
2002         (Has_Excluded_Statement): No action if not Check_Inlining_Restrictions.
2003         (Initialize): Initialize the lists of inlined calls and subprograms.
2004         (List_Inlining_Info): Subprogram moved here from package exp_ch6.
2005         * sem_ch6.adb (Analyze_Subprogram_Body_Helper): Update call
2006         to Check_And_Build_Body_To_Inline since it has been renamed as
2007         Check_And_Split_Unconstrained_Function
2008         * exp_ch6.ad[sb] (List_Inlining_Info): Subprogram moved to
2009         package inline.
2010         * gnat1drv.adb Update call to Inline.List_Inlining_Info.
2012 2014-08-01  Vincent Celier  <celier@adacore.com>
2014         * debug.adb: Add documentation for new debug switch -ds.
2015         * make.adb (List_Bad_Compilations): Do not issue any message
2016         when switch -ds is specified.
2017         * makeutl.adb (Fail_Program): Do not issue any message when
2018         -ds is specified.
2019         (Finish_Program): Ditto.
2021 2014-08-01  Robert Dewar  <dewar@adacore.com>
2023         * s-exnint.adb, s-exnint.ads, s-wwdwch.ads, s-carsi8.ads,
2024         s-casi32.ads, indepsw.adb, a-timoau.ads, s-explli.adb, s-explli.ads,
2025         s-casi16.ads, s-powtab.ads, g-wistsp.ads, a-ztmoau.adb,
2026         indepsw-gnu.adb, s-imgllb.ads, types.adb, gnat.ads, s-proinf.adb,
2027         indepsw-aix.adb, s-caun64.ads, s-imgllw.ads, s-traces-default.adb,
2028         s-vxwork-x86.ads, s-expllu.adb, s-exnlli.adb, s-exnlli.ads,
2029         s-traces.adb, widechar.ads, stand.adb, s-expint.adb,
2030         s-tratas-default.adb, s-expint.ads, s-geveop.ads, s-caun32.ads,
2031         s-expuns.adb, s-mantis.adb, s-mantis.ads, s-caun16.ads, s-tasinf.adb,
2032         s-memcop.ads, s-dsaser.ads, s-imgbiu.ads, a-szmzco.ads, g-strspl.ads,
2033         s-casi64.ads, g-zstspl.ads, indepsw-mingw.adb, tree_io.adb,
2034         s-boarop.ads, uname.ads, s-fore.adb, s-fore.ads, g-timsta.adb,
2035         g-timsta.ads, s-assert.adb, s-vector.ads, s-tratas.adb,
2036         s-tratas.ads: Minor fix to copyright notices.
2038 2014-08-01  Eric Botcazou  <ebotcazou@adacore.com>
2040         * sinfo.ads: Remove long obsolete comment.
2041 2014-08-01  Ed Schonberg  <schonberg@adacore.com>
2043         * sem_util.adb: Add guard to setting of No_Predicate_On_Actual.
2044         * sem_ch3.adb: Minor reformatting.
2046 2014-08-01  Pascal Obry  <obry@adacore.com>
2048         * cstreams.c: Only enable large file support on know supported
2049         platforms. Add missing defines/includes.
2051 2014-08-01  Ed Schonberg  <schonberg@adacore.com>
2053         * einfo.ads, einfo.adb New flags No_Predicate_On_Actual and
2054         No_Dynamic_Predicate_On_Actual, to enforce the generic contract
2055         on generic units that contain constructs that forbid subtypes
2056         with predicates.
2057         * sem_ch3.adb (Analyze_Subtype_Declaration, Process_Subtype):
2058         Inherit flags indicating the presence of predicates in subtype
2059         declarations with and without constraints.
2060         (Inherit_Predicate_Flags): Utility for the above.
2061         * sem_util.adb (Bad_Predicated_Subtype_Use): In a generic context,
2062         indicate that the actual cannot have predicates, and preserve
2063         warning. In an instance, report error if actual has predicates
2064         and the construct appears in a package declaration.
2065         * sem_ch12.adb (Diagnose_Predicated_Actual): Report error
2066         for an actual with predicates, if the corresponding formal
2067         carries No_Predicate_On_Actual or (in the case of a loop)
2068         No_Dynamic_Predicate_On_Actual.
2069         * sem_ch13.adb (Build_Predicate_Functions); Do not build a
2070         Static_Predicate function if the type is non-static (in the
2071         presence of previous errors),
2072         * sem_ch5.adb (Analyze_Loop_Parameter_Specification): Set flag
2073         No_Dynamic_Predicate_On_Actual in a generic context, to enforce
2074         generic contract on actuals that cannot have predicates.
2076 2014-08-01  Pascal Obry  <obry@adacore.com>
2078         * a-direct.adb (C_Size): Returns an int64.
2079         * osint.adb (System.CRTL): New with clause.
2080         (File_Length.Internal): Returns an int64.
2081         * s-os_lib.ads (File_Length): Returns an int64.
2083 2014-08-01  Robert Dewar  <dewar@adacore.com>
2085         * gnatchop.adb, gnatcmd.adb, make.adb, mlib-prj.adb, bindgen.adb,
2086         mlib.ads, butil.adb, clean.adb, binde.adb, gnatls.adb, gnatname.adb,
2087         osint.adb, krunch.adb: Minor reformatting.
2089 2014-08-01  Robert Dewar  <dewar@adacore.com>
2091         * inline.adb, inline.ads, fe.h, einfo.adb, einfo.ads, sem_util.adb,
2092         sem_util.ads, exp_ch4.adb, exp_ch11.adb, exp_ch6.adb, cstand.adb,
2093         sem_mech.adb, sem_ch6.adb, sem_ch8.adb, sem_ch11.adb, snames.ads-tmpl:
2094         Remove VMS-specific code.
2095         * gcc-interface/decl.c, gcc-interface/trans.c: Ditto.
2097 2014-08-01  Arnaud Charlet  <charlet@adacore.com>
2099         * binde.adb, bindgen.adb, butil.adb, clean.adb, gnatbind.adb,
2100         gnatchop.adb, gnatcmd.adb, gnatls.adb, gnatname.adb, krunch.adb,
2101         make.adb, makeutl.adb, memtrack.adb, mlib-prj.adb, mlib.adb,
2102         mlib.ads, tempdir.adb: Remove VMS handling.
2104 2014-08-01  Pascal Obry  <obry@adacore.com>
2106         * adaint.h, adaint.c (__gnat_file_length): Returns an __int64.
2107         (__gnat_named_file_length): Likewise.
2108         (__gnat_file_length_attr): Likewise.
2109         * a-direct.adb (C_Size): Use size_t as returned type.
2110         * osint.adb (File_Length): Adjust spec for Internal routine
2111         (returns size_t).
2112         * s-os_lib.adb (File_Length): Now returns a CRTL.size_t.
2113         (System.CRTL): With claused moved to spec.
2114         * s-os_lib.ads (System.CRTL): With clause moved to here.
2116 2014-08-01  Pascal Obry  <obry@adacore.com>
2118         * adaint.h, adaint.c (__gnat_open): Added.
2119         * s-crtl.ads (open): Import __gnat_open for large file support.
2121 2014-08-01  Robert Dewar  <dewar@adacore.com>
2123         * sem_case.adb (Dup_Choice): Improve message for integer constants.
2125 2014-08-01  Arnaud Charlet  <charlet@adacore.com>
2127         * gnatlink.adb: Remove special handling of VMS, RTX and JVM.
2129 2014-08-01  Pascal Obry  <obry@adacore.com>
2131         * adaint.h (GNAT_OPEN): Defines as open64 where supported.
2132         * adaint.c (GNAT_OPEN): Uses new macro where needed.
2134 2014-07-31  Eric Botcazou  <ebotcazou@adacore.com>
2136         * gcc-interface/utils.c (lookup_and_insert_pad_type): New function
2137         extracted from...
2138         (maybe_pad_type): ...here.  Call it to canonicalize the pad type.
2139         * gcc-interface/gigi.h: Update comment.
2141 2014-07-31  Javier Miranda  <miranda@adacore.com>
2143         * debug.adb Remove documentation of -gnatd.k (no longer needed).
2144         * sem_ch6.adb (Analyze_Subprogram_Body_Helper): Code cleanup.
2145         * inline.ads (Backend_Inlined_Subps): New
2146         Elist.  (Backend_Not_Inlined_Subps): New Elist.
2147         (Has_Excluded_Declaration): Declaration previously located in
2148         * inline.adb (Has_Excluded_Statement): Declaration previously
2149         located in inline.adb
2150         * inline.adb (Has_Single_Return): Moved out of
2151         Build_Body_To_Inline to avoid having duplicated code.
2152         (Number_Of_Statements): New subprogram.
2153         (Register_Backend_Inlined_Subprogram): New subprogram.
2154         (Register_Backend_Not_Inlined_Subprogram): New subprogram.
2155         (Add_Inlined_Subprogram): Register backend inlined subprograms and
2156         also register subprograms that cannot be inlined by the backend.
2157         (Has_Excluded_Declaration): Moved out of Build_Body_To_Inline
2158         to avoid having duplicated code.  Replace occurrences of
2159         Debug_Flag_Dot_K by Back_End_Inlining.
2160         * sem_res.adb (Resolve_Call): Code cleanup.
2161         * exp_ch6.adb (Expand_Call): Complete previous patch. Replace
2162         occurrence of Debug_Flag_Dot_K by Back_End_Inlining.
2163         (List_Inlining_Info): Add listing of subprograms passed to the
2164         backend and listing of subprograms that cannot be inlined by
2165         the backend.
2166         * sem_ch12.adb, sem_ch3.adb Replace occurrences of
2167         Debug_Flag_Dot_K by Back_End_Inlining.
2169 2014-07-31  Robert Dewar  <dewar@adacore.com>
2171         * nlists.ads: Minor code fix (remove unwise Inline for
2172         List_Length).
2174 2014-07-31  Arnaud Charlet  <charlet@adacore.com>
2176         * einfo.adb: Remove VMS specific code.
2177         * exp_attr.adb: Remove VAX specific code.
2178         * set_targ.adb: Remove handling of VAX_Float.
2179         * sem_vfpt.adb: Remove references to Vax_Native.
2180         * sem_attr.adb (Is_VAX_Float): Remove ref to VAX_Native.
2182 2014-07-31  Robert Dewar  <dewar@adacore.com>
2184         * sem_ch4.adb: Minor reformatting.
2186 2014-07-31  Arnaud Charlet  <charlet@adacore.com>
2188         * gcc-interface/trans.c, gcc-interface/misc.c: Remove references
2189         to VMS. Misc clean ups.
2190         * gcc-interface/Makefile.in (gnatlib-shared-vms): Remove.
2192 2014-07-31  Robert Dewar  <dewar@adacore.com>
2194         * cstand.adb, einfo.adb, einfo.ads, errout.adb, exp_attr.adb,
2195         exp_prag.adb, frontend.adb, interfac.ads,
2196         par-prag.adb, s-auxdec.ads, s-filofl.ads, s-fishfl.ads, s-fvadfl.ads,
2197         s-fvaffl.ads, s-fvagfl.ads, s-vaflop.ads, sem_attr.adb, sem_attr.ads,
2198         sem_ch13.adb, sem_ch3.adb, sem_ch8.adb, sem_prag.adb, snames.adb-tmpl,
2199         snames.ads-tmpl: Remove obsolete VMS-specific code.
2201 2014-07-31  Robert Dewar  <dewar@adacore.com>
2203         * sem_ch3.adb, sem_ch13.adb: Minor reformatting.
2205 2014-07-31  Arnaud Charlet  <charlet@adacore.com>
2207         * a-intnam-linux.ads: Minor: update obsolete comments.
2208         * s-taasde.adb: Minor: fix comment header.
2210 2014-07-31  Arnaud Charlet  <charlet@adacore.com>
2212         * s-auxdec-vms-ia64.adb, s-parame-vms-alpha.ads, s-asthan-vms-alpha.adb,
2213         s-tpopde-vms.adb, s-mastop-vms.adb, s-tpopde-vms.ads, s-taprop-vms.adb,
2214         mlib-tgt-vms_common.adb, mlib-tgt-vms_common.ads, s-inmaop-vms.adb,
2215         g-enblsp-vms-alpha.adb, s-ransee-vms.adb, s-osprim-vms.adb,
2216         s-osprim-vms.ads, g-socthi-vms.adb, g-socthi-vms.ads, system-vms_64.ads,
2217         s-osinte-vms.adb, s-osinte-vms.ads, g-eacodu-vms.adb,
2218         s-vaflop-vms-alpha.adb, s-parame-vms-ia64.ads, a-dirval-vms.adb,
2219         a-caldel-vms.adb, mlib-tgt-specific-vms-alpha.adb, s-tasdeb-vms.adb,
2220         symbols-vms.adb, a-intnam-vms.ads, g-expect-vms.adb,
2221         symbols-processing-vms-alpha.adb, mlib-tgt-specific-vms-ia64.adb,
2222         s-traent-vms.adb, s-traent-vms.ads, i-cstrea-vms.adb, a-numaux-vms.ads,
2223         symbols-processing-vms-ia64.adb, s-interr-vms.adb, s-memory-vms_64.adb,
2224         s-memory-vms_64.ads, g-enblsp-vms-ia64.adb, s-taspri-vms.ads,
2225         s-auxdec-vms_64.ads, s-intman-vms.adb, s-intman-vms.ads,
2226         s-tpopsp-vms.adb, s-asthan-vms-ia64.adb, a-calend-vms.adb,
2227         a-calend-vms.ads, system-vms-ia64.ads, s-auxdec-vms-alpha.adb: Removed.
2228         * namet.h (Is_Non_Ada_Error): Remove.
2230 2014-07-31  Robert Dewar  <dewar@adacore.com>
2232         * exp_util.adb, lib-writ.adb, sem_ch12.adb, s-direio.adb: Minor
2233         reformatting.
2235 2014-07-31  Hristian Kirtchev  <kirtchev@adacore.com>
2237         * exp_attr.adb (Expand_Loop_Entry_Attribute): Update the comment
2238         which demonstrates the expansion of while loops subject to
2239         attribute 'Loop_Entry. The condition of a while loop along with
2240         related condition actions is now wrapped in a function.  Instead
2241         of repeating the condition, the expansion now calls the function.
2243 2014-07-31  Ed Schonberg  <schonberg@adacore.com>
2245         * sem_case.adb (Check_Against_Predicate): Correct off-by-one
2246         error when reporting of missing values in a case statement for
2247         a type with a static predicate.
2248         (Check_Choices): Reject a choice given by a subtype to which a
2249         Dynamic_Predicate applies.
2250         * sem_ch3.adb (Analyze_Subtype_Declaration): Inherit
2251         Has_Dynamic_Predicate_Aspect flag from parent.
2253 2014-07-31  Ed Schonberg  <schonberg@adacore.com>
2255         * sem_ch13.adb (Analyze_Aspect_Specifications): A predicate
2256         cannot apply to a subtype of an incomplete type.
2257         (Is_Static_Choice): Treat an Others_Clause as static. The
2258         staticness of the expression and of the range are checked
2259         elsewhere.
2261 2014-07-31  Pascal Obry  <obry@adacore.com>
2263         * adaint.h (__gnat_ftell64): Added.
2264         (__gnat_fseek64): Added.
2265         (__int64): Added.
2266         * cstreams.c (__int64): Removed.
2268 2014-07-31  Pascal Obry  <obry@adacore.com>
2270         * a-stream.ads (Stream_Element_Offset): Now a signed 64bit type.
2271         * i-cstrea.ads, s-crtl.ads (fseek64): Offset is always a 64bit value.
2272         (ftell64): Always returns a 64bit value.
2273         * cstreams.c (int64): New definition.
2274         (_FILE_OFFSET_BITS): Set to 64 to enable 64bit offset support.
2275         (__gnat_ftell64): Always returns a 64bit value. The implemenation now
2276         uses ftello() on UNIX.
2277         (__gnat_fseek64): Offset is always a 64bit value. The
2278         implementation now uses fseeko() on UNIX.
2279         * a-ststio.adb, s-direio.adb (Set_Position): Simplify code,
2280         always use fseek64 to set the offset.
2281         (Size): Simplify code, always use fseek64/ftell64.
2282         * s-direio.ads (Count): Now an int64.
2283         * g-socket.ads (Vector_Element): Adjust definition for Length
2284         to be a size_t. This matches the C definition and avoid using
2285         a 64bit integer on 32bit platforms now that Count is always 64bit.
2286         * g-socthi-mingw.adb (Ada.Streams): Removed as not used anymore.
2287         (C_Recvmsg): Change some conversion to account for change in
2288         Vector_Element.
2289         (C_Sendmsg): Likewise.
2291 2014-07-31  Robert Dewar  <dewar@adacore.com>
2293         * cstand.adb (Create_Standard): Remove handling of -gnatdm flag.
2294         * debug.adb: Remove documentation of -gnatdm flag.
2295         * gnat1drv.adb (Adjust_Global_Switches): Remove handling of
2296         -gnatdm flag.
2298 2014-07-31  Arnaud Charlet  <charlet@adacore.com>
2300         * lib-writ.adb (Write_Unit_Information): Fix case where U =
2301         No_Unit.
2303 2014-07-31  Claire Dross  <dross@adacore.com>
2305         * exp_util.adb, exp_util.ads
2306         (Get_First_Parent_With_External_Axiomatization_For_Entity):
2307         New routine to find the first parent of an entity with
2308         a pragma Annotate (GNATprove, External_Axiomatization).
2309         (Has_Annotate_Pragma_For_External_Axiomatization): New function
2310         to check if a package has a pragma Annotate (GNATprove,
2311         External_Axiomatization).
2312         * einfo.ads, einfo.adb (Is_Generic_Actual_Subprogram): New
2313         flag on the entity for the declaration created for a formal
2314         subprogram in an instance. This is a renaming declaration,
2315         or in GNATprove_Mode the declaration of an expression function
2316         that captures the axiomatization of the actual.
2317         * sem_ch6.adb (Analyze_Expression_Function): For a
2318         Generic_Actual_Subprogram, place body immediately after the
2319         declaration because it may be used in a subsequent declaration
2320         in the instance.
2321         * sem_ch12.adb (Build_Wrapper): Add code to handle instances where
2322         the actual is a function, not an operator. Handle functions with
2323         one and two parameters and binary and unary operators.
2325 2014-07-31  Pascal Obry  <obry@adacore.com>
2327         * cstreams.c (__gnat_is_regular_file_fd): Removed.
2328         * adaint.c (__gnat_is_regular_file_fd): Added.
2330 2014-07-31  Robert Dewar  <dewar@adacore.com>
2332         * exp_strm.adb: Minor reformatting.
2334 2014-07-31  Ed Schonberg  <schonberg@adacore.com>
2336         * sem_ch12.adb (Build_Wrapper): New procedure, subsidiary to
2337         Analyze_Associations, to create a wrapper around operators that
2338         are actuals to formal subprograms. This is done in GNATProve
2339         mode in order to propagate the contracts of the operators to
2340         the body of the instance.
2342 2014-07-31  Ed Schonberg  <schonberg@adacore.com>
2344         * sem_attr.adb (Analyze_Attribute, case 'Old):  The reference is
2345         legal if within an aspect specification for a generic subprogram.
2347 2014-07-31  Javier Miranda  <miranda@adacore.com>
2349         * gnat1drv.adb (Back_End_Inlining): Set to false if
2350         Suppress_All_Inlining is set.
2351         * debug.adb: Adding documentation for -gnatd.z.
2352         * inline.adb (Add_Inlined_Body): Extend the -gnatn2
2353         processing to -gnatn1 for calls to Inline_Always routines.
2354         (Add_Inlined_Subprogram): Remove previous patch.
2356 2014-07-31  Ed Schonberg  <schonberg@adacore.com>
2358         * sem_ch13.adb (Check_One_Function): Apply properly the static
2359         semantic rules for indexing aspects and the functions they denote.
2361 2014-07-31  Javier Miranda  <miranda@adacore.com>
2363         * debug.adb: Complete documentation of -gnatd.z.
2365 2014-07-31  Bob Duff  <duff@adacore.com>
2367         * gnat_ugn.texi: Minor doc fixes.
2369 2014-07-31  Robert Dewar  <dewar@adacore.com>
2371         * sem_aggr.adb (Resolve_Array_Aggregate): Fix posting of missing
2372         index value.
2374 2014-07-31  Tristan Gingold  <gingold@adacore.com>
2376         * s-unstyp.ads (Packed_Byte): Make this type universal aliasing.
2377         (Packed_Bytes1): Make component aliased.
2379 2014-07-31  Robert Dewar  <dewar@adacore.com>
2381         * s-unstyp.ads, s-fileio.adb: Minor reformatting.
2383 2014-07-31  Robert Dewar  <dewar@adacore.com>
2385         * inline.adb, gnat1drv.adb, exp_ch6.adb, s-fileio.adb: Minor
2386         reformatting.
2388 2014-07-31  Eric Botcazou  <ebotcazou@adacore.com>
2390         * gcc-interface/utils2.c ((build_binary_op): Don't set TREE_THIS_NOTRAP
2391         on array references here, now done more selectively in trans.c.
2393 2014-07-31  Doug Rupp  <rupp@adacore.com>
2395         * gcc-interface/misc.c (gnat_init_gcc_fp(): Set flag_errno_math to 0.
2397 2014-07-31  Hristian Kirtchev  <kirtchev@adacore.com>
2399         * sem_util.adb (Is_Effectively_Volatile): New routine.
2401 2014-07-31  Fedor Rybin  <frybin@adacore.com>
2403         * gnat_ugn.texi: Document --test-duration option for gnattest.
2405 2014-07-31  Javier Miranda  <miranda@adacore.com>
2406             Eric Botcazou  <ebotcazou@adacore.com>
2408         * opt.ads (Back_End_Inlining): New variable which controls
2409         activation of inlining by back-end expansion.
2410         * gnat1drv.adb (Adjust_Global_Switches): Initialize Back_End_Inlining
2411         * sem_ch6.adb (Analyze_Subprogram_Body_Helper): Do not build
2412         the body to be inlined by the frontend if Back_End_Inlining
2413         is enabled.
2414         * exp_ch6.adb (Register_Backend_Call): Moved to inline.adb.
2415         (Expand_Call): If backend inlining is enabled let the backend to
2416         handle inlined subprograms.
2417         * inline.ads (Register_Backend_Call): Moved here from exp_ch6
2418         * inline.adb (Register_Backend_Call): Moved here from exp_ch6.
2419         (Add_Inlined_Subprogram): Add subprograms when Back_End_Inlining is set.
2420         (Must_Inline): Do not return Inline_Call if Back_End_Inlining is
2421         enabled.
2422         * debug.adb Document -gnatd.z
2423         * fe.h Import Back_End_Inlining variable.
2424         * gcc-interface/utils.c (create_subprog_decl): If Back_End_Inlining is
2425         enabled then declare attribute "always inline"
2426         * gcc-interface/decl.c, gcc-interface/trans.c,
2427         gcc-interface/gigi.h: Add handling of Inline_Always pragma.
2429 2014-07-31  Robert Dewar  <dewar@adacore.com>
2431         * a-ngelfu.ads: Minor comment fix.
2433 2014-07-31  Hristian Kirtchev  <kirtchev@adacore.com>
2435         * freeze.adb (Freeze_Record_Type): Replace all calls to
2436         Is_SPARK_Volatile with Is_Effectively_Volatile and update
2437         related comments.
2438         * sem_ch3.adb (Analyze_Object_Contract, Process_Discriminants):
2439         Replace all calls to Is_SPARK_Volatile with
2440         Is_Effectively_Volatile and update related comments.
2441         * sem_ch5.adb (Analyze_Iterator_Specification,
2442         Analyze_Loop_Parameter_Specification): Replace all calls to
2443         Is_SPARK_Volatile with Is_Effectively_Volatile and update
2444         related comments.
2445         * sem_ch6.adb (Process_Formals): Replace all calls to
2446         Is_SPARK_Volatile with Is_Effectively_Volatile and update
2447         related comments.
2448         * sem_ch12.adb (Instantiate_Object): Replace the call to
2449         Is_SPARK_Volatile_Object with Is_Effectively_Volatile_Object
2450         and update related comment.
2451         * sem_prag.adb (Analyze_External_Property_In_Decl_Part,
2452         Analyze_Global_Item): Replace all calls to Is_SPARK_Volatile
2453         with Is_Effectively_Volatile and update related comments.
2454         * sem_res.adb (Resolve_Actuals, Resolve_Entity_Name): Replace
2455         all calls to Is_SPARK_Volatile with Is_Effectively_Volatile and
2456         update related comments.
2457         * sem_util.adb (Has_Enabled_Property,
2458         Variable_Has_Enabled_Property): Replace all calls
2459         to Is_SPARK_Volatile with Is_Effectively_Volatile and
2460         update related comments.
2461         (Is_Effectively_Volatile): New routine.
2462         (Is_Effectively_Volatile_Object): New routine.
2463         (Is_SPARK_Volatile): Removed.
2464         (Is_SPARK_Volatile_Object): Removed.
2465         * sem_util.ads (Is_Effectively_Volatile): New routine.
2466         (Is_Effectively_Volatile_Object): New routine.
2467         (Is_SPARK_Volatile): Removed.
2468         (Is_SPARK_Volatile_Object): Removed.
2470 2014-07-31  Pascal Obry  <obry@adacore.com>
2472         * s-fileio.adb (Open): Make sure a shared file gets inserted into
2473         the global list atomically. This ensures that the file descriptor
2474         won't be freed because another tasks is closing the file.
2476 2014-07-31  Robert Dewar  <dewar@adacore.com>
2478         * sem_ch3.adb (Process_Range_Expr_In_Decl): Add comments on
2479         generation of _FIRST and _LAST variables even in GNATprove_Mode.
2480         * gnat_ugn.texi: Minor editing.
2481         * sem_prag.adb (Ensure_Aggregate_Form): Make sure generated
2482         aggregate is marked Comes_From_Source if argument is CFS.
2484 2014-07-31  Pascal Obry  <obry@adacore.com>
2486         * s-fileio.adb: Remove obsolete comment.
2488 2014-07-31  Vincent Celier  <celier@adacore.com>
2490         * a-strbou.ads ("=" (Bounded_String, Bounded_String): Add
2491         overriding keyword before function to avoid error when compiler
2492         is called with -gnatyO (check overriding indicators).
2494 2014-07-31  Tucker Taft  <taft@adacore.com>
2496         * gnat_ugn.texi: Add a paragraph pointing the reader
2497         to the "plugins" example.
2499 2014-07-31  Hristian Kirtchev  <kirtchev@adacore.com>
2501         * freeze.adb (Freeze_Expression): Document the
2502         purpose of the parent chain traversal.
2504 2014-07-31  Robert Dewar  <dewar@adacore.com>
2506         * checks.ads, checks.adb (Activate_Overflow_Check): Do not set flag for
2507         unconstrained fpt ops.
2509 2014-07-31  Pascal Obry  <obry@adacore.com>
2511         * s-fileio.adb (Open): Make sure a shared file gets inserted into
2512         the global list atomically. This ensures that the file descriptor
2513         won't be freed because another tasks is closing the file.
2515 2014-07-31  Vincent Celier  <celier@adacore.com>
2517         * projects.texi: Minor spelling error fix.
2519 2014-07-31  Robert Dewar  <dewar@adacore.com>
2521         * gnat_rm.texi: Document No_Elaboration_Code_All restriction.
2522         * lib-writ.adb, lib-load.adb: Initialize No_Elab_Code field in unit
2523         information.
2524         * lib.ads, lib.adb (No_Elab_Code): New field in unit information.
2525         * restrict.adb (Process_Restriction_Synonyms): Add handling
2526         of No_Elaboration_Code_All.
2527         * restrict.ads (Process_Restriction_Synonyms): Now handles
2528         No_Elaboration_Code_All.
2529         * sem_ch10.adb (Analyze_Context): Enforce transitive with for
2530         No_Elaboration_Code_All.
2531         * sem_prag.adb (Process_Restrictions_Or_Restriction_Warnings):
2532         Handle setting of No_Elab_Code in unit information. Handle
2533         No_Elaboration_Code_All.
2534         * snames.ads-tmpl (Name_No_Elaboration_Code): New name for
2535         pragma processing.
2536         (Name_No_Elaboration_Code_All): New name for pragma processing.
2538 2014-07-31  Eric Botcazou  <ebotcazou@adacore.com>
2540         * exp_aggr.adb (Aggr_Assignment_OK_For_Backend): Reject array
2541         types with a null range and use the Esize of the component
2542         instead of its RM_Size to identify appropriate values.
2544 2014-07-31  Hristian Kirtchev  <kirtchev@adacore.com>
2546         * freeze.adb Add with and use clause for Aspects.
2547         (Freeze_Expression): Emit an error when a volatile constant lacks
2548         Boolean aspect Import.
2549         (Has_Boolean_Aspect_Import): New routine.
2551 2014-07-31  Gary Dismukes  <dismukes@adacore.com>
2553         * exp_util.adb: Minor reformatting.
2555 2014-07-31  Vincent Celier  <celier@adacore.com>
2557         * errutil.adb (Error_Msg): Make sure that all components of
2558         the error message object are initialized.
2560 2014-07-31  Ed Schonberg  <schonberg@adacore.com>
2562         * sem_ch4.adb (Try_Container_Indexing): If the container type is
2563         class-wide, use specific type to locate iteration primitives.
2564         * sem_ch13.adb (Check_Indexing_Functions): Add legality checks for
2565         rules in RM 4.1.6 (Illegal_Indexing): New diagnostic procedure.
2566         Minor error message reformating.
2567         * exp_ch5.adb (Expand_Iterator_Loop): Handle properly Iterator
2568         aspect for a derived type.
2570 2014-07-31  Robert Dewar  <dewar@adacore.com>
2572         * debug.adb: Document debug flag d.X.
2574 2014-07-31  Ed Schonberg  <schonberg@adacore.com>
2576         * sem_util.ads (Find_Specific_Type): Moved here from exp_disp.adb.
2577         * sem_util.adb (Find_Specific_Type): If type is untagged private,
2578         retrieve full view so that primitive operations can be located.
2579         * exp_disp.adb Move Find_Specific_Type to sem_util.
2580         * exp_ch4.adb (Expand_N_Op_Eq): If operands are class-wide, use
2581         Find_Specific_Type to locate primitive equality.
2582         * exp_util.adb (Make_CW_Equivalent_Type): A class_wide equivalent
2583         type does not require initialization.
2584         * exp_attr.adb (Compile_Stream_Body_In_Scope): Within an instance
2585         body all visibility is established, and the enclosing package
2586         declarations must not be installed.
2588 2014-07-31  Yannick Moy  <moy@adacore.com>
2590         * sem_parg.adb, sem_prag.ads (Collect_Subprogram_Inputs_Outputs):
2591         Make subprogram public.
2593 2014-07-31  Ed Schonberg  <schonberg@adacore.com>
2595         * exp_ch9.adb (Expand_N_Protected_Type_Declaration): New
2596         predicate Discriminated_Size, to distinguish between private
2597         components that depend on discriminants from those whose size
2598         depends on some other non-static expression.
2600 2014-07-31  Nicolas Setton  <setton@adacore.com>
2602         * g-exptty.adb (Close): Fix binding to Waitpid: use the
2603         tty version.
2605 2014-07-31  Ed Schonberg  <schonberg@adacore.com>
2607         * sem_ch3.adb (Make_Index): Reject properly the use of 'Length
2608         in a discrete range, when 'range was probably intended.
2610 2014-07-31  Robert Dewar  <dewar@adacore.com>
2612         * sem_warn.adb, sem_warn.ads (Has_Junk_Name): Moved from body to spec.
2614 2014-07-31  Robert Dewar  <dewar@adacore.com>
2616         * frontend.adb: Minor reformatting.
2617         * sem.adb: Minor reformatting.
2618         * sem_ch6.adb (Analyze_Null_Procedure): Set proper sloc for
2619         identifiers on rewrite.
2620         * par.adb: Minor comment updates.
2621         * a-ngelfu.adb (Cos): Minor simplification.
2622         * par-ch13.adb (Get_Aspect_Specifications): Improve messages
2623         and recovery for bad aspect.
2624         * exp_ch3.adb: Code clean up.
2625         * sem_util.ads: Minor comment correction.
2626         * sem_ch13.adb (Check_Array_Type): Properly handle large types.
2627         * sem_ch3.adb: Code clean up.
2628         * binderr.ads: Minor comment correction.
2630 2014-07-31  Ed Schonberg  <schonberg@adacore.com>
2632         * exp_disp.adb (Expand_Interface_Conversion): A call whose
2633         prefix is a static conversion to an interface type that is not
2634         class-wide is not dispatching.
2636 2014-07-31  Robert Dewar  <dewar@adacore.com>
2638         * inline.adb, s-traceb.adb, s-traceb-hpux.adb, memtrack.adb,
2639         s-traceb-mastop.adb: Minor reformatting.
2641 2014-07-31  Ed Schonberg  <schonberg@adacore.com>
2643         * exp_ch3.adb (Expand_Record_Extension): In ASIS_Mode perform
2644         expansion, to handle properly visibility of selected components
2645         in instance bodies.
2647 2014-07-31  Robert Dewar  <dewar@adacore.com>
2649         * par-ch13.adb (Get_Aspect_Specifications): Set Inside_Depends.
2650         * par-ch2.adb (P_Pragma): Set Inside_Depends.
2651         * par-ch4.adb (P_Simple_Expression): Pass Inside_Depends to
2652         Check_Unary_Plus_Or_Minus.
2653         * scans.ads (Inside_Depends): New flag.
2654         * scng.adb (Scan): Pass Inside_Depends to Check_Arrow.
2655         * style.ads: Add Inside_Depends parameter to Check_Arrow Add
2656         Inside_Depends parameter to Check_Unary_Plus_Or_Minus.
2657         * styleg.adb (Check_Arrow): Handle Inside_Depends case.
2658         (Check_Unary_Plus_Or_Minus): Handle Inside_Depends case.
2659         * styleg.ads: Add Inside_Depends parameter to Check_Arrow Add.
2660         Inside_Depends parameter to Check_Unary_Plus_Or_Minus.
2662 2014-07-31  Javier Miranda  <miranda@adacore.com>
2664         * s-vaflop.adb Move the body of function T_To_G before
2665         T_To_D. Required for frontend inlining.
2666         * inline.adb (Has_Excluded_Contract): New subprogram used to
2667         check if a subprogram inlined by the frontend has contracts
2668         which cannot be inlined.
2670 2014-07-31  Bob Duff  <duff@adacore.com>
2672         * s-traceb.adb, s-traceb-hpux.adb, s-traceb-mastop.adb:
2673         (Call_Chain): Add 1 to number of frames to skip, to account for
2674         the fact that there's one more frame on the stack.
2675         * gcc-interface/Makefile.in (s-traceb.o): Adjust rules.
2677 2014-07-31  Robert Dewar  <dewar@adacore.com>
2679         * checks.adb (Enable_Overflow_Check): More precise setting of
2680         Do_Overflow_Check flag for division.
2682 2014-07-31  Eric Botcazou  <ebotcazou@adacore.com>
2684         * exp_aggr.adb (Aggr_Assignment_OK_For_Backend): Reject packed
2685         array types with implementation type.
2687 2014-07-31  Hristian Kirtchev  <kirtchev@adacore.com>
2689         * sem_ch10.adb (Process_State): Remove local variable Name. Add
2690         local variable Decl. Partially declare an abstract state by
2691         generating an entity and storing it in the state declaration.
2692         * sem_prag.adb (Create_Abstract_State): Fully declare a
2693         semi-declared abstract state.
2695 2014-07-31  Robert Dewar  <dewar@adacore.com>
2697         * prj-nmsc.adb: Minor reformatting.
2699 2014-07-31  Bob Duff  <duff@adacore.com>
2701         * s-tasdeb.adb (System.Tasking.Debug): Remove
2702         all usage of the secondary stack from this package.
2704 2014-07-31  Hristian Kirtchev  <kirtchev@adacore.com>
2706         * freeze.adb (Freeze_Expression): Update the loop in charge
2707         of finding a proper insertion place for freeze nodes to handle
2708         N_Expression_With_Actions nodes.
2710 2014-07-31  Robert Dewar  <dewar@adacore.com>
2712         * sem_util.adb, a-ngelfu.ads, prj-nmsc.adb, prj-conf.adb: Minor
2713         reformatting.
2715 2014-07-31  Pascal Obry  <obry@adacore.com>
2717         * prj-nmsc.adb: Minor reformatting.
2719 2014-07-31  Ed Schonberg  <schonberg@adacore.com>
2721         * sem_util.adb (Has_Preelaborable_Initialization): Check that
2722         type is tagged before checking whether a user-defined Initialize
2723         procedure is present.
2725 2014-07-31  Gary Dismukes  <dismukes@adacore.com>
2727         * a-ngelfu.ads (Sqrt): Augment postcondition.
2729 2014-07-31  Pascal Obry  <obry@adacore.com>
2731         * prj-nmsc.adb (Check_Library_Attributes): An aggegate library
2732         directory and ALI directory must be different than all object
2733         and library directories of aggregated projects.
2735 2014-07-31  Vincent Celier  <celier@adacore.com>
2737         * prj-pars.adb, prj-conf.ads, prj-conf.adb (Locate_Runtime): Move spec
2738         to package body, as it is not called from outside. Remove argument
2739         Project_Tree, no longer used. When runtime cannot be found,
2740         call Raise_Invalid_Config instead of failing the program.
2742 2014-07-31  Robert Dewar  <dewar@adacore.com>
2744         * bindgen.adb (Gen_Output_File_Ada): Generate pragma Suppress
2745         (Overflow_Check).
2746         * gnatlink.adb (Process_Args): Remove generation of -gnato0,
2747         no longer needed.
2749 2014-07-31  Robert Dewar  <dewar@adacore.com>
2751         * gnat_ugn.texi: Document new switch -gnato0.
2752         * sem_ch3.ads: Minor reformatting.
2753         * gnatlink.adb (Process_Args): Compile bind file with -gnato0
2754         (we do not want overflow checks when incrementing elaboration
2755         counters).
2756         * einfo.ads: Minor reformatting.
2758 2014-07-31  Robert Dewar  <dewar@adacore.com>
2760         * exp_ch5.adb, freeze.adb, exp_ch3.adb: Minor comment correction.
2761         * s-arit64.adb: Minor reformatting.
2763 2014-07-31  Robert Dewar  <dewar@adacore.com>
2765         * gnat1drv.adb (Adjust_Global_Switches): Default for overflow
2766         checking is enabled except in GNAT_Mode.
2767         * switch-c.adb (Scan_Front_End_Switches): Implement -gnato0
2768         (suppress overflow checks).
2770 2014-07-31  Ed Schonberg  <schonberg@adacore.com>
2772         * exp_ch3.adb (Expand_Freeze_Record_Type): Do not build an
2773         invariant procedure for an internally generated subtype that is
2774         created for an object of a class-wide type.
2776 2014-07-31  Vincent Celier  <celier@adacore.com>
2778         * prj-nmsc.adb, errutil.adb: Make code similar to Errout.
2780 2014-07-31  Gary Dismukes  <dismukes@adacore.com>
2782         * gnat_rm.texi, sem_aux.ads, einfo.ads, sem_util.ads, sem_ch6.adb,
2783         exp_disp.adb: Minor reformatting.
2785 2014-07-31  Robert Dewar  <dewar@adacore.com>
2787         * exp_ch5.adb, sem_ch3.adb, exp_ch7.adb, exp_util.adb, exp_ch9.adb,
2788         sem_ch7.adb, checks.adb, s-exctra.adb, exp_ch6.adb, exp_disp.adb,
2789         exp_dist.adb, sem_ch13.adb, exp_strm.adb, exp_ch3.adb: Minor
2790         reformatting.
2792 2014-07-31  Robert Dewar  <dewar@adacore.com>
2794         * sem_ch13.adb: Minor reformatting.
2796 2014-07-31  Ed Schonberg  <schonberg@adacore.com>
2798         * exp_ch3.adb (Build_Invariant_Checks): If the enclosing record
2799         is an unchecked_union, warn that invariants will not be checked
2800         on components that have them.
2802 2014-07-31  Robert Dewar  <dewar@adacore.com>
2804         * freeze.adb (Freeze_Entity): Check for error of
2805         Type_Invariant'Class applied to a untagged type.
2806         * sem_ch6.adb (Analyze_Null_Procedure): Unconditionally rewrite
2807         as null body, so that we perform error checks even if expansion
2808         is off.
2810 2014-07-31  Ed Schonberg  <schonberg@adacore.com>
2812         * sem_ch13.adb (Build_Invariant_Procedure): If body of procedure
2813         is already present, nothing to do.
2814         * exp_ch3.adb (Build_Component_Invariant_Call): For an access
2815         component, check whether the access type has an invariant before
2816         checking the designated type.
2817         (Build_Record_Invariant_Proc): Change suffix of generated
2818         name to prevent ambiguity when record type has invariants
2819         in addition to those of components, and two subprograms are
2820         constructed. Consistent with handling of array types.
2821         (Insert_Component_Invariant_Checks): Build invariant procedure
2822         body when one has not been created yet, in the case of composite
2823         types that are completions and whose full declarations carry
2824         invariants.
2826 2014-07-30  Thomas Quinot  <quinot@adacore.com>
2828         * gnat_rm.texi: Minor doc fixes.
2830 2014-07-30  Robert Dewar  <dewar@adacore.com>
2832         * a-rbtgbo.adb, sem_ch13.adb: Minor reformatting.
2834 2014-07-30  Vincent Celier  <celier@adacore.com>
2836         * errutil.adb (Set_Msg_Text): Process tilde ('~'): no processing
2837         of error message.
2838         * prj-nmsc.adb (Locate_Directory): Use a tilde ('~') in the
2839         message to report that a directory cannot be created, to avoid
2840         processing of the directory path that may contains special
2841         insertion characters.
2843 2014-07-30  Ed Schonberg  <schonberg@adacore.com>
2845         * a-crdlli.ads: Place declaration of Empty_List after full type
2846         declaration for Curosr, to prevent freezing error.
2848 2014-07-30  Robert Dewar  <dewar@adacore.com>
2850         * get_targ.adb: Minor code reorganization.
2851         * prj-proc.adb, prj-proc.ads, get_targ.ads, sem_ch6.adb: Minor
2852         reformatting.
2854 2014-07-30  Ed Schonberg  <schonberg@adacore.com>
2856         * a-cbhase.adb: a-cbhase.adb (Insert): Raise Constraint_Error,
2857         not Program_Error, when attempting to remove an element not in
2858         the set. This is the given semantics for all set containers.
2860 2014-07-30  Ed Schonberg  <schonberg@adacore.com>
2862         * a-rbtgbo.adb (Delete_Node_Sans_Free): If
2863         element is not present in tree return rather than violating
2864         an assertion. Constraint_Error will be raised in the caller if
2865         element is not in the container.
2867 2014-07-30  Arnaud Charlet  <charlet@adacore.com>
2869         * set_targ.adb (Read_Target_Dependent_Values): New subprogram.
2870         (elab body): Add provision for default target config file.
2871         * get_targ.ads, get_targ.adb (Get_Back_End_Config_File): New subprogram.
2873 2014-07-30  Ed Schonberg  <schonberg@adacore.com>
2875         * a-cbhase.adb (Delete): Raise Constraint_Error, not Program_Error,
2876         when attempting to remove an element not in the set. This is
2877         the given semantics for all set containers.
2878         * a-cborse.adb (Delete): Attempt removal first, to check for
2879         tampering, before checking whether this is an attempt to
2880         delete a  non-existing element, and in fthe latter case raise
2881         Constraint_Error.
2883 2014-07-30  Vincent Celier  <celier@adacore.com>
2885         * prj-proc.adb (Recursive_Process): Do not create a new
2886         Project_Id if the project is already in the list of projects of
2887         the tree.
2889 2014-07-30  Ed Schonberg  <schonberg@adacore.com>
2891         * sem_ch6.adb (Analyze_Function_Return): Reject a return expression
2892         whose type is an incomplete formal type.
2893         (Analyze_Return_Type): Reject a return type that is an untagged
2894         imcomplete formal type.
2895         (Process_Formals): Reject a formal parameter whose type is an
2896         untagged formal incomplete type.
2897         * sem_res.adb (Resolve_Actuals): Reject an actual whose type is
2898         an untagged formal incomplete type.
2900 2014-07-30  Robert Dewar  <dewar@adacore.com>
2902         * gnat_ugn.texi: Minor spelling correction.
2903         * makeutl.adb: Minor code reorganization.
2904         * exp_ch4.adb, exp_aggr.adb, exp_ch3.adb: Minor reformatting.
2906 2014-07-30  Robert Dewar  <dewar@adacore.com>
2908         * einfo.ads (Has_Unchecked_Union): Document that this is used
2909         to check for illegal Valid_Scalars attribute references.
2910         * exp_attr.adb (Build_Record_VS_Func): New function
2911         (Expand_N_Attribute_Reference, case Valid_Scalars): Call this
2912         function.
2913         * gnat_rm.texi: Document 'Valid_Scalars cannot be applied to
2914         Unchecked_Union Add note on 'Valid_Scalars generating a lot
2915         of code.
2916         * sem_attr.adb (Analyze_Attribute, case Valid_Scalars): Give
2917         error on attempt to apply Valid_Scalars to Unchecked_Union type.
2919 2014-07-30  Steve Baird  <baird@adacore.com>
2921         * exp_ch4.adb (Expand_N_Indexed_Component): Disable optimized handling
2922         of A(I..J)(K) in CodePeer_Mode.
2924 2014-07-30  Ben Brosgol  <brosgol@adacore.com>
2926         * gnat_ugn.texi: Fix typo.
2928 2014-07-30  Thomas Quinot  <quinot@adacore.com>
2930         * lib-writ.ads: document format change.
2932 2014-07-30  Pascal Obry  <obry@adacore.com>
2934         * prj-util.adb (For_Interface_Sources): Do not
2935         include sources from withed externally built projects.
2937 2014-07-30  Robert Dewar  <dewar@adacore.com>
2939         * lib.adb: Minor reformatting.
2940         * prj-util.adb: Minor reformatting.
2942 2014-07-30  Ed Schonberg  <schonberg@adacore.com>
2944         * exp_aggr.adb (Build_Record_Aggr_Code): For an array component
2945         that depends on discriminants, and which is given by an others
2946         clause, create an explicit subtype with the discriminant values
2947         of the enclosing aggregate, because the backend cannot otherwise
2948         retrieve the actual bounds of the array.
2950 2014-07-30  Fedor Rybin  <frybin@adacore.com>
2952         * gnat_ugn.texi: Improve gnattest documentation.
2954 2014-07-30  Pascal Obry  <obry@adacore.com>
2956         * makeutl.adb (Insert_Project_Sources): Properly handle sources
2957         that are aggregated. We want to include sources not only part
2958         of libraries but also if part of an aggregated project from an
2959         aggregate library.
2960         * prj.adb (For_Project_And_Aggregated_Context): Properly check
2961         state of root project.
2963 2014-07-30  Thomas Quinot  <quinot@adacore.com>
2965         * lib-load.ads: Minor reformatting.
2966         * sinfo.ads (Library_Unit): Update comment.
2967         * lib.ads (Notes): Simplify. The Unit component in Notes_Entry
2968         is redundant. Instead used the pragma Node_Id directly as the
2969         element type.
2971 2014-07-30  Thomas Quinot  <quinot@adacore.com>
2973         * lib.adb (Store_Note): Store only notes that do not come from
2974         an instance, and that are in the extended main source unit.
2975         * lib-writ (Write_Unit_Information): Annotations from subunits
2976         must be emitted along with those for the main unit, and they
2977         must carry a specific file name.
2978         * ali.ads (Notes_Record): Use a File_Name_Type instead of a
2979         Unit_Id for the source file containing the pragma, as in the
2980         case of annotations from subunits we might not have a readily
2981         available unit id.
2982         * ali.adb (Scan_ALI): Account for above change in data structure.
2984 2014-07-30  Vincent Celier  <celier@adacore.com>
2986         * makeutl.adb (Insert_Project_Sources): When the library project
2987         is an aggregate Stand-Alone Library, insert in the queue the
2988         Ada interface units, with Closure set to True;
2990 2014-07-30  Eric Botcazou  <ebotcazou@adacore.com>
2992         * sem_util.adb: Fix minor typo.
2993         * makeutl.adb: Minor reformatting.
2995 2014-07-30  Robert Dewar  <dewar@adacore.com>
2997         * exp_ch7.adb, checks.adb, makeutl.adb, makeutl.ads: Minor reformatting.
2999 2014-07-30  Yannick Moy  <moy@adacore.com>
3001         * checks.ads: Fix typo in comment.
3003 2014-07-30  Pierre-Marie Derodat  <derodat@adacore.com>
3005         * sem_util.adb (Set_Debug_Info_Needed): For scalar types, recurse on
3006         entities that materialize range bounds, if any.
3008 2014-07-30  Vincent Celier  <celier@adacore.com>
3010         * projects.texi: Minor spelling fix.
3012 2014-07-30  Hristian Kirtchev  <kirtchev@adacore.com>
3014         * checks.adb (Make_Bignum_Block): Use the new secondary stack
3015         build routines to manage the mark.
3016         * exp_ch7.adb (Create_Finalizer, Expand_Cleanup_Actions):
3017         Use the new secodary stack build routines to manage the mark.
3018         (Insert_Actions_In_Scope_Around): Add new formal parameter
3019         Manage_SS along with comment on its usage. Code and comment
3020         reformatting. Mark and release the secondary stack when the
3021         context warrants it.
3022         (Make_Transient_Block): Update the call
3023         to Insert_Actions_In_Scope_Around to account for parameter Manage_SS.
3024         (Wrap_Transient_Declaration): Remove local variable
3025         Uses_SS. Ensure that the secondary stack is marked and released
3026         when the related object declaration appears in a library level
3027         package or package body. Code and comment reformatting.
3028         * exp_util.ads, exp_util.adb (Build_SS_Mark_Call): New routine.
3029         (Build_SS_Release_Call): New routine.
3031 2014-07-30  Steve Baird  <baird@adacore.com>
3033         * exp_attr.adb: Revert previous change, not needed after all.
3035 2014-07-30  Vincent Celier  <celier@adacore.com>
3037         * makeutl.adb (Queue.Insert_Project_Sources): Insert with
3038         Closure => True for interfaces of Stand-Alone Libraries.
3039         * makeutl.ads (Source_Info (Format => Gprbuild)): Add new
3040         Boolean component Closure, defaulted to False.
3042 2014-07-30  Yannick Moy  <moy@adacore.com>
3044         * sem_res.adb: Fix typo in error message.
3046 2014-07-30  Robert Dewar  <dewar@adacore.com>
3048         * sem_ch3.adb (Process_Range_Expr_In_Decl): Use _FIRST/_LAST
3049         as name suffixes rather than L/H for subtype bounds.
3050         * tbuild.ads: Minor comment improvements and fixes
3051         (Make_External_Name): Document that suffix can start with an
3052         underscore.
3054 2014-07-30  Bob Duff  <duff@adacore.com>
3056         * gnat_ugn.texi: Document --rep-clauses switch.
3058 2014-07-30  Ed Schonberg  <schonberg@adacore.com>
3060         * sem_ch13.adb (Analyze_Aspect_Specifications): Default_Value and
3061         Default_Component_Value can only be specified for scalar type or
3062         arrays of scalar types respectively.  This legality check must
3063         be performed at the point the aspect is analyzed, in order to
3064         reject aspect specifications that apply to a partial view.
3066 2014-07-30  Thomas Quinot  <quinot@adacore.com>
3068         * freeze.adb: Minor reformatting.
3070 2014-07-30  Robert Dewar  <dewar@adacore.com>
3072         * exp_attr.adb (Expand_Attribute, case First/Last): Don't expand in
3073         codepeer mode.
3075 2014-07-30  Ed Schonberg  <schonberg@adacore.com>
3077         * freeze.adb (Check_Expression_Function): At the freeze point
3078         of an expression function, verify that the expression in the
3079         function does not contain references to any deferred constants
3080         that have no completion yet.
3081         (Freeze_Expression, Freeze_Before): call
3082         Check_Expression_Function.
3083         * a-ciorse.ads: Add Reference_Control_Type to detect tampering.
3084         * a-ciorse.adb: Add Adjust and Finalize routines for
3085         Reference_Control_Type. Use it in the construction of Reference
3086         and Constant_Reference values.
3088 2014-07-30  Robert Dewar  <dewar@adacore.com>
3090         * exp_aggr.adb: Update comments.
3091         * a-chtgbo.adb, a-chtgbo.ads, a-cbhase.adb, a-cbhase.ads: Minor
3092         reformatting.
3094 2014-07-30  Robert Dewar  <dewar@adacore.com>
3096         * cstand.adb (New_Standard_Entity): New version takes name
3097         string to call Make_Name.
3098         (Create_Standard): Use this routine to set name before setting other
3099         fields.
3101 2014-07-30  Robert Dewar  <dewar@adacore.com>
3103         * exp_attr.adb (Expand_Attribute, case First): Rewrite simple
3104         entity reference.
3105         (Expand_Attribute, case Last): Ditto.
3106         * exp_ch3.adb (Constrain_Index): New calling sequence for
3107         Process_Range_Expr_In_Decl.
3108         (Expand_N_Object_Declaration): Avoid setting Is_Known_Valid in one
3109         problematical case.
3110         * sem_ch3.adb (Constrain_Index): New calling sequence for
3111         Process_Range_Expr_In_Decl.
3112         (Set_Scalar_Range_For_Subtype): ditto.
3113         (Process_Range_Expr_In_Decl): Create constants to hold bounds for
3114         subtype.
3115         * sem_ch3.ads (Process_Range_Expr_In_Decl): Add Subtyp parameter.
3116         * sem_eval.adb (Compile_Time_Compare): Make sure we use base
3117         types if we are not assuming no invalid values.
3119 2014-07-30  Robert Dewar  <dewar@adacore.com>
3121         * clean.adb: Minor reformatting.
3122         * opt.ads: Minor fix to incorrect comment.
3124 2014-07-30  Ed Schonberg  <schonberg@adacore.com>
3126         * a-chtgbo.ads, a-chtgbo.adb (Delete_Node_At_Index): New
3127         subprogram, used by bounded hashed sets, to delete a node at
3128         a given index, whose element may have been improperly updated
3129         through a Reference_Preserving key.
3130         * a-cbhase.ads: Add Reference_Control_Type to package Generic_Keys.
3131         * a-cbhase.adb: Add Adjust and Finalize routines for
3132         Reference_Control_Type.
3133         (Delete, Insert): Raise Program_Error, not Constraint_Error,
3134         when operation is illegal.
3135         (Reference_Preserving_Key): Build aggregate for Reference_Control_Type
3136         * a-cmbutr.ads: Add Reference_Control_Type to detect tampering. Add
3137         private with_clause for Ada.Finalization.
3138         * a-cbmutr.adb: Add Adjust and Finalize routines for
3139         Reference_Control_Type. Use it in the construction of Reference
3140         and Constant_Reference values.
3142 2014-07-30  Robert Dewar  <dewar@adacore.com>
3144         * sem_ch3.adb, sem_ch3.ads: Minor code reorganization.
3146 2014-07-30  Pascal Obry  <obry@adacore.com>
3148         * clean.adb (Clean_Project): Properly check for directory
3149         existence before trying to enter it.
3151 2014-07-30  Robert Dewar  <dewar@adacore.com>
3153         * sem_ch3.ads, prj.ads, prj-nmsc.adb: Minor reformatting.
3155 2014-07-30  Robert Dewar  <dewar@adacore.com>
3157         * par-ch5.adb (P_Sequence_Of_Statements): Properly handle
3158         missing semicolon after name.
3160 2014-07-30  Pascal Obry  <obry@adacore.com>
3162         * prj.ads (Gprinstall_Flags): New constant.
3163         * prj-nmsc.adb (Check_Library_Attributes): Do not fails for
3164         missing library dir if Directories_Must_Exist_In_Projects
3165         is false.
3167 2014-07-30  Bob Duff  <duff@adacore.com>
3169         * a-except-2005.adb, a-except.adb: Remove obsolete comments.
3170         * s-traceb.ads: Updagte comments.
3172 2014-07-30  Robert Dewar  <dewar@adacore.com>
3174         * checks.adb, a-cihase.adb, a-cihase.ads, a-chtgop.adb, a-chtgop.ads,
3175         a-except.adb, a-except-2005.adb, a-cborse.adb, a-cborse.ads,
3176         a-exexda.adb, a-elchha.adb, exp_aggr.adb, a-cohase.adb: Minor
3177         reformatting.
3179 2014-07-30  Ed Schonberg  <schonberg@adacore.com>
3181         * a-chtgop.ads, a-chtgop.adb (Delete_Node_At_Index): New
3182         subprogram, used by all versions of hashed sets, to delete a node
3183         whose element has been improperly updated through a Reference_
3184         Preserving key.
3185         * a-cohase.adb: Remove Delete_Node, use new common procedure
3186         Delete_Node_At_Index.
3187         * a-cihase.ads: Add Reference_Control_Type to package Generic_Keys.
3188         * a-cihase.adb: Add Adjust and Finalize routines for
3189         Reference_Control_Type.
3190         (Reference_Preserving_Key): Build aggregate for
3191         Reference_Control_Type
3193 2014-07-30  Yannick Moy  <moy@adacore.com>
3195         * checks.adb, checks.ads (Determine_Range_R): New procedure to
3196         determine the possible range of a floating-point expression.
3198 2014-07-30  Ed Schonberg  <schonberg@adacore.com>
3200         * a-cborse.ads: Add Reference_Control_Type to package Generic_Keys.
3201         * a-cborse.adb: Add Adjust and Finalize routines for
3202         Reference_Control_Type.
3203         (Reference_Preserving_Key): Build aggregate for
3204         Reference_Control_Type.
3205         (Delete): Check for tampering, and raise Program_Error (not
3206         Constraint_Error) when attempting to delete an element not in
3207         the set.
3208         (Insert): Ditto.
3210 2014-07-30  Bob Duff  <duff@adacore.com>
3212         * a-elchha.adb, a-except-2005.adb, a-except.adb, a-exexda.adb,
3213         * a-exextr.adb, a-exstat.adb, exp_intr.ads, s-tassta.adb:
3214         Exception_Information is used to produce useful debugging
3215         information for the programmer. However, it was also used to
3216         implement the stream attributes for type Exception_Occurrence. The
3217         latter requires a stable and portable interface, which meant
3218         that we couldn't include a symbolic traceback. A separate set of
3219         routines was used to provide symbolic tracebacks under program
3220         control (i.e. not automatically). The goal of this ticket is
3221         to provide such automatic tracebacks, so the change here is to
3222         split the two functionalities: Exception_Information gives the
3223         maximally useful information for debugging (i.e. it now includes
3224         a symbolic traceback when a decorator is set, and it can be
3225         improved freely in the future without disturbing streaming).
3226         Untailored_Exception_Information always uses hexadecimal addresses
3227         in the traceback, has a stable and portable output, and is now
3228         used for streaming.
3230 2014-07-30  Eric Botcazou  <ebotcazou@adacore.com>
3232         * exp_aggr.adb (Expand_Array_Aggregate): Add missing test
3233         on the target of the assignment to find out whether it
3234         can be directly done by the back-end.
3235         * exp_util.adb (Is_Possibly_Unaligned_Slice): Remove obscure test.
3237 2014-07-30  Robert Dewar  <dewar@adacore.com>
3239         * inline.adb, a-coorse.adb, a-coorse.ads, a-cohase.adb, a-cohase.ads,
3240         a-tasatt.adb: Minor reformatting.
3242 2014-07-30  Robert Dewar  <dewar@adacore.com>
3244         * exp_ch4.adb: Minor reformatting.
3246 2014-07-30  Ed Schonberg  <schonberg@adacore.com>
3248         * a-coorse.adb, a-coorse.ads (Generic_Keys): Add a
3249         Reference_Control_Type to generic package, to keep additional
3250         information for Reference_Types that manipulate keys. Add Adjust and
3251         Finalize procedures for this type.
3252         (Finalize): When finalizing a reference_preserving_key, verify
3253         that the key of the new value is equivalent to the key of the
3254         original element, raise Program_Error otherwise.
3255         (Insert): Detect tampering.
3256         (Reference_Preserving_Key): Build proper Reference_Control_Type,
3257         and update Busy and Lock bits to detect tampering.
3258         * a-cohase.ads: Keep with-clause private.
3260 2014-07-30  Hristian Kirtchev  <kirtchev@adacore.com>
3262         * exp_ch4.adb (Expand_N_Op_Eq): Emit a warning when the operands
3263         of an equality are of an Unchecked_Union type and lack inferable
3264         discriminants.
3266 2014-07-30  Bob Duff  <duff@adacore.com>
3268         * g-exctra.adb, g-exctra.ads, s-exctra.adb, s-exctra.ads, Makefile.rtl,
3269         g-trasym.adb, g-trasym.ads, s-trasym.adb, s-trasym.ads: Move
3270         GNAT.Traceback.Symbolic and GNAT.Exception_Traces into the System
3271         hierarchy (System.Traceback.Symbolic and System.Exception_Traces), so
3272         we can call them from the runtimes. Leave renamings in place under GNAT.
3274 2014-07-30  Yannick Moy  <moy@adacore.com>
3276         * inline.adb (Check_And_Build_Body_To_Inline): Include code for
3277         inlining in GNATprove mode.
3279 2014-07-30  Ed Schonberg  <schonberg@adacore.com>
3281         * a-cohase.adb, a-cohase.ads (Generic_Keys): Add a
3282         Reference_Control_Type to generic package, to keep additional
3283         information for Reference_Types that manipulate keys. Add Adjust and
3284         Finalize procedures for this type.
3285         (Delete_Node): New procedure called when finalizing a
3286         Reference_Control_Type, to remove a node whose element has been
3287         improperly updated through a Reference.
3288         (Insert): Detect tampering.
3289         (Reference_Preserving_Key): Build proper Reference_Control_Type,
3290         and update Busy and Lock bits to detect tampering.
3292 2014-07-30  Bob Duff  <duff@adacore.com>
3294         * exp_intr.ads: Minor comment fix.
3296 2014-07-30  Gary Dismukes  <dismukes@adacore.com>
3298         * exp_prag.adb, a-tags.ads: Minor typo fixes.
3300 2014-07-30  Bob Duff  <duff@adacore.com>
3302         * a-excach.adb, a-excach-cert.adb, a-except-2005.ads,
3303         a-except.ads, g-traceb.adb, memtrack.adb,
3304         s-traceb.adb, s-traceb.ads, s-traceb-hpux.adb, s-traceb-mastop.adb:
3305         Cleanup: Make the three versions of System.Traceback.Call_Chain
3306         have the same interface. Use an array for the Traceback parameter
3307         instead of an Address.  This will enable reduction in code
3308         duplication.
3310 2014-07-30  Pat Rogers  <rogers@adacore.com>
3312         * gnat_ugn.texi: Corrected minor textual error in description
3313         of switch -gnatwl.
3315 2014-07-30  Bob Duff  <duff@adacore.com>
3317         * Makefile.rtl: Sort file names.
3319 2014-07-30  Arnaud Charlet  <charlet@adacore.com>
3321         * a-tasatt.adb: Complete previous change: kill spurious warning
3322         on e.g. sparc, and make sure we only use the fast path when the
3323         alignment is compatible.
3325 2014-07-30  Yannick Moy  <moy@adacore.com>
3327         * sem_ch6.adb (Analyze_Subprogram_Body_Helper): Mark new Spec_Id as
3328         coming from source.
3330 2014-07-30  Yannick Moy  <moy@adacore.com>
3332         * inline.adb (Build_Body_To_Inline): Issue more precise messages
3333         for declarations that prevent inlining.
3334         (Cannot_Inline): Change usual start of message to refer to contextual
3335         analysis in GNATprove mode.
3336         * sem_res.adb (Resolve_Call): Change usual start of message to
3337         refer to contextual analysis in GNATprove mode, when inlining
3338         not possible.
3340 2014-07-30  Robert Dewar  <dewar@adacore.com>
3342         * sem_res.adb, sem_ch6.adb: Minor code reorganization.
3343         * inline.adb: Minor reformatting.
3345 2014-07-30  Javier Miranda  <miranda@adacore.com>
3347         * a-tags.ads: Add comments.
3349 2014-07-30  Pat Rogers  <rogers@adacore.com>
3351         * gnat_rm.texi: Minor word error.
3353 2014-07-30  Ed Schonberg  <schonberg@adacore.com>
3355         * exp_prag.adb (Expand_Old): Insert declarationss of temporaries
3356         created to capture the value of the prefix of 'Old at the
3357         beginning of the current declarative part, to prevent data flow
3358         anomalies in the postcondition procedure that will follow.
3360 2014-07-30  Yannick Moy  <moy@adacore.com>
3362         * debug.adb: Retire debug flag -gnatdQ.
3363         * inline.adb (Can_Be_Inlined_In_GNATprove_Mode): Check SPARK_Mode
3364         on decl, not on body.  Ignore predicate functions.
3365         * sem_ch6.adb (Analyze_Subprogram_Body_Helper): Remove use of
3366         debug flag -gnatdQ.  Correctly analyze SPARK_Mode on decl and
3367         body when generating a decl for a body on which SPARK_Mode aspect
3368         is given.
3369         * sem_prag.adb (Analyze_Pragma|SPARK_Mode): Reorder tests for
3370         attaching pragma to entity, to account for declaration not coming
3371         from source.
3372         * sem_res.adb (Resolve_Call): Issue warning and flag subprogram
3373         as not always inlined in GNATprove mode, when called in an
3374         assertion context.
3376 2014-07-30  Vincent Celier  <celier@adacore.com>
3378         * debug.adb: Minor comment update.
3380 2014-07-30  Robert Dewar  <dewar@adacore.com>
3382         * s-tasuti.adb, s-tassta.adb: Minor reformatting.
3383         * sprint.adb (Sprint_Node): Handle N_Contract case.
3384         * exp_prag.adb: Minor reformatting.
3385         * freeze.adb (Freeze_Entity): Check useless postcondition for
3386         No_Return subprogram.
3387         * sem_prag.adb: Minor reformatting.
3389 2014-07-30  Javier Miranda  <miranda@adacore.com>
3391         * a-tags.ads: Complete comments about performance.
3393 2014-07-30  Fedor Rybin  <frybin@adacore.com>
3395         * gnat_ugn.texi: Adding description for --exit-status option to
3396         gnattest section.  Fixing index entry of --passed-tests option
3397         in gnattest section.
3399 2014-07-30  Javier Miranda  <miranda@adacore.com>
3401         * Makefile.rtl, gnat_rm.texi, i-cpp.adb, i-cpp.ads, impunit.adb,
3402         rtsfind.ads: Remove references to package Interfaces.CPP since this
3403         package is no longer needed.
3405 2014-07-30  Bob Duff  <duff@adacore.com>
3407         * s-taasde.adb (Timer_Queue): Don't use a
3408         build-in-place function call to initialize the Timer_Queue.
3409         * s-traent.adb, s-traent.ads, s-traent-vms.adb, s-traent-vms.ads:
3410         Turn off polling in these units, because otherwise we get
3411         elaboration circularities with Ada.Exceptions when the -gnatP
3412         switch is used.
3413         * s-tassta.adb (Create_Task): Make sure independent tasks
3414         are created with Parent = Environment_Task. This was not true,
3415         for example, in s-interr.adb, when Interrupt_Manager does "new
3416         Server_Task"; the Server_Task had Parent = Interrupt_Manager,
3417         which is wrong because the master is determined by the access
3418         type, which is at library level.
3419         * s-tasuti.adb (Make_Independent): Avoid setting Parent; it is
3420         now set correctly by Create_Task.
3421         (Make_Passive): Remove the workaround for the race condition in
3422         Make_Independent.
3423         * frontend.adb (Frontend): Revert to previous method of detecting
3424         temporary configuration pragma files, recognizing such files by
3425         ".tmp" in the name. This is more general than detecting pragmas
3426         Source_File_Name_Project, because it allows any tool to use
3427         this naming convention, no matter the content of the file.
3428         * gnat_ugn.texi: Document this naming convention.
3430 2014-07-30  Robert Dewar  <dewar@adacore.com>
3432         * exp_ch7.adb, s-tataat.adb, s-tataat.ads, s-parame-vms-alpha.ads,
3433         inline.adb, s-parame-hpux.ads, exp_smem.adb, s-tasini.adb,
3434         s-tasini.ads, s-parame-vms-ia64.ads, s-parame.ads, s-taskin.ads,
3435         s-parame-vxworks.ads, a-tasatt.adb, a-tasatt.ads: Minor reformatting.
3436         * a-suenco.adb (Convert): Handle overlong encodings in UTF8-UTF8
3437         conversion.
3439 2014-07-30  Ed Schonberg  <schonberg@adacore.com>
3441         * sem_ch5.adb: Improve error recovery.
3442         * inline.adb (Build_Body_To_Inline): Set Full_Analysis to false
3443         before analyzing the body, so that in GNATprove mode there is
3444         no light expansion. Whatever expansion is required by SPARK will
3445         be performed when analysing the inlined code.
3447 2014-07-30  Bob Duff  <duff@adacore.com>
3449         * s-tataat.adb, s-tataat.ads, a-tasatt.adb: Minor comment fixes.
3451 2014-07-30  Ed Schonberg  <schonberg@adacore.com>
3453         * sem_ch5.adb (Analyze_Loop_Statement): If loop has a label,
3454         verify that it is not hidden by an inner implicit declaration.
3456 2014-07-30  Thomas Quinot  <quinot@adacore.com>
3458         * sem.ads (Scope_Table_Entry): New component Locked_Shared_Objects.
3459         * sem_ch8.adb (Push_Scope): Initialize Locked_Shared_Objects.
3460         * exp_smem.adb (Add_Shared_Var_Lock_Procs): Handle the case where
3461         the call returns an unconstrained type: in this case there is
3462         already a transient scope, and we should not establish a new one.
3463         * exp_ch7.adb (Insert_Actions_In_Scope_Around): New formal Clean. If
3464         True, also insert cleanup actions in the tree.
3465         (Wrap_Transient_Declaration): Call Insert_Actions_In_Scope_Around
3466         with Clean set True.
3468 2014-07-30  Arnaud Charlet  <charlet@adacore.com>
3470         * s-taskin.ads (Direct_Index, Direct_Index_Range,
3471         Direct_Attribute_Element, Direct_Attribute_Array,
3472         Direct_Index_Vector, Direct_Attributes, Is_Defined,
3473         Indirect_Attributes): Removed.  (Atomic_Address,
3474         Attribute_Array, Attributes): New.
3475         * s-tasini.ads, s-tasini.adb (Proc_T, Initialize_Attributes,
3476         Finalize_Attributes_Link, Initialize_Attributes_Link): Removed.
3477         (Finalize_Attributes): Reimplement.
3478         * s-tassta.adb (Create_Task): Remove call to
3479         Initialize_Attributes_Link (Free_Task, Vulnerable_Free_Task):
3480         Replace Finalize_Attributes_Link by Finalize_Attributes.
3481         * a-tasatt.ads, a-tasatt.adb, s-tataat.ads, s-tataat.adb:
3482         Reimplement from scratch, using a simpler and more efficient
3483         implementation.
3484         * s-tporft.adb (Register_Foreign_Thread): Remove now obsolete comment.
3485         * s-parame.ads, s-parame-hpux.ads,
3486         * s-parame-vms-alpha.ads, s-parame-vms-ia64.ads,
3487         * s-parame-vxworks.ads (Max_Attribute_Count): New, replace
3488         Default_Attribute_Count.
3490 2014-07-30  Olivier Hainque  <hainque@adacore.com>
3492         * vxworks-ppc-link.spec: New file. Extra link
3493         instructions for ppc-vxworks.
3494         * vxworks-crtbe-link.spec: Likewise, for ZCX related support.
3495         * system-vxworks-ppc.ads: Adjust linker options to use spec files.
3496         * system-vxworks-arm.ads: Likewise.
3497         * gcc-interface/Makefile.in: Enable .spec files.
3499 2014-07-30  Ed Schonberg  <schonberg@adacore.com>
3501         * sem_aggr.adb: Minor comment reformatting.
3503 2014-07-30  Robert Dewar  <dewar@adacore.com>
3505         * sem_util.ads, sem_util.adb (Is_Junk_Name): Removed.
3506         * sem_warn.adb (Has_Junk_Name): New function
3507         (Check_References): Use Has_Junk_Name to delete junk warnings
3508         (Check_Unset_Reference): ditto.
3509         (Warn_On_Unreferenced_Entity): ditto.
3510         (Warn_On_Useless_Assignment): ditto.
3512 2014-07-30  Ed Schonberg  <schonberg@adacore.com>
3514         * checks.adb (Insert_Valid_Check): Do not check for the packed
3515         array type of a prefix that is an access type.
3517 2014-07-30  Ed Schonberg  <schonberg@adacore.com>
3519         * sem_attr.adb (Eval_Attribute): Evaluate the GNAT attribute
3520         Unconstrained_Array even if prefix is not frozen yet, as can
3521         occur with a private subtype used as a generic actual.
3523 2014-07-30  Gary Dismukes  <dismukes@adacore.com>
3525         * sem_attr.adb: Minor reformatting.
3527 2014-07-30  Pat Rogers  <rogers@adacore.com>
3529         * gnat_rm.texi: Corrected minor wording error in description
3530         of No_Exception_Registration.
3532 2014-07-30  Yannick Moy  <moy@adacore.com>
3534         * einfo.ads, einfo.adb: New flag Is_Inlined_Always for use in GNATprove
3535         mode. Realphabetize two subprograms.
3536         * inline.adb (Cannot_Inline): Use Is_Inlined_Always in GNATprove mode.
3537         (Can_Be_Inlined_In_GNATprove_Mode): Adapt to possible Empty Body_Id.
3538         (Check_And_Build_Body_To_Inline): Use Is_Inlined_Always in GNATprove
3539         mode.
3540         (Expand_Inline_Call): Use Is_Inlined_Always in GNATprove mode.
3541         * sem_ch6.adb (Analyze_Subprogram_Body_Helper): Do not use
3542         Is_Inline in GNATprove mode.
3543         (Analyze_Subprogram_Specification):
3544         Set Is_Inlined_Always at subprogram entity creation.
3545         * sem_res.adb (Resolve_Call): Do not deal with inlining during
3546         pre-analysis.  Issue warning on call to possibly inlined
3547         subprogram when body not seen.
3549 2014-07-30  Yannick Moy  <moy@adacore.com>
3551         * lib-xref.adb (Generate_Reference): Add special
3552         case for compiler-generated formals in GNATprove mode.
3554 2014-07-30  Yannick Moy  <moy@adacore.com>
3556         * sem_ch6.adb: Add comments.
3558 2014-07-30  Thomas Quinot  <quinot@adacore.com>
3560         * s-os_lib.ads (GM_Time_Of): Clarify documentation.
3562 2014-07-30  Robert Dewar  <dewar@adacore.com>
3564         * sem_aggr.adb, sem_res.adb: Minor reformatting.
3566 2014-07-30  Thomas Quinot  <quinot@adacore.com>
3568         * sem_ch13.adb (Analyze_Attribute_Definition_Clause, case
3569         Bit_Order): Set Reverse_Bit_Order on the base type of the
3570         specified first subtype.
3572 2014-07-30  Ed Schonberg  <schonberg@adacore.com>
3574         * inline.adb (Expand_Inlined_Call): Use a renaming declaration
3575         to capture the value of actuals of a limited type rather than
3576         an object declaration, to prevent spurious errors when analyzing
3577         the inlined body.
3579 2014-07-30  Ed Schonberg  <schonberg@adacore.com>
3581         * sem_ch4.adb (Analyze_Type_Conversion): Treat an inlined body
3582         as an instance, and inhibit semantic checks on already analyzed
3583         code to prevent spurious errors.
3585 2014-07-30  Arnaud Charlet  <charlet@adacore.com>
3587         * a-exctra.ads ("="): New function, to restore compatibility.
3589 2014-07-30  Pascal Obry  <obry@adacore.com>
3591         * adaint.c (__gnat_to_os_time): Set isdst to -1 for the mktime
3592         routine to use the OS dst setting.
3594 2014-07-30  Pat Rogers  <rogers@adacore.com>
3596         * gnat_ugn.texi: Minor correction to description of -gnatw.K.
3598 2014-07-30  Ed Schonberg  <schonberg@adacore.com>
3600         * sem_util.adb (Wrong_Type): Disable some checks equally within
3601         instances and within inlined bodies, to suppress spurious type
3602         errors on already analyzed code.
3603         * sem_aggr.adb (Check_Expr_OK_In_Limited_Aggregate): Expression
3604         is legal in an inlined body, juts as it is in an instance body.
3606 2014-07-30  Ed Schonberg  <schonberg@adacore.com>
3608         * sem_res.adb (Resolve_Unchecked_Conversion): Within an inlined
3609         body the operand of an unchecked conversion may be a literal, in
3610         which case its type is the target type of the conversion. This
3611         is in contrast to conversions in other contexts, where the
3612         operand cannot be a literal and must be resolvable independent
3613         of the context.
3615 2014-07-30  Pierre-Marie Derodat  <derodat@adacore.com>
3617         * gcc-interface/decl.c (gnat_to_gnu_entity) <object>: Create a
3618         mere scalar constant instead of a reference for a renaming of
3619         scalar literal.
3620         * gcc-interface/utils.c (renaming_from_generic_instantiation_p): New.
3621         * gcc-interface/gigi.h (renaming_from_generic_instantiation_p): New.
3623 2014-07-30  Robert Dewar  <dewar@adacore.com>
3625         * s-tasuti.adb, s-tasuti.ads, einfo.ads, sem_prag.adb, s-taasde.adb,
3626         g-socthi-vms.adb, s-taprop-mingw.adb, s-interr.adb, s-interr-hwint.adb,
3627         g-decstr.adb, s-tasdeb-vms.adb, g-expect-vms.adb, makeutl.adb,
3628         s-interr-vms.adb, g-socthi.adb, exp_aggr.adb, s-tasdeb.adb,
3629         g-awk.adb, gnatls.adb, s-taspri-posix.ads, g-catiio.adb,
3630         s-interr-sigaction.adb, s-os_lib.adb, s-fileio.adb: Minor reformatting
3631         & code reorganization.
3633 2014-07-30  Bob Duff  <duff@adacore.com>
3635         * s-tassta.adb, sem_util.ads: Minor reformatting.
3637 2014-07-30  Yannick Moy  <moy@adacore.com>
3639         * inline.adb (Build_Body_To_Inline): Detect when
3640         subprogram has multiple returns, or not a single last return
3641         statement, in GNATprove mode.
3642         (Cannot_Inline): Simplify logic to handle case of GNATprove
3643         inlining first.
3645 2014-07-30  Ed Schonberg  <schonberg@adacore.com>
3647         * sem_ch6.adb: Stubs are not subject to inlining.
3649 2014-07-30  Bob Duff  <duff@adacore.com>
3651         * s-tasuti.ads, s-tasuti.adb (Make_Independent): Change this
3652         from a procedure to a function, so that it can more easily be
3653         called before the "begin" of a task.
3654         * s-taasde.ads (Delay_Block): Make this type immutably limited,
3655         so we can use a build-in-place function call to initialize
3656         Timer_Queue in the body.
3657         * a-rttiev.adb, s-asthan-vms-alpha.adb, s-asthan-vms-ia64.adb,
3658         * s-interr.adb, s-interr-hwint.adb, s-interr-sigaction.adb,
3659         * s-interr-vms.adb, s-taasde.adb: Each independent task now calls
3660         Make_Independent before reaching its "begin", to avoid race
3661         conditions. This causes the activating task to wait until after
3662         Make_Independent is complete before proceeding.  In addition,
3663         we initialize data structures used by independent tasks before
3664         activating those tasks, to avoid possible use of uninitialized data.
3665         * s-interr.ads, s-intman.ads, s-taspri-posix.ads, s-tasdeb.ads:
3666         Minor comment fixes.
3668 2014-07-30  Bob Duff  <duff@adacore.com>
3670         * a-exctra.ads, s-traent-vms.ads, s-traent.ads (Tracebacks_Array): Move
3671         the declaration of Tracebacks_Array from Ada.Exceptions.Traceback to
3672         System.Traceback_Entries (s-traent.ads and s-traent-vms.ads).  Add
3673         subtypes renaming Tracebacks_Array in Ada.Exceptions.Traceback.
3674         * g-debpoo.adb: Refer to Tracebacks_Array in its new home.
3676 2014-07-30  Arnaud Charlet  <charlet@adacore.com>
3678         * a-tasatt.adb: Remove old comments.
3680 2014-07-30  Yannick Moy  <moy@adacore.com>
3682         * einfo.ads (Is_Inlined): Document new use in GNATprove mode.
3683         * inline.adb (Can_Be_Inlined_In_GNATprove_Mode): Add comments
3684         to explain rationale for inlining or not in GNATprove mode.
3685         (Expand_Inlined_Call): In GNATprove mode, set Is_Inlined flag
3686         to False when inlining is not possible.
3687         * sem_ch6.adb (Analyze_Subprogram_Body_Helper): Set Is_Inlined
3688         flag to indicate that subprogram is fully inlined. To be reversed
3689         if inlining problem is found.
3690         * sem_res.adb (Resolve_Call): Set Is_Inlined flag to False when
3691         call in potentially unevaluated context.
3693 2014-07-30  Jose Ruiz  <ruiz@adacore.com>
3695         * s-tarest.adb, s-tarest.ads: Fix comments.
3697 2014-07-30  Robert Dewar  <dewar@adacore.com>
3699         * exp_attr.adb, checks.adb, sem_util.adb, sem_util.ads, sem_attr.adb:
3700         Change No_Scalar_Parts predicate to Scalar_Part_Present and
3701         invert sense of test. This avoids the "not No_xxx" situation
3702         which is always ugly.
3704 2014-07-30  Ed Schonberg  <schonberg@adacore.com>
3706         * inline.adb (Expand_Inlined_Call): When generating code for
3707         an internal subprogram the expansion uses the location of the
3708         call, so that gdb can skip over it. In GNATprove mode we want to
3709         preserve slocs of original subprogram when expanding an inlined
3710         call, to obtain better warnings, even though subprogram appears
3711         not to come from source if it is the inlining of a subprogram
3712         body without a previous spec.
3714 2014-07-30  Eric Botcazou  <ebotcazou@adacore.com>
3716         * exp_aggr.adb (Aggr_Assignment_OK_For_Backend): Reject array
3717         types with atomic components.
3719 2014-07-30  Thomas Quinot  <quinot@adacore.com>
3721         * Make-generated.in: Remove now unnecessary targets after s-oscons
3722         reorg.
3724 2014-07-30  Yannick Moy  <moy@adacore.com>
3726         * sem_res.adb (Resolve_Call): Use ultimate alias
3727         of callee when available.
3729 2014-07-30  Ed Schonberg  <schonberg@adacore.com>
3731         * sem_ch6.adb (Analyze_Expression_Function): To check whether
3732         an expression function is a completion, use the specification of
3733         the previous declaration, not its entity, which may be internally
3734         generated in an inlined context.
3736 2014-07-30  Doug Rupp  <rupp@adacore.com>
3738         * adaint.c (__gnat_tmp_name) [__ANDROID__]: Default to putting
3739         temp files in /cache directory unless overridden by TMPDIR.
3741 2014-07-30  Jose Ruiz  <ruiz@adacore.com>
3743         * s-tassta.adb, s-tarest.adb (Initialize, Create_Task,
3744         Create_Restricted_Task): Remove redundant check. Number_Of_CPUs returns
3745         type CPU, so it can never be greater than CPU_Range'Last.
3747 2014-07-30  Bob Duff  <duff@adacore.com>
3749         * s-taskin.ads: Minor comment fix.
3751 2014-07-30  Thomas Quinot  <quinot@adacore.com>
3753         * g-socket.adb: Remove now useless WITH, USE, and USE TYPE
3754         clauses.
3756 2014-07-30  Yannick Moy  <moy@adacore.com>
3758         * debug.adb: Free debug flag dQ used for frontend inlining in
3759         GNATprove mode..
3760         * sem_ch6.adb (Analyze_Subprogram_Body_Helper): Remove test of
3761         debug flag..
3763 2014-07-30  Thomas Quinot  <quinot@adacore.com>
3765         * Make-generated.in: Remove generation of s-oscons.ads, only
3766         generate the xoscons utility, in runtime-agnostic rules.
3767         * gcc-interface/Makefile.in: Clean up rules. Remove VMS parts,
3768         no longer supported.
3770 2014-07-30  Bob Duff  <duff@adacore.com>
3772         * exp_ch6.adb (Add_Task_Actuals_To_Build_In_Place_Call): New
3773         parameter Chain to be used in the allocator case.
3774         (Make_Build_In_Place_Call_In_Allocator): If the allocated object
3775         has tasks, wrap the code in a block that will activate them,
3776         including the usual finalization code to kill them off in case
3777         of exception or abort.
3779 2014-07-30  Robert Dewar  <dewar@adacore.com>
3781         * treepr.adb, treepr.ads; Reorganize documentation for new pp routines
3782         Remove renamings (don't work for gdb).
3783         (par): New synonym for p (avoid gdb ambiguities).
3784         * inline.adb, sem_ch6.adb, sem_ch13.adb: Minor reformatting.
3786 2014-07-30  Bob Duff  <duff@adacore.com>
3788         * exp_ch9.ads, sem_prag.adb, exp_ch4.adb, sem_ch13.adb: Minor comment
3789         fixes.
3790         * treepr.ads, treepr.adb (ppp): Make this debugging routine
3791         accept any type covered by Union_Id.
3793 2014-07-30  Robert Dewar  <dewar@adacore.com>
3795         * sem_ch4.adb (Analyze_If_Expression): Resolve condition before
3796         analyzing branches.
3797         * sem_eval.adb (Out_Of_Range): Check for statically unevaluated
3798         expression case.
3800 2014-07-30  Robert Dewar  <dewar@adacore.com>
3802         * sem_ch13.adb (Analyze_Aspect, predicate cases): Diagnose use
3803         of predicate aspect on entity other than a type.
3805 2014-07-30  Ed Schonberg  <schonberg@adacore.com>
3807         * sem_ch6.adb (Body_Has_Contract): New predicate to determine
3808         when a subprogram body without a previous spec cannot be inlined
3809         in GNATprove mode, because it includes aspects or pragmas that
3810         generate a SPARK contract clause.
3811         * inline.adb (Can_Be_Inlined_In_GNATprove_Mode): A subprogram
3812         instance cannot be inlined.
3814 2014-07-30  Robert Dewar  <dewar@adacore.com>
3816         * debug.adb: Document that d7 suppresses compilation time output.
3817         * errout.adb (Write_Header): Include compilation time in
3818         header output.
3819         * exp_intr.adb (Expand_Intrinsic_Call): Add
3820         Compilation_Date/Compilation_Time (Expand_Source_Info): Expand
3821         Compilation_Date/Compilation_Time.
3822         * g-souinf.ads (Compilation_Date): New function
3823         (Compilation_Time): New function.
3824         * gnat1drv.adb (Gnat1drv): Set Opt.Compilation_Time.
3825         * gnat_rm.texi (Compilation_Date): New function
3826         (Compilation_Time): New function.
3827         * opt.ads (Compilation_Time): New variable.
3828         * s-os_lib.ads, s-os_lib.adb (Current_Time_String): New function.
3829         * sem_intr.adb (Compilation_Date): New function.
3830         (Compilation_Time): New function.
3831         * snames.ads-tmpl (Name_Compilation_Date): New entry.
3832         (Name_Compilation_Time): New entry.
3834 2014-07-30  Yannick Moy  <moy@adacore.com>
3836         * inline.adb: Add comment.
3838 2014-07-30  Ed Schonberg  <schonberg@adacore.com>
3840         * par-ch4.adb (Is_Parameterless_Attribute): 'Result is a
3841         parameterless attribute, and a postondition can mention an
3842         indexed component or a slice whose prefix is an attribute
3843         reference F'Result.
3845 2014-07-30  Robert Dewar  <dewar@adacore.com>
3847         * sprint.adb (Sprint_Node_Actual, case Object_Declaration):
3848         Avoid bomb when printing package Standard.
3850 2014-07-30  Ed Schonberg  <schonberg@adacore.com>
3852         * sem_elab.adb (Check_Internal_Call_Continue): If an elaboration
3853         entity is created at this point, ensure that the name of the
3854         flag is unique, because the subprogram may be overloaded and
3855         other homonyms may also have elaboration flags created on the fly.
3857 2014-07-30  Hristian Kirtchev  <kirtchev@adacore.com>
3859         * sem_attr.adb (Analyze_Array_Component_Update): New routine.
3860         (Analyze_Attribute): Major cleanup of attribute
3861         'Update. The logic is now split into two distinct routines
3862         depending on the type of the prefix. The use of <> is now illegal
3863         in attribute 'Update.
3864         (Analyze_Record_Component_Update): New routine.
3865         (Check_Component_Reference): Removed.
3866         (Resolve_Attribute): Remove the return statement and ??? comment
3867         following the processing for attribute 'Update. As a result,
3868         the attribute now freezes its prefix.
3870 2014-07-30  Javier Miranda  <miranda@adacore.com>
3872         * exp_ch4.adb (Apply_Accessibility_Check): Do
3873         not call Base_Address() in VM targets.
3875 2014-07-30  Yannick Moy  <moy@adacore.com>
3877         * gnat1drv.adb (Adjust_Global_Switches): Set
3878         Ineffective_Inline_Warnings to True in GNATprove mode.
3879         * inline.adb (Cannot_Inline): Prepare new semantics for GNATprove
3880         mode of inlining.
3881         * opt.ads (Ineffective_Inline_Warnings): Add comment that
3882         describes use in GNATprove mode.
3883         * sem_prag.adb (Analyze_Pragma|SPARK_Mode): Ignore
3884         pragma when applied to the special body created for inlining.
3886 2014-07-30  Robert Dewar  <dewar@adacore.com>
3888         * inline.adb, exp_ch4.adb, sinput.adb, sem_ch6.adb, sem_ch13.adb:
3889         Minor reformatting.
3891 2014-07-30  Hristian Kirtchev  <kirtchev@adacore.com>
3893         * aspects.ads Add a comment explaining why SPARK 2014 aspects are
3894         not delayed. Update the delay status of most SPARK 2014 aspects.
3895         * sem_ch13.adb (Analyze_Aspect_Specifications): Update all calls
3896         to Decorate_Aspect_And_Pragma and Insert_Delayed_Pragma to refert
3897         to Decorate and Insert_Pragma. Add various comments concerning
3898         the delay status of several SPARK 2014 aspects. The insertion
3899         of Refined_State now uses routine Insert_After_SPARK_Mode.
3900         (Decorate): New routine.
3901         (Decorate_Aspect_And_Pragma): Removed.
3902         (Insert_Delayed_Pragma): Removed.
3903         (Insert_Pragma): New routine.
3905 2014-07-30  Ed Schonberg  <schonberg@adacore.com>
3907         * inline.adb (Expand_Inlined_Call): In GNATprove mode, emit
3908         only a warning, not an error on an attempt to inline a recursive
3909         subprogram.
3911 2014-07-30  Robert Dewar  <dewar@adacore.com>
3913         * g-forstr.adb: Minor code reorganization (use J rather than I
3914         as a variable name).
3915         * gnat_rm.texi, sem_prag.adb, sem_util.adb, sem_ch13.adb,
3916         g-forstr.ads: Minor reformatting.
3918 2014-07-30  Eric Botcazou  <ebotcazou@adacore.com>
3920         * sprint.adb (Set_Debug_Sloc): Also reset the end location if
3921         we are debugging the generated code.
3923 2014-07-30  Yannick Moy  <moy@adacore.com>
3925         * sinput.ads, sinput.adb (Comes_From_Inlined_Body): New function that
3926         returns True for source pointer for an inlined body.
3928 2014-07-30  Javier Miranda  <miranda@adacore.com>
3930         * exp_ch4.adb (Apply_Accessibility_Check): Add
3931         missing calls to Base_Address().
3933 2014-07-30  Ed Schonberg  <schonberg@adacore.com>
3935         * sem_ch6.adb (Hanalyze_Subprogram_Body_Helper): In GNATprove
3936         mode, subprogram bodies without a previous declaration are also
3937         candidates for front-end inlining.
3939 2014-07-30  Hristian Kirtchev  <kirtchev@adacore.com>
3941         * aspects.ads Aspects Async_Readers, Async_Writers,
3942         Effective_Reads and Effective_Writes do not need to be delayed.
3943         * sem_ch13.adb (Analyze_Aspect_Specifications): Propagate the
3944         optional Boolean expression when generating the corresponding
3945         pragma for an external property aspect.
3946         * sem_prag.adb (Analyze_External_Property_In_Decl_Part): Remove
3947         local constant Obj. Add local constant Obj_Id. Reimplement the
3948         check which ensures that the related variable is in fact volatile.
3949         (Analyze_Pragma): Reimplement the analysis of external property pragmas.
3950         * sem_util.adb (Is_Enabled): New routine.
3951         (Variable_Has_Enabled_Property): Reimplement the detection of
3952         an enabled external property.
3954 2014-07-30  Sergey Rybin  <rybin@adacore.com frybin>
3956         * gnat_ugn.texi, vms_data.ads: gnatstub: describe generating subunits
3957         for body stubs.
3959 2014-07-30  Pascal Obry  <obry@adacore.com>
3961         * g-forstr.adb, g-forstr.ads: New.
3962         * gnat_rm.texi, impunit.adb Makefile.rtl: Add new unit
3963         GNAT.Formatted_String.
3965 2014-07-30  Eric Botcazou  <ebotcazou@adacore.com>
3967         * exp_aggr.adb (Aggr_Assignment_OK_For_Backend): New predicate.
3968         (Expand_Array_Aggregate): Also enable in-place expansion for
3969         code generated by the compiler.  For an object declaration,
3970         set the kind of the object in addition to its type.  If an
3971         in-place assignment is to be generated and it can be directly
3972         done by the back-end, do not expand the aggregate.
3973         * fe.h (Is_Others_Aggregate): Declare.
3974         * gcc-interface/trans.c
3975         (gnat_to_gnu) <N_Assignment_Statement>: Add support for an
3976         aggregate with a single Others choice on the RHS by means of
3977         __builtin_memset.  Tidy up.
3979 2014-07-30  Ed Schonberg  <schonberg@adacore.com>
3981         * gnat_rm.texi: minor reformatting.
3983 2014-07-30  Yannick Moy  <moy@adacore.com>
3985         * sem_ch6.adb (Analyze_Subprogram_Helper_Body): Remove body to inline
3986         in SPARK_Mode Off.
3988 2014-07-30  Robert Dewar  <dewar@adacore.com>
3990         * gnat_rm.texi: Document additional implementation-defined use
3991         of Constrained.
3993 2014-07-30  Robert Dewar  <dewar@adacore.com>
3995         * prj-proc.adb, prj-strt.adb: Update comments.
3997 2014-07-30  Gary Dismukes  <dismukes@adacore.com>
3999         * sinfo.ads, einfo.ads, checks.ads: Minor typo fix and reformatting.
4001 2014-07-30  Vincent Celier  <celier@adacore.com>
4003         * prj-proc.adb (Imported_Or_Extended_Project_From): New Boolean
4004         parameter No_Extending, defaulted to False. When No_Extending
4005         is True, do not look for an extending project.
4006         (Expression): For a variable reference that is not for the current
4007         project, get its Id calling Imported_Or_Extended_Project_From
4008         with No_Extending set to True.
4009         * prj-strt.adb (Parse_Variable_Reference): If a referenced
4010         variable is not found in the current project, check if it is
4011         defined in one of the projects it extends.
4013 2014-07-30  Robert Dewar  <dewar@adacore.com>
4015         * sem_util.adb (Predicate_Tests_On_Arguments): Omit tests for
4016         some additional cases of internally generated routines.
4018 2014-07-30  Ed Schonberg  <schonberg@adacore.com>
4020         * sem_ch10.adb (Analyze_Proper_Body): When compiling for ASIS,
4021         if the compilation unit is a subunit, extend optional processing
4022         to all subunits of the current one. This allows gnatstub to
4023         supress generation of spurious bodies.
4025 2014-07-30  Hristian Kirtchev  <kirtchev@adacore.com>
4027         * a-cbmutr.adb (Insert_Child): Use local variable First to keep
4028         track of the initial element's index within the tree.
4030 2014-07-29  Hristian Kirtchev  <kirtchev@adacore.com>
4032         * a-cbmutr.adb (Allocate_Node): Remove the two parameter version.
4033         (Insert_Child): Add local variable First. Capture the index of the
4034         first node being created to ensure correct cursor construction
4035         later on. Use the three parameter version of Allocate_Node
4036         when creating multiple children as this method allows aspect
4037         Default_Value to take effect (if applicable).
4039 2014-07-29  Eric Botcazou  <ebotcazou@adacore.com>
4041         * exp_aggr.adb (Safe_Slice_Assignment): Remove.
4042         (Expand_Array_Aggregate): For a safe slice assignment, just set
4043         the target and use the common code path.
4045 2014-07-29  Robert Dewar  <dewar@adacore.com>
4047         * sem_util.adb, sem_util.ads, sem_res.adb, exp_ch6.adb: Invert
4048         predicate No_Predicate_Test_On_Arguments, new name is
4049         Predicate_Tests_On_Arguments (with the opposite sense).
4051 2014-07-29  Hristian Kirtchev  <kirtchev@adacore.com>
4053         * sem_attr.adb (Resolve_Attribute): Clean up the code for
4054         attribute 'Access. Do not generate an elaboration flag for a
4055         stand alone expression function. The expression of an expression
4056         function is now frozen when the expression function appears as
4057         the prefix of attribute 'Access.
4058         * sem_ch6.adb (Analyze_Expression_Function): Remove local
4059         variable New_Decl and update all references to it after the
4060         rewriting has taken place. Establish the linkages between the
4061         generated spec and body.
4063 2014-07-29  Robert Dewar  <dewar@adacore.com>
4065         * sem_prag.adb (ip, rv): Prevent from being optimized away.
4066         * gnatls.adb (gnatls): Set E_Fatal exit status if ali file not found.
4067         * s-imgllb.adb, s-imgllw.adb, s-imgwiu.adb, s-imgbiu.adb: Minor
4068         reformatting.
4070 2014-07-29  Vincent Celier  <celier@adacore.com>
4072         * prj-pp.adb: Minor comment update.
4073         * frontend.adb: If a target dependency info file has been read
4074         through switch -gnateT= add it to the dependencies of the source
4075         being compiled.
4077 2014-07-29  Robert Dewar  <dewar@adacore.com>
4079         * sem_ch3.adb, prj.adb: Minor reformatting.
4081 2014-07-29  Vincent Celier  <celier@adacore.com>
4083         * prj-pp.adb (Pretty_Print.Output_Project_File): New
4084         procedure to output project file names between quotes without
4085         concatenation, even if the line is too long.
4086         (Pretty_Print): Use Output_Project_File for project being extended and
4087         project imported.
4089 2014-07-29  Vincent Celier  <celier@adacore.com>
4091         * gnat_ugn.texi: Document that configuration pragmas files are
4092         added to the dependencies, unless they contain only pragmas
4093         Source_File_Name_Project.
4095 2014-07-29  Robert Dewar  <dewar@adacore.com>
4097         * frontend.adb: Minor reformatting.
4099 2014-07-29  Robert Dewar  <dewar@adacore.com>
4101         * exp_ch6.adb (Add_Call_By_Copy_Code): Minor reformatting
4102         (Expand_Actuals): Make sure predicate checks are properly applied
4103         for the case of OUT or IN OUT parameters.
4104         * sem_res.adb: Minor reformatting (Resolve_Actuals): Skip
4105         predicate tests on arguments for Finalize
4106         * sem_util.adb (No_Predicate_Test_On_Arguments): Returns True
4107         if predicate tests on subprogram arguments should be skipped.
4108         * sem_util.ads (No_Predicate_Test_On_Arguments): New function
4110 2014-07-29  Ed Schonberg  <schonberg@adacore.com>
4112         * sem_ch3.adb (Analyze_Object_Declaration): If there is an address
4113         clause for the object and the expression is an aggregate, defer
4114         resolution and expansion of the aggregate until the freeze point
4115         of the entity.
4116         * sem_aggr.adb (Resolve_Aggregate): An others_clause is legal if
4117         the parent node is an N_Reference generated during expansion.
4119 2014-07-29  Vincent Celier  <celier@adacore.com>
4121         * prj.adb (Add_To_Buffer): Effectively double the size of the buffer.
4123 2014-07-29  Robert Dewar  <dewar@adacore.com>
4125         * frontend.adb, inline.adb, sem_util.adb, sem_res.adb,
4126         prepcomp.ads: Minor reformatting and code clean up.
4127         * exp_ch6.adb (Expand_Actuals): Generate predicate test
4128         unconditionally for case of OUT or IN OUT actual (before this
4129         was generated only for certain subcases, which is wrong, the
4130         test is always needed).
4132 2014-07-29  Ed Schonberg  <schonberg@adacore.com>
4134         * sem_ch3.adb: Move Has_Defaulted_Discriminants to sem_util.
4135         * sem_ch4.adb (Analyze_Allocator): Defer resolution of expression
4136         until context type is available.
4137         * sem_res.adb (Resolve_Allocator): In the case of a qualified
4138         expression, complete resolution of expression.
4139         (Check_Aliased_Parameter): New procedure within Resolve_Actuals,
4140         to apply Ada2012 checks on aliased formals, as well as
4141         accesibility checks when the context of the call is an allocator
4142         or a qualified expression.
4143         * sem_util.ads, sem_util.adb (Has_Defaulted_Discriminants):
4144         Moved here from sem_ch3.
4145         (Object_Access_Level): Handle properly aliased formals and
4146         aggregates.
4147         * exp_ch6.adb (Expand_Call): Remove check on aliased parameters,
4148         now properly performed in sem_res (Resolve_Actuals,
4149         Check_Aliased_Parameter).
4151 2014-07-29  Yannick Moy  <moy@adacore.com>
4153         * debug.adb Enable GNATprove inlining under debug flag -gnatdQ for now.
4154         * inline.ads, inline.adb (Can_Be_Inlined_In_GNATprove_Mode): New
4155         function to decide when a subprogram can be inlined in GNATprove mode.
4156         (Check_And_Build_Body_To_Inline): Include GNATprove_Mode as a
4157         condition for possible inlining.
4158         * sem_ch10.adb (Analyze_Compilation_Unit): Remove special case
4159         for Inline_Always in GNATprove mode.
4160         * sem_ch6.adb (Analyze_Subprogram_Body_Helper): Build inlined
4161         body for subprograms in GNATprove mode, under debug flag -gnatdQ.
4162         * sem_prag.adb Minor change in comments.
4163         * sem_res.adb (Resolve_Call): Only perform GNATprove inlining
4164         inside subprograms marked as SPARK_Mode On.
4165         * sinfo.ads: Minor typo fix.
4167 2014-07-29  Vincent Celier  <celier@adacore.com>
4169         * frontend.adb: Add dependency on gnat.adc when taken into account
4170         and on non-temporary configuration pragmas files specified in
4171         switches -gnatec.
4172         * prepcomp.ads, prepcomp.adb (Add_Dependency): New procedure to add
4173         dependencies on configuration pragmas files.
4175 2014-07-29  Pat Rogers  <rogers@adacore.com>
4177         * gnat_ugn.texi: Minor clarification to the explanation for the
4178         GNATtest -v switch.
4180 2014-07-29  Robert Dewar  <dewar@adacore.com>
4182         * types.ads (Mechanism_Type): Change range back to -18 .. Int'Last with
4183         documentation that explains the need for this extended range
4184         (use by C_Pass_By_Copy).
4186 2014-07-29  Robert Dewar  <dewar@adacore.com>
4188         * gnat_rm.texi, sem_prag.adb: Minor reformatting.
4190 2014-07-29  Sergey Rybin  <rybin@adacore.com frybin>
4192         * gnat_ugn.texi: gnatmetric: clarify documentation for cyclomatic
4193         complexity metrics.
4195 2014-07-29  Thomas Quinot  <quinot@adacore.com>
4197         PR ada/60652
4198         * s-oscons-tmplt.c: For Linux, define _BSD_SOURCE in order for
4199         CRTSCTS to be visible.
4201 2014-07-29  Bob Duff  <duff@adacore.com>
4203         * g-trasym.adb, g-trasym.ads: Code cleanup.
4205 2014-07-29  Doug Rupp  <rupp@adacore.com>
4207         * sigtramp-vxworks.c: Minor reformatting.
4209 2014-07-29  Ed Schonberg  <schonberg@adacore.com>
4211         * gnat_rm.texi: No doc needed for Ada2012 aspect
4212         Implicit_dereference.
4214 2014-07-29  Robert Dewar  <dewar@adacore.com>
4216         * sem_attr.adb (Attribute_12): New array
4217         (Analyze_Attribute): Check impl-defined Ada 2012 attributes.
4218         (Check_Ada_2012_Attribute): Removed.
4220 2014-07-29  Doug Rupp  <rupp@adacore.com>
4222         * init.c (vxworks6): Call sigtramp for RTP (as well as DKM) for ARM,
4223         PPC, and e500.
4224         * sigtramp-vxworks.c: New file.
4225         * sigtramp-armvxw.c, sigtramp-ppcvxw.c: removed files.
4227 2014-07-29  Ed Schonberg  <schonberg@adacore.com>
4229         * lib-xref.adb (Output_Refs, Check_Type_Reference): For a
4230         derived array type, add information about component type, which
4231         was previously missing in ali file.
4232         * gnat_rm.texi: Add documentation for Atomic_Always_Lock_Free.
4234 2014-07-29  Thomas Quinot  <quinot@adacore.com>
4236         * sem_ch3.adb (Constrain_Corresponding_Record): For the case
4237         of the subtype created for a record component, do not mark
4238         the subtype as frozen. For one thing, this is anomalous (in
4239         particular, the base type might not itself be frozen yet);
4240         furthermore, proper freezing of the subtype must happen in any
4241         case. So, we just mark the subtype as requiring delayed freezing
4242         (and we'll actually freeze it when generating the init_proc of
4243         the enclosing record).
4244         Also change the name of the constrained record subtype (append a
4245         'C' so that it is clearly different from the unconstrained record
4246         type, "related_idV") to make debugging easier.
4247         (Process_Full_View): When creating a full subtype for a pending
4248         private subtype, re-establish the scope of the private subtype
4249         so that we get proper visibility on outer discriminants.
4250         * exp_ch3.adb (Build_Init_Statements): Freeze any component
4251         subtype that is not frozen yet.
4253 2014-07-29  Vincent Celier  <celier@adacore.com>
4255         * prj-proc.adb (Recursive_Process): Always initialize the
4256         environment when the project is an aggregate project, even when
4257         it is not the root tree.
4258 2014-07-29  Robert Dewar  <dewar@adacore.com>
4260         * exp_ch5.adb, exp_ch9.adb: Minor comment additions.
4261         * gnat_rm.texi: Complete list of implementation aspects.
4262         * aspects.ads: Minor comment clarification.
4264 2014-07-29  Ed Schonberg  <schonberg@adacore.com>
4266         * exp_ch5.adb (Expand_N_Assignment_Statement): If the target type
4267         is a null-excluding access type, do not generate a constraint
4268         check if Suppress_Assignment_Checks is set on assignment node.
4269         * exp_ch9.adb (Build_Simple_Entry_Call): If actual is an out
4270         parameter of a null-excluding access type, there is access check
4271         on entry, so set Suppress_Assignment_Checks on generated statement
4272         that assigns actual to parameter block.
4273         * sinfo.ads: Document additional use of Suppress_Assignment_Checks.
4275 2014-07-29  Robert Dewar  <dewar@adacore.com>
4277         * gnat_rm.texi: Change theta to @ in documentation of aspect
4278         Dimension_System.
4280 2014-07-29  Robert Dewar  <dewar@adacore.com>
4282         * sem_attr.adb (Uneval_Old_Msg): Flags Uneval_Old_Accept/Warn
4283         are now on pragma.
4284         * sem_ch13.adb (Analyze_Aspect_Specifications): Remove setting
4285         of Uneval_Old_*
4286         * sem_prag.adb (Analyze_Pragma): Set Uneval_Old_* flags
4287         * sinfo.ads, sinfo.adb: Move Uneval_Old_Accept/Warn to N_Pragma node.
4289 2014-07-29  Javier Miranda  <miranda@adacore.com>
4291         * types.ads Update documentation on how to add new reason codes
4292         for exceptions.
4293         (RT_Exception_Code): Keep values ordered by their
4294         reason code.  Required by the .NET backend.
4295         (RT_CE_Exceptions): Subtype declaration removed.
4296         (RT_PE_Exceptions): Subtype declaration removed.
4297         (RT_SE_Exceptions): Subtype declaration removed.
4298         (Kind): New mapping table of RT_Exception_Codes.
4299         * exp_ch11.adb (Get_RT_Exception_Entity): Updated to use the
4300         new mapping table.
4301         * tbuild.adb (Make_Raise_Storage_Error): Updated to use the new
4302         mapping table.  (Make_Raise_Program_Error): Updated to use the
4303         new mapping table.
4304         (Make_Raise_Storage_Error): Updated to use the new mapping table.
4305         * a-except.adb Keep Rcheck_CE_xxx entities ordered according to
4306         their reason code.
4308 2014-07-29  Thomas Quinot  <quinot@adacore.com>
4310         * gnat_rm.texi: Document internal attributes used for PolyORB/DSA
4311         distributed stubs generation.
4312         * exp_ch3.adb: Minor reformatting.
4314 2014-07-29  Yannick Moy  <moy@adacore.com>
4316         * sinfo.ads: Document constraint between frontend and GNATprove.
4318 2014-07-29  Robert Dewar  <dewar@adacore.com>
4320         * a-except.adb: Minor comment clarification.
4322 2014-07-29  Robert Dewar  <dewar@adacore.com>
4324         * gnat_rm.texi: Complete list of implementation attributes.
4325         * snames.ads-tmpl: Clean up list of impl-defined attributes.
4327 2014-07-29  Hristian Kirtchev  <kirtchev@adacore.com>
4329         * freeze.adb (Freeze_Record_Type): Perform various
4330         volatility-related checks.
4332 2014-07-29  Robert Dewar  <dewar@adacore.com>
4334         * sem_ch3.adb, sem_eval.adb: Minor reformatting.
4336 2014-07-29  Ed Schonberg  <schonberg@adacore.com>
4338         * sem_attr.adb: sem_attr.adb (Access_Attribute): Handle properly
4339         the case where the attribute reference appears in a nested scope
4340         from that of the subprogram prefix.
4341         * sem_attr.adb: Minor reformatting.
4343 2014-07-29  Robert Dewar  <dewar@adacore.com>
4345         * gnat_ugn.texi: Clarify documentation of Initialize_Scalar
4346         initialization options.
4348 2014-07-29  Robert Dewar  <dewar@adacore.com>
4350         * sinfo.ads: Minor comment addition.
4352 2014-07-29  Bob Duff  <duff@adacore.com>
4354         * sem_eval.adb, sem_ch13.adb: Minor reformatting.
4356 2014-07-29  Doug Rupp  <rupp@adacore.com>
4358         * init.c: Complete previous change.
4360 2014-07-29  Robert Dewar  <dewar@adacore.com>
4362         * exp_ch4.adb (Expand_N_If_Expression): Deal with unconstrained
4363         array case.
4365 2014-07-29  Ed Schonberg  <schonberg@adacore.com>
4367         * sem_attr.adb (Access_Attribute): If the prefix is a subprogram
4368         and the completion will appear in the same declarative part,
4369         create elaboration flag.
4370         * exp_util.adb (Set_Elaboration_Flag): If the subprogram body
4371         is a completion of a declaration in the same declarative part,
4372         and the subprogram has had its address taken, add elaboration
4373         check inside the subprogram body, to detect elaboration errors
4374         that may occur through indirect calls.
4376 2014-07-29  Doug Rupp  <rupp@adacore.com>
4378         * sigtramp-armvxw.c: Enhance to handle RTP trampolining.
4379         * init.c: Remove guard on sigtramp for ARM VxWorks RTP.
4381 2014-07-29  Vincent Celier  <celier@adacore.com>
4383         * switch-c.adb (Scan_Front_End_Switches): Do not fail when two
4384         runtime directorie specified with two switches --RTS= designate
4385         the same directory, even when there are no literarily the same.
4387 2014-07-29  Robert Dewar  <dewar@adacore.com>
4389         * gnat_ugn.texi: Minor documentation clarification.
4390         * switch-c.adb: Minor reformatting.
4392 2014-07-29  Robert Dewar  <dewar@adacore.com>
4394         * sem_prag.adb (Analyze_Pragma, case Allow_Integer_Address):
4395         Fix incorrect RTE call which caused bomb if pragma was in
4396         configuration pragma file.
4398 2014-07-29  Jerome Lambourg  <lambourg@adacore.com>
4400         * expect.c (__gnat_expect_poll): Fix typo in previous change.
4401         * g-expect.adb: Update comments.
4403 2014-07-29  Arnaud Charlet  <charlet@adacore.com>
4405         * s-parame-hpux.ads, s-parame-vms-ia64.ads, s-parame.ads
4406         (Default_Attribute_Count): Bump to 16 on native platforms.
4408 2014-07-29  Ed Schonberg  <schonberg@adacore.com>
4410         * sem_res.adb: Add guard to front-end inlining for SPARK.
4412 2014-07-29  Robert Dewar  <dewar@adacore.com>
4414         * sem_ch10.adb, debug.adb, sem_prag.adb, sem_res.adb, sem_ch6.adb:
4415         Minor reformatting.
4417 2014-07-29  Ed Schonberg  <schonberg@adacore.com>
4419         * sem_ch6.adb (Analyze_Subprogram_Body_Helper): Build body to
4420         inline in GNATprove mode when subprogran is marked Inline_Always.
4421         * sem_res.adb (Resolve_Call): Expand call in place in GNATProve
4422         mode if body to inline is available.
4423         * sem_prag.adb (Analyze_Pragma, case Inline_Always): Make pragma
4424         effective in GNATprove mode.
4425         * sem_ch10.adb (Analyze_Compilation_Unit): Call
4426         Check_Package_Body_For_Inlining in GNATprove mode, so that body
4427         containing subprograms with Inline_Always can be available before
4428         calls to them.
4430 2014-07-29  Ed Schonberg  <schonberg@adacore.com>
4432         * inline.ads, inline.adb, sem_ch10.adb: Rename Check_Body_For_Inlining
4433         to Check_Package_Body_For_Inlining, to prevent confusion with other
4434         inlining subprograms.
4436 2014-07-29  Robert Dewar  <dewar@adacore.com>
4438         * opt.ads: Minor comment update.
4439         * sem_attr.adb (Uneval_Old_Msg): Deal with case of aspect, where
4440         we want setting of Uneval_Old at time of encountering the aspect.
4441         * sem_ch13.adb (Analyze_Aspect_Specifications): Capture setting
4442         of Opt.Uneval_Old.
4443         * sinfo.adb (Uneval_Old_Accept): New function (Uneval_Old_Warn):
4444         New function (Set_Uneval_Old_Accept): New procedure.
4445         (Set_Uneval_Old_Warn): New procedure.
4446         * sinfo.ads: Uneval_Old_Accept: New flag Uneval_Old_Warn: New flag.
4448 2014-07-29  Robert Dewar  <dewar@adacore.com>
4450         * sinfo.ads, inline.adb, inline.ads, sem_ch6.adb: Minor reformatting.
4451         * snames.ads-tmpl: Minor reformatting.
4452         * xsnamest.adb (XSnamesT): Remove special casing of Name_Error
4453         to give <Error>.  Not clear why this was there, but the compiler
4454         sources do not reference Name_Error, and this interfered with
4455         the circuits for pragma Unevaluated_Use_Of_Old.
4457 2014-07-29  Hristian Kirtchev  <kirtchev@adacore.com>
4459         * sem_prag.adb (Process_Atomic_Shared_Volatile): Allow volatile
4460         types in SPARK 2014 (again).
4461         * sem_res.adb (Is_OK_Volatile_Context): New routine.
4462         (Resolve_Entity_Name): Ensure that a volatile object with
4463         enabled properties Async_Writers or Effectire_Reads appears in
4464         a non-interfering context.
4466 2014-07-29  Ed Schonberg  <schonberg@adacore.com>
4468         * sem_ch6.adb: Move Build_Body_To_Inline,
4469         Check_And_Buid_Body_To_Inline, and Cannot_Inline to package Inline.
4470         * exp_ch6.adb: Mode Expand_Inlined_Body to package Inline.
4471         * inline.ads, inline.adb: Package now contains subprograms that
4472         implement front-end inlining.  No functional changes, no test
4473         needed.
4475 2014-07-29  Robert Dewar  <dewar@adacore.com>
4477         * exp_dbug.adb, g-expect.adb, sem_elab.adb: Minor typo fix.
4479 2014-07-29  Ed Schonberg  <schonberg@adacore.com>
4481         * sem_ch6.adb (Analyze_Return_Type): Reject a return type that
4482         is a limited view when the context is a package body, because
4483         there is no subsequent place at which the non-limited view may
4484         become visible.
4485         (Process_Formals): Ditto.
4486         * sinfo.ads, par-ch3.adb: Minor reformatting.
4488 2014-07-29  Jerome Lambourg  <lambourg@adacore.com>
4490         * expect.c (__gnat_expect_poll): New parameter dead_process
4491         used to return the dead process among the array of file
4492         descriptors. The Windows, VMS and HPUX implementations now
4493         properly report the dead process via this parameter. Other unixes
4494         don't need it.
4495         * g-expect.adb (Poll): Adapt to the C profile.
4496         (Expect_Internal): Use the new parameter to properly close the
4497         File Descriptor.  This then can be properly reported by the
4498         function First_Dead_Process as is expected.
4500 2014-07-29  Robert Dewar  <dewar@adacore.com>
4502         * gnat_ugn.texi: Minor clarification of -gnatQ switch.
4504 2014-07-29  Robert Dewar  <dewar@adacore.com>
4506         * einfo.adb (Derived_Type_Link): New function
4507         (Set_Derived_Type_Link): New procedure.
4508         (Write_Field31_Name): Output Derived_Type_Link.
4509         * einfo.ads: New field Derived_Type_Link.
4510         * exp_ch6.adb (Expand_Call): Warn if change of representation
4511         needed on call.
4512         * sem_ch13.adb: Minor addition of ??? comment.
4513         (Rep_Item_Too_Late): Warn on case that is legal but could cause an
4514         expensive implicit conversion.
4515         * sem_ch3.adb (Build_Derived_Type): Set Derived_Type_Link if needed.
4517 2014-07-29  Hristian Kirtchev  <kirtchev@adacore.com>
4519         * exp_ch3.adb (Build_Init_Procedure): Renamed Local_DF_Id
4520         to DF_Id. Add new local variable DF_Call. Do not perform any
4521         elaboration-related checks on the call to the partial finalization
4522         routine within an init proc to avoid generating bogus elaboration
4523         warnings on expansion-related code.
4524         * sem_elab.adb (Check_A_Call): Move constant Access_Case to
4525         the top level of the routine.  Ensure that Output_Calls takes
4526         into account flags -gnatel and -gnatwl when emitting warnings
4527         or info messages.
4528         (Check_Internal_Call_Continue): Update the call to Output_Calls.
4529         (Elab_Warning): Moved to the top level of routine Check_A_Call.
4530         (Emit): New routines.
4531         (Output_Calls): Add new formal parameter Check_Elab_Flag along with a
4532         comment on usage. Output all warnings or info messages only when the
4533         caller context demands it and the proper elaboration flag is set.
4535 2014-07-29  Yannick Moy  <moy@adacore.com>
4537         * sem_attr.adb (Analyze_Attribute/Attribute_Old):
4538         Check rule about Old appearing in potentially unevaluated
4539         expression everywhere, not only in Post.
4541 2014-07-29  Arnaud Charlet  <charlet@adacore.com>
4543         * sem_prag.adb: Update comment.
4544         * a-except.adb, a-except-2005.adb: Minor editing.
4546 2014-07-29  Pierre-Marie Derodat  <derodat@adacore.com>
4548         * exp_dbug.adb (Debug_Renaming_Declaration):
4549         Do not create renaming entities for renamings of non-packed
4550         objects and for exceptions.
4552 2014-07-29  Robert Dewar  <dewar@adacore.com>
4554         * sem_ch3.adb, sinfo.ads, types.ads, sem_prag.adb, a-except-2005.adb,
4555         sem_ch6.adb, par-ch3.adb: Minor reformatting.
4557 2014-07-29  Ed Schonberg  <schonberg@adacore.com>
4559         * sem_ch6.adb (Check_Return_Subtype_Indication): Reject a return
4560         subtype indication in an extended return statement when the
4561         return value is an ancestor of the return type of the function,
4562         and that return type is a null record extension.
4564 2014-07-29  Thomas Quinot  <quinot@adacore.com>
4566         * sem_ch13.adb (Rep_Item_Too_Late): Specialize/clarify error
4567         message produced for the case of a type-related representation
4568         item that is made illegal by 13.10(1).
4569         * gnat_rm.texi (Scalar_Storage_Order): Minor change in
4570         documentation.
4572 2014-07-29  Robert Dewar  <dewar@adacore.com>
4574         * gnat_ugn.texi: Add section on Wide_Wide_Character encodings.
4575         * erroutc.adb (Output_Error_Msgs): Take wide characters into
4576         account in computing position of error flags.
4577         * sinput.adb (Get_Column_Number): Take wide characters into
4578         account.
4580 2014-07-29  Ed Schonberg  <schonberg@adacore.com>
4582         * par-ch3.adb (P_Access_Type_Definition): The subtype indication
4583         in an access type definition can carry a null_exclusion indicator.
4584         * sem_ch3.adb (Access_Type_Declaration): If the subtype indication
4585         carries a null_exclusion indicator, verify that the subtype
4586         indication denotes an access type, and create a null-excluding
4587         subtype for it.
4588         * sinfo.ads, sinfo.adb: New attribute Null_Excluding_Subtype,
4589         defined on N_Access_To_Object_Definition to indicate that the
4590         subtype indication carries a null_exclusion indicator.
4592 2014-07-29  Hristian Kirtchev  <kirtchev@adacore.com>
4594         * exp_ch6.adb (Add_Extra_Actual): Do not construct
4595         the extra actual by name, generate a reference instead.
4597 2014-07-29  Arnaud Charlet  <charlet@adacore.com>
4599         * sem_prag.adb (Analyze_Pragma): Do not crash analyzing
4600         Allow_Integer_Address if already set.
4601         * a-except-2005.adb (Rcheck_PE_Stream_Operation_Not_Allowed):
4602         Fix order, for consistency with Rmsg_xx declarations.
4604 2014-07-29  Ed Schonberg  <schonberg@adacore.com>
4606         * sem_ch4.adb (Complete_Object_Operation): If the type of the
4607         candidate subprogram is a limited view, use non-limited view
4608         when available.
4610 2014-07-29  Robert Dewar  <dewar@adacore.com>
4612         * sem_ch13.adb: Minor change in RM reference.
4613         * sem_mech.ads: Minor reformatting.
4614         * einfo.ads: Minor comment fix.
4615         * types.ads: Minor correction to range given for Mechanism_Type.
4616         * exp_ch6.adb (Add_Invariant_And_Predicate_Checks): Do not
4617         check predicate on way out for OUT or IN OUT parameters.
4618         * par-ch3.adb (P_Constraint_Opt): Handle missing RANGE keyword
4619         better (P_Range_Constraint): Corresponding fix.
4620         * checks.ads: Minor comment clarification.
4622 2014-07-29  Gary Dismukes  <dismukes@adacore.com>
4624         * sem_ch8.adb (Analyze_Object_Renaming): Set the Is_Volatile
4625         and Treat_As_Volatile flags based on whether the renamed object
4626         is a volatile object.
4628 2014-07-29  Olivier Hainque  <hainque@adacore.com>
4630         * g-debpoo.adb
4631         (Default_Alignment): Rename as Storage_Alignment. This is not
4632         a "default" that can be overriden. Augment comment to clarify
4633         intent and document why we need to manage alignment padding.
4634         (Header_Offset): Set to Header'Object_Size instead of 'Size
4635         rounded up to Storage_Alignment. Storage_Alignment on the
4636         allocation header is not required by our internals so was
4637         overkill. 'Object_Size is enough to ensure proper alignment
4638         of the header address when substracted from a storage address
4639         aligned on Storage_Alignment.
4640         (Minimum_Allocation): Rename as Extra_Allocation, conveying that
4641         this is always added on top of the incoming allocation requests.
4642         (Align): New function, to perform alignment rounding operations.
4643         (Allocate): Add comments on the Storage_Address computation
4644         scheme and adjust so that the alignment padding applies to that
4645         (Storage_Address) only.
4647 2014-07-29  Robert Dewar  <dewar@adacore.com>
4649         * exp_ch3.adb (Default_Initialize_Object): Remove incorrect
4650         pragma Unreferenced.
4651         * cstand.adb (Create_Standard): Use E_Array_Type for standard
4652         string types. Make sure index of Any_String/Any_Array is in a list.
4653         * errout.adb: Minor reformatting.
4655 2014-07-29  Robert Dewar  <dewar@adacore.com>
4657         * gnat_ugn.texi: Clean up and correct documentation of warnings.
4658         * usage.adb: Minor corrections to make sure warnings are properly
4659         documented.
4660         * warnsw.adb (Set_Warning_Switch): Remove redundant return statement.
4661         (WA_Warnings): Add Warn_On_Suspicious_Modulus_Value.
4663 2014-07-29  Ed Schonberg  <schonberg@adacore.com>
4665         * exp_ch3.adb (Expand_N_Object_Declaration): The dummy block
4666         created to match internal sequence numbers between compilations
4667         with/without abort must have its type properly set.
4669 2014-07-29  Robert Dewar  <dewar@adacore.com>
4671         * ali.adb (Initialize_ALI): Initialize SSO_Default_Specified
4672         (Scan_ALI): Set SSO_Default in ALIs_Record (Scan_ALI): Set
4673         SSO_Default_Specified.
4674         * ali.ads (ALIs_Record): Add field SSO_Default
4675         (SSO_Default_Specified): New global switch.
4676         * bcheck.adb (Check_Consistent_SSO_Default): New procedure
4677         (Check_Configuration_Consistency): Call this procedure
4678         * einfo.adb (SSO_Set_High_By_Default): New
4679         function (SSO_Set_Low_By_Default): New function
4680         (Set_SSO_Set_High_By_Default): New procedure
4681         (Set_SSO_Set_Low_By_Default): New procedure (Write_Entity_Flags):
4682         List new flags
4683         * einfo.ads (SSO_Set_Low_By_Default): New flag
4684         (SSO_Set_High_By_Default): New flag
4685         * freeze.adb (Set_SSO_From_Default): New procedure
4686         (Freeze_Array_Type): Call Set_SSO_From_Default
4687         (Freeze_Record_Type): Call Set_SSO_From_Default
4688         * gnat_rm.texi: Document pragma Default_Scalar_Storage_Order
4689         * lib-writ.adb (Write_ALI): Set OL/OH in P line as needed
4690         * lib-writ.ads: Add OL/OH parameters to P line
4691         * opt.adb: Set Default_SSO, Default_SSO_Config as appropriate
4692         * opt.ads (Default_SSO): New global switch (Default_SSO_Config):
4693         New global switch
4694         * repinfo.adb (List_Scalar_Storage_Order): List SSO when it is
4695         set by default using pragma Default_Scalar_Storage_Order.
4696         * sem.ads (Scope_Stack_Entry): Add component Save_Default_SSO
4697         * sem_ch13.adb (Inherit_Delayed_Rep_Aspects):
4698         Clear SSO defaults when explicit SSO is inherited.
4699         (Analyze_Attribute_Definition_Clause): Clear SSO defaults when
4700         explicit SSO is specified.
4701         (Inherit_Aspects_At_Freeze_Point):
4702         Clear SSO default when inheriting SSO.
4703         * sem_ch3.adb (Set_Default_SSO): New procedure
4704         (Analyze_Private_Extension_Declaration): Set defualt SSO
4705         (Array_Type_Declaration): ditto (Build_Derived_Array_Type): ditto
4706         (Build_Derived_Private_Type): ditto (Build_Derived_Record_Type):
4707         ditto (Build_Derived_Type): ditto (Make_Class_Wide_Type): ditto
4708         (Record_Type_Declaration): ditto
4709         * sem_ch8.adb (Pop_Scope): Restore Default_SSO (Push_Scope):
4710         Save Default_SSO
4711         * sem_prag.adb (Analyze_Pragma, case
4712         Default_Scalar_Storage_Order): Set Default_SSO
4714 2014-07-29  Ed Schonberg  <schonberg@adacore.com>
4716         * sem_ch6.adb (Valid_Operator_Definition): Verify that
4717         all parameter have mode IN. This check must be done here for
4718         subprogram instantiations that have operator names, because their
4719         analysis does not follow the same path as that for subprogram
4720         declarations.
4722 2014-07-29  Robert Dewar  <dewar@adacore.com>
4724         * freeze.adb (Freeze_Entity, Concurrent_Type case): Add a guard
4725         to make sure that the Etype of a component of the corresponding
4726         record type is present before trying to freeze it.
4727         * sem_ch5.adb: Minor reformatting.
4729 2014-07-29  Robert Dewar  <dewar@adacore.com>
4731         * exp_attr.adb, types.ads, types.h, exp_ch11.adb, a-except.adb,
4732         a-except-2005.adb: Add new reason code PE_Stream_Operation_Not_Allowed,
4733         and then use it when a stream operation is used from a library generic
4734         when the restriction (No_Streams) is active.
4736 2014-07-29  Thomas Quinot  <quinot@adacore.com>
4738         * projects.texi: Fix minor typo.
4740 2014-07-29  Yannick Moy  <moy@adacore.com>
4742         * sem_attr.adb (Analyze_Attribute): Fix generation of warning.
4744 2014-07-29  Arnaud Charlet  <charlet@adacore.com>
4746         * sem_ch5.adb (Check_Unreachable_Code): Do not remove code in
4747         CodePeer mode.
4749 2014-07-29  Hristian Kirtchev  <kirtchev@adacore.com>
4751         * exp_ch7.adb (Find_Last_Init): Add local variable
4752         Deep_Init_Found. Check the statement immediately following the
4753         declaration if [Deep_]Initialization was not found.
4755 2014-07-29  Hristian Kirtchev  <kirtchev@adacore.com>
4757         * exp_util.adb (Is_Aliased): It appears that
4758         'reference-d and renamed objects still play some role in Boolean
4759         expression with actions and cannot be finalized immediately.
4761 2014-07-29  Ed Schonberg  <schonberg@adacore.com>
4763         * exp_dbug.adb (Qualify_Needed):  For debugging purposes,
4764         Loop names are not part of the full qualification of entity names.
4766 2014-07-29  Robert Dewar  <dewar@adacore.com>
4768         * einfo.adb (Has_Protected): Test base type.
4769         * sem_ch4.adb (Analyze_Allocator): Reorganize code to make sure
4770         that we always properly check No_Protected_Type_Allocators.
4772 2014-07-29  Ed Schonberg  <schonberg@adacore.com>
4774         * sem_util.ads, sem_util.adb (Defining_Entity): Now applies to
4775         loop declarations as well.
4776         * exp_ch5.adb (Expand_Loop_Statement): Apply Qualify_Entity_Names
4777         to an iterator loop, because it may contain local renaming
4778         declarations that require debugging information.
4780 2014-07-29  Robert Dewar  <dewar@adacore.com>
4782         * sem_util.ads, exp_util.adb, sem_attr.adb: Minor reformatting.
4784 2014-07-29  Robert Dewar  <dewar@adacore.com>
4786         * einfo.ads, einfo.adb (Static_Real_Or_String_Predicate): New function
4787         (Set_Static_Real_Or_String_Predicate): New procedure
4788         * sem_ch13.adb (Build_Predicate_Functions): Accomodate static
4789         string predicates (Is_Predicate_Static): Handle static string
4790         predicates.
4791         * sem_eval.adb (Real_Or_String_Static_Predicate_Matches):
4792         New procedure (Check_Expression_Against_Static_Predicate):
4793         Deal with static string predicates, now fully implemented
4794         (Eval_Relational_Op): Allow string equality/inequality as static
4795         if not comes from source.
4797 2014-07-29  Robert Dewar  <dewar@adacore.com>
4799         * sem_aggr.adb, exp_ch5.adb, sem_ch5.adb, exp_util.adb, einfo.adb,
4800         einfo.ads, sem_util.adb, sem_attr.adb, sem_case.adb, sem_eval.adb,
4801         sem_eval.ads, sem_ch13.adb: General cleanup of static predicate
4802         handling. Change name of Discrete_Predicate to
4803         Discrete_Static_Predicate, and replace testing of the presence of this
4804         field by testing the flag Has_Static_Expression.
4806 2014-07-29  Robert Dewar  <dewar@adacore.com>
4808         * gnat_rm.texi: Document pragma Unevaluated_Use_Of_Old.
4809         * opt.adb: Handle Uneval_Old.
4810         * opt.ads (Uneval_Old, Uneval_Old_Config): New variables.
4811         * par-prag.adb: Add dummy entry for pragma Unevaluated_Use_Of_Old.
4812         * sem.ads (Save_Uneval_Old): New field in Scope_Stack_Entry.
4813         * sem_attr.adb (Uneval_Old_Msg): New procedure.
4814         * sem_ch8.adb (Push_Scope): Save Uneval_Old.
4815         (Pop_Scope): Restore Uneval_Old.
4816         * sem_prag.adb (Analyze_Pragma, case Unevaluated_Use_Of_Old):
4817         Implemented.
4818         * snames.ads-tmpl: Add entries for pragma Unevaluated_Use_Of_Old
4819         Add entries for Name_Warn, Name_Allow.
4821 2014-07-29  Robert Dewar  <dewar@adacore.com>
4823         * sem_aggr.adb (Resolve_Array_Aggregate): Change Is_Static_Range
4824         to Is_OK_Static_Range.
4825         * sem_attr.adb (Eval_Attribute): Make sure we properly flag
4826         static attributes (Eval_Attribute, case Size): Handle size of
4827         zero properly (Eval_Attribute, case Value_Size): Handle size of
4828         zero properly.
4829         * sem_ch13.adb: Minor reformatting.
4830         * sem_ch3.adb (Process_Range_Expr_In_Decl): Change
4831         Is_Static_Range to Is_OK_Static_Range.
4832         * sem_eval.adb (Eval_Case_Expression): Total rewrite, was
4833         wrong in several ways (Is_Static_Range): Moved here from spec
4834         (Is_Static_Subtype): Moved here from spec Change some incorrect
4835         Is_Static_Subtype calls to Is_OK_Static_Subtype.
4836         * sem_eval.ads: Add comments to section on
4837         Is_Static_Expression/Raises_Constraint_Error (Is_OK_Static_Range):
4838         Add clarifying comments (Is_Static_Range): Moved to body
4839         (Is_Statically_Unevaluated): New function.
4840         * sem_util.ads, sem_util.adb (Is_Preelaborable_Expression): Change
4841         Is_Static_Range to Is_OK_Static_Range.
4842         * sinfo.ads: Additional commments for Is_Static_Expression noting
4843         that clients should almost always use Is_OK_Static_Expression
4844         instead. Many other changes throughout front end units to obey
4845         this rule.
4846         * tbuild.ads, tbuild.adb (New_Occurrence_Of): Set Is_Static_Expression
4847         for enumeration literal.
4848         * exp_ch5.adb, sem_intr.adb, sem_ch5.adb, exp_attr.adb, exp_ch9.adb,
4849         lib-writ.adb, sem_ch9.adb, einfo.ads, checks.adb, checks.ads,
4850         sem_prag.adb, sem_ch12.adb, freeze.adb, sem_res.adb, exp_ch4.adb,
4851         exp_ch6.adb, sem_ch4.adb, sem_ch6.adb, exp_aggr.adb, sem_cat.adb:
4852         Replace all occurrences of Is_Static_Expression by
4853         Is_OK_Static_Expression.
4855 2014-07-29  Hristian Kirtchev  <kirtchev@adacore.com>
4857         * exp_ch4.adb (Process_Transient_Object): Remove constant
4858         In_Cond_Expr, use its initialization expression in place.
4859         * exp_ch7.adb (Process_Declarations): There is no need to check
4860         that a transient object being hooked is controlled as it would
4861         not have been hooked in the first place.
4862         * exp_util.adb (Is_Aliased): 'Reference-d or renamed transient
4863         objects are not considered aliased when the related context is
4864         a Boolean expression_with_actions.
4865         (Requires_Cleanup_Actions): There is no need to check that a transient
4866         object being hooked is controlled as it would not have been hooked in
4867         the first place.
4869 2014-07-29  Robert Dewar  <dewar@adacore.com>
4871         * errout.adb: Minor reformatting.
4873 2014-07-29  Hristian Kirtchev  <kirtchev@adacore.com>
4875         * exp_ch3.adb (Default_Initialize_Object): Add new variables
4876         Abrt_Blk and Dummy. Generate a dummy temporary when aborts are
4877         not allowed to ensure the symmetrical generation of symbols.
4878         * exp_ch7.adb (Build_Object_Declarations): Remove variables A_Expr
4879         and E_Decl. Add new variables Decl and Dummy. Generate a dummy
4880         temporary when aborts are not allowed to ensure symmertrical
4881         generation of symbols.
4882         * exp_intr.adb (Expand_Unc_Deallocation): Add new variable
4883         Dummy. Generate a dummy temporary when aborts are not allowed
4884         to ensure symmertrical generation of symbols.
4886 2014-07-29  Ed Schonberg  <schonberg@adacore.com>
4888         * exp_dbug.adb (Debug_Renaming_Declaration): For an object
4889         renaming, indicate that the renamed entity itself needs debug
4890         information. This is necessary if that entity is a temporary,
4891         e.g. part of the expansion of an explicit dereference in an
4892         iterator.
4894 2014-07-29  Thomas Quinot  <quinot@adacore.com>
4896         * errout.adb (Set_Error_Posted): When propagating flag to
4897         an enclosing named association, also propagate to the parent
4898         of that node, so that named and positional associations are
4899         treated consistently.
4901 2014-07-29  Ed Schonberg  <schonberg@adacore.com>
4903         * sem_attr.adb (Resolve_Attribute, case 'Update):  Set
4904         Do_Range_Check properly on array component expressions that
4905         have a scalar type. In GNATprove mode, only checks on scalar
4906         components must be marked by the front-end.
4908 2014-07-29  Ed Schonberg  <schonberg@adacore.com>
4910         * sem_res.adb (Resolve_Type_Conversion): If the type of the
4911         expression is a limited view, use the non-limited view when
4912         available.
4914 2014-07-29  Hristian Kirtchev  <kirtchev@adacore.com>
4916         * exp_ch4.adb (Expand_N_Case_Expression): Mark the generated
4917         case statement as coming from a conditional expression.
4918         (Expand_N_If_Expression): Mark the generated if statement as
4919         coming from a conditional expression.
4920         * exp_ch5.adb (Expand_N_Case_Statement): Do not process controlled
4921         objects found in case statement alternatives when the case
4922         statement is actually a case expression.
4923         (Expand_N_If_Statement):
4924         Do not process controlled objects found in an if statement when
4925         the if statement is actually an if expression.
4926         * sinfo.adb (From_Conditional_Expression): New routine.
4927         (Set_From_Conditional_Expression): New routine.
4928         * sinfo.ads Add new semantic flag From_Conditional_Expression and
4929         update related nodes.
4930         (From_Conditional_Expression): New routine along with pragma Inline.
4931         (Set_From_Conditional_Expression): New routine along with pragma Inline.
4933 2014-07-29  Hristian Kirtchev  <kirtchev@adacore.com>
4935         * exp_ch7.adb (Build_BIP_Cleanup_Stmts): Remove
4936         formal parameter Obj_Id and update the comment on usage. Renamed
4937         Obj_Typ to Func_Typ and update all occurrences.
4938         (Find_Last_Init): Remove formal parameter Decl and update the comment
4939         on usage.
4940         Remove local constants Obj_Id and Obj_Typ. Remove local variables
4941         Init_Typ and Is_Conc. Remove the extraction of the initialization type.
4942         (Find_Last_Init_In_Block): Remove formal parameter
4943         Init_Typ and update the comment on usage.
4944         (Is_Init_Call): Remove formal parameter Init_Typ and update the comment
4945         on usage. Check whether the procedure call is an initialization
4946         procedure of either the object type or the initialization type.
4947         (Is_Init_Proc_Of): New routine.
4948         (Process_Object_Declaration): Obj_Id and Obj_Typ are now global to this
4949         routine. Add new variable Init_Typ. Add circuitry to extract the object
4950         type as well as the initialization type.
4952 2014-07-29  Robert Dewar  <dewar@adacore.com>
4954         * sem_case.adb: Minor reformatting.
4955         * sem_aux.ads: Minor reformatting.
4957 2014-07-29  Ed Schonberg  <schonberg@adacore.com>
4959         * sinfo.adb (Set_Else_Actions, Set_Then_Actions): Set parent
4960         pointer on these fields, even though they are semantic, because
4961         subsequent analysis and expansion of action nades may require
4962         exploring the tree, for example to locate a node to be wrapped
4963         when a function with controlled result is called.
4965 2014-07-29  Claire Dross  <dross@adacore.com>
4967         * sem_aux.adb (Get_Binary_Nkind): Use case on
4968         Name_Id instead of an intermediate string.
4969         (Get_Unary_Nkind): Use case on Name_Id instead of an intermediate
4970         string.
4972 2014-07-29  Sergey Rybin  <rybin@adacore.com frybin>
4974         * gnat_ugn.texi (gnatelim, gnatstub, gnatmetric): Add note
4975         about processing sources with preprocessor directives.
4977 2014-07-24  Martin Liska  <mliska@suse.cz>
4979         * gcc-interface/trans.c (finalize_nrv): Adjust function call.
4980         * gcc-interface/utils.c (rest_of_subprog_body_compilation): Likewise.
4981         (gnat_write_global_declarations): Likewise.
4983 2014-07-19  David Wohlferd  <dw@LimeGreenSocks.com>
4985         * gnat_rm.texi: Clean up for makeinfo 5.2.
4987 2014-07-19  David Wohlferd  <dw@LimeGreenSocks.com>
4989         * gnat_rm.texi (Machine Code Insertions): Clean up.
4991 2014-07-18  Robert Dewar  <dewar@adacore.com>
4993         * exp_ch7.adb: Minor reformatting.
4995 2014-07-18  Claire Dross  <dross@adacore.com>
4997         * sem_aux.ads (Get_Binary_Nkind): New function that returns
4998         the Node_Kind value of an entity defining a binary operator.
4999         (Get_Unary_Nkind): New function that returns the Node_Kind value
5000         of an entity defining a unary operator.
5002 2014-07-18  Pascal Obry  <obry@adacore.com>
5004         * sysdep.c: comment update.
5005         * adaint.c (__gnat_fputwc): Use wchar_t on a limited set of
5006         platforms where it is known to be supported.
5008 2014-07-18  Thomas Quinot  <quinot@adacore.com>
5010         * sem_dist.adb (Process_Remote_AST_Declaration): Need
5011         to set Fat_Type's Ekind in order to be able to use its
5012         Corresponding_Remote_Type attribute.
5014 2014-07-18  Hristian Kirtchev  <kirtchev@adacore.com>
5016         * einfo.adb Last_Aggregate_Assignment is now Node 30.
5017         (Last_Aggregate_Assignment): Include
5018         constants in the assertion. Update the underlying node.
5019         (Set_Last_Aggregate_Assignment): Include constants in the
5020         assertion. Update the underlying node.  (Write_Field11_Name):
5021         Remove the entry for Last_Aggregate_Assignment.
5022         (Write_Field30_Name): Add an entry for Last_Aggregate_Assignment.
5023         * einfo.ads Update the node designation and usage of attribute
5024         Last_Aggregate_Assignment.
5025         * exp_aggr.adb (Expand_Array_Aggregate): Store the last
5026         assignment statement used to initialize a controlled object.
5027         (Late_Expansion): Store the last assignment statement used to
5028         initialize a controlled record or an array of controlled objects.
5029         * exp_ch3.adb (Expand_N_Object_Declaration): Default
5030         initialization of objects is now performed in a separate routine.
5031         (Default_Initialize_Object): New routine.
5032         * exp_ch7.adb (Build_BIP_Cleanup_Stmts): Add formal parameter
5033         Obj_Id. Update the comment on usage.
5034         (Find_Last_Init): Remove formal parameter Typ. Update comment on usage.
5035         Reimplement the logic.  (Find_Last_Init_In_Block): New routine.
5036         (Is_Init_Call): Add formal parameter Init_Typ. Update the
5037         comment on usage.  Account for the type init proc when trying
5038         to determine whether a statement is an initialization call.
5039         (Make_Adjust_Call): Rename formal parameter For_Parent to
5040         Skip_Self. Update all occurrences of For_Parent. Account for
5041         non-tagged types. Update the call to Make_Call.
5042         (Make_Call): Rename formal parameter For_Parent to Skip_Self. Update
5043         comment on usage. Update all occurrences of For_Parent.
5044         (Make_Final_Call): Rename formal parameter For_Parent to
5045         Skip_Self. Update all occurrences of For_Parent. Account
5046         for non-tagged types. Update the call to Make_Call.
5047         (Process_Object_Declaration): Most variables and constants are
5048         now local to the routine.
5049         * exp_ch7.ads (Make_Adjust_Call): Rename formal parameter
5050         For_Parent to Skip_Self. Update the comment on usage.
5051         (Make_Final_Call): Rename formal parameter For_Parent to
5052         Skip_Self. Update the comment on usage.
5054 2014-07-18  Ed Schonberg  <schonberg@adacore.com>
5056         * sem_ch9.adb (Analyze_Requeue): The entry being referenced
5057         can be a procedure that is implemented by entry, and have a
5058         formal that is a synchronized interface.  It does not have to
5059         be declared as a protected operation.
5061 2014-07-18  Robert Dewar  <dewar@adacore.com>
5063         * gnat_rm.texi: Remove mention of obsolete attributes
5064         Max[_Interrupt]_Priority, which have never been implemented
5065         (or at the very least were removed long ago if they ever were
5066         implemented.  Add documentation of Max[_Interrupt]_Priority
5067         constants in package System.
5068         * ttypes.ads: Document actual handling of package System,
5069         rather than a historical fantasy version.  Remove mention of
5070         non-existent attributes Max[_Interrupt]_Priority.
5072 2014-07-18  Pascal Obry  <obry@adacore.com>
5074         * a-witeio.adb (Put): No 16-bit character output when text
5075         translation is disabled.
5076         * i-cstrea.ads: Code clean up.
5078 2014-07-18  Robert Dewar  <dewar@adacore.com>
5080         * gnat_rm.texi: Document that Wchar_T_Size and Word_Size are
5081         static attributes.
5083 2014-07-18  Arnaud Charlet  <charlet@adacore.com>
5085         * a-witeio.adb, initialize.c: Update comments. Minor clean ups.
5087 2014-07-18  Pascal Obry  <obry@adacore.com>
5089         * adaint.c: Do not include wchar.h on VxWorks.
5090         * mingw32.h: Remove obsolete definition.
5092 2014-07-18  Pascal Obry  <obry@adacore.com>
5094         * a-textio.adb, a-witeio.adb, a-ztexio.adb: Use C_Streams Default_Text.
5095         * i-cstrea.ads (Content_Encoding): Moved here, add convention C.
5096         * s-ficobl.ads (Content_Encoding): Moved to C_Streams.
5097         * s-fileio.adb (Open): Adjust to use Content_Encoding from C_Streams.
5099 2014-07-18  Pascal Obry  <obry@adacore.com>
5101         * a-textio.adb: Rename Is_Text_File to Text_Encoding.
5102         * a-ztexio.adb: Likewise.
5103         * a-witeio.adb: Likewise.
5104         (Open): Pass file's translation mode to set_text_mode.
5105         * s-ficobl.ads (Content_Encoding): New type.
5106         (Text_Content_Encoding): New subtype.
5107         (AFCB): Rename Is_Text_File to Text_Encoding.
5108         * s-fileio.adb (Open): Handles new text_translation
5109         values. Remove Is_Text_File which is equivalent to Text_Encoding
5110         in Text_Content_Encoding.
5111         * adaint.h (__gnat_set_mode): New routine.
5112         * sysdep.c (__gnat_set_wide_text_mode): Removed.
5113         (__gnat_set_mode): New routine.
5115 2014-07-18  Arnaud Charlet  <charlet@adacore.com>
5117         * gcc-interface/decl.c, gcc-interface/trans.c,
5118         gcc-interface/utils.c (Is_Packed_Array_Type): Renamed 
5119         Is_Packed_Array_Impl_Type.
5121 2014-07-18  Gary Dismukes  <dismukes@adacore.com>
5123         * sem_util.adb: Minor typo correction.
5125 2014-07-18  Ben Brosgol  <brosgol@adacore.com>
5127         * gnat_rm.texi: Complete previous change.
5129 2014-07-18  Pascal Obry  <obry@adacore.com>
5131         * s-fileio.adb: Minor style fix.
5133 2014-07-18  Ed Schonberg  <schonberg@adacore.com>
5135         * sem_ch13.adb (Analyze_Aspect_Specifications): Detect improper
5136         specification of stream attributes for subtypes that are not
5137         first subtypes, to prevent malformed rep_item chains in the case
5138         of such illegal specifications for discriminated private subtypes.
5139         (Check_Overloaded_Name): Verify that the name is an entity name
5140         before other checks.
5142 2014-07-18  Pascal Obry  <obry@adacore.com>
5144         * adaint.c (__gnat_fputwc) Do not disable on cross-build.
5146 2014-07-18  Robert Dewar  <dewar@adacore.com>
5148         * sem_prag.adb, sem_attr.adb,
5149         sem_aggr.adb, sinfo.ads, sem_eval.ads: Minor reformatting.
5151 2014-07-18  Pascal Obry  <obry@adacore.com>
5153         * sysdep.c (__gnat_wide_text_translation_required): Removed from here.
5154         * initialize.c (__gnat_wide_text_translation_required): Defined here.
5156 2014-07-18  Pascal Obry  <obry@adacore.com>
5158         * adaint.c (__gnat_fputwc): New routine.
5159         * s-crtl.ads (fputwc): Now imported as __gnat_fputwc.
5161 2014-07-18  Hristian Kirtchev  <kirtchev@adacore.com>
5163         * einfo.adb: Flag 270 is now used as Stores_Attribute_Old_Prefix.
5164         (Set_Stores_Attribute_Old_Prefix): New routine.
5165         (Stores_Attribute_Old_Prefix): New routine.
5166         (Write_Entity_Flags):
5167         Output flag Stores_Attribute_Old_Prefix.
5168         * einfo.ads Add new flag Stores_Attribute_Old_Prefix along with
5169         comment on usage.
5170         (Set_Stores_Attribute_Old_Prefix): New routine
5171         along with pragma Inline.
5172         (Stores_Attribute_Old_Prefix): New
5173         routine along with pragma Inline.
5174         * exp_attr.adb (Expand_N_Attribute_Reference): Mark the generated
5175         constant which captures the result of attribute 'Old's prefix.
5176         * sem_util.adb (In_Assertion_Expression_Pragma): Recognize a
5177         relocated expression which acted as a prefix of attribute 'Old.
5179 2014-07-18  Bob Duff  <duff@adacore.com>
5181         * s-spsufi.adb (Finalize_And_Deallocate): Set Subpool.Owner to
5182         null before dispatching to Deallocate_Subpool.
5183         * s-stposu.ads (Default_Subpool_For_Pool): Change mode of
5184         parameter of Default_Subpool_For_Pool to 'in out'.
5185         * s-stposu.adb (Set_Pool_Of_Subpool): Use raise expression. Add
5186         a message to the raise.
5187         * sem_util.adb: Minor reformatting.
5189 2014-07-18  Robert Dewar  <dewar@adacore.com>
5191         * sem_util.adb (Check_Expression_Against_Static_Predicate):
5192         Mark expression as non-static if it fails static predicate check,
5193         and issue additional warning.
5195 2014-07-18  Pascal Obry  <obry@adacore.com>
5197         * a-witeio.adb (Put): Control translation based on
5198         wide_text_translation_required.
5199         * adaint.c (CurrentCCSEncoding): New variable.
5200         * initialize.c (__gnat_initialize): On Windows initialize
5201         CurrentCCSEncoding based on values in GNAT_CCS_ENCODING
5202         environment variable.
5203         * mingw32.h (CurrentCCSEncoding): New external.
5204         (__gnat_wide_text_translation_required): Likewise.
5205         * sysdep.c (wide_text_translation_required): New variable.
5206         (__gnat_set_wide_text_mode): Set mode based on CurrentCCSEncoding.
5208 2014-07-18  Hristian Kirtchev  <kirtchev@adacore.com>
5210         * sem_prag.adb (Analyze_Refined_Depends_In_Decl_Part): Remove global
5211         variable Refined_States.  Add global variable Matched_Items.
5212         (Check_Dependency_Clause): Account for dependency
5213         clauses utilizing states with visible null refinements.
5214         (Is_Null_Refined_State): New routine.
5215         (Match_Items): Record each successfully matched item of pragma Depends.
5216         (Record_Item): New routine.
5218 2014-07-18  Ed Schonberg  <schonberg@adacore.com>
5220         * sem_attr.adb (Analyze_Attribute, case 'Update): Set
5221         Do_Range_Check flag on a dynamic index expression used in a
5222         component association in the argument of Update.
5224 2014-07-18  Gary Dismukes  <dismukes@adacore.com>
5226         * einfo.ads, sem_eval.ads, sem_ch13.adb: Minor reformatting.
5228 2014-07-18  Hristian Kirtchev  <kirtchev@adacore.com>
5230         * exp_ch6.adb (Expand_Simple_Function_Return): Redo the marking
5231         of enclosing blocks, loops and the enclosing function using a
5232         parent-based traversal.
5233         * exp_util.adb (Wrap_Statements_In_Block): Suppress the secondary
5234         stack reclamation if the iterator loop contains a return statement
5235         that uses the stack.
5236         * sem_ch5.adb (Analyze_Loop_Statement): There is no need to
5237         patch up the scope stack as the secondary stack management now
5238         takes into account the enclosing function of the iterator loop.
5240 2014-07-18  Robert Dewar  <dewar@adacore.com>
5242         * sem_ch3.adb, g-memdum.ads, i-cstrea.ads: Minor reformatting.
5244 2014-07-18  Robert Dewar  <dewar@adacore.com>
5246         * einfo.adb (Has_Static_Predicate): New function.
5247         (Set_Has_Static_Predicate): New procedure.
5248         * einfo.ads (Has_Static_Predicate): New flag.
5249         * sem_ch13.adb (Is_Predicate_Static): New function
5250         (Build_Predicate_Functions): Use Is_Predicate_Static to reorganize
5251         (Add_Call): Minor change in Sloc of generated expression
5252         (Add_Predicates): Remove setting of Static_Pred, no longer used.
5253         * sem_ch4.adb (Has_Static_Predicate): Removed this function,
5254         replace by use of the entity flag Has_Static_Predicate_Aspect.
5255         * sem_eval.adb (Eval_Static_Predicate_Check): Check real case
5256         and issue warning that predicate is not checked for now.
5257         * sem_eval.ads (Eval_Static_Predicate_Check): Fix comments in
5258         spec.
5259         * sem_util.adb (Check_Expression_Against_Static_Predicate):
5260         Carry out check for any case where there is a static predicate,
5261         and output appropriate message.
5262         * sinfo.ads: Minor comment corrections.
5264 2014-07-18  Ed Schonberg  <schonberg@adacore.com>
5266         * exp_ch3.adb (Expand_Freeze_Record_Type): If the type is derived
5267         from an untagged private type whose full view is tagged, the type
5268         is marked tagged for layout reasons, but it has no dispatch table,
5269         so Set_All_DT_Position must not be called.
5270         * exp_ch13.adb: If the freeze node is for a type internal to a
5271         record declaration, as is the case for a class-wide subtype
5272         of a parent component, the relevant scope is the scope of the
5273         enclosing record.
5275 2014-07-18  Thomas Quinot  <quinot@adacore.com>
5277         * g-memdum.adb, g-memdum.ads: Code clean ups.
5279 2014-07-18  Hristian Kirtchev  <kirtchev@adacore.com>
5281         * sem_prag.adb (Check_Dependency_Clause):
5282         Update the comment on usage. Reimplement the mechanism which
5283         attempts to match a single clause of Depends against one or
5284         more clauses of Refined_Depends.
5285         (Input_Match): Removed.
5286         (Inputs_Match): Removed.
5287         (Is_Self_Referential): Removed.
5288         (Normalize_Clause): Update the call to Split_Multiple_Outputs.
5289         (Normalize_Outputs): Rename variable Split to New_Claue and update
5290         all its occurrences.
5291         (Report_Extra_Clauses): Update the comment on usage.
5292         (Split_Multiple_Outputs): Renamed to Normalize_Outputs.
5294 2014-07-18  Gary Dismukes  <dismukes@adacore.com>
5296         * i-cstrea.ads: Minor reformatting.
5298 2014-07-18  Hristian Kirtchev  <kirtchev@adacore.com>
5300         * exp_util.adb (Wrap_Statements_In_Block): Propagate both
5301         secondary stack-related flags to the generated block.
5302         * sem_ch5.adb (Analyze_Loop_Statement): Update the scope chain
5303         once the loop is relocated in a block.
5305 2014-07-18  Robert Dewar  <dewar@adacore.com>
5307         * repinfo.ads: Add documentation on handling of back annotation
5308         for dynamic case.
5310 2014-07-18  Ed Schonberg  <schonberg@adacore.com>
5312         * sinfo.ads, sinfo.adb (Incomplete_View): New semantic attribute
5313         of full type declaration, denotes previous declaration for
5314         incomplete view of the type.
5315         * sem_ch3.adb (Analyze_Full_Type_Declaration): Set Incomplete_View
5316         of declaration if one is present.
5317         (Replace_Type): When constructing the signature of an inherited
5318         operation, handle properly the case where the operation has a
5319         formal whose type is an incomplete view.
5320         * sem_util.adb (Collect_Primitive_Operations): Handle properly
5321         the case of an operation declared after an incomplete declaration
5322         for a type T and before the full declaration of T.
5324 2014-07-18  Pascal Obry  <obry@adacore.com>
5326         * i-cstrea.ads: Add documentation for set_wide_text_mode.
5328 2014-07-18  Robert Dewar  <dewar@adacore.com>
5330         * a-witeio.adb: Minor code reorganization.
5331         * i-cstrea.ads: Add comment.
5333 2014-07-18  Thomas Quinot  <quinot@adacore.com>
5335         * s-oscons-tmplt.c (NAME_MAX): Minor cleaup and comment
5336         clarifications.
5338 2014-07-18  Robert Dewar  <dewar@adacore.com>
5340         * g-memdum.adb, g-memdum.ads, exp_strm.adb: Minor reformatting.
5342 2014-07-18  Pascal Obry  <obry@adacore.com>
5344         * s-crtl.ads, i-cstrea.ads (fputwc): New routine.
5345         * a-witeio.adb (Put): On platforms where there is translation
5346         done by the OS output the raw text.
5347         (New_Line): Use Put above to properly handle the LM wide characters.
5349 2014-07-18  Thomas Quinot  <quinot@adacore.com>
5351         * g-memdum.adb, g-memdum.ads (Dump): New parameter Prefix, defaulted
5352         to Absolute_Address.
5354 2014-07-18  Eric Botcazou  <ebotcazou@adacore.com>
5356         * opt.ads (Suppress_Back_Annotation): Remove as unused.
5357         * fe.h (Back_Annotate_Rep_Info): Likewise.
5358         (Global_Discard_Names): Likewise.
5360 2014-07-18  Robert Dewar  <dewar@adacore.com>
5362         * sem_ch13.adb (Is_Type_Ref): Check that type name is not
5363         parenthesized.
5365 2014-07-18  Vincent Celier  <celier@adacore.com>
5367         * s-osinte-vms.ads: Fix style errors.
5369 2014-07-18  Thomas Quinot  <quinot@adacore.com>
5371         * s-oscons-tmplt.c (_POSIX_SOURCE): Define in order to get
5372         NAME_MAX and PATH_MAX.
5374 2014-07-18  Bob Duff  <duff@adacore.com>
5376         * exp_strm.adb (Build_Record_Or_Elementary_Input_Function,
5377         Build_Record_Or_Elementary_Output_Procedure): For Input and
5378         Output attributes, do not read/write the discriminants if they
5379         have default values; that will be done by Read/Write.
5381 2014-07-18  Robert Dewar  <dewar@adacore.com>
5383         * sem_aggr.adb, exp_ch5.adb, sem_ch3.adb, layout.adb, sem_type.adb,
5384         exp_util.adb, exp_attr.adb, einfo.adb, einfo.ads, exp_pakd.adb,
5385         checks.adb, exp_pakd.ads, freeze.adb, sem_util.adb, exp_dbug.adb,
5386         exp_dbug.ads, exp_ch4.adb, sem_ch8.adb, exp_aggr.adb, sem_eval.adb,
5387         sem_ch13.adb: Change name Packed_Array_Type to Packed_Array_Impl_Type.
5389 2014-07-18  Robert Dewar  <dewar@adacore.com>
5391         * lib-writ.adb, makeutl.adb, ali.ads: Minor reformatting.
5393 2014-07-18  Vincent Celier  <celier@adacore.com>
5395         * lib-writ.ads: Update documentation about the D lines.
5397 2014-07-18  Ed Schonberg  <schonberg@adacore.com>
5399         * sem_ch13.adb (Replace_Type_References_Generic): Use type entity
5400         as a parameter, rather than its Chars field, in order to locate
5401         freeze node of type. If the predicate or invariant has references
5402         to types other than the one to which the contract applies, these
5403         types must be frozen, and the corresponding predicate functions
5404         created, before that freeze node.
5406 2014-07-18  Robert Dewar  <dewar@adacore.com>
5408         * freeze.adb, einfo.ads, einfo.adb: Minor code reorganization.
5409         * par_sco.adb: Minor reformatting.
5411 2014-07-18  Gary Dismukes  <dismukes@adacore.com>
5413         * exp_ch4.adb (Real_Range_Check): Turn off
5414         the Do_Range_Check flag on the conversion's current Expression
5415         argument rather than on the originally captured Operand node,
5416         as Expression may reflect a rewriting (as in conversions to a
5417         fixed-point type).
5419 2014-07-18  Vincent Celier  <celier@adacore.com>
5421         * ali.adb (Scan_ALI): Set Sdep_Record.Unit_Name, when the unit
5422         is not a subunit.
5423         * ali.ads (Sdep_Record): New component Unit_Name.
5424         * lib-writ.adb (Write_ALI): Write the unit name in D lines.
5425         * makeutl.adb (Check_Source_Info_In_ALI): Return False if a
5426         dependent unit is in a project and the source file name is not
5427         one of its sources.
5429 2014-07-18  Bob Duff  <duff@adacore.com>
5431         * s-addima.ads: Minor: add comment.
5433 2014-07-18  Thomas Quinot  <quinot@adacore.com>
5435         * freeze.adb (Check_Component_Storage_Order): Fix enforcement
5436         of nesting rules for composites with different SSOs.
5438 2014-07-18  Thomas Quinot  <quinot@adacore.com>
5440         * par_sco.adb (Is_Logical_Operator): An If_Expression is not
5441         a proper logical operator.
5442         (Has_Decision): An If_Expression indicates the presence of a decision
5443         although it is not a logical operator.
5445 2014-07-18  Robert Dewar  <dewar@adacore.com>
5447         * gnat_ugn.texi: Remove note that -gnatR not allowed with -gnatc.
5448         * switch-c.adb: Remove prohibition of -gnatR and -gnatc together.
5450 2014-07-18  Eric Botcazou  <ebotcazou@adacore.com>
5452         * sem_ch13.adb (Kill_Rep_Clause): Clear Comes_From_Source flag
5453         on the null statement.
5455 2014-07-18  Thomas Quinot  <quinot@adacore.com>
5457         * adaint.c: Minor comment rewording.
5458         * socket.c: Define macros _REENTRANT and _THREAD_SAFE so that
5459         use of errno in this file is thread safe.
5461 2014-07-18  Arnaud Charlet  <charlet@adacore.com>
5463         * gnat_ugn.texi: Doc clarification.
5464         * sem_ch13.adb (Kill_Rep_Clause): Use Replace not Rewrite.
5465         * sem_ch13.ads: Minor comment update.
5467 2014-07-18  Robert Dewar  <dewar@adacore.com>
5469         * repinfo.ads: Minor comment fix.
5471 2014-07-18  Robert Dewar  <dewar@adacore.com>
5473         * par-prag.adb: Add dummy entry for Default_Scalar_Storage_Order.
5474         * sem_prag.adb: Add dummy implementation of
5475         Default_Scalar_Storage_Order.
5476         * snames.ads-tmpl: Add dummy entry for
5477         Default_Scalar_Storage_Order pragma.
5479 2014-07-18  Robert Dewar  <dewar@adacore.com>
5481         * opt.adb (Tree_Read): Read Address_Is_Private,
5482         Ignore_Rep_Clauses, Ignore_Style_Check_Pragmas, Multiple_Unit_Index.
5483         (Tree_Write): Corresponding writes
5484         * opt.ads: Minor comment reformatting and fixes.
5485         * tree_io.ads: Increment ASIS_Version_Number.
5487 2014-07-18  Robert Dewar  <dewar@adacore.com>
5489         * sem_attr.adb, s-os_lib.ads, prj-tree.adb: Minor reformatting.
5490         * types.h: Fix typo.
5492 2014-07-18  Robert Dewar  <dewar@adacore.com>
5494         * freeze.adb (Check_Address_Clause): Use Kill_Rep_Clause (no
5495         functional change).
5496         * gnat_ugn.texi: Document that -gnatI removes rep clauses from
5497         ASIS trees.
5498         * sem_ch13.adb (Kill_Rep_Clause): New procedure
5499         (Analyze_Attribute_Definition_Clause): Use
5500         Kill_Rep_Clause. This is just a cleanup, no functional effect.
5501         (Analyze_Enumeration_Representation_Clause):
5502         Use Kill_Rep_Clause. This means that enum rep
5503         clauses are now properly removed from -gnatct trees.
5504         (Analyze_Record_Representation_Clause): Same change.
5505         * sem_ch13.ads (Kill_Rep_Clause): New procedure.
5507 2014-07-18  Pascal Obry  <obry@adacore.com>
5509         * s-os_lib.ads, s-os_lib.adb (GM_Time_Of): New routine to create an
5510         OS_Time from time parts.
5511         * adaint.h, adaint.c (__gnat_to_os_time): New routine.
5513 2014-07-18  Ed Schonberg  <schonberg@adacore.com>
5515         * sem_ch4.adb (Try_Container_Indexing): Refine previous patch for
5516         indexing over containers that are derived types: check whether
5517         signature of found operation has the correct first parameter
5518         before retrieving directly a primitive operation.
5520 2014-07-18  Ed Schonberg  <schonberg@adacore.com>
5522         * sem_attr.adb (Analyze_Attribute, case 'Update): Set
5523         Do_Range_Check flag on dynamic bounds of a range used in a
5524         component association in the argument of Update.
5526 2014-07-18  Thomas Quinot  <quinot@adacore.com>
5528         * adaint.c: #define _REENTRANT and _THREAD_SAFE in order for
5529         accesses to errno(3) to be thread safe.
5531 2014-07-18  Vincent Celier  <celier@adacore.com>
5533         * prj-tree.adb (Imported_Or_Extended_Project_Of): For each non
5534         limited imported project that is an extending project, return
5535         a project being extended if it has the expected name.
5537 2014-07-18  Pascal Obry  <obry@adacore.com>
5539         * s-os_lib.ads, s-os_lib.adb (Set_File_Last_Modify_Time_Stamp): New
5540         routine to set the last modification time stamp for the given file.
5541         * gnatchop.adb (File_Time_Stamp): Removed.
5542         (Write_Unit): Use
5543         Set_File_Last_Modify_Time_Stamp instead of ad-hoc implementation.
5545 2014-07-18  Ed Schonberg  <schonberg@adacore.com>
5547         * sem_aggr.adb (Aggregate_Constraint_Checks): Moved to sem_util.
5548         * sem_util.ads, sem_util.adb (Aggregate_Constraint_Checks):
5549         Moved here, so it can be shared with the resolution of 'Update,
5550         whose argument shares some features with aggregates.
5551         * sem_attr.adb (Resolve_Attribute, case 'Update): Apply
5552         Aggregate_Constraint_Checks with the expression of each
5553         association, so that the Do_Range_Check flag is set when needed.
5555 2014-07-18  Ed Schonberg  <schonberg@adacore.com>
5557         * sem_ch4.adb (Try_Container_Indexing):  If the container
5558         type is a derived type, the value of the inherited  aspect is
5559         the Reference operation declared for the parent type. However,
5560         Reference is also a primitive operation of the new type, and
5561         the inherited operation has a different signature. We retrieve
5562         the right one from the list of primitive operations of the
5563         derived type.
5565 2014-07-18  Vincent Celier  <celier@adacore.com>
5567         * debug.adb: Update comment.
5569 2014-07-18  Hristian Kirtchev  <kirtchev@adacore.com>
5571         * exp_util.adb (Needs_Finalization): There is no reason why a
5572         C type should not benefit from finalization actions.
5574 2014-07-18  Thomas Quinot  <quinot@adacore.com>
5576         * s-oscons-tmplt.c (NAME_MAX): Fix definition for Solaris
5577         (FILENAME_MAX): Remove unneeded definition.
5579 2014-07-18  Robert Dewar  <dewar@adacore.com>
5581         * exp_attr.adb, debug.adb: Update comments.
5583 2014-07-18  Vincent Celier  <celier@adacore.com>
5585         * par-ch4.adb (Simple_Expression): Add missing style check
5586         for binary adding operators.
5587         (Term): Add missing style check for multiplying operators.
5589 2014-07-18  Robert Dewar  <dewar@adacore.com>
5591         * impunit.adb: Minor comment correction.
5592         * widechar.adb, s-wchcon.ads: Minor comment corrections.
5594 2014-07-18  Robert Dewar  <dewar@adacore.com>
5596         * sem_ch13.adb (Build_Discrete_Static_Predicate): New name
5597         for Build_Static_Predicate (Build_Predicate_Functions):
5598         Don't try to build discrete predicate for real type.
5599         (Build_Predicate_Functions): Report attempt to use
5600         Static_Predicate function on real type as unimplemented.
5601         * sem_util.adb (Check_Expression_Against_Static_Predicate):
5602         Add guard to prevent blow up on predicate for real type.
5604 2014-07-18  Ed Schonberg  <schonberg@adacore.com>
5606         * einfo.adb (Set_Static_Predicate): Simplify assertion to handle
5607         properly static predicate on enumeration types and modular types
5608         (not subtypes).
5610 2014-07-18  Pierre-Marie Derodat  <derodat@adacore.com>
5612         * scos.ads (SCO_Unit_Table_Entry): Add a field to keep track of
5613         the corresponding source file index.
5614         * get_scos.ads (Get_SCOs): Add a default value for it.
5615         * par_sco.adb (SCO_Record): Fill the corresponding value.
5616         * scos.h: New.
5618 2014-07-18  Vincent Celier  <celier@adacore.com>
5620         * a-strunb-shared.adb, s-auxdec.ads, s-rannum.adb, atree.ads,
5621         urealp.adb, vms_data.ads, lib.ads, s-auxdec-vms_64.ads: Minor
5622         reformatting.
5623         * gnat_ugn.texi: Add documentation for new gnatmem switch -t.
5625 2014-07-18  Thomas Quinot  <quinot@adacore.com>
5627         * g-sercom.ads (Set): document possible data loss.
5629 2014-07-18  Ed Schonberg  <schonberg@adacore.com>
5631         * exp_attr.adb (Expand_N_Attribute_Reference, cases Input,
5632         Output, Read, Write): If the restriction No_Streams is active,
5633         replace each occurrence of a stream attribute by an explicit
5634         Raise statement.
5636 2014-07-18  Robert Dewar  <dewar@adacore.com>
5638         * par_sco.adb, a-reatim.ads, exp_attr.adb, sem_util.adb: Minor
5639         reformatting.
5641 2014-07-18  Robert Dewar  <dewar@adacore.com>
5643         * einfo.ads, einfo.adb (Has_Out_Or_In_Out_Parameter): New flag and
5644         function.
5645         (Set_Has_Out_Or_In_Out_Parameter): New procedure.
5646         * sem_ch6.adb (Set_Formal_Mode): Set Has_Out_Or_In_Out_Parameter flag.
5647         * sem_res.adb (Resolve_Call): Error if call of Ada 2012 function
5648         with OUT or IN OUT from earlier Ada mode (e.g. Ada 2005)
5650 2014-07-18  Robert Dewar  <dewar@adacore.com>
5652         * bcheck.adb (Check_Consistent_Restrictions):
5653         Remove obsolete code checking for violation of
5654         No_Standard_Allocators_After_Elaboration (main program)
5655         * bindgen.adb (Gen_Adainit): Handle
5656         No_Standard_Allocators_After_Elaboration
5657         (Gen_Output_File_Ada): ditto.
5658         * exp_ch4.adb (Expand_N_Allocator): Handle
5659         No_Standard_Allocators_After_Elaboration.
5660         * Makefile.rtl: Add entry for s-elaall
5661         * rtsfind.ads: Add entry for Check_Standard_Allocator.
5662         * s-elaall.ads, s-elaall.adb: New files.
5663         * sem_ch4.adb (Analyze_Allocator): Handle
5664         No_Standard_Allocators_After_Elaboration.
5666 2014-07-18  Robert Dewar  <dewar@adacore.com>
5668         * lib.adb, lib.ads, lib-writ.adb, lib-writ.ads, ali.adb,
5669         ali.ads, lib-load.adb: Remove Lib.Has_Allocator and all uses.
5670         Remove AB parameter from ali files and all uses.
5671         Remove Allocator_In_Body and all uses.
5673 2014-07-18  Robert Dewar  <dewar@adacore.com>
5675         * g-expect-vms.adb: Add comment.
5677 2014-07-18  Thomas Quinot  <quinot@adacore.com>
5679         * par_sco.adb (Is_Logical_Operation): return True for
5680         N_If_Expression.
5682 2014-07-18  Ed Schonberg  <schonberg@adacore.com>
5684         * sem_attr.adb (Resolve_Attribute, case 'Update): Do full
5685         analysis and resolution of each choice in the associations within
5686         the argument of Update, because they may be variable names.
5688 2014-07-18  Hristian Kirtchev  <kirtchev@adacore.com>
5690         * exp_attr.adb (Expand_Loop_Entry_Attribute): Insert any condition
5691         actions before the generated if statement.
5693 2014-07-18  Hristian Kirtchev  <kirtchev@adacore.com>
5695         * gnat_ugn.texi Enhance the documentation of
5696         switches -gnateA and -gnateV.
5698 2014-07-18  Ed Schonberg  <schonberg@adacore.com>
5700         * sem_util.adb (Build_Default_Subtype): Add missing condition
5701         so that code matches description: use the full view of the base
5702         only if the base is private and the subtype is not.
5704 2014-07-17  Gary Dismukes  <dismukes@adacore.com>
5706         * exp_disp.adb: Minor reformatting.
5707         * exp_disp.adb: Minor code reorganization.
5709 2014-07-17  Thomas Quinot  <quinot@adacore.com>
5711         * gnat_rm.texi, freeze.adb (Check_Component_Storage_Order): Do not
5712         require an explicit SSO attribute definition clause on a composite type
5713         just because one of its components has one.
5715 2014-07-17  Robert Dewar  <dewar@adacore.com>
5717         * sem_attr.adb (Analyze_Attribute, case Loop_Entry): Rewrite
5718         attribute out of existence if the enclosing pragma is ignored.
5719         * sem_util.adb: Minor reformatting.
5721 2014-07-17  Ed Schonberg  <schonberg@adacore.com>
5723         * exp_aggr.adb (Expand_Array_Aggregate): Handle properly an
5724         array aggregate expanded into assignments when it appears as a
5725         local declaration in an inlined body.
5727 2014-07-17  Doug Rupp  <rupp@adacore.com>
5729         * init.c [__ANDROID__]: Modify for ZCX.
5730         * exp_aggr.adb: Minor reformatting
5731         * sigtramp-armvxw.c, sigtramp-ppcvxw.c: Update comments.
5733 2014-07-17  Robert Dewar  <dewar@adacore.com>
5735         * a-strunb-shared.ads, a-stwiun-shared.ads, a-stzunb-shared.ads,
5736         exp_ch7.adb, g-pehage.ads, g-socket.ads, gnat_ugn.texi, gnat_ugx.texi,
5737         scng.adb: Remove incorrect usage "allow to" and "allows to".
5739 2014-07-17  Robert Dewar  <dewar@adacore.com>
5741         * exp_dist.adb: Minor reformatting.
5743 2014-07-17  Bob Duff  <duff@adacore.com>
5745         * gnat_ugn.texi: Improve documentation of Unrestricted_Access.
5747 2014-07-17  Robert Dewar  <dewar@adacore.com>
5749         * sem_ch13.adb (Build_Invariant_Procedure): Add variable Nam
5750         (Add_Invariants): Set Nam to Name_Type_Invariant if from aspect.
5752 2014-07-17  Thomas Quinot  <quinot@adacore.com>
5754         * exp_pakd.adb (Create_Packed_Array_Type.Install_PAT): For a
5755         non-bit-packed array, propagate Reverse_Storage_Order to the
5756         packed array type.
5758 2014-07-17  Javier Miranda  <miranda@adacore.com>
5760         * exp_disp.adb: Fix comment.
5761         * exp_pakd.adb: Minor reformatting.
5763 2014-07-17  Robert Dewar  <dewar@adacore.com>
5765         * bindgen.adb (Gen_Elab_Calls): Skip reference to elab
5766         entity if none exists (Gen_Elab_Calls): Complain if clash with
5767         No_Multiple_Elaboration.
5768         * s-rident.ads, restrict.ads: Add restriction No_Multiple_Elaboration.
5769         * sem_util.adb (Build_Elaboration_Entity): Skip building entity
5770         if not needed.
5771         * gnat_rm.texi: Document restriction No_Multiple_Elaboration.
5772         * sem_ch4.adb: Minor comment updates.
5774 2014-07-17  Ed Schonberg  <schonberg@adacore.com>
5776         * exp_ch9.adb (Buid_Protected_Subprogram_Call): Preserve type
5777         of function call for later use when shared passive objects
5778         are involved.
5780 2014-07-17  Hristian Kirtchev  <kirtchev@adacore.com>
5782         * par-ch13.adb (Get_Aspect_Specifications):
5783         Catch a case where the argument of SPARK aspect Refined_State
5784         is not properly parenthesized.
5786 2014-07-17  Hristian Kirtchev  <kirtchev@adacore.com>
5788         * exp_ch6.adb (Expand_Ctrl_Function_Call): Do not extend
5789         the lifetime of a reference to an Ada 2012 container element.
5790         (Is_Element_Reference): New routine.
5792 2014-07-17  Robert Dewar  <dewar@adacore.com>
5794         * ali.ads: Minor comment fix.
5795         * lib-writ.adb: Minor reformatting.
5797 2014-07-17  Ed Schonberg  <schonberg@adacore.com>
5799         * sem_ch10.adb (Analyze_Proper_Body): When analyzing a subunit
5800         in ASIS mode, load another subunit only if it a subunit of the
5801         current one, not a sibling that has been reached through the
5802         analysis of an ancestor. This allows the construction of the
5803         ASIS tree for the subunit even when sibling subunits have errors.
5805 2014-07-17  Hristian Kirtchev  <kirtchev@adacore.com>
5807         * sem_ch3.adb (Analyze_Declarations): Remove the guard which
5808         prevents the analysis of various contracts when the associated
5809         construct is erroneous.
5810         * sem_util.adb (Save_SPARK_Mode_And_Set): Do not query the
5811         SPARK_Pragma of an illegal or a partially decorated construct.
5813 2014-07-17  Robert Dewar  <dewar@adacore.com>
5815         * s-imguns.ads: Minor reformatting.
5817 2014-07-17  Hristian Kirtchev  <kirtchev@adacore.com>
5819         * exp_ch7.adb (Build_Finalization_Master): Move all local
5820         variables to the proper code section. When looking for an existing
5821         finalization master, inspect the ultimate ancestor type of the
5822         full view.
5823         * sem_util.ads, sem_util.adb (Root_Type_Of_Full_View): New routine.
5825 2014-07-17  Robert Dewar  <dewar@adacore.com>
5827         * aspects.ads, aspects.adb: Add entries for aspect Annotate.
5828         * gnat_rm.texi: Document Entity argument for pragma Annotate and
5829         Annotate aspect.
5830         * sem_ch13.adb (Analyze_Aspect_Specification): Add processing
5831         for Annotate aspect.
5832         * sem_prag.adb (Analyze_Pragma, case Annotate): Allow optional
5833         Entity argument at end.
5834         * sinfo.ads (N_Aspect_Specification): Add note on Annotate aspect.
5836 2014-07-17  Tristan Gingold  <gingold@adacore.com>
5838         * s-imguns.ads: Fix minor typo.
5840 2014-07-17  Thomas Quinot  <quinot@adacore.com>
5842         * sprint.adb: Minor reformatting.
5844 2014-07-17  Robert Dewar  <dewar@adacore.com>
5846         * sprint.adb (Write_Itype): Print proper header for string
5847         literal subtype.
5849 2014-07-17  Steve Baird  <baird@adacore.com>
5851         * sinfo.ads, sem_scil.ads: Improve comments, minor reformatting.
5853 2014-07-17  Vincent Celier  <celier@adacore.com>
5855         * gnatbind.adb: Change in message "try ... for more information".
5857 2014-07-17  Robert Dewar  <dewar@adacore.com>
5859         * sprint.adb: Code clean up.
5861 2014-07-17  Hristian Kirtchev  <kirtchev@adacore.com>
5863         * exp_ch7.adb (Find_Last_Init): Relocate local variables to
5864         the relevant code section. Add new local constant Obj_Id. When
5865         a limited controlled object is initialized by a function call,
5866         the build-in-place object access function call acts as the last
5867         initialization statement.
5868         * exp_util.adb (Is_Object_Access_BIP_Func_Call): New routine.
5869         (Is_Secondary_Stack_BIP_Func_Call): Code reformatting.
5870         * exp_util.ads (Is_Object_Access_BIP_Func_Call): New routine.
5872 2014-07-17  Ed Schonberg  <schonberg@adacore.com>
5874         * sem_ch8.adb (Analyze_Generic_Renaming): For generic subprograms,
5875         propagate intrinsic flag to renamed entity, to allow e.g. renaming
5876         of Unchecked_Conversion.
5877         * sem_ch3.adb (Analyze_Declarations): Do not analyze contracts
5878         if the declaration has errors.
5880 2014-07-17  Ed Schonberg  <schonberg@adacore.com>
5882         * a-rbtgbk.adb: a-rbtgbk.adb (Generic_Insert_Post): Check whether
5883         container is busy before checking whether capacity allows for
5884         a further insertion. Insertion in a busy container that is full
5885         raises Program_Error rather than Capacity_Error. Previous to that
5886         patch which exception was raised varied among container types.
5888 2014-07-17  Robert Dewar  <dewar@adacore.com>
5890         * g-comlin.ads, g-comlin.adb: Minor clean up.
5892 2014-07-17  Bob Duff  <duff@adacore.com>
5894         * gnat_ugn.texi: Update gnatpp doc.
5896 2014-07-17  Robert Dewar  <dewar@adacore.com>
5898         * gnat_rm.texi: Document new restriction No_Long_Long_Integers.
5899         * exp_ch4.adb (Make_Array_Comparison_Op): Add note that we
5900         could do this by actually expanding a real generic.
5901         * a-tags.ads: Add comments about performance.
5902         * sprint.adb (Sprint_Node_Actual, case N_Object_Declaration):
5903         Print Etype of defining identifier, rather than the object
5904         definition. More information.
5906 2014-07-17  Thomas Quinot  <quinot@adacore.com>
5908         * exp_dist.adb: Minor documentation clarification.
5910 2014-07-17  Hristian Kirtchev  <kirtchev@adacore.com>
5912         * exp_util.adb (Is_Aliased): Revert previous change.
5914 2014-07-17  Vincent Celier  <celier@adacore.com>
5916         * g-comlin.adb (Try_Help): New procedure.
5917         (Getopt): Use new procedure Try_Help.
5918         * g-comlin.ads (Try_Help): New procedure.
5920 2014-07-17  Bob Duff  <duff@adacore.com>
5922         * gnat_ugn.texi: Minor update.
5924 2014-07-17  Robert Dewar  <dewar@adacore.com>
5926         * gnat_rm.texi: Improve documentation of Unrestricted_Access.
5927         * sinfo.ads: Document restriction on aggregates (must expand to
5928         assignments if one or more assignments needs expansion, e.g. for
5929         controlled types).
5930         * sem_ch13.adb: All warning messages regarding bit order should
5931         be info: messages.
5932         * gnat_ugn.texi: Minor correction of missing @ on @code
5934 2014-07-17  Robert Dewar  <dewar@adacore.com>
5936         * restrict.ads (Implementation_Restriction): Add No_Long_Long_Integer.
5937         * s-rident.ads (Partition_Boolean_Restrictions): Add
5938         No_Long_Long_Integer.
5939         * sem_ch3.adb (Modular_Type_Declaration): Size must be <=
5940         Long_Integer'Size if restriction No_Long_Long_Integer is active.
5941         (Signed_Integer_Type_Declaration): Do not allow Long_Long_Integer
5942         as the implicit base type for a signed integer type declaration
5943         if restriction No_Long_Long_Integer is active.
5944         * sem_util.ads, sem_util.adb (Set_Entity_With_Checks): Include check for
5945         No_Long_Long_Integer.
5947 2014-07-17  Robert Dewar  <dewar@adacore.com>
5949         * sem_ch3.adb, a-ztexio.ads, exp_imgv.adb, casing.adb, casing.ads,
5950         einfo.ads, checks.adb, sem_ch12.adb, a-textio.ads, freeze.adb,
5951         repinfo.adb, exp_ch6.adb, sem_ch4.adb, a-witeio.ads, sem_ch8.adb,
5952         sem_warn.adb, exp_aggr.adb, exp_dist.adb, par-tchk.adb, s-fatgen.adb,
5953         treepr.adb, lib-xref.adb: Remove the word kludge from ada sources.
5955 2014-07-17  Robert Dewar  <dewar@adacore.com>
5957         * debug.adb: Remove -gnatdQ.
5958         * exp_disp.adb: Remove -gnatdQ.
5959         * a-ztenio.ads, a-wtinio.ads, a-wtmoio.ads, a-ztcoau.ads, a-tiinio.ads,
5960         a-wtfiio.ads, a-timoio.ads, sem_ch12.adb, a-tifiio.ads, a-ztinio.ads,
5961         rtsfind.adb, rtsfind.ads, a-ztmoio.ads, a-wtdeio.ads, a-ztfiio.ads,
5962         a-tideio.ads, a-wtflio.ads, a-ztdeio.ads, sem_ch8.adb, a-tiflio.ads,
5963         sprint.adb, a-ztflio.ads, snames.ads-tmpl, a-wtenio.ads,
5964         a-tienio.ads: Rename Text_IO_Kludge to Text_IO_Special_Unit.
5966 2014-07-17  Robert Dewar  <dewar@adacore.com>
5968         * back_end.adb: Minor reformatting and comment additions.
5969         * checks.ads, checks.adb (Duplicated_Tag_Checks_Suppressed): New
5970         function.
5971         * exp_disp.adb (Make_DT): Use Duplicated_Tag_Checks_Suppressed.
5972         (Make_VM_TSD): Use Duplicated_Tag_Checks_Suppressed.
5973         * gnat_rm.texi: Document new check Duplicated_Tag_Checks_Suppressed.
5974         * gnat_ugn.texi: Additional documentation for Duplicated_Tag_Check.
5975         * snames.ads-tmpl (Duplicated_Tag_Checks_Suppressed): New check.
5976         * types.ads (Duplicated_Tag_Checks_Suppressed): New check.
5978 2014-07-17  Robert Dewar  <dewar@adacore.com>
5980         * gnat_rm.texi: Minor comment updates.
5982 2014-07-17  Ed Schonberg  <schonberg@adacore.com>
5984         * sem_util.adb (Make_Explicit_Dereference): If the expression
5985         being dereferenced is a generalized indexing, reset the overloaded
5986         flag on the generalized indexing call, consistent with the
5987         resetting of the flag on the original indexed component.
5989 2014-07-17  Robert Dewar  <dewar@adacore.com>
5991         * gnat_ugn.texi: Document advise not to mix -gnatV? and
5992         optimization.
5994 2014-07-17  Robert Dewar  <dewar@adacore.com>
5996         * checks.adb (Insert_Valid_Check): Don't insist on a name
5997         for the prefix when we make calls to Force_Evaluation and
5998         Duplicate_Subexpr_No_Checks.
5999         * exp_util.adb (Is_Volatile_Reference): Handle all cases properly
6000         (Remove_Side_Effects): Handle all volatile references right
6001         (Side_Effect_Free): Volatile reference is never side effect free
6002         * sinfo.ads (N_Attribute_Reference): Add comments explaining
6003         that in the tree, the prefix can be a general expression.
6005 2014-07-17  Hristian Kirtchev  <kirtchev@adacore.com>
6007         * sem_ch6.adb (Analyze_Subprogram_Body_Contract,
6008         Analyze_Subprogram_Contract): Add comments on SPARK_Mode save/restore.
6009         * sem_ch7.adb (Analyze_Package_Body_Contract,
6010         Analyze_Package_Contract): Add comments on SPARK_Mode save/restore.
6012 2014-07-17  Robert Dewar  <dewar@adacore.com>
6014         * exp_ch7.ads, exp_util.ads: Document Insert_Action_After,
6015         Store_After_Actions_In_Scope.
6017 2014-07-17  Robert Dewar  <dewar@adacore.com>
6019         * sem_aux.ads: Minor comment addition.
6021 2014-07-17  Ed Schonberg  <schonberg@adacore.com>
6023         * sem_res.adb (Make_Call_Into_Operator): If the call is already
6024         a rewriting of an operator node, there are no actuals to be
6025         propagated from original node to rewritten node when in ASIS mode.
6027 2014-07-17  Hristian Kirtchev  <kirtchev@adacore.com>
6029         * sem_ch6.adb (Analyze_Subprogram_Body_Contract,
6030         Analyze_Subprogram_Contract): Add new local variable Mode. Save
6031         and restore the SPARK mode of the related construct in a
6032         stack-like fashion.
6033         * sem_ch7.adb (Analyze_Package_Body_Contract,
6034         Analyze_Package_Contract): Add new local variable Mode. Save and
6035         restore the SPARK mode of the related construct in a stack-like fashion.
6036         * sem_util.adb Remove with and use clause for Opt.
6037         (Restore_SPARK_Mode): New routine.
6038         (Save_SPARK_Mode_And_Set): New routine.
6039         * sem_util.ads Add with and use clause for Opt.
6040         (Restore_SPARK_Mode): New routine.
6041         (Save_SPARK_Mode_And_Set): New routine.
6043 2014-07-17  Hristian Kirtchev  <kirtchev@adacore.com>
6045         * exp_util.adb (Is_Aliased): Transient objects
6046         within an expression with actions cannot be considered aliased.
6048 2014-07-17  Thomas Quinot  <quinot@adacore.com>
6050         * sem.ads (Scope_Stack_Entry): Reorganize storage of action lists;
6051         introduce a new list (cleanup actions) for each (transient) scope.
6052         * sinfo.ads, sinfo.adb (Cleanup_Actions): New attribute for
6053         N_Block_Statement
6054         * exp_ch7.ads (Store_Cleanup_Actions_In_Scope): New subprogram.
6055         * exp_ch7.adb (Store_Actions_In_Scope): New subprogram, common
6056         processing for Store_xxx_Actions_In_Scope.
6057         (Build_Cleanup_Statements): Allow for a list of additional
6058         cleanup statements to be passed by the caller.
6059         (Expand_Cleanup_Actions): Take custom cleanup actions associated
6060         with an N_Block_Statement into account.
6061         (Insert_Actions_In_Scope_Around): Account for Scope_Stack_Entry
6062         reorganization (refactoring only, no behaviour change).
6063         (Make_Transient_Block): Add assertion to ensure that the current
6064         scope is indeed a block (namely, the entity for the transient
6065         block being constructed syntactically, which has already been
6066         established as a scope).  If cleanup actions are present in the
6067         transient scope, transfer them now to the transient block.
6068         * exp_ch6.adb (Expand_Protected_Subprogram_Call): Freeze the
6069         called function while it is still present as the name in a call
6070         in the tree. This may not be the case later on if the call is
6071         rewritten into a transient block.
6072         * exp_smem.adb (Add_Shared_Var_Lock_Procs): The post-actions
6073         inserted after calling a protected operation on a shared passive
6074         protected must be performed in a block finalizer, not just
6075         inserted in the tree, so that they are executed even in case of
6076         a normal (RETURN) or abnormal (exception) transfer of control
6077         outside of the current scope.
6078         * exp_smem.ads (Add_Shared_Var_Lock_Procs): Update documentation
6079         * sem_ch8.adb, expander.adb, exp_ch11.adb: Adjust for
6080         Scope_Stack_Entry reorganization.
6082 2014-07-17  Thomas Quinot  <quinot@adacore.com>
6084         * exp_disp.adb (Make_DT, Make_VM_TSD): Do not omit Check_TSD
6085         call for types that do not have an explicit attribute definition
6086         clause for External_Tag, as their default tag may clash with an
6087         explicit tag defined for some other type.
6089 2014-07-17  Hristian Kirtchev  <kirtchev@adacore.com>
6091         * exp_util.adb (Is_Controlled_Function_Call): Recognize a
6092         controlled function call with multiple actual parameters that
6093         appears in Object.Operation form.
6095 2014-07-17  Thomas Quinot  <quinot@adacore.com>
6097         * einfo.ads, einfo.adb (Has_External_Tag_Rep_Clause): Remove
6098         entity flag.
6099         * sem_ch13.adb (Analyze_Attribute_Definition_Clause, case
6100         External_Tag): No need to set entity flag.
6101         * sem_aux.ads, sem_aux.adb (Has_External_Tag_Rep_Clause):
6102         Reimplement correctly in terms of Has_Rep_Item.
6104 2014-07-17  Thomas Quinot  <quinot@adacore.com>
6106         * exp_ch7.adb (Establish_Transient_Scope.Find_Node_To_Be_Wrapped):
6107         Start examining the tree at the node passed to
6108         Establish_Transient_Scope (not its parent).
6109         * exp_ch6.adb (Make_Build_In_Place_Call_In_Object_Declaration):
6110         The access type for the variable storing the reference to
6111         the call must be declared and frozen prior to establishing a
6112         transient scope.
6113         * exp_ch9.adb: Minor reformatting.
6115 2014-07-17  Pascal Obry  <obry@adacore.com>
6117         * s-os_lib.ads: Minor comment update.
6119 2014-07-17  Tristan Gingold  <gingold@adacore.com>
6121         * sysdep.c: Add ATTRIBUTE_UNUSED to avoid warnings.  Fix some
6122         indentation.
6123         * socket.c: Remove #warning to avoid warning.
6124         * expect.c: Indent some preprocessor directives to clarify
6125         nested if.  Do not use wait.h on PikeOS.  Add ATTRIBUTE_UNUSED
6126         to remove warnings.
6127         * env.c: Fix indentation.  Port to PikeOS.
6128         * gsocket.h: Port to PikeOS.  Remove #warning.
6129         * terminals.c: Port to PikeOS.  Fix indentation of the stubs.
6130         Add ATTRIBUTE_UNUSED to stubs arguments.  Fix return statement
6131         of stubbed __gnat_setup_parent_communication.
6132         * adaint.c: Port to PikeOS.  Reindent some preprocessor
6133         directives to clarify nested if.  Fix indentation.  Add missing
6134         ATTRIBUTE_UNUSED.
6136 2014-07-17  Robert Dewar  <dewar@adacore.com>
6138         * sem_attr.adb: Minor reformatting.
6140 2014-07-17  Robert Dewar  <dewar@adacore.com>
6142         * exp_ch7.adb, exp_ch7.ads, sinfo.ads: Minor reformatting.
6144 2014-07-17  Ed Schonberg  <schonberg@adacore.com>
6146         * sem_case.adb (Check_Choice_Set): If the case expression is the
6147         expression in a predicate, do not recheck coverage against itself,
6148         to prevent spurious errors.
6149         * sem_ch13.adb (Check_Aspect_At_End_Of_Declarations): Indicate that
6150         expression comes from an aspect specification, to prevent spurious
6151         errors when expression is a case expression in a predicate.
6153 2014-07-17  Pascal Obry  <obry@adacore.com>
6155         * adaint.c, adaint.h (__gnat_set_executable): Add mode parameter.
6156         * s-os_lib.ads, s-os_lib.adb (Set_Executable): Add Mode parameter.
6158 2014-07-17  Vincent Celier  <celier@adacore.com>
6160         * gnatchop.adb, make.adb, gnatbind.adb, clean.adb, gprep.adb,
6161         gnatxref.adb, gnatls.adb, gnatfind.adb, gnatname.adb: Do not output
6162         the usage for an erroneous invocation of a gnat tool.
6164 2014-07-16  Vincent Celier  <celier@adacore.com>
6166         * gnatls.adb: Get the target parameters only if -nostdinc was
6167         not specified.
6169 2014-07-16  Ed Schonberg  <schonberg@adacore.com>
6171         * checks.adb (Insert_Valid_Check): If the expression is a packed
6172         component of a modular type of the right size the data is always
6173         valid. This os particularly useful if the component is part of
6174         a volatile variable.
6176 2014-07-16  Robert Dewar  <dewar@adacore.com>
6178         * gnat_rm.texi, sinfo.ads, freeze.adb, exp_aggr.adb: Minor reformatting
6180 2014-07-16  Thomas Quinot  <quinot@adacore.com>
6182         * exp_ch7.ads: Minor documentation fix.
6184 2014-07-16  Ed Schonberg  <schonberg@adacore.com>
6186         * sem_ch3.adb (Find_Type_Name): Diagnose properly
6187         a private extension completion that is an interface definition
6188         with an interface list.
6190 2014-07-16  Arnaud Charlet  <charlet@adacore.com>
6192         * gnatls.adb (Gnatls): Code clean ups.
6194 2014-07-16  Thomas Quinot  <quinot@adacore.com>
6196         * sinfo.ads, sinfo.adb (N_Compound_Statement): New node kind.
6197         * sem.adb (Analyze): Handle N_Compound_Statement.
6198         * sprint.adb (Sprint_Node_Actual): Ditto.
6199         * sem_ch5.ads, sem_ch5.adb (Analyze_Compound_Statement): New
6200         procedure to handle N_Compound_Statement.
6201         * exp_aggr.adb (Collect_Initialization_Statements):
6202         Use a proper compound statement node, instead of a bogus
6203         expression-with-actions with a NULL statement as its expression,
6204         to wrap collected initialization statements.
6205         * freeze.ads, freeze.adb
6206         (Explode_Initialization_Compound_Statement): New public procedure,
6207         lifted from Freeze_Entity.
6208         (Freeze_Entity): When freezing
6209         an object with captured initialization statements and without
6210         delayed freezing, explode compount statement.
6211         * sem_ch4.adb (Analyze_Expression_With_Actions): Remove special
6212         case that used to handle bogus EWAs with NULL statement as
6213         the expression.
6214         * exp_ch13.adb (Expand_N_Freeze_Entity): For an object with
6215         delayed freezing and captured initialization statements, explode
6216         compound statement.
6218 2014-07-16  Gary Dismukes  <dismukes@adacore.com>
6220         * g-rewdat.adb, g-rewdat.ads: Minor reformatting.
6222 2014-07-16  Doug Rupp  <rupp@adacore.com>
6224         * s-interr-hwint.adb: Casing error on parameter.
6226 2014-07-16  Pascal Obry  <obry@adacore.com>
6228         * Makefile.rtl: Add g-rewdat.o dependencies in
6229         GNATRTL_NONTASKING_OBJS.
6231 2014-07-16  Ed Schonberg  <schonberg@adacore.com>
6233         * sem_case.adb: Code clean up.
6235 2014-07-16  Vincent Celier  <celier@adacore.com>
6237         * make.adb: Do not read gnat.adc when gnatmake is invoked
6238         with -gnatA.
6240 2014-07-16  Pascal Obry  <obry@adacore.com>
6242         * gnat_rm.texi, impunit.adb, g-rewdat.adb, g-rewdat.ads: Initial
6243         implementation of GNAT.Rewrite_Data.
6245 2014-07-16  Vincent Celier  <celier@adacore.com>
6247         * gnatls.adb (Normalize): New function.
6248         (Gnatls): Get the target parameters. On targets other than VMS,
6249         normalize the path names in the source search path, the object search
6250         path and the project search path.
6252 2014-07-16  Ed Schonberg  <schonberg@adacore.com>
6254         * sem_case.adb: Avoid self-checking of case expressions in
6255         dynamic predicates.
6257 2014-07-16  Robert Dewar  <dewar@adacore.com>
6259         * gnat_rm.texi: Document effect of Suppress_Initialization on tags and
6260         discriminants.
6262 2014-07-16  Eric Botcazou  <ebotcazou@adacore.com>
6264         * switch-b.adb (Scan_Binder_Switches): Add missing guard.
6266 2014-07-16  Ben Brosgol  <brosgol@adacore.com>
6268         * gnat_ugn.texi: Fix typo.
6270 2014-07-16  Ed Schonberg  <schonberg@adacore.com>
6272         * exp_ch4.adb (Expand_N_Case_Expression): Do not expand case
6273         expression if it is the specification of a subtype predicate:
6274         it will be expanded when the return statement is analyzed, or
6275         when a static predicate is transformed into a static expression
6276         for evaluation by the front-end.
6277         * sem_ch13.adb (Get_RList): If the expression for a static
6278         predicate is a case expression, extract the alternatives of the
6279         branches with a True value to create the required statically
6280         evaluable expression.
6282 2014-07-16  Thomas Quinot  <quinot@adacore.com>
6284         * exp_prag.adb (Expand_Pragma_Check): Use the location of the
6285         expression, not the location of the aspect, for all generated
6286         code, so that in particular the call to raise_assert_failure
6287         gets the sloc of the associated condition.
6288         * exp_ch6.adb
6289         (Expand_Subprogram_Contract.Build_Postconditions_Procedure):
6290         Set an explicit End_Label on the handled sequence of statements
6291         for the _Postconditions procedure so that the implicit return
6292         statement does not erroneously get associated with code generated
6293         for the last condition in postconditions.
6295 2014-07-16  Thomas Quinot  <quinot@adacore.com>
6297         * ug_words: Fix name of VMS synonym for -gnatw.z (SIZE_ALIGNMENT,
6298         not SIZE_ALIGN) and -gnatw.Z (NOSIZE_ALIGNMENT, not NOSIZE_ALIGN).
6299         * vms_data.ads: Add missing spaces in VMS synonyms for -gnatw.z /
6300         -gnatw.Z.
6302 2014-07-16  Robert Dewar  <dewar@adacore.com>
6304         * sem_ch3.adb, sem_prag.adb, sem_util.adb, sem_res.adb, sem_ch13.adb:
6305         Minor code reorganization (use Is_Access_Type, not in Access_Kind).
6306         * exp_ch3.adb: Minor code reorganization, use Is_Access_Type,
6307         not in Access_Kind.
6308         * par-ch4.adb (At_Start_Of_Attribute): New function
6309         (P_Simple_Expression): Better msg for bad attribute prefix.
6310         * scans.ads: Minor reformatting.
6312 2014-07-16  Ed Schonberg  <schonberg@adacore.com>
6314         * sem_attr.adb (Resolve_Attribute, case 'Update): If choice is a
6315         static constant, check that in belongs to the corresponding index
6316         subtype, to produce the proer warning when expansion is disabled.
6318 2014-07-16  Robert Dewar  <dewar@adacore.com>
6320         * freeze.adb (Freeze_Entity): Warn on incompatible size/alignment.
6321         * gnat_ugn.texi: Document -gnatw.z and -gnatw.Z.
6322         * ug_words: VMS synonyms (WARNINGS=[NO]SIZE_ALIGN) for -gnatw.z/-gnatw.Z
6323         * usage.adb: Add lines for -gnatw.z/-gnatw.Z.
6324         * vms_data.ads: VMS synonyms (WARNINGS=[NO]SIZE_ALIGN) for
6325         -gnatw.z/-gnatw.Z
6326         * warnsw.adb: Set Warn_On_Size_Alignment appropriately.
6327         * warnsw.ads (Warn_On_Size_Alignment): New flag Minor
6328         reformatting.
6330 2014-07-16  Hristian Kirtchev  <kirtchev@adacore.com>
6332         * exp_ch7.adb (Process_Declarations): Reinstate the check on
6333         a hook object to ensure that the related transient declaration
6334         is finalizable.
6335         * exp_util.adb (Is_Aliased): Do not consider expresison with
6336         actions as a special context.
6337         (Requires_Cleanup_Actions): Reinstate the check on a hook object to
6338         ensure that the related transient declaration is finalizable.
6340 2014-07-16  Robert Dewar  <dewar@adacore.com>
6342         * checks.ads, checks.adb (Allocation_Checks_Suppressed): New function.
6343         * snames.ads-tmpl: Add Allocation_Check to list of check names.
6344         * types.ads: Add Allocation_Check to list of check names.
6346 2014-07-16  Thomas Quinot  <quinot@adacore.com>
6348         * sem_util.adb (Enter_Name): replace bogus test for presence of
6349         Corresponding_Remote_Type with correct test on Ekind.
6350         * sem_res.adb (Valid_Conversion): ditto; also clarify validity
6351         of calls to Corresponding_ Remote_Type (documentation fix).
6353 2014-07-16  Robert Dewar  <dewar@adacore.com>
6355         * gnat_rm.texi: Document illegal case of Unrestricted_Access.
6356         * sem_attr.adb (Analyze_Access_Attribute): Set_Non_Aliased_Prefix
6357         where it applies.
6358         (Resolve_Attribute, case Access): Flag illegal Unrestricted_Access use.
6359         * sinfo.ads, sinfo.adb (Non_Aliased_Prefix): New flag.
6361 2014-07-16  Robert Dewar  <dewar@adacore.com>
6363         * gnat_ugn.texi: Document binder switch -Ra.
6364         * gnatbind.adb (List_Closure_Display): Implement -Ra switch
6365         (List_Closure_All).
6366         * opt.ads (List_Closure_All): New switch.
6367         * switch-b.adb (Scan_Binder_Switches): Recognize -Ra to set
6368         List_Closure_All.
6370 2014-07-16  Ben Brosgol  <brosgol@adacore.com>
6372         * gnat_rm.texi: Minor edits, to make case consistent in names
6373         of types and fields.
6375 2014-07-16  Robert Dewar  <dewar@adacore.com>
6377         * gnat_rm.texi: Document erroneous mixing of thin pointers and
6378         unrestricted access
6379         * gnat_ugn.texi: Add note on size of access types about thin
6380         pointers and the use of attribute Unrestricted_Access.
6382 2014-07-16  Ed Schonberg  <schonberg@adacore.com>
6384         * a-cbdlli.ads, a-cbdlli.adb, a-cbhama.ads, a-cbhama.adb,
6385         * a-cbhase.ads, a-cbhase.adb, a-cborma.ads, a-cborma.adb,
6386         * a-cborse.ads, a-cborse.adb, a-cobove.ads a-cobove.adb: Add Control
6387         machinery to detect tampering on bounded vectors.
6389 2014-07-16  Robert Dewar  <dewar@adacore.com>
6391         * gnat_rm.texi: Document that leading/trailing asterisks are
6392         now implied for the pattern match string for pragma Warnings
6393         and Warning_As_Error.
6394         * sem_prag.adb (Acquire_Warning_Match_String): New procedure.
6395         (Analyze_Pragma, case Warning_As_Error): Call
6396         Acquire_Warning_Match_String.
6397         (Analyze_Pragma, case Warnings): Call Acquire_Warning_Match_String.
6399 2014-07-16  Bob Duff  <duff@adacore.com>
6401         * gnat_ugn.texi: Document need for project file
6402         for --incremental switch for gnat2xml.
6404 2014-07-16  Robert Dewar  <dewar@adacore.com>
6406         * gnat_rm.texi: Fix example of non-packable components in packed
6407         records section.
6409 2014-07-16  Robert Dewar  <dewar@adacore.com>
6411         * s-tpoben.adb, s-tasren.adb, s-interr.adb, s-interr-hwint.adb,
6412         s-shasto.adb, s-interr-vms.adb, s-interr-sigaction.adb: Avoid use of
6413         upper case in exception messages.
6415 2014-07-16  Robert Dewar  <dewar@adacore.com>
6417         * snames.ads-tmpl, sem_attr.adb, exp_attr.adb: Same_Storage attribute
6418         is renamed Has_Same_Storage.
6419         * gnat_rm.texi: Document missing SPARK pragmas and attributes.
6420         * sem_prag.adb: Minor comment fix (use LOCAL_NAME in syntax
6421         descriptions).
6423 2014-07-16  Robert Dewar  <dewar@adacore.com>
6425         * exp_util.adb, sem_attr.adb, exp_ch4.adb, a-cohase.ads,
6426         a-coinho-shared.adb, a-coinho-shared.ads: Minor reformatting.
6428 2014-07-16  Robert Dewar  <dewar@adacore.com>
6430         * gnat_ugn.texi: Add note that integrated
6431         preprocessing cannot be applied to configuration pragma files.
6433 2014-07-16  Yannick Moy  <moy@adacore.com>
6435         * sem_attr.adb (Analyze_Attribute/cases Pred
6436         and Succ): Always enable range check on fixed-point types if
6437         not suppressed for the type.
6439 2014-07-16  Hristian Kirtchev  <kirtchev@adacore.com>
6441         * sem_util.adb (State_Has_Enabled_Property):
6442         Account for an external property denoted by an others choice.
6444 2014-07-16  Hristian Kirtchev  <kirtchev@adacore.com>
6446         * exp_ch4.ads, exp_ch4.adb (Find_Hook_Context): Relocated to Exp_Util.
6447         * exp_ch7.adb (Process_Declarations): There is no need to check
6448         that a transient object being hooked is controlled as it would
6449         not have been hooked in the first place.
6450         * exp_ch9.adb Remove with and use clause for Exp_Ch4.
6451         * exp_util.adb (Find_Hook_Context): Relocated from Exp_Ch4.
6452         (Is_Aliased): A renaming of a transient controlled object is
6453         not considered aliasing when it occurs within an expression
6454         with actions.
6455         (Requires_Cleanup_Actions): There is no need to
6456         check that a transient object being hooked is controlled as it
6457         would not have been hooked in the first place.
6458         * exp_util.ads (Find_Hook_Context): Relocated from Exp_Ch4.
6460 2014-07-16  Hristian Kirtchev  <kirtchev@adacore.com>
6462         * sem_ch13.adb (Insert_After_SPARK_Mode): Moved to
6463         the outer level of routine Analyze_Aspect_Specifications. Ensure
6464         that the corresponding pragmas of aspects Initial_Condition and
6465         Initializes are inserted after pragma SPARK_Mode.
6467 2014-07-16  Ed Schonberg  <schonberg@adacore.com>
6469         * sem_attr.adb (Analyze_Attribute, case 'Update): Handle
6470         properly a choice list with more than one choice, where each
6471         is an aggregate denoting a sequence of array indices for a
6472         multidimentional array. For SPARK use.
6474 2014-07-16  Vadim Godunko  <godunko@adacore.com>
6476         * a-coinho-shared.adb (Adjust): Create
6477         copy of internal shared object and element when source container
6478         is locked.
6479         (Copy): Likewise.
6480         (Query_Element): Likewise.
6481         (Update_Element): Likewise.
6482         (Constant_Reference): Likewise. Raise Constraint_Error on attempt
6483         to get reference for empty holder.
6484         (Reference): Likewise.
6486 2014-07-16  Thomas Quinot  <quinot@adacore.com>
6488         * exp_ch4.adb (Find_Hook_Context): New subprogram, extracted
6489         from Process_Transient_Oject.
6490         * exp_ch4.ads: Ditto.
6491         * exp_ch9.adb (Build_Class_Wide_Master): Insert the _master
6492         declaration as an action on the topmost enclosing expression,
6493         not on a possibly conditional subexpreession.
6495 2014-07-16  Vadim Godunko  <godunko@adacore.com>
6497         * a-coinho.adb, a-coinho-shared.adb, a-coinho.ads, a-coinho-shared.ads:
6498         Fix parameter mode of Update_Element.
6500 2014-07-16  Robert Dewar  <dewar@adacore.com>
6502         * a-coinho.adb, a-coinho-shared.adb, a-coinho-shared.ads: Minor
6503         reformatting.
6505 2014-07-16  Ed Schonberg  <schonberg@adacore.com>
6507         * a-cohase.ads: Type Iterator must be controlled, so that the
6508         tampering bit is properly set through an iteration.
6509         * a-cohase.adb: Add Finalize operation for type Iterator.
6511 2014-07-16  Ed Schonberg  <schonberg@adacore.com>
6513         * a-coinho-shared.adb, a-coinho-shared.ads: Proper structures for
6514         tampering checks.
6516 2014-07-16  Ed Schonberg  <schonberg@adacore.com>
6518         * a-coinho-shared.adb: Fix spurious accessibility check.
6520 2014-06-15  Jan Hubicka  <hubicka@ucw.cz>
6522         * gcc-interface/utils.c (process_attributes): Use set_decl_tls_model.
6524 2014-06-14  Bernd Edlinger  <bernd.edlinger@hotmail.de>
6526         PR ada/61505
6527         * gnat_rm.texi: Fix errors with makeinfo 5.1.
6529 2014-06-14  Arnaud Charlet  <charlet@adacore.com>
6531         PR ada/61505
6532         * gnat_rm.texi: Attempt to fix error with makeinfo 5.1.
6534 2014-06-13  Yannick Moy  <moy@adacore.com>
6536         * exp_attr.adb: Fix typo in comment.
6537         * gnat1drv.adb (Adjust_Global_Switches): Force float overflow
6538         checking in GNATprove_Mode.
6540 2014-06-13  Ed Schonberg  <schonberg@adacore.com>
6542         * a-coinho-shared.adb, a-coinho-shared.ads: Update shared version.
6544 2014-06-13  Robert Dewar  <dewar@adacore.com>
6546         * sem_ch3.adb, sem_ch9.adb, a-coinho.adb, a-coinho.ads: Minor
6547         reformatting.
6549 2014-06-13  Hristian Kirtchev  <kirtchev@adacore.com>
6551         * sem_prag.adb (Analyze_Pragma): Add local
6552         variable Missing_Parentheses. Emit an error when a state
6553         declaration with options appears without parentheses. Add a
6554         guard to prevent a bogus error when a state declaration may be
6555         interpreted as an option if a previous declaration with options
6556         was not parenthesized.
6558 2014-06-13  Robert Dewar  <dewar@adacore.com>
6560         * checks.adb: Validate_Alignment_Check_Warnings: New procedure
6561         (Apply_Address_Clause_Check): Make Aligment_Warnings table entry.
6562         * checks.ads (Alignment_Warnings_Record): New type.
6563         (Alignment_Warnings): New table
6564         (Validate_Alignment_Check_Warnings): New procedure.
6565         * errout.adb (Delete_Warning_And_Continuations): New procedure
6566         (Error_Msg_Internal): Set Warning_Msg (Delete_Warning): Handle
6567         Warnings_Treated_As_Errors (Finalize): Minor reformatting
6568         * errout.ads (Warning_Msg): New variable
6569         (Delete_Warning_And_Continuations): New procedure
6570         * erroutc.adb (Delete_Msg): Handle Warnings_Treated_As_Errors count.
6571         * gnat1drv.adb (Post_Compilation_Validation_Checks): New procedure.
6573 2014-06-13  Ed Schonberg  <schonberg@adacore.com>
6575         * a-coinho.adb, a-coinho.ads: Add Reference machinery.
6577 2014-06-13  Hristian Kirtchev  <kirtchev@adacore.com>
6579         * errout.adb (SPARK_Msg_N): New routine.
6580         (SPARK_Msg_NE): New routine.
6581         * errout.ads Add a section on SPARK-related error routines.
6582         (SPARK_Msg_N): New routine.
6583         (SPARK_Msg_NE): New routine.
6584         * sem_ch13.adb (Analyze_Aspect_Specifications): Ensure that
6585         pragma Abstract_State is always inserted after SPARK_Mode.
6586         (Insert_After_SPARK_Mode): New routine.
6587         * sem_prag.adb (Analyze_Abstract_State,
6588         Analyze_Constituent, Analyze_External_Property,
6589         Analyze_External_Property_In_Decl_Part, Analyze_Global_Item,
6590         Analyze_Global_List, Analyze_Initialization_Item,
6591         Analyze_Initialization_Item_With_Inputs, Analyze_Input_Item,
6592         Analyze_Input_List, Analyze_Input_Output, Analyze_Part_Of,
6593         Analyze_Pragma, Analyze_Refined_Depends_In_Decl_Part,
6594         Analyze_Refined_Global_In_Decl_Part,
6595         Analyze_Refined_State_In_Decl_Part, Analyze_Refinement_Clause,
6596         Check_Aspect_Specification_Order, Check_Constituent_Usage,
6597         Check_Declaration_Order, Check_Dependency_Clause,
6598         Check_Duplicate_Mode, Check_Duplicate_Option,
6599         Check_Duplicate_Property, Check_External_Properties,
6600         Check_External_Property, Check_Function_Return,
6601         Check_Matching_Constituent, Check_Matching_State,
6602         Check_Mode_Restriction_In_Enclosing_Context,
6603         Check_Mode_Restriction_In_Function, Check_Refined_Global_Item,
6604         Check_State_And_Constituent_Use, Create_Or_Modify_Clause,
6605         Has_Extra_Parentheses, Inconsistent_Mode_Error,
6606         Match_Error, Propagate_Part_Of, Report_Extra_Clauses,
6607         Report_Extra_Constituents_In_List, Report_Extra_Inputs,
6608         Report_Unrefined_States, Report_Unused_Constituents,
6609         Report_Unused_States, Role_Error, Usage_Error):
6610         Convert Error_Msg_XXX calls to SPARK_Msg_XXX calls
6611         to report semantic errors only when SPARK_Mode is on.
6612         (Analyze_Depends_In_Decl_Part): Do not check the syntax of
6613         pragma Depends explicitly, this is now done by the analysis.
6614         (Analyze_Global_In_Decl_List): Do not check the syntax of
6615         pragma Global explicitly, this is now done by the analysis.
6616         (Analyze_Initializes_In_Decl_Part): Do not check the syntax of
6617         pragma Initializes explicitly, this is now done by the analysis.
6618         (Analyze_Part_Of): Do not check the syntax of the encapsulating
6619         state, this is now done by the analysis.
6620         (Analyze_Pragma): Do
6621         not check the syntax of a state declaration, this is now done
6622         by the analysis.
6623         (Analyze_Refined_Depends_In_Decl_Part): Do not
6624         check the syntax of pragma Refined_Depends explicitly, this is now
6625         done by the analysis.
6626         (Analyze_Refined_Global_In_Decl_Part): Do
6627         not check the syntax of pragma Refined_Global explicitly, this is
6628         now done by the analysis.
6629         (Analyze_Refined_State_In_Decl_Part):
6630         Do not check the syntax of pragma Refined_State explicitly, this
6631         is now done by the analysis.
6632         (Check_Dependence_List_Syntax): Removed.
6633         (Check_Global_List_Syntax): Removed.
6634         (Check_Initialization_List_Syntax): Removed.
6635         (Check_Item_Syntax): Removed.
6636         (Check_Missing_Part_Of): Do not consider items from an instance.
6637         (Check_Refinement_List_Syntax): Removed.
6638         (Check_State_Declaration_Syntax): Removed.
6639         (Collect_Global_List): Do not raise Program_Error when the input is
6640         malformed.
6641         (Process_Global_List): Do not raise Program_Error when the input
6642         is malformed.
6643         * sem_ch13.adb: Minor reformatting.
6645 2014-06-13  Ed Schonberg  <schonberg@adacore.com>
6647         * sem_ch3.adb (Find_Type_Name): Diagnose a private type completion
6648         that is an interface definition with an interface list.
6649         (Process_Full_View): Move error message on missmatched interfaces
6650         between views to the declaration of full view, for clarity.
6651         * sem_ch9.adb (Check_Interfaces): Move error message to full view,
6652         for clarity.
6654 2014-06-13  Robert Dewar  <dewar@adacore.com>
6656         * exp_attr.adb (Expand_N_Attribute_Reference, case Pred/Succ): Change
6657         reason to Overflow.
6659 2014-06-13  Robert Dewar  <dewar@adacore.com>
6661         * makeutl.adb: Minor reformatting.
6663 2014-06-13  Gail Schenker  <schenker@adacore.com>
6665         * debug.adb, sem_eval.adb (Why_Not_Static): Remove temporary code and
6666         associated flag (d.z), no longer needed.
6668 2014-06-13  Ed Schonberg  <schonberg@adacore.com>
6670         * sem_ch13.adb (Analyze_Aspect_Specifications): For Import and
6671         Export aspects, do not check whether a corresponding Convention
6672         aspect has been specified. Convention is optional in Ada2012,
6673         and defaults to Convention_Ada.
6675 2014-06-13  Eric Botcazou  <ebotcazou@adacore.com>
6677         * checks.adb (Apply_Address_Clause_Check): Only issue the new
6678         warning if the propagation warning is issued.
6680 2014-06-13  Thomas Quinot  <quinot@adacore.com>
6682         * exp_ch4.adb: Minor reformatting.
6684 2014-06-13  Robert Dewar  <dewar@adacore.com>
6686         * exp_attr.adb (Expand_N_Attribute_Reference, case Pred):
6687         Handle float range check case (Expand_N_Attribute_Reference,
6688         case Succ): Handle float range check case.
6689         * sem_attr.adb (Analyze_Attribute, case Pred/Succ): Handle float
6690         range check case.
6692 2014-06-13  Vincent Celier  <celier@adacore.com>
6694         * makeutl.ads (Compute_Builder_Switches): Change name of
6695         parameter Root_Environment to Env.
6696         * prj-conf.adb (Check_Switches): Call Locate_Runtime with the
6697         Env parameter of procedure Get_Or_Create_Configuration_File.
6698         (Locate_Runtime): Call Find_Rts_In_Path with the Project_Path
6699         of new parameter Env.
6700         * prj-conf.ads (Locate_Runtime): New parameter Env of type
6701         Prj.Tree.Environment.
6703 2014-06-13  Robert Dewar  <dewar@adacore.com>
6705         * gnat_rm.texi: Minor comment clarification for Check_Float_Overflow.
6707 2014-06-13  Robert Dewar  <dewar@adacore.com>
6709         * exp_attr.adb, exp_ch9.adb, lib-writ.adb, g-comlin.adb: Minor
6710         reformatting.
6711         * sem_attr.adb: Minor code reformatting and simplification.
6712         * checks.adb: Fix minor typo.
6714 2014-06-13  Emmanuel Briot  <briot@adacore.com>
6716         * g-comlin.adb (Get_Argument): fix expansion
6717         of command line arguments (e.g. "*.adb") when using a custom
6718         parser. The parser was not passed to the recursive call, and
6719         thus we were trying to do the expansion on the default command
6720         line parser.
6722 2014-06-13  Thomas Quinot  <quinot@adacore.com>
6724         * exp_ch9.adb: Minor reformatting.
6726 2014-06-13  Ed Schonberg  <schonberg@adacore.com>
6728         * exp_attr.adb (Expand_N_Attribute_Reference, case 'Old):
6729         To determine whether the attribute should be expanded, examine
6730         whether the enclosing postcondition pragma is to be checked,
6731         rather than using the internal flag Assertions_Enabled.
6733 2014-06-13  Ben Brosgol  <brosgol@adacore.com>
6735         * gnat_rm.texi: Minor fixes.
6736         * gnat_ugn.texi: Added a missing "@itemize".
6738 2014-06-13  Robert Dewar  <dewar@adacore.com>
6740         * debug.adb: Remove -gnatd.1 flag documentation.
6741         * layout.adb (Layout_Type): Remove special handling of size
6742         for anonymous access type.
6743         * sem_ch3.adb (Replace_Type): Remove special handling of size
6744         for anonymous access type.
6746 2014-06-13  Robert Dewar  <dewar@adacore.com>
6748         * debug.adb: Document debug flag -gnatd.1.
6749         * layout.adb (Layout_Type): Size change for anonymous access
6750         types under -gnatd.1.
6751         * sem_ch3.adb (Replace_Type): Size change for anonymous access
6752         types under -gnatd.1.
6754 2014-06-13  Robert Dewar  <dewar@adacore.com>
6756         * layout.adb (Layout_Type): Anonymous access types designating
6757         unconstrained arrays are always thin pointers.
6758         * sem_ch3.adb (Replace_Type): Anonymous access types designating
6759         unconstrained arrays are always thin pointers.
6761 2014-06-13  Ed Schonberg  <schonberg@adacore.com>
6763         * sem_attr.adb (Analyze_Attribute): Use Check_Parameterless_Call
6764         to resolve the prefix of an attribute that is an entity name
6765         and may be a parameterless call.  Minor code reorganization.
6767 2014-06-13  Robert Dewar  <dewar@adacore.com>
6769         * lib.ads, lib.adb, lib-writ.adb, lib-load.adb (Is_Compiler_Unit):
6770         Removed.
6771         * opt.ads (Compiler_Unit): New flag.
6772         * par-ch5.adb (Test_Statement_Required): Call Check_Compiler_Unit
6773         for null statement sequence (not allowed in compiler unit).
6774         * par-prag.adb (Prag): Handle Compiler_Unit[_Warning] during
6775         parsing.
6776         * restrict.ads, restrict.adb (Check_Compiler_Unit): New version and new
6777         calling sequence.
6778         * sem_ch11.adb, sem_ch3.adb, sem_ch4.adb: New calling sequence for
6779         Check_Compiler_Unit.
6780         * sem_ch6.adb (Analyze_Extended_Return_Statement): Call
6781         Check_Compiler_Unit (this construct is not allowed in compiler
6782         units).
6783         * sem_prag.adb (Analyze_Pragma, case Compiler_Unit[_Warning]):
6784         Set Opt.Compiler_Unit.
6786 2014-06-13  Geert Bosch  <bosch@adacore.com>
6788         * gnat_rm.texi, s-tasinf-solaris.ads, sem_prag.adb, gnat_ugn.texi,
6789         s-tasinf-mingw.ads, s-tasinf.ads, s-tasinf-linux.ads,
6790         s-tasinf-vxworks.ads: Make Task_Info pragma and package obsolescent.
6792 2014-06-13  Robert Dewar  <dewar@adacore.com>
6794         * s-tasini.adb, s-tarest.adb, s-taprob.adb: Minor reformatting.
6796 2014-06-13  Hristian Kirtchev  <kirtchev@adacore.com>
6798         * freeze.adb (Freeze_Entity): Remove the check concerning volatile
6799         types in SPARK as it is poorly placed and poorly formulated. The
6800         check was flagging ALL volatile entities as illegal in SPARK.
6801         * sem_prag.adb (Process_Atomic_Shared_Volatile): Flag volatile
6802         types as illegal in SPARK.
6804 2014-06-13  Robert Dewar  <dewar@adacore.com>
6806         * sem_cat.adb: Minor reformatting.
6808 2014-06-13  Yannick Moy  <moy@adacore.com>
6810         * sem_prag.adb (Analyze_Pragma/Post_Class): Fix typo.
6812 2014-06-13  Arnaud Charlet  <charlet@adacore.com>
6814         * gnat_rm.texi: Add detail on SPARK_05 restriction.
6816 2014-06-13  Bob Duff  <duff@adacore.com>
6818         * s-solita.adb (Get_Sec_Stack_Addr, Init_Tasking_Soft_Links):
6819         Add assertions requiring the secondary stack to be initialized.
6820         * s-solita.ads (Init_Tasking_Soft_Links): Comment.
6821         * s-taprob.adb, s-tarest.adb, s-tasini.adb (elab code): Make sure the
6822         secondary stack is initialized before calling Init_Tasking_Soft_Links,
6823         by adding pragmas Elaborate_Body.
6825 2014-06-13  Thomas Quinot  <quinot@adacore.com>
6827         * sem_ch13.adb (Analyze_Stream_TSS_Definition): Remove temporary
6828         kludge disabling new legality check.
6830 2014-06-13  Hristian Kirtchev  <kirtchev@adacore.com>
6832         * freeze.adb (Freeze_Record_Type): Remove checks related to SPARK
6833         volatile types.
6834         (Freeze_Type): Volatile types are now illegal in SPARK.
6836 2014-06-13  Robert Dewar  <dewar@adacore.com>
6838         * aspects.ads, aspects.adb: Add aspect Thread_Local_Storage.
6839         * gnat_rm.texi: Document aspect Thread_Local_Storage.
6841 2014-06-13  Ed Schonberg  <schonberg@adacore.com>
6843         * sem_cat.adb (Validate_Static_Object_Name): A constant whose
6844         value is a temporary that renames an aggregate is legal in a
6845         preelaborated unit. Illegalities, if any will be detected in
6846         the aggregate components.
6848 2014-06-13  Ed Schonberg  <schonberg@adacore.com>
6850         * einfo.ads: Minor reformatting an comment expansion.
6852 2014-06-13  Robert Dewar  <dewar@adacore.com>
6854         * back_end.ads, back_end.adb: Make_Id, Make_SC, Set_RND are moved to
6855         Tbuild.
6856         * tbuild.ads, tbuild.adb: Make_Id, Make_SC, Set_RND are moved here from
6857         Back_End.
6858         * gnat1drv.adb: Make_Id, Make_SC, Set_RND are moved to Tbuild
6859         * sem_warn.adb: Minor reformatting.
6861 2014-06-13  Doug Rupp  <rupp@adacore.com>
6863         * adaint.c (__gnat_open_new_temp) [VMS]: Open binary
6864         files with rfm=udf.
6866 2014-06-13  Yannick Moy  <moy@adacore.com>
6868         * sem_warn.adb (Check_Unset_References): Take
6869         case of Refined_Post into account in Within_Postcondition check.
6871 2014-06-13  Hristian Kirtchev  <kirtchev@adacore.com>
6873         * freeze.adb (Freeze_Record_Type): Volatile types are not allowed in
6874         SPARK.
6876 2014-06-13  Yannick Moy  <moy@adacore.com>
6878         * sem_ch13.adb (Analyze_Aspect_Specifications/Aspect_Import,
6879         Aspect_Export): Consider that variables may be set outside the program.
6881 2014-06-13  Robert Dewar  <dewar@adacore.com>
6883         * back_end.adb (Make_Id): New function.
6884         (Make_SC): New function.
6885         (Set_RND): New procedure.
6886         * back_end.ads (Make_Id): New function.
6887         (Make_SC): New function.
6888         (Set_RND): New procedure.
6889         * einfo.ads: Minor comment updates.
6890         * frontend.adb: Move Atree.Initialize call to Gnat1drv.
6891         * gnat1drv.adb (Gnat1drv): New calling sequence for
6892         Get_Target_Parameters.
6893         (Gnat1drv): Move Atree.Initialize here from Frontend.
6894         * targparm.adb (Get_Target_Parameters): New calling
6895         sequence (Get_Target_Parameters): Handle pragma Restriction
6896         (No_Dependence,..)
6897         * targparm.ads (Get_Target_Parameters): New calling sequence.
6899 2014-06-13  Gary Dismukes  <dismukes@adacore.com>
6901         * sem_prag.adb (Process_Import_Or_Interface): Exit the homonym
6902         loop if the pragma does not come from source, so that an implicit
6903         pragma Import only applies to the first declaration, avoiding
6904         possible conflicts with earlier explicit and implicit declarations
6905         due to multiple Provide_Shift_Operators pragmas.
6906         (Set_Imported): Remove previous fix that bypassed pragma duplication
6907         error.
6908         * gnat_rm.texi: Change 'equivalent' to 'similar' in description
6909         of Provide_Shift_Operators.
6911 2014-06-12  Jan Hubicka  <hubicka@ucw.cz>
6913         * gcc-interface/utils.c (process_attributes) <ATTR_LINK_SECTION>: Pass
6914         string pointer directly to set_decl_section_name.
6916 2014-06-11  Robert Dewar  <dewar@adacore.com>
6918         * sem_ch13.adb: Minor reformatting.
6920 2014-06-11  Hristian Kirtchev  <kirtchev@adacore.com>
6922         * sem_prag.adb (Check_Clause_Syntax): Add new
6923         local variable Outputs. Account for the case where multiple
6924         output items appear as an aggregate.
6926 2014-06-11  Robert Dewar  <dewar@adacore.com>
6928         * sem_warn.adb (Output_Obsolescent_Entity_Warnings): Tag warning
6929         with ?j? not ??.
6931 2014-06-11  Ed Schonberg  <schonberg@adacore.com>
6933         * einfo.ads: Minor reformatting.
6935 2014-06-11  Hristian Kirtchev  <kirtchev@adacore.com>
6937         * a-cbdlli.adb, a-cdlili.adb, a-cidlli.adb, a-crdlli.adb (Insert): Add
6938         new variable First_Node. Update the position after all insertions have
6939         taken place to First_Node.
6941 2014-06-11  Robert Dewar  <dewar@adacore.com>
6943         * debug.adb: Remove debug flag -gnatd.1, no longer needed.
6944         * layout.adb (Layout_Type): Remove test of -gnatd.1.
6946 2014-06-11  Robert Dewar  <dewar@adacore.com>
6948         * sem_ch13.adb: Minor reformatting.
6950 2014-06-11  Hristian Kirtchev  <kirtchev@adacore.com>
6952         * sem_prag.adb (Check_Clause_Syntax): Add new
6953         local variable Outputs. Account for the case where multiple
6954         output items appear as an aggregate.
6956 2014-06-11  Robert Dewar  <dewar@adacore.com>
6958         * sem_warn.adb (Output_Obsolescent_Entity_Warnings): Tag warning
6959         with ?j? not ??.
6961 2014-06-11  Ed Schonberg  <schonberg@adacore.com>
6963         * einfo.ads: Minor reformatting.
6965 2014-06-11  Hristian Kirtchev  <kirtchev@adacore.com>
6967         * a-cbdlli.adb, a-cdlili.adb, a-cidlli.adb, a-crdlli.adb (Insert): Add
6968         new variable First_Node. Update the position after all insertions have
6969         taken place to First_Node.
6971 2014-06-11  Robert Dewar  <dewar@adacore.com>
6973         * debug.adb: Remove debug flag -gnatd.1, no longer needed.
6974         * layout.adb (Layout_Type): Remove test of -gnatd.1.
6976 2014-06-11  Thomas Quinot  <quinot@adacore.com>
6978         * freeze.ads: Minor reformatting.
6979         * checks.adb (Determine_Range): Do not attempt to determine
6980         the range of a deferred constant whose full view has not been
6981         seen yet.
6982         * sem_res.adb (Resolve): Remove undesirable guard against
6983         resolving expressions from expression functions.
6985 2014-06-11  Robert Dewar  <dewar@adacore.com>
6987         * debug.adb (Debug_Flag_Dot_1): Set to enable fix for anonymous
6988         access types.
6989         * layout.adb (Layout_Type): Make anonymous access types for
6990         subprogram formal types and return types always thin. For now
6991         only enabled if -gnatd.1 set.
6993 2014-06-11  Ed Schonberg  <schonberg@adacore.com>
6995         * sem_ch13.adb (Analyze_Stream_TSS_Definition): Apply legality
6996         rule for stream attributes of interface types (RM 13.13.2 (38/3)):
6997         subprogram must be a null procedure.
6999 2014-06-11  Hristian Kirtchev  <kirtchev@adacore.com>
7001         * sem_prag.adb (Analyze_Input_Item): Allow formal
7002         parameters to appear as input_items in an initialization_list
7003         of pragma Initializes. Encapsulation now applies to states and
7004         variables only (as it should). Add RM references to key errors.
7005         * sem_prag.adb (Set_Imported): Suppress errors
7006         about preceding Imports when the pragma does not come from source,
7007         which can happen through use of pragma Provide_Shift_Operators.
7009 2014-06-11  Thomas Quinot  <quinot@adacore.com>
7011         * sem_ch3.adb: Minor reformatting.
7012         * einfo.ads (Full_View): Minor comment update.
7014 2014-06-11  Robert Dewar  <dewar@adacore.com>
7016         * einfo.adb (Is_Independent): New flag.
7017         * einfo.ads (Is_Independent): New flag.
7018         (Has_Independent_Components): Clean up and fix comments.
7019         * sem_prag.adb (Fix_Error): Deal with changing argument
7020         [of] to entity [for].
7021         (Analyze_Pragma, case Independent): Set Is_Independent flag
7022         (Analyze_Pragma, case Independent_Components): Set Is_Independent flag
7023         in all components of specified record.
7025 2014-06-11  Thomas Quinot  <quinot@adacore.com>
7027         * sem_ch12.adb (Analyze_Formal_Decimal_Fixed_Point_Type):
7028         Set proper Etype on bounds of dummy type created for analysis
7029         of the generic.
7031 2014-06-11  Robert Dewar  <dewar@adacore.com>
7033         * debug.adb: Minor comment fix (add missing section of dot
7034         numeric flags).
7036 2014-06-11  Robert Dewar  <dewar@adacore.com>
7038         * gnat_rm.texi, switch-c.adb, sem_prag.adb, a-tgdico.ads, par-prag.adb,
7039         opt.ads, a-finali.ads, snames.ads-tmpl: Remove all traces of
7040         pragma/aspects Pure_05 Pure_12 Preelaborate_05.
7041         * errout.adb (Output_Messages): Avoid duplicate output for
7042         library level instance.
7043         * sem_elab.adb (Is_Call_Of_Generic_Formal): Moved to outer level
7044         (Check_Elab_Call): Add call to Is_Call_Of_Generic_Formal
7045         * exp_ch4.adb (Expand_N_Op_Expon): New interface for Exp_Modular.
7046         * s-expmod.ads, s-expmod.adb (Exp_Modular): Change interface to
7047         accomodate largest modulus value.
7048         * gnat_ugn.texi: Minor updates.
7050 2014-06-11  Ed Schonberg  <schonberg@adacore.com>
7052         * sem_ch12.adb (Instantiate_Package_Body): Do not attempt to
7053         load body of generic package or its parent, if body is optional
7054         and the unit does not require a body.
7056 2014-06-11  Robert Dewar  <dewar@adacore.com>
7058         * gnat_rm.texi: Document System.Unsigned_Types.
7059         * impunit.adb: System.Unsigned_Types (s-unstyp.ads) is user accessible.
7060         * s-unstyp.ads: Update comments (this is now user available unit).
7062 2014-06-11  Robert Dewar  <dewar@adacore.com>
7064         * make.adb, sem_res.adb: Minor reformatting.
7066 2014-06-11  Thomas Quinot  <quinot@adacore.com>
7068         * a-astaco.ads, a-tags.ads, s-excdeb.ads, a-tgdico.ads, a-stmaco.ads,
7069         a-except-2005.ads, s-except.ads, a-taside.ads, a-dynpri.ads,
7070         a-chahan.ads, a-sytaco.ads, s-stalib.ads, a-strmap.ads: Change pragmas
7071         Preelaborate_05 to just Preelaborate in runtime units, and similarly
7072         change Pure_05 to just Pure.
7074 2014-06-11  Ed Schonberg  <schonberg@adacore.com>
7076         * sem_ch6.adb (Analyze_Subprogram_Body_Contract): Do not attempt
7077         analysis if error has been posted on subprogram body.
7079 2014-06-11  Ed Schonberg  <schonberg@adacore.com>
7081         * sem_ch13.adb (Analyze_Stream_TSS_Definition): Apply legality
7082         rule given in RM 13.1 (8/1) for operational attributes to stream
7083         attributes: the attribute must apply to a first subtype. Fixes
7084         missing errors in ACATS test bdd2004.
7086 2014-06-11  Robert Dewar  <dewar@adacore.com>
7088         * exp_ch3.adb (Build_Record_Init_Proc): Don't build for variant
7089         record type if restriction No_Implicit_Conditionals is active.
7090         (Expand_N_Object_Declaration): Don't allow default initialization
7091         for variant record type if restriction No_Implicit_Condition is active.
7092         (Build_Variant_Record_Equality): Don't build for variant
7093         record type if restriction No_Implicit_Conditionals is active.
7094         * exp_ch4.adb (Expand_N_Op_Eq): Error if variant records with
7095         No_Implicit_Conditionals.
7096         * sem_aux.ads, sem_aux.adb (Has_Variant_Part): New function.
7098 2014-06-11  Ramon Fernandez  <fernandez@adacore.com>
7100         * i-cstrin.ads: Update comments.
7102 2014-06-11  Ed Schonberg  <schonberg@adacore.com>
7104         * sem_res.adb (Resolve_Selected_Component): Handle properly a
7105         selected component whose prefix is overloaded, when none of the
7106         interpretations matches the expected type.
7108 2014-06-11  Bob Duff  <duff@adacore.com>
7110         * make.adb (Wait_For_Available_Slot): Give a more
7111         informative error message; if the ALI file is not found, print
7112         the full path of what it's looking for.
7114 2014-06-11  Sergey Rybin  <rybin@adacore.com frybin>
7116         * gnat_ugn.texi, vms_data.ads: add description of gnatstub -W<par>
7117         option to specify the result file encoding.
7119 2014-06-11  Robert Dewar  <dewar@adacore.com>
7121         * errout.ads, sem_ch12.adb: Minor reformatting.
7122         * debug.adb, erroutc.adb: Remove -gnatd.q debug switch.
7123         * lib-xref.adb: Minor reformatting.
7124         * restrict.adb: Minor code reorganization (put routines in
7125         alpha order).
7127 2014-06-11  Yannick Moy  <moy@adacore.com>
7129         * einfo.ads: Minor typo in comment
7131 2014-06-11  Ed Schonberg  <schonberg@adacore.com>
7133         * sinfo.ads, sinfo.adb: New attribute Uninitialized_Variable, for
7134         formal private types and private type extensions, to indicate
7135         variable in a generic unit whose uninitialized use suggest that
7136         actual type should be fully initialized.
7137         Needs_Initialized_Actual:  removed, functionaity replaced by
7138         the above.
7139         * lib-xref.adb (Generate_Reference): Generate a reference for
7140         variables of a formal type when the unit is not the main unit,
7141         to enable appropriate warnings in an instance.
7142         * sem_ch12.adb (Check_Ininialized_Type): Improve warning on use
7143         of variable in a generic unit that suggests that actual type
7144         should be full initialized.
7145         * sem_warn.adb; (May_Need_Initialized_Actual): Make into procedure
7146         and do not emot warning, which now only appears in an instance.
7148 2014-06-11  Eric Botcazou  <ebotcazou@adacore.com>
7150         * gnat_ugn.texi: Fix minor typo.
7152 2014-06-11  Hristian Kirtchev  <kirtchev@adacore.com>
7154         * sem_ch3.adb Add with and use clause for Sem_Ch10.
7155         (Analyze_Declarations): Code reformatting. Analyze the contract
7156         of a subprogram body stub at the end of the declarative region.
7157         * sem_ch6.adb (Analyze_Subprogram_Body_Contract): Spec_Id is
7158         now a variable. Do not process the body if its contract is not
7159         available. Account for subprogram body stubs when extracting
7160         the corresponding spec.
7161         * sem_ch6.ads (Analyze_Subprogram_Contract): Update the comment
7162         on usage.
7163         * sem_ch10.ads, sem_ch10.adb (Analyze_Subprogram_Body_Stub_Contract):
7164         New routine.
7165         * sem_prag.adb (Analyze_Depends_In_Decl_Part):
7166         Account for subprogram body stubs when extracting the
7167         corresponding spec.
7168         (Analyze_Global_In_Decl_List):
7169         Account for subprogram body stubs when extracting the
7170         corresponding spec.
7171         (Analyze_Refined_Depends_In_Decl_Part):
7172         Use Find_Related_Subprogram_Or_Body to retrieve the declaration
7173         of the related body. Spec_Is now a variable. Account for
7174         subprogram body stubs when extracting the corresponding spec.
7175         (Analyze_Refined_Global_In_Decl_Part): Use
7176         Find_Related_Subprogram_Or_Body to retrieve the declaration
7177         of the related body. Spec_Is now a variable. Account for
7178         subprogram body stubs when extracting the corresponding spec.
7179         (Collect_Subprogram_Inputs_Output): Account for subprogram body
7180         stubs when extracting the corresponding spec.
7182 2014-06-11  Vincent Celier  <celier@adacore.com>
7184         * gnatcmd.adb (Process_Link): Do not invoke gnatlink with
7185         -lgnarl or -lgnat.
7187 2014-06-11  Robert Dewar  <dewar@adacore.com>
7189         * debug.adb: Add debug flag -gnatd.q.
7190         * erroutc.adb (Prescan_Message): Bomb if untagged warning with
7191         -gnatd.q set.
7192         * styleg.adb (Check_Xtra_Parens): Message should be a style
7193         message.
7194         * sem_aggr.adb, sem_ch3.adb, exp_ch9.adb, checks.adb, sem_prag.adb,
7195         par-endh.adb, eval_fat.adb, freeze.adb, sem_util.adb, sem_attr.adb,
7196         sem_elab.adb, sem_ch6.adb, sem_warn.adb, sem_cat.adb,
7197         sem_ch13.adb, lib-xref.adb: Add remaining warning tags.
7199 2014-06-11  Ben Brosgol  <brosgol@adacore.com>
7201         * gnat_rm.texi: Revised chapter on Implementation Defined
7202         Characteristics.
7204 2014-06-11  Geert Bosch  <bosch@adacore.com>
7206         * s-exctab.adb: avoid race conditions in exception registration.
7208 2014-06-11  Robert Dewar  <dewar@adacore.com>
7210         * errout.adb (Warn_Insertion): New function.
7211         (Error_Msg): Use Warn_Insertion and Prescan_Message.
7212         (Error_Msg_Internal): Set Info field of error object.
7213         (Error_Msg_NEL): Use Prescan_Message.
7214         (Set_Msg_Text): Don't store info: at start of message.
7215         (Skip_Msg_Insertion_Warning): New name for Set_Msg_Insertion_Warning.
7216         (Skip_Msg_Insertion_Warning): Now just skips warning insertion.
7217         * errout.ads: Document new ?$? and >$> insertion sequences
7218         Document use of "(style)" and "info: "
7219         * erroutc.adb (dmsg): Print several missing fields
7220         (Get_Warning_Tag): Handle -gnatel case (?$?)  (Output_Msg_Text):
7221         Deal with new tagging of info messages
7222         * erroutc.ads: Is_Info_Msg: New global (Error_Msg_Object):
7223         Add field Info (Prescan_Message): New procedure, this procedure
7224         replaces the old Test_Style_Warning_Serious_Unconditional_Msg
7225         * errutil.adb, exp_util.adb, par-ch7.adb, sem_ch13.adb, sem_ch7.adb,
7226         sem_elab.adb: Follow new rules for info message (info belongs
7227         only at the start of a message, and only in the first message,
7228         not in any of the continuations).
7229         * gnat_ugn.texi: Document full set of warning tags.
7231 2014-06-11  Gary Dismukes  <dismukes@adacore.com>
7233         * sem_util.adb: Minor typo fix.
7235 2014-06-11  Ed Schonberg  <schonberg@adacore.com>
7237         * sem_warn.adb (Check_References): Do not emit spurious warnings
7238         on uninitialzed variable of a formal private type if variable
7239         is not read.
7241 2014-06-09  Jan Hubicka  <hubicka@ucw.cz>
7243         * gcc-interface/utils.c (process_attributes) <ATTR_LINK_SECTION>: Use
7244         set_decl_section_name accessor.
7246 2014-05-22  Thomas Schwinge  <thomas@codesourcery.com>
7248         * gcc-interface/utils.c (DEF_FUNCTION_TYPE_0, DEF_FUNCTION_TYPE_6)
7249         (DEF_FUNCTION_TYPE_7, DEF_FUNCTION_TYPE_8)
7250         (DEF_FUNCTION_TYPE_VAR_5): Cosmetic fixes.
7252 2014-05-21  Robert Dewar  <dewar@adacore.com>
7254         * layout.adb: Minor reformatting.
7255         * sem_prag.adb (Analyze_Pragma, case Inspection_Point): Call
7256         dummy procedure ip.
7258 2014-05-21  Robert Dewar  <dewar@adacore.com>
7260         * restrict.ads (Implementation_Restriction): Add entry for
7261         No_Fixed_IO.
7262         * rtsfind.ads: Add entries for Fixed_IO and Decimal_IO in
7263         Ada.[Wide_[Wide_]Text_IO.
7264         * s-rident.ads (Restriction_Id): Add entry for No_Fixed_IO.
7265         * sem_attr.adb (Analyze_Attribute): Disallow fixed point types
7266         for Img, Image, Value, Wide_Image, Wide_Value, Wide_Wide_Image,
7267         Wide_Wide_Value if restriction No_Fixed_IO is set.
7268         * sem_util.adb (Set_Entity_Checks): Check restriction No_Fixed_IO.
7270 2014-05-21  Robert Dewar  <dewar@adacore.com>
7272         * gnatcmd.adb: Minor error msg changes (no upper case letter
7273         at start).
7274         * sem_ch12.adb, sem_ch5.adb, sem_res.adb, sem_util.adb: Minor
7275         reformatting.
7277 2014-05-21  Robert Dewar  <dewar@adacore.com>
7279         * debug.adb: Debug flag -gnatd.G inhibits static elab tracing
7280         via generic formals.
7281         * sem_elab.adb (Is_Call_Of_Generic_Formal): Return False if
7282         -gnatd.G is set.
7284 2014-05-21  Thomas Quinot  <quinot@adacore.com>
7286         * exp_pakd.adb (Revert_Storage_Order): Renamed from Byte_Swap to
7287         more accurately describe that this subprogram needs to come into
7288         play also in cases where no byte swapping is involved, because
7289         it also takes care of some required shifts (left-justification
7290         of values).
7292 2014-05-21  Thomas Quinot  <quinot@adacore.com>
7294         * freeze.adb (Check_Component_Storage_Order): Indicate whether
7295         a Scalar_Storage_Order attribute definition is present for the
7296         component's type.
7297         (Freeze_Record_Type): Suppress junk warnings
7298         about purportedly junk Bit_Order / Scalar_Storage_Order attribute
7299         definitions.
7301 2014-05-21  Robert Dewar  <dewar@adacore.com>
7303         * sem_ch8.adb (Analyze_Subprogram_Renaming): Put back call
7304         to Kill_Elaboration_Checks.
7306 2014-05-21  Gary Dismukes  <dismukes@adacore.com>
7308         * layout.adb (Assoc_Add): Suppress the optimization of the (E
7309         - C1) + C2 case, when the expression type is unsigned and C1 <
7310         C2, to avoid creating a negative literal when folding.
7312 2014-05-21  Hristian Kirtchev  <kirtchev@adacore.com>
7314         * freeze.adb (Freeze_Record_Type): Update the use of
7315         Is_SPARK_Volatile.
7316         * sem_ch3.adb (Analyze_Object_Contract): Update the use of
7317         Is_SPARK_Volatile.
7318         (Process_Discriminants): Update the use of Is_SPARK_Volatile.
7319         * sem_ch5.adb (Analyze_Iterator_Specification): Update the use
7320         of Is_SPARK_Volatile.
7321         (Analyze_Loop_Parameter_Specification):
7322         Update the use of Is_SPARK_Volatile.
7323         * sem_ch6.adb (Process_Formals): Catch an illegal use of an IN
7324         formal parameter when its type is volatile.
7325         * sem_prag.adb (Analyze_Global_Item): Update the use of
7326         Is_SPARK_Volatile.
7327         * sem_res.adb (Resolve_Entity_Name): Correct the guard which
7328         determines whether an entity is a volatile source SPARK object.
7329         * sem_util.adb (Has_Enabled_Property): Accout for external
7330         properties being set on objects other than abstract states
7331         and variables. An example would be a formal parameter.
7332         (Is_SPARK_Volatile): New routine.
7333         (Is_SPARK_Volatile_Object):
7334         Remove the entity-specific tests. Call routine Is_SPARK_Volatile
7335         when checking entities and/or types.
7336         * sem_util.ads (Is_SPARK_Volatile): New routine.
7338 2014-05-21  Robert Dewar  <dewar@adacore.com>
7340         * sem_warn.adb: Minor fix to warning messages (use ?? instead
7341         of ?).
7343 2014-05-21  Vincent Celier  <celier@adacore.com>
7345         * gnatcmd.adb (GNATCmd): For platforms other than VMS, recognize
7346         switch --version and --help.
7348 2014-05-21  Robert Dewar  <dewar@adacore.com>
7350         * sem_elab.adb (Is_Call_Of_Generic_Formal): New function.
7352 2014-05-21  Ed Schonberg  <schonberg@adacore.com>
7354         * sem_ch5.adb (Analyze_Iterator_Specification): Set type of
7355         iterator variable when the domain of iteration is a formal
7356         container and this is an element iterator.
7358 2014-05-21  Bob Duff  <duff@adacore.com>
7360         * sem_ch12.adb: Minor reformatting.
7362 2014-05-21  Robert Dewar  <dewar@adacore.com>
7364         * sinfo.ads, sem_ch12.adb, sem_warn.adb: Minor reformatting.
7366 2014-05-21  Robert Dewar  <dewar@adacore.com>
7368         * sem_elab.adb: Minor reformatting.
7369         * s-taprop.ads: Minor comment fix.
7370         * sem_ch8.adb (Analyze_Subprogram_Renaming): Remove call to
7371         Kill_Elaboration_Checks.
7372         * errout.adb, erroutc.adb: Minor reformatting.
7374 2014-05-21  Thomas Quinot  <quinot@adacore.com>
7376         * exp_pakd.adb (Byte_Swap): Handle the case of a sub-byte
7377         component. No byte swapping occurs, but this procedure also takes
7378         care of appropriately justifying the argument.
7380 2014-05-21  Hristian Kirtchev  <kirtchev@adacore.com>
7382         * sem_ch6.adb: sem_ch6.adb (Analyze_Aspects_On_Body_Or_Stub):
7383         New routine.
7384         (Analyze_Subprogram_Body_Helper): Move the
7385         analysis of aspect specifications and the processing of the
7386         subprogram body contract after inlining has taken place.
7387         (Diagnose_Misplaced_Aspect_Specifications): Removed.
7389 2014-05-21  Javier Miranda  <miranda@adacore.com>
7391         * sem_ch3.adb (Build_Derived_Record_Type): Revert previous change.
7393 2014-05-21  Robert Dewar  <dewar@adacore.com>
7395         * sem_eval.ads, sem_eval.adb (Why_Not_Static): Messages are not
7396         continuations any more.
7398 2014-05-21  Ed Schonberg  <schonberg@adacore.com>
7400         * sinfo.ads, sinfo.adb: New flag Needs_Initialized_Actual,
7401         present in formal_Private_Definitions and on private extension
7402         declarations of a formal derived type. Set when the use of the
7403         formal type in a generic suggests that the actual should be a
7404         fully initialized type.
7405         * sem_warn.adb (May_Need_Initialized_Actual): new subprogram
7406         to indicate that an entity of a generic type has default
7407         initialization, and that the corresponing actual type in any
7408         subsequent instantiation should be fully initialized.
7409         * sem_ch12.adb (Check_Initialized_Type): new subprogram,
7410         to emit a warning if the actual for a generic type on which
7411         Needs_Initialized_Actual is set is not a fully initialized type.
7413 2014-05-21  Robert Dewar  <dewar@adacore.com>
7415         * sem_elab.adb, prj-dect.adb: Minor reformatting.
7417 2014-05-21  Robert Dewar  <dewar@adacore.com>
7419         * erroutc.ads: Minor comment addition.
7421 2014-05-21  Robert Dewar  <dewar@adacore.com>
7423         * errout.ads: Add documentation for use of >*> tag.
7424         * restrict.adb: Make sure we use >*> tag for restriction warnings.
7426 2014-05-21  Gary Dismukes  <dismukes@adacore.com>
7428         * debug.adb: Add case of illegal overriding_indicator for a
7429         protected subprogram body to description of -gnatd.E switch.
7430         * sem_ch6.adb (Verify_Overriding_Indicator): Issue error message
7431         for cases of giving overriding_indicators on protected subprogram
7432         bodies, but change this to a warning if -gnatd.E is enabled. No
7433         longer give a style warning about missing indicators on protected
7434         subprogram bodies.
7436 2014-05-21  Robert Dewar  <dewar@adacore.com>
7438         * prj.ads, sem_ch12.adb, prj.adb, exp_pakd.adb,
7439         sem_elab.ads: Minor reformatting.
7440         * erroutc.adb, erroutc.ads (Warning_Specifically_Suppressed): Make Tag
7441         parameter optional.
7443 2014-05-21  Pascal Obry  <obry@adacore.com>
7445         * prj-dect.adb: Allow package Install in aggregate project.
7447 2014-05-21  Robert Dewar  <dewar@adacore.com>
7449         * sem_ch13.adb (Analyze_Aspect_Specifications):
7450         Insert_Delayed_Pragma is now used for the case of Attach_Handler.
7451         * sem_prag.adb: Minor comment improvements.
7453 2014-05-21  Ed Schonberg  <schonberg@adacore.com>
7455         * sem_ch12.adb (Install_Body): When checking whether freezing of
7456         instantiation must be delayed, verify that the common enclosing
7457         subprogram to generic and instance is in fact an overloadable
7458         entity.
7460 2014-05-21  Vincent Celier  <celier@adacore.com>
7462         * makeutl.adb (Mains.Complete_Mains.Do_Complete): Look for all
7463         mains with the same name and fail if there is more than one.
7464         * prj.ads, prj.adb (Find_All_Sources): New function
7466 2014-05-21  Robert Dewar  <dewar@adacore.com>
7468         * sem_ch13.adb: Minor reformatting.
7469         * lib-xref-spark_specific.adb, sem_util.adb: Minor reformatting.
7470         * sem_prag.adb: Minor error message improvement.
7472 2014-05-21  Yannick Moy  <moy@adacore.com>
7474         * lib-xref-spark_specific.adb, lib-xref.ads, lib-xref.adb
7475         (Enclosing_Subprogram_Or_Package): Only return a library-level
7476         package.
7478 2014-05-21  Javier Miranda  <miranda@adacore.com>
7480         * sem_ch3.adb (Build_Derived_Record_Type): Initialize Parent_Base
7481         to the full view of the parent type when processing a derived type
7482         which is the full view of a private type not defined in a generic
7483         unit which is derived from a private type with discriminants
7484         whose full view is a non-tagged record type.
7486 2014-05-21  Javier Miranda  <miranda@adacore.com>
7488         * exp_ch4.adb (Expand_Allocator_Expression.Apply_Accessibility_Check):
7489         Complete previous patch.
7491 2014-05-21  Thomas Quinot  <quinot@adacore.com>
7493         PR ada/9535
7494         * g-socket.adb (Read and Write for Datagram_Socket_Stream_Type):
7495         Provide a behaviour more consistent with underlying datagram
7496         socket: do not attempt to loop over Send_Socket/Receive_Socket
7497         iterating along the buffer.
7499 2014-05-21  Hristian Kirtchev  <kirtchev@adacore.com>
7501         * freeze.adb (Freeze_Record_Type): Ensure that a discriminated
7502         or a tagged type is not labelled as volatile. Ensure that a
7503         non-volatile type has no volatile components.
7504         * sem_ch3.adb (Analyze_Object_Contract): Add local constant
7505         Obj_Typ. Code reformatting.  Ensure that a discriminated or
7506         tagged object is not labelled as volatile.
7507         * sem_prag.adb (Process_Atomic_Shared_Volatile): Ensure that
7508         pragma Volatile applies to a full type declaration or an object
7509         declaration when SPARK mode is on.
7511 2014-05-21  Sergey Rybin  <rybin@adacore.com frybin>
7513         * gnat_ugn.texi: For ASIS tools, reword the paragraph about
7514         providing options needed for compiling the argument source for
7515         the situation when a project file can be used as a tool parameter.
7517 2014-05-21  Gary Dismukes  <dismukes@adacore.com>
7519         * gnat_rm.texi: Minor typo fix.
7521 2014-05-21  Robert Dewar  <dewar@adacore.com>
7523         * stand.adb (Tree_Read): Read missing entities.
7524         (Tree_Write): Write missing entities.
7526 2014-05-21  Ben Brosgol  <brosgol@adacore.com>
7528         * gnat_ugn.texi: Wordsmithing edits to Coupling Metrics Control
7529         section in gnatmetric chapter.
7531 2014-05-21  Robert Dewar  <dewar@adacore.com>
7533         * exp_ch6.adb (Expand_Actuals): Spec moved here, since not used
7534         outside Exp_Ch6 (Expand_Actuals): Deal with proper insertion of
7535         post-call copy write back (see detailed comment in code).
7536         * exp_ch6.ads (Expand_Actuals): Moved to body, not used outside
7537         Exp_Ch6.
7538         * tbuild.ads: Minor reformatting.
7540 2014-05-21  Robert Dewar  <dewar@adacore.com>
7542         * stand.ads: Add warning about adding new entities and
7543         Tree_Read/Tree_Write.
7545 2014-05-21  Robert Dewar  <dewar@adacore.com>
7547         * sem_util.adb (Set_Entity_With_Checks): Don't complain about
7548         references to restricted entities within the units in which they
7549         are declared.
7551 2014-05-21  Robert Dewar  <dewar@adacore.com>
7553         * gnat1drv.adb (Check_Bad_Body): Use Source_File_Is_Body to
7554         simplify the needed test, and also deal with failure to catch
7555         situations with non-standard names.
7556         * sinput-l.ads, sinput-l.adb (Source_File_Is_No_Body): New function
7557         (Source_File_Is_Subunit): Removed, no longer used.
7559 2014-05-21  Javier Miranda  <miranda@adacore.com>
7561         * exp_ch4.adb
7562         (Expand_Allocator_Expression.Apply_Accessibility_Check): for a
7563         renaming of an access to interface object there is no need to
7564         generate extra code to reference the tag.
7566 2014-05-21  Robert Dewar  <dewar@adacore.com>
7568         * errout.adb, erroutc.adb, erroutc.ads: Allow warning tag in pragma
7569         Warnings (Off, string).
7571 2014-05-21  Robert Dewar  <dewar@adacore.com>
7573         * osint.adb: Fix three error messages to say invalid instead
7574         of erroneous.
7575         * par-ch4.adb, exp_aggr.adb, sem_attr.adb, sem_aux.adb, sem_ch3.adb,
7576         sem_ch5.adb, sem_ch6.adb, sem_ch7.adb, sem_dim.adb, sem_res.adb,
7577         sem_util.adb, sem_util.ads: Fix incorrect use of erroneous in comments.
7579 2014-05-21  Ed Schonberg  <schonberg@adacore.com>
7581         * freeze.adb, sem_ch13.adb, sem_ch13.ads, sem_ch9.adb,
7582         sem_ch9.ads: Move discriminant manipulation routines for analysis of
7583         aspect specifications from sem_ch9 to sem_ch13, where they belong.
7585 2014-05-21  Robert Dewar  <dewar@adacore.com>
7587         * gnat_ugn.texi: Clearly document -gnatw.g (GNAT warnings).
7588         Clearly document -gnatyg (GNAT style switches).
7589         * usage.adb: Add line line for -gnatw.g (GNAT warnings) More
7590         detail for line for -gnatyg (GNAT style switches) -gnatw.d/D is
7591         available for VMS after all.
7592         * warnsw.adb: Reorganize to eliminate duplicated code
7593         (Restore_Warnings): Add a couple of missing entries
7594         (Save_Warnings): Add a couple of missing entries.
7595         * warnsw.ads: Add missing entries to Warning_Record (not clear
7596         what the impact is).
7598 2014-05-21  Robert Dewar  <dewar@adacore.com>
7600         * errout.adb (Set_Msg_Insertion_Warning): Handle ?*? (restriction
7601         warning) case.
7602         * errout.ads: Document ?*? (restriction warning) insertion.
7603         * erroutc.adb (Get_Warning_Tag): Deal with ?*? (restriction
7604         warning) case.
7605         * erroutc.ads: Document use of * for restriction warning tag.
7606         * restrict.adb (Restriction_Msg): Tag with ?*? instead of ??.
7608 2014-05-21  Ed Schonberg  <schonberg@adacore.com>
7610         * sem_ch9.adb (Push_Scope_And_Install_Discriminants): Do not
7611         make discriminants immediately visible when analyzing an aspect
7612         of a subtype declaration.
7613         (Uninstall_Discriminants): Do not apply to the entity in a
7614         subtype declaration.
7616 2014-05-21  Ed Schonberg  <schonberg@adacore.com>
7618         * sem_util.adb: Code clean up.
7620 2014-05-21  Eric Botcazou  <ebotcazou@adacore.com>
7622         * gnat_ugn.texi: Document -Werror.
7624 2014-05-21  Bob Duff  <duff@adacore.com>
7626         * sem_util.adb (Is_Dependent_Component_Of_Mutable_Object):
7627         This was returning False if the Object is a constant view. Fix
7628         it to return True in that case, because it might be a view of
7629         a variable.
7630         (Has_Discriminant_Dependent_Constraint): Fix latent
7631         bug; this function was crashing when passed a discriminant.
7633 2014-05-21  Robert Dewar  <dewar@adacore.com>
7635         * gnat_ugn.texi: Remove misplaced section that is now obsolete.
7636         * s-arit64.adb: Minor code reorganization.
7637         * sem_prag.adb: Minor comment fix (remove erroneous use of the
7638         term erroneous).
7640 2014-05-21  Robert Dewar  <dewar@adacore.com>
7642         * g-table.adb, g-dyntab.adb (Reallocate): Fix possible overflow in
7643         computing new table size.
7645 2014-05-21  Robert Dewar  <dewar@adacore.com>
7647         * einfo.ads: Minor reformatting.
7648         * ceinfo.adb: Deal with slight format change of einfo.ads.
7650 2014-05-21  Ed Schonberg  <schonberg@adacore.com>
7652         * sem_prag.adb (Analyze_Part_Of): Further work on the proper
7653         implementation of the SPARK 2014 rule concerning private child
7654         units (LRM 7.2.6).
7656 2014-05-21  Vincent Celier  <celier@adacore.com>
7658         * makeusg.adb: Add switch -d to usage.
7660 2014-05-21  Ed Schonberg  <schonberg@adacore.com>
7662         * sem_util.adb (Find_Actual): If an actual that is the prefix
7663         of an enclosing prefixed call has been rewritten, use Nkind
7664         and Sloc to identify the corresponding formal, when handling
7665         deferred references.
7667 2014-05-21  Robert Dewar  <dewar@adacore.com>
7669         * debug.adb: Document -gnatd.z switch.
7670         * sem_eval.adb (Why_Non_Static): Test -gnatd.z switch.
7672 2014-05-21  Robert Dewar  <dewar@adacore.com>
7674         * einfo.ads (Can_Never_Be_Null): Minor comment update.
7675         * sem_prag.adb (Check_Arg_Is_Task_Dispatching_Policy): Minor
7676         error message change.
7677         * s-arit64.adb ("abs"): New function. Use expression functions
7678         for the simple conversions and arithmetic.
7680 2014-05-18  Eric Botcazou  <ebotcazou@adacore.com>
7682         * gcc-interface/trans.c (Subprogram_Body_to_gnu): Rework comment and
7683         set function_start_locus.
7685 2014-05-18  Eric Botcazou  <ebotcazou@adacore.com>
7687         * utils.c (gnat_write_global_declarations): Adjust the flags put on
7688         dummy_global.
7690 2014-05-18  Eric Botcazou  <ebotcazou@adacore.com>
7692         * gcc-interface/decl.c (change_qualified_type): New static function.
7693         (gnat_to_gnu_entity): Use it throughout to add qualifiers on types.
7694         <E_Array_Type>: Set TYPE_VOLATILE on the array type directly.
7695         <E_Array_Subtype>: Likewise.
7696         Do not set flags on an UNCONSTRAINED_ARRAY_TYPE directly.
7697         (gnat_to_gnu_component_type): Likewise.
7698         (gnat_to_gnu_param): Likewise.
7700 2014-05-18  Eric Botcazou  <ebotcazou@adacore.com>
7702         * fe.h (Set_Present_Expr): Move around.
7703         (End_Location): New macro.
7704         * gcc-interface/trans.c (Case_Statement_to_gnu): Use End_Location.
7706 2014-05-18  Eric Botcazou  <ebotcazou@adacore.com>
7708         * gcc-interface/decl.c (gnat_to_gnu_entity): Use Underlying_Type in
7709         lieu of more verbose construct.
7710         * gcc-interface/trans.c (Call_to_gnu): Likewise.
7711         (gnat_to_gnu): Likewise.  Remove obsolete code.
7713 2014-05-18  Eric Botcazou  <ebotcazou@adacore.com>
7715         * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Array_Subtype>: Do not
7716         consider that regular packed arrays can never be superflat.
7718 2014-05-17  Trevor Saunders  <tsaunders@mozilla.com>
7720         * gcc-interface/ada-tree.h: Remove usage of variable_size gty
7721         annotation.
7722         * gcc-interface/decl.c (annotate_value): Adjust.
7723         * gcc-interface/trans.c (Attribute_to_gnu): Likewise.
7724         (push_range_check_info): Likewise.
7725         (Loop_Statement_to_gnu): Likewise.
7726         (Subprogram_Body_to_gnu): Likewise.
7727         (Compilation_Unit_to_gnu): Likewise.
7728         (start_stmt_group): Likewise.
7729         * gcc-interface/utils.c (init_gnat_utils): Likewise.
7730         (gnat_pushlevel): Likewise.
7731         (maybe_pad_type): Likewise.
7733 2014-05-14  Eric Botcazou  <ebotcazou@adacore.com>
7735         * seh_init.c: Fix copyright year.
7737 2014-05-14  Bernd Edlinger  <bernd.edlinger@hotmail.de>
7739         * seh_init.c (__gnat_map_SEH): Compile also when __CYGWIN__ and __SEH__
7740         are defined.  Move include windows.h before system.h.
7741         * s-oscons-tmplt.c (DTR_CONTROL_ENABLE, RTS_CONTROL_ENABLE): Compile
7742         also when __CYGWIN__ is defined.  Include windef.h before winbase.h.
7744 2014-05-14  Richard Sandiford  <r.sandiford@uk.ibm.com>
7746         * gcc-interface/decl.c (gnat_to_gnu_entity): Convert integer_one_node
7747         to the appropriate type.
7748         * gcc-interface/trans.c (gnat_to_gnu): Likewise.
7749         (pos_to_constructor): Likewise.
7751 2014-05-13  Eric Botcazou  <ebotcazou@adacore.com>
7753         * gcc-interface/decl.c (annotate_value): Fix thinko in latest change.
7755 2014-05-06  Kenneth Zadeck  <zadeck@naturalbridge.com>
7756             Mike Stump  <mikestump@comcast.net>
7757             Richard Sandiford  <rdsandiford@googlemail.com>
7759         * gcc-interface/cuintp.c (UI_From_gnu): Use wide-int interfaces.
7760         * gcc-interface/decl.c (gnat_to_gnu_entity): Use TYPE_SIGN.
7761         (annotate_value): Use wide-int interfaces.
7762         * gcc-interface/utils.c (get_nonnull_operand): Use tree_fits_uhwi_p.
7764 2014-04-28  Richard Henderson  <rth@redhat.com>
7766         * gcc-interface/Makefile.in: Support aarch64-linux.
7768 2014-04-28  Eric Botcazou  <ebotcazou@adacore.com>
7770         * exp_dbug.ads (Get_External_Name): Add 'False' default to Has_Suffix,
7771         add 'Suffix' parameter and adjust comment.
7772         (Get_External_Name_With_Suffix): Delete.
7773         * exp_dbug.adb (Get_External_Name_With_Suffix): Merge into...
7774         (Get_External_Name): ...here.  Add 'False' default to Has_Suffix, add
7775         'Suffix' parameter.
7776         (Get_Encoded_Name): Remove 2nd argument in call to Get_External_Name.
7777         Call Get_External_Name instead of Get_External_Name_With_Suffix.
7778         (Get_Secondary_DT_External_Name): Likewise.
7779         * exp_cg.adb (Write_Call_Info): Likewise.
7780         * exp_disp.adb (Export_DT): Likewise.
7781         (Import_DT): Likewise.
7782         * comperr.ads (Compiler_Abort): Remove Code parameter and add From_GCC
7783         parameter with False default.
7784         * comperr.adb (Compiler_Abort): Likewise.  Adjust accordingly.
7785         * types.h (Fat_Pointer): Rename into...
7786         (String_Pointer): ...this.  Add comment on interfacing rules.
7787         * fe.h (Compiler_Abort): Adjust for above renaming.
7788         (Error_Msg_N): Likewise.
7789         (Error_Msg_NE): Likewise.
7790         (Get_External_Name): Likewise.  Add third parameter.
7791         (Get_External_Name_With_Suffix): Delete.
7792         * gcc-interface/decl.c (STDCALL_PREFIX): Define.
7793         (create_concat_name): Adjust call to Get_External_Name, remove call to
7794         Get_External_Name_With_Suffix, use STDCALL_PREFIX, adjust for renaming.
7795         * gcc-interface/trans.c (post_error): Likewise.
7796         (post_error_ne): Likewise.
7797         * gcc-interface/misc.c (internal_error_function): Likewise.
7799 2014-04-28  Richard Biener  <rguenther@suse.de>
7801         PR middle-end/60092
7802         * gcc-interface/utils.c: Define flag_isoc11.
7804 2014-04-26  Eric Botcazou  <ebotcazou@adacore.com>
7806         * gnatvsn.ads (Library_Version): Bump to 4.10.
7808 2014-04-23  Eric Botcazou  <ebotcazou@adacore.com>
7810         Revert
7811         2014-04-22  Richard Henderson  <rth@redhat.com>
7813         * gcc-interface/Makefile.in: Support aarch64-linux.
7815         2014-04-22  Eric Botcazou  <ebotcazou@adacore.com>
7817         * fe.h (Compiler_Abort): Replace Fat_Pointer with String_Pointer.
7818         (Error_Msg_N): Likewise.
7819         (Error_Msg_NE): Likewise.
7820         (Get_External_Name_With_Suffix): Likewise.
7821         * types.h (Fat_Pointer): Delete.
7822         (String_Pointer): New type.
7823         (DECLARE_STRING_POINTER): New macro.
7824         * gcc-interface/decl.c (create_concat_name): Adjust.
7825         * gcc-interface/trans.c (post_error): Likewise.
7826         (post_error_ne): Likewise.
7827         * gcc-interface/misc.c (internal_error_function): Likewise.
7829 2014-04-22  Richard Henderson  <rth@redhat.com>
7831         * gcc-interface/Makefile.in: Support aarch64-linux.
7833         * init.c [__linux__] (HAVE_GNAT_ALTERNATE_STACK): New define.
7834         (__gnat_alternate_stack): Enable for all linux except ia64.
7836 2014-04-22  Eric Botcazou  <ebotcazou@adacore.com>
7838         * fe.h (Compiler_Abort): Replace Fat_Pointer with String_Pointer.
7839         (Error_Msg_N): Likewise.
7840         (Error_Msg_NE): Likewise.
7841         (Get_External_Name_With_Suffix): Likewise.
7842         * types.h (Fat_Pointer): Delete.
7843         (String_Pointer): New type.
7844         (DECLARE_STRING_POINTER): New macro.
7845         * gcc-interface/decl.c (create_concat_name): Adjust.
7846         * gcc-interface/trans.c (post_error): Likewise.
7847         (post_error_ne): Likewise.
7848         * gcc-interface/misc.c (internal_error_function): Likewise.
7850 2014-04-15  Eric Botcazou  <ebotcazou@adacore.com>
7851             Pierre-Marie de Rodat  <derodat@adacore.com>
7853         * gcc-interface/decl.c (gnat_to_gnu_entity) <object>: Create a mere
7854         scalar constant instead of a reference for renaming of scalar literal.
7855         Do not create a new object for constant renaming except for a function
7856         call.  Make sure a VAR_DECL is created for the renaming pointer.
7857         * gcc-interface/trans.c (constant_decl_with_initializer_p): New.
7858         (fold_constant_decl_in_expr): New function.
7859         (Identifier_to_gnu): Use constant_decl_with_initializer_p.
7860         For a constant renaming, try to fold a constant DECL in the result.
7861         (lvalue_required_p) <N_Object_Renaming_Declaration>: Always return 1.
7862         (Identifier_to_gnu): Reference the renamed object of constant renaming
7863         pointers directly.
7864         * gcc-interface/utils.c (invalidate_global_renaming_pointers): Do not
7865         invalidate constant renaming pointers.
7867 2014-04-15  Eric Botcazou  <ebotcazou@adacore.com>
7869         * gcc-interface/utils.c (type_for_vector_element_p): New predicate.
7870         (build_vector_type_for_size): New function.
7871         (build_vector_type_for_array): Likewise.
7872         (unchecked_convert): Build an intermediate vector type to convert
7873         from a generic array type to a vector type.
7874         (handle_vector_size_attribute): Reimplement.
7875         (handle_vector_type_attribute): Likewise.
7877 2014-04-15  Eric Botcazou  <ebotcazou@adacore.com>
7879         * gcc-interface/decl.c (prepend_one_attribute_pragma): Call
7880         Is_OK_Static_Expression in lieu of Is_Static_Expression to
7881         detect valid arguments.
7883 2014-04-15  Eric Botcazou  <ebotcazou@adacore.com>
7885         * gcc-interface/trans.c (gnat_gimplify_stmt): Propagate loop hints.
7887 2014-04-14  Paolo Carlini  <paolo.carlini@oracle.com>
7889         * gcc-interface/decl.c (gnat_to_gnu_entity): Use TYPE_IDENTIFIER.
7890         (components_to_record): Likewise.
7891         * gcc-interface/utils.c (make_aligning_type): Likewise.
7892         (maybe_pad_type): Likewise.
7893         (finish_record_type): Likewise.
7894         (rest_of_record_type_compilation): Likewise.
7896 2014-04-14  Eric Botcazou  <ebotcazou@adacore.com>
7898         * snames.ads-tmpl (Name_Ivdep): New pragma-related name.
7899         * sem_prag.adb (Analyze_Pragma) <Pragma_Loop_Optimize>: Add support
7900         for Ivdep hint.
7901         * gnat_rm.texi (Implementation Defined Pragmas): Document new Ivdep
7902         hint for Loop_Optimize.
7903         * gnat_ugn.texi (Vectorization of loops): Mention new Ivdep hint.
7904         * gcc-interface/trans.c (Pragma_to_gnu) <Pragma_Loop_Optimize>: Deal
7905         with new Ivdep hint.
7906         * gcc-interface/ada-tree.h (LOOP_STMT_IVDEP): New macro.
7907         * gcc-interface/trans.c (Pragma_to_gnu) <Pragma_Loop_Optimize>: Deal
7908         with new Ivdep hint.
7909         (gnat_gimplify_stmt) <LOOP_STMT>: Propagate loop hints.
7911 2014-04-14  Eric Botcazou  <ebotcazou@adacore.com>
7912             Robert Dewar  <dewar@adacore.com>
7914         * opt.ads (Suppress_Back_Annotation): Remove as unused.
7915         * fe.h (Back_Annotate_Rep_Info): Likewise.
7916         (Global_Discard_Names): Likewise.
7917         (List_Representation_Info): Declare.
7918         * types.h (Uint_Minus_1): Likewise.
7919         * repinfo.ads: Document back-annotation change.
7920         * gcc-interface/gigi.h (init_gnat_decl): Declare.
7921         (destroy_gnat_decl): Likewise.
7922         * gcc-interface/decl.c (annotate_value): Do not create the cache of
7923         annotated values here but...
7924         <CALL_EXPR>: Only inline the call if -gnatR3 is specified or we are
7925         in ASIS mode.
7926         (init_gnat_decl): ...here instead.  New function.
7927         (destroy_gnat_decl): Likewise.
7928         * gcc-interface/trans.c (gigi): Call {init|destroy}_gnat_decl.
7929         * gcc-interface/utils.c (init_gnat_utils): Minor reformatting.
7931 2014-04-14  Eric Botcazou  <ebotcazou@adacore.com>
7933         * gcc-interface/decl.c (create_field_decl_from): Finalize non-constant
7934         offset for the field, if any.
7936 2014-04-09  Eric Botcazou  <ebotcazou@adacore.com>
7937             Svante Signell  <svante.signell@gmail.com>
7939         PR ada/54040
7940         PR ada/59346
7941         * s-osinte-x32.adb: New file.
7942         * s-linux.ads (Time): New section.
7943         * s-linux-alpha.ads (Time): Likewise.
7944         * s-linux-android.ads (Time: Likewise.
7945         * s-linux-hppa.ads (Time): Likewise.
7946         * s-linux-mipsel.ads (Time): Likewise.
7947         * s-linux-sparc.ads (Time): Likewise.
7948         * s-linux-x32.ads (Time): Likewise.
7949         * s-osprim-x32.ads (timespec): Adjust.
7950         (Clock): Likewise.
7951         (To_Timespec): Likewise.
7952         * s-osinte-linux.ads (Time): Define local subtypes for those defined
7953         in System.Linux.
7954         * s-taprop-linux.adb (Monotonic_Clock): Do not define timeval.
7955         * s-osinte-hpux.ads (timespec): Revert POSIX breakage.
7956         * s-osinte-kfreebsd-gnu.ads (timespec): Likewise.
7957         * s-osinte-solaris-posix.ads (timespec): Likewise.
7958         * s-osinte-posix.adb (To_Timespec): Likewise.
7959         * gcc-interface/Makefile.in (x32/Linux): Use s-osinte-x32.adb.
7961 2014-04-08  Eric Botcazou  <ebotcazou@adacore.com>
7963         PR ada/60411
7964         * gcc-interface/Makefile.in (arm% linux-android): Switch to EHABI.
7965         * s-linux-android.ads: New file.
7966         * s-intman-android.adb: Likewise.
7967         * s-osinte-android.ads: Adjust.
7968         * sigtramp-armdroid.c: Likewise.
7969         * sigtramp.h: Add Android support.
7971 2014-04-07  Eric Botcazou  <ebotcazou@adacore.com>
7973         * gcc-interface/Makefile.in (alpha-vms): Add missing line.
7975 2014-03-30  Eric Botcazou  <ebotcazou@adacore.com>
7977         PR ada/60703
7978         * system-linux-alpha.ads: Adjust for Ada 2005.
7979         * system-linux-mips.ads: Likewise.
7980         * system-linux-mips64el.ads: Likewise.
7981         * system-linux-mipsel.ads: Likewise.
7982         * system-linux-s390.ads: Likewise.
7983         * system-linux-s390x.ads: Likewise.
7984         * system-linux-sparc.ads: Likewise.
7985         * system-linux-sparcv9.ads: Likewise.
7986         * system-rtems.ads: Likewise.
7987         * system-vxworks-arm.ads: Likewise.
7989 2014-03-16  Andreas Schwab  <schwab@linux-m68k.org>
7991         PR ada/39172
7992         * gcc-interface/Makefile.in (target_cpu_default): Revert
7993         2013-10-11 change.
7995 2014-03-13  Eric Botcazou  <ebotcazou@adacore.com>
7997         PR ada/51483
7998         * cstand.adb (Register_Float_Type): Add 'precision' parameter and use
7999         it to set the RM size.  Use directly 'size' for the Esize.
8000         (Create_Back_End_Float_Types): Adjust call to above.
8001         * get_targ.ads (Register_Type_Proc): Add 'precision' parameter.
8002         * set_targ.ads (FPT_Mode_Entry): Add 'precision' component.
8003         (Write_Target_Dependent_Values): Adjust comment.
8004         * set_targ.adb (Register_Float_Type): Add 'precision' parameter and
8005         deal with it.
8006         (Write_Target_Dependent_Values): Write the precision in lieu of size.
8007         (Initialization): Read the precision in lieu of size and compute the
8008         size from the precision and the alignment.
8009         * gcc-interface/gigi.h (enumerate_modes): Add integer parameter.
8010         * gcc-interface/misc.c (enumerate_modes): Likewise.  Do not register
8011         types for vector modes, pass the size in addition to the precision.
8013 2014-03-10  Eric Botcazou  <ebotcazou@adacore.com>
8015         * gcc-interface/Make-lang.in (ADA_DEPFILES): Fix typo.
8017 2014-03-07  Doug Rupp  <rupp@adacore.com>
8019         PR ada/60411
8020         * system-linux-armel.ads (Backend_Overflow_Checks): Set to True.
8021         (Support_64_Bit_Divides): Removed, no longer used.
8022         (ZCX_By_Default): Enabled.
8024 2014-02-25  Doug Rupp  <rupp@adacore.com>
8026         * gcc-interface/Makefile.in (arm-linux):
8027         (EH_MECHANISM): Use ARM unwinder (-arm)
8028         (LIBGNAT_TARGET_PAIRS: Override defaults with a-exexpr-gcc.adb and
8029         s-excmac-arm.ads.
8030         (EXTRA_LIBGNAT_OBJS): Add raise-gcc.o
8031         (EXTRA_GNATRTL_NONTASKING_OBJS): Add g-cppexc.o s-excmac.o.
8032         (arm-wrs-vxworks): Add EH_MECHANISM=-gcc for kernel mode.
8033         (EXTRA_LIBGNAT_OBJS): Add sigtramp-armvxw.o
8034         Add dependencies for sigtramp-armvxw.o.
8036 2014-02-25  Eric Botcazou  <ebotcazou@adacore.com>
8038         * gcc-interface/trans.c (Pragma_to_gnu): Deal with Warning_As_Error.
8040 2014-02-25  Robert Dewar  <dewar@adacore.com>
8042         * rtsfind.adb (Is_RTE): Protect against entity with no scope
8043         field (previously this call blew up on the Standard entity).
8044         * sem_attr.adb (Analyze_Attribute, case Access): Remove
8045         test for No_Abort_Statements, this is now handled in
8046         Set_Entity_With_Checks.
8047         * exp_ch6.adb, sem_ch10.adb, sem_ch4.adb, sem_ch8.adb, sem_res.adb:
8048         Change name Set_Entity_With_Style_Check => Set_Entity_With_Checks.
8049         * sem_util.ads, sem_util.adb: Change name Set_Entity_With_Style_Check =>
8050         Set_Entity_With_Checks.
8051         (Set_Entity_With_Checks): Add checks for No_Dynamic_Attachment,
8052         Add checks for No_Abort_Statements.
8054 2014-02-25  Robert Dewar  <dewar@adacore.com>
8056         * exp_ch9.adb (Expand_Entry_Barrier): Add comment that call to
8057         Check_Restriction is OK.
8059 2014-02-25  Ed Schonberg  <schonberg@adacore.com>
8061         * sem_ch3.adb (Process_Full_View): Better error message when
8062         the full view of  a private type without discriminants is an
8063         unconstrained type.
8064         * sem_ch7.adb (Uninstall_Declarations): Ditto.
8066 2014-02-25  Eric Botcazou  <ebotcazou@adacore.com>
8068         * sigtramp-armvxw.c: Also restore r0.
8070 2014-02-25  Robert Dewar  <dewar@adacore.com>
8072         * errout.adb (Error_Msg_Internal): Warning_Msg_Char set
8073         unconditionally (Set_Msg_Insertion_Warning): Warning_Msg_Char
8074         set unconditionally.
8075         * erroutc.adb (Get_Warning_Tag): Does not give a leading space
8076         any more (Output_Msg_Text): Rewritten with new convention on
8077         output of warnings that are treated as errors.
8078         * erroutc.ads (Error_Msg_Object): Warn_Chr is always set even
8079         if Warn is False.
8080         * gnat_rm.texi: Updates to documentation on pragma
8081         Warning_As_Error.
8082         * warnsw.adb (Set_Dot_Warning_Switch): -gnatw.e should not
8083         set Warning_Doc_Switch.
8084         * lib-writ.ads: Add documentation note on ALI file generation
8085         for C.
8086         * exp_ch6.adb (Expand_Call): Remove check for No_Abort_Statements
8087         (belongs in Sem).
8088         * sem_attr.adb (Resolve_Attribute, case Access):
8089         Abort_Task'Access violates the No_Abort_Statements restriction.
8090         * sem_res.adb (Resolve_Call): Check restriction
8091         No_Abort_Statements for call to Abort_Task or a renaming of it.
8093 2014-02-25  Robert Dewar  <dewar@adacore.com>
8095         * sem_ch3.adb (Array_Type_Declaration): Check for case of using
8096         type name as index.
8097         * lib.ads: Minor reformatting.
8098         * einfo.ads: Minor reformatting.
8100 2014-02-25  Doug Rupp  <rupp@adacore.com>
8102         * sem_mech.adb (Set_Mechanisms): For convention Fortran on VMS
8103         use Short_Descriptor(S) as the argument passing mechanism.
8105 2014-02-25  Eric Botcazou  <ebotcazou@adacore.com>
8107         * sigtramp-ppcvxw.c (CFI_COMMON_REGS): Also include r0.
8109 2014-02-25  Robert Dewar  <dewar@adacore.com>
8111         * atree.ads (Warnings_Treated_As_Errors): New variable.
8112         * errout.adb (Error_Msg_Internal): Set Warn_Err flag in
8113         error object (Initialize): Initialize Warnings_As_Errors_Count
8114         (Write_Error_Summary): Include count of warnings treated as errors.
8115         * erroutc.adb (Warning_Treated_As_Error): New function.
8116         (Matches): Function moved to outer level of package.
8117         * erroutc.ads (Error_Msg_Object): Add Warn_Err flag.
8118         (Warning_Treated_As_Error): New function.
8119         * gnat_rm.texi: Document pragma Treat_Warning_As_Error.
8120         * opt.adb: Add handling of Warnings_As_Errors_Count[_Config].
8121         * opt.ads (Config_Switches_Type): Add entry for
8122         Warnings_As_Errors_Count.
8123         (Warnings_As_Errors_Count): New variable.
8124         (Warnings_As_Errors): New array.
8125         * par-prag.adb: Add dummy entry for Warning_As_Error.
8126         * sem_prag.adb (Analyze_Pragma): Implement new pragma
8127         Warning_As_Error.
8128         * snames.ads-tmpl: Add entries for Warning_As_Error pragma.
8130 2014-02-25  Eric Botcazou  <ebotcazou@adacore.com>
8132         * sigtramp.h: Fix minor inaccuracy.
8134 2014-02-25  Ben Brosgol  <brosgol@adacore.com>
8136         * gnat_ugn.texi: Added description of kill command.
8138 2014-02-25  Robert Dewar  <dewar@adacore.com>
8140         * gnat_rm.texi (Address_Clauses): Add a section discussing the
8141         problem of address clauses causing unexpected initialization,
8142         including the effect of Initialize_Scalars.
8144 2014-02-25  Robert Dewar  <dewar@adacore.com>
8146         * errout.adb: Various changes for better msgs for anonmous access
8147         subprogram types.
8148         * erroutc.ads, erroutc.adb (Buffer_Ends_With): Version with character
8149         argument.
8150         (Buffer_Remove): Version with character argument.
8151         * sem_attr.adb (Resolve_Attribute, case Access): Better handling
8152         of mismatching conventions for access-to-subprogram case.
8153         * sem_prag.adb (Set_Convention_From_Pragma): Deal with anonymous
8154         access types in record.
8155         * sem_util.ads, sem_util.adb (Set_Convention): Handle anonymous access
8156         types, including in records.
8158 2014-02-25  Doug Rupp  <rupp@adacore.com>
8160         * sigtramp-ppcvxw.c, sigtramp.h, sigtramp-armvxw.c: Comment
8161         enhancements and corrections.
8163 2014-02-25  Robert Dewar  <dewar@adacore.com>
8165         * gnat_rm.texi: New section "Conventions and Anonymous Access Types"
8167 2014-02-25  Robert Dewar  <dewar@adacore.com>
8169         * gnat_rm.texi: First set of documentation additions for
8170         predefined RM units.
8171         * checks.adb: Minor reformatting.
8172         * sem_elab.adb (Check_Task_Activation): Minor fix to error
8173         message.
8174         * sem_util.adb: Minor reformatting.
8176 2014-02-25  Arnaud Charlet  <charlet@adacore.com>
8178         * usage.adb (Usage): Add help on -gnateC.
8179         * switch-c.adb (Scan_Front_End_Switches): Add handling of -gnateC.
8180         * opt.ads (Generate_CodePeer_Messages): New flag.
8181         * gnat_ugn.texi: Document new switch -gnateC.
8183 2014-02-25  Ben Brosgol  <brosgol@adacore.com>
8185         * gnat_rm.texi: Corrected minor typos in Implementation Defined
8186         Aspects.
8187         * opt.ads: Minor reformatting.
8189 2014-02-25  Robert Dewar  <dewar@adacore.com>
8191         * binde.adb: Change messages to mention -gnatel instead of -gnatwl.
8192         * gnat_ugn.texi: Update documentation of -gnatwl Add documentation
8193         of -gnatel/-gnateL.
8194         * opt.ads (Warn_Info_Messages): New flag.
8195         * sem_elab.adb: Use Elab_Warnings, Elab_Info_Messages to control
8196         messages.
8197         * sem_prag.adb: Use Elab_Warnings, Elab_Info_Messages to control
8198         messages.
8199         * switch-m.ad, switch-c.adb: Recognize new -gnatel/EL switches.
8200         * usage.adb: Add documentation of -gnatel/-gnateL Update
8201         documentation of -gnatwl/-gnatwL.
8202         * warnsw.adb: New handling of Elab_Warnings, Elab_Info_Messages
8203         * warnsw.ads (Elab_Info_Messages): New field in Warning_Record
8205 2014-02-25  Robert Dewar  <dewar@adacore.com>
8207         * einfo.ads, einfo.adb (Has_Shift_Operator): New flag.
8208         * gnat_rm.texi: Document pragma Provide_Shift_Operators.
8209         * interfac.ads: Minor code reorganization (add pragma
8210         Compiler_Unit_Warning).
8211         * par-prag.adb: Add dummy entry for Provide_Shift_Operators.
8212         * sem_ch3.adb (Build_Derived_Numeric_Type): Copy
8213         Has_Shift_Operator flag.
8214         * sem_intr.adb (Check_Intrinsic_Subprogram): Make sure
8215         Check_Shift is always called (Check_Shift): Set Has_Shift_Operator.
8216         * sem_prag.adb: Implement pragma Provide_Shift_Operators.
8217         * snames.ads-tmpl: Add entries for pragma Provide_Shift_Operators
8218         Add entry for Name_Amount.
8219         * checks.adb (Selected_Range_Checks): When checking for a null
8220         range, make sure we use the base type, and not the subtype for
8221         deciding a range is null.
8222         * sem_ch5.adb (Analyze_Loop_Parameter_Specification): Check
8223         for suspicious loop bound which is outside the range of the
8224         loop subtype.
8225         * gnat_ugn.texi: Add documentation section "Determining the
8226         Chosen Elaboration Order"
8227         * sem_ch13.adb (UC_Entry): Add field Act_Unit
8228         (Validate_Unchecked_Conversion): Store Act_Unit
8229         (Validate_Unchecked_Conversions): Test Warnings_Off in Act_Unit
8230         * treepr.adb: Minor reformatting.
8232 2014-02-25  Arnaud Charlet  <charlet@adacore.com>
8234         * usage.adb: Minor: fix typo.
8236 2014-02-25  Robert Dewar  <dewar@adacore.com>
8238         * lib.ads, s-bitops.adb, s-bitops.ads, s-conca5.adb, gnat_rm.texi,
8239         s-conca5.ads, s-conca7.adb, s-conca7.ads, s-crc32.adb, s-crc32.ads,
8240         s-conca9.adb, s-conca9.ads, g-dyntab.adb, s-crtl.ads, g-dyntab.ads,
8241         s-excdeb.adb, s-addope.adb, s-addope.ads, s-carun8.adb, s-carun8.ads,
8242         g-htable.adb, g-htable.ads, g-hesora.adb, g-hesora.ads, s-conca2.adb,
8243         s-conca2.ads, a-comlin.adb, a-chlat1.ads, a-comlin.ads, errout.ads,
8244         a-except.adb, s-conca4.adb, a-except.ads, s-conca4.ads, s-conca6.adb,
8245         s-conca6.ads, g-spchge.adb, g-spchge.ads, g-u3spch.adb, g-u3spch.ads,
8246         a-strhas.ads, restrict.adb, aspects.adb, aspects.ads, s-conca8.adb,
8247         s-conca8.ads, back_end.adb, par-prag.adb, g-byorma.adb, g-byorma.ads,
8248         a-elchha.adb, a-elchha.ads, g-speche.adb, g-speche.ads, s-casuti.adb,
8249         s-assert.adb, s-casuti.ads, s-assert.ads, a-clrefi.adb, a-clrefi.ads,
8250         s-conca3.adb, s-conca3.ads, a-ioexce.ads: Implement pragma
8251         Compiler_Unit_Warning, change Compiler_Unit everywhere to
8252         Compiler_Unit_Warning.
8254 2014-02-25  Sergey Rybin  <rybin@adacore.com frybin>
8256         * sem_prag.adb (Analyze_Depends_In_Decl_Part): Do not normalize
8257         in ASIS mode aggregates that are used as aspect definitions.
8259 2014-02-25  Robert Dewar  <dewar@adacore.com>
8261         * exp_ch7.adb, sem_util.adb, sem_util.ads, exp_ch6.adb: Minor
8262         reformatting.
8264 2014-02-25  Ed Schonberg  <schonberg@adacore.com>
8266         * freeze.adb (Freeze_Entity): If the return type of a function
8267         is a limited view, and the non-limited view has not been seen yet,
8268         defer freezing to some later point.
8270 2014-02-25  Robert Dewar  <dewar@adacore.com>
8272         * sem_ch3.adb: Minor reformatting.
8274 2014-02-25  Robert Dewar  <dewar@adacore.com>
8276         * s-excdeb.ads, s-except.ads, s-exctab.adb, s-exctab.ads, s-finmas.ads,
8277         s-htable.adb, s-htable.ads, s-imenne.adb, s-imenne.ads, s-imgenu.adb,
8278         s-imgenu.ads, s-mastop.adb, s-mastop.ads, s-memory-vms_64.adb,
8279         s-memory-vms_64.ads, s-memory.adb, s-memory.ads, s-os_lib.adb,
8280         s-os_lib.ads, s-parame.adb, s-parame.ads, s-purexc.ads, s-restri.adb,
8281         s-restri.ads, s-rident.ads, s-secsta.adb, s-secsta.ads, s-soflin.adb,
8282         s-soflin.ads, s-sopco3.adb, s-sopco3.ads, s-sopco4.adb, s-sopco4.ads,
8283         s-sopco5.adb, s-sopco5.ads, s-spsufi.ads, s-stache.adb, s-stache.ads,
8284         s-stalib.adb, s-stalib.ads, s-stoele.adb, s-stoele.ads, s-strcom.adb,
8285         s-strcom.ads, s-strhas.adb, s-string.adb, s-string.ads, s-strops.adb,
8286         s-strops.ads, s-ststop.adb, s-ststop.ads, s-traceb.adb, s-traceb.ads,
8287         s-traent.adb, s-traent.ads, s-unstyp.ads, s-utf_32.adb, s-utf_32.ads,
8288         s-wchcnv.adb, s-wchcnv.ads, s-wchcon.adb, s-wchcon.ads, s-wchjis.adb,
8289         s-wchjis.ads, sem_ch11.adb, sem_ch4.adb, sem_ch5.adb, sem_prag.adb,
8290         snames.ads-tmpl: Change Compiler_Unit everywhere to
8291         Compiler_Unit_Warning.
8293 2014-02-25  Hristian Kirtchev  <kirtchev@adacore.com>
8295         * exp_ch6.adb (Add_Or_Save_Precondition): New routine.
8296         (Collect_Body_Postconditions_In_Decls): New routine.
8297         (Collect_Body_Postconditions_Of_Kind): Factor out code. Handle
8298         postcondition aspects or pragmas that appear on a subprogram
8299         body stub.
8300         (Collect_Spec_Preconditions): Factor out code. Handle
8301         precondition aspects or pragmas that appear on a subprogram
8302         body stub.
8303         * sem_ch6.adb (Analyze_Subprogram_Body_Helper): The analysis of
8304         aspects that apply to a subprogram body stub is no longer delayed,
8305         the aspects are analyzed on the spot.
8306         (SPARK_Aspect_Error):
8307         Aspects that apply to a subprogram declaration cannot appear in
8308         a subunit.
8309         * sem_ch10.adb Remove with and use clause for Sem_Ch13.
8310         (Analyze_Proper_Body): Add local variable Comp_Unit. Unum
8311         is now a local variable. Code cleanup. Analysis related to
8312         the aspects of a subprogram body stub is now carried out by
8313         Analyze_Subprogram_Body_Helper. Do not propagate the aspects
8314         and/or pragmas of a subprogram body stub to the proper body
8315         as this is no longer needed. Do not analyze the aspects of a
8316         subprogram stub when the corresponding source unit is missing.
8317         (Analyze_Protected_Body_Stub): Flag the illegal use of aspects
8318         on a stub.
8319         (Analyze_Task_Body_Stub): Flag the illegal use of
8320         aspects on a stub.
8321         (Optional_Subunit): Add local variable Unum.
8322         * sem_ch13.adb (Insert_Delayed_Pragma): Do not analyze a generated
8323         pragma when it applies to a subprogram body stub.
8324         * sem_prag.adb (Analyze_Pragma): Pragmas Contract_Cases,
8325         Depends and Global can now apply to a subprogram body stub as
8326         long as it acts as its own spec.
8327         (Analyze_Refined_Pragma):
8328         Code reformatting. Refinement pragmas cannot apply to a subunit.
8330 2014-02-25  Hristian Kirtchev  <kirtchev@adacore.com>
8332         * einfo.ads Update the usage of flag
8333         Uses_Sec_Stack. Uses_Sec_Stack now applies to E_Loop entities.
8334         * exp_ch5.adb (Expand_Iterator_Loop): The temporary for a cursor
8335         now starts with the letter 'C'. This makes reading expanded
8336         code easier.
8337         * exp_ch7.adb (Establish_Transient_Scope): Add local variable
8338         Iter_Loop. Signal that an Ada 2012 iterator loop requires
8339         secondary stack management when creating a transient scope for
8340         an element reference.
8341         * exp_util.adb (Process_Statements_For_Controlled_Objects):
8342         When wrapping the statements of a loop, pass the E_Loop entity
8343         to the wrapping machinery.
8344         (Wrap_Statements_In_Block): Add
8345         formal parameter Scop along with comment on usage. Add local
8346         variables Block_Id, Block_Nod and Iter_Loop. Mark the generated
8347         block as requiring secondary stack management when the block is
8348         created inside an Ada 2012 iterator loop. This ensures that any
8349         reference objects are reclaimed on each iteration of the loop.
8350         * sem_ch5.adb (Analyze_Loop_Statement): Mark the generated block
8351         tasked with the handling of container iterators as requiring
8352         secondary stack management. This ensures that iterators are
8353         reclaimed when the loop terminates or is exited in any fashion.
8354         * sem_util.adb (Add_Block_Identifier): New routine.
8355         (Find_Enclosing_Iterator_Loop): New routine.
8356         * sem_util.ads (Add_Block_Identifier): New routine.
8357         (Find_Enclosing_Iterator_Loop): New routine.
8359 2014-02-25  Robert Dewar  <dewar@adacore.com>
8361         * sinfo.ads: Minor reformatting.
8363 2014-02-25  Tristan Gingold  <gingold@adacore.com>
8365         * s-expllu.ads, s-expuns.ads, s-expmod.ads: Minor comment fix.
8367 2014-02-25  Pascal Obry  <obry@adacore.com>
8369         * sinput-l.adb, osint.adb, osint.ads: Add Prep_Suffix to factorize code.
8371 2014-02-25  Tristan Gingold  <gingold@adacore.com>
8373         * sem_ch10.adb: Minor comment fix.
8375 2014-02-25  Bob Duff  <duff@adacore.com>
8377         * s-tasdeb.adb: Misc cleanup of this package,
8378         including printing addresses in hexadecimal.
8379         (Write): Fix minor bug when taking 'Address of an empty string.
8381 2014-02-25  Ed Schonberg  <schonberg@adacore.com>
8383         * sem_prag.adb (Analyze_Part_Of): Reject state refinement in a
8384         public child unit when it does not refer to the abstract state
8385         of a public ancestor.
8387 2014-02-25  Yannick Moy  <moy@adacore.com>
8389         * sem_prag.adb (Analyze_Pragma/Pragma_Validity_Checks): Ignore pragma
8390         Validity_Checks in GNATprove and CodePeer modes.
8392 2014-02-25  Pascal Obry  <obry@adacore.com>
8394         * prj-attr.adb, projects.texi, snames.ads-tmpl: Add package Install's
8395         Artifacts attribute.
8397 2014-02-25  Yannick Moy  <moy@adacore.com>
8399         * sem_prag.adb: Minor reformatting to get consistent messages.
8401 2014-02-25  Robert Dewar  <dewar@adacore.com>
8403         * checks.adb: Minor reformatting.
8404         * sinfo.ads (Do_Range_Check): Document that this flag is never
8405         passed to the back end.
8407 2014-02-25  Yannick Moy  <moy@adacore.com>
8409         * sem_ch3.adb, sem_ch5.adb, sem_ch9.adb, sem_prag.adb, sem_attr.adb,
8410         sem_ch6.adb: Remove useless references to SPARK RM in error messages.
8412 2014-02-25  Hristian Kirtchev  <kirtchev@adacore.com>
8414         * sem_res.adb (Appears_In_Check): New routine.
8415         (Resolve_Entity_Name): Remove local variables Prev and
8416         Usage_OK. Par is now a constant. Remove the parent chain traversal
8417         as the placement of a volatile object with enabled property
8418         Async_Writers and/or Effective_Reads must appear immediately
8419         within a legal construct.
8421 2014-02-25  Hristian Kirtchev  <kirtchev@adacore.com>
8423         * checks.adb (Apply_Selected_Range_Checks):
8424         Alphabetize local constants and variables. Add comments.
8425         Always insert a range check that requires runtime evaluation into
8426         the tree.
8428 2014-02-25  Robert Dewar  <dewar@adacore.com>
8430         * sem_attr.adb, sem_ch6.adb, par-ch3.adb: Minor reformatting.
8432 2014-02-25  Bob Duff  <duff@adacore.com>
8434         * s-tassta.adb (Finalize_Global_Tasks): Limit the number of loop
8435         iterations while waiting for independent tasks to terminate;
8436         if an independent task does not terminate, we do not want to
8437         hang here. In that case, the thread will be terminated when the
8438         process exits.
8439         * s-taprop-linux.adb (Abort_Task): Fix Assert to allow for ESRCH.
8441 2014-02-25  Ed Schonberg  <schonberg@adacore.com>
8443         * sem_prag.adb (Check_SPARK_Aspect_For_ASIS): New subprogram,
8444         used to perform pre-analysis of the expression for SPARK
8445         aspects that have a non-standard syntax, such as GLobal and
8446         Initializes. The procedure applies to the original expression
8447         in an aspect specification, prior to the analysis of the
8448         corresponding pragma, in order to provide semantic information
8449         for ASIS navigation purposes.
8450         (Analyze_Global_In_Decl_List, Analyze_Initializes_In_Decl_Part):
8451         Call new subprogram.
8453 2014-02-25  Yannick Moy  <moy@adacore.com>
8455         * sem_prag.adb: Remove obsolete reference to SPARK RM in error message.
8457 2014-02-25  Doug Rupp  <rupp@adacore.com>
8459         * init.c (HAVE_GNAT_ADJUST_CONTEXT_FOR_RAISE): Enable for ARM.
8460         (__gnat_adjust_context_for_raise): Bump the PC by 2.
8462 2014-02-25  Ed Schonberg  <schonberg@adacore.com>
8464         * par-ch3.adb (P_Basic_Declarative_Items): In the case of a
8465         misplaced IS, add a statement sequence to improper body only if
8466         one has not been parsed already.
8468 2014-02-25  Ed Schonberg  <schonberg@adacore.com>
8470         * sem_attr.adb (Analyze_Attribute, case 'Update): Check for
8471         mismatch when multidimensional array is updated with a single
8472         index.
8474 2014-02-25  Yannick Moy  <moy@adacore.com>
8476         * sem_ch3.adb, sem_ch5.adb, sem_prag.adb, sem_attr.adb, errout.ads,
8477         sem_ch6.adb: Mark most references to SPARK RM in error messages
8478         for removal.
8480 2014-02-24  Ed Schonberg  <schonberg@adacore.com>
8482         * par-ch3.adb (P_Basic_Declarative_Items): If an improper body
8483         appears in a list of basic declarations, complete the tree with
8484         an empty statement list, to prevent cascaded errors and crashes
8485         if semantic analysis is attempted.
8487 2014-02-24  Thomas Quinot  <quinot@adacore.com>
8489         * g-sercom-mingw.adb (Open): Fix incorrect test for error return
8490         value.
8491         * erroutc.adb: Minor reformatting.
8493 2014-02-24  Hristian Kirtchev  <kirtchev@adacore.com>
8495         * sem_prag.adb (Check_Clause_Syntax): Account
8496         for a solitary input item in a dependency list.
8498 2014-02-24  Yannick Moy  <moy@adacore.com>
8500         * gnat1drv.adb (Adjust_Global_Switches): Do not
8501         use validity checks at all in GNATprove_Mode.
8503 2014-02-24  Robert Dewar  <dewar@adacore.com>
8505         * g-sercom-mingw.adb, g-sercom-linux.adb, sem_prag.adb, freeze.adb,
8506         atree.adb, atree.ads: Minor reformatting.
8508 2014-02-24  Hristian Kirtchev  <kirtchev@adacore.com>
8510         * sem_ch6.adb (Analyze_Subprogram_Body_Contract): Do not enforce
8511         global and dependence refinement when SPARK_Mode is off.
8512         * sem_ch7.adb (Analyze_Package_Body_Contract): Do not enforce
8513         state refinement when SPARK_Mode is off.
8514         * sem_ch13.adb (Analyze_Aspect_Specifications): Add local
8515         variable Decl. Insert the generated pragma for Refined_State
8516         after a potential pragma SPARK_Mode.
8517         * sem_prag.adb (Analyze_Depends_In_Decl_Part): Add local
8518         constant Deps. Remove local variable Expr. Check the syntax
8519         of pragma Depends when SPARK_Mode is off. Factor out the
8520         processing for extra parenthesis around individual clauses.
8521         (Analyze_Global_In_Decl_List): Items is now a constant. Check
8522         the syntax of pragma Global when SPARK_Mode is off.
8523         (Analyze_Initializes_In_Decl_Part): Check the syntax of pragma
8524         Initializes when SPARK_Mode is off.
8525         (Analyze_Part_Of): Check
8526         the syntax of the encapsulating state when SPARK_Mode is off.
8527         (Analyze_Pragma): Check the syntax of pragma Abstract_State when
8528         SPARK_Mode is off. Move the declaration order check with respect
8529         to pragma Initializes to the end of the processing. Do not verify
8530         the declaration order for pragma Initial_Condition when SPARK_Mode
8531         is off. Do not complain about a useless package refinement when
8532         SPARK_Mode is off.
8533         (Analyze_Refined_Depends_In_Decl_Part): Refs
8534         is now a constant. Check the syntax of pragma Refined_Depends
8535         when SPARK_Mode is off.
8536         (Analyze_Refined_Global_In_Decl_Part):
8537         Check the syntax of pragma Refined_Global when SPARK_Mode is off.
8538         (Analyze_Refined_State_In_Decl_Part): Check the syntax of pragma
8539         Refined_State when SPARK_Mode is off.
8540         (Check_Dependence_List_Syntax): New routine.
8541         (Check_Global_List_Syntax): New routine.
8542         (Check_Initialization_List_Syntax): New routine.
8543         (Check_Item_Syntax): New routine.
8544         (Check_State_Declaration_Syntax): New routine.
8545         (Check_Refinement_List_Syntax): New routine.
8546         (Has_Extra_Parentheses): Moved to the top level of Sem_Prag.
8548 2014-02-24  Robert Dewar  <dewar@adacore.com>
8550         * a-tags.adb, s-os_lib.adb: Minor reformatting.
8552 2014-02-24  Thomas Quinot  <quinot@adacore.com>
8554         * g-sercom-mingw.adb, g-sercom-linux.adb (Raise_Error): Include
8555         strerror message, not just numeric errno value.
8557 2014-02-24  Doug Rupp  <rupp@adacore.com>
8559         * raise-gcc.c (exception_class_eq): Make endian neutral.
8561 2014-02-24  Ed Schonberg  <schonberg@adacore.com>
8563         * atree.ads, atree,adb (Copy_Separate_Tree): Remove Syntax_Only
8564         flag, and reset Etype and Analyzed attributes unconditionally
8565         when copying a tree that may be partly analyzed.
8566         * freeze.adb: Change calls to Copy_Separate_Tree accordingly.
8567         * sem_ch6.adb (Check_Inline_Pragma): If the Inline pragma appears
8568         within a subprogram body and applies to it, remove it from the
8569         body before making a copy of it, to prevent spurious errors when
8570         analyzing the copied body.
8572 2014-02-24  Thomas Quinot  <quinot@adacore.com>
8574         * s-os_lib.adb (Errno_Message): Do not depend on Integer'Image.
8575         * s-oscons-tmplt.c: On VxWorks, include adaint.h only after
8576         vxWorks.h has been included.  Also ensure that file attributes
8577         related definitions are output even in cases where socket support
8578         is not enabled.
8579         * a-tags.adb: Code clean up.
8580         * Make-generated.in (OSCONS_CPP, OSCONS_EXTRACT): Use -iquote
8581         instead of -I to add the main ada source directory to the header
8582         search path, in order to avoid conflict between our own "types.h"
8583         and VxWork's <types.h>.
8585 2014-02-24  Robert Dewar  <dewar@adacore.com>
8587         * atree.ads, atree.adb (Copy_Separate_Tree): Add Syntax_Only parameter.
8588         * debug.adb: Remove documentation of -gnatd.X, no longer used.
8589         * freeze.adb (Wrap_Imported_Subprogram): Fixed and activated.
8591 2014-02-24  Bob Duff  <duff@adacore.com>
8593         * gnat_ugn.texi: Improve documentation of gnatpp.
8595 2014-02-24  Thomas Quinot  <quinot@adacore.com>
8597         * g-stheme.adb, g-socthi-vms.adb, g-socthi-vms.ads,
8598         g-socthi-vxworks.adb, g-socthi-vxworks.ads, g-stseme.adb,
8599         g-socthi-mingw.adb, g-socthi-mingw.ads, g-socthi.adb,
8600         g-socthi.ads, g-socket.adb (Host_Error_Message): Return a string, not
8601         a chars_ptr, because on Windows this is a renaming of
8602         Socket_Error_Message.
8604 2014-02-24  Robert Dewar  <dewar@adacore.com>
8606         * a-direct.adb, sem_ch5.adb, a-cfdlli.adb, a-cfhase.adb, a-tags.adb,
8607         s-filatt.ads, a-cforma.adb, sem_ch6.adb, g-socthi-mingw.adb,
8608         a-cfhama.adb, a-cforse.adb, a-cofove.adb: Minor reformatting and code
8609         reorganization.
8611 2014-02-24  Thomas Quinot  <quinot@adacore.com>
8613         * Make-generated.in (OSCONS_CPP, OSCONS_EXTRACT): Make sure
8614         that the source directory containing s-oscons-tmplt.c is on the
8615         include path, so that all internal header files are available.
8617 2014-02-24  Ed Schonberg  <schonberg@adacore.com>
8619         * sem_ch5.adb (Analyze_Loop_Parameter_Specification): If the
8620         domain of iteration is an attribute reference 'Old, this is an
8621         Ada 2012 iterator and the loop must be rewritten as such.
8623 2014-02-24  Thomas Quinot  <quinot@adacore.com>
8625         * s-fileio.adb (Errno_Message): Remove, use shared version from
8626         s-os_lib instead.
8627         * s-crtrun.ads, Makefile.rtl: Remove now unused unit.
8628         * g-stseme (Socket_Error_Message): Reimplement in terms of new
8629         s-os_lib function.
8630         * g-socthi.ads, g-socthi.adb: Change profile of
8631         Socket_Error_Message to return String to allow the above.
8632         * g-socket.adb, g-socthi-mingw.adb, g-socthi-mingw.ads,
8633         * g-socthi-vms.adb, g-socthi-vms.ads, g-socthi-vxworks.adb,
8634         * g-socthi-vxworks.ads: Update to account for the above profile
8635         change.
8636         * a-tags.adb: Use strlen builtin binding provided by s-crtl.
8637         * s-crtl.ads (strncpy): New procedure.
8638         * s-os_lib.adb (Copy_Attributes): Import just once (strncpy):
8639         Use import from s-crtl.
8640         * a-envvar.adb, osint.adb: Use imports of C runtime functions
8641         from s-crtl instead of re-importing locally.
8643 2014-02-24  Hristian Kirtchev  <kirtchev@adacore.com>
8645         * sem_prag.adb (Analyze_Global_Item): Emit the
8646         variable related checks concerning volatile objects only when
8647         SPARK_Mode is on.
8649 2014-02-24  Robert Dewar  <dewar@adacore.com>
8651         * sem_ch5.adb (Analyze_Iterator_Specification): use
8652         Error_Msg_Ada_2012_Feature.
8654 2014-02-24  Jose Ruiz  <ruiz@adacore.com>
8656         * s-rident.ads (Profile_Info): For Ravenscar, the restrictions
8657         No_Local_Timing_Events and No_Specific_Termination_Handlers
8658         must be set, according to the Ravenscar profile definition
8659         in D.13(6/3).
8661 2014-02-24  Ed Schonberg  <schonberg@adacore.com>
8663         * sem_ch6.adb (Analyze_Expression_Function): If this is a
8664         completion, freeze return type and its designated type if needed.
8666 2014-02-24  Thomas Quinot  <quinot@adacore.com>
8668         * sem_ch13.adb (Analyze_Attribute_Definition_Clause, case
8669         'Address): When moving initialization statements to a freeze
8670         entity, keep them under a single node (i.e. do not unwrap
8671         expressions with actions), and set the Initialization_Statements
8672         attribute again so that processing of a later pragma Import can
8673         still remove them.
8675 2014-02-24  Claire Dross  <dross@adacore.com>
8677         * a-cfdlli.adb, a-cfdlli.ads, a-cfhama.adb, a-cfhama.ads,
8678         a-cfhase.adb, a-cfhase.ads, a-cforma.adb, a-cforma.ads,
8679         a-cforse.adb, a-cforse.ads, a-cofove.adb, a-cofove.ads: Rename
8680         Left/Right to First_To_Previous/Current_To_Last.
8682 2014-02-24  Thomas Quinot  <quinot@adacore.com>
8684         * adaint.h (struct file_attributes): New component "error"
8685         (__gnat_error_attributes): Accessor for the above.
8686         * adaint.c (__gnat_error_attributes): New subprogram
8687         (__gnat_stat): Fix returned value (expect errno value)
8688         (__gnat_stat_to_attr): Add management of error component (set to
8689         stat errno value, except for missing files where it is set to 0,
8690         and exists is set to 0).
8691         * osint.ads (File_Attributes_Size): Update per change above,
8692         also clarify documentation.
8693         * s-filatt.ads: New file, binding to file attributes related
8694         functions.
8695         * Makefile.rtl (s-filatt): New runtime unit.
8696         * s-crtl.ads (strlen): Expose binding to GCC builtin (falls back
8697         to library function if not available on target).
8698         * s-os_lib.ads, s-os_lib.adb (Errno_Message): New subprogram.
8699         * s-oscons-tmplt.c (SIZEOF_struct_file_attributes,
8700         SIZEOF_struct_dirent_alloc): New constants.
8701         * Make-generated.in (s-oscons.ads): Now requires adaint.h.
8702         * a-direct.adb (Fetch_Next_Entry): Fix incorrect buffer sizes.
8703         Perform appropriate error checking if stat fails (do not just
8704         ignore existing files if stat fails)
8705         * gcc-interface/Make-lang.in (GNAT_ADA_OBJS, GNATBIND_OBJS): Update
8706         dependencies.
8708 2014-02-24  Hristian Kirtchev  <kirtchev@adacore.com>
8710         * sem_prag.adb (Analyze_Global_Item): Move the check concerning
8711         the use of volatile objects as global items in a function to
8712         the variable related checks section.
8713         * sem_util.adb (Async_Readers_Enabled): Directly call
8714         Has_Enabled_Property.
8715         (Async_Writers_Enabled): Directly call Has_Enabled_Property.
8716         (Effective_Reads_Enabled): Directly call Has_Enabled_Property.
8717         (Effective_Writes_Enabled): Directly call Has_Enabled_Property.
8718         (Has_Enabled_Property): Rename formal parameter State_Id to Item_Id.
8719         Update the comment on usage. State_Has_Enabled_Property how handles
8720         the original logic of the routine. Add processing for variables.
8721         (State_Has_Enabled_Property): New routine.
8722         (Variable_Has_Enabled_Property): New routine.
8724 2014-02-24  Robert Dewar  <dewar@adacore.com>
8726         * sinfo.ads, sem_ch12.adb, sem_res.adb, sem_ch4.adb, par-ch12.adb:
8727         Minor reformatting.
8728         * atree.ads, atree.adb (Node35): New function.
8729         (Set_Node35): New procedure.
8730         * debug.adb: Define new debug flag -gnatd.X.
8731         * einfo.ads, einfo.adb (Import_Pragma): New field.
8732         * freeze.adb (Wrap_Imported_Procedure): New procedure (not
8733         really active yet, has to be activated with -gnatd.X.
8734         * sem_prag.adb (Set_Imported): Set new Import_Pragma
8735         field (Set_Imported): Don't set Is_Public (see
8736         Freeze.Wrap_Imported_Subprogram)
8737         * par-ch3.adb (P_Component_List): Handle unexpected null component.
8739 2014-02-24  Yannick Moy  <moy@adacore.com>
8741         * sem_ch3.adb: Correct reference to SPARK RM in error messages.
8742         * gnat_rm.texi: Correct documentation of attribute Update.
8744 2014-02-24  Ed Schonberg  <schonberg@adacore.com>
8746         * sem_ch5.adb (Analyze_Iterator_Specification): Reject container
8747         iterator in older versions of Ada.
8749 2014-02-24  Gary Dismukes  <dismukes@adacore.com>
8751         * sem_ch5.adb, sem_aux.ads, sem_ch12.adb, gnat_ugn.texi, par.adb,
8752         par-ch12.adb: Change spelling 'parametrization' to 'parameterization'.
8754 2014-02-24  Ed Schonberg  <schonberg@adacore.com>
8756         * sinfo.ads, sinfo.adb: New attribute Generalized_Indexing, for
8757         indexed_components that are instances of Ada 2012 container
8758         indexing operations. Analysis and resolution of such nodes
8759         is performed on the attribute, and the original source is
8760         preserved for ASIS operations. If expansion is enabled, the
8761         indexed component is replaced by the value of this attribute,
8762         which is in a call to an Indexing aspect, in most case wrapped
8763         in a dereference operation.
8764         * sem_ch4.adb (Analyze_Indexed_Component): Create
8765         Generalized_Indexing attribute when appropriate.
8766         (Analyze_Call): If prefix is not overloadable and has an indexing
8767         aspect, transform into an indexed component so it can be analyzed
8768         as a potential container indexing.
8769         (Analyze_Expression): If node is an indexed component with a
8770         Generalized_ Indexing, do not re-analyze.
8771         * sem_res.adb (Resolve_Generalized_Indexing): Complete resolution
8772         of an indexed_component that has been transformed into a container
8773         indexing operation.
8774         (Resolve_Indexed_Component): Call the above when required.
8775         (Resolve): Do not insert an explicit dereference operation on
8776         an indexed_component whose type has an implicit dereference:
8777         the operation is inserted when resolving the related
8778         Generalized_Indexing.
8780 2014-02-24  Olivier Ramonat  <ramonat@adacore.com>
8782         * gnat_rm.texi, gnat_ugn.texi: Replace Ada Compiler by Ada Development
8783         Environment.
8785 2014-02-24  Hristian Kirtchev  <kirtchev@adacore.com>
8787         * sem_prag.adb (Check_Constituent_Usage): Remove leading spaces in
8788         error messages.
8789         (Inconsistent_Mode_Error): Remove leading spaces in error messages.
8790         Merge the expected and available mode errors.
8791         (Report_Unused_Constituents): Remove leading spaces in error messages.
8792         (Report_Unused_States): Remove leading spaces in error messages.
8794 2014-02-24  Thomas Quinot  <quinot@adacore.com>
8796         * par_sco.adb (Traverse_One): Refine categorization of statement
8797         SCOs.
8799 2014-02-24  Robert Dewar  <dewar@adacore.com>
8801         * aspects.ads, aspects.adb: Remove aspects Ada_2005 and Ada_2012,
8802         Pure_05, Pure_12 and Preelaborate_05.
8803         * gnat_rm.texi: Update accordingly.
8804         * sem_prag.adb: Document one argument form of Ada_05/Ada_2005
8805         pragmas Document one argument form of Ada_12/Ada_2012 pragmas
8806         Recognize one argument form of these pragmas only in GNAT mode
8807         (-gnatg).
8809 2014-02-24  Ed Schonberg  <schonberg@adacore.com>
8811         * s-dimmks.ads: Replace symbol for temperature, previously the
8812         Greek letter Theta, by the ASCII @ sign.
8813         * s-diflio.ads: ditto.
8815 2014-02-24  Robert Dewar  <dewar@adacore.com>
8817         * exp_ch4.adb: Minor code reorganization (use OR for boolean
8818         variables).
8819         * sem_ch3.adb, sem_prag.adb, freeze.adb: Minor reformatting.
8821 2014-02-24  Ben Brosgol  <brosgol@adacore.com>
8823         * gnat_ugn.texi, projects.texi: Added the necessary conditionalization
8824         so that references to gnatmem and ASIS tools do not appear in the FSF
8825         edition of the GNAT User's Guide.
8827 2014-02-24  Yannick Moy  <moy@adacore.com>
8829         * freeze.adb (Freeze_Entity): Do not issue warning
8830         for pre/post being ignored on imported subprogram in GNATprove
8831         mode.
8833 2014-02-24  Robert Dewar  <dewar@adacore.com>
8835         * exp_ch5.adb, sem_ch5.adb, sem_type.adb, sem_res.adb, sem_attr.adb,
8836         stand.ads, sem_eval.adb: Minor reformatting.
8838 2014-02-24  Yannick Moy  <moy@adacore.com>
8840         * sem_prag.adb: Minor rewording in error message.
8842 2014-02-24  Johannes Kanig  <kanig@adacore.com>
8844         * exp_util.adb (Expand_Subtype_From_Expr): Do not expand subtypes in
8845         GNATprove_mode, gnat2why doesn't need nor use these types.
8847 2014-02-24  Gary Dismukes  <dismukes@adacore.com>
8849         * exp_ch4.adb (Expand_N_Op_Expon): On the AAMP
8850         target, in the case of signed integer exponentiation that uses a
8851         run-time routine, always select the Exp_* versions, since overflow
8852         checking is automatically done by AAMP arithmetic instructions.
8854 2014-02-24  Hristian Kirtchev  <kirtchev@adacore.com>
8856         * sem_ch13.adb (Analyze_Aspect_Specifications):
8857         When the related context is a package instace, insert pragma
8858         Abstract_State after all internally-generated renamings related
8859         to the instance "header".
8861 2014-02-24  Ed Schonberg  <schonberg@adacore.com>
8863         * sem_ch3.adb (Analyze_Declarations): Analyze Contract of abstract
8864         subprograms.
8865         * sem_disp.adb (Check_Dispatching_Context): A non-dispatching
8866         call to an abstract subprogram is legal if it appears in a
8867         pre/postcondition of another abstract operation.
8869 2014-02-24  Sergey Rybin  <rybin@adacore.com frybin>
8871         * gnat_ugn.texi: Misc updates.
8873 2014-02-24  Hristian Kirtchev  <kirtchev@adacore.com>
8875         * exp_prag.adb (Expand_Old): Set the type of the generated temporary.
8877 2014-02-24  Gary Dismukes  <dismukes@adacore.com>
8879         * layout.adb (Layout_Variant_Record): Instantiate
8880         Generic_Check_Choices and call Check_Choices before calling
8881         Build_Discr_Checking_Funcs, since we need Others_Discrete_Choices
8882         set to prevent generating incorrect discriminant-checking
8883         functions for 'others' variants (functions that unconditionally
8884         return True rather than accounting for the values covered by the
8885         'others' choice).
8886         * sem_eval.ads (Subtypes_Statically_Compatible): Add formal
8887         Formal_Derived_Matching.
8888         (Subtypes_Statically_Match): Add formal Formal_Derived_Matching.
8889         * sem_eval.adb (Subtypes_Statically_Compatible): Pass new
8890         Formal_Derived_Matching formal to Subtypes_Statically_Match.
8891         (Subtypes_Statically_Match): Suppress the Object_Size matching
8892         test in the case where Formal_Derived_Matching is True.
8893         * sem_ch12.adb (Validate_Derived_Type_Instance): Pass
8894         True for Formal_Derived_Matching_Formal on the call to
8895         Subtypes_Statically_Compatible.
8897 2014-02-23  Eric Botcazou  <ebotcazou@adacore.com>
8899         * gcc-interface/Make-lang.in (ADA_TOOLS_FLAGS_TO_PASS): Robustify.
8901 2014-02-23  Eric Botcazou  <ebotcazou@adacore.com>
8903         * gcc-interface/utils2.c (build_simple_component_ref): Fix formatting.
8904         Look through a conversion between original and packable version to get
8905         the base object.
8906         (build_component_ref): Rework comment and fix formatting.
8908 2014-02-20  Sergey Rybin  <rybin@adacore.com frybin>
8910         * gnat_ugn.texi, vms_data.ads (gnatelim): Add description of
8911         project-specific options.
8913 2014-02-20  Ed Schonberg  <schonberg@adacore.com>
8915         * a-cbdlli.adb (Insert): When capacity exceeded, raise Capacity_Error,
8916         not Constraint_Error.
8917         * a-cbmutr.adb (Append_Child, Insert_Child, Prepend_Child): Ditto.
8918         * sem_ch5.adb: Code clean up.
8920 2014-02-20  Hristian Kirtchev  <kirtchev@adacore.com>
8922         * sem_prag.adb (Usage_Error): Remove local
8923         constant Typ. Remove the specialized diagnostics for unconstrained
8924         or tagged items as those are not part of the explicit input set
8925         of the related subprogram and should not be flagged.
8927 2014-02-20  Ed Schonberg  <schonberg@adacore.com>
8929         * sem_attr.adb: Add guard to preserve all errors.
8931 2014-02-20  Vincent Celier  <celier@adacore.com>
8933         * switch-m.adb (Normalize_Compiler_Switches): Take into account
8934         switches that are recorded in ALI files: -gnateA, -gnateE,
8935         -gnateF, -gnateinn, -gnateu, -gnateV and -gnateY.
8937 2014-02-20  Ed Schonberg  <schonberg@adacore.com>
8939         * sem_ch5.adb (Analyze_Iterator_Specification): Check legality
8940         of an element iterator form over a formal container with an
8941         Iterable aspect.
8942         * exp_ch5.adb (Build_Formal_Container_Iteration): Utility
8943         to create declaration and loop statements for both forms of
8944         container iterators.
8945         (Expand_Formal_Container_Element_Iterator): New procedure
8946         to handle loops of the form  "for E of C" when C is a formal
8947         container.
8948         (Expand_Formal_Container_Iterator): Code cleanup.
8950 2014-02-20  Hristian Kirtchev  <kirtchev@adacore.com>
8952         * sem_prag.adb (Add_Item_To_Name_Buffer): New routine.
8953         (Analyze_Contract_Case): Remove the use of
8954         "may". Replace "aspect Contract_Cases" to avoid categorization
8955         of aspect vs pragma.
8956         (Analyze_External_Property_In_Decl_Part): Remove the use of "formal".
8957         (Analyze_Global_Item): Remove
8958         the use of "formal", specify the subprogram.  Split the
8959         error message about a state with visible refinement into
8960         two. Remove the use of "global" from "volatile global item".
8961         (Analyze_Initialization_Item): Ensure that the SPARK RM reference
8962         is on one line.
8963         (Analyze_Input_Output): Update the call to
8964         Check_Mode. Specify the duplicated item. Reword the error
8965         message concerning an input of a null output list. Use "\"
8966         for error message continuation.
8967         (Analyze_Part_Of): Remove
8968         the use of "may". Use "\" for error message continuation.
8969         (Analyze_Refined_Depends_In_Decl_Part): Update the error
8970         message concerning a useless refinement to match the format
8971         of Refined_Global.
8972         (Analyze_Refined_Global_In_Decl_Part): Reword the error message
8973         concerning a useless refinement.
8974         (Analyze_Refinement_Clause): Use "\" for error message continuation.
8975         (Check_Constituent_Usage): Use "\" for error message continuation.
8976         (Check_Dependency_Clause): Use "\" for error message continuation.
8977         (Check_Matching_Constituent): Use "\" for error message continuation.
8978         (Check_Missing_Part_Of): Use "\" for error message continuation.
8979         (Check_Mode): Renamed to
8980         Check_Role. Update the comment on usage. Redo the error reporting
8981         to use Role_Error.
8982         (Check_Mode_Restriction_In_Enclosing_Context): Use "\" for error
8983         message continuation.
8984         (Find_Mode): Renamed to Find_Role. Update the parameter profile along
8985         with comment on usage. Update all occurrences of Is_Input and Is_Output.
8986         (Inconsistent_Mode_Error): Use "\" for error message continuation.
8987         (Input_Match): Use "\" for error message continuation.
8988         (Role_Error): New routine.
8989         (Set_Convention_From_Pragma): Use "\" for error message continuation.
8990         (Usage_Error): Add local variable Error_Msg. Build specialized error
8991         message showcasing the offending item kind. Redo the diagnostics for
8992         unconstrained types.
8994 2014-02-20  Ed Schonberg  <schonberg@adacore.com>
8996         * exp_util.adb (Is_Iterated_Container): Use high-level primitives
8997         to determine whether a type is a container type, rather than
8998         examining only its type declaration, so that subtypes and derived
8999         types are handled properly.
9001 2014-02-20  Sergey Rybin  <rybin@adacore.com frybin>
9003         * gnat_ugn.texi: gnatmetric: add description of project-specific
9004         options.
9006 2014-02-20  Ed Schonberg  <schonberg@adacore.com>
9008         * sem_attr.adb (Analyze_Attribute, case 'Update): Verify that
9009         all choices in an association for a record type have the same
9010         type, as is done for record aggregates.
9012 2014-02-20  Robert Dewar  <dewar@adacore.com>
9014         * a-cborma.adb, a-cbhama.adb, a-cbdlli.adb, a-cbmutr.adb: Use pragma
9015         Unmodified rather than Warnings (Off). Make comments
9016         uniform in the four affected units.
9018 2014-02-20  Robert Dewar  <dewar@adacore.com>
9020         * sem_ch13.adb (Analyze_Attribute_Definition_Clause, case
9021         Object_Size): For non-scalar types allow any value that is a
9022         multiple of 8.
9023         * gnat_rm.texi: Document Object_Size for composites more clearly.
9025 2014-02-20  Yannick Moy  <moy@adacore.com>
9027         * sem_util.ads, sem_util.adb (Default_Initialization): Remove function.
9029 2014-02-20  Ed Schonberg  <schonberg@adacore.com>
9031         * stand.ads: Raise_Type: new predefined entity, used as the type
9032         of a Raise_Expression prior to resolution.
9033         * cstand.adb: Build entity for Raise_Type.
9034         * sem_ch11.adb (Analyze_Raise_Expression): use Raise_Type as the
9035         initial type of the node.
9036         * sem_type.adb (Covers): Raise_Type is compatible with all
9037         other types.
9038         * sem_res.adb (Resolve): Remove special handling of Any_Type on
9039         Raise_Expression nodes.
9040         (Resolve_Raise_Expression): Signal ambiguity if the type of the
9041         context is still Raise_Type.
9043 2014-02-20  Robert Dewar  <dewar@adacore.com>
9045         * sem_ch12.adb (Validate_Access_Type_Instance): Add message if
9046         mismatching predicates.
9047         * sem_ch6.adb (Check_Conformance): Give better messages on
9048         predicate mismatch.
9049         * sem_eval.adb (Predicates_Match): Move to spec.
9050         * sem_eval.ads (Predicates_Match): Moved here from body.
9052 2014-02-20  Ed Schonberg  <schonberg@adacore.com>
9054         * a-cbmutr.adb: Use default value in Insert_Child.
9056 2014-02-20  Vincent Celier  <celier@adacore.com>
9058         * gnatcmd.adb, make.adb, prj-makr.adb, clean.adb: Call
9059         Stringt.Initialize in all project aware tools.
9061 2014-02-20  Doug Rupp  <rupp@adacore.com>
9063         * gnat_ugn.texi: Document gnatbind -X option.
9064         * vms_data.ads: Minor warnings documentation reformatting.
9066 2014-02-20  Ed Schonberg  <schonberg@adacore.com>
9068         * exp_ch3.adb (Expand_Freeze_Array_Type): Only create invariant
9069         procedure for a base type.
9071 2014-02-20  Robert Dewar  <dewar@adacore.com>
9073         * sem_ch4.adb (Analyze_Case_Expression): Get type from first
9074         expression with type info.
9075         * sem_ch13.adb: Minor reformatting.
9076         * sem_eval.adb (Subtypes_Statically_Match): Make sure we return
9077         False if predicates do not match on the two types.
9079 2014-02-20  Arnaud Charlet  <charlet@adacore.com>
9081         * sem_prag.adb (Analyze_Pragma [pragma Attach_Handler]):
9082         In Relaxed_RM_Semantics mode, allow any static integer value,
9083         for compatibility with other compilers.
9085 2014-02-20  Vincent Celier  <celier@adacore.com>
9087         * errutil.adb (Initialize): Properly initialize entry in table
9088         Warnings when warnings are suppressed.
9090 2014-02-20  Robert Dewar  <dewar@adacore.com>
9092         * s-os_lib.ads: Add warning about non-portability of Rename_File.
9093         * sem_util.ads, sem_util.adb (Is_Junk_Name): New function.
9094         * sem_warn.adb: Use Is_Junk_Name to suppress some warnings.
9095         * gnat_ugn.texi: Document no warnings on junk variable names.
9096         * layout.adb: Minor code reorganization (use Ekind_In).
9097         * stringt.adb: Move initialization of Null_String_Id to Initialize
9098         routine.
9100 2014-02-20  Ed Schonberg  <schonberg@adacore.com>
9102         * sem_ch13.adb: Initialize optional Element_Id.
9104 2014-02-20  Robert Dewar  <dewar@adacore.com>
9106         * s-os_lib.ads (Rename_File): Minor commment addition.
9108 2014-02-20  Thomas Quinot  <quinot@adacore.com>
9110         * einfo.ads: Minor reformatting.
9112 2014-02-20  Hristian Kirtchev  <kirtchev@adacore.com>
9114         * aspects.adb (Exchange_Aspects): New routine.
9115         * aspects.ads (Exchange_Aspects): New routine.
9116         * atree.adb (Rewrite): Do not check whether the save node has
9117         aspects as it never will, instead check the node about to be clobbered.
9118         * einfo.adb (Write_Field25_Name): Abstract_States can appear in
9119         entities of generic packages.
9120         * sem_ch6.adb (Analyze_Expression_Function): Fix the parent
9121         pointer of an aspect specification list after rewriting takes place.
9122         * sem_ch7.adb (Analyze_Package_Body_Helper): Swap the aspect
9123         specifications of the generic template and the copy used for analysis.
9124         * sem_ch12.adb (Analyze_Generic_Package_Declaration): Swap
9125         the aspect specifications of the generic template and the
9126         copy used for analysis.
9127         (Analyze_Package_Instantiation): Propagate the aspect specifications
9128         from the generic template to the instantiation.
9129         (Build_Instance_Compilation_Unit_Nodes): Propagate the aspect
9130         specifications from the generic template to the instantiation.
9131         * sem_ch13.adb (Analyze_Aspect_Specifications): Handle aspects
9132         Abstract_State, Initializes and Initial_Condition when they
9133         apply to a package instantiation.
9135 2014-02-20  Robert Dewar  <dewar@adacore.com>
9137         * stringt.adb: Add call to Initialize in package initialization.
9139 2014-02-20  Robert Dewar  <dewar@adacore.com>
9141         * a-crbtgk.adb, a-cihama.adb, a-coinve.adb, a-ciorse.adb, a-crbtgo.adb,
9142         a-cidlli.adb, a-cimutr.adb, a-cihase.adb, a-cohama.adb, a-coorse.adb,
9143         a-chtgke.adb, a-chtgop.adb, a-comutr.adb, a-ciorma.adb, a-cobove.adb,
9144         a-convec.adb, a-cohase.adb, a-chtgbk.adb, a-chtgbo.adb: Minor
9145         reformatting.
9147 2014-02-20  Bob Duff  <duff@adacore.com>
9149         * s-os_lib.ads: Minor: Remove incorrect comment.
9151 2014-02-20  Robert Dewar  <dewar@adacore.com>
9153         * sem_elab.adb (Check_Elab_Assign): Clearer warning message.
9155 2014-02-20  Ed Schonberg  <schonberg@adacore.com>
9157         * a-cborma.adb (Assign): When creating a node without a specified
9158         element, insert an uninitialized element in the map, because
9159         the instance may provide an element type with a default
9160         initialization, e.g a scalar with a Default_Value aspect.
9161         * a-cbhama.adb (Assign_Key): Remove useless Allocate procedure.
9162         (Insert): In the version without explicit element, provide an
9163         uninitialized element, as above.
9164         * a-cbdlli.adb (Append): In the version without explicit element,
9165         provide an uninitalized element, as above.
9166         (Allocate): Remove unused version.
9168 2014-02-20  Robert Dewar  <dewar@adacore.com>
9170         * sem_elab.adb: Minor code reorganization (use Nkind_In).
9171         * stringt.adb: Remove temporary pragma Warnings (Off).
9172         * stringt.ads: Add pragma Elaborate_Body to ensure initialization
9173         of Null_String_Id.
9175 2014-02-20  Matthew Heaney  <heaney@adacore.com>
9177         * a-chtgbk.adb (Replace): Use correct offset when calculating bucket
9178         index.
9180 2014-02-20  Ed Schonberg  <schonberg@adacore.com>
9182         * sem_ch5.adb (Analyze_Iterator_Specification): Initialize
9183         properly the cursor type for subsequent volatile testing in SPARK
9184         mode, when domain is a formal container with an Iterabe aspect.
9186 2014-02-20  Robert Dewar  <dewar@adacore.com>
9188         * errout.adb (Set_Warnings_Mode_Off): Add Reason argument.
9189         (Set_Specific_Warning_Off): Add Reason argument.
9190         * errout.ads (Set_Warnings_Mode_Off): Add Reason argument.
9191         (Set_Specific_Warning_Off): Add Reason argument.
9192         * erroutc.adb (Warnings_Entry): Add Reason field
9193         (Specific_Warning_Entry): Add Reason field.
9194         (Warnings_Suppressed): return String_Id for Reason.
9195         (Warning_Specifically_Suppressed): return String_Id for Reason.
9196         * erroutc.ads (Warnings_Entry): Add Reason field.
9197         (Specific_Warning_Entry): Add Reason field.
9198         (Set_Specific_Warning_Off): Add Reason argument.
9199         (Set_Warnings_Mode_Off): Add Reason argument.
9200         (Warnings_Suppressed): return String_Id for Reason.
9201         (Warning_Specifically_Suppressed): return String_Id for Reason.
9202         * errutil.adb (Warnings_Suppressed): returns String_Id for Reason
9203         (Warning_Specifically_Suppressed): returns String_Id for Reason
9204         * gnat_rm.texi: Document that Warning parameter is string literal
9205         or a concatenation of string literals.
9206         * par-prag.adb: New handling for Reason argument.
9207         * sem_prag.adb (Analyze_Pragma, case Warning): New handling
9208         for Reason argument.
9209         * sem_util.ads, sem_util.adb (Get_Reason_String): New procedure.
9210         * sem_warn.ads (Warnings_Off_Entry): Add reason field.
9211         * stringt.adb: Set Null_String_Id.
9212         * stringt.ads (Null_String_Id): New constant.
9214 2014-02-20  Robert Dewar  <dewar@adacore.com>
9216         * einfo.ads: Minor comment addition: Etype of package is
9217         Standard_Void_Type.
9218         * checks.adb, exp_aggr.adb, exp_atag.adb, exp_attr.adb, exp_ch13.adb,
9219         exp_ch2.adb, exp_ch3.adb, exp_ch4.adb, exp_ch5.adb, exp_ch6.adb,
9220         exp_ch7.adb, exp_ch9.adb, exp_dbug.adb, exp_disp.adb, exp_imgv.adb,
9221         exp_intr.adb, exp_prag.adb, exp_sel.adb, exp_strm.adb, exp_util.adb,
9222         freeze.adb, rtsfind.adb, sem_aggr.adb, sem_attr.adb, sem_ch10.adb,
9223         sem_ch12.adb, sem_ch13.adb, sem_ch3.adb, sem_ch4.adb, sem_ch5.adb,
9224         sem_ch6.adb, sem_ch8.adb, sem_dim.adb, sem_prag.adb, sem_res.adb,
9225         sem_util.adb, tbuild.adb, tbuild.ads: Remove New_Reference_To.
9226         Replace all calls with calls to New_Occurrence_Of.
9228 2014-02-20  Robert Dewar  <dewar@adacore.com>
9230         * par-util.adb (Ignore, case of right paren): Make this a
9231         serious error.
9233 2014-02-19  Robert Dewar  <dewar@adacore.com>
9235         * sem_ch5.adb, sem_prag.adb, sem_attr.adb: Minor reformatting.
9236         * debug.adb: Remove -gnatd.X switch, no longer used.
9237         * styleg.adb (Check_Then): Remove check of -gnatd.X, check is
9238         now always made.
9240 2014-02-19  Bob Duff  <duff@adacore.com>
9242         * g-socket.ads: Minor: Correct some comments.
9244 2014-02-19  Ed Schonberg  <schonberg@adacore.com>
9246         * sem_ch5.adb: Inhibit iterator rewriting in ASIS mode.
9248 2014-02-19  Arnaud Charlet  <charlet@adacore.com>
9250         * sem_ch13.adb (Analyze_Aspect_Specifications): Do not generate
9251         an error on out of range priorities if Relaxed_RM_Semantics.
9252         * sem_prag.adb (Analyze_Pragma): Ditto.
9254 2014-02-19  Bob Duff  <duff@adacore.com>
9256         * sem_attr.adb (Resolve_Attribute): Detect the case of F'Access
9257         where F denotes the renaming of an enumeration literal, and
9258         issue a specialized error message.
9260 2014-02-19  Matthew Heaney  <heaney@adacore.com>
9262         * a-chtgop.ads (Checked_Index): New operation.
9263         (Next): Changed mode of hash table.
9264         * a-chtgop.adb (Adjust, Delete_Node_Sans_Free): Detect tampering
9265         (Generic_Read, Reserve_Capacity): Ditto.
9266         (Generic_Equal): Detect tampering.
9267         (Next): Changed mode of hash table, detect tampering.
9268         * a-chtgke.ads (Checked_Index, Checked_Equivalent_Keys): New
9269         operation.
9270         (Find): Changed mode of hash table.
9271         * a-chtgke.adb (Checked_Equivalent_Keys): New operation
9272         (Delete_Key_Sans_Free, Generic_Conditional_Insert): Detect
9273         tampering.
9274         (Find): Changed mode of hash table, check for tampering.
9275         (Generic_Replace_Element): Check for tampering.
9276         * a-chtgbk.ads (Checked_Index, Checked_Equivalent_Keys): New operation.
9277         * a-chtgbk.adb (Checked_Index, Checked_Equivalent_Keys): New
9278         operation (Delete_Key_Sans_Free, Generic_Conditional_Insert):
9279         Detect tampering.
9280         (Find, Generic_Replace_Element): Check for tampering.
9281         * a-chtgbo.ads (Checked_Index): New operation.
9282         * a-chtgbo.adb (Checked_Index): New operation
9283         (Delete_Node_Sans_Free, Generic_Equal): Detect tampering.
9284         (Generic_Read, Next): Ditto.
9285         * a-cohase.adb, a-cihase.adb (Is_In): Changed mode of hash
9286         table (Difference, Intersection): Use variable view of
9287         source, detect tampering (Find, Is_Subset, Overlap): Use
9288         variable view of container (Symmetric_Difference, Union):
9289         Detect tampering (Vet): Use Checked_Index to detect tampering
9290         (Constant_Reference, Element, Find): Use variable view of
9291         container.
9292         (Update_Element_Preserving_Key): Detect tampering.
9293         * a-cbhase.adb (Difference, Find, Is_In): Use variable view
9294         of container.
9295         (Is_Subset): Ditto.
9296         (Equivalent_Sets, Overlap): Use Node's Next component.
9297         (Vet): Use Checked_Index to detect tampering.
9298         (Constant_Reference, Element, Find): Use variable view of container.
9299         (Update_Element_Preserving_Key): Detect tampering.
9300         * a-cohama.adb, a-cihama.adb, a-cbhama.adb (Constant_Reference,
9301         Element, Find): Use variable view of container.
9302         (Reference): Rename hash table component.
9303         (Vet): Use Checked_Index to detect tampering.
9305 2014-02-19  Arnaud Charlet  <charlet@adacore.com>
9307         * adabkend.adb (Scan_Compiler_Arguments): Add missing handling
9308         of -nostdinc.
9310 2014-02-19  Thomas Quinot  <quinot@adacore.com>
9312         * tbuild.adb (New_Occurrence_Of, New_Rerefence_To): Guard
9313         against calls without Def_Id.
9315 2014-02-19  Claire Dross  <dross@adacore.com>
9317         * a-cfdlli.ads, a-cfhase.ads, a-cforma.ads, a-cfhama.ads, a-cforse.ads,
9318         a-cofove.ads: Add global annotations to subprograms.
9320 2014-02-19  Hristian Kirtchev  <kirtchev@adacore.com>
9322         * sem_prag.adb (Analyze_Initial_Condition_In_Decl_Part): Remove
9323         constants Errors, Pack_Id and Pack_Init. Remove variable Vars.
9324         Initial_Condition no longer requires the presence of pragma
9325         Initialized. Do not try to diagnose whether all variables mentioned in
9326         pragma Initializes also appear in Initial_Condition.
9327         (Collect_Variables): Removed.
9328         (Match_Variable): Removed.
9329         (Match_Variables): Removed.
9330         (Report_Unused_Variables): Removed.
9332 2014-02-19  Thomas Quinot  <quinot@adacore.com>
9334         * gnat_rm.texi (pragma Stream_Convert): Minor rewording.
9336 2014-02-19  Robert Dewar  <dewar@adacore.com>
9338         * sem_util.adb, sem_util.ads, prj-conf.adb, s-os_lib.adb: Minor
9339         reformatting.
9341 2014-02-19  Vincent Celier  <celier@adacore.com>
9343         * prj-part.adb (Parse_Single_Project): Use the fully resolved
9344         project path, with all symbolic links resolved, to check if the
9345         same project is imported with a different unresolved path.
9346         * prj-tree.ads (Project_Name_And_Node): Component Canonical_Path
9347         changed to Resolved_Path to reflect that all symbolic links
9348         are resolved.
9350 2014-02-19  Ed Schonberg  <schonberg@adacore.com>
9352         * sem_util.ads, sem_util.adb (Get_Cursor_Type): Moved to sem_util
9353         from sem_ch13, for use elsewhere.
9354         * sem_ch13.adb (Get_Cursor_Type): Moved to sem_util.
9355         * sem_ch5.adb (Analyze_Iterator_Specification): Set properly the
9356         cursor type on the loop variable when the iteration is over o
9357         formal container.
9359 2014-02-19  Vincent Celier  <celier@adacore.com>
9361         * prj-conf.adb (Add_Default_GNAT_Naming_Scheme): Add declaration
9362         for an empty Target (Check_Target): Never fail when an empty
9363         target is declared in the configuration project.
9365 2014-02-19  Ed Schonberg  <schonberg@adacore.com>
9367         * sem_prag.adb (Check_Arg_Is_Local_Name): Argument is local if
9368         the pragma comes fron a predicate aspect and the context is a
9369         record declaration within the scope that declares the type.
9371 2014-02-19  Robert Dewar  <dewar@adacore.com>
9373         * gnat_rm.texi: Minor clarifications.
9374         * expander.adb, sem_aggr.adb: Add comments.
9376 2014-02-19  Ed Schonberg  <schonberg@adacore.com>
9378         * sem_prag.adb (Check_Arg_Is_Local_Name): For an aspect that
9379         applies to a subprogram body, the name is the current scope,
9380         rather than being declared in the current scope.
9381         (Analyze_Pragma, case No_Return): Handle properly a No_Return
9382         aspect applied to a subprogram body.
9384 2014-02-19  Ed Schonberg  <schonberg@adacore.com>
9386         * sem_ch13.adb (Resolve_Iterable_Operation): Improve resolution
9387         of overloaded subprograms, and fix bug in handling of primitive
9388         operation Element.
9390 2014-02-19  Pascal Obry  <obry@adacore.com>
9392         * s-os_lib.adb: Minor reformatting.
9394 2014-02-19  Yannick Moy  <moy@adacore.com>
9396         * expander.adb (Expand): Do nothing inside generics.
9397         * sem_aggr.adb (Aggregate_Constraint_Checks): Do nothing inside
9398         generics.
9400 2014-02-19  Yannick Moy  <moy@adacore.com>
9402         * exp_ch2.adb: Remove useless 'with' of unit Uintp.
9404 2014-02-19  Robert Dewar  <dewar@adacore.com>
9406         * sem_ch3.adb, style.adb, sem_prag.adb, sem_ch13.adb: Minor reformatting
9407         * a-sequio.adb: Remove useless pragma Extensions_Allowed (no
9408         longer needed).
9410 2014-02-19  Claire Dross  <dross@adacore.com>
9412         * a-cfdlli.ads, a-cfhase.ads, a-cforma.ads, a-cfhama.ads,
9413         a-cforse.ads, a-cofove.ads: Add Iterable aspect to formal containers.
9415 2014-02-19  Hristian Kirtchev  <kirtchev@adacore.com>
9417         * sem_ch3.adb (Analyze_Declarations): Analyze
9418         a package contract at the end of the private declarations (if
9419         applicable), otherwise analyze it and the end of the visible
9420         declarations.
9422 2014-02-19  Ed Schonberg  <schonberg@adacore.com>
9424         * style.adb (Missing_Overriding): If subprogram is an
9425         instantiation, place warning on the instance node itself,
9426         without mention of the original generic. Do not emit message
9427         if explicit Ada version is older than the introduction of the
9428         overriding indicator.
9430 2014-02-19  Yannick Moy  <moy@adacore.com>
9432         * gnat_rm.texi: Doc clarifications.
9434 2014-02-19  Yannick Moy  <moy@adacore.com>
9436         * exp_util.adb (Remove_Side_Effects): Do not remove side-effects
9437         inside a generic.
9439 2014-02-19  Ed Schonberg  <schonberg@adacore.com>
9441         * sem_ch13.adb (Get_Cursor_Type): Obtain cursor type from
9442         specified First primitive, rather than by name.
9443         (Validate_Iterable_Aspect, Resolve_Iterable_Operation): Use it,
9444         and extend error checking for missing primitives and incorrect
9445         signatures.
9447 2014-02-19  Ed Schonberg  <schonberg@adacore.com>
9449         * sem_ch3.adb (Check_Pragma_Implemented): Detect additional
9450         errors when a Synchronization aspect on an overriding protected
9451         operation does not match the given aspect on the overridden
9452         operation of an ancestor interface.
9454 2014-02-19  Hristian Kirtchev  <kirtchev@adacore.com>
9456         * sem_prag.adb (Check_Loop_Pragma_Grouping): New routine.
9457         (Check_Loop_Pragma_Placement): Update
9458         comment on usage. Remove local variables Orig_Stmt and
9459         Within_Same_Sequence. Check that the current Loop_Invariant or
9460         Loop_Variant pragma is grouped together with other such pragmas.
9461         (Is_Loop_Pragma): New routine.
9462         (Prev_In_Loop): Removed.
9464 2014-02-19  Robert Dewar  <dewar@adacore.com>
9466         * par-ch6.adb (P_Return): For extended return, end column lines
9467         up with RETURN.
9468         * par.adb: Minor documentation clarification.
9470 2014-02-19  Yannick Moy  <moy@adacore.com>
9472         * sem_prag.adb (Check_Loop_Pragma_Placement): Add check
9473         that Loop_Invariant and Loop_Variant appear consecutively.
9474         * gnat_rm.texi Update documentation of Loop_Invariant and
9475         Loop_Variant pragmas.
9477 2014-02-19  Robert Dewar  <dewar@adacore.com>
9479         * debug.adb: Document -gnatd.X.
9480         * par-ch5.adb (P_If_Statement): Always check THEN, even if not
9481         first token
9482         (Check_Then_Column): Ditto.
9483         * styleg.adb (Check_Then): Allow THEN on line after IF.
9484         (Check_Then): Check THEN placement under control of -gnatd.X
9485         * styleg.ads (Check_Then): Now called even if THEN is not first
9486         token on line.
9487         * stylesw.ads (Style_Check_If_Then_Layout): Document new
9488         relaxed rules.
9489         * gnat_ugn.texi: For -gnatyi, THEN can now be on line after IF.
9491 2014-02-19  Robert Dewar  <dewar@adacore.com>
9493         * a-cfhama.adb, a-cfhase.adb, a-cforse.adb, a-cofove.adb, a-ngcefu.adb,
9494         a-teioed.adb, a-wtedit.adb, a-ztedit.adb, exp_ch5.adb, inline.adb,
9495         prj-pp.adb, prj-tree.adb, sem_ch12.adb, sem_ch8.adb,
9496         vms_conv.adb: Fix bad layout of IF statements
9498 2014-02-19  Robert Dewar  <dewar@adacore.com>
9500         * exp_util.adb (Side_Effect_Free): Scalar if expressions can be SEF.
9502 2014-02-19  Robert Dewar  <dewar@adacore.com>
9504         * exp_util.adb: Update comments.
9506 2014-02-19  Doug Rupp  <rupp@adacore.com>
9508         * bindgen.adb (Gen_Adainit) [VMS] New global Float_Format.
9509         * init.c (__gl_float_format): [VMS] New global.
9510         (__gnat_set_features): Call FP_CONTROL to set FPSR for the float
9511         representation in effect.
9513 2014-02-19  Hristian Kirtchev  <kirtchev@adacore.com>
9515         * exp_ch6.adb Add with and use clause for Exp_Prag.
9516         (Expand_Contract_Cases): Relocated to Exp_Prag.
9517         * exp_ch6.ads (Expand_Contract_Cases): Relocated to Exp_Prag.
9518         * exp_prag.adb Add with and use clauses for Checks and Validsw.
9519         (Expand_Contract_Cases): Relocated from Exp_Ch6. Update the
9520         structure of the expanded code to showcase the evaluation of
9521         attribute 'Old prefixes. Add local variable Old_Evals. Expand
9522         any attribute 'Old references found within a consequence. Add
9523         circuitry to evaluate the prefixes of attribute 'Old that
9524         belong to a selected consequence.
9525         (Expand_Old_In_Consequence): New routine.
9526         * exp_prag.ads (Expand_Contract_Cases): Relocated from Exp_Ch6.
9527         * sem_attr.adb (Check_Use_In_Contract_Cases): Warn that a
9528         potentially unevaluated prefix is always evaluated.
9530 2014-02-19  Robert Dewar  <dewar@adacore.com>
9532         * exp_attr.adb (Expand_Min_Max_Attribute): Use Insert_Declaration
9533         (Expand_Min_Max_Attribute): Use Matching_Standard_Type.
9534         * exp_ch4.adb (Expand_N_Expression_With_Actions): Remove special
9535         handling for the case of Modify_Tree_For_C, this approach did
9536         not work.
9537         * exp_util.adb (Matching_Standard_Type): New function
9538         (Side_Effect_Free): New top level functions (from
9539         Remove_Side_Effects).
9540         * exp_util.ads (Side_Effect_Free): New top level functions
9541         (moved from body).
9542         * sinfo.ads: Minor comment updates.
9544 2014-02-19  Ed Schonberg  <schonberg@adacore.com>
9546         * exp_ch6.adb (Expand_Simple_Function_Return): If return
9547         type is unconstrained and uses the secondary stack, mark the
9548         enclosing function accordingly, to ensure that the value is not
9549         prematurely removed.
9551 2014-02-19  Hristian Kirtchev  <kirtchev@adacore.com>
9553         * par.adb Alphabetize the routines in Par.Sync.
9554         (Resync_Past_Malformed_Aspect): New routine.
9555         * par-ch13.adb (Get_Aspect_Specifications): Alphabetize local
9556         variables. Code and comment reformatting. Detect missing
9557         parentheses on aspects [Refined_]Global and [Refined_]Depends
9558         with a non-null definition.
9559         * par-sync.adb: Alphabetize all routines in this separate unit.
9560         (Resync_Past_Malformed_Aspect): New routine.
9562 2014-02-19  Robert Dewar  <dewar@adacore.com>
9564         * sem_eval.ads, sem_eval.adb (Subtypes_Statically_Match): Return False
9565         if Esize values do not match.
9567 2014-02-19  Yannick Moy  <moy@adacore.com>
9569         * sinfo.ads: Minor comment update.
9571 2014-02-19  Hristian Kirtchev  <kirtchev@adacore.com>
9573         * atree.ads: Minor reformatting (change Entity_Info to Einfo).
9575 2014-02-19  Thomas Quinot  <quinot@adacore.com>
9577         * exp_ch7.adb (Find_Node_To_Be_Wrapped): An assignment statement
9578         that has the No_Ctrl_Actions flag is a suitable node to be
9579         wrapped if the assigned expression has no finalization actions.
9580         * sem_eval.adb (Eval_Entity_Name): For a compile time known
9581         boolean value, mark the corresponding condition SCO as constant.
9583 2014-02-19  Robert Dewar  <dewar@adacore.com>
9585         * exp_util.adb: Minor reformatting.
9586         * exp_util.ads (Matching_Standard_Type): New function.
9587         * exp_ch7.adb: Minor reformatting.
9589 2014-02-19  Ed Schonberg  <schonberg@adacore.com>
9591         * sem_ch13.adb (Get_Cursor_Type): Use scope of iterable type
9592         to find declaration for Cursor, to handle properly the case of
9593         a discriminated iterable type.
9595 2014-02-19  Vincent Celier  <celier@adacore.com>
9597         * gnatcmd.adb (GNATCmd): Always replace the object dirs of
9598         imported library projects with the library ALI dirs, when setting
9599         the object paths.
9600         * prj-env.ads (Ada_Objects_Path): Correct comments about
9601         argument Including_Libraries.
9603 2014-02-19  Gary Dismukes  <dismukes@adacore.com>
9605         * gnat_rm.texi: Minor spelling fixes.
9607 2014-02-19  Doug Rupp  <rupp@adacore.com>
9609         * init.c: Remove unneeded code.
9610         * fe.h (Float_Format): New macro
9611         * gcc-interface/trans.c (gigi): On VMS, set vms_float_format.
9613 2014-02-19  Hristian Kirtchev  <kirtchev@adacore.com>
9615         * sem_prag.adb (Check_Refined_Global_Item):
9616         A state or variable acts as a constituent only it is part of an
9617         encapsulating state and the state has visible refinement.
9619 2014-02-19  Ed Schonberg  <schonberg@adacore.com>
9621         * sem_ch6.adb (Analyze_Subprogram_Contract): Do not warn on a
9622         postcondition for a function when the expression does not mention
9623         'Result but the function has in-out parameters.
9625 2014-02-19  Robert Dewar  <dewar@adacore.com>
9627         * gnat_rm.texi: Add documentation on Value_Size forcing biased
9628         representation.
9630 2014-02-19  Hristian Kirtchev  <kirtchev@adacore.com>
9632         * lib-xref.ads Remove the small table of letter and symbol usage as we
9633         already have one.
9635 2014-02-19  Hristian Kirtchev  <kirtchev@adacore.com>
9637         * sem_ch6.adb (Analyze_Subprogram_Body_Helper): Emit specific error
9638         messages depending on the offending misplaced aspect specifications.
9639         (Diagnose_Misplaced_Aspect_Specifications): New routine.
9641 2014-02-19  Ed Schonberg  <schonberg@adacore.com>
9643         * sem_ch13.adb (Get_Cursor): Utility to retrieve cursor type
9644         for iterable aspect primitives.
9645         (Resolve_Iterable_Operation): Use expected signature of iterable
9646         aspect to resolve primitive when overloading is present.
9647         (Validate_Iterable_Aspect, Analyze_Aspects_At_Freeze_Point): use it.
9648         (Check_Signature): Removed.
9650 2014-02-19  Yannick Moy  <moy@adacore.com>
9652         * sem_ch10.adb (Analyze_Proper_Body): Issue error on missing
9653         subunit in GNATprove_Mode.
9654         * sinfo.ads (GNATprove_Mode): Document error issued in GNATprove_Mode.
9656 2014-02-19  Hristian Kirtchev  <kirtchev@adacore.com>
9658         * lib-xref.ads Alphabetize the contents of table
9659         Xref_Entity_Letters. Add an entry in table Xref_Entity_Letters
9660         for E_Abstract_State. List all letters and symbols in use.
9661         * sem_prag.adb (Analyze_Abstract_State): Update all calls
9662         to Create_Abstract_State to reflect the new signature.
9663         (Create_Abstract_State): Change subprogram profile and update
9664         the comment on usage. Use the proper location of the state
9665         declaration when creating a new abstract state entity. Do not
9666         generate an external name, but simply reuse the name coming from
9667         the state declaration.
9669 2014-02-19  Robert Dewar  <dewar@adacore.com>
9671         * exp_ch4.adb (Expand_N_Expression_With_Actions): Make sure
9672         declarations get properly inserted in Modify_Tree_For_C mode.
9673         * sinfo.ads: Minor comment addition.
9675 2014-02-19  Robert Dewar  <dewar@adacore.com>
9677         * par-ch9.adb, exp_ch5.adb, sem_ch5.adb, exp_attr.adb, sem_util.adb,
9678         sem_util.ads, sem_ch13.adb, sem_ch13.ads: Minor reformatting.
9680 2014-02-19  Ed Schonberg  <schonberg@adacore.com>
9682         * style.adb (Missing_Overriding): Warning does not apply in
9683         language versions prior to Ada 2005.
9684         * snames.ads-tmpl: Add Name_Iterable and Attribute_Iterable.
9685         * sem_attr.adb: Add Attribute_Iterable where needed.
9686         * exp_attr.adb: ditto.
9687         * exp_ch5.adb (Expand_Formal_Container_Loop): New procedure to
9688         handle loops and quantified expressions over types that have an
9689         iterable aspect.  Called from Expand_Iterator_Loop.
9690         * sem_ch5.adb (Analyze_Iterator_Specification): Recognize types
9691         with Iterable aspect.
9692         * sem_ch13.adb (Validate_Iterable_Aspect): Verify that the
9693         subprograms specified in the Iterable aspect have the proper
9694         signature involving container and cursor.
9695         (Check_Aspect_At_Freeze_Point): Analyze value of iterable aspect.
9696         * sem_ch13.ads (Validate_Iterable_Aspect): New subprogram.
9697         * sem_util.ads, sem_util.adb (Get_Iterable_Type_Primitive):
9698         New procedure to retrieve one of the primitives First, Last,
9699         or Has_Element, from the value of the iterable aspect of a
9700         formal container.
9701         (Is_Container_Element): Predicate to recognize expressions
9702         that denote an element of one of the predefined containers,
9703         for possible optimization.  This subprogram is not currently
9704         used, pending ARG discussions on the legality of the proposed
9705         optimization. Worth preserving for eventual use.
9706         (Is_Iterator): Recognize formal container types.
9707         * aspects.ads, aspects.adb: Add Aspect_Iterable where needed.
9709 2014-02-19  Robert Dewar  <dewar@adacore.com>
9711         * exp_attr.adb (Expand_Min_Max_Attribute): New procedure
9712         (Expand_N_Attribute_Reference): Use this procedure for Min and Max.
9713         * exp_ch4.adb (Expand_N_Expression_With_Actions): Remove object
9714         declarations from list of actions.
9715         * output.ads, output.adb (Delete_Last_Char): New procedure.
9716         * sinfo.ads: Document handling of Mod and expression with actions
9717         in Modify_Tree_For_C mode.
9719 2014-02-19  Ed Schonberg  <schonberg@adacore.com>
9721         * par-ch9.adb (P_Task): Add a null statement to produce a
9722         well-formed task body when due to a previous syntax error the
9723         statement list is empty.
9725 2014-02-19  Hristian Kirtchev  <kirtchev@adacore.com>
9727         * sem_prag.adb (Check_Dependency_Clause): Account
9728         for the case where a state with a non-null refinement matches a
9729         null output list. Comment reformatting.
9730         (Inputs_Match): Copy a solitary input to avoid an assertion failure
9731         when trying to match the same input in multiple clauses.
9733 2014-02-19  Gary Dismukes  <dismukes@adacore.com>
9735         * sem_attr.adb: Minor typo fix.
9737 2014-02-18  Robert Dewar  <dewar@adacore.com>
9739         * cstand.adb (Build_Signed_Integer_Type): Minor change of formal
9740         from Int to Nat (Build_Unsigned_Integer_Type): New procedure
9741         (Create_Standard): Create new unsigned types.
9742         * exp_ch4.adb (Expand_N_Op_Mod): Expand mod in Modify_Tree_For_C
9743         mode (Expand_N_Reference): Removed, problematic and not needed
9744         for now.
9745         * exp_ch4.ads (Expand_N_Reference): Removed, problematic and
9746         not needed for now.
9747         * exp_util.ads, exp_util.adb (Power_Of_Two): New function.
9748         * expander.adb: Remove call to Expand_N_Reference (problematic,
9749         and not needed now).
9750         * sem_aux.ads, sem_aux.adb (Corresponding_Unsigned_Type): New function.
9751         * stand.adb: Read and write unsigned type entities.
9752         * stand.ads: Add new unsigned types.
9754 2014-02-18  Hristian Kirtchev  <kirtchev@adacore.com>
9756         * sem_ch4.adb (Analyze_Call): Do not mark a function call
9757         as being inside an assertion expression as the flag is now removed.
9758         (Check_Ghost_Subprogram_Call): Do not query the
9759         In_Assertion_Expression flag as it is now removed, instead use
9760         a predicate function.
9761         * sem_elab.adb (Check_Internal_Call_Continue): Do not query the
9762         In_Assertion_Expression flag as it is now removed, instead use
9763         a predicate function.
9764         * sem_prag.ads: Add new table Assertion_Expression_Pragma.
9765         * sem_util.adb Add with and use clause for Sem_Prag.
9766         (In_Assertion_Expression_Pragma): New routine.
9767         * sem_util.ads (In_Assertion_Expression_Pragma): New routine.
9768         * sinfo.adb (In_Assertion_Expression): Removed.
9769         (Set_In_Assertion_Expression): Removed.
9770         * sinfo.ads Remove flag In_Assertion_Expression along with its
9771         use in nodes.
9772         (In_Assertion_Expression): Removed along with
9773         pragma Inline.  (Set_In_Assertion_Expression): Removed along
9774         with pragma Inline.
9776 2014-02-18  Sergey Rybin  <rybin@adacore.com frybin>
9778         * gnat_ugn.texi: gnatpp section: add note that '-j' cannot be
9779         used together with '-r', '-rf' or '-rnb' options.
9781 2014-02-18  Hristian Kirtchev  <kirtchev@adacore.com>
9783         * sem_attr.adb (Analyze_Attribute): Comment
9784         and code reformatting. Use separate routines to check the
9785         legality of attribute 'Old in certain pragmas. Verify
9786         the use of 'Old, 'Result and locally declared entities
9787         within the prefix of 'Old.
9788         (Check_References_In_Prefix): New routine.
9789         (Check_Use_In_Contract_Cases): New routine.
9790         (Check_Use_In_Test_Case): New routine.
9792 2014-02-18  Vincent Celier  <celier@adacore.com>
9794         * sem_aux.adb (Is_By_Reference_Type): For each components of
9795         a record type, check also if the component is volatile as it
9796         may have an aspect that makes it volatile. If it is, then the
9797         record type is a by reference type.
9799 2014-02-18  Robert Dewar  <dewar@adacore.com>
9801         * exp_attr.adb: Minor reformatting.
9802         * exp_ch4.ads, exp_ch4.adb (Expand_N_Reference): New procedure.
9803         * exp_util.adb (Remove_Side_Effects): Add conditional expressions
9804         as another case where we don't generate N_Reference nodes for
9805         primitive types.
9806         * expander.adb (Expand): Add call to Expand_N_Reference.
9808 2014-02-06  Hristian Kirtchev  <kirtchev@adacore.com>
9810         * sem_prag.adb (Analyze_Refined_Pragma): Remove
9811         local variable Pack_Spec. Refinement pragmas may now apply to
9812         bodies of both visible and private subprograms.
9814 2014-02-06  Robert Dewar  <dewar@adacore.com>
9816         * exp_attr.adb (Expand_Loop_Entry_Attribute):
9817         Minor change (Attr => N) (Expand_Pred_Succ): New name
9818         Expand_Pred_Succ_Attribute (Expand_N_Attribute_Reference, case
9819         Max): Expand into if expression if Modify_Tree_For_C mode.
9820         (Expand_N_Attribute_Reference, case Min): ditto
9821         * sinfo.ads: Modify_Tree_For_C takes care of expanding Min and
9822         Max attributes.
9824 2014-02-06  Ed Schonberg  <schonberg@adacore.com>
9826         * sem_ch3.adb (Analyze_Object_Declaration): Do not generate
9827         predicate check if this is an internal declaration with
9828         No_Initialization set, as for an expanded aggregate component.
9830 2014-02-06  Doug Rupp  <rupp@adacore.com>
9832         * init.c (__gnat_default_resignal_p) [VMS]: Test for and resignal
9833         conditions with severity of "SUCCESS" or "INFORMATIONAL".
9835 2014-02-06  Yannick Moy  <moy@adacore.com>
9837         * sem_prag.adb (Analyze_Pragma): Analyze pragma
9838         Debug rewritten node before rewriting it as a null statement in
9839         GNATprove mode.
9841 2014-02-06  Robert Dewar  <dewar@adacore.com>
9843         * sem_attr.adb (Min_Max): New procedure.
9844         (Max_Alignment_For_Allocation_Max_Size_In_Storage_Elements): New
9845         procedure.
9847 2014-02-06  Sergey Rybin  <rybin@adacore.com frybin>
9849         * gnat_ugn.texi, vms_data.ads: Add documentation of '-t' option for
9850         gnatmetric/gnatpp.
9852 2014-02-06  Hristian Kirtchev  <kirtchev@adacore.com>
9854         * sem_prag.adb (Analyze_Abstract_State): Update
9855         all calls to Create_Abstract_State to pass the proper state
9856         "declaration".
9857         (Create_Abstract_State): Add new formal parameter
9858         State_Decl along with comment on usage. Establish a link between
9859         the abstract state entity and the state declaration.
9861 2014-02-06  Robert Dewar  <dewar@adacore.com>
9863         * sem_attr.adb (Analyze_Attribute, case Max): Check for improper
9864         comparison of unordered enumeration type.
9865         (Analyze_Attribute, case Max): Check for improper comparison of
9866         unordered enumeration type.
9867         * sem_res.adb (Bad_Unordered_Enumeration_Reference): Moved to
9868         sem_util.adb.
9869         * sem_util.ads, sem_util.adb (Bad_Unordered_Enumeration_Reference):
9870         Moved here from Sem_Res.
9872 2014-02-06  Robert Dewar  <dewar@adacore.com>
9874         * sem_ch3.adb, sem_prag.adb, sem_res.adb, lib-xref.adb: Minor
9875         reformatting.
9877 2014-02-06  Hristian Kirtchev  <kirtchev@adacore.com>
9879         * sem_ch6.adb (Process_Formals): Error message reformatting.
9881 2014-02-06  Hristian Kirtchev  <kirtchev@adacore.com>
9883         * sem_ch3.adb (Handle_Late_Controlled_Primitive): Add local
9884         variable Spec. Do not inherit the null indicator from the
9885         subprogram body when generating the spec.
9887 2014-02-06  Robert Dewar  <dewar@adacore.com>
9889         * casing.adb (Determine_Casing): Consider SPARK_Mode to be
9890         mixed case.
9892 2014-02-06  Ed Schonberg  <schonberg@adacore.com>
9894         * exp_ch6.adb (Is_Build_In_Place_Function): Predicate is false
9895         when the function has a foreign convention, but not if only the
9896         limited return type has such a convention.
9898 2014-02-06  Hristian Kirtchev  <kirtchev@adacore.com>
9900         * sem_ch3.adb (Handle_Late_Controlled_Primitive): Remove local
9901         variable Spec. Comment reformatting. Use Copy_Separate_Tree
9902         rather than New_Copy_Tree when building the corresponding
9903         subprogram declaration.
9905 2014-02-06  Hristian Kirtchev  <kirtchev@adacore.com>
9907         * sem_prag.adb (Analyze_Global_Item): Remove
9908         the mode-related checks on abstract states with enabled external
9909         properties.
9910         (Property_Error): Removed.
9912 2014-02-06  Javier Miranda  <miranda@adacore.com>
9914         * lib-xref.adb (Generate_Reference): When
9915         generating the reference to the first private entity take care
9916         of handling swapped entities.
9918 2014-02-06  Sergey Rybin  <rybin@adacore.com frybin>
9920         * gnat_ugn.texi, vms_data.ads: Add documentation of -j option for
9921         gnatmetric.
9923 2014-02-06  Robert Dewar  <dewar@adacore.com>
9925         * exp_ch4.adb (Expand_N_Shift_Left): Handle shift counts greater
9926         than the word size when operating in Modify_Tree_For_C mode.
9927         * sinfo.ads: Add documentation section on Modify_Tree_For_C mode.
9929 2014-02-06  Robert Dewar  <dewar@adacore.com>
9931         * erroutc.adb (Warning_Specifically_Suppressed.Matches):
9932         compare is case insensitive.
9933         * gnat_rm.texi: Document that string compare for Warnings Off
9934         is now case insensitive.
9936 2014-02-06  Eric Botcazou  <ebotcazou@adacore.com>
9938         * gnat_rm.texi: Small wording tweak.
9940 2014-02-06  Pascal Obry  <obry@adacore.com>
9942         * prj-attr.adb, projects.texi, snames.ads-tmpl: Add Included_Patterns
9943         and Included_Artifact_Patterns attribute definitions.
9945 2014-02-06  Yannick Moy  <moy@adacore.com>
9947         * sem_ch6.adb (Analyze_Subprogram_Body_Helper): Set
9948         SPARK_Mode pragma component for all subprograms, including stubs.
9950 2014-02-06  Hristian Kirtchev  <kirtchev@adacore.com>
9952         * sem_ch10.adb (Analyze_Package_Body_Stub): Maintain
9953         the configuration options of the enclosing context in a
9954         stack-like fasion.
9955         (Analyze_Subprogram_Body_Stub): Maintain the
9956         configuration options of the enclosing context in a stack-like
9957         fashion.
9959 2014-02-06  Robert Dewar  <dewar@adacore.com>
9961         * debug.adb: -gnatd.u sets Modify_Tree_For C
9962         * exp_ch4.adb (Expand_N_Op_Rotate_Left): Expand out
9963         if Modify_Tree_For_C (Expand_N_Op_Rotate_Right): ditto.
9964         (Expand_N_Op_Arithmetic_Right_Shift): ditto.
9965         * exp_intr.adb (Expand_Shift): Call expander so we do
9966         Modify_Tree_For_C expansions.
9967         * gnat1drv.adb (Adjust_Global_Switches): Set Modify_Tree_For_C
9968         if -gnatd.u set.
9970 2014-02-06  Fedor Rybin  <frybin@adacore.com>
9972         * prj-proc.ads (Tree_Loaded_Callback): new type Callback used
9973         after the phase 1 of the processing of each aggregated project
9974         to get access to project trees of aggregated projects.
9975         (Process_Project_Tree_Phase_1): new parameter On_New_Tree_Loaded
9976         If specified, On_New_Tree_Loaded is called after each aggregated
9977         project has been processed succesfully.
9978         (Process): new parameter On_New_Tree_Loaded.
9979         * prj-proc.adb (Process_Aggregated_Projects): On_New_Tree_Loaded
9980         callback added after processing of each aggregated project.
9981         (Recursive_Process): new parameter On_New_Tree_Loaded.
9982         (Process): new parameter On_New_Tree_Loaded.
9983         (Process_Project_Tree_Phase_1): new parameter On_New_Tree_Loaded.
9984         * prj-conf.ads (Parse_Project_And_Apply_Config): new parameter
9985         On_New_Tree_Loaded.
9986         * prj-conf.adb (Parse_Project_And_Apply_Config): new parameter
9987         On_New_Tree_Loaded.
9989 2014-02-06  Bob Duff  <duff@adacore.com>
9991         * gnat_ugn.texi: Implement --insert-blank-lines and
9992         --preserve-blank-lines switches.
9994 2014-02-06  Sergey Rybin  <rybin@adacore.com frybin>
9996         * gnat_ugn.texi, vms_data.ads: Add documentation of -j option for
9997         gnatelim.
9999 2014-02-06  Eric Botcazou  <ebotcazou@adacore.com>
10001         * gnat_rm.texi (Pragma Optimize_Alignment): Document the effect
10002         of the pragma on individual objects.
10004 2014-02-06  Hristian Kirtchev  <kirtchev@adacore.com>
10006         * einfo.adb Node29 is now used as BIP_Initialization_Call.
10007         (BIP_Initialization_Call): New routine.
10008         (Set_BIP_Initialization_Call): New routine.
10009         (Write_Field29_Name): Add an entry for constants and variables.
10010         * einfo.ads Add new attribute BIP_Initialization_Call and update
10011         its usage in nodes.
10012         (BIP_Initialization_Call): New routine along with pragma Inline.
10013         (Set_BIP_Initialization_Call): New routine along with pragma Inline.
10014         * exp_ch6.adb (Make_Build_In_Place_Call_In_Object_Declaration):
10015         Add local declaration Res_Decl. Capture the build-in-place
10016         initialization call when the related object declaration has
10017         created a transient block.
10018         * exp_ch7.adb (Process_Transient_Objects): Add local variable
10019         Fin_Insrt. Recognize a scenario where an object declaration acts
10020         as a transient context and is initialized by a build-in-place
10021         function call.
10023 2014-02-06  Pascal Obry  <obry@adacore.com>
10025         * prj-util.adb (For_Interface_Sources): Fix handling of required
10026         bodies for aggregate libs.
10028 2014-02-06  Robert Dewar  <dewar@adacore.com>
10030         * nlists.ads: Minor comment clarifications.
10032 2014-02-06  Robert Dewar  <dewar@adacore.com>
10034         * gnat1drv.adb (Adjust_Global_Switches): Set Modify_Tree_For_C
10035         if gnatd.V set.
10036         * opt.ads (Modify_Tree_For_C): New flag.
10037         * output.ads, output.adb (Last_Char): New function.
10039 2014-02-06  Pascal Obry  <obry@adacore.com>
10041         * projects.texi, prj-env.adb (Initialize_Default_Project_Path): Add
10042         share/gpr for cross-builds.
10044 2014-02-06  Robert Dewar  <dewar@adacore.com>
10046         * exp_util.ads, checks.adb, sem_prag.adb, prj-util.adb, sem_ch13.adb:
10047         Minor reformatting and code clean ups.
10049 2014-02-06  Pascal Obry  <obry@adacore.com>
10051         * prj-util.adb (For_Interface_Sources): Skip non compilable languages.
10052         * prj.ads: Minor typo fix in comment.
10054 2014-02-06  Hristian Kirtchev  <kirtchev@adacore.com>
10056         * sem_prag.adb (Analyze_Depends_In_Decl_Part): Add
10057         local variable Expr. Flag clauses with extra parenthesis as this
10058         is not allowed by the syntax of the pragma. Code reformatting.
10060 2014-02-06  Hristian Kirtchev  <kirtchev@adacore.com>
10062         * exp_attr.adb (Expand_N_Attribute_Reference): Alphabetize
10063         variables. Rename variabme Tnn to Temp. Do not create a temporary
10064         if assertions are disabled. Find enclosing routine _Postconditions
10065         and insert the temporary that captures the value of the prefix
10066         before the routine.
10067         * exp_ch6.adb (Build_Postconditions_Procedure):
10068         Insert the generated _Postconditions routine
10069         before the first source declaration of the related
10070         subprogram.
10071         (Insert_After_Last_Declaration): Removed.
10072         (Insert_Before_First_Source_Declaration): New routine.
10074 2014-02-06  Ed Schonberg  <schonberg@adacore.com>
10076         * exp_util.adb, exp_util.ads (Within_Internal_Subprogram):
10077         Utility to determine whether current expansion is for the body
10078         of a predefined primitive operation.
10079         (Make_Predicate_Check): Use Within_Internal_Subpgram
10080         * checks.adb (Apply_Predicate_Check): Use
10081         Within_Internal_Subprogram
10082         * sem_ch13.adb (Freeze_Entity_Checks): Ditto.
10084 2014-02-06  Pascal Obry  <obry@adacore.com>
10086         * prj.ads, prj-util.adb: Minor reformatting.
10088 2014-02-06  Ed Schonberg  <schonberg@adacore.com>
10090         * exp_ch6.adb (Expand_Subprogram_Contract, Append_Enabled_Item):
10091         Take into account the Split_PPC flag to ensure that conjuncts
10092         in a composite postcondition aspect are tested in source order.
10094 2014-02-06  Hristian Kirtchev  <kirtchev@adacore.com>
10096         * sem_ch6.adb (Analyze_Generic_Subprogram_Body): Flag illegal
10097         use of SPARK_Mode.
10098         * sem_ch12.adb (Analyze_Generic_Subprogram_Declaration): Flag
10099         illegal use of SPARK_Mode.
10100         (Instantiate_Subprogram_Body): Flag illegal use of SPARK_Mode.
10101         * sem_prag.adb (Analyze_Pragma): Code reformatting.
10102         * sem_util.adb Add with and use clause for Aspects.
10103         (Check_SPARK_Mode_In_Generic): New routine.
10104         * sem_util.ads (Check_SPARK_Mode_In_Generic): New routine.
10106 2014-02-06  Thomas Quinot  <quinot@adacore.com>
10108         * a-calend.adb (Formatting_Operations.Split): Ensure that
10109         Time_Error is raised for invalid time values.
10111 2014-02-06  Arnaud Charlet  <charlet@adacore.com>
10113         * sem_prag.adb (Analyze_Pragma): Rewrite as a null statement
10114         in GNATprove_Mode.
10116 2014-02-06  Robert Dewar  <dewar@adacore.com>
10118         * einfo.ads, einfo.adb (Is_Discriminant_Check_Function): New flag.
10119         * exp_ch3.adb (Build_Dcheck_Function): Set
10120         Is_Discriminant_Check_Function.
10122 2014-02-06  Hristian Kirtchev  <kirtchev@adacore.com>
10124         * exp_ch7.adb (Is_Subprogram_Call): Inspect
10125         the original tree in certain cases where a construct has been
10126         factored out and replaced by a reference to a temporary.
10128 2014-02-06  Ed Schonberg  <schonberg@adacore.com>
10130         * sem_ch3.adb (Process_Full_View): Fix typo in the order of
10131         parameters when propagating predicate function to full view.
10132         (Find_Type_Of_Object): Freeze base type of object type to catch
10133         premature use of discriminated private type without a full view.
10135 2014-02-06  Robert Dewar  <dewar@adacore.com>
10137         * sprint.adb: Minor reformatting.
10139 2014-02-06  Hristian Kirtchev  <kirtchev@adacore.com>
10141         * exp_ch4.adb (Process_Transient_Object): Add local variable
10142         Temp_Ins. When the transient object is initialized by an
10143         aggregate, the hook must capture the object after the last
10144         component assignment takes place.
10145         * exp_ch7.adb (Detect_Subprogram_Call): Expose the subprogram to
10146         routine Is_Subprogram_Call.
10147         (Is_Subprogram_Call): Inspect an
10148         aggregate that has been heavily expanded for subprogram calls.
10149         (Process_Transient_Objects): Add local variables Expr, Ptr_Id
10150         and Temp_Ins.  Remove the nested declare block and adjust the
10151         indentation. When the transient object is initialized by an
10152         aggregate, the hook must capture the object after the last
10153         component assignment takes place.
10155 2014-02-06  Hristian Kirtchev  <kirtchev@adacore.com>
10157         * sem_prag.adb (Analyze_Global_Item): Detect illegal uses of
10158         external states with enabled properties that do not match the
10159         global mode.
10160         (Property_Error): New routine.
10161         * sem_res.adb (Property_Error): New routine.
10162         (Resolve_Actuals): Detect illegal uses of external variables with
10163         enabled properties in procedure calls that do not match the mode of
10164         the corresponding formal parameter.
10166 2014-02-06  Hristian Kirtchev  <kirtchev@adacore.com>
10168         * sem_util.adb (Has_Enabled_Property): Rename
10169         formal parameter Prop_Nam to Property. Update the comment on usage
10170         and all occurrences in the body. Add local variable Prop_Nam. When
10171         inspecting a property with an expression, the property name
10172         appears as the first choice of the component association.
10174 2014-02-04  Robert Dewar  <dewar@adacore.com>
10176         * exp_ch5.adb, einfo.ads, freeze.adb, sem_ch8.adb: Minor reformatting.
10178 2014-02-04  Gary Dismukes  <dismukes@adacore.com>
10180         * sem_aggr.adb: Change "runtime" to "run time" in warning message,
10181         for consistency with other messages.
10183 2014-02-04  Ed Schonberg  <schonberg@adacore.com>
10185         * exp_ch5.adb  (Expand_Iterator_Loop):  For a container element
10186         iterator, indicate that the element is a constant if the container
10187         type does not have a variable indexing aspect.
10188         * sem_ch8.adb (Analyze_Object_Renaming): If the entity is already
10189         marked as constant, do not reset its Ekind, to ensure that
10190         container elements in an element loop are not modified if the
10191         container (e.g. a hashed set) only has a constant indexing aspect.
10193 2014-02-04  Arnaud Charlet  <charlet@adacore.com>
10195         * g-souinf.ads: Subprograms in this unit are actually not pure.
10196         * freeze.adb (Freeze_Subprogram): Do not reset Is_Pure for Intrinsics.
10197         * einfo.ads (Is_Pure): Update doc to match implementation.
10199 2014-02-04  Gary Dismukes  <dismukes@adacore.com>
10201         * exp_ch13.adb: Minor spelling fix.
10203 2014-02-04  Robert Dewar  <dewar@adacore.com>
10205         * opt.ads: Minor comment update.
10207 2014-02-04  Robert Dewar  <dewar@adacore.com>
10209         * exp_ch4.adb (Expand_N_Expression_With_Actions): Use Rewrite
10210         instead of Replace.
10212 2014-02-04  Ed Schonberg  <schonberg@adacore.com>
10214         * sem_aggr.adb (Resolve_Array_Aggregate): Suppress warnings
10215         on null expressions if component type is non-null, when the
10216         corresponding association covers an empty range of index values.
10218 2014-02-04  Robert Dewar  <dewar@adacore.com>
10220         * sinfo.ads: Further comments on N_Expression_With_Actions node.
10222 2014-02-04  Hristian Kirtchev  <kirtchev@adacore.com>
10224         * sem_prag.adb (Analyze_Refined_Depends_In_Decl_Part): Remove global
10225         variables Out_Items and Ref_Global. Remove local constant
10226         Body_Id along with dummy variables D1, D2, D3, D4, D5, D6, D7
10227         and D8. Remove the useless collection of global items as this
10228         was a leftover from an earlier version of the routine. Move
10229         several routines out to avoid deep nesting and indentation.
10230         (Inputs_Match): Add formal parameter Dep_Clause. Rename formal
10231         parameter Do_Checks to Post_Errors. Update the comment on usage.
10232         (Is_Matching_Input): Renamed to Input_Match. Add formal parameters
10233         Ref_Inputs and Do_Checks. Rename formal parameter Do_Checks
10234         to Post_Errors. Update the comment on usage. Account for the
10235         case where a self referential state may have a null input_list.
10236         (Is_Self_Referential): New routine.
10238 2014-02-04  Ed Schonberg  <schonberg@adacore.com>
10240         * sem_ch13.adb (Analyze_Attribute_Definition_Clause): If the
10241         entity renames an expression, as in the case of an object of
10242         an unconstrained type initialized by a function call, defer the
10243         rewriting of the expression to the expander.
10244         * exp_ch13.adb (Expand_N_Attribute_Definition_Clause, case
10245         'Alignment): If the entity renames an expression, introduce
10246         temporary to capture value, and rewrite original declaration to
10247         use temporary.
10249 2014-02-04  Gary Dismukes  <dismukes@adacore.com>
10251         * g-comlin.adb: Minor typo fix.
10253 2014-02-04  Ed Schonberg  <schonberg@adacore.com>
10255         * freeze.adb (Freeze_All): Types derived from a formal
10256         access_to_classwide type do not have a finalization master.
10258 2014-02-04  Robert Dewar  <dewar@adacore.com>
10260         * sprint.adb: Minor reformatting.
10262 2014-02-04  Robert Dewar  <dewar@adacore.com>
10264         * exp_ch4.adb (Expand_N_Expression_With_Actions): Eliminate
10265         cases where Actions is a null list.
10266         * sinfo.ads (N_Expression_With_Actions): Actions can be
10267         temporarily empty during semantic analysis, but must be non-empty
10268         in the final expanded tree.
10270 2014-01-31  Robert Dewar  <dewar@adacore.com>
10272         * exp_ch9.adb: Minor reformatting.
10274 2014-01-31  Emmanuel Briot  <briot@adacore.com>
10276         * g-comlin.adb (Set_Command_Line): Take the switches
10277         configuration from the Command_Line_Config.
10279 2014-01-31  Hristian Kirtchev  <kirtchev@adacore.com>
10281         * sem_prag.adb (Analyze_Refinement_Clause): Guard against a malformed
10282         refinement clause.
10284 2014-01-31  Vincent Celier  <celier@adacore.com>
10286         * projects.texi: Add more documentation about others used as an
10287         index in indexed attributes.
10289 2014-01-31  Robert Dewar  <dewar@adacore.com>
10291         * gnat_ugn.texi: Minor update.
10292         * gnat_rm.texi: Add example to Restriction_Warnings documentation.
10293         * exp_util.adb: Minor reformatting.
10295 2014-01-31  Ed Schonberg  <schonberg@adacore.com>
10297         * exp_ch9.adb (Expand_Entry_Barrier): Warn if the barrier
10298         depends on data that is not private to the protected object,
10299         and potentially modifiable in unsynchronized fashion.
10301 2014-01-31  Yannick Moy  <moy@adacore.com>
10303         * erroutc.adb (Validate_Specific_Warnings): Remove special case for
10304         GNATprove_Mode.
10306 2014-01-31  Robert Dewar  <dewar@adacore.com>
10308         * prj-attr.ads (First_Attribute_Of): Returns Empty_Attribute
10309         for Unknown_Package.
10310         * sem_ch6.adb, sem_attr.adb: Minor comment addition.
10312 2014-01-31  Hristian Kirtchev  <kirtchev@adacore.com>
10314         * exp_util.adb (Build_Allocate_Deallocate_Proc): Rewrite
10315         the logic that generates a runtime check to determine the
10316         controlled status of the object about to be allocated or
10317         deallocated. Class-wide types now always use a runtime check
10318         even if they appear as generic actuals.
10319         (Find_Object): Detect
10320         a special case that involves interface class-wide types because
10321         the object appears as a complex expression.
10323 2014-01-31  Ed Schonberg  <schonberg@adacore.com>
10325         * sem_ch6.adb (Process_Formals): In Ada2012 mode, place
10326         subprogram with an incomplete untagged formals on the list of
10327         private dependents, to verify that the type is properly completed
10328         in the private part.
10329         * sem_attr.adb: Code clean up.
10331 2014-01-31  Robert Dewar  <dewar@adacore.com>
10333         * exp_ch6.adb: Minor reformatting.
10335 2014-01-31  Vincent Celier  <celier@adacore.com>
10337         * prj-attr.adb (First_Attribute_Of): Return Unknown_Attribute
10338         when Pkg is unknown.
10340 2014-01-31  Hristian Kirtchev  <kirtchev@adacore.com>
10342         * sem_res.adb (Resolve_Entity_Name): Comment
10343         reformatting. Allow volatile objects in various generated checks.
10345 2014-01-31  Ed Schonberg  <schonberg@adacore.com>
10347         * sem_attr.adb (Analyze_Attribute, case 'Update): For a record
10348         component association, set the etype of the identifier, for
10349         SPARK use.
10351 2014-01-31  Ed Schonberg  <schonberg@adacore.com>
10353         * exp_ch6.adb (Has_Visibility_Of_Subprogram): If type is not
10354         declared in a package, not checks can apply to the subprogram.
10356 2014-01-31  Robert Dewar  <dewar@adacore.com>
10358         * erroutc.adb (Validate_Specific_Warnings): Warnings are
10359         controlled -gnatw.W.
10360         * gnat_ugn.texi: Document new warnings controlled by -gnatw.w.
10361         * opt.ads (Warn_On_Warnings_Off): Now controls more cases.
10363 2014-01-31  Arnaud Charlet  <charlet@adacore.com>
10365         * exp_disp.adb: Update comments.
10367 2014-01-31  Yannick Moy  <moy@adacore.com>
10369         * sem_ch12.adb (Analyze_Generic_Subprogram_Declaration,
10370         Save_Global_References): Guard access to expression in aspect.
10372 2014-01-31  Yannick Moy  <moy@adacore.com>
10374         * sem_prag.adb (Analyze_Pragma/Pragma_SPARK_Mode):
10375         Issue an error when the pragma is applied to a generic unit,
10376         a generic declaration, or inside a generic.
10378 2014-01-31  Yannick Moy  <moy@adacore.com>
10380         * sem_ch8.adb (Analyze_Subprogram_Renaming): Set SPARK_Mode on renaming
10381         entity.
10383 2014-01-31  Robert Dewar  <dewar@adacore.com>
10385         * exp_ch9.adb, s-tassta.adb, s-tposen.adb, s-tposen.ads: Minor
10386         reformatting.
10388 2014-01-31  Tristan Gingold  <gingold@adacore.com>
10390         * exp_disp.adb: Add a historic note.
10392 2014-01-31  Robert Dewar  <dewar@adacore.com>
10394         * sem_warn.adb (Warn_On_Useless_Assignments): Add call to
10395         Process_Deferred_References.
10397 2014-01-31  Yannick Moy  <moy@adacore.com>
10399         * erroutc.adb (Validate_Specific_Warnings): Do not issue a message for
10400         ineffective pragma Warnings(Off) in GNATprove_Mode.
10402 2014-01-31  Bob Duff  <duff@adacore.com>
10404         * s-taskin.ads: Minor comment fix.
10405         * s-tassta.adb (Abort_Dependents): Don't abort all dependents;
10406         just direct dependents. If this is actually an abort, each task
10407         will take care of aborting its dependents, so all dependents will
10408         get aborted, as before. However, when this is called the second
10409         time from Vulnerable_Complete_Master "for convenience" (i.e. to
10410         kill off tasks waiting at terminate alternatives), aborting
10411         indirect dependents is wrong, because it causes some unrelated
10412         tasks to get aborted.
10414 2014-01-31  Robert Dewar  <dewar@adacore.com>
10416         * sem_ch4.adb: Minor reformatting.
10418 2014-01-31  Robert Dewar  <dewar@adacore.com>
10420         * exp_ch2.adb: New calling sequence for Is_LHS.
10421         * frontend.adb: Add call to Process_Deferred_References.
10422         * lib-xref.ads, lib-xref.adb (Process_Deferred_References): New.
10423         (Deferred_References): New table.
10424         * sem_ch8.adb (Find_Direct_Name): Make deferred reference table
10425         entries.
10426         (Find_Expanded_Name): Ditto.
10427         * sem_res.adb: New calling sequence for Is_LHS.
10428         * sem_util.ads, sem_util.adb (Is_LHS): New calling sequence.
10429         * sem_warn.adb: Call Process_Deferred_References before issuing
10430         warnings.
10432 2014-01-31  Tristan Gingold  <gingold@adacore.com>
10434         * exp_util.adb (Corresponding_Runtime_Package): Restrict the
10435         use of System_Tasking_Protected_Objects_Single_Entry.
10436         * exp_ch9.adb (Build_Simple_Entry_Call): Remove Mode parameter
10437         of Protected_Single_Entry_Call.
10438         (Expand_N_Timed_Entry_Call): Remove single_entry case.
10439         * exp_disp.adb (Make_Disp_Asynchronous_Select_Body): Remove
10440         single_entry case.
10441         (Make_Disp_Timed_Select_Body): Likewise.
10442         * rtsfind.ads (RE_Timed_Protected_Single_Entry_Call): Remove.
10443         * s-tposen.adb (Send_Program_Error, PO_Do_Or_Queue): Remove
10444         Self_Id parameter.
10445         (Wakeup_Entry_Caller): Remove Self_ID and New_State parameters.
10446         (Wait_For_Completion_With_Timeout): Remove.
10447         (Protected_Single_Entry_Call): Remove Mode parameter
10448         (always Simple_Call).
10449         (Service_Entry): Remove Self_Id constant (not used anymore).
10450         (Timed_Protected_Single_Entry_Call): Remove.
10451         * s-tposen.ads (Timed_Protected_Single_Entry_Call): Remove.
10452         (Protected_Single_Entry_Call): Remove Mode parameter.
10454 2014-01-29  Hristian Kirtchev  <kirtchev@adacore.com>
10456         * einfo.adb (Get_Pragma): Handle the retrieval of pragma Refined_Post.
10457         * einfo.ads (Get_Pragma): Update the comment on special pragmas
10458         handled by this routine.
10459         * sem_prag.adb (Analyze_Pragma): Add a legal pragma Refined_Post
10460         to the contract of the related subprogram body.
10461         * sem_util.adb (Add_Contract_Item): Handle the insertion of
10462         pragma Refined_Post into the contract of a subprogram body.
10463         * sinfo.ads Update the documentation of node N_Contract.
10464         * sem_res.adb (Resolve_Entity_Name): Add a guard
10465         to detect abstract states and variables only when checking the
10466         SPARK 2014 rules concerning volatile object placement.
10468 2014-01-29  Ed Schonberg  <schonberg@adacore.com>
10470         * sem_ch4.adb (Find_Equality_Types, Try_One_Interp): within an instance,
10471         null is compatible with any access type.
10473 2014-01-29  Hristian Kirtchev  <kirtchev@adacore.com>
10475         * sem_util.adb (Find_Placement_In_State_Space): Assume that the default
10476         placement is not in a package.
10478 2014-01-29  Hristian Kirtchev  <kirtchev@adacore.com>
10480         * sem_util.adb (Has_Enabled_Property): Compare the character field of
10481         the sole property.
10483 2014-01-29  Robert Dewar  <dewar@adacore.com>
10485         * sem_intr.adb, a-ztexio.ads, sinfo.ads, sem_res.adb, gnatlink.adb,
10486         vms_conv.adb, a-except.ads, a-except-2005.ads, a-teioed.adb,
10487         sem_warn.ads, treepr.ads, erroutc.ads, a-excach.adb: Minor reformatting.
10489 2014-01-29  Robert Dewar  <dewar@adacore.com>
10491         * sem_util.ads, sem_util.adb (In_Pragma_Expression): New function.
10492         * sem_warn.adb (Check_References): Suppress warnings if inside
10493         Initial_Condition pragma.
10495 2014-01-29  Hristian Kirtchev  <kirtchev@adacore.com>
10497         * sem_prag.adb (Check_Missing_Part_Of): List all values of
10498         State_Space_Kind for readability reasons. Do not emit an error on
10499         a private item when the enclosing package lacks aspect/pragma
10500         Abstract_State. Do not emit an error on a private package
10501         instantiation when the corresponding generic template lacks
10502         visible state.
10503         (Has_Visible_State): New routine.
10504         * sem_util.adb (Find_Placement_In_State_Space): The visible
10505         declarations of any kind of child units in general act as proper
10506         placement location.
10508 2014-01-29  Robert Dewar  <dewar@adacore.com>
10510         * a-except-2005.adb, a-except.adb, a-excpol-abort.adb, a-exstat.adb,
10511         ali.adb, a-numaux.ads, a-numaux-darwin.ads, a-numaux-libc-x86.ads,
10512         a-numaux-vms.ads, a-numaux-vxworks.ads, a-numaux-x86.ads, aspects.ads,
10513         a-taside.adb, a-teioed.adb, a-textio.adb, a-textio.ads, atree.adb,
10514         atree.ads, a-witeio.adb, a-witeio.ads, a-wtedit.adb, a-ztedit.adb,
10515         a-ztexio.adb, bcheck.adb, binde.adb, checks.adb, comperr.adb,
10516         cstand.adb, debug_a.adb, einfo.ads, errout.adb, erroutc.adb,
10517         eval_fat.adb, exp_aggr.adb, exp_attr.adb, exp_ch11.adb, exp_ch3.adb,
10518         exp_ch4.adb, exp_ch5.adb, exp_ch6.adb, exp_ch9.adb, exp_dbug.adb,
10519         exp_disp.adb, exp_fixd.adb, exp_imgv.adb, exp_intr.adb, exp_util.adb,
10520         freeze.adb, frontend.adb, g-comlin.ads, g-mbdira.adb, gnat1drv.adb,
10521         gprep.adb, g-spipat.adb, i-cpp.ads, i-vxwork.ads, i-vxwork-x86.ads,
10522         krunch.ads, layout.adb, lib-load.adb, lib-writ.adb, lib-writ.ads,
10523         live.adb, namet.ads, osint.adb, osint-c.adb, output.ads, par.adb,
10524         par-ch10.adb, par-ch13.adb, par-ch3.adb, par-ch4.adb, par-ch5.adb,
10525         par-ch6.adb, par-ch9.adb, par-endh.adb, par-labl.adb, par-prag.adb,
10526         par-sync.adb, par-tchk.adb, par-util.adb, prj.adb, repinfo.adb,
10527         rtsfind.adb, s-arit64.adb, s-asthan-vms-alpha.adb,
10528         s-asthan-vms-ia64.adb, s-bignum.adb, scans.adb, scng.adb, s-dimmks.ads,
10529         sem_aggr.adb, sem_attr.adb, sem_aux.adb, sem_cat.adb, sem_ch10.adb,
10530         sem_ch12.adb, sem_ch13.adb, sem_ch13.ads, sem_ch3.adb, sem_ch4.adb,
10531         sem_ch5.adb, sem_ch6.adb, sem_ch8.adb, sem_disp.adb, sem_elab.adb,
10532         sem_elim.adb, sem_eval.adb, sem_intr.adb, sem_prag.adb, sem_res.adb,
10533         sem_type.adb, sem_util.adb, sem_warn.adb, set_targ.adb, s-fatgen.adb,
10534         s-fatgen.ads, s-fileio.adb, s-imgcha.adb, s-imgrea.adb, sinfo.ads,
10535         sinput-c.adb, snames.ads-tmpl, s-os_lib.adb, sprint.adb,
10536         s-regpat.adb, s-secsta.adb, s-stalib.ads,
10537         s-stchop.adb, s-stoele.ads, stand.ads, s-taprop-solaris.adb,
10538         s-tasdeb-vms.adb, s-tasini.adb, s-tassta.adb, s-valdec.adb,
10539         s-valuti.adb, s-wchjis.adb, s-wchwts.adb, system.ads, system-vms_64.ads,
10540         system-vms-ia64.ads, treepr.adb, types.ads, uintp.adb, uname.adb,
10541         urealp.adb, usage.adb, vxaddr2line.adb: Minor reformatting.
10543 2014-01-29  Robert Dewar  <dewar@adacore.com>
10545         * expander.adb: Minor reformatting.
10547 2014-01-29  Javier Miranda  <miranda@adacore.com>
10549         * exp_ch3.adb (Predefined_Primitive_Bodies): Adding documentation to
10550         previous patch.
10552 2014-01-29  Javier Miranda  <miranda@adacore.com>
10554         * exp_ch3.adb (Predefined_Primitive_Bodies): Complete the code
10555         that checks if an interface types defines the predefined "="
10556         function because the compiler was erroneously not generating the
10557         predefined "=" primitive as soon as the name of some interface
10558         primitive is "=" (formals were not checked).
10560 2014-01-29  Ed Schonberg  <schonberg@adacore.com>
10562         * expander.adb (Expander): In GNATprove mode, do not process
10563         transient scopes: they are in general not created in this mode,
10564         and an attempt to examine them will lead to constraint errors when
10565         processing configuration pragmas that have analyzable expressions.
10567 2014-01-29  Vincent Celier  <celier@adacore.com>
10569         * clean.adb (Gnatclean): Fail if main project is an aggregate
10570         project or if there is an aggregate library project in the
10571         project tree.
10572         * gnatcmd.adb: Fail if the main project is an aggregate project
10573         or if there is an aggegate library project in the project tree.
10574         * make.adb (Initialize): : Fail if main project is an aggregate
10575         project or if there is an aggregate library project in the
10576         project tree.
10577         * makeutl.ads (Aggregate_Libraries_In): New Boolean function.
10578         * prj-makr.adb (Initialize): Fail if the main project is an
10579         aggregate project or an aggregate library project.
10581 2014-01-29  Vincent Celier  <celier@adacore.com>
10583         * prj-part.adb (Check_Import_Aggregate): New procedure
10584         to check if an imported project is an aggregate project.
10585         (Parse_Single_Project): Call Check_Import_Aggregate
10586         * projects.texi: Document that aggregate projects cannot be
10587         extended or imported.
10589 2014-01-29  Robert Dewar  <dewar@adacore.com>
10591         * exp_ch9.adb, sem_ch7.ads, s-regexp.adb, sem_ch13.adb: Minor
10592         reformatting and code clean up.
10593         * gnat_ugn.texi: Add documentation section on Atomic Variables
10594         and Optimization.
10596 2014-01-29  Hristian Kirtchev  <kirtchev@adacore.com>
10598         * einfo.adb Flag264 is now unused.
10599         (Has_Body_References): Removed.
10600         (Set_Has_Body_References): Removed.
10601         (Write_Entity_Flags): Remove the output for flag Has_Body_References.
10602         * einfo.ads Update the comment on usage of attribute
10603         Body_References. Remove attribute Has_Body_References and its
10604         usage in nodes.
10605         (Has_Body_References): Removed along with pragma Inline.
10606         (Set_Has_Body_References): Removed along with pragma Inline.
10607         * sem_prag.adb (Analyze_Global_Item): Move the call to
10608         Record_Possible_Body_Reference in the state related checks
10609         section. Add a comment intended function.
10610         (Analyze_Input_Output): Move the call to Record_Possible_Body_Reference
10611         in the state related checks section. Add a comment intended function.
10612         (Analyze_Refinement_Clause): Cleanup the illegal body reference
10613         reporting. Add a comment on timing of error reporting.
10614         (Record_Possible_Body_Reference): Reimplement the routine.
10616 2014-01-29  Vincent Celier  <celier@adacore.com>
10618         * makeutl.adb (Mains.Find_File_Add_Extension): Only look for specs for
10619         unit-based languages.
10620         (Mains.Complete_Mains.Do_Complete): Use the source file project
10621         tree when calling Find_File_Add_Extension. Use the correct
10622         project name when reporting an error.
10624 2014-01-29  Hristian Kirtchev  <kirtchev@adacore.com>
10626         * aspects.adb Add an entry for aspect Part_Of in table
10627         Canonical_Aspect.
10628         * aspects.ads Add an entry for aspect Part_Of in tables Aspect_Id,
10629         Aspect_Argument, Aspect_Names and Aspect_Delay.
10630         * atree.h Define Elist9.
10631         * atree.adb (Elist9): New routine.
10632         (Set_Elist9): New routine.
10633         * atree.ads (Elist9): New routine.
10634         (Set_Elist9): New routine.
10635         * einfo.adb Add Part_Of_Constituents and Encapsulating_State to
10636         the list of node usage.  Remove Refined_State from the list of
10637         node usage.
10638         (Encapsulating_State): New routine.
10639         (Get_Pragma):
10640         Handle pragma Part_Of; (Part_Of_Constituents): New routine.
10641         (Refined_State): Removed.
10642         (Set_Encapsulating_State): New routine.
10643         (Set_Part_Of_Constituents): New routine.
10644         (Set_Refined_State): Removed.
10645         (Write_Field9_Name): Add an entry
10646         for Part_Of_Constituents (Write_Field10_Name): Add an entry for
10647         Encapsulating_State. Remove the entry for Refined_State.
10648         * einfo.ads Add new attributes Encapsulating_State
10649         and Part_Of_Constituents alond with their usage in
10650         entities. Remove attribute Refined_State along with its
10651         usage in entities.
10652         (Encapsulating_State): New routine and
10653         pragma Inline.  (Get_Pragma): Update the comment on usage.
10654         (Part_Of_Constituents): New routine and pragma Inline.
10655         (Refined_State): Removed along with pragma Inline.
10656         (Set_Encapsulating_State): New routine and pragma Inline.
10657         (Set_Part_Of_Constituents): New routine and pragma Inline.
10658         (Set_Refined_State): Removed along with pragma Inline.
10659         * par-prag.adb Pragma Part_Of does not need any special processing
10660         by the parser.
10661         * sem_ch3.adb (Analyze_Declarations): Remove local variables
10662         Body_Id and Prag. Call separate routines to analyze the
10663         contract of a package [body].
10664         (Analyze_Object_Contract):
10665         Update the comment on usage. Remove local variables
10666         Items and Nam. Use Get_Pragma rather than traversing the
10667         classification list.  Verify whether the lack of indicator
10668         Part_Of agrees with the placement of the variable in state space.
10669         (Analyze_Object_Declaration): Initialize the encapsulating state
10670         of a variable.  (Requires_State_Refinement): Moved to sem_util.
10671         * sem_ch7.adb (Analyze_Package_Body_Contract): New routine.
10672         (Analyze_Package_Contract): New routine.
10673         * sem_ch7.ads (Analyze_Package_Body_Contract): New routine.
10674         (Analyze_Package_Contract): New routine.
10675         * sem_ch10.adb (Decorate_State): Initialize the encapsulating
10676         state and Part_Of constituents.
10677         * sem_ch13.adb (Analyze_Aspect_Specifications):
10678         Add processing for aspect Part_Of. Update all
10679         calls to Decorate_Delayed_Aspect_And_Pragma.
10680         (Check_Aspect_At_Freeze_Point): Aspect Part_Of does
10681         not need any special processing at freeze time.
10682         (Decorate_Delayed_Aspect_And_Pragma): Renamed to
10683         Decorate_Aspect_And_Pragma.  Add formal parameter Delayed and
10684         update the associated comment.
10685         * sem_prag.adb Add an entry for pragma Part_Of in table Sig_Flags.
10686         (Analyze_Abstract_State): Add new global variable State_Id. Remove
10687         local constants Errors and Loc. Remove local variables Is_Null
10688         and State_Nam. Create the entity of the abstract state on the
10689         spot, before all remaining checks are performed. Verify that a
10690         missing Part_Of option agrees with the placement of the abstract
10691         state within the state space.
10692         (Analyze_Depends_In_Decl_Part):
10693         Add new global variables Constits_Seen and States_Seen. Check
10694         that a state and a corresponding constituent do not appear
10695         in pragma [Refined_]Depends.
10696         (Analyze_Global_In_Decl_Part):
10697         Add new global variables Constits_Seen and States_Seen. Check
10698         that a state and a corresponding constituent do not appear
10699         in pragma [Refined_]Global.
10700         (Analyze_Global_Item):
10701         Remove the now obsolete code that deals with Part_Of.
10702         Add the entity of the global item to the list of processed
10703         items.  (Analyze_Initializes_In_Decl_Part): Add new global
10704         variables Constits_Seen and States_Seen. Check that a state
10705         and a corresponding constituent do not appear in pragma
10706         Initializes.
10707         (Analyze_Initialization_Item): Add the entity
10708         of the initialization item to the list of processed items.
10709         (Analyze_Input_Item): Add the entity of the initialization
10710         item to the list of processed items.
10711         (Analyze_Input_Output):
10712         Remove the now obsolete code that deals with Part_Of.  Add the
10713         entity of the input/output to the list of processed items.
10714         (Analyze_Part_Of): New routine.
10715         (Analyze_Part_Of_Option): Remove
10716         local constant Par_State. Add local constant Encaps and local
10717         variables Encaps_Id and Legal. Use Analyze_Part of to analyze
10718         the option. Turn the related state into a Part_Of constituent
10719         if the option is legal.
10720         (Analyze_Pragma): Add processing
10721         for pragma Part_Of.
10722         (Analyze_Refined_State_In_Decl_Part):
10723         Remove global constants Pack_Body and Spec_Id. Remove
10724         global variables Abstr_States and Hidden_States. Add new
10725         global variables Available_States, Body_Id, Body_States and
10726         Spec_Id. Add new local constant Body_Decl. Reimplement the
10727         logic that extracts the states available for refinement from
10728         the related package and the body hidden states of the said
10729         package.
10730         (Analyze_Refinement_Clause): Add local variable Part_Of_Constits.
10731         (Check_Applicable_Policy): Alphabetize body.
10732         (Check_Dependency_Clause): Replace Refined_State
10733         with Encapsulating_State.
10734         (Check_Matching_Constituent):
10735         Reimplement the logic that determines whether an item is a valid
10736         / invalid constituent of the current refined state. Return when
10737         a construct does not denote a valid abstract state. Extract the
10738         list of Part_Of constituents for further analysis. Check that all
10739         Part_Of constituents of a state have been used in its refinement.
10740         (Check_Matching_State): Update the comment on usage. Operate
10741         on the list of available states.
10742         (Check_Missing_Part_Of): New routine.
10743         (Check_Refined_Global_Item): Replace Refined_State
10744         with Encapsulating_State.
10745         (Check_State_And_Constituent_Use): New routine.
10746         (Create_Abstract_State): New routine.
10747         (Is_Matching_Input): Replace Refined_State with Encapsulating_State.
10748         (Is_Part_Of): Removed.
10749         (Collect_Body_States): New routine.
10750         (Collect_Constituent): Replace Refined_State with Encapsulating_State.
10751         (Collect_Hidden_States): Removed.
10752         (Report_Unrefined_States): Change the profile of the procedure along
10753         with the comment on usage.
10754         (Report_Unused_Constituents): New routine.
10755         (Report_Unused_Hidden_States): Removed.
10756         (Report_Unused_States): New routine.
10757         * sem_prag.ads (Check_Missing_Part_Of): New routine.
10758         * sem_util.adb (Add_Contract_Item): Pragma Part_Of can now
10759         appear in the classification pragmas of a package instantiation
10760         or a variable.
10761         (Find_Placement_In_State_Space): New routine.
10762         (Is_Child): Removed.
10763         (Is_Child_Or_Sibling): Remove formal
10764         parameter Private_Child. Remove the private child checks.
10765         (Requires_State_Refinement): Moved from sem_ch3.
10766         * sem_util.ads Add new type State_Space_Kind along with
10767         comment on its usage and values.
10768         (Add_Contract_Item): Update the comment on usage.
10769         (Find_Body_Discriminal): Alphabetize spec.
10770         (Find_Placement_In_State_Space): New routine.
10771         (Is_Child_Or_Sibling): Remove formal parameter Private_Child
10772         and update the comment on usage.
10773         (Requires_State_Refinement): Moved from sem_ch3.
10774         * sinfo.ads: Update the documentation of N_Contract.
10775         * snames.ads-tmpl The predefined name for Part_Of is now used
10776         to denote a pragma. Add Pragma_Id for Part_Of.
10778 2014-01-29  Emmanuel Briot  <briot@adacore.com>
10780         * s-regexp.adb (Create_Secondary_Table): Automatically grow the state
10781         machine as needed.
10782         (Dump): New subprogram.
10784 2014-01-29  Tristan Gingold  <gingold@adacore.com>
10786         * exp_ch9.adb (Expand_N_Protected_Type_Declaration): Add
10787         Expand_Entry_Declaration to factorize code.
10789 2014-01-29  Ed Schonberg  <schonberg@adacore.com>
10791         * checks.adb: minor clarification.
10792         * sem_ch7.adb (Declare_Inherited_Private_Subprograms): Limit
10793         search for primitive operations to the entities that immediately
10794         follow the type declaration.
10796 2014-01-29  Tristan Gingold  <gingold@adacore.com>
10798         * exp_ch9.adb (Build_Protected_Entry): Do not call
10799         Complete_Entry_Body anymore.
10800         * rtsfind.ads (RE_Complete_Single_Entry_Body): Remove.
10801         * s-tposen.ads, s-tposen.adb (Complete_Single_Entry_Body): Remove.
10803 2014-01-29  Pierre-Marie Derodat  <derodat@adacore.com>
10805         * s-os_lib.adb, s-os_lib.ads (Normalize_Pathname): Return an empty
10806         string when the Name input bigger than allowed. Adapt the function
10807         specification.
10809 2014-01-29  Ed Schonberg  <schonberg@adacore.com>
10811         * checks.adb (Install_Null_Excluding_Check): Do not emit warning
10812         if expression is within a case_expression of if_expression.
10814 2014-01-29  Robert Dewar  <dewar@adacore.com>
10816         * exp_ch9.adb, inline.ads: Minor reformatting.
10818 2014-01-29  Tristan Gingold  <gingold@adacore.com>
10820         * exp_ch9.adb (Is_Exception_Safe): Return true if no exceptions.
10822 2014-01-29  Yannick Moy  <moy@adacore.com>
10824         * inline.ads (Pending_Body_Info): Add SPARK_Mode and
10825         SPARK_Mode_Pragma components to be able to analyze generic
10826         instance.
10827         * sem_ch12.adb (Analyze_Package_Instantiation,
10828         Inline_Instance_Body, Need_Subprogram_Instance_Body,
10829         Load_Parent_Of_Generic): Pass in SPARK_Mode from instantiation
10830         for future analysis of the instance.
10831         (Instantiate_Package_Body,
10832         Instantiate_Subprogram_Body, Set_Instance_Inv): Set SPARK_Mode
10833         from instantiation to analyze the instance.
10835 2014-01-29  Robert Dewar  <dewar@adacore.com>
10837         * sem_ch7.adb, sem_prag.adb, sem_ch4.adb, sem_ch6.adb: Minor code
10838         reorganization.
10840 2014-01-29  Yannick Moy  <moy@adacore.com>
10842         * gnat_rm.texi: Update description of SPARK_Mode pragma.
10844 2014-01-29  Tristan Gingold  <gingold@adacore.com>
10846         * exp_ch9.adb (Expand_N_Protected_Body): Remove Num_Entries.
10848 2014-01-29  Thomas Quinot  <quinot@adacore.com>
10850         * sem_ch4.adb (Find_Component_In_Instance): Update comment.
10852 2014-01-29  Ed Schonberg  <schonberg@adacore.com>
10854         * exp_util.adb (Build_Task_Image_Prefix): Indicate that the
10855         resulting string is an internal entity. and thus requires no
10856         initialization. This is relevant when Initialize_ Scalars is
10857         enabled, because the resultant spurious initialization may lead to
10858         secondary stack anomalies that produce a mangled name for a task.
10860 2014-01-29  Yannick Moy  <moy@adacore.com>
10862         * sem_ch6.adb (Analyze_Subprogram_Body_Helper): SPARK_Mode
10863         not inherited from spec anymore. Check consistency
10864         rules after processing of declarations.
10865         * sem_ch7.adb (Analyze_Package_Body_Helper): SPARK_Mode not inherited
10866         from spec anymore. Check consistency rules after processing of
10867         declarations.
10868         (Analyze_Package_Declaration): Set SPARK_Mode only for non-generic
10869         packages.
10870         * sem_prag.adb (Analyze_Pragma/Pragma_SPARK_Mode): Implement new
10871         consistency rules.
10873 2014-01-27  Robert Dewar  <dewar@adacore.com>
10875         * sem_res.adb (Resolve_Comparison_Op): Add type name/location
10876         to unordered msg.
10877         (Resolve_Range): Add type name/location to unordered msg.
10879 2014-01-27  Claire Dross  <dross@adacore.com>
10881         * a-cofove.adb/s (Copy): Add precondition so that Copy (Source,
10882         Capacity) is only called with Capacity >= Length (Source) and
10883         Capacity in Capacity_Range.
10884         * a-cfdlli.adb/s, a-cfhase.adb/s, a-cfhama.adb/s, a-cforse.adb/s,
10885         a-cforma.adb/s (Copy): Add precondition so that Copy (Source, Capacity)
10886         is only called with Capacity >= Source.Capacity. Raise Capacity_Error
10887         in the code is this is not the case.
10889 2014-01-27  Thomas Quinot  <quinot@adacore.com>
10891         * sem_ch4.adb (Analyze_Selected_Component): Fix handling of
10892         selected component in an instance where the component of the
10893         actual is not visibile at instantiation.
10895 2014-01-27  Ed Schonberg  <schonberg@adacore.com>
10897         * sem_ch6.adb: sem_ch6.adb (Set_Actual_Subtypes): If the type
10898         has a dynamic predicate, generate freeze node for Actual_Subtype
10899         at once, because the declaration of the corresponding predicate
10900         function will make reference to it.
10902 2014-01-27  Tristan Gingold  <gingold@adacore.com>
10904         * exp_ch7.adb, exp_ch9.adb: Adjust comments.
10906 2014-01-27  Robert Dewar  <dewar@adacore.com>
10908         * exp_ch4.adb (Expand_N_Op_Expon): Remove unsigned type test
10909         for 2**X optimization.
10911 2014-01-27  Ed Schonberg  <schonberg@adacore.com>
10913         * a-suenst.adb: strings.utf_encoding.strings (Decode): Check
10914         explicitly whether value is in range of Character, because the
10915         library is typically compiled with range checks disabled, and
10916         we cannot rely on the implicit check on the argument of 'Val.
10918 2014-01-27  Vincent Celier  <celier@adacore.com>
10920         * a-ciorma.adb, a-cihama.adb (Assign): Copy the Source to the Target,
10921         not the Target to itself.
10923 2014-01-27  Robert Dewar  <dewar@adacore.com>
10925         * vms_conv.ads, ali.adb, sem_ch6.ads, opt.ads, vms_cmds.ads: Minor
10926         changes to avoid incorrect use of unordered enum types.
10928 2014-01-27  Thomas Quinot  <quinot@adacore.com>
10930         * sem_ch4.adb: Minor reformatting.
10932 2014-01-27  Robert Dewar  <dewar@adacore.com>
10934         * scn.adb (Check_End_Of_Line): Removed.
10935         (Error_Long_Line): Removed.
10936         (Determine_License): Use versions of above routines from Scanner.
10937         * scng.adb (Check_End_Of_Line): Moved to spec.
10938         (Error_Long_Line): Removed, no longer used.
10939         * scng.ads (Check_End_Of_Line): Moved here from body.
10941 2014-01-27  Tristan Gingold  <gingold@adacore.com>
10943         * exp_ch7.adb (Build_Cleanup_Statements): Call
10944         Build_Protected_Subprogram_Call_Cleanup to insert the cleanup
10945         for protected body.
10946         * exp_ch9.adb (Build_Protected_Subprogram_Body): Likewise.
10947          Remove Service_Name variable.
10948         (Build_Protected_SUbprogam_Call_Cleanup): New procedure that
10949         factorize code from the above subprograms.
10950         * exp_ch9.ads (Build_Protected_Subprogram_Call_Cleanup): New procedure.
10952 2014-01-27  Hristian Kirtchev  <kirtchev@adacore.com>
10954         * einfo.adb (Has_Option): Reimplemented.
10955         * sem_prag.adb (Analyze_Refinement_Clause): Add global
10956         variables AR_Constit, AW_Constit, ER_Constit, EW_Constit,
10957         External_Constit_Seen and State. Add local variables Body_Ref,
10958         Body_Ref_Elmt and Extra_State. Reimplement part of the logic to
10959         avoid a cumbersome while pool. Verify the legality of an external
10960         state and relevant properties.
10961         (Check_External_Property): New routine.
10962         (Check_Matching_State): Remove parameter profile
10963         and update comment on usage.
10964         (Collect_Constituent): Store the
10965         relevant external property of a constituent.
10966         * sem_util.adb (Async_Readers_Enabled): Update the call to
10967         Has_Enabled_Property.
10968         (Async_Writers_Enabled): Update the call to Has_Enabled_Property.
10969         (Effective_Reads_Enabled): Update the call to Has_Enabled_Property.
10970         (Effective_Writes_Enabled): Update the call to Has_Enabled_Property.
10971         (Has_Enabled_Property): Rename formal parameter Extern to State_Id.
10972         Update comment on usage. Reimplement the logic to recognize the various
10973         formats of properties.
10975 2014-01-27  Ed Schonberg  <schonberg@adacore.com>
10977         * par-ch5.adb: Minor reformatting.
10979 2014-01-27  Tristan Gingold  <gingold@adacore.com>
10981         * s-tposen.ads: Harmonize style and comments.
10983 2014-01-27  Vincent Celier  <celier@adacore.com>
10985         * projects.texi: Document that shared library projects, by
10986         default, cannot import projects that are not shared library
10987         projects.
10989 2014-01-27  Robert Dewar  <dewar@adacore.com>
10991         * sem_ch8.adb (Find_Selected_Component): Use Replace instead
10992         of Rewrite.
10994 2014-01-27  Ed Schonberg  <schonberg@adacore.com>
10996         * a-suenco.adb, a-suenst.adb (Decode): Raise encoding error if
10997         any other exception is raised.
10998         (Convert): If both Input_Scheme and Output_Scheme are UTF_8 it is
10999         still necessary to perform a conversion in order to remove overlong
11000         encodings.
11002 2014-01-27  Robert Dewar  <dewar@adacore.com>
11004         * exp_smem.adb: Minor reformatting.
11006 2014-01-27  Thomas Quinot  <quinot@adacore.com>
11008         * a-calfor.ads: Fix incorrect reference to operator "-" in comment.
11010 2014-01-27  Ed Schonberg  <schonberg@adacore.com>
11012         * sem_res.adb (Make_Call_Into_Operator): In ASIS mode, relocate
11013         nodes for operands to the original node for the call, to preserve
11014         Original_Node pointers within the resolved operands, given that
11015         they may have been rewritten as well. Previous approach copied
11016         the operands into a new tree and lost those pointers.
11018 2014-01-27  Claire Dross  <dross@adacore.com>
11021         * a-cofove.adb, a-cofove.ads: Add Strict_Equal function to the API.
11023 2014-01-27  Ed Schonberg  <schonberg@adacore.com>
11025         * sem_util.adb (Check_Internal_Protected_Use): A call through
11026         an anonymous access parameter of the current protected function
11027         is not a potential modification of the current object.
11029 2014-01-27  Ed Schonberg  <schonberg@adacore.com>
11031         * a-cobove.adb (Reserve_Capacity): Procedure raises
11032         Capacity_Error, not Constraint_Error, when request cannot be
11033         satisfied.
11035 2014-01-27  Vincent Celier  <celier@adacore.com>
11037         * a-coorma.adb, a-cohama.adb (Assign): Copy the Source to the Target,
11038         not the Target to itself.
11040 2014-01-27  Ed Schonberg  <schonberg@adacore.com>
11042         * exp_ch4.adb (Expand_Concatenate): If the target of the
11043         concatenation is a library-level entity, always use the off-line
11044         version of concatenation, regardless of optimization level. This
11045         is space-efficient, and prevents linking problems when some
11046         units are compiled with different optimization levels.
11048 2014-01-27  Ed Schonberg  <schonberg@adacore.com>
11050         * sem_ch5.adb: Code clean up.
11052 2014-01-27  Ed Schonberg  <schonberg@adacore.com>
11054         * par-ch5.adb (P_Iterator_Specification): Improve error recovery
11055         when an array or container iterator includes a subtype indication,
11056         which is only legal in an element iterator.
11058 2014-01-27  Thomas Quinot  <quinot@adacore.com>
11060         * exp_ch7.adb: Minor reformatting.
11062 2014-01-27  Robert Dewar  <dewar@adacore.com>
11064         * opt.adb (SPARK_Mode): Default for library units is None rather
11065         than Off.
11066         * opt.ads: Remove AUTO from SPARK_Mode_Type SPARK_Mode_Type is
11067         no longer ordered.
11068         * sem_prag.adb (Analyze_Pragma, case SPARK_Mode): Remove AUTO
11069         possibility.
11070         * snames.ads-tmpl (Name_Auto): Removed, no longer used.
11072 2014-01-27  Robert Dewar  <dewar@adacore.com>
11074         * par-ch5.adb (P_Sequence_Of_Statements): Make entry in
11075         Suspicious_Labels table if we have identifier; followed by loop
11076         or block.
11077         * par-endh.adb (Evaluate_End_Entry): Search Suspicious_Labels table.
11078         * par.adb (Suspicious_Labels): New table.
11080 2014-01-27  Robert Dewar  <dewar@adacore.com>
11082         * exp_aggr.adb (Check_Bounds): Reason is range check, not
11083         length check.
11085 2014-01-27  Yannick Moy  <moy@adacore.com>
11087         * get_spark_xrefs.adb (Get_SPARK_Xrefs): Accept new type 'c' for
11088         reference.
11089         * lib-xref-spark_specific.adb (Is_Global_Constant): Remove useless
11090         function now.
11091         (Add_SPARK_Xrefs): Include references to constants.
11092         * spark_xrefs.ads Document new character 'c' for references to
11093         constants.
11095 2014-01-27  Thomas Quinot  <quinot@adacore.com>
11097         * exp_smem.adb (Add_Write_After): For a function call, insert write as
11098         an after action in a transient scope.
11100 2014-01-27  Thomas Quinot  <quinot@adacore.com>
11102         * exp_smem.adb (Expand_Shared_Passive_Variable): For a reference
11103         to a shared variable as an OUT formal in a call to an init proc,
11104         the 'Read call must be emitted after, not before, the call.
11106 2014-01-27  Robert Dewar  <dewar@adacore.com>
11108         * gnat_rm.texi: Remove mention of AUTO mode for SPARK_Mode pragma.
11110 2014-01-27  Robert Dewar  <dewar@adacore.com>
11112         * a-wichha.adb (Character_Set_Version): Change to output proper
11113         value.
11115 2014-01-27  Hristian Kirtchev  <kirtchev@adacore.com>
11117         * einfo.adb (Is_Input_Only_State): Removed.
11118         (Is_Non_Volatile_State): Removed.
11119         (Is_Output_State): Removed.
11120         * einfo.ads (Is_Input_Only_State): Remove attribute and
11121         subprogram. Update related entity.
11122         (Is_Non_Volatile_State):
11123         Remove attribute and subprogram. Update related entity.
11124         (Is_Output_State): Removed attribute and subprogram. Update
11125         related entity.
11126         * exp_ch6.adb (Expand_Subprogram_Contract): Update comment on
11127         generated code.
11128         * sem_ch3.adb (Analyze_Declarations): Analyze the contract of
11129         an object, not just variables.
11130         (Analyze_Object_Contract): New routine.
11131         (Analyze_Variable_Contract): Removed.
11132         (Process_Discriminants): Detect an illegal use of volatile
11133         discriminant in SPARK mode.
11134         * sem_ch5.adb (Analyze_Iterator_Specification):
11135         Detect an illegal use of volatile loop variable.
11136         (Analyze_Loop_Parameter_Specification): Detect an illegal use
11137         of volatile loop variable.
11138         * sem_ch6.adb (Process_Formals): Update the volatile object
11139         detection. Detect an illegal formal of mode IN OUT or OUT in
11140         SPARK mode. Enhance the error messages with references.
11141         * sem_ch12.adb (Instantiate_Object): Update the volatile object
11142         detection. Enhance the error messages with references.
11143         * sem_prag.adb (Analyze_Abstract_State): Enhance the error
11144         messages with references.
11145         (Analyze_Contract_Case): Enhance the error messages with references.
11146         (Analyze_External_Property): Call Check_Duplicate_Property to process
11147         an external property.
11148         (Analyze_External_Property_In_Decl_Part): New routine.
11149         (Analyze_External_State_In_Decl_Part): Removed.
11150         (Analyze_Global_Item): Detect an illegal
11151         use of a volatile constant. Detect an illegal use
11152         of a variable with enabled Effective_Reads. Enhance
11153         the error messages with references. Remove obsolete
11154         checks concerning Input_Only and Output_Only states.
11155         (Analyze_Initialization_Item): Enhance the error messages
11156         with references.
11157         (Analyze_Initializes_In_Decl_Part): Do not
11158         collect the states and variables when the initialization list
11159         is null.
11160         (Analyze_Input_Item): Enhance the error messages with references.
11161         (Analyze_Input_Output): Enhance the error messages with references.
11162         (Analyze_Pragma): Enhance the error messages with references.
11163         (Analyze_Refinement_Clause): Code reformatting.
11164         (Analyze_Refined_Depends_In_Decl_Part):
11165         Rename global variable Global to Reg_Global and update all
11166         occurrences. Add local variables D7 and D8. Update the error
11167         messages with references. Update the call to Collect_Global_Items.
11168         (Analyze_Refined_Global_In_Decl_Part): Add local variables
11169         Has_Proof_In_State, Proof_In_Constits and Proof_In_Items. Update
11170         the call to Collect_Global_Items.  Account for a Proof_In state
11171         in null / useless refinement checks. Verify the coverage of
11172         Proof_In states.
11173         (Check_Dependency_Clause): Remove local variable
11174         Out_Constits. Remove the retrieval and removal of constituents
11175         for an Output_Only state. Remove the reporting of unused
11176         Output_Only state constituents.
11177         (Check_Duplicate_Mode): Enhance
11178         the error message with a reference.
11179         (Check_Duplicate_Property): New routine.
11180         (Check_Duplicate_Option): Enhance the error message with a reference.
11181         (Check_External_Properties): Enhance the error message with a reference.
11182         (Check_Function_Return): Enhance the error message with a reference.
11183         (Check_In_Out_States): Update
11184         comment on usage. Add a specialized error message for Proof_In
11185         constituents. Enhance the error message with a reference.
11186         (Check_Input_States): Update comment on usage. Account for
11187         possible Proof_In constituents. Enhance the error message
11188         with a areference.
11189         (Check_Matching_Constituent): Enhance the error message with a
11190         reference.
11191         (Check_Matching_State): Enchance the error message with a reference.
11192         (Check_Mode): Add local variable From_Global. Update the call to
11193         Find_Mode.  Emit more precise error messages concerning extra items
11194         (Check_Mode_Restriction_In_Enclosing_Context): Consider
11195         pragma Refined_Global.  Enhance the error message with a
11196         reference.
11197         (Check_Mode_Restriction_In_Function): Enhance the error message with
11198         a reference.
11199         (Check_Output_States): Update comment on usage. Add local variable
11200         Posted.  Account for possible Proof_In constituents. Produce a detailed
11201         list of missing constituents.
11202         (Check_Proof_In_States): New routine.
11203         (Check_Refined_Global_Item): Handle Proof_In
11204         constituents. Enchance the error message with a reference.
11205         (Collect_Global_Items): Add formal parameters Proof_In_Items
11206         and Has_Proof_In_State. Update the comment on usage. Account
11207         for Proof_In items.
11208         (Create_Or_Modify_Clause): Enchance
11209         the error message with a reference.
11210         (Find_Mode): Add
11211         formal parameter From_Global. Update the comment on usage.
11212         Detect when the mode is governed by pragma [Refined_]Global.
11213         (Output_Constituents): Removed.
11214         (Report_Extra_Constituents):
11215         Report extra Proof_In constituents.
11216         (Report_Unused_Constituents): Removed.
11217         (Usage_Error): Code reformatting. Enhance the error
11218         messages with reference.
11219         * sem_prag.ads (Analyze_External_Property_In_Decl_Part): New routine.
11220         (Analyze_External_State_In_Decl_Part): Removed.
11221         * sem_res.adb (Resolve_Actuals): Update the volatile object
11222         detection. Enhance the error message with a reference.
11223         (Resolve_Entity_Name): Update the volatile object
11224         detection. Enhance the error message with a reference.
11225         * sem_util.adb (Is_Refined_State): Add a guard to avoid a crash.
11226         (Is_SPARK_Volatile_Object): New routine.
11227         (Has_Volatile_Component): New routine.
11228         * sem_util.ads (Is_Delegate): Alphabetized.
11229         (Is_SPARK_Volatile_Object): New routine.
11230         (Has_Volatile_Component): New routine.
11231         * snames.ads-tmpl: Remove names Name_Input_Only and Name_Output_Only.
11233 2014-01-27  Ed Schonberg  <schonberg@adacore.com>
11235         * sem_attr.adb: Resolve fully prefix of 'Update.
11237 2014-01-27  Ben Brosgol  <brosgol@adacore.com>
11239         * gnat_rm.texi: Minor clarifications.
11241 2014-01-27  Robert Dewar  <dewar@adacore.com>
11243         * sem_elab.adb (Check_Internal_Call_Continue): Avoid complaining
11244         about call that is generated as part of an Initial_Condition
11245         check.
11246         * sem_prag.adb: Minor spelling correction.
11248 2014-01-27  Robert Dewar  <dewar@adacore.com>
11250         * sem_prag.adb (Set_Convention_From_Pragma): Check that
11251         convention Ghost can only apply to functions.
11252         * einfo.ads, einfo.adb (Is_Ghost_Subprogram): Add clarifying comment.
11254 2014-01-27  Robert Dewar  <dewar@adacore.com>
11256         * gnat_ugn.texi: Add Short_Enums to documentation of
11257         -gnatet/-gnateT.
11259 2014-01-27  Robert Dewar  <dewar@adacore.com>
11261         * sem_prag.adb (Analyze_Input_Item): Correct check for input
11262         item in same package.
11263         * sem_util.ads, sem_util.adb (Within_Scope): New function.
11265 2014-01-26  Arnaud Charlet  <charlet@adacore.com>
11267         * a-intnam-lynxos.ads, mlib-tgt-specific-lynxos.adb,
11268         s-osinte-lynxos-3.adb, s-osinte-lynxos-3.ads, s-osinte-lynxos.adb,
11269         s-osinte-lynxos.ads, s-taprop-lynxos.adb, s-tpopsp-lynxos.adb,
11270         system-lynxos-ppc.ads, system-lynxos-x86.ads: Removed, no longer
11271         maintained.
11273 2014-01-25  Eric Botcazou  <ebotcazou@adacore.com>
11275         * gcc-interface/Makefile.in: Fix oversight.
11277 2014-01-25  Eric Botcazou  <ebotcazou@adacore.com>
11279         * gcc-interface/utils.c (convert_to_fat_pointer): Un-obfuscate the
11280         conversion from a thin pointer with a shifted value.
11281         * gcc-interface/utils2.c (gnat_build_constructor): Propagate the
11282         read-only flag from the values onto the result.
11283         (gnat_invariant_expr): Accept read-only CONSTRUCTORs.
11285 2014-01-25  Tristan Gingold  <gingold@adacore.com>
11287         * gcc-interface/decl.c (gnat_to_gnu_entity): Always build a variable
11288         for E_Variable with a pragma Linker_Section.
11290 2014-01-25  Robert Dewar  <dewar@adacore.com>
11292         * gcc-interface/decl.c (gnat_to_gnu_param): Make sure an Out parameter
11293         with Default_Value aspect is passed in by copy.
11295 2014-01-24  Eric Botcazou  <ebotcazou@adacore.com>
11297         * set_targ.adb: Set Short_Enums.
11298         * gcc-interface/lang.opt (fshort-enums): New option.
11299         * gcc-interface/misc.c (gnat_handle_option): Handle it.
11300         (gnat_post_options): Do not modify the global settings.
11302 2014-01-24  Robert Dewar  <dewar@adacore.com>
11304         * g-rannum.ads, g-rannum.adb (Random_Ordinary_Fixed): New generic
11305         function.
11306         (Random_Decimal_Fixed): New generic function.
11307         * s-rannum.ads: Minor comment clarifications.
11309 2014-01-24  Robert Dewar  <dewar@adacore.com>
11311         * back_end.adb: Remove Short_Enums handling (handled in
11312         Ttypes/Get_Targ now) Minor added comments.
11313         * freeze.adb: Change name Short_Enums_On_Target to
11314         Target_Short_Enums.
11315         * get_targ.ads, get_targ.adb (Get_Short_Enums): New function.
11316         * opt.ads: Minor comment updates.
11317         * sem_ch13.adb: Change name Short_Enums_On_Target to
11318         Target_Short_Enums.
11319         * set_targ.adb: Set Short_Enums from gcc back end.
11320         * set_targ.ads (Short_Enums): New variable.
11321         * targparm.ads, targparm.adb: Remove Short_Enums entries (handled in
11322         Ttypes/Get_Targ now).
11323         * ttypes.ads (Target_Short_Enums): New constant boolean switch
11325 2014-01-24  Pascal Obry  <obry@adacore.com>
11327         * g-sercom-mingw.adb: Fix serial port name for port number > 10.
11329 2014-01-24  Gary Dismukes  <dismukes@adacore.com>
11331         * exp_disp.adb (Expand_Dispatching_Call): Call Unqualify on Param when
11332         comparing it with Ctrl_Arg, since Ctrl_Arg may have had qualification
11333         stripped off.
11335 2014-01-24  Robert Dewar  <dewar@adacore.com>
11337         * sinfo.ads, make.adb, prj-env.adb: Minor reformatting.
11339 2014-01-24  Vincent Celier  <celier@adacore.com>
11341         * prj.adb (Add_Aggregated_Project): Do not add a project in
11342         the list if it is already there.
11344 2014-01-24  Yannick Moy  <moy@adacore.com>
11346         * lib-xref-spark_specific.adb (Enclosing_Subprogram_Or_Package):
11347         Correct the search for a subrogram declaration to which a pragma is
11348         attached.
11350 2014-01-24  Bob Duff  <duff@adacore.com>
11352         * gnat_ugn.texi: Document --decimal-grouping and
11353         --based-grouping switches in gnatpp.
11355 2014-01-24  Ed Schonberg  <schonberg@adacore.com>
11357         * sinfo.ads: Documentation update.
11359 2014-01-24  Ed Schonberg  <schonberg@adacore.com>
11361         * sem_ch3.adb (Constant_Redeclaration): New declaration is
11362         illegal if previous one has an initial expression that is an
11363         aggregate expanded into assignments.
11365 2014-01-24  Ed Schonberg  <schonberg@adacore.com>
11367         * sem_ch5.adb (Analyze_Loop_Parameter_Specification): Small
11368         code reorganization to remove spurious warning on a loop with
11369         an array element iterator that has a null range.
11371 2014-01-24  Vincent Celier  <celier@adacore.com>
11373         * make.adb (Binding_Phase): When setting the Ada paths, use
11374         the library ALI dir, not the object dir in libraries.
11376 2014-01-24  Yannick Moy  <moy@adacore.com>
11378         * sinfo.ads: Add documentation of check flag fields.
11380 2014-01-24  Ed Schonberg  <schonberg@adacore.com>
11382         * sem_res.adb (Resolve_Actuals): If an actual is a view
11383         conversion of a discriminated object, and the formal type is
11384         discriminated and constrained, apply a discriminant check to
11385         the object itself.
11387 2014-01-24  Robert Dewar  <dewar@adacore.com>
11389         * prj.adb, prj-env.adb, back_end.adb: Add comment, minor code clean ups.
11391 2014-01-24  Ed Schonberg  <schonberg@adacore.com>
11393         * sem_ch3.adb (Analyze_Declarations): At the end of an
11394         appropriate declarative part, call Freeze_All from the first
11395         declaration in the scope, not from the first unfrozen one. This
11396         is necessary to apply visibility checks to entities with delayed
11397         aspects. Otherwise, in the presence of instantiations and cleanups
11398         that they may generate, the delayed aspects may be analyzed too
11399         late and produce spurious visibility errors.
11400         * sem_attr.adb: Place etype on range.
11401         * sem_ch6.adb: Documentation expression functions.
11403 2014-01-24  Robert Dewar  <dewar@adacore.com>
11405         * exp_ch7.adb: Minor change of Indices to Indexes (preferred
11406         terminology in compiler).
11408 2014-01-24  Robert Dewar  <dewar@adacore.com>
11410         * scans.ads: Remove Tok_Raise from Sterm, Eterm, After_SM
11411         categories, now that Ada 95 supports raise expressions.
11413 2014-01-24  Robert Dewar  <dewar@adacore.com>
11415         * freeze.adb (Freeze_Enumeration_Type): Use new target parameter
11416         Short_Enums_On_Target.
11417         * sem_ch13.adb (Set_Enum_Esize): Take Short_Enums_On_Target
11418         into account.
11419         * targparm.ads, targparm.adb: Add new target parameter Short_Enums.
11421 2014-01-24  Ed Schonberg  <schonberg@adacore.com>
11423         * sem_ch5.adb (Analyze_Iterator_Specification): If subtype
11424         indication is given explicity, check that it matches the array
11425         component type or the container element type of the domain
11426         of iteration.
11428 2014-01-24  Tristan Gingold  <gingold@adacore.com>
11430         * back_end.adb (Scan_Compiler_Arguments): Set Short_Enums_On_Target.
11431         * gcc-interface/misc.c (flag_short_enums): Declare.
11432         (gnat_post_options): Set it.
11434 2014-01-24  Vincent Celier  <celier@adacore.com>
11436         * prj-env.adb (Ada_Objects_Path): Use Ada_Objects_Path_No_Libs
11437         to cache the result when Including_Libraries is False.
11438         * prj-env.ads (Ada_Objects_Path): Update documentation
11439         * prj.adb (Free (Project_Id)): Also free Ada_Objects_Path_No_Libs
11440         (Get_Object_Directory): Return the Library_Ali_Dir only when
11441         when Including_Libraries is True.
11442         * prj.ads (Get_Object_Directory): Fix and complete documentation
11443         (Project_Data): New component Ada_Objects_Path_No_Libs
11445 2014-01-24  Robert Dewar  <dewar@adacore.com>
11447         * checks.adb (Expr_Known_Valid): Result of fpt operator never
11448         considered valid.
11450 2014-01-24  Eric Botcazou  <ebotcazou@adacore.com>
11452         * back_end.adb: Minor fix in comment.
11454 2014-01-24  Javier Miranda  <miranda@adacore.com>
11456         * sem_ch3.adb (Check_Abstract_Overriding): Code reestructuration
11457         required to report the error in case of task types.
11459 2014-01-24  Ed Schonberg  <schonberg@adacore.com>
11461         * sem_attr.adb: Additional index checking.
11463 2014-01-24  Ed Schonberg  <schonberg@adacore.com>
11465         * sem_attr.adb (Analyze_Attribute, case 'Update): Analyze
11466         expressions in each component association, and for records note
11467         the entity in each association choice, for subsequent resolution.
11468         (Resolve_Attribute, case 'Update): Complete resolution of
11469         expressions in each component association.
11471 2014-01-24  Robert Dewar  <dewar@adacore.com>
11473         * sem.adb (Sem): Avoid premature reference to Current_Sem_Unit
11474         (this was causing Is_Main_Unit_Or_Main_Unit_Spec to be set wrong,
11475         leading to wrong handling of SPARK_Mode for library units).
11477 2014-01-24  Robert Dewar  <dewar@adacore.com>
11479         * sem_ch6.adb (Analyze_Subprogram_Body_Helper): Set SPARK_Mode
11480         on generic instances (do not consider them to be internally
11481         generated)
11483 2014-01-24  Doug Rupp  <rupp@adacore.com>
11485         * s-osinte-android.ads (pthread_sigmask): Import sigprocmask
11486         vice pthread_sigmask.
11488 2014-01-24  Vincent Celier  <celier@adacore.com>
11490         * prj.adb (Debug_Output (Str, Str2)): Output if verbosity is
11491         not default.
11493 2014-01-24  Vincent Celier  <celier@adacore.com>
11495         * prj-ext.adb (Add): Do not output anything when Silent is True,
11496         whatever the verbosity. When Source is From_External_Attribute,
11497         set the corresponding environment variable if it is not already set.
11498         * prj-ext.ads (Add): New Boolean parameter Silent, defaulted
11499         to False
11500         * prj-proc.adb (Process_Expression_For_Associative_Array):
11501         For attribute External, call Prj.Ext.Add with Silent set to
11502         True for the child environment, to avoid useless output in non
11503         default verbosity.
11505 2014-01-24  Ed Schonberg  <schonberg@adacore.com>
11507         * sem_res.adb (Set_Slice_Subtype): Handle properly a discrete
11508         range given by a subtype indication, and force evaluation of
11509         the bounds, as for a simple range.
11510         * exp_util.adb (Evaluate_Slice_Bounds): Utility to force evaluation
11511         of bounds of slice for various kinds of discrete ranges.
11512         (Evaluate_Name, Evaluate_Subtype_From_Expr): use
11513         Evaluate_Slice_Bounds.
11515 2014-01-24  Bob Duff  <duff@adacore.com>
11517         * s-taskin.ads (Activator): Make this Atomic, because
11518         Activation_Is_Complete reads it, and that can be called
11519         from any task. Previously, this component was only
11520         modified by the activator before activation, and by
11521         Self after activation.
11522         * a-taside.ads, a-taside.adb (Environment_Task,
11523         Activation_Is_Complete): Implement these missing functions.
11525 2014-01-24  Doug Rupp  <rupp@adacore.com>
11527         * init.c: Add a handler section for Android.
11529 2014-01-24  Arnaud Charlet  <charlet@adacore.com>
11531         * i-cexten.ads (Unsigned_33..64, Unsigned_33..64): New types.
11533 2014-01-24  Ed Schonberg  <schonberg@adacore.com>
11535         * sem_ch4.adb (Operator_Check): If one operand is a
11536         Raise_Expression, set its type to that of the other operand.
11537         * sem_res.adb (Resolve_Raise_Expression): new procedure.
11538         (Resolve_Actuals): For an actual that is a Raise_Expression,
11539         set the type to that of the formal.
11540         * sem_type.adb (Find_Unique_Type): If one of the operands is a
11541         Raise_Expression, return type of the other operand.
11543 2014-01-24  Ed Schonberg  <schonberg@adacore.com>
11545         * sem_aggr.adb (Resolve_Record_Aggregate): If a scalar
11546         component of the record has a type with a default aspect, and
11547         the corresponding aggregate component is initiaized with a box,
11548         use the default value in the rewritten aggregate.
11550 2014-01-24  Tristan Gingold  <gingold@adacore.com>
11552         * s-interr.ads, s-interr.adb, s-interr-hwint.adb, s-interr-vms.adb,
11553         s-interr-sigaction.adb,
11554         s-interr-dummy.adb (Install_Restricted_Handlers): Add Prio parameter.
11555         * exp_ch9.adb (Make_Initialize_Protection): Add Prio parameter
11556         to the call to Install_Restricted_Handlers.
11558 2014-01-24  Emmanuel Briot  <briot@adacore.com>
11560         * prj-nmsc.adb (Check_File): Add protection when the source is
11561         not fully initialized.
11563 2014-01-24  Ed Schonberg  <schonberg@adacore.com>
11565         * sem_util.adb (Is_Post_State): In a postcondition, a selected
11566         component that denotes an implicit dereference is a reference
11567         to the post state of the subprogram.
11569 2014-01-24  Robert Dewar  <dewar@adacore.com>
11571         * sem_ch6.adb (Analyze_Subprogram_Body_Helper): SPARK_Mode OFF
11572         for generated subprograms.
11573         (Analyze_Subprogram_Specification): Ditto.
11575 2014-01-24  Vincent Celier  <celier@adacore.com>
11577         * prj-dect.adb (Check_Attribute_Allowed): Detect more forbidden
11578         attributes in package Builder of aggregate and aggregate library
11579         projects.
11580         * prj-nmsc.adb (Process_Naming_Scheme.Check.Check_Aggregate):
11581         Remove procedure (Process_Naming_Scheme.Check.Check_Aggregated):
11582         Remove parameters.  Change error message from "... externally
11583         build library ..." to "... externally built project ...".
11584         (Process_Naming_Scheme.Check): Do not do any check in aggregate
11585         project, as attribute Library_Dir and Library_Name have already
11586         been detected as forbidden.
11588 2014-01-24  Vincent Celier  <celier@adacore.com>
11590         * prj-env.adb (Find_Project): If cached project path is not in
11591         project directory, look in current directory first and use cached
11592         project path only if project is not found in project directory.
11594 2014-01-24  Robert Dewar  <dewar@adacore.com>
11596         * sem_util.adb, lib-xref.adb: Correct false positive warnings.
11598 2014-01-24  Vincent Celier  <celier@adacore.com>
11600         * projects.texi: Document that aggregate projects are only
11601         supported by gprbuild, but not by gnatmake.  Document that the
11602         only attribute Switches in package Binder of aggregate projects
11603         will be ignored if its index is not others.  Document that
11604         attribute Global_Config_File is allowed in package Binder of
11605         aggregate projects.
11607 2014-01-24  Robert Dewar  <dewar@adacore.com>
11609         * sem_prag.adb: Minor code reorganization.
11610         * sem_util.adb: Minor fix of potential latent bug in Is_LHS.
11612 2014-01-24  Pascal Obry  <obry@adacore.com>
11614         * prj-attr.adb, projects.texi, snames.ads-tmpl: Add Excluded_Patterns
11615         attribute definition.
11617 2014-01-24  Vincent Celier  <celier@adacore.com>
11619         * makeutl.adb (Queue.Insert_No_Roots): In gprbuild, do not put
11620         in the Queue the same source (same path, same multi-source index)
11621         from the same project file, to avoid compiling several times
11622         the same source.
11624 2014-01-24  Eric Botcazou  <ebotcazou@adacore.com>
11626         * einfo.ads (First_Rep_Item): Remove obsolete stuff.
11627         (Has_Gigi_Rep_Item): Likewise.
11628         * sem_prag.adb (Analyze_Pragma) <Pragma_Linker_Section>: Do not set
11629         Has_Gigi_Rep_Item for objects.
11630         * gcc-interface/decl.c (prepend_one_attribute_to): Rename into...
11631         (prepend_one_attribute): ...this.
11632         (prepend_one_attribute_pragma): New function extracted from...
11633         (prepend_attributes): ...here.  Swap the parameters for consistency.
11634         (gnat_to_gnu_entity): Adjust calls to prepend_one_attribute_to and to
11635         prepend_attributes.
11636         <object>: Deal with a pragma Linker_Section on a constant
11637         or variable.  <E_Function>: Deal with a pragma Linker_Section
11638         on a subprogram.
11639         (get_minimal_subprog_decl): Adjust calls to prepend_one_attribute_to.
11641 2014-01-24  Vincent Celier  <celier@adacore.com>
11643         * opt.ads: Minor comment update.
11645 2014-01-24  Robert Dewar  <dewar@adacore.com>
11647         * sem_prag.adb (Analyze_Input_Output): Add missing error check
11648         for junk operand.
11649         * sem_util.adb (Is_Refined_State): Add defense against junk
11650         tree from error.
11652 2014-01-24  Pascal Obry  <obry@adacore.com>
11654         * projects.texi: Removes Build_Slaves attribute documentation.
11656 2014-01-23  Robert Dewar  <dewar@adacore.com>
11658         * opt.adb (Register_Opt_Config_Switches): Save SPARK_Mode_Pragma
11659         setting.
11661 2014-01-23  Ed Schonberg  <schonberg@adacore.com>
11663         * sem_util.adb (Is_Potentially_Unevaluated): Predicate only
11664         applies to expressions that come from source.
11665         * sem_attr.adb (Analyze_Attribute, case 'Old): Improve error
11666         message.
11667         (Analyze_Attribute, case 'Loop_Entry): Apply SPARK 2014 legality
11668         rule regarding potentially unevaluated expressions, to prefix
11669         of attribute.
11671 2014-01-23  Ed Schonberg  <schonberg@adacore.com>
11673         * exp_util.adb (Make_Invqriant_Call): If type of expression is
11674         a private extension, get invariant from base type.
11676 2014-01-23  Robert Dewar  <dewar@adacore.com>
11678         * sem_util.adb, sem_attr.adb: Minor reformatting.
11680 2014-01-23  Robert Dewar  <dewar@adacore.com>
11682         * opt.adb (Save_Opt_Config_Switches): Save SPARK_Mode_Pragma
11683         (Restore_Opt_Config_Switches): Restore SPARK_Mode_Pragma.
11684         * sem.adb (Semantics): Remove save/restore of
11685         SPARK_Mode[_Pragma]. Not needed since already done in
11686         Save/Restore_Opt_Config_Switches.
11688 2014-01-23  Robert Dewar  <dewar@adacore.com>
11690         * gnat_rm.texi, einfo.adb, einfo.ads, sem_prag.adb, gnat_ugn.texi,
11691         freeze.adb, repinfo.adb, aspects.adb, aspects.ads, sem_ch13.adb:
11692         Linker_Section enhancements.
11694 2014-01-23  Tristan Gingold  <gingold@adacore.com>
11696         * gnat_rm.texi: Minor editing.
11698 2014-01-23  Robert Dewar  <dewar@adacore.com>
11700         * opt.adb (Set_Opt_Config_Switches): Reset SPARK mode for
11701         with'ed internal units.
11702         * sem.adb (Semantics): Save and restore SPARK_Mode[_Pragma].
11704 2014-01-23  Javier Miranda  <miranda@adacore.com>
11706         * lib-xref.adb (Generate_Reference): As part of processing the
11707         "end-of-spec" reference generate an extra reference to the first
11708         private entity of the package.
11709         * xr_tabls.adb (Add_Reference): No action needed for the extra
11710         'E' reference associated; similar to the processing of the
11711         'e' reference.
11713 2014-01-23  Bob Duff  <duff@adacore.com>
11715         * gnat_ugn.texi: Change "--&pp off" to "--!pp off".
11717 2014-01-23  Ed Schonberg  <schonberg@adacore.com>
11719         * sem_util.ads, sem_util.adb (Is_Potentially_Unevaluated): new
11720         predicate to implement rule given in 6.1.1 (20/3).
11721         * sem_attr.adb (Analyze_Attribute, case 'Old): Reject prefix of
11722         'Old in a postcondition, if it is potentially unevaluated and
11723         it is not an entity name.
11725 2014-01-23  Bob Duff  <duff@adacore.com>
11727         * gnat_ugn.texi: Document the new "--&pp off" feature of gnatpp.
11729 2014-01-23  Robert Dewar  <dewar@adacore.com>
11731         * gnatlink.adb (Gnatlink): Fix problem of generating bad name
11732         msg on VMS.
11734 2014-01-23  Bob Duff  <duff@adacore.com>
11736         * g-dynhta.ads: Minor comment fix.
11738 2014-01-23  Yannick Moy  <moy@adacore.com>
11740         * sem_ch6.adb (Analyze_Subprogram_Body_Helper): Inherit SPARK_Mode
11741         from spec on body only when not already inherited on spec. Set
11742         SPARK_Mode from context on body without previous spec.  *
11743         * sem_prag.adb (Analyze_Pragma): Check placement of pragma on
11744         library-level entities.  Correct retrieval of entity from
11745         declaration, for cases where the declaration is not a unit.
11746         * sem_ch12.adb (Instantiate_Object): Avoid
11747         calling Is_Volatile_Object on an empty node.
11749 2014-01-23  Robert Dewar  <dewar@adacore.com>
11751         * gnatlink.adb (Gnatlink): Check for suspicious executable file
11752         names on windows.
11754 2014-01-23  Robert Dewar  <dewar@adacore.com>
11756         * a-ngelfu.ads: Remove bad uses of AND which should be AND THEN.
11757         * sem_res.adb (Check_No_Direct_Boolean_Operators): Don't give
11758         style errors in instances.
11759         * g-dynhta.ads (Static_HTable): Comment updates.
11761 2014-01-23  Vincent Celier  <celier@adacore.com>
11763         * prj-conf.adb (Get_Or_Create_Configuration_File): Do not attempt
11764         to find a configuration project file when Config_File_Name is
11765         No_Configuration_File.
11766         * prj-conf.ads (No_Configuration_File): New constant String.
11767         * prj-pars.adb (Parse): Call Get_Or_Create_Configuration_File
11768         with Config_File_Name set to No_Configuration_File, so that
11769         no existing configuration project file will be used, and the
11770         configuration project will be only created in memory when
11771         Add_Default_GNAT_Naming_Scheme is called.
11772         * projects.texi: Minor reformatting.
11774 2014-01-23  Vincent Celier  <celier@adacore.com>
11776         * prj-conf.adb (Get_Or_Create_Configuration_File): Never parse
11777         a config project file if On_Load_Config is not null.
11778         * prj-pars.adb: Minor comment changes.
11780 2014-01-23  Ed Schonberg  <schonberg@adacore.com>
11782         * lib-xref.adb (Output_References): Output progenitors of
11783         synchronized tagged types, for source navigation.
11785 2014-01-23  Robert Dewar  <dewar@adacore.com>
11787         * exp_util.adb, sinfo.adb, sinfo.ads, sem.adb, sem_res.adb,
11788         expander.adb, exp_ch11.adb, exp_ch11.ads, sem_ch11.adb, sem_ch11.ads,
11789         sprint.adb, sprint.ads: Remove unused node N_Subprogram_Info.
11791 2014-01-23  Emmanuel Briot  <briot@adacore.com>
11793         * prj-conf.adb (Get_Or_Create_Configuration_File): call
11794         On_Load_Config later.
11796 2014-01-23  Hristian Kirtchev  <kirtchev@adacore.com>
11798         * sem_ch3.adb (Analyze_Declarations): Do not
11799         generate the spec of the late primitive in ASIS mode. Add two
11800         comments to explain the special cases when the expansion is
11801         not performed.
11803 2014-01-23  Robert Dewar  <dewar@adacore.com>
11805         * sem_util.adb (Note_Possible_Modification): Fix error of
11806         misbehaving for implicit dereference cases in -gnatc mode.
11808 2014-01-23  Emmanuel Briot  <briot@adacore.com>
11810         * prj-pars.adb: Minor reformatting.
11812 2014-01-22  Ed Schonberg  <schonberg@adacore.com>
11814         * sem_ch6.adb (Analyze_Subprogram_Body_Helper): A subprogram
11815         body generated for an expression function within a protected body
11816         needs a set of renaming declarations if the expression function
11817         comes from source.
11819 2014-01-22  Ed Schonberg  <schonberg@adacore.com>
11821         * lib-xref.adb (Get_Type_Reference): In semantics-only mode,
11822         list interface progenitor of a tagged concurrent type, for better
11823         source navigation.
11825 2014-01-22  Robert Dewar  <dewar@adacore.com>
11827         * lib.adb (In_Extended_Main_Code_Unit): Return False for
11828         Standard_Location.
11829         (In_Extended_Main_Source_Unit): Return False for Standard_Location.
11830         * lib.ads (In_Extended_Main_Code_Unit): Add documentation on
11831         treatment of Slocs No_Location and Standard_Location.
11832         * restrict.adb (Check_Restriction_No_Dependence): Explicitly
11833         check for entity with Standard_Location Sloc, rather than relying
11834         on Lib routines to do that.
11835         * sem_res.adb (Resolve_Call): Implement SPARK_05 restriction
11836         that a call cannot occur before a later occuring body within
11837         the same unit.
11839 2014-01-22  Thomas Quinot  <quinot@adacore.com>
11841         * rtsfind.adb: Update comment.
11843 2014-01-22  Hristian Kirtchev  <kirtchev@adacore.com>
11845         * sem_aux.ads, sem_aux.adb (Is_Body): New routine.
11846         * sem_ch3.adb (Analyze_Declarations): Add local variable
11847         Body_Seen. Generate the spec of a late controlled
11848         primitive body that is about to freeze its related type.
11849         (Handle_Late_Controlled_Primitive): New routine.
11851 2014-01-22  Robert Dewar  <dewar@adacore.com>
11853         * a-stream.adb: Minor reformatting.
11855 2014-01-22  Ed Schonberg  <schonberg@adacore.com>
11857         * sem_ch8.adb (From_Actual_Package): Introduce a recursive
11858         sub-procedure Declared_In_Actual to handle properly the visibility
11859         of actuals in actual packages, that are themselves actuals to a
11860         actual package of the current instance. This mimics properly the
11861         visibility of formals of formal packages declared with a box,
11862         within the corresponding generic unit.
11864 2014-01-22  Robert Dewar  <dewar@adacore.com>
11866         * checks.adb: Do not assume that a volatile variable is valid.
11868 2014-01-22  Thomas Quinot  <quinot@adacore.com>
11870         * g-catiio.ads (Image, Value): Clarify that these functions
11871         operate in the local time zone.  Minor documentation update.
11873 2014-01-22  Thomas Quinot  <quinot@adacore.com>
11875         * csets.adb, csets.ads, opt.ads: Minor documentation fixes.
11877 2014-01-22  Robert Dewar  <dewar@adacore.com>
11879         * sem_aux.adb, sem_aux.ads, sem_ch3.adb (Has_Unconstrained_Elements):
11880         Moved to sem_aux.adb.
11882 2014-01-22  Robert Dewar  <dewar@adacore.com>
11884         * vms_data.ads: Minor reformatting.
11886 2014-01-22  Robert Dewar  <dewar@adacore.com>
11888         * debug.adb: Document messages affected by -gnatd.E including
11889         the new ones that relate to late definition of equality.
11890         * sem_ch6.adb (Check_Untagged_Equality): In Ada 2012 mode, if
11891         debug flag -gnatd.E is set, then generate warnings rather than
11892         errors.
11893         (Check_Untagged_Equality): In earlier versions of Ada,
11894         generate warnings if Warn_On_Ada_2012_Incompatibility flag is set.
11896 2014-01-22  Robert Dewar  <dewar@adacore.com>
11898         * sem_prag.adb (Usage_Error): Output additional messages for
11899         unconstrained OUT parameters lacking an input dependency.
11901 2014-01-22  Robert Dewar  <dewar@adacore.com>
11903         * sem_ch4.adb: Minor reformatting.
11905 2014-01-22  Robert Dewar  <dewar@adacore.com>
11907         * restrict.ads: Minor reformatting.
11908         * sem_res.adb (Resolve_Call): Check for SPARK_05 restriction that
11909         forbids a call from within a subprogram to the same subprogram.
11911 2014-01-22  Thomas Quinot  <quinot@adacore.com>
11913         * a-stream.ads (Read_SEA, Write_SEA): New subprograms, optimized
11914         stream attributes for Stream_Element_Array.
11915         * a-stream.adb (Read_SEA, Write_SEA): Bodies for the above.
11916         * rtsfind.adb (Check_CRT): Do not reject a reference to an entity
11917         defined in the current scope.
11919 2014-01-22  Robert Dewar  <dewar@adacore.com>
11921         * debug.adb, exp_ch4.adb, erroutc.adb: Minor reformatting.
11923 2014-01-22  Thomas Quinot  <quinot@adacore.com>
11925         * sem_ch7.adb, sem_ch8.adb, exp_ch3.adb: Minor reformatting.
11927 2014-01-22  Thomas Quinot  <quinot@adacore.com>
11929         * sem_ch3.adb (Analyze_Object_Declaration): For a constant
11930         declaration initialized with a function call, whose type
11931         has variable size, need to remove side effects so that the
11932         initialization expression becomes a dereference of a temporary
11933         reference to the function result.
11935 2014-01-22  Yannick Moy  <moy@adacore.com>
11937         * errout.adb (Initialize): Remove trick to add dummy entry
11938         in Warnings table.
11939         * erroutc.adb (Set_Warnings_Mode_Off,
11940         Set_Warnings_Mode_On): Do nothing if warnings are suppressed by
11941         command line switch.
11942         * opt.ads (Warning_Mode): Document behavior
11943         wrt pragma Warnings, in normal mode and in GNATprove_Mode.
11945 2014-01-22  Robert Dewar  <dewar@adacore.com>
11947         * sem_ch3.adb, errout.adb, erroutc.adb: Minor reformatting.
11949 2014-01-22  Robert Dewar  <dewar@adacore.com>
11951         * sem_ch13.adb (Check_Pool_Size_Clash): New procedure
11952         (Analyze_Attribute_Definition_Clause, case Storage_Pool): call
11953         Check_Pool_Size_Clash (Analyze_Attribute_Definition_Clause,
11954         case Storage_Size): call Check_Pool_Size_Clash.
11956 2014-01-22  Robert Dewar  <dewar@adacore.com>
11958         * sem_ch3.adb, exp_util.adb, sem_dim.adb, sem_elab.adb, sem_ch8.adb,
11959         sem_eval.ads: Minor reformatting.
11961 2014-01-22  Thomas Quinot  <quinot@adacore.com>
11963         * sem_eval.adb (Compile_Time_Known_Bounds): Return False for
11964         Any_Composite to prevent cascaded errors.
11966 2014-01-22  Yannick Moy  <moy@adacore.com>
11968         * errout.adb (Initialize): Do not insert special entry in Warnings
11969         table in GNATprove_Mode.
11970         * erroutc.adb (Set_Warnings_Mode_On): Add info in Warnings table in
11971         GNATprove_Mode.
11972         * gnat1drv.adb (Adjust_Global_Switches): Do not suppress frontend
11973         warnings anymore.
11975 2014-01-22  Robert Dewar  <dewar@adacore.com>
11977         * sem_prag.adb (Analyze_Initializes_In_Decl_Part): Handle null
11978         initializes case.
11980 2014-01-22  Robert Dewar  <dewar@adacore.com>
11982         * snames.ads-tmpl: Update header.
11984 2014-01-22  Thomas Quinot  <quinot@adacore.com>
11986         * exp_util.adb (Insert_Actions): When inserting actions on a
11987         short circuit operator that has already been analyzed, do not park
11988         actions in node; instead introduce an N_Expression_With_Actions
11989         and insert actions immediately.
11990         Add guard for unexpected case of climbing up through statement
11991         in Actions list of an N_Expression_With_Actions.
11992         * sem_elab.adb (Insert_Elab_Check): Remove complex
11993         specialized circuitry for the case where the context is already
11994         analyzed, as it is not needed and introduces irregularities in
11995         finalization. Instead rely on the above change to Insert_Actions
11996         to ensure that late insertion on short circuit operators works
11997         as expected.
11999 2014-01-22  Ed Schonberg  <schonberg@adacore.com>
12001         * sem_ch4.adb (Operator_Check): Improve error message when an
12002         operand of concatenation is an access type.
12004 2014-01-22  Thomas Quinot  <quinot@adacore.com>
12006         * sem_dim.adb (Analyze_Dimension_Identifier): Add guard against
12007         cascaded error.
12009 2014-01-22  Ed Schonberg  <schonberg@adacore.com>
12011         * sem_ch8.adb (Find_Selected_Component): Handle properly the case
12012         of an expanded name in a proper body, whose prefix is a package
12013         in the context of the proper body, when there is a homonym of
12014         the package declared in the parent unit.
12016 2014-01-22  Robert Dewar  <dewar@adacore.com>
12018         * sem_warn.adb (Check_Use_Clause): Don't give no entities used
12019         msg if errors found.
12020         (Check_One_Unit): Same change.
12022 2014-01-22  Robert Dewar  <dewar@adacore.com>
12024         * ug_words: Add missing/wrong entries for VMS warning switches.
12025         * sem_prag.adb (Check_Duplicate_Pragma): Avoid flagging parent type.
12027 2014-01-22  Jerome Guitton  <guitton@adacore.com>
12029         * mlib-tgt-specific-vxworks.adb (Get_Target_Suffix): Replace xscale by
12030         arm.
12032 2014-01-22  Robert Dewar  <dewar@adacore.com>
12034         * gnat_rm.texi, gnat_ugn.texi: Document passive task optimization
12036 2014-01-22  Eric Botcazou  <ebotcazou@adacore.com>
12038         * gcc-interface/Makefile.in: Minor fixes.
12040 2014-01-21  Robert Dewar  <dewar@adacore.com>
12042         * par-ch4.adb (P_If_Expression): Rewritten to improve error recovery.
12043         * par-ch5.adb (P_Condition): New version with expression prescanned.
12044         * par.adb (P_Condition): New version with expression prescanned.
12046 2014-01-21  Robert Dewar  <dewar@adacore.com>
12048         * gnat_rm.texi: Document that Allow_Integer_Address is ignored
12049         if Address is not a private type.
12050         * sem_prag.adb (Analyze_Pragma, case Allow_Integer_Address):
12051         Ignore pragma if System.Address is not a private type.
12053 2014-01-21  Arnaud Charlet  <charlet@adacore.com>
12055         * namet.ads (Name_Len): Initialize to 0 to avoid accessing an
12056         uninitialized value.
12058 2014-01-21  Thomas Quinot  <quinot@adacore.com>
12060         * gnat_rm.texi (Scalar_Storage_Order): Update documentation.
12062 2014-01-21  Ed Schonberg  <schonberg@adacore.com>
12064         * sem_ch12.adb (Set_Instance_Env): In Ada 2012 mode, preserve
12065         the value of Assertions_Enabled flag when compiling an instance of
12066         an internal unit. This facilitates the use of pre/postconditions
12067         in generic internal units, such as the new elementary function
12068         libraries.
12070 2014-01-21  Robert Dewar  <dewar@adacore.com>
12072         * exp_aggr.adb: Minor reformatting.
12073         * sem_attr.adb: Minor reformatting.
12074         * sem_res.adb: Minor comment addition.
12075         * einfo.adb: Minor comment updates.
12076         * freeze.adb: Minor reformatting and code reorganization.
12078 2014-01-21  Ed Schonberg  <schonberg@adacore.com>
12080         * par-ch4.adb (P_If_Expression): Handle more gracefully an
12081         elsif clause that does not have an else part.
12083 2014-01-21  Robert Dewar  <dewar@adacore.com>
12085         * checks.adb, sem_util.ads, sem_ch4.adb: Minor reformatting.
12086         * gcc-interface/Makefile.in: clean up target pairs.
12088 2014-01-21  Pascal Obry  <obry@adacore.com>
12090         * projects.texi: Minor typo fix.
12092 2014-01-21  Thomas Quinot  <quinot@adacore.com>
12094         * freeze.adb (Check_Component_Storage_Order): If a record type
12095         has an explicit Scalar_Storage_Order attribute definition clause,
12096         reject any component that itself is of a composite type and does
12097         not have one.
12099 2014-01-21  Ed Schonberg  <schonberg@adacore.com>
12101         * sem_ch10.adb (Generate_Parent_Reference): Make public so it
12102         can be used to generate proper cross-reference information for
12103         the parent units of proper bodies.
12105 2014-01-21  Thomas Quinot  <quinot@adacore.com>
12107         * exp_pakd.adb (Expand_Packed_Element_Set,
12108         Expand_Packed_Element_Reference): No byte swapping required in
12109         the front-end for the case of a reverse storage order array,
12110         as this is now handled uniformly in the back-end.  However we
12111         still need to swap back an extracted element if it is itself a
12112         nested composite with reverse storage order.
12114 2014-01-21  Hristian Kirtchev  <kirtchev@adacore.com>
12116         * sem_prag.adb (Analyze_External_Property): Add processing for "others".
12117         (Analyze_Pragma): Update the grammar of pragma Abstract_State to
12118         include "others".
12120 2014-01-21  Arnaud Charlet  <charlet@adacore.com>
12122         * gnat_ugn.texi: Minor updates.
12124 2014-01-21  Thomas Quinot  <quinot@adacore.com>
12126         * exp_pakd.adb: Update comment, minor reformatting.
12128 2014-01-21  Hristian Kirtchev  <kirtchev@adacore.com>
12130         * sem_ch3.adb (Analyze_Variable_Contract): Trigger the volatile
12131         object check when SPARK_Mode is on.
12132         * sem_ch6.adb (Process_Formals): Trigger the volatile object
12133         check when SPARK_Mode is on.
12134         * sem_ch12.adb (Instantiate_Object): Trigger the volatile object
12135         check when SPARK_Mode is on.
12136         * sem_ch13.adb (Analyze_Aspect_Specifications): Insert the
12137         corresponding pragma of aspect SPARK_Mode in the visible
12138         declarations of a package declaration.
12139         * sem_prag.adb (Analyze_Pragma): Trigger the volatile object
12140         check when SPARK_Mode is on.
12141         * sem_res.adb (Resolve_Actuals): Trigger the volatile object
12142         check when SPARK_Mode is on.
12143         (Resolve_Entity_Name): Trigger
12144         the volatile object check when SPARK_Mode is on.
12146 2014-01-21  Robert Dewar  <dewar@adacore.com>
12148         * sem_ch3.adb, sem_prag.adb, sem_prag.ads, sem_ch12.adb, sem_res.adb,
12149         sem_ch6.adb, a-except-2005.adb: Minor reformatting.
12151 2014-01-21  Ed Schonberg  <schonberg@adacore.com>
12153         * exp_ch3.adb (Expand_N_Object_Declaration): When a class-wide
12154         object is declared, it is rewritten as a renaming of an dynamic
12155         expression that wraps the initial value.  The renaming declaration
12156         is first given an internal name, to prevent collisions with the
12157         entity already declared, and then the name is modified to reflect
12158         the original one. the modification of the name must preserve
12159         the source location of the original, to prevent spurious errors
12160         when compiling with style checks if the declaration involves
12161         more than one entity.
12163 2014-01-21  Hristian Kirtchev  <kirtchev@adacore.com>
12165         * aspects.adb Add entries for Async_Readers, Async_Writers,
12166         Effective_Reads and Effective_Writes in table Canonical_Aspect.
12167         * aspects.ads Add entries for Async_Readers, Async_Writers,
12168         Effective_Reads and Effective_Writes in tables Aspect_Id,
12169         Aspect_Names, Aspect_Delay and Implementation_Defined_Aspect.
12170         * atree.adb (Ekind_In): New version with 8 parameters.
12171         (Node34): New routine.
12172         (Set_Node34): New routine.
12173         * atree.ads (Ekind_In): New version with 8 parameters.
12174         (Node34): New routine.
12175         (Set_Node34): New routine.
12176         * einfo.adb Contract is now Node34.
12177         (Contract): Update the assertion and node usage.
12178         (Get_Pragma): Include pragmas Async_Readers, Async_Writers,
12179         Effective_Reads and Effective_Writes.
12180         (Set_Contract): Update the assertion and node usage.
12181         (Write_Field24_Name): Remove the output for a contract.
12182         (Write_Field34_Name): Add output for a contract.
12183         * einfo.ads Contract is now Node34. Update the comment on
12184         attribute usage and related node structures.
12185         (Get_Pragma): Update the comment on usage.
12186         * par-prag.adb (Prag): Pragmas Async_Readers, Async_Writers,
12187         Effective_Reads and Effective_Writes do not require special
12188         processing by the parser.
12189         * sem_ch3.adb (Analyze_Variable_Contract): New routine.
12190         (Analyze_Declarations): Analyze the contract of a variable at
12191         the end of the declarative region.
12192         (Analyze_Object_Declaration): Create a contract for a variable.
12193         * sem_ch6.adb (Analyze_Subprogram_Contract): Update the retrieval
12194         of classification pragmas.
12195         (Process_Formals): Detect an illegal
12196         use of a volatile object as a formal in a function.
12197         * sem_ch12.adb (Instantiate_Object): Detect an illegal use of
12198         a volatile object as an actual in generic instantiation.
12199         * sem_prag.adb Add entries for Async_Readers, Async_Writers,
12200         Effective_Reads and Effective_Writes in table Sig_Flags.
12201         (Analyze_External_State_In_Decl_Part): New routine.
12202         (Analyze_Global_Item): Detect an illegal use of a volatile object
12203         as a global item of a function.
12204         (Analyze_Pragma): Reimplement
12205         pragma Abstract_State. Add support for pragmas Async_Readers,
12206         Async_Writers, Effective_Reads and Effective_Writes.
12207         (Check_External_Properties): New routine.
12208         * sem_prag.ads (Analyze_External_State_In_Decl_Part): New routine.
12209         (Check_External_Properties): New routine.
12210         * sem_res.adb (Resolve_Actuals): Detect an illegal use of a
12211         volatile object as an actual in a call.
12212         (Resolve_Entity_Name):
12213         Add local variables Par, Prev and Usage_OK. Detect illegal
12214         contexts of volatile objects.
12215         * sem_util.adb (Add_Contract_Item): Add support for
12216         pragmas associated with the contract of a variable.
12217         (Async_Readers_Enabled): New routine.
12218         (Async_Writers_Enabled): New routine.
12219         (Effective_Reads_Enabled): New routine.
12220         (Effective_Writes_Enabled): New routine.
12221         (Has_Enabled_Property):
12222         New routine.
12223         (Is_Unchecked_Conversion_Instance): New routine.
12224         (Is_Volatile_Object): Add support for entities that may denote
12225         a volatile object.
12226         * sem_util.ads (Add_Contract_Item): Update the
12227         comment on usage.
12228         (Async_Readers_Enabled): New routine.
12229         (Async_Writers_Enabled): New routine.
12230         (Effective_Reads_Enabled): New routine.
12231         (Effective_Writes_Enabled): New routine.
12232         (Is_Unchecked_Conversion_Instance): New routine.
12233         * sinfo.ads Update the comment on the structure of N_Contract.
12234         * snames.ads-tmpl Add predefined names for Async_Readers,
12235         Async_Writers, Effective_Reads and Effective_Writes. Add
12236         pragma ids for Async_Readers, Async_Writers, Effective_Reads
12237         and Effective_Writes.
12239 2014-01-21  Robert Dewar  <dewar@adacore.com>
12241         * exp_ch4.adb (Eval_Op_Expon): Use CRT_Safe_Compile_Time_Known_Value
12242         * sem_eval.adb (Compile_Time_Known_Value): Remove special
12243         handling of CRT mode (CRT_Safe_Compile_Time_Known_Value): New
12244         function (Eval_Op_Expon): Add CRT_Safe in call to Test_Foldable
12245         (Test_Foldable): Add CRT_Safe parameter
12246         * sem_eval.ads (Compile_Time_Known_Value): Remove special
12247         handling of CRT mode.
12248         (CRT_Safe_Compile_Time_Known_Value): New function.
12250 2014-01-21  Robert Dewar  <dewar@adacore.com>
12252         * sem_prag.adb (Analyze_Pragma, case SPARK_Mode): Fix problem
12253         with pragma or aspect that applies to package spec or subprogram
12254         spec.
12256 2014-01-21  Robert Dewar  <dewar@adacore.com>
12258         * exp_aggr.adb: Minor reformatting.
12260 2014-01-21  Johannes Kanig  <kanig@adacore.com>
12262         * gnat1drv.adb (Gnat1drv) remove obsolete reference to -gnatd.H.
12264 2014-01-21  Bob Duff  <duff@adacore.com>
12266         * gnat_ugn.texi: Document the "checks" attribute in gnat2xml.
12268 2014-01-21  Steve Baird  <baird@adacore.com>
12270         * gnat_rm.texi: Improve description of SPARK_Mode pragma.
12272 2014-01-21  Vincent Celier  <celier@adacore.com>
12274         * prj-part.adb (Parse_Single_Project): Accept to extend a project
12275         if it has only be imported by an project being extended. When a
12276         project that has only been imported by a project being extended
12277         is imported by another project that is not being extended,
12278         reset the previous indication, so that it will be an error if
12279         this project is extended later.
12280         * prj-tree.adb (Create_Project): Include component From_Extended
12281         in table Projects_HT
12282         * prj-tree.ads (Project_Name_And_Node): New Boolean component
12283         From_Extended
12285 2014-01-21  Robert Dewar  <dewar@adacore.com>
12287         * atree.ads, atree.adb: Add Node33 and Set_Node33.
12288         * einfo.ads, einfo.adb (SPARK_Pragma): New field (SPARK_Aux_Pragma):
12289         New field (SPARK_Pragma_Inherited): New flag
12290         (SPARK_Aux_Pragma_Inherited): New flag (SPARK_Mode_Pragmas):
12291         Removed.
12292         * lib.ads, lib.adb: Remove SPARK_Mode_Pragma, no longer used.
12293         * opt.ads (SPARK_Mode_Pragma): New global variable.
12294         * sem.ads: Add Save_SPARK_Mode_Pragma field to Scope_Stack_Entry.
12295         * sem_ch3.adb: Use new SPARK_Mode data structures.
12296         * sem_ch6.adb: Set SPARK_Mode fields in subprogram specs and bodies.
12297         * sem_ch7.adb: Set SPARK_Mode fields in package spec and body entities.
12298         * sem_ch8.adb (Push_Scope): Save SPARK_Mode_Pragma.
12299         (Pop_Scope): Restore SPARK_Mode_Pragma.
12300         * sem_prag.adb (Analyze_Pragma, case SPARK_Mode): Rewrite for
12301         new data structures.
12303 2014-01-21  Arnaud Charlet  <charlet@adacore.com>
12305         * back_end.adb: Undo previous change, not needed. Minor reformatting.
12307 2014-01-21  Thomas Quinot  <quinot@adacore.com>
12309         * exp_ch5.adb: Fix comment.
12310         * switch-c.adb: Minor comment update.
12311         * exp_ch3.adb: Minor reformatting.
12313 2014-01-21  Arnaud Charlet  <charlet@adacore.com>
12315         * back_end.adb (Scan_Compiler_Arguments): Do not store object
12316         filename in gnatprove mode.
12318 2014-01-21  Thomas Quinot  <quinot@adacore.com>
12320         * sinfo.ads (No_Ctrl_Actions): Clarify documentation (flag also
12321         suppresses usage of primitive _assign for tagged types).
12322         * exp_aggr.adb (Build_Array_Aggr_Code.Gen_Assign): Set
12323         No_Ctrl_Actions for a tagged type that does not require
12324         finalization, as we want to disable usage of _assign (which
12325         may cause undesirable discriminant checks on an uninitialized,
12326         invalid target).
12328 2014-01-21  Ed Schonberg  <schonberg@adacore.com>
12330         * sem_prag.adb: Reject invariant'class on completion.
12332 2014-01-21  Javier Miranda  <miranda@adacore.com>
12334         * exp_ch3.adb (Build_Init_Procedure): For
12335         derivations of interfaces, do not move the the initialization
12336         of the _parent field since such assignment is not generated.
12338 2014-01-21  Ed Schonberg  <schonberg@adacore.com>
12340         * sem_res.adb (Rewrite_Renamed_Operator): Do not replace entity
12341         with the operator it renames if we are within an expression of
12342         a pre/postcondition, because the expression will be reanalyzed
12343         at a later point, and the analysis of the renaming may affect
12344         the visibility of the operator when in an instance.
12346 2014-01-21  Robert Dewar  <dewar@adacore.com>
12348         * sinfo.ads, sinfo.adb: Change Do_Discriminant_Check to use new Flag1.
12349         Add this flag to type conversion nodes and assignment nodes.
12350         * treepr.adb: Deal properly with Flag 1,2,3.
12351         * treeprs.adt: Minor comment update.
12353 2014-01-21  Robert Dewar  <dewar@adacore.com>
12355         * sem_eval.adb (Compile_Time_Known_Value): Add Ignore_CRT
12356         parameter.
12357         * sem_eval.ads (Compile_Time_Known_Value): Add Ignore_CRT
12358         parameter, completely rewrite spec.
12360 2014-01-21  Ed Schonberg  <schonberg@adacore.com>
12362         * sem_ch10.adb (Install_Withed_Unit): If the unit is a subprogram
12363         instance that is inlined, it may have been rewritten as a wrapper
12364         package. In that case the unit that must be made visible is the
12365         related instance of the package.
12367 2014-01-21  Arnaud Charlet  <charlet@adacore.com>
12369         * exp_ch9.adb (Expand_N_Selective_Accept.Add_Accept): Refine
12370         previous change in codepeer mode.
12372 2014-01-21  Arnaud Charlet  <charlet@adacore.com>
12374         * exp_ch9.adb (Expand_N_Selective_Accept.Add_Accept): Always add
12375         call to Abort_Undefer, as expected by the runtime.
12376         * s-tasren.adb (Local_Complete_Rendezvous): Replace
12377         Defer_Abort_Nestable by Defer_Abort, since we do not expect abort to be
12378         deferred at this point. Update comments.
12380 2014-01-21  Thomas Quinot  <quinot@adacore.com>
12382         * exp_ch4.adb, exp_ch5.adb, checks.adb: Minor reformatting.
12384 2014-01-21  Arnaud Charlet  <charlet@adacore.com>
12386         * switch-c.adb, usage.adb, gnat_ugn.texi: Mark -gnates as internal,
12387         remove from doc.
12389 2014-01-21  Robert Dewar  <dewar@adacore.com>
12391         * switch-c.adb, usage.adb, atree.adb, atree.ads: Minor reformatting.
12393 2014-01-21  Thomas Quinot  <quinot@adacore.com>
12395         * atree.adb, atree.ads (Num_Extension_Nodes): Switch to Node_Id, since
12396         this is value is used in Node_Id arithmetic operations.
12397         (Copy_Node, Exchange_Entities): Use loops indexed by Num_Extension_Nodes
12398         instead of hard-coded unrolled code.
12400 2014-01-21  Yannick Moy  <moy@adacore.com>
12402         * gnat1drv.adb: Minor code cleanup, removing useless code.
12404 2014-01-21  Arnaud Charlet  <charlet@adacore.com>
12406         * opt.ads (SPARK_Switches_File_Name): New.
12407         * switch-c.adb (Scan_Front_End_Switches): Add handling of -gnates=xxx *
12408         * usage.adb (Usage): Document -gnates, in gnatprove mode only.
12409         * gnat_ugn.texi: Document -gnates.
12411 2014-01-21  Yannick Moy  <moy@adacore.com>
12413         * errout.adb (Special_Msg_Delete): Update comment. Remove
12414         special case for GNATprove which should not ignore mismatch
12415         in sizes for representation clauses.
12416         * sem_prag.adb (Analyze_Pragma): Remove special case for GNATprove
12417         which should not ignore pragma Pack.
12419 2014-01-21  Ed Schonberg  <schonberg@adacore.com>
12421         * sem_ch4.adb: Code clean up.
12423 2014-01-21  Steve Baird  <baird@adacore.com>
12425         * gnat_rm.texi: Improve GNAT RM description of SPARK_Mode pragma.
12427 2014-01-21  Robert Dewar  <dewar@adacore.com>
12429         * gcc-interface/gigi.h: Get Flags array address.
12430         * gcc-interface/trans.c: Acquire Flags array address.
12431         * atree.adb: Add support for Flags array and Flag0,1,2,3.
12432         * atree.ads: Add support for Flags array and Flag0,1,2,3.
12433         * atree.h: Add support for Flags array and Flag0,1,2,3.
12434         * back_end.adb: Pass Flags array address to gigi.
12436 2014-01-21  Ed Schonberg  <schonberg@adacore.com>
12438         * sem_ch8.adb (Attribute_Renaming): Transfer original attribute
12439         reference to generated body so that legality checks on stream
12440         attributes are properly applied. If type is tagged and already
12441         frozen, insert generated body at the point of the renaming
12442         declaration.
12444 2014-01-21  Ed Schonberg  <schonberg@adacore.com>
12446         * sem_ch12.adb: Code clean up.
12447         * sem_ch8.adb: Minor reformatting
12449 2014-01-20  Robert Dewar  <dewar@adacore.com>
12451         * checks.adb: Check SPARK_Mode instead of GNATProve_Mode for
12452         converting warnings on inevitable exceptions to errors.
12453         * exp_ch4.adb: Check SPARK_Mode instead of GNATProve_Mode for
12454         converting warnings on inevitable exceptions to errors.
12455         * opt.adb (SPARK_Mode_Config): Handled like other config flags
12456         * opt.ads (SPARK_Mode_Type): Moved here from types (renamed from
12457         SPARK_Mode_Id) (SPARK_Mode_Type): Add pragma Ordered, remove
12458         SPARK_ from names (SPARK_Mode): New flag (SPARK_Mode_Config):
12459         New flag (Config_Switches_Type): Add SPARK_Mode field
12460         * sem.adb: Minor code reorganization (remove unnecessary with)
12461         * sem.ads (Scope_Stack_Entry): Add Save_SPARK_Mode field
12462         * sem_aggr.adb: Check SPARK_Mode instead of GNATProve_Mode for
12463         converting warnings on inevitable exceptions to errors.
12464         * sem_attr.adb: Check SPARK_Mode instead of GNATProve_Mode for
12465         converting warnings on inevitable exceptions to errors.
12466         * sem_ch3.adb: Check SPARK_Mode instead of GNATProve_Mode for
12467         converting warnings on inevitable exceptions to errors.
12468         * sem_ch4.adb: Check SPARK_Mode instead of GNATProve_Mode for
12469         converting warnings on inevitable exceptions to errors.
12470         * sem_ch6.adb (Analyze_Subprogram_Body_Helper): Reset SPARK_Mode
12471         from spec if needed
12472         * sem_ch7.adb (Analyze_Package_Body_Helper): Reset SPARK_Mode
12473         from spec if needed
12474         * sem_ch8.adb (Push_Scope): Save SPARK_Mode (Pop_Scope):
12475         Restore SPARK_Mode
12476         * sem_elab.adb: Check SPARK_Mode instead of GNATProve_Mode for
12477         converting warnings on inevitable exceptions to errors.
12478         * sem_prag.adb (Get_SPARK_Mode_From_Pragma): New function
12479         (Get_SPARK_Mode_Id): Removed (Get_SPARK_Mode_Type): New name
12480         of Get_SPARK_Mode_Id
12481         * sem_prag.ads (Get_SPARK_Mode_From_Pragma): New function
12482         * sem_res.adb: Check SPARK_Mode instead of GNATProve_Mode for
12483         converting warnings on inevitable exceptions to errors.
12484         * sem_util.adb: Check SPARK_Mode instead of GNATProve_Mode for
12485         converting warnings on inevitable exceptions to errors.
12486         * types.ads (SPARK_Mode_Id): Moved to opt.ads and renamed
12487         SPARK_Mode_Type
12489 2014-01-20  Ed Schonberg  <schonberg@adacore.com>
12491         * sem_ch13.adb: Add semantic information to rewritten type
12492         reference.
12494 2014-01-20  Ed Schonberg  <schonberg@adacore.com>
12496         * exp_ch5.adb (Expand_N_Assignment_Statement): If both sides
12497         are of a type with unknown discriminants, convert both to the
12498         underlying view of the type, so that the proper constraint check
12499         can be applied to the right-hand side.
12501 2014-01-20  Robert Dewar  <dewar@adacore.com>
12503         * atree.adb (Copy_Node): Fix failure to copy last component
12504         (Exchange_Entities): Fix failure to exchange last entity
12506 2014-01-20  Ed Schonberg  <schonberg@adacore.com>
12508         * sem_ch12.adb: Code clean up.
12510 2014-01-20  Robert Dewar  <dewar@adacore.com>
12512         * gnat_rm.texi, sem_ch4.adb: Minor reformatting.
12514 2014-01-20  Ed Schonberg  <schonberg@adacore.com>
12516         * sem_ch4.adb (Analyze_Quantified_Expression): If after
12517         pre-analysis  the loop parameter specification has been
12518         rewritten as a iterator specification, propagate the change to
12519         the quantified expression, for ASIS navigtion needs.
12521 2014-01-20  Vincent Celier  <celier@adacore.com>
12523         * par-ch10.adb: Minor error message change: escape [ and ].
12525 2014-01-20  Robert Dewar  <dewar@adacore.com>
12527         * checks.adb: Make warnings on exceptions into errors in GNATprove mode.
12528         * errout.adb: Implement [ and ] insertion characters.
12529         * errout.ads: Document new [ and ] insertion characters.
12530         * sem_ch12.adb, restrict.adb, frontend.adb, exp_ch7.adb: Minor
12531         addition of ??? comment.
12532         * lib-xref.adb, exp_util.adb, gnat1drv.adb: Minor reformatting
12533         * exp_ch4.adb, sem_ch3.adb, sem_ch4.adb, sem_ch6.adb, sem_elab.adb,
12534         sem_eval.adb, sem_res.adb, sem_util.adb, sem_attr.adb, sem_aggr.adb:
12535         Make warnings on exceptions into errors in GNATprove mode.
12536         * sem_dim.adb: Minor reformatting throughout Quote [ and ]
12537         in error messages.
12539 2014-01-20  Ed Schonberg  <schonberg@adacore.com>
12541         * sem_ch13.adb: Code clean up.
12543 2014-01-20  Robert Dewar  <dewar@adacore.com>
12545         * errout.ads, errout.adb: Implement >? >x? >X? sequences in error
12546         messages.
12547         * sem_ch6.adb (Check_Statement_Sequence): Missing return is an
12548         error in GNATprove mode.
12550 2014-01-20  Ed Schonberg  <schonberg@adacore.com>
12552         * par-ch4.adb (Is_Parameterless_Attribute): The Ada2012 attribute
12553         reference 'Old takes no parameters, and thus can appear as a
12554         prefix of a slice.
12556 2014-01-20  Eric Botcazou  <ebotcazou@adacore.com>
12558         * exp_aggr.adb: Fix minor typos.
12560 2014-01-20  Ed Schonberg  <schonberg@adacore.com>
12562         * sem_attr.adb (Analyze_Attribute, case 'Constrained): In an
12563         instance the attribute is legal, and its value is determined
12564         statically if the type has no discriminants. This choice is
12565         more useful than rechecking the legality rule in the instance,
12566         is consistent with older usage, and is also consistent with all
12567         existing tests.
12569 2014-01-20  Arnaud Charlet  <charlet@adacore.com>
12571         * sem_cat.adb (Validate_Static_Object_Name): Change error into
12572         warning in Relaxed_Semantic_Mode.
12574 2014-01-20  Ed Schonberg  <schonberg@adacore.com>
12576         * sem_attr.adb: Code and comments cleanup.
12578 2014-01-20  Yannick Moy  <moy@adacore.com>
12580         * debug.adb Free debug flags -gnatd.D, -gnatd.G and -gnatd.V *
12581         * errout.adb (Compilation_Errors): Remove special handling in
12582         GNATprove mode.
12583         * gnat1drv.adb (Adjust_Global_Switches): Remove handling of the
12584         removed debug flags.
12585         * gnat_rm.texi: Initial documentation for Abstract_State, Depends,
12586         Global, Initial_Condition, Initializes and Refined_State pragmas and
12587         aspects.
12588         * opt.ads (Frame_Condition_Mode, Formal_Extensions,
12589         SPARK_Strict_Mode): Remove global flags.
12590         * sem_ch3.adb (Analyze_Object_Declaration): Check of no hidden state
12591         always performed now, on packages declaring a null state.
12592         (Signed_Integer_Type_Declaration): Remove ill-designed attempt
12593         at providing pedantic mode for bounds of integer types.
12594         * sem_ch4.adb (Analyze_Quantified_Expression): Warning on suspicious
12595         "some" quantified expression now issued under control of -gnatw.t,
12596         like the other warning on unused bound variable.
12597         * sem_prag.adb (Check_Precondition_Postcondition): Remove useless test
12598         on removed flag.
12599         (Analyze_Pragma): Remove tests for SPARK 2014
12600         pragmas, not officially allowed by GNAT.
12602 2014-01-20  Hristian Kirtchev  <kirtchev@adacore.com>
12604         * sem_prag.adb (Analyze_Pragma): Ensure that
12605         the sole argument of pragmas Abstract_State, Contract_Cases,
12606         Depends, Global and Initializes in in aggregate form.
12607         (Analyze_Refined_Pragma): Ensure that the sole argument of
12608         pragmas Refined_Depends, Refined_Global and Refined_State is in
12609         aggregate form.
12610         (Ensure_Aggregate_Form): New routine.
12612 2014-01-20  Doug Rupp  <rupp@adacore.com>
12614         * sem_attr.adb (Analyze_Attribute): case
12615         Attribute_Constrained => treat all prefixes as legal for Declib
12616         compatibility.
12618 2014-01-20  Hristian Kirtchev  <kirtchev@adacore.com>
12620         * sem_prag.adb (Check_Mode): Reimplement the routine.
12621         (Find_Mode): New routine.
12623 2014-01-20  Robert Dewar  <dewar@adacore.com>
12625         * sem_ch4.adb (Operator_Check): Handle additional
12626         Allow_Integer_Address cases.
12628 2014-01-20  Robert Dewar  <dewar@adacore.com>
12630         * gnat_rm.texi (Allow_Integer_Address): Remove note about not
12631         allowed if address is non-private, no longer true.
12632         * sem_prag.adb (Analyze_Pragma, case Allow_Integer_Address):
12633         Remove check for address being private, causes difficulty when
12634         pragma used in gnat.adc file and is not needed, since we guard
12635         this in Address_Integer_Convert_OK.
12636         * exp_ch7.adb: Minor reformatting.
12637         * sem_ch4.adb: Handle operator operands in Allow_Integer_Address mode.
12639 2014-01-20  Robert Dewar  <dewar@adacore.com>
12641         * checks.adb (Apply_Range_Check): Remove gnatprove special
12642         casing of exponentiation.
12643         * sem_res.adb (Resolve_Op_Expon): Apply range check to right
12644         operand for integer case to check range against Natural.
12646 2014-01-20  Robert Dewar  <dewar@adacore.com>
12648         * s-tataat.adb: Minor reformatting.
12650 2014-01-20  Robert Dewar  <dewar@adacore.com>
12652         * einfo.adb (Is_Descendent_Of_Address): Now applies to all
12653         entities, and also fix documentation to remove mention of visible
12654         integer type, since this is not what the implementation does.
12655         * einfo.ads (Is_Descendent_Of_Address): Now applies to all
12656         entities, and also fix documentation to remove mention of visible
12657         integer type, since this is not what the implementation does.
12658         * gnat_rm.texi: Minor clarification of Allow_Integer_Address
12659         function.
12660         * sem_ch4.adb (Analyze_One_Call): Handle Allow_Integer_Address
12661         case for parameter type check.
12662         * sem_res.adb (Resolve): Use new function
12663         Address_Integer_Convert_OK.
12664         * sem_type.adb: Minor code reorganization (use Ekind_In) Minor
12665         reformatting throughout.
12666         * sem_util.adb (Address_Integer_Convert_OK): New function.
12667         * sem_util.ads: Minor reformatting (put specs in alpha order)
12668         (Address_Integer_Convert_OK): New function.
12670 2014-01-20  Thomas Quinot  <quinot@adacore.com>
12672         * exp_ch7.adb (Wrap_Transient_Expression):
12673         Insertion extra conditional expression only if
12674         Opt.Suppress_Control_Flow_Optimizations is set.
12676 2014-01-20  Arnaud Charlet  <charlet@adacore.com>
12678         * s-tataat.adb (Initialize_Attributes): Abort might already be
12679         deferred in Create_Task.
12681 2014-01-20  Hristian Kirtchev  <kirtchev@adacore.com>
12683         * checks.adb (Apply_Scalar_Range_Check): Flag
12684         the exponent as requiring a range check when the expression is
12685         an exponentiation.
12687 2014-01-20  Fedor Rybin  <frybin@adacore.com>
12689         * gnat_ugn.texi: Documenting --passed-tests option for gnattest.
12691 2014-01-20  Hristian Kirtchev  <kirtchev@adacore.com>
12693         * sem_util.adb (Default_Initialization): New routine.
12694         * sem_util.ads: Add new type Default_Initialization_Kind.
12695         (Default_Initialization): New routine.
12697 2014-01-20  Hristian Kirtchev  <kirtchev@adacore.com>
12699         * sem_prag.adb (Check_Mode): Correct all error
12700         message logic dealing with in/in out parameters that may appear
12701         as inputs or have a self reference.
12703 2014-01-20  Robert Dewar  <dewar@adacore.com>
12705         * exp_ch9.adb, checks.adb, exp_intr.adb: Minor reformatting.
12706         * sem_res.adb (Resolve): Fix error causing infinite loop for
12707         integer used as address. Allow addresses as integers.
12709 2014-01-20  Arnaud Charlet  <charlet@adacore.com>
12711         * s-osinte-linux.ads (struct_sigaction): Fix rep clause.
12713 2014-01-20  Bob Duff  <duff@adacore.com>
12715         * par-ch8.adb (P_Use_Type_Clause): Detect syntax
12716         error when "use all" is not followed by "type".
12718 2014-01-20  Bob Duff  <duff@adacore.com>
12720         * exp_intr.adb (Expand_Unc_Deallocation): Remove warning on abort
12721         followed by free.
12723 2014-01-20  Ed Schonberg  <schonberg@adacore.com>
12725         * checks.adb (Apply_Address_Clause_Check): If there is an
12726         alignment check on the expression in an address clause, and there
12727         is no local exception propagation, add an additional explanatory
12728         message to clarify the cause of previous warning.
12730 2014-01-20  Robert Dewar  <dewar@adacore.com>
12732         * exp_ch7.adb: Minor reformatting.
12733         * opt.ads: Minor comment updates.
12734         * sem.adb: Minor name change Is_Main_Unit =>
12735         Is_Main_Unit_Or_Main_Unit_Spec.
12736         * sem_ch6.adb: Minor reformatting and code reorganization.
12738 2014-01-20  Bob Duff  <duff@adacore.com>
12740         * gnat_ugn.texi: Update gnatpp switches.
12742 2014-01-20  Thomas Quinot  <quinot@adacore.com>
12744         * exp_ch9.adb: Minor comment edit.
12746 2014-01-20  Robert Dewar  <dewar@adacore.com>
12748         * gnat_rm.texi: Document that Allow_Integer_Address is permitted
12749         only if System.Address is a private type.
12750         * opt.ads (Allow_Integer_Address): No longer set by -gnates.
12751         * sem_prag.adb (Analyze_Pragma, case Allow_Integer_Address):
12752         Allowed only if type System.Address is private, since otherwise
12753         it makes no sense.
12754         * sem_res.adb: Fix failure to properly Analyze unchecked
12755         conversions that were introduced by Allow_Integer_Address.
12756         * switch-c.adb: Remove -gnates switch.
12757         * usage.adb: Remove -gnates switch.
12758         * gnat_ugn.texi: Remove documentation of -gnates flag.
12760 2014-01-20  Ed Schonberg  <schonberg@adacore.com>
12762         * sem_ch6.adb (Analyze_Expression_Function): Pre-analyze and
12763         resolve expression to perform proper name capture.
12765 2014-01-20  Ed Schonberg  <schonberg@adacore.com>
12767         * sem.adb (Semantics): When saving/restoring configuration
12768         switches, the spec of a pre- defined unit that is the main unit
12769         must be treated as a predefined unit as well.
12771 2014-01-20  Thomas Quinot  <quinot@adacore.com>
12773         * exp_ch7.adb (Wrap_Transient_Expression): For a Boolean
12774         expression, insert an extra conditional expression when saving
12775         the value of the expression, for the benefit of control flow
12776         graph based coverage analysis.
12777         * exp_ch3.adb: Minor reformatting.
12779 2014-01-20  Robert Dewar  <dewar@adacore.com>
12781         * gnat1drv.adb: Set Allow_Integer_Address in relaxed semantics mode.
12782         * gnat_rm.texi: Document pragma Allow_Integer_Address.
12783         * gnat_ugn.texi: Document pragma Allow_Integer_Address, -gnates.
12784         * opt.ads: New flag Allow_Integer_Address.
12785         * par-prag.adb: Dummy entry for pragma Allow_Integer_Address.
12786         * sem_ch5.adb: Minor reformatting.
12787         * sem_prag.adb: Implement pragma Allow_Integer_Address.
12788         * sem_res.adb (Resolve): Allow integer address value if
12789         switch set.
12790         * sem_util.adb: Minor reformatting.
12791         * snames.ads-tmpl: Add entry for pragma Allow_Integer_Address.
12792         * switch-c.adb: Recognize flag -gnates.
12793         * usage.adb: Document flag -gnates.
12795 2014-01-20  Thomas Quinot  <quinot@adacore.com>
12797         * s-tadeca.adb: Fix minor typos in comment.
12799 2014-01-20  Pascal Obry  <obry@adacore.com>
12801         * s-win32.ads (FreeLibrary): New import.
12803 2014-01-20  Robert Dewar  <dewar@adacore.com>
12805         * sem_res.adb, sem_cat.adb: Minor reformatting.
12806         * sem_ch11.adb (Analyze_Raise_Statement): Only give warning about
12807         assigning to OUT parameters for the current subprogram scope.
12808         * exp_ch4.adb: Minor reformatting.
12810 2014-01-20  Ed Schonberg  <schonberg@adacore.com>
12812         * exp_ch4.adb (Process_Transient_Object,
12813         Find_Enclosing_Contexts): If the top-level if-expression that
12814         generated the transient object is an actual in a call, the proper
12815         Hook_Context is a construct enclosing the call.
12816         * einfo.ads: Indicate that Related_Expression is used to link a
12817         loop variable to the container expression over which the loop
12818         takes place.
12819         (Analyze_Iterator_Specification): Set the Related_Expression of
12820         the loop variable in a container element iterator.
12821         (Note_Possible_Modification): If the variable is the loop
12822         variable in a container element iterator, indicate that the
12823         enclosing container is also modified.
12825 2014-01-20  Hristian Kirtchev  <kirtchev@adacore.com>
12827         * aspects.adb (Move_Or_Merge_Aspects): Reimplemented.
12829 2014-01-20  Robert Dewar  <dewar@adacore.com>
12831         * s-taasde.ads, gnat_ugn.texi, s-tadeca.adb, sem_res.adb, s-tadeca.ads:
12832         Minor reformatting and code clean up.
12834 2014-01-20  Arnaud Charlet  <charlet@adacore.com>
12836         * sem_cat.adb (Validate_Object_Declaration): Relax semantics
12837         of objects of private type if Relaxed_RM_Semantics.
12839 2014-01-20  Claire Dross  <dross@adacore.com>
12841         * a-cofove.ads (Vector): Capacity discriminant
12842         should be in range of the index.
12844 2014-01-20  Thomas Quinot  <quinot@adacore.com>
12846         * a-caldel.ads(To_Duration), s-taasde.ads(Time_Enqueue):
12847         Clarify specs s-tadeca.adb(Enqueue_Calendar): Compensate for
12848         possible difference between epoch of Ada.Calendar clock and Ada
12849         real-time/tasking clock.
12850         * s-taprop-posix.adb: Minor comment fix.
12852 2014-01-20  Doug Rupp  <rupp@adacore.com>
12854         * sysdep.c [vxworks]: Remove Vxworks version noise for RTP.
12856 2014-01-20  Hristian Kirtchev  <kirtchev@adacore.com>
12858         * exp_attr.adb (Expand_N_Attribute_Reference): Generate validity
12859         checks on the prefix of attribute 'Old.
12860         * sem_ch3.adb (Process_Range_Expr_In_Decl): Suppress the
12861         generation of validity checks on a range that belongs to the
12862         iteration scheme of a quantified expression.
12863         * sem_ch5.adb (One_Bound): Suppress the generation of validity
12864         checks on a bound that belongs to the iteration scheme of a
12865         quantified expression, generate the check in all other cases.
12867 2014-01-20  Bob Duff  <duff@adacore.com>
12869         * gnat_ugn.texi: Enable --pp-new by default. Minor reorganization.
12871 2014-01-20  Ed Schonberg  <schonberg@adacore.com>
12873         * sem_res.adb (Resolve): When compiling a predefined unit, ignore
12874         interpretations that do not come from other predefined units,
12875         to prevent spurious ambiguities in the presence of user-defined
12876         operators in the context of (an instance of) a predefined unit.
12878 2014-01-20  Robert Dewar  <dewar@adacore.com>
12880         * gnat_rm.texi: Document that Loop_Variant is included in
12881         Statement_Assertions.
12882         * sem_prag.adb (Check_Kind): Add Loop_Variant to
12883         Statement_Assertions (Check_Applicable_Policy): Add Loop_Variant
12884         to Statement_Assertions.
12886 2014-01-20  Doug Rupp  <rupp@adacore.com>
12888         * sysdep.c (__gnat_is_file_not_found_error) [vxworks6]: Add case
12889         for errno ENOENT from RTP on NFS mounted file system.
12891 2014-01-20  Ed Schonberg  <schonberg@adacore.com>
12893         * sem_util.adb (Check_Function_Writable_Actuals): 1) Do not
12894         examine code that does not come from source. The check does not
12895         apply to code generated for constraint checks, and such code may
12896         generate spurious error messages when compiled with expansion
12897         disabled (as in a generic unit) because side effects may not
12898         have been removed.
12899         2) Make error messages more explicit: indicate the component
12900         of the  construct whose value is indeterminate because of a
12901         call to a function with in-out parameter in another component,
12902         when there is no mandated order of execution between the two
12903         components (actuals, aggregate components, alternatives).
12905 2014-01-20  Robert Dewar  <dewar@adacore.com>
12907         * gnat_rm.texi: Minor cleanup.
12909 2014-01-20  Hristian Kirtchev  <kirtchev@adacore.com>
12911         * sem_attr.adb (Analyze_Attribute): Attributes 'Old and 'Result
12912         can now apply to a refined postcondition.
12913         * sem_ch6.adb (Analyze_Subprogram_Contract): Remove local
12914         variable Result_Seen. Add variables Case_Prag, Post_Prag,
12915         Seen_In_Case and Seen_In_Post. Update the mechanism that detects
12916         whether postconditions and/or constract-cases mention attribute
12917         'Result and introduce a post-state when applied to functions.
12918         (Check_Result_And_Post_State): Removed.
12919         * sem_prag.adb (Analyze_Pragma): Add local variable
12920         Result_Seen. Verify that the expression of pragma Refined_Post
12921         mentions attribute 'Result and introduces a post-state.
12922         * sem_util.ads, sem_util.adb (Check_Result_And_Post_State): New routine.
12924 2014-01-20  Hristian Kirtchev  <kirtchev@adacore.com>
12926         * exp_ch7.adb (Is_Subprogram_Call): New routine.
12927         (Process_Transient_Objects): Make variable Must_Hook global with
12928         respect to all locally declared subprograms. Search the context
12929         for at least one subprogram call.
12930         (Requires_Hooking): Removed.
12932 2014-01-20  Claire Dross  <dross@adacore.com>
12934         * a-cfdlli.ads a-cfhama.ads a-cfhase.ads a-cforma.ads
12935         * a-cforse.ads a-cofove.ads: Add pragma Annotate (GNATprove,
12936         External_Axiomatization);
12938 2014-01-20  Robert Dewar  <dewar@adacore.com>
12940         * sem_attr.adb (Analyze_Attribute, case Loop_Entry): Allow
12941         Loop_Entry in Assert, Assert_And_Cut, and Assume pragmas.
12942         * sem_prag.adb (Analyze_Pragma, case Assert[_And_Cut], Assume):
12943         Allow Loop_Entry to be used in these pragmas if they appear in
12944         an appropriate context.
12945         (Placement_Error): Specialize error
12946         message for pragma Assert[_And_Cut] or pragma Assume containing
12947         Loop_Entry attribute.
12948         * a-exexpr-gcc.adb, sinput.adb: Minor reformatting.
12949         * s-excmac-arm.ads, s-except.ads, s-excmac-gcc.ads: Minor reformatting
12950         and code clean ups.
12952 2014-01-20  Robert Dewar  <dewar@adacore.com>
12954         * gnat1drv.adb: Minor comment update.
12956 2014-01-20  Tristan Gingold  <gingold@adacore.com>
12958         * raise-gcc.c (PERSONALITY_FUNCTION/arm): Remove unused
12959         variables, comment out unused code.
12960         * a-exexpr-gcc.adb: Move declarations to s-excmac-gcc.ads
12961         * s-excmac-gcc.ads: New file, extracted from a-exexpr-gcc.adb
12962         * s-excmac-arm.ads: New file.
12964 2014-01-20  Hristian Kirtchev  <kirtchev@adacore.com>
12966         * exp_ch4.adb (Expand_N_Slice): Remove constant D and variables
12967         Drange and Index_Typ. Remove the circuitry which creates a
12968         range check to compare the index type of the array against the
12969         discrete_range.
12970         * sem_res.adb (Resolve_Slice): Add local variable Dexpr. Update
12971         the circuitry which creates a range check to handle a
12972         discrete_range denoted by a subtype indication.
12974 2014-01-20  Pierre-Marie Derodat  <derodat@adacore.com>
12976         * sinput.adb, sinput.ads (Sloc_Range): Traverse the tree of original
12977         nodes to get the original sloc range.
12979 2014-01-20  Hristian Kirtchev  <kirtchev@adacore.com>
12981         * sem_prag.adb (Analyze_Pragma): Use Defining_Entity to obtain the
12982         entity of a [library level] package.
12984 2014-01-20  Tristan Gingold  <gingold@adacore.com>
12986         * raise-gcc.c (exception_class_eq): New function.
12987         (is_handled_by): Use it to compare exception classes.
12988         (PERSONALITY_STORAGE): Define.  (continue_unwind): New function to
12989         be called to return URC_CONTINUE_UNWIND.
12990         (personality_body): New function, extracted from PERSONALITY_ROUTINE.
12991         (PERSONALITY_ROUTINE): Add an implementation for the ARM unwinder.
12993 2014-01-20  Robert Dewar  <dewar@adacore.com>
12995         * opt.ads: Minor comment update.
12997 2014-01-20  Hristian Kirtchev  <kirtchev@adacore.com>
12999         * exp_ch4.adb (Expand_N_Slice): Relocate some variables and
13000         constants to the "Local variables" area. Add new constant D. Add
13001         new variables Drange and Index_Typ.  Rename Pfx to Rep and Ptp
13002         to Pref_Typ and update all occurrences. Add circuitry to extract
13003         the discrete_range and the index type and build a range check.
13005 2014-01-20  Arnaud Charlet  <charlet@adacore.com>
13007         * gnat1drv.adb (Adjust_Global_Switches): Enable
13008         Treat_Categorization_Errors_As_Warnings when Relaxed_RM_Semantics
13009         is set.
13011 2014-01-20  Thomas Quinot  <quinot@adacore.com>
13013         * sem_ch5.adb, sem_ch4.adb: Minor reformatting.
13015 2014-01-20  Hristian Kirtchev  <kirtchev@adacore.com>
13017         * sem_ch13.adb (Analyze_Aspect_Specifications):
13018         When aspect SPARK_Mode appears on a package body, insert the
13019         generated pragma at the top of the body declarations.
13021 2014-01-20  Robert Dewar  <dewar@adacore.com>
13023         * sem_aggr.adb, exp_prag.adb, sem_aux.adb, sinfo.ads, sem_ch10.adb,
13024         checks.adb, sem_prag.adb, sem_ch12.adb, freeze.adb, g-arrspl.adb,
13025         expander.adb, gnat1drv.adb, exp_ch4.adb, sem_ch6.adb,
13026         sem_ch8.adb, exp_dist.adb: Minor reformatting.
13028 2014-01-20  Yannick Moy  <moy@adacore.com>
13030         * gnat1drv.adb (Gnat1drv): Call Write_ALI with Object=True in GNATprove
13031         mode.
13033 2014-01-20  Pascal Obry  <obry@adacore.com>
13035         * g-arrspl.ads (Slice_Set): New definition (will use a copy on
13036         write scheme).
13037         * g-arrspl.adb: Adapt all routine to this new implementation.
13038         (Set): Copy the Slice_Set definition before reusing it.
13040 2014-01-20  Arnaud Charlet  <charlet@adacore.com>
13042         * sem_prag.adb (Process_Import_Or_Interface): In
13043         Relaxed_RM_Semantics, support old Ada 83 style of pragma Import.
13044         (Analyze_Pragma): Ditto for pragma Export.
13045         * exp_prag.adb (Expand_Pragma_Import_Or_Interface): Handle old pragma
13046         Import style.
13048 2014-01-20  Hristian Kirtchev  <kirtchev@adacore.com>
13050         * einfo.ads: E_Abstract_State is now part of the entities that
13051         can be overloaded. Update type Overloadable_Kind to reflect the
13052         inclusion of abstract states.
13053         * sem_ch6.adb (New_Overloaded_Entity): A function can now
13054         overload an abstract state.
13055         * sem_prag.adb (Analyze_Constituent): Handle the overloading
13056         of states by functions. Use Entity_Of to obtain the entity of
13057         a constituent.  (Analyze_Global_Item): Handle the overloading of
13058         states by functions.
13059         (Analyze_Initialization_Item): Handle the
13060         overloading of states by functions.  Use Entity_Of to obtain the
13061         entity of an item.
13062         (Analyze_Input_Item): Handle the overloading
13063         of states by functions. Use Entity_Of to obtain the entity of an item.
13064         (Analyze_Input_Output): Handle the overloading of states by functions.
13065         (Analyze_Refinement_Clause): Handle the overloading
13066         of states by functions.  Use Entity_Of to obtain the entity of an item.
13067         (Appears_In): Use Entity_Of to obtain the entity of an element.
13068         (Check_Usage): Use Entity_Of to obtain the entity of
13069         an item. Add a guard to prevent a crash due to a previous error.
13070         (Resolve_State): New routine.
13072 2014-01-20  Yannick Moy  <moy@adacore.com>
13074         * spark_xrefs.ads, debug.adb, gnat1drv.adb, errout.adb, errout.ads,
13075         opt.ads: Minor comments updates.
13077 2014-01-20  Hristian Kirtchev  <kirtchev@adacore.com>
13079         * einfo.adb (Non_Limited_View): Applies to abstract states.
13080         (Set_From_Limited_With): Applies to abstract states.
13081         (Set_Non_Limited_View): Applies to abstract states.
13082         (Write_Field17): Output the non-limited view of an abstract state.
13083         * einfo.ads: Update the comment on usage and occurrences in
13084         nodes for attributes From_Limited_With and Non_Limited_View.
13085         * sem_aux.adb (Available_View): This routine can now handle
13086         abstract states.
13087         * sem_aux.ads (Available_View): This routine can now handle
13088         abstract states. Update the comment on usage.
13089         * sem_ch8.adb (Find_Expanded_Name): Handle abstract views
13090         of states and variables.
13091         (In_Pragmas_Depends_Or_Global): New routine.
13092         * sem_ch10.adb (Build_Limited_Views): Implement
13093         abstract (limited) views of variables and states.
13094         (Build_Shadow_Entity): This routine is now a procedure. Add
13095         formal parameter Shadow. Update the comment on usage. Add
13096         context-specific decoration for states and variables.
13097         (Decorate_State): New routine.  (Decorate_Variable): New routine.
13098         (Find_And_Process_States): New routine.
13099         (Process_Declarations): Renamed to Process_Declarations_And_States.
13100         (Process_Declarations_And_States): Add formal parameters
13101         Pack and Create_Abstract_Views. Update the comment on usage.
13102         (Process_States): New routine.
13103         * sem_prag.adb (Check_Dependency_Clause): Handle abstract
13104         views of states and variables. Match the abstract view of a state
13105         against its corresponding non-abstract view.
13106         (Is_Matching_Input):
13107         Handle abstract views of states and variables. Match the abstract
13108         view of a state against its corresponding non-abstract view.
13109         (Process_Global_Item): Handle abstract views of states and
13110         variables.
13112 2014-01-20  Bob Duff  <duff@adacore.com>
13114         * sem_ch10.adb (Expand_With_Clause): Don't
13115         recurse on the prefix if the current with-ed name refers to a
13116         package that renames its own parent, eg "package P.Q renames P;".
13118 2014-01-20  Yannick Moy  <moy@adacore.com>
13120         * exp_spark.adb (Expand_SPARK_Call): Remove procedure.
13121         * opt.adb, opt.ads (Full_Expander_Active): Remove function.
13122         * checks.adb, exp_ch6.adb, exp_ch9.adb, exp_disp.adb, sem_aggr.adb,
13123         * sem_ch10.adb, sem_ch5.adb, sem_ch6.adb, sem_ch8.adb, sem_ch9.adb,
13124         * sem_disp.adb, sem_res.adb Replace Full_Expander_Active by
13125         Expander_Active.
13127 2014-01-20  Yannick Moy  <moy@adacore.com>
13129         * sinfo.ads Update documentation of GNATprove mode.
13131 2014-01-20  Yannick Moy  <moy@adacore.com>
13133         * adabkend.adb, ali-util.adb, errout.adb, exp_ch7.adb,
13134         * exp_dbug.adb, freeze.adb, lib-xref.adb, restrict.adb,
13135         * sem_attr.adb, sem_ch4.adb, sem_ch5.adb, sem_ch6.adb, sem_ch8.adb,
13136         * sem_prag.adb, sem_res.adb, sem_util.adb Rename SPARK_Mode into
13137         GNATprove_Mode.
13138         * sem_ch13.adb: Remove blank.
13139         * exp_spark.adb, exp_spark.ads (Expand_SPARK_Call): Only replace
13140         subprograms by alias for renamings, not for inherited primitive
13141         operations.
13142         * exp_util.adb (Expand_Subtype_From_Expr): Apply the expansion
13143         in GNATprove mode.
13144         (Remove_Side_Effects): Apply the removal in
13145         GNATprove mode, for the full analysis of expressions.
13146         * expander.adb (Expand): Call the light SPARK expansion in GNATprove
13147         mode.
13148         (Expander_Mode_Restore, Expander_Mode_Save_And_Set): Ignore
13149         save/restore actions for Expander_Active flag in GNATprove mode,
13150         similar to what is done in ASIS mode.
13151         * frontend.adb (Frontend): Generic bodies are instantiated in
13152         GNATprove mode.
13153         * gnat1drv.adb (Adjust_Global_Switches): Set operating
13154         mode to Check_Semantics in GNATprove mode, although a light
13155         expansion is still performed.
13156         (Gnat1drv): Set Back_End_Mode to
13157         Declarations_Only in GNATprove mode, and later on special case
13158         the GNATprove mode to continue analysis anyway.
13159         * lib-writ.adb (Write_ALI): Always generate ALI files in
13160         GNATprove mode.
13161         * opt.adb, opt.ads (Full_Expander_Active): Make it equivalent to
13162         Expander_Active.
13163         (SPARK_Mode): Renamed as GNATprove_Mode.
13164         * sem_aggr.adb (Aggregate_Constraint_Checks): Add checks in the
13165         tree in GNATprove_Mode.
13166         * sem_ch12.adb (Analyze_Package_Instantiation): Always instantiate
13167         body in GNATprove mode.
13168         (Need_Subprogram_Instance_Body): Always instantiate body in GNATprove
13169         mode.
13170         * sem_ch3.adb (Constrain_Index, Process_Range_Expr_In_Decl):
13171         Make sure side effects are removed in GNATprove mode.
13173 2014-01-20  Eric Botcazou  <ebotcazou@adacore.com>
13175         * gcc-interface/decl.c (gnat_to_gnu_entity) <object>: Robustify tests
13176         for aliased objects with an unconstrained nominal subtype.
13177         * gcc-interface/trans.c (Call_to_gnu): Likewise.
13178         (gnat_to_gnu) <case N_Op_Not>: Robustify test for private type.
13179         <case N_Op_Minus>: Remove useless code.
13180         (Exception_Handler_to_gnu_zcx): Minor tweaks.
13182 2014-01-20  Eric Botcazou  <ebotcazou@adacore.com>
13184         * gcc-interface/decl.c (gnat_to_gnu_entity) <case E_Record_Subtype>:
13185         Tidy up.  For a subtype with discriminants and variant part, if a
13186         variant is statically selected and the fields all have a constant
13187         position, put them in order of increasing position.  Likewise if
13188         no variant part but representation clause is present.
13189         * gcc-interface/utils.c (make_packable_type): Robustify.
13190         (maybe_pad_type): Use local variable and tidy up condition.  If no
13191         alignment is specified, use the original one.
13192         (create_type_stub_decl): Minor tweak.
13193         (convert) <case VECTOR_CST>: Fix typo.
13194         <case CONSTRUCTOR>: Deal with padding types around the same type.
13195         Do not punt on missing fields.
13196         (unchecked_convert): Call finish_record_type to lay out the special
13197         record types made for conversions from/to problematic integer types.
13198         Bump the alignment of CONSTRUCTORs before converting them to a more
13199         aligned type.
13201 2014-01-20  Eric Botcazou  <ebotcazou@adacore.com>
13203         * gcc-interface/decl.c (gnat_to_gnu_entity) <case E_Component>: Remove
13204         obsolete code for type_annotate_only mode, simplify code and slightly
13205         improve wording of comments.
13207 2014-01-12  Eric Botcazou  <ebotcazou@adacore.com>
13209         PR ada/59772
13210         * gcc-interface/cuintp.c (build_cst_from_int): Use 32-bit integer type
13211         as intermediate type.
13212         (UI_To_gnu): Likewise.
13214 2014-01-03  Eric Botcazou  <ebotcazou@adacore.com>
13216         * gnatvsn.ads (Current_Year): Bump to 2014.
13218 2014-01-02  Tobias Burnus  <burnus@net-b.de>
13220         * gnat_ugn.texi: Bump @copying's copyright year.
13222 Copyright (C) 2014 Free Software Foundation, Inc.
13224 Copying and distribution of this file, with or without modification,
13225 are permitted in any medium without royalty provided the copyright
13226 notice and this notice are preserved.