gcc/
[official-gcc.git] / gcc / ada / ChangeLog
blob3bb099cdf51a59cc06f1669aed2bcc07b0d23408
1 2014-09-15  Jakub Jelinek  <jakub@redhat.com>
3         * gcc-interface/Make-lang.in (check_acats_numbers0,
4         check_acats_numbers1, check_acats_numbers2, check_acats_numbers3,
5         check_acats_numbers4, check_acats_numbers5, check_acats_numbers6,
6         check_acats_numbers, check_acats_subdirs): New variables.
7         (check_acats_targets): Use $(check_acats_subdirs).
8         (check-acats, check-acats%): Rewritten so that for parallelized
9         testing each job runs all the chapters files, with
10         GCC_RUNTEST_PARALLELIZE_DIR set in environment.  Prepare the support
11         directory sequentially and share it.
12         (check-acats-subtargets): Always print just check-acats.
14 2014-08-25  Martin Liska  <mliska@suse.cz>
16         * gcc-interface/utils.c (rest_of_subprog_body_compilation): Adjust to
17         new cgraph interface.
18         (gnat_write_global_declarations): Likewise.
20 2014-08-13  Sylvestre Ledru  <sylvestre@debian.org>
22         * 9drpc.adb: Fix a typo
23         * s-interr.ads: Likewise
24         * s-taskin.ads: Likewise
25         * s-traces.ads: Likewise
26         * sysdep.c: Likewise
28 2014-08-12  Joel Sherrill <joel.sherrill@oarcorp.com>
30         * socket.c: For RTEMS, use correct prototype of gethostbyname_r().
31         * gsocket.h Add include of <unistd.h> on RTEMS.
33 2014-08-11  Joel Sherrill <joel.sherrill@oarcorp.com>
35         * s-osinte-rtems.adb: Correct formatting of line in license block.
37 2014-08-04  Claire Dross  <dross@adacore.com>
39         * exp_util.adb (Get_First_Parent_With_Ext_Axioms_For_Entity):
40         For an instance, look at the scope before the generic parent.
42 2014-08-04  Yannick Moy  <moy@adacore.com>
44         * lib-writ.ads: Update comments.
45         * sem_disp.ads, sem_disp.adb (Inherited_Subprograms): Add
46         parameters to filter inherited subprograms.
48 2014-08-04  Robert Dewar  <dewar@adacore.com>
50         * gnat_rm.texi: Add section on use of address clause for memory
51         mapped I/O.
53 2014-08-04  Ed Schonberg  <schonberg@adacore.com>
55         * sem_ch3.adb (Analyze_Subtype_Declaration): A subtype, in
56         particular the subtype created for a generic actual, inherits
57         invariant information from the base type.
59 2014-08-04  Robert Dewar  <dewar@adacore.com>
61         * aspects.ads, aspects.adb: Add entries for aspect Obsolescent.
62         * gnat_rm.texi: Add documentation for aspect Obsolescent.
63         * sem_ch13.adb (Analyze_Aspect_Specifications): Implement aspect
64         Obsolescent.
65         (Check_Aspect_At_Freeze_Point): Add dummy entry for pragma Obsolescent.
66         * s-osprim-mingw.adb: Minor reformatting.
67         * sem_res.adb (Is_Atomic_Ref_With_Address): New function
68         (Resolve_Indexed_Component): Rework warnings for non-atomic access
69         (Resolve_Selected_Component): Add warnings for non-atomic access.
71 2014-08-04  Doug Rupp  <rupp@adacore.com>
73         * g-calend.adb (timeval_to_duration, duration_to_timeval): Change sec
74         formal to long_long.
75         * g-calend.ads (timeval): Bump up size to accomodate sec type.
76         * s-taprop-linux.adb (timeval_to_duration): Change sec formal to
77         long_long
78         * s-osprim-posix.adb (timeval): Bump up size to accomodate
79         new sec type.
80         (timeval_to_duration): Change sec formal to Long_Long_Integer
81         * s-osinte-darwin.adb (timeval): Bump up
82         size to accomodate new sec type.
83         (timeval_to_duration): Change sec formal to long_long
84         * s-osinte-android.adb: Likewise.
85         * cal.c (__gnat_timeal_to_duration, __gnat_duration_to_timeval): Change
86         sec formal from long to long long.
88 2014-08-04  Robert Dewar  <dewar@adacore.com>
90         * sem_res.adb (Resolve_Qualified_Expression): Make sure
91         Do_Range_Check flag gets set.
93 2014-08-04  Robert Dewar  <dewar@adacore.com>
95         * einfo.ads, einfo.adb (Is_Standard_String_Type): New function.
96         * exp_ch3.adb (Build_Array_Init_Proc): Use
97         Is_Standard_String_Type.
98         (Expand_Freeze_Array_Type): ditto.
99         (Get_Simple_Init_Val): ditto.
100         (Needs_Simple_Initialization): ditto.
101         * sem_eval.adb (Eval_String_Literal): Use Is_Standard_String_Type.
102         * sem_warn.adb (Is_Suspicious_Type): Use Is_Standard_String_Type.
104 2014-08-04  Pascal Obry  <obry@adacore.com>
106         * adaint.c (__gnat_try_lock): Use _tcscpy and _tcscat instead of
107         _stprintf which insert garbage into the wfull_path buffer.
109 2014-08-04  Arnaud Charlet  <charlet@adacore.com>
111         * cal.c: Remove old VMS/nucleus code. Remove obsolete vxworks
112         code.
113         * fe.h: Minor reformatting.
115 2014-08-04  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
117         * cstreams.c: (_LARGEFILE_SOURCE): Guard definition.
119 2014-08-04  Robert Dewar  <dewar@adacore.com>
121         * par-ch13.adb (Get_Aspect_Specifications): Improve error
122         recovery, fixing a -gnatQ bomb.
124 2014-08-04  Yannick Moy  <moy@adacore.com>
126         * sem_ch3.adb (Analyze_Object_Declaration): In GNATprove mode,
127         do not generate two Itypes with the same name for an array
128         definition.
129         * sinfo.ads: Expand doc on GNATprove mode.
131 2014-08-04  Hristian Kirtchev  <kirtchev@adacore.com>
133         * exp_ch3.adb (Expand_Freeze_Record_Type): Set the finalization
134         master and storage pool attributes on the root type of an
135         anonymous access type.
136         * exp_ch4.adb (Expand_N_Allocator): Set the finalization master
137         and storage pool attributes on the root type of an anonymous
138         access type.
140 2014-08-04  Arnaud Charlet  <charlet@adacore.com>
142         * exp_ch3.adb: Minor reformatting.
143         * tb-alvms.c, tb-alvxw.c, tb-ivms.c: Removed.
144         * tracebak.c: Remove use of above files.
145         * gcc-interface/Makefile.in: Update dependencies.
147 2014-08-04  Pierre-Marie Derodat  <derodat@adacore.com>
149         * gcc-interface/utils.c (gnat_set_type_context): Also set the
150         context for parallel types' TYPE_STUB_DECL.  Do not change
151         anything if the context is already set for them.
152         (gnat_pushdecl): Update the comment for calls to
153         gnat_set_type_context to mention parallel types.
154         (add_parallel_type): When adding a context-less parallel type to
155         a type that has a context, propagate the context from the latter
156         type to the former.
157         (process_deferred_decl_context): Call gnat_set_type_context
158         rather than manually setting the type context.
159         (build_unc_object_type): Call gnat_set_type_context on the
160         template type.
162 2014-08-04  Ed Schonberg  <schonberg@adacore.com>
164         * exp_ch5.adb (Expand_N_Case_Statement): If a choice is a
165         subtype indication and the case statement has only two choices,
166         replace subtype indication with its range, because the resulting
167         membership test cannot have a subtype indication as an operand.
169 2014-08-04  Arnaud Charlet  <charlet@adacore.com>
171         * exp_ch3.adb: Update comments, minor reformatting.
173 2014-08-04  Hristian Kirtchev  <kirtchev@adacore.com>
175         * sem_ch3.adb (Analyze_Declarations): Explain why the bodies of
176         the default initial condition procedures are build here.
177         * sem_util.adb (Build_Default_Init_Cond_Procedure): Wrap the
178         analyzed argument of pragma Default_Initial_Condition in some
179         dummy code as GNATprove mode disables assertions, but still
180         needs to see the argument.
182 2014-08-04  Robert Dewar  <dewar@adacore.com>
184         * exp_ch6.adb, sem_util.adb: Minor reformatting.
186 2014-08-04  Olivier Hainque  <hainque@adacore.com>
188         * a-comutr.ads: Set Root_Node_Type'Alignment to
189         Standard'Maximum_Alignment, so that it is at least as large as
190         the max default for Tree_Node_Type'Alignment.
192 2014-08-04  Hristian Kirtchev  <kirtchev@adacore.com>
194         * exp_ch3.adb (Freeze_Type): Remove the generation and inheritance
195         of the default initial condition procedure [body].
196         * sem_ch3.adb (Analyze_Declarations): Create the bodies of
197         all default initial condition procedures at the end of private
198         declaration analysis.
199         * sem_util.adb (Build_Default_Init_Cond_Procedure_Bodies): New
200         routine.
201         (Build_Default_Init_Cond_Procedure_Body): Merged in the
202         processing of routine Build_Default_Init_Cond_Procedure_Bodies.
203         * sem_util.ads (Build_Default_Init_Cond_Procedure_Bodies):
204         New routine.
205         (Build_Default_Init_Cond_Procedure_Body): Removed.
207 2014-08-04  Ed Schonberg  <schonberg@adacore.com>
209         * sem_elab.adb (Check_Elab_Call): Do not check a call to a
210         postcondtion.
211         * exp_ch6.adb (Expand_Call): Clarify handling of inserted
212         postcondition call.
214 2014-08-04  Hristian Kirtchev  <kirtchev@adacore.com>
216         * sem_prag.adb (Analyze_Pragma): Ensure that an
217         internally generated spec for a stand alone body is recognized
218         as a proper context for pragma SPARK_Mode.
220 2014-08-04  Robert Dewar  <dewar@adacore.com>
222         * erroutc.adb (Delete_Msg): Do not decrement Warnings_Treated_As_Errors.
224 2014-08-04  Arnaud Charlet  <charlet@adacore.com>
226         * adabkend.adb (Scan_Back_End_Switches): Ignore extra -o
227         when -gnatO has already been specified, for compatibility
228         with gcc driver.
229         (Scan_Compiler_Args): Do not call Set_Output_Object_File_Name in
230         codepeer mode.
231         * g-expect.ads: Fix typo.
233 2014-08-04  Thomas Quinot  <quinot@adacore.com>
235         * exp_ch4.adb (Insert_Dereference_Action): the actual Size
236         must account for the bounds template if the designated type is
237         an unconstrained array.
239 2014-08-04  Hristian Kirtchev  <kirtchev@adacore.com>
241         * a-cfhama.adb, a-cfhase.adb, a-cforma.adb, a-cforse.adb Add
242         SPARK_Mode in the body.
243         * sem_ch7.adb (Analyze_Package_Body_Helper): Restore the original
244         way to verify the consistency of SPARK_Mode between a spec and
245         a body.
246         * sem_ch12.adb (Analyze_Package_Instantiation): Remove the call
247         to Set_Ignore_Pragma_SPARK_Mode. Set flag Ignore_Pragma_SPARK_Mode
248         manually.
249         (Analyze_Subprogram_Instantiation): Remove the call to
250         Set_Ignore_Pragma_SPARK_Mode. Set flag Ignore_Pragma_SPARK_Mode
251         manually.
252         * sem_prag.adb (Analyze_Pragma): Remove local variable
253         Inst_Id. SPARK_Mode can no longer be applied to a package or
254         subprogram instantiation.
255         * sem_util.adb, sem_util.ads (Set_Ignore_Pragma_SPARK_Mode):
256         Removed.
258 2014-08-04  Robert Dewar  <dewar@adacore.com>
260         * sem_prag.adb, osint.adb, osint.ads: Minor reformatting.
262 2014-08-04  Yannick Moy  <moy@adacore.com>
264         * sem_ch3.adb (Derive_Type_Declaration,
265         Process_Discriminants): Remove SPARK-specific legality checks.
267 2014-08-04  Thomas Quinot  <quinot@adacore.com>
269         * g-sechas.ads, g-sechas.adb (HMAC_Initial_Context): New subprogram.
270         * gnat_rm.texi (GNAT.MD5/SHA1/SHA224/SHA256/SHA512): Document support
271         for HMAC.
273 2014-08-04  Hristian Kirtchev  <kirtchev@adacore.com>
275         * sem_ch7.adb (Analyze_Package_Body_Helper): When verifying the
276         compatibility of SPARK_Mode between a spec and a body, use the
277         SPARK_Mode of the public part.
278         * sem_ch12.adb (Analyze_Generic_Subprogram_Declaration): Use
279         the already available routine to exchange the aspects between
280         the template and its copy. Analyze the aspects of copy to
281         ensure that the corresponding pragmas perform their semantic
282         effects.  The partial analysis of aspects is no longer needed.
283         (Analyze_Package_Instantiation): Save and restore the SPARK_Mode
284         of the context.
285         (Analyze_Subprogram_Instantiation): Save and restore the SPARK_Mode of
286         the context.
287         * sem_prag.adb (Analyze_Pragma): Do not bypass a subprogram
288         instantiation which does not come from source.
290 2014-08-04  Hristian Kirtchev  <kirtchev@adacore.com>
292         * a-cfhama.ads, a-cfhase.ads, a-cforma.ads, a-cforse.ads Add
293         SPARK_Mode pragmas to the public and private part of the unit.
294         * sem_ch3.adb (Derive_Type_Declaration): Ensure that a derived
295         type cannot have discriminants if the parent type already has
296         discriminants.
297         (Process_Discriminants): Ensure that the type of a discriminant is
298         discrete.
299         * sem_ch6.adb (Analyze_Subprogram_Body_Helper): The check on
300         SPARK_Mode compatibility between a spec and a body can now be
301         safely performed while processing a generic.
302         * sem_ch7.adb (Analyze_Package_Body_Helper): The check on
303         SPARK_Mode compatibility between a spec and a body can now be
304         safely performed while processing a generic.
305         * sem_prag.adb (Analyze_Pragma): Pragma SPARK_Mode can now be
306         safely analyzed when processing a generic.
308 2014-08-04  Nicolas Roche  <roche@adacore.com>
310         * g-dirope.adb: Minor reformating.
312 2014-08-04  Robert Dewar  <dewar@adacore.com>
314         * sem_ch6.adb: Minor reformatting.
316 2014-08-04  Ed Schonberg  <schonberg@adacore.com>
318         * sem_prag.adb (Analyze_Pragma, case Assert and related pragmas):
319         Before normalizing these pragmas into a pragma Check, preanalyze
320         the optional Message argument, (which is subsequently copied)
321         so that it has the proper semantic information for ASIS use.
322         * sem_case.adb: Initialize flag earlier.
323         * osint.adb, osint.ads (Find_File): Add parameter Full_Name, used when
324         the full source path of a configuration file is requested.
325         (Read_Source_File): Use Full_Name parameter..
327 2014-08-04  Hristian Kirtchev  <kirtchev@adacore.com>
329         * opt.ads Alphabetize various global flags. New flag
330         Ignore_Pragma_SPARK_Mode along with a comment on usage.
331         * sem_ch6.adb (Analyze_Generic_Subprogram_Body):
332         Pragma SPARK_Mode is now allowed in generic units.
333         (Analyze_Subprogram_Body_Helper): Do not verify the compatibility
334         between the SPARK_Mode of a spec and that of a body when inside
335         a generic.
336         * sem_ch7.adb (Analyze_Package_Body_Helper): Do not verify the
337         compatibility between the SPARK_Mode of a spec and that of a
338         body when inside a generic.
339         * sem_ch12.adb (Analyze_Generic_Subprogram_Declaration):
340         Pragma SPARK_Mode is now allowed in generic units.
341         (Analyze_Package_Instantiation): Save and restore the value of
342         flag Ignore_ Pragma_SPARK_Mode in a stack-like fasion. Set
343         the governing SPARK_Mode before analyzing the instance.
344         (Analyze_Subprogram_Instantiation): Save and restore the value
345         of flag Ignore_ Pragma_SPARK_Mode in a stack-like fasion. Set
346         the governing SPARK_Mode before analyzing the instance.
347         * sem_ch13.adb (Analyze_Aspect_Specifications): Emulate the
348         placement of a source pragma when inserting the generated pragma
349         for aspect SPARK_Mode.
350         * sem_prag.adb (Analyze_Pragma): Reimplement the handling of
351         pragma SPARK_Mode to allow for generics and their respective
352         instantiations.
353         * sem_util.ads, sem_util.adb (Check_SPARK_Mode_In_Generic): Removed.
354         (Set_Ignore_Pragma_SPARK_Mode): New routine.
356 2014-08-04  Eric Botcazou  <ebotcazou@adacore.com>
358         * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Component>: Deal with
359         renaming discriminants in tagged types first.
360         * gcc-interface/trans.c (gnat_to_gnu) <N_Selected_Component>: Test
361         the underlying type of the prefix.
362         (Pragma_to_gnu, case Pragma_Warning): Ignore Reason => "..."
363         (process_freeze_entity): Reset the nodes of
364         all the view of a type, if any.
366 2014-08-04  Doug Rupp  <rupp@adacore.com>
367             Olivier Hainque  <hainque@adacore.com>
369         * gcc-interface/Makefile.in (x86 VxWorks): Add filter-out for vxworks7
370         and remove incorrect EH_MECHANISM macros.
371         Add sigtramp.h to EXTRA_LIBGNAT_SRCS when we add sigtramp-vxworks.o to
372         EXTRA_LIBGNAT_OBJS.
374 2014-08-04  Robert Dewar  <dewar@adacore.com>
376         * exp_attr.adb (Expand_N_Attribute_Reference): Make sure prefix
377         of constructed 'Valid attribute in -gnatVa mode does not appear
378         to come from source.
379         * sem_attr.adb (Analyze_Access_Attribute): Don't set
380         Never_Set_In_Source for non-source reference.
381         * sem_util.adb: Minor reformatting.
382         * sem_warn.adb (Check_References): Don't check Address_Taken,
383         not necessary, see comment.
385 2014-08-04  Robert Dewar  <dewar@adacore.com>
387         * sem_util.adb, sem_case.adb: Minor reformatting.
389 2014-08-04  Ed Schonberg  <schonberg@adacore.com>
391         * exp_ch9.adb (Extract_Entry): If the synchronized object is a
392         limited view, replace with non-limited view, which is available
393         at the point of an entry call.
395 2014-08-04  Ed Schonberg  <schonberg@adacore.com>
397         * exp_ch6.adb (Expand_Call): If the call is to a function in
398         a run-time unit that is marked Inline_Always, we must suppress
399         debugging information on it, so that the code that is eventually
400         inlined will not affect debugging of the user program.
402 2014-08-04  Robert Dewar  <dewar@adacore.com>
404         * inline.adb, einfo.ads, s-tassta.adb, s-tarest.adb: Minor comment
405         fixes.
407 2014-08-04  Ed Schonberg  <schonberg@adacore.com>
409         * sem_prag.adb (Process_Import_Or_Interface): Handle properly
410         an aspect Import that specifies a False value.
412 2014-08-04  Robert Dewar  <dewar@adacore.com>
414         * gnat_rm.texi: Add section on aspect Invariant'Class.
416 2014-08-04  Ed Schonberg  <schonberg@adacore.com>
418         * sem_case.adb (Check_Choice_Set): New flag Predicate_Error,
419         for better control of cascaded error messages when some choice
420         in a case statement over a predicated type violates the given
421         static predicate.
423 2014-08-04  Hristian Kirtchev  <kirtchev@adacore.com>
425         * sem_ch3.adb (Build_Derived_Type): Modify the
426         inheritance of the rep chain to ensure that a non-tagged type's
427         items are not clobbered during the inheritance.
429 2014-08-04  Robert Dewar  <dewar@adacore.com>
431         * sem_ch3.adb, einfo.ads: Minor reformatting.
433 2014-08-04  Yannick Moy  <moy@adacore.com>
435         * inline.adb (Can_Be_Inlined_In_GNATprove_Mode): Fix
436         detection of subprograms that cannot be inlined in GNATprove mode.
438 2014-08-04  Ed Schonberg  <schonberg@adacore.com>
440         * einfo.adb: Add guard to Returns_Limited_View.
442 2014-08-04  Jose Ruiz  <ruiz@adacore.com>
444         * s-tassta.adb, s-tarest.adb (Task_Wrapper): Force maximum alignment of
445         the secondary stack to respect the alignments of the returned objects.
447 2014-08-04  Ed Schonberg  <schonberg@adacore.com>
449         * einfo.ads, einfo.adb (Returns_Limited_View): New flag defined
450         on function entities whose return type is a limited view.
451         * freeze.adb (Freeze_Entity): Use Returns_Limited_View to determine
452         where to place the freeze node for a function that returns the
453         limited view of a type, when the function is called and frozen
454         in a different unit.
456 2014-08-04  Eric Botcazou  <ebotcazou@adacore.com>
458         * sem_ch3.adb (Build_Derived_Private_Type): Minor code
459         refactoring.
461 2014-08-04  Robert Dewar  <dewar@adacore.com>
463         * gnat_ugn.texi: Clarify documentation on assertions.
465 2014-08-04  Ed Schonberg  <schonberg@adacore.com>
467         * sem_aggr.adb (Resolve_Record_Aggregate, Get_Value): Warn
468         if a component association has a box initialization when the
469         component type has no default initialization, either through an
470         initial value, an aspect, or an implicit initialization procedure.
472 2014-08-04  Ed Schonberg  <schonberg@adacore.com>
474         * freeze.adb: Code clean up.
476 2014-08-04  Thomas Quinot  <quinot@adacore.com>
478         * sem_ch5.adb: Minor reformatting.
480 2014-08-04  Ed Schonberg  <schonberg@adacore.com>
482         * freeze.adb (Late_Freeze_Subprogram): Following AI05-151,
483         a function can return a limited view of a type declared
484         elsewhere. In that case the function cannot be frozen at the end
485         of its enclosing package. If its first use is in a different unit,
486         it cannot be frozen there, but if the call is legal the full view
487         of the return type is available and the subprogram can now be
488         frozen. However the freeze node cannot be inserted at the point
489         of call, but rather must go in the package holding the function,
490         so that the backend can process it in the proper context.
492 2014-08-04  Robert Dewar  <dewar@adacore.com>
494         * exp_ch5.adb, sem_ch5.adb, einfo.ads: Minor reformatting.
496 2014-08-04  Arnaud Charlet  <charlet@adacore.com>
498         * sem_ch4.adb (Operator_Check): Refine previous change.
500 2014-08-04  Arnaud Charlet  <charlet@adacore.com>
502         * sem_scil.ads: Improve comments.
503         * sem_ch4.adb (Analyze_Equality_Op): Add support for
504         Allow_Integer_Address (equality between Address and Integer).
506 2014-08-04  Yannick Moy  <moy@adacore.com>
508         * a-cfhama.adb, a-cforse.adb: Minor fixes to avoid using prefix
509         notation on untagged objects.
510         * sem.ads: Update comment.
511         * inline.adb (Can_Be_Inlined_In_GNATprove_Mode): Do
512         not inline subprograms declared in the visible part of a package.
514 2014-08-04  Ed Schonberg  <schonberg@adacore.com>
516         * exp_ch5.adb: minor reformatting.
517         * einfo.ads, einfo.adb (Is_Processed_Transient): Applies to loop
518         parameters.
520 2014-08-04  Thomas Quinot  <quinot@adacore.com>
522         * s-fatgen.adb: Minor reformatting.
524 2014-08-04  Arnaud Charlet  <charlet@adacore.com>
526         * exp_util.adb (Is_Possibly_Unaligned_Object): Always return
527         False on .NET.
529 2014-08-04  Ed Schonberg  <schonberg@adacore.com>
531         * sem_ch5.adb (Analyze_Loop_Statement): Set properly the kind of
532         the loop parameter for element iterators over containers and
533         arrays, so that improper uses of it are detected in the loop
534         body when expansion is disabled.
535         * exp_ch5.adb (Expand_Iterator_Loop): The entity kind of the
536         generated cursor is that of the analyzed loop parameter.
538 2014-08-04  Hristian Kirtchev  <kirtchev@adacore.com>
540         * exp_ch3.adb (Build_CPP_Init_Procedure): Remove
541         Flag_Decl. Do not analyze the declaration of the flag as it is
542         not part of the tree yet, instead add it to the freeze actions
543         of the C++ type.
545 2014-08-04  Robert Dewar  <dewar@adacore.com>
547         * checks.adb (Apply_Scalar_Range_Check): Make sure we handle
548         case of OUT and IN OUT parameter correctly (where Source_Typ is
549         set), we were missing one case where a check must be applied.
551 2014-08-04  Hristian Kirtchev  <kirtchev@adacore.com>
553         * sem_ch8.adb (Build_Class_Wide_Wrapper): Update the comment on
554         the generated code. Instead of hiding the renaming and using the
555         wrapper as the proper association, have the subprogram renaming
556         alias the wrapper.
557         (Build_Spec): The entity of the wrapper is
558         now derived from the entity of the related primitive.
560 2014-08-04  Emmanuel Briot  <briot@adacore.com>
562         * s-regpat.adb: s-regpat.adb (Parse): fix incorrect link when
563         using non-capturing groups.
565 2014-08-04  Ed Schonberg  <schonberg@adacore.com>
567         * inline.adb (Build_Body_To_Inline): Remove Unmodified and
568         related pragmas before copying the original body, to prevent
569         spurious errors when the pragmas apply to formals that will not
570         appear in the inlined body.
572 2014-08-04  Robert Dewar  <dewar@adacore.com>
574         * exp_prag.adb, sem_ch7.adb, einfo.adb, sem_prag.adb, sem_util.adb,
575         exp_ch3.adb: Minor reformatting.
577 2014-08-04  Robert Dewar  <dewar@adacore.com>
579         * prj-strt.adb, prj-strt.ads, sem_attr.adb: Minor reformatting.
581 2014-08-04  Hristian Kirtchev  <kirtchev@adacore.com>
583         * aspects.adb Add an entry in table Canonical_Aspect for
584         Default_Initial_Condition.
585         * aspects.ads Add an entry in tables Aspect_Id, Aspect_Argument,
586         Aspect_Names and Aspect_Delay for Default_Initial_Condition.
587         * einfo.adb Flag3 is now Has_Default_Init_Cond. Flag132
588         is now Is_Default_Init_Cond_ Procedure. Flag133 is now
589         Has_Inherited_Default_Init_Cond.
590         (Default_Init_Cond_Procedure): New routine.
591         (Has_Default_Init_Cond): New routine.
592         (Has_Inherited_Default_Init_Cond): New routine.
593         (Is_Default_Init_Cond_Procedure): New routine.
594         (Set_Default_Init_Cond_Procedure): New routine.
595         (Set_Has_Default_Init_Cond): New routine.
596         (Set_Has_Inherited_Default_Init_Cond): New routine.
597         (Set_Is_Default_Init_Cond_Procedure): New routine.
598         (Write_Entity_Flags): Output all the new flags.
599         * einfo.ads New attributes Default_Init_Cond_Procedure,
600         Has_Inherited_Default_Init_Cond and Is_Default_Init_Cond_Procedure
601         along with usage in nodes.
602         (Default_Init_Cond_Procedure): New routine.
603         (Has_Default_Init_Cond): New routine and pragma Inline.
604         (Has_Inherited_Default_Init_Cond): New routine and
605         pragma Inline.
606         (Is_Default_Init_Cond_Procedure): New routine and
607         pragma Inline.
608         (Set_Default_Init_Cond_Procedure): New routine.
609         (Set_Has_Default_Init_Cond): New routine and pragma Inline.
610         (Set_Has_Inherited_Default_Init_Cond): New routine and pragma Inline.
611         (Set_Is_Default_Init_Cond_Procedure): New routine and pragma Inline.
612         * exp_ch3.adb (Expand_N_Object_Declaration): New constant
613         Next_N. Generate a call to the default initial condition procedure
614         if the object's type is subject to the pragma.  (Freeze_Type):
615         Generate the body of the default initial condition procedure or
616         inherit the spec from a parent type.
617         * exp_ch7.adb Add with and use clause for Exp_Prag.
618         (Expand_Pragma_Initial_Condition): Removed.
619         * exp_prag.ads, exp_prag.adb (Expand_Pragma_Initial_Condition): New
620         routine.
621         * par-prag.adb (Prag): Pragma Default_Initial_Condition does
622         not need special treatment by the parser.
623         * sem_ch3.adb (Build_Derived_Record_Type): Propagate the
624         attributes related to pragma Default_Initial_Condition to the
625         derived type.
626         (Process_Full_View): Propagate the attributes
627         related to pragma Default_Initial_Condition to the full view.
628         * sem_ch7.adb (Analyze_Package_Specification): Build the
629         declaration of the default initial condition procedure for all
630         types that qualify or inherit the one from the parent type.
631         * sem_ch13.adb (Analyze_Aspect_Specifications):
632         Add processing for aspect Default_Initial_Condition.
633         (Check_Aspect_At_Freeze_Point): Aspect
634         Default_Initial_Condition does not require delayed analysis.
635         (Replace_Type_References_Generic): Moved to spec.
636         * sem_ch13.ads (Replace_Type_References_Generic): Moved from body.
637         * sem_prag.adb Add an entry in table Sif_Glags for
638         Default_Initial_Condition.
639         (Analyze_Pragma): Pragma
640         Default_Initial_Condition is now part of assertion
641         policy. Add processing for pragma Default_Initial_Condition.
642         (Is_Valid_Assertion_Kind): Pragma Default_Initial_Condition is
643         now recognized as a proper assertion policy.
644         * sem_util.ads, sem_util.adb (Build_Default_Init_Cond_Call): New
645         routine.
646         (Build_Default_Init_Cond_Procedure_Body): New routine.
647         (Build_Default_Init_Cond_Procedure_Declaration): New routine.
648         (Inherit_Default_Init_Cond_Procedure): New routine.
649         * snames.ads-tmpl Add new predefined name and pragma id for
650         Default_Initial_Condition.
652 2014-08-04  Vincent Celier  <celier@adacore.com>
654         * prj-dect.adb (Parse_Case_Construction): It is no longer
655         an error if the variable for a case construction is not
656         typed, only if the variable value is not a single string. Call
657         Parse_Choice_List and End_Case_Construction with the new parameter
658         to indicate that the variable is typed.
659         * prj-strt.adb (End_Case_Construction): Only check the labels
660         if the variable is typed.  If the variable is not typed,
661         issue a warning when there is no "when others" allternative.
662         (Parse_Choice_List): Manage the labels only if the variable
663         is typed.
664         * prj-strt.ads (End_Case_Construction): New Boolean parameter
665         String_Type.
666         (Parse_Choice_List): Ditto.
668 2014-08-04  Ed Schonberg  <schonberg@adacore.com>
670         * sem_ch5.adb: Additional fix to Check_Predicate_Use.
672 2014-08-04  Vincent Celier  <celier@adacore.com>
674         * projects.texi: Update documentation of case constructions with
675         variables that are not typed.
677 2014-08-04  Ed Schonberg  <schonberg@adacore.com>
679         * sem_ch8.adb (Build_Class_Wide_Wrapper): If the operator carries
680         an Eliminated pragma, indicate that the wrapper is also to be
681         eliminated, to prevent spurious errors when using gnatelim on
682         programs that include box-initialization of equality operators
683         (consequence of AI05-071)..
685 2014-08-04  Robert Dewar  <dewar@adacore.com>
687         * checks.adb (Activate_Overflow_Check): Handle floating-point
688         case correctly.
689         * checks.ads (Activate_Overflow_Check): Clarify handling of
690         floating-point cases.
691         * exp_util.adb (Check_Float_Op_Overflow): Reset Do_Overflow_Check
692         flag if we generate an explicit overflow check (for
693         Check_Float_Overflow mode).
695 2014-08-04  Robert Dewar  <dewar@adacore.com>
697         * prj-proc.adb, prj-part.adb, prj-strt.adb, prj.adb, prj.ads,
698         prj-attr.adb, prj-attr.ads: Minor reformatting.
700 2014-08-04  Yannick Moy  <moy@adacore.com>
702         * expander.adb (Expand): Always perform special
703         expansion in GNATprove mode, even when doing pre-analysis.
705 2014-08-04  Thomas Quinot  <quinot@adacore.com>
707         * repinfo.adb (List_Scalar_Storage_Order): List bit order if
708         not default. Also list bit order if SSO is specified. Do not
709         assume that bit order is always equal to scalar storage order.
711 2014-08-04  Thomas Quinot  <quinot@adacore.com>
713         * freeze.adb (Set_SSO_From_Default): Do not set scalar storage
714         order to reverse SSO for a type that has an explicit native
715         Bit_Order.
717 2014-08-04  Doug Rupp  <rupp@adacore.com>
719         * cal.c: Macro check for VxWorks7.
720         * init.c (getpid): Likewise.
721         * mkdir.c (__gnat_mkdir): Likewise.
722         * sysdep.c (__gnat_is_file_not_found_error): Likewise.
724 2014-08-04  Gary Dismukes  <dismukes@adacore.com>
726         * exp_ch3.adb (Expand_N_Object_Declaration): Inhibit generation
727         of an invariant check in the case where No_Initialization is set,
728         since the object is uninitialized.
730 2014-08-04  Thomas Quinot  <quinot@adacore.com>
732         * snames.ads-tmpl (Default_Scalar_Storage_Order): Now an attribute
733         name, in addition to a pragma name.
734         * snames.adb-tmpl (Get_Pragma_Id, Is_Configuration_Pragma_Name,
735         Is_Pragma_Name): Adjust accordingly.
736         * sem_attr.ads, sem_attr.adb, exp_attr.adb
737         (Attribute_Default_Scalar_Storage_Order): Add handling of new
738         attribute.
739         * gnat_rm.texi: Document the above.
741 2014-08-04  Arnaud Charlet  <charlet@adacore.com>
743         * exp_util.adb (Check_Float_Op_Overflow): No-op in codepeer
744         mode for now, to revert to previous behavior.
745         * checks.adb: Revert previous change, no longer needed.
747 2014-08-04  Robert Dewar  <dewar@adacore.com>
749         * gnat1drv.adb (Adjust_Global_Switches): Don't set
750         Check_Float_Overflow if Machine_Oveflows_On_Target is True.
751         * sem_prag.adb (Analyze_Pragma, case Check_Float_Overflow): Don't
752         set Check_Float_Overflow if Machine_Oveflows_On_Target is True.
753         * switch-c.adb (Scan_Front_End_Switches): Don't set
754         Check_Float_Overflow if Machine_Oveflows_On_Target is True.
756 2014-08-04  Vincent Celier  <celier@adacore.com>
758         * prj-attr.adb: Add new default indications for
759         attributes Object_Dir, Exec_Dir, Source_Dirs and Target.
760         (Attribute_Default_Of): New function (Initialize): Set the
761         default for those attributes that have one specified.
762         * prj-attr.ads (Attribute_Data): New component Default.
763         * prj-proc.adb (Expression): Take into account the new defaults
764         for attributes Object_Dir, Exec_Dir and Source_Dirs.
765         * prj-strt.adb (Attribute_Reference): Set the default for
766         the attribute.
767         * prj-tree.ads, prj-tree.adb (Default_Of): New function.
768         (Set_Default_Of): New procedure.
769         * prj.adb (The_Dot_String): New global Name_Id variable,
770         initialized in procedure Initialize.
771         (Dot_String): New function
772         (Initialize): Initialize The_Dot_String.
773         (Reset): Create the string list Shared.Dot_String_List.
774         * prj.ads (Attribute_Default_Value): New enumeration type.
775         (Project_Qualifier): Change enumeration value Dry to Abstract_Project.
776         (Dot_String): New function.
777         (Shared_Project_Tree_Data): New string list component Dot_String_List.
778         * projects.texi: Document new defaults for attribute Object_Dir,
779         Exec_Dir and Source_Dirs.
781 2014-08-04  Robert Dewar  <dewar@adacore.com>
783         * sem_ch12.adb: Minor reformatting.
785 2014-08-04  Arnaud Charlet  <charlet@adacore.com>
787         * exp_util.adb, checks.adb (Check_Float_Op_Overflow): Add special
788         expansion in CodePeer_Mode.
789         (Selected_Range_Checks): Add handling of overflow checks in
790         CodePeer_Mode.
792 2014-08-04  Robert Dewar  <dewar@adacore.com>
794         * exp_attr.adb (Expand_N_Attribute_Reference, case Pred):
795         Remove special test for Float'First, no longer required.
796         (Expand_N_Attribute_Reference, case Succ): Remove special test
797         for Float'First, no longer required.
798         * s-fatgen.adb (Pred): return infinity unchanged.
799         (Succ): ditto.
801 2014-08-04  Claire Dross  <dross@adacore.com>
803         * sem_ch12.adb (Analyze_Associations): Defaults should only be
804         used if there is no explicit match.
805         * exp_util.adb (Get_First_Parent_With_Ext_Axioms_For_Entity):
806         Also check for pragma external_axiomatization on generic units.
808 2014-08-04  Robert Dewar  <dewar@adacore.com>
810         * checks.adb (Activate_Overflow_Check): Remove
811         Check_Float_Overflow processing.
812         (Apply_Scalar_Range_Check): Ditto.
813         (Generate_Range_Check): Ditto.
814         * exp_ch4.adb (Expand_N_Op_Add): Add call to
815         Check_Float_Op_Overflow.
816         (Expand_N_Op_Divide): ditto.
817         (Expand_N_Op_Multiply): ditto.
818         (Expand_N_Op_Subtract): ditto.
819         * exp_util.ads, exp_util.adb (Check_Float_Op_Overflow): New procedure.
820         * sem_attr.adb (Analyze_Attribute, case Pred): Make sure
821         Do_Range_Check is set for floating-point case in -gnatc or
822         GNATprove mode.
823         (Analyze_Attribute, case Succ): Make sure
824         Do_Range_Check is set for floating-point case in -gnatc or
825         GNATprove mode.
826         * sem_res.adb (Resolve_Type_Conversion): Make sure Do_Range_Check
827         flag is set for real to integer conversion in GNATprove or
828         -gnatc mode.
830 2014-08-04  Gary Dismukes  <dismukes@adacore.com>
832         * sem_ch13.adb (Analyze_Aspect_Specifications): Resolve
833         the expression of an Import or Export aspect as type Boolean
834         and require it to be static. Add ??? comment. Also, set the
835         Is_Exported flag when appropriate.
837 2014-08-04  Robert Dewar  <dewar@adacore.com>
839         * exp_ch4.adb: Minor reformatting.
840         * exp_attr.adb: Minor reformatting.
842 2014-08-04  Thomas Quinot  <quinot@adacore.com>
844         * s-fatgen.ads, s-fatgen.adb (S, P): New visible type declarations
845         (Unaligned_Valid): Remove now unused subprogram.
846         * exp_attr.adb (Expand_N_Attribute_Reference, case
847         Attribute_Valid): If the prefix is in reverse SSO or potentially
848         unaligned, copy it using a byte copy operation to a temporary
849         variable.
850         * einfo.adb: Minor comment fix.
852 2014-08-04  Hristian Kirtchev  <kirtchev@adacore.com>
854         * freeze.adb (Freeze_Entity): Do not freeze formal subprograms.
856 2014-08-04  Robert Dewar  <dewar@adacore.com>
858         * s-imgrea.adb (Image_Floating_Point): Don't add space before +Inf.
859         * s-fatgen.adb (Pred): Handle Float'First.
860         (Succ): Handle Float'Last.
862 2014-08-04  Ed Schonberg  <schonberg@adacore.com>
864         * sem_util.adb (Is_Potentially_Unevaluated): If the original
865         node of a parent node in the tree is a short-circuit operation,
866         the node is potentially unevaluated.
868 2014-08-04  Robert Dewar  <dewar@adacore.com>
870         * sem_res.adb (Resolve_Type_Conversion): Set Do_Range_Check on
871         conversion from a real type to an integer type.
873 2014-08-04  Yannick Moy  <moy@adacore.com>
875         * sem_aggr.adb, sem_ch3.adb, sem_ch5.adb, sem_ch7.adb, sem_ch9.adb,
876         sem_ch12.adb, sem_util.adb, sem_util.ads, sem_res.adb, sem_attr.adb,
877         exp_ch6.adb, sem_ch4.adb, restrict.adb, restrict.ads, sem_ch6.adb,
878         sem_ch8.adb, sem_ch11.adb: Update some subprogram names to refer to
879         SPARK_05 instead of SPARK.
881 2014-08-04  Robert Dewar  <dewar@adacore.com>
883         * sem.ads: Minor reformatting.
884         * sem_ch13.adb (Analyze_Aspect_External_Or_Link_Name): Minor
885         reformatting.
886         (Analyze_Aspect_Specifications, case Convention): Put External_Name
887         before Link_Name when constructing pragma.
889 2014-08-04  Yannick Moy  <moy@adacore.com>
891         * sem.adb, sem.ads (In_Default_Expr): Global flag that is set
892         to True during analysis of a default component expression.
893         (Semantics): Save and restore In_Default_Expr around analysis.
894         * sem_ch3.adb, sem_ch3.ads (Analyze_Component_Declaration):
895         Call new wrapper Preanalyze_Default_Expression.
896         (Preanalyze_Default_Expression): New wrapper on
897         Preanalyze_Spec_Expression which sets and restores In_Default_Expr.
898         * sem_res.adb (Resolve_Call): Mark calls inside default
899         expressions as not inlined in GNATprove mode.
901 2014-08-04  Robert Dewar  <dewar@adacore.com>
903         * exp_ch4.adb: Minor reformatting.
905 2014-08-04  Olivier Hainque  <hainque@adacore.com>
907         * link.c: remove const on __gnat_objlist_file_supported for AIX
909 2014-08-04  Robert Dewar  <dewar@adacore.com>
911         * sem_util.ads: Minor addition of comment.
913 2014-08-04  Vincent Celier  <celier@adacore.com>
915         * prj-dect.adb (Check_Package_Allowed): Allow package IDE in
916         all projects, including aggregate and aggregate library projects.
918 2014-08-04  Yannick Moy  <moy@adacore.com>
920         * back_end.adb (Call_Back_End): Do not call gigi in GNATprove mode.
922 2014-08-04  Robert Dewar  <dewar@adacore.com>
924         * sem_eval.adb (Test_In_Range): Always in range for
925         Is_Known_Valid target type, where input type has smaller or
926         equal size and does not have biased rep.
928 2014-08-04  Ed Schonberg  <schonberg@adacore.com>
930         * sem_attr.adb (Eval_Attribute): Constrained is not treated as
931         a static attribute, and the Static flag must not be set on it
932         during resolution. It may be constant-folded during expansion,
933         but if expansion is disabled it is not a static expression.
935 2014-08-04  Hristian Kirtchev  <kirtchev@adacore.com>
937         * sem_ch8.adb (Build_Class_Wide_Wrapper): Mark the primitive as
938         referenced once resolution has taken place.
940 2014-08-04  Gary Dismukes  <dismukes@adacore.com>
942         * exp_ch4.adb (Expand_N_Type_Conversion): Don't
943         compare access levels in the case where the target type is the
944         anonymous type of an access discriminant, since the level of
945         such types is defined based on context. Add comment.
947 2014-08-04  Hristian Kirtchev  <kirtchev@adacore.com>
949         * sem_ch8.adb (Build_Class_Wide_Wrapper): Handle various special
950         cases related to equality.  Remove the special processing
951         for dispatching abstract subprograms as it is not needed.
952         (Interpretation_Error): Add a specialized error message for
953         predefined operators.
954         (Is_Intrinsic_Equality): New routine.
955         (Is_Suitable_Candidate): New routine.
957 2014-08-04  Gary Dismukes  <dismukes@adacore.com>
959         * checks.adb: Minor comment reformatting.
961 2014-08-04  Ed Schonberg  <schonberg@adacore.com>
963         * restrict.adb (Check_Restriction): For checked max_parameter
964         restrictions reset Violated flag, so that subsequent violations
965         are properly detected.
967 2014-08-04  Robert Dewar  <dewar@adacore.com>
969         * sem_ch3.adb (Check_Initialization): Fix bad test of GNATprove
970         mode.
971         (Process_Discriminants): Fix bad test of GNATprove mode
973 2014-08-04  Hristian Kirtchev  <kirtchev@adacore.com>
975         * sem_ch12.adb (Instantiate_Formal_Subprogram):
976         Move variable to their own section. Propagate the source
977         location of a formal parameter to the corresponding formal of
978         the subprogram renaming declaration. Code reformatting.
980 2014-08-04  Arnaud Charlet  <charlet@adacore.com>
982         * g-trasym-vms-ia64.adb, g-trasym-vms-alpha.adb: Removed.
984 2014-08-04  Ed Schonberg  <schonberg@adacore.com>
986         * exp_aggr.adb (Expand_Array_Aggregate): Do not attempt expansion
987         if error already detected.  We may reach this point in spite of
988         previous errors when compiling with -gnatq, to force all possible
989         errors (this is the usual ACATS mode).
991 2014-08-04  Gary Dismukes  <dismukes@adacore.com>
993         * checks.adb (Generate_Range_Check): For the case of converting
994         a base type with a larger range to a smaller target subtype, only
995         use unchecked conversions of bounds in the range check followed
996         by conversion in the case where both types are discrete. In other
997         cases, convert to the target base type and save in a temporary
998         followed by the range check.
999         (Convert_And_Check_Range): New procedure factoring code to save
1000         conversion to a temporary followed by a range check (called two
1001         places in Generate_Range_Check).
1002         * exp_ch4.adb (Expand_N_Type_Conversion): Relax previous
1003         check-in, to generate range checks for conversions between
1004         any floating-point types rather than limiting it to matching
1005         base types.
1007 2014-08-02  Trevor Saunders  <tsaunders@mozilla.com>
1009         * gcc-interface/trans.c: Use hash_set instead of pointer_set.
1011 2014-08-01  Ed Schonberg  <schonberg@adacore.com>
1013         * restrict.adb (Update_Restrictions): For restrictions with a
1014         maximum parameter (e.g. number of protected entries in Ravenscar)
1015         do not compute the maximum of the violation over several objects,
1016         because the restriction is per-object.
1017         (Check_Restriction): After possible message, reset the value
1018         of of a checked max_parameter restriction to zero, to prevent
1019         cascaded errors.
1020         * sem_ch3.adb (Build_Derived_Private_Type): Use base of parent
1021         (sub)type to determine whether derived type should be on the
1022         list of private dependents of a type whose full view may become
1023         visible subsequently.
1025 2014-08-01  Olivier Hainque  <hainque@adacore.com>
1027         * gcc-interface/Make-lang.in (ADA_TOOLS_FLAGS_TO_PASS, native): use
1028         $(CXX) instead of ../../xg++ to feed CXX.
1029         (CXX_LFLAGS): Remove. Now unused as the proper flags
1030         are expected to be included in the CXX variable.
1032 2014-08-01  Pierre-Marie Derodat  <derodat@adacore.com>
1034         * gcc-interface/decl.c (elaborate_expression_1): Return the new
1035         variable when debug info is needed and the expression is not
1036         constant.  Tag as external only new variables that are global.
1037         (gnat_to_gnu_entity): Call it after the GNU declaration is saved.
1038         * gcc-interface/trans.c (Attribute_to_gnu): Do not cache
1039         attributes for IN array parameters when their actual subtype
1040         needs debug info.
1041         (Compilation_Unit_to_gnu): Call it to process all remaining nodes.
1042         * gcc-interface/gigi.h (process_deferred_decl_context): New.
1043         * gcc-interface/utils.c (gnat_write_global_declarations): Do not
1044         emit debug info for ignored global declarations.
1045         (struct deferred_decl_context_node,
1046         add_deferred_decl_context, add_deferred_type_context,
1047         compute_deferred_decl_context, defer_or_set_type_context,
1048         deferred_decl_context_queue, get_debug_scope,
1049         get_global_context, process_deferred_decl_context): New.
1050         (gnat_pushdecl): Re-implement the DECL_CONTEXT and TYPE_CONTEXT
1051         computation machinery to rely on the GNAT Scope attribute.
1053 2014-08-01  Eric Botcazou  <ebotcazou@adacore.com>
1055         * gcc-interface/utils2.c (build_simple_component_ref): Add guard.
1057 2014-08-01  Robert Dewar  <dewar@adacore.com>
1059         * sem_ch8.adb, opt.ads Minor comment updates.
1061 2014-08-01  Hristian Kirtchev  <kirtchev@adacore.com>
1063         * exp_intr.adb (Expand_Unc_Deallocation): Request a renaming
1064         from the side effects removal machinery.
1065         * exp_util.adb (Duplicate_Subexpr): Add formal parameter
1066         Renaming_Req. Update the nested call to Remove_Side_Effects.
1067         (Duplicate_Subexpr_No_Checks): Add formal parameter
1068         Renaming_Req. Update the nested call to Remove_Side_Effects.
1069         (Duplicate_Subexpr_Move_Checks): Add formal parameter
1070         Renaming_Req. Update the nested call to Remove_Side_Effects.
1071         (Remove_Side_Effects): Add formal parameter Renaming_Req. Generate
1072         an object renaming declaration when the caller requests it.
1073         * exp_util.ads (Duplicate_Subexpr): Add formal
1074         parameter Renaming_Req. Update comment on usage.
1075         (Duplicate_Subexpr_No_Checks): Add formal parameter Renaming_Req.
1076         (Duplicate_Subexpr_Move_Checks): Add formal parameter
1077         Renaming_Req.
1079 2014-08-01  Bob Duff  <duff@adacore.com>
1081         * gnat_ugn.texi: Minor updates.
1083 2014-08-01  Robert Dewar  <dewar@adacore.com>
1085         * atree.adb: Minor reformatting.
1087 2014-08-01  Ed Schonberg  <schonberg@adacore.com>
1089         * exp_aggr.adb (Init_Hidden_Discriminants): If some ancestor is a
1090         private extension, get stored constraint, if any, from full view.
1092 2014-08-01  Robert Dewar  <dewar@adacore.com>
1094         * opt.ads (No_Elab_Code_All_Pragma): New global variable.
1095         * sem_ch10.adb (Check_No_Elab_Code_All): New procedure
1096         (Analyze_Compilation_Unit): Call Check_No_Elab_Code_All
1097         (Analyze_Subunit_Context): Call Check_No_Elab_Code_All.
1098         * sem_prag.adb (Analyze_Pragma, case No_Elaboration_Code_All):
1099         Remove code for checking with's, now in sem_ch10.adb, set
1100         Opt.No_Elab_Code_All_Pragma.
1102 2014-08-01  Eric Botcazou  <ebotcazou@adacore.com>
1104         * sem_ch3.adb (Copy_And_Build): Copy the declaration for
1105         access types as well and adjust the subtype mark if there are
1106         no constraints.
1108 2014-08-01  Robert Dewar  <dewar@adacore.com>
1110         * sem_eval.adb (Test_In_Range): Return Unknown if error posted.
1112 2014-08-01  Robert Dewar  <dewar@adacore.com>
1114         * sem_ch3.adb, einfo.ads, exp_ch4.adb: Code clean ups.
1116 2014-08-01  Eric Botcazou  <ebotcazou@adacore.com>
1118         * einfo.ads (Has_Private_Ancestor): Remove obsolete usage.
1119         * exp_ch4.adb (Expand_Composite_Equality): Add conversion
1120         of the actuals in the case of untagged record types too.
1121         * sem_ch3.adb (Build_Full_Derivation): New procedure to create the
1122         full derivation of a derived private type, extracted from...
1123         (Copy_And_Build): In the case of record types and most
1124         enumeration types, copy the original declaration.  Build the
1125         full derivation according to the approach extracted from...
1126         (Build_Derived_Private_Type): ...here.  Call Build_Full_Derivation
1127         to create the full derivation in all existing cases and also
1128         create it in the no-discriminants/discriminants case instead of
1129         deriving directly from the full view.
1130         (Is_Visible_Component): Remove obsolete code.
1131         * sem_aggr.adb (Resolve_Record_Aggregate): Likewise.
1133 2014-08-01  Arnaud Charlet  <charlet@adacore.com>
1135         * fe.h (GNAT_Mode): New.
1136         * gcc-interface/decl.c (gnat_to_gnu_entity): Do not error out on
1137         reverse SSO in GNAT mode.
1139 2014-08-01  Thomas Quinot  <quinot@adacore.com>
1141         * freeze.adb: Minor reformatting.
1143 2014-08-01  Thomas Quinot  <quinot@adacore.com>
1145         * exp_ch3.adb (Default_Initialize_Object): Do not generate
1146         default initialization for an imported object.
1148 2014-08-01  Olivier Hainque  <hainque@adacore.com>
1150         * seh_init.c (__gnat_map_SEH): Cast argument of IsBadCodePtr
1151         to the expected FARPROC type instead of void *.
1152         * adaint.c (f2t): Expect __time64_t * as second argument, in line with
1153         other datastructures.
1154         (__gnat_file_time_name_attr): Adjust accordingly.
1155         (__gnat_check_OWNER_ACL): Declare pSD as PSECURITY_DESCRIPTOR,
1156         in line with uses.
1157         (__gnat_check_OWNER_ACL): Declare AccessMode
1158         parameter as ACCESS_MODE instead of DWORD, in line with callers
1159         and uses.
1160         (__gnat_set_executable): Add ATTRIBUTE_UNUSED on mode,
1161         unused on win32.  Correct cast of "args" on call to spawnvp.
1162         (add_handle): Cast realloc calls into their destination types.
1163         (win32_wait): Remove declaration and initialization of unused variable.
1164         (__gnat_locate_exec_on_path): Cast alloca calls
1165         into their destination types.
1166         * initialize.c (append_arg, __gnat_initialize): Cast xmalloc calls into
1167         their destination types.
1169 2014-08-01  Gary Dismukes  <dismukes@adacore.com>
1171         * exp_ch4.adb (Expand_N_Type_Conversion): Expand
1172         range checks for conversions between floating-point subtypes
1173         when the target and source types are the same.
1175 2014-08-01  Robert Dewar  <dewar@adacore.com>
1177         * exp_aggr.adb: Minor reformatting.
1179 2014-08-01  Eric Botcazou  <ebotcazou@adacore.com>
1181         * sem_ch13.adb (Check_Indexing_Functions): Initialize
1182         Indexing_Found.
1184 2014-08-01  Arnaud Charlet  <charlet@adacore.com>
1186         * gnat1drv.adb (Gnat1drv): In gnatprove mode, we now write the
1187         ALI file before we call the backend (so that gnat2why can append
1188         to it).
1190 2014-08-01  Thomas Quinot  <quinot@adacore.com>
1192         * exp_pakd.adb (Expand_Bit_Packed_Element_Set,
1193         Expand_Packed_Element_Reference): Pass additional Rev_SSO
1194         parameter indicating whether the packed array type has reverse
1195         scalar storage order to the s-pack* Set/Get routines.
1196         * s-pack*.ad* (Get, Set, GetU, SetU): New formal Rev_SSO
1197         indicating reverse scalar storage order.
1199 2014-08-01  Robert Dewar  <dewar@adacore.com>
1201         * sem_ch3.adb (Check_Initialization): Set Do_Range_Check
1202         for initial component value in -gnatc or GNATprove mode.
1203         (Process_Discriminants): Same fix for default discriminant values.
1204         * sem_eval.adb (Test_In_Range): Improve accuracy of results by
1205         checking subtypes.
1207 2014-08-01  Robert Dewar  <dewar@adacore.com>
1209         * sinfo.ads: Minor comment clarification.
1211 2014-08-01  Hristian Kirtchev  <kirtchev@adacore.com>
1213         * sem_ch13.adb (Analyze_Aspect_Specifications): Code
1214         reformatting. Store the generated pragma Import in the related
1215         subprogram as routine Wrap_Imported_Subprogram will need it later.
1216         * sem_prag.adb (Is_Unconstrained_Or_Tagged_Item): An item of
1217         a private type with discriminants is considered to fall in the
1218         category of unconstrained or tagged items.
1220 2014-08-01  Arnaud charlet  <charlet@adacore.com>
1222         * s-os_lib.adb (Open_Append): New functions to open a file for
1223         appending. This binds to the already existing (but not used)
1224         __gnat_open_append.
1225         * osint.ads, osint.adb (Open_File_To_Append_And_Check): New procedure
1226         to open a file for appending.
1227         * osint-c.ads, osint-c.adb (Open_Output_Library_Info): New procedure
1228         to open the ALI file for appending.
1230 2014-08-01  Robert Dewar  <dewar@adacore.com>
1232         * sem_ch8.adb: Minor reformatting.
1234 2014-08-01  Yannick Moy  <moy@adacore.com>
1236         * sem_ch13.adb (Insert_Pragma): Add special case for precondition
1237         pragmas from aspects, which need to be inserted in proper order.
1239 2014-08-01  Ed Schonberg  <schonberg@adacore.com>
1241         * exp_aggr.adb (Expand_Record_Aggregate, Init_Hidden_Discriminants):
1242         Handle properly a type extension that constrains a discriminated
1243         derived type that renames other discriminants of an ancestor.
1245 2014-08-01  Thomas Quinot  <quinot@adacore.com>
1247         * s-pack06.adb, s-pack10.adb, s-pack03.ads, s-pack12.adb, s-pack14.ads,
1248         s-pack25.adb: Fix minor inconsistencies and typos.
1250 2014-08-01  Hristian Kirtchev  <kirtchev@adacore.com>
1252         * sem_ch8.adb (Analyze_Subprogram_Renaming): Alphabetize
1253         globals and move certain variables to the "local
1254         variable" section. Call Build_Class_Wide_Wrapper when
1255         renaming a default actual subprogram with a class-wide actual.
1256         (Build_Class_Wide_Wrapper): New routine.
1257         (Check_Class_Wide_Actual): Removed.
1258         (Find_Renamed_Entity): Code reformatting.
1259         (Has_Class_Wide_Actual): Alphabetize. Change the
1260         logic of the predicate as the renamed name may not necessarely
1261         denote the correct subprogram.
1263 2014-08-01  Eric Botcazou  <ebotcazou@adacore.com>
1265         * sem_ch7.adb: Fix minor oversight in condition.
1267 2014-08-01  Bob Duff  <duff@adacore.com>
1269         * projects.texi: Minor documentation improvements.
1271 2014-08-01  Robert Dewar  <dewar@adacore.com>
1273         * aspects.ads, aspects.adb: Add aspect No_Elaboration_Code_All.
1274         * gnat_rm.texi: Document No_Elaboration_Code_All pragma and aspect.
1275         * lib-load.adb: Initialize No_Elab_Code_All field.
1276         * lib-writ.adb: Initialize No_Elab_Code_All.
1277         * lib.ads, lib.adb: New field No_Elab_Code_All.
1278         * par-prag.adb: Add dummy entry for pragma No_Elaboration_Code_All.
1279         * restrict.ads, restrict.adb: Restriction No_Elaboration_Code_All no
1280         longer exists.
1281         * sem_ch10.adb (Analyze_Context): Processing for
1282         No_Elaboration_Code_All removed.
1283         (Generate_Parent_References): Moved to Sem_Util.
1284         * sem_prag.adb: Add processing for pragma No_Elaboration_Code_All.
1285         * sem_util.ads, sem_util.adb (Get_Parent_Entity): Moved here from
1286         Sem_Ch10.
1287         * snames.ads-tmpl: Add entry for pragma No_Elaboration_Code_All.
1288         * targparm.adb: Minor comment updates Add comments on ignoring
1289         pragma No_Elaboration_Code_All.
1291 2014-08-01  Nicolas Roche  <roche@adacore.com>
1293         * adaint.c (__gnat_set_close_on_exec): Ensure that
1294         we can unset "close_on_exec" flag.
1296 2014-08-01  Ed Schonberg  <schonberg@adacore.com>
1298         * exp_ch9.adb (Build_Wrapper_Spec, Replicate_Formals): When building
1299         the parameter specs of the wrapper program for a primitive operation
1300         of a synchronized type that implements an interface, copy the
1301         null_exclusion indicator as well.
1303 2014-08-01  Robert Dewar  <dewar@adacore.com>
1305         * sem_eval.ads: Minor reformatting.
1307 2014-08-01  Eric Botcazou  <ebotcazou@adacore.com>
1309         * exp_ch3.adb (Build_Initialization_Call): Call Underlying_Type
1310         to go down the chain of private derivations.
1311         * freeze.adb (Freeze_Entity): Fix typo in comment.
1313 2014-08-01  Ed Schonberg  <schonberg@adacore.com>
1315         * sem_ch3.adb (Access_Type_Declaration): If designated type is
1316         a limited view, create a master entity (as is already done for
1317         class-wide types) in case the full view designates a type that
1318         contains tasks.
1319         * sem_ch8.adb (Find_Selected_Component): If prefix is a dereference
1320         and the designated type is a limited view, use the non-limited
1321         view if available.
1323 2014-08-01  Eric Botcazou  <ebotcazou@adacore.com>
1325         * gcc-interface/ada-tree.h (DECL_BY_DESCRIPTOR_P): Delete.
1326         (DECL_FUNCTION_STUB): Likewise.
1327         (SET_DECL_FUNCTION_STUB): Likewise.
1328         (DECL_PARM_ALT_TYPE): Likewise.
1329         (SET_DECL_PARM_ALT_TYPE): Likewise.
1330         (TYPE_VAX_FLOATING_POINT_P): Delete.
1331         (TYPE_DIGITS_VALUE): Likewise.
1332         (SET_TYPE_DIGITS_VALUE): Likewise.
1333         * gcc-interface/gigi.h (standard_datatypes): Remove ADT_malloc32_decl.
1334         (malloc32_decl): Delete.
1335         (build_vms_descriptor): Likewise.
1336         (build_vms_descriptor32): Likewise.
1337         (fill_vms_descriptor): Likewise.
1338         (convert_vms_descriptor): Likewise.
1339         (TARGET_ABI_OPEN_VMS): Likewise.
1340         (TARGET_MALLOC64): Likewise.
1341         * gcc-interface/decl.c (add_parallel_type_for_packed_array): New.
1342         (gnat_to_gnu_entity): Call it to add the original type as a parallel
1343         type to the implementation type of a packed array type.
1344         <E_Procedure>: Remove now obsolete kludge.
1345         <E_Exception>: Delete obsolete comment.
1346         <object>: Small tweak.
1347         <E_Subprogram_Type>: Remove support for stub subprograms, as well as
1348         for the descriptor passing mechanism.
1349         (gnat_to_gnu_param): Likewise.
1350         * gcc-interface/misc.c (gnat_init_gcc_fp): Remove special case.
1351         (gnat_print_type): Adjust.
1352         * gcc-interface/trans.c (gigi): Remove obsolete initializations.
1353         (vms_builtin_establish_handler_decl): Delete.
1354         (gnat_vms_condition_handler_decl): Likewise.
1355         (establish_gnat_vms_condition_handler): Likewise.
1356         (build_function_stub): Likewise.
1357         (Subprogram_Body_to_gnu): Do not call above functions.
1358         (Call_to_gnu): Remove support for the descriptor passing mechanism.
1359         * gcc-interface/utils.c (make_descriptor_field): Delete.
1360         (build_vms_descriptor32): Likewise.
1361         (build_vms_descriptor): Likewise.
1362         (fill_vms_descriptor): Likewise.
1363         (convert_vms_descriptor64): Likewise.
1364         (convert_vms_descriptor32): Likewise.
1365         (convert_vms_descriptor): Likewise.
1366         * gcc-interface/utils.c (unchecked_convert): Likewise.
1367         * gcc-interface/utils2.c (maybe_wrap_malloc): Remove obsolete stuff.
1369 2014-08-01  Eric Botcazou  <ebotcazou@adacore.com>
1371         * gcc-interface/trans.c (gigi): Use gnat_to_gnu_type for the exception
1372         type and get_unpadded_type for the longest FP type.
1373         (Attribute_to_gnu) <Machine>: Compare the precision of the types.
1374         (convert_with_check): Adjust formatting and remove FIXME.
1376 2014-08-01  Eric Botcazou  <ebotcazou@adacore.com>
1378         * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Signed_Integer_Subtype>:
1379         Do not convert the RM bounds to the base type.
1380         (E_Floating_Point_Subtype): Likewise.
1381         (E_Array_Subtype): Convert the bounds to the base type.
1382         * gcc-interface/trans.c (get_type_length): New function.
1383         (Attribute_to_gnu) <Range_Length>: Call it.
1384         <Length>: Likewise.
1385         (Loop_Statement_to_gnu): Convert the bounds to the base type.
1386         (gnat_to_gnu) <N_In>: Likewise.
1387         * gcc-interface/utils.c (make_type_from_size): Do not convert the RM
1388         bounds to the base type.
1389         (create_range_type): Likewise.
1390         (convert): Convert the bounds to the base type for biased types.
1391         * gcc-interface/utils2.c (compare_arrays): Convert the bounds to the
1392         base type.
1394 2014-08-01  Eric Botcazou  <ebotcazou@adacore.com>
1396         * gcc-interface/trans.c (gnat_to_gnu) <N_Selected_Component>: Remove
1397         incorrect implicit type derivation.
1398         * gcc-interface/utils.c (max_size) <tcc_reference>: Convert the bounds
1399         to the base type.
1401 2014-08-01  Hristian Kirtchev  <kirtchev@adacore.com>
1403         * sem_attr.adb (Analyze_Attribute): Preanalyze and resolve the
1404         prefix of attribute Loop_Entry.
1405         * sem_prag.adb (Analyze_Pragma): Verify the placement of pragma
1406         Loop_Variant with respect to an enclosing loop (if any).
1407         (Contains_Loop_Entry): Update the parameter profile and all
1408         calls to this routine.
1409         * sem_res.adb (Resolve_Call): Code reformatting. Do not ask
1410         for the corresponding body before determining the nature of the
1411         ultimate alias's declarative node.
1413 2014-08-01  Robert Dewar  <dewar@adacore.com>
1415         * gnat1drv.adb, sem_ch4.adb: Minor reformatting.
1417 2014-08-01  Robert Dewar  <dewar@adacore.com>
1419         * sem_eval.adb (Rewrite_In_Raise_CE): Don't try to reuse inner
1420         constraint error node since it is a list member.
1422 2014-08-01  Robert Dewar  <dewar@adacore.com>
1424         * sem_warn.adb: Minor reformatting.
1426 2014-08-01  Eric Botcazou  <ebotcazou@adacore.com>
1428         * einfo.adb (Underlying_Type): Return the underlying full view
1429         of a private type if present.
1430         * freeze.adb (Freeze_Entity):
1431         Build a single freeze node for partial, full and underlying full
1432         views, if any.
1433         * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Private_Type>: Add a
1434         missing guard before the access to the Underlying_Full_View.
1435         * gcc-interface/trans.c (process_freeze_entity): Deal with underlying
1436         full view if present.
1437         * gcc-interface/utils.c (make_dummy_type): Avoid superfluous work.
1439 2014-08-01  Ed Schonberg  <schonberg@adacore.com>
1441         * sem_res.adb (Resolve_Entry_Call): When an entry has
1442         preconditions, the entry call is wrapped in a procedure call
1443         that incorporates the precondition checks. To prevent a double
1444         expansion, with possible duplication of extra formals, that
1445         procedure call must only be pre-analyzed and resolved. Expansion
1446         takes place upon return to the caller Resolve_Call.
1448 2014-08-01  Hristian Kirtchev  <kirtchev@adacore.com>
1450         * sem_res.adb (Resolve_Call): Do not perform
1451         GNATprove-specific inlining while within a generic.
1453 2014-08-01  Ed Schonberg  <schonberg@adacore.com>
1455         * sem_ch4.adb (Analyze_Case_Expression): Handle properly a
1456         case expression with incompatible alternatives, when the first
1457         alternative is overloaded.
1459 2014-08-01  Ed Schonberg  <schonberg@adacore.com>
1461         * sem_res.adb (Check_Parameterless_Call): Use Relocate_Node
1462         to create the name of the parameterless call, rather than
1463         New_Copy, to preserve the tree structure when the name is a
1464         complex expression, e.g. a selected component that denotes a
1465         protected operation, whose prefix is itself a selected component.
1467 2014-08-01  Ed Schonberg  <schonberg@adacore.com>
1469         * sem_ch6.adb (Analyze_Subprogram_Body_Helper): Use
1470         Unit_Declaration_Node to retrieve body when inlining, to handle
1471         properly subprogram child units.
1473 2014-08-01  Robert Dewar  <dewar@adacore.com>
1475         * sem_attr.adb: Minor reformatting.
1477 2014-08-01  Vincent Celier  <celier@adacore.com>
1479         * debug.adb: Minor documentation addition for -dn switch.
1481 2014-08-01  Robert Dewar  <dewar@adacore.com>
1483         * sem_aggr.adb, exp_ch9.adb, sem_prag.adb, sem_util.adb,
1484         sem_attr.adb, sem_eval.ads, sem_cat.adb, sem_ch13.adb: Improve
1485         documentation of Is_Static_Expression vs Is_OK_Static_Expression.
1486         In several places, use the Is_OK version as suggested by the spec.
1488 2014-08-01  Vincent Celier  <celier@adacore.com>
1490         * gnatcmd.adb: Revert last change which was not correct.
1492 2014-08-01  Hristian Kirtchev  <kirtchev@adacore.com>
1494         * freeze.adb (Find_Constant): Ensure that the constant being
1495         inspected is still an object declaration (i.e. not a renaming).
1497 2014-08-01  Ed Schonberg  <schonberg@adacore.com>
1499         * sem_ch5.adb (Analyze_Loop_Parameter_Specification): a)
1500         An attribute_reference to Loop_Entry denotes an iterator
1501         specification: its prefix is an object, as is the case for 'Old.
1502         b) If the domain of iteration is an expression whose type has
1503         the Iterable aspect defined, this is an iterator specification.
1505 2014-08-01  Robert Dewar  <dewar@adacore.com>
1507         * gnatcmd.adb: Minor reformatting.
1509 2014-08-01  Robert Dewar  <dewar@adacore.com>
1511         * atree.ads (Info_Messages): New counter.
1512         * err_vars.ads: Minor comment update.
1513         * errout.adb (Delete_Warning_And_Continuations): Deal
1514         with new Info_Messages counter.
1515         (Error_Msg_Internal): ditto.
1516         (Delete_Warning): ditto.
1517         (Initialize): ditto.
1518         (Write_Error_Summary): ditto.
1519         (Output_Messages): ditto.
1520         (To_Be_Removed): ditto.
1521         * erroutc.adb (Delete_Msg): Deal with Info_Messages counter.
1522         (Compilation_Errors): ditto.
1523         * errutil.adb (Error_Msg): Deal with Info_Messages counter.
1524         (Finalize): ditto.
1525         (Initialize): ditto.
1526         * sem_prag.adb (Analyze_Pragma): Minor comment addition.
1527         * gnat_ugn.texi: Document that -gnatwe does not affect info
1528         messages.
1530 2014-08-01  Robert Dewar  <dewar@adacore.com>
1532         * debug.adb: Document debug switch -gnatd.Z.
1533         * sem.adb (Semantics): Force expansion on in no or configurable
1534         run time mode.
1536 2014-08-01  Ed Schonberg  <schonberg@adacore.com>
1538         * sem_ch5.adb (Analyze_Loop_Parameter_Specification): An
1539         unchecked conversion denotes an iterator specification. Such a
1540         conversion will be inserted in the context of an inlined call
1541         when needed, and its argument is always an object.
1543 2014-08-01  Robert Dewar  <dewar@adacore.com>
1545         * make.adb, makeutl.ads: Minor reformatting.
1546         * debug.adb, opt.ads: Clarify documentation of Front_End_Inlining and
1547         Back_End_Inlining.
1549 2014-08-01  Tristan Gingold  <gingold@adacore.com>
1551         * gnatcmd.adb (GNATCmd): Set AAMP_On_Target using command name.
1553 2014-08-01  Javier Miranda  <miranda@adacore.com>
1555         * gnat1drv.adb (Adjust_Global_Switches): Reverse meaning of
1556         -gnatd.z.
1557         * debug.adb: Updating documentation.
1558         * exp_ch6.adb (Expand_Call): Remove assertion.
1560 2014-08-01  Robert Dewar  <dewar@adacore.com>
1562         * sem_aggr.adb, sem_ch3.adb, sem_ch5.adb, sem_util.adb,
1563         sem_res.adb: Minor reformatting.
1565 2014-08-01  Vincent Celier  <celier@adacore.com>
1567         * make.adb (Initialize): Set Keep_Temporary_Files to True when
1568         -dn is specified.
1569         * makeusg.adb: Add line for new switch --keep-temp-files.
1570         * makeutl.ads (Keep_Temp_Files_Option): New constant String.
1571         * opt.ads (Keep_Temporary_Files): Document that it is also used
1572         by gnatmake and gprbuild.
1573         * switch-m.adb: Recognize new switch --keep-temp-files.
1575 2014-08-01  Tristan Gingold  <gingold@adacore.com>
1577         * sem_ch9.adb (Analyze_Task_Type_Declaration): Move code from ...
1578         * exp_ch9.adb (Make_Task_Create_Call): ... here.
1580 2014-08-01  Vincent Celier  <celier@adacore.com>
1582         * gnat1drv.adb: Do not try to get the target parameters when
1583         invoked with -gnats.
1585 2014-08-01  Hristian Kirtchev  <kirtchev@adacore.com>
1587         * exp_ch7.adb (Find_Last_Init): Nothing to do for an object
1588         declaration subject to No_Initialization.
1590 2014-08-01  Ed Schonberg  <schonberg@adacore.com>
1592         * sem_aggr.adb (Resolve_Array_Aggregate): Reject choice that
1593         is a subtype with dynamic predicates, or a non-static subtype
1594         with predicates.
1595         * sem_ch3.adb (Analyze_Number_Declaration): Reject qualified
1596         expression if subtype has a dynamic predicate.
1597         (Constrain_Index): Reject subtype indication if subtype mark
1598         has predicates.
1599         (Inerit_Predicate_Flags): Inherit Has_Predicates as well.
1600         (Make_Index): If index is a subtype indication, itype inhereits
1601         predicate flags for subsequent testing.
1602         * sem_ch5.adb (Analyze_Loop_Parameter_Specification): New
1603         procedure Check_Predicate_Use, to reject illegal uses of domains
1604         of iteration that have dynamic predicates.
1605         * sem_res.adb (Resolve_Slice): Reject slices given by a subtype
1606         indication to which a predicate applies.
1607         * sem_util.adb (Bad_Predicated_Subtype_Use): Add guard to
1608         prevent cascaded errors when subtype is invalid.
1610 2014-08-01  Robert Dewar  <dewar@adacore.com>
1612         * sem_ch10.adb: Minor reformatting.
1614 2014-08-01  Ed Schonberg  <schonberg@adacore.com>
1616         * sem_ch6.adb (Same_Generic_Actual): Make function symmetric,
1617         because either type may be a subtype of the other.
1619 2014-08-01  Vincent Celier  <celier@adacore.com>
1621         * makeusg.adb: Add documentation for debug switch -dn.
1623 2014-08-01  Ed Schonberg  <schonberg@adacore.com>
1625         * sem_dim.adb (Process_Minus, Process_Divide): Label dimension
1626         expression with standard operator and type, for pretty-printing
1627         use, when in ASIS_Mode. When generating code dimensional analysis
1628         is not involved and dimension expressions are handled statically,
1629         and other operators are resolved in the usual way.
1631 2014-08-01  Ed Schonberg  <schonberg@adacore.com>
1633         * sem_ch3.adb (Build_Derived_Record_Type): Remove setting of
1634         Parent_Subtype in ASIS mode, leads to several failures.
1635         * sem_ch4.adb (Analyze_Selected_Component): In an instance,
1636         if the prefix is a type extension, check whether component is
1637         declared in the parent type, possibly in a parent unit. Needed
1638         in ASIS mode when Parent_Subtype is not set.
1640 2014-08-01  Robert Dewar  <dewar@adacore.com>
1642         * sem_prag.adb: Minor reformatting.
1643         * s-regpat.adb: Minor reformatting.
1644         * sem_ch3.adb (Analyze_Object_Declaration): Do not set
1645         Treat_As_Volatile on constants.
1647 2014-08-01  Tristan Gingold  <gingold@adacore.com>
1649         * exp_ch9.adb (Make_Task_Create_Call): Improve error message.
1651 2014-08-01  Ed Schonberg  <schonberg@adacore.com>
1653         * sem_ch10.adb (Analyze_Compilation_Unit): Do not place a
1654         warning on a with_clause created for the renaming of a parent
1655         unit in an explicit with_clause.
1657 2014-08-01  Ed Schonberg  <schonberg@adacore.com>
1659         * sem_ch13.adb (Analyze_Aspect_Specifications, case Aspect_Import):
1660         Set Is_Imported flag at once, to simplify subsequent legality
1661         checks. Reject the aspect on an object whose declaration has an
1662         explicit initial value.
1663         * sem_prag.adb (Process_Import_Or_Interface): Use original node
1664         to check legality of an initial value for an imported entity.
1665         Set Is_Imported flag in case of error to prevent cascaded errors.
1666         Do not set the Is_Imported flag if the pragma comes from an
1667         aspect, because it is already done when analyzing the aspect.
1669 2014-08-01  Emmanuel Briot  <briot@adacore.com>
1671         * g-regpat.adb (Parse): Add support for non-capturing parenthesis.
1673 2014-08-01  Robert Dewar  <dewar@adacore.com>
1675         * sem_ch7.adb, einfo.adb, einfo.ads, sem_ch13.adb: Minor change of
1676         identifier name.
1678 2014-08-01  Hristian Kirtchev  <kirtchev@adacore.com>
1680         * sem_ch3.adb (Analyze_Object_Contract): Enable the volatility
1681         checks when the related variable comes from source.
1682         * sem_res.adb (Resolve_Actuals): Enable the volatility checks
1683         when the related actual parameter comes from source. Update comment.
1684         * freeze.adb (Freeze_Record_Type): Do not freeze the designated
1685         type of an array of pointers when the designated type is
1686         class-wide and its root type is the record being currently frozen.
1688 2014-08-01  Ed Schonberg  <schonberg@adacore.com>
1690         * sem_ch5.adb (Analyze_Iterator_Specification): Preserve Ekind
1691         of renaming declaration created for domain of iteration.
1692         * sem_aggr.adb (Resolve_Array_Aggregate): Better placement
1693         for error messages on aggregates whose index subtypes have
1694         predicates. The new placement avoids posting messages on previous
1695         subtype declarations rather than on the aggregate itself.
1696         * sem_disp.adb (Is_Inherited_Public_Operation): New predicate for
1697         Add_Dispatching_Operation, to handle properly the overriding of
1698         the predefined operations on controlled types, when the partial
1699         view of a type is not visibly controlled.
1701 2014-08-01  Ben Brosgol  <brosgol@adacore.com>
1703         * gnat_ugn.texi: Add tutorial on portable fixed-point types as an
1704         appendix.
1706 2014-08-01  Hristian Kirtchev  <kirtchev@adacore.com>
1708         * einfo.adb (Is_Hidden_Non_Overridden_Subprogram): Remove the
1709         assertion check as the attribute is defined for all entities.
1710         (Set_Is_Hidden_Non_Overridden_Subprogram): Remove the assertion
1711         check as the attribute is defined for all entities.
1712         * einfo.ads Update the documentation of attribute
1713         Is_Hidden_Non_Overridden_Subprogram.
1714         * sem_ch7.adb (Install_Package_Entity): No need to check the
1715         entity kind of the Id.
1716         * sem_ch13.adb (Hide_Matching_Homograph): Update the comment on
1717         usage. Ensure that the homographs are of the same entity kind
1718         and not fully conformant.
1719         (Hide_Non_Overridden_Subprograms): Update the comment on usage.
1721 2014-08-01  Robert Dewar  <dewar@adacore.com>
1723         * inline.adb: Minor code reorganization.
1724         * sem_ch12.adb, s-tasdeb.ads: Minor reformatting.
1726 2014-08-01  Robert Dewar  <dewar@adacore.com>
1728         * inline.adb, s-os_lib.ads: Minor reformatting.
1730 2014-08-01  Arnaud Charlet  <charlet@adacore.com>
1732         * s-tasdeb.ads, s-tasdeb.adb (Master_Hook, Master_Completed_Hook): New.
1733         * s-tassta.adb (Task_Wrapper, Vulnerable_Complete_Master): Call new
1734         hooks.
1736 2014-08-01  Yannick Moy  <moy@adacore.com>
1738         * inline.adb (Cannot_Inline): Issue info message instead of
1739         warning for subprograms not inlined in GNATprove mode.
1740         * sem_res.adb (Resolve_Call): Take body into account for deciding
1741         whether subprogram can be inlined in GNATprove mode or not.
1743 2014-08-01  Claire Dross  <dross@adacore.com>
1745         * exp_util.ads (Get_First_Parent_With_Ext_Axioms_For_Entity): Renaming
1746         of Get_First_Parent_With_External_Axiomatization_For_Entity for
1747         shorter.
1748         * sem_ch12.adb (Analyze_Associations): Only call Build_Wrapper
1749         for parameters of packages with external axiomatization.
1751 2014-08-01  Robert Dewar  <dewar@adacore.com>
1753         * sem_res.adb: Minor comment addition.
1755 2014-08-01  Arnaud Charlet  <charlet@adacore.com>
1757         * s-crtl.ads, i-cstrea.ads, adaint.c, adaint.h, osint.adb,
1758         s-fileio.adb (__gnat_fopen, __gnat_freopen): Remove vms_form parameter,
1759         no longer used.
1760         * s-os_lib.ads: Minor reformatting.
1762 2014-08-01  Arnaud Charlet  <charlet@adacore.com>
1764         * exp_attr.adb (Is_Inline_Floating_Point_Attribute): Restore more
1765         completely previous code since only GCC back-ends are prepared
1766         to handle e.g. 'Machine attribute.
1767         * targparm.adb, targparm.ads: Remove remaining refs and
1768         handling of OpenVMS_On_Target, VAX_Float_On_Target and
1769         RTX_RTSS_Kernel_Module_On_Target.
1770         * hostparm.ads (OpenVMS, Max_Debug_Name_Length): Removed,
1771         no longer used.
1773 2014-08-01  Robert Dewar  <dewar@adacore.com>
1775         * exp_dist.adb, exp_attr.adb: Minor reformatting.
1776         * sem_ch3.adb, mlib-tgt-specific-hpux.adb, a-direct.ads,
1777         a-synbar-posix.adb, exp_ch9.adb, sem_ch10.adb, sem_prag.adb,
1778         sem_ch12.adb, sem.ads, sem_res.adb, s-exctra.adb, s-soflin.ads,
1779         g-alveop.ads, sem_ch8.adb, vxaddr2line.adb, sem_cat.ads: Remove
1780         improper use of shall.
1782 2014-08-01  Robert Dewar  <dewar@adacore.com>
1784         * sem_aggr.adb, exp_atag.adb, layout.adb, nlists.adb, nlists.ads,
1785         exp_attr.adb, exp_ch9.adb, par-ch12.adb, exp_aggr.adb,
1786         exp_ch3.adb: Minor reformatting & code reorganization.
1788 2014-08-01  Robert Dewar  <dewar@adacore.com>
1790         * gnat_rm.texi: Remove VMS specific rules for pragma Ident.
1791         * Makefile.rtl, adaint.c, gnat_rm.texi, s-asthan.adb, s-asthan.ads,
1792         s-filofl.ads, s-fishfl.ads, s-fvadfl.ads, s-fvaffl.ads, s-fvagfl.ads,
1793         s-po32gl.adb, s-po32gl.ads, s-vaflop.adb, s-vaflop.ads, s-vmexta.adb,
1794         s-vmexta.ads, sem_vfpt.adb, sem_vfpt.ads, socket.c: Remove VMS specific
1795         code.
1796         * gcc-interface/decl.c, gcc-interface/Makefile.in,
1797         gcc-interface/Make-lang.in: Ditto. Also remove refs to rTX.
1799 2014-08-01  Pascal Obry  <obry@adacore.com>
1801         * s-os_lib.ads: Rename File_Size to Large_File_Size.
1803 2014-08-01  Robert Dewar  <dewar@adacore.com>
1805         * a-numaux-vxworks.ads, a-numaux-x86.adb, a-numaux-x86.ads,
1806         a-numaux-darwin.adb, a-numaux-darwin.ads, a-numaux.ads,
1807         a-numaux-libc-x86.ads: Fix bad package header comments.
1808         * elists.ads, elists.adb (Append_New_Elmt): New procedure.
1809         * gnat_rm.texi, a-calend.adb, gnatcmd.adb, einfo.adb, einfo.ads,
1810         checks.adb, sem_prag.adb, sem_prag.ads, rtsfind.ads, freeze.adb,
1811         sem_util.adb, sem_attr.adb, exp_dbug.adb, exp_dbug.ads, gnat1drv.adb,
1812         targparm.adb, targparm.ads, exp_ch6.adb, switch-b.adb, s-shasto.ads,
1813         stand.ads, s-auxdec.ads, opt.adb, opt.ads, mlib-tgt.ads, s-fatgen.adb,
1814         s-fatgen.ads, system.ads, snames.ads-tmpl, s-stalib.ads,
1815         s-os_lib.adb: Remove VMS-specific code.
1817 2014-08-01  Arnaud Charlet  <charlet@adacore.com>
1819         * exp_attr.adb (Is_Inline_Floating_Point_Attribute): Revert to
1820         previous state in CodePeer_Mode.
1822 2014-08-01  Robert Dewar  <dewar@adacore.com>
1824         * hostparm.ads: Put back definition of OpenVMS as False to aid
1825         the transition process.
1826         * sem_ch7.adb: Minor reformatting.
1827         * prj-env.adb: Minor code fix.
1828         * gnat_rm.texi: Complete previous change.
1829         * sem_ch3.adb: Minor reformatting.
1830         * sem_ch6.adb: Minor reformatting.
1831         * sem_elab.adb: Minor reformatting.
1832         * exp_strm.adb: Complete previous change.
1834 2014-08-01  Vincent Celier  <celier@adacore.com>
1836         * sem_warn.adb (Warn_On_Unreferenced_Entity): Do not issue a
1837         warning when a constant is unreferenced and its type has pragma
1838         Unreferenced_Objects.
1840 2014-08-01  Hristian Kirtchev  <kirtchev@adacore.com>
1842         * einfo.adb: Flag2 is now known as
1843         Is_Hidden_Non_Overridden_Subprogram.
1844         (Is_Hidden_Non_Overridden_Subprogram): New routine.
1845         (Set_Is_Hidden_Non_Overridden_Subprogram): New routine.
1846         (Write_Entity_Fields): Output Flag2.
1847         * einfo.ads: New attribute Is_Hidden_Non_Overridden_Subprogram
1848         along with occurrences in entities.
1849         (Is_Hidden_Non_Overridden_Subprogram): New routine and pragma Inline.
1850         (Set_Is_Hidden_Non_Overridden_Subprogram): New routine
1851         and pragma Inline.
1852         * sem_ch7.adb (Install_Package_Entity): Do not enter implicitly
1853         declared non-overriden homographs into visibility.
1854         * sem_ch13.adb (Freeze_Entity_Checks): Hide all
1855         implicitly declared non-overriden homographs.
1856         (Hide_Non_Overridden_Subprograms): New routine.
1858 2014-08-01  Robert Dewar  <dewar@adacore.com>
1860         * snames.ads-tmpl, s-os_lib.adb, s-os_lib.ads, s-fileio.adb: Remove
1861         VMS-specific code.
1862         * prj-conf.adb: Minor reformatting.
1863         * xr_tabls.adb (Read_File): Restore code which was enabled on
1864         non VMS platforms before.
1865         * prj-env.adb (Initialize_Default_Project_Path): Ditto.
1866         * sem_ch5.adb: Minor reformatting.
1867         * lib-writ.adb, lib-writ.ads, bindgen.adb, sem_vfpt.adb,
1868         sem_vfpt.ads, ali.adb, ali.ads, opt.ads, bcheck.adb, exp_strm.adb:
1869         Remove VMS-specific code.
1871 2014-08-01  Vincent Celier  <celier@adacore.com>
1873         * make.adb (Await_Compile): Remove loop that was only needed
1874         for VMS.
1876 2014-08-01  Robert Dewar  <dewar@adacore.com>
1878         * a-calcon.ads, a-direct.adb, a-dirval-mingw.adb, a-dirval.adb,
1879         a-dirval.ads, a-except-2005.adb, a-excpol-abort.adb,
1880         a-numaux-darwin.ads, a-numaux.ads, bindgen.adb, bindusg.adb,
1881         einfo.adb, einfo.ads, err_vars.ads, errout.ads, errutil.adb,
1882         exp_ch3.adb, exp_ch4.adb, exp_ch7.adb, exp_ch7.ads, fname-uf.adb,
1883         fname.adb, fname.ads, freeze.adb, g-debpoo.adb, g-dirope.ads,
1884         g-excact.ads, g-expect.ads, g-socket.adb, g-socket.ads, g-sothco.ads,
1885         g-traceb.ads, gnat_rm.texi, gnatlink.adb, gnatls.adb, i-cstrea.adb,
1886         krunch.adb, krunch.ads, layout.adb, lib-util.adb, make.adb,
1887         mlib.adb, osint-b.adb, osint-b.ads, osint-c.adb, osint.adb,
1888         osint.ads, output.ads, par.adb, prj-conf.adb, prj-env.adb,
1889         prj-makr.adb, prj-nmsc.adb, prj.adb, prj.ads, repinfo.adb, rtsfind.adb,
1890         rtsfind.ads, s-excmac-gcc.ads, s-fatgen.adb, s-mastop.ads,
1891         s-parame-ae653.ads, s-parame-hpux.ads, s-parame-vxworks.ads,
1892         s-parame.ads, s-soflin.ads, s-stoele.adb, s-tasini.adb,
1893         s-taspri-dummy.ads, s-taspri-hpux-dce.ads, s-taspri-mingw.ads,
1894         s-taspri-posix-noaltstack.ads, s-taspri-posix.ads,
1895         s-taspri-solaris.ads, s-taspri-vxworks.ads, s-trasym.ads,
1896         sem_ch12.adb, sem_ch4.adb, sem_eval.adb, sem_intr.adb, sem_mech.adb,
1897         sem_mech.ads, sem_prag.adb, sem_res.adb, sem_util.adb, sem_util.ads,
1898         sinfo.adb, sinfo.ads, sinput-c.adb, symbols.ads, targparm.adb,
1899         treepr.adb, types.ads, xr_tabls.adb, xr_tabls.ads: Remove VMS
1900         specific code and comments.
1902 2014-08-01  Ed Schonberg  <schonberg@adacore.com>
1904         * sem_ch5.adb (Analyze_Iterator_Specification): New procedure
1905         Check_Reverse_Iteration, to verify the legality of the Reverse
1906         indicator on various container types, and to detect illegal
1907         reverse iterations on containers that only supoort forward
1908         iteration.
1910 2014-08-01  Vincent Celier  <celier@adacore.com>
1912         * gnatcmd.adb: Remove the VMS specific stuff.  Integrate in
1913         procedure GNATCmd the relevant declarations from packages VMS_Cmds
1914         and VMS_Conv.
1915         * gnatcmd.ads: Update comments to remove any trace of VMS
1917 2014-08-01  Ed Schonberg  <schonberg@adacore.com>
1919         * sem_ch12.adb: sem_ch12.adb (Build_Wrapper): Capture entity for
1920         defaulted actual that is an operator, before building wrapper
1921         for it in GNATprove mode. Restrict construction of wrapper to
1922         actuals that are operators.
1924 2014-08-01  Vincent Celier  <celier@adacore.com>
1926         * vms_conv.adb, vms_conv.ads, vms_data.ads, vms_cmds.ads: Remove VMS
1927         specific packages no longer needed.
1929 2014-08-01  Pascal Obry  <obry@adacore.com>
1931         * s-os_lib.ads (System.CRTL): Move with clause to body.
1932         (File_Size): New type.
1933         (File_Length64): Use it.
1934         (File_Length): Restore previous spec returning a Long_Integer.
1935         * s-os_lib.adb (System.CRTL): Move with clause here.
1937 2014-08-01  Vincent Celier  <celier@adacore.com>
1939         * mlib-prj.adb: Update comments to remove any mention of VMS.
1941 2014-08-01  Arnaud Charlet  <charlet@adacore.com>
1943         * ug_words, xgnatugn.adb, gcc-interface/Make-lang.in: Remove
1944         xgnatugn.adb and ug_words.
1946 2014-08-01  Eric Botcazou  <ebotcazou@adacore.com>
1948         * exp_attr.adb (Expand_N_Attribute_Reference): Check whether
1949         expansion can be avoid for Machine, Model and Rounding.
1950         (Is_Inline_Floating_Point_Attribute): Return true for Machine
1951         & Model, as well as Rounding if wrapped in a conversion to an
1952         integer type.
1953         * sem_res.adb (Simplify_Type_Conversion): Deal with Rounding as well.
1954         * gcc-interface/gigi.h (fp_arith_may_widen): Declare.
1955         * gcc-interface/utils.c (fp_arith_may_widen): New global variable.
1956         * gcc-interface/misc.c (enumerate_modes): Compute it.
1957         * gcc-interface/trans.c (FP_ARITH_MAY_WIDEN): Delete.
1958         (lvalue_required_for_attribute_p): Deal with Descriptor_Size,
1959         Machine and Model.
1960         (Attribute_to_gnu) <Attr_Model>: New case.
1961         <Attr_Machine>): Likewise.
1962         (convert_with_check): Test
1963         fp_arith_may_widen variable.
1965 2014-08-01  Pascal Obry  <obry@adacore.com>
1967         * adaint.h (GNAT_FOPEN): New definition for Windows.
1968         (GNAT_OPEN): Likewise.
1969         (GNAT_STAT): Likewise.
1970         (GNAT_FSTAT): Likewise.
1971         (GNAT_LSTAT): Likewise.
1972         (GNAT_STRUCT_STAT): Likewise.
1973         * adaint.c (__gnat_stat): Fix computation of file size for
1974         Windows.
1976 2014-08-01  Vincent Celier  <celier@adacore.com>
1978         * Makefile.rtl: Minor comment update.
1980 2014-08-01  Vincent Celier  <celier@adacore.com>
1982         * Make-generated.in: Remove dependencies for vms-help.
1984 2014-08-01  Gary Dismukes  <dismukes@adacore.com>
1986         * makeutl.ads, opt.ads: Minor grammar fixes.
1987         * makeutl.adb: Minor code reorganization.
1989 2014-08-01  Arnaud Charlet  <charlet@adacore.com>
1991         * gcc-interface/Makefile.in, gcc-interface/Make-lang.in,
1992         gnatsym.adb: Remove gnatsym (VMS only tool).
1994 2014-08-01  Ben Brosgol  <brosgol@adacore.com>
1996         * gnat_ugn.texi, projects.texi, xgnatugn.adb: Removed all VMS
1997         conditionalization from gnat_ugn.texi and projects.texi, and updated
1998         (considerably simplified) xgnatugn.adb, to be removed soon.
2000 2014-08-01  Vincent Celier  <celier@adacore.com>
2002         * debug.adb: Remove doc for gnatmake/gprbuild switch -ds.
2003         * make.adb (List_Bad_Compilations): Use Opt.No_Exit_Message
2004         instead of Debug.Debug_Flag_S.
2005         * makeutl.adb (Finish_Program, Fail_Program): Use Opt flag
2006         No_Exit_Message instead of Debug.Debug_Flag_S to suppress exit
2007         error messages.
2008         * makeutl.ads (No_Exit_Message_Option): New constant string
2009         for switch --no-exit-message.
2010         * opt.ads (No_Exit_Message): New Boolean flag, defaulted to False.
2011         * switch-m.adb (Scan_Make_Switches): Recognize new switch
2012         --no-exit-message.
2014 2014-08-01  Arnaud Charlet  <charlet@adacore.com>
2016         * exp_vfpt.adb, exp_vfpt.ads: Removed, no longer used.
2017         * gcc-interface/Make-lang.in: Remove exp_vfpt.o
2019 2014-08-01  Javier Miranda  <miranda@adacore.com>
2021         * inline.ads (Inlined_Calls, Backend_Calls,
2022         Backend_Inlined_Subps, Backend_Not_Inlined_Subps): Declarations
2023         moved to inline.adb (Cannot_Inline): Update documentation.
2024         (Check_And_Build_Body_To_Inline): Renamed.
2025         (List_Inlining_Info): Subprogram moved here from package exp_ch6.
2026         * inline.adb (Check_Inlining_Restrictions): New local variable.
2027         (Inlined_Calls, Backend_Calls, Backend_Inlined_Subps,
2028         Backend_Not_Inlined_Subps): Declarations moved here
2029         from inline.ads (Number_Of_Statements): Removed.
2030         (Remove_Pragmas): Avoid duplicated version of this subprogram.
2031         (Build_Body_To_Inline): Code cleanup.
2032         (Build_Body_To_Inline.Has_Excluded_Statament): Removed.
2033         (Check_And_Build_Body_To_Inline): Renamed. Code cleanup.
2034         (Check_Body_To_Inline): Removed.
2035         (Generate_Body_To_Inline): Renamed as Generate_Subprogram_Body.
2036         (Has_Excluded_Declaration): No action if not
2037         Check_Inlining_Restrictions.
2038         (Has_Excluded_Statement): No action if not Check_Inlining_Restrictions.
2039         (Initialize): Initialize the lists of inlined calls and subprograms.
2040         (List_Inlining_Info): Subprogram moved here from package exp_ch6.
2041         * sem_ch6.adb (Analyze_Subprogram_Body_Helper): Update call
2042         to Check_And_Build_Body_To_Inline since it has been renamed as
2043         Check_And_Split_Unconstrained_Function
2044         * exp_ch6.ad[sb] (List_Inlining_Info): Subprogram moved to
2045         package inline.
2046         * gnat1drv.adb Update call to Inline.List_Inlining_Info.
2048 2014-08-01  Vincent Celier  <celier@adacore.com>
2050         * debug.adb: Add documentation for new debug switch -ds.
2051         * make.adb (List_Bad_Compilations): Do not issue any message
2052         when switch -ds is specified.
2053         * makeutl.adb (Fail_Program): Do not issue any message when
2054         -ds is specified.
2055         (Finish_Program): Ditto.
2057 2014-08-01  Robert Dewar  <dewar@adacore.com>
2059         * s-exnint.adb, s-exnint.ads, s-wwdwch.ads, s-carsi8.ads,
2060         s-casi32.ads, indepsw.adb, a-timoau.ads, s-explli.adb, s-explli.ads,
2061         s-casi16.ads, s-powtab.ads, g-wistsp.ads, a-ztmoau.adb,
2062         indepsw-gnu.adb, s-imgllb.ads, types.adb, gnat.ads, s-proinf.adb,
2063         indepsw-aix.adb, s-caun64.ads, s-imgllw.ads, s-traces-default.adb,
2064         s-vxwork-x86.ads, s-expllu.adb, s-exnlli.adb, s-exnlli.ads,
2065         s-traces.adb, widechar.ads, stand.adb, s-expint.adb,
2066         s-tratas-default.adb, s-expint.ads, s-geveop.ads, s-caun32.ads,
2067         s-expuns.adb, s-mantis.adb, s-mantis.ads, s-caun16.ads, s-tasinf.adb,
2068         s-memcop.ads, s-dsaser.ads, s-imgbiu.ads, a-szmzco.ads, g-strspl.ads,
2069         s-casi64.ads, g-zstspl.ads, indepsw-mingw.adb, tree_io.adb,
2070         s-boarop.ads, uname.ads, s-fore.adb, s-fore.ads, g-timsta.adb,
2071         g-timsta.ads, s-assert.adb, s-vector.ads, s-tratas.adb,
2072         s-tratas.ads: Minor fix to copyright notices.
2074 2014-08-01  Eric Botcazou  <ebotcazou@adacore.com>
2076         * sinfo.ads: Remove long obsolete comment.
2077 2014-08-01  Ed Schonberg  <schonberg@adacore.com>
2079         * sem_util.adb: Add guard to setting of No_Predicate_On_Actual.
2080         * sem_ch3.adb: Minor reformatting.
2082 2014-08-01  Pascal Obry  <obry@adacore.com>
2084         * cstreams.c: Only enable large file support on know supported
2085         platforms. Add missing defines/includes.
2087 2014-08-01  Ed Schonberg  <schonberg@adacore.com>
2089         * einfo.ads, einfo.adb New flags No_Predicate_On_Actual and
2090         No_Dynamic_Predicate_On_Actual, to enforce the generic contract
2091         on generic units that contain constructs that forbid subtypes
2092         with predicates.
2093         * sem_ch3.adb (Analyze_Subtype_Declaration, Process_Subtype):
2094         Inherit flags indicating the presence of predicates in subtype
2095         declarations with and without constraints.
2096         (Inherit_Predicate_Flags): Utility for the above.
2097         * sem_util.adb (Bad_Predicated_Subtype_Use): In a generic context,
2098         indicate that the actual cannot have predicates, and preserve
2099         warning. In an instance, report error if actual has predicates
2100         and the construct appears in a package declaration.
2101         * sem_ch12.adb (Diagnose_Predicated_Actual): Report error
2102         for an actual with predicates, if the corresponding formal
2103         carries No_Predicate_On_Actual or (in the case of a loop)
2104         No_Dynamic_Predicate_On_Actual.
2105         * sem_ch13.adb (Build_Predicate_Functions); Do not build a
2106         Static_Predicate function if the type is non-static (in the
2107         presence of previous errors),
2108         * sem_ch5.adb (Analyze_Loop_Parameter_Specification): Set flag
2109         No_Dynamic_Predicate_On_Actual in a generic context, to enforce
2110         generic contract on actuals that cannot have predicates.
2112 2014-08-01  Pascal Obry  <obry@adacore.com>
2114         * a-direct.adb (C_Size): Returns an int64.
2115         * osint.adb (System.CRTL): New with clause.
2116         (File_Length.Internal): Returns an int64.
2117         * s-os_lib.ads (File_Length): Returns an int64.
2119 2014-08-01  Robert Dewar  <dewar@adacore.com>
2121         * gnatchop.adb, gnatcmd.adb, make.adb, mlib-prj.adb, bindgen.adb,
2122         mlib.ads, butil.adb, clean.adb, binde.adb, gnatls.adb, gnatname.adb,
2123         osint.adb, krunch.adb: Minor reformatting.
2125 2014-08-01  Robert Dewar  <dewar@adacore.com>
2127         * inline.adb, inline.ads, fe.h, einfo.adb, einfo.ads, sem_util.adb,
2128         sem_util.ads, exp_ch4.adb, exp_ch11.adb, exp_ch6.adb, cstand.adb,
2129         sem_mech.adb, sem_ch6.adb, sem_ch8.adb, sem_ch11.adb, snames.ads-tmpl:
2130         Remove VMS-specific code.
2131         * gcc-interface/decl.c, gcc-interface/trans.c: Ditto.
2133 2014-08-01  Arnaud Charlet  <charlet@adacore.com>
2135         * binde.adb, bindgen.adb, butil.adb, clean.adb, gnatbind.adb,
2136         gnatchop.adb, gnatcmd.adb, gnatls.adb, gnatname.adb, krunch.adb,
2137         make.adb, makeutl.adb, memtrack.adb, mlib-prj.adb, mlib.adb,
2138         mlib.ads, tempdir.adb: Remove VMS handling.
2140 2014-08-01  Pascal Obry  <obry@adacore.com>
2142         * adaint.h, adaint.c (__gnat_file_length): Returns an __int64.
2143         (__gnat_named_file_length): Likewise.
2144         (__gnat_file_length_attr): Likewise.
2145         * a-direct.adb (C_Size): Use size_t as returned type.
2146         * osint.adb (File_Length): Adjust spec for Internal routine
2147         (returns size_t).
2148         * s-os_lib.adb (File_Length): Now returns a CRTL.size_t.
2149         (System.CRTL): With claused moved to spec.
2150         * s-os_lib.ads (System.CRTL): With clause moved to here.
2152 2014-08-01  Pascal Obry  <obry@adacore.com>
2154         * adaint.h, adaint.c (__gnat_open): Added.
2155         * s-crtl.ads (open): Import __gnat_open for large file support.
2157 2014-08-01  Robert Dewar  <dewar@adacore.com>
2159         * sem_case.adb (Dup_Choice): Improve message for integer constants.
2161 2014-08-01  Arnaud Charlet  <charlet@adacore.com>
2163         * gnatlink.adb: Remove special handling of VMS, RTX and JVM.
2165 2014-08-01  Pascal Obry  <obry@adacore.com>
2167         * adaint.h (GNAT_OPEN): Defines as open64 where supported.
2168         * adaint.c (GNAT_OPEN): Uses new macro where needed.
2170 2014-07-31  Eric Botcazou  <ebotcazou@adacore.com>
2172         * gcc-interface/utils.c (lookup_and_insert_pad_type): New function
2173         extracted from...
2174         (maybe_pad_type): ...here.  Call it to canonicalize the pad type.
2175         * gcc-interface/gigi.h: Update comment.
2177 2014-07-31  Javier Miranda  <miranda@adacore.com>
2179         * debug.adb Remove documentation of -gnatd.k (no longer needed).
2180         * sem_ch6.adb (Analyze_Subprogram_Body_Helper): Code cleanup.
2181         * inline.ads (Backend_Inlined_Subps): New
2182         Elist.  (Backend_Not_Inlined_Subps): New Elist.
2183         (Has_Excluded_Declaration): Declaration previously located in
2184         * inline.adb (Has_Excluded_Statement): Declaration previously
2185         located in inline.adb
2186         * inline.adb (Has_Single_Return): Moved out of
2187         Build_Body_To_Inline to avoid having duplicated code.
2188         (Number_Of_Statements): New subprogram.
2189         (Register_Backend_Inlined_Subprogram): New subprogram.
2190         (Register_Backend_Not_Inlined_Subprogram): New subprogram.
2191         (Add_Inlined_Subprogram): Register backend inlined subprograms and
2192         also register subprograms that cannot be inlined by the backend.
2193         (Has_Excluded_Declaration): Moved out of Build_Body_To_Inline
2194         to avoid having duplicated code.  Replace occurrences of
2195         Debug_Flag_Dot_K by Back_End_Inlining.
2196         * sem_res.adb (Resolve_Call): Code cleanup.
2197         * exp_ch6.adb (Expand_Call): Complete previous patch. Replace
2198         occurrence of Debug_Flag_Dot_K by Back_End_Inlining.
2199         (List_Inlining_Info): Add listing of subprograms passed to the
2200         backend and listing of subprograms that cannot be inlined by
2201         the backend.
2202         * sem_ch12.adb, sem_ch3.adb Replace occurrences of
2203         Debug_Flag_Dot_K by Back_End_Inlining.
2205 2014-07-31  Robert Dewar  <dewar@adacore.com>
2207         * nlists.ads: Minor code fix (remove unwise Inline for
2208         List_Length).
2210 2014-07-31  Arnaud Charlet  <charlet@adacore.com>
2212         * einfo.adb: Remove VMS specific code.
2213         * exp_attr.adb: Remove VAX specific code.
2214         * set_targ.adb: Remove handling of VAX_Float.
2215         * sem_vfpt.adb: Remove references to Vax_Native.
2216         * sem_attr.adb (Is_VAX_Float): Remove ref to VAX_Native.
2218 2014-07-31  Robert Dewar  <dewar@adacore.com>
2220         * sem_ch4.adb: Minor reformatting.
2222 2014-07-31  Arnaud Charlet  <charlet@adacore.com>
2224         * gcc-interface/trans.c, gcc-interface/misc.c: Remove references
2225         to VMS. Misc clean ups.
2226         * gcc-interface/Makefile.in (gnatlib-shared-vms): Remove.
2228 2014-07-31  Robert Dewar  <dewar@adacore.com>
2230         * cstand.adb, einfo.adb, einfo.ads, errout.adb, exp_attr.adb,
2231         exp_prag.adb, frontend.adb, interfac.ads,
2232         par-prag.adb, s-auxdec.ads, s-filofl.ads, s-fishfl.ads, s-fvadfl.ads,
2233         s-fvaffl.ads, s-fvagfl.ads, s-vaflop.ads, sem_attr.adb, sem_attr.ads,
2234         sem_ch13.adb, sem_ch3.adb, sem_ch8.adb, sem_prag.adb, snames.adb-tmpl,
2235         snames.ads-tmpl: Remove obsolete VMS-specific code.
2237 2014-07-31  Robert Dewar  <dewar@adacore.com>
2239         * sem_ch3.adb, sem_ch13.adb: Minor reformatting.
2241 2014-07-31  Arnaud Charlet  <charlet@adacore.com>
2243         * a-intnam-linux.ads: Minor: update obsolete comments.
2244         * s-taasde.adb: Minor: fix comment header.
2246 2014-07-31  Arnaud Charlet  <charlet@adacore.com>
2248         * s-auxdec-vms-ia64.adb, s-parame-vms-alpha.ads, s-asthan-vms-alpha.adb,
2249         s-tpopde-vms.adb, s-mastop-vms.adb, s-tpopde-vms.ads, s-taprop-vms.adb,
2250         mlib-tgt-vms_common.adb, mlib-tgt-vms_common.ads, s-inmaop-vms.adb,
2251         g-enblsp-vms-alpha.adb, s-ransee-vms.adb, s-osprim-vms.adb,
2252         s-osprim-vms.ads, g-socthi-vms.adb, g-socthi-vms.ads, system-vms_64.ads,
2253         s-osinte-vms.adb, s-osinte-vms.ads, g-eacodu-vms.adb,
2254         s-vaflop-vms-alpha.adb, s-parame-vms-ia64.ads, a-dirval-vms.adb,
2255         a-caldel-vms.adb, mlib-tgt-specific-vms-alpha.adb, s-tasdeb-vms.adb,
2256         symbols-vms.adb, a-intnam-vms.ads, g-expect-vms.adb,
2257         symbols-processing-vms-alpha.adb, mlib-tgt-specific-vms-ia64.adb,
2258         s-traent-vms.adb, s-traent-vms.ads, i-cstrea-vms.adb, a-numaux-vms.ads,
2259         symbols-processing-vms-ia64.adb, s-interr-vms.adb, s-memory-vms_64.adb,
2260         s-memory-vms_64.ads, g-enblsp-vms-ia64.adb, s-taspri-vms.ads,
2261         s-auxdec-vms_64.ads, s-intman-vms.adb, s-intman-vms.ads,
2262         s-tpopsp-vms.adb, s-asthan-vms-ia64.adb, a-calend-vms.adb,
2263         a-calend-vms.ads, system-vms-ia64.ads, s-auxdec-vms-alpha.adb: Removed.
2264         * namet.h (Is_Non_Ada_Error): Remove.
2266 2014-07-31  Robert Dewar  <dewar@adacore.com>
2268         * exp_util.adb, lib-writ.adb, sem_ch12.adb, s-direio.adb: Minor
2269         reformatting.
2271 2014-07-31  Hristian Kirtchev  <kirtchev@adacore.com>
2273         * exp_attr.adb (Expand_Loop_Entry_Attribute): Update the comment
2274         which demonstrates the expansion of while loops subject to
2275         attribute 'Loop_Entry. The condition of a while loop along with
2276         related condition actions is now wrapped in a function.  Instead
2277         of repeating the condition, the expansion now calls the function.
2279 2014-07-31  Ed Schonberg  <schonberg@adacore.com>
2281         * sem_case.adb (Check_Against_Predicate): Correct off-by-one
2282         error when reporting of missing values in a case statement for
2283         a type with a static predicate.
2284         (Check_Choices): Reject a choice given by a subtype to which a
2285         Dynamic_Predicate applies.
2286         * sem_ch3.adb (Analyze_Subtype_Declaration): Inherit
2287         Has_Dynamic_Predicate_Aspect flag from parent.
2289 2014-07-31  Ed Schonberg  <schonberg@adacore.com>
2291         * sem_ch13.adb (Analyze_Aspect_Specifications): A predicate
2292         cannot apply to a subtype of an incomplete type.
2293         (Is_Static_Choice): Treat an Others_Clause as static. The
2294         staticness of the expression and of the range are checked
2295         elsewhere.
2297 2014-07-31  Pascal Obry  <obry@adacore.com>
2299         * adaint.h (__gnat_ftell64): Added.
2300         (__gnat_fseek64): Added.
2301         (__int64): Added.
2302         * cstreams.c (__int64): Removed.
2304 2014-07-31  Pascal Obry  <obry@adacore.com>
2306         * a-stream.ads (Stream_Element_Offset): Now a signed 64bit type.
2307         * i-cstrea.ads, s-crtl.ads (fseek64): Offset is always a 64bit value.
2308         (ftell64): Always returns a 64bit value.
2309         * cstreams.c (int64): New definition.
2310         (_FILE_OFFSET_BITS): Set to 64 to enable 64bit offset support.
2311         (__gnat_ftell64): Always returns a 64bit value. The implemenation now
2312         uses ftello() on UNIX.
2313         (__gnat_fseek64): Offset is always a 64bit value. The
2314         implementation now uses fseeko() on UNIX.
2315         * a-ststio.adb, s-direio.adb (Set_Position): Simplify code,
2316         always use fseek64 to set the offset.
2317         (Size): Simplify code, always use fseek64/ftell64.
2318         * s-direio.ads (Count): Now an int64.
2319         * g-socket.ads (Vector_Element): Adjust definition for Length
2320         to be a size_t. This matches the C definition and avoid using
2321         a 64bit integer on 32bit platforms now that Count is always 64bit.
2322         * g-socthi-mingw.adb (Ada.Streams): Removed as not used anymore.
2323         (C_Recvmsg): Change some conversion to account for change in
2324         Vector_Element.
2325         (C_Sendmsg): Likewise.
2327 2014-07-31  Robert Dewar  <dewar@adacore.com>
2329         * cstand.adb (Create_Standard): Remove handling of -gnatdm flag.
2330         * debug.adb: Remove documentation of -gnatdm flag.
2331         * gnat1drv.adb (Adjust_Global_Switches): Remove handling of
2332         -gnatdm flag.
2334 2014-07-31  Arnaud Charlet  <charlet@adacore.com>
2336         * lib-writ.adb (Write_Unit_Information): Fix case where U =
2337         No_Unit.
2339 2014-07-31  Claire Dross  <dross@adacore.com>
2341         * exp_util.adb, exp_util.ads
2342         (Get_First_Parent_With_External_Axiomatization_For_Entity):
2343         New routine to find the first parent of an entity with
2344         a pragma Annotate (GNATprove, External_Axiomatization).
2345         (Has_Annotate_Pragma_For_External_Axiomatization): New function
2346         to check if a package has a pragma Annotate (GNATprove,
2347         External_Axiomatization).
2348         * einfo.ads, einfo.adb (Is_Generic_Actual_Subprogram): New
2349         flag on the entity for the declaration created for a formal
2350         subprogram in an instance. This is a renaming declaration,
2351         or in GNATprove_Mode the declaration of an expression function
2352         that captures the axiomatization of the actual.
2353         * sem_ch6.adb (Analyze_Expression_Function): For a
2354         Generic_Actual_Subprogram, place body immediately after the
2355         declaration because it may be used in a subsequent declaration
2356         in the instance.
2357         * sem_ch12.adb (Build_Wrapper): Add code to handle instances where
2358         the actual is a function, not an operator. Handle functions with
2359         one and two parameters and binary and unary operators.
2361 2014-07-31  Pascal Obry  <obry@adacore.com>
2363         * cstreams.c (__gnat_is_regular_file_fd): Removed.
2364         * adaint.c (__gnat_is_regular_file_fd): Added.
2366 2014-07-31  Robert Dewar  <dewar@adacore.com>
2368         * exp_strm.adb: Minor reformatting.
2370 2014-07-31  Ed Schonberg  <schonberg@adacore.com>
2372         * sem_ch12.adb (Build_Wrapper): New procedure, subsidiary to
2373         Analyze_Associations, to create a wrapper around operators that
2374         are actuals to formal subprograms. This is done in GNATProve
2375         mode in order to propagate the contracts of the operators to
2376         the body of the instance.
2378 2014-07-31  Ed Schonberg  <schonberg@adacore.com>
2380         * sem_attr.adb (Analyze_Attribute, case 'Old):  The reference is
2381         legal if within an aspect specification for a generic subprogram.
2383 2014-07-31  Javier Miranda  <miranda@adacore.com>
2385         * gnat1drv.adb (Back_End_Inlining): Set to false if
2386         Suppress_All_Inlining is set.
2387         * debug.adb: Adding documentation for -gnatd.z.
2388         * inline.adb (Add_Inlined_Body): Extend the -gnatn2
2389         processing to -gnatn1 for calls to Inline_Always routines.
2390         (Add_Inlined_Subprogram): Remove previous patch.
2392 2014-07-31  Ed Schonberg  <schonberg@adacore.com>
2394         * sem_ch13.adb (Check_One_Function): Apply properly the static
2395         semantic rules for indexing aspects and the functions they denote.
2397 2014-07-31  Javier Miranda  <miranda@adacore.com>
2399         * debug.adb: Complete documentation of -gnatd.z.
2401 2014-07-31  Bob Duff  <duff@adacore.com>
2403         * gnat_ugn.texi: Minor doc fixes.
2405 2014-07-31  Robert Dewar  <dewar@adacore.com>
2407         * sem_aggr.adb (Resolve_Array_Aggregate): Fix posting of missing
2408         index value.
2410 2014-07-31  Tristan Gingold  <gingold@adacore.com>
2412         * s-unstyp.ads (Packed_Byte): Make this type universal aliasing.
2413         (Packed_Bytes1): Make component aliased.
2415 2014-07-31  Robert Dewar  <dewar@adacore.com>
2417         * s-unstyp.ads, s-fileio.adb: Minor reformatting.
2419 2014-07-31  Robert Dewar  <dewar@adacore.com>
2421         * inline.adb, gnat1drv.adb, exp_ch6.adb, s-fileio.adb: Minor
2422         reformatting.
2424 2014-07-31  Eric Botcazou  <ebotcazou@adacore.com>
2426         * gcc-interface/utils2.c ((build_binary_op): Don't set TREE_THIS_NOTRAP
2427         on array references here, now done more selectively in trans.c.
2429 2014-07-31  Doug Rupp  <rupp@adacore.com>
2431         * gcc-interface/misc.c (gnat_init_gcc_fp(): Set flag_errno_math to 0.
2433 2014-07-31  Hristian Kirtchev  <kirtchev@adacore.com>
2435         * sem_util.adb (Is_Effectively_Volatile): New routine.
2437 2014-07-31  Fedor Rybin  <frybin@adacore.com>
2439         * gnat_ugn.texi: Document --test-duration option for gnattest.
2441 2014-07-31  Javier Miranda  <miranda@adacore.com>
2442             Eric Botcazou  <ebotcazou@adacore.com>
2444         * opt.ads (Back_End_Inlining): New variable which controls
2445         activation of inlining by back-end expansion.
2446         * gnat1drv.adb (Adjust_Global_Switches): Initialize Back_End_Inlining
2447         * sem_ch6.adb (Analyze_Subprogram_Body_Helper): Do not build
2448         the body to be inlined by the frontend if Back_End_Inlining
2449         is enabled.
2450         * exp_ch6.adb (Register_Backend_Call): Moved to inline.adb.
2451         (Expand_Call): If backend inlining is enabled let the backend to
2452         handle inlined subprograms.
2453         * inline.ads (Register_Backend_Call): Moved here from exp_ch6
2454         * inline.adb (Register_Backend_Call): Moved here from exp_ch6.
2455         (Add_Inlined_Subprogram): Add subprograms when Back_End_Inlining is set.
2456         (Must_Inline): Do not return Inline_Call if Back_End_Inlining is
2457         enabled.
2458         * debug.adb Document -gnatd.z
2459         * fe.h Import Back_End_Inlining variable.
2460         * gcc-interface/utils.c (create_subprog_decl): If Back_End_Inlining is
2461         enabled then declare attribute "always inline"
2462         * gcc-interface/decl.c, gcc-interface/trans.c,
2463         gcc-interface/gigi.h: Add handling of Inline_Always pragma.
2465 2014-07-31  Robert Dewar  <dewar@adacore.com>
2467         * a-ngelfu.ads: Minor comment fix.
2469 2014-07-31  Hristian Kirtchev  <kirtchev@adacore.com>
2471         * freeze.adb (Freeze_Record_Type): Replace all calls to
2472         Is_SPARK_Volatile with Is_Effectively_Volatile and update
2473         related comments.
2474         * sem_ch3.adb (Analyze_Object_Contract, Process_Discriminants):
2475         Replace all calls to Is_SPARK_Volatile with
2476         Is_Effectively_Volatile and update related comments.
2477         * sem_ch5.adb (Analyze_Iterator_Specification,
2478         Analyze_Loop_Parameter_Specification): Replace all calls to
2479         Is_SPARK_Volatile with Is_Effectively_Volatile and update
2480         related comments.
2481         * sem_ch6.adb (Process_Formals): Replace all calls to
2482         Is_SPARK_Volatile with Is_Effectively_Volatile and update
2483         related comments.
2484         * sem_ch12.adb (Instantiate_Object): Replace the call to
2485         Is_SPARK_Volatile_Object with Is_Effectively_Volatile_Object
2486         and update related comment.
2487         * sem_prag.adb (Analyze_External_Property_In_Decl_Part,
2488         Analyze_Global_Item): Replace all calls to Is_SPARK_Volatile
2489         with Is_Effectively_Volatile and update related comments.
2490         * sem_res.adb (Resolve_Actuals, Resolve_Entity_Name): Replace
2491         all calls to Is_SPARK_Volatile with Is_Effectively_Volatile and
2492         update related comments.
2493         * sem_util.adb (Has_Enabled_Property,
2494         Variable_Has_Enabled_Property): Replace all calls
2495         to Is_SPARK_Volatile with Is_Effectively_Volatile and
2496         update related comments.
2497         (Is_Effectively_Volatile): New routine.
2498         (Is_Effectively_Volatile_Object): New routine.
2499         (Is_SPARK_Volatile): Removed.
2500         (Is_SPARK_Volatile_Object): Removed.
2501         * sem_util.ads (Is_Effectively_Volatile): New routine.
2502         (Is_Effectively_Volatile_Object): New routine.
2503         (Is_SPARK_Volatile): Removed.
2504         (Is_SPARK_Volatile_Object): Removed.
2506 2014-07-31  Pascal Obry  <obry@adacore.com>
2508         * s-fileio.adb (Open): Make sure a shared file gets inserted into
2509         the global list atomically. This ensures that the file descriptor
2510         won't be freed because another tasks is closing the file.
2512 2014-07-31  Robert Dewar  <dewar@adacore.com>
2514         * sem_ch3.adb (Process_Range_Expr_In_Decl): Add comments on
2515         generation of _FIRST and _LAST variables even in GNATprove_Mode.
2516         * gnat_ugn.texi: Minor editing.
2517         * sem_prag.adb (Ensure_Aggregate_Form): Make sure generated
2518         aggregate is marked Comes_From_Source if argument is CFS.
2520 2014-07-31  Pascal Obry  <obry@adacore.com>
2522         * s-fileio.adb: Remove obsolete comment.
2524 2014-07-31  Vincent Celier  <celier@adacore.com>
2526         * a-strbou.ads ("=" (Bounded_String, Bounded_String): Add
2527         overriding keyword before function to avoid error when compiler
2528         is called with -gnatyO (check overriding indicators).
2530 2014-07-31  Tucker Taft  <taft@adacore.com>
2532         * gnat_ugn.texi: Add a paragraph pointing the reader
2533         to the "plugins" example.
2535 2014-07-31  Hristian Kirtchev  <kirtchev@adacore.com>
2537         * freeze.adb (Freeze_Expression): Document the
2538         purpose of the parent chain traversal.
2540 2014-07-31  Robert Dewar  <dewar@adacore.com>
2542         * checks.ads, checks.adb (Activate_Overflow_Check): Do not set flag for
2543         unconstrained fpt ops.
2545 2014-07-31  Pascal Obry  <obry@adacore.com>
2547         * s-fileio.adb (Open): Make sure a shared file gets inserted into
2548         the global list atomically. This ensures that the file descriptor
2549         won't be freed because another tasks is closing the file.
2551 2014-07-31  Vincent Celier  <celier@adacore.com>
2553         * projects.texi: Minor spelling error fix.
2555 2014-07-31  Robert Dewar  <dewar@adacore.com>
2557         * gnat_rm.texi: Document No_Elaboration_Code_All restriction.
2558         * lib-writ.adb, lib-load.adb: Initialize No_Elab_Code field in unit
2559         information.
2560         * lib.ads, lib.adb (No_Elab_Code): New field in unit information.
2561         * restrict.adb (Process_Restriction_Synonyms): Add handling
2562         of No_Elaboration_Code_All.
2563         * restrict.ads (Process_Restriction_Synonyms): Now handles
2564         No_Elaboration_Code_All.
2565         * sem_ch10.adb (Analyze_Context): Enforce transitive with for
2566         No_Elaboration_Code_All.
2567         * sem_prag.adb (Process_Restrictions_Or_Restriction_Warnings):
2568         Handle setting of No_Elab_Code in unit information. Handle
2569         No_Elaboration_Code_All.
2570         * snames.ads-tmpl (Name_No_Elaboration_Code): New name for
2571         pragma processing.
2572         (Name_No_Elaboration_Code_All): New name for pragma processing.
2574 2014-07-31  Eric Botcazou  <ebotcazou@adacore.com>
2576         * exp_aggr.adb (Aggr_Assignment_OK_For_Backend): Reject array
2577         types with a null range and use the Esize of the component
2578         instead of its RM_Size to identify appropriate values.
2580 2014-07-31  Hristian Kirtchev  <kirtchev@adacore.com>
2582         * freeze.adb Add with and use clause for Aspects.
2583         (Freeze_Expression): Emit an error when a volatile constant lacks
2584         Boolean aspect Import.
2585         (Has_Boolean_Aspect_Import): New routine.
2587 2014-07-31  Gary Dismukes  <dismukes@adacore.com>
2589         * exp_util.adb: Minor reformatting.
2591 2014-07-31  Vincent Celier  <celier@adacore.com>
2593         * errutil.adb (Error_Msg): Make sure that all components of
2594         the error message object are initialized.
2596 2014-07-31  Ed Schonberg  <schonberg@adacore.com>
2598         * sem_ch4.adb (Try_Container_Indexing): If the container type is
2599         class-wide, use specific type to locate iteration primitives.
2600         * sem_ch13.adb (Check_Indexing_Functions): Add legality checks for
2601         rules in RM 4.1.6 (Illegal_Indexing): New diagnostic procedure.
2602         Minor error message reformating.
2603         * exp_ch5.adb (Expand_Iterator_Loop): Handle properly Iterator
2604         aspect for a derived type.
2606 2014-07-31  Robert Dewar  <dewar@adacore.com>
2608         * debug.adb: Document debug flag d.X.
2610 2014-07-31  Ed Schonberg  <schonberg@adacore.com>
2612         * sem_util.ads (Find_Specific_Type): Moved here from exp_disp.adb.
2613         * sem_util.adb (Find_Specific_Type): If type is untagged private,
2614         retrieve full view so that primitive operations can be located.
2615         * exp_disp.adb Move Find_Specific_Type to sem_util.
2616         * exp_ch4.adb (Expand_N_Op_Eq): If operands are class-wide, use
2617         Find_Specific_Type to locate primitive equality.
2618         * exp_util.adb (Make_CW_Equivalent_Type): A class_wide equivalent
2619         type does not require initialization.
2620         * exp_attr.adb (Compile_Stream_Body_In_Scope): Within an instance
2621         body all visibility is established, and the enclosing package
2622         declarations must not be installed.
2624 2014-07-31  Yannick Moy  <moy@adacore.com>
2626         * sem_parg.adb, sem_prag.ads (Collect_Subprogram_Inputs_Outputs):
2627         Make subprogram public.
2629 2014-07-31  Ed Schonberg  <schonberg@adacore.com>
2631         * exp_ch9.adb (Expand_N_Protected_Type_Declaration): New
2632         predicate Discriminated_Size, to distinguish between private
2633         components that depend on discriminants from those whose size
2634         depends on some other non-static expression.
2636 2014-07-31  Nicolas Setton  <setton@adacore.com>
2638         * g-exptty.adb (Close): Fix binding to Waitpid: use the
2639         tty version.
2641 2014-07-31  Ed Schonberg  <schonberg@adacore.com>
2643         * sem_ch3.adb (Make_Index): Reject properly the use of 'Length
2644         in a discrete range, when 'range was probably intended.
2646 2014-07-31  Robert Dewar  <dewar@adacore.com>
2648         * sem_warn.adb, sem_warn.ads (Has_Junk_Name): Moved from body to spec.
2650 2014-07-31  Robert Dewar  <dewar@adacore.com>
2652         * frontend.adb: Minor reformatting.
2653         * sem.adb: Minor reformatting.
2654         * sem_ch6.adb (Analyze_Null_Procedure): Set proper sloc for
2655         identifiers on rewrite.
2656         * par.adb: Minor comment updates.
2657         * a-ngelfu.adb (Cos): Minor simplification.
2658         * par-ch13.adb (Get_Aspect_Specifications): Improve messages
2659         and recovery for bad aspect.
2660         * exp_ch3.adb: Code clean up.
2661         * sem_util.ads: Minor comment correction.
2662         * sem_ch13.adb (Check_Array_Type): Properly handle large types.
2663         * sem_ch3.adb: Code clean up.
2664         * binderr.ads: Minor comment correction.
2666 2014-07-31  Ed Schonberg  <schonberg@adacore.com>
2668         * exp_disp.adb (Expand_Interface_Conversion): A call whose
2669         prefix is a static conversion to an interface type that is not
2670         class-wide is not dispatching.
2672 2014-07-31  Robert Dewar  <dewar@adacore.com>
2674         * inline.adb, s-traceb.adb, s-traceb-hpux.adb, memtrack.adb,
2675         s-traceb-mastop.adb: Minor reformatting.
2677 2014-07-31  Ed Schonberg  <schonberg@adacore.com>
2679         * exp_ch3.adb (Expand_Record_Extension): In ASIS_Mode perform
2680         expansion, to handle properly visibility of selected components
2681         in instance bodies.
2683 2014-07-31  Robert Dewar  <dewar@adacore.com>
2685         * par-ch13.adb (Get_Aspect_Specifications): Set Inside_Depends.
2686         * par-ch2.adb (P_Pragma): Set Inside_Depends.
2687         * par-ch4.adb (P_Simple_Expression): Pass Inside_Depends to
2688         Check_Unary_Plus_Or_Minus.
2689         * scans.ads (Inside_Depends): New flag.
2690         * scng.adb (Scan): Pass Inside_Depends to Check_Arrow.
2691         * style.ads: Add Inside_Depends parameter to Check_Arrow Add
2692         Inside_Depends parameter to Check_Unary_Plus_Or_Minus.
2693         * styleg.adb (Check_Arrow): Handle Inside_Depends case.
2694         (Check_Unary_Plus_Or_Minus): Handle Inside_Depends case.
2695         * styleg.ads: Add Inside_Depends parameter to Check_Arrow Add.
2696         Inside_Depends parameter to Check_Unary_Plus_Or_Minus.
2698 2014-07-31  Javier Miranda  <miranda@adacore.com>
2700         * s-vaflop.adb Move the body of function T_To_G before
2701         T_To_D. Required for frontend inlining.
2702         * inline.adb (Has_Excluded_Contract): New subprogram used to
2703         check if a subprogram inlined by the frontend has contracts
2704         which cannot be inlined.
2706 2014-07-31  Bob Duff  <duff@adacore.com>
2708         * s-traceb.adb, s-traceb-hpux.adb, s-traceb-mastop.adb:
2709         (Call_Chain): Add 1 to number of frames to skip, to account for
2710         the fact that there's one more frame on the stack.
2711         * gcc-interface/Makefile.in (s-traceb.o): Adjust rules.
2713 2014-07-31  Robert Dewar  <dewar@adacore.com>
2715         * checks.adb (Enable_Overflow_Check): More precise setting of
2716         Do_Overflow_Check flag for division.
2718 2014-07-31  Eric Botcazou  <ebotcazou@adacore.com>
2720         * exp_aggr.adb (Aggr_Assignment_OK_For_Backend): Reject packed
2721         array types with implementation type.
2723 2014-07-31  Hristian Kirtchev  <kirtchev@adacore.com>
2725         * sem_ch10.adb (Process_State): Remove local variable Name. Add
2726         local variable Decl. Partially declare an abstract state by
2727         generating an entity and storing it in the state declaration.
2728         * sem_prag.adb (Create_Abstract_State): Fully declare a
2729         semi-declared abstract state.
2731 2014-07-31  Robert Dewar  <dewar@adacore.com>
2733         * prj-nmsc.adb: Minor reformatting.
2735 2014-07-31  Bob Duff  <duff@adacore.com>
2737         * s-tasdeb.adb (System.Tasking.Debug): Remove
2738         all usage of the secondary stack from this package.
2740 2014-07-31  Hristian Kirtchev  <kirtchev@adacore.com>
2742         * freeze.adb (Freeze_Expression): Update the loop in charge
2743         of finding a proper insertion place for freeze nodes to handle
2744         N_Expression_With_Actions nodes.
2746 2014-07-31  Robert Dewar  <dewar@adacore.com>
2748         * sem_util.adb, a-ngelfu.ads, prj-nmsc.adb, prj-conf.adb: Minor
2749         reformatting.
2751 2014-07-31  Pascal Obry  <obry@adacore.com>
2753         * prj-nmsc.adb: Minor reformatting.
2755 2014-07-31  Ed Schonberg  <schonberg@adacore.com>
2757         * sem_util.adb (Has_Preelaborable_Initialization): Check that
2758         type is tagged before checking whether a user-defined Initialize
2759         procedure is present.
2761 2014-07-31  Gary Dismukes  <dismukes@adacore.com>
2763         * a-ngelfu.ads (Sqrt): Augment postcondition.
2765 2014-07-31  Pascal Obry  <obry@adacore.com>
2767         * prj-nmsc.adb (Check_Library_Attributes): An aggegate library
2768         directory and ALI directory must be different than all object
2769         and library directories of aggregated projects.
2771 2014-07-31  Vincent Celier  <celier@adacore.com>
2773         * prj-pars.adb, prj-conf.ads, prj-conf.adb (Locate_Runtime): Move spec
2774         to package body, as it is not called from outside. Remove argument
2775         Project_Tree, no longer used. When runtime cannot be found,
2776         call Raise_Invalid_Config instead of failing the program.
2778 2014-07-31  Robert Dewar  <dewar@adacore.com>
2780         * bindgen.adb (Gen_Output_File_Ada): Generate pragma Suppress
2781         (Overflow_Check).
2782         * gnatlink.adb (Process_Args): Remove generation of -gnato0,
2783         no longer needed.
2785 2014-07-31  Robert Dewar  <dewar@adacore.com>
2787         * gnat_ugn.texi: Document new switch -gnato0.
2788         * sem_ch3.ads: Minor reformatting.
2789         * gnatlink.adb (Process_Args): Compile bind file with -gnato0
2790         (we do not want overflow checks when incrementing elaboration
2791         counters).
2792         * einfo.ads: Minor reformatting.
2794 2014-07-31  Robert Dewar  <dewar@adacore.com>
2796         * exp_ch5.adb, freeze.adb, exp_ch3.adb: Minor comment correction.
2797         * s-arit64.adb: Minor reformatting.
2799 2014-07-31  Robert Dewar  <dewar@adacore.com>
2801         * gnat1drv.adb (Adjust_Global_Switches): Default for overflow
2802         checking is enabled except in GNAT_Mode.
2803         * switch-c.adb (Scan_Front_End_Switches): Implement -gnato0
2804         (suppress overflow checks).
2806 2014-07-31  Ed Schonberg  <schonberg@adacore.com>
2808         * exp_ch3.adb (Expand_Freeze_Record_Type): Do not build an
2809         invariant procedure for an internally generated subtype that is
2810         created for an object of a class-wide type.
2812 2014-07-31  Vincent Celier  <celier@adacore.com>
2814         * prj-nmsc.adb, errutil.adb: Make code similar to Errout.
2816 2014-07-31  Gary Dismukes  <dismukes@adacore.com>
2818         * gnat_rm.texi, sem_aux.ads, einfo.ads, sem_util.ads, sem_ch6.adb,
2819         exp_disp.adb: Minor reformatting.
2821 2014-07-31  Robert Dewar  <dewar@adacore.com>
2823         * exp_ch5.adb, sem_ch3.adb, exp_ch7.adb, exp_util.adb, exp_ch9.adb,
2824         sem_ch7.adb, checks.adb, s-exctra.adb, exp_ch6.adb, exp_disp.adb,
2825         exp_dist.adb, sem_ch13.adb, exp_strm.adb, exp_ch3.adb: Minor
2826         reformatting.
2828 2014-07-31  Robert Dewar  <dewar@adacore.com>
2830         * sem_ch13.adb: Minor reformatting.
2832 2014-07-31  Ed Schonberg  <schonberg@adacore.com>
2834         * exp_ch3.adb (Build_Invariant_Checks): If the enclosing record
2835         is an unchecked_union, warn that invariants will not be checked
2836         on components that have them.
2838 2014-07-31  Robert Dewar  <dewar@adacore.com>
2840         * freeze.adb (Freeze_Entity): Check for error of
2841         Type_Invariant'Class applied to a untagged type.
2842         * sem_ch6.adb (Analyze_Null_Procedure): Unconditionally rewrite
2843         as null body, so that we perform error checks even if expansion
2844         is off.
2846 2014-07-31  Ed Schonberg  <schonberg@adacore.com>
2848         * sem_ch13.adb (Build_Invariant_Procedure): If body of procedure
2849         is already present, nothing to do.
2850         * exp_ch3.adb (Build_Component_Invariant_Call): For an access
2851         component, check whether the access type has an invariant before
2852         checking the designated type.
2853         (Build_Record_Invariant_Proc): Change suffix of generated
2854         name to prevent ambiguity when record type has invariants
2855         in addition to those of components, and two subprograms are
2856         constructed. Consistent with handling of array types.
2857         (Insert_Component_Invariant_Checks): Build invariant procedure
2858         body when one has not been created yet, in the case of composite
2859         types that are completions and whose full declarations carry
2860         invariants.
2862 2014-07-30  Thomas Quinot  <quinot@adacore.com>
2864         * gnat_rm.texi: Minor doc fixes.
2866 2014-07-30  Robert Dewar  <dewar@adacore.com>
2868         * a-rbtgbo.adb, sem_ch13.adb: Minor reformatting.
2870 2014-07-30  Vincent Celier  <celier@adacore.com>
2872         * errutil.adb (Set_Msg_Text): Process tilde ('~'): no processing
2873         of error message.
2874         * prj-nmsc.adb (Locate_Directory): Use a tilde ('~') in the
2875         message to report that a directory cannot be created, to avoid
2876         processing of the directory path that may contains special
2877         insertion characters.
2879 2014-07-30  Ed Schonberg  <schonberg@adacore.com>
2881         * a-crdlli.ads: Place declaration of Empty_List after full type
2882         declaration for Curosr, to prevent freezing error.
2884 2014-07-30  Robert Dewar  <dewar@adacore.com>
2886         * get_targ.adb: Minor code reorganization.
2887         * prj-proc.adb, prj-proc.ads, get_targ.ads, sem_ch6.adb: Minor
2888         reformatting.
2890 2014-07-30  Ed Schonberg  <schonberg@adacore.com>
2892         * a-cbhase.adb: a-cbhase.adb (Insert): Raise Constraint_Error,
2893         not Program_Error, when attempting to remove an element not in
2894         the set. This is the given semantics for all set containers.
2896 2014-07-30  Ed Schonberg  <schonberg@adacore.com>
2898         * a-rbtgbo.adb (Delete_Node_Sans_Free): If
2899         element is not present in tree return rather than violating
2900         an assertion. Constraint_Error will be raised in the caller if
2901         element is not in the container.
2903 2014-07-30  Arnaud Charlet  <charlet@adacore.com>
2905         * set_targ.adb (Read_Target_Dependent_Values): New subprogram.
2906         (elab body): Add provision for default target config file.
2907         * get_targ.ads, get_targ.adb (Get_Back_End_Config_File): New subprogram.
2909 2014-07-30  Ed Schonberg  <schonberg@adacore.com>
2911         * a-cbhase.adb (Delete): Raise Constraint_Error, not Program_Error,
2912         when attempting to remove an element not in the set. This is
2913         the given semantics for all set containers.
2914         * a-cborse.adb (Delete): Attempt removal first, to check for
2915         tampering, before checking whether this is an attempt to
2916         delete a  non-existing element, and in fthe latter case raise
2917         Constraint_Error.
2919 2014-07-30  Vincent Celier  <celier@adacore.com>
2921         * prj-proc.adb (Recursive_Process): Do not create a new
2922         Project_Id if the project is already in the list of projects of
2923         the tree.
2925 2014-07-30  Ed Schonberg  <schonberg@adacore.com>
2927         * sem_ch6.adb (Analyze_Function_Return): Reject a return expression
2928         whose type is an incomplete formal type.
2929         (Analyze_Return_Type): Reject a return type that is an untagged
2930         imcomplete formal type.
2931         (Process_Formals): Reject a formal parameter whose type is an
2932         untagged formal incomplete type.
2933         * sem_res.adb (Resolve_Actuals): Reject an actual whose type is
2934         an untagged formal incomplete type.
2936 2014-07-30  Robert Dewar  <dewar@adacore.com>
2938         * gnat_ugn.texi: Minor spelling correction.
2939         * makeutl.adb: Minor code reorganization.
2940         * exp_ch4.adb, exp_aggr.adb, exp_ch3.adb: Minor reformatting.
2942 2014-07-30  Robert Dewar  <dewar@adacore.com>
2944         * einfo.ads (Has_Unchecked_Union): Document that this is used
2945         to check for illegal Valid_Scalars attribute references.
2946         * exp_attr.adb (Build_Record_VS_Func): New function
2947         (Expand_N_Attribute_Reference, case Valid_Scalars): Call this
2948         function.
2949         * gnat_rm.texi: Document 'Valid_Scalars cannot be applied to
2950         Unchecked_Union Add note on 'Valid_Scalars generating a lot
2951         of code.
2952         * sem_attr.adb (Analyze_Attribute, case Valid_Scalars): Give
2953         error on attempt to apply Valid_Scalars to Unchecked_Union type.
2955 2014-07-30  Steve Baird  <baird@adacore.com>
2957         * exp_ch4.adb (Expand_N_Indexed_Component): Disable optimized handling
2958         of A(I..J)(K) in CodePeer_Mode.
2960 2014-07-30  Ben Brosgol  <brosgol@adacore.com>
2962         * gnat_ugn.texi: Fix typo.
2964 2014-07-30  Thomas Quinot  <quinot@adacore.com>
2966         * lib-writ.ads: document format change.
2968 2014-07-30  Pascal Obry  <obry@adacore.com>
2970         * prj-util.adb (For_Interface_Sources): Do not
2971         include sources from withed externally built projects.
2973 2014-07-30  Robert Dewar  <dewar@adacore.com>
2975         * lib.adb: Minor reformatting.
2976         * prj-util.adb: Minor reformatting.
2978 2014-07-30  Ed Schonberg  <schonberg@adacore.com>
2980         * exp_aggr.adb (Build_Record_Aggr_Code): For an array component
2981         that depends on discriminants, and which is given by an others
2982         clause, create an explicit subtype with the discriminant values
2983         of the enclosing aggregate, because the backend cannot otherwise
2984         retrieve the actual bounds of the array.
2986 2014-07-30  Fedor Rybin  <frybin@adacore.com>
2988         * gnat_ugn.texi: Improve gnattest documentation.
2990 2014-07-30  Pascal Obry  <obry@adacore.com>
2992         * makeutl.adb (Insert_Project_Sources): Properly handle sources
2993         that are aggregated. We want to include sources not only part
2994         of libraries but also if part of an aggregated project from an
2995         aggregate library.
2996         * prj.adb (For_Project_And_Aggregated_Context): Properly check
2997         state of root project.
2999 2014-07-30  Thomas Quinot  <quinot@adacore.com>
3001         * lib-load.ads: Minor reformatting.
3002         * sinfo.ads (Library_Unit): Update comment.
3003         * lib.ads (Notes): Simplify. The Unit component in Notes_Entry
3004         is redundant. Instead used the pragma Node_Id directly as the
3005         element type.
3007 2014-07-30  Thomas Quinot  <quinot@adacore.com>
3009         * lib.adb (Store_Note): Store only notes that do not come from
3010         an instance, and that are in the extended main source unit.
3011         * lib-writ (Write_Unit_Information): Annotations from subunits
3012         must be emitted along with those for the main unit, and they
3013         must carry a specific file name.
3014         * ali.ads (Notes_Record): Use a File_Name_Type instead of a
3015         Unit_Id for the source file containing the pragma, as in the
3016         case of annotations from subunits we might not have a readily
3017         available unit id.
3018         * ali.adb (Scan_ALI): Account for above change in data structure.
3020 2014-07-30  Vincent Celier  <celier@adacore.com>
3022         * makeutl.adb (Insert_Project_Sources): When the library project
3023         is an aggregate Stand-Alone Library, insert in the queue the
3024         Ada interface units, with Closure set to True;
3026 2014-07-30  Eric Botcazou  <ebotcazou@adacore.com>
3028         * sem_util.adb: Fix minor typo.
3029         * makeutl.adb: Minor reformatting.
3031 2014-07-30  Robert Dewar  <dewar@adacore.com>
3033         * exp_ch7.adb, checks.adb, makeutl.adb, makeutl.ads: Minor reformatting.
3035 2014-07-30  Yannick Moy  <moy@adacore.com>
3037         * checks.ads: Fix typo in comment.
3039 2014-07-30  Pierre-Marie Derodat  <derodat@adacore.com>
3041         * sem_util.adb (Set_Debug_Info_Needed): For scalar types, recurse on
3042         entities that materialize range bounds, if any.
3044 2014-07-30  Vincent Celier  <celier@adacore.com>
3046         * projects.texi: Minor spelling fix.
3048 2014-07-30  Hristian Kirtchev  <kirtchev@adacore.com>
3050         * checks.adb (Make_Bignum_Block): Use the new secondary stack
3051         build routines to manage the mark.
3052         * exp_ch7.adb (Create_Finalizer, Expand_Cleanup_Actions):
3053         Use the new secodary stack build routines to manage the mark.
3054         (Insert_Actions_In_Scope_Around): Add new formal parameter
3055         Manage_SS along with comment on its usage. Code and comment
3056         reformatting. Mark and release the secondary stack when the
3057         context warrants it.
3058         (Make_Transient_Block): Update the call
3059         to Insert_Actions_In_Scope_Around to account for parameter Manage_SS.
3060         (Wrap_Transient_Declaration): Remove local variable
3061         Uses_SS. Ensure that the secondary stack is marked and released
3062         when the related object declaration appears in a library level
3063         package or package body. Code and comment reformatting.
3064         * exp_util.ads, exp_util.adb (Build_SS_Mark_Call): New routine.
3065         (Build_SS_Release_Call): New routine.
3067 2014-07-30  Steve Baird  <baird@adacore.com>
3069         * exp_attr.adb: Revert previous change, not needed after all.
3071 2014-07-30  Vincent Celier  <celier@adacore.com>
3073         * makeutl.adb (Queue.Insert_Project_Sources): Insert with
3074         Closure => True for interfaces of Stand-Alone Libraries.
3075         * makeutl.ads (Source_Info (Format => Gprbuild)): Add new
3076         Boolean component Closure, defaulted to False.
3078 2014-07-30  Yannick Moy  <moy@adacore.com>
3080         * sem_res.adb: Fix typo in error message.
3082 2014-07-30  Robert Dewar  <dewar@adacore.com>
3084         * sem_ch3.adb (Process_Range_Expr_In_Decl): Use _FIRST/_LAST
3085         as name suffixes rather than L/H for subtype bounds.
3086         * tbuild.ads: Minor comment improvements and fixes
3087         (Make_External_Name): Document that suffix can start with an
3088         underscore.
3090 2014-07-30  Bob Duff  <duff@adacore.com>
3092         * gnat_ugn.texi: Document --rep-clauses switch.
3094 2014-07-30  Ed Schonberg  <schonberg@adacore.com>
3096         * sem_ch13.adb (Analyze_Aspect_Specifications): Default_Value and
3097         Default_Component_Value can only be specified for scalar type or
3098         arrays of scalar types respectively.  This legality check must
3099         be performed at the point the aspect is analyzed, in order to
3100         reject aspect specifications that apply to a partial view.
3102 2014-07-30  Thomas Quinot  <quinot@adacore.com>
3104         * freeze.adb: Minor reformatting.
3106 2014-07-30  Robert Dewar  <dewar@adacore.com>
3108         * exp_attr.adb (Expand_Attribute, case First/Last): Don't expand in
3109         codepeer mode.
3111 2014-07-30  Ed Schonberg  <schonberg@adacore.com>
3113         * freeze.adb (Check_Expression_Function): At the freeze point
3114         of an expression function, verify that the expression in the
3115         function does not contain references to any deferred constants
3116         that have no completion yet.
3117         (Freeze_Expression, Freeze_Before): call
3118         Check_Expression_Function.
3119         * a-ciorse.ads: Add Reference_Control_Type to detect tampering.
3120         * a-ciorse.adb: Add Adjust and Finalize routines for
3121         Reference_Control_Type. Use it in the construction of Reference
3122         and Constant_Reference values.
3124 2014-07-30  Robert Dewar  <dewar@adacore.com>
3126         * exp_aggr.adb: Update comments.
3127         * a-chtgbo.adb, a-chtgbo.ads, a-cbhase.adb, a-cbhase.ads: Minor
3128         reformatting.
3130 2014-07-30  Robert Dewar  <dewar@adacore.com>
3132         * cstand.adb (New_Standard_Entity): New version takes name
3133         string to call Make_Name.
3134         (Create_Standard): Use this routine to set name before setting other
3135         fields.
3137 2014-07-30  Robert Dewar  <dewar@adacore.com>
3139         * exp_attr.adb (Expand_Attribute, case First): Rewrite simple
3140         entity reference.
3141         (Expand_Attribute, case Last): Ditto.
3142         * exp_ch3.adb (Constrain_Index): New calling sequence for
3143         Process_Range_Expr_In_Decl.
3144         (Expand_N_Object_Declaration): Avoid setting Is_Known_Valid in one
3145         problematical case.
3146         * sem_ch3.adb (Constrain_Index): New calling sequence for
3147         Process_Range_Expr_In_Decl.
3148         (Set_Scalar_Range_For_Subtype): ditto.
3149         (Process_Range_Expr_In_Decl): Create constants to hold bounds for
3150         subtype.
3151         * sem_ch3.ads (Process_Range_Expr_In_Decl): Add Subtyp parameter.
3152         * sem_eval.adb (Compile_Time_Compare): Make sure we use base
3153         types if we are not assuming no invalid values.
3155 2014-07-30  Robert Dewar  <dewar@adacore.com>
3157         * clean.adb: Minor reformatting.
3158         * opt.ads: Minor fix to incorrect comment.
3160 2014-07-30  Ed Schonberg  <schonberg@adacore.com>
3162         * a-chtgbo.ads, a-chtgbo.adb (Delete_Node_At_Index): New
3163         subprogram, used by bounded hashed sets, to delete a node at
3164         a given index, whose element may have been improperly updated
3165         through a Reference_Preserving key.
3166         * a-cbhase.ads: Add Reference_Control_Type to package Generic_Keys.
3167         * a-cbhase.adb: Add Adjust and Finalize routines for
3168         Reference_Control_Type.
3169         (Delete, Insert): Raise Program_Error, not Constraint_Error,
3170         when operation is illegal.
3171         (Reference_Preserving_Key): Build aggregate for Reference_Control_Type
3172         * a-cmbutr.ads: Add Reference_Control_Type to detect tampering. Add
3173         private with_clause for Ada.Finalization.
3174         * a-cbmutr.adb: Add Adjust and Finalize routines for
3175         Reference_Control_Type. Use it in the construction of Reference
3176         and Constant_Reference values.
3178 2014-07-30  Robert Dewar  <dewar@adacore.com>
3180         * sem_ch3.adb, sem_ch3.ads: Minor code reorganization.
3182 2014-07-30  Pascal Obry  <obry@adacore.com>
3184         * clean.adb (Clean_Project): Properly check for directory
3185         existence before trying to enter it.
3187 2014-07-30  Robert Dewar  <dewar@adacore.com>
3189         * sem_ch3.ads, prj.ads, prj-nmsc.adb: Minor reformatting.
3191 2014-07-30  Robert Dewar  <dewar@adacore.com>
3193         * par-ch5.adb (P_Sequence_Of_Statements): Properly handle
3194         missing semicolon after name.
3196 2014-07-30  Pascal Obry  <obry@adacore.com>
3198         * prj.ads (Gprinstall_Flags): New constant.
3199         * prj-nmsc.adb (Check_Library_Attributes): Do not fails for
3200         missing library dir if Directories_Must_Exist_In_Projects
3201         is false.
3203 2014-07-30  Bob Duff  <duff@adacore.com>
3205         * a-except-2005.adb, a-except.adb: Remove obsolete comments.
3206         * s-traceb.ads: Updagte comments.
3208 2014-07-30  Robert Dewar  <dewar@adacore.com>
3210         * checks.adb, a-cihase.adb, a-cihase.ads, a-chtgop.adb, a-chtgop.ads,
3211         a-except.adb, a-except-2005.adb, a-cborse.adb, a-cborse.ads,
3212         a-exexda.adb, a-elchha.adb, exp_aggr.adb, a-cohase.adb: Minor
3213         reformatting.
3215 2014-07-30  Ed Schonberg  <schonberg@adacore.com>
3217         * a-chtgop.ads, a-chtgop.adb (Delete_Node_At_Index): New
3218         subprogram, used by all versions of hashed sets, to delete a node
3219         whose element has been improperly updated through a Reference_
3220         Preserving key.
3221         * a-cohase.adb: Remove Delete_Node, use new common procedure
3222         Delete_Node_At_Index.
3223         * a-cihase.ads: Add Reference_Control_Type to package Generic_Keys.
3224         * a-cihase.adb: Add Adjust and Finalize routines for
3225         Reference_Control_Type.
3226         (Reference_Preserving_Key): Build aggregate for
3227         Reference_Control_Type
3229 2014-07-30  Yannick Moy  <moy@adacore.com>
3231         * checks.adb, checks.ads (Determine_Range_R): New procedure to
3232         determine the possible range of a floating-point expression.
3234 2014-07-30  Ed Schonberg  <schonberg@adacore.com>
3236         * a-cborse.ads: Add Reference_Control_Type to package Generic_Keys.
3237         * a-cborse.adb: Add Adjust and Finalize routines for
3238         Reference_Control_Type.
3239         (Reference_Preserving_Key): Build aggregate for
3240         Reference_Control_Type.
3241         (Delete): Check for tampering, and raise Program_Error (not
3242         Constraint_Error) when attempting to delete an element not in
3243         the set.
3244         (Insert): Ditto.
3246 2014-07-30  Bob Duff  <duff@adacore.com>
3248         * a-elchha.adb, a-except-2005.adb, a-except.adb, a-exexda.adb,
3249         * a-exextr.adb, a-exstat.adb, exp_intr.ads, s-tassta.adb:
3250         Exception_Information is used to produce useful debugging
3251         information for the programmer. However, it was also used to
3252         implement the stream attributes for type Exception_Occurrence. The
3253         latter requires a stable and portable interface, which meant
3254         that we couldn't include a symbolic traceback. A separate set of
3255         routines was used to provide symbolic tracebacks under program
3256         control (i.e. not automatically). The goal of this ticket is
3257         to provide such automatic tracebacks, so the change here is to
3258         split the two functionalities: Exception_Information gives the
3259         maximally useful information for debugging (i.e. it now includes
3260         a symbolic traceback when a decorator is set, and it can be
3261         improved freely in the future without disturbing streaming).
3262         Untailored_Exception_Information always uses hexadecimal addresses
3263         in the traceback, has a stable and portable output, and is now
3264         used for streaming.
3266 2014-07-30  Eric Botcazou  <ebotcazou@adacore.com>
3268         * exp_aggr.adb (Expand_Array_Aggregate): Add missing test
3269         on the target of the assignment to find out whether it
3270         can be directly done by the back-end.
3271         * exp_util.adb (Is_Possibly_Unaligned_Slice): Remove obscure test.
3273 2014-07-30  Robert Dewar  <dewar@adacore.com>
3275         * inline.adb, a-coorse.adb, a-coorse.ads, a-cohase.adb, a-cohase.ads,
3276         a-tasatt.adb: Minor reformatting.
3278 2014-07-30  Robert Dewar  <dewar@adacore.com>
3280         * exp_ch4.adb: Minor reformatting.
3282 2014-07-30  Ed Schonberg  <schonberg@adacore.com>
3284         * a-coorse.adb, a-coorse.ads (Generic_Keys): Add a
3285         Reference_Control_Type to generic package, to keep additional
3286         information for Reference_Types that manipulate keys. Add Adjust and
3287         Finalize procedures for this type.
3288         (Finalize): When finalizing a reference_preserving_key, verify
3289         that the key of the new value is equivalent to the key of the
3290         original element, raise Program_Error otherwise.
3291         (Insert): Detect tampering.
3292         (Reference_Preserving_Key): Build proper Reference_Control_Type,
3293         and update Busy and Lock bits to detect tampering.
3294         * a-cohase.ads: Keep with-clause private.
3296 2014-07-30  Hristian Kirtchev  <kirtchev@adacore.com>
3298         * exp_ch4.adb (Expand_N_Op_Eq): Emit a warning when the operands
3299         of an equality are of an Unchecked_Union type and lack inferable
3300         discriminants.
3302 2014-07-30  Bob Duff  <duff@adacore.com>
3304         * g-exctra.adb, g-exctra.ads, s-exctra.adb, s-exctra.ads, Makefile.rtl,
3305         g-trasym.adb, g-trasym.ads, s-trasym.adb, s-trasym.ads: Move
3306         GNAT.Traceback.Symbolic and GNAT.Exception_Traces into the System
3307         hierarchy (System.Traceback.Symbolic and System.Exception_Traces), so
3308         we can call them from the runtimes. Leave renamings in place under GNAT.
3310 2014-07-30  Yannick Moy  <moy@adacore.com>
3312         * inline.adb (Check_And_Build_Body_To_Inline): Include code for
3313         inlining in GNATprove mode.
3315 2014-07-30  Ed Schonberg  <schonberg@adacore.com>
3317         * a-cohase.adb, a-cohase.ads (Generic_Keys): Add a
3318         Reference_Control_Type to generic package, to keep additional
3319         information for Reference_Types that manipulate keys. Add Adjust and
3320         Finalize procedures for this type.
3321         (Delete_Node): New procedure called when finalizing a
3322         Reference_Control_Type, to remove a node whose element has been
3323         improperly updated through a Reference.
3324         (Insert): Detect tampering.
3325         (Reference_Preserving_Key): Build proper Reference_Control_Type,
3326         and update Busy and Lock bits to detect tampering.
3328 2014-07-30  Bob Duff  <duff@adacore.com>
3330         * exp_intr.ads: Minor comment fix.
3332 2014-07-30  Gary Dismukes  <dismukes@adacore.com>
3334         * exp_prag.adb, a-tags.ads: Minor typo fixes.
3336 2014-07-30  Bob Duff  <duff@adacore.com>
3338         * a-excach.adb, a-excach-cert.adb, a-except-2005.ads,
3339         a-except.ads, g-traceb.adb, memtrack.adb,
3340         s-traceb.adb, s-traceb.ads, s-traceb-hpux.adb, s-traceb-mastop.adb:
3341         Cleanup: Make the three versions of System.Traceback.Call_Chain
3342         have the same interface. Use an array for the Traceback parameter
3343         instead of an Address.  This will enable reduction in code
3344         duplication.
3346 2014-07-30  Pat Rogers  <rogers@adacore.com>
3348         * gnat_ugn.texi: Corrected minor textual error in description
3349         of switch -gnatwl.
3351 2014-07-30  Bob Duff  <duff@adacore.com>
3353         * Makefile.rtl: Sort file names.
3355 2014-07-30  Arnaud Charlet  <charlet@adacore.com>
3357         * a-tasatt.adb: Complete previous change: kill spurious warning
3358         on e.g. sparc, and make sure we only use the fast path when the
3359         alignment is compatible.
3361 2014-07-30  Yannick Moy  <moy@adacore.com>
3363         * sem_ch6.adb (Analyze_Subprogram_Body_Helper): Mark new Spec_Id as
3364         coming from source.
3366 2014-07-30  Yannick Moy  <moy@adacore.com>
3368         * inline.adb (Build_Body_To_Inline): Issue more precise messages
3369         for declarations that prevent inlining.
3370         (Cannot_Inline): Change usual start of message to refer to contextual
3371         analysis in GNATprove mode.
3372         * sem_res.adb (Resolve_Call): Change usual start of message to
3373         refer to contextual analysis in GNATprove mode, when inlining
3374         not possible.
3376 2014-07-30  Robert Dewar  <dewar@adacore.com>
3378         * sem_res.adb, sem_ch6.adb: Minor code reorganization.
3379         * inline.adb: Minor reformatting.
3381 2014-07-30  Javier Miranda  <miranda@adacore.com>
3383         * a-tags.ads: Add comments.
3385 2014-07-30  Pat Rogers  <rogers@adacore.com>
3387         * gnat_rm.texi: Minor word error.
3389 2014-07-30  Ed Schonberg  <schonberg@adacore.com>
3391         * exp_prag.adb (Expand_Old): Insert declarationss of temporaries
3392         created to capture the value of the prefix of 'Old at the
3393         beginning of the current declarative part, to prevent data flow
3394         anomalies in the postcondition procedure that will follow.
3396 2014-07-30  Yannick Moy  <moy@adacore.com>
3398         * debug.adb: Retire debug flag -gnatdQ.
3399         * inline.adb (Can_Be_Inlined_In_GNATprove_Mode): Check SPARK_Mode
3400         on decl, not on body.  Ignore predicate functions.
3401         * sem_ch6.adb (Analyze_Subprogram_Body_Helper): Remove use of
3402         debug flag -gnatdQ.  Correctly analyze SPARK_Mode on decl and
3403         body when generating a decl for a body on which SPARK_Mode aspect
3404         is given.
3405         * sem_prag.adb (Analyze_Pragma|SPARK_Mode): Reorder tests for
3406         attaching pragma to entity, to account for declaration not coming
3407         from source.
3408         * sem_res.adb (Resolve_Call): Issue warning and flag subprogram
3409         as not always inlined in GNATprove mode, when called in an
3410         assertion context.
3412 2014-07-30  Vincent Celier  <celier@adacore.com>
3414         * debug.adb: Minor comment update.
3416 2014-07-30  Robert Dewar  <dewar@adacore.com>
3418         * s-tasuti.adb, s-tassta.adb: Minor reformatting.
3419         * sprint.adb (Sprint_Node): Handle N_Contract case.
3420         * exp_prag.adb: Minor reformatting.
3421         * freeze.adb (Freeze_Entity): Check useless postcondition for
3422         No_Return subprogram.
3423         * sem_prag.adb: Minor reformatting.
3425 2014-07-30  Javier Miranda  <miranda@adacore.com>
3427         * a-tags.ads: Complete comments about performance.
3429 2014-07-30  Fedor Rybin  <frybin@adacore.com>
3431         * gnat_ugn.texi: Adding description for --exit-status option to
3432         gnattest section.  Fixing index entry of --passed-tests option
3433         in gnattest section.
3435 2014-07-30  Javier Miranda  <miranda@adacore.com>
3437         * Makefile.rtl, gnat_rm.texi, i-cpp.adb, i-cpp.ads, impunit.adb,
3438         rtsfind.ads: Remove references to package Interfaces.CPP since this
3439         package is no longer needed.
3441 2014-07-30  Bob Duff  <duff@adacore.com>
3443         * s-taasde.adb (Timer_Queue): Don't use a
3444         build-in-place function call to initialize the Timer_Queue.
3445         * s-traent.adb, s-traent.ads, s-traent-vms.adb, s-traent-vms.ads:
3446         Turn off polling in these units, because otherwise we get
3447         elaboration circularities with Ada.Exceptions when the -gnatP
3448         switch is used.
3449         * s-tassta.adb (Create_Task): Make sure independent tasks
3450         are created with Parent = Environment_Task. This was not true,
3451         for example, in s-interr.adb, when Interrupt_Manager does "new
3452         Server_Task"; the Server_Task had Parent = Interrupt_Manager,
3453         which is wrong because the master is determined by the access
3454         type, which is at library level.
3455         * s-tasuti.adb (Make_Independent): Avoid setting Parent; it is
3456         now set correctly by Create_Task.
3457         (Make_Passive): Remove the workaround for the race condition in
3458         Make_Independent.
3459         * frontend.adb (Frontend): Revert to previous method of detecting
3460         temporary configuration pragma files, recognizing such files by
3461         ".tmp" in the name. This is more general than detecting pragmas
3462         Source_File_Name_Project, because it allows any tool to use
3463         this naming convention, no matter the content of the file.
3464         * gnat_ugn.texi: Document this naming convention.
3466 2014-07-30  Robert Dewar  <dewar@adacore.com>
3468         * exp_ch7.adb, s-tataat.adb, s-tataat.ads, s-parame-vms-alpha.ads,
3469         inline.adb, s-parame-hpux.ads, exp_smem.adb, s-tasini.adb,
3470         s-tasini.ads, s-parame-vms-ia64.ads, s-parame.ads, s-taskin.ads,
3471         s-parame-vxworks.ads, a-tasatt.adb, a-tasatt.ads: Minor reformatting.
3472         * a-suenco.adb (Convert): Handle overlong encodings in UTF8-UTF8
3473         conversion.
3475 2014-07-30  Ed Schonberg  <schonberg@adacore.com>
3477         * sem_ch5.adb: Improve error recovery.
3478         * inline.adb (Build_Body_To_Inline): Set Full_Analysis to false
3479         before analyzing the body, so that in GNATprove mode there is
3480         no light expansion. Whatever expansion is required by SPARK will
3481         be performed when analysing the inlined code.
3483 2014-07-30  Bob Duff  <duff@adacore.com>
3485         * s-tataat.adb, s-tataat.ads, a-tasatt.adb: Minor comment fixes.
3487 2014-07-30  Ed Schonberg  <schonberg@adacore.com>
3489         * sem_ch5.adb (Analyze_Loop_Statement): If loop has a label,
3490         verify that it is not hidden by an inner implicit declaration.
3492 2014-07-30  Thomas Quinot  <quinot@adacore.com>
3494         * sem.ads (Scope_Table_Entry): New component Locked_Shared_Objects.
3495         * sem_ch8.adb (Push_Scope): Initialize Locked_Shared_Objects.
3496         * exp_smem.adb (Add_Shared_Var_Lock_Procs): Handle the case where
3497         the call returns an unconstrained type: in this case there is
3498         already a transient scope, and we should not establish a new one.
3499         * exp_ch7.adb (Insert_Actions_In_Scope_Around): New formal Clean. If
3500         True, also insert cleanup actions in the tree.
3501         (Wrap_Transient_Declaration): Call Insert_Actions_In_Scope_Around
3502         with Clean set True.
3504 2014-07-30  Arnaud Charlet  <charlet@adacore.com>
3506         * s-taskin.ads (Direct_Index, Direct_Index_Range,
3507         Direct_Attribute_Element, Direct_Attribute_Array,
3508         Direct_Index_Vector, Direct_Attributes, Is_Defined,
3509         Indirect_Attributes): Removed.  (Atomic_Address,
3510         Attribute_Array, Attributes): New.
3511         * s-tasini.ads, s-tasini.adb (Proc_T, Initialize_Attributes,
3512         Finalize_Attributes_Link, Initialize_Attributes_Link): Removed.
3513         (Finalize_Attributes): Reimplement.
3514         * s-tassta.adb (Create_Task): Remove call to
3515         Initialize_Attributes_Link (Free_Task, Vulnerable_Free_Task):
3516         Replace Finalize_Attributes_Link by Finalize_Attributes.
3517         * a-tasatt.ads, a-tasatt.adb, s-tataat.ads, s-tataat.adb:
3518         Reimplement from scratch, using a simpler and more efficient
3519         implementation.
3520         * s-tporft.adb (Register_Foreign_Thread): Remove now obsolete comment.
3521         * s-parame.ads, s-parame-hpux.ads,
3522         * s-parame-vms-alpha.ads, s-parame-vms-ia64.ads,
3523         * s-parame-vxworks.ads (Max_Attribute_Count): New, replace
3524         Default_Attribute_Count.
3526 2014-07-30  Olivier Hainque  <hainque@adacore.com>
3528         * vxworks-ppc-link.spec: New file. Extra link
3529         instructions for ppc-vxworks.
3530         * vxworks-crtbe-link.spec: Likewise, for ZCX related support.
3531         * system-vxworks-ppc.ads: Adjust linker options to use spec files.
3532         * system-vxworks-arm.ads: Likewise.
3533         * gcc-interface/Makefile.in: Enable .spec files.
3535 2014-07-30  Ed Schonberg  <schonberg@adacore.com>
3537         * sem_aggr.adb: Minor comment reformatting.
3539 2014-07-30  Robert Dewar  <dewar@adacore.com>
3541         * sem_util.ads, sem_util.adb (Is_Junk_Name): Removed.
3542         * sem_warn.adb (Has_Junk_Name): New function
3543         (Check_References): Use Has_Junk_Name to delete junk warnings
3544         (Check_Unset_Reference): ditto.
3545         (Warn_On_Unreferenced_Entity): ditto.
3546         (Warn_On_Useless_Assignment): ditto.
3548 2014-07-30  Ed Schonberg  <schonberg@adacore.com>
3550         * checks.adb (Insert_Valid_Check): Do not check for the packed
3551         array type of a prefix that is an access type.
3553 2014-07-30  Ed Schonberg  <schonberg@adacore.com>
3555         * sem_attr.adb (Eval_Attribute): Evaluate the GNAT attribute
3556         Unconstrained_Array even if prefix is not frozen yet, as can
3557         occur with a private subtype used as a generic actual.
3559 2014-07-30  Gary Dismukes  <dismukes@adacore.com>
3561         * sem_attr.adb: Minor reformatting.
3563 2014-07-30  Pat Rogers  <rogers@adacore.com>
3565         * gnat_rm.texi: Corrected minor wording error in description
3566         of No_Exception_Registration.
3568 2014-07-30  Yannick Moy  <moy@adacore.com>
3570         * einfo.ads, einfo.adb: New flag Is_Inlined_Always for use in GNATprove
3571         mode. Realphabetize two subprograms.
3572         * inline.adb (Cannot_Inline): Use Is_Inlined_Always in GNATprove mode.
3573         (Can_Be_Inlined_In_GNATprove_Mode): Adapt to possible Empty Body_Id.
3574         (Check_And_Build_Body_To_Inline): Use Is_Inlined_Always in GNATprove
3575         mode.
3576         (Expand_Inline_Call): Use Is_Inlined_Always in GNATprove mode.
3577         * sem_ch6.adb (Analyze_Subprogram_Body_Helper): Do not use
3578         Is_Inline in GNATprove mode.
3579         (Analyze_Subprogram_Specification):
3580         Set Is_Inlined_Always at subprogram entity creation.
3581         * sem_res.adb (Resolve_Call): Do not deal with inlining during
3582         pre-analysis.  Issue warning on call to possibly inlined
3583         subprogram when body not seen.
3585 2014-07-30  Yannick Moy  <moy@adacore.com>
3587         * lib-xref.adb (Generate_Reference): Add special
3588         case for compiler-generated formals in GNATprove mode.
3590 2014-07-30  Yannick Moy  <moy@adacore.com>
3592         * sem_ch6.adb: Add comments.
3594 2014-07-30  Thomas Quinot  <quinot@adacore.com>
3596         * s-os_lib.ads (GM_Time_Of): Clarify documentation.
3598 2014-07-30  Robert Dewar  <dewar@adacore.com>
3600         * sem_aggr.adb, sem_res.adb: Minor reformatting.
3602 2014-07-30  Thomas Quinot  <quinot@adacore.com>
3604         * sem_ch13.adb (Analyze_Attribute_Definition_Clause, case
3605         Bit_Order): Set Reverse_Bit_Order on the base type of the
3606         specified first subtype.
3608 2014-07-30  Ed Schonberg  <schonberg@adacore.com>
3610         * inline.adb (Expand_Inlined_Call): Use a renaming declaration
3611         to capture the value of actuals of a limited type rather than
3612         an object declaration, to prevent spurious errors when analyzing
3613         the inlined body.
3615 2014-07-30  Ed Schonberg  <schonberg@adacore.com>
3617         * sem_ch4.adb (Analyze_Type_Conversion): Treat an inlined body
3618         as an instance, and inhibit semantic checks on already analyzed
3619         code to prevent spurious errors.
3621 2014-07-30  Arnaud Charlet  <charlet@adacore.com>
3623         * a-exctra.ads ("="): New function, to restore compatibility.
3625 2014-07-30  Pascal Obry  <obry@adacore.com>
3627         * adaint.c (__gnat_to_os_time): Set isdst to -1 for the mktime
3628         routine to use the OS dst setting.
3630 2014-07-30  Pat Rogers  <rogers@adacore.com>
3632         * gnat_ugn.texi: Minor correction to description of -gnatw.K.
3634 2014-07-30  Ed Schonberg  <schonberg@adacore.com>
3636         * sem_util.adb (Wrong_Type): Disable some checks equally within
3637         instances and within inlined bodies, to suppress spurious type
3638         errors on already analyzed code.
3639         * sem_aggr.adb (Check_Expr_OK_In_Limited_Aggregate): Expression
3640         is legal in an inlined body, juts as it is in an instance body.
3642 2014-07-30  Ed Schonberg  <schonberg@adacore.com>
3644         * sem_res.adb (Resolve_Unchecked_Conversion): Within an inlined
3645         body the operand of an unchecked conversion may be a literal, in
3646         which case its type is the target type of the conversion. This
3647         is in contrast to conversions in other contexts, where the
3648         operand cannot be a literal and must be resolvable independent
3649         of the context.
3651 2014-07-30  Pierre-Marie Derodat  <derodat@adacore.com>
3653         * gcc-interface/decl.c (gnat_to_gnu_entity) <object>: Create a
3654         mere scalar constant instead of a reference for a renaming of
3655         scalar literal.
3656         * gcc-interface/utils.c (renaming_from_generic_instantiation_p): New.
3657         * gcc-interface/gigi.h (renaming_from_generic_instantiation_p): New.
3659 2014-07-30  Robert Dewar  <dewar@adacore.com>
3661         * s-tasuti.adb, s-tasuti.ads, einfo.ads, sem_prag.adb, s-taasde.adb,
3662         g-socthi-vms.adb, s-taprop-mingw.adb, s-interr.adb, s-interr-hwint.adb,
3663         g-decstr.adb, s-tasdeb-vms.adb, g-expect-vms.adb, makeutl.adb,
3664         s-interr-vms.adb, g-socthi.adb, exp_aggr.adb, s-tasdeb.adb,
3665         g-awk.adb, gnatls.adb, s-taspri-posix.ads, g-catiio.adb,
3666         s-interr-sigaction.adb, s-os_lib.adb, s-fileio.adb: Minor reformatting
3667         & code reorganization.
3669 2014-07-30  Bob Duff  <duff@adacore.com>
3671         * s-tassta.adb, sem_util.ads: Minor reformatting.
3673 2014-07-30  Yannick Moy  <moy@adacore.com>
3675         * inline.adb (Build_Body_To_Inline): Detect when
3676         subprogram has multiple returns, or not a single last return
3677         statement, in GNATprove mode.
3678         (Cannot_Inline): Simplify logic to handle case of GNATprove
3679         inlining first.
3681 2014-07-30  Ed Schonberg  <schonberg@adacore.com>
3683         * sem_ch6.adb: Stubs are not subject to inlining.
3685 2014-07-30  Bob Duff  <duff@adacore.com>
3687         * s-tasuti.ads, s-tasuti.adb (Make_Independent): Change this
3688         from a procedure to a function, so that it can more easily be
3689         called before the "begin" of a task.
3690         * s-taasde.ads (Delay_Block): Make this type immutably limited,
3691         so we can use a build-in-place function call to initialize
3692         Timer_Queue in the body.
3693         * a-rttiev.adb, s-asthan-vms-alpha.adb, s-asthan-vms-ia64.adb,
3694         * s-interr.adb, s-interr-hwint.adb, s-interr-sigaction.adb,
3695         * s-interr-vms.adb, s-taasde.adb: Each independent task now calls
3696         Make_Independent before reaching its "begin", to avoid race
3697         conditions. This causes the activating task to wait until after
3698         Make_Independent is complete before proceeding.  In addition,
3699         we initialize data structures used by independent tasks before
3700         activating those tasks, to avoid possible use of uninitialized data.
3701         * s-interr.ads, s-intman.ads, s-taspri-posix.ads, s-tasdeb.ads:
3702         Minor comment fixes.
3704 2014-07-30  Bob Duff  <duff@adacore.com>
3706         * a-exctra.ads, s-traent-vms.ads, s-traent.ads (Tracebacks_Array): Move
3707         the declaration of Tracebacks_Array from Ada.Exceptions.Traceback to
3708         System.Traceback_Entries (s-traent.ads and s-traent-vms.ads).  Add
3709         subtypes renaming Tracebacks_Array in Ada.Exceptions.Traceback.
3710         * g-debpoo.adb: Refer to Tracebacks_Array in its new home.
3712 2014-07-30  Arnaud Charlet  <charlet@adacore.com>
3714         * a-tasatt.adb: Remove old comments.
3716 2014-07-30  Yannick Moy  <moy@adacore.com>
3718         * einfo.ads (Is_Inlined): Document new use in GNATprove mode.
3719         * inline.adb (Can_Be_Inlined_In_GNATprove_Mode): Add comments
3720         to explain rationale for inlining or not in GNATprove mode.
3721         (Expand_Inlined_Call): In GNATprove mode, set Is_Inlined flag
3722         to False when inlining is not possible.
3723         * sem_ch6.adb (Analyze_Subprogram_Body_Helper): Set Is_Inlined
3724         flag to indicate that subprogram is fully inlined. To be reversed
3725         if inlining problem is found.
3726         * sem_res.adb (Resolve_Call): Set Is_Inlined flag to False when
3727         call in potentially unevaluated context.
3729 2014-07-30  Jose Ruiz  <ruiz@adacore.com>
3731         * s-tarest.adb, s-tarest.ads: Fix comments.
3733 2014-07-30  Robert Dewar  <dewar@adacore.com>
3735         * exp_attr.adb, checks.adb, sem_util.adb, sem_util.ads, sem_attr.adb:
3736         Change No_Scalar_Parts predicate to Scalar_Part_Present and
3737         invert sense of test. This avoids the "not No_xxx" situation
3738         which is always ugly.
3740 2014-07-30  Ed Schonberg  <schonberg@adacore.com>
3742         * inline.adb (Expand_Inlined_Call): When generating code for
3743         an internal subprogram the expansion uses the location of the
3744         call, so that gdb can skip over it. In GNATprove mode we want to
3745         preserve slocs of original subprogram when expanding an inlined
3746         call, to obtain better warnings, even though subprogram appears
3747         not to come from source if it is the inlining of a subprogram
3748         body without a previous spec.
3750 2014-07-30  Eric Botcazou  <ebotcazou@adacore.com>
3752         * exp_aggr.adb (Aggr_Assignment_OK_For_Backend): Reject array
3753         types with atomic components.
3755 2014-07-30  Thomas Quinot  <quinot@adacore.com>
3757         * Make-generated.in: Remove now unnecessary targets after s-oscons
3758         reorg.
3760 2014-07-30  Yannick Moy  <moy@adacore.com>
3762         * sem_res.adb (Resolve_Call): Use ultimate alias
3763         of callee when available.
3765 2014-07-30  Ed Schonberg  <schonberg@adacore.com>
3767         * sem_ch6.adb (Analyze_Expression_Function): To check whether
3768         an expression function is a completion, use the specification of
3769         the previous declaration, not its entity, which may be internally
3770         generated in an inlined context.
3772 2014-07-30  Doug Rupp  <rupp@adacore.com>
3774         * adaint.c (__gnat_tmp_name) [__ANDROID__]: Default to putting
3775         temp files in /cache directory unless overridden by TMPDIR.
3777 2014-07-30  Jose Ruiz  <ruiz@adacore.com>
3779         * s-tassta.adb, s-tarest.adb (Initialize, Create_Task,
3780         Create_Restricted_Task): Remove redundant check. Number_Of_CPUs returns
3781         type CPU, so it can never be greater than CPU_Range'Last.
3783 2014-07-30  Bob Duff  <duff@adacore.com>
3785         * s-taskin.ads: Minor comment fix.
3787 2014-07-30  Thomas Quinot  <quinot@adacore.com>
3789         * g-socket.adb: Remove now useless WITH, USE, and USE TYPE
3790         clauses.
3792 2014-07-30  Yannick Moy  <moy@adacore.com>
3794         * debug.adb: Free debug flag dQ used for frontend inlining in
3795         GNATprove mode..
3796         * sem_ch6.adb (Analyze_Subprogram_Body_Helper): Remove test of
3797         debug flag..
3799 2014-07-30  Thomas Quinot  <quinot@adacore.com>
3801         * Make-generated.in: Remove generation of s-oscons.ads, only
3802         generate the xoscons utility, in runtime-agnostic rules.
3803         * gcc-interface/Makefile.in: Clean up rules. Remove VMS parts,
3804         no longer supported.
3806 2014-07-30  Bob Duff  <duff@adacore.com>
3808         * exp_ch6.adb (Add_Task_Actuals_To_Build_In_Place_Call): New
3809         parameter Chain to be used in the allocator case.
3810         (Make_Build_In_Place_Call_In_Allocator): If the allocated object
3811         has tasks, wrap the code in a block that will activate them,
3812         including the usual finalization code to kill them off in case
3813         of exception or abort.
3815 2014-07-30  Robert Dewar  <dewar@adacore.com>
3817         * treepr.adb, treepr.ads; Reorganize documentation for new pp routines
3818         Remove renamings (don't work for gdb).
3819         (par): New synonym for p (avoid gdb ambiguities).
3820         * inline.adb, sem_ch6.adb, sem_ch13.adb: Minor reformatting.
3822 2014-07-30  Bob Duff  <duff@adacore.com>
3824         * exp_ch9.ads, sem_prag.adb, exp_ch4.adb, sem_ch13.adb: Minor comment
3825         fixes.
3826         * treepr.ads, treepr.adb (ppp): Make this debugging routine
3827         accept any type covered by Union_Id.
3829 2014-07-30  Robert Dewar  <dewar@adacore.com>
3831         * sem_ch4.adb (Analyze_If_Expression): Resolve condition before
3832         analyzing branches.
3833         * sem_eval.adb (Out_Of_Range): Check for statically unevaluated
3834         expression case.
3836 2014-07-30  Robert Dewar  <dewar@adacore.com>
3838         * sem_ch13.adb (Analyze_Aspect, predicate cases): Diagnose use
3839         of predicate aspect on entity other than a type.
3841 2014-07-30  Ed Schonberg  <schonberg@adacore.com>
3843         * sem_ch6.adb (Body_Has_Contract): New predicate to determine
3844         when a subprogram body without a previous spec cannot be inlined
3845         in GNATprove mode, because it includes aspects or pragmas that
3846         generate a SPARK contract clause.
3847         * inline.adb (Can_Be_Inlined_In_GNATprove_Mode): A subprogram
3848         instance cannot be inlined.
3850 2014-07-30  Robert Dewar  <dewar@adacore.com>
3852         * debug.adb: Document that d7 suppresses compilation time output.
3853         * errout.adb (Write_Header): Include compilation time in
3854         header output.
3855         * exp_intr.adb (Expand_Intrinsic_Call): Add
3856         Compilation_Date/Compilation_Time (Expand_Source_Info): Expand
3857         Compilation_Date/Compilation_Time.
3858         * g-souinf.ads (Compilation_Date): New function
3859         (Compilation_Time): New function.
3860         * gnat1drv.adb (Gnat1drv): Set Opt.Compilation_Time.
3861         * gnat_rm.texi (Compilation_Date): New function
3862         (Compilation_Time): New function.
3863         * opt.ads (Compilation_Time): New variable.
3864         * s-os_lib.ads, s-os_lib.adb (Current_Time_String): New function.
3865         * sem_intr.adb (Compilation_Date): New function.
3866         (Compilation_Time): New function.
3867         * snames.ads-tmpl (Name_Compilation_Date): New entry.
3868         (Name_Compilation_Time): New entry.
3870 2014-07-30  Yannick Moy  <moy@adacore.com>
3872         * inline.adb: Add comment.
3874 2014-07-30  Ed Schonberg  <schonberg@adacore.com>
3876         * par-ch4.adb (Is_Parameterless_Attribute): 'Result is a
3877         parameterless attribute, and a postondition can mention an
3878         indexed component or a slice whose prefix is an attribute
3879         reference F'Result.
3881 2014-07-30  Robert Dewar  <dewar@adacore.com>
3883         * sprint.adb (Sprint_Node_Actual, case Object_Declaration):
3884         Avoid bomb when printing package Standard.
3886 2014-07-30  Ed Schonberg  <schonberg@adacore.com>
3888         * sem_elab.adb (Check_Internal_Call_Continue): If an elaboration
3889         entity is created at this point, ensure that the name of the
3890         flag is unique, because the subprogram may be overloaded and
3891         other homonyms may also have elaboration flags created on the fly.
3893 2014-07-30  Hristian Kirtchev  <kirtchev@adacore.com>
3895         * sem_attr.adb (Analyze_Array_Component_Update): New routine.
3896         (Analyze_Attribute): Major cleanup of attribute
3897         'Update. The logic is now split into two distinct routines
3898         depending on the type of the prefix. The use of <> is now illegal
3899         in attribute 'Update.
3900         (Analyze_Record_Component_Update): New routine.
3901         (Check_Component_Reference): Removed.
3902         (Resolve_Attribute): Remove the return statement and ??? comment
3903         following the processing for attribute 'Update. As a result,
3904         the attribute now freezes its prefix.
3906 2014-07-30  Javier Miranda  <miranda@adacore.com>
3908         * exp_ch4.adb (Apply_Accessibility_Check): Do
3909         not call Base_Address() in VM targets.
3911 2014-07-30  Yannick Moy  <moy@adacore.com>
3913         * gnat1drv.adb (Adjust_Global_Switches): Set
3914         Ineffective_Inline_Warnings to True in GNATprove mode.
3915         * inline.adb (Cannot_Inline): Prepare new semantics for GNATprove
3916         mode of inlining.
3917         * opt.ads (Ineffective_Inline_Warnings): Add comment that
3918         describes use in GNATprove mode.
3919         * sem_prag.adb (Analyze_Pragma|SPARK_Mode): Ignore
3920         pragma when applied to the special body created for inlining.
3922 2014-07-30  Robert Dewar  <dewar@adacore.com>
3924         * inline.adb, exp_ch4.adb, sinput.adb, sem_ch6.adb, sem_ch13.adb:
3925         Minor reformatting.
3927 2014-07-30  Hristian Kirtchev  <kirtchev@adacore.com>
3929         * aspects.ads Add a comment explaining why SPARK 2014 aspects are
3930         not delayed. Update the delay status of most SPARK 2014 aspects.
3931         * sem_ch13.adb (Analyze_Aspect_Specifications): Update all calls
3932         to Decorate_Aspect_And_Pragma and Insert_Delayed_Pragma to refert
3933         to Decorate and Insert_Pragma. Add various comments concerning
3934         the delay status of several SPARK 2014 aspects. The insertion
3935         of Refined_State now uses routine Insert_After_SPARK_Mode.
3936         (Decorate): New routine.
3937         (Decorate_Aspect_And_Pragma): Removed.
3938         (Insert_Delayed_Pragma): Removed.
3939         (Insert_Pragma): New routine.
3941 2014-07-30  Ed Schonberg  <schonberg@adacore.com>
3943         * inline.adb (Expand_Inlined_Call): In GNATprove mode, emit
3944         only a warning, not an error on an attempt to inline a recursive
3945         subprogram.
3947 2014-07-30  Robert Dewar  <dewar@adacore.com>
3949         * g-forstr.adb: Minor code reorganization (use J rather than I
3950         as a variable name).
3951         * gnat_rm.texi, sem_prag.adb, sem_util.adb, sem_ch13.adb,
3952         g-forstr.ads: Minor reformatting.
3954 2014-07-30  Eric Botcazou  <ebotcazou@adacore.com>
3956         * sprint.adb (Set_Debug_Sloc): Also reset the end location if
3957         we are debugging the generated code.
3959 2014-07-30  Yannick Moy  <moy@adacore.com>
3961         * sinput.ads, sinput.adb (Comes_From_Inlined_Body): New function that
3962         returns True for source pointer for an inlined body.
3964 2014-07-30  Javier Miranda  <miranda@adacore.com>
3966         * exp_ch4.adb (Apply_Accessibility_Check): Add
3967         missing calls to Base_Address().
3969 2014-07-30  Ed Schonberg  <schonberg@adacore.com>
3971         * sem_ch6.adb (Hanalyze_Subprogram_Body_Helper): In GNATprove
3972         mode, subprogram bodies without a previous declaration are also
3973         candidates for front-end inlining.
3975 2014-07-30  Hristian Kirtchev  <kirtchev@adacore.com>
3977         * aspects.ads Aspects Async_Readers, Async_Writers,
3978         Effective_Reads and Effective_Writes do not need to be delayed.
3979         * sem_ch13.adb (Analyze_Aspect_Specifications): Propagate the
3980         optional Boolean expression when generating the corresponding
3981         pragma for an external property aspect.
3982         * sem_prag.adb (Analyze_External_Property_In_Decl_Part): Remove
3983         local constant Obj. Add local constant Obj_Id. Reimplement the
3984         check which ensures that the related variable is in fact volatile.
3985         (Analyze_Pragma): Reimplement the analysis of external property pragmas.
3986         * sem_util.adb (Is_Enabled): New routine.
3987         (Variable_Has_Enabled_Property): Reimplement the detection of
3988         an enabled external property.
3990 2014-07-30  Sergey Rybin  <rybin@adacore.com frybin>
3992         * gnat_ugn.texi, vms_data.ads: gnatstub: describe generating subunits
3993         for body stubs.
3995 2014-07-30  Pascal Obry  <obry@adacore.com>
3997         * g-forstr.adb, g-forstr.ads: New.
3998         * gnat_rm.texi, impunit.adb Makefile.rtl: Add new unit
3999         GNAT.Formatted_String.
4001 2014-07-30  Eric Botcazou  <ebotcazou@adacore.com>
4003         * exp_aggr.adb (Aggr_Assignment_OK_For_Backend): New predicate.
4004         (Expand_Array_Aggregate): Also enable in-place expansion for
4005         code generated by the compiler.  For an object declaration,
4006         set the kind of the object in addition to its type.  If an
4007         in-place assignment is to be generated and it can be directly
4008         done by the back-end, do not expand the aggregate.
4009         * fe.h (Is_Others_Aggregate): Declare.
4010         * gcc-interface/trans.c
4011         (gnat_to_gnu) <N_Assignment_Statement>: Add support for an
4012         aggregate with a single Others choice on the RHS by means of
4013         __builtin_memset.  Tidy up.
4015 2014-07-30  Ed Schonberg  <schonberg@adacore.com>
4017         * gnat_rm.texi: minor reformatting.
4019 2014-07-30  Yannick Moy  <moy@adacore.com>
4021         * sem_ch6.adb (Analyze_Subprogram_Helper_Body): Remove body to inline
4022         in SPARK_Mode Off.
4024 2014-07-30  Robert Dewar  <dewar@adacore.com>
4026         * gnat_rm.texi: Document additional implementation-defined use
4027         of Constrained.
4029 2014-07-30  Robert Dewar  <dewar@adacore.com>
4031         * prj-proc.adb, prj-strt.adb: Update comments.
4033 2014-07-30  Gary Dismukes  <dismukes@adacore.com>
4035         * sinfo.ads, einfo.ads, checks.ads: Minor typo fix and reformatting.
4037 2014-07-30  Vincent Celier  <celier@adacore.com>
4039         * prj-proc.adb (Imported_Or_Extended_Project_From): New Boolean
4040         parameter No_Extending, defaulted to False. When No_Extending
4041         is True, do not look for an extending project.
4042         (Expression): For a variable reference that is not for the current
4043         project, get its Id calling Imported_Or_Extended_Project_From
4044         with No_Extending set to True.
4045         * prj-strt.adb (Parse_Variable_Reference): If a referenced
4046         variable is not found in the current project, check if it is
4047         defined in one of the projects it extends.
4049 2014-07-30  Robert Dewar  <dewar@adacore.com>
4051         * sem_util.adb (Predicate_Tests_On_Arguments): Omit tests for
4052         some additional cases of internally generated routines.
4054 2014-07-30  Ed Schonberg  <schonberg@adacore.com>
4056         * sem_ch10.adb (Analyze_Proper_Body): When compiling for ASIS,
4057         if the compilation unit is a subunit, extend optional processing
4058         to all subunits of the current one. This allows gnatstub to
4059         supress generation of spurious bodies.
4061 2014-07-30  Hristian Kirtchev  <kirtchev@adacore.com>
4063         * a-cbmutr.adb (Insert_Child): Use local variable First to keep
4064         track of the initial element's index within the tree.
4066 2014-07-29  Hristian Kirtchev  <kirtchev@adacore.com>
4068         * a-cbmutr.adb (Allocate_Node): Remove the two parameter version.
4069         (Insert_Child): Add local variable First. Capture the index of the
4070         first node being created to ensure correct cursor construction
4071         later on. Use the three parameter version of Allocate_Node
4072         when creating multiple children as this method allows aspect
4073         Default_Value to take effect (if applicable).
4075 2014-07-29  Eric Botcazou  <ebotcazou@adacore.com>
4077         * exp_aggr.adb (Safe_Slice_Assignment): Remove.
4078         (Expand_Array_Aggregate): For a safe slice assignment, just set
4079         the target and use the common code path.
4081 2014-07-29  Robert Dewar  <dewar@adacore.com>
4083         * sem_util.adb, sem_util.ads, sem_res.adb, exp_ch6.adb: Invert
4084         predicate No_Predicate_Test_On_Arguments, new name is
4085         Predicate_Tests_On_Arguments (with the opposite sense).
4087 2014-07-29  Hristian Kirtchev  <kirtchev@adacore.com>
4089         * sem_attr.adb (Resolve_Attribute): Clean up the code for
4090         attribute 'Access. Do not generate an elaboration flag for a
4091         stand alone expression function. The expression of an expression
4092         function is now frozen when the expression function appears as
4093         the prefix of attribute 'Access.
4094         * sem_ch6.adb (Analyze_Expression_Function): Remove local
4095         variable New_Decl and update all references to it after the
4096         rewriting has taken place. Establish the linkages between the
4097         generated spec and body.
4099 2014-07-29  Robert Dewar  <dewar@adacore.com>
4101         * sem_prag.adb (ip, rv): Prevent from being optimized away.
4102         * gnatls.adb (gnatls): Set E_Fatal exit status if ali file not found.
4103         * s-imgllb.adb, s-imgllw.adb, s-imgwiu.adb, s-imgbiu.adb: Minor
4104         reformatting.
4106 2014-07-29  Vincent Celier  <celier@adacore.com>
4108         * prj-pp.adb: Minor comment update.
4109         * frontend.adb: If a target dependency info file has been read
4110         through switch -gnateT= add it to the dependencies of the source
4111         being compiled.
4113 2014-07-29  Robert Dewar  <dewar@adacore.com>
4115         * sem_ch3.adb, prj.adb: Minor reformatting.
4117 2014-07-29  Vincent Celier  <celier@adacore.com>
4119         * prj-pp.adb (Pretty_Print.Output_Project_File): New
4120         procedure to output project file names between quotes without
4121         concatenation, even if the line is too long.
4122         (Pretty_Print): Use Output_Project_File for project being extended and
4123         project imported.
4125 2014-07-29  Vincent Celier  <celier@adacore.com>
4127         * gnat_ugn.texi: Document that configuration pragmas files are
4128         added to the dependencies, unless they contain only pragmas
4129         Source_File_Name_Project.
4131 2014-07-29  Robert Dewar  <dewar@adacore.com>
4133         * frontend.adb: Minor reformatting.
4135 2014-07-29  Robert Dewar  <dewar@adacore.com>
4137         * exp_ch6.adb (Add_Call_By_Copy_Code): Minor reformatting
4138         (Expand_Actuals): Make sure predicate checks are properly applied
4139         for the case of OUT or IN OUT parameters.
4140         * sem_res.adb: Minor reformatting (Resolve_Actuals): Skip
4141         predicate tests on arguments for Finalize
4142         * sem_util.adb (No_Predicate_Test_On_Arguments): Returns True
4143         if predicate tests on subprogram arguments should be skipped.
4144         * sem_util.ads (No_Predicate_Test_On_Arguments): New function
4146 2014-07-29  Ed Schonberg  <schonberg@adacore.com>
4148         * sem_ch3.adb (Analyze_Object_Declaration): If there is an address
4149         clause for the object and the expression is an aggregate, defer
4150         resolution and expansion of the aggregate until the freeze point
4151         of the entity.
4152         * sem_aggr.adb (Resolve_Aggregate): An others_clause is legal if
4153         the parent node is an N_Reference generated during expansion.
4155 2014-07-29  Vincent Celier  <celier@adacore.com>
4157         * prj.adb (Add_To_Buffer): Effectively double the size of the buffer.
4159 2014-07-29  Robert Dewar  <dewar@adacore.com>
4161         * frontend.adb, inline.adb, sem_util.adb, sem_res.adb,
4162         prepcomp.ads: Minor reformatting and code clean up.
4163         * exp_ch6.adb (Expand_Actuals): Generate predicate test
4164         unconditionally for case of OUT or IN OUT actual (before this
4165         was generated only for certain subcases, which is wrong, the
4166         test is always needed).
4168 2014-07-29  Ed Schonberg  <schonberg@adacore.com>
4170         * sem_ch3.adb: Move Has_Defaulted_Discriminants to sem_util.
4171         * sem_ch4.adb (Analyze_Allocator): Defer resolution of expression
4172         until context type is available.
4173         * sem_res.adb (Resolve_Allocator): In the case of a qualified
4174         expression, complete resolution of expression.
4175         (Check_Aliased_Parameter): New procedure within Resolve_Actuals,
4176         to apply Ada2012 checks on aliased formals, as well as
4177         accesibility checks when the context of the call is an allocator
4178         or a qualified expression.
4179         * sem_util.ads, sem_util.adb (Has_Defaulted_Discriminants):
4180         Moved here from sem_ch3.
4181         (Object_Access_Level): Handle properly aliased formals and
4182         aggregates.
4183         * exp_ch6.adb (Expand_Call): Remove check on aliased parameters,
4184         now properly performed in sem_res (Resolve_Actuals,
4185         Check_Aliased_Parameter).
4187 2014-07-29  Yannick Moy  <moy@adacore.com>
4189         * debug.adb Enable GNATprove inlining under debug flag -gnatdQ for now.
4190         * inline.ads, inline.adb (Can_Be_Inlined_In_GNATprove_Mode): New
4191         function to decide when a subprogram can be inlined in GNATprove mode.
4192         (Check_And_Build_Body_To_Inline): Include GNATprove_Mode as a
4193         condition for possible inlining.
4194         * sem_ch10.adb (Analyze_Compilation_Unit): Remove special case
4195         for Inline_Always in GNATprove mode.
4196         * sem_ch6.adb (Analyze_Subprogram_Body_Helper): Build inlined
4197         body for subprograms in GNATprove mode, under debug flag -gnatdQ.
4198         * sem_prag.adb Minor change in comments.
4199         * sem_res.adb (Resolve_Call): Only perform GNATprove inlining
4200         inside subprograms marked as SPARK_Mode On.
4201         * sinfo.ads: Minor typo fix.
4203 2014-07-29  Vincent Celier  <celier@adacore.com>
4205         * frontend.adb: Add dependency on gnat.adc when taken into account
4206         and on non-temporary configuration pragmas files specified in
4207         switches -gnatec.
4208         * prepcomp.ads, prepcomp.adb (Add_Dependency): New procedure to add
4209         dependencies on configuration pragmas files.
4211 2014-07-29  Pat Rogers  <rogers@adacore.com>
4213         * gnat_ugn.texi: Minor clarification to the explanation for the
4214         GNATtest -v switch.
4216 2014-07-29  Robert Dewar  <dewar@adacore.com>
4218         * types.ads (Mechanism_Type): Change range back to -18 .. Int'Last with
4219         documentation that explains the need for this extended range
4220         (use by C_Pass_By_Copy).
4222 2014-07-29  Robert Dewar  <dewar@adacore.com>
4224         * gnat_rm.texi, sem_prag.adb: Minor reformatting.
4226 2014-07-29  Sergey Rybin  <rybin@adacore.com frybin>
4228         * gnat_ugn.texi: gnatmetric: clarify documentation for cyclomatic
4229         complexity metrics.
4231 2014-07-29  Thomas Quinot  <quinot@adacore.com>
4233         PR ada/60652
4234         * s-oscons-tmplt.c: For Linux, define _BSD_SOURCE in order for
4235         CRTSCTS to be visible.
4237 2014-07-29  Bob Duff  <duff@adacore.com>
4239         * g-trasym.adb, g-trasym.ads: Code cleanup.
4241 2014-07-29  Doug Rupp  <rupp@adacore.com>
4243         * sigtramp-vxworks.c: Minor reformatting.
4245 2014-07-29  Ed Schonberg  <schonberg@adacore.com>
4247         * gnat_rm.texi: No doc needed for Ada2012 aspect
4248         Implicit_dereference.
4250 2014-07-29  Robert Dewar  <dewar@adacore.com>
4252         * sem_attr.adb (Attribute_12): New array
4253         (Analyze_Attribute): Check impl-defined Ada 2012 attributes.
4254         (Check_Ada_2012_Attribute): Removed.
4256 2014-07-29  Doug Rupp  <rupp@adacore.com>
4258         * init.c (vxworks6): Call sigtramp for RTP (as well as DKM) for ARM,
4259         PPC, and e500.
4260         * sigtramp-vxworks.c: New file.
4261         * sigtramp-armvxw.c, sigtramp-ppcvxw.c: removed files.
4263 2014-07-29  Ed Schonberg  <schonberg@adacore.com>
4265         * lib-xref.adb (Output_Refs, Check_Type_Reference): For a
4266         derived array type, add information about component type, which
4267         was previously missing in ali file.
4268         * gnat_rm.texi: Add documentation for Atomic_Always_Lock_Free.
4270 2014-07-29  Thomas Quinot  <quinot@adacore.com>
4272         * sem_ch3.adb (Constrain_Corresponding_Record): For the case
4273         of the subtype created for a record component, do not mark
4274         the subtype as frozen. For one thing, this is anomalous (in
4275         particular, the base type might not itself be frozen yet);
4276         furthermore, proper freezing of the subtype must happen in any
4277         case. So, we just mark the subtype as requiring delayed freezing
4278         (and we'll actually freeze it when generating the init_proc of
4279         the enclosing record).
4280         Also change the name of the constrained record subtype (append a
4281         'C' so that it is clearly different from the unconstrained record
4282         type, "related_idV") to make debugging easier.
4283         (Process_Full_View): When creating a full subtype for a pending
4284         private subtype, re-establish the scope of the private subtype
4285         so that we get proper visibility on outer discriminants.
4286         * exp_ch3.adb (Build_Init_Statements): Freeze any component
4287         subtype that is not frozen yet.
4289 2014-07-29  Vincent Celier  <celier@adacore.com>
4291         * prj-proc.adb (Recursive_Process): Always initialize the
4292         environment when the project is an aggregate project, even when
4293         it is not the root tree.
4294 2014-07-29  Robert Dewar  <dewar@adacore.com>
4296         * exp_ch5.adb, exp_ch9.adb: Minor comment additions.
4297         * gnat_rm.texi: Complete list of implementation aspects.
4298         * aspects.ads: Minor comment clarification.
4300 2014-07-29  Ed Schonberg  <schonberg@adacore.com>
4302         * exp_ch5.adb (Expand_N_Assignment_Statement): If the target type
4303         is a null-excluding access type, do not generate a constraint
4304         check if Suppress_Assignment_Checks is set on assignment node.
4305         * exp_ch9.adb (Build_Simple_Entry_Call): If actual is an out
4306         parameter of a null-excluding access type, there is access check
4307         on entry, so set Suppress_Assignment_Checks on generated statement
4308         that assigns actual to parameter block.
4309         * sinfo.ads: Document additional use of Suppress_Assignment_Checks.
4311 2014-07-29  Robert Dewar  <dewar@adacore.com>
4313         * gnat_rm.texi: Change theta to @ in documentation of aspect
4314         Dimension_System.
4316 2014-07-29  Robert Dewar  <dewar@adacore.com>
4318         * sem_attr.adb (Uneval_Old_Msg): Flags Uneval_Old_Accept/Warn
4319         are now on pragma.
4320         * sem_ch13.adb (Analyze_Aspect_Specifications): Remove setting
4321         of Uneval_Old_*
4322         * sem_prag.adb (Analyze_Pragma): Set Uneval_Old_* flags
4323         * sinfo.ads, sinfo.adb: Move Uneval_Old_Accept/Warn to N_Pragma node.
4325 2014-07-29  Javier Miranda  <miranda@adacore.com>
4327         * types.ads Update documentation on how to add new reason codes
4328         for exceptions.
4329         (RT_Exception_Code): Keep values ordered by their
4330         reason code.  Required by the .NET backend.
4331         (RT_CE_Exceptions): Subtype declaration removed.
4332         (RT_PE_Exceptions): Subtype declaration removed.
4333         (RT_SE_Exceptions): Subtype declaration removed.
4334         (Kind): New mapping table of RT_Exception_Codes.
4335         * exp_ch11.adb (Get_RT_Exception_Entity): Updated to use the
4336         new mapping table.
4337         * tbuild.adb (Make_Raise_Storage_Error): Updated to use the new
4338         mapping table.  (Make_Raise_Program_Error): Updated to use the
4339         new mapping table.
4340         (Make_Raise_Storage_Error): Updated to use the new mapping table.
4341         * a-except.adb Keep Rcheck_CE_xxx entities ordered according to
4342         their reason code.
4344 2014-07-29  Thomas Quinot  <quinot@adacore.com>
4346         * gnat_rm.texi: Document internal attributes used for PolyORB/DSA
4347         distributed stubs generation.
4348         * exp_ch3.adb: Minor reformatting.
4350 2014-07-29  Yannick Moy  <moy@adacore.com>
4352         * sinfo.ads: Document constraint between frontend and GNATprove.
4354 2014-07-29  Robert Dewar  <dewar@adacore.com>
4356         * a-except.adb: Minor comment clarification.
4358 2014-07-29  Robert Dewar  <dewar@adacore.com>
4360         * gnat_rm.texi: Complete list of implementation attributes.
4361         * snames.ads-tmpl: Clean up list of impl-defined attributes.
4363 2014-07-29  Hristian Kirtchev  <kirtchev@adacore.com>
4365         * freeze.adb (Freeze_Record_Type): Perform various
4366         volatility-related checks.
4368 2014-07-29  Robert Dewar  <dewar@adacore.com>
4370         * sem_ch3.adb, sem_eval.adb: Minor reformatting.
4372 2014-07-29  Ed Schonberg  <schonberg@adacore.com>
4374         * sem_attr.adb: sem_attr.adb (Access_Attribute): Handle properly
4375         the case where the attribute reference appears in a nested scope
4376         from that of the subprogram prefix.
4377         * sem_attr.adb: Minor reformatting.
4379 2014-07-29  Robert Dewar  <dewar@adacore.com>
4381         * gnat_ugn.texi: Clarify documentation of Initialize_Scalar
4382         initialization options.
4384 2014-07-29  Robert Dewar  <dewar@adacore.com>
4386         * sinfo.ads: Minor comment addition.
4388 2014-07-29  Bob Duff  <duff@adacore.com>
4390         * sem_eval.adb, sem_ch13.adb: Minor reformatting.
4392 2014-07-29  Doug Rupp  <rupp@adacore.com>
4394         * init.c: Complete previous change.
4396 2014-07-29  Robert Dewar  <dewar@adacore.com>
4398         * exp_ch4.adb (Expand_N_If_Expression): Deal with unconstrained
4399         array case.
4401 2014-07-29  Ed Schonberg  <schonberg@adacore.com>
4403         * sem_attr.adb (Access_Attribute): If the prefix is a subprogram
4404         and the completion will appear in the same declarative part,
4405         create elaboration flag.
4406         * exp_util.adb (Set_Elaboration_Flag): If the subprogram body
4407         is a completion of a declaration in the same declarative part,
4408         and the subprogram has had its address taken, add elaboration
4409         check inside the subprogram body, to detect elaboration errors
4410         that may occur through indirect calls.
4412 2014-07-29  Doug Rupp  <rupp@adacore.com>
4414         * sigtramp-armvxw.c: Enhance to handle RTP trampolining.
4415         * init.c: Remove guard on sigtramp for ARM VxWorks RTP.
4417 2014-07-29  Vincent Celier  <celier@adacore.com>
4419         * switch-c.adb (Scan_Front_End_Switches): Do not fail when two
4420         runtime directorie specified with two switches --RTS= designate
4421         the same directory, even when there are no literarily the same.
4423 2014-07-29  Robert Dewar  <dewar@adacore.com>
4425         * gnat_ugn.texi: Minor documentation clarification.
4426         * switch-c.adb: Minor reformatting.
4428 2014-07-29  Robert Dewar  <dewar@adacore.com>
4430         * sem_prag.adb (Analyze_Pragma, case Allow_Integer_Address):
4431         Fix incorrect RTE call which caused bomb if pragma was in
4432         configuration pragma file.
4434 2014-07-29  Jerome Lambourg  <lambourg@adacore.com>
4436         * expect.c (__gnat_expect_poll): Fix typo in previous change.
4437         * g-expect.adb: Update comments.
4439 2014-07-29  Arnaud Charlet  <charlet@adacore.com>
4441         * s-parame-hpux.ads, s-parame-vms-ia64.ads, s-parame.ads
4442         (Default_Attribute_Count): Bump to 16 on native platforms.
4444 2014-07-29  Ed Schonberg  <schonberg@adacore.com>
4446         * sem_res.adb: Add guard to front-end inlining for SPARK.
4448 2014-07-29  Robert Dewar  <dewar@adacore.com>
4450         * sem_ch10.adb, debug.adb, sem_prag.adb, sem_res.adb, sem_ch6.adb:
4451         Minor reformatting.
4453 2014-07-29  Ed Schonberg  <schonberg@adacore.com>
4455         * sem_ch6.adb (Analyze_Subprogram_Body_Helper): Build body to
4456         inline in GNATprove mode when subprogran is marked Inline_Always.
4457         * sem_res.adb (Resolve_Call): Expand call in place in GNATProve
4458         mode if body to inline is available.
4459         * sem_prag.adb (Analyze_Pragma, case Inline_Always): Make pragma
4460         effective in GNATprove mode.
4461         * sem_ch10.adb (Analyze_Compilation_Unit): Call
4462         Check_Package_Body_For_Inlining in GNATprove mode, so that body
4463         containing subprograms with Inline_Always can be available before
4464         calls to them.
4466 2014-07-29  Ed Schonberg  <schonberg@adacore.com>
4468         * inline.ads, inline.adb, sem_ch10.adb: Rename Check_Body_For_Inlining
4469         to Check_Package_Body_For_Inlining, to prevent confusion with other
4470         inlining subprograms.
4472 2014-07-29  Robert Dewar  <dewar@adacore.com>
4474         * opt.ads: Minor comment update.
4475         * sem_attr.adb (Uneval_Old_Msg): Deal with case of aspect, where
4476         we want setting of Uneval_Old at time of encountering the aspect.
4477         * sem_ch13.adb (Analyze_Aspect_Specifications): Capture setting
4478         of Opt.Uneval_Old.
4479         * sinfo.adb (Uneval_Old_Accept): New function (Uneval_Old_Warn):
4480         New function (Set_Uneval_Old_Accept): New procedure.
4481         (Set_Uneval_Old_Warn): New procedure.
4482         * sinfo.ads: Uneval_Old_Accept: New flag Uneval_Old_Warn: New flag.
4484 2014-07-29  Robert Dewar  <dewar@adacore.com>
4486         * sinfo.ads, inline.adb, inline.ads, sem_ch6.adb: Minor reformatting.
4487         * snames.ads-tmpl: Minor reformatting.
4488         * xsnamest.adb (XSnamesT): Remove special casing of Name_Error
4489         to give <Error>.  Not clear why this was there, but the compiler
4490         sources do not reference Name_Error, and this interfered with
4491         the circuits for pragma Unevaluated_Use_Of_Old.
4493 2014-07-29  Hristian Kirtchev  <kirtchev@adacore.com>
4495         * sem_prag.adb (Process_Atomic_Shared_Volatile): Allow volatile
4496         types in SPARK 2014 (again).
4497         * sem_res.adb (Is_OK_Volatile_Context): New routine.
4498         (Resolve_Entity_Name): Ensure that a volatile object with
4499         enabled properties Async_Writers or Effectire_Reads appears in
4500         a non-interfering context.
4502 2014-07-29  Ed Schonberg  <schonberg@adacore.com>
4504         * sem_ch6.adb: Move Build_Body_To_Inline,
4505         Check_And_Buid_Body_To_Inline, and Cannot_Inline to package Inline.
4506         * exp_ch6.adb: Mode Expand_Inlined_Body to package Inline.
4507         * inline.ads, inline.adb: Package now contains subprograms that
4508         implement front-end inlining.  No functional changes, no test
4509         needed.
4511 2014-07-29  Robert Dewar  <dewar@adacore.com>
4513         * exp_dbug.adb, g-expect.adb, sem_elab.adb: Minor typo fix.
4515 2014-07-29  Ed Schonberg  <schonberg@adacore.com>
4517         * sem_ch6.adb (Analyze_Return_Type): Reject a return type that
4518         is a limited view when the context is a package body, because
4519         there is no subsequent place at which the non-limited view may
4520         become visible.
4521         (Process_Formals): Ditto.
4522         * sinfo.ads, par-ch3.adb: Minor reformatting.
4524 2014-07-29  Jerome Lambourg  <lambourg@adacore.com>
4526         * expect.c (__gnat_expect_poll): New parameter dead_process
4527         used to return the dead process among the array of file
4528         descriptors. The Windows, VMS and HPUX implementations now
4529         properly report the dead process via this parameter. Other unixes
4530         don't need it.
4531         * g-expect.adb (Poll): Adapt to the C profile.
4532         (Expect_Internal): Use the new parameter to properly close the
4533         File Descriptor.  This then can be properly reported by the
4534         function First_Dead_Process as is expected.
4536 2014-07-29  Robert Dewar  <dewar@adacore.com>
4538         * gnat_ugn.texi: Minor clarification of -gnatQ switch.
4540 2014-07-29  Robert Dewar  <dewar@adacore.com>
4542         * einfo.adb (Derived_Type_Link): New function
4543         (Set_Derived_Type_Link): New procedure.
4544         (Write_Field31_Name): Output Derived_Type_Link.
4545         * einfo.ads: New field Derived_Type_Link.
4546         * exp_ch6.adb (Expand_Call): Warn if change of representation
4547         needed on call.
4548         * sem_ch13.adb: Minor addition of ??? comment.
4549         (Rep_Item_Too_Late): Warn on case that is legal but could cause an
4550         expensive implicit conversion.
4551         * sem_ch3.adb (Build_Derived_Type): Set Derived_Type_Link if needed.
4553 2014-07-29  Hristian Kirtchev  <kirtchev@adacore.com>
4555         * exp_ch3.adb (Build_Init_Procedure): Renamed Local_DF_Id
4556         to DF_Id. Add new local variable DF_Call. Do not perform any
4557         elaboration-related checks on the call to the partial finalization
4558         routine within an init proc to avoid generating bogus elaboration
4559         warnings on expansion-related code.
4560         * sem_elab.adb (Check_A_Call): Move constant Access_Case to
4561         the top level of the routine.  Ensure that Output_Calls takes
4562         into account flags -gnatel and -gnatwl when emitting warnings
4563         or info messages.
4564         (Check_Internal_Call_Continue): Update the call to Output_Calls.
4565         (Elab_Warning): Moved to the top level of routine Check_A_Call.
4566         (Emit): New routines.
4567         (Output_Calls): Add new formal parameter Check_Elab_Flag along with a
4568         comment on usage. Output all warnings or info messages only when the
4569         caller context demands it and the proper elaboration flag is set.
4571 2014-07-29  Yannick Moy  <moy@adacore.com>
4573         * sem_attr.adb (Analyze_Attribute/Attribute_Old):
4574         Check rule about Old appearing in potentially unevaluated
4575         expression everywhere, not only in Post.
4577 2014-07-29  Arnaud Charlet  <charlet@adacore.com>
4579         * sem_prag.adb: Update comment.
4580         * a-except.adb, a-except-2005.adb: Minor editing.
4582 2014-07-29  Pierre-Marie Derodat  <derodat@adacore.com>
4584         * exp_dbug.adb (Debug_Renaming_Declaration):
4585         Do not create renaming entities for renamings of non-packed
4586         objects and for exceptions.
4588 2014-07-29  Robert Dewar  <dewar@adacore.com>
4590         * sem_ch3.adb, sinfo.ads, types.ads, sem_prag.adb, a-except-2005.adb,
4591         sem_ch6.adb, par-ch3.adb: Minor reformatting.
4593 2014-07-29  Ed Schonberg  <schonberg@adacore.com>
4595         * sem_ch6.adb (Check_Return_Subtype_Indication): Reject a return
4596         subtype indication in an extended return statement when the
4597         return value is an ancestor of the return type of the function,
4598         and that return type is a null record extension.
4600 2014-07-29  Thomas Quinot  <quinot@adacore.com>
4602         * sem_ch13.adb (Rep_Item_Too_Late): Specialize/clarify error
4603         message produced for the case of a type-related representation
4604         item that is made illegal by 13.10(1).
4605         * gnat_rm.texi (Scalar_Storage_Order): Minor change in
4606         documentation.
4608 2014-07-29  Robert Dewar  <dewar@adacore.com>
4610         * gnat_ugn.texi: Add section on Wide_Wide_Character encodings.
4611         * erroutc.adb (Output_Error_Msgs): Take wide characters into
4612         account in computing position of error flags.
4613         * sinput.adb (Get_Column_Number): Take wide characters into
4614         account.
4616 2014-07-29  Ed Schonberg  <schonberg@adacore.com>
4618         * par-ch3.adb (P_Access_Type_Definition): The subtype indication
4619         in an access type definition can carry a null_exclusion indicator.
4620         * sem_ch3.adb (Access_Type_Declaration): If the subtype indication
4621         carries a null_exclusion indicator, verify that the subtype
4622         indication denotes an access type, and create a null-excluding
4623         subtype for it.
4624         * sinfo.ads, sinfo.adb: New attribute Null_Excluding_Subtype,
4625         defined on N_Access_To_Object_Definition to indicate that the
4626         subtype indication carries a null_exclusion indicator.
4628 2014-07-29  Hristian Kirtchev  <kirtchev@adacore.com>
4630         * exp_ch6.adb (Add_Extra_Actual): Do not construct
4631         the extra actual by name, generate a reference instead.
4633 2014-07-29  Arnaud Charlet  <charlet@adacore.com>
4635         * sem_prag.adb (Analyze_Pragma): Do not crash analyzing
4636         Allow_Integer_Address if already set.
4637         * a-except-2005.adb (Rcheck_PE_Stream_Operation_Not_Allowed):
4638         Fix order, for consistency with Rmsg_xx declarations.
4640 2014-07-29  Ed Schonberg  <schonberg@adacore.com>
4642         * sem_ch4.adb (Complete_Object_Operation): If the type of the
4643         candidate subprogram is a limited view, use non-limited view
4644         when available.
4646 2014-07-29  Robert Dewar  <dewar@adacore.com>
4648         * sem_ch13.adb: Minor change in RM reference.
4649         * sem_mech.ads: Minor reformatting.
4650         * einfo.ads: Minor comment fix.
4651         * types.ads: Minor correction to range given for Mechanism_Type.
4652         * exp_ch6.adb (Add_Invariant_And_Predicate_Checks): Do not
4653         check predicate on way out for OUT or IN OUT parameters.
4654         * par-ch3.adb (P_Constraint_Opt): Handle missing RANGE keyword
4655         better (P_Range_Constraint): Corresponding fix.
4656         * checks.ads: Minor comment clarification.
4658 2014-07-29  Gary Dismukes  <dismukes@adacore.com>
4660         * sem_ch8.adb (Analyze_Object_Renaming): Set the Is_Volatile
4661         and Treat_As_Volatile flags based on whether the renamed object
4662         is a volatile object.
4664 2014-07-29  Olivier Hainque  <hainque@adacore.com>
4666         * g-debpoo.adb
4667         (Default_Alignment): Rename as Storage_Alignment. This is not
4668         a "default" that can be overriden. Augment comment to clarify
4669         intent and document why we need to manage alignment padding.
4670         (Header_Offset): Set to Header'Object_Size instead of 'Size
4671         rounded up to Storage_Alignment. Storage_Alignment on the
4672         allocation header is not required by our internals so was
4673         overkill. 'Object_Size is enough to ensure proper alignment
4674         of the header address when substracted from a storage address
4675         aligned on Storage_Alignment.
4676         (Minimum_Allocation): Rename as Extra_Allocation, conveying that
4677         this is always added on top of the incoming allocation requests.
4678         (Align): New function, to perform alignment rounding operations.
4679         (Allocate): Add comments on the Storage_Address computation
4680         scheme and adjust so that the alignment padding applies to that
4681         (Storage_Address) only.
4683 2014-07-29  Robert Dewar  <dewar@adacore.com>
4685         * exp_ch3.adb (Default_Initialize_Object): Remove incorrect
4686         pragma Unreferenced.
4687         * cstand.adb (Create_Standard): Use E_Array_Type for standard
4688         string types. Make sure index of Any_String/Any_Array is in a list.
4689         * errout.adb: Minor reformatting.
4691 2014-07-29  Robert Dewar  <dewar@adacore.com>
4693         * gnat_ugn.texi: Clean up and correct documentation of warnings.
4694         * usage.adb: Minor corrections to make sure warnings are properly
4695         documented.
4696         * warnsw.adb (Set_Warning_Switch): Remove redundant return statement.
4697         (WA_Warnings): Add Warn_On_Suspicious_Modulus_Value.
4699 2014-07-29  Ed Schonberg  <schonberg@adacore.com>
4701         * exp_ch3.adb (Expand_N_Object_Declaration): The dummy block
4702         created to match internal sequence numbers between compilations
4703         with/without abort must have its type properly set.
4705 2014-07-29  Robert Dewar  <dewar@adacore.com>
4707         * ali.adb (Initialize_ALI): Initialize SSO_Default_Specified
4708         (Scan_ALI): Set SSO_Default in ALIs_Record (Scan_ALI): Set
4709         SSO_Default_Specified.
4710         * ali.ads (ALIs_Record): Add field SSO_Default
4711         (SSO_Default_Specified): New global switch.
4712         * bcheck.adb (Check_Consistent_SSO_Default): New procedure
4713         (Check_Configuration_Consistency): Call this procedure
4714         * einfo.adb (SSO_Set_High_By_Default): New
4715         function (SSO_Set_Low_By_Default): New function
4716         (Set_SSO_Set_High_By_Default): New procedure
4717         (Set_SSO_Set_Low_By_Default): New procedure (Write_Entity_Flags):
4718         List new flags
4719         * einfo.ads (SSO_Set_Low_By_Default): New flag
4720         (SSO_Set_High_By_Default): New flag
4721         * freeze.adb (Set_SSO_From_Default): New procedure
4722         (Freeze_Array_Type): Call Set_SSO_From_Default
4723         (Freeze_Record_Type): Call Set_SSO_From_Default
4724         * gnat_rm.texi: Document pragma Default_Scalar_Storage_Order
4725         * lib-writ.adb (Write_ALI): Set OL/OH in P line as needed
4726         * lib-writ.ads: Add OL/OH parameters to P line
4727         * opt.adb: Set Default_SSO, Default_SSO_Config as appropriate
4728         * opt.ads (Default_SSO): New global switch (Default_SSO_Config):
4729         New global switch
4730         * repinfo.adb (List_Scalar_Storage_Order): List SSO when it is
4731         set by default using pragma Default_Scalar_Storage_Order.
4732         * sem.ads (Scope_Stack_Entry): Add component Save_Default_SSO
4733         * sem_ch13.adb (Inherit_Delayed_Rep_Aspects):
4734         Clear SSO defaults when explicit SSO is inherited.
4735         (Analyze_Attribute_Definition_Clause): Clear SSO defaults when
4736         explicit SSO is specified.
4737         (Inherit_Aspects_At_Freeze_Point):
4738         Clear SSO default when inheriting SSO.
4739         * sem_ch3.adb (Set_Default_SSO): New procedure
4740         (Analyze_Private_Extension_Declaration): Set defualt SSO
4741         (Array_Type_Declaration): ditto (Build_Derived_Array_Type): ditto
4742         (Build_Derived_Private_Type): ditto (Build_Derived_Record_Type):
4743         ditto (Build_Derived_Type): ditto (Make_Class_Wide_Type): ditto
4744         (Record_Type_Declaration): ditto
4745         * sem_ch8.adb (Pop_Scope): Restore Default_SSO (Push_Scope):
4746         Save Default_SSO
4747         * sem_prag.adb (Analyze_Pragma, case
4748         Default_Scalar_Storage_Order): Set Default_SSO
4750 2014-07-29  Ed Schonberg  <schonberg@adacore.com>
4752         * sem_ch6.adb (Valid_Operator_Definition): Verify that
4753         all parameter have mode IN. This check must be done here for
4754         subprogram instantiations that have operator names, because their
4755         analysis does not follow the same path as that for subprogram
4756         declarations.
4758 2014-07-29  Robert Dewar  <dewar@adacore.com>
4760         * freeze.adb (Freeze_Entity, Concurrent_Type case): Add a guard
4761         to make sure that the Etype of a component of the corresponding
4762         record type is present before trying to freeze it.
4763         * sem_ch5.adb: Minor reformatting.
4765 2014-07-29  Robert Dewar  <dewar@adacore.com>
4767         * exp_attr.adb, types.ads, types.h, exp_ch11.adb, a-except.adb,
4768         a-except-2005.adb: Add new reason code PE_Stream_Operation_Not_Allowed,
4769         and then use it when a stream operation is used from a library generic
4770         when the restriction (No_Streams) is active.
4772 2014-07-29  Thomas Quinot  <quinot@adacore.com>
4774         * projects.texi: Fix minor typo.
4776 2014-07-29  Yannick Moy  <moy@adacore.com>
4778         * sem_attr.adb (Analyze_Attribute): Fix generation of warning.
4780 2014-07-29  Arnaud Charlet  <charlet@adacore.com>
4782         * sem_ch5.adb (Check_Unreachable_Code): Do not remove code in
4783         CodePeer mode.
4785 2014-07-29  Hristian Kirtchev  <kirtchev@adacore.com>
4787         * exp_ch7.adb (Find_Last_Init): Add local variable
4788         Deep_Init_Found. Check the statement immediately following the
4789         declaration if [Deep_]Initialization was not found.
4791 2014-07-29  Hristian Kirtchev  <kirtchev@adacore.com>
4793         * exp_util.adb (Is_Aliased): It appears that
4794         'reference-d and renamed objects still play some role in Boolean
4795         expression with actions and cannot be finalized immediately.
4797 2014-07-29  Ed Schonberg  <schonberg@adacore.com>
4799         * exp_dbug.adb (Qualify_Needed):  For debugging purposes,
4800         Loop names are not part of the full qualification of entity names.
4802 2014-07-29  Robert Dewar  <dewar@adacore.com>
4804         * einfo.adb (Has_Protected): Test base type.
4805         * sem_ch4.adb (Analyze_Allocator): Reorganize code to make sure
4806         that we always properly check No_Protected_Type_Allocators.
4808 2014-07-29  Ed Schonberg  <schonberg@adacore.com>
4810         * sem_util.ads, sem_util.adb (Defining_Entity): Now applies to
4811         loop declarations as well.
4812         * exp_ch5.adb (Expand_Loop_Statement): Apply Qualify_Entity_Names
4813         to an iterator loop, because it may contain local renaming
4814         declarations that require debugging information.
4816 2014-07-29  Robert Dewar  <dewar@adacore.com>
4818         * sem_util.ads, exp_util.adb, sem_attr.adb: Minor reformatting.
4820 2014-07-29  Robert Dewar  <dewar@adacore.com>
4822         * einfo.ads, einfo.adb (Static_Real_Or_String_Predicate): New function
4823         (Set_Static_Real_Or_String_Predicate): New procedure
4824         * sem_ch13.adb (Build_Predicate_Functions): Accomodate static
4825         string predicates (Is_Predicate_Static): Handle static string
4826         predicates.
4827         * sem_eval.adb (Real_Or_String_Static_Predicate_Matches):
4828         New procedure (Check_Expression_Against_Static_Predicate):
4829         Deal with static string predicates, now fully implemented
4830         (Eval_Relational_Op): Allow string equality/inequality as static
4831         if not comes from source.
4833 2014-07-29  Robert Dewar  <dewar@adacore.com>
4835         * sem_aggr.adb, exp_ch5.adb, sem_ch5.adb, exp_util.adb, einfo.adb,
4836         einfo.ads, sem_util.adb, sem_attr.adb, sem_case.adb, sem_eval.adb,
4837         sem_eval.ads, sem_ch13.adb: General cleanup of static predicate
4838         handling. Change name of Discrete_Predicate to
4839         Discrete_Static_Predicate, and replace testing of the presence of this
4840         field by testing the flag Has_Static_Expression.
4842 2014-07-29  Robert Dewar  <dewar@adacore.com>
4844         * gnat_rm.texi: Document pragma Unevaluated_Use_Of_Old.
4845         * opt.adb: Handle Uneval_Old.
4846         * opt.ads (Uneval_Old, Uneval_Old_Config): New variables.
4847         * par-prag.adb: Add dummy entry for pragma Unevaluated_Use_Of_Old.
4848         * sem.ads (Save_Uneval_Old): New field in Scope_Stack_Entry.
4849         * sem_attr.adb (Uneval_Old_Msg): New procedure.
4850         * sem_ch8.adb (Push_Scope): Save Uneval_Old.
4851         (Pop_Scope): Restore Uneval_Old.
4852         * sem_prag.adb (Analyze_Pragma, case Unevaluated_Use_Of_Old):
4853         Implemented.
4854         * snames.ads-tmpl: Add entries for pragma Unevaluated_Use_Of_Old
4855         Add entries for Name_Warn, Name_Allow.
4857 2014-07-29  Robert Dewar  <dewar@adacore.com>
4859         * sem_aggr.adb (Resolve_Array_Aggregate): Change Is_Static_Range
4860         to Is_OK_Static_Range.
4861         * sem_attr.adb (Eval_Attribute): Make sure we properly flag
4862         static attributes (Eval_Attribute, case Size): Handle size of
4863         zero properly (Eval_Attribute, case Value_Size): Handle size of
4864         zero properly.
4865         * sem_ch13.adb: Minor reformatting.
4866         * sem_ch3.adb (Process_Range_Expr_In_Decl): Change
4867         Is_Static_Range to Is_OK_Static_Range.
4868         * sem_eval.adb (Eval_Case_Expression): Total rewrite, was
4869         wrong in several ways (Is_Static_Range): Moved here from spec
4870         (Is_Static_Subtype): Moved here from spec Change some incorrect
4871         Is_Static_Subtype calls to Is_OK_Static_Subtype.
4872         * sem_eval.ads: Add comments to section on
4873         Is_Static_Expression/Raises_Constraint_Error (Is_OK_Static_Range):
4874         Add clarifying comments (Is_Static_Range): Moved to body
4875         (Is_Statically_Unevaluated): New function.
4876         * sem_util.ads, sem_util.adb (Is_Preelaborable_Expression): Change
4877         Is_Static_Range to Is_OK_Static_Range.
4878         * sinfo.ads: Additional commments for Is_Static_Expression noting
4879         that clients should almost always use Is_OK_Static_Expression
4880         instead. Many other changes throughout front end units to obey
4881         this rule.
4882         * tbuild.ads, tbuild.adb (New_Occurrence_Of): Set Is_Static_Expression
4883         for enumeration literal.
4884         * exp_ch5.adb, sem_intr.adb, sem_ch5.adb, exp_attr.adb, exp_ch9.adb,
4885         lib-writ.adb, sem_ch9.adb, einfo.ads, checks.adb, checks.ads,
4886         sem_prag.adb, sem_ch12.adb, freeze.adb, sem_res.adb, exp_ch4.adb,
4887         exp_ch6.adb, sem_ch4.adb, sem_ch6.adb, exp_aggr.adb, sem_cat.adb:
4888         Replace all occurrences of Is_Static_Expression by
4889         Is_OK_Static_Expression.
4891 2014-07-29  Hristian Kirtchev  <kirtchev@adacore.com>
4893         * exp_ch4.adb (Process_Transient_Object): Remove constant
4894         In_Cond_Expr, use its initialization expression in place.
4895         * exp_ch7.adb (Process_Declarations): There is no need to check
4896         that a transient object being hooked is controlled as it would
4897         not have been hooked in the first place.
4898         * exp_util.adb (Is_Aliased): 'Reference-d or renamed transient
4899         objects are not considered aliased when the related context is
4900         a Boolean expression_with_actions.
4901         (Requires_Cleanup_Actions): There is no need to check that a transient
4902         object being hooked is controlled as it would not have been hooked in
4903         the first place.
4905 2014-07-29  Robert Dewar  <dewar@adacore.com>
4907         * errout.adb: Minor reformatting.
4909 2014-07-29  Hristian Kirtchev  <kirtchev@adacore.com>
4911         * exp_ch3.adb (Default_Initialize_Object): Add new variables
4912         Abrt_Blk and Dummy. Generate a dummy temporary when aborts are
4913         not allowed to ensure the symmetrical generation of symbols.
4914         * exp_ch7.adb (Build_Object_Declarations): Remove variables A_Expr
4915         and E_Decl. Add new variables Decl and Dummy. Generate a dummy
4916         temporary when aborts are not allowed to ensure symmertrical
4917         generation of symbols.
4918         * exp_intr.adb (Expand_Unc_Deallocation): Add new variable
4919         Dummy. Generate a dummy temporary when aborts are not allowed
4920         to ensure symmertrical generation of symbols.
4922 2014-07-29  Ed Schonberg  <schonberg@adacore.com>
4924         * exp_dbug.adb (Debug_Renaming_Declaration): For an object
4925         renaming, indicate that the renamed entity itself needs debug
4926         information. This is necessary if that entity is a temporary,
4927         e.g. part of the expansion of an explicit dereference in an
4928         iterator.
4930 2014-07-29  Thomas Quinot  <quinot@adacore.com>
4932         * errout.adb (Set_Error_Posted): When propagating flag to
4933         an enclosing named association, also propagate to the parent
4934         of that node, so that named and positional associations are
4935         treated consistently.
4937 2014-07-29  Ed Schonberg  <schonberg@adacore.com>
4939         * sem_attr.adb (Resolve_Attribute, case 'Update):  Set
4940         Do_Range_Check properly on array component expressions that
4941         have a scalar type. In GNATprove mode, only checks on scalar
4942         components must be marked by the front-end.
4944 2014-07-29  Ed Schonberg  <schonberg@adacore.com>
4946         * sem_res.adb (Resolve_Type_Conversion): If the type of the
4947         expression is a limited view, use the non-limited view when
4948         available.
4950 2014-07-29  Hristian Kirtchev  <kirtchev@adacore.com>
4952         * exp_ch4.adb (Expand_N_Case_Expression): Mark the generated
4953         case statement as coming from a conditional expression.
4954         (Expand_N_If_Expression): Mark the generated if statement as
4955         coming from a conditional expression.
4956         * exp_ch5.adb (Expand_N_Case_Statement): Do not process controlled
4957         objects found in case statement alternatives when the case
4958         statement is actually a case expression.
4959         (Expand_N_If_Statement):
4960         Do not process controlled objects found in an if statement when
4961         the if statement is actually an if expression.
4962         * sinfo.adb (From_Conditional_Expression): New routine.
4963         (Set_From_Conditional_Expression): New routine.
4964         * sinfo.ads Add new semantic flag From_Conditional_Expression and
4965         update related nodes.
4966         (From_Conditional_Expression): New routine along with pragma Inline.
4967         (Set_From_Conditional_Expression): New routine along with pragma Inline.
4969 2014-07-29  Hristian Kirtchev  <kirtchev@adacore.com>
4971         * exp_ch7.adb (Build_BIP_Cleanup_Stmts): Remove
4972         formal parameter Obj_Id and update the comment on usage. Renamed
4973         Obj_Typ to Func_Typ and update all occurrences.
4974         (Find_Last_Init): Remove formal parameter Decl and update the comment
4975         on usage.
4976         Remove local constants Obj_Id and Obj_Typ. Remove local variables
4977         Init_Typ and Is_Conc. Remove the extraction of the initialization type.
4978         (Find_Last_Init_In_Block): Remove formal parameter
4979         Init_Typ and update the comment on usage.
4980         (Is_Init_Call): Remove formal parameter Init_Typ and update the comment
4981         on usage. Check whether the procedure call is an initialization
4982         procedure of either the object type or the initialization type.
4983         (Is_Init_Proc_Of): New routine.
4984         (Process_Object_Declaration): Obj_Id and Obj_Typ are now global to this
4985         routine. Add new variable Init_Typ. Add circuitry to extract the object
4986         type as well as the initialization type.
4988 2014-07-29  Robert Dewar  <dewar@adacore.com>
4990         * sem_case.adb: Minor reformatting.
4991         * sem_aux.ads: Minor reformatting.
4993 2014-07-29  Ed Schonberg  <schonberg@adacore.com>
4995         * sinfo.adb (Set_Else_Actions, Set_Then_Actions): Set parent
4996         pointer on these fields, even though they are semantic, because
4997         subsequent analysis and expansion of action nades may require
4998         exploring the tree, for example to locate a node to be wrapped
4999         when a function with controlled result is called.
5001 2014-07-29  Claire Dross  <dross@adacore.com>
5003         * sem_aux.adb (Get_Binary_Nkind): Use case on
5004         Name_Id instead of an intermediate string.
5005         (Get_Unary_Nkind): Use case on Name_Id instead of an intermediate
5006         string.
5008 2014-07-29  Sergey Rybin  <rybin@adacore.com frybin>
5010         * gnat_ugn.texi (gnatelim, gnatstub, gnatmetric): Add note
5011         about processing sources with preprocessor directives.
5013 2014-07-24  Martin Liska  <mliska@suse.cz>
5015         * gcc-interface/trans.c (finalize_nrv): Adjust function call.
5016         * gcc-interface/utils.c (rest_of_subprog_body_compilation): Likewise.
5017         (gnat_write_global_declarations): Likewise.
5019 2014-07-19  David Wohlferd  <dw@LimeGreenSocks.com>
5021         * gnat_rm.texi: Clean up for makeinfo 5.2.
5023 2014-07-19  David Wohlferd  <dw@LimeGreenSocks.com>
5025         * gnat_rm.texi (Machine Code Insertions): Clean up.
5027 2014-07-18  Robert Dewar  <dewar@adacore.com>
5029         * exp_ch7.adb: Minor reformatting.
5031 2014-07-18  Claire Dross  <dross@adacore.com>
5033         * sem_aux.ads (Get_Binary_Nkind): New function that returns
5034         the Node_Kind value of an entity defining a binary operator.
5035         (Get_Unary_Nkind): New function that returns the Node_Kind value
5036         of an entity defining a unary operator.
5038 2014-07-18  Pascal Obry  <obry@adacore.com>
5040         * sysdep.c: comment update.
5041         * adaint.c (__gnat_fputwc): Use wchar_t on a limited set of
5042         platforms where it is known to be supported.
5044 2014-07-18  Thomas Quinot  <quinot@adacore.com>
5046         * sem_dist.adb (Process_Remote_AST_Declaration): Need
5047         to set Fat_Type's Ekind in order to be able to use its
5048         Corresponding_Remote_Type attribute.
5050 2014-07-18  Hristian Kirtchev  <kirtchev@adacore.com>
5052         * einfo.adb Last_Aggregate_Assignment is now Node 30.
5053         (Last_Aggregate_Assignment): Include
5054         constants in the assertion. Update the underlying node.
5055         (Set_Last_Aggregate_Assignment): Include constants in the
5056         assertion. Update the underlying node.  (Write_Field11_Name):
5057         Remove the entry for Last_Aggregate_Assignment.
5058         (Write_Field30_Name): Add an entry for Last_Aggregate_Assignment.
5059         * einfo.ads Update the node designation and usage of attribute
5060         Last_Aggregate_Assignment.
5061         * exp_aggr.adb (Expand_Array_Aggregate): Store the last
5062         assignment statement used to initialize a controlled object.
5063         (Late_Expansion): Store the last assignment statement used to
5064         initialize a controlled record or an array of controlled objects.
5065         * exp_ch3.adb (Expand_N_Object_Declaration): Default
5066         initialization of objects is now performed in a separate routine.
5067         (Default_Initialize_Object): New routine.
5068         * exp_ch7.adb (Build_BIP_Cleanup_Stmts): Add formal parameter
5069         Obj_Id. Update the comment on usage.
5070         (Find_Last_Init): Remove formal parameter Typ. Update comment on usage.
5071         Reimplement the logic.  (Find_Last_Init_In_Block): New routine.
5072         (Is_Init_Call): Add formal parameter Init_Typ. Update the
5073         comment on usage.  Account for the type init proc when trying
5074         to determine whether a statement is an initialization call.
5075         (Make_Adjust_Call): Rename formal parameter For_Parent to
5076         Skip_Self. Update all occurrences of For_Parent. Account for
5077         non-tagged types. Update the call to Make_Call.
5078         (Make_Call): Rename formal parameter For_Parent to Skip_Self. Update
5079         comment on usage. Update all occurrences of For_Parent.
5080         (Make_Final_Call): Rename formal parameter For_Parent to
5081         Skip_Self. Update all occurrences of For_Parent. Account
5082         for non-tagged types. Update the call to Make_Call.
5083         (Process_Object_Declaration): Most variables and constants are
5084         now local to the routine.
5085         * exp_ch7.ads (Make_Adjust_Call): Rename formal parameter
5086         For_Parent to Skip_Self. Update the comment on usage.
5087         (Make_Final_Call): Rename formal parameter For_Parent to
5088         Skip_Self. Update the comment on usage.
5090 2014-07-18  Ed Schonberg  <schonberg@adacore.com>
5092         * sem_ch9.adb (Analyze_Requeue): The entry being referenced
5093         can be a procedure that is implemented by entry, and have a
5094         formal that is a synchronized interface.  It does not have to
5095         be declared as a protected operation.
5097 2014-07-18  Robert Dewar  <dewar@adacore.com>
5099         * gnat_rm.texi: Remove mention of obsolete attributes
5100         Max[_Interrupt]_Priority, which have never been implemented
5101         (or at the very least were removed long ago if they ever were
5102         implemented.  Add documentation of Max[_Interrupt]_Priority
5103         constants in package System.
5104         * ttypes.ads: Document actual handling of package System,
5105         rather than a historical fantasy version.  Remove mention of
5106         non-existent attributes Max[_Interrupt]_Priority.
5108 2014-07-18  Pascal Obry  <obry@adacore.com>
5110         * a-witeio.adb (Put): No 16-bit character output when text
5111         translation is disabled.
5112         * i-cstrea.ads: Code clean up.
5114 2014-07-18  Robert Dewar  <dewar@adacore.com>
5116         * gnat_rm.texi: Document that Wchar_T_Size and Word_Size are
5117         static attributes.
5119 2014-07-18  Arnaud Charlet  <charlet@adacore.com>
5121         * a-witeio.adb, initialize.c: Update comments. Minor clean ups.
5123 2014-07-18  Pascal Obry  <obry@adacore.com>
5125         * adaint.c: Do not include wchar.h on VxWorks.
5126         * mingw32.h: Remove obsolete definition.
5128 2014-07-18  Pascal Obry  <obry@adacore.com>
5130         * a-textio.adb, a-witeio.adb, a-ztexio.adb: Use C_Streams Default_Text.
5131         * i-cstrea.ads (Content_Encoding): Moved here, add convention C.
5132         * s-ficobl.ads (Content_Encoding): Moved to C_Streams.
5133         * s-fileio.adb (Open): Adjust to use Content_Encoding from C_Streams.
5135 2014-07-18  Pascal Obry  <obry@adacore.com>
5137         * a-textio.adb: Rename Is_Text_File to Text_Encoding.
5138         * a-ztexio.adb: Likewise.
5139         * a-witeio.adb: Likewise.
5140         (Open): Pass file's translation mode to set_text_mode.
5141         * s-ficobl.ads (Content_Encoding): New type.
5142         (Text_Content_Encoding): New subtype.
5143         (AFCB): Rename Is_Text_File to Text_Encoding.
5144         * s-fileio.adb (Open): Handles new text_translation
5145         values. Remove Is_Text_File which is equivalent to Text_Encoding
5146         in Text_Content_Encoding.
5147         * adaint.h (__gnat_set_mode): New routine.
5148         * sysdep.c (__gnat_set_wide_text_mode): Removed.
5149         (__gnat_set_mode): New routine.
5151 2014-07-18  Arnaud Charlet  <charlet@adacore.com>
5153         * gcc-interface/decl.c, gcc-interface/trans.c,
5154         gcc-interface/utils.c (Is_Packed_Array_Type): Renamed 
5155         Is_Packed_Array_Impl_Type.
5157 2014-07-18  Gary Dismukes  <dismukes@adacore.com>
5159         * sem_util.adb: Minor typo correction.
5161 2014-07-18  Ben Brosgol  <brosgol@adacore.com>
5163         * gnat_rm.texi: Complete previous change.
5165 2014-07-18  Pascal Obry  <obry@adacore.com>
5167         * s-fileio.adb: Minor style fix.
5169 2014-07-18  Ed Schonberg  <schonberg@adacore.com>
5171         * sem_ch13.adb (Analyze_Aspect_Specifications): Detect improper
5172         specification of stream attributes for subtypes that are not
5173         first subtypes, to prevent malformed rep_item chains in the case
5174         of such illegal specifications for discriminated private subtypes.
5175         (Check_Overloaded_Name): Verify that the name is an entity name
5176         before other checks.
5178 2014-07-18  Pascal Obry  <obry@adacore.com>
5180         * adaint.c (__gnat_fputwc) Do not disable on cross-build.
5182 2014-07-18  Robert Dewar  <dewar@adacore.com>
5184         * sem_prag.adb, sem_attr.adb,
5185         sem_aggr.adb, sinfo.ads, sem_eval.ads: Minor reformatting.
5187 2014-07-18  Pascal Obry  <obry@adacore.com>
5189         * sysdep.c (__gnat_wide_text_translation_required): Removed from here.
5190         * initialize.c (__gnat_wide_text_translation_required): Defined here.
5192 2014-07-18  Pascal Obry  <obry@adacore.com>
5194         * adaint.c (__gnat_fputwc): New routine.
5195         * s-crtl.ads (fputwc): Now imported as __gnat_fputwc.
5197 2014-07-18  Hristian Kirtchev  <kirtchev@adacore.com>
5199         * einfo.adb: Flag 270 is now used as Stores_Attribute_Old_Prefix.
5200         (Set_Stores_Attribute_Old_Prefix): New routine.
5201         (Stores_Attribute_Old_Prefix): New routine.
5202         (Write_Entity_Flags):
5203         Output flag Stores_Attribute_Old_Prefix.
5204         * einfo.ads Add new flag Stores_Attribute_Old_Prefix along with
5205         comment on usage.
5206         (Set_Stores_Attribute_Old_Prefix): New routine
5207         along with pragma Inline.
5208         (Stores_Attribute_Old_Prefix): New
5209         routine along with pragma Inline.
5210         * exp_attr.adb (Expand_N_Attribute_Reference): Mark the generated
5211         constant which captures the result of attribute 'Old's prefix.
5212         * sem_util.adb (In_Assertion_Expression_Pragma): Recognize a
5213         relocated expression which acted as a prefix of attribute 'Old.
5215 2014-07-18  Bob Duff  <duff@adacore.com>
5217         * s-spsufi.adb (Finalize_And_Deallocate): Set Subpool.Owner to
5218         null before dispatching to Deallocate_Subpool.
5219         * s-stposu.ads (Default_Subpool_For_Pool): Change mode of
5220         parameter of Default_Subpool_For_Pool to 'in out'.
5221         * s-stposu.adb (Set_Pool_Of_Subpool): Use raise expression. Add
5222         a message to the raise.
5223         * sem_util.adb: Minor reformatting.
5225 2014-07-18  Robert Dewar  <dewar@adacore.com>
5227         * sem_util.adb (Check_Expression_Against_Static_Predicate):
5228         Mark expression as non-static if it fails static predicate check,
5229         and issue additional warning.
5231 2014-07-18  Pascal Obry  <obry@adacore.com>
5233         * a-witeio.adb (Put): Control translation based on
5234         wide_text_translation_required.
5235         * adaint.c (CurrentCCSEncoding): New variable.
5236         * initialize.c (__gnat_initialize): On Windows initialize
5237         CurrentCCSEncoding based on values in GNAT_CCS_ENCODING
5238         environment variable.
5239         * mingw32.h (CurrentCCSEncoding): New external.
5240         (__gnat_wide_text_translation_required): Likewise.
5241         * sysdep.c (wide_text_translation_required): New variable.
5242         (__gnat_set_wide_text_mode): Set mode based on CurrentCCSEncoding.
5244 2014-07-18  Hristian Kirtchev  <kirtchev@adacore.com>
5246         * sem_prag.adb (Analyze_Refined_Depends_In_Decl_Part): Remove global
5247         variable Refined_States.  Add global variable Matched_Items.
5248         (Check_Dependency_Clause): Account for dependency
5249         clauses utilizing states with visible null refinements.
5250         (Is_Null_Refined_State): New routine.
5251         (Match_Items): Record each successfully matched item of pragma Depends.
5252         (Record_Item): New routine.
5254 2014-07-18  Ed Schonberg  <schonberg@adacore.com>
5256         * sem_attr.adb (Analyze_Attribute, case 'Update): Set
5257         Do_Range_Check flag on a dynamic index expression used in a
5258         component association in the argument of Update.
5260 2014-07-18  Gary Dismukes  <dismukes@adacore.com>
5262         * einfo.ads, sem_eval.ads, sem_ch13.adb: Minor reformatting.
5264 2014-07-18  Hristian Kirtchev  <kirtchev@adacore.com>
5266         * exp_ch6.adb (Expand_Simple_Function_Return): Redo the marking
5267         of enclosing blocks, loops and the enclosing function using a
5268         parent-based traversal.
5269         * exp_util.adb (Wrap_Statements_In_Block): Suppress the secondary
5270         stack reclamation if the iterator loop contains a return statement
5271         that uses the stack.
5272         * sem_ch5.adb (Analyze_Loop_Statement): There is no need to
5273         patch up the scope stack as the secondary stack management now
5274         takes into account the enclosing function of the iterator loop.
5276 2014-07-18  Robert Dewar  <dewar@adacore.com>
5278         * sem_ch3.adb, g-memdum.ads, i-cstrea.ads: Minor reformatting.
5280 2014-07-18  Robert Dewar  <dewar@adacore.com>
5282         * einfo.adb (Has_Static_Predicate): New function.
5283         (Set_Has_Static_Predicate): New procedure.
5284         * einfo.ads (Has_Static_Predicate): New flag.
5285         * sem_ch13.adb (Is_Predicate_Static): New function
5286         (Build_Predicate_Functions): Use Is_Predicate_Static to reorganize
5287         (Add_Call): Minor change in Sloc of generated expression
5288         (Add_Predicates): Remove setting of Static_Pred, no longer used.
5289         * sem_ch4.adb (Has_Static_Predicate): Removed this function,
5290         replace by use of the entity flag Has_Static_Predicate_Aspect.
5291         * sem_eval.adb (Eval_Static_Predicate_Check): Check real case
5292         and issue warning that predicate is not checked for now.
5293         * sem_eval.ads (Eval_Static_Predicate_Check): Fix comments in
5294         spec.
5295         * sem_util.adb (Check_Expression_Against_Static_Predicate):
5296         Carry out check for any case where there is a static predicate,
5297         and output appropriate message.
5298         * sinfo.ads: Minor comment corrections.
5300 2014-07-18  Ed Schonberg  <schonberg@adacore.com>
5302         * exp_ch3.adb (Expand_Freeze_Record_Type): If the type is derived
5303         from an untagged private type whose full view is tagged, the type
5304         is marked tagged for layout reasons, but it has no dispatch table,
5305         so Set_All_DT_Position must not be called.
5306         * exp_ch13.adb: If the freeze node is for a type internal to a
5307         record declaration, as is the case for a class-wide subtype
5308         of a parent component, the relevant scope is the scope of the
5309         enclosing record.
5311 2014-07-18  Thomas Quinot  <quinot@adacore.com>
5313         * g-memdum.adb, g-memdum.ads: Code clean ups.
5315 2014-07-18  Hristian Kirtchev  <kirtchev@adacore.com>
5317         * sem_prag.adb (Check_Dependency_Clause):
5318         Update the comment on usage. Reimplement the mechanism which
5319         attempts to match a single clause of Depends against one or
5320         more clauses of Refined_Depends.
5321         (Input_Match): Removed.
5322         (Inputs_Match): Removed.
5323         (Is_Self_Referential): Removed.
5324         (Normalize_Clause): Update the call to Split_Multiple_Outputs.
5325         (Normalize_Outputs): Rename variable Split to New_Claue and update
5326         all its occurrences.
5327         (Report_Extra_Clauses): Update the comment on usage.
5328         (Split_Multiple_Outputs): Renamed to Normalize_Outputs.
5330 2014-07-18  Gary Dismukes  <dismukes@adacore.com>
5332         * i-cstrea.ads: Minor reformatting.
5334 2014-07-18  Hristian Kirtchev  <kirtchev@adacore.com>
5336         * exp_util.adb (Wrap_Statements_In_Block): Propagate both
5337         secondary stack-related flags to the generated block.
5338         * sem_ch5.adb (Analyze_Loop_Statement): Update the scope chain
5339         once the loop is relocated in a block.
5341 2014-07-18  Robert Dewar  <dewar@adacore.com>
5343         * repinfo.ads: Add documentation on handling of back annotation
5344         for dynamic case.
5346 2014-07-18  Ed Schonberg  <schonberg@adacore.com>
5348         * sinfo.ads, sinfo.adb (Incomplete_View): New semantic attribute
5349         of full type declaration, denotes previous declaration for
5350         incomplete view of the type.
5351         * sem_ch3.adb (Analyze_Full_Type_Declaration): Set Incomplete_View
5352         of declaration if one is present.
5353         (Replace_Type): When constructing the signature of an inherited
5354         operation, handle properly the case where the operation has a
5355         formal whose type is an incomplete view.
5356         * sem_util.adb (Collect_Primitive_Operations): Handle properly
5357         the case of an operation declared after an incomplete declaration
5358         for a type T and before the full declaration of T.
5360 2014-07-18  Pascal Obry  <obry@adacore.com>
5362         * i-cstrea.ads: Add documentation for set_wide_text_mode.
5364 2014-07-18  Robert Dewar  <dewar@adacore.com>
5366         * a-witeio.adb: Minor code reorganization.
5367         * i-cstrea.ads: Add comment.
5369 2014-07-18  Thomas Quinot  <quinot@adacore.com>
5371         * s-oscons-tmplt.c (NAME_MAX): Minor cleaup and comment
5372         clarifications.
5374 2014-07-18  Robert Dewar  <dewar@adacore.com>
5376         * g-memdum.adb, g-memdum.ads, exp_strm.adb: Minor reformatting.
5378 2014-07-18  Pascal Obry  <obry@adacore.com>
5380         * s-crtl.ads, i-cstrea.ads (fputwc): New routine.
5381         * a-witeio.adb (Put): On platforms where there is translation
5382         done by the OS output the raw text.
5383         (New_Line): Use Put above to properly handle the LM wide characters.
5385 2014-07-18  Thomas Quinot  <quinot@adacore.com>
5387         * g-memdum.adb, g-memdum.ads (Dump): New parameter Prefix, defaulted
5388         to Absolute_Address.
5390 2014-07-18  Eric Botcazou  <ebotcazou@adacore.com>
5392         * opt.ads (Suppress_Back_Annotation): Remove as unused.
5393         * fe.h (Back_Annotate_Rep_Info): Likewise.
5394         (Global_Discard_Names): Likewise.
5396 2014-07-18  Robert Dewar  <dewar@adacore.com>
5398         * sem_ch13.adb (Is_Type_Ref): Check that type name is not
5399         parenthesized.
5401 2014-07-18  Vincent Celier  <celier@adacore.com>
5403         * s-osinte-vms.ads: Fix style errors.
5405 2014-07-18  Thomas Quinot  <quinot@adacore.com>
5407         * s-oscons-tmplt.c (_POSIX_SOURCE): Define in order to get
5408         NAME_MAX and PATH_MAX.
5410 2014-07-18  Bob Duff  <duff@adacore.com>
5412         * exp_strm.adb (Build_Record_Or_Elementary_Input_Function,
5413         Build_Record_Or_Elementary_Output_Procedure): For Input and
5414         Output attributes, do not read/write the discriminants if they
5415         have default values; that will be done by Read/Write.
5417 2014-07-18  Robert Dewar  <dewar@adacore.com>
5419         * sem_aggr.adb, exp_ch5.adb, sem_ch3.adb, layout.adb, sem_type.adb,
5420         exp_util.adb, exp_attr.adb, einfo.adb, einfo.ads, exp_pakd.adb,
5421         checks.adb, exp_pakd.ads, freeze.adb, sem_util.adb, exp_dbug.adb,
5422         exp_dbug.ads, exp_ch4.adb, sem_ch8.adb, exp_aggr.adb, sem_eval.adb,
5423         sem_ch13.adb: Change name Packed_Array_Type to Packed_Array_Impl_Type.
5425 2014-07-18  Robert Dewar  <dewar@adacore.com>
5427         * lib-writ.adb, makeutl.adb, ali.ads: Minor reformatting.
5429 2014-07-18  Vincent Celier  <celier@adacore.com>
5431         * lib-writ.ads: Update documentation about the D lines.
5433 2014-07-18  Ed Schonberg  <schonberg@adacore.com>
5435         * sem_ch13.adb (Replace_Type_References_Generic): Use type entity
5436         as a parameter, rather than its Chars field, in order to locate
5437         freeze node of type. If the predicate or invariant has references
5438         to types other than the one to which the contract applies, these
5439         types must be frozen, and the corresponding predicate functions
5440         created, before that freeze node.
5442 2014-07-18  Robert Dewar  <dewar@adacore.com>
5444         * freeze.adb, einfo.ads, einfo.adb: Minor code reorganization.
5445         * par_sco.adb: Minor reformatting.
5447 2014-07-18  Gary Dismukes  <dismukes@adacore.com>
5449         * exp_ch4.adb (Real_Range_Check): Turn off
5450         the Do_Range_Check flag on the conversion's current Expression
5451         argument rather than on the originally captured Operand node,
5452         as Expression may reflect a rewriting (as in conversions to a
5453         fixed-point type).
5455 2014-07-18  Vincent Celier  <celier@adacore.com>
5457         * ali.adb (Scan_ALI): Set Sdep_Record.Unit_Name, when the unit
5458         is not a subunit.
5459         * ali.ads (Sdep_Record): New component Unit_Name.
5460         * lib-writ.adb (Write_ALI): Write the unit name in D lines.
5461         * makeutl.adb (Check_Source_Info_In_ALI): Return False if a
5462         dependent unit is in a project and the source file name is not
5463         one of its sources.
5465 2014-07-18  Bob Duff  <duff@adacore.com>
5467         * s-addima.ads: Minor: add comment.
5469 2014-07-18  Thomas Quinot  <quinot@adacore.com>
5471         * freeze.adb (Check_Component_Storage_Order): Fix enforcement
5472         of nesting rules for composites with different SSOs.
5474 2014-07-18  Thomas Quinot  <quinot@adacore.com>
5476         * par_sco.adb (Is_Logical_Operator): An If_Expression is not
5477         a proper logical operator.
5478         (Has_Decision): An If_Expression indicates the presence of a decision
5479         although it is not a logical operator.
5481 2014-07-18  Robert Dewar  <dewar@adacore.com>
5483         * gnat_ugn.texi: Remove note that -gnatR not allowed with -gnatc.
5484         * switch-c.adb: Remove prohibition of -gnatR and -gnatc together.
5486 2014-07-18  Eric Botcazou  <ebotcazou@adacore.com>
5488         * sem_ch13.adb (Kill_Rep_Clause): Clear Comes_From_Source flag
5489         on the null statement.
5491 2014-07-18  Thomas Quinot  <quinot@adacore.com>
5493         * adaint.c: Minor comment rewording.
5494         * socket.c: Define macros _REENTRANT and _THREAD_SAFE so that
5495         use of errno in this file is thread safe.
5497 2014-07-18  Arnaud Charlet  <charlet@adacore.com>
5499         * gnat_ugn.texi: Doc clarification.
5500         * sem_ch13.adb (Kill_Rep_Clause): Use Replace not Rewrite.
5501         * sem_ch13.ads: Minor comment update.
5503 2014-07-18  Robert Dewar  <dewar@adacore.com>
5505         * repinfo.ads: Minor comment fix.
5507 2014-07-18  Robert Dewar  <dewar@adacore.com>
5509         * par-prag.adb: Add dummy entry for Default_Scalar_Storage_Order.
5510         * sem_prag.adb: Add dummy implementation of
5511         Default_Scalar_Storage_Order.
5512         * snames.ads-tmpl: Add dummy entry for
5513         Default_Scalar_Storage_Order pragma.
5515 2014-07-18  Robert Dewar  <dewar@adacore.com>
5517         * opt.adb (Tree_Read): Read Address_Is_Private,
5518         Ignore_Rep_Clauses, Ignore_Style_Check_Pragmas, Multiple_Unit_Index.
5519         (Tree_Write): Corresponding writes
5520         * opt.ads: Minor comment reformatting and fixes.
5521         * tree_io.ads: Increment ASIS_Version_Number.
5523 2014-07-18  Robert Dewar  <dewar@adacore.com>
5525         * sem_attr.adb, s-os_lib.ads, prj-tree.adb: Minor reformatting.
5526         * types.h: Fix typo.
5528 2014-07-18  Robert Dewar  <dewar@adacore.com>
5530         * freeze.adb (Check_Address_Clause): Use Kill_Rep_Clause (no
5531         functional change).
5532         * gnat_ugn.texi: Document that -gnatI removes rep clauses from
5533         ASIS trees.
5534         * sem_ch13.adb (Kill_Rep_Clause): New procedure
5535         (Analyze_Attribute_Definition_Clause): Use
5536         Kill_Rep_Clause. This is just a cleanup, no functional effect.
5537         (Analyze_Enumeration_Representation_Clause):
5538         Use Kill_Rep_Clause. This means that enum rep
5539         clauses are now properly removed from -gnatct trees.
5540         (Analyze_Record_Representation_Clause): Same change.
5541         * sem_ch13.ads (Kill_Rep_Clause): New procedure.
5543 2014-07-18  Pascal Obry  <obry@adacore.com>
5545         * s-os_lib.ads, s-os_lib.adb (GM_Time_Of): New routine to create an
5546         OS_Time from time parts.
5547         * adaint.h, adaint.c (__gnat_to_os_time): New routine.
5549 2014-07-18  Ed Schonberg  <schonberg@adacore.com>
5551         * sem_ch4.adb (Try_Container_Indexing): Refine previous patch for
5552         indexing over containers that are derived types: check whether
5553         signature of found operation has the correct first parameter
5554         before retrieving directly a primitive operation.
5556 2014-07-18  Ed Schonberg  <schonberg@adacore.com>
5558         * sem_attr.adb (Analyze_Attribute, case 'Update): Set
5559         Do_Range_Check flag on dynamic bounds of a range used in a
5560         component association in the argument of Update.
5562 2014-07-18  Thomas Quinot  <quinot@adacore.com>
5564         * adaint.c: #define _REENTRANT and _THREAD_SAFE in order for
5565         accesses to errno(3) to be thread safe.
5567 2014-07-18  Vincent Celier  <celier@adacore.com>
5569         * prj-tree.adb (Imported_Or_Extended_Project_Of): For each non
5570         limited imported project that is an extending project, return
5571         a project being extended if it has the expected name.
5573 2014-07-18  Pascal Obry  <obry@adacore.com>
5575         * s-os_lib.ads, s-os_lib.adb (Set_File_Last_Modify_Time_Stamp): New
5576         routine to set the last modification time stamp for the given file.
5577         * gnatchop.adb (File_Time_Stamp): Removed.
5578         (Write_Unit): Use
5579         Set_File_Last_Modify_Time_Stamp instead of ad-hoc implementation.
5581 2014-07-18  Ed Schonberg  <schonberg@adacore.com>
5583         * sem_aggr.adb (Aggregate_Constraint_Checks): Moved to sem_util.
5584         * sem_util.ads, sem_util.adb (Aggregate_Constraint_Checks):
5585         Moved here, so it can be shared with the resolution of 'Update,
5586         whose argument shares some features with aggregates.
5587         * sem_attr.adb (Resolve_Attribute, case 'Update): Apply
5588         Aggregate_Constraint_Checks with the expression of each
5589         association, so that the Do_Range_Check flag is set when needed.
5591 2014-07-18  Ed Schonberg  <schonberg@adacore.com>
5593         * sem_ch4.adb (Try_Container_Indexing):  If the container
5594         type is a derived type, the value of the inherited  aspect is
5595         the Reference operation declared for the parent type. However,
5596         Reference is also a primitive operation of the new type, and
5597         the inherited operation has a different signature. We retrieve
5598         the right one from the list of primitive operations of the
5599         derived type.
5601 2014-07-18  Vincent Celier  <celier@adacore.com>
5603         * debug.adb: Update comment.
5605 2014-07-18  Hristian Kirtchev  <kirtchev@adacore.com>
5607         * exp_util.adb (Needs_Finalization): There is no reason why a
5608         C type should not benefit from finalization actions.
5610 2014-07-18  Thomas Quinot  <quinot@adacore.com>
5612         * s-oscons-tmplt.c (NAME_MAX): Fix definition for Solaris
5613         (FILENAME_MAX): Remove unneeded definition.
5615 2014-07-18  Robert Dewar  <dewar@adacore.com>
5617         * exp_attr.adb, debug.adb: Update comments.
5619 2014-07-18  Vincent Celier  <celier@adacore.com>
5621         * par-ch4.adb (Simple_Expression): Add missing style check
5622         for binary adding operators.
5623         (Term): Add missing style check for multiplying operators.
5625 2014-07-18  Robert Dewar  <dewar@adacore.com>
5627         * impunit.adb: Minor comment correction.
5628         * widechar.adb, s-wchcon.ads: Minor comment corrections.
5630 2014-07-18  Robert Dewar  <dewar@adacore.com>
5632         * sem_ch13.adb (Build_Discrete_Static_Predicate): New name
5633         for Build_Static_Predicate (Build_Predicate_Functions):
5634         Don't try to build discrete predicate for real type.
5635         (Build_Predicate_Functions): Report attempt to use
5636         Static_Predicate function on real type as unimplemented.
5637         * sem_util.adb (Check_Expression_Against_Static_Predicate):
5638         Add guard to prevent blow up on predicate for real type.
5640 2014-07-18  Ed Schonberg  <schonberg@adacore.com>
5642         * einfo.adb (Set_Static_Predicate): Simplify assertion to handle
5643         properly static predicate on enumeration types and modular types
5644         (not subtypes).
5646 2014-07-18  Pierre-Marie Derodat  <derodat@adacore.com>
5648         * scos.ads (SCO_Unit_Table_Entry): Add a field to keep track of
5649         the corresponding source file index.
5650         * get_scos.ads (Get_SCOs): Add a default value for it.
5651         * par_sco.adb (SCO_Record): Fill the corresponding value.
5652         * scos.h: New.
5654 2014-07-18  Vincent Celier  <celier@adacore.com>
5656         * a-strunb-shared.adb, s-auxdec.ads, s-rannum.adb, atree.ads,
5657         urealp.adb, vms_data.ads, lib.ads, s-auxdec-vms_64.ads: Minor
5658         reformatting.
5659         * gnat_ugn.texi: Add documentation for new gnatmem switch -t.
5661 2014-07-18  Thomas Quinot  <quinot@adacore.com>
5663         * g-sercom.ads (Set): document possible data loss.
5665 2014-07-18  Ed Schonberg  <schonberg@adacore.com>
5667         * exp_attr.adb (Expand_N_Attribute_Reference, cases Input,
5668         Output, Read, Write): If the restriction No_Streams is active,
5669         replace each occurrence of a stream attribute by an explicit
5670         Raise statement.
5672 2014-07-18  Robert Dewar  <dewar@adacore.com>
5674         * par_sco.adb, a-reatim.ads, exp_attr.adb, sem_util.adb: Minor
5675         reformatting.
5677 2014-07-18  Robert Dewar  <dewar@adacore.com>
5679         * einfo.ads, einfo.adb (Has_Out_Or_In_Out_Parameter): New flag and
5680         function.
5681         (Set_Has_Out_Or_In_Out_Parameter): New procedure.
5682         * sem_ch6.adb (Set_Formal_Mode): Set Has_Out_Or_In_Out_Parameter flag.
5683         * sem_res.adb (Resolve_Call): Error if call of Ada 2012 function
5684         with OUT or IN OUT from earlier Ada mode (e.g. Ada 2005)
5686 2014-07-18  Robert Dewar  <dewar@adacore.com>
5688         * bcheck.adb (Check_Consistent_Restrictions):
5689         Remove obsolete code checking for violation of
5690         No_Standard_Allocators_After_Elaboration (main program)
5691         * bindgen.adb (Gen_Adainit): Handle
5692         No_Standard_Allocators_After_Elaboration
5693         (Gen_Output_File_Ada): ditto.
5694         * exp_ch4.adb (Expand_N_Allocator): Handle
5695         No_Standard_Allocators_After_Elaboration.
5696         * Makefile.rtl: Add entry for s-elaall
5697         * rtsfind.ads: Add entry for Check_Standard_Allocator.
5698         * s-elaall.ads, s-elaall.adb: New files.
5699         * sem_ch4.adb (Analyze_Allocator): Handle
5700         No_Standard_Allocators_After_Elaboration.
5702 2014-07-18  Robert Dewar  <dewar@adacore.com>
5704         * lib.adb, lib.ads, lib-writ.adb, lib-writ.ads, ali.adb,
5705         ali.ads, lib-load.adb: Remove Lib.Has_Allocator and all uses.
5706         Remove AB parameter from ali files and all uses.
5707         Remove Allocator_In_Body and all uses.
5709 2014-07-18  Robert Dewar  <dewar@adacore.com>
5711         * g-expect-vms.adb: Add comment.
5713 2014-07-18  Thomas Quinot  <quinot@adacore.com>
5715         * par_sco.adb (Is_Logical_Operation): return True for
5716         N_If_Expression.
5718 2014-07-18  Ed Schonberg  <schonberg@adacore.com>
5720         * sem_attr.adb (Resolve_Attribute, case 'Update): Do full
5721         analysis and resolution of each choice in the associations within
5722         the argument of Update, because they may be variable names.
5724 2014-07-18  Hristian Kirtchev  <kirtchev@adacore.com>
5726         * exp_attr.adb (Expand_Loop_Entry_Attribute): Insert any condition
5727         actions before the generated if statement.
5729 2014-07-18  Hristian Kirtchev  <kirtchev@adacore.com>
5731         * gnat_ugn.texi Enhance the documentation of
5732         switches -gnateA and -gnateV.
5734 2014-07-18  Ed Schonberg  <schonberg@adacore.com>
5736         * sem_util.adb (Build_Default_Subtype): Add missing condition
5737         so that code matches description: use the full view of the base
5738         only if the base is private and the subtype is not.
5740 2014-07-17  Gary Dismukes  <dismukes@adacore.com>
5742         * exp_disp.adb: Minor reformatting.
5743         * exp_disp.adb: Minor code reorganization.
5745 2014-07-17  Thomas Quinot  <quinot@adacore.com>
5747         * gnat_rm.texi, freeze.adb (Check_Component_Storage_Order): Do not
5748         require an explicit SSO attribute definition clause on a composite type
5749         just because one of its components has one.
5751 2014-07-17  Robert Dewar  <dewar@adacore.com>
5753         * sem_attr.adb (Analyze_Attribute, case Loop_Entry): Rewrite
5754         attribute out of existence if the enclosing pragma is ignored.
5755         * sem_util.adb: Minor reformatting.
5757 2014-07-17  Ed Schonberg  <schonberg@adacore.com>
5759         * exp_aggr.adb (Expand_Array_Aggregate): Handle properly an
5760         array aggregate expanded into assignments when it appears as a
5761         local declaration in an inlined body.
5763 2014-07-17  Doug Rupp  <rupp@adacore.com>
5765         * init.c [__ANDROID__]: Modify for ZCX.
5766         * exp_aggr.adb: Minor reformatting
5767         * sigtramp-armvxw.c, sigtramp-ppcvxw.c: Update comments.
5769 2014-07-17  Robert Dewar  <dewar@adacore.com>
5771         * a-strunb-shared.ads, a-stwiun-shared.ads, a-stzunb-shared.ads,
5772         exp_ch7.adb, g-pehage.ads, g-socket.ads, gnat_ugn.texi, gnat_ugx.texi,
5773         scng.adb: Remove incorrect usage "allow to" and "allows to".
5775 2014-07-17  Robert Dewar  <dewar@adacore.com>
5777         * exp_dist.adb: Minor reformatting.
5779 2014-07-17  Bob Duff  <duff@adacore.com>
5781         * gnat_ugn.texi: Improve documentation of Unrestricted_Access.
5783 2014-07-17  Robert Dewar  <dewar@adacore.com>
5785         * sem_ch13.adb (Build_Invariant_Procedure): Add variable Nam
5786         (Add_Invariants): Set Nam to Name_Type_Invariant if from aspect.
5788 2014-07-17  Thomas Quinot  <quinot@adacore.com>
5790         * exp_pakd.adb (Create_Packed_Array_Type.Install_PAT): For a
5791         non-bit-packed array, propagate Reverse_Storage_Order to the
5792         packed array type.
5794 2014-07-17  Javier Miranda  <miranda@adacore.com>
5796         * exp_disp.adb: Fix comment.
5797         * exp_pakd.adb: Minor reformatting.
5799 2014-07-17  Robert Dewar  <dewar@adacore.com>
5801         * bindgen.adb (Gen_Elab_Calls): Skip reference to elab
5802         entity if none exists (Gen_Elab_Calls): Complain if clash with
5803         No_Multiple_Elaboration.
5804         * s-rident.ads, restrict.ads: Add restriction No_Multiple_Elaboration.
5805         * sem_util.adb (Build_Elaboration_Entity): Skip building entity
5806         if not needed.
5807         * gnat_rm.texi: Document restriction No_Multiple_Elaboration.
5808         * sem_ch4.adb: Minor comment updates.
5810 2014-07-17  Ed Schonberg  <schonberg@adacore.com>
5812         * exp_ch9.adb (Buid_Protected_Subprogram_Call): Preserve type
5813         of function call for later use when shared passive objects
5814         are involved.
5816 2014-07-17  Hristian Kirtchev  <kirtchev@adacore.com>
5818         * par-ch13.adb (Get_Aspect_Specifications):
5819         Catch a case where the argument of SPARK aspect Refined_State
5820         is not properly parenthesized.
5822 2014-07-17  Hristian Kirtchev  <kirtchev@adacore.com>
5824         * exp_ch6.adb (Expand_Ctrl_Function_Call): Do not extend
5825         the lifetime of a reference to an Ada 2012 container element.
5826         (Is_Element_Reference): New routine.
5828 2014-07-17  Robert Dewar  <dewar@adacore.com>
5830         * ali.ads: Minor comment fix.
5831         * lib-writ.adb: Minor reformatting.
5833 2014-07-17  Ed Schonberg  <schonberg@adacore.com>
5835         * sem_ch10.adb (Analyze_Proper_Body): When analyzing a subunit
5836         in ASIS mode, load another subunit only if it a subunit of the
5837         current one, not a sibling that has been reached through the
5838         analysis of an ancestor. This allows the construction of the
5839         ASIS tree for the subunit even when sibling subunits have errors.
5841 2014-07-17  Hristian Kirtchev  <kirtchev@adacore.com>
5843         * sem_ch3.adb (Analyze_Declarations): Remove the guard which
5844         prevents the analysis of various contracts when the associated
5845         construct is erroneous.
5846         * sem_util.adb (Save_SPARK_Mode_And_Set): Do not query the
5847         SPARK_Pragma of an illegal or a partially decorated construct.
5849 2014-07-17  Robert Dewar  <dewar@adacore.com>
5851         * s-imguns.ads: Minor reformatting.
5853 2014-07-17  Hristian Kirtchev  <kirtchev@adacore.com>
5855         * exp_ch7.adb (Build_Finalization_Master): Move all local
5856         variables to the proper code section. When looking for an existing
5857         finalization master, inspect the ultimate ancestor type of the
5858         full view.
5859         * sem_util.ads, sem_util.adb (Root_Type_Of_Full_View): New routine.
5861 2014-07-17  Robert Dewar  <dewar@adacore.com>
5863         * aspects.ads, aspects.adb: Add entries for aspect Annotate.
5864         * gnat_rm.texi: Document Entity argument for pragma Annotate and
5865         Annotate aspect.
5866         * sem_ch13.adb (Analyze_Aspect_Specification): Add processing
5867         for Annotate aspect.
5868         * sem_prag.adb (Analyze_Pragma, case Annotate): Allow optional
5869         Entity argument at end.
5870         * sinfo.ads (N_Aspect_Specification): Add note on Annotate aspect.
5872 2014-07-17  Tristan Gingold  <gingold@adacore.com>
5874         * s-imguns.ads: Fix minor typo.
5876 2014-07-17  Thomas Quinot  <quinot@adacore.com>
5878         * sprint.adb: Minor reformatting.
5880 2014-07-17  Robert Dewar  <dewar@adacore.com>
5882         * sprint.adb (Write_Itype): Print proper header for string
5883         literal subtype.
5885 2014-07-17  Steve Baird  <baird@adacore.com>
5887         * sinfo.ads, sem_scil.ads: Improve comments, minor reformatting.
5889 2014-07-17  Vincent Celier  <celier@adacore.com>
5891         * gnatbind.adb: Change in message "try ... for more information".
5893 2014-07-17  Robert Dewar  <dewar@adacore.com>
5895         * sprint.adb: Code clean up.
5897 2014-07-17  Hristian Kirtchev  <kirtchev@adacore.com>
5899         * exp_ch7.adb (Find_Last_Init): Relocate local variables to
5900         the relevant code section. Add new local constant Obj_Id. When
5901         a limited controlled object is initialized by a function call,
5902         the build-in-place object access function call acts as the last
5903         initialization statement.
5904         * exp_util.adb (Is_Object_Access_BIP_Func_Call): New routine.
5905         (Is_Secondary_Stack_BIP_Func_Call): Code reformatting.
5906         * exp_util.ads (Is_Object_Access_BIP_Func_Call): New routine.
5908 2014-07-17  Ed Schonberg  <schonberg@adacore.com>
5910         * sem_ch8.adb (Analyze_Generic_Renaming): For generic subprograms,
5911         propagate intrinsic flag to renamed entity, to allow e.g. renaming
5912         of Unchecked_Conversion.
5913         * sem_ch3.adb (Analyze_Declarations): Do not analyze contracts
5914         if the declaration has errors.
5916 2014-07-17  Ed Schonberg  <schonberg@adacore.com>
5918         * a-rbtgbk.adb: a-rbtgbk.adb (Generic_Insert_Post): Check whether
5919         container is busy before checking whether capacity allows for
5920         a further insertion. Insertion in a busy container that is full
5921         raises Program_Error rather than Capacity_Error. Previous to that
5922         patch which exception was raised varied among container types.
5924 2014-07-17  Robert Dewar  <dewar@adacore.com>
5926         * g-comlin.ads, g-comlin.adb: Minor clean up.
5928 2014-07-17  Bob Duff  <duff@adacore.com>
5930         * gnat_ugn.texi: Update gnatpp doc.
5932 2014-07-17  Robert Dewar  <dewar@adacore.com>
5934         * gnat_rm.texi: Document new restriction No_Long_Long_Integers.
5935         * exp_ch4.adb (Make_Array_Comparison_Op): Add note that we
5936         could do this by actually expanding a real generic.
5937         * a-tags.ads: Add comments about performance.
5938         * sprint.adb (Sprint_Node_Actual, case N_Object_Declaration):
5939         Print Etype of defining identifier, rather than the object
5940         definition. More information.
5942 2014-07-17  Thomas Quinot  <quinot@adacore.com>
5944         * exp_dist.adb: Minor documentation clarification.
5946 2014-07-17  Hristian Kirtchev  <kirtchev@adacore.com>
5948         * exp_util.adb (Is_Aliased): Revert previous change.
5950 2014-07-17  Vincent Celier  <celier@adacore.com>
5952         * g-comlin.adb (Try_Help): New procedure.
5953         (Getopt): Use new procedure Try_Help.
5954         * g-comlin.ads (Try_Help): New procedure.
5956 2014-07-17  Bob Duff  <duff@adacore.com>
5958         * gnat_ugn.texi: Minor update.
5960 2014-07-17  Robert Dewar  <dewar@adacore.com>
5962         * gnat_rm.texi: Improve documentation of Unrestricted_Access.
5963         * sinfo.ads: Document restriction on aggregates (must expand to
5964         assignments if one or more assignments needs expansion, e.g. for
5965         controlled types).
5966         * sem_ch13.adb: All warning messages regarding bit order should
5967         be info: messages.
5968         * gnat_ugn.texi: Minor correction of missing @ on @code
5970 2014-07-17  Robert Dewar  <dewar@adacore.com>
5972         * restrict.ads (Implementation_Restriction): Add No_Long_Long_Integer.
5973         * s-rident.ads (Partition_Boolean_Restrictions): Add
5974         No_Long_Long_Integer.
5975         * sem_ch3.adb (Modular_Type_Declaration): Size must be <=
5976         Long_Integer'Size if restriction No_Long_Long_Integer is active.
5977         (Signed_Integer_Type_Declaration): Do not allow Long_Long_Integer
5978         as the implicit base type for a signed integer type declaration
5979         if restriction No_Long_Long_Integer is active.
5980         * sem_util.ads, sem_util.adb (Set_Entity_With_Checks): Include check for
5981         No_Long_Long_Integer.
5983 2014-07-17  Robert Dewar  <dewar@adacore.com>
5985         * sem_ch3.adb, a-ztexio.ads, exp_imgv.adb, casing.adb, casing.ads,
5986         einfo.ads, checks.adb, sem_ch12.adb, a-textio.ads, freeze.adb,
5987         repinfo.adb, exp_ch6.adb, sem_ch4.adb, a-witeio.ads, sem_ch8.adb,
5988         sem_warn.adb, exp_aggr.adb, exp_dist.adb, par-tchk.adb, s-fatgen.adb,
5989         treepr.adb, lib-xref.adb: Remove the word kludge from ada sources.
5991 2014-07-17  Robert Dewar  <dewar@adacore.com>
5993         * debug.adb: Remove -gnatdQ.
5994         * exp_disp.adb: Remove -gnatdQ.
5995         * a-ztenio.ads, a-wtinio.ads, a-wtmoio.ads, a-ztcoau.ads, a-tiinio.ads,
5996         a-wtfiio.ads, a-timoio.ads, sem_ch12.adb, a-tifiio.ads, a-ztinio.ads,
5997         rtsfind.adb, rtsfind.ads, a-ztmoio.ads, a-wtdeio.ads, a-ztfiio.ads,
5998         a-tideio.ads, a-wtflio.ads, a-ztdeio.ads, sem_ch8.adb, a-tiflio.ads,
5999         sprint.adb, a-ztflio.ads, snames.ads-tmpl, a-wtenio.ads,
6000         a-tienio.ads: Rename Text_IO_Kludge to Text_IO_Special_Unit.
6002 2014-07-17  Robert Dewar  <dewar@adacore.com>
6004         * back_end.adb: Minor reformatting and comment additions.
6005         * checks.ads, checks.adb (Duplicated_Tag_Checks_Suppressed): New
6006         function.
6007         * exp_disp.adb (Make_DT): Use Duplicated_Tag_Checks_Suppressed.
6008         (Make_VM_TSD): Use Duplicated_Tag_Checks_Suppressed.
6009         * gnat_rm.texi: Document new check Duplicated_Tag_Checks_Suppressed.
6010         * gnat_ugn.texi: Additional documentation for Duplicated_Tag_Check.
6011         * snames.ads-tmpl (Duplicated_Tag_Checks_Suppressed): New check.
6012         * types.ads (Duplicated_Tag_Checks_Suppressed): New check.
6014 2014-07-17  Robert Dewar  <dewar@adacore.com>
6016         * gnat_rm.texi: Minor comment updates.
6018 2014-07-17  Ed Schonberg  <schonberg@adacore.com>
6020         * sem_util.adb (Make_Explicit_Dereference): If the expression
6021         being dereferenced is a generalized indexing, reset the overloaded
6022         flag on the generalized indexing call, consistent with the
6023         resetting of the flag on the original indexed component.
6025 2014-07-17  Robert Dewar  <dewar@adacore.com>
6027         * gnat_ugn.texi: Document advise not to mix -gnatV? and
6028         optimization.
6030 2014-07-17  Robert Dewar  <dewar@adacore.com>
6032         * checks.adb (Insert_Valid_Check): Don't insist on a name
6033         for the prefix when we make calls to Force_Evaluation and
6034         Duplicate_Subexpr_No_Checks.
6035         * exp_util.adb (Is_Volatile_Reference): Handle all cases properly
6036         (Remove_Side_Effects): Handle all volatile references right
6037         (Side_Effect_Free): Volatile reference is never side effect free
6038         * sinfo.ads (N_Attribute_Reference): Add comments explaining
6039         that in the tree, the prefix can be a general expression.
6041 2014-07-17  Hristian Kirtchev  <kirtchev@adacore.com>
6043         * sem_ch6.adb (Analyze_Subprogram_Body_Contract,
6044         Analyze_Subprogram_Contract): Add comments on SPARK_Mode save/restore.
6045         * sem_ch7.adb (Analyze_Package_Body_Contract,
6046         Analyze_Package_Contract): Add comments on SPARK_Mode save/restore.
6048 2014-07-17  Robert Dewar  <dewar@adacore.com>
6050         * exp_ch7.ads, exp_util.ads: Document Insert_Action_After,
6051         Store_After_Actions_In_Scope.
6053 2014-07-17  Robert Dewar  <dewar@adacore.com>
6055         * sem_aux.ads: Minor comment addition.
6057 2014-07-17  Ed Schonberg  <schonberg@adacore.com>
6059         * sem_res.adb (Make_Call_Into_Operator): If the call is already
6060         a rewriting of an operator node, there are no actuals to be
6061         propagated from original node to rewritten node when in ASIS mode.
6063 2014-07-17  Hristian Kirtchev  <kirtchev@adacore.com>
6065         * sem_ch6.adb (Analyze_Subprogram_Body_Contract,
6066         Analyze_Subprogram_Contract): Add new local variable Mode. Save
6067         and restore the SPARK mode of the related construct in a
6068         stack-like fashion.
6069         * sem_ch7.adb (Analyze_Package_Body_Contract,
6070         Analyze_Package_Contract): Add new local variable Mode. Save and
6071         restore the SPARK mode of the related construct in a stack-like fashion.
6072         * sem_util.adb Remove with and use clause for Opt.
6073         (Restore_SPARK_Mode): New routine.
6074         (Save_SPARK_Mode_And_Set): New routine.
6075         * sem_util.ads Add with and use clause for Opt.
6076         (Restore_SPARK_Mode): New routine.
6077         (Save_SPARK_Mode_And_Set): New routine.
6079 2014-07-17  Hristian Kirtchev  <kirtchev@adacore.com>
6081         * exp_util.adb (Is_Aliased): Transient objects
6082         within an expression with actions cannot be considered aliased.
6084 2014-07-17  Thomas Quinot  <quinot@adacore.com>
6086         * sem.ads (Scope_Stack_Entry): Reorganize storage of action lists;
6087         introduce a new list (cleanup actions) for each (transient) scope.
6088         * sinfo.ads, sinfo.adb (Cleanup_Actions): New attribute for
6089         N_Block_Statement
6090         * exp_ch7.ads (Store_Cleanup_Actions_In_Scope): New subprogram.
6091         * exp_ch7.adb (Store_Actions_In_Scope): New subprogram, common
6092         processing for Store_xxx_Actions_In_Scope.
6093         (Build_Cleanup_Statements): Allow for a list of additional
6094         cleanup statements to be passed by the caller.
6095         (Expand_Cleanup_Actions): Take custom cleanup actions associated
6096         with an N_Block_Statement into account.
6097         (Insert_Actions_In_Scope_Around): Account for Scope_Stack_Entry
6098         reorganization (refactoring only, no behaviour change).
6099         (Make_Transient_Block): Add assertion to ensure that the current
6100         scope is indeed a block (namely, the entity for the transient
6101         block being constructed syntactically, which has already been
6102         established as a scope).  If cleanup actions are present in the
6103         transient scope, transfer them now to the transient block.
6104         * exp_ch6.adb (Expand_Protected_Subprogram_Call): Freeze the
6105         called function while it is still present as the name in a call
6106         in the tree. This may not be the case later on if the call is
6107         rewritten into a transient block.
6108         * exp_smem.adb (Add_Shared_Var_Lock_Procs): The post-actions
6109         inserted after calling a protected operation on a shared passive
6110         protected must be performed in a block finalizer, not just
6111         inserted in the tree, so that they are executed even in case of
6112         a normal (RETURN) or abnormal (exception) transfer of control
6113         outside of the current scope.
6114         * exp_smem.ads (Add_Shared_Var_Lock_Procs): Update documentation
6115         * sem_ch8.adb, expander.adb, exp_ch11.adb: Adjust for
6116         Scope_Stack_Entry reorganization.
6118 2014-07-17  Thomas Quinot  <quinot@adacore.com>
6120         * exp_disp.adb (Make_DT, Make_VM_TSD): Do not omit Check_TSD
6121         call for types that do not have an explicit attribute definition
6122         clause for External_Tag, as their default tag may clash with an
6123         explicit tag defined for some other type.
6125 2014-07-17  Hristian Kirtchev  <kirtchev@adacore.com>
6127         * exp_util.adb (Is_Controlled_Function_Call): Recognize a
6128         controlled function call with multiple actual parameters that
6129         appears in Object.Operation form.
6131 2014-07-17  Thomas Quinot  <quinot@adacore.com>
6133         * einfo.ads, einfo.adb (Has_External_Tag_Rep_Clause): Remove
6134         entity flag.
6135         * sem_ch13.adb (Analyze_Attribute_Definition_Clause, case
6136         External_Tag): No need to set entity flag.
6137         * sem_aux.ads, sem_aux.adb (Has_External_Tag_Rep_Clause):
6138         Reimplement correctly in terms of Has_Rep_Item.
6140 2014-07-17  Thomas Quinot  <quinot@adacore.com>
6142         * exp_ch7.adb (Establish_Transient_Scope.Find_Node_To_Be_Wrapped):
6143         Start examining the tree at the node passed to
6144         Establish_Transient_Scope (not its parent).
6145         * exp_ch6.adb (Make_Build_In_Place_Call_In_Object_Declaration):
6146         The access type for the variable storing the reference to
6147         the call must be declared and frozen prior to establishing a
6148         transient scope.
6149         * exp_ch9.adb: Minor reformatting.
6151 2014-07-17  Pascal Obry  <obry@adacore.com>
6153         * s-os_lib.ads: Minor comment update.
6155 2014-07-17  Tristan Gingold  <gingold@adacore.com>
6157         * sysdep.c: Add ATTRIBUTE_UNUSED to avoid warnings.  Fix some
6158         indentation.
6159         * socket.c: Remove #warning to avoid warning.
6160         * expect.c: Indent some preprocessor directives to clarify
6161         nested if.  Do not use wait.h on PikeOS.  Add ATTRIBUTE_UNUSED
6162         to remove warnings.
6163         * env.c: Fix indentation.  Port to PikeOS.
6164         * gsocket.h: Port to PikeOS.  Remove #warning.
6165         * terminals.c: Port to PikeOS.  Fix indentation of the stubs.
6166         Add ATTRIBUTE_UNUSED to stubs arguments.  Fix return statement
6167         of stubbed __gnat_setup_parent_communication.
6168         * adaint.c: Port to PikeOS.  Reindent some preprocessor
6169         directives to clarify nested if.  Fix indentation.  Add missing
6170         ATTRIBUTE_UNUSED.
6172 2014-07-17  Robert Dewar  <dewar@adacore.com>
6174         * sem_attr.adb: Minor reformatting.
6176 2014-07-17  Robert Dewar  <dewar@adacore.com>
6178         * exp_ch7.adb, exp_ch7.ads, sinfo.ads: Minor reformatting.
6180 2014-07-17  Ed Schonberg  <schonberg@adacore.com>
6182         * sem_case.adb (Check_Choice_Set): If the case expression is the
6183         expression in a predicate, do not recheck coverage against itself,
6184         to prevent spurious errors.
6185         * sem_ch13.adb (Check_Aspect_At_End_Of_Declarations): Indicate that
6186         expression comes from an aspect specification, to prevent spurious
6187         errors when expression is a case expression in a predicate.
6189 2014-07-17  Pascal Obry  <obry@adacore.com>
6191         * adaint.c, adaint.h (__gnat_set_executable): Add mode parameter.
6192         * s-os_lib.ads, s-os_lib.adb (Set_Executable): Add Mode parameter.
6194 2014-07-17  Vincent Celier  <celier@adacore.com>
6196         * gnatchop.adb, make.adb, gnatbind.adb, clean.adb, gprep.adb,
6197         gnatxref.adb, gnatls.adb, gnatfind.adb, gnatname.adb: Do not output
6198         the usage for an erroneous invocation of a gnat tool.
6200 2014-07-16  Vincent Celier  <celier@adacore.com>
6202         * gnatls.adb: Get the target parameters only if -nostdinc was
6203         not specified.
6205 2014-07-16  Ed Schonberg  <schonberg@adacore.com>
6207         * checks.adb (Insert_Valid_Check): If the expression is a packed
6208         component of a modular type of the right size the data is always
6209         valid. This os particularly useful if the component is part of
6210         a volatile variable.
6212 2014-07-16  Robert Dewar  <dewar@adacore.com>
6214         * gnat_rm.texi, sinfo.ads, freeze.adb, exp_aggr.adb: Minor reformatting
6216 2014-07-16  Thomas Quinot  <quinot@adacore.com>
6218         * exp_ch7.ads: Minor documentation fix.
6220 2014-07-16  Ed Schonberg  <schonberg@adacore.com>
6222         * sem_ch3.adb (Find_Type_Name): Diagnose properly
6223         a private extension completion that is an interface definition
6224         with an interface list.
6226 2014-07-16  Arnaud Charlet  <charlet@adacore.com>
6228         * gnatls.adb (Gnatls): Code clean ups.
6230 2014-07-16  Thomas Quinot  <quinot@adacore.com>
6232         * sinfo.ads, sinfo.adb (N_Compound_Statement): New node kind.
6233         * sem.adb (Analyze): Handle N_Compound_Statement.
6234         * sprint.adb (Sprint_Node_Actual): Ditto.
6235         * sem_ch5.ads, sem_ch5.adb (Analyze_Compound_Statement): New
6236         procedure to handle N_Compound_Statement.
6237         * exp_aggr.adb (Collect_Initialization_Statements):
6238         Use a proper compound statement node, instead of a bogus
6239         expression-with-actions with a NULL statement as its expression,
6240         to wrap collected initialization statements.
6241         * freeze.ads, freeze.adb
6242         (Explode_Initialization_Compound_Statement): New public procedure,
6243         lifted from Freeze_Entity.
6244         (Freeze_Entity): When freezing
6245         an object with captured initialization statements and without
6246         delayed freezing, explode compount statement.
6247         * sem_ch4.adb (Analyze_Expression_With_Actions): Remove special
6248         case that used to handle bogus EWAs with NULL statement as
6249         the expression.
6250         * exp_ch13.adb (Expand_N_Freeze_Entity): For an object with
6251         delayed freezing and captured initialization statements, explode
6252         compound statement.
6254 2014-07-16  Gary Dismukes  <dismukes@adacore.com>
6256         * g-rewdat.adb, g-rewdat.ads: Minor reformatting.
6258 2014-07-16  Doug Rupp  <rupp@adacore.com>
6260         * s-interr-hwint.adb: Casing error on parameter.
6262 2014-07-16  Pascal Obry  <obry@adacore.com>
6264         * Makefile.rtl: Add g-rewdat.o dependencies in
6265         GNATRTL_NONTASKING_OBJS.
6267 2014-07-16  Ed Schonberg  <schonberg@adacore.com>
6269         * sem_case.adb: Code clean up.
6271 2014-07-16  Vincent Celier  <celier@adacore.com>
6273         * make.adb: Do not read gnat.adc when gnatmake is invoked
6274         with -gnatA.
6276 2014-07-16  Pascal Obry  <obry@adacore.com>
6278         * gnat_rm.texi, impunit.adb, g-rewdat.adb, g-rewdat.ads: Initial
6279         implementation of GNAT.Rewrite_Data.
6281 2014-07-16  Vincent Celier  <celier@adacore.com>
6283         * gnatls.adb (Normalize): New function.
6284         (Gnatls): Get the target parameters. On targets other than VMS,
6285         normalize the path names in the source search path, the object search
6286         path and the project search path.
6288 2014-07-16  Ed Schonberg  <schonberg@adacore.com>
6290         * sem_case.adb: Avoid self-checking of case expressions in
6291         dynamic predicates.
6293 2014-07-16  Robert Dewar  <dewar@adacore.com>
6295         * gnat_rm.texi: Document effect of Suppress_Initialization on tags and
6296         discriminants.
6298 2014-07-16  Eric Botcazou  <ebotcazou@adacore.com>
6300         * switch-b.adb (Scan_Binder_Switches): Add missing guard.
6302 2014-07-16  Ben Brosgol  <brosgol@adacore.com>
6304         * gnat_ugn.texi: Fix typo.
6306 2014-07-16  Ed Schonberg  <schonberg@adacore.com>
6308         * exp_ch4.adb (Expand_N_Case_Expression): Do not expand case
6309         expression if it is the specification of a subtype predicate:
6310         it will be expanded when the return statement is analyzed, or
6311         when a static predicate is transformed into a static expression
6312         for evaluation by the front-end.
6313         * sem_ch13.adb (Get_RList): If the expression for a static
6314         predicate is a case expression, extract the alternatives of the
6315         branches with a True value to create the required statically
6316         evaluable expression.
6318 2014-07-16  Thomas Quinot  <quinot@adacore.com>
6320         * exp_prag.adb (Expand_Pragma_Check): Use the location of the
6321         expression, not the location of the aspect, for all generated
6322         code, so that in particular the call to raise_assert_failure
6323         gets the sloc of the associated condition.
6324         * exp_ch6.adb
6325         (Expand_Subprogram_Contract.Build_Postconditions_Procedure):
6326         Set an explicit End_Label on the handled sequence of statements
6327         for the _Postconditions procedure so that the implicit return
6328         statement does not erroneously get associated with code generated
6329         for the last condition in postconditions.
6331 2014-07-16  Thomas Quinot  <quinot@adacore.com>
6333         * ug_words: Fix name of VMS synonym for -gnatw.z (SIZE_ALIGNMENT,
6334         not SIZE_ALIGN) and -gnatw.Z (NOSIZE_ALIGNMENT, not NOSIZE_ALIGN).
6335         * vms_data.ads: Add missing spaces in VMS synonyms for -gnatw.z /
6336         -gnatw.Z.
6338 2014-07-16  Robert Dewar  <dewar@adacore.com>
6340         * sem_ch3.adb, sem_prag.adb, sem_util.adb, sem_res.adb, sem_ch13.adb:
6341         Minor code reorganization (use Is_Access_Type, not in Access_Kind).
6342         * exp_ch3.adb: Minor code reorganization, use Is_Access_Type,
6343         not in Access_Kind.
6344         * par-ch4.adb (At_Start_Of_Attribute): New function
6345         (P_Simple_Expression): Better msg for bad attribute prefix.
6346         * scans.ads: Minor reformatting.
6348 2014-07-16  Ed Schonberg  <schonberg@adacore.com>
6350         * sem_attr.adb (Resolve_Attribute, case 'Update): If choice is a
6351         static constant, check that in belongs to the corresponding index
6352         subtype, to produce the proer warning when expansion is disabled.
6354 2014-07-16  Robert Dewar  <dewar@adacore.com>
6356         * freeze.adb (Freeze_Entity): Warn on incompatible size/alignment.
6357         * gnat_ugn.texi: Document -gnatw.z and -gnatw.Z.
6358         * ug_words: VMS synonyms (WARNINGS=[NO]SIZE_ALIGN) for -gnatw.z/-gnatw.Z
6359         * usage.adb: Add lines for -gnatw.z/-gnatw.Z.
6360         * vms_data.ads: VMS synonyms (WARNINGS=[NO]SIZE_ALIGN) for
6361         -gnatw.z/-gnatw.Z
6362         * warnsw.adb: Set Warn_On_Size_Alignment appropriately.
6363         * warnsw.ads (Warn_On_Size_Alignment): New flag Minor
6364         reformatting.
6366 2014-07-16  Hristian Kirtchev  <kirtchev@adacore.com>
6368         * exp_ch7.adb (Process_Declarations): Reinstate the check on
6369         a hook object to ensure that the related transient declaration
6370         is finalizable.
6371         * exp_util.adb (Is_Aliased): Do not consider expresison with
6372         actions as a special context.
6373         (Requires_Cleanup_Actions): Reinstate the check on a hook object to
6374         ensure that the related transient declaration is finalizable.
6376 2014-07-16  Robert Dewar  <dewar@adacore.com>
6378         * checks.ads, checks.adb (Allocation_Checks_Suppressed): New function.
6379         * snames.ads-tmpl: Add Allocation_Check to list of check names.
6380         * types.ads: Add Allocation_Check to list of check names.
6382 2014-07-16  Thomas Quinot  <quinot@adacore.com>
6384         * sem_util.adb (Enter_Name): replace bogus test for presence of
6385         Corresponding_Remote_Type with correct test on Ekind.
6386         * sem_res.adb (Valid_Conversion): ditto; also clarify validity
6387         of calls to Corresponding_ Remote_Type (documentation fix).
6389 2014-07-16  Robert Dewar  <dewar@adacore.com>
6391         * gnat_rm.texi: Document illegal case of Unrestricted_Access.
6392         * sem_attr.adb (Analyze_Access_Attribute): Set_Non_Aliased_Prefix
6393         where it applies.
6394         (Resolve_Attribute, case Access): Flag illegal Unrestricted_Access use.
6395         * sinfo.ads, sinfo.adb (Non_Aliased_Prefix): New flag.
6397 2014-07-16  Robert Dewar  <dewar@adacore.com>
6399         * gnat_ugn.texi: Document binder switch -Ra.
6400         * gnatbind.adb (List_Closure_Display): Implement -Ra switch
6401         (List_Closure_All).
6402         * opt.ads (List_Closure_All): New switch.
6403         * switch-b.adb (Scan_Binder_Switches): Recognize -Ra to set
6404         List_Closure_All.
6406 2014-07-16  Ben Brosgol  <brosgol@adacore.com>
6408         * gnat_rm.texi: Minor edits, to make case consistent in names
6409         of types and fields.
6411 2014-07-16  Robert Dewar  <dewar@adacore.com>
6413         * gnat_rm.texi: Document erroneous mixing of thin pointers and
6414         unrestricted access
6415         * gnat_ugn.texi: Add note on size of access types about thin
6416         pointers and the use of attribute Unrestricted_Access.
6418 2014-07-16  Ed Schonberg  <schonberg@adacore.com>
6420         * a-cbdlli.ads, a-cbdlli.adb, a-cbhama.ads, a-cbhama.adb,
6421         * a-cbhase.ads, a-cbhase.adb, a-cborma.ads, a-cborma.adb,
6422         * a-cborse.ads, a-cborse.adb, a-cobove.ads a-cobove.adb: Add Control
6423         machinery to detect tampering on bounded vectors.
6425 2014-07-16  Robert Dewar  <dewar@adacore.com>
6427         * gnat_rm.texi: Document that leading/trailing asterisks are
6428         now implied for the pattern match string for pragma Warnings
6429         and Warning_As_Error.
6430         * sem_prag.adb (Acquire_Warning_Match_String): New procedure.
6431         (Analyze_Pragma, case Warning_As_Error): Call
6432         Acquire_Warning_Match_String.
6433         (Analyze_Pragma, case Warnings): Call Acquire_Warning_Match_String.
6435 2014-07-16  Bob Duff  <duff@adacore.com>
6437         * gnat_ugn.texi: Document need for project file
6438         for --incremental switch for gnat2xml.
6440 2014-07-16  Robert Dewar  <dewar@adacore.com>
6442         * gnat_rm.texi: Fix example of non-packable components in packed
6443         records section.
6445 2014-07-16  Robert Dewar  <dewar@adacore.com>
6447         * s-tpoben.adb, s-tasren.adb, s-interr.adb, s-interr-hwint.adb,
6448         s-shasto.adb, s-interr-vms.adb, s-interr-sigaction.adb: Avoid use of
6449         upper case in exception messages.
6451 2014-07-16  Robert Dewar  <dewar@adacore.com>
6453         * snames.ads-tmpl, sem_attr.adb, exp_attr.adb: Same_Storage attribute
6454         is renamed Has_Same_Storage.
6455         * gnat_rm.texi: Document missing SPARK pragmas and attributes.
6456         * sem_prag.adb: Minor comment fix (use LOCAL_NAME in syntax
6457         descriptions).
6459 2014-07-16  Robert Dewar  <dewar@adacore.com>
6461         * exp_util.adb, sem_attr.adb, exp_ch4.adb, a-cohase.ads,
6462         a-coinho-shared.adb, a-coinho-shared.ads: Minor reformatting.
6464 2014-07-16  Robert Dewar  <dewar@adacore.com>
6466         * gnat_ugn.texi: Add note that integrated
6467         preprocessing cannot be applied to configuration pragma files.
6469 2014-07-16  Yannick Moy  <moy@adacore.com>
6471         * sem_attr.adb (Analyze_Attribute/cases Pred
6472         and Succ): Always enable range check on fixed-point types if
6473         not suppressed for the type.
6475 2014-07-16  Hristian Kirtchev  <kirtchev@adacore.com>
6477         * sem_util.adb (State_Has_Enabled_Property):
6478         Account for an external property denoted by an others choice.
6480 2014-07-16  Hristian Kirtchev  <kirtchev@adacore.com>
6482         * exp_ch4.ads, exp_ch4.adb (Find_Hook_Context): Relocated to Exp_Util.
6483         * exp_ch7.adb (Process_Declarations): There is no need to check
6484         that a transient object being hooked is controlled as it would
6485         not have been hooked in the first place.
6486         * exp_ch9.adb Remove with and use clause for Exp_Ch4.
6487         * exp_util.adb (Find_Hook_Context): Relocated from Exp_Ch4.
6488         (Is_Aliased): A renaming of a transient controlled object is
6489         not considered aliasing when it occurs within an expression
6490         with actions.
6491         (Requires_Cleanup_Actions): There is no need to
6492         check that a transient object being hooked is controlled as it
6493         would not have been hooked in the first place.
6494         * exp_util.ads (Find_Hook_Context): Relocated from Exp_Ch4.
6496 2014-07-16  Hristian Kirtchev  <kirtchev@adacore.com>
6498         * sem_ch13.adb (Insert_After_SPARK_Mode): Moved to
6499         the outer level of routine Analyze_Aspect_Specifications. Ensure
6500         that the corresponding pragmas of aspects Initial_Condition and
6501         Initializes are inserted after pragma SPARK_Mode.
6503 2014-07-16  Ed Schonberg  <schonberg@adacore.com>
6505         * sem_attr.adb (Analyze_Attribute, case 'Update): Handle
6506         properly a choice list with more than one choice, where each
6507         is an aggregate denoting a sequence of array indices for a
6508         multidimentional array. For SPARK use.
6510 2014-07-16  Vadim Godunko  <godunko@adacore.com>
6512         * a-coinho-shared.adb (Adjust): Create
6513         copy of internal shared object and element when source container
6514         is locked.
6515         (Copy): Likewise.
6516         (Query_Element): Likewise.
6517         (Update_Element): Likewise.
6518         (Constant_Reference): Likewise. Raise Constraint_Error on attempt
6519         to get reference for empty holder.
6520         (Reference): Likewise.
6522 2014-07-16  Thomas Quinot  <quinot@adacore.com>
6524         * exp_ch4.adb (Find_Hook_Context): New subprogram, extracted
6525         from Process_Transient_Oject.
6526         * exp_ch4.ads: Ditto.
6527         * exp_ch9.adb (Build_Class_Wide_Master): Insert the _master
6528         declaration as an action on the topmost enclosing expression,
6529         not on a possibly conditional subexpreession.
6531 2014-07-16  Vadim Godunko  <godunko@adacore.com>
6533         * a-coinho.adb, a-coinho-shared.adb, a-coinho.ads, a-coinho-shared.ads:
6534         Fix parameter mode of Update_Element.
6536 2014-07-16  Robert Dewar  <dewar@adacore.com>
6538         * a-coinho.adb, a-coinho-shared.adb, a-coinho-shared.ads: Minor
6539         reformatting.
6541 2014-07-16  Ed Schonberg  <schonberg@adacore.com>
6543         * a-cohase.ads: Type Iterator must be controlled, so that the
6544         tampering bit is properly set through an iteration.
6545         * a-cohase.adb: Add Finalize operation for type Iterator.
6547 2014-07-16  Ed Schonberg  <schonberg@adacore.com>
6549         * a-coinho-shared.adb, a-coinho-shared.ads: Proper structures for
6550         tampering checks.
6552 2014-07-16  Ed Schonberg  <schonberg@adacore.com>
6554         * a-coinho-shared.adb: Fix spurious accessibility check.
6556 2014-06-15  Jan Hubicka  <hubicka@ucw.cz>
6558         * gcc-interface/utils.c (process_attributes): Use set_decl_tls_model.
6560 2014-06-14  Bernd Edlinger  <bernd.edlinger@hotmail.de>
6562         PR ada/61505
6563         * gnat_rm.texi: Fix errors with makeinfo 5.1.
6565 2014-06-14  Arnaud Charlet  <charlet@adacore.com>
6567         PR ada/61505
6568         * gnat_rm.texi: Attempt to fix error with makeinfo 5.1.
6570 2014-06-13  Yannick Moy  <moy@adacore.com>
6572         * exp_attr.adb: Fix typo in comment.
6573         * gnat1drv.adb (Adjust_Global_Switches): Force float overflow
6574         checking in GNATprove_Mode.
6576 2014-06-13  Ed Schonberg  <schonberg@adacore.com>
6578         * a-coinho-shared.adb, a-coinho-shared.ads: Update shared version.
6580 2014-06-13  Robert Dewar  <dewar@adacore.com>
6582         * sem_ch3.adb, sem_ch9.adb, a-coinho.adb, a-coinho.ads: Minor
6583         reformatting.
6585 2014-06-13  Hristian Kirtchev  <kirtchev@adacore.com>
6587         * sem_prag.adb (Analyze_Pragma): Add local
6588         variable Missing_Parentheses. Emit an error when a state
6589         declaration with options appears without parentheses. Add a
6590         guard to prevent a bogus error when a state declaration may be
6591         interpreted as an option if a previous declaration with options
6592         was not parenthesized.
6594 2014-06-13  Robert Dewar  <dewar@adacore.com>
6596         * checks.adb: Validate_Alignment_Check_Warnings: New procedure
6597         (Apply_Address_Clause_Check): Make Aligment_Warnings table entry.
6598         * checks.ads (Alignment_Warnings_Record): New type.
6599         (Alignment_Warnings): New table
6600         (Validate_Alignment_Check_Warnings): New procedure.
6601         * errout.adb (Delete_Warning_And_Continuations): New procedure
6602         (Error_Msg_Internal): Set Warning_Msg (Delete_Warning): Handle
6603         Warnings_Treated_As_Errors (Finalize): Minor reformatting
6604         * errout.ads (Warning_Msg): New variable
6605         (Delete_Warning_And_Continuations): New procedure
6606         * erroutc.adb (Delete_Msg): Handle Warnings_Treated_As_Errors count.
6607         * gnat1drv.adb (Post_Compilation_Validation_Checks): New procedure.
6609 2014-06-13  Ed Schonberg  <schonberg@adacore.com>
6611         * a-coinho.adb, a-coinho.ads: Add Reference machinery.
6613 2014-06-13  Hristian Kirtchev  <kirtchev@adacore.com>
6615         * errout.adb (SPARK_Msg_N): New routine.
6616         (SPARK_Msg_NE): New routine.
6617         * errout.ads Add a section on SPARK-related error routines.
6618         (SPARK_Msg_N): New routine.
6619         (SPARK_Msg_NE): New routine.
6620         * sem_ch13.adb (Analyze_Aspect_Specifications): Ensure that
6621         pragma Abstract_State is always inserted after SPARK_Mode.
6622         (Insert_After_SPARK_Mode): New routine.
6623         * sem_prag.adb (Analyze_Abstract_State,
6624         Analyze_Constituent, Analyze_External_Property,
6625         Analyze_External_Property_In_Decl_Part, Analyze_Global_Item,
6626         Analyze_Global_List, Analyze_Initialization_Item,
6627         Analyze_Initialization_Item_With_Inputs, Analyze_Input_Item,
6628         Analyze_Input_List, Analyze_Input_Output, Analyze_Part_Of,
6629         Analyze_Pragma, Analyze_Refined_Depends_In_Decl_Part,
6630         Analyze_Refined_Global_In_Decl_Part,
6631         Analyze_Refined_State_In_Decl_Part, Analyze_Refinement_Clause,
6632         Check_Aspect_Specification_Order, Check_Constituent_Usage,
6633         Check_Declaration_Order, Check_Dependency_Clause,
6634         Check_Duplicate_Mode, Check_Duplicate_Option,
6635         Check_Duplicate_Property, Check_External_Properties,
6636         Check_External_Property, Check_Function_Return,
6637         Check_Matching_Constituent, Check_Matching_State,
6638         Check_Mode_Restriction_In_Enclosing_Context,
6639         Check_Mode_Restriction_In_Function, Check_Refined_Global_Item,
6640         Check_State_And_Constituent_Use, Create_Or_Modify_Clause,
6641         Has_Extra_Parentheses, Inconsistent_Mode_Error,
6642         Match_Error, Propagate_Part_Of, Report_Extra_Clauses,
6643         Report_Extra_Constituents_In_List, Report_Extra_Inputs,
6644         Report_Unrefined_States, Report_Unused_Constituents,
6645         Report_Unused_States, Role_Error, Usage_Error):
6646         Convert Error_Msg_XXX calls to SPARK_Msg_XXX calls
6647         to report semantic errors only when SPARK_Mode is on.
6648         (Analyze_Depends_In_Decl_Part): Do not check the syntax of
6649         pragma Depends explicitly, this is now done by the analysis.
6650         (Analyze_Global_In_Decl_List): Do not check the syntax of
6651         pragma Global explicitly, this is now done by the analysis.
6652         (Analyze_Initializes_In_Decl_Part): Do not check the syntax of
6653         pragma Initializes explicitly, this is now done by the analysis.
6654         (Analyze_Part_Of): Do not check the syntax of the encapsulating
6655         state, this is now done by the analysis.
6656         (Analyze_Pragma): Do
6657         not check the syntax of a state declaration, this is now done
6658         by the analysis.
6659         (Analyze_Refined_Depends_In_Decl_Part): Do not
6660         check the syntax of pragma Refined_Depends explicitly, this is now
6661         done by the analysis.
6662         (Analyze_Refined_Global_In_Decl_Part): Do
6663         not check the syntax of pragma Refined_Global explicitly, this is
6664         now done by the analysis.
6665         (Analyze_Refined_State_In_Decl_Part):
6666         Do not check the syntax of pragma Refined_State explicitly, this
6667         is now done by the analysis.
6668         (Check_Dependence_List_Syntax): Removed.
6669         (Check_Global_List_Syntax): Removed.
6670         (Check_Initialization_List_Syntax): Removed.
6671         (Check_Item_Syntax): Removed.
6672         (Check_Missing_Part_Of): Do not consider items from an instance.
6673         (Check_Refinement_List_Syntax): Removed.
6674         (Check_State_Declaration_Syntax): Removed.
6675         (Collect_Global_List): Do not raise Program_Error when the input is
6676         malformed.
6677         (Process_Global_List): Do not raise Program_Error when the input
6678         is malformed.
6679         * sem_ch13.adb: Minor reformatting.
6681 2014-06-13  Ed Schonberg  <schonberg@adacore.com>
6683         * sem_ch3.adb (Find_Type_Name): Diagnose a private type completion
6684         that is an interface definition with an interface list.
6685         (Process_Full_View): Move error message on missmatched interfaces
6686         between views to the declaration of full view, for clarity.
6687         * sem_ch9.adb (Check_Interfaces): Move error message to full view,
6688         for clarity.
6690 2014-06-13  Robert Dewar  <dewar@adacore.com>
6692         * exp_attr.adb (Expand_N_Attribute_Reference, case Pred/Succ): Change
6693         reason to Overflow.
6695 2014-06-13  Robert Dewar  <dewar@adacore.com>
6697         * makeutl.adb: Minor reformatting.
6699 2014-06-13  Gail Schenker  <schenker@adacore.com>
6701         * debug.adb, sem_eval.adb (Why_Not_Static): Remove temporary code and
6702         associated flag (d.z), no longer needed.
6704 2014-06-13  Ed Schonberg  <schonberg@adacore.com>
6706         * sem_ch13.adb (Analyze_Aspect_Specifications): For Import and
6707         Export aspects, do not check whether a corresponding Convention
6708         aspect has been specified. Convention is optional in Ada2012,
6709         and defaults to Convention_Ada.
6711 2014-06-13  Eric Botcazou  <ebotcazou@adacore.com>
6713         * checks.adb (Apply_Address_Clause_Check): Only issue the new
6714         warning if the propagation warning is issued.
6716 2014-06-13  Thomas Quinot  <quinot@adacore.com>
6718         * exp_ch4.adb: Minor reformatting.
6720 2014-06-13  Robert Dewar  <dewar@adacore.com>
6722         * exp_attr.adb (Expand_N_Attribute_Reference, case Pred):
6723         Handle float range check case (Expand_N_Attribute_Reference,
6724         case Succ): Handle float range check case.
6725         * sem_attr.adb (Analyze_Attribute, case Pred/Succ): Handle float
6726         range check case.
6728 2014-06-13  Vincent Celier  <celier@adacore.com>
6730         * makeutl.ads (Compute_Builder_Switches): Change name of
6731         parameter Root_Environment to Env.
6732         * prj-conf.adb (Check_Switches): Call Locate_Runtime with the
6733         Env parameter of procedure Get_Or_Create_Configuration_File.
6734         (Locate_Runtime): Call Find_Rts_In_Path with the Project_Path
6735         of new parameter Env.
6736         * prj-conf.ads (Locate_Runtime): New parameter Env of type
6737         Prj.Tree.Environment.
6739 2014-06-13  Robert Dewar  <dewar@adacore.com>
6741         * gnat_rm.texi: Minor comment clarification for Check_Float_Overflow.
6743 2014-06-13  Robert Dewar  <dewar@adacore.com>
6745         * exp_attr.adb, exp_ch9.adb, lib-writ.adb, g-comlin.adb: Minor
6746         reformatting.
6747         * sem_attr.adb: Minor code reformatting and simplification.
6748         * checks.adb: Fix minor typo.
6750 2014-06-13  Emmanuel Briot  <briot@adacore.com>
6752         * g-comlin.adb (Get_Argument): fix expansion
6753         of command line arguments (e.g. "*.adb") when using a custom
6754         parser. The parser was not passed to the recursive call, and
6755         thus we were trying to do the expansion on the default command
6756         line parser.
6758 2014-06-13  Thomas Quinot  <quinot@adacore.com>
6760         * exp_ch9.adb: Minor reformatting.
6762 2014-06-13  Ed Schonberg  <schonberg@adacore.com>
6764         * exp_attr.adb (Expand_N_Attribute_Reference, case 'Old):
6765         To determine whether the attribute should be expanded, examine
6766         whether the enclosing postcondition pragma is to be checked,
6767         rather than using the internal flag Assertions_Enabled.
6769 2014-06-13  Ben Brosgol  <brosgol@adacore.com>
6771         * gnat_rm.texi: Minor fixes.
6772         * gnat_ugn.texi: Added a missing "@itemize".
6774 2014-06-13  Robert Dewar  <dewar@adacore.com>
6776         * debug.adb: Remove -gnatd.1 flag documentation.
6777         * layout.adb (Layout_Type): Remove special handling of size
6778         for anonymous access type.
6779         * sem_ch3.adb (Replace_Type): Remove special handling of size
6780         for anonymous access type.
6782 2014-06-13  Robert Dewar  <dewar@adacore.com>
6784         * debug.adb: Document debug flag -gnatd.1.
6785         * layout.adb (Layout_Type): Size change for anonymous access
6786         types under -gnatd.1.
6787         * sem_ch3.adb (Replace_Type): Size change for anonymous access
6788         types under -gnatd.1.
6790 2014-06-13  Robert Dewar  <dewar@adacore.com>
6792         * layout.adb (Layout_Type): Anonymous access types designating
6793         unconstrained arrays are always thin pointers.
6794         * sem_ch3.adb (Replace_Type): Anonymous access types designating
6795         unconstrained arrays are always thin pointers.
6797 2014-06-13  Ed Schonberg  <schonberg@adacore.com>
6799         * sem_attr.adb (Analyze_Attribute): Use Check_Parameterless_Call
6800         to resolve the prefix of an attribute that is an entity name
6801         and may be a parameterless call.  Minor code reorganization.
6803 2014-06-13  Robert Dewar  <dewar@adacore.com>
6805         * lib.ads, lib.adb, lib-writ.adb, lib-load.adb (Is_Compiler_Unit):
6806         Removed.
6807         * opt.ads (Compiler_Unit): New flag.
6808         * par-ch5.adb (Test_Statement_Required): Call Check_Compiler_Unit
6809         for null statement sequence (not allowed in compiler unit).
6810         * par-prag.adb (Prag): Handle Compiler_Unit[_Warning] during
6811         parsing.
6812         * restrict.ads, restrict.adb (Check_Compiler_Unit): New version and new
6813         calling sequence.
6814         * sem_ch11.adb, sem_ch3.adb, sem_ch4.adb: New calling sequence for
6815         Check_Compiler_Unit.
6816         * sem_ch6.adb (Analyze_Extended_Return_Statement): Call
6817         Check_Compiler_Unit (this construct is not allowed in compiler
6818         units).
6819         * sem_prag.adb (Analyze_Pragma, case Compiler_Unit[_Warning]):
6820         Set Opt.Compiler_Unit.
6822 2014-06-13  Geert Bosch  <bosch@adacore.com>
6824         * gnat_rm.texi, s-tasinf-solaris.ads, sem_prag.adb, gnat_ugn.texi,
6825         s-tasinf-mingw.ads, s-tasinf.ads, s-tasinf-linux.ads,
6826         s-tasinf-vxworks.ads: Make Task_Info pragma and package obsolescent.
6828 2014-06-13  Robert Dewar  <dewar@adacore.com>
6830         * s-tasini.adb, s-tarest.adb, s-taprob.adb: Minor reformatting.
6832 2014-06-13  Hristian Kirtchev  <kirtchev@adacore.com>
6834         * freeze.adb (Freeze_Entity): Remove the check concerning volatile
6835         types in SPARK as it is poorly placed and poorly formulated. The
6836         check was flagging ALL volatile entities as illegal in SPARK.
6837         * sem_prag.adb (Process_Atomic_Shared_Volatile): Flag volatile
6838         types as illegal in SPARK.
6840 2014-06-13  Robert Dewar  <dewar@adacore.com>
6842         * sem_cat.adb: Minor reformatting.
6844 2014-06-13  Yannick Moy  <moy@adacore.com>
6846         * sem_prag.adb (Analyze_Pragma/Post_Class): Fix typo.
6848 2014-06-13  Arnaud Charlet  <charlet@adacore.com>
6850         * gnat_rm.texi: Add detail on SPARK_05 restriction.
6852 2014-06-13  Bob Duff  <duff@adacore.com>
6854         * s-solita.adb (Get_Sec_Stack_Addr, Init_Tasking_Soft_Links):
6855         Add assertions requiring the secondary stack to be initialized.
6856         * s-solita.ads (Init_Tasking_Soft_Links): Comment.
6857         * s-taprob.adb, s-tarest.adb, s-tasini.adb (elab code): Make sure the
6858         secondary stack is initialized before calling Init_Tasking_Soft_Links,
6859         by adding pragmas Elaborate_Body.
6861 2014-06-13  Thomas Quinot  <quinot@adacore.com>
6863         * sem_ch13.adb (Analyze_Stream_TSS_Definition): Remove temporary
6864         kludge disabling new legality check.
6866 2014-06-13  Hristian Kirtchev  <kirtchev@adacore.com>
6868         * freeze.adb (Freeze_Record_Type): Remove checks related to SPARK
6869         volatile types.
6870         (Freeze_Type): Volatile types are now illegal in SPARK.
6872 2014-06-13  Robert Dewar  <dewar@adacore.com>
6874         * aspects.ads, aspects.adb: Add aspect Thread_Local_Storage.
6875         * gnat_rm.texi: Document aspect Thread_Local_Storage.
6877 2014-06-13  Ed Schonberg  <schonberg@adacore.com>
6879         * sem_cat.adb (Validate_Static_Object_Name): A constant whose
6880         value is a temporary that renames an aggregate is legal in a
6881         preelaborated unit. Illegalities, if any will be detected in
6882         the aggregate components.
6884 2014-06-13  Ed Schonberg  <schonberg@adacore.com>
6886         * einfo.ads: Minor reformatting an comment expansion.
6888 2014-06-13  Robert Dewar  <dewar@adacore.com>
6890         * back_end.ads, back_end.adb: Make_Id, Make_SC, Set_RND are moved to
6891         Tbuild.
6892         * tbuild.ads, tbuild.adb: Make_Id, Make_SC, Set_RND are moved here from
6893         Back_End.
6894         * gnat1drv.adb: Make_Id, Make_SC, Set_RND are moved to Tbuild
6895         * sem_warn.adb: Minor reformatting.
6897 2014-06-13  Doug Rupp  <rupp@adacore.com>
6899         * adaint.c (__gnat_open_new_temp) [VMS]: Open binary
6900         files with rfm=udf.
6902 2014-06-13  Yannick Moy  <moy@adacore.com>
6904         * sem_warn.adb (Check_Unset_References): Take
6905         case of Refined_Post into account in Within_Postcondition check.
6907 2014-06-13  Hristian Kirtchev  <kirtchev@adacore.com>
6909         * freeze.adb (Freeze_Record_Type): Volatile types are not allowed in
6910         SPARK.
6912 2014-06-13  Yannick Moy  <moy@adacore.com>
6914         * sem_ch13.adb (Analyze_Aspect_Specifications/Aspect_Import,
6915         Aspect_Export): Consider that variables may be set outside the program.
6917 2014-06-13  Robert Dewar  <dewar@adacore.com>
6919         * back_end.adb (Make_Id): New function.
6920         (Make_SC): New function.
6921         (Set_RND): New procedure.
6922         * back_end.ads (Make_Id): New function.
6923         (Make_SC): New function.
6924         (Set_RND): New procedure.
6925         * einfo.ads: Minor comment updates.
6926         * frontend.adb: Move Atree.Initialize call to Gnat1drv.
6927         * gnat1drv.adb (Gnat1drv): New calling sequence for
6928         Get_Target_Parameters.
6929         (Gnat1drv): Move Atree.Initialize here from Frontend.
6930         * targparm.adb (Get_Target_Parameters): New calling
6931         sequence (Get_Target_Parameters): Handle pragma Restriction
6932         (No_Dependence,..)
6933         * targparm.ads (Get_Target_Parameters): New calling sequence.
6935 2014-06-13  Gary Dismukes  <dismukes@adacore.com>
6937         * sem_prag.adb (Process_Import_Or_Interface): Exit the homonym
6938         loop if the pragma does not come from source, so that an implicit
6939         pragma Import only applies to the first declaration, avoiding
6940         possible conflicts with earlier explicit and implicit declarations
6941         due to multiple Provide_Shift_Operators pragmas.
6942         (Set_Imported): Remove previous fix that bypassed pragma duplication
6943         error.
6944         * gnat_rm.texi: Change 'equivalent' to 'similar' in description
6945         of Provide_Shift_Operators.
6947 2014-06-12  Jan Hubicka  <hubicka@ucw.cz>
6949         * gcc-interface/utils.c (process_attributes) <ATTR_LINK_SECTION>: Pass
6950         string pointer directly to set_decl_section_name.
6952 2014-06-11  Robert Dewar  <dewar@adacore.com>
6954         * sem_ch13.adb: Minor reformatting.
6956 2014-06-11  Hristian Kirtchev  <kirtchev@adacore.com>
6958         * sem_prag.adb (Check_Clause_Syntax): Add new
6959         local variable Outputs. Account for the case where multiple
6960         output items appear as an aggregate.
6962 2014-06-11  Robert Dewar  <dewar@adacore.com>
6964         * sem_warn.adb (Output_Obsolescent_Entity_Warnings): Tag warning
6965         with ?j? not ??.
6967 2014-06-11  Ed Schonberg  <schonberg@adacore.com>
6969         * einfo.ads: Minor reformatting.
6971 2014-06-11  Hristian Kirtchev  <kirtchev@adacore.com>
6973         * a-cbdlli.adb, a-cdlili.adb, a-cidlli.adb, a-crdlli.adb (Insert): Add
6974         new variable First_Node. Update the position after all insertions have
6975         taken place to First_Node.
6977 2014-06-11  Robert Dewar  <dewar@adacore.com>
6979         * debug.adb: Remove debug flag -gnatd.1, no longer needed.
6980         * layout.adb (Layout_Type): Remove test of -gnatd.1.
6982 2014-06-11  Robert Dewar  <dewar@adacore.com>
6984         * sem_ch13.adb: Minor reformatting.
6986 2014-06-11  Hristian Kirtchev  <kirtchev@adacore.com>
6988         * sem_prag.adb (Check_Clause_Syntax): Add new
6989         local variable Outputs. Account for the case where multiple
6990         output items appear as an aggregate.
6992 2014-06-11  Robert Dewar  <dewar@adacore.com>
6994         * sem_warn.adb (Output_Obsolescent_Entity_Warnings): Tag warning
6995         with ?j? not ??.
6997 2014-06-11  Ed Schonberg  <schonberg@adacore.com>
6999         * einfo.ads: Minor reformatting.
7001 2014-06-11  Hristian Kirtchev  <kirtchev@adacore.com>
7003         * a-cbdlli.adb, a-cdlili.adb, a-cidlli.adb, a-crdlli.adb (Insert): Add
7004         new variable First_Node. Update the position after all insertions have
7005         taken place to First_Node.
7007 2014-06-11  Robert Dewar  <dewar@adacore.com>
7009         * debug.adb: Remove debug flag -gnatd.1, no longer needed.
7010         * layout.adb (Layout_Type): Remove test of -gnatd.1.
7012 2014-06-11  Thomas Quinot  <quinot@adacore.com>
7014         * freeze.ads: Minor reformatting.
7015         * checks.adb (Determine_Range): Do not attempt to determine
7016         the range of a deferred constant whose full view has not been
7017         seen yet.
7018         * sem_res.adb (Resolve): Remove undesirable guard against
7019         resolving expressions from expression functions.
7021 2014-06-11  Robert Dewar  <dewar@adacore.com>
7023         * debug.adb (Debug_Flag_Dot_1): Set to enable fix for anonymous
7024         access types.
7025         * layout.adb (Layout_Type): Make anonymous access types for
7026         subprogram formal types and return types always thin. For now
7027         only enabled if -gnatd.1 set.
7029 2014-06-11  Ed Schonberg  <schonberg@adacore.com>
7031         * sem_ch13.adb (Analyze_Stream_TSS_Definition): Apply legality
7032         rule for stream attributes of interface types (RM 13.13.2 (38/3)):
7033         subprogram must be a null procedure.
7035 2014-06-11  Hristian Kirtchev  <kirtchev@adacore.com>
7037         * sem_prag.adb (Analyze_Input_Item): Allow formal
7038         parameters to appear as input_items in an initialization_list
7039         of pragma Initializes. Encapsulation now applies to states and
7040         variables only (as it should). Add RM references to key errors.
7041         * sem_prag.adb (Set_Imported): Suppress errors
7042         about preceding Imports when the pragma does not come from source,
7043         which can happen through use of pragma Provide_Shift_Operators.
7045 2014-06-11  Thomas Quinot  <quinot@adacore.com>
7047         * sem_ch3.adb: Minor reformatting.
7048         * einfo.ads (Full_View): Minor comment update.
7050 2014-06-11  Robert Dewar  <dewar@adacore.com>
7052         * einfo.adb (Is_Independent): New flag.
7053         * einfo.ads (Is_Independent): New flag.
7054         (Has_Independent_Components): Clean up and fix comments.
7055         * sem_prag.adb (Fix_Error): Deal with changing argument
7056         [of] to entity [for].
7057         (Analyze_Pragma, case Independent): Set Is_Independent flag
7058         (Analyze_Pragma, case Independent_Components): Set Is_Independent flag
7059         in all components of specified record.
7061 2014-06-11  Thomas Quinot  <quinot@adacore.com>
7063         * sem_ch12.adb (Analyze_Formal_Decimal_Fixed_Point_Type):
7064         Set proper Etype on bounds of dummy type created for analysis
7065         of the generic.
7067 2014-06-11  Robert Dewar  <dewar@adacore.com>
7069         * debug.adb: Minor comment fix (add missing section of dot
7070         numeric flags).
7072 2014-06-11  Robert Dewar  <dewar@adacore.com>
7074         * gnat_rm.texi, switch-c.adb, sem_prag.adb, a-tgdico.ads, par-prag.adb,
7075         opt.ads, a-finali.ads, snames.ads-tmpl: Remove all traces of
7076         pragma/aspects Pure_05 Pure_12 Preelaborate_05.
7077         * errout.adb (Output_Messages): Avoid duplicate output for
7078         library level instance.
7079         * sem_elab.adb (Is_Call_Of_Generic_Formal): Moved to outer level
7080         (Check_Elab_Call): Add call to Is_Call_Of_Generic_Formal
7081         * exp_ch4.adb (Expand_N_Op_Expon): New interface for Exp_Modular.
7082         * s-expmod.ads, s-expmod.adb (Exp_Modular): Change interface to
7083         accomodate largest modulus value.
7084         * gnat_ugn.texi: Minor updates.
7086 2014-06-11  Ed Schonberg  <schonberg@adacore.com>
7088         * sem_ch12.adb (Instantiate_Package_Body): Do not attempt to
7089         load body of generic package or its parent, if body is optional
7090         and the unit does not require a body.
7092 2014-06-11  Robert Dewar  <dewar@adacore.com>
7094         * gnat_rm.texi: Document System.Unsigned_Types.
7095         * impunit.adb: System.Unsigned_Types (s-unstyp.ads) is user accessible.
7096         * s-unstyp.ads: Update comments (this is now user available unit).
7098 2014-06-11  Robert Dewar  <dewar@adacore.com>
7100         * make.adb, sem_res.adb: Minor reformatting.
7102 2014-06-11  Thomas Quinot  <quinot@adacore.com>
7104         * a-astaco.ads, a-tags.ads, s-excdeb.ads, a-tgdico.ads, a-stmaco.ads,
7105         a-except-2005.ads, s-except.ads, a-taside.ads, a-dynpri.ads,
7106         a-chahan.ads, a-sytaco.ads, s-stalib.ads, a-strmap.ads: Change pragmas
7107         Preelaborate_05 to just Preelaborate in runtime units, and similarly
7108         change Pure_05 to just Pure.
7110 2014-06-11  Ed Schonberg  <schonberg@adacore.com>
7112         * sem_ch6.adb (Analyze_Subprogram_Body_Contract): Do not attempt
7113         analysis if error has been posted on subprogram body.
7115 2014-06-11  Ed Schonberg  <schonberg@adacore.com>
7117         * sem_ch13.adb (Analyze_Stream_TSS_Definition): Apply legality
7118         rule given in RM 13.1 (8/1) for operational attributes to stream
7119         attributes: the attribute must apply to a first subtype. Fixes
7120         missing errors in ACATS test bdd2004.
7122 2014-06-11  Robert Dewar  <dewar@adacore.com>
7124         * exp_ch3.adb (Build_Record_Init_Proc): Don't build for variant
7125         record type if restriction No_Implicit_Conditionals is active.
7126         (Expand_N_Object_Declaration): Don't allow default initialization
7127         for variant record type if restriction No_Implicit_Condition is active.
7128         (Build_Variant_Record_Equality): Don't build for variant
7129         record type if restriction No_Implicit_Conditionals is active.
7130         * exp_ch4.adb (Expand_N_Op_Eq): Error if variant records with
7131         No_Implicit_Conditionals.
7132         * sem_aux.ads, sem_aux.adb (Has_Variant_Part): New function.
7134 2014-06-11  Ramon Fernandez  <fernandez@adacore.com>
7136         * i-cstrin.ads: Update comments.
7138 2014-06-11  Ed Schonberg  <schonberg@adacore.com>
7140         * sem_res.adb (Resolve_Selected_Component): Handle properly a
7141         selected component whose prefix is overloaded, when none of the
7142         interpretations matches the expected type.
7144 2014-06-11  Bob Duff  <duff@adacore.com>
7146         * make.adb (Wait_For_Available_Slot): Give a more
7147         informative error message; if the ALI file is not found, print
7148         the full path of what it's looking for.
7150 2014-06-11  Sergey Rybin  <rybin@adacore.com frybin>
7152         * gnat_ugn.texi, vms_data.ads: add description of gnatstub -W<par>
7153         option to specify the result file encoding.
7155 2014-06-11  Robert Dewar  <dewar@adacore.com>
7157         * errout.ads, sem_ch12.adb: Minor reformatting.
7158         * debug.adb, erroutc.adb: Remove -gnatd.q debug switch.
7159         * lib-xref.adb: Minor reformatting.
7160         * restrict.adb: Minor code reorganization (put routines in
7161         alpha order).
7163 2014-06-11  Yannick Moy  <moy@adacore.com>
7165         * einfo.ads: Minor typo in comment
7167 2014-06-11  Ed Schonberg  <schonberg@adacore.com>
7169         * sinfo.ads, sinfo.adb: New attribute Uninitialized_Variable, for
7170         formal private types and private type extensions, to indicate
7171         variable in a generic unit whose uninitialized use suggest that
7172         actual type should be fully initialized.
7173         Needs_Initialized_Actual:  removed, functionaity replaced by
7174         the above.
7175         * lib-xref.adb (Generate_Reference): Generate a reference for
7176         variables of a formal type when the unit is not the main unit,
7177         to enable appropriate warnings in an instance.
7178         * sem_ch12.adb (Check_Ininialized_Type): Improve warning on use
7179         of variable in a generic unit that suggests that actual type
7180         should be full initialized.
7181         * sem_warn.adb; (May_Need_Initialized_Actual): Make into procedure
7182         and do not emot warning, which now only appears in an instance.
7184 2014-06-11  Eric Botcazou  <ebotcazou@adacore.com>
7186         * gnat_ugn.texi: Fix minor typo.
7188 2014-06-11  Hristian Kirtchev  <kirtchev@adacore.com>
7190         * sem_ch3.adb Add with and use clause for Sem_Ch10.
7191         (Analyze_Declarations): Code reformatting. Analyze the contract
7192         of a subprogram body stub at the end of the declarative region.
7193         * sem_ch6.adb (Analyze_Subprogram_Body_Contract): Spec_Id is
7194         now a variable. Do not process the body if its contract is not
7195         available. Account for subprogram body stubs when extracting
7196         the corresponding spec.
7197         * sem_ch6.ads (Analyze_Subprogram_Contract): Update the comment
7198         on usage.
7199         * sem_ch10.ads, sem_ch10.adb (Analyze_Subprogram_Body_Stub_Contract):
7200         New routine.
7201         * sem_prag.adb (Analyze_Depends_In_Decl_Part):
7202         Account for subprogram body stubs when extracting the
7203         corresponding spec.
7204         (Analyze_Global_In_Decl_List):
7205         Account for subprogram body stubs when extracting the
7206         corresponding spec.
7207         (Analyze_Refined_Depends_In_Decl_Part):
7208         Use Find_Related_Subprogram_Or_Body to retrieve the declaration
7209         of the related body. Spec_Is now a variable. Account for
7210         subprogram body stubs when extracting the corresponding spec.
7211         (Analyze_Refined_Global_In_Decl_Part): Use
7212         Find_Related_Subprogram_Or_Body to retrieve the declaration
7213         of the related body. Spec_Is now a variable. Account for
7214         subprogram body stubs when extracting the corresponding spec.
7215         (Collect_Subprogram_Inputs_Output): Account for subprogram body
7216         stubs when extracting the corresponding spec.
7218 2014-06-11  Vincent Celier  <celier@adacore.com>
7220         * gnatcmd.adb (Process_Link): Do not invoke gnatlink with
7221         -lgnarl or -lgnat.
7223 2014-06-11  Robert Dewar  <dewar@adacore.com>
7225         * debug.adb: Add debug flag -gnatd.q.
7226         * erroutc.adb (Prescan_Message): Bomb if untagged warning with
7227         -gnatd.q set.
7228         * styleg.adb (Check_Xtra_Parens): Message should be a style
7229         message.
7230         * sem_aggr.adb, sem_ch3.adb, exp_ch9.adb, checks.adb, sem_prag.adb,
7231         par-endh.adb, eval_fat.adb, freeze.adb, sem_util.adb, sem_attr.adb,
7232         sem_elab.adb, sem_ch6.adb, sem_warn.adb, sem_cat.adb,
7233         sem_ch13.adb, lib-xref.adb: Add remaining warning tags.
7235 2014-06-11  Ben Brosgol  <brosgol@adacore.com>
7237         * gnat_rm.texi: Revised chapter on Implementation Defined
7238         Characteristics.
7240 2014-06-11  Geert Bosch  <bosch@adacore.com>
7242         * s-exctab.adb: avoid race conditions in exception registration.
7244 2014-06-11  Robert Dewar  <dewar@adacore.com>
7246         * errout.adb (Warn_Insertion): New function.
7247         (Error_Msg): Use Warn_Insertion and Prescan_Message.
7248         (Error_Msg_Internal): Set Info field of error object.
7249         (Error_Msg_NEL): Use Prescan_Message.
7250         (Set_Msg_Text): Don't store info: at start of message.
7251         (Skip_Msg_Insertion_Warning): New name for Set_Msg_Insertion_Warning.
7252         (Skip_Msg_Insertion_Warning): Now just skips warning insertion.
7253         * errout.ads: Document new ?$? and >$> insertion sequences
7254         Document use of "(style)" and "info: "
7255         * erroutc.adb (dmsg): Print several missing fields
7256         (Get_Warning_Tag): Handle -gnatel case (?$?)  (Output_Msg_Text):
7257         Deal with new tagging of info messages
7258         * erroutc.ads: Is_Info_Msg: New global (Error_Msg_Object):
7259         Add field Info (Prescan_Message): New procedure, this procedure
7260         replaces the old Test_Style_Warning_Serious_Unconditional_Msg
7261         * errutil.adb, exp_util.adb, par-ch7.adb, sem_ch13.adb, sem_ch7.adb,
7262         sem_elab.adb: Follow new rules for info message (info belongs
7263         only at the start of a message, and only in the first message,
7264         not in any of the continuations).
7265         * gnat_ugn.texi: Document full set of warning tags.
7267 2014-06-11  Gary Dismukes  <dismukes@adacore.com>
7269         * sem_util.adb: Minor typo fix.
7271 2014-06-11  Ed Schonberg  <schonberg@adacore.com>
7273         * sem_warn.adb (Check_References): Do not emit spurious warnings
7274         on uninitialzed variable of a formal private type if variable
7275         is not read.
7277 2014-06-09  Jan Hubicka  <hubicka@ucw.cz>
7279         * gcc-interface/utils.c (process_attributes) <ATTR_LINK_SECTION>: Use
7280         set_decl_section_name accessor.
7282 2014-05-22  Thomas Schwinge  <thomas@codesourcery.com>
7284         * gcc-interface/utils.c (DEF_FUNCTION_TYPE_0, DEF_FUNCTION_TYPE_6)
7285         (DEF_FUNCTION_TYPE_7, DEF_FUNCTION_TYPE_8)
7286         (DEF_FUNCTION_TYPE_VAR_5): Cosmetic fixes.
7288 2014-05-21  Robert Dewar  <dewar@adacore.com>
7290         * layout.adb: Minor reformatting.
7291         * sem_prag.adb (Analyze_Pragma, case Inspection_Point): Call
7292         dummy procedure ip.
7294 2014-05-21  Robert Dewar  <dewar@adacore.com>
7296         * restrict.ads (Implementation_Restriction): Add entry for
7297         No_Fixed_IO.
7298         * rtsfind.ads: Add entries for Fixed_IO and Decimal_IO in
7299         Ada.[Wide_[Wide_]Text_IO.
7300         * s-rident.ads (Restriction_Id): Add entry for No_Fixed_IO.
7301         * sem_attr.adb (Analyze_Attribute): Disallow fixed point types
7302         for Img, Image, Value, Wide_Image, Wide_Value, Wide_Wide_Image,
7303         Wide_Wide_Value if restriction No_Fixed_IO is set.
7304         * sem_util.adb (Set_Entity_Checks): Check restriction No_Fixed_IO.
7306 2014-05-21  Robert Dewar  <dewar@adacore.com>
7308         * gnatcmd.adb: Minor error msg changes (no upper case letter
7309         at start).
7310         * sem_ch12.adb, sem_ch5.adb, sem_res.adb, sem_util.adb: Minor
7311         reformatting.
7313 2014-05-21  Robert Dewar  <dewar@adacore.com>
7315         * debug.adb: Debug flag -gnatd.G inhibits static elab tracing
7316         via generic formals.
7317         * sem_elab.adb (Is_Call_Of_Generic_Formal): Return False if
7318         -gnatd.G is set.
7320 2014-05-21  Thomas Quinot  <quinot@adacore.com>
7322         * exp_pakd.adb (Revert_Storage_Order): Renamed from Byte_Swap to
7323         more accurately describe that this subprogram needs to come into
7324         play also in cases where no byte swapping is involved, because
7325         it also takes care of some required shifts (left-justification
7326         of values).
7328 2014-05-21  Thomas Quinot  <quinot@adacore.com>
7330         * freeze.adb (Check_Component_Storage_Order): Indicate whether
7331         a Scalar_Storage_Order attribute definition is present for the
7332         component's type.
7333         (Freeze_Record_Type): Suppress junk warnings
7334         about purportedly junk Bit_Order / Scalar_Storage_Order attribute
7335         definitions.
7337 2014-05-21  Robert Dewar  <dewar@adacore.com>
7339         * sem_ch8.adb (Analyze_Subprogram_Renaming): Put back call
7340         to Kill_Elaboration_Checks.
7342 2014-05-21  Gary Dismukes  <dismukes@adacore.com>
7344         * layout.adb (Assoc_Add): Suppress the optimization of the (E
7345         - C1) + C2 case, when the expression type is unsigned and C1 <
7346         C2, to avoid creating a negative literal when folding.
7348 2014-05-21  Hristian Kirtchev  <kirtchev@adacore.com>
7350         * freeze.adb (Freeze_Record_Type): Update the use of
7351         Is_SPARK_Volatile.
7352         * sem_ch3.adb (Analyze_Object_Contract): Update the use of
7353         Is_SPARK_Volatile.
7354         (Process_Discriminants): Update the use of Is_SPARK_Volatile.
7355         * sem_ch5.adb (Analyze_Iterator_Specification): Update the use
7356         of Is_SPARK_Volatile.
7357         (Analyze_Loop_Parameter_Specification):
7358         Update the use of Is_SPARK_Volatile.
7359         * sem_ch6.adb (Process_Formals): Catch an illegal use of an IN
7360         formal parameter when its type is volatile.
7361         * sem_prag.adb (Analyze_Global_Item): Update the use of
7362         Is_SPARK_Volatile.
7363         * sem_res.adb (Resolve_Entity_Name): Correct the guard which
7364         determines whether an entity is a volatile source SPARK object.
7365         * sem_util.adb (Has_Enabled_Property): Accout for external
7366         properties being set on objects other than abstract states
7367         and variables. An example would be a formal parameter.
7368         (Is_SPARK_Volatile): New routine.
7369         (Is_SPARK_Volatile_Object):
7370         Remove the entity-specific tests. Call routine Is_SPARK_Volatile
7371         when checking entities and/or types.
7372         * sem_util.ads (Is_SPARK_Volatile): New routine.
7374 2014-05-21  Robert Dewar  <dewar@adacore.com>
7376         * sem_warn.adb: Minor fix to warning messages (use ?? instead
7377         of ?).
7379 2014-05-21  Vincent Celier  <celier@adacore.com>
7381         * gnatcmd.adb (GNATCmd): For platforms other than VMS, recognize
7382         switch --version and --help.
7384 2014-05-21  Robert Dewar  <dewar@adacore.com>
7386         * sem_elab.adb (Is_Call_Of_Generic_Formal): New function.
7388 2014-05-21  Ed Schonberg  <schonberg@adacore.com>
7390         * sem_ch5.adb (Analyze_Iterator_Specification): Set type of
7391         iterator variable when the domain of iteration is a formal
7392         container and this is an element iterator.
7394 2014-05-21  Bob Duff  <duff@adacore.com>
7396         * sem_ch12.adb: Minor reformatting.
7398 2014-05-21  Robert Dewar  <dewar@adacore.com>
7400         * sinfo.ads, sem_ch12.adb, sem_warn.adb: Minor reformatting.
7402 2014-05-21  Robert Dewar  <dewar@adacore.com>
7404         * sem_elab.adb: Minor reformatting.
7405         * s-taprop.ads: Minor comment fix.
7406         * sem_ch8.adb (Analyze_Subprogram_Renaming): Remove call to
7407         Kill_Elaboration_Checks.
7408         * errout.adb, erroutc.adb: Minor reformatting.
7410 2014-05-21  Thomas Quinot  <quinot@adacore.com>
7412         * exp_pakd.adb (Byte_Swap): Handle the case of a sub-byte
7413         component. No byte swapping occurs, but this procedure also takes
7414         care of appropriately justifying the argument.
7416 2014-05-21  Hristian Kirtchev  <kirtchev@adacore.com>
7418         * sem_ch6.adb: sem_ch6.adb (Analyze_Aspects_On_Body_Or_Stub):
7419         New routine.
7420         (Analyze_Subprogram_Body_Helper): Move the
7421         analysis of aspect specifications and the processing of the
7422         subprogram body contract after inlining has taken place.
7423         (Diagnose_Misplaced_Aspect_Specifications): Removed.
7425 2014-05-21  Javier Miranda  <miranda@adacore.com>
7427         * sem_ch3.adb (Build_Derived_Record_Type): Revert previous change.
7429 2014-05-21  Robert Dewar  <dewar@adacore.com>
7431         * sem_eval.ads, sem_eval.adb (Why_Not_Static): Messages are not
7432         continuations any more.
7434 2014-05-21  Ed Schonberg  <schonberg@adacore.com>
7436         * sinfo.ads, sinfo.adb: New flag Needs_Initialized_Actual,
7437         present in formal_Private_Definitions and on private extension
7438         declarations of a formal derived type. Set when the use of the
7439         formal type in a generic suggests that the actual should be a
7440         fully initialized type.
7441         * sem_warn.adb (May_Need_Initialized_Actual): new subprogram
7442         to indicate that an entity of a generic type has default
7443         initialization, and that the corresponing actual type in any
7444         subsequent instantiation should be fully initialized.
7445         * sem_ch12.adb (Check_Initialized_Type): new subprogram,
7446         to emit a warning if the actual for a generic type on which
7447         Needs_Initialized_Actual is set is not a fully initialized type.
7449 2014-05-21  Robert Dewar  <dewar@adacore.com>
7451         * sem_elab.adb, prj-dect.adb: Minor reformatting.
7453 2014-05-21  Robert Dewar  <dewar@adacore.com>
7455         * erroutc.ads: Minor comment addition.
7457 2014-05-21  Robert Dewar  <dewar@adacore.com>
7459         * errout.ads: Add documentation for use of >*> tag.
7460         * restrict.adb: Make sure we use >*> tag for restriction warnings.
7462 2014-05-21  Gary Dismukes  <dismukes@adacore.com>
7464         * debug.adb: Add case of illegal overriding_indicator for a
7465         protected subprogram body to description of -gnatd.E switch.
7466         * sem_ch6.adb (Verify_Overriding_Indicator): Issue error message
7467         for cases of giving overriding_indicators on protected subprogram
7468         bodies, but change this to a warning if -gnatd.E is enabled. No
7469         longer give a style warning about missing indicators on protected
7470         subprogram bodies.
7472 2014-05-21  Robert Dewar  <dewar@adacore.com>
7474         * prj.ads, sem_ch12.adb, prj.adb, exp_pakd.adb,
7475         sem_elab.ads: Minor reformatting.
7476         * erroutc.adb, erroutc.ads (Warning_Specifically_Suppressed): Make Tag
7477         parameter optional.
7479 2014-05-21  Pascal Obry  <obry@adacore.com>
7481         * prj-dect.adb: Allow package Install in aggregate project.
7483 2014-05-21  Robert Dewar  <dewar@adacore.com>
7485         * sem_ch13.adb (Analyze_Aspect_Specifications):
7486         Insert_Delayed_Pragma is now used for the case of Attach_Handler.
7487         * sem_prag.adb: Minor comment improvements.
7489 2014-05-21  Ed Schonberg  <schonberg@adacore.com>
7491         * sem_ch12.adb (Install_Body): When checking whether freezing of
7492         instantiation must be delayed, verify that the common enclosing
7493         subprogram to generic and instance is in fact an overloadable
7494         entity.
7496 2014-05-21  Vincent Celier  <celier@adacore.com>
7498         * makeutl.adb (Mains.Complete_Mains.Do_Complete): Look for all
7499         mains with the same name and fail if there is more than one.
7500         * prj.ads, prj.adb (Find_All_Sources): New function
7502 2014-05-21  Robert Dewar  <dewar@adacore.com>
7504         * sem_ch13.adb: Minor reformatting.
7505         * lib-xref-spark_specific.adb, sem_util.adb: Minor reformatting.
7506         * sem_prag.adb: Minor error message improvement.
7508 2014-05-21  Yannick Moy  <moy@adacore.com>
7510         * lib-xref-spark_specific.adb, lib-xref.ads, lib-xref.adb
7511         (Enclosing_Subprogram_Or_Package): Only return a library-level
7512         package.
7514 2014-05-21  Javier Miranda  <miranda@adacore.com>
7516         * sem_ch3.adb (Build_Derived_Record_Type): Initialize Parent_Base
7517         to the full view of the parent type when processing a derived type
7518         which is the full view of a private type not defined in a generic
7519         unit which is derived from a private type with discriminants
7520         whose full view is a non-tagged record type.
7522 2014-05-21  Javier Miranda  <miranda@adacore.com>
7524         * exp_ch4.adb (Expand_Allocator_Expression.Apply_Accessibility_Check):
7525         Complete previous patch.
7527 2014-05-21  Thomas Quinot  <quinot@adacore.com>
7529         PR ada/9535
7530         * g-socket.adb (Read and Write for Datagram_Socket_Stream_Type):
7531         Provide a behaviour more consistent with underlying datagram
7532         socket: do not attempt to loop over Send_Socket/Receive_Socket
7533         iterating along the buffer.
7535 2014-05-21  Hristian Kirtchev  <kirtchev@adacore.com>
7537         * freeze.adb (Freeze_Record_Type): Ensure that a discriminated
7538         or a tagged type is not labelled as volatile. Ensure that a
7539         non-volatile type has no volatile components.
7540         * sem_ch3.adb (Analyze_Object_Contract): Add local constant
7541         Obj_Typ. Code reformatting.  Ensure that a discriminated or
7542         tagged object is not labelled as volatile.
7543         * sem_prag.adb (Process_Atomic_Shared_Volatile): Ensure that
7544         pragma Volatile applies to a full type declaration or an object
7545         declaration when SPARK mode is on.
7547 2014-05-21  Sergey Rybin  <rybin@adacore.com frybin>
7549         * gnat_ugn.texi: For ASIS tools, reword the paragraph about
7550         providing options needed for compiling the argument source for
7551         the situation when a project file can be used as a tool parameter.
7553 2014-05-21  Gary Dismukes  <dismukes@adacore.com>
7555         * gnat_rm.texi: Minor typo fix.
7557 2014-05-21  Robert Dewar  <dewar@adacore.com>
7559         * stand.adb (Tree_Read): Read missing entities.
7560         (Tree_Write): Write missing entities.
7562 2014-05-21  Ben Brosgol  <brosgol@adacore.com>
7564         * gnat_ugn.texi: Wordsmithing edits to Coupling Metrics Control
7565         section in gnatmetric chapter.
7567 2014-05-21  Robert Dewar  <dewar@adacore.com>
7569         * exp_ch6.adb (Expand_Actuals): Spec moved here, since not used
7570         outside Exp_Ch6 (Expand_Actuals): Deal with proper insertion of
7571         post-call copy write back (see detailed comment in code).
7572         * exp_ch6.ads (Expand_Actuals): Moved to body, not used outside
7573         Exp_Ch6.
7574         * tbuild.ads: Minor reformatting.
7576 2014-05-21  Robert Dewar  <dewar@adacore.com>
7578         * stand.ads: Add warning about adding new entities and
7579         Tree_Read/Tree_Write.
7581 2014-05-21  Robert Dewar  <dewar@adacore.com>
7583         * sem_util.adb (Set_Entity_With_Checks): Don't complain about
7584         references to restricted entities within the units in which they
7585         are declared.
7587 2014-05-21  Robert Dewar  <dewar@adacore.com>
7589         * gnat1drv.adb (Check_Bad_Body): Use Source_File_Is_Body to
7590         simplify the needed test, and also deal with failure to catch
7591         situations with non-standard names.
7592         * sinput-l.ads, sinput-l.adb (Source_File_Is_No_Body): New function
7593         (Source_File_Is_Subunit): Removed, no longer used.
7595 2014-05-21  Javier Miranda  <miranda@adacore.com>
7597         * exp_ch4.adb
7598         (Expand_Allocator_Expression.Apply_Accessibility_Check): for a
7599         renaming of an access to interface object there is no need to
7600         generate extra code to reference the tag.
7602 2014-05-21  Robert Dewar  <dewar@adacore.com>
7604         * errout.adb, erroutc.adb, erroutc.ads: Allow warning tag in pragma
7605         Warnings (Off, string).
7607 2014-05-21  Robert Dewar  <dewar@adacore.com>
7609         * osint.adb: Fix three error messages to say invalid instead
7610         of erroneous.
7611         * par-ch4.adb, exp_aggr.adb, sem_attr.adb, sem_aux.adb, sem_ch3.adb,
7612         sem_ch5.adb, sem_ch6.adb, sem_ch7.adb, sem_dim.adb, sem_res.adb,
7613         sem_util.adb, sem_util.ads: Fix incorrect use of erroneous in comments.
7615 2014-05-21  Ed Schonberg  <schonberg@adacore.com>
7617         * freeze.adb, sem_ch13.adb, sem_ch13.ads, sem_ch9.adb,
7618         sem_ch9.ads: Move discriminant manipulation routines for analysis of
7619         aspect specifications from sem_ch9 to sem_ch13, where they belong.
7621 2014-05-21  Robert Dewar  <dewar@adacore.com>
7623         * gnat_ugn.texi: Clearly document -gnatw.g (GNAT warnings).
7624         Clearly document -gnatyg (GNAT style switches).
7625         * usage.adb: Add line line for -gnatw.g (GNAT warnings) More
7626         detail for line for -gnatyg (GNAT style switches) -gnatw.d/D is
7627         available for VMS after all.
7628         * warnsw.adb: Reorganize to eliminate duplicated code
7629         (Restore_Warnings): Add a couple of missing entries
7630         (Save_Warnings): Add a couple of missing entries.
7631         * warnsw.ads: Add missing entries to Warning_Record (not clear
7632         what the impact is).
7634 2014-05-21  Robert Dewar  <dewar@adacore.com>
7636         * errout.adb (Set_Msg_Insertion_Warning): Handle ?*? (restriction
7637         warning) case.
7638         * errout.ads: Document ?*? (restriction warning) insertion.
7639         * erroutc.adb (Get_Warning_Tag): Deal with ?*? (restriction
7640         warning) case.
7641         * erroutc.ads: Document use of * for restriction warning tag.
7642         * restrict.adb (Restriction_Msg): Tag with ?*? instead of ??.
7644 2014-05-21  Ed Schonberg  <schonberg@adacore.com>
7646         * sem_ch9.adb (Push_Scope_And_Install_Discriminants): Do not
7647         make discriminants immediately visible when analyzing an aspect
7648         of a subtype declaration.
7649         (Uninstall_Discriminants): Do not apply to the entity in a
7650         subtype declaration.
7652 2014-05-21  Ed Schonberg  <schonberg@adacore.com>
7654         * sem_util.adb: Code clean up.
7656 2014-05-21  Eric Botcazou  <ebotcazou@adacore.com>
7658         * gnat_ugn.texi: Document -Werror.
7660 2014-05-21  Bob Duff  <duff@adacore.com>
7662         * sem_util.adb (Is_Dependent_Component_Of_Mutable_Object):
7663         This was returning False if the Object is a constant view. Fix
7664         it to return True in that case, because it might be a view of
7665         a variable.
7666         (Has_Discriminant_Dependent_Constraint): Fix latent
7667         bug; this function was crashing when passed a discriminant.
7669 2014-05-21  Robert Dewar  <dewar@adacore.com>
7671         * gnat_ugn.texi: Remove misplaced section that is now obsolete.
7672         * s-arit64.adb: Minor code reorganization.
7673         * sem_prag.adb: Minor comment fix (remove erroneous use of the
7674         term erroneous).
7676 2014-05-21  Robert Dewar  <dewar@adacore.com>
7678         * g-table.adb, g-dyntab.adb (Reallocate): Fix possible overflow in
7679         computing new table size.
7681 2014-05-21  Robert Dewar  <dewar@adacore.com>
7683         * einfo.ads: Minor reformatting.
7684         * ceinfo.adb: Deal with slight format change of einfo.ads.
7686 2014-05-21  Ed Schonberg  <schonberg@adacore.com>
7688         * sem_prag.adb (Analyze_Part_Of): Further work on the proper
7689         implementation of the SPARK 2014 rule concerning private child
7690         units (LRM 7.2.6).
7692 2014-05-21  Vincent Celier  <celier@adacore.com>
7694         * makeusg.adb: Add switch -d to usage.
7696 2014-05-21  Ed Schonberg  <schonberg@adacore.com>
7698         * sem_util.adb (Find_Actual): If an actual that is the prefix
7699         of an enclosing prefixed call has been rewritten, use Nkind
7700         and Sloc to identify the corresponding formal, when handling
7701         deferred references.
7703 2014-05-21  Robert Dewar  <dewar@adacore.com>
7705         * debug.adb: Document -gnatd.z switch.
7706         * sem_eval.adb (Why_Non_Static): Test -gnatd.z switch.
7708 2014-05-21  Robert Dewar  <dewar@adacore.com>
7710         * einfo.ads (Can_Never_Be_Null): Minor comment update.
7711         * sem_prag.adb (Check_Arg_Is_Task_Dispatching_Policy): Minor
7712         error message change.
7713         * s-arit64.adb ("abs"): New function. Use expression functions
7714         for the simple conversions and arithmetic.
7716 2014-05-18  Eric Botcazou  <ebotcazou@adacore.com>
7718         * gcc-interface/trans.c (Subprogram_Body_to_gnu): Rework comment and
7719         set function_start_locus.
7721 2014-05-18  Eric Botcazou  <ebotcazou@adacore.com>
7723         * utils.c (gnat_write_global_declarations): Adjust the flags put on
7724         dummy_global.
7726 2014-05-18  Eric Botcazou  <ebotcazou@adacore.com>
7728         * gcc-interface/decl.c (change_qualified_type): New static function.
7729         (gnat_to_gnu_entity): Use it throughout to add qualifiers on types.
7730         <E_Array_Type>: Set TYPE_VOLATILE on the array type directly.
7731         <E_Array_Subtype>: Likewise.
7732         Do not set flags on an UNCONSTRAINED_ARRAY_TYPE directly.
7733         (gnat_to_gnu_component_type): Likewise.
7734         (gnat_to_gnu_param): Likewise.
7736 2014-05-18  Eric Botcazou  <ebotcazou@adacore.com>
7738         * fe.h (Set_Present_Expr): Move around.
7739         (End_Location): New macro.
7740         * gcc-interface/trans.c (Case_Statement_to_gnu): Use End_Location.
7742 2014-05-18  Eric Botcazou  <ebotcazou@adacore.com>
7744         * gcc-interface/decl.c (gnat_to_gnu_entity): Use Underlying_Type in
7745         lieu of more verbose construct.
7746         * gcc-interface/trans.c (Call_to_gnu): Likewise.
7747         (gnat_to_gnu): Likewise.  Remove obsolete code.
7749 2014-05-18  Eric Botcazou  <ebotcazou@adacore.com>
7751         * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Array_Subtype>: Do not
7752         consider that regular packed arrays can never be superflat.
7754 2014-05-17  Trevor Saunders  <tsaunders@mozilla.com>
7756         * gcc-interface/ada-tree.h: Remove usage of variable_size gty
7757         annotation.
7758         * gcc-interface/decl.c (annotate_value): Adjust.
7759         * gcc-interface/trans.c (Attribute_to_gnu): Likewise.
7760         (push_range_check_info): Likewise.
7761         (Loop_Statement_to_gnu): Likewise.
7762         (Subprogram_Body_to_gnu): Likewise.
7763         (Compilation_Unit_to_gnu): Likewise.
7764         (start_stmt_group): Likewise.
7765         * gcc-interface/utils.c (init_gnat_utils): Likewise.
7766         (gnat_pushlevel): Likewise.
7767         (maybe_pad_type): Likewise.
7769 2014-05-14  Eric Botcazou  <ebotcazou@adacore.com>
7771         * seh_init.c: Fix copyright year.
7773 2014-05-14  Bernd Edlinger  <bernd.edlinger@hotmail.de>
7775         * seh_init.c (__gnat_map_SEH): Compile also when __CYGWIN__ and __SEH__
7776         are defined.  Move include windows.h before system.h.
7777         * s-oscons-tmplt.c (DTR_CONTROL_ENABLE, RTS_CONTROL_ENABLE): Compile
7778         also when __CYGWIN__ is defined.  Include windef.h before winbase.h.
7780 2014-05-14  Richard Sandiford  <r.sandiford@uk.ibm.com>
7782         * gcc-interface/decl.c (gnat_to_gnu_entity): Convert integer_one_node
7783         to the appropriate type.
7784         * gcc-interface/trans.c (gnat_to_gnu): Likewise.
7785         (pos_to_constructor): Likewise.
7787 2014-05-13  Eric Botcazou  <ebotcazou@adacore.com>
7789         * gcc-interface/decl.c (annotate_value): Fix thinko in latest change.
7791 2014-05-06  Kenneth Zadeck  <zadeck@naturalbridge.com>
7792             Mike Stump  <mikestump@comcast.net>
7793             Richard Sandiford  <rdsandiford@googlemail.com>
7795         * gcc-interface/cuintp.c (UI_From_gnu): Use wide-int interfaces.
7796         * gcc-interface/decl.c (gnat_to_gnu_entity): Use TYPE_SIGN.
7797         (annotate_value): Use wide-int interfaces.
7798         * gcc-interface/utils.c (get_nonnull_operand): Use tree_fits_uhwi_p.
7800 2014-04-28  Richard Henderson  <rth@redhat.com>
7802         * gcc-interface/Makefile.in: Support aarch64-linux.
7804 2014-04-28  Eric Botcazou  <ebotcazou@adacore.com>
7806         * exp_dbug.ads (Get_External_Name): Add 'False' default to Has_Suffix,
7807         add 'Suffix' parameter and adjust comment.
7808         (Get_External_Name_With_Suffix): Delete.
7809         * exp_dbug.adb (Get_External_Name_With_Suffix): Merge into...
7810         (Get_External_Name): ...here.  Add 'False' default to Has_Suffix, add
7811         'Suffix' parameter.
7812         (Get_Encoded_Name): Remove 2nd argument in call to Get_External_Name.
7813         Call Get_External_Name instead of Get_External_Name_With_Suffix.
7814         (Get_Secondary_DT_External_Name): Likewise.
7815         * exp_cg.adb (Write_Call_Info): Likewise.
7816         * exp_disp.adb (Export_DT): Likewise.
7817         (Import_DT): Likewise.
7818         * comperr.ads (Compiler_Abort): Remove Code parameter and add From_GCC
7819         parameter with False default.
7820         * comperr.adb (Compiler_Abort): Likewise.  Adjust accordingly.
7821         * types.h (Fat_Pointer): Rename into...
7822         (String_Pointer): ...this.  Add comment on interfacing rules.
7823         * fe.h (Compiler_Abort): Adjust for above renaming.
7824         (Error_Msg_N): Likewise.
7825         (Error_Msg_NE): Likewise.
7826         (Get_External_Name): Likewise.  Add third parameter.
7827         (Get_External_Name_With_Suffix): Delete.
7828         * gcc-interface/decl.c (STDCALL_PREFIX): Define.
7829         (create_concat_name): Adjust call to Get_External_Name, remove call to
7830         Get_External_Name_With_Suffix, use STDCALL_PREFIX, adjust for renaming.
7831         * gcc-interface/trans.c (post_error): Likewise.
7832         (post_error_ne): Likewise.
7833         * gcc-interface/misc.c (internal_error_function): Likewise.
7835 2014-04-28  Richard Biener  <rguenther@suse.de>
7837         PR middle-end/60092
7838         * gcc-interface/utils.c: Define flag_isoc11.
7840 2014-04-26  Eric Botcazou  <ebotcazou@adacore.com>
7842         * gnatvsn.ads (Library_Version): Bump to 4.10.
7844 2014-04-23  Eric Botcazou  <ebotcazou@adacore.com>
7846         Revert
7847         2014-04-22  Richard Henderson  <rth@redhat.com>
7849         * gcc-interface/Makefile.in: Support aarch64-linux.
7851         2014-04-22  Eric Botcazou  <ebotcazou@adacore.com>
7853         * fe.h (Compiler_Abort): Replace Fat_Pointer with String_Pointer.
7854         (Error_Msg_N): Likewise.
7855         (Error_Msg_NE): Likewise.
7856         (Get_External_Name_With_Suffix): Likewise.
7857         * types.h (Fat_Pointer): Delete.
7858         (String_Pointer): New type.
7859         (DECLARE_STRING_POINTER): New macro.
7860         * gcc-interface/decl.c (create_concat_name): Adjust.
7861         * gcc-interface/trans.c (post_error): Likewise.
7862         (post_error_ne): Likewise.
7863         * gcc-interface/misc.c (internal_error_function): Likewise.
7865 2014-04-22  Richard Henderson  <rth@redhat.com>
7867         * gcc-interface/Makefile.in: Support aarch64-linux.
7869         * init.c [__linux__] (HAVE_GNAT_ALTERNATE_STACK): New define.
7870         (__gnat_alternate_stack): Enable for all linux except ia64.
7872 2014-04-22  Eric Botcazou  <ebotcazou@adacore.com>
7874         * fe.h (Compiler_Abort): Replace Fat_Pointer with String_Pointer.
7875         (Error_Msg_N): Likewise.
7876         (Error_Msg_NE): Likewise.
7877         (Get_External_Name_With_Suffix): Likewise.
7878         * types.h (Fat_Pointer): Delete.
7879         (String_Pointer): New type.
7880         (DECLARE_STRING_POINTER): New macro.
7881         * gcc-interface/decl.c (create_concat_name): Adjust.
7882         * gcc-interface/trans.c (post_error): Likewise.
7883         (post_error_ne): Likewise.
7884         * gcc-interface/misc.c (internal_error_function): Likewise.
7886 2014-04-15  Eric Botcazou  <ebotcazou@adacore.com>
7887             Pierre-Marie de Rodat  <derodat@adacore.com>
7889         * gcc-interface/decl.c (gnat_to_gnu_entity) <object>: Create a mere
7890         scalar constant instead of a reference for renaming of scalar literal.
7891         Do not create a new object for constant renaming except for a function
7892         call.  Make sure a VAR_DECL is created for the renaming pointer.
7893         * gcc-interface/trans.c (constant_decl_with_initializer_p): New.
7894         (fold_constant_decl_in_expr): New function.
7895         (Identifier_to_gnu): Use constant_decl_with_initializer_p.
7896         For a constant renaming, try to fold a constant DECL in the result.
7897         (lvalue_required_p) <N_Object_Renaming_Declaration>: Always return 1.
7898         (Identifier_to_gnu): Reference the renamed object of constant renaming
7899         pointers directly.
7900         * gcc-interface/utils.c (invalidate_global_renaming_pointers): Do not
7901         invalidate constant renaming pointers.
7903 2014-04-15  Eric Botcazou  <ebotcazou@adacore.com>
7905         * gcc-interface/utils.c (type_for_vector_element_p): New predicate.
7906         (build_vector_type_for_size): New function.
7907         (build_vector_type_for_array): Likewise.
7908         (unchecked_convert): Build an intermediate vector type to convert
7909         from a generic array type to a vector type.
7910         (handle_vector_size_attribute): Reimplement.
7911         (handle_vector_type_attribute): Likewise.
7913 2014-04-15  Eric Botcazou  <ebotcazou@adacore.com>
7915         * gcc-interface/decl.c (prepend_one_attribute_pragma): Call
7916         Is_OK_Static_Expression in lieu of Is_Static_Expression to
7917         detect valid arguments.
7919 2014-04-15  Eric Botcazou  <ebotcazou@adacore.com>
7921         * gcc-interface/trans.c (gnat_gimplify_stmt): Propagate loop hints.
7923 2014-04-14  Paolo Carlini  <paolo.carlini@oracle.com>
7925         * gcc-interface/decl.c (gnat_to_gnu_entity): Use TYPE_IDENTIFIER.
7926         (components_to_record): Likewise.
7927         * gcc-interface/utils.c (make_aligning_type): Likewise.
7928         (maybe_pad_type): Likewise.
7929         (finish_record_type): Likewise.
7930         (rest_of_record_type_compilation): Likewise.
7932 2014-04-14  Eric Botcazou  <ebotcazou@adacore.com>
7934         * snames.ads-tmpl (Name_Ivdep): New pragma-related name.
7935         * sem_prag.adb (Analyze_Pragma) <Pragma_Loop_Optimize>: Add support
7936         for Ivdep hint.
7937         * gnat_rm.texi (Implementation Defined Pragmas): Document new Ivdep
7938         hint for Loop_Optimize.
7939         * gnat_ugn.texi (Vectorization of loops): Mention new Ivdep hint.
7940         * gcc-interface/trans.c (Pragma_to_gnu) <Pragma_Loop_Optimize>: Deal
7941         with new Ivdep hint.
7942         * gcc-interface/ada-tree.h (LOOP_STMT_IVDEP): New macro.
7943         * gcc-interface/trans.c (Pragma_to_gnu) <Pragma_Loop_Optimize>: Deal
7944         with new Ivdep hint.
7945         (gnat_gimplify_stmt) <LOOP_STMT>: Propagate loop hints.
7947 2014-04-14  Eric Botcazou  <ebotcazou@adacore.com>
7948             Robert Dewar  <dewar@adacore.com>
7950         * opt.ads (Suppress_Back_Annotation): Remove as unused.
7951         * fe.h (Back_Annotate_Rep_Info): Likewise.
7952         (Global_Discard_Names): Likewise.
7953         (List_Representation_Info): Declare.
7954         * types.h (Uint_Minus_1): Likewise.
7955         * repinfo.ads: Document back-annotation change.
7956         * gcc-interface/gigi.h (init_gnat_decl): Declare.
7957         (destroy_gnat_decl): Likewise.
7958         * gcc-interface/decl.c (annotate_value): Do not create the cache of
7959         annotated values here but...
7960         <CALL_EXPR>: Only inline the call if -gnatR3 is specified or we are
7961         in ASIS mode.
7962         (init_gnat_decl): ...here instead.  New function.
7963         (destroy_gnat_decl): Likewise.
7964         * gcc-interface/trans.c (gigi): Call {init|destroy}_gnat_decl.
7965         * gcc-interface/utils.c (init_gnat_utils): Minor reformatting.
7967 2014-04-14  Eric Botcazou  <ebotcazou@adacore.com>
7969         * gcc-interface/decl.c (create_field_decl_from): Finalize non-constant
7970         offset for the field, if any.
7972 2014-04-09  Eric Botcazou  <ebotcazou@adacore.com>
7973             Svante Signell  <svante.signell@gmail.com>
7975         PR ada/54040
7976         PR ada/59346
7977         * s-osinte-x32.adb: New file.
7978         * s-linux.ads (Time): New section.
7979         * s-linux-alpha.ads (Time): Likewise.
7980         * s-linux-android.ads (Time: Likewise.
7981         * s-linux-hppa.ads (Time): Likewise.
7982         * s-linux-mipsel.ads (Time): Likewise.
7983         * s-linux-sparc.ads (Time): Likewise.
7984         * s-linux-x32.ads (Time): Likewise.
7985         * s-osprim-x32.ads (timespec): Adjust.
7986         (Clock): Likewise.
7987         (To_Timespec): Likewise.
7988         * s-osinte-linux.ads (Time): Define local subtypes for those defined
7989         in System.Linux.
7990         * s-taprop-linux.adb (Monotonic_Clock): Do not define timeval.
7991         * s-osinte-hpux.ads (timespec): Revert POSIX breakage.
7992         * s-osinte-kfreebsd-gnu.ads (timespec): Likewise.
7993         * s-osinte-solaris-posix.ads (timespec): Likewise.
7994         * s-osinte-posix.adb (To_Timespec): Likewise.
7995         * gcc-interface/Makefile.in (x32/Linux): Use s-osinte-x32.adb.
7997 2014-04-08  Eric Botcazou  <ebotcazou@adacore.com>
7999         PR ada/60411
8000         * gcc-interface/Makefile.in (arm% linux-android): Switch to EHABI.
8001         * s-linux-android.ads: New file.
8002         * s-intman-android.adb: Likewise.
8003         * s-osinte-android.ads: Adjust.
8004         * sigtramp-armdroid.c: Likewise.
8005         * sigtramp.h: Add Android support.
8007 2014-04-07  Eric Botcazou  <ebotcazou@adacore.com>
8009         * gcc-interface/Makefile.in (alpha-vms): Add missing line.
8011 2014-03-30  Eric Botcazou  <ebotcazou@adacore.com>
8013         PR ada/60703
8014         * system-linux-alpha.ads: Adjust for Ada 2005.
8015         * system-linux-mips.ads: Likewise.
8016         * system-linux-mips64el.ads: Likewise.
8017         * system-linux-mipsel.ads: Likewise.
8018         * system-linux-s390.ads: Likewise.
8019         * system-linux-s390x.ads: Likewise.
8020         * system-linux-sparc.ads: Likewise.
8021         * system-linux-sparcv9.ads: Likewise.
8022         * system-rtems.ads: Likewise.
8023         * system-vxworks-arm.ads: Likewise.
8025 2014-03-16  Andreas Schwab  <schwab@linux-m68k.org>
8027         PR ada/39172
8028         * gcc-interface/Makefile.in (target_cpu_default): Revert
8029         2013-10-11 change.
8031 2014-03-13  Eric Botcazou  <ebotcazou@adacore.com>
8033         PR ada/51483
8034         * cstand.adb (Register_Float_Type): Add 'precision' parameter and use
8035         it to set the RM size.  Use directly 'size' for the Esize.
8036         (Create_Back_End_Float_Types): Adjust call to above.
8037         * get_targ.ads (Register_Type_Proc): Add 'precision' parameter.
8038         * set_targ.ads (FPT_Mode_Entry): Add 'precision' component.
8039         (Write_Target_Dependent_Values): Adjust comment.
8040         * set_targ.adb (Register_Float_Type): Add 'precision' parameter and
8041         deal with it.
8042         (Write_Target_Dependent_Values): Write the precision in lieu of size.
8043         (Initialization): Read the precision in lieu of size and compute the
8044         size from the precision and the alignment.
8045         * gcc-interface/gigi.h (enumerate_modes): Add integer parameter.
8046         * gcc-interface/misc.c (enumerate_modes): Likewise.  Do not register
8047         types for vector modes, pass the size in addition to the precision.
8049 2014-03-10  Eric Botcazou  <ebotcazou@adacore.com>
8051         * gcc-interface/Make-lang.in (ADA_DEPFILES): Fix typo.
8053 2014-03-07  Doug Rupp  <rupp@adacore.com>
8055         PR ada/60411
8056         * system-linux-armel.ads (Backend_Overflow_Checks): Set to True.
8057         (Support_64_Bit_Divides): Removed, no longer used.
8058         (ZCX_By_Default): Enabled.
8060 2014-02-25  Doug Rupp  <rupp@adacore.com>
8062         * gcc-interface/Makefile.in (arm-linux):
8063         (EH_MECHANISM): Use ARM unwinder (-arm)
8064         (LIBGNAT_TARGET_PAIRS: Override defaults with a-exexpr-gcc.adb and
8065         s-excmac-arm.ads.
8066         (EXTRA_LIBGNAT_OBJS): Add raise-gcc.o
8067         (EXTRA_GNATRTL_NONTASKING_OBJS): Add g-cppexc.o s-excmac.o.
8068         (arm-wrs-vxworks): Add EH_MECHANISM=-gcc for kernel mode.
8069         (EXTRA_LIBGNAT_OBJS): Add sigtramp-armvxw.o
8070         Add dependencies for sigtramp-armvxw.o.
8072 2014-02-25  Eric Botcazou  <ebotcazou@adacore.com>
8074         * gcc-interface/trans.c (Pragma_to_gnu): Deal with Warning_As_Error.
8076 2014-02-25  Robert Dewar  <dewar@adacore.com>
8078         * rtsfind.adb (Is_RTE): Protect against entity with no scope
8079         field (previously this call blew up on the Standard entity).
8080         * sem_attr.adb (Analyze_Attribute, case Access): Remove
8081         test for No_Abort_Statements, this is now handled in
8082         Set_Entity_With_Checks.
8083         * exp_ch6.adb, sem_ch10.adb, sem_ch4.adb, sem_ch8.adb, sem_res.adb:
8084         Change name Set_Entity_With_Style_Check => Set_Entity_With_Checks.
8085         * sem_util.ads, sem_util.adb: Change name Set_Entity_With_Style_Check =>
8086         Set_Entity_With_Checks.
8087         (Set_Entity_With_Checks): Add checks for No_Dynamic_Attachment,
8088         Add checks for No_Abort_Statements.
8090 2014-02-25  Robert Dewar  <dewar@adacore.com>
8092         * exp_ch9.adb (Expand_Entry_Barrier): Add comment that call to
8093         Check_Restriction is OK.
8095 2014-02-25  Ed Schonberg  <schonberg@adacore.com>
8097         * sem_ch3.adb (Process_Full_View): Better error message when
8098         the full view of  a private type without discriminants is an
8099         unconstrained type.
8100         * sem_ch7.adb (Uninstall_Declarations): Ditto.
8102 2014-02-25  Eric Botcazou  <ebotcazou@adacore.com>
8104         * sigtramp-armvxw.c: Also restore r0.
8106 2014-02-25  Robert Dewar  <dewar@adacore.com>
8108         * errout.adb (Error_Msg_Internal): Warning_Msg_Char set
8109         unconditionally (Set_Msg_Insertion_Warning): Warning_Msg_Char
8110         set unconditionally.
8111         * erroutc.adb (Get_Warning_Tag): Does not give a leading space
8112         any more (Output_Msg_Text): Rewritten with new convention on
8113         output of warnings that are treated as errors.
8114         * erroutc.ads (Error_Msg_Object): Warn_Chr is always set even
8115         if Warn is False.
8116         * gnat_rm.texi: Updates to documentation on pragma
8117         Warning_As_Error.
8118         * warnsw.adb (Set_Dot_Warning_Switch): -gnatw.e should not
8119         set Warning_Doc_Switch.
8120         * lib-writ.ads: Add documentation note on ALI file generation
8121         for C.
8122         * exp_ch6.adb (Expand_Call): Remove check for No_Abort_Statements
8123         (belongs in Sem).
8124         * sem_attr.adb (Resolve_Attribute, case Access):
8125         Abort_Task'Access violates the No_Abort_Statements restriction.
8126         * sem_res.adb (Resolve_Call): Check restriction
8127         No_Abort_Statements for call to Abort_Task or a renaming of it.
8129 2014-02-25  Robert Dewar  <dewar@adacore.com>
8131         * sem_ch3.adb (Array_Type_Declaration): Check for case of using
8132         type name as index.
8133         * lib.ads: Minor reformatting.
8134         * einfo.ads: Minor reformatting.
8136 2014-02-25  Doug Rupp  <rupp@adacore.com>
8138         * sem_mech.adb (Set_Mechanisms): For convention Fortran on VMS
8139         use Short_Descriptor(S) as the argument passing mechanism.
8141 2014-02-25  Eric Botcazou  <ebotcazou@adacore.com>
8143         * sigtramp-ppcvxw.c (CFI_COMMON_REGS): Also include r0.
8145 2014-02-25  Robert Dewar  <dewar@adacore.com>
8147         * atree.ads (Warnings_Treated_As_Errors): New variable.
8148         * errout.adb (Error_Msg_Internal): Set Warn_Err flag in
8149         error object (Initialize): Initialize Warnings_As_Errors_Count
8150         (Write_Error_Summary): Include count of warnings treated as errors.
8151         * erroutc.adb (Warning_Treated_As_Error): New function.
8152         (Matches): Function moved to outer level of package.
8153         * erroutc.ads (Error_Msg_Object): Add Warn_Err flag.
8154         (Warning_Treated_As_Error): New function.
8155         * gnat_rm.texi: Document pragma Treat_Warning_As_Error.
8156         * opt.adb: Add handling of Warnings_As_Errors_Count[_Config].
8157         * opt.ads (Config_Switches_Type): Add entry for
8158         Warnings_As_Errors_Count.
8159         (Warnings_As_Errors_Count): New variable.
8160         (Warnings_As_Errors): New array.
8161         * par-prag.adb: Add dummy entry for Warning_As_Error.
8162         * sem_prag.adb (Analyze_Pragma): Implement new pragma
8163         Warning_As_Error.
8164         * snames.ads-tmpl: Add entries for Warning_As_Error pragma.
8166 2014-02-25  Eric Botcazou  <ebotcazou@adacore.com>
8168         * sigtramp.h: Fix minor inaccuracy.
8170 2014-02-25  Ben Brosgol  <brosgol@adacore.com>
8172         * gnat_ugn.texi: Added description of kill command.
8174 2014-02-25  Robert Dewar  <dewar@adacore.com>
8176         * gnat_rm.texi (Address_Clauses): Add a section discussing the
8177         problem of address clauses causing unexpected initialization,
8178         including the effect of Initialize_Scalars.
8180 2014-02-25  Robert Dewar  <dewar@adacore.com>
8182         * errout.adb: Various changes for better msgs for anonmous access
8183         subprogram types.
8184         * erroutc.ads, erroutc.adb (Buffer_Ends_With): Version with character
8185         argument.
8186         (Buffer_Remove): Version with character argument.
8187         * sem_attr.adb (Resolve_Attribute, case Access): Better handling
8188         of mismatching conventions for access-to-subprogram case.
8189         * sem_prag.adb (Set_Convention_From_Pragma): Deal with anonymous
8190         access types in record.
8191         * sem_util.ads, sem_util.adb (Set_Convention): Handle anonymous access
8192         types, including in records.
8194 2014-02-25  Doug Rupp  <rupp@adacore.com>
8196         * sigtramp-ppcvxw.c, sigtramp.h, sigtramp-armvxw.c: Comment
8197         enhancements and corrections.
8199 2014-02-25  Robert Dewar  <dewar@adacore.com>
8201         * gnat_rm.texi: New section "Conventions and Anonymous Access Types"
8203 2014-02-25  Robert Dewar  <dewar@adacore.com>
8205         * gnat_rm.texi: First set of documentation additions for
8206         predefined RM units.
8207         * checks.adb: Minor reformatting.
8208         * sem_elab.adb (Check_Task_Activation): Minor fix to error
8209         message.
8210         * sem_util.adb: Minor reformatting.
8212 2014-02-25  Arnaud Charlet  <charlet@adacore.com>
8214         * usage.adb (Usage): Add help on -gnateC.
8215         * switch-c.adb (Scan_Front_End_Switches): Add handling of -gnateC.
8216         * opt.ads (Generate_CodePeer_Messages): New flag.
8217         * gnat_ugn.texi: Document new switch -gnateC.
8219 2014-02-25  Ben Brosgol  <brosgol@adacore.com>
8221         * gnat_rm.texi: Corrected minor typos in Implementation Defined
8222         Aspects.
8223         * opt.ads: Minor reformatting.
8225 2014-02-25  Robert Dewar  <dewar@adacore.com>
8227         * binde.adb: Change messages to mention -gnatel instead of -gnatwl.
8228         * gnat_ugn.texi: Update documentation of -gnatwl Add documentation
8229         of -gnatel/-gnateL.
8230         * opt.ads (Warn_Info_Messages): New flag.
8231         * sem_elab.adb: Use Elab_Warnings, Elab_Info_Messages to control
8232         messages.
8233         * sem_prag.adb: Use Elab_Warnings, Elab_Info_Messages to control
8234         messages.
8235         * switch-m.ad, switch-c.adb: Recognize new -gnatel/EL switches.
8236         * usage.adb: Add documentation of -gnatel/-gnateL Update
8237         documentation of -gnatwl/-gnatwL.
8238         * warnsw.adb: New handling of Elab_Warnings, Elab_Info_Messages
8239         * warnsw.ads (Elab_Info_Messages): New field in Warning_Record
8241 2014-02-25  Robert Dewar  <dewar@adacore.com>
8243         * einfo.ads, einfo.adb (Has_Shift_Operator): New flag.
8244         * gnat_rm.texi: Document pragma Provide_Shift_Operators.
8245         * interfac.ads: Minor code reorganization (add pragma
8246         Compiler_Unit_Warning).
8247         * par-prag.adb: Add dummy entry for Provide_Shift_Operators.
8248         * sem_ch3.adb (Build_Derived_Numeric_Type): Copy
8249         Has_Shift_Operator flag.
8250         * sem_intr.adb (Check_Intrinsic_Subprogram): Make sure
8251         Check_Shift is always called (Check_Shift): Set Has_Shift_Operator.
8252         * sem_prag.adb: Implement pragma Provide_Shift_Operators.
8253         * snames.ads-tmpl: Add entries for pragma Provide_Shift_Operators
8254         Add entry for Name_Amount.
8255         * checks.adb (Selected_Range_Checks): When checking for a null
8256         range, make sure we use the base type, and not the subtype for
8257         deciding a range is null.
8258         * sem_ch5.adb (Analyze_Loop_Parameter_Specification): Check
8259         for suspicious loop bound which is outside the range of the
8260         loop subtype.
8261         * gnat_ugn.texi: Add documentation section "Determining the
8262         Chosen Elaboration Order"
8263         * sem_ch13.adb (UC_Entry): Add field Act_Unit
8264         (Validate_Unchecked_Conversion): Store Act_Unit
8265         (Validate_Unchecked_Conversions): Test Warnings_Off in Act_Unit
8266         * treepr.adb: Minor reformatting.
8268 2014-02-25  Arnaud Charlet  <charlet@adacore.com>
8270         * usage.adb: Minor: fix typo.
8272 2014-02-25  Robert Dewar  <dewar@adacore.com>
8274         * lib.ads, s-bitops.adb, s-bitops.ads, s-conca5.adb, gnat_rm.texi,
8275         s-conca5.ads, s-conca7.adb, s-conca7.ads, s-crc32.adb, s-crc32.ads,
8276         s-conca9.adb, s-conca9.ads, g-dyntab.adb, s-crtl.ads, g-dyntab.ads,
8277         s-excdeb.adb, s-addope.adb, s-addope.ads, s-carun8.adb, s-carun8.ads,
8278         g-htable.adb, g-htable.ads, g-hesora.adb, g-hesora.ads, s-conca2.adb,
8279         s-conca2.ads, a-comlin.adb, a-chlat1.ads, a-comlin.ads, errout.ads,
8280         a-except.adb, s-conca4.adb, a-except.ads, s-conca4.ads, s-conca6.adb,
8281         s-conca6.ads, g-spchge.adb, g-spchge.ads, g-u3spch.adb, g-u3spch.ads,
8282         a-strhas.ads, restrict.adb, aspects.adb, aspects.ads, s-conca8.adb,
8283         s-conca8.ads, back_end.adb, par-prag.adb, g-byorma.adb, g-byorma.ads,
8284         a-elchha.adb, a-elchha.ads, g-speche.adb, g-speche.ads, s-casuti.adb,
8285         s-assert.adb, s-casuti.ads, s-assert.ads, a-clrefi.adb, a-clrefi.ads,
8286         s-conca3.adb, s-conca3.ads, a-ioexce.ads: Implement pragma
8287         Compiler_Unit_Warning, change Compiler_Unit everywhere to
8288         Compiler_Unit_Warning.
8290 2014-02-25  Sergey Rybin  <rybin@adacore.com frybin>
8292         * sem_prag.adb (Analyze_Depends_In_Decl_Part): Do not normalize
8293         in ASIS mode aggregates that are used as aspect definitions.
8295 2014-02-25  Robert Dewar  <dewar@adacore.com>
8297         * exp_ch7.adb, sem_util.adb, sem_util.ads, exp_ch6.adb: Minor
8298         reformatting.
8300 2014-02-25  Ed Schonberg  <schonberg@adacore.com>
8302         * freeze.adb (Freeze_Entity): If the return type of a function
8303         is a limited view, and the non-limited view has not been seen yet,
8304         defer freezing to some later point.
8306 2014-02-25  Robert Dewar  <dewar@adacore.com>
8308         * sem_ch3.adb: Minor reformatting.
8310 2014-02-25  Robert Dewar  <dewar@adacore.com>
8312         * s-excdeb.ads, s-except.ads, s-exctab.adb, s-exctab.ads, s-finmas.ads,
8313         s-htable.adb, s-htable.ads, s-imenne.adb, s-imenne.ads, s-imgenu.adb,
8314         s-imgenu.ads, s-mastop.adb, s-mastop.ads, s-memory-vms_64.adb,
8315         s-memory-vms_64.ads, s-memory.adb, s-memory.ads, s-os_lib.adb,
8316         s-os_lib.ads, s-parame.adb, s-parame.ads, s-purexc.ads, s-restri.adb,
8317         s-restri.ads, s-rident.ads, s-secsta.adb, s-secsta.ads, s-soflin.adb,
8318         s-soflin.ads, s-sopco3.adb, s-sopco3.ads, s-sopco4.adb, s-sopco4.ads,
8319         s-sopco5.adb, s-sopco5.ads, s-spsufi.ads, s-stache.adb, s-stache.ads,
8320         s-stalib.adb, s-stalib.ads, s-stoele.adb, s-stoele.ads, s-strcom.adb,
8321         s-strcom.ads, s-strhas.adb, s-string.adb, s-string.ads, s-strops.adb,
8322         s-strops.ads, s-ststop.adb, s-ststop.ads, s-traceb.adb, s-traceb.ads,
8323         s-traent.adb, s-traent.ads, s-unstyp.ads, s-utf_32.adb, s-utf_32.ads,
8324         s-wchcnv.adb, s-wchcnv.ads, s-wchcon.adb, s-wchcon.ads, s-wchjis.adb,
8325         s-wchjis.ads, sem_ch11.adb, sem_ch4.adb, sem_ch5.adb, sem_prag.adb,
8326         snames.ads-tmpl: Change Compiler_Unit everywhere to
8327         Compiler_Unit_Warning.
8329 2014-02-25  Hristian Kirtchev  <kirtchev@adacore.com>
8331         * exp_ch6.adb (Add_Or_Save_Precondition): New routine.
8332         (Collect_Body_Postconditions_In_Decls): New routine.
8333         (Collect_Body_Postconditions_Of_Kind): Factor out code. Handle
8334         postcondition aspects or pragmas that appear on a subprogram
8335         body stub.
8336         (Collect_Spec_Preconditions): Factor out code. Handle
8337         precondition aspects or pragmas that appear on a subprogram
8338         body stub.
8339         * sem_ch6.adb (Analyze_Subprogram_Body_Helper): The analysis of
8340         aspects that apply to a subprogram body stub is no longer delayed,
8341         the aspects are analyzed on the spot.
8342         (SPARK_Aspect_Error):
8343         Aspects that apply to a subprogram declaration cannot appear in
8344         a subunit.
8345         * sem_ch10.adb Remove with and use clause for Sem_Ch13.
8346         (Analyze_Proper_Body): Add local variable Comp_Unit. Unum
8347         is now a local variable. Code cleanup. Analysis related to
8348         the aspects of a subprogram body stub is now carried out by
8349         Analyze_Subprogram_Body_Helper. Do not propagate the aspects
8350         and/or pragmas of a subprogram body stub to the proper body
8351         as this is no longer needed. Do not analyze the aspects of a
8352         subprogram stub when the corresponding source unit is missing.
8353         (Analyze_Protected_Body_Stub): Flag the illegal use of aspects
8354         on a stub.
8355         (Analyze_Task_Body_Stub): Flag the illegal use of
8356         aspects on a stub.
8357         (Optional_Subunit): Add local variable Unum.
8358         * sem_ch13.adb (Insert_Delayed_Pragma): Do not analyze a generated
8359         pragma when it applies to a subprogram body stub.
8360         * sem_prag.adb (Analyze_Pragma): Pragmas Contract_Cases,
8361         Depends and Global can now apply to a subprogram body stub as
8362         long as it acts as its own spec.
8363         (Analyze_Refined_Pragma):
8364         Code reformatting. Refinement pragmas cannot apply to a subunit.
8366 2014-02-25  Hristian Kirtchev  <kirtchev@adacore.com>
8368         * einfo.ads Update the usage of flag
8369         Uses_Sec_Stack. Uses_Sec_Stack now applies to E_Loop entities.
8370         * exp_ch5.adb (Expand_Iterator_Loop): The temporary for a cursor
8371         now starts with the letter 'C'. This makes reading expanded
8372         code easier.
8373         * exp_ch7.adb (Establish_Transient_Scope): Add local variable
8374         Iter_Loop. Signal that an Ada 2012 iterator loop requires
8375         secondary stack management when creating a transient scope for
8376         an element reference.
8377         * exp_util.adb (Process_Statements_For_Controlled_Objects):
8378         When wrapping the statements of a loop, pass the E_Loop entity
8379         to the wrapping machinery.
8380         (Wrap_Statements_In_Block): Add
8381         formal parameter Scop along with comment on usage. Add local
8382         variables Block_Id, Block_Nod and Iter_Loop. Mark the generated
8383         block as requiring secondary stack management when the block is
8384         created inside an Ada 2012 iterator loop. This ensures that any
8385         reference objects are reclaimed on each iteration of the loop.
8386         * sem_ch5.adb (Analyze_Loop_Statement): Mark the generated block
8387         tasked with the handling of container iterators as requiring
8388         secondary stack management. This ensures that iterators are
8389         reclaimed when the loop terminates or is exited in any fashion.
8390         * sem_util.adb (Add_Block_Identifier): New routine.
8391         (Find_Enclosing_Iterator_Loop): New routine.
8392         * sem_util.ads (Add_Block_Identifier): New routine.
8393         (Find_Enclosing_Iterator_Loop): New routine.
8395 2014-02-25  Robert Dewar  <dewar@adacore.com>
8397         * sinfo.ads: Minor reformatting.
8399 2014-02-25  Tristan Gingold  <gingold@adacore.com>
8401         * s-expllu.ads, s-expuns.ads, s-expmod.ads: Minor comment fix.
8403 2014-02-25  Pascal Obry  <obry@adacore.com>
8405         * sinput-l.adb, osint.adb, osint.ads: Add Prep_Suffix to factorize code.
8407 2014-02-25  Tristan Gingold  <gingold@adacore.com>
8409         * sem_ch10.adb: Minor comment fix.
8411 2014-02-25  Bob Duff  <duff@adacore.com>
8413         * s-tasdeb.adb: Misc cleanup of this package,
8414         including printing addresses in hexadecimal.
8415         (Write): Fix minor bug when taking 'Address of an empty string.
8417 2014-02-25  Ed Schonberg  <schonberg@adacore.com>
8419         * sem_prag.adb (Analyze_Part_Of): Reject state refinement in a
8420         public child unit when it does not refer to the abstract state
8421         of a public ancestor.
8423 2014-02-25  Yannick Moy  <moy@adacore.com>
8425         * sem_prag.adb (Analyze_Pragma/Pragma_Validity_Checks): Ignore pragma
8426         Validity_Checks in GNATprove and CodePeer modes.
8428 2014-02-25  Pascal Obry  <obry@adacore.com>
8430         * prj-attr.adb, projects.texi, snames.ads-tmpl: Add package Install's
8431         Artifacts attribute.
8433 2014-02-25  Yannick Moy  <moy@adacore.com>
8435         * sem_prag.adb: Minor reformatting to get consistent messages.
8437 2014-02-25  Robert Dewar  <dewar@adacore.com>
8439         * checks.adb: Minor reformatting.
8440         * sinfo.ads (Do_Range_Check): Document that this flag is never
8441         passed to the back end.
8443 2014-02-25  Yannick Moy  <moy@adacore.com>
8445         * sem_ch3.adb, sem_ch5.adb, sem_ch9.adb, sem_prag.adb, sem_attr.adb,
8446         sem_ch6.adb: Remove useless references to SPARK RM in error messages.
8448 2014-02-25  Hristian Kirtchev  <kirtchev@adacore.com>
8450         * sem_res.adb (Appears_In_Check): New routine.
8451         (Resolve_Entity_Name): Remove local variables Prev and
8452         Usage_OK. Par is now a constant. Remove the parent chain traversal
8453         as the placement of a volatile object with enabled property
8454         Async_Writers and/or Effective_Reads must appear immediately
8455         within a legal construct.
8457 2014-02-25  Hristian Kirtchev  <kirtchev@adacore.com>
8459         * checks.adb (Apply_Selected_Range_Checks):
8460         Alphabetize local constants and variables. Add comments.
8461         Always insert a range check that requires runtime evaluation into
8462         the tree.
8464 2014-02-25  Robert Dewar  <dewar@adacore.com>
8466         * sem_attr.adb, sem_ch6.adb, par-ch3.adb: Minor reformatting.
8468 2014-02-25  Bob Duff  <duff@adacore.com>
8470         * s-tassta.adb (Finalize_Global_Tasks): Limit the number of loop
8471         iterations while waiting for independent tasks to terminate;
8472         if an independent task does not terminate, we do not want to
8473         hang here. In that case, the thread will be terminated when the
8474         process exits.
8475         * s-taprop-linux.adb (Abort_Task): Fix Assert to allow for ESRCH.
8477 2014-02-25  Ed Schonberg  <schonberg@adacore.com>
8479         * sem_prag.adb (Check_SPARK_Aspect_For_ASIS): New subprogram,
8480         used to perform pre-analysis of the expression for SPARK
8481         aspects that have a non-standard syntax, such as GLobal and
8482         Initializes. The procedure applies to the original expression
8483         in an aspect specification, prior to the analysis of the
8484         corresponding pragma, in order to provide semantic information
8485         for ASIS navigation purposes.
8486         (Analyze_Global_In_Decl_List, Analyze_Initializes_In_Decl_Part):
8487         Call new subprogram.
8489 2014-02-25  Yannick Moy  <moy@adacore.com>
8491         * sem_prag.adb: Remove obsolete reference to SPARK RM in error message.
8493 2014-02-25  Doug Rupp  <rupp@adacore.com>
8495         * init.c (HAVE_GNAT_ADJUST_CONTEXT_FOR_RAISE): Enable for ARM.
8496         (__gnat_adjust_context_for_raise): Bump the PC by 2.
8498 2014-02-25  Ed Schonberg  <schonberg@adacore.com>
8500         * par-ch3.adb (P_Basic_Declarative_Items): In the case of a
8501         misplaced IS, add a statement sequence to improper body only if
8502         one has not been parsed already.
8504 2014-02-25  Ed Schonberg  <schonberg@adacore.com>
8506         * sem_attr.adb (Analyze_Attribute, case 'Update): Check for
8507         mismatch when multidimensional array is updated with a single
8508         index.
8510 2014-02-25  Yannick Moy  <moy@adacore.com>
8512         * sem_ch3.adb, sem_ch5.adb, sem_prag.adb, sem_attr.adb, errout.ads,
8513         sem_ch6.adb: Mark most references to SPARK RM in error messages
8514         for removal.
8516 2014-02-24  Ed Schonberg  <schonberg@adacore.com>
8518         * par-ch3.adb (P_Basic_Declarative_Items): If an improper body
8519         appears in a list of basic declarations, complete the tree with
8520         an empty statement list, to prevent cascaded errors and crashes
8521         if semantic analysis is attempted.
8523 2014-02-24  Thomas Quinot  <quinot@adacore.com>
8525         * g-sercom-mingw.adb (Open): Fix incorrect test for error return
8526         value.
8527         * erroutc.adb: Minor reformatting.
8529 2014-02-24  Hristian Kirtchev  <kirtchev@adacore.com>
8531         * sem_prag.adb (Check_Clause_Syntax): Account
8532         for a solitary input item in a dependency list.
8534 2014-02-24  Yannick Moy  <moy@adacore.com>
8536         * gnat1drv.adb (Adjust_Global_Switches): Do not
8537         use validity checks at all in GNATprove_Mode.
8539 2014-02-24  Robert Dewar  <dewar@adacore.com>
8541         * g-sercom-mingw.adb, g-sercom-linux.adb, sem_prag.adb, freeze.adb,
8542         atree.adb, atree.ads: Minor reformatting.
8544 2014-02-24  Hristian Kirtchev  <kirtchev@adacore.com>
8546         * sem_ch6.adb (Analyze_Subprogram_Body_Contract): Do not enforce
8547         global and dependence refinement when SPARK_Mode is off.
8548         * sem_ch7.adb (Analyze_Package_Body_Contract): Do not enforce
8549         state refinement when SPARK_Mode is off.
8550         * sem_ch13.adb (Analyze_Aspect_Specifications): Add local
8551         variable Decl. Insert the generated pragma for Refined_State
8552         after a potential pragma SPARK_Mode.
8553         * sem_prag.adb (Analyze_Depends_In_Decl_Part): Add local
8554         constant Deps. Remove local variable Expr. Check the syntax
8555         of pragma Depends when SPARK_Mode is off. Factor out the
8556         processing for extra parenthesis around individual clauses.
8557         (Analyze_Global_In_Decl_List): Items is now a constant. Check
8558         the syntax of pragma Global when SPARK_Mode is off.
8559         (Analyze_Initializes_In_Decl_Part): Check the syntax of pragma
8560         Initializes when SPARK_Mode is off.
8561         (Analyze_Part_Of): Check
8562         the syntax of the encapsulating state when SPARK_Mode is off.
8563         (Analyze_Pragma): Check the syntax of pragma Abstract_State when
8564         SPARK_Mode is off. Move the declaration order check with respect
8565         to pragma Initializes to the end of the processing. Do not verify
8566         the declaration order for pragma Initial_Condition when SPARK_Mode
8567         is off. Do not complain about a useless package refinement when
8568         SPARK_Mode is off.
8569         (Analyze_Refined_Depends_In_Decl_Part): Refs
8570         is now a constant. Check the syntax of pragma Refined_Depends
8571         when SPARK_Mode is off.
8572         (Analyze_Refined_Global_In_Decl_Part):
8573         Check the syntax of pragma Refined_Global when SPARK_Mode is off.
8574         (Analyze_Refined_State_In_Decl_Part): Check the syntax of pragma
8575         Refined_State when SPARK_Mode is off.
8576         (Check_Dependence_List_Syntax): New routine.
8577         (Check_Global_List_Syntax): New routine.
8578         (Check_Initialization_List_Syntax): New routine.
8579         (Check_Item_Syntax): New routine.
8580         (Check_State_Declaration_Syntax): New routine.
8581         (Check_Refinement_List_Syntax): New routine.
8582         (Has_Extra_Parentheses): Moved to the top level of Sem_Prag.
8584 2014-02-24  Robert Dewar  <dewar@adacore.com>
8586         * a-tags.adb, s-os_lib.adb: Minor reformatting.
8588 2014-02-24  Thomas Quinot  <quinot@adacore.com>
8590         * g-sercom-mingw.adb, g-sercom-linux.adb (Raise_Error): Include
8591         strerror message, not just numeric errno value.
8593 2014-02-24  Doug Rupp  <rupp@adacore.com>
8595         * raise-gcc.c (exception_class_eq): Make endian neutral.
8597 2014-02-24  Ed Schonberg  <schonberg@adacore.com>
8599         * atree.ads, atree,adb (Copy_Separate_Tree): Remove Syntax_Only
8600         flag, and reset Etype and Analyzed attributes unconditionally
8601         when copying a tree that may be partly analyzed.
8602         * freeze.adb: Change calls to Copy_Separate_Tree accordingly.
8603         * sem_ch6.adb (Check_Inline_Pragma): If the Inline pragma appears
8604         within a subprogram body and applies to it, remove it from the
8605         body before making a copy of it, to prevent spurious errors when
8606         analyzing the copied body.
8608 2014-02-24  Thomas Quinot  <quinot@adacore.com>
8610         * s-os_lib.adb (Errno_Message): Do not depend on Integer'Image.
8611         * s-oscons-tmplt.c: On VxWorks, include adaint.h only after
8612         vxWorks.h has been included.  Also ensure that file attributes
8613         related definitions are output even in cases where socket support
8614         is not enabled.
8615         * a-tags.adb: Code clean up.
8616         * Make-generated.in (OSCONS_CPP, OSCONS_EXTRACT): Use -iquote
8617         instead of -I to add the main ada source directory to the header
8618         search path, in order to avoid conflict between our own "types.h"
8619         and VxWork's <types.h>.
8621 2014-02-24  Robert Dewar  <dewar@adacore.com>
8623         * atree.ads, atree.adb (Copy_Separate_Tree): Add Syntax_Only parameter.
8624         * debug.adb: Remove documentation of -gnatd.X, no longer used.
8625         * freeze.adb (Wrap_Imported_Subprogram): Fixed and activated.
8627 2014-02-24  Bob Duff  <duff@adacore.com>
8629         * gnat_ugn.texi: Improve documentation of gnatpp.
8631 2014-02-24  Thomas Quinot  <quinot@adacore.com>
8633         * g-stheme.adb, g-socthi-vms.adb, g-socthi-vms.ads,
8634         g-socthi-vxworks.adb, g-socthi-vxworks.ads, g-stseme.adb,
8635         g-socthi-mingw.adb, g-socthi-mingw.ads, g-socthi.adb,
8636         g-socthi.ads, g-socket.adb (Host_Error_Message): Return a string, not
8637         a chars_ptr, because on Windows this is a renaming of
8638         Socket_Error_Message.
8640 2014-02-24  Robert Dewar  <dewar@adacore.com>
8642         * a-direct.adb, sem_ch5.adb, a-cfdlli.adb, a-cfhase.adb, a-tags.adb,
8643         s-filatt.ads, a-cforma.adb, sem_ch6.adb, g-socthi-mingw.adb,
8644         a-cfhama.adb, a-cforse.adb, a-cofove.adb: Minor reformatting and code
8645         reorganization.
8647 2014-02-24  Thomas Quinot  <quinot@adacore.com>
8649         * Make-generated.in (OSCONS_CPP, OSCONS_EXTRACT): Make sure
8650         that the source directory containing s-oscons-tmplt.c is on the
8651         include path, so that all internal header files are available.
8653 2014-02-24  Ed Schonberg  <schonberg@adacore.com>
8655         * sem_ch5.adb (Analyze_Loop_Parameter_Specification): If the
8656         domain of iteration is an attribute reference 'Old, this is an
8657         Ada 2012 iterator and the loop must be rewritten as such.
8659 2014-02-24  Thomas Quinot  <quinot@adacore.com>
8661         * s-fileio.adb (Errno_Message): Remove, use shared version from
8662         s-os_lib instead.
8663         * s-crtrun.ads, Makefile.rtl: Remove now unused unit.
8664         * g-stseme (Socket_Error_Message): Reimplement in terms of new
8665         s-os_lib function.
8666         * g-socthi.ads, g-socthi.adb: Change profile of
8667         Socket_Error_Message to return String to allow the above.
8668         * g-socket.adb, g-socthi-mingw.adb, g-socthi-mingw.ads,
8669         * g-socthi-vms.adb, g-socthi-vms.ads, g-socthi-vxworks.adb,
8670         * g-socthi-vxworks.ads: Update to account for the above profile
8671         change.
8672         * a-tags.adb: Use strlen builtin binding provided by s-crtl.
8673         * s-crtl.ads (strncpy): New procedure.
8674         * s-os_lib.adb (Copy_Attributes): Import just once (strncpy):
8675         Use import from s-crtl.
8676         * a-envvar.adb, osint.adb: Use imports of C runtime functions
8677         from s-crtl instead of re-importing locally.
8679 2014-02-24  Hristian Kirtchev  <kirtchev@adacore.com>
8681         * sem_prag.adb (Analyze_Global_Item): Emit the
8682         variable related checks concerning volatile objects only when
8683         SPARK_Mode is on.
8685 2014-02-24  Robert Dewar  <dewar@adacore.com>
8687         * sem_ch5.adb (Analyze_Iterator_Specification): use
8688         Error_Msg_Ada_2012_Feature.
8690 2014-02-24  Jose Ruiz  <ruiz@adacore.com>
8692         * s-rident.ads (Profile_Info): For Ravenscar, the restrictions
8693         No_Local_Timing_Events and No_Specific_Termination_Handlers
8694         must be set, according to the Ravenscar profile definition
8695         in D.13(6/3).
8697 2014-02-24  Ed Schonberg  <schonberg@adacore.com>
8699         * sem_ch6.adb (Analyze_Expression_Function): If this is a
8700         completion, freeze return type and its designated type if needed.
8702 2014-02-24  Thomas Quinot  <quinot@adacore.com>
8704         * sem_ch13.adb (Analyze_Attribute_Definition_Clause, case
8705         'Address): When moving initialization statements to a freeze
8706         entity, keep them under a single node (i.e. do not unwrap
8707         expressions with actions), and set the Initialization_Statements
8708         attribute again so that processing of a later pragma Import can
8709         still remove them.
8711 2014-02-24  Claire Dross  <dross@adacore.com>
8713         * a-cfdlli.adb, a-cfdlli.ads, a-cfhama.adb, a-cfhama.ads,
8714         a-cfhase.adb, a-cfhase.ads, a-cforma.adb, a-cforma.ads,
8715         a-cforse.adb, a-cforse.ads, a-cofove.adb, a-cofove.ads: Rename
8716         Left/Right to First_To_Previous/Current_To_Last.
8718 2014-02-24  Thomas Quinot  <quinot@adacore.com>
8720         * adaint.h (struct file_attributes): New component "error"
8721         (__gnat_error_attributes): Accessor for the above.
8722         * adaint.c (__gnat_error_attributes): New subprogram
8723         (__gnat_stat): Fix returned value (expect errno value)
8724         (__gnat_stat_to_attr): Add management of error component (set to
8725         stat errno value, except for missing files where it is set to 0,
8726         and exists is set to 0).
8727         * osint.ads (File_Attributes_Size): Update per change above,
8728         also clarify documentation.
8729         * s-filatt.ads: New file, binding to file attributes related
8730         functions.
8731         * Makefile.rtl (s-filatt): New runtime unit.
8732         * s-crtl.ads (strlen): Expose binding to GCC builtin (falls back
8733         to library function if not available on target).
8734         * s-os_lib.ads, s-os_lib.adb (Errno_Message): New subprogram.
8735         * s-oscons-tmplt.c (SIZEOF_struct_file_attributes,
8736         SIZEOF_struct_dirent_alloc): New constants.
8737         * Make-generated.in (s-oscons.ads): Now requires adaint.h.
8738         * a-direct.adb (Fetch_Next_Entry): Fix incorrect buffer sizes.
8739         Perform appropriate error checking if stat fails (do not just
8740         ignore existing files if stat fails)
8741         * gcc-interface/Make-lang.in (GNAT_ADA_OBJS, GNATBIND_OBJS): Update
8742         dependencies.
8744 2014-02-24  Hristian Kirtchev  <kirtchev@adacore.com>
8746         * sem_prag.adb (Analyze_Global_Item): Move the check concerning
8747         the use of volatile objects as global items in a function to
8748         the variable related checks section.
8749         * sem_util.adb (Async_Readers_Enabled): Directly call
8750         Has_Enabled_Property.
8751         (Async_Writers_Enabled): Directly call Has_Enabled_Property.
8752         (Effective_Reads_Enabled): Directly call Has_Enabled_Property.
8753         (Effective_Writes_Enabled): Directly call Has_Enabled_Property.
8754         (Has_Enabled_Property): Rename formal parameter State_Id to Item_Id.
8755         Update the comment on usage. State_Has_Enabled_Property how handles
8756         the original logic of the routine. Add processing for variables.
8757         (State_Has_Enabled_Property): New routine.
8758         (Variable_Has_Enabled_Property): New routine.
8760 2014-02-24  Robert Dewar  <dewar@adacore.com>
8762         * sinfo.ads, sem_ch12.adb, sem_res.adb, sem_ch4.adb, par-ch12.adb:
8763         Minor reformatting.
8764         * atree.ads, atree.adb (Node35): New function.
8765         (Set_Node35): New procedure.
8766         * debug.adb: Define new debug flag -gnatd.X.
8767         * einfo.ads, einfo.adb (Import_Pragma): New field.
8768         * freeze.adb (Wrap_Imported_Procedure): New procedure (not
8769         really active yet, has to be activated with -gnatd.X.
8770         * sem_prag.adb (Set_Imported): Set new Import_Pragma
8771         field (Set_Imported): Don't set Is_Public (see
8772         Freeze.Wrap_Imported_Subprogram)
8773         * par-ch3.adb (P_Component_List): Handle unexpected null component.
8775 2014-02-24  Yannick Moy  <moy@adacore.com>
8777         * sem_ch3.adb: Correct reference to SPARK RM in error messages.
8778         * gnat_rm.texi: Correct documentation of attribute Update.
8780 2014-02-24  Ed Schonberg  <schonberg@adacore.com>
8782         * sem_ch5.adb (Analyze_Iterator_Specification): Reject container
8783         iterator in older versions of Ada.
8785 2014-02-24  Gary Dismukes  <dismukes@adacore.com>
8787         * sem_ch5.adb, sem_aux.ads, sem_ch12.adb, gnat_ugn.texi, par.adb,
8788         par-ch12.adb: Change spelling 'parametrization' to 'parameterization'.
8790 2014-02-24  Ed Schonberg  <schonberg@adacore.com>
8792         * sinfo.ads, sinfo.adb: New attribute Generalized_Indexing, for
8793         indexed_components that are instances of Ada 2012 container
8794         indexing operations. Analysis and resolution of such nodes
8795         is performed on the attribute, and the original source is
8796         preserved for ASIS operations. If expansion is enabled, the
8797         indexed component is replaced by the value of this attribute,
8798         which is in a call to an Indexing aspect, in most case wrapped
8799         in a dereference operation.
8800         * sem_ch4.adb (Analyze_Indexed_Component): Create
8801         Generalized_Indexing attribute when appropriate.
8802         (Analyze_Call): If prefix is not overloadable and has an indexing
8803         aspect, transform into an indexed component so it can be analyzed
8804         as a potential container indexing.
8805         (Analyze_Expression): If node is an indexed component with a
8806         Generalized_ Indexing, do not re-analyze.
8807         * sem_res.adb (Resolve_Generalized_Indexing): Complete resolution
8808         of an indexed_component that has been transformed into a container
8809         indexing operation.
8810         (Resolve_Indexed_Component): Call the above when required.
8811         (Resolve): Do not insert an explicit dereference operation on
8812         an indexed_component whose type has an implicit dereference:
8813         the operation is inserted when resolving the related
8814         Generalized_Indexing.
8816 2014-02-24  Olivier Ramonat  <ramonat@adacore.com>
8818         * gnat_rm.texi, gnat_ugn.texi: Replace Ada Compiler by Ada Development
8819         Environment.
8821 2014-02-24  Hristian Kirtchev  <kirtchev@adacore.com>
8823         * sem_prag.adb (Check_Constituent_Usage): Remove leading spaces in
8824         error messages.
8825         (Inconsistent_Mode_Error): Remove leading spaces in error messages.
8826         Merge the expected and available mode errors.
8827         (Report_Unused_Constituents): Remove leading spaces in error messages.
8828         (Report_Unused_States): Remove leading spaces in error messages.
8830 2014-02-24  Thomas Quinot  <quinot@adacore.com>
8832         * par_sco.adb (Traverse_One): Refine categorization of statement
8833         SCOs.
8835 2014-02-24  Robert Dewar  <dewar@adacore.com>
8837         * aspects.ads, aspects.adb: Remove aspects Ada_2005 and Ada_2012,
8838         Pure_05, Pure_12 and Preelaborate_05.
8839         * gnat_rm.texi: Update accordingly.
8840         * sem_prag.adb: Document one argument form of Ada_05/Ada_2005
8841         pragmas Document one argument form of Ada_12/Ada_2012 pragmas
8842         Recognize one argument form of these pragmas only in GNAT mode
8843         (-gnatg).
8845 2014-02-24  Ed Schonberg  <schonberg@adacore.com>
8847         * s-dimmks.ads: Replace symbol for temperature, previously the
8848         Greek letter Theta, by the ASCII @ sign.
8849         * s-diflio.ads: ditto.
8851 2014-02-24  Robert Dewar  <dewar@adacore.com>
8853         * exp_ch4.adb: Minor code reorganization (use OR for boolean
8854         variables).
8855         * sem_ch3.adb, sem_prag.adb, freeze.adb: Minor reformatting.
8857 2014-02-24  Ben Brosgol  <brosgol@adacore.com>
8859         * gnat_ugn.texi, projects.texi: Added the necessary conditionalization
8860         so that references to gnatmem and ASIS tools do not appear in the FSF
8861         edition of the GNAT User's Guide.
8863 2014-02-24  Yannick Moy  <moy@adacore.com>
8865         * freeze.adb (Freeze_Entity): Do not issue warning
8866         for pre/post being ignored on imported subprogram in GNATprove
8867         mode.
8869 2014-02-24  Robert Dewar  <dewar@adacore.com>
8871         * exp_ch5.adb, sem_ch5.adb, sem_type.adb, sem_res.adb, sem_attr.adb,
8872         stand.ads, sem_eval.adb: Minor reformatting.
8874 2014-02-24  Yannick Moy  <moy@adacore.com>
8876         * sem_prag.adb: Minor rewording in error message.
8878 2014-02-24  Johannes Kanig  <kanig@adacore.com>
8880         * exp_util.adb (Expand_Subtype_From_Expr): Do not expand subtypes in
8881         GNATprove_mode, gnat2why doesn't need nor use these types.
8883 2014-02-24  Gary Dismukes  <dismukes@adacore.com>
8885         * exp_ch4.adb (Expand_N_Op_Expon): On the AAMP
8886         target, in the case of signed integer exponentiation that uses a
8887         run-time routine, always select the Exp_* versions, since overflow
8888         checking is automatically done by AAMP arithmetic instructions.
8890 2014-02-24  Hristian Kirtchev  <kirtchev@adacore.com>
8892         * sem_ch13.adb (Analyze_Aspect_Specifications):
8893         When the related context is a package instace, insert pragma
8894         Abstract_State after all internally-generated renamings related
8895         to the instance "header".
8897 2014-02-24  Ed Schonberg  <schonberg@adacore.com>
8899         * sem_ch3.adb (Analyze_Declarations): Analyze Contract of abstract
8900         subprograms.
8901         * sem_disp.adb (Check_Dispatching_Context): A non-dispatching
8902         call to an abstract subprogram is legal if it appears in a
8903         pre/postcondition of another abstract operation.
8905 2014-02-24  Sergey Rybin  <rybin@adacore.com frybin>
8907         * gnat_ugn.texi: Misc updates.
8909 2014-02-24  Hristian Kirtchev  <kirtchev@adacore.com>
8911         * exp_prag.adb (Expand_Old): Set the type of the generated temporary.
8913 2014-02-24  Gary Dismukes  <dismukes@adacore.com>
8915         * layout.adb (Layout_Variant_Record): Instantiate
8916         Generic_Check_Choices and call Check_Choices before calling
8917         Build_Discr_Checking_Funcs, since we need Others_Discrete_Choices
8918         set to prevent generating incorrect discriminant-checking
8919         functions for 'others' variants (functions that unconditionally
8920         return True rather than accounting for the values covered by the
8921         'others' choice).
8922         * sem_eval.ads (Subtypes_Statically_Compatible): Add formal
8923         Formal_Derived_Matching.
8924         (Subtypes_Statically_Match): Add formal Formal_Derived_Matching.
8925         * sem_eval.adb (Subtypes_Statically_Compatible): Pass new
8926         Formal_Derived_Matching formal to Subtypes_Statically_Match.
8927         (Subtypes_Statically_Match): Suppress the Object_Size matching
8928         test in the case where Formal_Derived_Matching is True.
8929         * sem_ch12.adb (Validate_Derived_Type_Instance): Pass
8930         True for Formal_Derived_Matching_Formal on the call to
8931         Subtypes_Statically_Compatible.
8933 2014-02-23  Eric Botcazou  <ebotcazou@adacore.com>
8935         * gcc-interface/Make-lang.in (ADA_TOOLS_FLAGS_TO_PASS): Robustify.
8937 2014-02-23  Eric Botcazou  <ebotcazou@adacore.com>
8939         * gcc-interface/utils2.c (build_simple_component_ref): Fix formatting.
8940         Look through a conversion between original and packable version to get
8941         the base object.
8942         (build_component_ref): Rework comment and fix formatting.
8944 2014-02-20  Sergey Rybin  <rybin@adacore.com frybin>
8946         * gnat_ugn.texi, vms_data.ads (gnatelim): Add description of
8947         project-specific options.
8949 2014-02-20  Ed Schonberg  <schonberg@adacore.com>
8951         * a-cbdlli.adb (Insert): When capacity exceeded, raise Capacity_Error,
8952         not Constraint_Error.
8953         * a-cbmutr.adb (Append_Child, Insert_Child, Prepend_Child): Ditto.
8954         * sem_ch5.adb: Code clean up.
8956 2014-02-20  Hristian Kirtchev  <kirtchev@adacore.com>
8958         * sem_prag.adb (Usage_Error): Remove local
8959         constant Typ. Remove the specialized diagnostics for unconstrained
8960         or tagged items as those are not part of the explicit input set
8961         of the related subprogram and should not be flagged.
8963 2014-02-20  Ed Schonberg  <schonberg@adacore.com>
8965         * sem_attr.adb: Add guard to preserve all errors.
8967 2014-02-20  Vincent Celier  <celier@adacore.com>
8969         * switch-m.adb (Normalize_Compiler_Switches): Take into account
8970         switches that are recorded in ALI files: -gnateA, -gnateE,
8971         -gnateF, -gnateinn, -gnateu, -gnateV and -gnateY.
8973 2014-02-20  Ed Schonberg  <schonberg@adacore.com>
8975         * sem_ch5.adb (Analyze_Iterator_Specification): Check legality
8976         of an element iterator form over a formal container with an
8977         Iterable aspect.
8978         * exp_ch5.adb (Build_Formal_Container_Iteration): Utility
8979         to create declaration and loop statements for both forms of
8980         container iterators.
8981         (Expand_Formal_Container_Element_Iterator): New procedure
8982         to handle loops of the form  "for E of C" when C is a formal
8983         container.
8984         (Expand_Formal_Container_Iterator): Code cleanup.
8986 2014-02-20  Hristian Kirtchev  <kirtchev@adacore.com>
8988         * sem_prag.adb (Add_Item_To_Name_Buffer): New routine.
8989         (Analyze_Contract_Case): Remove the use of
8990         "may". Replace "aspect Contract_Cases" to avoid categorization
8991         of aspect vs pragma.
8992         (Analyze_External_Property_In_Decl_Part): Remove the use of "formal".
8993         (Analyze_Global_Item): Remove
8994         the use of "formal", specify the subprogram.  Split the
8995         error message about a state with visible refinement into
8996         two. Remove the use of "global" from "volatile global item".
8997         (Analyze_Initialization_Item): Ensure that the SPARK RM reference
8998         is on one line.
8999         (Analyze_Input_Output): Update the call to
9000         Check_Mode. Specify the duplicated item. Reword the error
9001         message concerning an input of a null output list. Use "\"
9002         for error message continuation.
9003         (Analyze_Part_Of): Remove
9004         the use of "may". Use "\" for error message continuation.
9005         (Analyze_Refined_Depends_In_Decl_Part): Update the error
9006         message concerning a useless refinement to match the format
9007         of Refined_Global.
9008         (Analyze_Refined_Global_In_Decl_Part): Reword the error message
9009         concerning a useless refinement.
9010         (Analyze_Refinement_Clause): Use "\" for error message continuation.
9011         (Check_Constituent_Usage): Use "\" for error message continuation.
9012         (Check_Dependency_Clause): Use "\" for error message continuation.
9013         (Check_Matching_Constituent): Use "\" for error message continuation.
9014         (Check_Missing_Part_Of): Use "\" for error message continuation.
9015         (Check_Mode): Renamed to
9016         Check_Role. Update the comment on usage. Redo the error reporting
9017         to use Role_Error.
9018         (Check_Mode_Restriction_In_Enclosing_Context): Use "\" for error
9019         message continuation.
9020         (Find_Mode): Renamed to Find_Role. Update the parameter profile along
9021         with comment on usage. Update all occurrences of Is_Input and Is_Output.
9022         (Inconsistent_Mode_Error): Use "\" for error message continuation.
9023         (Input_Match): Use "\" for error message continuation.
9024         (Role_Error): New routine.
9025         (Set_Convention_From_Pragma): Use "\" for error message continuation.
9026         (Usage_Error): Add local variable Error_Msg. Build specialized error
9027         message showcasing the offending item kind. Redo the diagnostics for
9028         unconstrained types.
9030 2014-02-20  Ed Schonberg  <schonberg@adacore.com>
9032         * exp_util.adb (Is_Iterated_Container): Use high-level primitives
9033         to determine whether a type is a container type, rather than
9034         examining only its type declaration, so that subtypes and derived
9035         types are handled properly.
9037 2014-02-20  Sergey Rybin  <rybin@adacore.com frybin>
9039         * gnat_ugn.texi: gnatmetric: add description of project-specific
9040         options.
9042 2014-02-20  Ed Schonberg  <schonberg@adacore.com>
9044         * sem_attr.adb (Analyze_Attribute, case 'Update): Verify that
9045         all choices in an association for a record type have the same
9046         type, as is done for record aggregates.
9048 2014-02-20  Robert Dewar  <dewar@adacore.com>
9050         * a-cborma.adb, a-cbhama.adb, a-cbdlli.adb, a-cbmutr.adb: Use pragma
9051         Unmodified rather than Warnings (Off). Make comments
9052         uniform in the four affected units.
9054 2014-02-20  Robert Dewar  <dewar@adacore.com>
9056         * sem_ch13.adb (Analyze_Attribute_Definition_Clause, case
9057         Object_Size): For non-scalar types allow any value that is a
9058         multiple of 8.
9059         * gnat_rm.texi: Document Object_Size for composites more clearly.
9061 2014-02-20  Yannick Moy  <moy@adacore.com>
9063         * sem_util.ads, sem_util.adb (Default_Initialization): Remove function.
9065 2014-02-20  Ed Schonberg  <schonberg@adacore.com>
9067         * stand.ads: Raise_Type: new predefined entity, used as the type
9068         of a Raise_Expression prior to resolution.
9069         * cstand.adb: Build entity for Raise_Type.
9070         * sem_ch11.adb (Analyze_Raise_Expression): use Raise_Type as the
9071         initial type of the node.
9072         * sem_type.adb (Covers): Raise_Type is compatible with all
9073         other types.
9074         * sem_res.adb (Resolve): Remove special handling of Any_Type on
9075         Raise_Expression nodes.
9076         (Resolve_Raise_Expression): Signal ambiguity if the type of the
9077         context is still Raise_Type.
9079 2014-02-20  Robert Dewar  <dewar@adacore.com>
9081         * sem_ch12.adb (Validate_Access_Type_Instance): Add message if
9082         mismatching predicates.
9083         * sem_ch6.adb (Check_Conformance): Give better messages on
9084         predicate mismatch.
9085         * sem_eval.adb (Predicates_Match): Move to spec.
9086         * sem_eval.ads (Predicates_Match): Moved here from body.
9088 2014-02-20  Ed Schonberg  <schonberg@adacore.com>
9090         * a-cbmutr.adb: Use default value in Insert_Child.
9092 2014-02-20  Vincent Celier  <celier@adacore.com>
9094         * gnatcmd.adb, make.adb, prj-makr.adb, clean.adb: Call
9095         Stringt.Initialize in all project aware tools.
9097 2014-02-20  Doug Rupp  <rupp@adacore.com>
9099         * gnat_ugn.texi: Document gnatbind -X option.
9100         * vms_data.ads: Minor warnings documentation reformatting.
9102 2014-02-20  Ed Schonberg  <schonberg@adacore.com>
9104         * exp_ch3.adb (Expand_Freeze_Array_Type): Only create invariant
9105         procedure for a base type.
9107 2014-02-20  Robert Dewar  <dewar@adacore.com>
9109         * sem_ch4.adb (Analyze_Case_Expression): Get type from first
9110         expression with type info.
9111         * sem_ch13.adb: Minor reformatting.
9112         * sem_eval.adb (Subtypes_Statically_Match): Make sure we return
9113         False if predicates do not match on the two types.
9115 2014-02-20  Arnaud Charlet  <charlet@adacore.com>
9117         * sem_prag.adb (Analyze_Pragma [pragma Attach_Handler]):
9118         In Relaxed_RM_Semantics mode, allow any static integer value,
9119         for compatibility with other compilers.
9121 2014-02-20  Vincent Celier  <celier@adacore.com>
9123         * errutil.adb (Initialize): Properly initialize entry in table
9124         Warnings when warnings are suppressed.
9126 2014-02-20  Robert Dewar  <dewar@adacore.com>
9128         * s-os_lib.ads: Add warning about non-portability of Rename_File.
9129         * sem_util.ads, sem_util.adb (Is_Junk_Name): New function.
9130         * sem_warn.adb: Use Is_Junk_Name to suppress some warnings.
9131         * gnat_ugn.texi: Document no warnings on junk variable names.
9132         * layout.adb: Minor code reorganization (use Ekind_In).
9133         * stringt.adb: Move initialization of Null_String_Id to Initialize
9134         routine.
9136 2014-02-20  Ed Schonberg  <schonberg@adacore.com>
9138         * sem_ch13.adb: Initialize optional Element_Id.
9140 2014-02-20  Robert Dewar  <dewar@adacore.com>
9142         * s-os_lib.ads (Rename_File): Minor commment addition.
9144 2014-02-20  Thomas Quinot  <quinot@adacore.com>
9146         * einfo.ads: Minor reformatting.
9148 2014-02-20  Hristian Kirtchev  <kirtchev@adacore.com>
9150         * aspects.adb (Exchange_Aspects): New routine.
9151         * aspects.ads (Exchange_Aspects): New routine.
9152         * atree.adb (Rewrite): Do not check whether the save node has
9153         aspects as it never will, instead check the node about to be clobbered.
9154         * einfo.adb (Write_Field25_Name): Abstract_States can appear in
9155         entities of generic packages.
9156         * sem_ch6.adb (Analyze_Expression_Function): Fix the parent
9157         pointer of an aspect specification list after rewriting takes place.
9158         * sem_ch7.adb (Analyze_Package_Body_Helper): Swap the aspect
9159         specifications of the generic template and the copy used for analysis.
9160         * sem_ch12.adb (Analyze_Generic_Package_Declaration): Swap
9161         the aspect specifications of the generic template and the
9162         copy used for analysis.
9163         (Analyze_Package_Instantiation): Propagate the aspect specifications
9164         from the generic template to the instantiation.
9165         (Build_Instance_Compilation_Unit_Nodes): Propagate the aspect
9166         specifications from the generic template to the instantiation.
9167         * sem_ch13.adb (Analyze_Aspect_Specifications): Handle aspects
9168         Abstract_State, Initializes and Initial_Condition when they
9169         apply to a package instantiation.
9171 2014-02-20  Robert Dewar  <dewar@adacore.com>
9173         * stringt.adb: Add call to Initialize in package initialization.
9175 2014-02-20  Robert Dewar  <dewar@adacore.com>
9177         * a-crbtgk.adb, a-cihama.adb, a-coinve.adb, a-ciorse.adb, a-crbtgo.adb,
9178         a-cidlli.adb, a-cimutr.adb, a-cihase.adb, a-cohama.adb, a-coorse.adb,
9179         a-chtgke.adb, a-chtgop.adb, a-comutr.adb, a-ciorma.adb, a-cobove.adb,
9180         a-convec.adb, a-cohase.adb, a-chtgbk.adb, a-chtgbo.adb: Minor
9181         reformatting.
9183 2014-02-20  Bob Duff  <duff@adacore.com>
9185         * s-os_lib.ads: Minor: Remove incorrect comment.
9187 2014-02-20  Robert Dewar  <dewar@adacore.com>
9189         * sem_elab.adb (Check_Elab_Assign): Clearer warning message.
9191 2014-02-20  Ed Schonberg  <schonberg@adacore.com>
9193         * a-cborma.adb (Assign): When creating a node without a specified
9194         element, insert an uninitialized element in the map, because
9195         the instance may provide an element type with a default
9196         initialization, e.g a scalar with a Default_Value aspect.
9197         * a-cbhama.adb (Assign_Key): Remove useless Allocate procedure.
9198         (Insert): In the version without explicit element, provide an
9199         uninitialized element, as above.
9200         * a-cbdlli.adb (Append): In the version without explicit element,
9201         provide an uninitalized element, as above.
9202         (Allocate): Remove unused version.
9204 2014-02-20  Robert Dewar  <dewar@adacore.com>
9206         * sem_elab.adb: Minor code reorganization (use Nkind_In).
9207         * stringt.adb: Remove temporary pragma Warnings (Off).
9208         * stringt.ads: Add pragma Elaborate_Body to ensure initialization
9209         of Null_String_Id.
9211 2014-02-20  Matthew Heaney  <heaney@adacore.com>
9213         * a-chtgbk.adb (Replace): Use correct offset when calculating bucket
9214         index.
9216 2014-02-20  Ed Schonberg  <schonberg@adacore.com>
9218         * sem_ch5.adb (Analyze_Iterator_Specification): Initialize
9219         properly the cursor type for subsequent volatile testing in SPARK
9220         mode, when domain is a formal container with an Iterabe aspect.
9222 2014-02-20  Robert Dewar  <dewar@adacore.com>
9224         * errout.adb (Set_Warnings_Mode_Off): Add Reason argument.
9225         (Set_Specific_Warning_Off): Add Reason argument.
9226         * errout.ads (Set_Warnings_Mode_Off): Add Reason argument.
9227         (Set_Specific_Warning_Off): Add Reason argument.
9228         * erroutc.adb (Warnings_Entry): Add Reason field
9229         (Specific_Warning_Entry): Add Reason field.
9230         (Warnings_Suppressed): return String_Id for Reason.
9231         (Warning_Specifically_Suppressed): return String_Id for Reason.
9232         * erroutc.ads (Warnings_Entry): Add Reason field.
9233         (Specific_Warning_Entry): Add Reason field.
9234         (Set_Specific_Warning_Off): Add Reason argument.
9235         (Set_Warnings_Mode_Off): Add Reason argument.
9236         (Warnings_Suppressed): return String_Id for Reason.
9237         (Warning_Specifically_Suppressed): return String_Id for Reason.
9238         * errutil.adb (Warnings_Suppressed): returns String_Id for Reason
9239         (Warning_Specifically_Suppressed): returns String_Id for Reason
9240         * gnat_rm.texi: Document that Warning parameter is string literal
9241         or a concatenation of string literals.
9242         * par-prag.adb: New handling for Reason argument.
9243         * sem_prag.adb (Analyze_Pragma, case Warning): New handling
9244         for Reason argument.
9245         * sem_util.ads, sem_util.adb (Get_Reason_String): New procedure.
9246         * sem_warn.ads (Warnings_Off_Entry): Add reason field.
9247         * stringt.adb: Set Null_String_Id.
9248         * stringt.ads (Null_String_Id): New constant.
9250 2014-02-20  Robert Dewar  <dewar@adacore.com>
9252         * einfo.ads: Minor comment addition: Etype of package is
9253         Standard_Void_Type.
9254         * checks.adb, exp_aggr.adb, exp_atag.adb, exp_attr.adb, exp_ch13.adb,
9255         exp_ch2.adb, exp_ch3.adb, exp_ch4.adb, exp_ch5.adb, exp_ch6.adb,
9256         exp_ch7.adb, exp_ch9.adb, exp_dbug.adb, exp_disp.adb, exp_imgv.adb,
9257         exp_intr.adb, exp_prag.adb, exp_sel.adb, exp_strm.adb, exp_util.adb,
9258         freeze.adb, rtsfind.adb, sem_aggr.adb, sem_attr.adb, sem_ch10.adb,
9259         sem_ch12.adb, sem_ch13.adb, sem_ch3.adb, sem_ch4.adb, sem_ch5.adb,
9260         sem_ch6.adb, sem_ch8.adb, sem_dim.adb, sem_prag.adb, sem_res.adb,
9261         sem_util.adb, tbuild.adb, tbuild.ads: Remove New_Reference_To.
9262         Replace all calls with calls to New_Occurrence_Of.
9264 2014-02-20  Robert Dewar  <dewar@adacore.com>
9266         * par-util.adb (Ignore, case of right paren): Make this a
9267         serious error.
9269 2014-02-19  Robert Dewar  <dewar@adacore.com>
9271         * sem_ch5.adb, sem_prag.adb, sem_attr.adb: Minor reformatting.
9272         * debug.adb: Remove -gnatd.X switch, no longer used.
9273         * styleg.adb (Check_Then): Remove check of -gnatd.X, check is
9274         now always made.
9276 2014-02-19  Bob Duff  <duff@adacore.com>
9278         * g-socket.ads: Minor: Correct some comments.
9280 2014-02-19  Ed Schonberg  <schonberg@adacore.com>
9282         * sem_ch5.adb: Inhibit iterator rewriting in ASIS mode.
9284 2014-02-19  Arnaud Charlet  <charlet@adacore.com>
9286         * sem_ch13.adb (Analyze_Aspect_Specifications): Do not generate
9287         an error on out of range priorities if Relaxed_RM_Semantics.
9288         * sem_prag.adb (Analyze_Pragma): Ditto.
9290 2014-02-19  Bob Duff  <duff@adacore.com>
9292         * sem_attr.adb (Resolve_Attribute): Detect the case of F'Access
9293         where F denotes the renaming of an enumeration literal, and
9294         issue a specialized error message.
9296 2014-02-19  Matthew Heaney  <heaney@adacore.com>
9298         * a-chtgop.ads (Checked_Index): New operation.
9299         (Next): Changed mode of hash table.
9300         * a-chtgop.adb (Adjust, Delete_Node_Sans_Free): Detect tampering
9301         (Generic_Read, Reserve_Capacity): Ditto.
9302         (Generic_Equal): Detect tampering.
9303         (Next): Changed mode of hash table, detect tampering.
9304         * a-chtgke.ads (Checked_Index, Checked_Equivalent_Keys): New
9305         operation.
9306         (Find): Changed mode of hash table.
9307         * a-chtgke.adb (Checked_Equivalent_Keys): New operation
9308         (Delete_Key_Sans_Free, Generic_Conditional_Insert): Detect
9309         tampering.
9310         (Find): Changed mode of hash table, check for tampering.
9311         (Generic_Replace_Element): Check for tampering.
9312         * a-chtgbk.ads (Checked_Index, Checked_Equivalent_Keys): New operation.
9313         * a-chtgbk.adb (Checked_Index, Checked_Equivalent_Keys): New
9314         operation (Delete_Key_Sans_Free, Generic_Conditional_Insert):
9315         Detect tampering.
9316         (Find, Generic_Replace_Element): Check for tampering.
9317         * a-chtgbo.ads (Checked_Index): New operation.
9318         * a-chtgbo.adb (Checked_Index): New operation
9319         (Delete_Node_Sans_Free, Generic_Equal): Detect tampering.
9320         (Generic_Read, Next): Ditto.
9321         * a-cohase.adb, a-cihase.adb (Is_In): Changed mode of hash
9322         table (Difference, Intersection): Use variable view of
9323         source, detect tampering (Find, Is_Subset, Overlap): Use
9324         variable view of container (Symmetric_Difference, Union):
9325         Detect tampering (Vet): Use Checked_Index to detect tampering
9326         (Constant_Reference, Element, Find): Use variable view of
9327         container.
9328         (Update_Element_Preserving_Key): Detect tampering.
9329         * a-cbhase.adb (Difference, Find, Is_In): Use variable view
9330         of container.
9331         (Is_Subset): Ditto.
9332         (Equivalent_Sets, Overlap): Use Node's Next component.
9333         (Vet): Use Checked_Index to detect tampering.
9334         (Constant_Reference, Element, Find): Use variable view of container.
9335         (Update_Element_Preserving_Key): Detect tampering.
9336         * a-cohama.adb, a-cihama.adb, a-cbhama.adb (Constant_Reference,
9337         Element, Find): Use variable view of container.
9338         (Reference): Rename hash table component.
9339         (Vet): Use Checked_Index to detect tampering.
9341 2014-02-19  Arnaud Charlet  <charlet@adacore.com>
9343         * adabkend.adb (Scan_Compiler_Arguments): Add missing handling
9344         of -nostdinc.
9346 2014-02-19  Thomas Quinot  <quinot@adacore.com>
9348         * tbuild.adb (New_Occurrence_Of, New_Rerefence_To): Guard
9349         against calls without Def_Id.
9351 2014-02-19  Claire Dross  <dross@adacore.com>
9353         * a-cfdlli.ads, a-cfhase.ads, a-cforma.ads, a-cfhama.ads, a-cforse.ads,
9354         a-cofove.ads: Add global annotations to subprograms.
9356 2014-02-19  Hristian Kirtchev  <kirtchev@adacore.com>
9358         * sem_prag.adb (Analyze_Initial_Condition_In_Decl_Part): Remove
9359         constants Errors, Pack_Id and Pack_Init. Remove variable Vars.
9360         Initial_Condition no longer requires the presence of pragma
9361         Initialized. Do not try to diagnose whether all variables mentioned in
9362         pragma Initializes also appear in Initial_Condition.
9363         (Collect_Variables): Removed.
9364         (Match_Variable): Removed.
9365         (Match_Variables): Removed.
9366         (Report_Unused_Variables): Removed.
9368 2014-02-19  Thomas Quinot  <quinot@adacore.com>
9370         * gnat_rm.texi (pragma Stream_Convert): Minor rewording.
9372 2014-02-19  Robert Dewar  <dewar@adacore.com>
9374         * sem_util.adb, sem_util.ads, prj-conf.adb, s-os_lib.adb: Minor
9375         reformatting.
9377 2014-02-19  Vincent Celier  <celier@adacore.com>
9379         * prj-part.adb (Parse_Single_Project): Use the fully resolved
9380         project path, with all symbolic links resolved, to check if the
9381         same project is imported with a different unresolved path.
9382         * prj-tree.ads (Project_Name_And_Node): Component Canonical_Path
9383         changed to Resolved_Path to reflect that all symbolic links
9384         are resolved.
9386 2014-02-19  Ed Schonberg  <schonberg@adacore.com>
9388         * sem_util.ads, sem_util.adb (Get_Cursor_Type): Moved to sem_util
9389         from sem_ch13, for use elsewhere.
9390         * sem_ch13.adb (Get_Cursor_Type): Moved to sem_util.
9391         * sem_ch5.adb (Analyze_Iterator_Specification): Set properly the
9392         cursor type on the loop variable when the iteration is over o
9393         formal container.
9395 2014-02-19  Vincent Celier  <celier@adacore.com>
9397         * prj-conf.adb (Add_Default_GNAT_Naming_Scheme): Add declaration
9398         for an empty Target (Check_Target): Never fail when an empty
9399         target is declared in the configuration project.
9401 2014-02-19  Ed Schonberg  <schonberg@adacore.com>
9403         * sem_prag.adb (Check_Arg_Is_Local_Name): Argument is local if
9404         the pragma comes fron a predicate aspect and the context is a
9405         record declaration within the scope that declares the type.
9407 2014-02-19  Robert Dewar  <dewar@adacore.com>
9409         * gnat_rm.texi: Minor clarifications.
9410         * expander.adb, sem_aggr.adb: Add comments.
9412 2014-02-19  Ed Schonberg  <schonberg@adacore.com>
9414         * sem_prag.adb (Check_Arg_Is_Local_Name): For an aspect that
9415         applies to a subprogram body, the name is the current scope,
9416         rather than being declared in the current scope.
9417         (Analyze_Pragma, case No_Return): Handle properly a No_Return
9418         aspect applied to a subprogram body.
9420 2014-02-19  Ed Schonberg  <schonberg@adacore.com>
9422         * sem_ch13.adb (Resolve_Iterable_Operation): Improve resolution
9423         of overloaded subprograms, and fix bug in handling of primitive
9424         operation Element.
9426 2014-02-19  Pascal Obry  <obry@adacore.com>
9428         * s-os_lib.adb: Minor reformatting.
9430 2014-02-19  Yannick Moy  <moy@adacore.com>
9432         * expander.adb (Expand): Do nothing inside generics.
9433         * sem_aggr.adb (Aggregate_Constraint_Checks): Do nothing inside
9434         generics.
9436 2014-02-19  Yannick Moy  <moy@adacore.com>
9438         * exp_ch2.adb: Remove useless 'with' of unit Uintp.
9440 2014-02-19  Robert Dewar  <dewar@adacore.com>
9442         * sem_ch3.adb, style.adb, sem_prag.adb, sem_ch13.adb: Minor reformatting
9443         * a-sequio.adb: Remove useless pragma Extensions_Allowed (no
9444         longer needed).
9446 2014-02-19  Claire Dross  <dross@adacore.com>
9448         * a-cfdlli.ads, a-cfhase.ads, a-cforma.ads, a-cfhama.ads,
9449         a-cforse.ads, a-cofove.ads: Add Iterable aspect to formal containers.
9451 2014-02-19  Hristian Kirtchev  <kirtchev@adacore.com>
9453         * sem_ch3.adb (Analyze_Declarations): Analyze
9454         a package contract at the end of the private declarations (if
9455         applicable), otherwise analyze it and the end of the visible
9456         declarations.
9458 2014-02-19  Ed Schonberg  <schonberg@adacore.com>
9460         * style.adb (Missing_Overriding): If subprogram is an
9461         instantiation, place warning on the instance node itself,
9462         without mention of the original generic. Do not emit message
9463         if explicit Ada version is older than the introduction of the
9464         overriding indicator.
9466 2014-02-19  Yannick Moy  <moy@adacore.com>
9468         * gnat_rm.texi: Doc clarifications.
9470 2014-02-19  Yannick Moy  <moy@adacore.com>
9472         * exp_util.adb (Remove_Side_Effects): Do not remove side-effects
9473         inside a generic.
9475 2014-02-19  Ed Schonberg  <schonberg@adacore.com>
9477         * sem_ch13.adb (Get_Cursor_Type): Obtain cursor type from
9478         specified First primitive, rather than by name.
9479         (Validate_Iterable_Aspect, Resolve_Iterable_Operation): Use it,
9480         and extend error checking for missing primitives and incorrect
9481         signatures.
9483 2014-02-19  Ed Schonberg  <schonberg@adacore.com>
9485         * sem_ch3.adb (Check_Pragma_Implemented): Detect additional
9486         errors when a Synchronization aspect on an overriding protected
9487         operation does not match the given aspect on the overridden
9488         operation of an ancestor interface.
9490 2014-02-19  Hristian Kirtchev  <kirtchev@adacore.com>
9492         * sem_prag.adb (Check_Loop_Pragma_Grouping): New routine.
9493         (Check_Loop_Pragma_Placement): Update
9494         comment on usage. Remove local variables Orig_Stmt and
9495         Within_Same_Sequence. Check that the current Loop_Invariant or
9496         Loop_Variant pragma is grouped together with other such pragmas.
9497         (Is_Loop_Pragma): New routine.
9498         (Prev_In_Loop): Removed.
9500 2014-02-19  Robert Dewar  <dewar@adacore.com>
9502         * par-ch6.adb (P_Return): For extended return, end column lines
9503         up with RETURN.
9504         * par.adb: Minor documentation clarification.
9506 2014-02-19  Yannick Moy  <moy@adacore.com>
9508         * sem_prag.adb (Check_Loop_Pragma_Placement): Add check
9509         that Loop_Invariant and Loop_Variant appear consecutively.
9510         * gnat_rm.texi Update documentation of Loop_Invariant and
9511         Loop_Variant pragmas.
9513 2014-02-19  Robert Dewar  <dewar@adacore.com>
9515         * debug.adb: Document -gnatd.X.
9516         * par-ch5.adb (P_If_Statement): Always check THEN, even if not
9517         first token
9518         (Check_Then_Column): Ditto.
9519         * styleg.adb (Check_Then): Allow THEN on line after IF.
9520         (Check_Then): Check THEN placement under control of -gnatd.X
9521         * styleg.ads (Check_Then): Now called even if THEN is not first
9522         token on line.
9523         * stylesw.ads (Style_Check_If_Then_Layout): Document new
9524         relaxed rules.
9525         * gnat_ugn.texi: For -gnatyi, THEN can now be on line after IF.
9527 2014-02-19  Robert Dewar  <dewar@adacore.com>
9529         * a-cfhama.adb, a-cfhase.adb, a-cforse.adb, a-cofove.adb, a-ngcefu.adb,
9530         a-teioed.adb, a-wtedit.adb, a-ztedit.adb, exp_ch5.adb, inline.adb,
9531         prj-pp.adb, prj-tree.adb, sem_ch12.adb, sem_ch8.adb,
9532         vms_conv.adb: Fix bad layout of IF statements
9534 2014-02-19  Robert Dewar  <dewar@adacore.com>
9536         * exp_util.adb (Side_Effect_Free): Scalar if expressions can be SEF.
9538 2014-02-19  Robert Dewar  <dewar@adacore.com>
9540         * exp_util.adb: Update comments.
9542 2014-02-19  Doug Rupp  <rupp@adacore.com>
9544         * bindgen.adb (Gen_Adainit) [VMS] New global Float_Format.
9545         * init.c (__gl_float_format): [VMS] New global.
9546         (__gnat_set_features): Call FP_CONTROL to set FPSR for the float
9547         representation in effect.
9549 2014-02-19  Hristian Kirtchev  <kirtchev@adacore.com>
9551         * exp_ch6.adb Add with and use clause for Exp_Prag.
9552         (Expand_Contract_Cases): Relocated to Exp_Prag.
9553         * exp_ch6.ads (Expand_Contract_Cases): Relocated to Exp_Prag.
9554         * exp_prag.adb Add with and use clauses for Checks and Validsw.
9555         (Expand_Contract_Cases): Relocated from Exp_Ch6. Update the
9556         structure of the expanded code to showcase the evaluation of
9557         attribute 'Old prefixes. Add local variable Old_Evals. Expand
9558         any attribute 'Old references found within a consequence. Add
9559         circuitry to evaluate the prefixes of attribute 'Old that
9560         belong to a selected consequence.
9561         (Expand_Old_In_Consequence): New routine.
9562         * exp_prag.ads (Expand_Contract_Cases): Relocated from Exp_Ch6.
9563         * sem_attr.adb (Check_Use_In_Contract_Cases): Warn that a
9564         potentially unevaluated prefix is always evaluated.
9566 2014-02-19  Robert Dewar  <dewar@adacore.com>
9568         * exp_attr.adb (Expand_Min_Max_Attribute): Use Insert_Declaration
9569         (Expand_Min_Max_Attribute): Use Matching_Standard_Type.
9570         * exp_ch4.adb (Expand_N_Expression_With_Actions): Remove special
9571         handling for the case of Modify_Tree_For_C, this approach did
9572         not work.
9573         * exp_util.adb (Matching_Standard_Type): New function
9574         (Side_Effect_Free): New top level functions (from
9575         Remove_Side_Effects).
9576         * exp_util.ads (Side_Effect_Free): New top level functions
9577         (moved from body).
9578         * sinfo.ads: Minor comment updates.
9580 2014-02-19  Ed Schonberg  <schonberg@adacore.com>
9582         * exp_ch6.adb (Expand_Simple_Function_Return): If return
9583         type is unconstrained and uses the secondary stack, mark the
9584         enclosing function accordingly, to ensure that the value is not
9585         prematurely removed.
9587 2014-02-19  Hristian Kirtchev  <kirtchev@adacore.com>
9589         * par.adb Alphabetize the routines in Par.Sync.
9590         (Resync_Past_Malformed_Aspect): New routine.
9591         * par-ch13.adb (Get_Aspect_Specifications): Alphabetize local
9592         variables. Code and comment reformatting. Detect missing
9593         parentheses on aspects [Refined_]Global and [Refined_]Depends
9594         with a non-null definition.
9595         * par-sync.adb: Alphabetize all routines in this separate unit.
9596         (Resync_Past_Malformed_Aspect): New routine.
9598 2014-02-19  Robert Dewar  <dewar@adacore.com>
9600         * sem_eval.ads, sem_eval.adb (Subtypes_Statically_Match): Return False
9601         if Esize values do not match.
9603 2014-02-19  Yannick Moy  <moy@adacore.com>
9605         * sinfo.ads: Minor comment update.
9607 2014-02-19  Hristian Kirtchev  <kirtchev@adacore.com>
9609         * atree.ads: Minor reformatting (change Entity_Info to Einfo).
9611 2014-02-19  Thomas Quinot  <quinot@adacore.com>
9613         * exp_ch7.adb (Find_Node_To_Be_Wrapped): An assignment statement
9614         that has the No_Ctrl_Actions flag is a suitable node to be
9615         wrapped if the assigned expression has no finalization actions.
9616         * sem_eval.adb (Eval_Entity_Name): For a compile time known
9617         boolean value, mark the corresponding condition SCO as constant.
9619 2014-02-19  Robert Dewar  <dewar@adacore.com>
9621         * exp_util.adb: Minor reformatting.
9622         * exp_util.ads (Matching_Standard_Type): New function.
9623         * exp_ch7.adb: Minor reformatting.
9625 2014-02-19  Ed Schonberg  <schonberg@adacore.com>
9627         * sem_ch13.adb (Get_Cursor_Type): Use scope of iterable type
9628         to find declaration for Cursor, to handle properly the case of
9629         a discriminated iterable type.
9631 2014-02-19  Vincent Celier  <celier@adacore.com>
9633         * gnatcmd.adb (GNATCmd): Always replace the object dirs of
9634         imported library projects with the library ALI dirs, when setting
9635         the object paths.
9636         * prj-env.ads (Ada_Objects_Path): Correct comments about
9637         argument Including_Libraries.
9639 2014-02-19  Gary Dismukes  <dismukes@adacore.com>
9641         * gnat_rm.texi: Minor spelling fixes.
9643 2014-02-19  Doug Rupp  <rupp@adacore.com>
9645         * init.c: Remove unneeded code.
9646         * fe.h (Float_Format): New macro
9647         * gcc-interface/trans.c (gigi): On VMS, set vms_float_format.
9649 2014-02-19  Hristian Kirtchev  <kirtchev@adacore.com>
9651         * sem_prag.adb (Check_Refined_Global_Item):
9652         A state or variable acts as a constituent only it is part of an
9653         encapsulating state and the state has visible refinement.
9655 2014-02-19  Ed Schonberg  <schonberg@adacore.com>
9657         * sem_ch6.adb (Analyze_Subprogram_Contract): Do not warn on a
9658         postcondition for a function when the expression does not mention
9659         'Result but the function has in-out parameters.
9661 2014-02-19  Robert Dewar  <dewar@adacore.com>
9663         * gnat_rm.texi: Add documentation on Value_Size forcing biased
9664         representation.
9666 2014-02-19  Hristian Kirtchev  <kirtchev@adacore.com>
9668         * lib-xref.ads Remove the small table of letter and symbol usage as we
9669         already have one.
9671 2014-02-19  Hristian Kirtchev  <kirtchev@adacore.com>
9673         * sem_ch6.adb (Analyze_Subprogram_Body_Helper): Emit specific error
9674         messages depending on the offending misplaced aspect specifications.
9675         (Diagnose_Misplaced_Aspect_Specifications): New routine.
9677 2014-02-19  Ed Schonberg  <schonberg@adacore.com>
9679         * sem_ch13.adb (Get_Cursor): Utility to retrieve cursor type
9680         for iterable aspect primitives.
9681         (Resolve_Iterable_Operation): Use expected signature of iterable
9682         aspect to resolve primitive when overloading is present.
9683         (Validate_Iterable_Aspect, Analyze_Aspects_At_Freeze_Point): use it.
9684         (Check_Signature): Removed.
9686 2014-02-19  Yannick Moy  <moy@adacore.com>
9688         * sem_ch10.adb (Analyze_Proper_Body): Issue error on missing
9689         subunit in GNATprove_Mode.
9690         * sinfo.ads (GNATprove_Mode): Document error issued in GNATprove_Mode.
9692 2014-02-19  Hristian Kirtchev  <kirtchev@adacore.com>
9694         * lib-xref.ads Alphabetize the contents of table
9695         Xref_Entity_Letters. Add an entry in table Xref_Entity_Letters
9696         for E_Abstract_State. List all letters and symbols in use.
9697         * sem_prag.adb (Analyze_Abstract_State): Update all calls
9698         to Create_Abstract_State to reflect the new signature.
9699         (Create_Abstract_State): Change subprogram profile and update
9700         the comment on usage. Use the proper location of the state
9701         declaration when creating a new abstract state entity. Do not
9702         generate an external name, but simply reuse the name coming from
9703         the state declaration.
9705 2014-02-19  Robert Dewar  <dewar@adacore.com>
9707         * exp_ch4.adb (Expand_N_Expression_With_Actions): Make sure
9708         declarations get properly inserted in Modify_Tree_For_C mode.
9709         * sinfo.ads: Minor comment addition.
9711 2014-02-19  Robert Dewar  <dewar@adacore.com>
9713         * par-ch9.adb, exp_ch5.adb, sem_ch5.adb, exp_attr.adb, sem_util.adb,
9714         sem_util.ads, sem_ch13.adb, sem_ch13.ads: Minor reformatting.
9716 2014-02-19  Ed Schonberg  <schonberg@adacore.com>
9718         * style.adb (Missing_Overriding): Warning does not apply in
9719         language versions prior to Ada 2005.
9720         * snames.ads-tmpl: Add Name_Iterable and Attribute_Iterable.
9721         * sem_attr.adb: Add Attribute_Iterable where needed.
9722         * exp_attr.adb: ditto.
9723         * exp_ch5.adb (Expand_Formal_Container_Loop): New procedure to
9724         handle loops and quantified expressions over types that have an
9725         iterable aspect.  Called from Expand_Iterator_Loop.
9726         * sem_ch5.adb (Analyze_Iterator_Specification): Recognize types
9727         with Iterable aspect.
9728         * sem_ch13.adb (Validate_Iterable_Aspect): Verify that the
9729         subprograms specified in the Iterable aspect have the proper
9730         signature involving container and cursor.
9731         (Check_Aspect_At_Freeze_Point): Analyze value of iterable aspect.
9732         * sem_ch13.ads (Validate_Iterable_Aspect): New subprogram.
9733         * sem_util.ads, sem_util.adb (Get_Iterable_Type_Primitive):
9734         New procedure to retrieve one of the primitives First, Last,
9735         or Has_Element, from the value of the iterable aspect of a
9736         formal container.
9737         (Is_Container_Element): Predicate to recognize expressions
9738         that denote an element of one of the predefined containers,
9739         for possible optimization.  This subprogram is not currently
9740         used, pending ARG discussions on the legality of the proposed
9741         optimization. Worth preserving for eventual use.
9742         (Is_Iterator): Recognize formal container types.
9743         * aspects.ads, aspects.adb: Add Aspect_Iterable where needed.
9745 2014-02-19  Robert Dewar  <dewar@adacore.com>
9747         * exp_attr.adb (Expand_Min_Max_Attribute): New procedure
9748         (Expand_N_Attribute_Reference): Use this procedure for Min and Max.
9749         * exp_ch4.adb (Expand_N_Expression_With_Actions): Remove object
9750         declarations from list of actions.
9751         * output.ads, output.adb (Delete_Last_Char): New procedure.
9752         * sinfo.ads: Document handling of Mod and expression with actions
9753         in Modify_Tree_For_C mode.
9755 2014-02-19  Ed Schonberg  <schonberg@adacore.com>
9757         * par-ch9.adb (P_Task): Add a null statement to produce a
9758         well-formed task body when due to a previous syntax error the
9759         statement list is empty.
9761 2014-02-19  Hristian Kirtchev  <kirtchev@adacore.com>
9763         * sem_prag.adb (Check_Dependency_Clause): Account
9764         for the case where a state with a non-null refinement matches a
9765         null output list. Comment reformatting.
9766         (Inputs_Match): Copy a solitary input to avoid an assertion failure
9767         when trying to match the same input in multiple clauses.
9769 2014-02-19  Gary Dismukes  <dismukes@adacore.com>
9771         * sem_attr.adb: Minor typo fix.
9773 2014-02-18  Robert Dewar  <dewar@adacore.com>
9775         * cstand.adb (Build_Signed_Integer_Type): Minor change of formal
9776         from Int to Nat (Build_Unsigned_Integer_Type): New procedure
9777         (Create_Standard): Create new unsigned types.
9778         * exp_ch4.adb (Expand_N_Op_Mod): Expand mod in Modify_Tree_For_C
9779         mode (Expand_N_Reference): Removed, problematic and not needed
9780         for now.
9781         * exp_ch4.ads (Expand_N_Reference): Removed, problematic and
9782         not needed for now.
9783         * exp_util.ads, exp_util.adb (Power_Of_Two): New function.
9784         * expander.adb: Remove call to Expand_N_Reference (problematic,
9785         and not needed now).
9786         * sem_aux.ads, sem_aux.adb (Corresponding_Unsigned_Type): New function.
9787         * stand.adb: Read and write unsigned type entities.
9788         * stand.ads: Add new unsigned types.
9790 2014-02-18  Hristian Kirtchev  <kirtchev@adacore.com>
9792         * sem_ch4.adb (Analyze_Call): Do not mark a function call
9793         as being inside an assertion expression as the flag is now removed.
9794         (Check_Ghost_Subprogram_Call): Do not query the
9795         In_Assertion_Expression flag as it is now removed, instead use
9796         a predicate function.
9797         * sem_elab.adb (Check_Internal_Call_Continue): Do not query the
9798         In_Assertion_Expression flag as it is now removed, instead use
9799         a predicate function.
9800         * sem_prag.ads: Add new table Assertion_Expression_Pragma.
9801         * sem_util.adb Add with and use clause for Sem_Prag.
9802         (In_Assertion_Expression_Pragma): New routine.
9803         * sem_util.ads (In_Assertion_Expression_Pragma): New routine.
9804         * sinfo.adb (In_Assertion_Expression): Removed.
9805         (Set_In_Assertion_Expression): Removed.
9806         * sinfo.ads Remove flag In_Assertion_Expression along with its
9807         use in nodes.
9808         (In_Assertion_Expression): Removed along with
9809         pragma Inline.  (Set_In_Assertion_Expression): Removed along
9810         with pragma Inline.
9812 2014-02-18  Sergey Rybin  <rybin@adacore.com frybin>
9814         * gnat_ugn.texi: gnatpp section: add note that '-j' cannot be
9815         used together with '-r', '-rf' or '-rnb' options.
9817 2014-02-18  Hristian Kirtchev  <kirtchev@adacore.com>
9819         * sem_attr.adb (Analyze_Attribute): Comment
9820         and code reformatting. Use separate routines to check the
9821         legality of attribute 'Old in certain pragmas. Verify
9822         the use of 'Old, 'Result and locally declared entities
9823         within the prefix of 'Old.
9824         (Check_References_In_Prefix): New routine.
9825         (Check_Use_In_Contract_Cases): New routine.
9826         (Check_Use_In_Test_Case): New routine.
9828 2014-02-18  Vincent Celier  <celier@adacore.com>
9830         * sem_aux.adb (Is_By_Reference_Type): For each components of
9831         a record type, check also if the component is volatile as it
9832         may have an aspect that makes it volatile. If it is, then the
9833         record type is a by reference type.
9835 2014-02-18  Robert Dewar  <dewar@adacore.com>
9837         * exp_attr.adb: Minor reformatting.
9838         * exp_ch4.ads, exp_ch4.adb (Expand_N_Reference): New procedure.
9839         * exp_util.adb (Remove_Side_Effects): Add conditional expressions
9840         as another case where we don't generate N_Reference nodes for
9841         primitive types.
9842         * expander.adb (Expand): Add call to Expand_N_Reference.
9844 2014-02-06  Hristian Kirtchev  <kirtchev@adacore.com>
9846         * sem_prag.adb (Analyze_Refined_Pragma): Remove
9847         local variable Pack_Spec. Refinement pragmas may now apply to
9848         bodies of both visible and private subprograms.
9850 2014-02-06  Robert Dewar  <dewar@adacore.com>
9852         * exp_attr.adb (Expand_Loop_Entry_Attribute):
9853         Minor change (Attr => N) (Expand_Pred_Succ): New name
9854         Expand_Pred_Succ_Attribute (Expand_N_Attribute_Reference, case
9855         Max): Expand into if expression if Modify_Tree_For_C mode.
9856         (Expand_N_Attribute_Reference, case Min): ditto
9857         * sinfo.ads: Modify_Tree_For_C takes care of expanding Min and
9858         Max attributes.
9860 2014-02-06  Ed Schonberg  <schonberg@adacore.com>
9862         * sem_ch3.adb (Analyze_Object_Declaration): Do not generate
9863         predicate check if this is an internal declaration with
9864         No_Initialization set, as for an expanded aggregate component.
9866 2014-02-06  Doug Rupp  <rupp@adacore.com>
9868         * init.c (__gnat_default_resignal_p) [VMS]: Test for and resignal
9869         conditions with severity of "SUCCESS" or "INFORMATIONAL".
9871 2014-02-06  Yannick Moy  <moy@adacore.com>
9873         * sem_prag.adb (Analyze_Pragma): Analyze pragma
9874         Debug rewritten node before rewriting it as a null statement in
9875         GNATprove mode.
9877 2014-02-06  Robert Dewar  <dewar@adacore.com>
9879         * sem_attr.adb (Min_Max): New procedure.
9880         (Max_Alignment_For_Allocation_Max_Size_In_Storage_Elements): New
9881         procedure.
9883 2014-02-06  Sergey Rybin  <rybin@adacore.com frybin>
9885         * gnat_ugn.texi, vms_data.ads: Add documentation of '-t' option for
9886         gnatmetric/gnatpp.
9888 2014-02-06  Hristian Kirtchev  <kirtchev@adacore.com>
9890         * sem_prag.adb (Analyze_Abstract_State): Update
9891         all calls to Create_Abstract_State to pass the proper state
9892         "declaration".
9893         (Create_Abstract_State): Add new formal parameter
9894         State_Decl along with comment on usage. Establish a link between
9895         the abstract state entity and the state declaration.
9897 2014-02-06  Robert Dewar  <dewar@adacore.com>
9899         * sem_attr.adb (Analyze_Attribute, case Max): Check for improper
9900         comparison of unordered enumeration type.
9901         (Analyze_Attribute, case Max): Check for improper comparison of
9902         unordered enumeration type.
9903         * sem_res.adb (Bad_Unordered_Enumeration_Reference): Moved to
9904         sem_util.adb.
9905         * sem_util.ads, sem_util.adb (Bad_Unordered_Enumeration_Reference):
9906         Moved here from Sem_Res.
9908 2014-02-06  Robert Dewar  <dewar@adacore.com>
9910         * sem_ch3.adb, sem_prag.adb, sem_res.adb, lib-xref.adb: Minor
9911         reformatting.
9913 2014-02-06  Hristian Kirtchev  <kirtchev@adacore.com>
9915         * sem_ch6.adb (Process_Formals): Error message reformatting.
9917 2014-02-06  Hristian Kirtchev  <kirtchev@adacore.com>
9919         * sem_ch3.adb (Handle_Late_Controlled_Primitive): Add local
9920         variable Spec. Do not inherit the null indicator from the
9921         subprogram body when generating the spec.
9923 2014-02-06  Robert Dewar  <dewar@adacore.com>
9925         * casing.adb (Determine_Casing): Consider SPARK_Mode to be
9926         mixed case.
9928 2014-02-06  Ed Schonberg  <schonberg@adacore.com>
9930         * exp_ch6.adb (Is_Build_In_Place_Function): Predicate is false
9931         when the function has a foreign convention, but not if only the
9932         limited return type has such a convention.
9934 2014-02-06  Hristian Kirtchev  <kirtchev@adacore.com>
9936         * sem_ch3.adb (Handle_Late_Controlled_Primitive): Remove local
9937         variable Spec. Comment reformatting. Use Copy_Separate_Tree
9938         rather than New_Copy_Tree when building the corresponding
9939         subprogram declaration.
9941 2014-02-06  Hristian Kirtchev  <kirtchev@adacore.com>
9943         * sem_prag.adb (Analyze_Global_Item): Remove
9944         the mode-related checks on abstract states with enabled external
9945         properties.
9946         (Property_Error): Removed.
9948 2014-02-06  Javier Miranda  <miranda@adacore.com>
9950         * lib-xref.adb (Generate_Reference): When
9951         generating the reference to the first private entity take care
9952         of handling swapped entities.
9954 2014-02-06  Sergey Rybin  <rybin@adacore.com frybin>
9956         * gnat_ugn.texi, vms_data.ads: Add documentation of -j option for
9957         gnatmetric.
9959 2014-02-06  Robert Dewar  <dewar@adacore.com>
9961         * exp_ch4.adb (Expand_N_Shift_Left): Handle shift counts greater
9962         than the word size when operating in Modify_Tree_For_C mode.
9963         * sinfo.ads: Add documentation section on Modify_Tree_For_C mode.
9965 2014-02-06  Robert Dewar  <dewar@adacore.com>
9967         * erroutc.adb (Warning_Specifically_Suppressed.Matches):
9968         compare is case insensitive.
9969         * gnat_rm.texi: Document that string compare for Warnings Off
9970         is now case insensitive.
9972 2014-02-06  Eric Botcazou  <ebotcazou@adacore.com>
9974         * gnat_rm.texi: Small wording tweak.
9976 2014-02-06  Pascal Obry  <obry@adacore.com>
9978         * prj-attr.adb, projects.texi, snames.ads-tmpl: Add Included_Patterns
9979         and Included_Artifact_Patterns attribute definitions.
9981 2014-02-06  Yannick Moy  <moy@adacore.com>
9983         * sem_ch6.adb (Analyze_Subprogram_Body_Helper): Set
9984         SPARK_Mode pragma component for all subprograms, including stubs.
9986 2014-02-06  Hristian Kirtchev  <kirtchev@adacore.com>
9988         * sem_ch10.adb (Analyze_Package_Body_Stub): Maintain
9989         the configuration options of the enclosing context in a
9990         stack-like fasion.
9991         (Analyze_Subprogram_Body_Stub): Maintain the
9992         configuration options of the enclosing context in a stack-like
9993         fashion.
9995 2014-02-06  Robert Dewar  <dewar@adacore.com>
9997         * debug.adb: -gnatd.u sets Modify_Tree_For C
9998         * exp_ch4.adb (Expand_N_Op_Rotate_Left): Expand out
9999         if Modify_Tree_For_C (Expand_N_Op_Rotate_Right): ditto.
10000         (Expand_N_Op_Arithmetic_Right_Shift): ditto.
10001         * exp_intr.adb (Expand_Shift): Call expander so we do
10002         Modify_Tree_For_C expansions.
10003         * gnat1drv.adb (Adjust_Global_Switches): Set Modify_Tree_For_C
10004         if -gnatd.u set.
10006 2014-02-06  Fedor Rybin  <frybin@adacore.com>
10008         * prj-proc.ads (Tree_Loaded_Callback): new type Callback used
10009         after the phase 1 of the processing of each aggregated project
10010         to get access to project trees of aggregated projects.
10011         (Process_Project_Tree_Phase_1): new parameter On_New_Tree_Loaded
10012         If specified, On_New_Tree_Loaded is called after each aggregated
10013         project has been processed succesfully.
10014         (Process): new parameter On_New_Tree_Loaded.
10015         * prj-proc.adb (Process_Aggregated_Projects): On_New_Tree_Loaded
10016         callback added after processing of each aggregated project.
10017         (Recursive_Process): new parameter On_New_Tree_Loaded.
10018         (Process): new parameter On_New_Tree_Loaded.
10019         (Process_Project_Tree_Phase_1): new parameter On_New_Tree_Loaded.
10020         * prj-conf.ads (Parse_Project_And_Apply_Config): new parameter
10021         On_New_Tree_Loaded.
10022         * prj-conf.adb (Parse_Project_And_Apply_Config): new parameter
10023         On_New_Tree_Loaded.
10025 2014-02-06  Bob Duff  <duff@adacore.com>
10027         * gnat_ugn.texi: Implement --insert-blank-lines and
10028         --preserve-blank-lines switches.
10030 2014-02-06  Sergey Rybin  <rybin@adacore.com frybin>
10032         * gnat_ugn.texi, vms_data.ads: Add documentation of -j option for
10033         gnatelim.
10035 2014-02-06  Eric Botcazou  <ebotcazou@adacore.com>
10037         * gnat_rm.texi (Pragma Optimize_Alignment): Document the effect
10038         of the pragma on individual objects.
10040 2014-02-06  Hristian Kirtchev  <kirtchev@adacore.com>
10042         * einfo.adb Node29 is now used as BIP_Initialization_Call.
10043         (BIP_Initialization_Call): New routine.
10044         (Set_BIP_Initialization_Call): New routine.
10045         (Write_Field29_Name): Add an entry for constants and variables.
10046         * einfo.ads Add new attribute BIP_Initialization_Call and update
10047         its usage in nodes.
10048         (BIP_Initialization_Call): New routine along with pragma Inline.
10049         (Set_BIP_Initialization_Call): New routine along with pragma Inline.
10050         * exp_ch6.adb (Make_Build_In_Place_Call_In_Object_Declaration):
10051         Add local declaration Res_Decl. Capture the build-in-place
10052         initialization call when the related object declaration has
10053         created a transient block.
10054         * exp_ch7.adb (Process_Transient_Objects): Add local variable
10055         Fin_Insrt. Recognize a scenario where an object declaration acts
10056         as a transient context and is initialized by a build-in-place
10057         function call.
10059 2014-02-06  Pascal Obry  <obry@adacore.com>
10061         * prj-util.adb (For_Interface_Sources): Fix handling of required
10062         bodies for aggregate libs.
10064 2014-02-06  Robert Dewar  <dewar@adacore.com>
10066         * nlists.ads: Minor comment clarifications.
10068 2014-02-06  Robert Dewar  <dewar@adacore.com>
10070         * gnat1drv.adb (Adjust_Global_Switches): Set Modify_Tree_For_C
10071         if gnatd.V set.
10072         * opt.ads (Modify_Tree_For_C): New flag.
10073         * output.ads, output.adb (Last_Char): New function.
10075 2014-02-06  Pascal Obry  <obry@adacore.com>
10077         * projects.texi, prj-env.adb (Initialize_Default_Project_Path): Add
10078         share/gpr for cross-builds.
10080 2014-02-06  Robert Dewar  <dewar@adacore.com>
10082         * exp_util.ads, checks.adb, sem_prag.adb, prj-util.adb, sem_ch13.adb:
10083         Minor reformatting and code clean ups.
10085 2014-02-06  Pascal Obry  <obry@adacore.com>
10087         * prj-util.adb (For_Interface_Sources): Skip non compilable languages.
10088         * prj.ads: Minor typo fix in comment.
10090 2014-02-06  Hristian Kirtchev  <kirtchev@adacore.com>
10092         * sem_prag.adb (Analyze_Depends_In_Decl_Part): Add
10093         local variable Expr. Flag clauses with extra parenthesis as this
10094         is not allowed by the syntax of the pragma. Code reformatting.
10096 2014-02-06  Hristian Kirtchev  <kirtchev@adacore.com>
10098         * exp_attr.adb (Expand_N_Attribute_Reference): Alphabetize
10099         variables. Rename variabme Tnn to Temp. Do not create a temporary
10100         if assertions are disabled. Find enclosing routine _Postconditions
10101         and insert the temporary that captures the value of the prefix
10102         before the routine.
10103         * exp_ch6.adb (Build_Postconditions_Procedure):
10104         Insert the generated _Postconditions routine
10105         before the first source declaration of the related
10106         subprogram.
10107         (Insert_After_Last_Declaration): Removed.
10108         (Insert_Before_First_Source_Declaration): New routine.
10110 2014-02-06  Ed Schonberg  <schonberg@adacore.com>
10112         * exp_util.adb, exp_util.ads (Within_Internal_Subprogram):
10113         Utility to determine whether current expansion is for the body
10114         of a predefined primitive operation.
10115         (Make_Predicate_Check): Use Within_Internal_Subpgram
10116         * checks.adb (Apply_Predicate_Check): Use
10117         Within_Internal_Subprogram
10118         * sem_ch13.adb (Freeze_Entity_Checks): Ditto.
10120 2014-02-06  Pascal Obry  <obry@adacore.com>
10122         * prj.ads, prj-util.adb: Minor reformatting.
10124 2014-02-06  Ed Schonberg  <schonberg@adacore.com>
10126         * exp_ch6.adb (Expand_Subprogram_Contract, Append_Enabled_Item):
10127         Take into account the Split_PPC flag to ensure that conjuncts
10128         in a composite postcondition aspect are tested in source order.
10130 2014-02-06  Hristian Kirtchev  <kirtchev@adacore.com>
10132         * sem_ch6.adb (Analyze_Generic_Subprogram_Body): Flag illegal
10133         use of SPARK_Mode.
10134         * sem_ch12.adb (Analyze_Generic_Subprogram_Declaration): Flag
10135         illegal use of SPARK_Mode.
10136         (Instantiate_Subprogram_Body): Flag illegal use of SPARK_Mode.
10137         * sem_prag.adb (Analyze_Pragma): Code reformatting.
10138         * sem_util.adb Add with and use clause for Aspects.
10139         (Check_SPARK_Mode_In_Generic): New routine.
10140         * sem_util.ads (Check_SPARK_Mode_In_Generic): New routine.
10142 2014-02-06  Thomas Quinot  <quinot@adacore.com>
10144         * a-calend.adb (Formatting_Operations.Split): Ensure that
10145         Time_Error is raised for invalid time values.
10147 2014-02-06  Arnaud Charlet  <charlet@adacore.com>
10149         * sem_prag.adb (Analyze_Pragma): Rewrite as a null statement
10150         in GNATprove_Mode.
10152 2014-02-06  Robert Dewar  <dewar@adacore.com>
10154         * einfo.ads, einfo.adb (Is_Discriminant_Check_Function): New flag.
10155         * exp_ch3.adb (Build_Dcheck_Function): Set
10156         Is_Discriminant_Check_Function.
10158 2014-02-06  Hristian Kirtchev  <kirtchev@adacore.com>
10160         * exp_ch7.adb (Is_Subprogram_Call): Inspect
10161         the original tree in certain cases where a construct has been
10162         factored out and replaced by a reference to a temporary.
10164 2014-02-06  Ed Schonberg  <schonberg@adacore.com>
10166         * sem_ch3.adb (Process_Full_View): Fix typo in the order of
10167         parameters when propagating predicate function to full view.
10168         (Find_Type_Of_Object): Freeze base type of object type to catch
10169         premature use of discriminated private type without a full view.
10171 2014-02-06  Robert Dewar  <dewar@adacore.com>
10173         * sprint.adb: Minor reformatting.
10175 2014-02-06  Hristian Kirtchev  <kirtchev@adacore.com>
10177         * exp_ch4.adb (Process_Transient_Object): Add local variable
10178         Temp_Ins. When the transient object is initialized by an
10179         aggregate, the hook must capture the object after the last
10180         component assignment takes place.
10181         * exp_ch7.adb (Detect_Subprogram_Call): Expose the subprogram to
10182         routine Is_Subprogram_Call.
10183         (Is_Subprogram_Call): Inspect an
10184         aggregate that has been heavily expanded for subprogram calls.
10185         (Process_Transient_Objects): Add local variables Expr, Ptr_Id
10186         and Temp_Ins.  Remove the nested declare block and adjust the
10187         indentation. When the transient object is initialized by an
10188         aggregate, the hook must capture the object after the last
10189         component assignment takes place.
10191 2014-02-06  Hristian Kirtchev  <kirtchev@adacore.com>
10193         * sem_prag.adb (Analyze_Global_Item): Detect illegal uses of
10194         external states with enabled properties that do not match the
10195         global mode.
10196         (Property_Error): New routine.
10197         * sem_res.adb (Property_Error): New routine.
10198         (Resolve_Actuals): Detect illegal uses of external variables with
10199         enabled properties in procedure calls that do not match the mode of
10200         the corresponding formal parameter.
10202 2014-02-06  Hristian Kirtchev  <kirtchev@adacore.com>
10204         * sem_util.adb (Has_Enabled_Property): Rename
10205         formal parameter Prop_Nam to Property. Update the comment on usage
10206         and all occurrences in the body. Add local variable Prop_Nam. When
10207         inspecting a property with an expression, the property name
10208         appears as the first choice of the component association.
10210 2014-02-04  Robert Dewar  <dewar@adacore.com>
10212         * exp_ch5.adb, einfo.ads, freeze.adb, sem_ch8.adb: Minor reformatting.
10214 2014-02-04  Gary Dismukes  <dismukes@adacore.com>
10216         * sem_aggr.adb: Change "runtime" to "run time" in warning message,
10217         for consistency with other messages.
10219 2014-02-04  Ed Schonberg  <schonberg@adacore.com>
10221         * exp_ch5.adb  (Expand_Iterator_Loop):  For a container element
10222         iterator, indicate that the element is a constant if the container
10223         type does not have a variable indexing aspect.
10224         * sem_ch8.adb (Analyze_Object_Renaming): If the entity is already
10225         marked as constant, do not reset its Ekind, to ensure that
10226         container elements in an element loop are not modified if the
10227         container (e.g. a hashed set) only has a constant indexing aspect.
10229 2014-02-04  Arnaud Charlet  <charlet@adacore.com>
10231         * g-souinf.ads: Subprograms in this unit are actually not pure.
10232         * freeze.adb (Freeze_Subprogram): Do not reset Is_Pure for Intrinsics.
10233         * einfo.ads (Is_Pure): Update doc to match implementation.
10235 2014-02-04  Gary Dismukes  <dismukes@adacore.com>
10237         * exp_ch13.adb: Minor spelling fix.
10239 2014-02-04  Robert Dewar  <dewar@adacore.com>
10241         * opt.ads: Minor comment update.
10243 2014-02-04  Robert Dewar  <dewar@adacore.com>
10245         * exp_ch4.adb (Expand_N_Expression_With_Actions): Use Rewrite
10246         instead of Replace.
10248 2014-02-04  Ed Schonberg  <schonberg@adacore.com>
10250         * sem_aggr.adb (Resolve_Array_Aggregate): Suppress warnings
10251         on null expressions if component type is non-null, when the
10252         corresponding association covers an empty range of index values.
10254 2014-02-04  Robert Dewar  <dewar@adacore.com>
10256         * sinfo.ads: Further comments on N_Expression_With_Actions node.
10258 2014-02-04  Hristian Kirtchev  <kirtchev@adacore.com>
10260         * sem_prag.adb (Analyze_Refined_Depends_In_Decl_Part): Remove global
10261         variables Out_Items and Ref_Global. Remove local constant
10262         Body_Id along with dummy variables D1, D2, D3, D4, D5, D6, D7
10263         and D8. Remove the useless collection of global items as this
10264         was a leftover from an earlier version of the routine. Move
10265         several routines out to avoid deep nesting and indentation.
10266         (Inputs_Match): Add formal parameter Dep_Clause. Rename formal
10267         parameter Do_Checks to Post_Errors. Update the comment on usage.
10268         (Is_Matching_Input): Renamed to Input_Match. Add formal parameters
10269         Ref_Inputs and Do_Checks. Rename formal parameter Do_Checks
10270         to Post_Errors. Update the comment on usage. Account for the
10271         case where a self referential state may have a null input_list.
10272         (Is_Self_Referential): New routine.
10274 2014-02-04  Ed Schonberg  <schonberg@adacore.com>
10276         * sem_ch13.adb (Analyze_Attribute_Definition_Clause): If the
10277         entity renames an expression, as in the case of an object of
10278         an unconstrained type initialized by a function call, defer the
10279         rewriting of the expression to the expander.
10280         * exp_ch13.adb (Expand_N_Attribute_Definition_Clause, case
10281         'Alignment): If the entity renames an expression, introduce
10282         temporary to capture value, and rewrite original declaration to
10283         use temporary.
10285 2014-02-04  Gary Dismukes  <dismukes@adacore.com>
10287         * g-comlin.adb: Minor typo fix.
10289 2014-02-04  Ed Schonberg  <schonberg@adacore.com>
10291         * freeze.adb (Freeze_All): Types derived from a formal
10292         access_to_classwide type do not have a finalization master.
10294 2014-02-04  Robert Dewar  <dewar@adacore.com>
10296         * sprint.adb: Minor reformatting.
10298 2014-02-04  Robert Dewar  <dewar@adacore.com>
10300         * exp_ch4.adb (Expand_N_Expression_With_Actions): Eliminate
10301         cases where Actions is a null list.
10302         * sinfo.ads (N_Expression_With_Actions): Actions can be
10303         temporarily empty during semantic analysis, but must be non-empty
10304         in the final expanded tree.
10306 2014-01-31  Robert Dewar  <dewar@adacore.com>
10308         * exp_ch9.adb: Minor reformatting.
10310 2014-01-31  Emmanuel Briot  <briot@adacore.com>
10312         * g-comlin.adb (Set_Command_Line): Take the switches
10313         configuration from the Command_Line_Config.
10315 2014-01-31  Hristian Kirtchev  <kirtchev@adacore.com>
10317         * sem_prag.adb (Analyze_Refinement_Clause): Guard against a malformed
10318         refinement clause.
10320 2014-01-31  Vincent Celier  <celier@adacore.com>
10322         * projects.texi: Add more documentation about others used as an
10323         index in indexed attributes.
10325 2014-01-31  Robert Dewar  <dewar@adacore.com>
10327         * gnat_ugn.texi: Minor update.
10328         * gnat_rm.texi: Add example to Restriction_Warnings documentation.
10329         * exp_util.adb: Minor reformatting.
10331 2014-01-31  Ed Schonberg  <schonberg@adacore.com>
10333         * exp_ch9.adb (Expand_Entry_Barrier): Warn if the barrier
10334         depends on data that is not private to the protected object,
10335         and potentially modifiable in unsynchronized fashion.
10337 2014-01-31  Yannick Moy  <moy@adacore.com>
10339         * erroutc.adb (Validate_Specific_Warnings): Remove special case for
10340         GNATprove_Mode.
10342 2014-01-31  Robert Dewar  <dewar@adacore.com>
10344         * prj-attr.ads (First_Attribute_Of): Returns Empty_Attribute
10345         for Unknown_Package.
10346         * sem_ch6.adb, sem_attr.adb: Minor comment addition.
10348 2014-01-31  Hristian Kirtchev  <kirtchev@adacore.com>
10350         * exp_util.adb (Build_Allocate_Deallocate_Proc): Rewrite
10351         the logic that generates a runtime check to determine the
10352         controlled status of the object about to be allocated or
10353         deallocated. Class-wide types now always use a runtime check
10354         even if they appear as generic actuals.
10355         (Find_Object): Detect
10356         a special case that involves interface class-wide types because
10357         the object appears as a complex expression.
10359 2014-01-31  Ed Schonberg  <schonberg@adacore.com>
10361         * sem_ch6.adb (Process_Formals): In Ada2012 mode, place
10362         subprogram with an incomplete untagged formals on the list of
10363         private dependents, to verify that the type is properly completed
10364         in the private part.
10365         * sem_attr.adb: Code clean up.
10367 2014-01-31  Robert Dewar  <dewar@adacore.com>
10369         * exp_ch6.adb: Minor reformatting.
10371 2014-01-31  Vincent Celier  <celier@adacore.com>
10373         * prj-attr.adb (First_Attribute_Of): Return Unknown_Attribute
10374         when Pkg is unknown.
10376 2014-01-31  Hristian Kirtchev  <kirtchev@adacore.com>
10378         * sem_res.adb (Resolve_Entity_Name): Comment
10379         reformatting. Allow volatile objects in various generated checks.
10381 2014-01-31  Ed Schonberg  <schonberg@adacore.com>
10383         * sem_attr.adb (Analyze_Attribute, case 'Update): For a record
10384         component association, set the etype of the identifier, for
10385         SPARK use.
10387 2014-01-31  Ed Schonberg  <schonberg@adacore.com>
10389         * exp_ch6.adb (Has_Visibility_Of_Subprogram): If type is not
10390         declared in a package, not checks can apply to the subprogram.
10392 2014-01-31  Robert Dewar  <dewar@adacore.com>
10394         * erroutc.adb (Validate_Specific_Warnings): Warnings are
10395         controlled -gnatw.W.
10396         * gnat_ugn.texi: Document new warnings controlled by -gnatw.w.
10397         * opt.ads (Warn_On_Warnings_Off): Now controls more cases.
10399 2014-01-31  Arnaud Charlet  <charlet@adacore.com>
10401         * exp_disp.adb: Update comments.
10403 2014-01-31  Yannick Moy  <moy@adacore.com>
10405         * sem_ch12.adb (Analyze_Generic_Subprogram_Declaration,
10406         Save_Global_References): Guard access to expression in aspect.
10408 2014-01-31  Yannick Moy  <moy@adacore.com>
10410         * sem_prag.adb (Analyze_Pragma/Pragma_SPARK_Mode):
10411         Issue an error when the pragma is applied to a generic unit,
10412         a generic declaration, or inside a generic.
10414 2014-01-31  Yannick Moy  <moy@adacore.com>
10416         * sem_ch8.adb (Analyze_Subprogram_Renaming): Set SPARK_Mode on renaming
10417         entity.
10419 2014-01-31  Robert Dewar  <dewar@adacore.com>
10421         * exp_ch9.adb, s-tassta.adb, s-tposen.adb, s-tposen.ads: Minor
10422         reformatting.
10424 2014-01-31  Tristan Gingold  <gingold@adacore.com>
10426         * exp_disp.adb: Add a historic note.
10428 2014-01-31  Robert Dewar  <dewar@adacore.com>
10430         * sem_warn.adb (Warn_On_Useless_Assignments): Add call to
10431         Process_Deferred_References.
10433 2014-01-31  Yannick Moy  <moy@adacore.com>
10435         * erroutc.adb (Validate_Specific_Warnings): Do not issue a message for
10436         ineffective pragma Warnings(Off) in GNATprove_Mode.
10438 2014-01-31  Bob Duff  <duff@adacore.com>
10440         * s-taskin.ads: Minor comment fix.
10441         * s-tassta.adb (Abort_Dependents): Don't abort all dependents;
10442         just direct dependents. If this is actually an abort, each task
10443         will take care of aborting its dependents, so all dependents will
10444         get aborted, as before. However, when this is called the second
10445         time from Vulnerable_Complete_Master "for convenience" (i.e. to
10446         kill off tasks waiting at terminate alternatives), aborting
10447         indirect dependents is wrong, because it causes some unrelated
10448         tasks to get aborted.
10450 2014-01-31  Robert Dewar  <dewar@adacore.com>
10452         * sem_ch4.adb: Minor reformatting.
10454 2014-01-31  Robert Dewar  <dewar@adacore.com>
10456         * exp_ch2.adb: New calling sequence for Is_LHS.
10457         * frontend.adb: Add call to Process_Deferred_References.
10458         * lib-xref.ads, lib-xref.adb (Process_Deferred_References): New.
10459         (Deferred_References): New table.
10460         * sem_ch8.adb (Find_Direct_Name): Make deferred reference table
10461         entries.
10462         (Find_Expanded_Name): Ditto.
10463         * sem_res.adb: New calling sequence for Is_LHS.
10464         * sem_util.ads, sem_util.adb (Is_LHS): New calling sequence.
10465         * sem_warn.adb: Call Process_Deferred_References before issuing
10466         warnings.
10468 2014-01-31  Tristan Gingold  <gingold@adacore.com>
10470         * exp_util.adb (Corresponding_Runtime_Package): Restrict the
10471         use of System_Tasking_Protected_Objects_Single_Entry.
10472         * exp_ch9.adb (Build_Simple_Entry_Call): Remove Mode parameter
10473         of Protected_Single_Entry_Call.
10474         (Expand_N_Timed_Entry_Call): Remove single_entry case.
10475         * exp_disp.adb (Make_Disp_Asynchronous_Select_Body): Remove
10476         single_entry case.
10477         (Make_Disp_Timed_Select_Body): Likewise.
10478         * rtsfind.ads (RE_Timed_Protected_Single_Entry_Call): Remove.
10479         * s-tposen.adb (Send_Program_Error, PO_Do_Or_Queue): Remove
10480         Self_Id parameter.
10481         (Wakeup_Entry_Caller): Remove Self_ID and New_State parameters.
10482         (Wait_For_Completion_With_Timeout): Remove.
10483         (Protected_Single_Entry_Call): Remove Mode parameter
10484         (always Simple_Call).
10485         (Service_Entry): Remove Self_Id constant (not used anymore).
10486         (Timed_Protected_Single_Entry_Call): Remove.
10487         * s-tposen.ads (Timed_Protected_Single_Entry_Call): Remove.
10488         (Protected_Single_Entry_Call): Remove Mode parameter.
10490 2014-01-29  Hristian Kirtchev  <kirtchev@adacore.com>
10492         * einfo.adb (Get_Pragma): Handle the retrieval of pragma Refined_Post.
10493         * einfo.ads (Get_Pragma): Update the comment on special pragmas
10494         handled by this routine.
10495         * sem_prag.adb (Analyze_Pragma): Add a legal pragma Refined_Post
10496         to the contract of the related subprogram body.
10497         * sem_util.adb (Add_Contract_Item): Handle the insertion of
10498         pragma Refined_Post into the contract of a subprogram body.
10499         * sinfo.ads Update the documentation of node N_Contract.
10500         * sem_res.adb (Resolve_Entity_Name): Add a guard
10501         to detect abstract states and variables only when checking the
10502         SPARK 2014 rules concerning volatile object placement.
10504 2014-01-29  Ed Schonberg  <schonberg@adacore.com>
10506         * sem_ch4.adb (Find_Equality_Types, Try_One_Interp): within an instance,
10507         null is compatible with any access type.
10509 2014-01-29  Hristian Kirtchev  <kirtchev@adacore.com>
10511         * sem_util.adb (Find_Placement_In_State_Space): Assume that the default
10512         placement is not in a package.
10514 2014-01-29  Hristian Kirtchev  <kirtchev@adacore.com>
10516         * sem_util.adb (Has_Enabled_Property): Compare the character field of
10517         the sole property.
10519 2014-01-29  Robert Dewar  <dewar@adacore.com>
10521         * sem_intr.adb, a-ztexio.ads, sinfo.ads, sem_res.adb, gnatlink.adb,
10522         vms_conv.adb, a-except.ads, a-except-2005.ads, a-teioed.adb,
10523         sem_warn.ads, treepr.ads, erroutc.ads, a-excach.adb: Minor reformatting.
10525 2014-01-29  Robert Dewar  <dewar@adacore.com>
10527         * sem_util.ads, sem_util.adb (In_Pragma_Expression): New function.
10528         * sem_warn.adb (Check_References): Suppress warnings if inside
10529         Initial_Condition pragma.
10531 2014-01-29  Hristian Kirtchev  <kirtchev@adacore.com>
10533         * sem_prag.adb (Check_Missing_Part_Of): List all values of
10534         State_Space_Kind for readability reasons. Do not emit an error on
10535         a private item when the enclosing package lacks aspect/pragma
10536         Abstract_State. Do not emit an error on a private package
10537         instantiation when the corresponding generic template lacks
10538         visible state.
10539         (Has_Visible_State): New routine.
10540         * sem_util.adb (Find_Placement_In_State_Space): The visible
10541         declarations of any kind of child units in general act as proper
10542         placement location.
10544 2014-01-29  Robert Dewar  <dewar@adacore.com>
10546         * a-except-2005.adb, a-except.adb, a-excpol-abort.adb, a-exstat.adb,
10547         ali.adb, a-numaux.ads, a-numaux-darwin.ads, a-numaux-libc-x86.ads,
10548         a-numaux-vms.ads, a-numaux-vxworks.ads, a-numaux-x86.ads, aspects.ads,
10549         a-taside.adb, a-teioed.adb, a-textio.adb, a-textio.ads, atree.adb,
10550         atree.ads, a-witeio.adb, a-witeio.ads, a-wtedit.adb, a-ztedit.adb,
10551         a-ztexio.adb, bcheck.adb, binde.adb, checks.adb, comperr.adb,
10552         cstand.adb, debug_a.adb, einfo.ads, errout.adb, erroutc.adb,
10553         eval_fat.adb, exp_aggr.adb, exp_attr.adb, exp_ch11.adb, exp_ch3.adb,
10554         exp_ch4.adb, exp_ch5.adb, exp_ch6.adb, exp_ch9.adb, exp_dbug.adb,
10555         exp_disp.adb, exp_fixd.adb, exp_imgv.adb, exp_intr.adb, exp_util.adb,
10556         freeze.adb, frontend.adb, g-comlin.ads, g-mbdira.adb, gnat1drv.adb,
10557         gprep.adb, g-spipat.adb, i-cpp.ads, i-vxwork.ads, i-vxwork-x86.ads,
10558         krunch.ads, layout.adb, lib-load.adb, lib-writ.adb, lib-writ.ads,
10559         live.adb, namet.ads, osint.adb, osint-c.adb, output.ads, par.adb,
10560         par-ch10.adb, par-ch13.adb, par-ch3.adb, par-ch4.adb, par-ch5.adb,
10561         par-ch6.adb, par-ch9.adb, par-endh.adb, par-labl.adb, par-prag.adb,
10562         par-sync.adb, par-tchk.adb, par-util.adb, prj.adb, repinfo.adb,
10563         rtsfind.adb, s-arit64.adb, s-asthan-vms-alpha.adb,
10564         s-asthan-vms-ia64.adb, s-bignum.adb, scans.adb, scng.adb, s-dimmks.ads,
10565         sem_aggr.adb, sem_attr.adb, sem_aux.adb, sem_cat.adb, sem_ch10.adb,
10566         sem_ch12.adb, sem_ch13.adb, sem_ch13.ads, sem_ch3.adb, sem_ch4.adb,
10567         sem_ch5.adb, sem_ch6.adb, sem_ch8.adb, sem_disp.adb, sem_elab.adb,
10568         sem_elim.adb, sem_eval.adb, sem_intr.adb, sem_prag.adb, sem_res.adb,
10569         sem_type.adb, sem_util.adb, sem_warn.adb, set_targ.adb, s-fatgen.adb,
10570         s-fatgen.ads, s-fileio.adb, s-imgcha.adb, s-imgrea.adb, sinfo.ads,
10571         sinput-c.adb, snames.ads-tmpl, s-os_lib.adb, sprint.adb,
10572         s-regpat.adb, s-secsta.adb, s-stalib.ads,
10573         s-stchop.adb, s-stoele.ads, stand.ads, s-taprop-solaris.adb,
10574         s-tasdeb-vms.adb, s-tasini.adb, s-tassta.adb, s-valdec.adb,
10575         s-valuti.adb, s-wchjis.adb, s-wchwts.adb, system.ads, system-vms_64.ads,
10576         system-vms-ia64.ads, treepr.adb, types.ads, uintp.adb, uname.adb,
10577         urealp.adb, usage.adb, vxaddr2line.adb: Minor reformatting.
10579 2014-01-29  Robert Dewar  <dewar@adacore.com>
10581         * expander.adb: Minor reformatting.
10583 2014-01-29  Javier Miranda  <miranda@adacore.com>
10585         * exp_ch3.adb (Predefined_Primitive_Bodies): Adding documentation to
10586         previous patch.
10588 2014-01-29  Javier Miranda  <miranda@adacore.com>
10590         * exp_ch3.adb (Predefined_Primitive_Bodies): Complete the code
10591         that checks if an interface types defines the predefined "="
10592         function because the compiler was erroneously not generating the
10593         predefined "=" primitive as soon as the name of some interface
10594         primitive is "=" (formals were not checked).
10596 2014-01-29  Ed Schonberg  <schonberg@adacore.com>
10598         * expander.adb (Expander): In GNATprove mode, do not process
10599         transient scopes: they are in general not created in this mode,
10600         and an attempt to examine them will lead to constraint errors when
10601         processing configuration pragmas that have analyzable expressions.
10603 2014-01-29  Vincent Celier  <celier@adacore.com>
10605         * clean.adb (Gnatclean): Fail if main project is an aggregate
10606         project or if there is an aggregate library project in the
10607         project tree.
10608         * gnatcmd.adb: Fail if the main project is an aggregate project
10609         or if there is an aggegate library project in the project tree.
10610         * make.adb (Initialize): : Fail if main project is an aggregate
10611         project or if there is an aggregate library project in the
10612         project tree.
10613         * makeutl.ads (Aggregate_Libraries_In): New Boolean function.
10614         * prj-makr.adb (Initialize): Fail if the main project is an
10615         aggregate project or an aggregate library project.
10617 2014-01-29  Vincent Celier  <celier@adacore.com>
10619         * prj-part.adb (Check_Import_Aggregate): New procedure
10620         to check if an imported project is an aggregate project.
10621         (Parse_Single_Project): Call Check_Import_Aggregate
10622         * projects.texi: Document that aggregate projects cannot be
10623         extended or imported.
10625 2014-01-29  Robert Dewar  <dewar@adacore.com>
10627         * exp_ch9.adb, sem_ch7.ads, s-regexp.adb, sem_ch13.adb: Minor
10628         reformatting and code clean up.
10629         * gnat_ugn.texi: Add documentation section on Atomic Variables
10630         and Optimization.
10632 2014-01-29  Hristian Kirtchev  <kirtchev@adacore.com>
10634         * einfo.adb Flag264 is now unused.
10635         (Has_Body_References): Removed.
10636         (Set_Has_Body_References): Removed.
10637         (Write_Entity_Flags): Remove the output for flag Has_Body_References.
10638         * einfo.ads Update the comment on usage of attribute
10639         Body_References. Remove attribute Has_Body_References and its
10640         usage in nodes.
10641         (Has_Body_References): Removed along with pragma Inline.
10642         (Set_Has_Body_References): Removed along with pragma Inline.
10643         * sem_prag.adb (Analyze_Global_Item): Move the call to
10644         Record_Possible_Body_Reference in the state related checks
10645         section. Add a comment intended function.
10646         (Analyze_Input_Output): Move the call to Record_Possible_Body_Reference
10647         in the state related checks section. Add a comment intended function.
10648         (Analyze_Refinement_Clause): Cleanup the illegal body reference
10649         reporting. Add a comment on timing of error reporting.
10650         (Record_Possible_Body_Reference): Reimplement the routine.
10652 2014-01-29  Vincent Celier  <celier@adacore.com>
10654         * makeutl.adb (Mains.Find_File_Add_Extension): Only look for specs for
10655         unit-based languages.
10656         (Mains.Complete_Mains.Do_Complete): Use the source file project
10657         tree when calling Find_File_Add_Extension. Use the correct
10658         project name when reporting an error.
10660 2014-01-29  Hristian Kirtchev  <kirtchev@adacore.com>
10662         * aspects.adb Add an entry for aspect Part_Of in table
10663         Canonical_Aspect.
10664         * aspects.ads Add an entry for aspect Part_Of in tables Aspect_Id,
10665         Aspect_Argument, Aspect_Names and Aspect_Delay.
10666         * atree.h Define Elist9.
10667         * atree.adb (Elist9): New routine.
10668         (Set_Elist9): New routine.
10669         * atree.ads (Elist9): New routine.
10670         (Set_Elist9): New routine.
10671         * einfo.adb Add Part_Of_Constituents and Encapsulating_State to
10672         the list of node usage.  Remove Refined_State from the list of
10673         node usage.
10674         (Encapsulating_State): New routine.
10675         (Get_Pragma):
10676         Handle pragma Part_Of; (Part_Of_Constituents): New routine.
10677         (Refined_State): Removed.
10678         (Set_Encapsulating_State): New routine.
10679         (Set_Part_Of_Constituents): New routine.
10680         (Set_Refined_State): Removed.
10681         (Write_Field9_Name): Add an entry
10682         for Part_Of_Constituents (Write_Field10_Name): Add an entry for
10683         Encapsulating_State. Remove the entry for Refined_State.
10684         * einfo.ads Add new attributes Encapsulating_State
10685         and Part_Of_Constituents alond with their usage in
10686         entities. Remove attribute Refined_State along with its
10687         usage in entities.
10688         (Encapsulating_State): New routine and
10689         pragma Inline.  (Get_Pragma): Update the comment on usage.
10690         (Part_Of_Constituents): New routine and pragma Inline.
10691         (Refined_State): Removed along with pragma Inline.
10692         (Set_Encapsulating_State): New routine and pragma Inline.
10693         (Set_Part_Of_Constituents): New routine and pragma Inline.
10694         (Set_Refined_State): Removed along with pragma Inline.
10695         * par-prag.adb Pragma Part_Of does not need any special processing
10696         by the parser.
10697         * sem_ch3.adb (Analyze_Declarations): Remove local variables
10698         Body_Id and Prag. Call separate routines to analyze the
10699         contract of a package [body].
10700         (Analyze_Object_Contract):
10701         Update the comment on usage. Remove local variables
10702         Items and Nam. Use Get_Pragma rather than traversing the
10703         classification list.  Verify whether the lack of indicator
10704         Part_Of agrees with the placement of the variable in state space.
10705         (Analyze_Object_Declaration): Initialize the encapsulating state
10706         of a variable.  (Requires_State_Refinement): Moved to sem_util.
10707         * sem_ch7.adb (Analyze_Package_Body_Contract): New routine.
10708         (Analyze_Package_Contract): New routine.
10709         * sem_ch7.ads (Analyze_Package_Body_Contract): New routine.
10710         (Analyze_Package_Contract): New routine.
10711         * sem_ch10.adb (Decorate_State): Initialize the encapsulating
10712         state and Part_Of constituents.
10713         * sem_ch13.adb (Analyze_Aspect_Specifications):
10714         Add processing for aspect Part_Of. Update all
10715         calls to Decorate_Delayed_Aspect_And_Pragma.
10716         (Check_Aspect_At_Freeze_Point): Aspect Part_Of does
10717         not need any special processing at freeze time.
10718         (Decorate_Delayed_Aspect_And_Pragma): Renamed to
10719         Decorate_Aspect_And_Pragma.  Add formal parameter Delayed and
10720         update the associated comment.
10721         * sem_prag.adb Add an entry for pragma Part_Of in table Sig_Flags.
10722         (Analyze_Abstract_State): Add new global variable State_Id. Remove
10723         local constants Errors and Loc. Remove local variables Is_Null
10724         and State_Nam. Create the entity of the abstract state on the
10725         spot, before all remaining checks are performed. Verify that a
10726         missing Part_Of option agrees with the placement of the abstract
10727         state within the state space.
10728         (Analyze_Depends_In_Decl_Part):
10729         Add new global variables Constits_Seen and States_Seen. Check
10730         that a state and a corresponding constituent do not appear
10731         in pragma [Refined_]Depends.
10732         (Analyze_Global_In_Decl_Part):
10733         Add new global variables Constits_Seen and States_Seen. Check
10734         that a state and a corresponding constituent do not appear
10735         in pragma [Refined_]Global.
10736         (Analyze_Global_Item):
10737         Remove the now obsolete code that deals with Part_Of.
10738         Add the entity of the global item to the list of processed
10739         items.  (Analyze_Initializes_In_Decl_Part): Add new global
10740         variables Constits_Seen and States_Seen. Check that a state
10741         and a corresponding constituent do not appear in pragma
10742         Initializes.
10743         (Analyze_Initialization_Item): Add the entity
10744         of the initialization item to the list of processed items.
10745         (Analyze_Input_Item): Add the entity of the initialization
10746         item to the list of processed items.
10747         (Analyze_Input_Output):
10748         Remove the now obsolete code that deals with Part_Of.  Add the
10749         entity of the input/output to the list of processed items.
10750         (Analyze_Part_Of): New routine.
10751         (Analyze_Part_Of_Option): Remove
10752         local constant Par_State. Add local constant Encaps and local
10753         variables Encaps_Id and Legal. Use Analyze_Part of to analyze
10754         the option. Turn the related state into a Part_Of constituent
10755         if the option is legal.
10756         (Analyze_Pragma): Add processing
10757         for pragma Part_Of.
10758         (Analyze_Refined_State_In_Decl_Part):
10759         Remove global constants Pack_Body and Spec_Id. Remove
10760         global variables Abstr_States and Hidden_States. Add new
10761         global variables Available_States, Body_Id, Body_States and
10762         Spec_Id. Add new local constant Body_Decl. Reimplement the
10763         logic that extracts the states available for refinement from
10764         the related package and the body hidden states of the said
10765         package.
10766         (Analyze_Refinement_Clause): Add local variable Part_Of_Constits.
10767         (Check_Applicable_Policy): Alphabetize body.
10768         (Check_Dependency_Clause): Replace Refined_State
10769         with Encapsulating_State.
10770         (Check_Matching_Constituent):
10771         Reimplement the logic that determines whether an item is a valid
10772         / invalid constituent of the current refined state. Return when
10773         a construct does not denote a valid abstract state. Extract the
10774         list of Part_Of constituents for further analysis. Check that all
10775         Part_Of constituents of a state have been used in its refinement.
10776         (Check_Matching_State): Update the comment on usage. Operate
10777         on the list of available states.
10778         (Check_Missing_Part_Of): New routine.
10779         (Check_Refined_Global_Item): Replace Refined_State
10780         with Encapsulating_State.
10781         (Check_State_And_Constituent_Use): New routine.
10782         (Create_Abstract_State): New routine.
10783         (Is_Matching_Input): Replace Refined_State with Encapsulating_State.
10784         (Is_Part_Of): Removed.
10785         (Collect_Body_States): New routine.
10786         (Collect_Constituent): Replace Refined_State with Encapsulating_State.
10787         (Collect_Hidden_States): Removed.
10788         (Report_Unrefined_States): Change the profile of the procedure along
10789         with the comment on usage.
10790         (Report_Unused_Constituents): New routine.
10791         (Report_Unused_Hidden_States): Removed.
10792         (Report_Unused_States): New routine.
10793         * sem_prag.ads (Check_Missing_Part_Of): New routine.
10794         * sem_util.adb (Add_Contract_Item): Pragma Part_Of can now
10795         appear in the classification pragmas of a package instantiation
10796         or a variable.
10797         (Find_Placement_In_State_Space): New routine.
10798         (Is_Child): Removed.
10799         (Is_Child_Or_Sibling): Remove formal
10800         parameter Private_Child. Remove the private child checks.
10801         (Requires_State_Refinement): Moved from sem_ch3.
10802         * sem_util.ads Add new type State_Space_Kind along with
10803         comment on its usage and values.
10804         (Add_Contract_Item): Update the comment on usage.
10805         (Find_Body_Discriminal): Alphabetize spec.
10806         (Find_Placement_In_State_Space): New routine.
10807         (Is_Child_Or_Sibling): Remove formal parameter Private_Child
10808         and update the comment on usage.
10809         (Requires_State_Refinement): Moved from sem_ch3.
10810         * sinfo.ads: Update the documentation of N_Contract.
10811         * snames.ads-tmpl The predefined name for Part_Of is now used
10812         to denote a pragma. Add Pragma_Id for Part_Of.
10814 2014-01-29  Emmanuel Briot  <briot@adacore.com>
10816         * s-regexp.adb (Create_Secondary_Table): Automatically grow the state
10817         machine as needed.
10818         (Dump): New subprogram.
10820 2014-01-29  Tristan Gingold  <gingold@adacore.com>
10822         * exp_ch9.adb (Expand_N_Protected_Type_Declaration): Add
10823         Expand_Entry_Declaration to factorize code.
10825 2014-01-29  Ed Schonberg  <schonberg@adacore.com>
10827         * checks.adb: minor clarification.
10828         * sem_ch7.adb (Declare_Inherited_Private_Subprograms): Limit
10829         search for primitive operations to the entities that immediately
10830         follow the type declaration.
10832 2014-01-29  Tristan Gingold  <gingold@adacore.com>
10834         * exp_ch9.adb (Build_Protected_Entry): Do not call
10835         Complete_Entry_Body anymore.
10836         * rtsfind.ads (RE_Complete_Single_Entry_Body): Remove.
10837         * s-tposen.ads, s-tposen.adb (Complete_Single_Entry_Body): Remove.
10839 2014-01-29  Pierre-Marie Derodat  <derodat@adacore.com>
10841         * s-os_lib.adb, s-os_lib.ads (Normalize_Pathname): Return an empty
10842         string when the Name input bigger than allowed. Adapt the function
10843         specification.
10845 2014-01-29  Ed Schonberg  <schonberg@adacore.com>
10847         * checks.adb (Install_Null_Excluding_Check): Do not emit warning
10848         if expression is within a case_expression of if_expression.
10850 2014-01-29  Robert Dewar  <dewar@adacore.com>
10852         * exp_ch9.adb, inline.ads: Minor reformatting.
10854 2014-01-29  Tristan Gingold  <gingold@adacore.com>
10856         * exp_ch9.adb (Is_Exception_Safe): Return true if no exceptions.
10858 2014-01-29  Yannick Moy  <moy@adacore.com>
10860         * inline.ads (Pending_Body_Info): Add SPARK_Mode and
10861         SPARK_Mode_Pragma components to be able to analyze generic
10862         instance.
10863         * sem_ch12.adb (Analyze_Package_Instantiation,
10864         Inline_Instance_Body, Need_Subprogram_Instance_Body,
10865         Load_Parent_Of_Generic): Pass in SPARK_Mode from instantiation
10866         for future analysis of the instance.
10867         (Instantiate_Package_Body,
10868         Instantiate_Subprogram_Body, Set_Instance_Inv): Set SPARK_Mode
10869         from instantiation to analyze the instance.
10871 2014-01-29  Robert Dewar  <dewar@adacore.com>
10873         * sem_ch7.adb, sem_prag.adb, sem_ch4.adb, sem_ch6.adb: Minor code
10874         reorganization.
10876 2014-01-29  Yannick Moy  <moy@adacore.com>
10878         * gnat_rm.texi: Update description of SPARK_Mode pragma.
10880 2014-01-29  Tristan Gingold  <gingold@adacore.com>
10882         * exp_ch9.adb (Expand_N_Protected_Body): Remove Num_Entries.
10884 2014-01-29  Thomas Quinot  <quinot@adacore.com>
10886         * sem_ch4.adb (Find_Component_In_Instance): Update comment.
10888 2014-01-29  Ed Schonberg  <schonberg@adacore.com>
10890         * exp_util.adb (Build_Task_Image_Prefix): Indicate that the
10891         resulting string is an internal entity. and thus requires no
10892         initialization. This is relevant when Initialize_ Scalars is
10893         enabled, because the resultant spurious initialization may lead to
10894         secondary stack anomalies that produce a mangled name for a task.
10896 2014-01-29  Yannick Moy  <moy@adacore.com>
10898         * sem_ch6.adb (Analyze_Subprogram_Body_Helper): SPARK_Mode
10899         not inherited from spec anymore. Check consistency
10900         rules after processing of declarations.
10901         * sem_ch7.adb (Analyze_Package_Body_Helper): SPARK_Mode not inherited
10902         from spec anymore. Check consistency rules after processing of
10903         declarations.
10904         (Analyze_Package_Declaration): Set SPARK_Mode only for non-generic
10905         packages.
10906         * sem_prag.adb (Analyze_Pragma/Pragma_SPARK_Mode): Implement new
10907         consistency rules.
10909 2014-01-27  Robert Dewar  <dewar@adacore.com>
10911         * sem_res.adb (Resolve_Comparison_Op): Add type name/location
10912         to unordered msg.
10913         (Resolve_Range): Add type name/location to unordered msg.
10915 2014-01-27  Claire Dross  <dross@adacore.com>
10917         * a-cofove.adb/s (Copy): Add precondition so that Copy (Source,
10918         Capacity) is only called with Capacity >= Length (Source) and
10919         Capacity in Capacity_Range.
10920         * a-cfdlli.adb/s, a-cfhase.adb/s, a-cfhama.adb/s, a-cforse.adb/s,
10921         a-cforma.adb/s (Copy): Add precondition so that Copy (Source, Capacity)
10922         is only called with Capacity >= Source.Capacity. Raise Capacity_Error
10923         in the code is this is not the case.
10925 2014-01-27  Thomas Quinot  <quinot@adacore.com>
10927         * sem_ch4.adb (Analyze_Selected_Component): Fix handling of
10928         selected component in an instance where the component of the
10929         actual is not visibile at instantiation.
10931 2014-01-27  Ed Schonberg  <schonberg@adacore.com>
10933         * sem_ch6.adb: sem_ch6.adb (Set_Actual_Subtypes): If the type
10934         has a dynamic predicate, generate freeze node for Actual_Subtype
10935         at once, because the declaration of the corresponding predicate
10936         function will make reference to it.
10938 2014-01-27  Tristan Gingold  <gingold@adacore.com>
10940         * exp_ch7.adb, exp_ch9.adb: Adjust comments.
10942 2014-01-27  Robert Dewar  <dewar@adacore.com>
10944         * exp_ch4.adb (Expand_N_Op_Expon): Remove unsigned type test
10945         for 2**X optimization.
10947 2014-01-27  Ed Schonberg  <schonberg@adacore.com>
10949         * a-suenst.adb: strings.utf_encoding.strings (Decode): Check
10950         explicitly whether value is in range of Character, because the
10951         library is typically compiled with range checks disabled, and
10952         we cannot rely on the implicit check on the argument of 'Val.
10954 2014-01-27  Vincent Celier  <celier@adacore.com>
10956         * a-ciorma.adb, a-cihama.adb (Assign): Copy the Source to the Target,
10957         not the Target to itself.
10959 2014-01-27  Robert Dewar  <dewar@adacore.com>
10961         * vms_conv.ads, ali.adb, sem_ch6.ads, opt.ads, vms_cmds.ads: Minor
10962         changes to avoid incorrect use of unordered enum types.
10964 2014-01-27  Thomas Quinot  <quinot@adacore.com>
10966         * sem_ch4.adb: Minor reformatting.
10968 2014-01-27  Robert Dewar  <dewar@adacore.com>
10970         * scn.adb (Check_End_Of_Line): Removed.
10971         (Error_Long_Line): Removed.
10972         (Determine_License): Use versions of above routines from Scanner.
10973         * scng.adb (Check_End_Of_Line): Moved to spec.
10974         (Error_Long_Line): Removed, no longer used.
10975         * scng.ads (Check_End_Of_Line): Moved here from body.
10977 2014-01-27  Tristan Gingold  <gingold@adacore.com>
10979         * exp_ch7.adb (Build_Cleanup_Statements): Call
10980         Build_Protected_Subprogram_Call_Cleanup to insert the cleanup
10981         for protected body.
10982         * exp_ch9.adb (Build_Protected_Subprogram_Body): Likewise.
10983          Remove Service_Name variable.
10984         (Build_Protected_SUbprogam_Call_Cleanup): New procedure that
10985         factorize code from the above subprograms.
10986         * exp_ch9.ads (Build_Protected_Subprogram_Call_Cleanup): New procedure.
10988 2014-01-27  Hristian Kirtchev  <kirtchev@adacore.com>
10990         * einfo.adb (Has_Option): Reimplemented.
10991         * sem_prag.adb (Analyze_Refinement_Clause): Add global
10992         variables AR_Constit, AW_Constit, ER_Constit, EW_Constit,
10993         External_Constit_Seen and State. Add local variables Body_Ref,
10994         Body_Ref_Elmt and Extra_State. Reimplement part of the logic to
10995         avoid a cumbersome while pool. Verify the legality of an external
10996         state and relevant properties.
10997         (Check_External_Property): New routine.
10998         (Check_Matching_State): Remove parameter profile
10999         and update comment on usage.
11000         (Collect_Constituent): Store the
11001         relevant external property of a constituent.
11002         * sem_util.adb (Async_Readers_Enabled): Update the call to
11003         Has_Enabled_Property.
11004         (Async_Writers_Enabled): Update the call to Has_Enabled_Property.
11005         (Effective_Reads_Enabled): Update the call to Has_Enabled_Property.
11006         (Effective_Writes_Enabled): Update the call to Has_Enabled_Property.
11007         (Has_Enabled_Property): Rename formal parameter Extern to State_Id.
11008         Update comment on usage. Reimplement the logic to recognize the various
11009         formats of properties.
11011 2014-01-27  Ed Schonberg  <schonberg@adacore.com>
11013         * par-ch5.adb: Minor reformatting.
11015 2014-01-27  Tristan Gingold  <gingold@adacore.com>
11017         * s-tposen.ads: Harmonize style and comments.
11019 2014-01-27  Vincent Celier  <celier@adacore.com>
11021         * projects.texi: Document that shared library projects, by
11022         default, cannot import projects that are not shared library
11023         projects.
11025 2014-01-27  Robert Dewar  <dewar@adacore.com>
11027         * sem_ch8.adb (Find_Selected_Component): Use Replace instead
11028         of Rewrite.
11030 2014-01-27  Ed Schonberg  <schonberg@adacore.com>
11032         * a-suenco.adb, a-suenst.adb (Decode): Raise encoding error if
11033         any other exception is raised.
11034         (Convert): If both Input_Scheme and Output_Scheme are UTF_8 it is
11035         still necessary to perform a conversion in order to remove overlong
11036         encodings.
11038 2014-01-27  Robert Dewar  <dewar@adacore.com>
11040         * exp_smem.adb: Minor reformatting.
11042 2014-01-27  Thomas Quinot  <quinot@adacore.com>
11044         * a-calfor.ads: Fix incorrect reference to operator "-" in comment.
11046 2014-01-27  Ed Schonberg  <schonberg@adacore.com>
11048         * sem_res.adb (Make_Call_Into_Operator): In ASIS mode, relocate
11049         nodes for operands to the original node for the call, to preserve
11050         Original_Node pointers within the resolved operands, given that
11051         they may have been rewritten as well. Previous approach copied
11052         the operands into a new tree and lost those pointers.
11054 2014-01-27  Claire Dross  <dross@adacore.com>
11057         * a-cofove.adb, a-cofove.ads: Add Strict_Equal function to the API.
11059 2014-01-27  Ed Schonberg  <schonberg@adacore.com>
11061         * sem_util.adb (Check_Internal_Protected_Use): A call through
11062         an anonymous access parameter of the current protected function
11063         is not a potential modification of the current object.
11065 2014-01-27  Ed Schonberg  <schonberg@adacore.com>
11067         * a-cobove.adb (Reserve_Capacity): Procedure raises
11068         Capacity_Error, not Constraint_Error, when request cannot be
11069         satisfied.
11071 2014-01-27  Vincent Celier  <celier@adacore.com>
11073         * a-coorma.adb, a-cohama.adb (Assign): Copy the Source to the Target,
11074         not the Target to itself.
11076 2014-01-27  Ed Schonberg  <schonberg@adacore.com>
11078         * exp_ch4.adb (Expand_Concatenate): If the target of the
11079         concatenation is a library-level entity, always use the off-line
11080         version of concatenation, regardless of optimization level. This
11081         is space-efficient, and prevents linking problems when some
11082         units are compiled with different optimization levels.
11084 2014-01-27  Ed Schonberg  <schonberg@adacore.com>
11086         * sem_ch5.adb: Code clean up.
11088 2014-01-27  Ed Schonberg  <schonberg@adacore.com>
11090         * par-ch5.adb (P_Iterator_Specification): Improve error recovery
11091         when an array or container iterator includes a subtype indication,
11092         which is only legal in an element iterator.
11094 2014-01-27  Thomas Quinot  <quinot@adacore.com>
11096         * exp_ch7.adb: Minor reformatting.
11098 2014-01-27  Robert Dewar  <dewar@adacore.com>
11100         * opt.adb (SPARK_Mode): Default for library units is None rather
11101         than Off.
11102         * opt.ads: Remove AUTO from SPARK_Mode_Type SPARK_Mode_Type is
11103         no longer ordered.
11104         * sem_prag.adb (Analyze_Pragma, case SPARK_Mode): Remove AUTO
11105         possibility.
11106         * snames.ads-tmpl (Name_Auto): Removed, no longer used.
11108 2014-01-27  Robert Dewar  <dewar@adacore.com>
11110         * par-ch5.adb (P_Sequence_Of_Statements): Make entry in
11111         Suspicious_Labels table if we have identifier; followed by loop
11112         or block.
11113         * par-endh.adb (Evaluate_End_Entry): Search Suspicious_Labels table.
11114         * par.adb (Suspicious_Labels): New table.
11116 2014-01-27  Robert Dewar  <dewar@adacore.com>
11118         * exp_aggr.adb (Check_Bounds): Reason is range check, not
11119         length check.
11121 2014-01-27  Yannick Moy  <moy@adacore.com>
11123         * get_spark_xrefs.adb (Get_SPARK_Xrefs): Accept new type 'c' for
11124         reference.
11125         * lib-xref-spark_specific.adb (Is_Global_Constant): Remove useless
11126         function now.
11127         (Add_SPARK_Xrefs): Include references to constants.
11128         * spark_xrefs.ads Document new character 'c' for references to
11129         constants.
11131 2014-01-27  Thomas Quinot  <quinot@adacore.com>
11133         * exp_smem.adb (Add_Write_After): For a function call, insert write as
11134         an after action in a transient scope.
11136 2014-01-27  Thomas Quinot  <quinot@adacore.com>
11138         * exp_smem.adb (Expand_Shared_Passive_Variable): For a reference
11139         to a shared variable as an OUT formal in a call to an init proc,
11140         the 'Read call must be emitted after, not before, the call.
11142 2014-01-27  Robert Dewar  <dewar@adacore.com>
11144         * gnat_rm.texi: Remove mention of AUTO mode for SPARK_Mode pragma.
11146 2014-01-27  Robert Dewar  <dewar@adacore.com>
11148         * a-wichha.adb (Character_Set_Version): Change to output proper
11149         value.
11151 2014-01-27  Hristian Kirtchev  <kirtchev@adacore.com>
11153         * einfo.adb (Is_Input_Only_State): Removed.
11154         (Is_Non_Volatile_State): Removed.
11155         (Is_Output_State): Removed.
11156         * einfo.ads (Is_Input_Only_State): Remove attribute and
11157         subprogram. Update related entity.
11158         (Is_Non_Volatile_State):
11159         Remove attribute and subprogram. Update related entity.
11160         (Is_Output_State): Removed attribute and subprogram. Update
11161         related entity.
11162         * exp_ch6.adb (Expand_Subprogram_Contract): Update comment on
11163         generated code.
11164         * sem_ch3.adb (Analyze_Declarations): Analyze the contract of
11165         an object, not just variables.
11166         (Analyze_Object_Contract): New routine.
11167         (Analyze_Variable_Contract): Removed.
11168         (Process_Discriminants): Detect an illegal use of volatile
11169         discriminant in SPARK mode.
11170         * sem_ch5.adb (Analyze_Iterator_Specification):
11171         Detect an illegal use of volatile loop variable.
11172         (Analyze_Loop_Parameter_Specification): Detect an illegal use
11173         of volatile loop variable.
11174         * sem_ch6.adb (Process_Formals): Update the volatile object
11175         detection. Detect an illegal formal of mode IN OUT or OUT in
11176         SPARK mode. Enhance the error messages with references.
11177         * sem_ch12.adb (Instantiate_Object): Update the volatile object
11178         detection. Enhance the error messages with references.
11179         * sem_prag.adb (Analyze_Abstract_State): Enhance the error
11180         messages with references.
11181         (Analyze_Contract_Case): Enhance the error messages with references.
11182         (Analyze_External_Property): Call Check_Duplicate_Property to process
11183         an external property.
11184         (Analyze_External_Property_In_Decl_Part): New routine.
11185         (Analyze_External_State_In_Decl_Part): Removed.
11186         (Analyze_Global_Item): Detect an illegal
11187         use of a volatile constant. Detect an illegal use
11188         of a variable with enabled Effective_Reads. Enhance
11189         the error messages with references. Remove obsolete
11190         checks concerning Input_Only and Output_Only states.
11191         (Analyze_Initialization_Item): Enhance the error messages
11192         with references.
11193         (Analyze_Initializes_In_Decl_Part): Do not
11194         collect the states and variables when the initialization list
11195         is null.
11196         (Analyze_Input_Item): Enhance the error messages with references.
11197         (Analyze_Input_Output): Enhance the error messages with references.
11198         (Analyze_Pragma): Enhance the error messages with references.
11199         (Analyze_Refinement_Clause): Code reformatting.
11200         (Analyze_Refined_Depends_In_Decl_Part):
11201         Rename global variable Global to Reg_Global and update all
11202         occurrences. Add local variables D7 and D8. Update the error
11203         messages with references. Update the call to Collect_Global_Items.
11204         (Analyze_Refined_Global_In_Decl_Part): Add local variables
11205         Has_Proof_In_State, Proof_In_Constits and Proof_In_Items. Update
11206         the call to Collect_Global_Items.  Account for a Proof_In state
11207         in null / useless refinement checks. Verify the coverage of
11208         Proof_In states.
11209         (Check_Dependency_Clause): Remove local variable
11210         Out_Constits. Remove the retrieval and removal of constituents
11211         for an Output_Only state. Remove the reporting of unused
11212         Output_Only state constituents.
11213         (Check_Duplicate_Mode): Enhance
11214         the error message with a reference.
11215         (Check_Duplicate_Property): New routine.
11216         (Check_Duplicate_Option): Enhance the error message with a reference.
11217         (Check_External_Properties): Enhance the error message with a reference.
11218         (Check_Function_Return): Enhance the error message with a reference.
11219         (Check_In_Out_States): Update
11220         comment on usage. Add a specialized error message for Proof_In
11221         constituents. Enhance the error message with a reference.
11222         (Check_Input_States): Update comment on usage. Account for
11223         possible Proof_In constituents. Enhance the error message
11224         with a areference.
11225         (Check_Matching_Constituent): Enhance the error message with a
11226         reference.
11227         (Check_Matching_State): Enchance the error message with a reference.
11228         (Check_Mode): Add local variable From_Global. Update the call to
11229         Find_Mode.  Emit more precise error messages concerning extra items
11230         (Check_Mode_Restriction_In_Enclosing_Context): Consider
11231         pragma Refined_Global.  Enhance the error message with a
11232         reference.
11233         (Check_Mode_Restriction_In_Function): Enhance the error message with
11234         a reference.
11235         (Check_Output_States): Update comment on usage. Add local variable
11236         Posted.  Account for possible Proof_In constituents. Produce a detailed
11237         list of missing constituents.
11238         (Check_Proof_In_States): New routine.
11239         (Check_Refined_Global_Item): Handle Proof_In
11240         constituents. Enchance the error message with a reference.
11241         (Collect_Global_Items): Add formal parameters Proof_In_Items
11242         and Has_Proof_In_State. Update the comment on usage. Account
11243         for Proof_In items.
11244         (Create_Or_Modify_Clause): Enchance
11245         the error message with a reference.
11246         (Find_Mode): Add
11247         formal parameter From_Global. Update the comment on usage.
11248         Detect when the mode is governed by pragma [Refined_]Global.
11249         (Output_Constituents): Removed.
11250         (Report_Extra_Constituents):
11251         Report extra Proof_In constituents.
11252         (Report_Unused_Constituents): Removed.
11253         (Usage_Error): Code reformatting. Enhance the error
11254         messages with reference.
11255         * sem_prag.ads (Analyze_External_Property_In_Decl_Part): New routine.
11256         (Analyze_External_State_In_Decl_Part): Removed.
11257         * sem_res.adb (Resolve_Actuals): Update the volatile object
11258         detection. Enhance the error message with a reference.
11259         (Resolve_Entity_Name): Update the volatile object
11260         detection. Enhance the error message with a reference.
11261         * sem_util.adb (Is_Refined_State): Add a guard to avoid a crash.
11262         (Is_SPARK_Volatile_Object): New routine.
11263         (Has_Volatile_Component): New routine.
11264         * sem_util.ads (Is_Delegate): Alphabetized.
11265         (Is_SPARK_Volatile_Object): New routine.
11266         (Has_Volatile_Component): New routine.
11267         * snames.ads-tmpl: Remove names Name_Input_Only and Name_Output_Only.
11269 2014-01-27  Ed Schonberg  <schonberg@adacore.com>
11271         * sem_attr.adb: Resolve fully prefix of 'Update.
11273 2014-01-27  Ben Brosgol  <brosgol@adacore.com>
11275         * gnat_rm.texi: Minor clarifications.
11277 2014-01-27  Robert Dewar  <dewar@adacore.com>
11279         * sem_elab.adb (Check_Internal_Call_Continue): Avoid complaining
11280         about call that is generated as part of an Initial_Condition
11281         check.
11282         * sem_prag.adb: Minor spelling correction.
11284 2014-01-27  Robert Dewar  <dewar@adacore.com>
11286         * sem_prag.adb (Set_Convention_From_Pragma): Check that
11287         convention Ghost can only apply to functions.
11288         * einfo.ads, einfo.adb (Is_Ghost_Subprogram): Add clarifying comment.
11290 2014-01-27  Robert Dewar  <dewar@adacore.com>
11292         * gnat_ugn.texi: Add Short_Enums to documentation of
11293         -gnatet/-gnateT.
11295 2014-01-27  Robert Dewar  <dewar@adacore.com>
11297         * sem_prag.adb (Analyze_Input_Item): Correct check for input
11298         item in same package.
11299         * sem_util.ads, sem_util.adb (Within_Scope): New function.
11301 2014-01-26  Arnaud Charlet  <charlet@adacore.com>
11303         * a-intnam-lynxos.ads, mlib-tgt-specific-lynxos.adb,
11304         s-osinte-lynxos-3.adb, s-osinte-lynxos-3.ads, s-osinte-lynxos.adb,
11305         s-osinte-lynxos.ads, s-taprop-lynxos.adb, s-tpopsp-lynxos.adb,
11306         system-lynxos-ppc.ads, system-lynxos-x86.ads: Removed, no longer
11307         maintained.
11309 2014-01-25  Eric Botcazou  <ebotcazou@adacore.com>
11311         * gcc-interface/Makefile.in: Fix oversight.
11313 2014-01-25  Eric Botcazou  <ebotcazou@adacore.com>
11315         * gcc-interface/utils.c (convert_to_fat_pointer): Un-obfuscate the
11316         conversion from a thin pointer with a shifted value.
11317         * gcc-interface/utils2.c (gnat_build_constructor): Propagate the
11318         read-only flag from the values onto the result.
11319         (gnat_invariant_expr): Accept read-only CONSTRUCTORs.
11321 2014-01-25  Tristan Gingold  <gingold@adacore.com>
11323         * gcc-interface/decl.c (gnat_to_gnu_entity): Always build a variable
11324         for E_Variable with a pragma Linker_Section.
11326 2014-01-25  Robert Dewar  <dewar@adacore.com>
11328         * gcc-interface/decl.c (gnat_to_gnu_param): Make sure an Out parameter
11329         with Default_Value aspect is passed in by copy.
11331 2014-01-24  Eric Botcazou  <ebotcazou@adacore.com>
11333         * set_targ.adb: Set Short_Enums.
11334         * gcc-interface/lang.opt (fshort-enums): New option.
11335         * gcc-interface/misc.c (gnat_handle_option): Handle it.
11336         (gnat_post_options): Do not modify the global settings.
11338 2014-01-24  Robert Dewar  <dewar@adacore.com>
11340         * g-rannum.ads, g-rannum.adb (Random_Ordinary_Fixed): New generic
11341         function.
11342         (Random_Decimal_Fixed): New generic function.
11343         * s-rannum.ads: Minor comment clarifications.
11345 2014-01-24  Robert Dewar  <dewar@adacore.com>
11347         * back_end.adb: Remove Short_Enums handling (handled in
11348         Ttypes/Get_Targ now) Minor added comments.
11349         * freeze.adb: Change name Short_Enums_On_Target to
11350         Target_Short_Enums.
11351         * get_targ.ads, get_targ.adb (Get_Short_Enums): New function.
11352         * opt.ads: Minor comment updates.
11353         * sem_ch13.adb: Change name Short_Enums_On_Target to
11354         Target_Short_Enums.
11355         * set_targ.adb: Set Short_Enums from gcc back end.
11356         * set_targ.ads (Short_Enums): New variable.
11357         * targparm.ads, targparm.adb: Remove Short_Enums entries (handled in
11358         Ttypes/Get_Targ now).
11359         * ttypes.ads (Target_Short_Enums): New constant boolean switch
11361 2014-01-24  Pascal Obry  <obry@adacore.com>
11363         * g-sercom-mingw.adb: Fix serial port name for port number > 10.
11365 2014-01-24  Gary Dismukes  <dismukes@adacore.com>
11367         * exp_disp.adb (Expand_Dispatching_Call): Call Unqualify on Param when
11368         comparing it with Ctrl_Arg, since Ctrl_Arg may have had qualification
11369         stripped off.
11371 2014-01-24  Robert Dewar  <dewar@adacore.com>
11373         * sinfo.ads, make.adb, prj-env.adb: Minor reformatting.
11375 2014-01-24  Vincent Celier  <celier@adacore.com>
11377         * prj.adb (Add_Aggregated_Project): Do not add a project in
11378         the list if it is already there.
11380 2014-01-24  Yannick Moy  <moy@adacore.com>
11382         * lib-xref-spark_specific.adb (Enclosing_Subprogram_Or_Package):
11383         Correct the search for a subrogram declaration to which a pragma is
11384         attached.
11386 2014-01-24  Bob Duff  <duff@adacore.com>
11388         * gnat_ugn.texi: Document --decimal-grouping and
11389         --based-grouping switches in gnatpp.
11391 2014-01-24  Ed Schonberg  <schonberg@adacore.com>
11393         * sinfo.ads: Documentation update.
11395 2014-01-24  Ed Schonberg  <schonberg@adacore.com>
11397         * sem_ch3.adb (Constant_Redeclaration): New declaration is
11398         illegal if previous one has an initial expression that is an
11399         aggregate expanded into assignments.
11401 2014-01-24  Ed Schonberg  <schonberg@adacore.com>
11403         * sem_ch5.adb (Analyze_Loop_Parameter_Specification): Small
11404         code reorganization to remove spurious warning on a loop with
11405         an array element iterator that has a null range.
11407 2014-01-24  Vincent Celier  <celier@adacore.com>
11409         * make.adb (Binding_Phase): When setting the Ada paths, use
11410         the library ALI dir, not the object dir in libraries.
11412 2014-01-24  Yannick Moy  <moy@adacore.com>
11414         * sinfo.ads: Add documentation of check flag fields.
11416 2014-01-24  Ed Schonberg  <schonberg@adacore.com>
11418         * sem_res.adb (Resolve_Actuals): If an actual is a view
11419         conversion of a discriminated object, and the formal type is
11420         discriminated and constrained, apply a discriminant check to
11421         the object itself.
11423 2014-01-24  Robert Dewar  <dewar@adacore.com>
11425         * prj.adb, prj-env.adb, back_end.adb: Add comment, minor code clean ups.
11427 2014-01-24  Ed Schonberg  <schonberg@adacore.com>
11429         * sem_ch3.adb (Analyze_Declarations): At the end of an
11430         appropriate declarative part, call Freeze_All from the first
11431         declaration in the scope, not from the first unfrozen one. This
11432         is necessary to apply visibility checks to entities with delayed
11433         aspects. Otherwise, in the presence of instantiations and cleanups
11434         that they may generate, the delayed aspects may be analyzed too
11435         late and produce spurious visibility errors.
11436         * sem_attr.adb: Place etype on range.
11437         * sem_ch6.adb: Documentation expression functions.
11439 2014-01-24  Robert Dewar  <dewar@adacore.com>
11441         * exp_ch7.adb: Minor change of Indices to Indexes (preferred
11442         terminology in compiler).
11444 2014-01-24  Robert Dewar  <dewar@adacore.com>
11446         * scans.ads: Remove Tok_Raise from Sterm, Eterm, After_SM
11447         categories, now that Ada 95 supports raise expressions.
11449 2014-01-24  Robert Dewar  <dewar@adacore.com>
11451         * freeze.adb (Freeze_Enumeration_Type): Use new target parameter
11452         Short_Enums_On_Target.
11453         * sem_ch13.adb (Set_Enum_Esize): Take Short_Enums_On_Target
11454         into account.
11455         * targparm.ads, targparm.adb: Add new target parameter Short_Enums.
11457 2014-01-24  Ed Schonberg  <schonberg@adacore.com>
11459         * sem_ch5.adb (Analyze_Iterator_Specification): If subtype
11460         indication is given explicity, check that it matches the array
11461         component type or the container element type of the domain
11462         of iteration.
11464 2014-01-24  Tristan Gingold  <gingold@adacore.com>
11466         * back_end.adb (Scan_Compiler_Arguments): Set Short_Enums_On_Target.
11467         * gcc-interface/misc.c (flag_short_enums): Declare.
11468         (gnat_post_options): Set it.
11470 2014-01-24  Vincent Celier  <celier@adacore.com>
11472         * prj-env.adb (Ada_Objects_Path): Use Ada_Objects_Path_No_Libs
11473         to cache the result when Including_Libraries is False.
11474         * prj-env.ads (Ada_Objects_Path): Update documentation
11475         * prj.adb (Free (Project_Id)): Also free Ada_Objects_Path_No_Libs
11476         (Get_Object_Directory): Return the Library_Ali_Dir only when
11477         when Including_Libraries is True.
11478         * prj.ads (Get_Object_Directory): Fix and complete documentation
11479         (Project_Data): New component Ada_Objects_Path_No_Libs
11481 2014-01-24  Robert Dewar  <dewar@adacore.com>
11483         * checks.adb (Expr_Known_Valid): Result of fpt operator never
11484         considered valid.
11486 2014-01-24  Eric Botcazou  <ebotcazou@adacore.com>
11488         * back_end.adb: Minor fix in comment.
11490 2014-01-24  Javier Miranda  <miranda@adacore.com>
11492         * sem_ch3.adb (Check_Abstract_Overriding): Code reestructuration
11493         required to report the error in case of task types.
11495 2014-01-24  Ed Schonberg  <schonberg@adacore.com>
11497         * sem_attr.adb: Additional index checking.
11499 2014-01-24  Ed Schonberg  <schonberg@adacore.com>
11501         * sem_attr.adb (Analyze_Attribute, case 'Update): Analyze
11502         expressions in each component association, and for records note
11503         the entity in each association choice, for subsequent resolution.
11504         (Resolve_Attribute, case 'Update): Complete resolution of
11505         expressions in each component association.
11507 2014-01-24  Robert Dewar  <dewar@adacore.com>
11509         * sem.adb (Sem): Avoid premature reference to Current_Sem_Unit
11510         (this was causing Is_Main_Unit_Or_Main_Unit_Spec to be set wrong,
11511         leading to wrong handling of SPARK_Mode for library units).
11513 2014-01-24  Robert Dewar  <dewar@adacore.com>
11515         * sem_ch6.adb (Analyze_Subprogram_Body_Helper): Set SPARK_Mode
11516         on generic instances (do not consider them to be internally
11517         generated)
11519 2014-01-24  Doug Rupp  <rupp@adacore.com>
11521         * s-osinte-android.ads (pthread_sigmask): Import sigprocmask
11522         vice pthread_sigmask.
11524 2014-01-24  Vincent Celier  <celier@adacore.com>
11526         * prj.adb (Debug_Output (Str, Str2)): Output if verbosity is
11527         not default.
11529 2014-01-24  Vincent Celier  <celier@adacore.com>
11531         * prj-ext.adb (Add): Do not output anything when Silent is True,
11532         whatever the verbosity. When Source is From_External_Attribute,
11533         set the corresponding environment variable if it is not already set.
11534         * prj-ext.ads (Add): New Boolean parameter Silent, defaulted
11535         to False
11536         * prj-proc.adb (Process_Expression_For_Associative_Array):
11537         For attribute External, call Prj.Ext.Add with Silent set to
11538         True for the child environment, to avoid useless output in non
11539         default verbosity.
11541 2014-01-24  Ed Schonberg  <schonberg@adacore.com>
11543         * sem_res.adb (Set_Slice_Subtype): Handle properly a discrete
11544         range given by a subtype indication, and force evaluation of
11545         the bounds, as for a simple range.
11546         * exp_util.adb (Evaluate_Slice_Bounds): Utility to force evaluation
11547         of bounds of slice for various kinds of discrete ranges.
11548         (Evaluate_Name, Evaluate_Subtype_From_Expr): use
11549         Evaluate_Slice_Bounds.
11551 2014-01-24  Bob Duff  <duff@adacore.com>
11553         * s-taskin.ads (Activator): Make this Atomic, because
11554         Activation_Is_Complete reads it, and that can be called
11555         from any task. Previously, this component was only
11556         modified by the activator before activation, and by
11557         Self after activation.
11558         * a-taside.ads, a-taside.adb (Environment_Task,
11559         Activation_Is_Complete): Implement these missing functions.
11561 2014-01-24  Doug Rupp  <rupp@adacore.com>
11563         * init.c: Add a handler section for Android.
11565 2014-01-24  Arnaud Charlet  <charlet@adacore.com>
11567         * i-cexten.ads (Unsigned_33..64, Unsigned_33..64): New types.
11569 2014-01-24  Ed Schonberg  <schonberg@adacore.com>
11571         * sem_ch4.adb (Operator_Check): If one operand is a
11572         Raise_Expression, set its type to that of the other operand.
11573         * sem_res.adb (Resolve_Raise_Expression): new procedure.
11574         (Resolve_Actuals): For an actual that is a Raise_Expression,
11575         set the type to that of the formal.
11576         * sem_type.adb (Find_Unique_Type): If one of the operands is a
11577         Raise_Expression, return type of the other operand.
11579 2014-01-24  Ed Schonberg  <schonberg@adacore.com>
11581         * sem_aggr.adb (Resolve_Record_Aggregate): If a scalar
11582         component of the record has a type with a default aspect, and
11583         the corresponding aggregate component is initiaized with a box,
11584         use the default value in the rewritten aggregate.
11586 2014-01-24  Tristan Gingold  <gingold@adacore.com>
11588         * s-interr.ads, s-interr.adb, s-interr-hwint.adb, s-interr-vms.adb,
11589         s-interr-sigaction.adb,
11590         s-interr-dummy.adb (Install_Restricted_Handlers): Add Prio parameter.
11591         * exp_ch9.adb (Make_Initialize_Protection): Add Prio parameter
11592         to the call to Install_Restricted_Handlers.
11594 2014-01-24  Emmanuel Briot  <briot@adacore.com>
11596         * prj-nmsc.adb (Check_File): Add protection when the source is
11597         not fully initialized.
11599 2014-01-24  Ed Schonberg  <schonberg@adacore.com>
11601         * sem_util.adb (Is_Post_State): In a postcondition, a selected
11602         component that denotes an implicit dereference is a reference
11603         to the post state of the subprogram.
11605 2014-01-24  Robert Dewar  <dewar@adacore.com>
11607         * sem_ch6.adb (Analyze_Subprogram_Body_Helper): SPARK_Mode OFF
11608         for generated subprograms.
11609         (Analyze_Subprogram_Specification): Ditto.
11611 2014-01-24  Vincent Celier  <celier@adacore.com>
11613         * prj-dect.adb (Check_Attribute_Allowed): Detect more forbidden
11614         attributes in package Builder of aggregate and aggregate library
11615         projects.
11616         * prj-nmsc.adb (Process_Naming_Scheme.Check.Check_Aggregate):
11617         Remove procedure (Process_Naming_Scheme.Check.Check_Aggregated):
11618         Remove parameters.  Change error message from "... externally
11619         build library ..." to "... externally built project ...".
11620         (Process_Naming_Scheme.Check): Do not do any check in aggregate
11621         project, as attribute Library_Dir and Library_Name have already
11622         been detected as forbidden.
11624 2014-01-24  Vincent Celier  <celier@adacore.com>
11626         * prj-env.adb (Find_Project): If cached project path is not in
11627         project directory, look in current directory first and use cached
11628         project path only if project is not found in project directory.
11630 2014-01-24  Robert Dewar  <dewar@adacore.com>
11632         * sem_util.adb, lib-xref.adb: Correct false positive warnings.
11634 2014-01-24  Vincent Celier  <celier@adacore.com>
11636         * projects.texi: Document that aggregate projects are only
11637         supported by gprbuild, but not by gnatmake.  Document that the
11638         only attribute Switches in package Binder of aggregate projects
11639         will be ignored if its index is not others.  Document that
11640         attribute Global_Config_File is allowed in package Binder of
11641         aggregate projects.
11643 2014-01-24  Robert Dewar  <dewar@adacore.com>
11645         * sem_prag.adb: Minor code reorganization.
11646         * sem_util.adb: Minor fix of potential latent bug in Is_LHS.
11648 2014-01-24  Pascal Obry  <obry@adacore.com>
11650         * prj-attr.adb, projects.texi, snames.ads-tmpl: Add Excluded_Patterns
11651         attribute definition.
11653 2014-01-24  Vincent Celier  <celier@adacore.com>
11655         * makeutl.adb (Queue.Insert_No_Roots): In gprbuild, do not put
11656         in the Queue the same source (same path, same multi-source index)
11657         from the same project file, to avoid compiling several times
11658         the same source.
11660 2014-01-24  Eric Botcazou  <ebotcazou@adacore.com>
11662         * einfo.ads (First_Rep_Item): Remove obsolete stuff.
11663         (Has_Gigi_Rep_Item): Likewise.
11664         * sem_prag.adb (Analyze_Pragma) <Pragma_Linker_Section>: Do not set
11665         Has_Gigi_Rep_Item for objects.
11666         * gcc-interface/decl.c (prepend_one_attribute_to): Rename into...
11667         (prepend_one_attribute): ...this.
11668         (prepend_one_attribute_pragma): New function extracted from...
11669         (prepend_attributes): ...here.  Swap the parameters for consistency.
11670         (gnat_to_gnu_entity): Adjust calls to prepend_one_attribute_to and to
11671         prepend_attributes.
11672         <object>: Deal with a pragma Linker_Section on a constant
11673         or variable.  <E_Function>: Deal with a pragma Linker_Section
11674         on a subprogram.
11675         (get_minimal_subprog_decl): Adjust calls to prepend_one_attribute_to.
11677 2014-01-24  Vincent Celier  <celier@adacore.com>
11679         * opt.ads: Minor comment update.
11681 2014-01-24  Robert Dewar  <dewar@adacore.com>
11683         * sem_prag.adb (Analyze_Input_Output): Add missing error check
11684         for junk operand.
11685         * sem_util.adb (Is_Refined_State): Add defense against junk
11686         tree from error.
11688 2014-01-24  Pascal Obry  <obry@adacore.com>
11690         * projects.texi: Removes Build_Slaves attribute documentation.
11692 2014-01-23  Robert Dewar  <dewar@adacore.com>
11694         * opt.adb (Register_Opt_Config_Switches): Save SPARK_Mode_Pragma
11695         setting.
11697 2014-01-23  Ed Schonberg  <schonberg@adacore.com>
11699         * sem_util.adb (Is_Potentially_Unevaluated): Predicate only
11700         applies to expressions that come from source.
11701         * sem_attr.adb (Analyze_Attribute, case 'Old): Improve error
11702         message.
11703         (Analyze_Attribute, case 'Loop_Entry): Apply SPARK 2014 legality
11704         rule regarding potentially unevaluated expressions, to prefix
11705         of attribute.
11707 2014-01-23  Ed Schonberg  <schonberg@adacore.com>
11709         * exp_util.adb (Make_Invqriant_Call): If type of expression is
11710         a private extension, get invariant from base type.
11712 2014-01-23  Robert Dewar  <dewar@adacore.com>
11714         * sem_util.adb, sem_attr.adb: Minor reformatting.
11716 2014-01-23  Robert Dewar  <dewar@adacore.com>
11718         * opt.adb (Save_Opt_Config_Switches): Save SPARK_Mode_Pragma
11719         (Restore_Opt_Config_Switches): Restore SPARK_Mode_Pragma.
11720         * sem.adb (Semantics): Remove save/restore of
11721         SPARK_Mode[_Pragma]. Not needed since already done in
11722         Save/Restore_Opt_Config_Switches.
11724 2014-01-23  Robert Dewar  <dewar@adacore.com>
11726         * gnat_rm.texi, einfo.adb, einfo.ads, sem_prag.adb, gnat_ugn.texi,
11727         freeze.adb, repinfo.adb, aspects.adb, aspects.ads, sem_ch13.adb:
11728         Linker_Section enhancements.
11730 2014-01-23  Tristan Gingold  <gingold@adacore.com>
11732         * gnat_rm.texi: Minor editing.
11734 2014-01-23  Robert Dewar  <dewar@adacore.com>
11736         * opt.adb (Set_Opt_Config_Switches): Reset SPARK mode for
11737         with'ed internal units.
11738         * sem.adb (Semantics): Save and restore SPARK_Mode[_Pragma].
11740 2014-01-23  Javier Miranda  <miranda@adacore.com>
11742         * lib-xref.adb (Generate_Reference): As part of processing the
11743         "end-of-spec" reference generate an extra reference to the first
11744         private entity of the package.
11745         * xr_tabls.adb (Add_Reference): No action needed for the extra
11746         'E' reference associated; similar to the processing of the
11747         'e' reference.
11749 2014-01-23  Bob Duff  <duff@adacore.com>
11751         * gnat_ugn.texi: Change "--&pp off" to "--!pp off".
11753 2014-01-23  Ed Schonberg  <schonberg@adacore.com>
11755         * sem_util.ads, sem_util.adb (Is_Potentially_Unevaluated): new
11756         predicate to implement rule given in 6.1.1 (20/3).
11757         * sem_attr.adb (Analyze_Attribute, case 'Old): Reject prefix of
11758         'Old in a postcondition, if it is potentially unevaluated and
11759         it is not an entity name.
11761 2014-01-23  Bob Duff  <duff@adacore.com>
11763         * gnat_ugn.texi: Document the new "--&pp off" feature of gnatpp.
11765 2014-01-23  Robert Dewar  <dewar@adacore.com>
11767         * gnatlink.adb (Gnatlink): Fix problem of generating bad name
11768         msg on VMS.
11770 2014-01-23  Bob Duff  <duff@adacore.com>
11772         * g-dynhta.ads: Minor comment fix.
11774 2014-01-23  Yannick Moy  <moy@adacore.com>
11776         * sem_ch6.adb (Analyze_Subprogram_Body_Helper): Inherit SPARK_Mode
11777         from spec on body only when not already inherited on spec. Set
11778         SPARK_Mode from context on body without previous spec.  *
11779         * sem_prag.adb (Analyze_Pragma): Check placement of pragma on
11780         library-level entities.  Correct retrieval of entity from
11781         declaration, for cases where the declaration is not a unit.
11782         * sem_ch12.adb (Instantiate_Object): Avoid
11783         calling Is_Volatile_Object on an empty node.
11785 2014-01-23  Robert Dewar  <dewar@adacore.com>
11787         * gnatlink.adb (Gnatlink): Check for suspicious executable file
11788         names on windows.
11790 2014-01-23  Robert Dewar  <dewar@adacore.com>
11792         * a-ngelfu.ads: Remove bad uses of AND which should be AND THEN.
11793         * sem_res.adb (Check_No_Direct_Boolean_Operators): Don't give
11794         style errors in instances.
11795         * g-dynhta.ads (Static_HTable): Comment updates.
11797 2014-01-23  Vincent Celier  <celier@adacore.com>
11799         * prj-conf.adb (Get_Or_Create_Configuration_File): Do not attempt
11800         to find a configuration project file when Config_File_Name is
11801         No_Configuration_File.
11802         * prj-conf.ads (No_Configuration_File): New constant String.
11803         * prj-pars.adb (Parse): Call Get_Or_Create_Configuration_File
11804         with Config_File_Name set to No_Configuration_File, so that
11805         no existing configuration project file will be used, and the
11806         configuration project will be only created in memory when
11807         Add_Default_GNAT_Naming_Scheme is called.
11808         * projects.texi: Minor reformatting.
11810 2014-01-23  Vincent Celier  <celier@adacore.com>
11812         * prj-conf.adb (Get_Or_Create_Configuration_File): Never parse
11813         a config project file if On_Load_Config is not null.
11814         * prj-pars.adb: Minor comment changes.
11816 2014-01-23  Ed Schonberg  <schonberg@adacore.com>
11818         * lib-xref.adb (Output_References): Output progenitors of
11819         synchronized tagged types, for source navigation.
11821 2014-01-23  Robert Dewar  <dewar@adacore.com>
11823         * exp_util.adb, sinfo.adb, sinfo.ads, sem.adb, sem_res.adb,
11824         expander.adb, exp_ch11.adb, exp_ch11.ads, sem_ch11.adb, sem_ch11.ads,
11825         sprint.adb, sprint.ads: Remove unused node N_Subprogram_Info.
11827 2014-01-23  Emmanuel Briot  <briot@adacore.com>
11829         * prj-conf.adb (Get_Or_Create_Configuration_File): call
11830         On_Load_Config later.
11832 2014-01-23  Hristian Kirtchev  <kirtchev@adacore.com>
11834         * sem_ch3.adb (Analyze_Declarations): Do not
11835         generate the spec of the late primitive in ASIS mode. Add two
11836         comments to explain the special cases when the expansion is
11837         not performed.
11839 2014-01-23  Robert Dewar  <dewar@adacore.com>
11841         * sem_util.adb (Note_Possible_Modification): Fix error of
11842         misbehaving for implicit dereference cases in -gnatc mode.
11844 2014-01-23  Emmanuel Briot  <briot@adacore.com>
11846         * prj-pars.adb: Minor reformatting.
11848 2014-01-22  Ed Schonberg  <schonberg@adacore.com>
11850         * sem_ch6.adb (Analyze_Subprogram_Body_Helper): A subprogram
11851         body generated for an expression function within a protected body
11852         needs a set of renaming declarations if the expression function
11853         comes from source.
11855 2014-01-22  Ed Schonberg  <schonberg@adacore.com>
11857         * lib-xref.adb (Get_Type_Reference): In semantics-only mode,
11858         list interface progenitor of a tagged concurrent type, for better
11859         source navigation.
11861 2014-01-22  Robert Dewar  <dewar@adacore.com>
11863         * lib.adb (In_Extended_Main_Code_Unit): Return False for
11864         Standard_Location.
11865         (In_Extended_Main_Source_Unit): Return False for Standard_Location.
11866         * lib.ads (In_Extended_Main_Code_Unit): Add documentation on
11867         treatment of Slocs No_Location and Standard_Location.
11868         * restrict.adb (Check_Restriction_No_Dependence): Explicitly
11869         check for entity with Standard_Location Sloc, rather than relying
11870         on Lib routines to do that.
11871         * sem_res.adb (Resolve_Call): Implement SPARK_05 restriction
11872         that a call cannot occur before a later occuring body within
11873         the same unit.
11875 2014-01-22  Thomas Quinot  <quinot@adacore.com>
11877         * rtsfind.adb: Update comment.
11879 2014-01-22  Hristian Kirtchev  <kirtchev@adacore.com>
11881         * sem_aux.ads, sem_aux.adb (Is_Body): New routine.
11882         * sem_ch3.adb (Analyze_Declarations): Add local variable
11883         Body_Seen. Generate the spec of a late controlled
11884         primitive body that is about to freeze its related type.
11885         (Handle_Late_Controlled_Primitive): New routine.
11887 2014-01-22  Robert Dewar  <dewar@adacore.com>
11889         * a-stream.adb: Minor reformatting.
11891 2014-01-22  Ed Schonberg  <schonberg@adacore.com>
11893         * sem_ch8.adb (From_Actual_Package): Introduce a recursive
11894         sub-procedure Declared_In_Actual to handle properly the visibility
11895         of actuals in actual packages, that are themselves actuals to a
11896         actual package of the current instance. This mimics properly the
11897         visibility of formals of formal packages declared with a box,
11898         within the corresponding generic unit.
11900 2014-01-22  Robert Dewar  <dewar@adacore.com>
11902         * checks.adb: Do not assume that a volatile variable is valid.
11904 2014-01-22  Thomas Quinot  <quinot@adacore.com>
11906         * g-catiio.ads (Image, Value): Clarify that these functions
11907         operate in the local time zone.  Minor documentation update.
11909 2014-01-22  Thomas Quinot  <quinot@adacore.com>
11911         * csets.adb, csets.ads, opt.ads: Minor documentation fixes.
11913 2014-01-22  Robert Dewar  <dewar@adacore.com>
11915         * sem_aux.adb, sem_aux.ads, sem_ch3.adb (Has_Unconstrained_Elements):
11916         Moved to sem_aux.adb.
11918 2014-01-22  Robert Dewar  <dewar@adacore.com>
11920         * vms_data.ads: Minor reformatting.
11922 2014-01-22  Robert Dewar  <dewar@adacore.com>
11924         * debug.adb: Document messages affected by -gnatd.E including
11925         the new ones that relate to late definition of equality.
11926         * sem_ch6.adb (Check_Untagged_Equality): In Ada 2012 mode, if
11927         debug flag -gnatd.E is set, then generate warnings rather than
11928         errors.
11929         (Check_Untagged_Equality): In earlier versions of Ada,
11930         generate warnings if Warn_On_Ada_2012_Incompatibility flag is set.
11932 2014-01-22  Robert Dewar  <dewar@adacore.com>
11934         * sem_prag.adb (Usage_Error): Output additional messages for
11935         unconstrained OUT parameters lacking an input dependency.
11937 2014-01-22  Robert Dewar  <dewar@adacore.com>
11939         * sem_ch4.adb: Minor reformatting.
11941 2014-01-22  Robert Dewar  <dewar@adacore.com>
11943         * restrict.ads: Minor reformatting.
11944         * sem_res.adb (Resolve_Call): Check for SPARK_05 restriction that
11945         forbids a call from within a subprogram to the same subprogram.
11947 2014-01-22  Thomas Quinot  <quinot@adacore.com>
11949         * a-stream.ads (Read_SEA, Write_SEA): New subprograms, optimized
11950         stream attributes for Stream_Element_Array.
11951         * a-stream.adb (Read_SEA, Write_SEA): Bodies for the above.
11952         * rtsfind.adb (Check_CRT): Do not reject a reference to an entity
11953         defined in the current scope.
11955 2014-01-22  Robert Dewar  <dewar@adacore.com>
11957         * debug.adb, exp_ch4.adb, erroutc.adb: Minor reformatting.
11959 2014-01-22  Thomas Quinot  <quinot@adacore.com>
11961         * sem_ch7.adb, sem_ch8.adb, exp_ch3.adb: Minor reformatting.
11963 2014-01-22  Thomas Quinot  <quinot@adacore.com>
11965         * sem_ch3.adb (Analyze_Object_Declaration): For a constant
11966         declaration initialized with a function call, whose type
11967         has variable size, need to remove side effects so that the
11968         initialization expression becomes a dereference of a temporary
11969         reference to the function result.
11971 2014-01-22  Yannick Moy  <moy@adacore.com>
11973         * errout.adb (Initialize): Remove trick to add dummy entry
11974         in Warnings table.
11975         * erroutc.adb (Set_Warnings_Mode_Off,
11976         Set_Warnings_Mode_On): Do nothing if warnings are suppressed by
11977         command line switch.
11978         * opt.ads (Warning_Mode): Document behavior
11979         wrt pragma Warnings, in normal mode and in GNATprove_Mode.
11981 2014-01-22  Robert Dewar  <dewar@adacore.com>
11983         * sem_ch3.adb, errout.adb, erroutc.adb: Minor reformatting.
11985 2014-01-22  Robert Dewar  <dewar@adacore.com>
11987         * sem_ch13.adb (Check_Pool_Size_Clash): New procedure
11988         (Analyze_Attribute_Definition_Clause, case Storage_Pool): call
11989         Check_Pool_Size_Clash (Analyze_Attribute_Definition_Clause,
11990         case Storage_Size): call Check_Pool_Size_Clash.
11992 2014-01-22  Robert Dewar  <dewar@adacore.com>
11994         * sem_ch3.adb, exp_util.adb, sem_dim.adb, sem_elab.adb, sem_ch8.adb,
11995         sem_eval.ads: Minor reformatting.
11997 2014-01-22  Thomas Quinot  <quinot@adacore.com>
11999         * sem_eval.adb (Compile_Time_Known_Bounds): Return False for
12000         Any_Composite to prevent cascaded errors.
12002 2014-01-22  Yannick Moy  <moy@adacore.com>
12004         * errout.adb (Initialize): Do not insert special entry in Warnings
12005         table in GNATprove_Mode.
12006         * erroutc.adb (Set_Warnings_Mode_On): Add info in Warnings table in
12007         GNATprove_Mode.
12008         * gnat1drv.adb (Adjust_Global_Switches): Do not suppress frontend
12009         warnings anymore.
12011 2014-01-22  Robert Dewar  <dewar@adacore.com>
12013         * sem_prag.adb (Analyze_Initializes_In_Decl_Part): Handle null
12014         initializes case.
12016 2014-01-22  Robert Dewar  <dewar@adacore.com>
12018         * snames.ads-tmpl: Update header.
12020 2014-01-22  Thomas Quinot  <quinot@adacore.com>
12022         * exp_util.adb (Insert_Actions): When inserting actions on a
12023         short circuit operator that has already been analyzed, do not park
12024         actions in node; instead introduce an N_Expression_With_Actions
12025         and insert actions immediately.
12026         Add guard for unexpected case of climbing up through statement
12027         in Actions list of an N_Expression_With_Actions.
12028         * sem_elab.adb (Insert_Elab_Check): Remove complex
12029         specialized circuitry for the case where the context is already
12030         analyzed, as it is not needed and introduces irregularities in
12031         finalization. Instead rely on the above change to Insert_Actions
12032         to ensure that late insertion on short circuit operators works
12033         as expected.
12035 2014-01-22  Ed Schonberg  <schonberg@adacore.com>
12037         * sem_ch4.adb (Operator_Check): Improve error message when an
12038         operand of concatenation is an access type.
12040 2014-01-22  Thomas Quinot  <quinot@adacore.com>
12042         * sem_dim.adb (Analyze_Dimension_Identifier): Add guard against
12043         cascaded error.
12045 2014-01-22  Ed Schonberg  <schonberg@adacore.com>
12047         * sem_ch8.adb (Find_Selected_Component): Handle properly the case
12048         of an expanded name in a proper body, whose prefix is a package
12049         in the context of the proper body, when there is a homonym of
12050         the package declared in the parent unit.
12052 2014-01-22  Robert Dewar  <dewar@adacore.com>
12054         * sem_warn.adb (Check_Use_Clause): Don't give no entities used
12055         msg if errors found.
12056         (Check_One_Unit): Same change.
12058 2014-01-22  Robert Dewar  <dewar@adacore.com>
12060         * ug_words: Add missing/wrong entries for VMS warning switches.
12061         * sem_prag.adb (Check_Duplicate_Pragma): Avoid flagging parent type.
12063 2014-01-22  Jerome Guitton  <guitton@adacore.com>
12065         * mlib-tgt-specific-vxworks.adb (Get_Target_Suffix): Replace xscale by
12066         arm.
12068 2014-01-22  Robert Dewar  <dewar@adacore.com>
12070         * gnat_rm.texi, gnat_ugn.texi: Document passive task optimization
12072 2014-01-22  Eric Botcazou  <ebotcazou@adacore.com>
12074         * gcc-interface/Makefile.in: Minor fixes.
12076 2014-01-21  Robert Dewar  <dewar@adacore.com>
12078         * par-ch4.adb (P_If_Expression): Rewritten to improve error recovery.
12079         * par-ch5.adb (P_Condition): New version with expression prescanned.
12080         * par.adb (P_Condition): New version with expression prescanned.
12082 2014-01-21  Robert Dewar  <dewar@adacore.com>
12084         * gnat_rm.texi: Document that Allow_Integer_Address is ignored
12085         if Address is not a private type.
12086         * sem_prag.adb (Analyze_Pragma, case Allow_Integer_Address):
12087         Ignore pragma if System.Address is not a private type.
12089 2014-01-21  Arnaud Charlet  <charlet@adacore.com>
12091         * namet.ads (Name_Len): Initialize to 0 to avoid accessing an
12092         uninitialized value.
12094 2014-01-21  Thomas Quinot  <quinot@adacore.com>
12096         * gnat_rm.texi (Scalar_Storage_Order): Update documentation.
12098 2014-01-21  Ed Schonberg  <schonberg@adacore.com>
12100         * sem_ch12.adb (Set_Instance_Env): In Ada 2012 mode, preserve
12101         the value of Assertions_Enabled flag when compiling an instance of
12102         an internal unit. This facilitates the use of pre/postconditions
12103         in generic internal units, such as the new elementary function
12104         libraries.
12106 2014-01-21  Robert Dewar  <dewar@adacore.com>
12108         * exp_aggr.adb: Minor reformatting.
12109         * sem_attr.adb: Minor reformatting.
12110         * sem_res.adb: Minor comment addition.
12111         * einfo.adb: Minor comment updates.
12112         * freeze.adb: Minor reformatting and code reorganization.
12114 2014-01-21  Ed Schonberg  <schonberg@adacore.com>
12116         * par-ch4.adb (P_If_Expression): Handle more gracefully an
12117         elsif clause that does not have an else part.
12119 2014-01-21  Robert Dewar  <dewar@adacore.com>
12121         * checks.adb, sem_util.ads, sem_ch4.adb: Minor reformatting.
12122         * gcc-interface/Makefile.in: clean up target pairs.
12124 2014-01-21  Pascal Obry  <obry@adacore.com>
12126         * projects.texi: Minor typo fix.
12128 2014-01-21  Thomas Quinot  <quinot@adacore.com>
12130         * freeze.adb (Check_Component_Storage_Order): If a record type
12131         has an explicit Scalar_Storage_Order attribute definition clause,
12132         reject any component that itself is of a composite type and does
12133         not have one.
12135 2014-01-21  Ed Schonberg  <schonberg@adacore.com>
12137         * sem_ch10.adb (Generate_Parent_Reference): Make public so it
12138         can be used to generate proper cross-reference information for
12139         the parent units of proper bodies.
12141 2014-01-21  Thomas Quinot  <quinot@adacore.com>
12143         * exp_pakd.adb (Expand_Packed_Element_Set,
12144         Expand_Packed_Element_Reference): No byte swapping required in
12145         the front-end for the case of a reverse storage order array,
12146         as this is now handled uniformly in the back-end.  However we
12147         still need to swap back an extracted element if it is itself a
12148         nested composite with reverse storage order.
12150 2014-01-21  Hristian Kirtchev  <kirtchev@adacore.com>
12152         * sem_prag.adb (Analyze_External_Property): Add processing for "others".
12153         (Analyze_Pragma): Update the grammar of pragma Abstract_State to
12154         include "others".
12156 2014-01-21  Arnaud Charlet  <charlet@adacore.com>
12158         * gnat_ugn.texi: Minor updates.
12160 2014-01-21  Thomas Quinot  <quinot@adacore.com>
12162         * exp_pakd.adb: Update comment, minor reformatting.
12164 2014-01-21  Hristian Kirtchev  <kirtchev@adacore.com>
12166         * sem_ch3.adb (Analyze_Variable_Contract): Trigger the volatile
12167         object check when SPARK_Mode is on.
12168         * sem_ch6.adb (Process_Formals): Trigger the volatile object
12169         check when SPARK_Mode is on.
12170         * sem_ch12.adb (Instantiate_Object): Trigger the volatile object
12171         check when SPARK_Mode is on.
12172         * sem_ch13.adb (Analyze_Aspect_Specifications): Insert the
12173         corresponding pragma of aspect SPARK_Mode in the visible
12174         declarations of a package declaration.
12175         * sem_prag.adb (Analyze_Pragma): Trigger the volatile object
12176         check when SPARK_Mode is on.
12177         * sem_res.adb (Resolve_Actuals): Trigger the volatile object
12178         check when SPARK_Mode is on.
12179         (Resolve_Entity_Name): Trigger
12180         the volatile object check when SPARK_Mode is on.
12182 2014-01-21  Robert Dewar  <dewar@adacore.com>
12184         * sem_ch3.adb, sem_prag.adb, sem_prag.ads, sem_ch12.adb, sem_res.adb,
12185         sem_ch6.adb, a-except-2005.adb: Minor reformatting.
12187 2014-01-21  Ed Schonberg  <schonberg@adacore.com>
12189         * exp_ch3.adb (Expand_N_Object_Declaration): When a class-wide
12190         object is declared, it is rewritten as a renaming of an dynamic
12191         expression that wraps the initial value.  The renaming declaration
12192         is first given an internal name, to prevent collisions with the
12193         entity already declared, and then the name is modified to reflect
12194         the original one. the modification of the name must preserve
12195         the source location of the original, to prevent spurious errors
12196         when compiling with style checks if the declaration involves
12197         more than one entity.
12199 2014-01-21  Hristian Kirtchev  <kirtchev@adacore.com>
12201         * aspects.adb Add entries for Async_Readers, Async_Writers,
12202         Effective_Reads and Effective_Writes in table Canonical_Aspect.
12203         * aspects.ads Add entries for Async_Readers, Async_Writers,
12204         Effective_Reads and Effective_Writes in tables Aspect_Id,
12205         Aspect_Names, Aspect_Delay and Implementation_Defined_Aspect.
12206         * atree.adb (Ekind_In): New version with 8 parameters.
12207         (Node34): New routine.
12208         (Set_Node34): New routine.
12209         * atree.ads (Ekind_In): New version with 8 parameters.
12210         (Node34): New routine.
12211         (Set_Node34): New routine.
12212         * einfo.adb Contract is now Node34.
12213         (Contract): Update the assertion and node usage.
12214         (Get_Pragma): Include pragmas Async_Readers, Async_Writers,
12215         Effective_Reads and Effective_Writes.
12216         (Set_Contract): Update the assertion and node usage.
12217         (Write_Field24_Name): Remove the output for a contract.
12218         (Write_Field34_Name): Add output for a contract.
12219         * einfo.ads Contract is now Node34. Update the comment on
12220         attribute usage and related node structures.
12221         (Get_Pragma): Update the comment on usage.
12222         * par-prag.adb (Prag): Pragmas Async_Readers, Async_Writers,
12223         Effective_Reads and Effective_Writes do not require special
12224         processing by the parser.
12225         * sem_ch3.adb (Analyze_Variable_Contract): New routine.
12226         (Analyze_Declarations): Analyze the contract of a variable at
12227         the end of the declarative region.
12228         (Analyze_Object_Declaration): Create a contract for a variable.
12229         * sem_ch6.adb (Analyze_Subprogram_Contract): Update the retrieval
12230         of classification pragmas.
12231         (Process_Formals): Detect an illegal
12232         use of a volatile object as a formal in a function.
12233         * sem_ch12.adb (Instantiate_Object): Detect an illegal use of
12234         a volatile object as an actual in generic instantiation.
12235         * sem_prag.adb Add entries for Async_Readers, Async_Writers,
12236         Effective_Reads and Effective_Writes in table Sig_Flags.
12237         (Analyze_External_State_In_Decl_Part): New routine.
12238         (Analyze_Global_Item): Detect an illegal use of a volatile object
12239         as a global item of a function.
12240         (Analyze_Pragma): Reimplement
12241         pragma Abstract_State. Add support for pragmas Async_Readers,
12242         Async_Writers, Effective_Reads and Effective_Writes.
12243         (Check_External_Properties): New routine.
12244         * sem_prag.ads (Analyze_External_State_In_Decl_Part): New routine.
12245         (Check_External_Properties): New routine.
12246         * sem_res.adb (Resolve_Actuals): Detect an illegal use of a
12247         volatile object as an actual in a call.
12248         (Resolve_Entity_Name):
12249         Add local variables Par, Prev and Usage_OK. Detect illegal
12250         contexts of volatile objects.
12251         * sem_util.adb (Add_Contract_Item): Add support for
12252         pragmas associated with the contract of a variable.
12253         (Async_Readers_Enabled): New routine.
12254         (Async_Writers_Enabled): New routine.
12255         (Effective_Reads_Enabled): New routine.
12256         (Effective_Writes_Enabled): New routine.
12257         (Has_Enabled_Property):
12258         New routine.
12259         (Is_Unchecked_Conversion_Instance): New routine.
12260         (Is_Volatile_Object): Add support for entities that may denote
12261         a volatile object.
12262         * sem_util.ads (Add_Contract_Item): Update the
12263         comment on usage.
12264         (Async_Readers_Enabled): New routine.
12265         (Async_Writers_Enabled): New routine.
12266         (Effective_Reads_Enabled): New routine.
12267         (Effective_Writes_Enabled): New routine.
12268         (Is_Unchecked_Conversion_Instance): New routine.
12269         * sinfo.ads Update the comment on the structure of N_Contract.
12270         * snames.ads-tmpl Add predefined names for Async_Readers,
12271         Async_Writers, Effective_Reads and Effective_Writes. Add
12272         pragma ids for Async_Readers, Async_Writers, Effective_Reads
12273         and Effective_Writes.
12275 2014-01-21  Robert Dewar  <dewar@adacore.com>
12277         * exp_ch4.adb (Eval_Op_Expon): Use CRT_Safe_Compile_Time_Known_Value
12278         * sem_eval.adb (Compile_Time_Known_Value): Remove special
12279         handling of CRT mode (CRT_Safe_Compile_Time_Known_Value): New
12280         function (Eval_Op_Expon): Add CRT_Safe in call to Test_Foldable
12281         (Test_Foldable): Add CRT_Safe parameter
12282         * sem_eval.ads (Compile_Time_Known_Value): Remove special
12283         handling of CRT mode.
12284         (CRT_Safe_Compile_Time_Known_Value): New function.
12286 2014-01-21  Robert Dewar  <dewar@adacore.com>
12288         * sem_prag.adb (Analyze_Pragma, case SPARK_Mode): Fix problem
12289         with pragma or aspect that applies to package spec or subprogram
12290         spec.
12292 2014-01-21  Robert Dewar  <dewar@adacore.com>
12294         * exp_aggr.adb: Minor reformatting.
12296 2014-01-21  Johannes Kanig  <kanig@adacore.com>
12298         * gnat1drv.adb (Gnat1drv) remove obsolete reference to -gnatd.H.
12300 2014-01-21  Bob Duff  <duff@adacore.com>
12302         * gnat_ugn.texi: Document the "checks" attribute in gnat2xml.
12304 2014-01-21  Steve Baird  <baird@adacore.com>
12306         * gnat_rm.texi: Improve description of SPARK_Mode pragma.
12308 2014-01-21  Vincent Celier  <celier@adacore.com>
12310         * prj-part.adb (Parse_Single_Project): Accept to extend a project
12311         if it has only be imported by an project being extended. When a
12312         project that has only been imported by a project being extended
12313         is imported by another project that is not being extended,
12314         reset the previous indication, so that it will be an error if
12315         this project is extended later.
12316         * prj-tree.adb (Create_Project): Include component From_Extended
12317         in table Projects_HT
12318         * prj-tree.ads (Project_Name_And_Node): New Boolean component
12319         From_Extended
12321 2014-01-21  Robert Dewar  <dewar@adacore.com>
12323         * atree.ads, atree.adb: Add Node33 and Set_Node33.
12324         * einfo.ads, einfo.adb (SPARK_Pragma): New field (SPARK_Aux_Pragma):
12325         New field (SPARK_Pragma_Inherited): New flag
12326         (SPARK_Aux_Pragma_Inherited): New flag (SPARK_Mode_Pragmas):
12327         Removed.
12328         * lib.ads, lib.adb: Remove SPARK_Mode_Pragma, no longer used.
12329         * opt.ads (SPARK_Mode_Pragma): New global variable.
12330         * sem.ads: Add Save_SPARK_Mode_Pragma field to Scope_Stack_Entry.
12331         * sem_ch3.adb: Use new SPARK_Mode data structures.
12332         * sem_ch6.adb: Set SPARK_Mode fields in subprogram specs and bodies.
12333         * sem_ch7.adb: Set SPARK_Mode fields in package spec and body entities.
12334         * sem_ch8.adb (Push_Scope): Save SPARK_Mode_Pragma.
12335         (Pop_Scope): Restore SPARK_Mode_Pragma.
12336         * sem_prag.adb (Analyze_Pragma, case SPARK_Mode): Rewrite for
12337         new data structures.
12339 2014-01-21  Arnaud Charlet  <charlet@adacore.com>
12341         * back_end.adb: Undo previous change, not needed. Minor reformatting.
12343 2014-01-21  Thomas Quinot  <quinot@adacore.com>
12345         * exp_ch5.adb: Fix comment.
12346         * switch-c.adb: Minor comment update.
12347         * exp_ch3.adb: Minor reformatting.
12349 2014-01-21  Arnaud Charlet  <charlet@adacore.com>
12351         * back_end.adb (Scan_Compiler_Arguments): Do not store object
12352         filename in gnatprove mode.
12354 2014-01-21  Thomas Quinot  <quinot@adacore.com>
12356         * sinfo.ads (No_Ctrl_Actions): Clarify documentation (flag also
12357         suppresses usage of primitive _assign for tagged types).
12358         * exp_aggr.adb (Build_Array_Aggr_Code.Gen_Assign): Set
12359         No_Ctrl_Actions for a tagged type that does not require
12360         finalization, as we want to disable usage of _assign (which
12361         may cause undesirable discriminant checks on an uninitialized,
12362         invalid target).
12364 2014-01-21  Ed Schonberg  <schonberg@adacore.com>
12366         * sem_prag.adb: Reject invariant'class on completion.
12368 2014-01-21  Javier Miranda  <miranda@adacore.com>
12370         * exp_ch3.adb (Build_Init_Procedure): For
12371         derivations of interfaces, do not move the the initialization
12372         of the _parent field since such assignment is not generated.
12374 2014-01-21  Ed Schonberg  <schonberg@adacore.com>
12376         * sem_res.adb (Rewrite_Renamed_Operator): Do not replace entity
12377         with the operator it renames if we are within an expression of
12378         a pre/postcondition, because the expression will be reanalyzed
12379         at a later point, and the analysis of the renaming may affect
12380         the visibility of the operator when in an instance.
12382 2014-01-21  Robert Dewar  <dewar@adacore.com>
12384         * sinfo.ads, sinfo.adb: Change Do_Discriminant_Check to use new Flag1.
12385         Add this flag to type conversion nodes and assignment nodes.
12386         * treepr.adb: Deal properly with Flag 1,2,3.
12387         * treeprs.adt: Minor comment update.
12389 2014-01-21  Robert Dewar  <dewar@adacore.com>
12391         * sem_eval.adb (Compile_Time_Known_Value): Add Ignore_CRT
12392         parameter.
12393         * sem_eval.ads (Compile_Time_Known_Value): Add Ignore_CRT
12394         parameter, completely rewrite spec.
12396 2014-01-21  Ed Schonberg  <schonberg@adacore.com>
12398         * sem_ch10.adb (Install_Withed_Unit): If the unit is a subprogram
12399         instance that is inlined, it may have been rewritten as a wrapper
12400         package. In that case the unit that must be made visible is the
12401         related instance of the package.
12403 2014-01-21  Arnaud Charlet  <charlet@adacore.com>
12405         * exp_ch9.adb (Expand_N_Selective_Accept.Add_Accept): Refine
12406         previous change in codepeer mode.
12408 2014-01-21  Arnaud Charlet  <charlet@adacore.com>
12410         * exp_ch9.adb (Expand_N_Selective_Accept.Add_Accept): Always add
12411         call to Abort_Undefer, as expected by the runtime.
12412         * s-tasren.adb (Local_Complete_Rendezvous): Replace
12413         Defer_Abort_Nestable by Defer_Abort, since we do not expect abort to be
12414         deferred at this point. Update comments.
12416 2014-01-21  Thomas Quinot  <quinot@adacore.com>
12418         * exp_ch4.adb, exp_ch5.adb, checks.adb: Minor reformatting.
12420 2014-01-21  Arnaud Charlet  <charlet@adacore.com>
12422         * switch-c.adb, usage.adb, gnat_ugn.texi: Mark -gnates as internal,
12423         remove from doc.
12425 2014-01-21  Robert Dewar  <dewar@adacore.com>
12427         * switch-c.adb, usage.adb, atree.adb, atree.ads: Minor reformatting.
12429 2014-01-21  Thomas Quinot  <quinot@adacore.com>
12431         * atree.adb, atree.ads (Num_Extension_Nodes): Switch to Node_Id, since
12432         this is value is used in Node_Id arithmetic operations.
12433         (Copy_Node, Exchange_Entities): Use loops indexed by Num_Extension_Nodes
12434         instead of hard-coded unrolled code.
12436 2014-01-21  Yannick Moy  <moy@adacore.com>
12438         * gnat1drv.adb: Minor code cleanup, removing useless code.
12440 2014-01-21  Arnaud Charlet  <charlet@adacore.com>
12442         * opt.ads (SPARK_Switches_File_Name): New.
12443         * switch-c.adb (Scan_Front_End_Switches): Add handling of -gnates=xxx *
12444         * usage.adb (Usage): Document -gnates, in gnatprove mode only.
12445         * gnat_ugn.texi: Document -gnates.
12447 2014-01-21  Yannick Moy  <moy@adacore.com>
12449         * errout.adb (Special_Msg_Delete): Update comment. Remove
12450         special case for GNATprove which should not ignore mismatch
12451         in sizes for representation clauses.
12452         * sem_prag.adb (Analyze_Pragma): Remove special case for GNATprove
12453         which should not ignore pragma Pack.
12455 2014-01-21  Ed Schonberg  <schonberg@adacore.com>
12457         * sem_ch4.adb: Code clean up.
12459 2014-01-21  Steve Baird  <baird@adacore.com>
12461         * gnat_rm.texi: Improve GNAT RM description of SPARK_Mode pragma.
12463 2014-01-21  Robert Dewar  <dewar@adacore.com>
12465         * gcc-interface/gigi.h: Get Flags array address.
12466         * gcc-interface/trans.c: Acquire Flags array address.
12467         * atree.adb: Add support for Flags array and Flag0,1,2,3.
12468         * atree.ads: Add support for Flags array and Flag0,1,2,3.
12469         * atree.h: Add support for Flags array and Flag0,1,2,3.
12470         * back_end.adb: Pass Flags array address to gigi.
12472 2014-01-21  Ed Schonberg  <schonberg@adacore.com>
12474         * sem_ch8.adb (Attribute_Renaming): Transfer original attribute
12475         reference to generated body so that legality checks on stream
12476         attributes are properly applied. If type is tagged and already
12477         frozen, insert generated body at the point of the renaming
12478         declaration.
12480 2014-01-21  Ed Schonberg  <schonberg@adacore.com>
12482         * sem_ch12.adb: Code clean up.
12483         * sem_ch8.adb: Minor reformatting
12485 2014-01-20  Robert Dewar  <dewar@adacore.com>
12487         * checks.adb: Check SPARK_Mode instead of GNATProve_Mode for
12488         converting warnings on inevitable exceptions to errors.
12489         * exp_ch4.adb: Check SPARK_Mode instead of GNATProve_Mode for
12490         converting warnings on inevitable exceptions to errors.
12491         * opt.adb (SPARK_Mode_Config): Handled like other config flags
12492         * opt.ads (SPARK_Mode_Type): Moved here from types (renamed from
12493         SPARK_Mode_Id) (SPARK_Mode_Type): Add pragma Ordered, remove
12494         SPARK_ from names (SPARK_Mode): New flag (SPARK_Mode_Config):
12495         New flag (Config_Switches_Type): Add SPARK_Mode field
12496         * sem.adb: Minor code reorganization (remove unnecessary with)
12497         * sem.ads (Scope_Stack_Entry): Add Save_SPARK_Mode field
12498         * sem_aggr.adb: Check SPARK_Mode instead of GNATProve_Mode for
12499         converting warnings on inevitable exceptions to errors.
12500         * sem_attr.adb: Check SPARK_Mode instead of GNATProve_Mode for
12501         converting warnings on inevitable exceptions to errors.
12502         * sem_ch3.adb: Check SPARK_Mode instead of GNATProve_Mode for
12503         converting warnings on inevitable exceptions to errors.
12504         * sem_ch4.adb: Check SPARK_Mode instead of GNATProve_Mode for
12505         converting warnings on inevitable exceptions to errors.
12506         * sem_ch6.adb (Analyze_Subprogram_Body_Helper): Reset SPARK_Mode
12507         from spec if needed
12508         * sem_ch7.adb (Analyze_Package_Body_Helper): Reset SPARK_Mode
12509         from spec if needed
12510         * sem_ch8.adb (Push_Scope): Save SPARK_Mode (Pop_Scope):
12511         Restore SPARK_Mode
12512         * sem_elab.adb: Check SPARK_Mode instead of GNATProve_Mode for
12513         converting warnings on inevitable exceptions to errors.
12514         * sem_prag.adb (Get_SPARK_Mode_From_Pragma): New function
12515         (Get_SPARK_Mode_Id): Removed (Get_SPARK_Mode_Type): New name
12516         of Get_SPARK_Mode_Id
12517         * sem_prag.ads (Get_SPARK_Mode_From_Pragma): New function
12518         * sem_res.adb: Check SPARK_Mode instead of GNATProve_Mode for
12519         converting warnings on inevitable exceptions to errors.
12520         * sem_util.adb: Check SPARK_Mode instead of GNATProve_Mode for
12521         converting warnings on inevitable exceptions to errors.
12522         * types.ads (SPARK_Mode_Id): Moved to opt.ads and renamed
12523         SPARK_Mode_Type
12525 2014-01-20  Ed Schonberg  <schonberg@adacore.com>
12527         * sem_ch13.adb: Add semantic information to rewritten type
12528         reference.
12530 2014-01-20  Ed Schonberg  <schonberg@adacore.com>
12532         * exp_ch5.adb (Expand_N_Assignment_Statement): If both sides
12533         are of a type with unknown discriminants, convert both to the
12534         underlying view of the type, so that the proper constraint check
12535         can be applied to the right-hand side.
12537 2014-01-20  Robert Dewar  <dewar@adacore.com>
12539         * atree.adb (Copy_Node): Fix failure to copy last component
12540         (Exchange_Entities): Fix failure to exchange last entity
12542 2014-01-20  Ed Schonberg  <schonberg@adacore.com>
12544         * sem_ch12.adb: Code clean up.
12546 2014-01-20  Robert Dewar  <dewar@adacore.com>
12548         * gnat_rm.texi, sem_ch4.adb: Minor reformatting.
12550 2014-01-20  Ed Schonberg  <schonberg@adacore.com>
12552         * sem_ch4.adb (Analyze_Quantified_Expression): If after
12553         pre-analysis  the loop parameter specification has been
12554         rewritten as a iterator specification, propagate the change to
12555         the quantified expression, for ASIS navigtion needs.
12557 2014-01-20  Vincent Celier  <celier@adacore.com>
12559         * par-ch10.adb: Minor error message change: escape [ and ].
12561 2014-01-20  Robert Dewar  <dewar@adacore.com>
12563         * checks.adb: Make warnings on exceptions into errors in GNATprove mode.
12564         * errout.adb: Implement [ and ] insertion characters.
12565         * errout.ads: Document new [ and ] insertion characters.
12566         * sem_ch12.adb, restrict.adb, frontend.adb, exp_ch7.adb: Minor
12567         addition of ??? comment.
12568         * lib-xref.adb, exp_util.adb, gnat1drv.adb: Minor reformatting
12569         * exp_ch4.adb, sem_ch3.adb, sem_ch4.adb, sem_ch6.adb, sem_elab.adb,
12570         sem_eval.adb, sem_res.adb, sem_util.adb, sem_attr.adb, sem_aggr.adb:
12571         Make warnings on exceptions into errors in GNATprove mode.
12572         * sem_dim.adb: Minor reformatting throughout Quote [ and ]
12573         in error messages.
12575 2014-01-20  Ed Schonberg  <schonberg@adacore.com>
12577         * sem_ch13.adb: Code clean up.
12579 2014-01-20  Robert Dewar  <dewar@adacore.com>
12581         * errout.ads, errout.adb: Implement >? >x? >X? sequences in error
12582         messages.
12583         * sem_ch6.adb (Check_Statement_Sequence): Missing return is an
12584         error in GNATprove mode.
12586 2014-01-20  Ed Schonberg  <schonberg@adacore.com>
12588         * par-ch4.adb (Is_Parameterless_Attribute): The Ada2012 attribute
12589         reference 'Old takes no parameters, and thus can appear as a
12590         prefix of a slice.
12592 2014-01-20  Eric Botcazou  <ebotcazou@adacore.com>
12594         * exp_aggr.adb: Fix minor typos.
12596 2014-01-20  Ed Schonberg  <schonberg@adacore.com>
12598         * sem_attr.adb (Analyze_Attribute, case 'Constrained): In an
12599         instance the attribute is legal, and its value is determined
12600         statically if the type has no discriminants. This choice is
12601         more useful than rechecking the legality rule in the instance,
12602         is consistent with older usage, and is also consistent with all
12603         existing tests.
12605 2014-01-20  Arnaud Charlet  <charlet@adacore.com>
12607         * sem_cat.adb (Validate_Static_Object_Name): Change error into
12608         warning in Relaxed_Semantic_Mode.
12610 2014-01-20  Ed Schonberg  <schonberg@adacore.com>
12612         * sem_attr.adb: Code and comments cleanup.
12614 2014-01-20  Yannick Moy  <moy@adacore.com>
12616         * debug.adb Free debug flags -gnatd.D, -gnatd.G and -gnatd.V *
12617         * errout.adb (Compilation_Errors): Remove special handling in
12618         GNATprove mode.
12619         * gnat1drv.adb (Adjust_Global_Switches): Remove handling of the
12620         removed debug flags.
12621         * gnat_rm.texi: Initial documentation for Abstract_State, Depends,
12622         Global, Initial_Condition, Initializes and Refined_State pragmas and
12623         aspects.
12624         * opt.ads (Frame_Condition_Mode, Formal_Extensions,
12625         SPARK_Strict_Mode): Remove global flags.
12626         * sem_ch3.adb (Analyze_Object_Declaration): Check of no hidden state
12627         always performed now, on packages declaring a null state.
12628         (Signed_Integer_Type_Declaration): Remove ill-designed attempt
12629         at providing pedantic mode for bounds of integer types.
12630         * sem_ch4.adb (Analyze_Quantified_Expression): Warning on suspicious
12631         "some" quantified expression now issued under control of -gnatw.t,
12632         like the other warning on unused bound variable.
12633         * sem_prag.adb (Check_Precondition_Postcondition): Remove useless test
12634         on removed flag.
12635         (Analyze_Pragma): Remove tests for SPARK 2014
12636         pragmas, not officially allowed by GNAT.
12638 2014-01-20  Hristian Kirtchev  <kirtchev@adacore.com>
12640         * sem_prag.adb (Analyze_Pragma): Ensure that
12641         the sole argument of pragmas Abstract_State, Contract_Cases,
12642         Depends, Global and Initializes in in aggregate form.
12643         (Analyze_Refined_Pragma): Ensure that the sole argument of
12644         pragmas Refined_Depends, Refined_Global and Refined_State is in
12645         aggregate form.
12646         (Ensure_Aggregate_Form): New routine.
12648 2014-01-20  Doug Rupp  <rupp@adacore.com>
12650         * sem_attr.adb (Analyze_Attribute): case
12651         Attribute_Constrained => treat all prefixes as legal for Declib
12652         compatibility.
12654 2014-01-20  Hristian Kirtchev  <kirtchev@adacore.com>
12656         * sem_prag.adb (Check_Mode): Reimplement the routine.
12657         (Find_Mode): New routine.
12659 2014-01-20  Robert Dewar  <dewar@adacore.com>
12661         * sem_ch4.adb (Operator_Check): Handle additional
12662         Allow_Integer_Address cases.
12664 2014-01-20  Robert Dewar  <dewar@adacore.com>
12666         * gnat_rm.texi (Allow_Integer_Address): Remove note about not
12667         allowed if address is non-private, no longer true.
12668         * sem_prag.adb (Analyze_Pragma, case Allow_Integer_Address):
12669         Remove check for address being private, causes difficulty when
12670         pragma used in gnat.adc file and is not needed, since we guard
12671         this in Address_Integer_Convert_OK.
12672         * exp_ch7.adb: Minor reformatting.
12673         * sem_ch4.adb: Handle operator operands in Allow_Integer_Address mode.
12675 2014-01-20  Robert Dewar  <dewar@adacore.com>
12677         * checks.adb (Apply_Range_Check): Remove gnatprove special
12678         casing of exponentiation.
12679         * sem_res.adb (Resolve_Op_Expon): Apply range check to right
12680         operand for integer case to check range against Natural.
12682 2014-01-20  Robert Dewar  <dewar@adacore.com>
12684         * s-tataat.adb: Minor reformatting.
12686 2014-01-20  Robert Dewar  <dewar@adacore.com>
12688         * einfo.adb (Is_Descendent_Of_Address): Now applies to all
12689         entities, and also fix documentation to remove mention of visible
12690         integer type, since this is not what the implementation does.
12691         * einfo.ads (Is_Descendent_Of_Address): Now applies to all
12692         entities, and also fix documentation to remove mention of visible
12693         integer type, since this is not what the implementation does.
12694         * gnat_rm.texi: Minor clarification of Allow_Integer_Address
12695         function.
12696         * sem_ch4.adb (Analyze_One_Call): Handle Allow_Integer_Address
12697         case for parameter type check.
12698         * sem_res.adb (Resolve): Use new function
12699         Address_Integer_Convert_OK.
12700         * sem_type.adb: Minor code reorganization (use Ekind_In) Minor
12701         reformatting throughout.
12702         * sem_util.adb (Address_Integer_Convert_OK): New function.
12703         * sem_util.ads: Minor reformatting (put specs in alpha order)
12704         (Address_Integer_Convert_OK): New function.
12706 2014-01-20  Thomas Quinot  <quinot@adacore.com>
12708         * exp_ch7.adb (Wrap_Transient_Expression):
12709         Insertion extra conditional expression only if
12710         Opt.Suppress_Control_Flow_Optimizations is set.
12712 2014-01-20  Arnaud Charlet  <charlet@adacore.com>
12714         * s-tataat.adb (Initialize_Attributes): Abort might already be
12715         deferred in Create_Task.
12717 2014-01-20  Hristian Kirtchev  <kirtchev@adacore.com>
12719         * checks.adb (Apply_Scalar_Range_Check): Flag
12720         the exponent as requiring a range check when the expression is
12721         an exponentiation.
12723 2014-01-20  Fedor Rybin  <frybin@adacore.com>
12725         * gnat_ugn.texi: Documenting --passed-tests option for gnattest.
12727 2014-01-20  Hristian Kirtchev  <kirtchev@adacore.com>
12729         * sem_util.adb (Default_Initialization): New routine.
12730         * sem_util.ads: Add new type Default_Initialization_Kind.
12731         (Default_Initialization): New routine.
12733 2014-01-20  Hristian Kirtchev  <kirtchev@adacore.com>
12735         * sem_prag.adb (Check_Mode): Correct all error
12736         message logic dealing with in/in out parameters that may appear
12737         as inputs or have a self reference.
12739 2014-01-20  Robert Dewar  <dewar@adacore.com>
12741         * exp_ch9.adb, checks.adb, exp_intr.adb: Minor reformatting.
12742         * sem_res.adb (Resolve): Fix error causing infinite loop for
12743         integer used as address. Allow addresses as integers.
12745 2014-01-20  Arnaud Charlet  <charlet@adacore.com>
12747         * s-osinte-linux.ads (struct_sigaction): Fix rep clause.
12749 2014-01-20  Bob Duff  <duff@adacore.com>
12751         * par-ch8.adb (P_Use_Type_Clause): Detect syntax
12752         error when "use all" is not followed by "type".
12754 2014-01-20  Bob Duff  <duff@adacore.com>
12756         * exp_intr.adb (Expand_Unc_Deallocation): Remove warning on abort
12757         followed by free.
12759 2014-01-20  Ed Schonberg  <schonberg@adacore.com>
12761         * checks.adb (Apply_Address_Clause_Check): If there is an
12762         alignment check on the expression in an address clause, and there
12763         is no local exception propagation, add an additional explanatory
12764         message to clarify the cause of previous warning.
12766 2014-01-20  Robert Dewar  <dewar@adacore.com>
12768         * exp_ch7.adb: Minor reformatting.
12769         * opt.ads: Minor comment updates.
12770         * sem.adb: Minor name change Is_Main_Unit =>
12771         Is_Main_Unit_Or_Main_Unit_Spec.
12772         * sem_ch6.adb: Minor reformatting and code reorganization.
12774 2014-01-20  Bob Duff  <duff@adacore.com>
12776         * gnat_ugn.texi: Update gnatpp switches.
12778 2014-01-20  Thomas Quinot  <quinot@adacore.com>
12780         * exp_ch9.adb: Minor comment edit.
12782 2014-01-20  Robert Dewar  <dewar@adacore.com>
12784         * gnat_rm.texi: Document that Allow_Integer_Address is permitted
12785         only if System.Address is a private type.
12786         * opt.ads (Allow_Integer_Address): No longer set by -gnates.
12787         * sem_prag.adb (Analyze_Pragma, case Allow_Integer_Address):
12788         Allowed only if type System.Address is private, since otherwise
12789         it makes no sense.
12790         * sem_res.adb: Fix failure to properly Analyze unchecked
12791         conversions that were introduced by Allow_Integer_Address.
12792         * switch-c.adb: Remove -gnates switch.
12793         * usage.adb: Remove -gnates switch.
12794         * gnat_ugn.texi: Remove documentation of -gnates flag.
12796 2014-01-20  Ed Schonberg  <schonberg@adacore.com>
12798         * sem_ch6.adb (Analyze_Expression_Function): Pre-analyze and
12799         resolve expression to perform proper name capture.
12801 2014-01-20  Ed Schonberg  <schonberg@adacore.com>
12803         * sem.adb (Semantics): When saving/restoring configuration
12804         switches, the spec of a pre- defined unit that is the main unit
12805         must be treated as a predefined unit as well.
12807 2014-01-20  Thomas Quinot  <quinot@adacore.com>
12809         * exp_ch7.adb (Wrap_Transient_Expression): For a Boolean
12810         expression, insert an extra conditional expression when saving
12811         the value of the expression, for the benefit of control flow
12812         graph based coverage analysis.
12813         * exp_ch3.adb: Minor reformatting.
12815 2014-01-20  Robert Dewar  <dewar@adacore.com>
12817         * gnat1drv.adb: Set Allow_Integer_Address in relaxed semantics mode.
12818         * gnat_rm.texi: Document pragma Allow_Integer_Address.
12819         * gnat_ugn.texi: Document pragma Allow_Integer_Address, -gnates.
12820         * opt.ads: New flag Allow_Integer_Address.
12821         * par-prag.adb: Dummy entry for pragma Allow_Integer_Address.
12822         * sem_ch5.adb: Minor reformatting.
12823         * sem_prag.adb: Implement pragma Allow_Integer_Address.
12824         * sem_res.adb (Resolve): Allow integer address value if
12825         switch set.
12826         * sem_util.adb: Minor reformatting.
12827         * snames.ads-tmpl: Add entry for pragma Allow_Integer_Address.
12828         * switch-c.adb: Recognize flag -gnates.
12829         * usage.adb: Document flag -gnates.
12831 2014-01-20  Thomas Quinot  <quinot@adacore.com>
12833         * s-tadeca.adb: Fix minor typos in comment.
12835 2014-01-20  Pascal Obry  <obry@adacore.com>
12837         * s-win32.ads (FreeLibrary): New import.
12839 2014-01-20  Robert Dewar  <dewar@adacore.com>
12841         * sem_res.adb, sem_cat.adb: Minor reformatting.
12842         * sem_ch11.adb (Analyze_Raise_Statement): Only give warning about
12843         assigning to OUT parameters for the current subprogram scope.
12844         * exp_ch4.adb: Minor reformatting.
12846 2014-01-20  Ed Schonberg  <schonberg@adacore.com>
12848         * exp_ch4.adb (Process_Transient_Object,
12849         Find_Enclosing_Contexts): If the top-level if-expression that
12850         generated the transient object is an actual in a call, the proper
12851         Hook_Context is a construct enclosing the call.
12852         * einfo.ads: Indicate that Related_Expression is used to link a
12853         loop variable to the container expression over which the loop
12854         takes place.
12855         (Analyze_Iterator_Specification): Set the Related_Expression of
12856         the loop variable in a container element iterator.
12857         (Note_Possible_Modification): If the variable is the loop
12858         variable in a container element iterator, indicate that the
12859         enclosing container is also modified.
12861 2014-01-20  Hristian Kirtchev  <kirtchev@adacore.com>
12863         * aspects.adb (Move_Or_Merge_Aspects): Reimplemented.
12865 2014-01-20  Robert Dewar  <dewar@adacore.com>
12867         * s-taasde.ads, gnat_ugn.texi, s-tadeca.adb, sem_res.adb, s-tadeca.ads:
12868         Minor reformatting and code clean up.
12870 2014-01-20  Arnaud Charlet  <charlet@adacore.com>
12872         * sem_cat.adb (Validate_Object_Declaration): Relax semantics
12873         of objects of private type if Relaxed_RM_Semantics.
12875 2014-01-20  Claire Dross  <dross@adacore.com>
12877         * a-cofove.ads (Vector): Capacity discriminant
12878         should be in range of the index.
12880 2014-01-20  Thomas Quinot  <quinot@adacore.com>
12882         * a-caldel.ads(To_Duration), s-taasde.ads(Time_Enqueue):
12883         Clarify specs s-tadeca.adb(Enqueue_Calendar): Compensate for
12884         possible difference between epoch of Ada.Calendar clock and Ada
12885         real-time/tasking clock.
12886         * s-taprop-posix.adb: Minor comment fix.
12888 2014-01-20  Doug Rupp  <rupp@adacore.com>
12890         * sysdep.c [vxworks]: Remove Vxworks version noise for RTP.
12892 2014-01-20  Hristian Kirtchev  <kirtchev@adacore.com>
12894         * exp_attr.adb (Expand_N_Attribute_Reference): Generate validity
12895         checks on the prefix of attribute 'Old.
12896         * sem_ch3.adb (Process_Range_Expr_In_Decl): Suppress the
12897         generation of validity checks on a range that belongs to the
12898         iteration scheme of a quantified expression.
12899         * sem_ch5.adb (One_Bound): Suppress the generation of validity
12900         checks on a bound that belongs to the iteration scheme of a
12901         quantified expression, generate the check in all other cases.
12903 2014-01-20  Bob Duff  <duff@adacore.com>
12905         * gnat_ugn.texi: Enable --pp-new by default. Minor reorganization.
12907 2014-01-20  Ed Schonberg  <schonberg@adacore.com>
12909         * sem_res.adb (Resolve): When compiling a predefined unit, ignore
12910         interpretations that do not come from other predefined units,
12911         to prevent spurious ambiguities in the presence of user-defined
12912         operators in the context of (an instance of) a predefined unit.
12914 2014-01-20  Robert Dewar  <dewar@adacore.com>
12916         * gnat_rm.texi: Document that Loop_Variant is included in
12917         Statement_Assertions.
12918         * sem_prag.adb (Check_Kind): Add Loop_Variant to
12919         Statement_Assertions (Check_Applicable_Policy): Add Loop_Variant
12920         to Statement_Assertions.
12922 2014-01-20  Doug Rupp  <rupp@adacore.com>
12924         * sysdep.c (__gnat_is_file_not_found_error) [vxworks6]: Add case
12925         for errno ENOENT from RTP on NFS mounted file system.
12927 2014-01-20  Ed Schonberg  <schonberg@adacore.com>
12929         * sem_util.adb (Check_Function_Writable_Actuals): 1) Do not
12930         examine code that does not come from source. The check does not
12931         apply to code generated for constraint checks, and such code may
12932         generate spurious error messages when compiled with expansion
12933         disabled (as in a generic unit) because side effects may not
12934         have been removed.
12935         2) Make error messages more explicit: indicate the component
12936         of the  construct whose value is indeterminate because of a
12937         call to a function with in-out parameter in another component,
12938         when there is no mandated order of execution between the two
12939         components (actuals, aggregate components, alternatives).
12941 2014-01-20  Robert Dewar  <dewar@adacore.com>
12943         * gnat_rm.texi: Minor cleanup.
12945 2014-01-20  Hristian Kirtchev  <kirtchev@adacore.com>
12947         * sem_attr.adb (Analyze_Attribute): Attributes 'Old and 'Result
12948         can now apply to a refined postcondition.
12949         * sem_ch6.adb (Analyze_Subprogram_Contract): Remove local
12950         variable Result_Seen. Add variables Case_Prag, Post_Prag,
12951         Seen_In_Case and Seen_In_Post. Update the mechanism that detects
12952         whether postconditions and/or constract-cases mention attribute
12953         'Result and introduce a post-state when applied to functions.
12954         (Check_Result_And_Post_State): Removed.
12955         * sem_prag.adb (Analyze_Pragma): Add local variable
12956         Result_Seen. Verify that the expression of pragma Refined_Post
12957         mentions attribute 'Result and introduces a post-state.
12958         * sem_util.ads, sem_util.adb (Check_Result_And_Post_State): New routine.
12960 2014-01-20  Hristian Kirtchev  <kirtchev@adacore.com>
12962         * exp_ch7.adb (Is_Subprogram_Call): New routine.
12963         (Process_Transient_Objects): Make variable Must_Hook global with
12964         respect to all locally declared subprograms. Search the context
12965         for at least one subprogram call.
12966         (Requires_Hooking): Removed.
12968 2014-01-20  Claire Dross  <dross@adacore.com>
12970         * a-cfdlli.ads a-cfhama.ads a-cfhase.ads a-cforma.ads
12971         * a-cforse.ads a-cofove.ads: Add pragma Annotate (GNATprove,
12972         External_Axiomatization);
12974 2014-01-20  Robert Dewar  <dewar@adacore.com>
12976         * sem_attr.adb (Analyze_Attribute, case Loop_Entry): Allow
12977         Loop_Entry in Assert, Assert_And_Cut, and Assume pragmas.
12978         * sem_prag.adb (Analyze_Pragma, case Assert[_And_Cut], Assume):
12979         Allow Loop_Entry to be used in these pragmas if they appear in
12980         an appropriate context.
12981         (Placement_Error): Specialize error
12982         message for pragma Assert[_And_Cut] or pragma Assume containing
12983         Loop_Entry attribute.
12984         * a-exexpr-gcc.adb, sinput.adb: Minor reformatting.
12985         * s-excmac-arm.ads, s-except.ads, s-excmac-gcc.ads: Minor reformatting
12986         and code clean ups.
12988 2014-01-20  Robert Dewar  <dewar@adacore.com>
12990         * gnat1drv.adb: Minor comment update.
12992 2014-01-20  Tristan Gingold  <gingold@adacore.com>
12994         * raise-gcc.c (PERSONALITY_FUNCTION/arm): Remove unused
12995         variables, comment out unused code.
12996         * a-exexpr-gcc.adb: Move declarations to s-excmac-gcc.ads
12997         * s-excmac-gcc.ads: New file, extracted from a-exexpr-gcc.adb
12998         * s-excmac-arm.ads: New file.
13000 2014-01-20  Hristian Kirtchev  <kirtchev@adacore.com>
13002         * exp_ch4.adb (Expand_N_Slice): Remove constant D and variables
13003         Drange and Index_Typ. Remove the circuitry which creates a
13004         range check to compare the index type of the array against the
13005         discrete_range.
13006         * sem_res.adb (Resolve_Slice): Add local variable Dexpr. Update
13007         the circuitry which creates a range check to handle a
13008         discrete_range denoted by a subtype indication.
13010 2014-01-20  Pierre-Marie Derodat  <derodat@adacore.com>
13012         * sinput.adb, sinput.ads (Sloc_Range): Traverse the tree of original
13013         nodes to get the original sloc range.
13015 2014-01-20  Hristian Kirtchev  <kirtchev@adacore.com>
13017         * sem_prag.adb (Analyze_Pragma): Use Defining_Entity to obtain the
13018         entity of a [library level] package.
13020 2014-01-20  Tristan Gingold  <gingold@adacore.com>
13022         * raise-gcc.c (exception_class_eq): New function.
13023         (is_handled_by): Use it to compare exception classes.
13024         (PERSONALITY_STORAGE): Define.  (continue_unwind): New function to
13025         be called to return URC_CONTINUE_UNWIND.
13026         (personality_body): New function, extracted from PERSONALITY_ROUTINE.
13027         (PERSONALITY_ROUTINE): Add an implementation for the ARM unwinder.
13029 2014-01-20  Robert Dewar  <dewar@adacore.com>
13031         * opt.ads: Minor comment update.
13033 2014-01-20  Hristian Kirtchev  <kirtchev@adacore.com>
13035         * exp_ch4.adb (Expand_N_Slice): Relocate some variables and
13036         constants to the "Local variables" area. Add new constant D. Add
13037         new variables Drange and Index_Typ.  Rename Pfx to Rep and Ptp
13038         to Pref_Typ and update all occurrences. Add circuitry to extract
13039         the discrete_range and the index type and build a range check.
13041 2014-01-20  Arnaud Charlet  <charlet@adacore.com>
13043         * gnat1drv.adb (Adjust_Global_Switches): Enable
13044         Treat_Categorization_Errors_As_Warnings when Relaxed_RM_Semantics
13045         is set.
13047 2014-01-20  Thomas Quinot  <quinot@adacore.com>
13049         * sem_ch5.adb, sem_ch4.adb: Minor reformatting.
13051 2014-01-20  Hristian Kirtchev  <kirtchev@adacore.com>
13053         * sem_ch13.adb (Analyze_Aspect_Specifications):
13054         When aspect SPARK_Mode appears on a package body, insert the
13055         generated pragma at the top of the body declarations.
13057 2014-01-20  Robert Dewar  <dewar@adacore.com>
13059         * sem_aggr.adb, exp_prag.adb, sem_aux.adb, sinfo.ads, sem_ch10.adb,
13060         checks.adb, sem_prag.adb, sem_ch12.adb, freeze.adb, g-arrspl.adb,
13061         expander.adb, gnat1drv.adb, exp_ch4.adb, sem_ch6.adb,
13062         sem_ch8.adb, exp_dist.adb: Minor reformatting.
13064 2014-01-20  Yannick Moy  <moy@adacore.com>
13066         * gnat1drv.adb (Gnat1drv): Call Write_ALI with Object=True in GNATprove
13067         mode.
13069 2014-01-20  Pascal Obry  <obry@adacore.com>
13071         * g-arrspl.ads (Slice_Set): New definition (will use a copy on
13072         write scheme).
13073         * g-arrspl.adb: Adapt all routine to this new implementation.
13074         (Set): Copy the Slice_Set definition before reusing it.
13076 2014-01-20  Arnaud Charlet  <charlet@adacore.com>
13078         * sem_prag.adb (Process_Import_Or_Interface): In
13079         Relaxed_RM_Semantics, support old Ada 83 style of pragma Import.
13080         (Analyze_Pragma): Ditto for pragma Export.
13081         * exp_prag.adb (Expand_Pragma_Import_Or_Interface): Handle old pragma
13082         Import style.
13084 2014-01-20  Hristian Kirtchev  <kirtchev@adacore.com>
13086         * einfo.ads: E_Abstract_State is now part of the entities that
13087         can be overloaded. Update type Overloadable_Kind to reflect the
13088         inclusion of abstract states.
13089         * sem_ch6.adb (New_Overloaded_Entity): A function can now
13090         overload an abstract state.
13091         * sem_prag.adb (Analyze_Constituent): Handle the overloading
13092         of states by functions. Use Entity_Of to obtain the entity of
13093         a constituent.  (Analyze_Global_Item): Handle the overloading of
13094         states by functions.
13095         (Analyze_Initialization_Item): Handle the
13096         overloading of states by functions.  Use Entity_Of to obtain the
13097         entity of an item.
13098         (Analyze_Input_Item): Handle the overloading
13099         of states by functions. Use Entity_Of to obtain the entity of an item.
13100         (Analyze_Input_Output): Handle the overloading of states by functions.
13101         (Analyze_Refinement_Clause): Handle the overloading
13102         of states by functions.  Use Entity_Of to obtain the entity of an item.
13103         (Appears_In): Use Entity_Of to obtain the entity of an element.
13104         (Check_Usage): Use Entity_Of to obtain the entity of
13105         an item. Add a guard to prevent a crash due to a previous error.
13106         (Resolve_State): New routine.
13108 2014-01-20  Yannick Moy  <moy@adacore.com>
13110         * spark_xrefs.ads, debug.adb, gnat1drv.adb, errout.adb, errout.ads,
13111         opt.ads: Minor comments updates.
13113 2014-01-20  Hristian Kirtchev  <kirtchev@adacore.com>
13115         * einfo.adb (Non_Limited_View): Applies to abstract states.
13116         (Set_From_Limited_With): Applies to abstract states.
13117         (Set_Non_Limited_View): Applies to abstract states.
13118         (Write_Field17): Output the non-limited view of an abstract state.
13119         * einfo.ads: Update the comment on usage and occurrences in
13120         nodes for attributes From_Limited_With and Non_Limited_View.
13121         * sem_aux.adb (Available_View): This routine can now handle
13122         abstract states.
13123         * sem_aux.ads (Available_View): This routine can now handle
13124         abstract states. Update the comment on usage.
13125         * sem_ch8.adb (Find_Expanded_Name): Handle abstract views
13126         of states and variables.
13127         (In_Pragmas_Depends_Or_Global): New routine.
13128         * sem_ch10.adb (Build_Limited_Views): Implement
13129         abstract (limited) views of variables and states.
13130         (Build_Shadow_Entity): This routine is now a procedure. Add
13131         formal parameter Shadow. Update the comment on usage. Add
13132         context-specific decoration for states and variables.
13133         (Decorate_State): New routine.  (Decorate_Variable): New routine.
13134         (Find_And_Process_States): New routine.
13135         (Process_Declarations): Renamed to Process_Declarations_And_States.
13136         (Process_Declarations_And_States): Add formal parameters
13137         Pack and Create_Abstract_Views. Update the comment on usage.
13138         (Process_States): New routine.
13139         * sem_prag.adb (Check_Dependency_Clause): Handle abstract
13140         views of states and variables. Match the abstract view of a state
13141         against its corresponding non-abstract view.
13142         (Is_Matching_Input):
13143         Handle abstract views of states and variables. Match the abstract
13144         view of a state against its corresponding non-abstract view.
13145         (Process_Global_Item): Handle abstract views of states and
13146         variables.
13148 2014-01-20  Bob Duff  <duff@adacore.com>
13150         * sem_ch10.adb (Expand_With_Clause): Don't
13151         recurse on the prefix if the current with-ed name refers to a
13152         package that renames its own parent, eg "package P.Q renames P;".
13154 2014-01-20  Yannick Moy  <moy@adacore.com>
13156         * exp_spark.adb (Expand_SPARK_Call): Remove procedure.
13157         * opt.adb, opt.ads (Full_Expander_Active): Remove function.
13158         * checks.adb, exp_ch6.adb, exp_ch9.adb, exp_disp.adb, sem_aggr.adb,
13159         * sem_ch10.adb, sem_ch5.adb, sem_ch6.adb, sem_ch8.adb, sem_ch9.adb,
13160         * sem_disp.adb, sem_res.adb Replace Full_Expander_Active by
13161         Expander_Active.
13163 2014-01-20  Yannick Moy  <moy@adacore.com>
13165         * sinfo.ads Update documentation of GNATprove mode.
13167 2014-01-20  Yannick Moy  <moy@adacore.com>
13169         * adabkend.adb, ali-util.adb, errout.adb, exp_ch7.adb,
13170         * exp_dbug.adb, freeze.adb, lib-xref.adb, restrict.adb,
13171         * sem_attr.adb, sem_ch4.adb, sem_ch5.adb, sem_ch6.adb, sem_ch8.adb,
13172         * sem_prag.adb, sem_res.adb, sem_util.adb Rename SPARK_Mode into
13173         GNATprove_Mode.
13174         * sem_ch13.adb: Remove blank.
13175         * exp_spark.adb, exp_spark.ads (Expand_SPARK_Call): Only replace
13176         subprograms by alias for renamings, not for inherited primitive
13177         operations.
13178         * exp_util.adb (Expand_Subtype_From_Expr): Apply the expansion
13179         in GNATprove mode.
13180         (Remove_Side_Effects): Apply the removal in
13181         GNATprove mode, for the full analysis of expressions.
13182         * expander.adb (Expand): Call the light SPARK expansion in GNATprove
13183         mode.
13184         (Expander_Mode_Restore, Expander_Mode_Save_And_Set): Ignore
13185         save/restore actions for Expander_Active flag in GNATprove mode,
13186         similar to what is done in ASIS mode.
13187         * frontend.adb (Frontend): Generic bodies are instantiated in
13188         GNATprove mode.
13189         * gnat1drv.adb (Adjust_Global_Switches): Set operating
13190         mode to Check_Semantics in GNATprove mode, although a light
13191         expansion is still performed.
13192         (Gnat1drv): Set Back_End_Mode to
13193         Declarations_Only in GNATprove mode, and later on special case
13194         the GNATprove mode to continue analysis anyway.
13195         * lib-writ.adb (Write_ALI): Always generate ALI files in
13196         GNATprove mode.
13197         * opt.adb, opt.ads (Full_Expander_Active): Make it equivalent to
13198         Expander_Active.
13199         (SPARK_Mode): Renamed as GNATprove_Mode.
13200         * sem_aggr.adb (Aggregate_Constraint_Checks): Add checks in the
13201         tree in GNATprove_Mode.
13202         * sem_ch12.adb (Analyze_Package_Instantiation): Always instantiate
13203         body in GNATprove mode.
13204         (Need_Subprogram_Instance_Body): Always instantiate body in GNATprove
13205         mode.
13206         * sem_ch3.adb (Constrain_Index, Process_Range_Expr_In_Decl):
13207         Make sure side effects are removed in GNATprove mode.
13209 2014-01-20  Eric Botcazou  <ebotcazou@adacore.com>
13211         * gcc-interface/decl.c (gnat_to_gnu_entity) <object>: Robustify tests
13212         for aliased objects with an unconstrained nominal subtype.
13213         * gcc-interface/trans.c (Call_to_gnu): Likewise.
13214         (gnat_to_gnu) <case N_Op_Not>: Robustify test for private type.
13215         <case N_Op_Minus>: Remove useless code.
13216         (Exception_Handler_to_gnu_zcx): Minor tweaks.
13218 2014-01-20  Eric Botcazou  <ebotcazou@adacore.com>
13220         * gcc-interface/decl.c (gnat_to_gnu_entity) <case E_Record_Subtype>:
13221         Tidy up.  For a subtype with discriminants and variant part, if a
13222         variant is statically selected and the fields all have a constant
13223         position, put them in order of increasing position.  Likewise if
13224         no variant part but representation clause is present.
13225         * gcc-interface/utils.c (make_packable_type): Robustify.
13226         (maybe_pad_type): Use local variable and tidy up condition.  If no
13227         alignment is specified, use the original one.
13228         (create_type_stub_decl): Minor tweak.
13229         (convert) <case VECTOR_CST>: Fix typo.
13230         <case CONSTRUCTOR>: Deal with padding types around the same type.
13231         Do not punt on missing fields.
13232         (unchecked_convert): Call finish_record_type to lay out the special
13233         record types made for conversions from/to problematic integer types.
13234         Bump the alignment of CONSTRUCTORs before converting them to a more
13235         aligned type.
13237 2014-01-20  Eric Botcazou  <ebotcazou@adacore.com>
13239         * gcc-interface/decl.c (gnat_to_gnu_entity) <case E_Component>: Remove
13240         obsolete code for type_annotate_only mode, simplify code and slightly
13241         improve wording of comments.
13243 2014-01-12  Eric Botcazou  <ebotcazou@adacore.com>
13245         PR ada/59772
13246         * gcc-interface/cuintp.c (build_cst_from_int): Use 32-bit integer type
13247         as intermediate type.
13248         (UI_To_gnu): Likewise.
13250 2014-01-03  Eric Botcazou  <ebotcazou@adacore.com>
13252         * gnatvsn.ads (Current_Year): Bump to 2014.
13254 2014-01-02  Tobias Burnus  <burnus@net-b.de>
13256         * gnat_ugn.texi: Bump @copying's copyright year.
13258 Copyright (C) 2014 Free Software Foundation, Inc.
13260 Copying and distribution of this file, with or without modification,
13261 are permitted in any medium without royalty provided the copyright
13262 notice and this notice are preserved.