2014-08-04 Robert Dewar <dewar@adacore.com>
[official-gcc.git] / gcc / ada / ChangeLog
blob0d70e1b3183fc5f6cb25988267e80d16a14e686c
1 2014-08-04  Robert Dewar  <dewar@adacore.com>
3         * sem_util.adb, sem_case.adb: Minor reformatting.
5 2014-08-04  Ed Schonberg  <schonberg@adacore.com>
7         * exp_ch9.adb (Extract_Entry): If the synchronized object is a
8         limited view, replace with non-limited view, which is available
9         at the point of an entry call.
11 2014-08-04  Ed Schonberg  <schonberg@adacore.com>
13         * exp_ch6.adb (Expand_Call): If the call is to a function in
14         a run-time unit that is marked Inline_Always, we must suppress
15         debugging information on it, so that the code that is eventually
16         inlined will not affect debugging of the user program.
18 2014-08-04  Robert Dewar  <dewar@adacore.com>
20         * inline.adb, einfo.ads, s-tassta.adb, s-tarest.adb: Minor comment
21         fixes.
23 2014-08-04  Ed Schonberg  <schonberg@adacore.com>
25         * sem_prag.adb (Process_Import_Or_Interface): Handle properly
26         an aspect Import that specifies a False value.
28 2014-08-04  Robert Dewar  <dewar@adacore.com>
30         * gnat_rm.texi: Add section on aspect Invariant'Class.
32 2014-08-04  Ed Schonberg  <schonberg@adacore.com>
34         * sem_case.adb (Check_Choice_Set): New flag Predicate_Error,
35         for better control of cascaded error messages when some choice
36         in a case statement over a predicated type violates the given
37         static predicate.
39 2014-08-04  Hristian Kirtchev  <kirtchev@adacore.com>
41         * sem_ch3.adb (Build_Derived_Type): Modify the
42         inheritance of the rep chain to ensure that a non-tagged type's
43         items are not clobbered during the inheritance.
45 2014-08-04  Robert Dewar  <dewar@adacore.com>
47         * sem_ch3.adb, einfo.ads: Minor reformatting.
49 2014-08-04  Yannick Moy  <moy@adacore.com>
51         * inline.adb (Can_Be_Inlined_In_GNATprove_Mode): Fix
52         detection of subprograms that cannot be inlined in GNATprove mode.
54 2014-08-04  Ed Schonberg  <schonberg@adacore.com>
56         * einfo.adb: Add guard to Returns_Limited_View.
58 2014-08-04  Jose Ruiz  <ruiz@adacore.com>
60         * s-tassta.adb, s-tarest.adb (Task_Wrapper): Force maximum alignment of
61         the secondary stack to respect the alignments of the returned objects.
63 2014-08-04  Ed Schonberg  <schonberg@adacore.com>
65         * einfo.ads, einfo.adb (Returns_Limited_View): New flag defined
66         on function entities whose return type is a limited view.
67         * freeze.adb (Freeze_Entity): Use Returns_Limited_View to determine
68         where to place the freeze node for a function that returns the
69         limited view of a type, when the function is called and frozen
70         in a different unit.
72 2014-08-04  Eric Botcazou  <ebotcazou@adacore.com>
74         * sem_ch3.adb (Build_Derived_Private_Type): Minor code
75         refactoring.
77 2014-08-04  Robert Dewar  <dewar@adacore.com>
79         * gnat_ugn.texi: Clarify documentation on assertions.
81 2014-08-04  Ed Schonberg  <schonberg@adacore.com>
83         * sem_aggr.adb (Resolve_Record_Aggregate, Get_Value): Warn
84         if a component association has a box initialization when the
85         component type has no default initialization, either through an
86         initial value, an aspect, or an implicit initialization procedure.
88 2014-08-04  Ed Schonberg  <schonberg@adacore.com>
90         * freeze.adb: Code clean up.
92 2014-08-04  Thomas Quinot  <quinot@adacore.com>
94         * sem_ch5.adb: Minor reformatting.
96 2014-08-04  Ed Schonberg  <schonberg@adacore.com>
98         * freeze.adb (Late_Freeze_Subprogram): Following AI05-151,
99         a function can return a limited view of a type declared
100         elsewhere. In that case the function cannot be frozen at the end
101         of its enclosing package. If its first use is in a different unit,
102         it cannot be frozen there, but if the call is legal the full view
103         of the return type is available and the subprogram can now be
104         frozen. However the freeze node cannot be inserted at the point
105         of call, but rather must go in the package holding the function,
106         so that the backend can process it in the proper context.
108 2014-08-04  Robert Dewar  <dewar@adacore.com>
110         * exp_ch5.adb, sem_ch5.adb, einfo.ads: Minor reformatting.
112 2014-08-04  Arnaud Charlet  <charlet@adacore.com>
114         * sem_ch4.adb (Operator_Check): Refine previous change.
116 2014-08-04  Arnaud Charlet  <charlet@adacore.com>
118         * sem_scil.ads: Improve comments.
119         * sem_ch4.adb (Analyze_Equality_Op): Add support for
120         Allow_Integer_Address (equality between Address and Integer).
122 2014-08-04  Yannick Moy  <moy@adacore.com>
124         * a-cfhama.adb, a-cforse.adb: Minor fixes to avoid using prefix
125         notation on untagged objects.
126         * sem.ads: Update comment.
127         * inline.adb (Can_Be_Inlined_In_GNATprove_Mode): Do
128         not inline subprograms declared in the visible part of a package.
130 2014-08-04  Ed Schonberg  <schonberg@adacore.com>
132         * exp_ch5.adb: minor reformatting.
133         * einfo.ads, einfo.adb (Is_Processed_Transient): Applies to loop
134         parameters.
136 2014-08-04  Thomas Quinot  <quinot@adacore.com>
138         * s-fatgen.adb: Minor reformatting.
140 2014-08-04  Arnaud Charlet  <charlet@adacore.com>
142         * exp_util.adb (Is_Possibly_Unaligned_Object): Always return
143         False on .NET.
145 2014-08-04  Ed Schonberg  <schonberg@adacore.com>
147         * sem_ch5.adb (Analyze_Loop_Statement): Set properly the kind of
148         the loop parameter for element iterators over containers and
149         arrays, so that improper uses of it are detected in the loop
150         body when expansion is disabled.
151         * exp_ch5.adb (Expand_Iterator_Loop): The entity kind of the
152         generated cursor is that of the analyzed loop parameter.
154 2014-08-04  Hristian Kirtchev  <kirtchev@adacore.com>
156         * exp_ch3.adb (Build_CPP_Init_Procedure): Remove
157         Flag_Decl. Do not analyze the declaration of the flag as it is
158         not part of the tree yet, instead add it to the freeze actions
159         of the C++ type.
161 2014-08-04  Robert Dewar  <dewar@adacore.com>
163         * checks.adb (Apply_Scalar_Range_Check): Make sure we handle
164         case of OUT and IN OUT parameter correctly (where Source_Typ is
165         set), we were missing one case where a check must be applied.
167 2014-08-04  Hristian Kirtchev  <kirtchev@adacore.com>
169         * sem_ch8.adb (Build_Class_Wide_Wrapper): Update the comment on
170         the generated code. Instead of hiding the renaming and using the
171         wrapper as the proper association, have the subprogram renaming
172         alias the wrapper.
173         (Build_Spec): The entity of the wrapper is
174         now derived from the entity of the related primitive.
176 2014-08-04  Emmanuel Briot  <briot@adacore.com>
178         * s-regpat.adb: s-regpat.adb (Parse): fix incorrect link when
179         using non-capturing groups.
181 2014-08-04  Ed Schonberg  <schonberg@adacore.com>
183         * inline.adb (Build_Body_To_Inline): Remove Unmodified and
184         related pragmas before copying the original body, to prevent
185         spurious errors when the pragmas apply to formals that will not
186         appear in the inlined body.
188 2014-08-04  Robert Dewar  <dewar@adacore.com>
190         * exp_prag.adb, sem_ch7.adb, einfo.adb, sem_prag.adb, sem_util.adb,
191         exp_ch3.adb: Minor reformatting.
193 2014-08-04  Robert Dewar  <dewar@adacore.com>
195         * prj-strt.adb, prj-strt.ads, sem_attr.adb: Minor reformatting.
197 2014-08-04  Hristian Kirtchev  <kirtchev@adacore.com>
199         * aspects.adb Add an entry in table Canonical_Aspect for
200         Default_Initial_Condition.
201         * aspects.ads Add an entry in tables Aspect_Id, Aspect_Argument,
202         Aspect_Names and Aspect_Delay for Default_Initial_Condition.
203         * einfo.adb Flag3 is now Has_Default_Init_Cond. Flag132
204         is now Is_Default_Init_Cond_ Procedure. Flag133 is now
205         Has_Inherited_Default_Init_Cond.
206         (Default_Init_Cond_Procedure): New routine.
207         (Has_Default_Init_Cond): New routine.
208         (Has_Inherited_Default_Init_Cond): New routine.
209         (Is_Default_Init_Cond_Procedure): New routine.
210         (Set_Default_Init_Cond_Procedure): New routine.
211         (Set_Has_Default_Init_Cond): New routine.
212         (Set_Has_Inherited_Default_Init_Cond): New routine.
213         (Set_Is_Default_Init_Cond_Procedure): New routine.
214         (Write_Entity_Flags): Output all the new flags.
215         * einfo.ads New attributes Default_Init_Cond_Procedure,
216         Has_Inherited_Default_Init_Cond and Is_Default_Init_Cond_Procedure
217         along with usage in nodes.
218         (Default_Init_Cond_Procedure): New routine.
219         (Has_Default_Init_Cond): New routine and pragma Inline.
220         (Has_Inherited_Default_Init_Cond): New routine and
221         pragma Inline.
222         (Is_Default_Init_Cond_Procedure): New routine and
223         pragma Inline.
224         (Set_Default_Init_Cond_Procedure): New routine.
225         (Set_Has_Default_Init_Cond): New routine and pragma Inline.
226         (Set_Has_Inherited_Default_Init_Cond): New routine and pragma Inline.
227         (Set_Is_Default_Init_Cond_Procedure): New routine and pragma Inline.
228         * exp_ch3.adb (Expand_N_Object_Declaration): New constant
229         Next_N. Generate a call to the default initial condition procedure
230         if the object's type is subject to the pragma.  (Freeze_Type):
231         Generate the body of the default initial condition procedure or
232         inherit the spec from a parent type.
233         * exp_ch7.adb Add with and use clause for Exp_Prag.
234         (Expand_Pragma_Initial_Condition): Removed.
235         * exp_prag.ads, exp_prag.adb (Expand_Pragma_Initial_Condition): New
236         routine.
237         * par-prag.adb (Prag): Pragma Default_Initial_Condition does
238         not need special treatment by the parser.
239         * sem_ch3.adb (Build_Derived_Record_Type): Propagate the
240         attributes related to pragma Default_Initial_Condition to the
241         derived type.
242         (Process_Full_View): Propagate the attributes
243         related to pragma Default_Initial_Condition to the full view.
244         * sem_ch7.adb (Analyze_Package_Specification): Build the
245         declaration of the default initial condition procedure for all
246         types that qualify or inherit the one from the parent type.
247         * sem_ch13.adb (Analyze_Aspect_Specifications):
248         Add processing for aspect Default_Initial_Condition.
249         (Check_Aspect_At_Freeze_Point): Aspect
250         Default_Initial_Condition does not require delayed analysis.
251         (Replace_Type_References_Generic): Moved to spec.
252         * sem_ch13.ads (Replace_Type_References_Generic): Moved from body.
253         * sem_prag.adb Add an entry in table Sif_Glags for
254         Default_Initial_Condition.
255         (Analyze_Pragma): Pragma
256         Default_Initial_Condition is now part of assertion
257         policy. Add processing for pragma Default_Initial_Condition.
258         (Is_Valid_Assertion_Kind): Pragma Default_Initial_Condition is
259         now recognized as a proper assertion policy.
260         * sem_util.ads, sem_util.adb (Build_Default_Init_Cond_Call): New
261         routine.
262         (Build_Default_Init_Cond_Procedure_Body): New routine.
263         (Build_Default_Init_Cond_Procedure_Declaration): New routine.
264         (Inherit_Default_Init_Cond_Procedure): New routine.
265         * snames.ads-tmpl Add new predefined name and pragma id for
266         Default_Initial_Condition.
268 2014-08-04  Vincent Celier  <celier@adacore.com>
270         * prj-dect.adb (Parse_Case_Construction): It is no longer
271         an error if the variable for a case construction is not
272         typed, only if the variable value is not a single string. Call
273         Parse_Choice_List and End_Case_Construction with the new parameter
274         to indicate that the variable is typed.
275         * prj-strt.adb (End_Case_Construction): Only check the labels
276         if the variable is typed.  If the variable is not typed,
277         issue a warning when there is no "when others" allternative.
278         (Parse_Choice_List): Manage the labels only if the variable
279         is typed.
280         * prj-strt.ads (End_Case_Construction): New Boolean parameter
281         String_Type.
282         (Parse_Choice_List): Ditto.
284 2014-08-04  Ed Schonberg  <schonberg@adacore.com>
286         * sem_ch5.adb: Additional fix to Check_Predicate_Use.
288 2014-08-04  Vincent Celier  <celier@adacore.com>
290         * projects.texi: Update documentation of case constructions with
291         variables that are not typed.
293 2014-08-04  Ed Schonberg  <schonberg@adacore.com>
295         * sem_ch8.adb (Build_Class_Wide_Wrapper): If the operator carries
296         an Eliminated pragma, indicate that the wrapper is also to be
297         eliminated, to prevent spurious errors when using gnatelim on
298         programs that include box-initialization of equality operators
299         (consequence of AI05-071)..
301 2014-08-04  Robert Dewar  <dewar@adacore.com>
303         * checks.adb (Activate_Overflow_Check): Handle floating-point
304         case correctly.
305         * checks.ads (Activate_Overflow_Check): Clarify handling of
306         floating-point cases.
307         * exp_util.adb (Check_Float_Op_Overflow): Reset Do_Overflow_Check
308         flag if we generate an explicit overflow check (for
309         Check_Float_Overflow mode).
311 2014-08-04  Robert Dewar  <dewar@adacore.com>
313         * prj-proc.adb, prj-part.adb, prj-strt.adb, prj.adb, prj.ads,
314         prj-attr.adb, prj-attr.ads: Minor reformatting.
316 2014-08-04  Yannick Moy  <moy@adacore.com>
318         * expander.adb (Expand): Always perform special
319         expansion in GNATprove mode, even when doing pre-analysis.
321 2014-08-04  Thomas Quinot  <quinot@adacore.com>
323         * repinfo.adb (List_Scalar_Storage_Order): List bit order if
324         not default. Also list bit order if SSO is specified. Do not
325         assume that bit order is always equal to scalar storage order.
327 2014-08-04  Thomas Quinot  <quinot@adacore.com>
329         * freeze.adb (Set_SSO_From_Default): Do not set scalar storage
330         order to reverse SSO for a type that has an explicit native
331         Bit_Order.
333 2014-08-04  Doug Rupp  <rupp@adacore.com>
335         * cal.c: Macro check for VxWorks7.
336         * init.c (getpid): Likewise.
337         * mkdir.c (__gnat_mkdir): Likewise.
338         * sysdep.c (__gnat_is_file_not_found_error): Likewise.
340 2014-08-04  Gary Dismukes  <dismukes@adacore.com>
342         * exp_ch3.adb (Expand_N_Object_Declaration): Inhibit generation
343         of an invariant check in the case where No_Initialization is set,
344         since the object is uninitialized.
346 2014-08-04  Thomas Quinot  <quinot@adacore.com>
348         * snames.ads-tmpl (Default_Scalar_Storage_Order): Now an attribute
349         name, in addition to a pragma name.
350         * snames.adb-tmpl (Get_Pragma_Id, Is_Configuration_Pragma_Name,
351         Is_Pragma_Name): Adjust accordingly.
352         * sem_attr.ads, sem_attr.adb, exp_attr.adb
353         (Attribute_Default_Scalar_Storage_Order): Add handling of new
354         attribute.
355         * gnat_rm.texi: Document the above.
357 2014-08-04  Arnaud Charlet  <charlet@adacore.com>
359         * exp_util.adb (Check_Float_Op_Overflow): No-op in codepeer
360         mode for now, to revert to previous behavior.
361         * checks.adb: Revert previous change, no longer needed.
363 2014-08-04  Robert Dewar  <dewar@adacore.com>
365         * gnat1drv.adb (Adjust_Global_Switches): Don't set
366         Check_Float_Overflow if Machine_Oveflows_On_Target is True.
367         * sem_prag.adb (Analyze_Pragma, case Check_Float_Overflow): Don't
368         set Check_Float_Overflow if Machine_Oveflows_On_Target is True.
369         * switch-c.adb (Scan_Front_End_Switches): Don't set
370         Check_Float_Overflow if Machine_Oveflows_On_Target is True.
372 2014-08-04  Vincent Celier  <celier@adacore.com>
374         * prj-attr.adb: Add new default indications for
375         attributes Object_Dir, Exec_Dir, Source_Dirs and Target.
376         (Attribute_Default_Of): New function (Initialize): Set the
377         default for those attributes that have one specified.
378         * prj-attr.ads (Attribute_Data): New component Default.
379         * prj-proc.adb (Expression): Take into account the new defaults
380         for attributes Object_Dir, Exec_Dir and Source_Dirs.
381         * prj-strt.adb (Attribute_Reference): Set the default for
382         the attribute.
383         * prj-tree.ads, prj-tree.adb (Default_Of): New function.
384         (Set_Default_Of): New procedure.
385         * prj.adb (The_Dot_String): New global Name_Id variable,
386         initialized in procedure Initialize.
387         (Dot_String): New function
388         (Initialize): Initialize The_Dot_String.
389         (Reset): Create the string list Shared.Dot_String_List.
390         * prj.ads (Attribute_Default_Value): New enumeration type.
391         (Project_Qualifier): Change enumeration value Dry to Abstract_Project.
392         (Dot_String): New function.
393         (Shared_Project_Tree_Data): New string list component Dot_String_List.
394         * projects.texi: Document new defaults for attribute Object_Dir,
395         Exec_Dir and Source_Dirs.
397 2014-08-04  Robert Dewar  <dewar@adacore.com>
399         * sem_ch12.adb: Minor reformatting.
401 2014-08-04  Arnaud Charlet  <charlet@adacore.com>
403         * exp_util.adb, checks.adb (Check_Float_Op_Overflow): Add special
404         expansion in CodePeer_Mode.
405         (Selected_Range_Checks): Add handling of overflow checks in
406         CodePeer_Mode.
408 2014-08-04  Robert Dewar  <dewar@adacore.com>
410         * exp_attr.adb (Expand_N_Attribute_Reference, case Pred):
411         Remove special test for Float'First, no longer required.
412         (Expand_N_Attribute_Reference, case Succ): Remove special test
413         for Float'First, no longer required.
414         * s-fatgen.adb (Pred): return infinity unchanged.
415         (Succ): ditto.
417 2014-08-04  Claire Dross  <dross@adacore.com>
419         * sem_ch12.adb (Analyze_Associations): Defaults should only be
420         used if there is no explicit match.
421         * exp_util.adb (Get_First_Parent_With_Ext_Axioms_For_Entity):
422         Also check for pragma external_axiomatization on generic units.
424 2014-08-04  Robert Dewar  <dewar@adacore.com>
426         * checks.adb (Activate_Overflow_Check): Remove
427         Check_Float_Overflow processing.
428         (Apply_Scalar_Range_Check): Ditto.
429         (Generate_Range_Check): Ditto.
430         * exp_ch4.adb (Expand_N_Op_Add): Add call to
431         Check_Float_Op_Overflow.
432         (Expand_N_Op_Divide): ditto.
433         (Expand_N_Op_Multiply): ditto.
434         (Expand_N_Op_Subtract): ditto.
435         * exp_util.ads, exp_util.adb (Check_Float_Op_Overflow): New procedure.
436         * sem_attr.adb (Analyze_Attribute, case Pred): Make sure
437         Do_Range_Check is set for floating-point case in -gnatc or
438         GNATprove mode.
439         (Analyze_Attribute, case Succ): Make sure
440         Do_Range_Check is set for floating-point case in -gnatc or
441         GNATprove mode.
442         * sem_res.adb (Resolve_Type_Conversion): Make sure Do_Range_Check
443         flag is set for real to integer conversion in GNATprove or
444         -gnatc mode.
446 2014-08-04  Gary Dismukes  <dismukes@adacore.com>
448         * sem_ch13.adb (Analyze_Aspect_Specifications): Resolve
449         the expression of an Import or Export aspect as type Boolean
450         and require it to be static. Add ??? comment. Also, set the
451         Is_Exported flag when appropriate.
453 2014-08-04  Robert Dewar  <dewar@adacore.com>
455         * exp_ch4.adb: Minor reformatting.
456         * exp_attr.adb: Minor reformatting.
458 2014-08-04  Thomas Quinot  <quinot@adacore.com>
460         * s-fatgen.ads, s-fatgen.adb (S, P): New visible type declarations
461         (Unaligned_Valid): Remove now unused subprogram.
462         * exp_attr.adb (Expand_N_Attribute_Reference, case
463         Attribute_Valid): If the prefix is in reverse SSO or potentially
464         unaligned, copy it using a byte copy operation to a temporary
465         variable.
466         * einfo.adb: Minor comment fix.
468 2014-08-04  Hristian Kirtchev  <kirtchev@adacore.com>
470         * freeze.adb (Freeze_Entity): Do not freeze formal subprograms.
472 2014-08-04  Robert Dewar  <dewar@adacore.com>
474         * s-imgrea.adb (Image_Floating_Point): Don't add space before +Inf.
475         * s-fatgen.adb (Pred): Handle Float'First.
476         (Succ): Handle Float'Last.
478 2014-08-04  Ed Schonberg  <schonberg@adacore.com>
480         * sem_util.adb (Is_Potentially_Unevaluated): If the original
481         node of a parent node in the tree is a short-circuit operation,
482         the node is potentially unevaluated.
484 2014-08-04  Robert Dewar  <dewar@adacore.com>
486         * sem_res.adb (Resolve_Type_Conversion): Set Do_Range_Check on
487         conversion from a real type to an integer type.
489 2014-08-04  Yannick Moy  <moy@adacore.com>
491         * sem_aggr.adb, sem_ch3.adb, sem_ch5.adb, sem_ch7.adb, sem_ch9.adb,
492         sem_ch12.adb, sem_util.adb, sem_util.ads, sem_res.adb, sem_attr.adb,
493         exp_ch6.adb, sem_ch4.adb, restrict.adb, restrict.ads, sem_ch6.adb,
494         sem_ch8.adb, sem_ch11.adb: Update some subprogram names to refer to
495         SPARK_05 instead of SPARK.
497 2014-08-04  Robert Dewar  <dewar@adacore.com>
499         * sem.ads: Minor reformatting.
500         * sem_ch13.adb (Analyze_Aspect_External_Or_Link_Name): Minor
501         reformatting.
502         (Analyze_Aspect_Specifications, case Convention): Put External_Name
503         before Link_Name when constructing pragma.
505 2014-08-04  Yannick Moy  <moy@adacore.com>
507         * sem.adb, sem.ads (In_Default_Expr): Global flag that is set
508         to True during analysis of a default component expression.
509         (Semantics): Save and restore In_Default_Expr around analysis.
510         * sem_ch3.adb, sem_ch3.ads (Analyze_Component_Declaration):
511         Call new wrapper Preanalyze_Default_Expression.
512         (Preanalyze_Default_Expression): New wrapper on
513         Preanalyze_Spec_Expression which sets and restores In_Default_Expr.
514         * sem_res.adb (Resolve_Call): Mark calls inside default
515         expressions as not inlined in GNATprove mode.
517 2014-08-04  Robert Dewar  <dewar@adacore.com>
519         * exp_ch4.adb: Minor reformatting.
521 2014-08-04  Olivier Hainque  <hainque@adacore.com>
523         * link.c: remove const on __gnat_objlist_file_supported for AIX
525 2014-08-04  Robert Dewar  <dewar@adacore.com>
527         * sem_util.ads: Minor addition of comment.
529 2014-08-04  Vincent Celier  <celier@adacore.com>
531         * prj-dect.adb (Check_Package_Allowed): Allow package IDE in
532         all projects, including aggregate and aggregate library projects.
534 2014-08-04  Yannick Moy  <moy@adacore.com>
536         * back_end.adb (Call_Back_End): Do not call gigi in GNATprove mode.
538 2014-08-04  Robert Dewar  <dewar@adacore.com>
540         * sem_eval.adb (Test_In_Range): Always in range for
541         Is_Known_Valid target type, where input type has smaller or
542         equal size and does not have biased rep.
544 2014-08-04  Ed Schonberg  <schonberg@adacore.com>
546         * sem_attr.adb (Eval_Attribute): Constrained is not treated as
547         a static attribute, and the Static flag must not be set on it
548         during resolution. It may be constant-folded during expansion,
549         but if expansion is disabled it is not a static expression.
551 2014-08-04  Hristian Kirtchev  <kirtchev@adacore.com>
553         * sem_ch8.adb (Build_Class_Wide_Wrapper): Mark the primitive as
554         referenced once resolution has taken place.
556 2014-08-04  Gary Dismukes  <dismukes@adacore.com>
558         * exp_ch4.adb (Expand_N_Type_Conversion): Don't
559         compare access levels in the case where the target type is the
560         anonymous type of an access discriminant, since the level of
561         such types is defined based on context. Add comment.
563 2014-08-04  Hristian Kirtchev  <kirtchev@adacore.com>
565         * sem_ch8.adb (Build_Class_Wide_Wrapper): Handle various special
566         cases related to equality.  Remove the special processing
567         for dispatching abstract subprograms as it is not needed.
568         (Interpretation_Error): Add a specialized error message for
569         predefined operators.
570         (Is_Intrinsic_Equality): New routine.
571         (Is_Suitable_Candidate): New routine.
573 2014-08-04  Gary Dismukes  <dismukes@adacore.com>
575         * checks.adb: Minor comment reformatting.
577 2014-08-04  Ed Schonberg  <schonberg@adacore.com>
579         * restrict.adb (Check_Restriction): For checked max_parameter
580         restrictions reset Violated flag, so that subsequent violations
581         are properly detected.
583 2014-08-04  Robert Dewar  <dewar@adacore.com>
585         * sem_ch3.adb (Check_Initialization): Fix bad test of GNATprove
586         mode.
587         (Process_Discriminants): Fix bad test of GNATprove mode
589 2014-08-04  Hristian Kirtchev  <kirtchev@adacore.com>
591         * sem_ch12.adb (Instantiate_Formal_Subprogram):
592         Move variable to their own section. Propagate the source
593         location of a formal parameter to the corresponding formal of
594         the subprogram renaming declaration. Code reformatting.
596 2014-08-04  Arnaud Charlet  <charlet@adacore.com>
598         * g-trasym-vms-ia64.adb, g-trasym-vms-alpha.adb: Removed.
600 2014-08-04  Ed Schonberg  <schonberg@adacore.com>
602         * exp_aggr.adb (Expand_Array_Aggregate): Do not attempt expansion
603         if error already detected.  We may reach this point in spite of
604         previous errors when compiling with -gnatq, to force all possible
605         errors (this is the usual ACATS mode).
607 2014-08-04  Gary Dismukes  <dismukes@adacore.com>
609         * checks.adb (Generate_Range_Check): For the case of converting
610         a base type with a larger range to a smaller target subtype, only
611         use unchecked conversions of bounds in the range check followed
612         by conversion in the case where both types are discrete. In other
613         cases, convert to the target base type and save in a temporary
614         followed by the range check.
615         (Convert_And_Check_Range): New procedure factoring code to save
616         conversion to a temporary followed by a range check (called two
617         places in Generate_Range_Check).
618         * exp_ch4.adb (Expand_N_Type_Conversion): Relax previous
619         check-in, to generate range checks for conversions between
620         any floating-point types rather than limiting it to matching
621         base types.
623 2014-08-02  Trevor Saunders  <tsaunders@mozilla.com>
625         * gcc-interface/trans.c: Use hash_set instead of pointer_set.
627 2014-08-01  Ed Schonberg  <schonberg@adacore.com>
629         * restrict.adb (Update_Restrictions): For restrictions with a
630         maximum parameter (e.g. number of protected entries in Ravenscar)
631         do not compute the maximum of the violation over several objects,
632         because the restriction is per-object.
633         (Check_Restriction): After possible message, reset the value
634         of of a checked max_parameter restriction to zero, to prevent
635         cascaded errors.
636         * sem_ch3.adb (Build_Derived_Private_Type): Use base of parent
637         (sub)type to determine whether derived type should be on the
638         list of private dependents of a type whose full view may become
639         visible subsequently.
641 2014-08-01  Olivier Hainque  <hainque@adacore.com>
643         * gcc-interface/Make-lang.in (ADA_TOOLS_FLAGS_TO_PASS, native): use
644         $(CXX) instead of ../../xg++ to feed CXX.
645         (CXX_LFLAGS): Remove. Now unused as the proper flags
646         are expected to be included in the CXX variable.
648 2014-08-01  Pierre-Marie Derodat  <derodat@adacore.com>
650         * gcc-interface/decl.c (elaborate_expression_1): Return the new
651         variable when debug info is needed and the expression is not
652         constant.  Tag as external only new variables that are global.
653         (gnat_to_gnu_entity): Call it after the GNU declaration is saved.
654         * gcc-interface/trans.c (Attribute_to_gnu): Do not cache
655         attributes for IN array parameters when their actual subtype
656         needs debug info.
657         (Compilation_Unit_to_gnu): Call it to process all remaining nodes.
658         * gcc-interface/gigi.h (process_deferred_decl_context): New.
659         * gcc-interface/utils.c (gnat_write_global_declarations): Do not
660         emit debug info for ignored global declarations.
661         (struct deferred_decl_context_node,
662         add_deferred_decl_context, add_deferred_type_context,
663         compute_deferred_decl_context, defer_or_set_type_context,
664         deferred_decl_context_queue, get_debug_scope,
665         get_global_context, process_deferred_decl_context): New.
666         (gnat_pushdecl): Re-implement the DECL_CONTEXT and TYPE_CONTEXT
667         computation machinery to rely on the GNAT Scope attribute.
669 2014-08-01  Eric Botcazou  <ebotcazou@adacore.com>
671         * gcc-interface/utils2.c (build_simple_component_ref): Add guard.
673 2014-08-01  Robert Dewar  <dewar@adacore.com>
675         * sem_ch8.adb, opt.ads Minor comment updates.
677 2014-08-01  Hristian Kirtchev  <kirtchev@adacore.com>
679         * exp_intr.adb (Expand_Unc_Deallocation): Request a renaming
680         from the side effects removal machinery.
681         * exp_util.adb (Duplicate_Subexpr): Add formal parameter
682         Renaming_Req. Update the nested call to Remove_Side_Effects.
683         (Duplicate_Subexpr_No_Checks): Add formal parameter
684         Renaming_Req. Update the nested call to Remove_Side_Effects.
685         (Duplicate_Subexpr_Move_Checks): Add formal parameter
686         Renaming_Req. Update the nested call to Remove_Side_Effects.
687         (Remove_Side_Effects): Add formal parameter Renaming_Req. Generate
688         an object renaming declaration when the caller requests it.
689         * exp_util.ads (Duplicate_Subexpr): Add formal
690         parameter Renaming_Req. Update comment on usage.
691         (Duplicate_Subexpr_No_Checks): Add formal parameter Renaming_Req.
692         (Duplicate_Subexpr_Move_Checks): Add formal parameter
693         Renaming_Req.
695 2014-08-01  Bob Duff  <duff@adacore.com>
697         * gnat_ugn.texi: Minor updates.
699 2014-08-01  Robert Dewar  <dewar@adacore.com>
701         * atree.adb: Minor reformatting.
703 2014-08-01  Ed Schonberg  <schonberg@adacore.com>
705         * exp_aggr.adb (Init_Hidden_Discriminants): If some ancestor is a
706         private extension, get stored constraint, if any, from full view.
708 2014-08-01  Robert Dewar  <dewar@adacore.com>
710         * opt.ads (No_Elab_Code_All_Pragma): New global variable.
711         * sem_ch10.adb (Check_No_Elab_Code_All): New procedure
712         (Analyze_Compilation_Unit): Call Check_No_Elab_Code_All
713         (Analyze_Subunit_Context): Call Check_No_Elab_Code_All.
714         * sem_prag.adb (Analyze_Pragma, case No_Elaboration_Code_All):
715         Remove code for checking with's, now in sem_ch10.adb, set
716         Opt.No_Elab_Code_All_Pragma.
718 2014-08-01  Eric Botcazou  <ebotcazou@adacore.com>
720         * sem_ch3.adb (Copy_And_Build): Copy the declaration for
721         access types as well and adjust the subtype mark if there are
722         no constraints.
724 2014-08-01  Robert Dewar  <dewar@adacore.com>
726         * sem_eval.adb (Test_In_Range): Return Unknown if error posted.
728 2014-08-01  Robert Dewar  <dewar@adacore.com>
730         * sem_ch3.adb, einfo.ads, exp_ch4.adb: Code clean ups.
732 2014-08-01  Eric Botcazou  <ebotcazou@adacore.com>
734         * einfo.ads (Has_Private_Ancestor): Remove obsolete usage.
735         * exp_ch4.adb (Expand_Composite_Equality): Add conversion
736         of the actuals in the case of untagged record types too.
737         * sem_ch3.adb (Build_Full_Derivation): New procedure to create the
738         full derivation of a derived private type, extracted from...
739         (Copy_And_Build): In the case of record types and most
740         enumeration types, copy the original declaration.  Build the
741         full derivation according to the approach extracted from...
742         (Build_Derived_Private_Type): ...here.  Call Build_Full_Derivation
743         to create the full derivation in all existing cases and also
744         create it in the no-discriminants/discriminants case instead of
745         deriving directly from the full view.
746         (Is_Visible_Component): Remove obsolete code.
747         * sem_aggr.adb (Resolve_Record_Aggregate): Likewise.
749 2014-08-01  Arnaud Charlet  <charlet@adacore.com>
751         * fe.h (GNAT_Mode): New.
752         * gcc-interface/decl.c (gnat_to_gnu_entity): Do not error out on
753         reverse SSO in GNAT mode.
755 2014-08-01  Thomas Quinot  <quinot@adacore.com>
757         * freeze.adb: Minor reformatting.
759 2014-08-01  Thomas Quinot  <quinot@adacore.com>
761         * exp_ch3.adb (Default_Initialize_Object): Do not generate
762         default initialization for an imported object.
764 2014-08-01  Olivier Hainque  <hainque@adacore.com>
766         * seh_init.c (__gnat_map_SEH): Cast argument of IsBadCodePtr
767         to the expected FARPROC type instead of void *.
768         * adaint.c (f2t): Expect __time64_t * as second argument, in line with
769         other datastructures.
770         (__gnat_file_time_name_attr): Adjust accordingly.
771         (__gnat_check_OWNER_ACL): Declare pSD as PSECURITY_DESCRIPTOR,
772         in line with uses.
773         (__gnat_check_OWNER_ACL): Declare AccessMode
774         parameter as ACCESS_MODE instead of DWORD, in line with callers
775         and uses.
776         (__gnat_set_executable): Add ATTRIBUTE_UNUSED on mode,
777         unused on win32.  Correct cast of "args" on call to spawnvp.
778         (add_handle): Cast realloc calls into their destination types.
779         (win32_wait): Remove declaration and initialization of unused variable.
780         (__gnat_locate_exec_on_path): Cast alloca calls
781         into their destination types.
782         * initialize.c (append_arg, __gnat_initialize): Cast xmalloc calls into
783         their destination types.
785 2014-08-01  Gary Dismukes  <dismukes@adacore.com>
787         * exp_ch4.adb (Expand_N_Type_Conversion): Expand
788         range checks for conversions between floating-point subtypes
789         when the target and source types are the same.
791 2014-08-01  Robert Dewar  <dewar@adacore.com>
793         * exp_aggr.adb: Minor reformatting.
795 2014-08-01  Eric Botcazou  <ebotcazou@adacore.com>
797         * sem_ch13.adb (Check_Indexing_Functions): Initialize
798         Indexing_Found.
800 2014-08-01  Arnaud Charlet  <charlet@adacore.com>
802         * gnat1drv.adb (Gnat1drv): In gnatprove mode, we now write the
803         ALI file before we call the backend (so that gnat2why can append
804         to it).
806 2014-08-01  Thomas Quinot  <quinot@adacore.com>
808         * exp_pakd.adb (Expand_Bit_Packed_Element_Set,
809         Expand_Packed_Element_Reference): Pass additional Rev_SSO
810         parameter indicating whether the packed array type has reverse
811         scalar storage order to the s-pack* Set/Get routines.
812         * s-pack*.ad* (Get, Set, GetU, SetU): New formal Rev_SSO
813         indicating reverse scalar storage order.
815 2014-08-01  Robert Dewar  <dewar@adacore.com>
817         * sem_ch3.adb (Check_Initialization): Set Do_Range_Check
818         for initial component value in -gnatc or GNATprove mode.
819         (Process_Discriminants): Same fix for default discriminant values.
820         * sem_eval.adb (Test_In_Range): Improve accuracy of results by
821         checking subtypes.
823 2014-08-01  Robert Dewar  <dewar@adacore.com>
825         * sinfo.ads: Minor comment clarification.
827 2014-08-01  Hristian Kirtchev  <kirtchev@adacore.com>
829         * sem_ch13.adb (Analyze_Aspect_Specifications): Code
830         reformatting. Store the generated pragma Import in the related
831         subprogram as routine Wrap_Imported_Subprogram will need it later.
832         * sem_prag.adb (Is_Unconstrained_Or_Tagged_Item): An item of
833         a private type with discriminants is considered to fall in the
834         category of unconstrained or tagged items.
836 2014-08-01  Arnaud charlet  <charlet@adacore.com>
838         * s-os_lib.adb (Open_Append): New functions to open a file for
839         appending. This binds to the already existing (but not used)
840         __gnat_open_append.
841         * osint.ads, osint.adb (Open_File_To_Append_And_Check): New procedure
842         to open a file for appending.
843         * osint-c.ads, osint-c.adb (Open_Output_Library_Info): New procedure
844         to open the ALI file for appending.
846 2014-08-01  Robert Dewar  <dewar@adacore.com>
848         * sem_ch8.adb: Minor reformatting.
850 2014-08-01  Yannick Moy  <moy@adacore.com>
852         * sem_ch13.adb (Insert_Pragma): Add special case for precondition
853         pragmas from aspects, which need to be inserted in proper order.
855 2014-08-01  Ed Schonberg  <schonberg@adacore.com>
857         * exp_aggr.adb (Expand_Record_Aggregate, Init_Hidden_Discriminants):
858         Handle properly a type extension that constrains a discriminated
859         derived type that renames other discriminants of an ancestor.
861 2014-08-01  Thomas Quinot  <quinot@adacore.com>
863         * s-pack06.adb, s-pack10.adb, s-pack03.ads, s-pack12.adb, s-pack14.ads,
864         s-pack25.adb: Fix minor inconsistencies and typos.
866 2014-08-01  Hristian Kirtchev  <kirtchev@adacore.com>
868         * sem_ch8.adb (Analyze_Subprogram_Renaming): Alphabetize
869         globals and move certain variables to the "local
870         variable" section. Call Build_Class_Wide_Wrapper when
871         renaming a default actual subprogram with a class-wide actual.
872         (Build_Class_Wide_Wrapper): New routine.
873         (Check_Class_Wide_Actual): Removed.
874         (Find_Renamed_Entity): Code reformatting.
875         (Has_Class_Wide_Actual): Alphabetize. Change the
876         logic of the predicate as the renamed name may not necessarely
877         denote the correct subprogram.
879 2014-08-01  Eric Botcazou  <ebotcazou@adacore.com>
881         * sem_ch7.adb: Fix minor oversight in condition.
883 2014-08-01  Bob Duff  <duff@adacore.com>
885         * projects.texi: Minor documentation improvements.
887 2014-08-01  Robert Dewar  <dewar@adacore.com>
889         * aspects.ads, aspects.adb: Add aspect No_Elaboration_Code_All.
890         * gnat_rm.texi: Document No_Elaboration_Code_All pragma and aspect.
891         * lib-load.adb: Initialize No_Elab_Code_All field.
892         * lib-writ.adb: Initialize No_Elab_Code_All.
893         * lib.ads, lib.adb: New field No_Elab_Code_All.
894         * par-prag.adb: Add dummy entry for pragma No_Elaboration_Code_All.
895         * restrict.ads, restrict.adb: Restriction No_Elaboration_Code_All no
896         longer exists.
897         * sem_ch10.adb (Analyze_Context): Processing for
898         No_Elaboration_Code_All removed.
899         (Generate_Parent_References): Moved to Sem_Util.
900         * sem_prag.adb: Add processing for pragma No_Elaboration_Code_All.
901         * sem_util.ads, sem_util.adb (Get_Parent_Entity): Moved here from
902         Sem_Ch10.
903         * snames.ads-tmpl: Add entry for pragma No_Elaboration_Code_All.
904         * targparm.adb: Minor comment updates Add comments on ignoring
905         pragma No_Elaboration_Code_All.
907 2014-08-01  Nicolas Roche  <roche@adacore.com>
909         * adaint.c (__gnat_set_close_on_exec): Ensure that
910         we can unset "close_on_exec" flag.
912 2014-08-01  Ed Schonberg  <schonberg@adacore.com>
914         * exp_ch9.adb (Build_Wrapper_Spec, Replicate_Formals): When building
915         the parameter specs of the wrapper program for a primitive operation
916         of a synchronized type that implements an interface, copy the
917         null_exclusion indicator as well.
919 2014-08-01  Robert Dewar  <dewar@adacore.com>
921         * sem_eval.ads: Minor reformatting.
923 2014-08-01  Eric Botcazou  <ebotcazou@adacore.com>
925         * exp_ch3.adb (Build_Initialization_Call): Call Underlying_Type
926         to go down the chain of private derivations.
927         * freeze.adb (Freeze_Entity): Fix typo in comment.
929 2014-08-01  Ed Schonberg  <schonberg@adacore.com>
931         * sem_ch3.adb (Access_Type_Declaration): If designated type is
932         a limited view, create a master entity (as is already done for
933         class-wide types) in case the full view designates a type that
934         contains tasks.
935         * sem_ch8.adb (Find_Selected_Component): If prefix is a dereference
936         and the designated type is a limited view, use the non-limited
937         view if available.
939 2014-08-01  Eric Botcazou  <ebotcazou@adacore.com>
941         * gcc-interface/ada-tree.h (DECL_BY_DESCRIPTOR_P): Delete.
942         (DECL_FUNCTION_STUB): Likewise.
943         (SET_DECL_FUNCTION_STUB): Likewise.
944         (DECL_PARM_ALT_TYPE): Likewise.
945         (SET_DECL_PARM_ALT_TYPE): Likewise.
946         (TYPE_VAX_FLOATING_POINT_P): Delete.
947         (TYPE_DIGITS_VALUE): Likewise.
948         (SET_TYPE_DIGITS_VALUE): Likewise.
949         * gcc-interface/gigi.h (standard_datatypes): Remove ADT_malloc32_decl.
950         (malloc32_decl): Delete.
951         (build_vms_descriptor): Likewise.
952         (build_vms_descriptor32): Likewise.
953         (fill_vms_descriptor): Likewise.
954         (convert_vms_descriptor): Likewise.
955         (TARGET_ABI_OPEN_VMS): Likewise.
956         (TARGET_MALLOC64): Likewise.
957         * gcc-interface/decl.c (add_parallel_type_for_packed_array): New.
958         (gnat_to_gnu_entity): Call it to add the original type as a parallel
959         type to the implementation type of a packed array type.
960         <E_Procedure>: Remove now obsolete kludge.
961         <E_Exception>: Delete obsolete comment.
962         <object>: Small tweak.
963         <E_Subprogram_Type>: Remove support for stub subprograms, as well as
964         for the descriptor passing mechanism.
965         (gnat_to_gnu_param): Likewise.
966         * gcc-interface/misc.c (gnat_init_gcc_fp): Remove special case.
967         (gnat_print_type): Adjust.
968         * gcc-interface/trans.c (gigi): Remove obsolete initializations.
969         (vms_builtin_establish_handler_decl): Delete.
970         (gnat_vms_condition_handler_decl): Likewise.
971         (establish_gnat_vms_condition_handler): Likewise.
972         (build_function_stub): Likewise.
973         (Subprogram_Body_to_gnu): Do not call above functions.
974         (Call_to_gnu): Remove support for the descriptor passing mechanism.
975         * gcc-interface/utils.c (make_descriptor_field): Delete.
976         (build_vms_descriptor32): Likewise.
977         (build_vms_descriptor): Likewise.
978         (fill_vms_descriptor): Likewise.
979         (convert_vms_descriptor64): Likewise.
980         (convert_vms_descriptor32): Likewise.
981         (convert_vms_descriptor): Likewise.
982         * gcc-interface/utils.c (unchecked_convert): Likewise.
983         * gcc-interface/utils2.c (maybe_wrap_malloc): Remove obsolete stuff.
985 2014-08-01  Eric Botcazou  <ebotcazou@adacore.com>
987         * gcc-interface/trans.c (gigi): Use gnat_to_gnu_type for the exception
988         type and get_unpadded_type for the longest FP type.
989         (Attribute_to_gnu) <Machine>: Compare the precision of the types.
990         (convert_with_check): Adjust formatting and remove FIXME.
992 2014-08-01  Eric Botcazou  <ebotcazou@adacore.com>
994         * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Signed_Integer_Subtype>:
995         Do not convert the RM bounds to the base type.
996         (E_Floating_Point_Subtype): Likewise.
997         (E_Array_Subtype): Convert the bounds to the base type.
998         * gcc-interface/trans.c (get_type_length): New function.
999         (Attribute_to_gnu) <Range_Length>: Call it.
1000         <Length>: Likewise.
1001         (Loop_Statement_to_gnu): Convert the bounds to the base type.
1002         (gnat_to_gnu) <N_In>: Likewise.
1003         * gcc-interface/utils.c (make_type_from_size): Do not convert the RM
1004         bounds to the base type.
1005         (create_range_type): Likewise.
1006         (convert): Convert the bounds to the base type for biased types.
1007         * gcc-interface/utils2.c (compare_arrays): Convert the bounds to the
1008         base type.
1010 2014-08-01  Eric Botcazou  <ebotcazou@adacore.com>
1012         * gcc-interface/trans.c (gnat_to_gnu) <N_Selected_Component>: Remove
1013         incorrect implicit type derivation.
1014         * gcc-interface/utils.c (max_size) <tcc_reference>: Convert the bounds
1015         to the base type.
1017 2014-08-01  Hristian Kirtchev  <kirtchev@adacore.com>
1019         * sem_attr.adb (Analyze_Attribute): Preanalyze and resolve the
1020         prefix of attribute Loop_Entry.
1021         * sem_prag.adb (Analyze_Pragma): Verify the placement of pragma
1022         Loop_Variant with respect to an enclosing loop (if any).
1023         (Contains_Loop_Entry): Update the parameter profile and all
1024         calls to this routine.
1025         * sem_res.adb (Resolve_Call): Code reformatting. Do not ask
1026         for the corresponding body before determining the nature of the
1027         ultimate alias's declarative node.
1029 2014-08-01  Robert Dewar  <dewar@adacore.com>
1031         * gnat1drv.adb, sem_ch4.adb: Minor reformatting.
1033 2014-08-01  Robert Dewar  <dewar@adacore.com>
1035         * sem_eval.adb (Rewrite_In_Raise_CE): Don't try to reuse inner
1036         constraint error node since it is a list member.
1038 2014-08-01  Robert Dewar  <dewar@adacore.com>
1040         * sem_warn.adb: Minor reformatting.
1042 2014-08-01  Eric Botcazou  <ebotcazou@adacore.com>
1044         * einfo.adb (Underlying_Type): Return the underlying full view
1045         of a private type if present.
1046         * freeze.adb (Freeze_Entity):
1047         Build a single freeze node for partial, full and underlying full
1048         views, if any.
1049         * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Private_Type>: Add a
1050         missing guard before the access to the Underlying_Full_View.
1051         * gcc-interface/trans.c (process_freeze_entity): Deal with underlying
1052         full view if present.
1053         * gcc-interface/utils.c (make_dummy_type): Avoid superfluous work.
1055 2014-08-01  Ed Schonberg  <schonberg@adacore.com>
1057         * sem_res.adb (Resolve_Entry_Call): When an entry has
1058         preconditions, the entry call is wrapped in a procedure call
1059         that incorporates the precondition checks. To prevent a double
1060         expansion, with possible duplication of extra formals, that
1061         procedure call must only be pre-analyzed and resolved. Expansion
1062         takes place upon return to the caller Resolve_Call.
1064 2014-08-01  Hristian Kirtchev  <kirtchev@adacore.com>
1066         * sem_res.adb (Resolve_Call): Do not perform
1067         GNATprove-specific inlining while within a generic.
1069 2014-08-01  Ed Schonberg  <schonberg@adacore.com>
1071         * sem_ch4.adb (Analyze_Case_Expression): Handle properly a
1072         case expression with incompatible alternatives, when the first
1073         alternative is overloaded.
1075 2014-08-01  Ed Schonberg  <schonberg@adacore.com>
1077         * sem_res.adb (Check_Parameterless_Call): Use Relocate_Node
1078         to create the name of the parameterless call, rather than
1079         New_Copy, to preserve the tree structure when the name is a
1080         complex expression, e.g. a selected component that denotes a
1081         protected operation, whose prefix is itself a selected component.
1083 2014-08-01  Ed Schonberg  <schonberg@adacore.com>
1085         * sem_ch6.adb (Analyze_Subprogram_Body_Helper): Use
1086         Unit_Declaration_Node to retrieve body when inlining, to handle
1087         properly subprogram child units.
1089 2014-08-01  Robert Dewar  <dewar@adacore.com>
1091         * sem_attr.adb: Minor reformatting.
1093 2014-08-01  Vincent Celier  <celier@adacore.com>
1095         * debug.adb: Minor documentation addition for -dn switch.
1097 2014-08-01  Robert Dewar  <dewar@adacore.com>
1099         * sem_aggr.adb, exp_ch9.adb, sem_prag.adb, sem_util.adb,
1100         sem_attr.adb, sem_eval.ads, sem_cat.adb, sem_ch13.adb: Improve
1101         documentation of Is_Static_Expression vs Is_OK_Static_Expression.
1102         In several places, use the Is_OK version as suggested by the spec.
1104 2014-08-01  Vincent Celier  <celier@adacore.com>
1106         * gnatcmd.adb: Revert last change which was not correct.
1108 2014-08-01  Hristian Kirtchev  <kirtchev@adacore.com>
1110         * freeze.adb (Find_Constant): Ensure that the constant being
1111         inspected is still an object declaration (i.e. not a renaming).
1113 2014-08-01  Ed Schonberg  <schonberg@adacore.com>
1115         * sem_ch5.adb (Analyze_Loop_Parameter_Specification): a)
1116         An attribute_reference to Loop_Entry denotes an iterator
1117         specification: its prefix is an object, as is the case for 'Old.
1118         b) If the domain of iteration is an expression whose type has
1119         the Iterable aspect defined, this is an iterator specification.
1121 2014-08-01  Robert Dewar  <dewar@adacore.com>
1123         * gnatcmd.adb: Minor reformatting.
1125 2014-08-01  Robert Dewar  <dewar@adacore.com>
1127         * atree.ads (Info_Messages): New counter.
1128         * err_vars.ads: Minor comment update.
1129         * errout.adb (Delete_Warning_And_Continuations): Deal
1130         with new Info_Messages counter.
1131         (Error_Msg_Internal): ditto.
1132         (Delete_Warning): ditto.
1133         (Initialize): ditto.
1134         (Write_Error_Summary): ditto.
1135         (Output_Messages): ditto.
1136         (To_Be_Removed): ditto.
1137         * erroutc.adb (Delete_Msg): Deal with Info_Messages counter.
1138         (Compilation_Errors): ditto.
1139         * errutil.adb (Error_Msg): Deal with Info_Messages counter.
1140         (Finalize): ditto.
1141         (Initialize): ditto.
1142         * sem_prag.adb (Analyze_Pragma): Minor comment addition.
1143         * gnat_ugn.texi: Document that -gnatwe does not affect info
1144         messages.
1146 2014-08-01  Robert Dewar  <dewar@adacore.com>
1148         * debug.adb: Document debug switch -gnatd.Z.
1149         * sem.adb (Semantics): Force expansion on in no or configurable
1150         run time mode.
1152 2014-08-01  Ed Schonberg  <schonberg@adacore.com>
1154         * sem_ch5.adb (Analyze_Loop_Parameter_Specification): An
1155         unchecked conversion denotes an iterator specification. Such a
1156         conversion will be inserted in the context of an inlined call
1157         when needed, and its argument is always an object.
1159 2014-08-01  Robert Dewar  <dewar@adacore.com>
1161         * make.adb, makeutl.ads: Minor reformatting.
1162         * debug.adb, opt.ads: Clarify documentation of Front_End_Inlining and
1163         Back_End_Inlining.
1165 2014-08-01  Tristan Gingold  <gingold@adacore.com>
1167         * gnatcmd.adb (GNATCmd): Set AAMP_On_Target using command name.
1169 2014-08-01  Javier Miranda  <miranda@adacore.com>
1171         * gnat1drv.adb (Adjust_Global_Switches): Reverse meaning of
1172         -gnatd.z.
1173         * debug.adb: Updating documentation.
1174         * exp_ch6.adb (Expand_Call): Remove assertion.
1176 2014-08-01  Robert Dewar  <dewar@adacore.com>
1178         * sem_aggr.adb, sem_ch3.adb, sem_ch5.adb, sem_util.adb,
1179         sem_res.adb: Minor reformatting.
1181 2014-08-01  Vincent Celier  <celier@adacore.com>
1183         * make.adb (Initialize): Set Keep_Temporary_Files to True when
1184         -dn is specified.
1185         * makeusg.adb: Add line for new switch --keep-temp-files.
1186         * makeutl.ads (Keep_Temp_Files_Option): New constant String.
1187         * opt.ads (Keep_Temporary_Files): Document that it is also used
1188         by gnatmake and gprbuild.
1189         * switch-m.adb: Recognize new switch --keep-temp-files.
1191 2014-08-01  Tristan Gingold  <gingold@adacore.com>
1193         * sem_ch9.adb (Analyze_Task_Type_Declaration): Move code from ...
1194         * exp_ch9.adb (Make_Task_Create_Call): ... here.
1196 2014-08-01  Vincent Celier  <celier@adacore.com>
1198         * gnat1drv.adb: Do not try to get the target parameters when
1199         invoked with -gnats.
1201 2014-08-01  Hristian Kirtchev  <kirtchev@adacore.com>
1203         * exp_ch7.adb (Find_Last_Init): Nothing to do for an object
1204         declaration subject to No_Initialization.
1206 2014-08-01  Ed Schonberg  <schonberg@adacore.com>
1208         * sem_aggr.adb (Resolve_Array_Aggregate): Reject choice that
1209         is a subtype with dynamic predicates, or a non-static subtype
1210         with predicates.
1211         * sem_ch3.adb (Analyze_Number_Declaration): Reject qualified
1212         expression if subtype has a dynamic predicate.
1213         (Constrain_Index): Reject subtype indication if subtype mark
1214         has predicates.
1215         (Inerit_Predicate_Flags): Inherit Has_Predicates as well.
1216         (Make_Index): If index is a subtype indication, itype inhereits
1217         predicate flags for subsequent testing.
1218         * sem_ch5.adb (Analyze_Loop_Parameter_Specification): New
1219         procedure Check_Predicate_Use, to reject illegal uses of domains
1220         of iteration that have dynamic predicates.
1221         * sem_res.adb (Resolve_Slice): Reject slices given by a subtype
1222         indication to which a predicate applies.
1223         * sem_util.adb (Bad_Predicated_Subtype_Use): Add guard to
1224         prevent cascaded errors when subtype is invalid.
1226 2014-08-01  Robert Dewar  <dewar@adacore.com>
1228         * sem_ch10.adb: Minor reformatting.
1230 2014-08-01  Ed Schonberg  <schonberg@adacore.com>
1232         * sem_ch6.adb (Same_Generic_Actual): Make function symmetric,
1233         because either type may be a subtype of the other.
1235 2014-08-01  Vincent Celier  <celier@adacore.com>
1237         * makeusg.adb: Add documentation for debug switch -dn.
1239 2014-08-01  Ed Schonberg  <schonberg@adacore.com>
1241         * sem_dim.adb (Process_Minus, Process_Divide): Label dimension
1242         expression with standard operator and type, for pretty-printing
1243         use, when in ASIS_Mode. When generating code dimensional analysis
1244         is not involved and dimension expressions are handled statically,
1245         and other operators are resolved in the usual way.
1247 2014-08-01  Ed Schonberg  <schonberg@adacore.com>
1249         * sem_ch3.adb (Build_Derived_Record_Type): Remove setting of
1250         Parent_Subtype in ASIS mode, leads to several failures.
1251         * sem_ch4.adb (Analyze_Selected_Component): In an instance,
1252         if the prefix is a type extension, check whether component is
1253         declared in the parent type, possibly in a parent unit. Needed
1254         in ASIS mode when Parent_Subtype is not set.
1256 2014-08-01  Robert Dewar  <dewar@adacore.com>
1258         * sem_prag.adb: Minor reformatting.
1259         * s-regpat.adb: Minor reformatting.
1260         * sem_ch3.adb (Analyze_Object_Declaration): Do not set
1261         Treat_As_Volatile on constants.
1263 2014-08-01  Tristan Gingold  <gingold@adacore.com>
1265         * exp_ch9.adb (Make_Task_Create_Call): Improve error message.
1267 2014-08-01  Ed Schonberg  <schonberg@adacore.com>
1269         * sem_ch10.adb (Analyze_Compilation_Unit): Do not place a
1270         warning on a with_clause created for the renaming of a parent
1271         unit in an explicit with_clause.
1273 2014-08-01  Ed Schonberg  <schonberg@adacore.com>
1275         * sem_ch13.adb (Analyze_Aspect_Specifications, case Aspect_Import):
1276         Set Is_Imported flag at once, to simplify subsequent legality
1277         checks. Reject the aspect on an object whose declaration has an
1278         explicit initial value.
1279         * sem_prag.adb (Process_Import_Or_Interface): Use original node
1280         to check legality of an initial value for an imported entity.
1281         Set Is_Imported flag in case of error to prevent cascaded errors.
1282         Do not set the Is_Imported flag if the pragma comes from an
1283         aspect, because it is already done when analyzing the aspect.
1285 2014-08-01  Emmanuel Briot  <briot@adacore.com>
1287         * g-regpat.adb (Parse): Add support for non-capturing parenthesis.
1289 2014-08-01  Robert Dewar  <dewar@adacore.com>
1291         * sem_ch7.adb, einfo.adb, einfo.ads, sem_ch13.adb: Minor change of
1292         identifier name.
1294 2014-08-01  Hristian Kirtchev  <kirtchev@adacore.com>
1296         * sem_ch3.adb (Analyze_Object_Contract): Enable the volatility
1297         checks when the related variable comes from source.
1298         * sem_res.adb (Resolve_Actuals): Enable the volatility checks
1299         when the related actual parameter comes from source. Update comment.
1300         * freeze.adb (Freeze_Record_Type): Do not freeze the designated
1301         type of an array of pointers when the designated type is
1302         class-wide and its root type is the record being currently frozen.
1304 2014-08-01  Ed Schonberg  <schonberg@adacore.com>
1306         * sem_ch5.adb (Analyze_Iterator_Specification): Preserve Ekind
1307         of renaming declaration created for domain of iteration.
1308         * sem_aggr.adb (Resolve_Array_Aggregate): Better placement
1309         for error messages on aggregates whose index subtypes have
1310         predicates. The new placement avoids posting messages on previous
1311         subtype declarations rather than on the aggregate itself.
1312         * sem_disp.adb (Is_Inherited_Public_Operation): New predicate for
1313         Add_Dispatching_Operation, to handle properly the overriding of
1314         the predefined operations on controlled types, when the partial
1315         view of a type is not visibly controlled.
1317 2014-08-01  Ben Brosgol  <brosgol@adacore.com>
1319         * gnat_ugn.texi: Add tutorial on portable fixed-point types as an
1320         appendix.
1322 2014-08-01  Hristian Kirtchev  <kirtchev@adacore.com>
1324         * einfo.adb (Is_Hidden_Non_Overridden_Subprogram): Remove the
1325         assertion check as the attribute is defined for all entities.
1326         (Set_Is_Hidden_Non_Overridden_Subprogram): Remove the assertion
1327         check as the attribute is defined for all entities.
1328         * einfo.ads Update the documentation of attribute
1329         Is_Hidden_Non_Overridden_Subprogram.
1330         * sem_ch7.adb (Install_Package_Entity): No need to check the
1331         entity kind of the Id.
1332         * sem_ch13.adb (Hide_Matching_Homograph): Update the comment on
1333         usage. Ensure that the homographs are of the same entity kind
1334         and not fully conformant.
1335         (Hide_Non_Overridden_Subprograms): Update the comment on usage.
1337 2014-08-01  Robert Dewar  <dewar@adacore.com>
1339         * inline.adb: Minor code reorganization.
1340         * sem_ch12.adb, s-tasdeb.ads: Minor reformatting.
1342 2014-08-01  Robert Dewar  <dewar@adacore.com>
1344         * inline.adb, s-os_lib.ads: Minor reformatting.
1346 2014-08-01  Arnaud Charlet  <charlet@adacore.com>
1348         * s-tasdeb.ads, s-tasdeb.adb (Master_Hook, Master_Completed_Hook): New.
1349         * s-tassta.adb (Task_Wrapper, Vulnerable_Complete_Master): Call new
1350         hooks.
1352 2014-08-01  Yannick Moy  <moy@adacore.com>
1354         * inline.adb (Cannot_Inline): Issue info message instead of
1355         warning for subprograms not inlined in GNATprove mode.
1356         * sem_res.adb (Resolve_Call): Take body into account for deciding
1357         whether subprogram can be inlined in GNATprove mode or not.
1359 2014-08-01  Claire Dross  <dross@adacore.com>
1361         * exp_util.ads (Get_First_Parent_With_Ext_Axioms_For_Entity): Renaming
1362         of Get_First_Parent_With_External_Axiomatization_For_Entity for
1363         shorter.
1364         * sem_ch12.adb (Analyze_Associations): Only call Build_Wrapper
1365         for parameters of packages with external axiomatization.
1367 2014-08-01  Robert Dewar  <dewar@adacore.com>
1369         * sem_res.adb: Minor comment addition.
1371 2014-08-01  Arnaud Charlet  <charlet@adacore.com>
1373         * s-crtl.ads, i-cstrea.ads, adaint.c, adaint.h, osint.adb,
1374         s-fileio.adb (__gnat_fopen, __gnat_freopen): Remove vms_form parameter,
1375         no longer used.
1376         * s-os_lib.ads: Minor reformatting.
1378 2014-08-01  Arnaud Charlet  <charlet@adacore.com>
1380         * exp_attr.adb (Is_Inline_Floating_Point_Attribute): Restore more
1381         completely previous code since only GCC back-ends are prepared
1382         to handle e.g. 'Machine attribute.
1383         * targparm.adb, targparm.ads: Remove remaining refs and
1384         handling of OpenVMS_On_Target, VAX_Float_On_Target and
1385         RTX_RTSS_Kernel_Module_On_Target.
1386         * hostparm.ads (OpenVMS, Max_Debug_Name_Length): Removed,
1387         no longer used.
1389 2014-08-01  Robert Dewar  <dewar@adacore.com>
1391         * exp_dist.adb, exp_attr.adb: Minor reformatting.
1392         * sem_ch3.adb, mlib-tgt-specific-hpux.adb, a-direct.ads,
1393         a-synbar-posix.adb, exp_ch9.adb, sem_ch10.adb, sem_prag.adb,
1394         sem_ch12.adb, sem.ads, sem_res.adb, s-exctra.adb, s-soflin.ads,
1395         g-alveop.ads, sem_ch8.adb, vxaddr2line.adb, sem_cat.ads: Remove
1396         improper use of shall.
1398 2014-08-01  Robert Dewar  <dewar@adacore.com>
1400         * sem_aggr.adb, exp_atag.adb, layout.adb, nlists.adb, nlists.ads,
1401         exp_attr.adb, exp_ch9.adb, par-ch12.adb, exp_aggr.adb,
1402         exp_ch3.adb: Minor reformatting & code reorganization.
1404 2014-08-01  Robert Dewar  <dewar@adacore.com>
1406         * gnat_rm.texi: Remove VMS specific rules for pragma Ident.
1407         * Makefile.rtl, adaint.c, gnat_rm.texi, s-asthan.adb, s-asthan.ads,
1408         s-filofl.ads, s-fishfl.ads, s-fvadfl.ads, s-fvaffl.ads, s-fvagfl.ads,
1409         s-po32gl.adb, s-po32gl.ads, s-vaflop.adb, s-vaflop.ads, s-vmexta.adb,
1410         s-vmexta.ads, sem_vfpt.adb, sem_vfpt.ads, socket.c: Remove VMS specific
1411         code.
1412         * gcc-interface/decl.c, gcc-interface/Makefile.in,
1413         gcc-interface/Make-lang.in: Ditto. Also remove refs to rTX.
1415 2014-08-01  Pascal Obry  <obry@adacore.com>
1417         * s-os_lib.ads: Rename File_Size to Large_File_Size.
1419 2014-08-01  Robert Dewar  <dewar@adacore.com>
1421         * a-numaux-vxworks.ads, a-numaux-x86.adb, a-numaux-x86.ads,
1422         a-numaux-darwin.adb, a-numaux-darwin.ads, a-numaux.ads,
1423         a-numaux-libc-x86.ads: Fix bad package header comments.
1424         * elists.ads, elists.adb (Append_New_Elmt): New procedure.
1425         * gnat_rm.texi, a-calend.adb, gnatcmd.adb, einfo.adb, einfo.ads,
1426         checks.adb, sem_prag.adb, sem_prag.ads, rtsfind.ads, freeze.adb,
1427         sem_util.adb, sem_attr.adb, exp_dbug.adb, exp_dbug.ads, gnat1drv.adb,
1428         targparm.adb, targparm.ads, exp_ch6.adb, switch-b.adb, s-shasto.ads,
1429         stand.ads, s-auxdec.ads, opt.adb, opt.ads, mlib-tgt.ads, s-fatgen.adb,
1430         s-fatgen.ads, system.ads, snames.ads-tmpl, s-stalib.ads,
1431         s-os_lib.adb: Remove VMS-specific code.
1433 2014-08-01  Arnaud Charlet  <charlet@adacore.com>
1435         * exp_attr.adb (Is_Inline_Floating_Point_Attribute): Revert to
1436         previous state in CodePeer_Mode.
1438 2014-08-01  Robert Dewar  <dewar@adacore.com>
1440         * hostparm.ads: Put back definition of OpenVMS as False to aid
1441         the transition process.
1442         * sem_ch7.adb: Minor reformatting.
1443         * prj-env.adb: Minor code fix.
1444         * gnat_rm.texi: Complete previous change.
1445         * sem_ch3.adb: Minor reformatting.
1446         * sem_ch6.adb: Minor reformatting.
1447         * sem_elab.adb: Minor reformatting.
1448         * exp_strm.adb: Complete previous change.
1450 2014-08-01  Vincent Celier  <celier@adacore.com>
1452         * sem_warn.adb (Warn_On_Unreferenced_Entity): Do not issue a
1453         warning when a constant is unreferenced and its type has pragma
1454         Unreferenced_Objects.
1456 2014-08-01  Hristian Kirtchev  <kirtchev@adacore.com>
1458         * einfo.adb: Flag2 is now known as
1459         Is_Hidden_Non_Overridden_Subprogram.
1460         (Is_Hidden_Non_Overridden_Subprogram): New routine.
1461         (Set_Is_Hidden_Non_Overridden_Subprogram): New routine.
1462         (Write_Entity_Fields): Output Flag2.
1463         * einfo.ads: New attribute Is_Hidden_Non_Overridden_Subprogram
1464         along with occurrences in entities.
1465         (Is_Hidden_Non_Overridden_Subprogram): New routine and pragma Inline.
1466         (Set_Is_Hidden_Non_Overridden_Subprogram): New routine
1467         and pragma Inline.
1468         * sem_ch7.adb (Install_Package_Entity): Do not enter implicitly
1469         declared non-overriden homographs into visibility.
1470         * sem_ch13.adb (Freeze_Entity_Checks): Hide all
1471         implicitly declared non-overriden homographs.
1472         (Hide_Non_Overridden_Subprograms): New routine.
1474 2014-08-01  Robert Dewar  <dewar@adacore.com>
1476         * snames.ads-tmpl, s-os_lib.adb, s-os_lib.ads, s-fileio.adb: Remove
1477         VMS-specific code.
1478         * prj-conf.adb: Minor reformatting.
1479         * xr_tabls.adb (Read_File): Restore code which was enabled on
1480         non VMS platforms before.
1481         * prj-env.adb (Initialize_Default_Project_Path): Ditto.
1482         * sem_ch5.adb: Minor reformatting.
1483         * lib-writ.adb, lib-writ.ads, bindgen.adb, sem_vfpt.adb,
1484         sem_vfpt.ads, ali.adb, ali.ads, opt.ads, bcheck.adb, exp_strm.adb:
1485         Remove VMS-specific code.
1487 2014-08-01  Vincent Celier  <celier@adacore.com>
1489         * make.adb (Await_Compile): Remove loop that was only needed
1490         for VMS.
1492 2014-08-01  Robert Dewar  <dewar@adacore.com>
1494         * a-calcon.ads, a-direct.adb, a-dirval-mingw.adb, a-dirval.adb,
1495         a-dirval.ads, a-except-2005.adb, a-excpol-abort.adb,
1496         a-numaux-darwin.ads, a-numaux.ads, bindgen.adb, bindusg.adb,
1497         einfo.adb, einfo.ads, err_vars.ads, errout.ads, errutil.adb,
1498         exp_ch3.adb, exp_ch4.adb, exp_ch7.adb, exp_ch7.ads, fname-uf.adb,
1499         fname.adb, fname.ads, freeze.adb, g-debpoo.adb, g-dirope.ads,
1500         g-excact.ads, g-expect.ads, g-socket.adb, g-socket.ads, g-sothco.ads,
1501         g-traceb.ads, gnat_rm.texi, gnatlink.adb, gnatls.adb, i-cstrea.adb,
1502         krunch.adb, krunch.ads, layout.adb, lib-util.adb, make.adb,
1503         mlib.adb, osint-b.adb, osint-b.ads, osint-c.adb, osint.adb,
1504         osint.ads, output.ads, par.adb, prj-conf.adb, prj-env.adb,
1505         prj-makr.adb, prj-nmsc.adb, prj.adb, prj.ads, repinfo.adb, rtsfind.adb,
1506         rtsfind.ads, s-excmac-gcc.ads, s-fatgen.adb, s-mastop.ads,
1507         s-parame-ae653.ads, s-parame-hpux.ads, s-parame-vxworks.ads,
1508         s-parame.ads, s-soflin.ads, s-stoele.adb, s-tasini.adb,
1509         s-taspri-dummy.ads, s-taspri-hpux-dce.ads, s-taspri-mingw.ads,
1510         s-taspri-posix-noaltstack.ads, s-taspri-posix.ads,
1511         s-taspri-solaris.ads, s-taspri-vxworks.ads, s-trasym.ads,
1512         sem_ch12.adb, sem_ch4.adb, sem_eval.adb, sem_intr.adb, sem_mech.adb,
1513         sem_mech.ads, sem_prag.adb, sem_res.adb, sem_util.adb, sem_util.ads,
1514         sinfo.adb, sinfo.ads, sinput-c.adb, symbols.ads, targparm.adb,
1515         treepr.adb, types.ads, xr_tabls.adb, xr_tabls.ads: Remove VMS
1516         specific code and comments.
1518 2014-08-01  Ed Schonberg  <schonberg@adacore.com>
1520         * sem_ch5.adb (Analyze_Iterator_Specification): New procedure
1521         Check_Reverse_Iteration, to verify the legality of the Reverse
1522         indicator on various container types, and to detect illegal
1523         reverse iterations on containers that only supoort forward
1524         iteration.
1526 2014-08-01  Vincent Celier  <celier@adacore.com>
1528         * gnatcmd.adb: Remove the VMS specific stuff.  Integrate in
1529         procedure GNATCmd the relevant declarations from packages VMS_Cmds
1530         and VMS_Conv.
1531         * gnatcmd.ads: Update comments to remove any trace of VMS
1533 2014-08-01  Ed Schonberg  <schonberg@adacore.com>
1535         * sem_ch12.adb: sem_ch12.adb (Build_Wrapper): Capture entity for
1536         defaulted actual that is an operator, before building wrapper
1537         for it in GNATprove mode. Restrict construction of wrapper to
1538         actuals that are operators.
1540 2014-08-01  Vincent Celier  <celier@adacore.com>
1542         * vms_conv.adb, vms_conv.ads, vms_data.ads, vms_cmds.ads: Remove VMS
1543         specific packages no longer needed.
1545 2014-08-01  Pascal Obry  <obry@adacore.com>
1547         * s-os_lib.ads (System.CRTL): Move with clause to body.
1548         (File_Size): New type.
1549         (File_Length64): Use it.
1550         (File_Length): Restore previous spec returning a Long_Integer.
1551         * s-os_lib.adb (System.CRTL): Move with clause here.
1553 2014-08-01  Vincent Celier  <celier@adacore.com>
1555         * mlib-prj.adb: Update comments to remove any mention of VMS.
1557 2014-08-01  Arnaud Charlet  <charlet@adacore.com>
1559         * ug_words, xgnatugn.adb, gcc-interface/Make-lang.in: Remove
1560         xgnatugn.adb and ug_words.
1562 2014-08-01  Eric Botcazou  <ebotcazou@adacore.com>
1564         * exp_attr.adb (Expand_N_Attribute_Reference): Check whether
1565         expansion can be avoid for Machine, Model and Rounding.
1566         (Is_Inline_Floating_Point_Attribute): Return true for Machine
1567         & Model, as well as Rounding if wrapped in a conversion to an
1568         integer type.
1569         * sem_res.adb (Simplify_Type_Conversion): Deal with Rounding as well.
1570         * gcc-interface/gigi.h (fp_arith_may_widen): Declare.
1571         * gcc-interface/utils.c (fp_arith_may_widen): New global variable.
1572         * gcc-interface/misc.c (enumerate_modes): Compute it.
1573         * gcc-interface/trans.c (FP_ARITH_MAY_WIDEN): Delete.
1574         (lvalue_required_for_attribute_p): Deal with Descriptor_Size,
1575         Machine and Model.
1576         (Attribute_to_gnu) <Attr_Model>: New case.
1577         <Attr_Machine>): Likewise.
1578         (convert_with_check): Test
1579         fp_arith_may_widen variable.
1581 2014-08-01  Pascal Obry  <obry@adacore.com>
1583         * adaint.h (GNAT_FOPEN): New definition for Windows.
1584         (GNAT_OPEN): Likewise.
1585         (GNAT_STAT): Likewise.
1586         (GNAT_FSTAT): Likewise.
1587         (GNAT_LSTAT): Likewise.
1588         (GNAT_STRUCT_STAT): Likewise.
1589         * adaint.c (__gnat_stat): Fix computation of file size for
1590         Windows.
1592 2014-08-01  Vincent Celier  <celier@adacore.com>
1594         * Makefile.rtl: Minor comment update.
1596 2014-08-01  Vincent Celier  <celier@adacore.com>
1598         * Make-generated.in: Remove dependencies for vms-help.
1600 2014-08-01  Gary Dismukes  <dismukes@adacore.com>
1602         * makeutl.ads, opt.ads: Minor grammar fixes.
1603         * makeutl.adb: Minor code reorganization.
1605 2014-08-01  Arnaud Charlet  <charlet@adacore.com>
1607         * gcc-interface/Makefile.in, gcc-interface/Make-lang.in,
1608         gnatsym.adb: Remove gnatsym (VMS only tool).
1610 2014-08-01  Ben Brosgol  <brosgol@adacore.com>
1612         * gnat_ugn.texi, projects.texi, xgnatugn.adb: Removed all VMS
1613         conditionalization from gnat_ugn.texi and projects.texi, and updated
1614         (considerably simplified) xgnatugn.adb, to be removed soon.
1616 2014-08-01  Vincent Celier  <celier@adacore.com>
1618         * debug.adb: Remove doc for gnatmake/gprbuild switch -ds.
1619         * make.adb (List_Bad_Compilations): Use Opt.No_Exit_Message
1620         instead of Debug.Debug_Flag_S.
1621         * makeutl.adb (Finish_Program, Fail_Program): Use Opt flag
1622         No_Exit_Message instead of Debug.Debug_Flag_S to suppress exit
1623         error messages.
1624         * makeutl.ads (No_Exit_Message_Option): New constant string
1625         for switch --no-exit-message.
1626         * opt.ads (No_Exit_Message): New Boolean flag, defaulted to False.
1627         * switch-m.adb (Scan_Make_Switches): Recognize new switch
1628         --no-exit-message.
1630 2014-08-01  Arnaud Charlet  <charlet@adacore.com>
1632         * exp_vfpt.adb, exp_vfpt.ads: Removed, no longer used.
1633         * gcc-interface/Make-lang.in: Remove exp_vfpt.o
1635 2014-08-01  Javier Miranda  <miranda@adacore.com>
1637         * inline.ads (Inlined_Calls, Backend_Calls,
1638         Backend_Inlined_Subps, Backend_Not_Inlined_Subps): Declarations
1639         moved to inline.adb (Cannot_Inline): Update documentation.
1640         (Check_And_Build_Body_To_Inline): Renamed.
1641         (List_Inlining_Info): Subprogram moved here from package exp_ch6.
1642         * inline.adb (Check_Inlining_Restrictions): New local variable.
1643         (Inlined_Calls, Backend_Calls, Backend_Inlined_Subps,
1644         Backend_Not_Inlined_Subps): Declarations moved here
1645         from inline.ads (Number_Of_Statements): Removed.
1646         (Remove_Pragmas): Avoid duplicated version of this subprogram.
1647         (Build_Body_To_Inline): Code cleanup.
1648         (Build_Body_To_Inline.Has_Excluded_Statament): Removed.
1649         (Check_And_Build_Body_To_Inline): Renamed. Code cleanup.
1650         (Check_Body_To_Inline): Removed.
1651         (Generate_Body_To_Inline): Renamed as Generate_Subprogram_Body.
1652         (Has_Excluded_Declaration): No action if not
1653         Check_Inlining_Restrictions.
1654         (Has_Excluded_Statement): No action if not Check_Inlining_Restrictions.
1655         (Initialize): Initialize the lists of inlined calls and subprograms.
1656         (List_Inlining_Info): Subprogram moved here from package exp_ch6.
1657         * sem_ch6.adb (Analyze_Subprogram_Body_Helper): Update call
1658         to Check_And_Build_Body_To_Inline since it has been renamed as
1659         Check_And_Split_Unconstrained_Function
1660         * exp_ch6.ad[sb] (List_Inlining_Info): Subprogram moved to
1661         package inline.
1662         * gnat1drv.adb Update call to Inline.List_Inlining_Info.
1664 2014-08-01  Vincent Celier  <celier@adacore.com>
1666         * debug.adb: Add documentation for new debug switch -ds.
1667         * make.adb (List_Bad_Compilations): Do not issue any message
1668         when switch -ds is specified.
1669         * makeutl.adb (Fail_Program): Do not issue any message when
1670         -ds is specified.
1671         (Finish_Program): Ditto.
1673 2014-08-01  Robert Dewar  <dewar@adacore.com>
1675         * s-exnint.adb, s-exnint.ads, s-wwdwch.ads, s-carsi8.ads,
1676         s-casi32.ads, indepsw.adb, a-timoau.ads, s-explli.adb, s-explli.ads,
1677         s-casi16.ads, s-powtab.ads, g-wistsp.ads, a-ztmoau.adb,
1678         indepsw-gnu.adb, s-imgllb.ads, types.adb, gnat.ads, s-proinf.adb,
1679         indepsw-aix.adb, s-caun64.ads, s-imgllw.ads, s-traces-default.adb,
1680         s-vxwork-x86.ads, s-expllu.adb, s-exnlli.adb, s-exnlli.ads,
1681         s-traces.adb, widechar.ads, stand.adb, s-expint.adb,
1682         s-tratas-default.adb, s-expint.ads, s-geveop.ads, s-caun32.ads,
1683         s-expuns.adb, s-mantis.adb, s-mantis.ads, s-caun16.ads, s-tasinf.adb,
1684         s-memcop.ads, s-dsaser.ads, s-imgbiu.ads, a-szmzco.ads, g-strspl.ads,
1685         s-casi64.ads, g-zstspl.ads, indepsw-mingw.adb, tree_io.adb,
1686         s-boarop.ads, uname.ads, s-fore.adb, s-fore.ads, g-timsta.adb,
1687         g-timsta.ads, s-assert.adb, s-vector.ads, s-tratas.adb,
1688         s-tratas.ads: Minor fix to copyright notices.
1690 2014-08-01  Eric Botcazou  <ebotcazou@adacore.com>
1692         * sinfo.ads: Remove long obsolete comment.
1693 2014-08-01  Ed Schonberg  <schonberg@adacore.com>
1695         * sem_util.adb: Add guard to setting of No_Predicate_On_Actual.
1696         * sem_ch3.adb: Minor reformatting.
1698 2014-08-01  Pascal Obry  <obry@adacore.com>
1700         * cstreams.c: Only enable large file support on know supported
1701         platforms. Add missing defines/includes.
1703 2014-08-01  Ed Schonberg  <schonberg@adacore.com>
1705         * einfo.ads, einfo.adb New flags No_Predicate_On_Actual and
1706         No_Dynamic_Predicate_On_Actual, to enforce the generic contract
1707         on generic units that contain constructs that forbid subtypes
1708         with predicates.
1709         * sem_ch3.adb (Analyze_Subtype_Declaration, Process_Subtype):
1710         Inherit flags indicating the presence of predicates in subtype
1711         declarations with and without constraints.
1712         (Inherit_Predicate_Flags): Utility for the above.
1713         * sem_util.adb (Bad_Predicated_Subtype_Use): In a generic context,
1714         indicate that the actual cannot have predicates, and preserve
1715         warning. In an instance, report error if actual has predicates
1716         and the construct appears in a package declaration.
1717         * sem_ch12.adb (Diagnose_Predicated_Actual): Report error
1718         for an actual with predicates, if the corresponding formal
1719         carries No_Predicate_On_Actual or (in the case of a loop)
1720         No_Dynamic_Predicate_On_Actual.
1721         * sem_ch13.adb (Build_Predicate_Functions); Do not build a
1722         Static_Predicate function if the type is non-static (in the
1723         presence of previous errors),
1724         * sem_ch5.adb (Analyze_Loop_Parameter_Specification): Set flag
1725         No_Dynamic_Predicate_On_Actual in a generic context, to enforce
1726         generic contract on actuals that cannot have predicates.
1728 2014-08-01  Pascal Obry  <obry@adacore.com>
1730         * a-direct.adb (C_Size): Returns an int64.
1731         * osint.adb (System.CRTL): New with clause.
1732         (File_Length.Internal): Returns an int64.
1733         * s-os_lib.ads (File_Length): Returns an int64.
1735 2014-08-01  Robert Dewar  <dewar@adacore.com>
1737         * gnatchop.adb, gnatcmd.adb, make.adb, mlib-prj.adb, bindgen.adb,
1738         mlib.ads, butil.adb, clean.adb, binde.adb, gnatls.adb, gnatname.adb,
1739         osint.adb, krunch.adb: Minor reformatting.
1741 2014-08-01  Robert Dewar  <dewar@adacore.com>
1743         * inline.adb, inline.ads, fe.h, einfo.adb, einfo.ads, sem_util.adb,
1744         sem_util.ads, exp_ch4.adb, exp_ch11.adb, exp_ch6.adb, cstand.adb,
1745         sem_mech.adb, sem_ch6.adb, sem_ch8.adb, sem_ch11.adb, snames.ads-tmpl:
1746         Remove VMS-specific code.
1747         * gcc-interface/decl.c, gcc-interface/trans.c: Ditto.
1749 2014-08-01  Arnaud Charlet  <charlet@adacore.com>
1751         * binde.adb, bindgen.adb, butil.adb, clean.adb, gnatbind.adb,
1752         gnatchop.adb, gnatcmd.adb, gnatls.adb, gnatname.adb, krunch.adb,
1753         make.adb, makeutl.adb, memtrack.adb, mlib-prj.adb, mlib.adb,
1754         mlib.ads, tempdir.adb: Remove VMS handling.
1756 2014-08-01  Pascal Obry  <obry@adacore.com>
1758         * adaint.h, adaint.c (__gnat_file_length): Returns an __int64.
1759         (__gnat_named_file_length): Likewise.
1760         (__gnat_file_length_attr): Likewise.
1761         * a-direct.adb (C_Size): Use size_t as returned type.
1762         * osint.adb (File_Length): Adjust spec for Internal routine
1763         (returns size_t).
1764         * s-os_lib.adb (File_Length): Now returns a CRTL.size_t.
1765         (System.CRTL): With claused moved to spec.
1766         * s-os_lib.ads (System.CRTL): With clause moved to here.
1768 2014-08-01  Pascal Obry  <obry@adacore.com>
1770         * adaint.h, adaint.c (__gnat_open): Added.
1771         * s-crtl.ads (open): Import __gnat_open for large file support.
1773 2014-08-01  Robert Dewar  <dewar@adacore.com>
1775         * sem_case.adb (Dup_Choice): Improve message for integer constants.
1777 2014-08-01  Arnaud Charlet  <charlet@adacore.com>
1779         * gnatlink.adb: Remove special handling of VMS, RTX and JVM.
1781 2014-08-01  Pascal Obry  <obry@adacore.com>
1783         * adaint.h (GNAT_OPEN): Defines as open64 where supported.
1784         * adaint.c (GNAT_OPEN): Uses new macro where needed.
1786 2014-07-31  Eric Botcazou  <ebotcazou@adacore.com>
1788         * gcc-interface/utils.c (lookup_and_insert_pad_type): New function
1789         extracted from...
1790         (maybe_pad_type): ...here.  Call it to canonicalize the pad type.
1791         * gcc-interface/gigi.h: Update comment.
1793 2014-07-31  Javier Miranda  <miranda@adacore.com>
1795         * debug.adb Remove documentation of -gnatd.k (no longer needed).
1796         * sem_ch6.adb (Analyze_Subprogram_Body_Helper): Code cleanup.
1797         * inline.ads (Backend_Inlined_Subps): New
1798         Elist.  (Backend_Not_Inlined_Subps): New Elist.
1799         (Has_Excluded_Declaration): Declaration previously located in
1800         * inline.adb (Has_Excluded_Statement): Declaration previously
1801         located in inline.adb
1802         * inline.adb (Has_Single_Return): Moved out of
1803         Build_Body_To_Inline to avoid having duplicated code.
1804         (Number_Of_Statements): New subprogram.
1805         (Register_Backend_Inlined_Subprogram): New subprogram.
1806         (Register_Backend_Not_Inlined_Subprogram): New subprogram.
1807         (Add_Inlined_Subprogram): Register backend inlined subprograms and
1808         also register subprograms that cannot be inlined by the backend.
1809         (Has_Excluded_Declaration): Moved out of Build_Body_To_Inline
1810         to avoid having duplicated code.  Replace occurrences of
1811         Debug_Flag_Dot_K by Back_End_Inlining.
1812         * sem_res.adb (Resolve_Call): Code cleanup.
1813         * exp_ch6.adb (Expand_Call): Complete previous patch. Replace
1814         occurrence of Debug_Flag_Dot_K by Back_End_Inlining.
1815         (List_Inlining_Info): Add listing of subprograms passed to the
1816         backend and listing of subprograms that cannot be inlined by
1817         the backend.
1818         * sem_ch12.adb, sem_ch3.adb Replace occurrences of
1819         Debug_Flag_Dot_K by Back_End_Inlining.
1821 2014-07-31  Robert Dewar  <dewar@adacore.com>
1823         * nlists.ads: Minor code fix (remove unwise Inline for
1824         List_Length).
1826 2014-07-31  Arnaud Charlet  <charlet@adacore.com>
1828         * einfo.adb: Remove VMS specific code.
1829         * exp_attr.adb: Remove VAX specific code.
1830         * set_targ.adb: Remove handling of VAX_Float.
1831         * sem_vfpt.adb: Remove references to Vax_Native.
1832         * sem_attr.adb (Is_VAX_Float): Remove ref to VAX_Native.
1834 2014-07-31  Robert Dewar  <dewar@adacore.com>
1836         * sem_ch4.adb: Minor reformatting.
1838 2014-07-31  Arnaud Charlet  <charlet@adacore.com>
1840         * gcc-interface/trans.c, gcc-interface/misc.c: Remove references
1841         to VMS. Misc clean ups.
1842         * gcc-interface/Makefile.in (gnatlib-shared-vms): Remove.
1844 2014-07-31  Robert Dewar  <dewar@adacore.com>
1846         * cstand.adb, einfo.adb, einfo.ads, errout.adb, exp_attr.adb,
1847         exp_prag.adb, frontend.adb, interfac.ads,
1848         par-prag.adb, s-auxdec.ads, s-filofl.ads, s-fishfl.ads, s-fvadfl.ads,
1849         s-fvaffl.ads, s-fvagfl.ads, s-vaflop.ads, sem_attr.adb, sem_attr.ads,
1850         sem_ch13.adb, sem_ch3.adb, sem_ch8.adb, sem_prag.adb, snames.adb-tmpl,
1851         snames.ads-tmpl: Remove obsolete VMS-specific code.
1853 2014-07-31  Robert Dewar  <dewar@adacore.com>
1855         * sem_ch3.adb, sem_ch13.adb: Minor reformatting.
1857 2014-07-31  Arnaud Charlet  <charlet@adacore.com>
1859         * a-intnam-linux.ads: Minor: update obsolete comments.
1860         * s-taasde.adb: Minor: fix comment header.
1862 2014-07-31  Arnaud Charlet  <charlet@adacore.com>
1864         * s-auxdec-vms-ia64.adb, s-parame-vms-alpha.ads, s-asthan-vms-alpha.adb,
1865         s-tpopde-vms.adb, s-mastop-vms.adb, s-tpopde-vms.ads, s-taprop-vms.adb,
1866         mlib-tgt-vms_common.adb, mlib-tgt-vms_common.ads, s-inmaop-vms.adb,
1867         g-enblsp-vms-alpha.adb, s-ransee-vms.adb, s-osprim-vms.adb,
1868         s-osprim-vms.ads, g-socthi-vms.adb, g-socthi-vms.ads, system-vms_64.ads,
1869         s-osinte-vms.adb, s-osinte-vms.ads, g-eacodu-vms.adb,
1870         s-vaflop-vms-alpha.adb, s-parame-vms-ia64.ads, a-dirval-vms.adb,
1871         a-caldel-vms.adb, mlib-tgt-specific-vms-alpha.adb, s-tasdeb-vms.adb,
1872         symbols-vms.adb, a-intnam-vms.ads, g-expect-vms.adb,
1873         symbols-processing-vms-alpha.adb, mlib-tgt-specific-vms-ia64.adb,
1874         s-traent-vms.adb, s-traent-vms.ads, i-cstrea-vms.adb, a-numaux-vms.ads,
1875         symbols-processing-vms-ia64.adb, s-interr-vms.adb, s-memory-vms_64.adb,
1876         s-memory-vms_64.ads, g-enblsp-vms-ia64.adb, s-taspri-vms.ads,
1877         s-auxdec-vms_64.ads, s-intman-vms.adb, s-intman-vms.ads,
1878         s-tpopsp-vms.adb, s-asthan-vms-ia64.adb, a-calend-vms.adb,
1879         a-calend-vms.ads, system-vms-ia64.ads, s-auxdec-vms-alpha.adb: Removed.
1880         * namet.h (Is_Non_Ada_Error): Remove.
1882 2014-07-31  Robert Dewar  <dewar@adacore.com>
1884         * exp_util.adb, lib-writ.adb, sem_ch12.adb, s-direio.adb: Minor
1885         reformatting.
1887 2014-07-31  Hristian Kirtchev  <kirtchev@adacore.com>
1889         * exp_attr.adb (Expand_Loop_Entry_Attribute): Update the comment
1890         which demonstrates the expansion of while loops subject to
1891         attribute 'Loop_Entry. The condition of a while loop along with
1892         related condition actions is now wrapped in a function.  Instead
1893         of repeating the condition, the expansion now calls the function.
1895 2014-07-31  Ed Schonberg  <schonberg@adacore.com>
1897         * sem_case.adb (Check_Against_Predicate): Correct off-by-one
1898         error when reporting of missing values in a case statement for
1899         a type with a static predicate.
1900         (Check_Choices): Reject a choice given by a subtype to which a
1901         Dynamic_Predicate applies.
1902         * sem_ch3.adb (Analyze_Subtype_Declaration): Inherit
1903         Has_Dynamic_Predicate_Aspect flag from parent.
1905 2014-07-31  Ed Schonberg  <schonberg@adacore.com>
1907         * sem_ch13.adb (Analyze_Aspect_Specifications): A predicate
1908         cannot apply to a subtype of an incomplete type.
1909         (Is_Static_Choice): Treat an Others_Clause as static. The
1910         staticness of the expression and of the range are checked
1911         elsewhere.
1913 2014-07-31  Pascal Obry  <obry@adacore.com>
1915         * adaint.h (__gnat_ftell64): Added.
1916         (__gnat_fseek64): Added.
1917         (__int64): Added.
1918         * cstreams.c (__int64): Removed.
1920 2014-07-31  Pascal Obry  <obry@adacore.com>
1922         * a-stream.ads (Stream_Element_Offset): Now a signed 64bit type.
1923         * i-cstrea.ads, s-crtl.ads (fseek64): Offset is always a 64bit value.
1924         (ftell64): Always returns a 64bit value.
1925         * cstreams.c (int64): New definition.
1926         (_FILE_OFFSET_BITS): Set to 64 to enable 64bit offset support.
1927         (__gnat_ftell64): Always returns a 64bit value. The implemenation now
1928         uses ftello() on UNIX.
1929         (__gnat_fseek64): Offset is always a 64bit value. The
1930         implementation now uses fseeko() on UNIX.
1931         * a-ststio.adb, s-direio.adb (Set_Position): Simplify code,
1932         always use fseek64 to set the offset.
1933         (Size): Simplify code, always use fseek64/ftell64.
1934         * s-direio.ads (Count): Now an int64.
1935         * g-socket.ads (Vector_Element): Adjust definition for Length
1936         to be a size_t. This matches the C definition and avoid using
1937         a 64bit integer on 32bit platforms now that Count is always 64bit.
1938         * g-socthi-mingw.adb (Ada.Streams): Removed as not used anymore.
1939         (C_Recvmsg): Change some conversion to account for change in
1940         Vector_Element.
1941         (C_Sendmsg): Likewise.
1943 2014-07-31  Robert Dewar  <dewar@adacore.com>
1945         * cstand.adb (Create_Standard): Remove handling of -gnatdm flag.
1946         * debug.adb: Remove documentation of -gnatdm flag.
1947         * gnat1drv.adb (Adjust_Global_Switches): Remove handling of
1948         -gnatdm flag.
1950 2014-07-31  Arnaud Charlet  <charlet@adacore.com>
1952         * lib-writ.adb (Write_Unit_Information): Fix case where U =
1953         No_Unit.
1955 2014-07-31  Claire Dross  <dross@adacore.com>
1957         * exp_util.adb, exp_util.ads
1958         (Get_First_Parent_With_External_Axiomatization_For_Entity):
1959         New routine to find the first parent of an entity with
1960         a pragma Annotate (GNATprove, External_Axiomatization).
1961         (Has_Annotate_Pragma_For_External_Axiomatization): New function
1962         to check if a package has a pragma Annotate (GNATprove,
1963         External_Axiomatization).
1964         * einfo.ads, einfo.adb (Is_Generic_Actual_Subprogram): New
1965         flag on the entity for the declaration created for a formal
1966         subprogram in an instance. This is a renaming declaration,
1967         or in GNATprove_Mode the declaration of an expression function
1968         that captures the axiomatization of the actual.
1969         * sem_ch6.adb (Analyze_Expression_Function): For a
1970         Generic_Actual_Subprogram, place body immediately after the
1971         declaration because it may be used in a subsequent declaration
1972         in the instance.
1973         * sem_ch12.adb (Build_Wrapper): Add code to handle instances where
1974         the actual is a function, not an operator. Handle functions with
1975         one and two parameters and binary and unary operators.
1977 2014-07-31  Pascal Obry  <obry@adacore.com>
1979         * cstreams.c (__gnat_is_regular_file_fd): Removed.
1980         * adaint.c (__gnat_is_regular_file_fd): Added.
1982 2014-07-31  Robert Dewar  <dewar@adacore.com>
1984         * exp_strm.adb: Minor reformatting.
1986 2014-07-31  Ed Schonberg  <schonberg@adacore.com>
1988         * sem_ch12.adb (Build_Wrapper): New procedure, subsidiary to
1989         Analyze_Associations, to create a wrapper around operators that
1990         are actuals to formal subprograms. This is done in GNATProve
1991         mode in order to propagate the contracts of the operators to
1992         the body of the instance.
1994 2014-07-31  Ed Schonberg  <schonberg@adacore.com>
1996         * sem_attr.adb (Analyze_Attribute, case 'Old):  The reference is
1997         legal if within an aspect specification for a generic subprogram.
1999 2014-07-31  Javier Miranda  <miranda@adacore.com>
2001         * gnat1drv.adb (Back_End_Inlining): Set to false if
2002         Suppress_All_Inlining is set.
2003         * debug.adb: Adding documentation for -gnatd.z.
2004         * inline.adb (Add_Inlined_Body): Extend the -gnatn2
2005         processing to -gnatn1 for calls to Inline_Always routines.
2006         (Add_Inlined_Subprogram): Remove previous patch.
2008 2014-07-31  Ed Schonberg  <schonberg@adacore.com>
2010         * sem_ch13.adb (Check_One_Function): Apply properly the static
2011         semantic rules for indexing aspects and the functions they denote.
2013 2014-07-31  Javier Miranda  <miranda@adacore.com>
2015         * debug.adb: Complete documentation of -gnatd.z.
2017 2014-07-31  Bob Duff  <duff@adacore.com>
2019         * gnat_ugn.texi: Minor doc fixes.
2021 2014-07-31  Robert Dewar  <dewar@adacore.com>
2023         * sem_aggr.adb (Resolve_Array_Aggregate): Fix posting of missing
2024         index value.
2026 2014-07-31  Tristan Gingold  <gingold@adacore.com>
2028         * s-unstyp.ads (Packed_Byte): Make this type universal aliasing.
2029         (Packed_Bytes1): Make component aliased.
2031 2014-07-31  Robert Dewar  <dewar@adacore.com>
2033         * s-unstyp.ads, s-fileio.adb: Minor reformatting.
2035 2014-07-31  Robert Dewar  <dewar@adacore.com>
2037         * inline.adb, gnat1drv.adb, exp_ch6.adb, s-fileio.adb: Minor
2038         reformatting.
2040 2014-07-31  Eric Botcazou  <ebotcazou@adacore.com>
2042         * gcc-interface/utils2.c ((build_binary_op): Don't set TREE_THIS_NOTRAP
2043         on array references here, now done more selectively in trans.c.
2045 2014-07-31  Doug Rupp  <rupp@adacore.com>
2047         * gcc-interface/misc.c (gnat_init_gcc_fp(): Set flag_errno_math to 0.
2049 2014-07-31  Hristian Kirtchev  <kirtchev@adacore.com>
2051         * sem_util.adb (Is_Effectively_Volatile): New routine.
2053 2014-07-31  Fedor Rybin  <frybin@adacore.com>
2055         * gnat_ugn.texi: Document --test-duration option for gnattest.
2057 2014-07-31  Javier Miranda  <miranda@adacore.com>
2058             Eric Botcazou  <ebotcazou@adacore.com>
2060         * opt.ads (Back_End_Inlining): New variable which controls
2061         activation of inlining by back-end expansion.
2062         * gnat1drv.adb (Adjust_Global_Switches): Initialize Back_End_Inlining
2063         * sem_ch6.adb (Analyze_Subprogram_Body_Helper): Do not build
2064         the body to be inlined by the frontend if Back_End_Inlining
2065         is enabled.
2066         * exp_ch6.adb (Register_Backend_Call): Moved to inline.adb.
2067         (Expand_Call): If backend inlining is enabled let the backend to
2068         handle inlined subprograms.
2069         * inline.ads (Register_Backend_Call): Moved here from exp_ch6
2070         * inline.adb (Register_Backend_Call): Moved here from exp_ch6.
2071         (Add_Inlined_Subprogram): Add subprograms when Back_End_Inlining is set.
2072         (Must_Inline): Do not return Inline_Call if Back_End_Inlining is
2073         enabled.
2074         * debug.adb Document -gnatd.z
2075         * fe.h Import Back_End_Inlining variable.
2076         * gcc-interface/utils.c (create_subprog_decl): If Back_End_Inlining is
2077         enabled then declare attribute "always inline"
2078         * gcc-interface/decl.c, gcc-interface/trans.c,
2079         gcc-interface/gigi.h: Add handling of Inline_Always pragma.
2081 2014-07-31  Robert Dewar  <dewar@adacore.com>
2083         * a-ngelfu.ads: Minor comment fix.
2085 2014-07-31  Hristian Kirtchev  <kirtchev@adacore.com>
2087         * freeze.adb (Freeze_Record_Type): Replace all calls to
2088         Is_SPARK_Volatile with Is_Effectively_Volatile and update
2089         related comments.
2090         * sem_ch3.adb (Analyze_Object_Contract, Process_Discriminants):
2091         Replace all calls to Is_SPARK_Volatile with
2092         Is_Effectively_Volatile and update related comments.
2093         * sem_ch5.adb (Analyze_Iterator_Specification,
2094         Analyze_Loop_Parameter_Specification): Replace all calls to
2095         Is_SPARK_Volatile with Is_Effectively_Volatile and update
2096         related comments.
2097         * sem_ch6.adb (Process_Formals): Replace all calls to
2098         Is_SPARK_Volatile with Is_Effectively_Volatile and update
2099         related comments.
2100         * sem_ch12.adb (Instantiate_Object): Replace the call to
2101         Is_SPARK_Volatile_Object with Is_Effectively_Volatile_Object
2102         and update related comment.
2103         * sem_prag.adb (Analyze_External_Property_In_Decl_Part,
2104         Analyze_Global_Item): Replace all calls to Is_SPARK_Volatile
2105         with Is_Effectively_Volatile and update related comments.
2106         * sem_res.adb (Resolve_Actuals, Resolve_Entity_Name): Replace
2107         all calls to Is_SPARK_Volatile with Is_Effectively_Volatile and
2108         update related comments.
2109         * sem_util.adb (Has_Enabled_Property,
2110         Variable_Has_Enabled_Property): Replace all calls
2111         to Is_SPARK_Volatile with Is_Effectively_Volatile and
2112         update related comments.
2113         (Is_Effectively_Volatile): New routine.
2114         (Is_Effectively_Volatile_Object): New routine.
2115         (Is_SPARK_Volatile): Removed.
2116         (Is_SPARK_Volatile_Object): Removed.
2117         * sem_util.ads (Is_Effectively_Volatile): New routine.
2118         (Is_Effectively_Volatile_Object): New routine.
2119         (Is_SPARK_Volatile): Removed.
2120         (Is_SPARK_Volatile_Object): Removed.
2122 2014-07-31  Pascal Obry  <obry@adacore.com>
2124         * s-fileio.adb (Open): Make sure a shared file gets inserted into
2125         the global list atomically. This ensures that the file descriptor
2126         won't be freed because another tasks is closing the file.
2128 2014-07-31  Robert Dewar  <dewar@adacore.com>
2130         * sem_ch3.adb (Process_Range_Expr_In_Decl): Add comments on
2131         generation of _FIRST and _LAST variables even in GNATprove_Mode.
2132         * gnat_ugn.texi: Minor editing.
2133         * sem_prag.adb (Ensure_Aggregate_Form): Make sure generated
2134         aggregate is marked Comes_From_Source if argument is CFS.
2136 2014-07-31  Pascal Obry  <obry@adacore.com>
2138         * s-fileio.adb: Remove obsolete comment.
2140 2014-07-31  Vincent Celier  <celier@adacore.com>
2142         * a-strbou.ads ("=" (Bounded_String, Bounded_String): Add
2143         overriding keyword before function to avoid error when compiler
2144         is called with -gnatyO (check overriding indicators).
2146 2014-07-31  Tucker Taft  <taft@adacore.com>
2148         * gnat_ugn.texi: Add a paragraph pointing the reader
2149         to the "plugins" example.
2151 2014-07-31  Hristian Kirtchev  <kirtchev@adacore.com>
2153         * freeze.adb (Freeze_Expression): Document the
2154         purpose of the parent chain traversal.
2156 2014-07-31  Robert Dewar  <dewar@adacore.com>
2158         * checks.ads, checks.adb (Activate_Overflow_Check): Do not set flag for
2159         unconstrained fpt ops.
2161 2014-07-31  Pascal Obry  <obry@adacore.com>
2163         * s-fileio.adb (Open): Make sure a shared file gets inserted into
2164         the global list atomically. This ensures that the file descriptor
2165         won't be freed because another tasks is closing the file.
2167 2014-07-31  Vincent Celier  <celier@adacore.com>
2169         * projects.texi: Minor spelling error fix.
2171 2014-07-31  Robert Dewar  <dewar@adacore.com>
2173         * gnat_rm.texi: Document No_Elaboration_Code_All restriction.
2174         * lib-writ.adb, lib-load.adb: Initialize No_Elab_Code field in unit
2175         information.
2176         * lib.ads, lib.adb (No_Elab_Code): New field in unit information.
2177         * restrict.adb (Process_Restriction_Synonyms): Add handling
2178         of No_Elaboration_Code_All.
2179         * restrict.ads (Process_Restriction_Synonyms): Now handles
2180         No_Elaboration_Code_All.
2181         * sem_ch10.adb (Analyze_Context): Enforce transitive with for
2182         No_Elaboration_Code_All.
2183         * sem_prag.adb (Process_Restrictions_Or_Restriction_Warnings):
2184         Handle setting of No_Elab_Code in unit information. Handle
2185         No_Elaboration_Code_All.
2186         * snames.ads-tmpl (Name_No_Elaboration_Code): New name for
2187         pragma processing.
2188         (Name_No_Elaboration_Code_All): New name for pragma processing.
2190 2014-07-31  Eric Botcazou  <ebotcazou@adacore.com>
2192         * exp_aggr.adb (Aggr_Assignment_OK_For_Backend): Reject array
2193         types with a null range and use the Esize of the component
2194         instead of its RM_Size to identify appropriate values.
2196 2014-07-31  Hristian Kirtchev  <kirtchev@adacore.com>
2198         * freeze.adb Add with and use clause for Aspects.
2199         (Freeze_Expression): Emit an error when a volatile constant lacks
2200         Boolean aspect Import.
2201         (Has_Boolean_Aspect_Import): New routine.
2203 2014-07-31  Gary Dismukes  <dismukes@adacore.com>
2205         * exp_util.adb: Minor reformatting.
2207 2014-07-31  Vincent Celier  <celier@adacore.com>
2209         * errutil.adb (Error_Msg): Make sure that all components of
2210         the error message object are initialized.
2212 2014-07-31  Ed Schonberg  <schonberg@adacore.com>
2214         * sem_ch4.adb (Try_Container_Indexing): If the container type is
2215         class-wide, use specific type to locate iteration primitives.
2216         * sem_ch13.adb (Check_Indexing_Functions): Add legality checks for
2217         rules in RM 4.1.6 (Illegal_Indexing): New diagnostic procedure.
2218         Minor error message reformating.
2219         * exp_ch5.adb (Expand_Iterator_Loop): Handle properly Iterator
2220         aspect for a derived type.
2222 2014-07-31  Robert Dewar  <dewar@adacore.com>
2224         * debug.adb: Document debug flag d.X.
2226 2014-07-31  Ed Schonberg  <schonberg@adacore.com>
2228         * sem_util.ads (Find_Specific_Type): Moved here from exp_disp.adb.
2229         * sem_util.adb (Find_Specific_Type): If type is untagged private,
2230         retrieve full view so that primitive operations can be located.
2231         * exp_disp.adb Move Find_Specific_Type to sem_util.
2232         * exp_ch4.adb (Expand_N_Op_Eq): If operands are class-wide, use
2233         Find_Specific_Type to locate primitive equality.
2234         * exp_util.adb (Make_CW_Equivalent_Type): A class_wide equivalent
2235         type does not require initialization.
2236         * exp_attr.adb (Compile_Stream_Body_In_Scope): Within an instance
2237         body all visibility is established, and the enclosing package
2238         declarations must not be installed.
2240 2014-07-31  Yannick Moy  <moy@adacore.com>
2242         * sem_parg.adb, sem_prag.ads (Collect_Subprogram_Inputs_Outputs):
2243         Make subprogram public.
2245 2014-07-31  Ed Schonberg  <schonberg@adacore.com>
2247         * exp_ch9.adb (Expand_N_Protected_Type_Declaration): New
2248         predicate Discriminated_Size, to distinguish between private
2249         components that depend on discriminants from those whose size
2250         depends on some other non-static expression.
2252 2014-07-31  Nicolas Setton  <setton@adacore.com>
2254         * g-exptty.adb (Close): Fix binding to Waitpid: use the
2255         tty version.
2257 2014-07-31  Ed Schonberg  <schonberg@adacore.com>
2259         * sem_ch3.adb (Make_Index): Reject properly the use of 'Length
2260         in a discrete range, when 'range was probably intended.
2262 2014-07-31  Robert Dewar  <dewar@adacore.com>
2264         * sem_warn.adb, sem_warn.ads (Has_Junk_Name): Moved from body to spec.
2266 2014-07-31  Robert Dewar  <dewar@adacore.com>
2268         * frontend.adb: Minor reformatting.
2269         * sem.adb: Minor reformatting.
2270         * sem_ch6.adb (Analyze_Null_Procedure): Set proper sloc for
2271         identifiers on rewrite.
2272         * par.adb: Minor comment updates.
2273         * a-ngelfu.adb (Cos): Minor simplification.
2274         * par-ch13.adb (Get_Aspect_Specifications): Improve messages
2275         and recovery for bad aspect.
2276         * exp_ch3.adb: Code clean up.
2277         * sem_util.ads: Minor comment correction.
2278         * sem_ch13.adb (Check_Array_Type): Properly handle large types.
2279         * sem_ch3.adb: Code clean up.
2280         * binderr.ads: Minor comment correction.
2282 2014-07-31  Ed Schonberg  <schonberg@adacore.com>
2284         * exp_disp.adb (Expand_Interface_Conversion): A call whose
2285         prefix is a static conversion to an interface type that is not
2286         class-wide is not dispatching.
2288 2014-07-31  Robert Dewar  <dewar@adacore.com>
2290         * inline.adb, s-traceb.adb, s-traceb-hpux.adb, memtrack.adb,
2291         s-traceb-mastop.adb: Minor reformatting.
2293 2014-07-31  Ed Schonberg  <schonberg@adacore.com>
2295         * exp_ch3.adb (Expand_Record_Extension): In ASIS_Mode perform
2296         expansion, to handle properly visibility of selected components
2297         in instance bodies.
2299 2014-07-31  Robert Dewar  <dewar@adacore.com>
2301         * par-ch13.adb (Get_Aspect_Specifications): Set Inside_Depends.
2302         * par-ch2.adb (P_Pragma): Set Inside_Depends.
2303         * par-ch4.adb (P_Simple_Expression): Pass Inside_Depends to
2304         Check_Unary_Plus_Or_Minus.
2305         * scans.ads (Inside_Depends): New flag.
2306         * scng.adb (Scan): Pass Inside_Depends to Check_Arrow.
2307         * style.ads: Add Inside_Depends parameter to Check_Arrow Add
2308         Inside_Depends parameter to Check_Unary_Plus_Or_Minus.
2309         * styleg.adb (Check_Arrow): Handle Inside_Depends case.
2310         (Check_Unary_Plus_Or_Minus): Handle Inside_Depends case.
2311         * styleg.ads: Add Inside_Depends parameter to Check_Arrow Add.
2312         Inside_Depends parameter to Check_Unary_Plus_Or_Minus.
2314 2014-07-31  Javier Miranda  <miranda@adacore.com>
2316         * s-vaflop.adb Move the body of function T_To_G before
2317         T_To_D. Required for frontend inlining.
2318         * inline.adb (Has_Excluded_Contract): New subprogram used to
2319         check if a subprogram inlined by the frontend has contracts
2320         which cannot be inlined.
2322 2014-07-31  Bob Duff  <duff@adacore.com>
2324         * s-traceb.adb, s-traceb-hpux.adb, s-traceb-mastop.adb:
2325         (Call_Chain): Add 1 to number of frames to skip, to account for
2326         the fact that there's one more frame on the stack.
2327         * gcc-interface/Makefile.in (s-traceb.o): Adjust rules.
2329 2014-07-31  Robert Dewar  <dewar@adacore.com>
2331         * checks.adb (Enable_Overflow_Check): More precise setting of
2332         Do_Overflow_Check flag for division.
2334 2014-07-31  Eric Botcazou  <ebotcazou@adacore.com>
2336         * exp_aggr.adb (Aggr_Assignment_OK_For_Backend): Reject packed
2337         array types with implementation type.
2339 2014-07-31  Hristian Kirtchev  <kirtchev@adacore.com>
2341         * sem_ch10.adb (Process_State): Remove local variable Name. Add
2342         local variable Decl. Partially declare an abstract state by
2343         generating an entity and storing it in the state declaration.
2344         * sem_prag.adb (Create_Abstract_State): Fully declare a
2345         semi-declared abstract state.
2347 2014-07-31  Robert Dewar  <dewar@adacore.com>
2349         * prj-nmsc.adb: Minor reformatting.
2351 2014-07-31  Bob Duff  <duff@adacore.com>
2353         * s-tasdeb.adb (System.Tasking.Debug): Remove
2354         all usage of the secondary stack from this package.
2356 2014-07-31  Hristian Kirtchev  <kirtchev@adacore.com>
2358         * freeze.adb (Freeze_Expression): Update the loop in charge
2359         of finding a proper insertion place for freeze nodes to handle
2360         N_Expression_With_Actions nodes.
2362 2014-07-31  Robert Dewar  <dewar@adacore.com>
2364         * sem_util.adb, a-ngelfu.ads, prj-nmsc.adb, prj-conf.adb: Minor
2365         reformatting.
2367 2014-07-31  Pascal Obry  <obry@adacore.com>
2369         * prj-nmsc.adb: Minor reformatting.
2371 2014-07-31  Ed Schonberg  <schonberg@adacore.com>
2373         * sem_util.adb (Has_Preelaborable_Initialization): Check that
2374         type is tagged before checking whether a user-defined Initialize
2375         procedure is present.
2377 2014-07-31  Gary Dismukes  <dismukes@adacore.com>
2379         * a-ngelfu.ads (Sqrt): Augment postcondition.
2381 2014-07-31  Pascal Obry  <obry@adacore.com>
2383         * prj-nmsc.adb (Check_Library_Attributes): An aggegate library
2384         directory and ALI directory must be different than all object
2385         and library directories of aggregated projects.
2387 2014-07-31  Vincent Celier  <celier@adacore.com>
2389         * prj-pars.adb, prj-conf.ads, prj-conf.adb (Locate_Runtime): Move spec
2390         to package body, as it is not called from outside. Remove argument
2391         Project_Tree, no longer used. When runtime cannot be found,
2392         call Raise_Invalid_Config instead of failing the program.
2394 2014-07-31  Robert Dewar  <dewar@adacore.com>
2396         * bindgen.adb (Gen_Output_File_Ada): Generate pragma Suppress
2397         (Overflow_Check).
2398         * gnatlink.adb (Process_Args): Remove generation of -gnato0,
2399         no longer needed.
2401 2014-07-31  Robert Dewar  <dewar@adacore.com>
2403         * gnat_ugn.texi: Document new switch -gnato0.
2404         * sem_ch3.ads: Minor reformatting.
2405         * gnatlink.adb (Process_Args): Compile bind file with -gnato0
2406         (we do not want overflow checks when incrementing elaboration
2407         counters).
2408         * einfo.ads: Minor reformatting.
2410 2014-07-31  Robert Dewar  <dewar@adacore.com>
2412         * exp_ch5.adb, freeze.adb, exp_ch3.adb: Minor comment correction.
2413         * s-arit64.adb: Minor reformatting.
2415 2014-07-31  Robert Dewar  <dewar@adacore.com>
2417         * gnat1drv.adb (Adjust_Global_Switches): Default for overflow
2418         checking is enabled except in GNAT_Mode.
2419         * switch-c.adb (Scan_Front_End_Switches): Implement -gnato0
2420         (suppress overflow checks).
2422 2014-07-31  Ed Schonberg  <schonberg@adacore.com>
2424         * exp_ch3.adb (Expand_Freeze_Record_Type): Do not build an
2425         invariant procedure for an internally generated subtype that is
2426         created for an object of a class-wide type.
2428 2014-07-31  Vincent Celier  <celier@adacore.com>
2430         * prj-nmsc.adb, errutil.adb: Make code similar to Errout.
2432 2014-07-31  Gary Dismukes  <dismukes@adacore.com>
2434         * gnat_rm.texi, sem_aux.ads, einfo.ads, sem_util.ads, sem_ch6.adb,
2435         exp_disp.adb: Minor reformatting.
2437 2014-07-31  Robert Dewar  <dewar@adacore.com>
2439         * exp_ch5.adb, sem_ch3.adb, exp_ch7.adb, exp_util.adb, exp_ch9.adb,
2440         sem_ch7.adb, checks.adb, s-exctra.adb, exp_ch6.adb, exp_disp.adb,
2441         exp_dist.adb, sem_ch13.adb, exp_strm.adb, exp_ch3.adb: Minor
2442         reformatting.
2444 2014-07-31  Robert Dewar  <dewar@adacore.com>
2446         * sem_ch13.adb: Minor reformatting.
2448 2014-07-31  Ed Schonberg  <schonberg@adacore.com>
2450         * exp_ch3.adb (Build_Invariant_Checks): If the enclosing record
2451         is an unchecked_union, warn that invariants will not be checked
2452         on components that have them.
2454 2014-07-31  Robert Dewar  <dewar@adacore.com>
2456         * freeze.adb (Freeze_Entity): Check for error of
2457         Type_Invariant'Class applied to a untagged type.
2458         * sem_ch6.adb (Analyze_Null_Procedure): Unconditionally rewrite
2459         as null body, so that we perform error checks even if expansion
2460         is off.
2462 2014-07-31  Ed Schonberg  <schonberg@adacore.com>
2464         * sem_ch13.adb (Build_Invariant_Procedure): If body of procedure
2465         is already present, nothing to do.
2466         * exp_ch3.adb (Build_Component_Invariant_Call): For an access
2467         component, check whether the access type has an invariant before
2468         checking the designated type.
2469         (Build_Record_Invariant_Proc): Change suffix of generated
2470         name to prevent ambiguity when record type has invariants
2471         in addition to those of components, and two subprograms are
2472         constructed. Consistent with handling of array types.
2473         (Insert_Component_Invariant_Checks): Build invariant procedure
2474         body when one has not been created yet, in the case of composite
2475         types that are completions and whose full declarations carry
2476         invariants.
2478 2014-07-30  Thomas Quinot  <quinot@adacore.com>
2480         * gnat_rm.texi: Minor doc fixes.
2482 2014-07-30  Robert Dewar  <dewar@adacore.com>
2484         * a-rbtgbo.adb, sem_ch13.adb: Minor reformatting.
2486 2014-07-30  Vincent Celier  <celier@adacore.com>
2488         * errutil.adb (Set_Msg_Text): Process tilde ('~'): no processing
2489         of error message.
2490         * prj-nmsc.adb (Locate_Directory): Use a tilde ('~') in the
2491         message to report that a directory cannot be created, to avoid
2492         processing of the directory path that may contains special
2493         insertion characters.
2495 2014-07-30  Ed Schonberg  <schonberg@adacore.com>
2497         * a-crdlli.ads: Place declaration of Empty_List after full type
2498         declaration for Curosr, to prevent freezing error.
2500 2014-07-30  Robert Dewar  <dewar@adacore.com>
2502         * get_targ.adb: Minor code reorganization.
2503         * prj-proc.adb, prj-proc.ads, get_targ.ads, sem_ch6.adb: Minor
2504         reformatting.
2506 2014-07-30  Ed Schonberg  <schonberg@adacore.com>
2508         * a-cbhase.adb: a-cbhase.adb (Insert): Raise Constraint_Error,
2509         not Program_Error, when attempting to remove an element not in
2510         the set. This is the given semantics for all set containers.
2512 2014-07-30  Ed Schonberg  <schonberg@adacore.com>
2514         * a-rbtgbo.adb (Delete_Node_Sans_Free): If
2515         element is not present in tree return rather than violating
2516         an assertion. Constraint_Error will be raised in the caller if
2517         element is not in the container.
2519 2014-07-30  Arnaud Charlet  <charlet@adacore.com>
2521         * set_targ.adb (Read_Target_Dependent_Values): New subprogram.
2522         (elab body): Add provision for default target config file.
2523         * get_targ.ads, get_targ.adb (Get_Back_End_Config_File): New subprogram.
2525 2014-07-30  Ed Schonberg  <schonberg@adacore.com>
2527         * a-cbhase.adb (Delete): Raise Constraint_Error, not Program_Error,
2528         when attempting to remove an element not in the set. This is
2529         the given semantics for all set containers.
2530         * a-cborse.adb (Delete): Attempt removal first, to check for
2531         tampering, before checking whether this is an attempt to
2532         delete a  non-existing element, and in fthe latter case raise
2533         Constraint_Error.
2535 2014-07-30  Vincent Celier  <celier@adacore.com>
2537         * prj-proc.adb (Recursive_Process): Do not create a new
2538         Project_Id if the project is already in the list of projects of
2539         the tree.
2541 2014-07-30  Ed Schonberg  <schonberg@adacore.com>
2543         * sem_ch6.adb (Analyze_Function_Return): Reject a return expression
2544         whose type is an incomplete formal type.
2545         (Analyze_Return_Type): Reject a return type that is an untagged
2546         imcomplete formal type.
2547         (Process_Formals): Reject a formal parameter whose type is an
2548         untagged formal incomplete type.
2549         * sem_res.adb (Resolve_Actuals): Reject an actual whose type is
2550         an untagged formal incomplete type.
2552 2014-07-30  Robert Dewar  <dewar@adacore.com>
2554         * gnat_ugn.texi: Minor spelling correction.
2555         * makeutl.adb: Minor code reorganization.
2556         * exp_ch4.adb, exp_aggr.adb, exp_ch3.adb: Minor reformatting.
2558 2014-07-30  Robert Dewar  <dewar@adacore.com>
2560         * einfo.ads (Has_Unchecked_Union): Document that this is used
2561         to check for illegal Valid_Scalars attribute references.
2562         * exp_attr.adb (Build_Record_VS_Func): New function
2563         (Expand_N_Attribute_Reference, case Valid_Scalars): Call this
2564         function.
2565         * gnat_rm.texi: Document 'Valid_Scalars cannot be applied to
2566         Unchecked_Union Add note on 'Valid_Scalars generating a lot
2567         of code.
2568         * sem_attr.adb (Analyze_Attribute, case Valid_Scalars): Give
2569         error on attempt to apply Valid_Scalars to Unchecked_Union type.
2571 2014-07-30  Steve Baird  <baird@adacore.com>
2573         * exp_ch4.adb (Expand_N_Indexed_Component): Disable optimized handling
2574         of A(I..J)(K) in CodePeer_Mode.
2576 2014-07-30  Ben Brosgol  <brosgol@adacore.com>
2578         * gnat_ugn.texi: Fix typo.
2580 2014-07-30  Thomas Quinot  <quinot@adacore.com>
2582         * lib-writ.ads: document format change.
2584 2014-07-30  Pascal Obry  <obry@adacore.com>
2586         * prj-util.adb (For_Interface_Sources): Do not
2587         include sources from withed externally built projects.
2589 2014-07-30  Robert Dewar  <dewar@adacore.com>
2591         * lib.adb: Minor reformatting.
2592         * prj-util.adb: Minor reformatting.
2594 2014-07-30  Ed Schonberg  <schonberg@adacore.com>
2596         * exp_aggr.adb (Build_Record_Aggr_Code): For an array component
2597         that depends on discriminants, and which is given by an others
2598         clause, create an explicit subtype with the discriminant values
2599         of the enclosing aggregate, because the backend cannot otherwise
2600         retrieve the actual bounds of the array.
2602 2014-07-30  Fedor Rybin  <frybin@adacore.com>
2604         * gnat_ugn.texi: Improve gnattest documentation.
2606 2014-07-30  Pascal Obry  <obry@adacore.com>
2608         * makeutl.adb (Insert_Project_Sources): Properly handle sources
2609         that are aggregated. We want to include sources not only part
2610         of libraries but also if part of an aggregated project from an
2611         aggregate library.
2612         * prj.adb (For_Project_And_Aggregated_Context): Properly check
2613         state of root project.
2615 2014-07-30  Thomas Quinot  <quinot@adacore.com>
2617         * lib-load.ads: Minor reformatting.
2618         * sinfo.ads (Library_Unit): Update comment.
2619         * lib.ads (Notes): Simplify. The Unit component in Notes_Entry
2620         is redundant. Instead used the pragma Node_Id directly as the
2621         element type.
2623 2014-07-30  Thomas Quinot  <quinot@adacore.com>
2625         * lib.adb (Store_Note): Store only notes that do not come from
2626         an instance, and that are in the extended main source unit.
2627         * lib-writ (Write_Unit_Information): Annotations from subunits
2628         must be emitted along with those for the main unit, and they
2629         must carry a specific file name.
2630         * ali.ads (Notes_Record): Use a File_Name_Type instead of a
2631         Unit_Id for the source file containing the pragma, as in the
2632         case of annotations from subunits we might not have a readily
2633         available unit id.
2634         * ali.adb (Scan_ALI): Account for above change in data structure.
2636 2014-07-30  Vincent Celier  <celier@adacore.com>
2638         * makeutl.adb (Insert_Project_Sources): When the library project
2639         is an aggregate Stand-Alone Library, insert in the queue the
2640         Ada interface units, with Closure set to True;
2642 2014-07-30  Eric Botcazou  <ebotcazou@adacore.com>
2644         * sem_util.adb: Fix minor typo.
2645         * makeutl.adb: Minor reformatting.
2647 2014-07-30  Robert Dewar  <dewar@adacore.com>
2649         * exp_ch7.adb, checks.adb, makeutl.adb, makeutl.ads: Minor reformatting.
2651 2014-07-30  Yannick Moy  <moy@adacore.com>
2653         * checks.ads: Fix typo in comment.
2655 2014-07-30  Pierre-Marie Derodat  <derodat@adacore.com>
2657         * sem_util.adb (Set_Debug_Info_Needed): For scalar types, recurse on
2658         entities that materialize range bounds, if any.
2660 2014-07-30  Vincent Celier  <celier@adacore.com>
2662         * projects.texi: Minor spelling fix.
2664 2014-07-30  Hristian Kirtchev  <kirtchev@adacore.com>
2666         * checks.adb (Make_Bignum_Block): Use the new secondary stack
2667         build routines to manage the mark.
2668         * exp_ch7.adb (Create_Finalizer, Expand_Cleanup_Actions):
2669         Use the new secodary stack build routines to manage the mark.
2670         (Insert_Actions_In_Scope_Around): Add new formal parameter
2671         Manage_SS along with comment on its usage. Code and comment
2672         reformatting. Mark and release the secondary stack when the
2673         context warrants it.
2674         (Make_Transient_Block): Update the call
2675         to Insert_Actions_In_Scope_Around to account for parameter Manage_SS.
2676         (Wrap_Transient_Declaration): Remove local variable
2677         Uses_SS. Ensure that the secondary stack is marked and released
2678         when the related object declaration appears in a library level
2679         package or package body. Code and comment reformatting.
2680         * exp_util.ads, exp_util.adb (Build_SS_Mark_Call): New routine.
2681         (Build_SS_Release_Call): New routine.
2683 2014-07-30  Steve Baird  <baird@adacore.com>
2685         * exp_attr.adb: Revert previous change, not needed after all.
2687 2014-07-30  Vincent Celier  <celier@adacore.com>
2689         * makeutl.adb (Queue.Insert_Project_Sources): Insert with
2690         Closure => True for interfaces of Stand-Alone Libraries.
2691         * makeutl.ads (Source_Info (Format => Gprbuild)): Add new
2692         Boolean component Closure, defaulted to False.
2694 2014-07-30  Yannick Moy  <moy@adacore.com>
2696         * sem_res.adb: Fix typo in error message.
2698 2014-07-30  Robert Dewar  <dewar@adacore.com>
2700         * sem_ch3.adb (Process_Range_Expr_In_Decl): Use _FIRST/_LAST
2701         as name suffixes rather than L/H for subtype bounds.
2702         * tbuild.ads: Minor comment improvements and fixes
2703         (Make_External_Name): Document that suffix can start with an
2704         underscore.
2706 2014-07-30  Bob Duff  <duff@adacore.com>
2708         * gnat_ugn.texi: Document --rep-clauses switch.
2710 2014-07-30  Ed Schonberg  <schonberg@adacore.com>
2712         * sem_ch13.adb (Analyze_Aspect_Specifications): Default_Value and
2713         Default_Component_Value can only be specified for scalar type or
2714         arrays of scalar types respectively.  This legality check must
2715         be performed at the point the aspect is analyzed, in order to
2716         reject aspect specifications that apply to a partial view.
2718 2014-07-30  Thomas Quinot  <quinot@adacore.com>
2720         * freeze.adb: Minor reformatting.
2722 2014-07-30  Robert Dewar  <dewar@adacore.com>
2724         * exp_attr.adb (Expand_Attribute, case First/Last): Don't expand in
2725         codepeer mode.
2727 2014-07-30  Ed Schonberg  <schonberg@adacore.com>
2729         * freeze.adb (Check_Expression_Function): At the freeze point
2730         of an expression function, verify that the expression in the
2731         function does not contain references to any deferred constants
2732         that have no completion yet.
2733         (Freeze_Expression, Freeze_Before): call
2734         Check_Expression_Function.
2735         * a-ciorse.ads: Add Reference_Control_Type to detect tampering.
2736         * a-ciorse.adb: Add Adjust and Finalize routines for
2737         Reference_Control_Type. Use it in the construction of Reference
2738         and Constant_Reference values.
2740 2014-07-30  Robert Dewar  <dewar@adacore.com>
2742         * exp_aggr.adb: Update comments.
2743         * a-chtgbo.adb, a-chtgbo.ads, a-cbhase.adb, a-cbhase.ads: Minor
2744         reformatting.
2746 2014-07-30  Robert Dewar  <dewar@adacore.com>
2748         * cstand.adb (New_Standard_Entity): New version takes name
2749         string to call Make_Name.
2750         (Create_Standard): Use this routine to set name before setting other
2751         fields.
2753 2014-07-30  Robert Dewar  <dewar@adacore.com>
2755         * exp_attr.adb (Expand_Attribute, case First): Rewrite simple
2756         entity reference.
2757         (Expand_Attribute, case Last): Ditto.
2758         * exp_ch3.adb (Constrain_Index): New calling sequence for
2759         Process_Range_Expr_In_Decl.
2760         (Expand_N_Object_Declaration): Avoid setting Is_Known_Valid in one
2761         problematical case.
2762         * sem_ch3.adb (Constrain_Index): New calling sequence for
2763         Process_Range_Expr_In_Decl.
2764         (Set_Scalar_Range_For_Subtype): ditto.
2765         (Process_Range_Expr_In_Decl): Create constants to hold bounds for
2766         subtype.
2767         * sem_ch3.ads (Process_Range_Expr_In_Decl): Add Subtyp parameter.
2768         * sem_eval.adb (Compile_Time_Compare): Make sure we use base
2769         types if we are not assuming no invalid values.
2771 2014-07-30  Robert Dewar  <dewar@adacore.com>
2773         * clean.adb: Minor reformatting.
2774         * opt.ads: Minor fix to incorrect comment.
2776 2014-07-30  Ed Schonberg  <schonberg@adacore.com>
2778         * a-chtgbo.ads, a-chtgbo.adb (Delete_Node_At_Index): New
2779         subprogram, used by bounded hashed sets, to delete a node at
2780         a given index, whose element may have been improperly updated
2781         through a Reference_Preserving key.
2782         * a-cbhase.ads: Add Reference_Control_Type to package Generic_Keys.
2783         * a-cbhase.adb: Add Adjust and Finalize routines for
2784         Reference_Control_Type.
2785         (Delete, Insert): Raise Program_Error, not Constraint_Error,
2786         when operation is illegal.
2787         (Reference_Preserving_Key): Build aggregate for Reference_Control_Type
2788         * a-cmbutr.ads: Add Reference_Control_Type to detect tampering. Add
2789         private with_clause for Ada.Finalization.
2790         * a-cbmutr.adb: Add Adjust and Finalize routines for
2791         Reference_Control_Type. Use it in the construction of Reference
2792         and Constant_Reference values.
2794 2014-07-30  Robert Dewar  <dewar@adacore.com>
2796         * sem_ch3.adb, sem_ch3.ads: Minor code reorganization.
2798 2014-07-30  Pascal Obry  <obry@adacore.com>
2800         * clean.adb (Clean_Project): Properly check for directory
2801         existence before trying to enter it.
2803 2014-07-30  Robert Dewar  <dewar@adacore.com>
2805         * sem_ch3.ads, prj.ads, prj-nmsc.adb: Minor reformatting.
2807 2014-07-30  Robert Dewar  <dewar@adacore.com>
2809         * par-ch5.adb (P_Sequence_Of_Statements): Properly handle
2810         missing semicolon after name.
2812 2014-07-30  Pascal Obry  <obry@adacore.com>
2814         * prj.ads (Gprinstall_Flags): New constant.
2815         * prj-nmsc.adb (Check_Library_Attributes): Do not fails for
2816         missing library dir if Directories_Must_Exist_In_Projects
2817         is false.
2819 2014-07-30  Bob Duff  <duff@adacore.com>
2821         * a-except-2005.adb, a-except.adb: Remove obsolete comments.
2822         * s-traceb.ads: Updagte comments.
2824 2014-07-30  Robert Dewar  <dewar@adacore.com>
2826         * checks.adb, a-cihase.adb, a-cihase.ads, a-chtgop.adb, a-chtgop.ads,
2827         a-except.adb, a-except-2005.adb, a-cborse.adb, a-cborse.ads,
2828         a-exexda.adb, a-elchha.adb, exp_aggr.adb, a-cohase.adb: Minor
2829         reformatting.
2831 2014-07-30  Ed Schonberg  <schonberg@adacore.com>
2833         * a-chtgop.ads, a-chtgop.adb (Delete_Node_At_Index): New
2834         subprogram, used by all versions of hashed sets, to delete a node
2835         whose element has been improperly updated through a Reference_
2836         Preserving key.
2837         * a-cohase.adb: Remove Delete_Node, use new common procedure
2838         Delete_Node_At_Index.
2839         * a-cihase.ads: Add Reference_Control_Type to package Generic_Keys.
2840         * a-cihase.adb: Add Adjust and Finalize routines for
2841         Reference_Control_Type.
2842         (Reference_Preserving_Key): Build aggregate for
2843         Reference_Control_Type
2845 2014-07-30  Yannick Moy  <moy@adacore.com>
2847         * checks.adb, checks.ads (Determine_Range_R): New procedure to
2848         determine the possible range of a floating-point expression.
2850 2014-07-30  Ed Schonberg  <schonberg@adacore.com>
2852         * a-cborse.ads: Add Reference_Control_Type to package Generic_Keys.
2853         * a-cborse.adb: Add Adjust and Finalize routines for
2854         Reference_Control_Type.
2855         (Reference_Preserving_Key): Build aggregate for
2856         Reference_Control_Type.
2857         (Delete): Check for tampering, and raise Program_Error (not
2858         Constraint_Error) when attempting to delete an element not in
2859         the set.
2860         (Insert): Ditto.
2862 2014-07-30  Bob Duff  <duff@adacore.com>
2864         * a-elchha.adb, a-except-2005.adb, a-except.adb, a-exexda.adb,
2865         * a-exextr.adb, a-exstat.adb, exp_intr.ads, s-tassta.adb:
2866         Exception_Information is used to produce useful debugging
2867         information for the programmer. However, it was also used to
2868         implement the stream attributes for type Exception_Occurrence. The
2869         latter requires a stable and portable interface, which meant
2870         that we couldn't include a symbolic traceback. A separate set of
2871         routines was used to provide symbolic tracebacks under program
2872         control (i.e. not automatically). The goal of this ticket is
2873         to provide such automatic tracebacks, so the change here is to
2874         split the two functionalities: Exception_Information gives the
2875         maximally useful information for debugging (i.e. it now includes
2876         a symbolic traceback when a decorator is set, and it can be
2877         improved freely in the future without disturbing streaming).
2878         Untailored_Exception_Information always uses hexadecimal addresses
2879         in the traceback, has a stable and portable output, and is now
2880         used for streaming.
2882 2014-07-30  Eric Botcazou  <ebotcazou@adacore.com>
2884         * exp_aggr.adb (Expand_Array_Aggregate): Add missing test
2885         on the target of the assignment to find out whether it
2886         can be directly done by the back-end.
2887         * exp_util.adb (Is_Possibly_Unaligned_Slice): Remove obscure test.
2889 2014-07-30  Robert Dewar  <dewar@adacore.com>
2891         * inline.adb, a-coorse.adb, a-coorse.ads, a-cohase.adb, a-cohase.ads,
2892         a-tasatt.adb: Minor reformatting.
2894 2014-07-30  Robert Dewar  <dewar@adacore.com>
2896         * exp_ch4.adb: Minor reformatting.
2898 2014-07-30  Ed Schonberg  <schonberg@adacore.com>
2900         * a-coorse.adb, a-coorse.ads (Generic_Keys): Add a
2901         Reference_Control_Type to generic package, to keep additional
2902         information for Reference_Types that manipulate keys. Add Adjust and
2903         Finalize procedures for this type.
2904         (Finalize): When finalizing a reference_preserving_key, verify
2905         that the key of the new value is equivalent to the key of the
2906         original element, raise Program_Error otherwise.
2907         (Insert): Detect tampering.
2908         (Reference_Preserving_Key): Build proper Reference_Control_Type,
2909         and update Busy and Lock bits to detect tampering.
2910         * a-cohase.ads: Keep with-clause private.
2912 2014-07-30  Hristian Kirtchev  <kirtchev@adacore.com>
2914         * exp_ch4.adb (Expand_N_Op_Eq): Emit a warning when the operands
2915         of an equality are of an Unchecked_Union type and lack inferable
2916         discriminants.
2918 2014-07-30  Bob Duff  <duff@adacore.com>
2920         * g-exctra.adb, g-exctra.ads, s-exctra.adb, s-exctra.ads, Makefile.rtl,
2921         g-trasym.adb, g-trasym.ads, s-trasym.adb, s-trasym.ads: Move
2922         GNAT.Traceback.Symbolic and GNAT.Exception_Traces into the System
2923         hierarchy (System.Traceback.Symbolic and System.Exception_Traces), so
2924         we can call them from the runtimes. Leave renamings in place under GNAT.
2926 2014-07-30  Yannick Moy  <moy@adacore.com>
2928         * inline.adb (Check_And_Build_Body_To_Inline): Include code for
2929         inlining in GNATprove mode.
2931 2014-07-30  Ed Schonberg  <schonberg@adacore.com>
2933         * a-cohase.adb, a-cohase.ads (Generic_Keys): Add a
2934         Reference_Control_Type to generic package, to keep additional
2935         information for Reference_Types that manipulate keys. Add Adjust and
2936         Finalize procedures for this type.
2937         (Delete_Node): New procedure called when finalizing a
2938         Reference_Control_Type, to remove a node whose element has been
2939         improperly updated through a Reference.
2940         (Insert): Detect tampering.
2941         (Reference_Preserving_Key): Build proper Reference_Control_Type,
2942         and update Busy and Lock bits to detect tampering.
2944 2014-07-30  Bob Duff  <duff@adacore.com>
2946         * exp_intr.ads: Minor comment fix.
2948 2014-07-30  Gary Dismukes  <dismukes@adacore.com>
2950         * exp_prag.adb, a-tags.ads: Minor typo fixes.
2952 2014-07-30  Bob Duff  <duff@adacore.com>
2954         * a-excach.adb, a-excach-cert.adb, a-except-2005.ads,
2955         a-except.ads, g-traceb.adb, memtrack.adb,
2956         s-traceb.adb, s-traceb.ads, s-traceb-hpux.adb, s-traceb-mastop.adb:
2957         Cleanup: Make the three versions of System.Traceback.Call_Chain
2958         have the same interface. Use an array for the Traceback parameter
2959         instead of an Address.  This will enable reduction in code
2960         duplication.
2962 2014-07-30  Pat Rogers  <rogers@adacore.com>
2964         * gnat_ugn.texi: Corrected minor textual error in description
2965         of switch -gnatwl.
2967 2014-07-30  Bob Duff  <duff@adacore.com>
2969         * Makefile.rtl: Sort file names.
2971 2014-07-30  Arnaud Charlet  <charlet@adacore.com>
2973         * a-tasatt.adb: Complete previous change: kill spurious warning
2974         on e.g. sparc, and make sure we only use the fast path when the
2975         alignment is compatible.
2977 2014-07-30  Yannick Moy  <moy@adacore.com>
2979         * sem_ch6.adb (Analyze_Subprogram_Body_Helper): Mark new Spec_Id as
2980         coming from source.
2982 2014-07-30  Yannick Moy  <moy@adacore.com>
2984         * inline.adb (Build_Body_To_Inline): Issue more precise messages
2985         for declarations that prevent inlining.
2986         (Cannot_Inline): Change usual start of message to refer to contextual
2987         analysis in GNATprove mode.
2988         * sem_res.adb (Resolve_Call): Change usual start of message to
2989         refer to contextual analysis in GNATprove mode, when inlining
2990         not possible.
2992 2014-07-30  Robert Dewar  <dewar@adacore.com>
2994         * sem_res.adb, sem_ch6.adb: Minor code reorganization.
2995         * inline.adb: Minor reformatting.
2997 2014-07-30  Javier Miranda  <miranda@adacore.com>
2999         * a-tags.ads: Add comments.
3001 2014-07-30  Pat Rogers  <rogers@adacore.com>
3003         * gnat_rm.texi: Minor word error.
3005 2014-07-30  Ed Schonberg  <schonberg@adacore.com>
3007         * exp_prag.adb (Expand_Old): Insert declarationss of temporaries
3008         created to capture the value of the prefix of 'Old at the
3009         beginning of the current declarative part, to prevent data flow
3010         anomalies in the postcondition procedure that will follow.
3012 2014-07-30  Yannick Moy  <moy@adacore.com>
3014         * debug.adb: Retire debug flag -gnatdQ.
3015         * inline.adb (Can_Be_Inlined_In_GNATprove_Mode): Check SPARK_Mode
3016         on decl, not on body.  Ignore predicate functions.
3017         * sem_ch6.adb (Analyze_Subprogram_Body_Helper): Remove use of
3018         debug flag -gnatdQ.  Correctly analyze SPARK_Mode on decl and
3019         body when generating a decl for a body on which SPARK_Mode aspect
3020         is given.
3021         * sem_prag.adb (Analyze_Pragma|SPARK_Mode): Reorder tests for
3022         attaching pragma to entity, to account for declaration not coming
3023         from source.
3024         * sem_res.adb (Resolve_Call): Issue warning and flag subprogram
3025         as not always inlined in GNATprove mode, when called in an
3026         assertion context.
3028 2014-07-30  Vincent Celier  <celier@adacore.com>
3030         * debug.adb: Minor comment update.
3032 2014-07-30  Robert Dewar  <dewar@adacore.com>
3034         * s-tasuti.adb, s-tassta.adb: Minor reformatting.
3035         * sprint.adb (Sprint_Node): Handle N_Contract case.
3036         * exp_prag.adb: Minor reformatting.
3037         * freeze.adb (Freeze_Entity): Check useless postcondition for
3038         No_Return subprogram.
3039         * sem_prag.adb: Minor reformatting.
3041 2014-07-30  Javier Miranda  <miranda@adacore.com>
3043         * a-tags.ads: Complete comments about performance.
3045 2014-07-30  Fedor Rybin  <frybin@adacore.com>
3047         * gnat_ugn.texi: Adding description for --exit-status option to
3048         gnattest section.  Fixing index entry of --passed-tests option
3049         in gnattest section.
3051 2014-07-30  Javier Miranda  <miranda@adacore.com>
3053         * Makefile.rtl, gnat_rm.texi, i-cpp.adb, i-cpp.ads, impunit.adb,
3054         rtsfind.ads: Remove references to package Interfaces.CPP since this
3055         package is no longer needed.
3057 2014-07-30  Bob Duff  <duff@adacore.com>
3059         * s-taasde.adb (Timer_Queue): Don't use a
3060         build-in-place function call to initialize the Timer_Queue.
3061         * s-traent.adb, s-traent.ads, s-traent-vms.adb, s-traent-vms.ads:
3062         Turn off polling in these units, because otherwise we get
3063         elaboration circularities with Ada.Exceptions when the -gnatP
3064         switch is used.
3065         * s-tassta.adb (Create_Task): Make sure independent tasks
3066         are created with Parent = Environment_Task. This was not true,
3067         for example, in s-interr.adb, when Interrupt_Manager does "new
3068         Server_Task"; the Server_Task had Parent = Interrupt_Manager,
3069         which is wrong because the master is determined by the access
3070         type, which is at library level.
3071         * s-tasuti.adb (Make_Independent): Avoid setting Parent; it is
3072         now set correctly by Create_Task.
3073         (Make_Passive): Remove the workaround for the race condition in
3074         Make_Independent.
3075         * frontend.adb (Frontend): Revert to previous method of detecting
3076         temporary configuration pragma files, recognizing such files by
3077         ".tmp" in the name. This is more general than detecting pragmas
3078         Source_File_Name_Project, because it allows any tool to use
3079         this naming convention, no matter the content of the file.
3080         * gnat_ugn.texi: Document this naming convention.
3082 2014-07-30  Robert Dewar  <dewar@adacore.com>
3084         * exp_ch7.adb, s-tataat.adb, s-tataat.ads, s-parame-vms-alpha.ads,
3085         inline.adb, s-parame-hpux.ads, exp_smem.adb, s-tasini.adb,
3086         s-tasini.ads, s-parame-vms-ia64.ads, s-parame.ads, s-taskin.ads,
3087         s-parame-vxworks.ads, a-tasatt.adb, a-tasatt.ads: Minor reformatting.
3088         * a-suenco.adb (Convert): Handle overlong encodings in UTF8-UTF8
3089         conversion.
3091 2014-07-30  Ed Schonberg  <schonberg@adacore.com>
3093         * sem_ch5.adb: Improve error recovery.
3094         * inline.adb (Build_Body_To_Inline): Set Full_Analysis to false
3095         before analyzing the body, so that in GNATprove mode there is
3096         no light expansion. Whatever expansion is required by SPARK will
3097         be performed when analysing the inlined code.
3099 2014-07-30  Bob Duff  <duff@adacore.com>
3101         * s-tataat.adb, s-tataat.ads, a-tasatt.adb: Minor comment fixes.
3103 2014-07-30  Ed Schonberg  <schonberg@adacore.com>
3105         * sem_ch5.adb (Analyze_Loop_Statement): If loop has a label,
3106         verify that it is not hidden by an inner implicit declaration.
3108 2014-07-30  Thomas Quinot  <quinot@adacore.com>
3110         * sem.ads (Scope_Table_Entry): New component Locked_Shared_Objects.
3111         * sem_ch8.adb (Push_Scope): Initialize Locked_Shared_Objects.
3112         * exp_smem.adb (Add_Shared_Var_Lock_Procs): Handle the case where
3113         the call returns an unconstrained type: in this case there is
3114         already a transient scope, and we should not establish a new one.
3115         * exp_ch7.adb (Insert_Actions_In_Scope_Around): New formal Clean. If
3116         True, also insert cleanup actions in the tree.
3117         (Wrap_Transient_Declaration): Call Insert_Actions_In_Scope_Around
3118         with Clean set True.
3120 2014-07-30  Arnaud Charlet  <charlet@adacore.com>
3122         * s-taskin.ads (Direct_Index, Direct_Index_Range,
3123         Direct_Attribute_Element, Direct_Attribute_Array,
3124         Direct_Index_Vector, Direct_Attributes, Is_Defined,
3125         Indirect_Attributes): Removed.  (Atomic_Address,
3126         Attribute_Array, Attributes): New.
3127         * s-tasini.ads, s-tasini.adb (Proc_T, Initialize_Attributes,
3128         Finalize_Attributes_Link, Initialize_Attributes_Link): Removed.
3129         (Finalize_Attributes): Reimplement.
3130         * s-tassta.adb (Create_Task): Remove call to
3131         Initialize_Attributes_Link (Free_Task, Vulnerable_Free_Task):
3132         Replace Finalize_Attributes_Link by Finalize_Attributes.
3133         * a-tasatt.ads, a-tasatt.adb, s-tataat.ads, s-tataat.adb:
3134         Reimplement from scratch, using a simpler and more efficient
3135         implementation.
3136         * s-tporft.adb (Register_Foreign_Thread): Remove now obsolete comment.
3137         * s-parame.ads, s-parame-hpux.ads,
3138         * s-parame-vms-alpha.ads, s-parame-vms-ia64.ads,
3139         * s-parame-vxworks.ads (Max_Attribute_Count): New, replace
3140         Default_Attribute_Count.
3142 2014-07-30  Olivier Hainque  <hainque@adacore.com>
3144         * vxworks-ppc-link.spec: New file. Extra link
3145         instructions for ppc-vxworks.
3146         * vxworks-crtbe-link.spec: Likewise, for ZCX related support.
3147         * system-vxworks-ppc.ads: Adjust linker options to use spec files.
3148         * system-vxworks-arm.ads: Likewise.
3149         * gcc-interface/Makefile.in: Enable .spec files.
3151 2014-07-30  Ed Schonberg  <schonberg@adacore.com>
3153         * sem_aggr.adb: Minor comment reformatting.
3155 2014-07-30  Robert Dewar  <dewar@adacore.com>
3157         * sem_util.ads, sem_util.adb (Is_Junk_Name): Removed.
3158         * sem_warn.adb (Has_Junk_Name): New function
3159         (Check_References): Use Has_Junk_Name to delete junk warnings
3160         (Check_Unset_Reference): ditto.
3161         (Warn_On_Unreferenced_Entity): ditto.
3162         (Warn_On_Useless_Assignment): ditto.
3164 2014-07-30  Ed Schonberg  <schonberg@adacore.com>
3166         * checks.adb (Insert_Valid_Check): Do not check for the packed
3167         array type of a prefix that is an access type.
3169 2014-07-30  Ed Schonberg  <schonberg@adacore.com>
3171         * sem_attr.adb (Eval_Attribute): Evaluate the GNAT attribute
3172         Unconstrained_Array even if prefix is not frozen yet, as can
3173         occur with a private subtype used as a generic actual.
3175 2014-07-30  Gary Dismukes  <dismukes@adacore.com>
3177         * sem_attr.adb: Minor reformatting.
3179 2014-07-30  Pat Rogers  <rogers@adacore.com>
3181         * gnat_rm.texi: Corrected minor wording error in description
3182         of No_Exception_Registration.
3184 2014-07-30  Yannick Moy  <moy@adacore.com>
3186         * einfo.ads, einfo.adb: New flag Is_Inlined_Always for use in GNATprove
3187         mode. Realphabetize two subprograms.
3188         * inline.adb (Cannot_Inline): Use Is_Inlined_Always in GNATprove mode.
3189         (Can_Be_Inlined_In_GNATprove_Mode): Adapt to possible Empty Body_Id.
3190         (Check_And_Build_Body_To_Inline): Use Is_Inlined_Always in GNATprove
3191         mode.
3192         (Expand_Inline_Call): Use Is_Inlined_Always in GNATprove mode.
3193         * sem_ch6.adb (Analyze_Subprogram_Body_Helper): Do not use
3194         Is_Inline in GNATprove mode.
3195         (Analyze_Subprogram_Specification):
3196         Set Is_Inlined_Always at subprogram entity creation.
3197         * sem_res.adb (Resolve_Call): Do not deal with inlining during
3198         pre-analysis.  Issue warning on call to possibly inlined
3199         subprogram when body not seen.
3201 2014-07-30  Yannick Moy  <moy@adacore.com>
3203         * lib-xref.adb (Generate_Reference): Add special
3204         case for compiler-generated formals in GNATprove mode.
3206 2014-07-30  Yannick Moy  <moy@adacore.com>
3208         * sem_ch6.adb: Add comments.
3210 2014-07-30  Thomas Quinot  <quinot@adacore.com>
3212         * s-os_lib.ads (GM_Time_Of): Clarify documentation.
3214 2014-07-30  Robert Dewar  <dewar@adacore.com>
3216         * sem_aggr.adb, sem_res.adb: Minor reformatting.
3218 2014-07-30  Thomas Quinot  <quinot@adacore.com>
3220         * sem_ch13.adb (Analyze_Attribute_Definition_Clause, case
3221         Bit_Order): Set Reverse_Bit_Order on the base type of the
3222         specified first subtype.
3224 2014-07-30  Ed Schonberg  <schonberg@adacore.com>
3226         * inline.adb (Expand_Inlined_Call): Use a renaming declaration
3227         to capture the value of actuals of a limited type rather than
3228         an object declaration, to prevent spurious errors when analyzing
3229         the inlined body.
3231 2014-07-30  Ed Schonberg  <schonberg@adacore.com>
3233         * sem_ch4.adb (Analyze_Type_Conversion): Treat an inlined body
3234         as an instance, and inhibit semantic checks on already analyzed
3235         code to prevent spurious errors.
3237 2014-07-30  Arnaud Charlet  <charlet@adacore.com>
3239         * a-exctra.ads ("="): New function, to restore compatibility.
3241 2014-07-30  Pascal Obry  <obry@adacore.com>
3243         * adaint.c (__gnat_to_os_time): Set isdst to -1 for the mktime
3244         routine to use the OS dst setting.
3246 2014-07-30  Pat Rogers  <rogers@adacore.com>
3248         * gnat_ugn.texi: Minor correction to description of -gnatw.K.
3250 2014-07-30  Ed Schonberg  <schonberg@adacore.com>
3252         * sem_util.adb (Wrong_Type): Disable some checks equally within
3253         instances and within inlined bodies, to suppress spurious type
3254         errors on already analyzed code.
3255         * sem_aggr.adb (Check_Expr_OK_In_Limited_Aggregate): Expression
3256         is legal in an inlined body, juts as it is in an instance body.
3258 2014-07-30  Ed Schonberg  <schonberg@adacore.com>
3260         * sem_res.adb (Resolve_Unchecked_Conversion): Within an inlined
3261         body the operand of an unchecked conversion may be a literal, in
3262         which case its type is the target type of the conversion. This
3263         is in contrast to conversions in other contexts, where the
3264         operand cannot be a literal and must be resolvable independent
3265         of the context.
3267 2014-07-30  Pierre-Marie Derodat  <derodat@adacore.com>
3269         * gcc-interface/decl.c (gnat_to_gnu_entity) <object>: Create a
3270         mere scalar constant instead of a reference for a renaming of
3271         scalar literal.
3272         * gcc-interface/utils.c (renaming_from_generic_instantiation_p): New.
3273         * gcc-interface/gigi.h (renaming_from_generic_instantiation_p): New.
3275 2014-07-30  Robert Dewar  <dewar@adacore.com>
3277         * s-tasuti.adb, s-tasuti.ads, einfo.ads, sem_prag.adb, s-taasde.adb,
3278         g-socthi-vms.adb, s-taprop-mingw.adb, s-interr.adb, s-interr-hwint.adb,
3279         g-decstr.adb, s-tasdeb-vms.adb, g-expect-vms.adb, makeutl.adb,
3280         s-interr-vms.adb, g-socthi.adb, exp_aggr.adb, s-tasdeb.adb,
3281         g-awk.adb, gnatls.adb, s-taspri-posix.ads, g-catiio.adb,
3282         s-interr-sigaction.adb, s-os_lib.adb, s-fileio.adb: Minor reformatting
3283         & code reorganization.
3285 2014-07-30  Bob Duff  <duff@adacore.com>
3287         * s-tassta.adb, sem_util.ads: Minor reformatting.
3289 2014-07-30  Yannick Moy  <moy@adacore.com>
3291         * inline.adb (Build_Body_To_Inline): Detect when
3292         subprogram has multiple returns, or not a single last return
3293         statement, in GNATprove mode.
3294         (Cannot_Inline): Simplify logic to handle case of GNATprove
3295         inlining first.
3297 2014-07-30  Ed Schonberg  <schonberg@adacore.com>
3299         * sem_ch6.adb: Stubs are not subject to inlining.
3301 2014-07-30  Bob Duff  <duff@adacore.com>
3303         * s-tasuti.ads, s-tasuti.adb (Make_Independent): Change this
3304         from a procedure to a function, so that it can more easily be
3305         called before the "begin" of a task.
3306         * s-taasde.ads (Delay_Block): Make this type immutably limited,
3307         so we can use a build-in-place function call to initialize
3308         Timer_Queue in the body.
3309         * a-rttiev.adb, s-asthan-vms-alpha.adb, s-asthan-vms-ia64.adb,
3310         * s-interr.adb, s-interr-hwint.adb, s-interr-sigaction.adb,
3311         * s-interr-vms.adb, s-taasde.adb: Each independent task now calls
3312         Make_Independent before reaching its "begin", to avoid race
3313         conditions. This causes the activating task to wait until after
3314         Make_Independent is complete before proceeding.  In addition,
3315         we initialize data structures used by independent tasks before
3316         activating those tasks, to avoid possible use of uninitialized data.
3317         * s-interr.ads, s-intman.ads, s-taspri-posix.ads, s-tasdeb.ads:
3318         Minor comment fixes.
3320 2014-07-30  Bob Duff  <duff@adacore.com>
3322         * a-exctra.ads, s-traent-vms.ads, s-traent.ads (Tracebacks_Array): Move
3323         the declaration of Tracebacks_Array from Ada.Exceptions.Traceback to
3324         System.Traceback_Entries (s-traent.ads and s-traent-vms.ads).  Add
3325         subtypes renaming Tracebacks_Array in Ada.Exceptions.Traceback.
3326         * g-debpoo.adb: Refer to Tracebacks_Array in its new home.
3328 2014-07-30  Arnaud Charlet  <charlet@adacore.com>
3330         * a-tasatt.adb: Remove old comments.
3332 2014-07-30  Yannick Moy  <moy@adacore.com>
3334         * einfo.ads (Is_Inlined): Document new use in GNATprove mode.
3335         * inline.adb (Can_Be_Inlined_In_GNATprove_Mode): Add comments
3336         to explain rationale for inlining or not in GNATprove mode.
3337         (Expand_Inlined_Call): In GNATprove mode, set Is_Inlined flag
3338         to False when inlining is not possible.
3339         * sem_ch6.adb (Analyze_Subprogram_Body_Helper): Set Is_Inlined
3340         flag to indicate that subprogram is fully inlined. To be reversed
3341         if inlining problem is found.
3342         * sem_res.adb (Resolve_Call): Set Is_Inlined flag to False when
3343         call in potentially unevaluated context.
3345 2014-07-30  Jose Ruiz  <ruiz@adacore.com>
3347         * s-tarest.adb, s-tarest.ads: Fix comments.
3349 2014-07-30  Robert Dewar  <dewar@adacore.com>
3351         * exp_attr.adb, checks.adb, sem_util.adb, sem_util.ads, sem_attr.adb:
3352         Change No_Scalar_Parts predicate to Scalar_Part_Present and
3353         invert sense of test. This avoids the "not No_xxx" situation
3354         which is always ugly.
3356 2014-07-30  Ed Schonberg  <schonberg@adacore.com>
3358         * inline.adb (Expand_Inlined_Call): When generating code for
3359         an internal subprogram the expansion uses the location of the
3360         call, so that gdb can skip over it. In GNATprove mode we want to
3361         preserve slocs of original subprogram when expanding an inlined
3362         call, to obtain better warnings, even though subprogram appears
3363         not to come from source if it is the inlining of a subprogram
3364         body without a previous spec.
3366 2014-07-30  Eric Botcazou  <ebotcazou@adacore.com>
3368         * exp_aggr.adb (Aggr_Assignment_OK_For_Backend): Reject array
3369         types with atomic components.
3371 2014-07-30  Thomas Quinot  <quinot@adacore.com>
3373         * Make-generated.in: Remove now unnecessary targets after s-oscons
3374         reorg.
3376 2014-07-30  Yannick Moy  <moy@adacore.com>
3378         * sem_res.adb (Resolve_Call): Use ultimate alias
3379         of callee when available.
3381 2014-07-30  Ed Schonberg  <schonberg@adacore.com>
3383         * sem_ch6.adb (Analyze_Expression_Function): To check whether
3384         an expression function is a completion, use the specification of
3385         the previous declaration, not its entity, which may be internally
3386         generated in an inlined context.
3388 2014-07-30  Doug Rupp  <rupp@adacore.com>
3390         * adaint.c (__gnat_tmp_name) [__ANDROID__]: Default to putting
3391         temp files in /cache directory unless overridden by TMPDIR.
3393 2014-07-30  Jose Ruiz  <ruiz@adacore.com>
3395         * s-tassta.adb, s-tarest.adb (Initialize, Create_Task,
3396         Create_Restricted_Task): Remove redundant check. Number_Of_CPUs returns
3397         type CPU, so it can never be greater than CPU_Range'Last.
3399 2014-07-30  Bob Duff  <duff@adacore.com>
3401         * s-taskin.ads: Minor comment fix.
3403 2014-07-30  Thomas Quinot  <quinot@adacore.com>
3405         * g-socket.adb: Remove now useless WITH, USE, and USE TYPE
3406         clauses.
3408 2014-07-30  Yannick Moy  <moy@adacore.com>
3410         * debug.adb: Free debug flag dQ used for frontend inlining in
3411         GNATprove mode..
3412         * sem_ch6.adb (Analyze_Subprogram_Body_Helper): Remove test of
3413         debug flag..
3415 2014-07-30  Thomas Quinot  <quinot@adacore.com>
3417         * Make-generated.in: Remove generation of s-oscons.ads, only
3418         generate the xoscons utility, in runtime-agnostic rules.
3419         * gcc-interface/Makefile.in: Clean up rules. Remove VMS parts,
3420         no longer supported.
3422 2014-07-30  Bob Duff  <duff@adacore.com>
3424         * exp_ch6.adb (Add_Task_Actuals_To_Build_In_Place_Call): New
3425         parameter Chain to be used in the allocator case.
3426         (Make_Build_In_Place_Call_In_Allocator): If the allocated object
3427         has tasks, wrap the code in a block that will activate them,
3428         including the usual finalization code to kill them off in case
3429         of exception or abort.
3431 2014-07-30  Robert Dewar  <dewar@adacore.com>
3433         * treepr.adb, treepr.ads; Reorganize documentation for new pp routines
3434         Remove renamings (don't work for gdb).
3435         (par): New synonym for p (avoid gdb ambiguities).
3436         * inline.adb, sem_ch6.adb, sem_ch13.adb: Minor reformatting.
3438 2014-07-30  Bob Duff  <duff@adacore.com>
3440         * exp_ch9.ads, sem_prag.adb, exp_ch4.adb, sem_ch13.adb: Minor comment
3441         fixes.
3442         * treepr.ads, treepr.adb (ppp): Make this debugging routine
3443         accept any type covered by Union_Id.
3445 2014-07-30  Robert Dewar  <dewar@adacore.com>
3447         * sem_ch4.adb (Analyze_If_Expression): Resolve condition before
3448         analyzing branches.
3449         * sem_eval.adb (Out_Of_Range): Check for statically unevaluated
3450         expression case.
3452 2014-07-30  Robert Dewar  <dewar@adacore.com>
3454         * sem_ch13.adb (Analyze_Aspect, predicate cases): Diagnose use
3455         of predicate aspect on entity other than a type.
3457 2014-07-30  Ed Schonberg  <schonberg@adacore.com>
3459         * sem_ch6.adb (Body_Has_Contract): New predicate to determine
3460         when a subprogram body without a previous spec cannot be inlined
3461         in GNATprove mode, because it includes aspects or pragmas that
3462         generate a SPARK contract clause.
3463         * inline.adb (Can_Be_Inlined_In_GNATprove_Mode): A subprogram
3464         instance cannot be inlined.
3466 2014-07-30  Robert Dewar  <dewar@adacore.com>
3468         * debug.adb: Document that d7 suppresses compilation time output.
3469         * errout.adb (Write_Header): Include compilation time in
3470         header output.
3471         * exp_intr.adb (Expand_Intrinsic_Call): Add
3472         Compilation_Date/Compilation_Time (Expand_Source_Info): Expand
3473         Compilation_Date/Compilation_Time.
3474         * g-souinf.ads (Compilation_Date): New function
3475         (Compilation_Time): New function.
3476         * gnat1drv.adb (Gnat1drv): Set Opt.Compilation_Time.
3477         * gnat_rm.texi (Compilation_Date): New function
3478         (Compilation_Time): New function.
3479         * opt.ads (Compilation_Time): New variable.
3480         * s-os_lib.ads, s-os_lib.adb (Current_Time_String): New function.
3481         * sem_intr.adb (Compilation_Date): New function.
3482         (Compilation_Time): New function.
3483         * snames.ads-tmpl (Name_Compilation_Date): New entry.
3484         (Name_Compilation_Time): New entry.
3486 2014-07-30  Yannick Moy  <moy@adacore.com>
3488         * inline.adb: Add comment.
3490 2014-07-30  Ed Schonberg  <schonberg@adacore.com>
3492         * par-ch4.adb (Is_Parameterless_Attribute): 'Result is a
3493         parameterless attribute, and a postondition can mention an
3494         indexed component or a slice whose prefix is an attribute
3495         reference F'Result.
3497 2014-07-30  Robert Dewar  <dewar@adacore.com>
3499         * sprint.adb (Sprint_Node_Actual, case Object_Declaration):
3500         Avoid bomb when printing package Standard.
3502 2014-07-30  Ed Schonberg  <schonberg@adacore.com>
3504         * sem_elab.adb (Check_Internal_Call_Continue): If an elaboration
3505         entity is created at this point, ensure that the name of the
3506         flag is unique, because the subprogram may be overloaded and
3507         other homonyms may also have elaboration flags created on the fly.
3509 2014-07-30  Hristian Kirtchev  <kirtchev@adacore.com>
3511         * sem_attr.adb (Analyze_Array_Component_Update): New routine.
3512         (Analyze_Attribute): Major cleanup of attribute
3513         'Update. The logic is now split into two distinct routines
3514         depending on the type of the prefix. The use of <> is now illegal
3515         in attribute 'Update.
3516         (Analyze_Record_Component_Update): New routine.
3517         (Check_Component_Reference): Removed.
3518         (Resolve_Attribute): Remove the return statement and ??? comment
3519         following the processing for attribute 'Update. As a result,
3520         the attribute now freezes its prefix.
3522 2014-07-30  Javier Miranda  <miranda@adacore.com>
3524         * exp_ch4.adb (Apply_Accessibility_Check): Do
3525         not call Base_Address() in VM targets.
3527 2014-07-30  Yannick Moy  <moy@adacore.com>
3529         * gnat1drv.adb (Adjust_Global_Switches): Set
3530         Ineffective_Inline_Warnings to True in GNATprove mode.
3531         * inline.adb (Cannot_Inline): Prepare new semantics for GNATprove
3532         mode of inlining.
3533         * opt.ads (Ineffective_Inline_Warnings): Add comment that
3534         describes use in GNATprove mode.
3535         * sem_prag.adb (Analyze_Pragma|SPARK_Mode): Ignore
3536         pragma when applied to the special body created for inlining.
3538 2014-07-30  Robert Dewar  <dewar@adacore.com>
3540         * inline.adb, exp_ch4.adb, sinput.adb, sem_ch6.adb, sem_ch13.adb:
3541         Minor reformatting.
3543 2014-07-30  Hristian Kirtchev  <kirtchev@adacore.com>
3545         * aspects.ads Add a comment explaining why SPARK 2014 aspects are
3546         not delayed. Update the delay status of most SPARK 2014 aspects.
3547         * sem_ch13.adb (Analyze_Aspect_Specifications): Update all calls
3548         to Decorate_Aspect_And_Pragma and Insert_Delayed_Pragma to refert
3549         to Decorate and Insert_Pragma. Add various comments concerning
3550         the delay status of several SPARK 2014 aspects. The insertion
3551         of Refined_State now uses routine Insert_After_SPARK_Mode.
3552         (Decorate): New routine.
3553         (Decorate_Aspect_And_Pragma): Removed.
3554         (Insert_Delayed_Pragma): Removed.
3555         (Insert_Pragma): New routine.
3557 2014-07-30  Ed Schonberg  <schonberg@adacore.com>
3559         * inline.adb (Expand_Inlined_Call): In GNATprove mode, emit
3560         only a warning, not an error on an attempt to inline a recursive
3561         subprogram.
3563 2014-07-30  Robert Dewar  <dewar@adacore.com>
3565         * g-forstr.adb: Minor code reorganization (use J rather than I
3566         as a variable name).
3567         * gnat_rm.texi, sem_prag.adb, sem_util.adb, sem_ch13.adb,
3568         g-forstr.ads: Minor reformatting.
3570 2014-07-30  Eric Botcazou  <ebotcazou@adacore.com>
3572         * sprint.adb (Set_Debug_Sloc): Also reset the end location if
3573         we are debugging the generated code.
3575 2014-07-30  Yannick Moy  <moy@adacore.com>
3577         * sinput.ads, sinput.adb (Comes_From_Inlined_Body): New function that
3578         returns True for source pointer for an inlined body.
3580 2014-07-30  Javier Miranda  <miranda@adacore.com>
3582         * exp_ch4.adb (Apply_Accessibility_Check): Add
3583         missing calls to Base_Address().
3585 2014-07-30  Ed Schonberg  <schonberg@adacore.com>
3587         * sem_ch6.adb (Hanalyze_Subprogram_Body_Helper): In GNATprove
3588         mode, subprogram bodies without a previous declaration are also
3589         candidates for front-end inlining.
3591 2014-07-30  Hristian Kirtchev  <kirtchev@adacore.com>
3593         * aspects.ads Aspects Async_Readers, Async_Writers,
3594         Effective_Reads and Effective_Writes do not need to be delayed.
3595         * sem_ch13.adb (Analyze_Aspect_Specifications): Propagate the
3596         optional Boolean expression when generating the corresponding
3597         pragma for an external property aspect.
3598         * sem_prag.adb (Analyze_External_Property_In_Decl_Part): Remove
3599         local constant Obj. Add local constant Obj_Id. Reimplement the
3600         check which ensures that the related variable is in fact volatile.
3601         (Analyze_Pragma): Reimplement the analysis of external property pragmas.
3602         * sem_util.adb (Is_Enabled): New routine.
3603         (Variable_Has_Enabled_Property): Reimplement the detection of
3604         an enabled external property.
3606 2014-07-30  Sergey Rybin  <rybin@adacore.com frybin>
3608         * gnat_ugn.texi, vms_data.ads: gnatstub: describe generating subunits
3609         for body stubs.
3611 2014-07-30  Pascal Obry  <obry@adacore.com>
3613         * g-forstr.adb, g-forstr.ads: New.
3614         * gnat_rm.texi, impunit.adb Makefile.rtl: Add new unit
3615         GNAT.Formatted_String.
3617 2014-07-30  Eric Botcazou  <ebotcazou@adacore.com>
3619         * exp_aggr.adb (Aggr_Assignment_OK_For_Backend): New predicate.
3620         (Expand_Array_Aggregate): Also enable in-place expansion for
3621         code generated by the compiler.  For an object declaration,
3622         set the kind of the object in addition to its type.  If an
3623         in-place assignment is to be generated and it can be directly
3624         done by the back-end, do not expand the aggregate.
3625         * fe.h (Is_Others_Aggregate): Declare.
3626         * gcc-interface/trans.c
3627         (gnat_to_gnu) <N_Assignment_Statement>: Add support for an
3628         aggregate with a single Others choice on the RHS by means of
3629         __builtin_memset.  Tidy up.
3631 2014-07-30  Ed Schonberg  <schonberg@adacore.com>
3633         * gnat_rm.texi: minor reformatting.
3635 2014-07-30  Yannick Moy  <moy@adacore.com>
3637         * sem_ch6.adb (Analyze_Subprogram_Helper_Body): Remove body to inline
3638         in SPARK_Mode Off.
3640 2014-07-30  Robert Dewar  <dewar@adacore.com>
3642         * gnat_rm.texi: Document additional implementation-defined use
3643         of Constrained.
3645 2014-07-30  Robert Dewar  <dewar@adacore.com>
3647         * prj-proc.adb, prj-strt.adb: Update comments.
3649 2014-07-30  Gary Dismukes  <dismukes@adacore.com>
3651         * sinfo.ads, einfo.ads, checks.ads: Minor typo fix and reformatting.
3653 2014-07-30  Vincent Celier  <celier@adacore.com>
3655         * prj-proc.adb (Imported_Or_Extended_Project_From): New Boolean
3656         parameter No_Extending, defaulted to False. When No_Extending
3657         is True, do not look for an extending project.
3658         (Expression): For a variable reference that is not for the current
3659         project, get its Id calling Imported_Or_Extended_Project_From
3660         with No_Extending set to True.
3661         * prj-strt.adb (Parse_Variable_Reference): If a referenced
3662         variable is not found in the current project, check if it is
3663         defined in one of the projects it extends.
3665 2014-07-30  Robert Dewar  <dewar@adacore.com>
3667         * sem_util.adb (Predicate_Tests_On_Arguments): Omit tests for
3668         some additional cases of internally generated routines.
3670 2014-07-30  Ed Schonberg  <schonberg@adacore.com>
3672         * sem_ch10.adb (Analyze_Proper_Body): When compiling for ASIS,
3673         if the compilation unit is a subunit, extend optional processing
3674         to all subunits of the current one. This allows gnatstub to
3675         supress generation of spurious bodies.
3677 2014-07-30  Hristian Kirtchev  <kirtchev@adacore.com>
3679         * a-cbmutr.adb (Insert_Child): Use local variable First to keep
3680         track of the initial element's index within the tree.
3682 2014-07-29  Hristian Kirtchev  <kirtchev@adacore.com>
3684         * a-cbmutr.adb (Allocate_Node): Remove the two parameter version.
3685         (Insert_Child): Add local variable First. Capture the index of the
3686         first node being created to ensure correct cursor construction
3687         later on. Use the three parameter version of Allocate_Node
3688         when creating multiple children as this method allows aspect
3689         Default_Value to take effect (if applicable).
3691 2014-07-29  Eric Botcazou  <ebotcazou@adacore.com>
3693         * exp_aggr.adb (Safe_Slice_Assignment): Remove.
3694         (Expand_Array_Aggregate): For a safe slice assignment, just set
3695         the target and use the common code path.
3697 2014-07-29  Robert Dewar  <dewar@adacore.com>
3699         * sem_util.adb, sem_util.ads, sem_res.adb, exp_ch6.adb: Invert
3700         predicate No_Predicate_Test_On_Arguments, new name is
3701         Predicate_Tests_On_Arguments (with the opposite sense).
3703 2014-07-29  Hristian Kirtchev  <kirtchev@adacore.com>
3705         * sem_attr.adb (Resolve_Attribute): Clean up the code for
3706         attribute 'Access. Do not generate an elaboration flag for a
3707         stand alone expression function. The expression of an expression
3708         function is now frozen when the expression function appears as
3709         the prefix of attribute 'Access.
3710         * sem_ch6.adb (Analyze_Expression_Function): Remove local
3711         variable New_Decl and update all references to it after the
3712         rewriting has taken place. Establish the linkages between the
3713         generated spec and body.
3715 2014-07-29  Robert Dewar  <dewar@adacore.com>
3717         * sem_prag.adb (ip, rv): Prevent from being optimized away.
3718         * gnatls.adb (gnatls): Set E_Fatal exit status if ali file not found.
3719         * s-imgllb.adb, s-imgllw.adb, s-imgwiu.adb, s-imgbiu.adb: Minor
3720         reformatting.
3722 2014-07-29  Vincent Celier  <celier@adacore.com>
3724         * prj-pp.adb: Minor comment update.
3725         * frontend.adb: If a target dependency info file has been read
3726         through switch -gnateT= add it to the dependencies of the source
3727         being compiled.
3729 2014-07-29  Robert Dewar  <dewar@adacore.com>
3731         * sem_ch3.adb, prj.adb: Minor reformatting.
3733 2014-07-29  Vincent Celier  <celier@adacore.com>
3735         * prj-pp.adb (Pretty_Print.Output_Project_File): New
3736         procedure to output project file names between quotes without
3737         concatenation, even if the line is too long.
3738         (Pretty_Print): Use Output_Project_File for project being extended and
3739         project imported.
3741 2014-07-29  Vincent Celier  <celier@adacore.com>
3743         * gnat_ugn.texi: Document that configuration pragmas files are
3744         added to the dependencies, unless they contain only pragmas
3745         Source_File_Name_Project.
3747 2014-07-29  Robert Dewar  <dewar@adacore.com>
3749         * frontend.adb: Minor reformatting.
3751 2014-07-29  Robert Dewar  <dewar@adacore.com>
3753         * exp_ch6.adb (Add_Call_By_Copy_Code): Minor reformatting
3754         (Expand_Actuals): Make sure predicate checks are properly applied
3755         for the case of OUT or IN OUT parameters.
3756         * sem_res.adb: Minor reformatting (Resolve_Actuals): Skip
3757         predicate tests on arguments for Finalize
3758         * sem_util.adb (No_Predicate_Test_On_Arguments): Returns True
3759         if predicate tests on subprogram arguments should be skipped.
3760         * sem_util.ads (No_Predicate_Test_On_Arguments): New function
3762 2014-07-29  Ed Schonberg  <schonberg@adacore.com>
3764         * sem_ch3.adb (Analyze_Object_Declaration): If there is an address
3765         clause for the object and the expression is an aggregate, defer
3766         resolution and expansion of the aggregate until the freeze point
3767         of the entity.
3768         * sem_aggr.adb (Resolve_Aggregate): An others_clause is legal if
3769         the parent node is an N_Reference generated during expansion.
3771 2014-07-29  Vincent Celier  <celier@adacore.com>
3773         * prj.adb (Add_To_Buffer): Effectively double the size of the buffer.
3775 2014-07-29  Robert Dewar  <dewar@adacore.com>
3777         * frontend.adb, inline.adb, sem_util.adb, sem_res.adb,
3778         prepcomp.ads: Minor reformatting and code clean up.
3779         * exp_ch6.adb (Expand_Actuals): Generate predicate test
3780         unconditionally for case of OUT or IN OUT actual (before this
3781         was generated only for certain subcases, which is wrong, the
3782         test is always needed).
3784 2014-07-29  Ed Schonberg  <schonberg@adacore.com>
3786         * sem_ch3.adb: Move Has_Defaulted_Discriminants to sem_util.
3787         * sem_ch4.adb (Analyze_Allocator): Defer resolution of expression
3788         until context type is available.
3789         * sem_res.adb (Resolve_Allocator): In the case of a qualified
3790         expression, complete resolution of expression.
3791         (Check_Aliased_Parameter): New procedure within Resolve_Actuals,
3792         to apply Ada2012 checks on aliased formals, as well as
3793         accesibility checks when the context of the call is an allocator
3794         or a qualified expression.
3795         * sem_util.ads, sem_util.adb (Has_Defaulted_Discriminants):
3796         Moved here from sem_ch3.
3797         (Object_Access_Level): Handle properly aliased formals and
3798         aggregates.
3799         * exp_ch6.adb (Expand_Call): Remove check on aliased parameters,
3800         now properly performed in sem_res (Resolve_Actuals,
3801         Check_Aliased_Parameter).
3803 2014-07-29  Yannick Moy  <moy@adacore.com>
3805         * debug.adb Enable GNATprove inlining under debug flag -gnatdQ for now.
3806         * inline.ads, inline.adb (Can_Be_Inlined_In_GNATprove_Mode): New
3807         function to decide when a subprogram can be inlined in GNATprove mode.
3808         (Check_And_Build_Body_To_Inline): Include GNATprove_Mode as a
3809         condition for possible inlining.
3810         * sem_ch10.adb (Analyze_Compilation_Unit): Remove special case
3811         for Inline_Always in GNATprove mode.
3812         * sem_ch6.adb (Analyze_Subprogram_Body_Helper): Build inlined
3813         body for subprograms in GNATprove mode, under debug flag -gnatdQ.
3814         * sem_prag.adb Minor change in comments.
3815         * sem_res.adb (Resolve_Call): Only perform GNATprove inlining
3816         inside subprograms marked as SPARK_Mode On.
3817         * sinfo.ads: Minor typo fix.
3819 2014-07-29  Vincent Celier  <celier@adacore.com>
3821         * frontend.adb: Add dependency on gnat.adc when taken into account
3822         and on non-temporary configuration pragmas files specified in
3823         switches -gnatec.
3824         * prepcomp.ads, prepcomp.adb (Add_Dependency): New procedure to add
3825         dependencies on configuration pragmas files.
3827 2014-07-29  Pat Rogers  <rogers@adacore.com>
3829         * gnat_ugn.texi: Minor clarification to the explanation for the
3830         GNATtest -v switch.
3832 2014-07-29  Robert Dewar  <dewar@adacore.com>
3834         * types.ads (Mechanism_Type): Change range back to -18 .. Int'Last with
3835         documentation that explains the need for this extended range
3836         (use by C_Pass_By_Copy).
3838 2014-07-29  Robert Dewar  <dewar@adacore.com>
3840         * gnat_rm.texi, sem_prag.adb: Minor reformatting.
3842 2014-07-29  Sergey Rybin  <rybin@adacore.com frybin>
3844         * gnat_ugn.texi: gnatmetric: clarify documentation for cyclomatic
3845         complexity metrics.
3847 2014-07-29  Thomas Quinot  <quinot@adacore.com>
3849         PR ada/60652
3850         * s-oscons-tmplt.c: For Linux, define _BSD_SOURCE in order for
3851         CRTSCTS to be visible.
3853 2014-07-29  Bob Duff  <duff@adacore.com>
3855         * g-trasym.adb, g-trasym.ads: Code cleanup.
3857 2014-07-29  Doug Rupp  <rupp@adacore.com>
3859         * sigtramp-vxworks.c: Minor reformatting.
3861 2014-07-29  Ed Schonberg  <schonberg@adacore.com>
3863         * gnat_rm.texi: No doc needed for Ada2012 aspect
3864         Implicit_dereference.
3866 2014-07-29  Robert Dewar  <dewar@adacore.com>
3868         * sem_attr.adb (Attribute_12): New array
3869         (Analyze_Attribute): Check impl-defined Ada 2012 attributes.
3870         (Check_Ada_2012_Attribute): Removed.
3872 2014-07-29  Doug Rupp  <rupp@adacore.com>
3874         * init.c (vxworks6): Call sigtramp for RTP (as well as DKM) for ARM,
3875         PPC, and e500.
3876         * sigtramp-vxworks.c: New file.
3877         * sigtramp-armvxw.c, sigtramp-ppcvxw.c: removed files.
3879 2014-07-29  Ed Schonberg  <schonberg@adacore.com>
3881         * lib-xref.adb (Output_Refs, Check_Type_Reference): For a
3882         derived array type, add information about component type, which
3883         was previously missing in ali file.
3884         * gnat_rm.texi: Add documentation for Atomic_Always_Lock_Free.
3886 2014-07-29  Thomas Quinot  <quinot@adacore.com>
3888         * sem_ch3.adb (Constrain_Corresponding_Record): For the case
3889         of the subtype created for a record component, do not mark
3890         the subtype as frozen. For one thing, this is anomalous (in
3891         particular, the base type might not itself be frozen yet);
3892         furthermore, proper freezing of the subtype must happen in any
3893         case. So, we just mark the subtype as requiring delayed freezing
3894         (and we'll actually freeze it when generating the init_proc of
3895         the enclosing record).
3896         Also change the name of the constrained record subtype (append a
3897         'C' so that it is clearly different from the unconstrained record
3898         type, "related_idV") to make debugging easier.
3899         (Process_Full_View): When creating a full subtype for a pending
3900         private subtype, re-establish the scope of the private subtype
3901         so that we get proper visibility on outer discriminants.
3902         * exp_ch3.adb (Build_Init_Statements): Freeze any component
3903         subtype that is not frozen yet.
3905 2014-07-29  Vincent Celier  <celier@adacore.com>
3907         * prj-proc.adb (Recursive_Process): Always initialize the
3908         environment when the project is an aggregate project, even when
3909         it is not the root tree.
3910 2014-07-29  Robert Dewar  <dewar@adacore.com>
3912         * exp_ch5.adb, exp_ch9.adb: Minor comment additions.
3913         * gnat_rm.texi: Complete list of implementation aspects.
3914         * aspects.ads: Minor comment clarification.
3916 2014-07-29  Ed Schonberg  <schonberg@adacore.com>
3918         * exp_ch5.adb (Expand_N_Assignment_Statement): If the target type
3919         is a null-excluding access type, do not generate a constraint
3920         check if Suppress_Assignment_Checks is set on assignment node.
3921         * exp_ch9.adb (Build_Simple_Entry_Call): If actual is an out
3922         parameter of a null-excluding access type, there is access check
3923         on entry, so set Suppress_Assignment_Checks on generated statement
3924         that assigns actual to parameter block.
3925         * sinfo.ads: Document additional use of Suppress_Assignment_Checks.
3927 2014-07-29  Robert Dewar  <dewar@adacore.com>
3929         * gnat_rm.texi: Change theta to @ in documentation of aspect
3930         Dimension_System.
3932 2014-07-29  Robert Dewar  <dewar@adacore.com>
3934         * sem_attr.adb (Uneval_Old_Msg): Flags Uneval_Old_Accept/Warn
3935         are now on pragma.
3936         * sem_ch13.adb (Analyze_Aspect_Specifications): Remove setting
3937         of Uneval_Old_*
3938         * sem_prag.adb (Analyze_Pragma): Set Uneval_Old_* flags
3939         * sinfo.ads, sinfo.adb: Move Uneval_Old_Accept/Warn to N_Pragma node.
3941 2014-07-29  Javier Miranda  <miranda@adacore.com>
3943         * types.ads Update documentation on how to add new reason codes
3944         for exceptions.
3945         (RT_Exception_Code): Keep values ordered by their
3946         reason code.  Required by the .NET backend.
3947         (RT_CE_Exceptions): Subtype declaration removed.
3948         (RT_PE_Exceptions): Subtype declaration removed.
3949         (RT_SE_Exceptions): Subtype declaration removed.
3950         (Kind): New mapping table of RT_Exception_Codes.
3951         * exp_ch11.adb (Get_RT_Exception_Entity): Updated to use the
3952         new mapping table.
3953         * tbuild.adb (Make_Raise_Storage_Error): Updated to use the new
3954         mapping table.  (Make_Raise_Program_Error): Updated to use the
3955         new mapping table.
3956         (Make_Raise_Storage_Error): Updated to use the new mapping table.
3957         * a-except.adb Keep Rcheck_CE_xxx entities ordered according to
3958         their reason code.
3960 2014-07-29  Thomas Quinot  <quinot@adacore.com>
3962         * gnat_rm.texi: Document internal attributes used for PolyORB/DSA
3963         distributed stubs generation.
3964         * exp_ch3.adb: Minor reformatting.
3966 2014-07-29  Yannick Moy  <moy@adacore.com>
3968         * sinfo.ads: Document constraint between frontend and GNATprove.
3970 2014-07-29  Robert Dewar  <dewar@adacore.com>
3972         * a-except.adb: Minor comment clarification.
3974 2014-07-29  Robert Dewar  <dewar@adacore.com>
3976         * gnat_rm.texi: Complete list of implementation attributes.
3977         * snames.ads-tmpl: Clean up list of impl-defined attributes.
3979 2014-07-29  Hristian Kirtchev  <kirtchev@adacore.com>
3981         * freeze.adb (Freeze_Record_Type): Perform various
3982         volatility-related checks.
3984 2014-07-29  Robert Dewar  <dewar@adacore.com>
3986         * sem_ch3.adb, sem_eval.adb: Minor reformatting.
3988 2014-07-29  Ed Schonberg  <schonberg@adacore.com>
3990         * sem_attr.adb: sem_attr.adb (Access_Attribute): Handle properly
3991         the case where the attribute reference appears in a nested scope
3992         from that of the subprogram prefix.
3993         * sem_attr.adb: Minor reformatting.
3995 2014-07-29  Robert Dewar  <dewar@adacore.com>
3997         * gnat_ugn.texi: Clarify documentation of Initialize_Scalar
3998         initialization options.
4000 2014-07-29  Robert Dewar  <dewar@adacore.com>
4002         * sinfo.ads: Minor comment addition.
4004 2014-07-29  Bob Duff  <duff@adacore.com>
4006         * sem_eval.adb, sem_ch13.adb: Minor reformatting.
4008 2014-07-29  Doug Rupp  <rupp@adacore.com>
4010         * init.c: Complete previous change.
4012 2014-07-29  Robert Dewar  <dewar@adacore.com>
4014         * exp_ch4.adb (Expand_N_If_Expression): Deal with unconstrained
4015         array case.
4017 2014-07-29  Ed Schonberg  <schonberg@adacore.com>
4019         * sem_attr.adb (Access_Attribute): If the prefix is a subprogram
4020         and the completion will appear in the same declarative part,
4021         create elaboration flag.
4022         * exp_util.adb (Set_Elaboration_Flag): If the subprogram body
4023         is a completion of a declaration in the same declarative part,
4024         and the subprogram has had its address taken, add elaboration
4025         check inside the subprogram body, to detect elaboration errors
4026         that may occur through indirect calls.
4028 2014-07-29  Doug Rupp  <rupp@adacore.com>
4030         * sigtramp-armvxw.c: Enhance to handle RTP trampolining.
4031         * init.c: Remove guard on sigtramp for ARM VxWorks RTP.
4033 2014-07-29  Vincent Celier  <celier@adacore.com>
4035         * switch-c.adb (Scan_Front_End_Switches): Do not fail when two
4036         runtime directorie specified with two switches --RTS= designate
4037         the same directory, even when there are no literarily the same.
4039 2014-07-29  Robert Dewar  <dewar@adacore.com>
4041         * gnat_ugn.texi: Minor documentation clarification.
4042         * switch-c.adb: Minor reformatting.
4044 2014-07-29  Robert Dewar  <dewar@adacore.com>
4046         * sem_prag.adb (Analyze_Pragma, case Allow_Integer_Address):
4047         Fix incorrect RTE call which caused bomb if pragma was in
4048         configuration pragma file.
4050 2014-07-29  Jerome Lambourg  <lambourg@adacore.com>
4052         * expect.c (__gnat_expect_poll): Fix typo in previous change.
4053         * g-expect.adb: Update comments.
4055 2014-07-29  Arnaud Charlet  <charlet@adacore.com>
4057         * s-parame-hpux.ads, s-parame-vms-ia64.ads, s-parame.ads
4058         (Default_Attribute_Count): Bump to 16 on native platforms.
4060 2014-07-29  Ed Schonberg  <schonberg@adacore.com>
4062         * sem_res.adb: Add guard to front-end inlining for SPARK.
4064 2014-07-29  Robert Dewar  <dewar@adacore.com>
4066         * sem_ch10.adb, debug.adb, sem_prag.adb, sem_res.adb, sem_ch6.adb:
4067         Minor reformatting.
4069 2014-07-29  Ed Schonberg  <schonberg@adacore.com>
4071         * sem_ch6.adb (Analyze_Subprogram_Body_Helper): Build body to
4072         inline in GNATprove mode when subprogran is marked Inline_Always.
4073         * sem_res.adb (Resolve_Call): Expand call in place in GNATProve
4074         mode if body to inline is available.
4075         * sem_prag.adb (Analyze_Pragma, case Inline_Always): Make pragma
4076         effective in GNATprove mode.
4077         * sem_ch10.adb (Analyze_Compilation_Unit): Call
4078         Check_Package_Body_For_Inlining in GNATprove mode, so that body
4079         containing subprograms with Inline_Always can be available before
4080         calls to them.
4082 2014-07-29  Ed Schonberg  <schonberg@adacore.com>
4084         * inline.ads, inline.adb, sem_ch10.adb: Rename Check_Body_For_Inlining
4085         to Check_Package_Body_For_Inlining, to prevent confusion with other
4086         inlining subprograms.
4088 2014-07-29  Robert Dewar  <dewar@adacore.com>
4090         * opt.ads: Minor comment update.
4091         * sem_attr.adb (Uneval_Old_Msg): Deal with case of aspect, where
4092         we want setting of Uneval_Old at time of encountering the aspect.
4093         * sem_ch13.adb (Analyze_Aspect_Specifications): Capture setting
4094         of Opt.Uneval_Old.
4095         * sinfo.adb (Uneval_Old_Accept): New function (Uneval_Old_Warn):
4096         New function (Set_Uneval_Old_Accept): New procedure.
4097         (Set_Uneval_Old_Warn): New procedure.
4098         * sinfo.ads: Uneval_Old_Accept: New flag Uneval_Old_Warn: New flag.
4100 2014-07-29  Robert Dewar  <dewar@adacore.com>
4102         * sinfo.ads, inline.adb, inline.ads, sem_ch6.adb: Minor reformatting.
4103         * snames.ads-tmpl: Minor reformatting.
4104         * xsnamest.adb (XSnamesT): Remove special casing of Name_Error
4105         to give <Error>.  Not clear why this was there, but the compiler
4106         sources do not reference Name_Error, and this interfered with
4107         the circuits for pragma Unevaluated_Use_Of_Old.
4109 2014-07-29  Hristian Kirtchev  <kirtchev@adacore.com>
4111         * sem_prag.adb (Process_Atomic_Shared_Volatile): Allow volatile
4112         types in SPARK 2014 (again).
4113         * sem_res.adb (Is_OK_Volatile_Context): New routine.
4114         (Resolve_Entity_Name): Ensure that a volatile object with
4115         enabled properties Async_Writers or Effectire_Reads appears in
4116         a non-interfering context.
4118 2014-07-29  Ed Schonberg  <schonberg@adacore.com>
4120         * sem_ch6.adb: Move Build_Body_To_Inline,
4121         Check_And_Buid_Body_To_Inline, and Cannot_Inline to package Inline.
4122         * exp_ch6.adb: Mode Expand_Inlined_Body to package Inline.
4123         * inline.ads, inline.adb: Package now contains subprograms that
4124         implement front-end inlining.  No functional changes, no test
4125         needed.
4127 2014-07-29  Robert Dewar  <dewar@adacore.com>
4129         * exp_dbug.adb, g-expect.adb, sem_elab.adb: Minor typo fix.
4131 2014-07-29  Ed Schonberg  <schonberg@adacore.com>
4133         * sem_ch6.adb (Analyze_Return_Type): Reject a return type that
4134         is a limited view when the context is a package body, because
4135         there is no subsequent place at which the non-limited view may
4136         become visible.
4137         (Process_Formals): Ditto.
4138         * sinfo.ads, par-ch3.adb: Minor reformatting.
4140 2014-07-29  Jerome Lambourg  <lambourg@adacore.com>
4142         * expect.c (__gnat_expect_poll): New parameter dead_process
4143         used to return the dead process among the array of file
4144         descriptors. The Windows, VMS and HPUX implementations now
4145         properly report the dead process via this parameter. Other unixes
4146         don't need it.
4147         * g-expect.adb (Poll): Adapt to the C profile.
4148         (Expect_Internal): Use the new parameter to properly close the
4149         File Descriptor.  This then can be properly reported by the
4150         function First_Dead_Process as is expected.
4152 2014-07-29  Robert Dewar  <dewar@adacore.com>
4154         * gnat_ugn.texi: Minor clarification of -gnatQ switch.
4156 2014-07-29  Robert Dewar  <dewar@adacore.com>
4158         * einfo.adb (Derived_Type_Link): New function
4159         (Set_Derived_Type_Link): New procedure.
4160         (Write_Field31_Name): Output Derived_Type_Link.
4161         * einfo.ads: New field Derived_Type_Link.
4162         * exp_ch6.adb (Expand_Call): Warn if change of representation
4163         needed on call.
4164         * sem_ch13.adb: Minor addition of ??? comment.
4165         (Rep_Item_Too_Late): Warn on case that is legal but could cause an
4166         expensive implicit conversion.
4167         * sem_ch3.adb (Build_Derived_Type): Set Derived_Type_Link if needed.
4169 2014-07-29  Hristian Kirtchev  <kirtchev@adacore.com>
4171         * exp_ch3.adb (Build_Init_Procedure): Renamed Local_DF_Id
4172         to DF_Id. Add new local variable DF_Call. Do not perform any
4173         elaboration-related checks on the call to the partial finalization
4174         routine within an init proc to avoid generating bogus elaboration
4175         warnings on expansion-related code.
4176         * sem_elab.adb (Check_A_Call): Move constant Access_Case to
4177         the top level of the routine.  Ensure that Output_Calls takes
4178         into account flags -gnatel and -gnatwl when emitting warnings
4179         or info messages.
4180         (Check_Internal_Call_Continue): Update the call to Output_Calls.
4181         (Elab_Warning): Moved to the top level of routine Check_A_Call.
4182         (Emit): New routines.
4183         (Output_Calls): Add new formal parameter Check_Elab_Flag along with a
4184         comment on usage. Output all warnings or info messages only when the
4185         caller context demands it and the proper elaboration flag is set.
4187 2014-07-29  Yannick Moy  <moy@adacore.com>
4189         * sem_attr.adb (Analyze_Attribute/Attribute_Old):
4190         Check rule about Old appearing in potentially unevaluated
4191         expression everywhere, not only in Post.
4193 2014-07-29  Arnaud Charlet  <charlet@adacore.com>
4195         * sem_prag.adb: Update comment.
4196         * a-except.adb, a-except-2005.adb: Minor editing.
4198 2014-07-29  Pierre-Marie Derodat  <derodat@adacore.com>
4200         * exp_dbug.adb (Debug_Renaming_Declaration):
4201         Do not create renaming entities for renamings of non-packed
4202         objects and for exceptions.
4204 2014-07-29  Robert Dewar  <dewar@adacore.com>
4206         * sem_ch3.adb, sinfo.ads, types.ads, sem_prag.adb, a-except-2005.adb,
4207         sem_ch6.adb, par-ch3.adb: Minor reformatting.
4209 2014-07-29  Ed Schonberg  <schonberg@adacore.com>
4211         * sem_ch6.adb (Check_Return_Subtype_Indication): Reject a return
4212         subtype indication in an extended return statement when the
4213         return value is an ancestor of the return type of the function,
4214         and that return type is a null record extension.
4216 2014-07-29  Thomas Quinot  <quinot@adacore.com>
4218         * sem_ch13.adb (Rep_Item_Too_Late): Specialize/clarify error
4219         message produced for the case of a type-related representation
4220         item that is made illegal by 13.10(1).
4221         * gnat_rm.texi (Scalar_Storage_Order): Minor change in
4222         documentation.
4224 2014-07-29  Robert Dewar  <dewar@adacore.com>
4226         * gnat_ugn.texi: Add section on Wide_Wide_Character encodings.
4227         * erroutc.adb (Output_Error_Msgs): Take wide characters into
4228         account in computing position of error flags.
4229         * sinput.adb (Get_Column_Number): Take wide characters into
4230         account.
4232 2014-07-29  Ed Schonberg  <schonberg@adacore.com>
4234         * par-ch3.adb (P_Access_Type_Definition): The subtype indication
4235         in an access type definition can carry a null_exclusion indicator.
4236         * sem_ch3.adb (Access_Type_Declaration): If the subtype indication
4237         carries a null_exclusion indicator, verify that the subtype
4238         indication denotes an access type, and create a null-excluding
4239         subtype for it.
4240         * sinfo.ads, sinfo.adb: New attribute Null_Excluding_Subtype,
4241         defined on N_Access_To_Object_Definition to indicate that the
4242         subtype indication carries a null_exclusion indicator.
4244 2014-07-29  Hristian Kirtchev  <kirtchev@adacore.com>
4246         * exp_ch6.adb (Add_Extra_Actual): Do not construct
4247         the extra actual by name, generate a reference instead.
4249 2014-07-29  Arnaud Charlet  <charlet@adacore.com>
4251         * sem_prag.adb (Analyze_Pragma): Do not crash analyzing
4252         Allow_Integer_Address if already set.
4253         * a-except-2005.adb (Rcheck_PE_Stream_Operation_Not_Allowed):
4254         Fix order, for consistency with Rmsg_xx declarations.
4256 2014-07-29  Ed Schonberg  <schonberg@adacore.com>
4258         * sem_ch4.adb (Complete_Object_Operation): If the type of the
4259         candidate subprogram is a limited view, use non-limited view
4260         when available.
4262 2014-07-29  Robert Dewar  <dewar@adacore.com>
4264         * sem_ch13.adb: Minor change in RM reference.
4265         * sem_mech.ads: Minor reformatting.
4266         * einfo.ads: Minor comment fix.
4267         * types.ads: Minor correction to range given for Mechanism_Type.
4268         * exp_ch6.adb (Add_Invariant_And_Predicate_Checks): Do not
4269         check predicate on way out for OUT or IN OUT parameters.
4270         * par-ch3.adb (P_Constraint_Opt): Handle missing RANGE keyword
4271         better (P_Range_Constraint): Corresponding fix.
4272         * checks.ads: Minor comment clarification.
4274 2014-07-29  Gary Dismukes  <dismukes@adacore.com>
4276         * sem_ch8.adb (Analyze_Object_Renaming): Set the Is_Volatile
4277         and Treat_As_Volatile flags based on whether the renamed object
4278         is a volatile object.
4280 2014-07-29  Olivier Hainque  <hainque@adacore.com>
4282         * g-debpoo.adb
4283         (Default_Alignment): Rename as Storage_Alignment. This is not
4284         a "default" that can be overriden. Augment comment to clarify
4285         intent and document why we need to manage alignment padding.
4286         (Header_Offset): Set to Header'Object_Size instead of 'Size
4287         rounded up to Storage_Alignment. Storage_Alignment on the
4288         allocation header is not required by our internals so was
4289         overkill. 'Object_Size is enough to ensure proper alignment
4290         of the header address when substracted from a storage address
4291         aligned on Storage_Alignment.
4292         (Minimum_Allocation): Rename as Extra_Allocation, conveying that
4293         this is always added on top of the incoming allocation requests.
4294         (Align): New function, to perform alignment rounding operations.
4295         (Allocate): Add comments on the Storage_Address computation
4296         scheme and adjust so that the alignment padding applies to that
4297         (Storage_Address) only.
4299 2014-07-29  Robert Dewar  <dewar@adacore.com>
4301         * exp_ch3.adb (Default_Initialize_Object): Remove incorrect
4302         pragma Unreferenced.
4303         * cstand.adb (Create_Standard): Use E_Array_Type for standard
4304         string types. Make sure index of Any_String/Any_Array is in a list.
4305         * errout.adb: Minor reformatting.
4307 2014-07-29  Robert Dewar  <dewar@adacore.com>
4309         * gnat_ugn.texi: Clean up and correct documentation of warnings.
4310         * usage.adb: Minor corrections to make sure warnings are properly
4311         documented.
4312         * warnsw.adb (Set_Warning_Switch): Remove redundant return statement.
4313         (WA_Warnings): Add Warn_On_Suspicious_Modulus_Value.
4315 2014-07-29  Ed Schonberg  <schonberg@adacore.com>
4317         * exp_ch3.adb (Expand_N_Object_Declaration): The dummy block
4318         created to match internal sequence numbers between compilations
4319         with/without abort must have its type properly set.
4321 2014-07-29  Robert Dewar  <dewar@adacore.com>
4323         * ali.adb (Initialize_ALI): Initialize SSO_Default_Specified
4324         (Scan_ALI): Set SSO_Default in ALIs_Record (Scan_ALI): Set
4325         SSO_Default_Specified.
4326         * ali.ads (ALIs_Record): Add field SSO_Default
4327         (SSO_Default_Specified): New global switch.
4328         * bcheck.adb (Check_Consistent_SSO_Default): New procedure
4329         (Check_Configuration_Consistency): Call this procedure
4330         * einfo.adb (SSO_Set_High_By_Default): New
4331         function (SSO_Set_Low_By_Default): New function
4332         (Set_SSO_Set_High_By_Default): New procedure
4333         (Set_SSO_Set_Low_By_Default): New procedure (Write_Entity_Flags):
4334         List new flags
4335         * einfo.ads (SSO_Set_Low_By_Default): New flag
4336         (SSO_Set_High_By_Default): New flag
4337         * freeze.adb (Set_SSO_From_Default): New procedure
4338         (Freeze_Array_Type): Call Set_SSO_From_Default
4339         (Freeze_Record_Type): Call Set_SSO_From_Default
4340         * gnat_rm.texi: Document pragma Default_Scalar_Storage_Order
4341         * lib-writ.adb (Write_ALI): Set OL/OH in P line as needed
4342         * lib-writ.ads: Add OL/OH parameters to P line
4343         * opt.adb: Set Default_SSO, Default_SSO_Config as appropriate
4344         * opt.ads (Default_SSO): New global switch (Default_SSO_Config):
4345         New global switch
4346         * repinfo.adb (List_Scalar_Storage_Order): List SSO when it is
4347         set by default using pragma Default_Scalar_Storage_Order.
4348         * sem.ads (Scope_Stack_Entry): Add component Save_Default_SSO
4349         * sem_ch13.adb (Inherit_Delayed_Rep_Aspects):
4350         Clear SSO defaults when explicit SSO is inherited.
4351         (Analyze_Attribute_Definition_Clause): Clear SSO defaults when
4352         explicit SSO is specified.
4353         (Inherit_Aspects_At_Freeze_Point):
4354         Clear SSO default when inheriting SSO.
4355         * sem_ch3.adb (Set_Default_SSO): New procedure
4356         (Analyze_Private_Extension_Declaration): Set defualt SSO
4357         (Array_Type_Declaration): ditto (Build_Derived_Array_Type): ditto
4358         (Build_Derived_Private_Type): ditto (Build_Derived_Record_Type):
4359         ditto (Build_Derived_Type): ditto (Make_Class_Wide_Type): ditto
4360         (Record_Type_Declaration): ditto
4361         * sem_ch8.adb (Pop_Scope): Restore Default_SSO (Push_Scope):
4362         Save Default_SSO
4363         * sem_prag.adb (Analyze_Pragma, case
4364         Default_Scalar_Storage_Order): Set Default_SSO
4366 2014-07-29  Ed Schonberg  <schonberg@adacore.com>
4368         * sem_ch6.adb (Valid_Operator_Definition): Verify that
4369         all parameter have mode IN. This check must be done here for
4370         subprogram instantiations that have operator names, because their
4371         analysis does not follow the same path as that for subprogram
4372         declarations.
4374 2014-07-29  Robert Dewar  <dewar@adacore.com>
4376         * freeze.adb (Freeze_Entity, Concurrent_Type case): Add a guard
4377         to make sure that the Etype of a component of the corresponding
4378         record type is present before trying to freeze it.
4379         * sem_ch5.adb: Minor reformatting.
4381 2014-07-29  Robert Dewar  <dewar@adacore.com>
4383         * exp_attr.adb, types.ads, types.h, exp_ch11.adb, a-except.adb,
4384         a-except-2005.adb: Add new reason code PE_Stream_Operation_Not_Allowed,
4385         and then use it when a stream operation is used from a library generic
4386         when the restriction (No_Streams) is active.
4388 2014-07-29  Thomas Quinot  <quinot@adacore.com>
4390         * projects.texi: Fix minor typo.
4392 2014-07-29  Yannick Moy  <moy@adacore.com>
4394         * sem_attr.adb (Analyze_Attribute): Fix generation of warning.
4396 2014-07-29  Arnaud Charlet  <charlet@adacore.com>
4398         * sem_ch5.adb (Check_Unreachable_Code): Do not remove code in
4399         CodePeer mode.
4401 2014-07-29  Hristian Kirtchev  <kirtchev@adacore.com>
4403         * exp_ch7.adb (Find_Last_Init): Add local variable
4404         Deep_Init_Found. Check the statement immediately following the
4405         declaration if [Deep_]Initialization was not found.
4407 2014-07-29  Hristian Kirtchev  <kirtchev@adacore.com>
4409         * exp_util.adb (Is_Aliased): It appears that
4410         'reference-d and renamed objects still play some role in Boolean
4411         expression with actions and cannot be finalized immediately.
4413 2014-07-29  Ed Schonberg  <schonberg@adacore.com>
4415         * exp_dbug.adb (Qualify_Needed):  For debugging purposes,
4416         Loop names are not part of the full qualification of entity names.
4418 2014-07-29  Robert Dewar  <dewar@adacore.com>
4420         * einfo.adb (Has_Protected): Test base type.
4421         * sem_ch4.adb (Analyze_Allocator): Reorganize code to make sure
4422         that we always properly check No_Protected_Type_Allocators.
4424 2014-07-29  Ed Schonberg  <schonberg@adacore.com>
4426         * sem_util.ads, sem_util.adb (Defining_Entity): Now applies to
4427         loop declarations as well.
4428         * exp_ch5.adb (Expand_Loop_Statement): Apply Qualify_Entity_Names
4429         to an iterator loop, because it may contain local renaming
4430         declarations that require debugging information.
4432 2014-07-29  Robert Dewar  <dewar@adacore.com>
4434         * sem_util.ads, exp_util.adb, sem_attr.adb: Minor reformatting.
4436 2014-07-29  Robert Dewar  <dewar@adacore.com>
4438         * einfo.ads, einfo.adb (Static_Real_Or_String_Predicate): New function
4439         (Set_Static_Real_Or_String_Predicate): New procedure
4440         * sem_ch13.adb (Build_Predicate_Functions): Accomodate static
4441         string predicates (Is_Predicate_Static): Handle static string
4442         predicates.
4443         * sem_eval.adb (Real_Or_String_Static_Predicate_Matches):
4444         New procedure (Check_Expression_Against_Static_Predicate):
4445         Deal with static string predicates, now fully implemented
4446         (Eval_Relational_Op): Allow string equality/inequality as static
4447         if not comes from source.
4449 2014-07-29  Robert Dewar  <dewar@adacore.com>
4451         * sem_aggr.adb, exp_ch5.adb, sem_ch5.adb, exp_util.adb, einfo.adb,
4452         einfo.ads, sem_util.adb, sem_attr.adb, sem_case.adb, sem_eval.adb,
4453         sem_eval.ads, sem_ch13.adb: General cleanup of static predicate
4454         handling. Change name of Discrete_Predicate to
4455         Discrete_Static_Predicate, and replace testing of the presence of this
4456         field by testing the flag Has_Static_Expression.
4458 2014-07-29  Robert Dewar  <dewar@adacore.com>
4460         * gnat_rm.texi: Document pragma Unevaluated_Use_Of_Old.
4461         * opt.adb: Handle Uneval_Old.
4462         * opt.ads (Uneval_Old, Uneval_Old_Config): New variables.
4463         * par-prag.adb: Add dummy entry for pragma Unevaluated_Use_Of_Old.
4464         * sem.ads (Save_Uneval_Old): New field in Scope_Stack_Entry.
4465         * sem_attr.adb (Uneval_Old_Msg): New procedure.
4466         * sem_ch8.adb (Push_Scope): Save Uneval_Old.
4467         (Pop_Scope): Restore Uneval_Old.
4468         * sem_prag.adb (Analyze_Pragma, case Unevaluated_Use_Of_Old):
4469         Implemented.
4470         * snames.ads-tmpl: Add entries for pragma Unevaluated_Use_Of_Old
4471         Add entries for Name_Warn, Name_Allow.
4473 2014-07-29  Robert Dewar  <dewar@adacore.com>
4475         * sem_aggr.adb (Resolve_Array_Aggregate): Change Is_Static_Range
4476         to Is_OK_Static_Range.
4477         * sem_attr.adb (Eval_Attribute): Make sure we properly flag
4478         static attributes (Eval_Attribute, case Size): Handle size of
4479         zero properly (Eval_Attribute, case Value_Size): Handle size of
4480         zero properly.
4481         * sem_ch13.adb: Minor reformatting.
4482         * sem_ch3.adb (Process_Range_Expr_In_Decl): Change
4483         Is_Static_Range to Is_OK_Static_Range.
4484         * sem_eval.adb (Eval_Case_Expression): Total rewrite, was
4485         wrong in several ways (Is_Static_Range): Moved here from spec
4486         (Is_Static_Subtype): Moved here from spec Change some incorrect
4487         Is_Static_Subtype calls to Is_OK_Static_Subtype.
4488         * sem_eval.ads: Add comments to section on
4489         Is_Static_Expression/Raises_Constraint_Error (Is_OK_Static_Range):
4490         Add clarifying comments (Is_Static_Range): Moved to body
4491         (Is_Statically_Unevaluated): New function.
4492         * sem_util.ads, sem_util.adb (Is_Preelaborable_Expression): Change
4493         Is_Static_Range to Is_OK_Static_Range.
4494         * sinfo.ads: Additional commments for Is_Static_Expression noting
4495         that clients should almost always use Is_OK_Static_Expression
4496         instead. Many other changes throughout front end units to obey
4497         this rule.
4498         * tbuild.ads, tbuild.adb (New_Occurrence_Of): Set Is_Static_Expression
4499         for enumeration literal.
4500         * exp_ch5.adb, sem_intr.adb, sem_ch5.adb, exp_attr.adb, exp_ch9.adb,
4501         lib-writ.adb, sem_ch9.adb, einfo.ads, checks.adb, checks.ads,
4502         sem_prag.adb, sem_ch12.adb, freeze.adb, sem_res.adb, exp_ch4.adb,
4503         exp_ch6.adb, sem_ch4.adb, sem_ch6.adb, exp_aggr.adb, sem_cat.adb:
4504         Replace all occurrences of Is_Static_Expression by
4505         Is_OK_Static_Expression.
4507 2014-07-29  Hristian Kirtchev  <kirtchev@adacore.com>
4509         * exp_ch4.adb (Process_Transient_Object): Remove constant
4510         In_Cond_Expr, use its initialization expression in place.
4511         * exp_ch7.adb (Process_Declarations): There is no need to check
4512         that a transient object being hooked is controlled as it would
4513         not have been hooked in the first place.
4514         * exp_util.adb (Is_Aliased): 'Reference-d or renamed transient
4515         objects are not considered aliased when the related context is
4516         a Boolean expression_with_actions.
4517         (Requires_Cleanup_Actions): There is no need to check that a transient
4518         object being hooked is controlled as it would not have been hooked in
4519         the first place.
4521 2014-07-29  Robert Dewar  <dewar@adacore.com>
4523         * errout.adb: Minor reformatting.
4525 2014-07-29  Hristian Kirtchev  <kirtchev@adacore.com>
4527         * exp_ch3.adb (Default_Initialize_Object): Add new variables
4528         Abrt_Blk and Dummy. Generate a dummy temporary when aborts are
4529         not allowed to ensure the symmetrical generation of symbols.
4530         * exp_ch7.adb (Build_Object_Declarations): Remove variables A_Expr
4531         and E_Decl. Add new variables Decl and Dummy. Generate a dummy
4532         temporary when aborts are not allowed to ensure symmertrical
4533         generation of symbols.
4534         * exp_intr.adb (Expand_Unc_Deallocation): Add new variable
4535         Dummy. Generate a dummy temporary when aborts are not allowed
4536         to ensure symmertrical generation of symbols.
4538 2014-07-29  Ed Schonberg  <schonberg@adacore.com>
4540         * exp_dbug.adb (Debug_Renaming_Declaration): For an object
4541         renaming, indicate that the renamed entity itself needs debug
4542         information. This is necessary if that entity is a temporary,
4543         e.g. part of the expansion of an explicit dereference in an
4544         iterator.
4546 2014-07-29  Thomas Quinot  <quinot@adacore.com>
4548         * errout.adb (Set_Error_Posted): When propagating flag to
4549         an enclosing named association, also propagate to the parent
4550         of that node, so that named and positional associations are
4551         treated consistently.
4553 2014-07-29  Ed Schonberg  <schonberg@adacore.com>
4555         * sem_attr.adb (Resolve_Attribute, case 'Update):  Set
4556         Do_Range_Check properly on array component expressions that
4557         have a scalar type. In GNATprove mode, only checks on scalar
4558         components must be marked by the front-end.
4560 2014-07-29  Ed Schonberg  <schonberg@adacore.com>
4562         * sem_res.adb (Resolve_Type_Conversion): If the type of the
4563         expression is a limited view, use the non-limited view when
4564         available.
4566 2014-07-29  Hristian Kirtchev  <kirtchev@adacore.com>
4568         * exp_ch4.adb (Expand_N_Case_Expression): Mark the generated
4569         case statement as coming from a conditional expression.
4570         (Expand_N_If_Expression): Mark the generated if statement as
4571         coming from a conditional expression.
4572         * exp_ch5.adb (Expand_N_Case_Statement): Do not process controlled
4573         objects found in case statement alternatives when the case
4574         statement is actually a case expression.
4575         (Expand_N_If_Statement):
4576         Do not process controlled objects found in an if statement when
4577         the if statement is actually an if expression.
4578         * sinfo.adb (From_Conditional_Expression): New routine.
4579         (Set_From_Conditional_Expression): New routine.
4580         * sinfo.ads Add new semantic flag From_Conditional_Expression and
4581         update related nodes.
4582         (From_Conditional_Expression): New routine along with pragma Inline.
4583         (Set_From_Conditional_Expression): New routine along with pragma Inline.
4585 2014-07-29  Hristian Kirtchev  <kirtchev@adacore.com>
4587         * exp_ch7.adb (Build_BIP_Cleanup_Stmts): Remove
4588         formal parameter Obj_Id and update the comment on usage. Renamed
4589         Obj_Typ to Func_Typ and update all occurrences.
4590         (Find_Last_Init): Remove formal parameter Decl and update the comment
4591         on usage.
4592         Remove local constants Obj_Id and Obj_Typ. Remove local variables
4593         Init_Typ and Is_Conc. Remove the extraction of the initialization type.
4594         (Find_Last_Init_In_Block): Remove formal parameter
4595         Init_Typ and update the comment on usage.
4596         (Is_Init_Call): Remove formal parameter Init_Typ and update the comment
4597         on usage. Check whether the procedure call is an initialization
4598         procedure of either the object type or the initialization type.
4599         (Is_Init_Proc_Of): New routine.
4600         (Process_Object_Declaration): Obj_Id and Obj_Typ are now global to this
4601         routine. Add new variable Init_Typ. Add circuitry to extract the object
4602         type as well as the initialization type.
4604 2014-07-29  Robert Dewar  <dewar@adacore.com>
4606         * sem_case.adb: Minor reformatting.
4607         * sem_aux.ads: Minor reformatting.
4609 2014-07-29  Ed Schonberg  <schonberg@adacore.com>
4611         * sinfo.adb (Set_Else_Actions, Set_Then_Actions): Set parent
4612         pointer on these fields, even though they are semantic, because
4613         subsequent analysis and expansion of action nades may require
4614         exploring the tree, for example to locate a node to be wrapped
4615         when a function with controlled result is called.
4617 2014-07-29  Claire Dross  <dross@adacore.com>
4619         * sem_aux.adb (Get_Binary_Nkind): Use case on
4620         Name_Id instead of an intermediate string.
4621         (Get_Unary_Nkind): Use case on Name_Id instead of an intermediate
4622         string.
4624 2014-07-29  Sergey Rybin  <rybin@adacore.com frybin>
4626         * gnat_ugn.texi (gnatelim, gnatstub, gnatmetric): Add note
4627         about processing sources with preprocessor directives.
4629 2014-07-24  Martin Liska  <mliska@suse.cz>
4631         * gcc-interface/trans.c (finalize_nrv): Adjust function call.
4632         * gcc-interface/utils.c (rest_of_subprog_body_compilation): Likewise.
4633         (gnat_write_global_declarations): Likewise.
4635 2014-07-19  David Wohlferd  <dw@LimeGreenSocks.com>
4637         * gnat_rm.texi: Clean up for makeinfo 5.2.
4639 2014-07-19  David Wohlferd  <dw@LimeGreenSocks.com>
4641         * gnat_rm.texi (Machine Code Insertions): Clean up.
4643 2014-07-18  Robert Dewar  <dewar@adacore.com>
4645         * exp_ch7.adb: Minor reformatting.
4647 2014-07-18  Claire Dross  <dross@adacore.com>
4649         * sem_aux.ads (Get_Binary_Nkind): New function that returns
4650         the Node_Kind value of an entity defining a binary operator.
4651         (Get_Unary_Nkind): New function that returns the Node_Kind value
4652         of an entity defining a unary operator.
4654 2014-07-18  Pascal Obry  <obry@adacore.com>
4656         * sysdep.c: comment update.
4657         * adaint.c (__gnat_fputwc): Use wchar_t on a limited set of
4658         platforms where it is known to be supported.
4660 2014-07-18  Thomas Quinot  <quinot@adacore.com>
4662         * sem_dist.adb (Process_Remote_AST_Declaration): Need
4663         to set Fat_Type's Ekind in order to be able to use its
4664         Corresponding_Remote_Type attribute.
4666 2014-07-18  Hristian Kirtchev  <kirtchev@adacore.com>
4668         * einfo.adb Last_Aggregate_Assignment is now Node 30.
4669         (Last_Aggregate_Assignment): Include
4670         constants in the assertion. Update the underlying node.
4671         (Set_Last_Aggregate_Assignment): Include constants in the
4672         assertion. Update the underlying node.  (Write_Field11_Name):
4673         Remove the entry for Last_Aggregate_Assignment.
4674         (Write_Field30_Name): Add an entry for Last_Aggregate_Assignment.
4675         * einfo.ads Update the node designation and usage of attribute
4676         Last_Aggregate_Assignment.
4677         * exp_aggr.adb (Expand_Array_Aggregate): Store the last
4678         assignment statement used to initialize a controlled object.
4679         (Late_Expansion): Store the last assignment statement used to
4680         initialize a controlled record or an array of controlled objects.
4681         * exp_ch3.adb (Expand_N_Object_Declaration): Default
4682         initialization of objects is now performed in a separate routine.
4683         (Default_Initialize_Object): New routine.
4684         * exp_ch7.adb (Build_BIP_Cleanup_Stmts): Add formal parameter
4685         Obj_Id. Update the comment on usage.
4686         (Find_Last_Init): Remove formal parameter Typ. Update comment on usage.
4687         Reimplement the logic.  (Find_Last_Init_In_Block): New routine.
4688         (Is_Init_Call): Add formal parameter Init_Typ. Update the
4689         comment on usage.  Account for the type init proc when trying
4690         to determine whether a statement is an initialization call.
4691         (Make_Adjust_Call): Rename formal parameter For_Parent to
4692         Skip_Self. Update all occurrences of For_Parent. Account for
4693         non-tagged types. Update the call to Make_Call.
4694         (Make_Call): Rename formal parameter For_Parent to Skip_Self. Update
4695         comment on usage. Update all occurrences of For_Parent.
4696         (Make_Final_Call): Rename formal parameter For_Parent to
4697         Skip_Self. Update all occurrences of For_Parent. Account
4698         for non-tagged types. Update the call to Make_Call.
4699         (Process_Object_Declaration): Most variables and constants are
4700         now local to the routine.
4701         * exp_ch7.ads (Make_Adjust_Call): Rename formal parameter
4702         For_Parent to Skip_Self. Update the comment on usage.
4703         (Make_Final_Call): Rename formal parameter For_Parent to
4704         Skip_Self. Update the comment on usage.
4706 2014-07-18  Ed Schonberg  <schonberg@adacore.com>
4708         * sem_ch9.adb (Analyze_Requeue): The entry being referenced
4709         can be a procedure that is implemented by entry, and have a
4710         formal that is a synchronized interface.  It does not have to
4711         be declared as a protected operation.
4713 2014-07-18  Robert Dewar  <dewar@adacore.com>
4715         * gnat_rm.texi: Remove mention of obsolete attributes
4716         Max[_Interrupt]_Priority, which have never been implemented
4717         (or at the very least were removed long ago if they ever were
4718         implemented.  Add documentation of Max[_Interrupt]_Priority
4719         constants in package System.
4720         * ttypes.ads: Document actual handling of package System,
4721         rather than a historical fantasy version.  Remove mention of
4722         non-existent attributes Max[_Interrupt]_Priority.
4724 2014-07-18  Pascal Obry  <obry@adacore.com>
4726         * a-witeio.adb (Put): No 16-bit character output when text
4727         translation is disabled.
4728         * i-cstrea.ads: Code clean up.
4730 2014-07-18  Robert Dewar  <dewar@adacore.com>
4732         * gnat_rm.texi: Document that Wchar_T_Size and Word_Size are
4733         static attributes.
4735 2014-07-18  Arnaud Charlet  <charlet@adacore.com>
4737         * a-witeio.adb, initialize.c: Update comments. Minor clean ups.
4739 2014-07-18  Pascal Obry  <obry@adacore.com>
4741         * adaint.c: Do not include wchar.h on VxWorks.
4742         * mingw32.h: Remove obsolete definition.
4744 2014-07-18  Pascal Obry  <obry@adacore.com>
4746         * a-textio.adb, a-witeio.adb, a-ztexio.adb: Use C_Streams Default_Text.
4747         * i-cstrea.ads (Content_Encoding): Moved here, add convention C.
4748         * s-ficobl.ads (Content_Encoding): Moved to C_Streams.
4749         * s-fileio.adb (Open): Adjust to use Content_Encoding from C_Streams.
4751 2014-07-18  Pascal Obry  <obry@adacore.com>
4753         * a-textio.adb: Rename Is_Text_File to Text_Encoding.
4754         * a-ztexio.adb: Likewise.
4755         * a-witeio.adb: Likewise.
4756         (Open): Pass file's translation mode to set_text_mode.
4757         * s-ficobl.ads (Content_Encoding): New type.
4758         (Text_Content_Encoding): New subtype.
4759         (AFCB): Rename Is_Text_File to Text_Encoding.
4760         * s-fileio.adb (Open): Handles new text_translation
4761         values. Remove Is_Text_File which is equivalent to Text_Encoding
4762         in Text_Content_Encoding.
4763         * adaint.h (__gnat_set_mode): New routine.
4764         * sysdep.c (__gnat_set_wide_text_mode): Removed.
4765         (__gnat_set_mode): New routine.
4767 2014-07-18  Arnaud Charlet  <charlet@adacore.com>
4769         * gcc-interface/decl.c, gcc-interface/trans.c,
4770         gcc-interface/utils.c (Is_Packed_Array_Type): Renamed 
4771         Is_Packed_Array_Impl_Type.
4773 2014-07-18  Gary Dismukes  <dismukes@adacore.com>
4775         * sem_util.adb: Minor typo correction.
4777 2014-07-18  Ben Brosgol  <brosgol@adacore.com>
4779         * gnat_rm.texi: Complete previous change.
4781 2014-07-18  Pascal Obry  <obry@adacore.com>
4783         * s-fileio.adb: Minor style fix.
4785 2014-07-18  Ed Schonberg  <schonberg@adacore.com>
4787         * sem_ch13.adb (Analyze_Aspect_Specifications): Detect improper
4788         specification of stream attributes for subtypes that are not
4789         first subtypes, to prevent malformed rep_item chains in the case
4790         of such illegal specifications for discriminated private subtypes.
4791         (Check_Overloaded_Name): Verify that the name is an entity name
4792         before other checks.
4794 2014-07-18  Pascal Obry  <obry@adacore.com>
4796         * adaint.c (__gnat_fputwc) Do not disable on cross-build.
4798 2014-07-18  Robert Dewar  <dewar@adacore.com>
4800         * sem_prag.adb, sem_attr.adb,
4801         sem_aggr.adb, sinfo.ads, sem_eval.ads: Minor reformatting.
4803 2014-07-18  Pascal Obry  <obry@adacore.com>
4805         * sysdep.c (__gnat_wide_text_translation_required): Removed from here.
4806         * initialize.c (__gnat_wide_text_translation_required): Defined here.
4808 2014-07-18  Pascal Obry  <obry@adacore.com>
4810         * adaint.c (__gnat_fputwc): New routine.
4811         * s-crtl.ads (fputwc): Now imported as __gnat_fputwc.
4813 2014-07-18  Hristian Kirtchev  <kirtchev@adacore.com>
4815         * einfo.adb: Flag 270 is now used as Stores_Attribute_Old_Prefix.
4816         (Set_Stores_Attribute_Old_Prefix): New routine.
4817         (Stores_Attribute_Old_Prefix): New routine.
4818         (Write_Entity_Flags):
4819         Output flag Stores_Attribute_Old_Prefix.
4820         * einfo.ads Add new flag Stores_Attribute_Old_Prefix along with
4821         comment on usage.
4822         (Set_Stores_Attribute_Old_Prefix): New routine
4823         along with pragma Inline.
4824         (Stores_Attribute_Old_Prefix): New
4825         routine along with pragma Inline.
4826         * exp_attr.adb (Expand_N_Attribute_Reference): Mark the generated
4827         constant which captures the result of attribute 'Old's prefix.
4828         * sem_util.adb (In_Assertion_Expression_Pragma): Recognize a
4829         relocated expression which acted as a prefix of attribute 'Old.
4831 2014-07-18  Bob Duff  <duff@adacore.com>
4833         * s-spsufi.adb (Finalize_And_Deallocate): Set Subpool.Owner to
4834         null before dispatching to Deallocate_Subpool.
4835         * s-stposu.ads (Default_Subpool_For_Pool): Change mode of
4836         parameter of Default_Subpool_For_Pool to 'in out'.
4837         * s-stposu.adb (Set_Pool_Of_Subpool): Use raise expression. Add
4838         a message to the raise.
4839         * sem_util.adb: Minor reformatting.
4841 2014-07-18  Robert Dewar  <dewar@adacore.com>
4843         * sem_util.adb (Check_Expression_Against_Static_Predicate):
4844         Mark expression as non-static if it fails static predicate check,
4845         and issue additional warning.
4847 2014-07-18  Pascal Obry  <obry@adacore.com>
4849         * a-witeio.adb (Put): Control translation based on
4850         wide_text_translation_required.
4851         * adaint.c (CurrentCCSEncoding): New variable.
4852         * initialize.c (__gnat_initialize): On Windows initialize
4853         CurrentCCSEncoding based on values in GNAT_CCS_ENCODING
4854         environment variable.
4855         * mingw32.h (CurrentCCSEncoding): New external.
4856         (__gnat_wide_text_translation_required): Likewise.
4857         * sysdep.c (wide_text_translation_required): New variable.
4858         (__gnat_set_wide_text_mode): Set mode based on CurrentCCSEncoding.
4860 2014-07-18  Hristian Kirtchev  <kirtchev@adacore.com>
4862         * sem_prag.adb (Analyze_Refined_Depends_In_Decl_Part): Remove global
4863         variable Refined_States.  Add global variable Matched_Items.
4864         (Check_Dependency_Clause): Account for dependency
4865         clauses utilizing states with visible null refinements.
4866         (Is_Null_Refined_State): New routine.
4867         (Match_Items): Record each successfully matched item of pragma Depends.
4868         (Record_Item): New routine.
4870 2014-07-18  Ed Schonberg  <schonberg@adacore.com>
4872         * sem_attr.adb (Analyze_Attribute, case 'Update): Set
4873         Do_Range_Check flag on a dynamic index expression used in a
4874         component association in the argument of Update.
4876 2014-07-18  Gary Dismukes  <dismukes@adacore.com>
4878         * einfo.ads, sem_eval.ads, sem_ch13.adb: Minor reformatting.
4880 2014-07-18  Hristian Kirtchev  <kirtchev@adacore.com>
4882         * exp_ch6.adb (Expand_Simple_Function_Return): Redo the marking
4883         of enclosing blocks, loops and the enclosing function using a
4884         parent-based traversal.
4885         * exp_util.adb (Wrap_Statements_In_Block): Suppress the secondary
4886         stack reclamation if the iterator loop contains a return statement
4887         that uses the stack.
4888         * sem_ch5.adb (Analyze_Loop_Statement): There is no need to
4889         patch up the scope stack as the secondary stack management now
4890         takes into account the enclosing function of the iterator loop.
4892 2014-07-18  Robert Dewar  <dewar@adacore.com>
4894         * sem_ch3.adb, g-memdum.ads, i-cstrea.ads: Minor reformatting.
4896 2014-07-18  Robert Dewar  <dewar@adacore.com>
4898         * einfo.adb (Has_Static_Predicate): New function.
4899         (Set_Has_Static_Predicate): New procedure.
4900         * einfo.ads (Has_Static_Predicate): New flag.
4901         * sem_ch13.adb (Is_Predicate_Static): New function
4902         (Build_Predicate_Functions): Use Is_Predicate_Static to reorganize
4903         (Add_Call): Minor change in Sloc of generated expression
4904         (Add_Predicates): Remove setting of Static_Pred, no longer used.
4905         * sem_ch4.adb (Has_Static_Predicate): Removed this function,
4906         replace by use of the entity flag Has_Static_Predicate_Aspect.
4907         * sem_eval.adb (Eval_Static_Predicate_Check): Check real case
4908         and issue warning that predicate is not checked for now.
4909         * sem_eval.ads (Eval_Static_Predicate_Check): Fix comments in
4910         spec.
4911         * sem_util.adb (Check_Expression_Against_Static_Predicate):
4912         Carry out check for any case where there is a static predicate,
4913         and output appropriate message.
4914         * sinfo.ads: Minor comment corrections.
4916 2014-07-18  Ed Schonberg  <schonberg@adacore.com>
4918         * exp_ch3.adb (Expand_Freeze_Record_Type): If the type is derived
4919         from an untagged private type whose full view is tagged, the type
4920         is marked tagged for layout reasons, but it has no dispatch table,
4921         so Set_All_DT_Position must not be called.
4922         * exp_ch13.adb: If the freeze node is for a type internal to a
4923         record declaration, as is the case for a class-wide subtype
4924         of a parent component, the relevant scope is the scope of the
4925         enclosing record.
4927 2014-07-18  Thomas Quinot  <quinot@adacore.com>
4929         * g-memdum.adb, g-memdum.ads: Code clean ups.
4931 2014-07-18  Hristian Kirtchev  <kirtchev@adacore.com>
4933         * sem_prag.adb (Check_Dependency_Clause):
4934         Update the comment on usage. Reimplement the mechanism which
4935         attempts to match a single clause of Depends against one or
4936         more clauses of Refined_Depends.
4937         (Input_Match): Removed.
4938         (Inputs_Match): Removed.
4939         (Is_Self_Referential): Removed.
4940         (Normalize_Clause): Update the call to Split_Multiple_Outputs.
4941         (Normalize_Outputs): Rename variable Split to New_Claue and update
4942         all its occurrences.
4943         (Report_Extra_Clauses): Update the comment on usage.
4944         (Split_Multiple_Outputs): Renamed to Normalize_Outputs.
4946 2014-07-18  Gary Dismukes  <dismukes@adacore.com>
4948         * i-cstrea.ads: Minor reformatting.
4950 2014-07-18  Hristian Kirtchev  <kirtchev@adacore.com>
4952         * exp_util.adb (Wrap_Statements_In_Block): Propagate both
4953         secondary stack-related flags to the generated block.
4954         * sem_ch5.adb (Analyze_Loop_Statement): Update the scope chain
4955         once the loop is relocated in a block.
4957 2014-07-18  Robert Dewar  <dewar@adacore.com>
4959         * repinfo.ads: Add documentation on handling of back annotation
4960         for dynamic case.
4962 2014-07-18  Ed Schonberg  <schonberg@adacore.com>
4964         * sinfo.ads, sinfo.adb (Incomplete_View): New semantic attribute
4965         of full type declaration, denotes previous declaration for
4966         incomplete view of the type.
4967         * sem_ch3.adb (Analyze_Full_Type_Declaration): Set Incomplete_View
4968         of declaration if one is present.
4969         (Replace_Type): When constructing the signature of an inherited
4970         operation, handle properly the case where the operation has a
4971         formal whose type is an incomplete view.
4972         * sem_util.adb (Collect_Primitive_Operations): Handle properly
4973         the case of an operation declared after an incomplete declaration
4974         for a type T and before the full declaration of T.
4976 2014-07-18  Pascal Obry  <obry@adacore.com>
4978         * i-cstrea.ads: Add documentation for set_wide_text_mode.
4980 2014-07-18  Robert Dewar  <dewar@adacore.com>
4982         * a-witeio.adb: Minor code reorganization.
4983         * i-cstrea.ads: Add comment.
4985 2014-07-18  Thomas Quinot  <quinot@adacore.com>
4987         * s-oscons-tmplt.c (NAME_MAX): Minor cleaup and comment
4988         clarifications.
4990 2014-07-18  Robert Dewar  <dewar@adacore.com>
4992         * g-memdum.adb, g-memdum.ads, exp_strm.adb: Minor reformatting.
4994 2014-07-18  Pascal Obry  <obry@adacore.com>
4996         * s-crtl.ads, i-cstrea.ads (fputwc): New routine.
4997         * a-witeio.adb (Put): On platforms where there is translation
4998         done by the OS output the raw text.
4999         (New_Line): Use Put above to properly handle the LM wide characters.
5001 2014-07-18  Thomas Quinot  <quinot@adacore.com>
5003         * g-memdum.adb, g-memdum.ads (Dump): New parameter Prefix, defaulted
5004         to Absolute_Address.
5006 2014-07-18  Eric Botcazou  <ebotcazou@adacore.com>
5008         * opt.ads (Suppress_Back_Annotation): Remove as unused.
5009         * fe.h (Back_Annotate_Rep_Info): Likewise.
5010         (Global_Discard_Names): Likewise.
5012 2014-07-18  Robert Dewar  <dewar@adacore.com>
5014         * sem_ch13.adb (Is_Type_Ref): Check that type name is not
5015         parenthesized.
5017 2014-07-18  Vincent Celier  <celier@adacore.com>
5019         * s-osinte-vms.ads: Fix style errors.
5021 2014-07-18  Thomas Quinot  <quinot@adacore.com>
5023         * s-oscons-tmplt.c (_POSIX_SOURCE): Define in order to get
5024         NAME_MAX and PATH_MAX.
5026 2014-07-18  Bob Duff  <duff@adacore.com>
5028         * exp_strm.adb (Build_Record_Or_Elementary_Input_Function,
5029         Build_Record_Or_Elementary_Output_Procedure): For Input and
5030         Output attributes, do not read/write the discriminants if they
5031         have default values; that will be done by Read/Write.
5033 2014-07-18  Robert Dewar  <dewar@adacore.com>
5035         * sem_aggr.adb, exp_ch5.adb, sem_ch3.adb, layout.adb, sem_type.adb,
5036         exp_util.adb, exp_attr.adb, einfo.adb, einfo.ads, exp_pakd.adb,
5037         checks.adb, exp_pakd.ads, freeze.adb, sem_util.adb, exp_dbug.adb,
5038         exp_dbug.ads, exp_ch4.adb, sem_ch8.adb, exp_aggr.adb, sem_eval.adb,
5039         sem_ch13.adb: Change name Packed_Array_Type to Packed_Array_Impl_Type.
5041 2014-07-18  Robert Dewar  <dewar@adacore.com>
5043         * lib-writ.adb, makeutl.adb, ali.ads: Minor reformatting.
5045 2014-07-18  Vincent Celier  <celier@adacore.com>
5047         * lib-writ.ads: Update documentation about the D lines.
5049 2014-07-18  Ed Schonberg  <schonberg@adacore.com>
5051         * sem_ch13.adb (Replace_Type_References_Generic): Use type entity
5052         as a parameter, rather than its Chars field, in order to locate
5053         freeze node of type. If the predicate or invariant has references
5054         to types other than the one to which the contract applies, these
5055         types must be frozen, and the corresponding predicate functions
5056         created, before that freeze node.
5058 2014-07-18  Robert Dewar  <dewar@adacore.com>
5060         * freeze.adb, einfo.ads, einfo.adb: Minor code reorganization.
5061         * par_sco.adb: Minor reformatting.
5063 2014-07-18  Gary Dismukes  <dismukes@adacore.com>
5065         * exp_ch4.adb (Real_Range_Check): Turn off
5066         the Do_Range_Check flag on the conversion's current Expression
5067         argument rather than on the originally captured Operand node,
5068         as Expression may reflect a rewriting (as in conversions to a
5069         fixed-point type).
5071 2014-07-18  Vincent Celier  <celier@adacore.com>
5073         * ali.adb (Scan_ALI): Set Sdep_Record.Unit_Name, when the unit
5074         is not a subunit.
5075         * ali.ads (Sdep_Record): New component Unit_Name.
5076         * lib-writ.adb (Write_ALI): Write the unit name in D lines.
5077         * makeutl.adb (Check_Source_Info_In_ALI): Return False if a
5078         dependent unit is in a project and the source file name is not
5079         one of its sources.
5081 2014-07-18  Bob Duff  <duff@adacore.com>
5083         * s-addima.ads: Minor: add comment.
5085 2014-07-18  Thomas Quinot  <quinot@adacore.com>
5087         * freeze.adb (Check_Component_Storage_Order): Fix enforcement
5088         of nesting rules for composites with different SSOs.
5090 2014-07-18  Thomas Quinot  <quinot@adacore.com>
5092         * par_sco.adb (Is_Logical_Operator): An If_Expression is not
5093         a proper logical operator.
5094         (Has_Decision): An If_Expression indicates the presence of a decision
5095         although it is not a logical operator.
5097 2014-07-18  Robert Dewar  <dewar@adacore.com>
5099         * gnat_ugn.texi: Remove note that -gnatR not allowed with -gnatc.
5100         * switch-c.adb: Remove prohibition of -gnatR and -gnatc together.
5102 2014-07-18  Eric Botcazou  <ebotcazou@adacore.com>
5104         * sem_ch13.adb (Kill_Rep_Clause): Clear Comes_From_Source flag
5105         on the null statement.
5107 2014-07-18  Thomas Quinot  <quinot@adacore.com>
5109         * adaint.c: Minor comment rewording.
5110         * socket.c: Define macros _REENTRANT and _THREAD_SAFE so that
5111         use of errno in this file is thread safe.
5113 2014-07-18  Arnaud Charlet  <charlet@adacore.com>
5115         * gnat_ugn.texi: Doc clarification.
5116         * sem_ch13.adb (Kill_Rep_Clause): Use Replace not Rewrite.
5117         * sem_ch13.ads: Minor comment update.
5119 2014-07-18  Robert Dewar  <dewar@adacore.com>
5121         * repinfo.ads: Minor comment fix.
5123 2014-07-18  Robert Dewar  <dewar@adacore.com>
5125         * par-prag.adb: Add dummy entry for Default_Scalar_Storage_Order.
5126         * sem_prag.adb: Add dummy implementation of
5127         Default_Scalar_Storage_Order.
5128         * snames.ads-tmpl: Add dummy entry for
5129         Default_Scalar_Storage_Order pragma.
5131 2014-07-18  Robert Dewar  <dewar@adacore.com>
5133         * opt.adb (Tree_Read): Read Address_Is_Private,
5134         Ignore_Rep_Clauses, Ignore_Style_Check_Pragmas, Multiple_Unit_Index.
5135         (Tree_Write): Corresponding writes
5136         * opt.ads: Minor comment reformatting and fixes.
5137         * tree_io.ads: Increment ASIS_Version_Number.
5139 2014-07-18  Robert Dewar  <dewar@adacore.com>
5141         * sem_attr.adb, s-os_lib.ads, prj-tree.adb: Minor reformatting.
5142         * types.h: Fix typo.
5144 2014-07-18  Robert Dewar  <dewar@adacore.com>
5146         * freeze.adb (Check_Address_Clause): Use Kill_Rep_Clause (no
5147         functional change).
5148         * gnat_ugn.texi: Document that -gnatI removes rep clauses from
5149         ASIS trees.
5150         * sem_ch13.adb (Kill_Rep_Clause): New procedure
5151         (Analyze_Attribute_Definition_Clause): Use
5152         Kill_Rep_Clause. This is just a cleanup, no functional effect.
5153         (Analyze_Enumeration_Representation_Clause):
5154         Use Kill_Rep_Clause. This means that enum rep
5155         clauses are now properly removed from -gnatct trees.
5156         (Analyze_Record_Representation_Clause): Same change.
5157         * sem_ch13.ads (Kill_Rep_Clause): New procedure.
5159 2014-07-18  Pascal Obry  <obry@adacore.com>
5161         * s-os_lib.ads, s-os_lib.adb (GM_Time_Of): New routine to create an
5162         OS_Time from time parts.
5163         * adaint.h, adaint.c (__gnat_to_os_time): New routine.
5165 2014-07-18  Ed Schonberg  <schonberg@adacore.com>
5167         * sem_ch4.adb (Try_Container_Indexing): Refine previous patch for
5168         indexing over containers that are derived types: check whether
5169         signature of found operation has the correct first parameter
5170         before retrieving directly a primitive operation.
5172 2014-07-18  Ed Schonberg  <schonberg@adacore.com>
5174         * sem_attr.adb (Analyze_Attribute, case 'Update): Set
5175         Do_Range_Check flag on dynamic bounds of a range used in a
5176         component association in the argument of Update.
5178 2014-07-18  Thomas Quinot  <quinot@adacore.com>
5180         * adaint.c: #define _REENTRANT and _THREAD_SAFE in order for
5181         accesses to errno(3) to be thread safe.
5183 2014-07-18  Vincent Celier  <celier@adacore.com>
5185         * prj-tree.adb (Imported_Or_Extended_Project_Of): For each non
5186         limited imported project that is an extending project, return
5187         a project being extended if it has the expected name.
5189 2014-07-18  Pascal Obry  <obry@adacore.com>
5191         * s-os_lib.ads, s-os_lib.adb (Set_File_Last_Modify_Time_Stamp): New
5192         routine to set the last modification time stamp for the given file.
5193         * gnatchop.adb (File_Time_Stamp): Removed.
5194         (Write_Unit): Use
5195         Set_File_Last_Modify_Time_Stamp instead of ad-hoc implementation.
5197 2014-07-18  Ed Schonberg  <schonberg@adacore.com>
5199         * sem_aggr.adb (Aggregate_Constraint_Checks): Moved to sem_util.
5200         * sem_util.ads, sem_util.adb (Aggregate_Constraint_Checks):
5201         Moved here, so it can be shared with the resolution of 'Update,
5202         whose argument shares some features with aggregates.
5203         * sem_attr.adb (Resolve_Attribute, case 'Update): Apply
5204         Aggregate_Constraint_Checks with the expression of each
5205         association, so that the Do_Range_Check flag is set when needed.
5207 2014-07-18  Ed Schonberg  <schonberg@adacore.com>
5209         * sem_ch4.adb (Try_Container_Indexing):  If the container
5210         type is a derived type, the value of the inherited  aspect is
5211         the Reference operation declared for the parent type. However,
5212         Reference is also a primitive operation of the new type, and
5213         the inherited operation has a different signature. We retrieve
5214         the right one from the list of primitive operations of the
5215         derived type.
5217 2014-07-18  Vincent Celier  <celier@adacore.com>
5219         * debug.adb: Update comment.
5221 2014-07-18  Hristian Kirtchev  <kirtchev@adacore.com>
5223         * exp_util.adb (Needs_Finalization): There is no reason why a
5224         C type should not benefit from finalization actions.
5226 2014-07-18  Thomas Quinot  <quinot@adacore.com>
5228         * s-oscons-tmplt.c (NAME_MAX): Fix definition for Solaris
5229         (FILENAME_MAX): Remove unneeded definition.
5231 2014-07-18  Robert Dewar  <dewar@adacore.com>
5233         * exp_attr.adb, debug.adb: Update comments.
5235 2014-07-18  Vincent Celier  <celier@adacore.com>
5237         * par-ch4.adb (Simple_Expression): Add missing style check
5238         for binary adding operators.
5239         (Term): Add missing style check for multiplying operators.
5241 2014-07-18  Robert Dewar  <dewar@adacore.com>
5243         * impunit.adb: Minor comment correction.
5244         * widechar.adb, s-wchcon.ads: Minor comment corrections.
5246 2014-07-18  Robert Dewar  <dewar@adacore.com>
5248         * sem_ch13.adb (Build_Discrete_Static_Predicate): New name
5249         for Build_Static_Predicate (Build_Predicate_Functions):
5250         Don't try to build discrete predicate for real type.
5251         (Build_Predicate_Functions): Report attempt to use
5252         Static_Predicate function on real type as unimplemented.
5253         * sem_util.adb (Check_Expression_Against_Static_Predicate):
5254         Add guard to prevent blow up on predicate for real type.
5256 2014-07-18  Ed Schonberg  <schonberg@adacore.com>
5258         * einfo.adb (Set_Static_Predicate): Simplify assertion to handle
5259         properly static predicate on enumeration types and modular types
5260         (not subtypes).
5262 2014-07-18  Pierre-Marie Derodat  <derodat@adacore.com>
5264         * scos.ads (SCO_Unit_Table_Entry): Add a field to keep track of
5265         the corresponding source file index.
5266         * get_scos.ads (Get_SCOs): Add a default value for it.
5267         * par_sco.adb (SCO_Record): Fill the corresponding value.
5268         * scos.h: New.
5270 2014-07-18  Vincent Celier  <celier@adacore.com>
5272         * a-strunb-shared.adb, s-auxdec.ads, s-rannum.adb, atree.ads,
5273         urealp.adb, vms_data.ads, lib.ads, s-auxdec-vms_64.ads: Minor
5274         reformatting.
5275         * gnat_ugn.texi: Add documentation for new gnatmem switch -t.
5277 2014-07-18  Thomas Quinot  <quinot@adacore.com>
5279         * g-sercom.ads (Set): document possible data loss.
5281 2014-07-18  Ed Schonberg  <schonberg@adacore.com>
5283         * exp_attr.adb (Expand_N_Attribute_Reference, cases Input,
5284         Output, Read, Write): If the restriction No_Streams is active,
5285         replace each occurrence of a stream attribute by an explicit
5286         Raise statement.
5288 2014-07-18  Robert Dewar  <dewar@adacore.com>
5290         * par_sco.adb, a-reatim.ads, exp_attr.adb, sem_util.adb: Minor
5291         reformatting.
5293 2014-07-18  Robert Dewar  <dewar@adacore.com>
5295         * einfo.ads, einfo.adb (Has_Out_Or_In_Out_Parameter): New flag and
5296         function.
5297         (Set_Has_Out_Or_In_Out_Parameter): New procedure.
5298         * sem_ch6.adb (Set_Formal_Mode): Set Has_Out_Or_In_Out_Parameter flag.
5299         * sem_res.adb (Resolve_Call): Error if call of Ada 2012 function
5300         with OUT or IN OUT from earlier Ada mode (e.g. Ada 2005)
5302 2014-07-18  Robert Dewar  <dewar@adacore.com>
5304         * bcheck.adb (Check_Consistent_Restrictions):
5305         Remove obsolete code checking for violation of
5306         No_Standard_Allocators_After_Elaboration (main program)
5307         * bindgen.adb (Gen_Adainit): Handle
5308         No_Standard_Allocators_After_Elaboration
5309         (Gen_Output_File_Ada): ditto.
5310         * exp_ch4.adb (Expand_N_Allocator): Handle
5311         No_Standard_Allocators_After_Elaboration.
5312         * Makefile.rtl: Add entry for s-elaall
5313         * rtsfind.ads: Add entry for Check_Standard_Allocator.
5314         * s-elaall.ads, s-elaall.adb: New files.
5315         * sem_ch4.adb (Analyze_Allocator): Handle
5316         No_Standard_Allocators_After_Elaboration.
5318 2014-07-18  Robert Dewar  <dewar@adacore.com>
5320         * lib.adb, lib.ads, lib-writ.adb, lib-writ.ads, ali.adb,
5321         ali.ads, lib-load.adb: Remove Lib.Has_Allocator and all uses.
5322         Remove AB parameter from ali files and all uses.
5323         Remove Allocator_In_Body and all uses.
5325 2014-07-18  Robert Dewar  <dewar@adacore.com>
5327         * g-expect-vms.adb: Add comment.
5329 2014-07-18  Thomas Quinot  <quinot@adacore.com>
5331         * par_sco.adb (Is_Logical_Operation): return True for
5332         N_If_Expression.
5334 2014-07-18  Ed Schonberg  <schonberg@adacore.com>
5336         * sem_attr.adb (Resolve_Attribute, case 'Update): Do full
5337         analysis and resolution of each choice in the associations within
5338         the argument of Update, because they may be variable names.
5340 2014-07-18  Hristian Kirtchev  <kirtchev@adacore.com>
5342         * exp_attr.adb (Expand_Loop_Entry_Attribute): Insert any condition
5343         actions before the generated if statement.
5345 2014-07-18  Hristian Kirtchev  <kirtchev@adacore.com>
5347         * gnat_ugn.texi Enhance the documentation of
5348         switches -gnateA and -gnateV.
5350 2014-07-18  Ed Schonberg  <schonberg@adacore.com>
5352         * sem_util.adb (Build_Default_Subtype): Add missing condition
5353         so that code matches description: use the full view of the base
5354         only if the base is private and the subtype is not.
5356 2014-07-17  Gary Dismukes  <dismukes@adacore.com>
5358         * exp_disp.adb: Minor reformatting.
5359         * exp_disp.adb: Minor code reorganization.
5361 2014-07-17  Thomas Quinot  <quinot@adacore.com>
5363         * gnat_rm.texi, freeze.adb (Check_Component_Storage_Order): Do not
5364         require an explicit SSO attribute definition clause on a composite type
5365         just because one of its components has one.
5367 2014-07-17  Robert Dewar  <dewar@adacore.com>
5369         * sem_attr.adb (Analyze_Attribute, case Loop_Entry): Rewrite
5370         attribute out of existence if the enclosing pragma is ignored.
5371         * sem_util.adb: Minor reformatting.
5373 2014-07-17  Ed Schonberg  <schonberg@adacore.com>
5375         * exp_aggr.adb (Expand_Array_Aggregate): Handle properly an
5376         array aggregate expanded into assignments when it appears as a
5377         local declaration in an inlined body.
5379 2014-07-17  Doug Rupp  <rupp@adacore.com>
5381         * init.c [__ANDROID__]: Modify for ZCX.
5382         * exp_aggr.adb: Minor reformatting
5383         * sigtramp-armvxw.c, sigtramp-ppcvxw.c: Update comments.
5385 2014-07-17  Robert Dewar  <dewar@adacore.com>
5387         * a-strunb-shared.ads, a-stwiun-shared.ads, a-stzunb-shared.ads,
5388         exp_ch7.adb, g-pehage.ads, g-socket.ads, gnat_ugn.texi, gnat_ugx.texi,
5389         scng.adb: Remove incorrect usage "allow to" and "allows to".
5391 2014-07-17  Robert Dewar  <dewar@adacore.com>
5393         * exp_dist.adb: Minor reformatting.
5395 2014-07-17  Bob Duff  <duff@adacore.com>
5397         * gnat_ugn.texi: Improve documentation of Unrestricted_Access.
5399 2014-07-17  Robert Dewar  <dewar@adacore.com>
5401         * sem_ch13.adb (Build_Invariant_Procedure): Add variable Nam
5402         (Add_Invariants): Set Nam to Name_Type_Invariant if from aspect.
5404 2014-07-17  Thomas Quinot  <quinot@adacore.com>
5406         * exp_pakd.adb (Create_Packed_Array_Type.Install_PAT): For a
5407         non-bit-packed array, propagate Reverse_Storage_Order to the
5408         packed array type.
5410 2014-07-17  Javier Miranda  <miranda@adacore.com>
5412         * exp_disp.adb: Fix comment.
5413         * exp_pakd.adb: Minor reformatting.
5415 2014-07-17  Robert Dewar  <dewar@adacore.com>
5417         * bindgen.adb (Gen_Elab_Calls): Skip reference to elab
5418         entity if none exists (Gen_Elab_Calls): Complain if clash with
5419         No_Multiple_Elaboration.
5420         * s-rident.ads, restrict.ads: Add restriction No_Multiple_Elaboration.
5421         * sem_util.adb (Build_Elaboration_Entity): Skip building entity
5422         if not needed.
5423         * gnat_rm.texi: Document restriction No_Multiple_Elaboration.
5424         * sem_ch4.adb: Minor comment updates.
5426 2014-07-17  Ed Schonberg  <schonberg@adacore.com>
5428         * exp_ch9.adb (Buid_Protected_Subprogram_Call): Preserve type
5429         of function call for later use when shared passive objects
5430         are involved.
5432 2014-07-17  Hristian Kirtchev  <kirtchev@adacore.com>
5434         * par-ch13.adb (Get_Aspect_Specifications):
5435         Catch a case where the argument of SPARK aspect Refined_State
5436         is not properly parenthesized.
5438 2014-07-17  Hristian Kirtchev  <kirtchev@adacore.com>
5440         * exp_ch6.adb (Expand_Ctrl_Function_Call): Do not extend
5441         the lifetime of a reference to an Ada 2012 container element.
5442         (Is_Element_Reference): New routine.
5444 2014-07-17  Robert Dewar  <dewar@adacore.com>
5446         * ali.ads: Minor comment fix.
5447         * lib-writ.adb: Minor reformatting.
5449 2014-07-17  Ed Schonberg  <schonberg@adacore.com>
5451         * sem_ch10.adb (Analyze_Proper_Body): When analyzing a subunit
5452         in ASIS mode, load another subunit only if it a subunit of the
5453         current one, not a sibling that has been reached through the
5454         analysis of an ancestor. This allows the construction of the
5455         ASIS tree for the subunit even when sibling subunits have errors.
5457 2014-07-17  Hristian Kirtchev  <kirtchev@adacore.com>
5459         * sem_ch3.adb (Analyze_Declarations): Remove the guard which
5460         prevents the analysis of various contracts when the associated
5461         construct is erroneous.
5462         * sem_util.adb (Save_SPARK_Mode_And_Set): Do not query the
5463         SPARK_Pragma of an illegal or a partially decorated construct.
5465 2014-07-17  Robert Dewar  <dewar@adacore.com>
5467         * s-imguns.ads: Minor reformatting.
5469 2014-07-17  Hristian Kirtchev  <kirtchev@adacore.com>
5471         * exp_ch7.adb (Build_Finalization_Master): Move all local
5472         variables to the proper code section. When looking for an existing
5473         finalization master, inspect the ultimate ancestor type of the
5474         full view.
5475         * sem_util.ads, sem_util.adb (Root_Type_Of_Full_View): New routine.
5477 2014-07-17  Robert Dewar  <dewar@adacore.com>
5479         * aspects.ads, aspects.adb: Add entries for aspect Annotate.
5480         * gnat_rm.texi: Document Entity argument for pragma Annotate and
5481         Annotate aspect.
5482         * sem_ch13.adb (Analyze_Aspect_Specification): Add processing
5483         for Annotate aspect.
5484         * sem_prag.adb (Analyze_Pragma, case Annotate): Allow optional
5485         Entity argument at end.
5486         * sinfo.ads (N_Aspect_Specification): Add note on Annotate aspect.
5488 2014-07-17  Tristan Gingold  <gingold@adacore.com>
5490         * s-imguns.ads: Fix minor typo.
5492 2014-07-17  Thomas Quinot  <quinot@adacore.com>
5494         * sprint.adb: Minor reformatting.
5496 2014-07-17  Robert Dewar  <dewar@adacore.com>
5498         * sprint.adb (Write_Itype): Print proper header for string
5499         literal subtype.
5501 2014-07-17  Steve Baird  <baird@adacore.com>
5503         * sinfo.ads, sem_scil.ads: Improve comments, minor reformatting.
5505 2014-07-17  Vincent Celier  <celier@adacore.com>
5507         * gnatbind.adb: Change in message "try ... for more information".
5509 2014-07-17  Robert Dewar  <dewar@adacore.com>
5511         * sprint.adb: Code clean up.
5513 2014-07-17  Hristian Kirtchev  <kirtchev@adacore.com>
5515         * exp_ch7.adb (Find_Last_Init): Relocate local variables to
5516         the relevant code section. Add new local constant Obj_Id. When
5517         a limited controlled object is initialized by a function call,
5518         the build-in-place object access function call acts as the last
5519         initialization statement.
5520         * exp_util.adb (Is_Object_Access_BIP_Func_Call): New routine.
5521         (Is_Secondary_Stack_BIP_Func_Call): Code reformatting.
5522         * exp_util.ads (Is_Object_Access_BIP_Func_Call): New routine.
5524 2014-07-17  Ed Schonberg  <schonberg@adacore.com>
5526         * sem_ch8.adb (Analyze_Generic_Renaming): For generic subprograms,
5527         propagate intrinsic flag to renamed entity, to allow e.g. renaming
5528         of Unchecked_Conversion.
5529         * sem_ch3.adb (Analyze_Declarations): Do not analyze contracts
5530         if the declaration has errors.
5532 2014-07-17  Ed Schonberg  <schonberg@adacore.com>
5534         * a-rbtgbk.adb: a-rbtgbk.adb (Generic_Insert_Post): Check whether
5535         container is busy before checking whether capacity allows for
5536         a further insertion. Insertion in a busy container that is full
5537         raises Program_Error rather than Capacity_Error. Previous to that
5538         patch which exception was raised varied among container types.
5540 2014-07-17  Robert Dewar  <dewar@adacore.com>
5542         * g-comlin.ads, g-comlin.adb: Minor clean up.
5544 2014-07-17  Bob Duff  <duff@adacore.com>
5546         * gnat_ugn.texi: Update gnatpp doc.
5548 2014-07-17  Robert Dewar  <dewar@adacore.com>
5550         * gnat_rm.texi: Document new restriction No_Long_Long_Integers.
5551         * exp_ch4.adb (Make_Array_Comparison_Op): Add note that we
5552         could do this by actually expanding a real generic.
5553         * a-tags.ads: Add comments about performance.
5554         * sprint.adb (Sprint_Node_Actual, case N_Object_Declaration):
5555         Print Etype of defining identifier, rather than the object
5556         definition. More information.
5558 2014-07-17  Thomas Quinot  <quinot@adacore.com>
5560         * exp_dist.adb: Minor documentation clarification.
5562 2014-07-17  Hristian Kirtchev  <kirtchev@adacore.com>
5564         * exp_util.adb (Is_Aliased): Revert previous change.
5566 2014-07-17  Vincent Celier  <celier@adacore.com>
5568         * g-comlin.adb (Try_Help): New procedure.
5569         (Getopt): Use new procedure Try_Help.
5570         * g-comlin.ads (Try_Help): New procedure.
5572 2014-07-17  Bob Duff  <duff@adacore.com>
5574         * gnat_ugn.texi: Minor update.
5576 2014-07-17  Robert Dewar  <dewar@adacore.com>
5578         * gnat_rm.texi: Improve documentation of Unrestricted_Access.
5579         * sinfo.ads: Document restriction on aggregates (must expand to
5580         assignments if one or more assignments needs expansion, e.g. for
5581         controlled types).
5582         * sem_ch13.adb: All warning messages regarding bit order should
5583         be info: messages.
5584         * gnat_ugn.texi: Minor correction of missing @ on @code
5586 2014-07-17  Robert Dewar  <dewar@adacore.com>
5588         * restrict.ads (Implementation_Restriction): Add No_Long_Long_Integer.
5589         * s-rident.ads (Partition_Boolean_Restrictions): Add
5590         No_Long_Long_Integer.
5591         * sem_ch3.adb (Modular_Type_Declaration): Size must be <=
5592         Long_Integer'Size if restriction No_Long_Long_Integer is active.
5593         (Signed_Integer_Type_Declaration): Do not allow Long_Long_Integer
5594         as the implicit base type for a signed integer type declaration
5595         if restriction No_Long_Long_Integer is active.
5596         * sem_util.ads, sem_util.adb (Set_Entity_With_Checks): Include check for
5597         No_Long_Long_Integer.
5599 2014-07-17  Robert Dewar  <dewar@adacore.com>
5601         * sem_ch3.adb, a-ztexio.ads, exp_imgv.adb, casing.adb, casing.ads,
5602         einfo.ads, checks.adb, sem_ch12.adb, a-textio.ads, freeze.adb,
5603         repinfo.adb, exp_ch6.adb, sem_ch4.adb, a-witeio.ads, sem_ch8.adb,
5604         sem_warn.adb, exp_aggr.adb, exp_dist.adb, par-tchk.adb, s-fatgen.adb,
5605         treepr.adb, lib-xref.adb: Remove the word kludge from ada sources.
5607 2014-07-17  Robert Dewar  <dewar@adacore.com>
5609         * debug.adb: Remove -gnatdQ.
5610         * exp_disp.adb: Remove -gnatdQ.
5611         * a-ztenio.ads, a-wtinio.ads, a-wtmoio.ads, a-ztcoau.ads, a-tiinio.ads,
5612         a-wtfiio.ads, a-timoio.ads, sem_ch12.adb, a-tifiio.ads, a-ztinio.ads,
5613         rtsfind.adb, rtsfind.ads, a-ztmoio.ads, a-wtdeio.ads, a-ztfiio.ads,
5614         a-tideio.ads, a-wtflio.ads, a-ztdeio.ads, sem_ch8.adb, a-tiflio.ads,
5615         sprint.adb, a-ztflio.ads, snames.ads-tmpl, a-wtenio.ads,
5616         a-tienio.ads: Rename Text_IO_Kludge to Text_IO_Special_Unit.
5618 2014-07-17  Robert Dewar  <dewar@adacore.com>
5620         * back_end.adb: Minor reformatting and comment additions.
5621         * checks.ads, checks.adb (Duplicated_Tag_Checks_Suppressed): New
5622         function.
5623         * exp_disp.adb (Make_DT): Use Duplicated_Tag_Checks_Suppressed.
5624         (Make_VM_TSD): Use Duplicated_Tag_Checks_Suppressed.
5625         * gnat_rm.texi: Document new check Duplicated_Tag_Checks_Suppressed.
5626         * gnat_ugn.texi: Additional documentation for Duplicated_Tag_Check.
5627         * snames.ads-tmpl (Duplicated_Tag_Checks_Suppressed): New check.
5628         * types.ads (Duplicated_Tag_Checks_Suppressed): New check.
5630 2014-07-17  Robert Dewar  <dewar@adacore.com>
5632         * gnat_rm.texi: Minor comment updates.
5634 2014-07-17  Ed Schonberg  <schonberg@adacore.com>
5636         * sem_util.adb (Make_Explicit_Dereference): If the expression
5637         being dereferenced is a generalized indexing, reset the overloaded
5638         flag on the generalized indexing call, consistent with the
5639         resetting of the flag on the original indexed component.
5641 2014-07-17  Robert Dewar  <dewar@adacore.com>
5643         * gnat_ugn.texi: Document advise not to mix -gnatV? and
5644         optimization.
5646 2014-07-17  Robert Dewar  <dewar@adacore.com>
5648         * checks.adb (Insert_Valid_Check): Don't insist on a name
5649         for the prefix when we make calls to Force_Evaluation and
5650         Duplicate_Subexpr_No_Checks.
5651         * exp_util.adb (Is_Volatile_Reference): Handle all cases properly
5652         (Remove_Side_Effects): Handle all volatile references right
5653         (Side_Effect_Free): Volatile reference is never side effect free
5654         * sinfo.ads (N_Attribute_Reference): Add comments explaining
5655         that in the tree, the prefix can be a general expression.
5657 2014-07-17  Hristian Kirtchev  <kirtchev@adacore.com>
5659         * sem_ch6.adb (Analyze_Subprogram_Body_Contract,
5660         Analyze_Subprogram_Contract): Add comments on SPARK_Mode save/restore.
5661         * sem_ch7.adb (Analyze_Package_Body_Contract,
5662         Analyze_Package_Contract): Add comments on SPARK_Mode save/restore.
5664 2014-07-17  Robert Dewar  <dewar@adacore.com>
5666         * exp_ch7.ads, exp_util.ads: Document Insert_Action_After,
5667         Store_After_Actions_In_Scope.
5669 2014-07-17  Robert Dewar  <dewar@adacore.com>
5671         * sem_aux.ads: Minor comment addition.
5673 2014-07-17  Ed Schonberg  <schonberg@adacore.com>
5675         * sem_res.adb (Make_Call_Into_Operator): If the call is already
5676         a rewriting of an operator node, there are no actuals to be
5677         propagated from original node to rewritten node when in ASIS mode.
5679 2014-07-17  Hristian Kirtchev  <kirtchev@adacore.com>
5681         * sem_ch6.adb (Analyze_Subprogram_Body_Contract,
5682         Analyze_Subprogram_Contract): Add new local variable Mode. Save
5683         and restore the SPARK mode of the related construct in a
5684         stack-like fashion.
5685         * sem_ch7.adb (Analyze_Package_Body_Contract,
5686         Analyze_Package_Contract): Add new local variable Mode. Save and
5687         restore the SPARK mode of the related construct in a stack-like fashion.
5688         * sem_util.adb Remove with and use clause for Opt.
5689         (Restore_SPARK_Mode): New routine.
5690         (Save_SPARK_Mode_And_Set): New routine.
5691         * sem_util.ads Add with and use clause for Opt.
5692         (Restore_SPARK_Mode): New routine.
5693         (Save_SPARK_Mode_And_Set): New routine.
5695 2014-07-17  Hristian Kirtchev  <kirtchev@adacore.com>
5697         * exp_util.adb (Is_Aliased): Transient objects
5698         within an expression with actions cannot be considered aliased.
5700 2014-07-17  Thomas Quinot  <quinot@adacore.com>
5702         * sem.ads (Scope_Stack_Entry): Reorganize storage of action lists;
5703         introduce a new list (cleanup actions) for each (transient) scope.
5704         * sinfo.ads, sinfo.adb (Cleanup_Actions): New attribute for
5705         N_Block_Statement
5706         * exp_ch7.ads (Store_Cleanup_Actions_In_Scope): New subprogram.
5707         * exp_ch7.adb (Store_Actions_In_Scope): New subprogram, common
5708         processing for Store_xxx_Actions_In_Scope.
5709         (Build_Cleanup_Statements): Allow for a list of additional
5710         cleanup statements to be passed by the caller.
5711         (Expand_Cleanup_Actions): Take custom cleanup actions associated
5712         with an N_Block_Statement into account.
5713         (Insert_Actions_In_Scope_Around): Account for Scope_Stack_Entry
5714         reorganization (refactoring only, no behaviour change).
5715         (Make_Transient_Block): Add assertion to ensure that the current
5716         scope is indeed a block (namely, the entity for the transient
5717         block being constructed syntactically, which has already been
5718         established as a scope).  If cleanup actions are present in the
5719         transient scope, transfer them now to the transient block.
5720         * exp_ch6.adb (Expand_Protected_Subprogram_Call): Freeze the
5721         called function while it is still present as the name in a call
5722         in the tree. This may not be the case later on if the call is
5723         rewritten into a transient block.
5724         * exp_smem.adb (Add_Shared_Var_Lock_Procs): The post-actions
5725         inserted after calling a protected operation on a shared passive
5726         protected must be performed in a block finalizer, not just
5727         inserted in the tree, so that they are executed even in case of
5728         a normal (RETURN) or abnormal (exception) transfer of control
5729         outside of the current scope.
5730         * exp_smem.ads (Add_Shared_Var_Lock_Procs): Update documentation
5731         * sem_ch8.adb, expander.adb, exp_ch11.adb: Adjust for
5732         Scope_Stack_Entry reorganization.
5734 2014-07-17  Thomas Quinot  <quinot@adacore.com>
5736         * exp_disp.adb (Make_DT, Make_VM_TSD): Do not omit Check_TSD
5737         call for types that do not have an explicit attribute definition
5738         clause for External_Tag, as their default tag may clash with an
5739         explicit tag defined for some other type.
5741 2014-07-17  Hristian Kirtchev  <kirtchev@adacore.com>
5743         * exp_util.adb (Is_Controlled_Function_Call): Recognize a
5744         controlled function call with multiple actual parameters that
5745         appears in Object.Operation form.
5747 2014-07-17  Thomas Quinot  <quinot@adacore.com>
5749         * einfo.ads, einfo.adb (Has_External_Tag_Rep_Clause): Remove
5750         entity flag.
5751         * sem_ch13.adb (Analyze_Attribute_Definition_Clause, case
5752         External_Tag): No need to set entity flag.
5753         * sem_aux.ads, sem_aux.adb (Has_External_Tag_Rep_Clause):
5754         Reimplement correctly in terms of Has_Rep_Item.
5756 2014-07-17  Thomas Quinot  <quinot@adacore.com>
5758         * exp_ch7.adb (Establish_Transient_Scope.Find_Node_To_Be_Wrapped):
5759         Start examining the tree at the node passed to
5760         Establish_Transient_Scope (not its parent).
5761         * exp_ch6.adb (Make_Build_In_Place_Call_In_Object_Declaration):
5762         The access type for the variable storing the reference to
5763         the call must be declared and frozen prior to establishing a
5764         transient scope.
5765         * exp_ch9.adb: Minor reformatting.
5767 2014-07-17  Pascal Obry  <obry@adacore.com>
5769         * s-os_lib.ads: Minor comment update.
5771 2014-07-17  Tristan Gingold  <gingold@adacore.com>
5773         * sysdep.c: Add ATTRIBUTE_UNUSED to avoid warnings.  Fix some
5774         indentation.
5775         * socket.c: Remove #warning to avoid warning.
5776         * expect.c: Indent some preprocessor directives to clarify
5777         nested if.  Do not use wait.h on PikeOS.  Add ATTRIBUTE_UNUSED
5778         to remove warnings.
5779         * env.c: Fix indentation.  Port to PikeOS.
5780         * gsocket.h: Port to PikeOS.  Remove #warning.
5781         * terminals.c: Port to PikeOS.  Fix indentation of the stubs.
5782         Add ATTRIBUTE_UNUSED to stubs arguments.  Fix return statement
5783         of stubbed __gnat_setup_parent_communication.
5784         * adaint.c: Port to PikeOS.  Reindent some preprocessor
5785         directives to clarify nested if.  Fix indentation.  Add missing
5786         ATTRIBUTE_UNUSED.
5788 2014-07-17  Robert Dewar  <dewar@adacore.com>
5790         * sem_attr.adb: Minor reformatting.
5792 2014-07-17  Robert Dewar  <dewar@adacore.com>
5794         * exp_ch7.adb, exp_ch7.ads, sinfo.ads: Minor reformatting.
5796 2014-07-17  Ed Schonberg  <schonberg@adacore.com>
5798         * sem_case.adb (Check_Choice_Set): If the case expression is the
5799         expression in a predicate, do not recheck coverage against itself,
5800         to prevent spurious errors.
5801         * sem_ch13.adb (Check_Aspect_At_End_Of_Declarations): Indicate that
5802         expression comes from an aspect specification, to prevent spurious
5803         errors when expression is a case expression in a predicate.
5805 2014-07-17  Pascal Obry  <obry@adacore.com>
5807         * adaint.c, adaint.h (__gnat_set_executable): Add mode parameter.
5808         * s-os_lib.ads, s-os_lib.adb (Set_Executable): Add Mode parameter.
5810 2014-07-17  Vincent Celier  <celier@adacore.com>
5812         * gnatchop.adb, make.adb, gnatbind.adb, clean.adb, gprep.adb,
5813         gnatxref.adb, gnatls.adb, gnatfind.adb, gnatname.adb: Do not output
5814         the usage for an erroneous invocation of a gnat tool.
5816 2014-07-16  Vincent Celier  <celier@adacore.com>
5818         * gnatls.adb: Get the target parameters only if -nostdinc was
5819         not specified.
5821 2014-07-16  Ed Schonberg  <schonberg@adacore.com>
5823         * checks.adb (Insert_Valid_Check): If the expression is a packed
5824         component of a modular type of the right size the data is always
5825         valid. This os particularly useful if the component is part of
5826         a volatile variable.
5828 2014-07-16  Robert Dewar  <dewar@adacore.com>
5830         * gnat_rm.texi, sinfo.ads, freeze.adb, exp_aggr.adb: Minor reformatting
5832 2014-07-16  Thomas Quinot  <quinot@adacore.com>
5834         * exp_ch7.ads: Minor documentation fix.
5836 2014-07-16  Ed Schonberg  <schonberg@adacore.com>
5838         * sem_ch3.adb (Find_Type_Name): Diagnose properly
5839         a private extension completion that is an interface definition
5840         with an interface list.
5842 2014-07-16  Arnaud Charlet  <charlet@adacore.com>
5844         * gnatls.adb (Gnatls): Code clean ups.
5846 2014-07-16  Thomas Quinot  <quinot@adacore.com>
5848         * sinfo.ads, sinfo.adb (N_Compound_Statement): New node kind.
5849         * sem.adb (Analyze): Handle N_Compound_Statement.
5850         * sprint.adb (Sprint_Node_Actual): Ditto.
5851         * sem_ch5.ads, sem_ch5.adb (Analyze_Compound_Statement): New
5852         procedure to handle N_Compound_Statement.
5853         * exp_aggr.adb (Collect_Initialization_Statements):
5854         Use a proper compound statement node, instead of a bogus
5855         expression-with-actions with a NULL statement as its expression,
5856         to wrap collected initialization statements.
5857         * freeze.ads, freeze.adb
5858         (Explode_Initialization_Compound_Statement): New public procedure,
5859         lifted from Freeze_Entity.
5860         (Freeze_Entity): When freezing
5861         an object with captured initialization statements and without
5862         delayed freezing, explode compount statement.
5863         * sem_ch4.adb (Analyze_Expression_With_Actions): Remove special
5864         case that used to handle bogus EWAs with NULL statement as
5865         the expression.
5866         * exp_ch13.adb (Expand_N_Freeze_Entity): For an object with
5867         delayed freezing and captured initialization statements, explode
5868         compound statement.
5870 2014-07-16  Gary Dismukes  <dismukes@adacore.com>
5872         * g-rewdat.adb, g-rewdat.ads: Minor reformatting.
5874 2014-07-16  Doug Rupp  <rupp@adacore.com>
5876         * s-interr-hwint.adb: Casing error on parameter.
5878 2014-07-16  Pascal Obry  <obry@adacore.com>
5880         * Makefile.rtl: Add g-rewdat.o dependencies in
5881         GNATRTL_NONTASKING_OBJS.
5883 2014-07-16  Ed Schonberg  <schonberg@adacore.com>
5885         * sem_case.adb: Code clean up.
5887 2014-07-16  Vincent Celier  <celier@adacore.com>
5889         * make.adb: Do not read gnat.adc when gnatmake is invoked
5890         with -gnatA.
5892 2014-07-16  Pascal Obry  <obry@adacore.com>
5894         * gnat_rm.texi, impunit.adb, g-rewdat.adb, g-rewdat.ads: Initial
5895         implementation of GNAT.Rewrite_Data.
5897 2014-07-16  Vincent Celier  <celier@adacore.com>
5899         * gnatls.adb (Normalize): New function.
5900         (Gnatls): Get the target parameters. On targets other than VMS,
5901         normalize the path names in the source search path, the object search
5902         path and the project search path.
5904 2014-07-16  Ed Schonberg  <schonberg@adacore.com>
5906         * sem_case.adb: Avoid self-checking of case expressions in
5907         dynamic predicates.
5909 2014-07-16  Robert Dewar  <dewar@adacore.com>
5911         * gnat_rm.texi: Document effect of Suppress_Initialization on tags and
5912         discriminants.
5914 2014-07-16  Eric Botcazou  <ebotcazou@adacore.com>
5916         * switch-b.adb (Scan_Binder_Switches): Add missing guard.
5918 2014-07-16  Ben Brosgol  <brosgol@adacore.com>
5920         * gnat_ugn.texi: Fix typo.
5922 2014-07-16  Ed Schonberg  <schonberg@adacore.com>
5924         * exp_ch4.adb (Expand_N_Case_Expression): Do not expand case
5925         expression if it is the specification of a subtype predicate:
5926         it will be expanded when the return statement is analyzed, or
5927         when a static predicate is transformed into a static expression
5928         for evaluation by the front-end.
5929         * sem_ch13.adb (Get_RList): If the expression for a static
5930         predicate is a case expression, extract the alternatives of the
5931         branches with a True value to create the required statically
5932         evaluable expression.
5934 2014-07-16  Thomas Quinot  <quinot@adacore.com>
5936         * exp_prag.adb (Expand_Pragma_Check): Use the location of the
5937         expression, not the location of the aspect, for all generated
5938         code, so that in particular the call to raise_assert_failure
5939         gets the sloc of the associated condition.
5940         * exp_ch6.adb
5941         (Expand_Subprogram_Contract.Build_Postconditions_Procedure):
5942         Set an explicit End_Label on the handled sequence of statements
5943         for the _Postconditions procedure so that the implicit return
5944         statement does not erroneously get associated with code generated
5945         for the last condition in postconditions.
5947 2014-07-16  Thomas Quinot  <quinot@adacore.com>
5949         * ug_words: Fix name of VMS synonym for -gnatw.z (SIZE_ALIGNMENT,
5950         not SIZE_ALIGN) and -gnatw.Z (NOSIZE_ALIGNMENT, not NOSIZE_ALIGN).
5951         * vms_data.ads: Add missing spaces in VMS synonyms for -gnatw.z /
5952         -gnatw.Z.
5954 2014-07-16  Robert Dewar  <dewar@adacore.com>
5956         * sem_ch3.adb, sem_prag.adb, sem_util.adb, sem_res.adb, sem_ch13.adb:
5957         Minor code reorganization (use Is_Access_Type, not in Access_Kind).
5958         * exp_ch3.adb: Minor code reorganization, use Is_Access_Type,
5959         not in Access_Kind.
5960         * par-ch4.adb (At_Start_Of_Attribute): New function
5961         (P_Simple_Expression): Better msg for bad attribute prefix.
5962         * scans.ads: Minor reformatting.
5964 2014-07-16  Ed Schonberg  <schonberg@adacore.com>
5966         * sem_attr.adb (Resolve_Attribute, case 'Update): If choice is a
5967         static constant, check that in belongs to the corresponding index
5968         subtype, to produce the proer warning when expansion is disabled.
5970 2014-07-16  Robert Dewar  <dewar@adacore.com>
5972         * freeze.adb (Freeze_Entity): Warn on incompatible size/alignment.
5973         * gnat_ugn.texi: Document -gnatw.z and -gnatw.Z.
5974         * ug_words: VMS synonyms (WARNINGS=[NO]SIZE_ALIGN) for -gnatw.z/-gnatw.Z
5975         * usage.adb: Add lines for -gnatw.z/-gnatw.Z.
5976         * vms_data.ads: VMS synonyms (WARNINGS=[NO]SIZE_ALIGN) for
5977         -gnatw.z/-gnatw.Z
5978         * warnsw.adb: Set Warn_On_Size_Alignment appropriately.
5979         * warnsw.ads (Warn_On_Size_Alignment): New flag Minor
5980         reformatting.
5982 2014-07-16  Hristian Kirtchev  <kirtchev@adacore.com>
5984         * exp_ch7.adb (Process_Declarations): Reinstate the check on
5985         a hook object to ensure that the related transient declaration
5986         is finalizable.
5987         * exp_util.adb (Is_Aliased): Do not consider expresison with
5988         actions as a special context.
5989         (Requires_Cleanup_Actions): Reinstate the check on a hook object to
5990         ensure that the related transient declaration is finalizable.
5992 2014-07-16  Robert Dewar  <dewar@adacore.com>
5994         * checks.ads, checks.adb (Allocation_Checks_Suppressed): New function.
5995         * snames.ads-tmpl: Add Allocation_Check to list of check names.
5996         * types.ads: Add Allocation_Check to list of check names.
5998 2014-07-16  Thomas Quinot  <quinot@adacore.com>
6000         * sem_util.adb (Enter_Name): replace bogus test for presence of
6001         Corresponding_Remote_Type with correct test on Ekind.
6002         * sem_res.adb (Valid_Conversion): ditto; also clarify validity
6003         of calls to Corresponding_ Remote_Type (documentation fix).
6005 2014-07-16  Robert Dewar  <dewar@adacore.com>
6007         * gnat_rm.texi: Document illegal case of Unrestricted_Access.
6008         * sem_attr.adb (Analyze_Access_Attribute): Set_Non_Aliased_Prefix
6009         where it applies.
6010         (Resolve_Attribute, case Access): Flag illegal Unrestricted_Access use.
6011         * sinfo.ads, sinfo.adb (Non_Aliased_Prefix): New flag.
6013 2014-07-16  Robert Dewar  <dewar@adacore.com>
6015         * gnat_ugn.texi: Document binder switch -Ra.
6016         * gnatbind.adb (List_Closure_Display): Implement -Ra switch
6017         (List_Closure_All).
6018         * opt.ads (List_Closure_All): New switch.
6019         * switch-b.adb (Scan_Binder_Switches): Recognize -Ra to set
6020         List_Closure_All.
6022 2014-07-16  Ben Brosgol  <brosgol@adacore.com>
6024         * gnat_rm.texi: Minor edits, to make case consistent in names
6025         of types and fields.
6027 2014-07-16  Robert Dewar  <dewar@adacore.com>
6029         * gnat_rm.texi: Document erroneous mixing of thin pointers and
6030         unrestricted access
6031         * gnat_ugn.texi: Add note on size of access types about thin
6032         pointers and the use of attribute Unrestricted_Access.
6034 2014-07-16  Ed Schonberg  <schonberg@adacore.com>
6036         * a-cbdlli.ads, a-cbdlli.adb, a-cbhama.ads, a-cbhama.adb,
6037         * a-cbhase.ads, a-cbhase.adb, a-cborma.ads, a-cborma.adb,
6038         * a-cborse.ads, a-cborse.adb, a-cobove.ads a-cobove.adb: Add Control
6039         machinery to detect tampering on bounded vectors.
6041 2014-07-16  Robert Dewar  <dewar@adacore.com>
6043         * gnat_rm.texi: Document that leading/trailing asterisks are
6044         now implied for the pattern match string for pragma Warnings
6045         and Warning_As_Error.
6046         * sem_prag.adb (Acquire_Warning_Match_String): New procedure.
6047         (Analyze_Pragma, case Warning_As_Error): Call
6048         Acquire_Warning_Match_String.
6049         (Analyze_Pragma, case Warnings): Call Acquire_Warning_Match_String.
6051 2014-07-16  Bob Duff  <duff@adacore.com>
6053         * gnat_ugn.texi: Document need for project file
6054         for --incremental switch for gnat2xml.
6056 2014-07-16  Robert Dewar  <dewar@adacore.com>
6058         * gnat_rm.texi: Fix example of non-packable components in packed
6059         records section.
6061 2014-07-16  Robert Dewar  <dewar@adacore.com>
6063         * s-tpoben.adb, s-tasren.adb, s-interr.adb, s-interr-hwint.adb,
6064         s-shasto.adb, s-interr-vms.adb, s-interr-sigaction.adb: Avoid use of
6065         upper case in exception messages.
6067 2014-07-16  Robert Dewar  <dewar@adacore.com>
6069         * snames.ads-tmpl, sem_attr.adb, exp_attr.adb: Same_Storage attribute
6070         is renamed Has_Same_Storage.
6071         * gnat_rm.texi: Document missing SPARK pragmas and attributes.
6072         * sem_prag.adb: Minor comment fix (use LOCAL_NAME in syntax
6073         descriptions).
6075 2014-07-16  Robert Dewar  <dewar@adacore.com>
6077         * exp_util.adb, sem_attr.adb, exp_ch4.adb, a-cohase.ads,
6078         a-coinho-shared.adb, a-coinho-shared.ads: Minor reformatting.
6080 2014-07-16  Robert Dewar  <dewar@adacore.com>
6082         * gnat_ugn.texi: Add note that integrated
6083         preprocessing cannot be applied to configuration pragma files.
6085 2014-07-16  Yannick Moy  <moy@adacore.com>
6087         * sem_attr.adb (Analyze_Attribute/cases Pred
6088         and Succ): Always enable range check on fixed-point types if
6089         not suppressed for the type.
6091 2014-07-16  Hristian Kirtchev  <kirtchev@adacore.com>
6093         * sem_util.adb (State_Has_Enabled_Property):
6094         Account for an external property denoted by an others choice.
6096 2014-07-16  Hristian Kirtchev  <kirtchev@adacore.com>
6098         * exp_ch4.ads, exp_ch4.adb (Find_Hook_Context): Relocated to Exp_Util.
6099         * exp_ch7.adb (Process_Declarations): There is no need to check
6100         that a transient object being hooked is controlled as it would
6101         not have been hooked in the first place.
6102         * exp_ch9.adb Remove with and use clause for Exp_Ch4.
6103         * exp_util.adb (Find_Hook_Context): Relocated from Exp_Ch4.
6104         (Is_Aliased): A renaming of a transient controlled object is
6105         not considered aliasing when it occurs within an expression
6106         with actions.
6107         (Requires_Cleanup_Actions): There is no need to
6108         check that a transient object being hooked is controlled as it
6109         would not have been hooked in the first place.
6110         * exp_util.ads (Find_Hook_Context): Relocated from Exp_Ch4.
6112 2014-07-16  Hristian Kirtchev  <kirtchev@adacore.com>
6114         * sem_ch13.adb (Insert_After_SPARK_Mode): Moved to
6115         the outer level of routine Analyze_Aspect_Specifications. Ensure
6116         that the corresponding pragmas of aspects Initial_Condition and
6117         Initializes are inserted after pragma SPARK_Mode.
6119 2014-07-16  Ed Schonberg  <schonberg@adacore.com>
6121         * sem_attr.adb (Analyze_Attribute, case 'Update): Handle
6122         properly a choice list with more than one choice, where each
6123         is an aggregate denoting a sequence of array indices for a
6124         multidimentional array. For SPARK use.
6126 2014-07-16  Vadim Godunko  <godunko@adacore.com>
6128         * a-coinho-shared.adb (Adjust): Create
6129         copy of internal shared object and element when source container
6130         is locked.
6131         (Copy): Likewise.
6132         (Query_Element): Likewise.
6133         (Update_Element): Likewise.
6134         (Constant_Reference): Likewise. Raise Constraint_Error on attempt
6135         to get reference for empty holder.
6136         (Reference): Likewise.
6138 2014-07-16  Thomas Quinot  <quinot@adacore.com>
6140         * exp_ch4.adb (Find_Hook_Context): New subprogram, extracted
6141         from Process_Transient_Oject.
6142         * exp_ch4.ads: Ditto.
6143         * exp_ch9.adb (Build_Class_Wide_Master): Insert the _master
6144         declaration as an action on the topmost enclosing expression,
6145         not on a possibly conditional subexpreession.
6147 2014-07-16  Vadim Godunko  <godunko@adacore.com>
6149         * a-coinho.adb, a-coinho-shared.adb, a-coinho.ads, a-coinho-shared.ads:
6150         Fix parameter mode of Update_Element.
6152 2014-07-16  Robert Dewar  <dewar@adacore.com>
6154         * a-coinho.adb, a-coinho-shared.adb, a-coinho-shared.ads: Minor
6155         reformatting.
6157 2014-07-16  Ed Schonberg  <schonberg@adacore.com>
6159         * a-cohase.ads: Type Iterator must be controlled, so that the
6160         tampering bit is properly set through an iteration.
6161         * a-cohase.adb: Add Finalize operation for type Iterator.
6163 2014-07-16  Ed Schonberg  <schonberg@adacore.com>
6165         * a-coinho-shared.adb, a-coinho-shared.ads: Proper structures for
6166         tampering checks.
6168 2014-07-16  Ed Schonberg  <schonberg@adacore.com>
6170         * a-coinho-shared.adb: Fix spurious accessibility check.
6172 2014-06-15  Jan Hubicka  <hubicka@ucw.cz>
6174         * gcc-interface/utils.c (process_attributes): Use set_decl_tls_model.
6176 2014-06-14  Bernd Edlinger  <bernd.edlinger@hotmail.de>
6178         PR ada/61505
6179         * gnat_rm.texi: Fix errors with makeinfo 5.1.
6181 2014-06-14  Arnaud Charlet  <charlet@adacore.com>
6183         PR ada/61505
6184         * gnat_rm.texi: Attempt to fix error with makeinfo 5.1.
6186 2014-06-13  Yannick Moy  <moy@adacore.com>
6188         * exp_attr.adb: Fix typo in comment.
6189         * gnat1drv.adb (Adjust_Global_Switches): Force float overflow
6190         checking in GNATprove_Mode.
6192 2014-06-13  Ed Schonberg  <schonberg@adacore.com>
6194         * a-coinho-shared.adb, a-coinho-shared.ads: Update shared version.
6196 2014-06-13  Robert Dewar  <dewar@adacore.com>
6198         * sem_ch3.adb, sem_ch9.adb, a-coinho.adb, a-coinho.ads: Minor
6199         reformatting.
6201 2014-06-13  Hristian Kirtchev  <kirtchev@adacore.com>
6203         * sem_prag.adb (Analyze_Pragma): Add local
6204         variable Missing_Parentheses. Emit an error when a state
6205         declaration with options appears without parentheses. Add a
6206         guard to prevent a bogus error when a state declaration may be
6207         interpreted as an option if a previous declaration with options
6208         was not parenthesized.
6210 2014-06-13  Robert Dewar  <dewar@adacore.com>
6212         * checks.adb: Validate_Alignment_Check_Warnings: New procedure
6213         (Apply_Address_Clause_Check): Make Aligment_Warnings table entry.
6214         * checks.ads (Alignment_Warnings_Record): New type.
6215         (Alignment_Warnings): New table
6216         (Validate_Alignment_Check_Warnings): New procedure.
6217         * errout.adb (Delete_Warning_And_Continuations): New procedure
6218         (Error_Msg_Internal): Set Warning_Msg (Delete_Warning): Handle
6219         Warnings_Treated_As_Errors (Finalize): Minor reformatting
6220         * errout.ads (Warning_Msg): New variable
6221         (Delete_Warning_And_Continuations): New procedure
6222         * erroutc.adb (Delete_Msg): Handle Warnings_Treated_As_Errors count.
6223         * gnat1drv.adb (Post_Compilation_Validation_Checks): New procedure.
6225 2014-06-13  Ed Schonberg  <schonberg@adacore.com>
6227         * a-coinho.adb, a-coinho.ads: Add Reference machinery.
6229 2014-06-13  Hristian Kirtchev  <kirtchev@adacore.com>
6231         * errout.adb (SPARK_Msg_N): New routine.
6232         (SPARK_Msg_NE): New routine.
6233         * errout.ads Add a section on SPARK-related error routines.
6234         (SPARK_Msg_N): New routine.
6235         (SPARK_Msg_NE): New routine.
6236         * sem_ch13.adb (Analyze_Aspect_Specifications): Ensure that
6237         pragma Abstract_State is always inserted after SPARK_Mode.
6238         (Insert_After_SPARK_Mode): New routine.
6239         * sem_prag.adb (Analyze_Abstract_State,
6240         Analyze_Constituent, Analyze_External_Property,
6241         Analyze_External_Property_In_Decl_Part, Analyze_Global_Item,
6242         Analyze_Global_List, Analyze_Initialization_Item,
6243         Analyze_Initialization_Item_With_Inputs, Analyze_Input_Item,
6244         Analyze_Input_List, Analyze_Input_Output, Analyze_Part_Of,
6245         Analyze_Pragma, Analyze_Refined_Depends_In_Decl_Part,
6246         Analyze_Refined_Global_In_Decl_Part,
6247         Analyze_Refined_State_In_Decl_Part, Analyze_Refinement_Clause,
6248         Check_Aspect_Specification_Order, Check_Constituent_Usage,
6249         Check_Declaration_Order, Check_Dependency_Clause,
6250         Check_Duplicate_Mode, Check_Duplicate_Option,
6251         Check_Duplicate_Property, Check_External_Properties,
6252         Check_External_Property, Check_Function_Return,
6253         Check_Matching_Constituent, Check_Matching_State,
6254         Check_Mode_Restriction_In_Enclosing_Context,
6255         Check_Mode_Restriction_In_Function, Check_Refined_Global_Item,
6256         Check_State_And_Constituent_Use, Create_Or_Modify_Clause,
6257         Has_Extra_Parentheses, Inconsistent_Mode_Error,
6258         Match_Error, Propagate_Part_Of, Report_Extra_Clauses,
6259         Report_Extra_Constituents_In_List, Report_Extra_Inputs,
6260         Report_Unrefined_States, Report_Unused_Constituents,
6261         Report_Unused_States, Role_Error, Usage_Error):
6262         Convert Error_Msg_XXX calls to SPARK_Msg_XXX calls
6263         to report semantic errors only when SPARK_Mode is on.
6264         (Analyze_Depends_In_Decl_Part): Do not check the syntax of
6265         pragma Depends explicitly, this is now done by the analysis.
6266         (Analyze_Global_In_Decl_List): Do not check the syntax of
6267         pragma Global explicitly, this is now done by the analysis.
6268         (Analyze_Initializes_In_Decl_Part): Do not check the syntax of
6269         pragma Initializes explicitly, this is now done by the analysis.
6270         (Analyze_Part_Of): Do not check the syntax of the encapsulating
6271         state, this is now done by the analysis.
6272         (Analyze_Pragma): Do
6273         not check the syntax of a state declaration, this is now done
6274         by the analysis.
6275         (Analyze_Refined_Depends_In_Decl_Part): Do not
6276         check the syntax of pragma Refined_Depends explicitly, this is now
6277         done by the analysis.
6278         (Analyze_Refined_Global_In_Decl_Part): Do
6279         not check the syntax of pragma Refined_Global explicitly, this is
6280         now done by the analysis.
6281         (Analyze_Refined_State_In_Decl_Part):
6282         Do not check the syntax of pragma Refined_State explicitly, this
6283         is now done by the analysis.
6284         (Check_Dependence_List_Syntax): Removed.
6285         (Check_Global_List_Syntax): Removed.
6286         (Check_Initialization_List_Syntax): Removed.
6287         (Check_Item_Syntax): Removed.
6288         (Check_Missing_Part_Of): Do not consider items from an instance.
6289         (Check_Refinement_List_Syntax): Removed.
6290         (Check_State_Declaration_Syntax): Removed.
6291         (Collect_Global_List): Do not raise Program_Error when the input is
6292         malformed.
6293         (Process_Global_List): Do not raise Program_Error when the input
6294         is malformed.
6295         * sem_ch13.adb: Minor reformatting.
6297 2014-06-13  Ed Schonberg  <schonberg@adacore.com>
6299         * sem_ch3.adb (Find_Type_Name): Diagnose a private type completion
6300         that is an interface definition with an interface list.
6301         (Process_Full_View): Move error message on missmatched interfaces
6302         between views to the declaration of full view, for clarity.
6303         * sem_ch9.adb (Check_Interfaces): Move error message to full view,
6304         for clarity.
6306 2014-06-13  Robert Dewar  <dewar@adacore.com>
6308         * exp_attr.adb (Expand_N_Attribute_Reference, case Pred/Succ): Change
6309         reason to Overflow.
6311 2014-06-13  Robert Dewar  <dewar@adacore.com>
6313         * makeutl.adb: Minor reformatting.
6315 2014-06-13  Gail Schenker  <schenker@adacore.com>
6317         * debug.adb, sem_eval.adb (Why_Not_Static): Remove temporary code and
6318         associated flag (d.z), no longer needed.
6320 2014-06-13  Ed Schonberg  <schonberg@adacore.com>
6322         * sem_ch13.adb (Analyze_Aspect_Specifications): For Import and
6323         Export aspects, do not check whether a corresponding Convention
6324         aspect has been specified. Convention is optional in Ada2012,
6325         and defaults to Convention_Ada.
6327 2014-06-13  Eric Botcazou  <ebotcazou@adacore.com>
6329         * checks.adb (Apply_Address_Clause_Check): Only issue the new
6330         warning if the propagation warning is issued.
6332 2014-06-13  Thomas Quinot  <quinot@adacore.com>
6334         * exp_ch4.adb: Minor reformatting.
6336 2014-06-13  Robert Dewar  <dewar@adacore.com>
6338         * exp_attr.adb (Expand_N_Attribute_Reference, case Pred):
6339         Handle float range check case (Expand_N_Attribute_Reference,
6340         case Succ): Handle float range check case.
6341         * sem_attr.adb (Analyze_Attribute, case Pred/Succ): Handle float
6342         range check case.
6344 2014-06-13  Vincent Celier  <celier@adacore.com>
6346         * makeutl.ads (Compute_Builder_Switches): Change name of
6347         parameter Root_Environment to Env.
6348         * prj-conf.adb (Check_Switches): Call Locate_Runtime with the
6349         Env parameter of procedure Get_Or_Create_Configuration_File.
6350         (Locate_Runtime): Call Find_Rts_In_Path with the Project_Path
6351         of new parameter Env.
6352         * prj-conf.ads (Locate_Runtime): New parameter Env of type
6353         Prj.Tree.Environment.
6355 2014-06-13  Robert Dewar  <dewar@adacore.com>
6357         * gnat_rm.texi: Minor comment clarification for Check_Float_Overflow.
6359 2014-06-13  Robert Dewar  <dewar@adacore.com>
6361         * exp_attr.adb, exp_ch9.adb, lib-writ.adb, g-comlin.adb: Minor
6362         reformatting.
6363         * sem_attr.adb: Minor code reformatting and simplification.
6364         * checks.adb: Fix minor typo.
6366 2014-06-13  Emmanuel Briot  <briot@adacore.com>
6368         * g-comlin.adb (Get_Argument): fix expansion
6369         of command line arguments (e.g. "*.adb") when using a custom
6370         parser. The parser was not passed to the recursive call, and
6371         thus we were trying to do the expansion on the default command
6372         line parser.
6374 2014-06-13  Thomas Quinot  <quinot@adacore.com>
6376         * exp_ch9.adb: Minor reformatting.
6378 2014-06-13  Ed Schonberg  <schonberg@adacore.com>
6380         * exp_attr.adb (Expand_N_Attribute_Reference, case 'Old):
6381         To determine whether the attribute should be expanded, examine
6382         whether the enclosing postcondition pragma is to be checked,
6383         rather than using the internal flag Assertions_Enabled.
6385 2014-06-13  Ben Brosgol  <brosgol@adacore.com>
6387         * gnat_rm.texi: Minor fixes.
6388         * gnat_ugn.texi: Added a missing "@itemize".
6390 2014-06-13  Robert Dewar  <dewar@adacore.com>
6392         * debug.adb: Remove -gnatd.1 flag documentation.
6393         * layout.adb (Layout_Type): Remove special handling of size
6394         for anonymous access type.
6395         * sem_ch3.adb (Replace_Type): Remove special handling of size
6396         for anonymous access type.
6398 2014-06-13  Robert Dewar  <dewar@adacore.com>
6400         * debug.adb: Document debug flag -gnatd.1.
6401         * layout.adb (Layout_Type): Size change for anonymous access
6402         types under -gnatd.1.
6403         * sem_ch3.adb (Replace_Type): Size change for anonymous access
6404         types under -gnatd.1.
6406 2014-06-13  Robert Dewar  <dewar@adacore.com>
6408         * layout.adb (Layout_Type): Anonymous access types designating
6409         unconstrained arrays are always thin pointers.
6410         * sem_ch3.adb (Replace_Type): Anonymous access types designating
6411         unconstrained arrays are always thin pointers.
6413 2014-06-13  Ed Schonberg  <schonberg@adacore.com>
6415         * sem_attr.adb (Analyze_Attribute): Use Check_Parameterless_Call
6416         to resolve the prefix of an attribute that is an entity name
6417         and may be a parameterless call.  Minor code reorganization.
6419 2014-06-13  Robert Dewar  <dewar@adacore.com>
6421         * lib.ads, lib.adb, lib-writ.adb, lib-load.adb (Is_Compiler_Unit):
6422         Removed.
6423         * opt.ads (Compiler_Unit): New flag.
6424         * par-ch5.adb (Test_Statement_Required): Call Check_Compiler_Unit
6425         for null statement sequence (not allowed in compiler unit).
6426         * par-prag.adb (Prag): Handle Compiler_Unit[_Warning] during
6427         parsing.
6428         * restrict.ads, restrict.adb (Check_Compiler_Unit): New version and new
6429         calling sequence.
6430         * sem_ch11.adb, sem_ch3.adb, sem_ch4.adb: New calling sequence for
6431         Check_Compiler_Unit.
6432         * sem_ch6.adb (Analyze_Extended_Return_Statement): Call
6433         Check_Compiler_Unit (this construct is not allowed in compiler
6434         units).
6435         * sem_prag.adb (Analyze_Pragma, case Compiler_Unit[_Warning]):
6436         Set Opt.Compiler_Unit.
6438 2014-06-13  Geert Bosch  <bosch@adacore.com>
6440         * gnat_rm.texi, s-tasinf-solaris.ads, sem_prag.adb, gnat_ugn.texi,
6441         s-tasinf-mingw.ads, s-tasinf.ads, s-tasinf-linux.ads,
6442         s-tasinf-vxworks.ads: Make Task_Info pragma and package obsolescent.
6444 2014-06-13  Robert Dewar  <dewar@adacore.com>
6446         * s-tasini.adb, s-tarest.adb, s-taprob.adb: Minor reformatting.
6448 2014-06-13  Hristian Kirtchev  <kirtchev@adacore.com>
6450         * freeze.adb (Freeze_Entity): Remove the check concerning volatile
6451         types in SPARK as it is poorly placed and poorly formulated. The
6452         check was flagging ALL volatile entities as illegal in SPARK.
6453         * sem_prag.adb (Process_Atomic_Shared_Volatile): Flag volatile
6454         types as illegal in SPARK.
6456 2014-06-13  Robert Dewar  <dewar@adacore.com>
6458         * sem_cat.adb: Minor reformatting.
6460 2014-06-13  Yannick Moy  <moy@adacore.com>
6462         * sem_prag.adb (Analyze_Pragma/Post_Class): Fix typo.
6464 2014-06-13  Arnaud Charlet  <charlet@adacore.com>
6466         * gnat_rm.texi: Add detail on SPARK_05 restriction.
6468 2014-06-13  Bob Duff  <duff@adacore.com>
6470         * s-solita.adb (Get_Sec_Stack_Addr, Init_Tasking_Soft_Links):
6471         Add assertions requiring the secondary stack to be initialized.
6472         * s-solita.ads (Init_Tasking_Soft_Links): Comment.
6473         * s-taprob.adb, s-tarest.adb, s-tasini.adb (elab code): Make sure the
6474         secondary stack is initialized before calling Init_Tasking_Soft_Links,
6475         by adding pragmas Elaborate_Body.
6477 2014-06-13  Thomas Quinot  <quinot@adacore.com>
6479         * sem_ch13.adb (Analyze_Stream_TSS_Definition): Remove temporary
6480         kludge disabling new legality check.
6482 2014-06-13  Hristian Kirtchev  <kirtchev@adacore.com>
6484         * freeze.adb (Freeze_Record_Type): Remove checks related to SPARK
6485         volatile types.
6486         (Freeze_Type): Volatile types are now illegal in SPARK.
6488 2014-06-13  Robert Dewar  <dewar@adacore.com>
6490         * aspects.ads, aspects.adb: Add aspect Thread_Local_Storage.
6491         * gnat_rm.texi: Document aspect Thread_Local_Storage.
6493 2014-06-13  Ed Schonberg  <schonberg@adacore.com>
6495         * sem_cat.adb (Validate_Static_Object_Name): A constant whose
6496         value is a temporary that renames an aggregate is legal in a
6497         preelaborated unit. Illegalities, if any will be detected in
6498         the aggregate components.
6500 2014-06-13  Ed Schonberg  <schonberg@adacore.com>
6502         * einfo.ads: Minor reformatting an comment expansion.
6504 2014-06-13  Robert Dewar  <dewar@adacore.com>
6506         * back_end.ads, back_end.adb: Make_Id, Make_SC, Set_RND are moved to
6507         Tbuild.
6508         * tbuild.ads, tbuild.adb: Make_Id, Make_SC, Set_RND are moved here from
6509         Back_End.
6510         * gnat1drv.adb: Make_Id, Make_SC, Set_RND are moved to Tbuild
6511         * sem_warn.adb: Minor reformatting.
6513 2014-06-13  Doug Rupp  <rupp@adacore.com>
6515         * adaint.c (__gnat_open_new_temp) [VMS]: Open binary
6516         files with rfm=udf.
6518 2014-06-13  Yannick Moy  <moy@adacore.com>
6520         * sem_warn.adb (Check_Unset_References): Take
6521         case of Refined_Post into account in Within_Postcondition check.
6523 2014-06-13  Hristian Kirtchev  <kirtchev@adacore.com>
6525         * freeze.adb (Freeze_Record_Type): Volatile types are not allowed in
6526         SPARK.
6528 2014-06-13  Yannick Moy  <moy@adacore.com>
6530         * sem_ch13.adb (Analyze_Aspect_Specifications/Aspect_Import,
6531         Aspect_Export): Consider that variables may be set outside the program.
6533 2014-06-13  Robert Dewar  <dewar@adacore.com>
6535         * back_end.adb (Make_Id): New function.
6536         (Make_SC): New function.
6537         (Set_RND): New procedure.
6538         * back_end.ads (Make_Id): New function.
6539         (Make_SC): New function.
6540         (Set_RND): New procedure.
6541         * einfo.ads: Minor comment updates.
6542         * frontend.adb: Move Atree.Initialize call to Gnat1drv.
6543         * gnat1drv.adb (Gnat1drv): New calling sequence for
6544         Get_Target_Parameters.
6545         (Gnat1drv): Move Atree.Initialize here from Frontend.
6546         * targparm.adb (Get_Target_Parameters): New calling
6547         sequence (Get_Target_Parameters): Handle pragma Restriction
6548         (No_Dependence,..)
6549         * targparm.ads (Get_Target_Parameters): New calling sequence.
6551 2014-06-13  Gary Dismukes  <dismukes@adacore.com>
6553         * sem_prag.adb (Process_Import_Or_Interface): Exit the homonym
6554         loop if the pragma does not come from source, so that an implicit
6555         pragma Import only applies to the first declaration, avoiding
6556         possible conflicts with earlier explicit and implicit declarations
6557         due to multiple Provide_Shift_Operators pragmas.
6558         (Set_Imported): Remove previous fix that bypassed pragma duplication
6559         error.
6560         * gnat_rm.texi: Change 'equivalent' to 'similar' in description
6561         of Provide_Shift_Operators.
6563 2014-06-12  Jan Hubicka  <hubicka@ucw.cz>
6565         * gcc-interface/utils.c (process_attributes) <ATTR_LINK_SECTION>: Pass
6566         string pointer directly to set_decl_section_name.
6568 2014-06-11  Robert Dewar  <dewar@adacore.com>
6570         * sem_ch13.adb: Minor reformatting.
6572 2014-06-11  Hristian Kirtchev  <kirtchev@adacore.com>
6574         * sem_prag.adb (Check_Clause_Syntax): Add new
6575         local variable Outputs. Account for the case where multiple
6576         output items appear as an aggregate.
6578 2014-06-11  Robert Dewar  <dewar@adacore.com>
6580         * sem_warn.adb (Output_Obsolescent_Entity_Warnings): Tag warning
6581         with ?j? not ??.
6583 2014-06-11  Ed Schonberg  <schonberg@adacore.com>
6585         * einfo.ads: Minor reformatting.
6587 2014-06-11  Hristian Kirtchev  <kirtchev@adacore.com>
6589         * a-cbdlli.adb, a-cdlili.adb, a-cidlli.adb, a-crdlli.adb (Insert): Add
6590         new variable First_Node. Update the position after all insertions have
6591         taken place to First_Node.
6593 2014-06-11  Robert Dewar  <dewar@adacore.com>
6595         * debug.adb: Remove debug flag -gnatd.1, no longer needed.
6596         * layout.adb (Layout_Type): Remove test of -gnatd.1.
6598 2014-06-11  Robert Dewar  <dewar@adacore.com>
6600         * sem_ch13.adb: Minor reformatting.
6602 2014-06-11  Hristian Kirtchev  <kirtchev@adacore.com>
6604         * sem_prag.adb (Check_Clause_Syntax): Add new
6605         local variable Outputs. Account for the case where multiple
6606         output items appear as an aggregate.
6608 2014-06-11  Robert Dewar  <dewar@adacore.com>
6610         * sem_warn.adb (Output_Obsolescent_Entity_Warnings): Tag warning
6611         with ?j? not ??.
6613 2014-06-11  Ed Schonberg  <schonberg@adacore.com>
6615         * einfo.ads: Minor reformatting.
6617 2014-06-11  Hristian Kirtchev  <kirtchev@adacore.com>
6619         * a-cbdlli.adb, a-cdlili.adb, a-cidlli.adb, a-crdlli.adb (Insert): Add
6620         new variable First_Node. Update the position after all insertions have
6621         taken place to First_Node.
6623 2014-06-11  Robert Dewar  <dewar@adacore.com>
6625         * debug.adb: Remove debug flag -gnatd.1, no longer needed.
6626         * layout.adb (Layout_Type): Remove test of -gnatd.1.
6628 2014-06-11  Thomas Quinot  <quinot@adacore.com>
6630         * freeze.ads: Minor reformatting.
6631         * checks.adb (Determine_Range): Do not attempt to determine
6632         the range of a deferred constant whose full view has not been
6633         seen yet.
6634         * sem_res.adb (Resolve): Remove undesirable guard against
6635         resolving expressions from expression functions.
6637 2014-06-11  Robert Dewar  <dewar@adacore.com>
6639         * debug.adb (Debug_Flag_Dot_1): Set to enable fix for anonymous
6640         access types.
6641         * layout.adb (Layout_Type): Make anonymous access types for
6642         subprogram formal types and return types always thin. For now
6643         only enabled if -gnatd.1 set.
6645 2014-06-11  Ed Schonberg  <schonberg@adacore.com>
6647         * sem_ch13.adb (Analyze_Stream_TSS_Definition): Apply legality
6648         rule for stream attributes of interface types (RM 13.13.2 (38/3)):
6649         subprogram must be a null procedure.
6651 2014-06-11  Hristian Kirtchev  <kirtchev@adacore.com>
6653         * sem_prag.adb (Analyze_Input_Item): Allow formal
6654         parameters to appear as input_items in an initialization_list
6655         of pragma Initializes. Encapsulation now applies to states and
6656         variables only (as it should). Add RM references to key errors.
6657         * sem_prag.adb (Set_Imported): Suppress errors
6658         about preceding Imports when the pragma does not come from source,
6659         which can happen through use of pragma Provide_Shift_Operators.
6661 2014-06-11  Thomas Quinot  <quinot@adacore.com>
6663         * sem_ch3.adb: Minor reformatting.
6664         * einfo.ads (Full_View): Minor comment update.
6666 2014-06-11  Robert Dewar  <dewar@adacore.com>
6668         * einfo.adb (Is_Independent): New flag.
6669         * einfo.ads (Is_Independent): New flag.
6670         (Has_Independent_Components): Clean up and fix comments.
6671         * sem_prag.adb (Fix_Error): Deal with changing argument
6672         [of] to entity [for].
6673         (Analyze_Pragma, case Independent): Set Is_Independent flag
6674         (Analyze_Pragma, case Independent_Components): Set Is_Independent flag
6675         in all components of specified record.
6677 2014-06-11  Thomas Quinot  <quinot@adacore.com>
6679         * sem_ch12.adb (Analyze_Formal_Decimal_Fixed_Point_Type):
6680         Set proper Etype on bounds of dummy type created for analysis
6681         of the generic.
6683 2014-06-11  Robert Dewar  <dewar@adacore.com>
6685         * debug.adb: Minor comment fix (add missing section of dot
6686         numeric flags).
6688 2014-06-11  Robert Dewar  <dewar@adacore.com>
6690         * gnat_rm.texi, switch-c.adb, sem_prag.adb, a-tgdico.ads, par-prag.adb,
6691         opt.ads, a-finali.ads, snames.ads-tmpl: Remove all traces of
6692         pragma/aspects Pure_05 Pure_12 Preelaborate_05.
6693         * errout.adb (Output_Messages): Avoid duplicate output for
6694         library level instance.
6695         * sem_elab.adb (Is_Call_Of_Generic_Formal): Moved to outer level
6696         (Check_Elab_Call): Add call to Is_Call_Of_Generic_Formal
6697         * exp_ch4.adb (Expand_N_Op_Expon): New interface for Exp_Modular.
6698         * s-expmod.ads, s-expmod.adb (Exp_Modular): Change interface to
6699         accomodate largest modulus value.
6700         * gnat_ugn.texi: Minor updates.
6702 2014-06-11  Ed Schonberg  <schonberg@adacore.com>
6704         * sem_ch12.adb (Instantiate_Package_Body): Do not attempt to
6705         load body of generic package or its parent, if body is optional
6706         and the unit does not require a body.
6708 2014-06-11  Robert Dewar  <dewar@adacore.com>
6710         * gnat_rm.texi: Document System.Unsigned_Types.
6711         * impunit.adb: System.Unsigned_Types (s-unstyp.ads) is user accessible.
6712         * s-unstyp.ads: Update comments (this is now user available unit).
6714 2014-06-11  Robert Dewar  <dewar@adacore.com>
6716         * make.adb, sem_res.adb: Minor reformatting.
6718 2014-06-11  Thomas Quinot  <quinot@adacore.com>
6720         * a-astaco.ads, a-tags.ads, s-excdeb.ads, a-tgdico.ads, a-stmaco.ads,
6721         a-except-2005.ads, s-except.ads, a-taside.ads, a-dynpri.ads,
6722         a-chahan.ads, a-sytaco.ads, s-stalib.ads, a-strmap.ads: Change pragmas
6723         Preelaborate_05 to just Preelaborate in runtime units, and similarly
6724         change Pure_05 to just Pure.
6726 2014-06-11  Ed Schonberg  <schonberg@adacore.com>
6728         * sem_ch6.adb (Analyze_Subprogram_Body_Contract): Do not attempt
6729         analysis if error has been posted on subprogram body.
6731 2014-06-11  Ed Schonberg  <schonberg@adacore.com>
6733         * sem_ch13.adb (Analyze_Stream_TSS_Definition): Apply legality
6734         rule given in RM 13.1 (8/1) for operational attributes to stream
6735         attributes: the attribute must apply to a first subtype. Fixes
6736         missing errors in ACATS test bdd2004.
6738 2014-06-11  Robert Dewar  <dewar@adacore.com>
6740         * exp_ch3.adb (Build_Record_Init_Proc): Don't build for variant
6741         record type if restriction No_Implicit_Conditionals is active.
6742         (Expand_N_Object_Declaration): Don't allow default initialization
6743         for variant record type if restriction No_Implicit_Condition is active.
6744         (Build_Variant_Record_Equality): Don't build for variant
6745         record type if restriction No_Implicit_Conditionals is active.
6746         * exp_ch4.adb (Expand_N_Op_Eq): Error if variant records with
6747         No_Implicit_Conditionals.
6748         * sem_aux.ads, sem_aux.adb (Has_Variant_Part): New function.
6750 2014-06-11  Ramon Fernandez  <fernandez@adacore.com>
6752         * i-cstrin.ads: Update comments.
6754 2014-06-11  Ed Schonberg  <schonberg@adacore.com>
6756         * sem_res.adb (Resolve_Selected_Component): Handle properly a
6757         selected component whose prefix is overloaded, when none of the
6758         interpretations matches the expected type.
6760 2014-06-11  Bob Duff  <duff@adacore.com>
6762         * make.adb (Wait_For_Available_Slot): Give a more
6763         informative error message; if the ALI file is not found, print
6764         the full path of what it's looking for.
6766 2014-06-11  Sergey Rybin  <rybin@adacore.com frybin>
6768         * gnat_ugn.texi, vms_data.ads: add description of gnatstub -W<par>
6769         option to specify the result file encoding.
6771 2014-06-11  Robert Dewar  <dewar@adacore.com>
6773         * errout.ads, sem_ch12.adb: Minor reformatting.
6774         * debug.adb, erroutc.adb: Remove -gnatd.q debug switch.
6775         * lib-xref.adb: Minor reformatting.
6776         * restrict.adb: Minor code reorganization (put routines in
6777         alpha order).
6779 2014-06-11  Yannick Moy  <moy@adacore.com>
6781         * einfo.ads: Minor typo in comment
6783 2014-06-11  Ed Schonberg  <schonberg@adacore.com>
6785         * sinfo.ads, sinfo.adb: New attribute Uninitialized_Variable, for
6786         formal private types and private type extensions, to indicate
6787         variable in a generic unit whose uninitialized use suggest that
6788         actual type should be fully initialized.
6789         Needs_Initialized_Actual:  removed, functionaity replaced by
6790         the above.
6791         * lib-xref.adb (Generate_Reference): Generate a reference for
6792         variables of a formal type when the unit is not the main unit,
6793         to enable appropriate warnings in an instance.
6794         * sem_ch12.adb (Check_Ininialized_Type): Improve warning on use
6795         of variable in a generic unit that suggests that actual type
6796         should be full initialized.
6797         * sem_warn.adb; (May_Need_Initialized_Actual): Make into procedure
6798         and do not emot warning, which now only appears in an instance.
6800 2014-06-11  Eric Botcazou  <ebotcazou@adacore.com>
6802         * gnat_ugn.texi: Fix minor typo.
6804 2014-06-11  Hristian Kirtchev  <kirtchev@adacore.com>
6806         * sem_ch3.adb Add with and use clause for Sem_Ch10.
6807         (Analyze_Declarations): Code reformatting. Analyze the contract
6808         of a subprogram body stub at the end of the declarative region.
6809         * sem_ch6.adb (Analyze_Subprogram_Body_Contract): Spec_Id is
6810         now a variable. Do not process the body if its contract is not
6811         available. Account for subprogram body stubs when extracting
6812         the corresponding spec.
6813         * sem_ch6.ads (Analyze_Subprogram_Contract): Update the comment
6814         on usage.
6815         * sem_ch10.ads, sem_ch10.adb (Analyze_Subprogram_Body_Stub_Contract):
6816         New routine.
6817         * sem_prag.adb (Analyze_Depends_In_Decl_Part):
6818         Account for subprogram body stubs when extracting the
6819         corresponding spec.
6820         (Analyze_Global_In_Decl_List):
6821         Account for subprogram body stubs when extracting the
6822         corresponding spec.
6823         (Analyze_Refined_Depends_In_Decl_Part):
6824         Use Find_Related_Subprogram_Or_Body to retrieve the declaration
6825         of the related body. Spec_Is now a variable. Account for
6826         subprogram body stubs when extracting the corresponding spec.
6827         (Analyze_Refined_Global_In_Decl_Part): Use
6828         Find_Related_Subprogram_Or_Body to retrieve the declaration
6829         of the related body. Spec_Is now a variable. Account for
6830         subprogram body stubs when extracting the corresponding spec.
6831         (Collect_Subprogram_Inputs_Output): Account for subprogram body
6832         stubs when extracting the corresponding spec.
6834 2014-06-11  Vincent Celier  <celier@adacore.com>
6836         * gnatcmd.adb (Process_Link): Do not invoke gnatlink with
6837         -lgnarl or -lgnat.
6839 2014-06-11  Robert Dewar  <dewar@adacore.com>
6841         * debug.adb: Add debug flag -gnatd.q.
6842         * erroutc.adb (Prescan_Message): Bomb if untagged warning with
6843         -gnatd.q set.
6844         * styleg.adb (Check_Xtra_Parens): Message should be a style
6845         message.
6846         * sem_aggr.adb, sem_ch3.adb, exp_ch9.adb, checks.adb, sem_prag.adb,
6847         par-endh.adb, eval_fat.adb, freeze.adb, sem_util.adb, sem_attr.adb,
6848         sem_elab.adb, sem_ch6.adb, sem_warn.adb, sem_cat.adb,
6849         sem_ch13.adb, lib-xref.adb: Add remaining warning tags.
6851 2014-06-11  Ben Brosgol  <brosgol@adacore.com>
6853         * gnat_rm.texi: Revised chapter on Implementation Defined
6854         Characteristics.
6856 2014-06-11  Geert Bosch  <bosch@adacore.com>
6858         * s-exctab.adb: avoid race conditions in exception registration.
6860 2014-06-11  Robert Dewar  <dewar@adacore.com>
6862         * errout.adb (Warn_Insertion): New function.
6863         (Error_Msg): Use Warn_Insertion and Prescan_Message.
6864         (Error_Msg_Internal): Set Info field of error object.
6865         (Error_Msg_NEL): Use Prescan_Message.
6866         (Set_Msg_Text): Don't store info: at start of message.
6867         (Skip_Msg_Insertion_Warning): New name for Set_Msg_Insertion_Warning.
6868         (Skip_Msg_Insertion_Warning): Now just skips warning insertion.
6869         * errout.ads: Document new ?$? and >$> insertion sequences
6870         Document use of "(style)" and "info: "
6871         * erroutc.adb (dmsg): Print several missing fields
6872         (Get_Warning_Tag): Handle -gnatel case (?$?)  (Output_Msg_Text):
6873         Deal with new tagging of info messages
6874         * erroutc.ads: Is_Info_Msg: New global (Error_Msg_Object):
6875         Add field Info (Prescan_Message): New procedure, this procedure
6876         replaces the old Test_Style_Warning_Serious_Unconditional_Msg
6877         * errutil.adb, exp_util.adb, par-ch7.adb, sem_ch13.adb, sem_ch7.adb,
6878         sem_elab.adb: Follow new rules for info message (info belongs
6879         only at the start of a message, and only in the first message,
6880         not in any of the continuations).
6881         * gnat_ugn.texi: Document full set of warning tags.
6883 2014-06-11  Gary Dismukes  <dismukes@adacore.com>
6885         * sem_util.adb: Minor typo fix.
6887 2014-06-11  Ed Schonberg  <schonberg@adacore.com>
6889         * sem_warn.adb (Check_References): Do not emit spurious warnings
6890         on uninitialzed variable of a formal private type if variable
6891         is not read.
6893 2014-06-09  Jan Hubicka  <hubicka@ucw.cz>
6895         * gcc-interface/utils.c (process_attributes) <ATTR_LINK_SECTION>: Use
6896         set_decl_section_name accessor.
6898 2014-05-22  Thomas Schwinge  <thomas@codesourcery.com>
6900         * gcc-interface/utils.c (DEF_FUNCTION_TYPE_0, DEF_FUNCTION_TYPE_6)
6901         (DEF_FUNCTION_TYPE_7, DEF_FUNCTION_TYPE_8)
6902         (DEF_FUNCTION_TYPE_VAR_5): Cosmetic fixes.
6904 2014-05-21  Robert Dewar  <dewar@adacore.com>
6906         * layout.adb: Minor reformatting.
6907         * sem_prag.adb (Analyze_Pragma, case Inspection_Point): Call
6908         dummy procedure ip.
6910 2014-05-21  Robert Dewar  <dewar@adacore.com>
6912         * restrict.ads (Implementation_Restriction): Add entry for
6913         No_Fixed_IO.
6914         * rtsfind.ads: Add entries for Fixed_IO and Decimal_IO in
6915         Ada.[Wide_[Wide_]Text_IO.
6916         * s-rident.ads (Restriction_Id): Add entry for No_Fixed_IO.
6917         * sem_attr.adb (Analyze_Attribute): Disallow fixed point types
6918         for Img, Image, Value, Wide_Image, Wide_Value, Wide_Wide_Image,
6919         Wide_Wide_Value if restriction No_Fixed_IO is set.
6920         * sem_util.adb (Set_Entity_Checks): Check restriction No_Fixed_IO.
6922 2014-05-21  Robert Dewar  <dewar@adacore.com>
6924         * gnatcmd.adb: Minor error msg changes (no upper case letter
6925         at start).
6926         * sem_ch12.adb, sem_ch5.adb, sem_res.adb, sem_util.adb: Minor
6927         reformatting.
6929 2014-05-21  Robert Dewar  <dewar@adacore.com>
6931         * debug.adb: Debug flag -gnatd.G inhibits static elab tracing
6932         via generic formals.
6933         * sem_elab.adb (Is_Call_Of_Generic_Formal): Return False if
6934         -gnatd.G is set.
6936 2014-05-21  Thomas Quinot  <quinot@adacore.com>
6938         * exp_pakd.adb (Revert_Storage_Order): Renamed from Byte_Swap to
6939         more accurately describe that this subprogram needs to come into
6940         play also in cases where no byte swapping is involved, because
6941         it also takes care of some required shifts (left-justification
6942         of values).
6944 2014-05-21  Thomas Quinot  <quinot@adacore.com>
6946         * freeze.adb (Check_Component_Storage_Order): Indicate whether
6947         a Scalar_Storage_Order attribute definition is present for the
6948         component's type.
6949         (Freeze_Record_Type): Suppress junk warnings
6950         about purportedly junk Bit_Order / Scalar_Storage_Order attribute
6951         definitions.
6953 2014-05-21  Robert Dewar  <dewar@adacore.com>
6955         * sem_ch8.adb (Analyze_Subprogram_Renaming): Put back call
6956         to Kill_Elaboration_Checks.
6958 2014-05-21  Gary Dismukes  <dismukes@adacore.com>
6960         * layout.adb (Assoc_Add): Suppress the optimization of the (E
6961         - C1) + C2 case, when the expression type is unsigned and C1 <
6962         C2, to avoid creating a negative literal when folding.
6964 2014-05-21  Hristian Kirtchev  <kirtchev@adacore.com>
6966         * freeze.adb (Freeze_Record_Type): Update the use of
6967         Is_SPARK_Volatile.
6968         * sem_ch3.adb (Analyze_Object_Contract): Update the use of
6969         Is_SPARK_Volatile.
6970         (Process_Discriminants): Update the use of Is_SPARK_Volatile.
6971         * sem_ch5.adb (Analyze_Iterator_Specification): Update the use
6972         of Is_SPARK_Volatile.
6973         (Analyze_Loop_Parameter_Specification):
6974         Update the use of Is_SPARK_Volatile.
6975         * sem_ch6.adb (Process_Formals): Catch an illegal use of an IN
6976         formal parameter when its type is volatile.
6977         * sem_prag.adb (Analyze_Global_Item): Update the use of
6978         Is_SPARK_Volatile.
6979         * sem_res.adb (Resolve_Entity_Name): Correct the guard which
6980         determines whether an entity is a volatile source SPARK object.
6981         * sem_util.adb (Has_Enabled_Property): Accout for external
6982         properties being set on objects other than abstract states
6983         and variables. An example would be a formal parameter.
6984         (Is_SPARK_Volatile): New routine.
6985         (Is_SPARK_Volatile_Object):
6986         Remove the entity-specific tests. Call routine Is_SPARK_Volatile
6987         when checking entities and/or types.
6988         * sem_util.ads (Is_SPARK_Volatile): New routine.
6990 2014-05-21  Robert Dewar  <dewar@adacore.com>
6992         * sem_warn.adb: Minor fix to warning messages (use ?? instead
6993         of ?).
6995 2014-05-21  Vincent Celier  <celier@adacore.com>
6997         * gnatcmd.adb (GNATCmd): For platforms other than VMS, recognize
6998         switch --version and --help.
7000 2014-05-21  Robert Dewar  <dewar@adacore.com>
7002         * sem_elab.adb (Is_Call_Of_Generic_Formal): New function.
7004 2014-05-21  Ed Schonberg  <schonberg@adacore.com>
7006         * sem_ch5.adb (Analyze_Iterator_Specification): Set type of
7007         iterator variable when the domain of iteration is a formal
7008         container and this is an element iterator.
7010 2014-05-21  Bob Duff  <duff@adacore.com>
7012         * sem_ch12.adb: Minor reformatting.
7014 2014-05-21  Robert Dewar  <dewar@adacore.com>
7016         * sinfo.ads, sem_ch12.adb, sem_warn.adb: Minor reformatting.
7018 2014-05-21  Robert Dewar  <dewar@adacore.com>
7020         * sem_elab.adb: Minor reformatting.
7021         * s-taprop.ads: Minor comment fix.
7022         * sem_ch8.adb (Analyze_Subprogram_Renaming): Remove call to
7023         Kill_Elaboration_Checks.
7024         * errout.adb, erroutc.adb: Minor reformatting.
7026 2014-05-21  Thomas Quinot  <quinot@adacore.com>
7028         * exp_pakd.adb (Byte_Swap): Handle the case of a sub-byte
7029         component. No byte swapping occurs, but this procedure also takes
7030         care of appropriately justifying the argument.
7032 2014-05-21  Hristian Kirtchev  <kirtchev@adacore.com>
7034         * sem_ch6.adb: sem_ch6.adb (Analyze_Aspects_On_Body_Or_Stub):
7035         New routine.
7036         (Analyze_Subprogram_Body_Helper): Move the
7037         analysis of aspect specifications and the processing of the
7038         subprogram body contract after inlining has taken place.
7039         (Diagnose_Misplaced_Aspect_Specifications): Removed.
7041 2014-05-21  Javier Miranda  <miranda@adacore.com>
7043         * sem_ch3.adb (Build_Derived_Record_Type): Revert previous change.
7045 2014-05-21  Robert Dewar  <dewar@adacore.com>
7047         * sem_eval.ads, sem_eval.adb (Why_Not_Static): Messages are not
7048         continuations any more.
7050 2014-05-21  Ed Schonberg  <schonberg@adacore.com>
7052         * sinfo.ads, sinfo.adb: New flag Needs_Initialized_Actual,
7053         present in formal_Private_Definitions and on private extension
7054         declarations of a formal derived type. Set when the use of the
7055         formal type in a generic suggests that the actual should be a
7056         fully initialized type.
7057         * sem_warn.adb (May_Need_Initialized_Actual): new subprogram
7058         to indicate that an entity of a generic type has default
7059         initialization, and that the corresponing actual type in any
7060         subsequent instantiation should be fully initialized.
7061         * sem_ch12.adb (Check_Initialized_Type): new subprogram,
7062         to emit a warning if the actual for a generic type on which
7063         Needs_Initialized_Actual is set is not a fully initialized type.
7065 2014-05-21  Robert Dewar  <dewar@adacore.com>
7067         * sem_elab.adb, prj-dect.adb: Minor reformatting.
7069 2014-05-21  Robert Dewar  <dewar@adacore.com>
7071         * erroutc.ads: Minor comment addition.
7073 2014-05-21  Robert Dewar  <dewar@adacore.com>
7075         * errout.ads: Add documentation for use of >*> tag.
7076         * restrict.adb: Make sure we use >*> tag for restriction warnings.
7078 2014-05-21  Gary Dismukes  <dismukes@adacore.com>
7080         * debug.adb: Add case of illegal overriding_indicator for a
7081         protected subprogram body to description of -gnatd.E switch.
7082         * sem_ch6.adb (Verify_Overriding_Indicator): Issue error message
7083         for cases of giving overriding_indicators on protected subprogram
7084         bodies, but change this to a warning if -gnatd.E is enabled. No
7085         longer give a style warning about missing indicators on protected
7086         subprogram bodies.
7088 2014-05-21  Robert Dewar  <dewar@adacore.com>
7090         * prj.ads, sem_ch12.adb, prj.adb, exp_pakd.adb,
7091         sem_elab.ads: Minor reformatting.
7092         * erroutc.adb, erroutc.ads (Warning_Specifically_Suppressed): Make Tag
7093         parameter optional.
7095 2014-05-21  Pascal Obry  <obry@adacore.com>
7097         * prj-dect.adb: Allow package Install in aggregate project.
7099 2014-05-21  Robert Dewar  <dewar@adacore.com>
7101         * sem_ch13.adb (Analyze_Aspect_Specifications):
7102         Insert_Delayed_Pragma is now used for the case of Attach_Handler.
7103         * sem_prag.adb: Minor comment improvements.
7105 2014-05-21  Ed Schonberg  <schonberg@adacore.com>
7107         * sem_ch12.adb (Install_Body): When checking whether freezing of
7108         instantiation must be delayed, verify that the common enclosing
7109         subprogram to generic and instance is in fact an overloadable
7110         entity.
7112 2014-05-21  Vincent Celier  <celier@adacore.com>
7114         * makeutl.adb (Mains.Complete_Mains.Do_Complete): Look for all
7115         mains with the same name and fail if there is more than one.
7116         * prj.ads, prj.adb (Find_All_Sources): New function
7118 2014-05-21  Robert Dewar  <dewar@adacore.com>
7120         * sem_ch13.adb: Minor reformatting.
7121         * lib-xref-spark_specific.adb, sem_util.adb: Minor reformatting.
7122         * sem_prag.adb: Minor error message improvement.
7124 2014-05-21  Yannick Moy  <moy@adacore.com>
7126         * lib-xref-spark_specific.adb, lib-xref.ads, lib-xref.adb
7127         (Enclosing_Subprogram_Or_Package): Only return a library-level
7128         package.
7130 2014-05-21  Javier Miranda  <miranda@adacore.com>
7132         * sem_ch3.adb (Build_Derived_Record_Type): Initialize Parent_Base
7133         to the full view of the parent type when processing a derived type
7134         which is the full view of a private type not defined in a generic
7135         unit which is derived from a private type with discriminants
7136         whose full view is a non-tagged record type.
7138 2014-05-21  Javier Miranda  <miranda@adacore.com>
7140         * exp_ch4.adb (Expand_Allocator_Expression.Apply_Accessibility_Check):
7141         Complete previous patch.
7143 2014-05-21  Thomas Quinot  <quinot@adacore.com>
7145         PR ada/9535
7146         * g-socket.adb (Read and Write for Datagram_Socket_Stream_Type):
7147         Provide a behaviour more consistent with underlying datagram
7148         socket: do not attempt to loop over Send_Socket/Receive_Socket
7149         iterating along the buffer.
7151 2014-05-21  Hristian Kirtchev  <kirtchev@adacore.com>
7153         * freeze.adb (Freeze_Record_Type): Ensure that a discriminated
7154         or a tagged type is not labelled as volatile. Ensure that a
7155         non-volatile type has no volatile components.
7156         * sem_ch3.adb (Analyze_Object_Contract): Add local constant
7157         Obj_Typ. Code reformatting.  Ensure that a discriminated or
7158         tagged object is not labelled as volatile.
7159         * sem_prag.adb (Process_Atomic_Shared_Volatile): Ensure that
7160         pragma Volatile applies to a full type declaration or an object
7161         declaration when SPARK mode is on.
7163 2014-05-21  Sergey Rybin  <rybin@adacore.com frybin>
7165         * gnat_ugn.texi: For ASIS tools, reword the paragraph about
7166         providing options needed for compiling the argument source for
7167         the situation when a project file can be used as a tool parameter.
7169 2014-05-21  Gary Dismukes  <dismukes@adacore.com>
7171         * gnat_rm.texi: Minor typo fix.
7173 2014-05-21  Robert Dewar  <dewar@adacore.com>
7175         * stand.adb (Tree_Read): Read missing entities.
7176         (Tree_Write): Write missing entities.
7178 2014-05-21  Ben Brosgol  <brosgol@adacore.com>
7180         * gnat_ugn.texi: Wordsmithing edits to Coupling Metrics Control
7181         section in gnatmetric chapter.
7183 2014-05-21  Robert Dewar  <dewar@adacore.com>
7185         * exp_ch6.adb (Expand_Actuals): Spec moved here, since not used
7186         outside Exp_Ch6 (Expand_Actuals): Deal with proper insertion of
7187         post-call copy write back (see detailed comment in code).
7188         * exp_ch6.ads (Expand_Actuals): Moved to body, not used outside
7189         Exp_Ch6.
7190         * tbuild.ads: Minor reformatting.
7192 2014-05-21  Robert Dewar  <dewar@adacore.com>
7194         * stand.ads: Add warning about adding new entities and
7195         Tree_Read/Tree_Write.
7197 2014-05-21  Robert Dewar  <dewar@adacore.com>
7199         * sem_util.adb (Set_Entity_With_Checks): Don't complain about
7200         references to restricted entities within the units in which they
7201         are declared.
7203 2014-05-21  Robert Dewar  <dewar@adacore.com>
7205         * gnat1drv.adb (Check_Bad_Body): Use Source_File_Is_Body to
7206         simplify the needed test, and also deal with failure to catch
7207         situations with non-standard names.
7208         * sinput-l.ads, sinput-l.adb (Source_File_Is_No_Body): New function
7209         (Source_File_Is_Subunit): Removed, no longer used.
7211 2014-05-21  Javier Miranda  <miranda@adacore.com>
7213         * exp_ch4.adb
7214         (Expand_Allocator_Expression.Apply_Accessibility_Check): for a
7215         renaming of an access to interface object there is no need to
7216         generate extra code to reference the tag.
7218 2014-05-21  Robert Dewar  <dewar@adacore.com>
7220         * errout.adb, erroutc.adb, erroutc.ads: Allow warning tag in pragma
7221         Warnings (Off, string).
7223 2014-05-21  Robert Dewar  <dewar@adacore.com>
7225         * osint.adb: Fix three error messages to say invalid instead
7226         of erroneous.
7227         * par-ch4.adb, exp_aggr.adb, sem_attr.adb, sem_aux.adb, sem_ch3.adb,
7228         sem_ch5.adb, sem_ch6.adb, sem_ch7.adb, sem_dim.adb, sem_res.adb,
7229         sem_util.adb, sem_util.ads: Fix incorrect use of erroneous in comments.
7231 2014-05-21  Ed Schonberg  <schonberg@adacore.com>
7233         * freeze.adb, sem_ch13.adb, sem_ch13.ads, sem_ch9.adb,
7234         sem_ch9.ads: Move discriminant manipulation routines for analysis of
7235         aspect specifications from sem_ch9 to sem_ch13, where they belong.
7237 2014-05-21  Robert Dewar  <dewar@adacore.com>
7239         * gnat_ugn.texi: Clearly document -gnatw.g (GNAT warnings).
7240         Clearly document -gnatyg (GNAT style switches).
7241         * usage.adb: Add line line for -gnatw.g (GNAT warnings) More
7242         detail for line for -gnatyg (GNAT style switches) -gnatw.d/D is
7243         available for VMS after all.
7244         * warnsw.adb: Reorganize to eliminate duplicated code
7245         (Restore_Warnings): Add a couple of missing entries
7246         (Save_Warnings): Add a couple of missing entries.
7247         * warnsw.ads: Add missing entries to Warning_Record (not clear
7248         what the impact is).
7250 2014-05-21  Robert Dewar  <dewar@adacore.com>
7252         * errout.adb (Set_Msg_Insertion_Warning): Handle ?*? (restriction
7253         warning) case.
7254         * errout.ads: Document ?*? (restriction warning) insertion.
7255         * erroutc.adb (Get_Warning_Tag): Deal with ?*? (restriction
7256         warning) case.
7257         * erroutc.ads: Document use of * for restriction warning tag.
7258         * restrict.adb (Restriction_Msg): Tag with ?*? instead of ??.
7260 2014-05-21  Ed Schonberg  <schonberg@adacore.com>
7262         * sem_ch9.adb (Push_Scope_And_Install_Discriminants): Do not
7263         make discriminants immediately visible when analyzing an aspect
7264         of a subtype declaration.
7265         (Uninstall_Discriminants): Do not apply to the entity in a
7266         subtype declaration.
7268 2014-05-21  Ed Schonberg  <schonberg@adacore.com>
7270         * sem_util.adb: Code clean up.
7272 2014-05-21  Eric Botcazou  <ebotcazou@adacore.com>
7274         * gnat_ugn.texi: Document -Werror.
7276 2014-05-21  Bob Duff  <duff@adacore.com>
7278         * sem_util.adb (Is_Dependent_Component_Of_Mutable_Object):
7279         This was returning False if the Object is a constant view. Fix
7280         it to return True in that case, because it might be a view of
7281         a variable.
7282         (Has_Discriminant_Dependent_Constraint): Fix latent
7283         bug; this function was crashing when passed a discriminant.
7285 2014-05-21  Robert Dewar  <dewar@adacore.com>
7287         * gnat_ugn.texi: Remove misplaced section that is now obsolete.
7288         * s-arit64.adb: Minor code reorganization.
7289         * sem_prag.adb: Minor comment fix (remove erroneous use of the
7290         term erroneous).
7292 2014-05-21  Robert Dewar  <dewar@adacore.com>
7294         * g-table.adb, g-dyntab.adb (Reallocate): Fix possible overflow in
7295         computing new table size.
7297 2014-05-21  Robert Dewar  <dewar@adacore.com>
7299         * einfo.ads: Minor reformatting.
7300         * ceinfo.adb: Deal with slight format change of einfo.ads.
7302 2014-05-21  Ed Schonberg  <schonberg@adacore.com>
7304         * sem_prag.adb (Analyze_Part_Of): Further work on the proper
7305         implementation of the SPARK 2014 rule concerning private child
7306         units (LRM 7.2.6).
7308 2014-05-21  Vincent Celier  <celier@adacore.com>
7310         * makeusg.adb: Add switch -d to usage.
7312 2014-05-21  Ed Schonberg  <schonberg@adacore.com>
7314         * sem_util.adb (Find_Actual): If an actual that is the prefix
7315         of an enclosing prefixed call has been rewritten, use Nkind
7316         and Sloc to identify the corresponding formal, when handling
7317         deferred references.
7319 2014-05-21  Robert Dewar  <dewar@adacore.com>
7321         * debug.adb: Document -gnatd.z switch.
7322         * sem_eval.adb (Why_Non_Static): Test -gnatd.z switch.
7324 2014-05-21  Robert Dewar  <dewar@adacore.com>
7326         * einfo.ads (Can_Never_Be_Null): Minor comment update.
7327         * sem_prag.adb (Check_Arg_Is_Task_Dispatching_Policy): Minor
7328         error message change.
7329         * s-arit64.adb ("abs"): New function. Use expression functions
7330         for the simple conversions and arithmetic.
7332 2014-05-18  Eric Botcazou  <ebotcazou@adacore.com>
7334         * gcc-interface/trans.c (Subprogram_Body_to_gnu): Rework comment and
7335         set function_start_locus.
7337 2014-05-18  Eric Botcazou  <ebotcazou@adacore.com>
7339         * utils.c (gnat_write_global_declarations): Adjust the flags put on
7340         dummy_global.
7342 2014-05-18  Eric Botcazou  <ebotcazou@adacore.com>
7344         * gcc-interface/decl.c (change_qualified_type): New static function.
7345         (gnat_to_gnu_entity): Use it throughout to add qualifiers on types.
7346         <E_Array_Type>: Set TYPE_VOLATILE on the array type directly.
7347         <E_Array_Subtype>: Likewise.
7348         Do not set flags on an UNCONSTRAINED_ARRAY_TYPE directly.
7349         (gnat_to_gnu_component_type): Likewise.
7350         (gnat_to_gnu_param): Likewise.
7352 2014-05-18  Eric Botcazou  <ebotcazou@adacore.com>
7354         * fe.h (Set_Present_Expr): Move around.
7355         (End_Location): New macro.
7356         * gcc-interface/trans.c (Case_Statement_to_gnu): Use End_Location.
7358 2014-05-18  Eric Botcazou  <ebotcazou@adacore.com>
7360         * gcc-interface/decl.c (gnat_to_gnu_entity): Use Underlying_Type in
7361         lieu of more verbose construct.
7362         * gcc-interface/trans.c (Call_to_gnu): Likewise.
7363         (gnat_to_gnu): Likewise.  Remove obsolete code.
7365 2014-05-18  Eric Botcazou  <ebotcazou@adacore.com>
7367         * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Array_Subtype>: Do not
7368         consider that regular packed arrays can never be superflat.
7370 2014-05-17  Trevor Saunders  <tsaunders@mozilla.com>
7372         * gcc-interface/ada-tree.h: Remove usage of variable_size gty
7373         annotation.
7374         * gcc-interface/decl.c (annotate_value): Adjust.
7375         * gcc-interface/trans.c (Attribute_to_gnu): Likewise.
7376         (push_range_check_info): Likewise.
7377         (Loop_Statement_to_gnu): Likewise.
7378         (Subprogram_Body_to_gnu): Likewise.
7379         (Compilation_Unit_to_gnu): Likewise.
7380         (start_stmt_group): Likewise.
7381         * gcc-interface/utils.c (init_gnat_utils): Likewise.
7382         (gnat_pushlevel): Likewise.
7383         (maybe_pad_type): Likewise.
7385 2014-05-14  Eric Botcazou  <ebotcazou@adacore.com>
7387         * seh_init.c: Fix copyright year.
7389 2014-05-14  Bernd Edlinger  <bernd.edlinger@hotmail.de>
7391         * seh_init.c (__gnat_map_SEH): Compile also when __CYGWIN__ and __SEH__
7392         are defined.  Move include windows.h before system.h.
7393         * s-oscons-tmplt.c (DTR_CONTROL_ENABLE, RTS_CONTROL_ENABLE): Compile
7394         also when __CYGWIN__ is defined.  Include windef.h before winbase.h.
7396 2014-05-14  Richard Sandiford  <r.sandiford@uk.ibm.com>
7398         * gcc-interface/decl.c (gnat_to_gnu_entity): Convert integer_one_node
7399         to the appropriate type.
7400         * gcc-interface/trans.c (gnat_to_gnu): Likewise.
7401         (pos_to_constructor): Likewise.
7403 2014-05-13  Eric Botcazou  <ebotcazou@adacore.com>
7405         * gcc-interface/decl.c (annotate_value): Fix thinko in latest change.
7407 2014-05-06  Kenneth Zadeck  <zadeck@naturalbridge.com>
7408             Mike Stump  <mikestump@comcast.net>
7409             Richard Sandiford  <rdsandiford@googlemail.com>
7411         * gcc-interface/cuintp.c (UI_From_gnu): Use wide-int interfaces.
7412         * gcc-interface/decl.c (gnat_to_gnu_entity): Use TYPE_SIGN.
7413         (annotate_value): Use wide-int interfaces.
7414         * gcc-interface/utils.c (get_nonnull_operand): Use tree_fits_uhwi_p.
7416 2014-04-28  Richard Henderson  <rth@redhat.com>
7418         * gcc-interface/Makefile.in: Support aarch64-linux.
7420 2014-04-28  Eric Botcazou  <ebotcazou@adacore.com>
7422         * exp_dbug.ads (Get_External_Name): Add 'False' default to Has_Suffix,
7423         add 'Suffix' parameter and adjust comment.
7424         (Get_External_Name_With_Suffix): Delete.
7425         * exp_dbug.adb (Get_External_Name_With_Suffix): Merge into...
7426         (Get_External_Name): ...here.  Add 'False' default to Has_Suffix, add
7427         'Suffix' parameter.
7428         (Get_Encoded_Name): Remove 2nd argument in call to Get_External_Name.
7429         Call Get_External_Name instead of Get_External_Name_With_Suffix.
7430         (Get_Secondary_DT_External_Name): Likewise.
7431         * exp_cg.adb (Write_Call_Info): Likewise.
7432         * exp_disp.adb (Export_DT): Likewise.
7433         (Import_DT): Likewise.
7434         * comperr.ads (Compiler_Abort): Remove Code parameter and add From_GCC
7435         parameter with False default.
7436         * comperr.adb (Compiler_Abort): Likewise.  Adjust accordingly.
7437         * types.h (Fat_Pointer): Rename into...
7438         (String_Pointer): ...this.  Add comment on interfacing rules.
7439         * fe.h (Compiler_Abort): Adjust for above renaming.
7440         (Error_Msg_N): Likewise.
7441         (Error_Msg_NE): Likewise.
7442         (Get_External_Name): Likewise.  Add third parameter.
7443         (Get_External_Name_With_Suffix): Delete.
7444         * gcc-interface/decl.c (STDCALL_PREFIX): Define.
7445         (create_concat_name): Adjust call to Get_External_Name, remove call to
7446         Get_External_Name_With_Suffix, use STDCALL_PREFIX, adjust for renaming.
7447         * gcc-interface/trans.c (post_error): Likewise.
7448         (post_error_ne): Likewise.
7449         * gcc-interface/misc.c (internal_error_function): Likewise.
7451 2014-04-28  Richard Biener  <rguenther@suse.de>
7453         PR middle-end/60092
7454         * gcc-interface/utils.c: Define flag_isoc11.
7456 2014-04-26  Eric Botcazou  <ebotcazou@adacore.com>
7458         * gnatvsn.ads (Library_Version): Bump to 4.10.
7460 2014-04-23  Eric Botcazou  <ebotcazou@adacore.com>
7462         Revert
7463         2014-04-22  Richard Henderson  <rth@redhat.com>
7465         * gcc-interface/Makefile.in: Support aarch64-linux.
7467         2014-04-22  Eric Botcazou  <ebotcazou@adacore.com>
7469         * fe.h (Compiler_Abort): Replace Fat_Pointer with String_Pointer.
7470         (Error_Msg_N): Likewise.
7471         (Error_Msg_NE): Likewise.
7472         (Get_External_Name_With_Suffix): Likewise.
7473         * types.h (Fat_Pointer): Delete.
7474         (String_Pointer): New type.
7475         (DECLARE_STRING_POINTER): New macro.
7476         * gcc-interface/decl.c (create_concat_name): Adjust.
7477         * gcc-interface/trans.c (post_error): Likewise.
7478         (post_error_ne): Likewise.
7479         * gcc-interface/misc.c (internal_error_function): Likewise.
7481 2014-04-22  Richard Henderson  <rth@redhat.com>
7483         * gcc-interface/Makefile.in: Support aarch64-linux.
7485         * init.c [__linux__] (HAVE_GNAT_ALTERNATE_STACK): New define.
7486         (__gnat_alternate_stack): Enable for all linux except ia64.
7488 2014-04-22  Eric Botcazou  <ebotcazou@adacore.com>
7490         * fe.h (Compiler_Abort): Replace Fat_Pointer with String_Pointer.
7491         (Error_Msg_N): Likewise.
7492         (Error_Msg_NE): Likewise.
7493         (Get_External_Name_With_Suffix): Likewise.
7494         * types.h (Fat_Pointer): Delete.
7495         (String_Pointer): New type.
7496         (DECLARE_STRING_POINTER): New macro.
7497         * gcc-interface/decl.c (create_concat_name): Adjust.
7498         * gcc-interface/trans.c (post_error): Likewise.
7499         (post_error_ne): Likewise.
7500         * gcc-interface/misc.c (internal_error_function): Likewise.
7502 2014-04-15  Eric Botcazou  <ebotcazou@adacore.com>
7503             Pierre-Marie de Rodat  <derodat@adacore.com>
7505         * gcc-interface/decl.c (gnat_to_gnu_entity) <object>: Create a mere
7506         scalar constant instead of a reference for renaming of scalar literal.
7507         Do not create a new object for constant renaming except for a function
7508         call.  Make sure a VAR_DECL is created for the renaming pointer.
7509         * gcc-interface/trans.c (constant_decl_with_initializer_p): New.
7510         (fold_constant_decl_in_expr): New function.
7511         (Identifier_to_gnu): Use constant_decl_with_initializer_p.
7512         For a constant renaming, try to fold a constant DECL in the result.
7513         (lvalue_required_p) <N_Object_Renaming_Declaration>: Always return 1.
7514         (Identifier_to_gnu): Reference the renamed object of constant renaming
7515         pointers directly.
7516         * gcc-interface/utils.c (invalidate_global_renaming_pointers): Do not
7517         invalidate constant renaming pointers.
7519 2014-04-15  Eric Botcazou  <ebotcazou@adacore.com>
7521         * gcc-interface/utils.c (type_for_vector_element_p): New predicate.
7522         (build_vector_type_for_size): New function.
7523         (build_vector_type_for_array): Likewise.
7524         (unchecked_convert): Build an intermediate vector type to convert
7525         from a generic array type to a vector type.
7526         (handle_vector_size_attribute): Reimplement.
7527         (handle_vector_type_attribute): Likewise.
7529 2014-04-15  Eric Botcazou  <ebotcazou@adacore.com>
7531         * gcc-interface/decl.c (prepend_one_attribute_pragma): Call
7532         Is_OK_Static_Expression in lieu of Is_Static_Expression to
7533         detect valid arguments.
7535 2014-04-15  Eric Botcazou  <ebotcazou@adacore.com>
7537         * gcc-interface/trans.c (gnat_gimplify_stmt): Propagate loop hints.
7539 2014-04-14  Paolo Carlini  <paolo.carlini@oracle.com>
7541         * gcc-interface/decl.c (gnat_to_gnu_entity): Use TYPE_IDENTIFIER.
7542         (components_to_record): Likewise.
7543         * gcc-interface/utils.c (make_aligning_type): Likewise.
7544         (maybe_pad_type): Likewise.
7545         (finish_record_type): Likewise.
7546         (rest_of_record_type_compilation): Likewise.
7548 2014-04-14  Eric Botcazou  <ebotcazou@adacore.com>
7550         * snames.ads-tmpl (Name_Ivdep): New pragma-related name.
7551         * sem_prag.adb (Analyze_Pragma) <Pragma_Loop_Optimize>: Add support
7552         for Ivdep hint.
7553         * gnat_rm.texi (Implementation Defined Pragmas): Document new Ivdep
7554         hint for Loop_Optimize.
7555         * gnat_ugn.texi (Vectorization of loops): Mention new Ivdep hint.
7556         * gcc-interface/trans.c (Pragma_to_gnu) <Pragma_Loop_Optimize>: Deal
7557         with new Ivdep hint.
7558         * gcc-interface/ada-tree.h (LOOP_STMT_IVDEP): New macro.
7559         * gcc-interface/trans.c (Pragma_to_gnu) <Pragma_Loop_Optimize>: Deal
7560         with new Ivdep hint.
7561         (gnat_gimplify_stmt) <LOOP_STMT>: Propagate loop hints.
7563 2014-04-14  Eric Botcazou  <ebotcazou@adacore.com>
7564             Robert Dewar  <dewar@adacore.com>
7566         * opt.ads (Suppress_Back_Annotation): Remove as unused.
7567         * fe.h (Back_Annotate_Rep_Info): Likewise.
7568         (Global_Discard_Names): Likewise.
7569         (List_Representation_Info): Declare.
7570         * types.h (Uint_Minus_1): Likewise.
7571         * repinfo.ads: Document back-annotation change.
7572         * gcc-interface/gigi.h (init_gnat_decl): Declare.
7573         (destroy_gnat_decl): Likewise.
7574         * gcc-interface/decl.c (annotate_value): Do not create the cache of
7575         annotated values here but...
7576         <CALL_EXPR>: Only inline the call if -gnatR3 is specified or we are
7577         in ASIS mode.
7578         (init_gnat_decl): ...here instead.  New function.
7579         (destroy_gnat_decl): Likewise.
7580         * gcc-interface/trans.c (gigi): Call {init|destroy}_gnat_decl.
7581         * gcc-interface/utils.c (init_gnat_utils): Minor reformatting.
7583 2014-04-14  Eric Botcazou  <ebotcazou@adacore.com>
7585         * gcc-interface/decl.c (create_field_decl_from): Finalize non-constant
7586         offset for the field, if any.
7588 2014-04-09  Eric Botcazou  <ebotcazou@adacore.com>
7589             Svante Signell  <svante.signell@gmail.com>
7591         PR ada/54040
7592         PR ada/59346
7593         * s-osinte-x32.adb: New file.
7594         * s-linux.ads (Time): New section.
7595         * s-linux-alpha.ads (Time): Likewise.
7596         * s-linux-android.ads (Time: Likewise.
7597         * s-linux-hppa.ads (Time): Likewise.
7598         * s-linux-mipsel.ads (Time): Likewise.
7599         * s-linux-sparc.ads (Time): Likewise.
7600         * s-linux-x32.ads (Time): Likewise.
7601         * s-osprim-x32.ads (timespec): Adjust.
7602         (Clock): Likewise.
7603         (To_Timespec): Likewise.
7604         * s-osinte-linux.ads (Time): Define local subtypes for those defined
7605         in System.Linux.
7606         * s-taprop-linux.adb (Monotonic_Clock): Do not define timeval.
7607         * s-osinte-hpux.ads (timespec): Revert POSIX breakage.
7608         * s-osinte-kfreebsd-gnu.ads (timespec): Likewise.
7609         * s-osinte-solaris-posix.ads (timespec): Likewise.
7610         * s-osinte-posix.adb (To_Timespec): Likewise.
7611         * gcc-interface/Makefile.in (x32/Linux): Use s-osinte-x32.adb.
7613 2014-04-08  Eric Botcazou  <ebotcazou@adacore.com>
7615         PR ada/60411
7616         * gcc-interface/Makefile.in (arm% linux-android): Switch to EHABI.
7617         * s-linux-android.ads: New file.
7618         * s-intman-android.adb: Likewise.
7619         * s-osinte-android.ads: Adjust.
7620         * sigtramp-armdroid.c: Likewise.
7621         * sigtramp.h: Add Android support.
7623 2014-04-07  Eric Botcazou  <ebotcazou@adacore.com>
7625         * gcc-interface/Makefile.in (alpha-vms): Add missing line.
7627 2014-03-30  Eric Botcazou  <ebotcazou@adacore.com>
7629         PR ada/60703
7630         * system-linux-alpha.ads: Adjust for Ada 2005.
7631         * system-linux-mips.ads: Likewise.
7632         * system-linux-mips64el.ads: Likewise.
7633         * system-linux-mipsel.ads: Likewise.
7634         * system-linux-s390.ads: Likewise.
7635         * system-linux-s390x.ads: Likewise.
7636         * system-linux-sparc.ads: Likewise.
7637         * system-linux-sparcv9.ads: Likewise.
7638         * system-rtems.ads: Likewise.
7639         * system-vxworks-arm.ads: Likewise.
7641 2014-03-16  Andreas Schwab  <schwab@linux-m68k.org>
7643         PR ada/39172
7644         * gcc-interface/Makefile.in (target_cpu_default): Revert
7645         2013-10-11 change.
7647 2014-03-13  Eric Botcazou  <ebotcazou@adacore.com>
7649         PR ada/51483
7650         * cstand.adb (Register_Float_Type): Add 'precision' parameter and use
7651         it to set the RM size.  Use directly 'size' for the Esize.
7652         (Create_Back_End_Float_Types): Adjust call to above.
7653         * get_targ.ads (Register_Type_Proc): Add 'precision' parameter.
7654         * set_targ.ads (FPT_Mode_Entry): Add 'precision' component.
7655         (Write_Target_Dependent_Values): Adjust comment.
7656         * set_targ.adb (Register_Float_Type): Add 'precision' parameter and
7657         deal with it.
7658         (Write_Target_Dependent_Values): Write the precision in lieu of size.
7659         (Initialization): Read the precision in lieu of size and compute the
7660         size from the precision and the alignment.
7661         * gcc-interface/gigi.h (enumerate_modes): Add integer parameter.
7662         * gcc-interface/misc.c (enumerate_modes): Likewise.  Do not register
7663         types for vector modes, pass the size in addition to the precision.
7665 2014-03-10  Eric Botcazou  <ebotcazou@adacore.com>
7667         * gcc-interface/Make-lang.in (ADA_DEPFILES): Fix typo.
7669 2014-03-07  Doug Rupp  <rupp@adacore.com>
7671         PR ada/60411
7672         * system-linux-armel.ads (Backend_Overflow_Checks): Set to True.
7673         (Support_64_Bit_Divides): Removed, no longer used.
7674         (ZCX_By_Default): Enabled.
7676 2014-02-25  Doug Rupp  <rupp@adacore.com>
7678         * gcc-interface/Makefile.in (arm-linux):
7679         (EH_MECHANISM): Use ARM unwinder (-arm)
7680         (LIBGNAT_TARGET_PAIRS: Override defaults with a-exexpr-gcc.adb and
7681         s-excmac-arm.ads.
7682         (EXTRA_LIBGNAT_OBJS): Add raise-gcc.o
7683         (EXTRA_GNATRTL_NONTASKING_OBJS): Add g-cppexc.o s-excmac.o.
7684         (arm-wrs-vxworks): Add EH_MECHANISM=-gcc for kernel mode.
7685         (EXTRA_LIBGNAT_OBJS): Add sigtramp-armvxw.o
7686         Add dependencies for sigtramp-armvxw.o.
7688 2014-02-25  Eric Botcazou  <ebotcazou@adacore.com>
7690         * gcc-interface/trans.c (Pragma_to_gnu): Deal with Warning_As_Error.
7692 2014-02-25  Robert Dewar  <dewar@adacore.com>
7694         * rtsfind.adb (Is_RTE): Protect against entity with no scope
7695         field (previously this call blew up on the Standard entity).
7696         * sem_attr.adb (Analyze_Attribute, case Access): Remove
7697         test for No_Abort_Statements, this is now handled in
7698         Set_Entity_With_Checks.
7699         * exp_ch6.adb, sem_ch10.adb, sem_ch4.adb, sem_ch8.adb, sem_res.adb:
7700         Change name Set_Entity_With_Style_Check => Set_Entity_With_Checks.
7701         * sem_util.ads, sem_util.adb: Change name Set_Entity_With_Style_Check =>
7702         Set_Entity_With_Checks.
7703         (Set_Entity_With_Checks): Add checks for No_Dynamic_Attachment,
7704         Add checks for No_Abort_Statements.
7706 2014-02-25  Robert Dewar  <dewar@adacore.com>
7708         * exp_ch9.adb (Expand_Entry_Barrier): Add comment that call to
7709         Check_Restriction is OK.
7711 2014-02-25  Ed Schonberg  <schonberg@adacore.com>
7713         * sem_ch3.adb (Process_Full_View): Better error message when
7714         the full view of  a private type without discriminants is an
7715         unconstrained type.
7716         * sem_ch7.adb (Uninstall_Declarations): Ditto.
7718 2014-02-25  Eric Botcazou  <ebotcazou@adacore.com>
7720         * sigtramp-armvxw.c: Also restore r0.
7722 2014-02-25  Robert Dewar  <dewar@adacore.com>
7724         * errout.adb (Error_Msg_Internal): Warning_Msg_Char set
7725         unconditionally (Set_Msg_Insertion_Warning): Warning_Msg_Char
7726         set unconditionally.
7727         * erroutc.adb (Get_Warning_Tag): Does not give a leading space
7728         any more (Output_Msg_Text): Rewritten with new convention on
7729         output of warnings that are treated as errors.
7730         * erroutc.ads (Error_Msg_Object): Warn_Chr is always set even
7731         if Warn is False.
7732         * gnat_rm.texi: Updates to documentation on pragma
7733         Warning_As_Error.
7734         * warnsw.adb (Set_Dot_Warning_Switch): -gnatw.e should not
7735         set Warning_Doc_Switch.
7736         * lib-writ.ads: Add documentation note on ALI file generation
7737         for C.
7738         * exp_ch6.adb (Expand_Call): Remove check for No_Abort_Statements
7739         (belongs in Sem).
7740         * sem_attr.adb (Resolve_Attribute, case Access):
7741         Abort_Task'Access violates the No_Abort_Statements restriction.
7742         * sem_res.adb (Resolve_Call): Check restriction
7743         No_Abort_Statements for call to Abort_Task or a renaming of it.
7745 2014-02-25  Robert Dewar  <dewar@adacore.com>
7747         * sem_ch3.adb (Array_Type_Declaration): Check for case of using
7748         type name as index.
7749         * lib.ads: Minor reformatting.
7750         * einfo.ads: Minor reformatting.
7752 2014-02-25  Doug Rupp  <rupp@adacore.com>
7754         * sem_mech.adb (Set_Mechanisms): For convention Fortran on VMS
7755         use Short_Descriptor(S) as the argument passing mechanism.
7757 2014-02-25  Eric Botcazou  <ebotcazou@adacore.com>
7759         * sigtramp-ppcvxw.c (CFI_COMMON_REGS): Also include r0.
7761 2014-02-25  Robert Dewar  <dewar@adacore.com>
7763         * atree.ads (Warnings_Treated_As_Errors): New variable.
7764         * errout.adb (Error_Msg_Internal): Set Warn_Err flag in
7765         error object (Initialize): Initialize Warnings_As_Errors_Count
7766         (Write_Error_Summary): Include count of warnings treated as errors.
7767         * erroutc.adb (Warning_Treated_As_Error): New function.
7768         (Matches): Function moved to outer level of package.
7769         * erroutc.ads (Error_Msg_Object): Add Warn_Err flag.
7770         (Warning_Treated_As_Error): New function.
7771         * gnat_rm.texi: Document pragma Treat_Warning_As_Error.
7772         * opt.adb: Add handling of Warnings_As_Errors_Count[_Config].
7773         * opt.ads (Config_Switches_Type): Add entry for
7774         Warnings_As_Errors_Count.
7775         (Warnings_As_Errors_Count): New variable.
7776         (Warnings_As_Errors): New array.
7777         * par-prag.adb: Add dummy entry for Warning_As_Error.
7778         * sem_prag.adb (Analyze_Pragma): Implement new pragma
7779         Warning_As_Error.
7780         * snames.ads-tmpl: Add entries for Warning_As_Error pragma.
7782 2014-02-25  Eric Botcazou  <ebotcazou@adacore.com>
7784         * sigtramp.h: Fix minor inaccuracy.
7786 2014-02-25  Ben Brosgol  <brosgol@adacore.com>
7788         * gnat_ugn.texi: Added description of kill command.
7790 2014-02-25  Robert Dewar  <dewar@adacore.com>
7792         * gnat_rm.texi (Address_Clauses): Add a section discussing the
7793         problem of address clauses causing unexpected initialization,
7794         including the effect of Initialize_Scalars.
7796 2014-02-25  Robert Dewar  <dewar@adacore.com>
7798         * errout.adb: Various changes for better msgs for anonmous access
7799         subprogram types.
7800         * erroutc.ads, erroutc.adb (Buffer_Ends_With): Version with character
7801         argument.
7802         (Buffer_Remove): Version with character argument.
7803         * sem_attr.adb (Resolve_Attribute, case Access): Better handling
7804         of mismatching conventions for access-to-subprogram case.
7805         * sem_prag.adb (Set_Convention_From_Pragma): Deal with anonymous
7806         access types in record.
7807         * sem_util.ads, sem_util.adb (Set_Convention): Handle anonymous access
7808         types, including in records.
7810 2014-02-25  Doug Rupp  <rupp@adacore.com>
7812         * sigtramp-ppcvxw.c, sigtramp.h, sigtramp-armvxw.c: Comment
7813         enhancements and corrections.
7815 2014-02-25  Robert Dewar  <dewar@adacore.com>
7817         * gnat_rm.texi: New section "Conventions and Anonymous Access Types"
7819 2014-02-25  Robert Dewar  <dewar@adacore.com>
7821         * gnat_rm.texi: First set of documentation additions for
7822         predefined RM units.
7823         * checks.adb: Minor reformatting.
7824         * sem_elab.adb (Check_Task_Activation): Minor fix to error
7825         message.
7826         * sem_util.adb: Minor reformatting.
7828 2014-02-25  Arnaud Charlet  <charlet@adacore.com>
7830         * usage.adb (Usage): Add help on -gnateC.
7831         * switch-c.adb (Scan_Front_End_Switches): Add handling of -gnateC.
7832         * opt.ads (Generate_CodePeer_Messages): New flag.
7833         * gnat_ugn.texi: Document new switch -gnateC.
7835 2014-02-25  Ben Brosgol  <brosgol@adacore.com>
7837         * gnat_rm.texi: Corrected minor typos in Implementation Defined
7838         Aspects.
7839         * opt.ads: Minor reformatting.
7841 2014-02-25  Robert Dewar  <dewar@adacore.com>
7843         * binde.adb: Change messages to mention -gnatel instead of -gnatwl.
7844         * gnat_ugn.texi: Update documentation of -gnatwl Add documentation
7845         of -gnatel/-gnateL.
7846         * opt.ads (Warn_Info_Messages): New flag.
7847         * sem_elab.adb: Use Elab_Warnings, Elab_Info_Messages to control
7848         messages.
7849         * sem_prag.adb: Use Elab_Warnings, Elab_Info_Messages to control
7850         messages.
7851         * switch-m.ad, switch-c.adb: Recognize new -gnatel/EL switches.
7852         * usage.adb: Add documentation of -gnatel/-gnateL Update
7853         documentation of -gnatwl/-gnatwL.
7854         * warnsw.adb: New handling of Elab_Warnings, Elab_Info_Messages
7855         * warnsw.ads (Elab_Info_Messages): New field in Warning_Record
7857 2014-02-25  Robert Dewar  <dewar@adacore.com>
7859         * einfo.ads, einfo.adb (Has_Shift_Operator): New flag.
7860         * gnat_rm.texi: Document pragma Provide_Shift_Operators.
7861         * interfac.ads: Minor code reorganization (add pragma
7862         Compiler_Unit_Warning).
7863         * par-prag.adb: Add dummy entry for Provide_Shift_Operators.
7864         * sem_ch3.adb (Build_Derived_Numeric_Type): Copy
7865         Has_Shift_Operator flag.
7866         * sem_intr.adb (Check_Intrinsic_Subprogram): Make sure
7867         Check_Shift is always called (Check_Shift): Set Has_Shift_Operator.
7868         * sem_prag.adb: Implement pragma Provide_Shift_Operators.
7869         * snames.ads-tmpl: Add entries for pragma Provide_Shift_Operators
7870         Add entry for Name_Amount.
7871         * checks.adb (Selected_Range_Checks): When checking for a null
7872         range, make sure we use the base type, and not the subtype for
7873         deciding a range is null.
7874         * sem_ch5.adb (Analyze_Loop_Parameter_Specification): Check
7875         for suspicious loop bound which is outside the range of the
7876         loop subtype.
7877         * gnat_ugn.texi: Add documentation section "Determining the
7878         Chosen Elaboration Order"
7879         * sem_ch13.adb (UC_Entry): Add field Act_Unit
7880         (Validate_Unchecked_Conversion): Store Act_Unit
7881         (Validate_Unchecked_Conversions): Test Warnings_Off in Act_Unit
7882         * treepr.adb: Minor reformatting.
7884 2014-02-25  Arnaud Charlet  <charlet@adacore.com>
7886         * usage.adb: Minor: fix typo.
7888 2014-02-25  Robert Dewar  <dewar@adacore.com>
7890         * lib.ads, s-bitops.adb, s-bitops.ads, s-conca5.adb, gnat_rm.texi,
7891         s-conca5.ads, s-conca7.adb, s-conca7.ads, s-crc32.adb, s-crc32.ads,
7892         s-conca9.adb, s-conca9.ads, g-dyntab.adb, s-crtl.ads, g-dyntab.ads,
7893         s-excdeb.adb, s-addope.adb, s-addope.ads, s-carun8.adb, s-carun8.ads,
7894         g-htable.adb, g-htable.ads, g-hesora.adb, g-hesora.ads, s-conca2.adb,
7895         s-conca2.ads, a-comlin.adb, a-chlat1.ads, a-comlin.ads, errout.ads,
7896         a-except.adb, s-conca4.adb, a-except.ads, s-conca4.ads, s-conca6.adb,
7897         s-conca6.ads, g-spchge.adb, g-spchge.ads, g-u3spch.adb, g-u3spch.ads,
7898         a-strhas.ads, restrict.adb, aspects.adb, aspects.ads, s-conca8.adb,
7899         s-conca8.ads, back_end.adb, par-prag.adb, g-byorma.adb, g-byorma.ads,
7900         a-elchha.adb, a-elchha.ads, g-speche.adb, g-speche.ads, s-casuti.adb,
7901         s-assert.adb, s-casuti.ads, s-assert.ads, a-clrefi.adb, a-clrefi.ads,
7902         s-conca3.adb, s-conca3.ads, a-ioexce.ads: Implement pragma
7903         Compiler_Unit_Warning, change Compiler_Unit everywhere to
7904         Compiler_Unit_Warning.
7906 2014-02-25  Sergey Rybin  <rybin@adacore.com frybin>
7908         * sem_prag.adb (Analyze_Depends_In_Decl_Part): Do not normalize
7909         in ASIS mode aggregates that are used as aspect definitions.
7911 2014-02-25  Robert Dewar  <dewar@adacore.com>
7913         * exp_ch7.adb, sem_util.adb, sem_util.ads, exp_ch6.adb: Minor
7914         reformatting.
7916 2014-02-25  Ed Schonberg  <schonberg@adacore.com>
7918         * freeze.adb (Freeze_Entity): If the return type of a function
7919         is a limited view, and the non-limited view has not been seen yet,
7920         defer freezing to some later point.
7922 2014-02-25  Robert Dewar  <dewar@adacore.com>
7924         * sem_ch3.adb: Minor reformatting.
7926 2014-02-25  Robert Dewar  <dewar@adacore.com>
7928         * s-excdeb.ads, s-except.ads, s-exctab.adb, s-exctab.ads, s-finmas.ads,
7929         s-htable.adb, s-htable.ads, s-imenne.adb, s-imenne.ads, s-imgenu.adb,
7930         s-imgenu.ads, s-mastop.adb, s-mastop.ads, s-memory-vms_64.adb,
7931         s-memory-vms_64.ads, s-memory.adb, s-memory.ads, s-os_lib.adb,
7932         s-os_lib.ads, s-parame.adb, s-parame.ads, s-purexc.ads, s-restri.adb,
7933         s-restri.ads, s-rident.ads, s-secsta.adb, s-secsta.ads, s-soflin.adb,
7934         s-soflin.ads, s-sopco3.adb, s-sopco3.ads, s-sopco4.adb, s-sopco4.ads,
7935         s-sopco5.adb, s-sopco5.ads, s-spsufi.ads, s-stache.adb, s-stache.ads,
7936         s-stalib.adb, s-stalib.ads, s-stoele.adb, s-stoele.ads, s-strcom.adb,
7937         s-strcom.ads, s-strhas.adb, s-string.adb, s-string.ads, s-strops.adb,
7938         s-strops.ads, s-ststop.adb, s-ststop.ads, s-traceb.adb, s-traceb.ads,
7939         s-traent.adb, s-traent.ads, s-unstyp.ads, s-utf_32.adb, s-utf_32.ads,
7940         s-wchcnv.adb, s-wchcnv.ads, s-wchcon.adb, s-wchcon.ads, s-wchjis.adb,
7941         s-wchjis.ads, sem_ch11.adb, sem_ch4.adb, sem_ch5.adb, sem_prag.adb,
7942         snames.ads-tmpl: Change Compiler_Unit everywhere to
7943         Compiler_Unit_Warning.
7945 2014-02-25  Hristian Kirtchev  <kirtchev@adacore.com>
7947         * exp_ch6.adb (Add_Or_Save_Precondition): New routine.
7948         (Collect_Body_Postconditions_In_Decls): New routine.
7949         (Collect_Body_Postconditions_Of_Kind): Factor out code. Handle
7950         postcondition aspects or pragmas that appear on a subprogram
7951         body stub.
7952         (Collect_Spec_Preconditions): Factor out code. Handle
7953         precondition aspects or pragmas that appear on a subprogram
7954         body stub.
7955         * sem_ch6.adb (Analyze_Subprogram_Body_Helper): The analysis of
7956         aspects that apply to a subprogram body stub is no longer delayed,
7957         the aspects are analyzed on the spot.
7958         (SPARK_Aspect_Error):
7959         Aspects that apply to a subprogram declaration cannot appear in
7960         a subunit.
7961         * sem_ch10.adb Remove with and use clause for Sem_Ch13.
7962         (Analyze_Proper_Body): Add local variable Comp_Unit. Unum
7963         is now a local variable. Code cleanup. Analysis related to
7964         the aspects of a subprogram body stub is now carried out by
7965         Analyze_Subprogram_Body_Helper. Do not propagate the aspects
7966         and/or pragmas of a subprogram body stub to the proper body
7967         as this is no longer needed. Do not analyze the aspects of a
7968         subprogram stub when the corresponding source unit is missing.
7969         (Analyze_Protected_Body_Stub): Flag the illegal use of aspects
7970         on a stub.
7971         (Analyze_Task_Body_Stub): Flag the illegal use of
7972         aspects on a stub.
7973         (Optional_Subunit): Add local variable Unum.
7974         * sem_ch13.adb (Insert_Delayed_Pragma): Do not analyze a generated
7975         pragma when it applies to a subprogram body stub.
7976         * sem_prag.adb (Analyze_Pragma): Pragmas Contract_Cases,
7977         Depends and Global can now apply to a subprogram body stub as
7978         long as it acts as its own spec.
7979         (Analyze_Refined_Pragma):
7980         Code reformatting. Refinement pragmas cannot apply to a subunit.
7982 2014-02-25  Hristian Kirtchev  <kirtchev@adacore.com>
7984         * einfo.ads Update the usage of flag
7985         Uses_Sec_Stack. Uses_Sec_Stack now applies to E_Loop entities.
7986         * exp_ch5.adb (Expand_Iterator_Loop): The temporary for a cursor
7987         now starts with the letter 'C'. This makes reading expanded
7988         code easier.
7989         * exp_ch7.adb (Establish_Transient_Scope): Add local variable
7990         Iter_Loop. Signal that an Ada 2012 iterator loop requires
7991         secondary stack management when creating a transient scope for
7992         an element reference.
7993         * exp_util.adb (Process_Statements_For_Controlled_Objects):
7994         When wrapping the statements of a loop, pass the E_Loop entity
7995         to the wrapping machinery.
7996         (Wrap_Statements_In_Block): Add
7997         formal parameter Scop along with comment on usage. Add local
7998         variables Block_Id, Block_Nod and Iter_Loop. Mark the generated
7999         block as requiring secondary stack management when the block is
8000         created inside an Ada 2012 iterator loop. This ensures that any
8001         reference objects are reclaimed on each iteration of the loop.
8002         * sem_ch5.adb (Analyze_Loop_Statement): Mark the generated block
8003         tasked with the handling of container iterators as requiring
8004         secondary stack management. This ensures that iterators are
8005         reclaimed when the loop terminates or is exited in any fashion.
8006         * sem_util.adb (Add_Block_Identifier): New routine.
8007         (Find_Enclosing_Iterator_Loop): New routine.
8008         * sem_util.ads (Add_Block_Identifier): New routine.
8009         (Find_Enclosing_Iterator_Loop): New routine.
8011 2014-02-25  Robert Dewar  <dewar@adacore.com>
8013         * sinfo.ads: Minor reformatting.
8015 2014-02-25  Tristan Gingold  <gingold@adacore.com>
8017         * s-expllu.ads, s-expuns.ads, s-expmod.ads: Minor comment fix.
8019 2014-02-25  Pascal Obry  <obry@adacore.com>
8021         * sinput-l.adb, osint.adb, osint.ads: Add Prep_Suffix to factorize code.
8023 2014-02-25  Tristan Gingold  <gingold@adacore.com>
8025         * sem_ch10.adb: Minor comment fix.
8027 2014-02-25  Bob Duff  <duff@adacore.com>
8029         * s-tasdeb.adb: Misc cleanup of this package,
8030         including printing addresses in hexadecimal.
8031         (Write): Fix minor bug when taking 'Address of an empty string.
8033 2014-02-25  Ed Schonberg  <schonberg@adacore.com>
8035         * sem_prag.adb (Analyze_Part_Of): Reject state refinement in a
8036         public child unit when it does not refer to the abstract state
8037         of a public ancestor.
8039 2014-02-25  Yannick Moy  <moy@adacore.com>
8041         * sem_prag.adb (Analyze_Pragma/Pragma_Validity_Checks): Ignore pragma
8042         Validity_Checks in GNATprove and CodePeer modes.
8044 2014-02-25  Pascal Obry  <obry@adacore.com>
8046         * prj-attr.adb, projects.texi, snames.ads-tmpl: Add package Install's
8047         Artifacts attribute.
8049 2014-02-25  Yannick Moy  <moy@adacore.com>
8051         * sem_prag.adb: Minor reformatting to get consistent messages.
8053 2014-02-25  Robert Dewar  <dewar@adacore.com>
8055         * checks.adb: Minor reformatting.
8056         * sinfo.ads (Do_Range_Check): Document that this flag is never
8057         passed to the back end.
8059 2014-02-25  Yannick Moy  <moy@adacore.com>
8061         * sem_ch3.adb, sem_ch5.adb, sem_ch9.adb, sem_prag.adb, sem_attr.adb,
8062         sem_ch6.adb: Remove useless references to SPARK RM in error messages.
8064 2014-02-25  Hristian Kirtchev  <kirtchev@adacore.com>
8066         * sem_res.adb (Appears_In_Check): New routine.
8067         (Resolve_Entity_Name): Remove local variables Prev and
8068         Usage_OK. Par is now a constant. Remove the parent chain traversal
8069         as the placement of a volatile object with enabled property
8070         Async_Writers and/or Effective_Reads must appear immediately
8071         within a legal construct.
8073 2014-02-25  Hristian Kirtchev  <kirtchev@adacore.com>
8075         * checks.adb (Apply_Selected_Range_Checks):
8076         Alphabetize local constants and variables. Add comments.
8077         Always insert a range check that requires runtime evaluation into
8078         the tree.
8080 2014-02-25  Robert Dewar  <dewar@adacore.com>
8082         * sem_attr.adb, sem_ch6.adb, par-ch3.adb: Minor reformatting.
8084 2014-02-25  Bob Duff  <duff@adacore.com>
8086         * s-tassta.adb (Finalize_Global_Tasks): Limit the number of loop
8087         iterations while waiting for independent tasks to terminate;
8088         if an independent task does not terminate, we do not want to
8089         hang here. In that case, the thread will be terminated when the
8090         process exits.
8091         * s-taprop-linux.adb (Abort_Task): Fix Assert to allow for ESRCH.
8093 2014-02-25  Ed Schonberg  <schonberg@adacore.com>
8095         * sem_prag.adb (Check_SPARK_Aspect_For_ASIS): New subprogram,
8096         used to perform pre-analysis of the expression for SPARK
8097         aspects that have a non-standard syntax, such as GLobal and
8098         Initializes. The procedure applies to the original expression
8099         in an aspect specification, prior to the analysis of the
8100         corresponding pragma, in order to provide semantic information
8101         for ASIS navigation purposes.
8102         (Analyze_Global_In_Decl_List, Analyze_Initializes_In_Decl_Part):
8103         Call new subprogram.
8105 2014-02-25  Yannick Moy  <moy@adacore.com>
8107         * sem_prag.adb: Remove obsolete reference to SPARK RM in error message.
8109 2014-02-25  Doug Rupp  <rupp@adacore.com>
8111         * init.c (HAVE_GNAT_ADJUST_CONTEXT_FOR_RAISE): Enable for ARM.
8112         (__gnat_adjust_context_for_raise): Bump the PC by 2.
8114 2014-02-25  Ed Schonberg  <schonberg@adacore.com>
8116         * par-ch3.adb (P_Basic_Declarative_Items): In the case of a
8117         misplaced IS, add a statement sequence to improper body only if
8118         one has not been parsed already.
8120 2014-02-25  Ed Schonberg  <schonberg@adacore.com>
8122         * sem_attr.adb (Analyze_Attribute, case 'Update): Check for
8123         mismatch when multidimensional array is updated with a single
8124         index.
8126 2014-02-25  Yannick Moy  <moy@adacore.com>
8128         * sem_ch3.adb, sem_ch5.adb, sem_prag.adb, sem_attr.adb, errout.ads,
8129         sem_ch6.adb: Mark most references to SPARK RM in error messages
8130         for removal.
8132 2014-02-24  Ed Schonberg  <schonberg@adacore.com>
8134         * par-ch3.adb (P_Basic_Declarative_Items): If an improper body
8135         appears in a list of basic declarations, complete the tree with
8136         an empty statement list, to prevent cascaded errors and crashes
8137         if semantic analysis is attempted.
8139 2014-02-24  Thomas Quinot  <quinot@adacore.com>
8141         * g-sercom-mingw.adb (Open): Fix incorrect test for error return
8142         value.
8143         * erroutc.adb: Minor reformatting.
8145 2014-02-24  Hristian Kirtchev  <kirtchev@adacore.com>
8147         * sem_prag.adb (Check_Clause_Syntax): Account
8148         for a solitary input item in a dependency list.
8150 2014-02-24  Yannick Moy  <moy@adacore.com>
8152         * gnat1drv.adb (Adjust_Global_Switches): Do not
8153         use validity checks at all in GNATprove_Mode.
8155 2014-02-24  Robert Dewar  <dewar@adacore.com>
8157         * g-sercom-mingw.adb, g-sercom-linux.adb, sem_prag.adb, freeze.adb,
8158         atree.adb, atree.ads: Minor reformatting.
8160 2014-02-24  Hristian Kirtchev  <kirtchev@adacore.com>
8162         * sem_ch6.adb (Analyze_Subprogram_Body_Contract): Do not enforce
8163         global and dependence refinement when SPARK_Mode is off.
8164         * sem_ch7.adb (Analyze_Package_Body_Contract): Do not enforce
8165         state refinement when SPARK_Mode is off.
8166         * sem_ch13.adb (Analyze_Aspect_Specifications): Add local
8167         variable Decl. Insert the generated pragma for Refined_State
8168         after a potential pragma SPARK_Mode.
8169         * sem_prag.adb (Analyze_Depends_In_Decl_Part): Add local
8170         constant Deps. Remove local variable Expr. Check the syntax
8171         of pragma Depends when SPARK_Mode is off. Factor out the
8172         processing for extra parenthesis around individual clauses.
8173         (Analyze_Global_In_Decl_List): Items is now a constant. Check
8174         the syntax of pragma Global when SPARK_Mode is off.
8175         (Analyze_Initializes_In_Decl_Part): Check the syntax of pragma
8176         Initializes when SPARK_Mode is off.
8177         (Analyze_Part_Of): Check
8178         the syntax of the encapsulating state when SPARK_Mode is off.
8179         (Analyze_Pragma): Check the syntax of pragma Abstract_State when
8180         SPARK_Mode is off. Move the declaration order check with respect
8181         to pragma Initializes to the end of the processing. Do not verify
8182         the declaration order for pragma Initial_Condition when SPARK_Mode
8183         is off. Do not complain about a useless package refinement when
8184         SPARK_Mode is off.
8185         (Analyze_Refined_Depends_In_Decl_Part): Refs
8186         is now a constant. Check the syntax of pragma Refined_Depends
8187         when SPARK_Mode is off.
8188         (Analyze_Refined_Global_In_Decl_Part):
8189         Check the syntax of pragma Refined_Global when SPARK_Mode is off.
8190         (Analyze_Refined_State_In_Decl_Part): Check the syntax of pragma
8191         Refined_State when SPARK_Mode is off.
8192         (Check_Dependence_List_Syntax): New routine.
8193         (Check_Global_List_Syntax): New routine.
8194         (Check_Initialization_List_Syntax): New routine.
8195         (Check_Item_Syntax): New routine.
8196         (Check_State_Declaration_Syntax): New routine.
8197         (Check_Refinement_List_Syntax): New routine.
8198         (Has_Extra_Parentheses): Moved to the top level of Sem_Prag.
8200 2014-02-24  Robert Dewar  <dewar@adacore.com>
8202         * a-tags.adb, s-os_lib.adb: Minor reformatting.
8204 2014-02-24  Thomas Quinot  <quinot@adacore.com>
8206         * g-sercom-mingw.adb, g-sercom-linux.adb (Raise_Error): Include
8207         strerror message, not just numeric errno value.
8209 2014-02-24  Doug Rupp  <rupp@adacore.com>
8211         * raise-gcc.c (exception_class_eq): Make endian neutral.
8213 2014-02-24  Ed Schonberg  <schonberg@adacore.com>
8215         * atree.ads, atree,adb (Copy_Separate_Tree): Remove Syntax_Only
8216         flag, and reset Etype and Analyzed attributes unconditionally
8217         when copying a tree that may be partly analyzed.
8218         * freeze.adb: Change calls to Copy_Separate_Tree accordingly.
8219         * sem_ch6.adb (Check_Inline_Pragma): If the Inline pragma appears
8220         within a subprogram body and applies to it, remove it from the
8221         body before making a copy of it, to prevent spurious errors when
8222         analyzing the copied body.
8224 2014-02-24  Thomas Quinot  <quinot@adacore.com>
8226         * s-os_lib.adb (Errno_Message): Do not depend on Integer'Image.
8227         * s-oscons-tmplt.c: On VxWorks, include adaint.h only after
8228         vxWorks.h has been included.  Also ensure that file attributes
8229         related definitions are output even in cases where socket support
8230         is not enabled.
8231         * a-tags.adb: Code clean up.
8232         * Make-generated.in (OSCONS_CPP, OSCONS_EXTRACT): Use -iquote
8233         instead of -I to add the main ada source directory to the header
8234         search path, in order to avoid conflict between our own "types.h"
8235         and VxWork's <types.h>.
8237 2014-02-24  Robert Dewar  <dewar@adacore.com>
8239         * atree.ads, atree.adb (Copy_Separate_Tree): Add Syntax_Only parameter.
8240         * debug.adb: Remove documentation of -gnatd.X, no longer used.
8241         * freeze.adb (Wrap_Imported_Subprogram): Fixed and activated.
8243 2014-02-24  Bob Duff  <duff@adacore.com>
8245         * gnat_ugn.texi: Improve documentation of gnatpp.
8247 2014-02-24  Thomas Quinot  <quinot@adacore.com>
8249         * g-stheme.adb, g-socthi-vms.adb, g-socthi-vms.ads,
8250         g-socthi-vxworks.adb, g-socthi-vxworks.ads, g-stseme.adb,
8251         g-socthi-mingw.adb, g-socthi-mingw.ads, g-socthi.adb,
8252         g-socthi.ads, g-socket.adb (Host_Error_Message): Return a string, not
8253         a chars_ptr, because on Windows this is a renaming of
8254         Socket_Error_Message.
8256 2014-02-24  Robert Dewar  <dewar@adacore.com>
8258         * a-direct.adb, sem_ch5.adb, a-cfdlli.adb, a-cfhase.adb, a-tags.adb,
8259         s-filatt.ads, a-cforma.adb, sem_ch6.adb, g-socthi-mingw.adb,
8260         a-cfhama.adb, a-cforse.adb, a-cofove.adb: Minor reformatting and code
8261         reorganization.
8263 2014-02-24  Thomas Quinot  <quinot@adacore.com>
8265         * Make-generated.in (OSCONS_CPP, OSCONS_EXTRACT): Make sure
8266         that the source directory containing s-oscons-tmplt.c is on the
8267         include path, so that all internal header files are available.
8269 2014-02-24  Ed Schonberg  <schonberg@adacore.com>
8271         * sem_ch5.adb (Analyze_Loop_Parameter_Specification): If the
8272         domain of iteration is an attribute reference 'Old, this is an
8273         Ada 2012 iterator and the loop must be rewritten as such.
8275 2014-02-24  Thomas Quinot  <quinot@adacore.com>
8277         * s-fileio.adb (Errno_Message): Remove, use shared version from
8278         s-os_lib instead.
8279         * s-crtrun.ads, Makefile.rtl: Remove now unused unit.
8280         * g-stseme (Socket_Error_Message): Reimplement in terms of new
8281         s-os_lib function.
8282         * g-socthi.ads, g-socthi.adb: Change profile of
8283         Socket_Error_Message to return String to allow the above.
8284         * g-socket.adb, g-socthi-mingw.adb, g-socthi-mingw.ads,
8285         * g-socthi-vms.adb, g-socthi-vms.ads, g-socthi-vxworks.adb,
8286         * g-socthi-vxworks.ads: Update to account for the above profile
8287         change.
8288         * a-tags.adb: Use strlen builtin binding provided by s-crtl.
8289         * s-crtl.ads (strncpy): New procedure.
8290         * s-os_lib.adb (Copy_Attributes): Import just once (strncpy):
8291         Use import from s-crtl.
8292         * a-envvar.adb, osint.adb: Use imports of C runtime functions
8293         from s-crtl instead of re-importing locally.
8295 2014-02-24  Hristian Kirtchev  <kirtchev@adacore.com>
8297         * sem_prag.adb (Analyze_Global_Item): Emit the
8298         variable related checks concerning volatile objects only when
8299         SPARK_Mode is on.
8301 2014-02-24  Robert Dewar  <dewar@adacore.com>
8303         * sem_ch5.adb (Analyze_Iterator_Specification): use
8304         Error_Msg_Ada_2012_Feature.
8306 2014-02-24  Jose Ruiz  <ruiz@adacore.com>
8308         * s-rident.ads (Profile_Info): For Ravenscar, the restrictions
8309         No_Local_Timing_Events and No_Specific_Termination_Handlers
8310         must be set, according to the Ravenscar profile definition
8311         in D.13(6/3).
8313 2014-02-24  Ed Schonberg  <schonberg@adacore.com>
8315         * sem_ch6.adb (Analyze_Expression_Function): If this is a
8316         completion, freeze return type and its designated type if needed.
8318 2014-02-24  Thomas Quinot  <quinot@adacore.com>
8320         * sem_ch13.adb (Analyze_Attribute_Definition_Clause, case
8321         'Address): When moving initialization statements to a freeze
8322         entity, keep them under a single node (i.e. do not unwrap
8323         expressions with actions), and set the Initialization_Statements
8324         attribute again so that processing of a later pragma Import can
8325         still remove them.
8327 2014-02-24  Claire Dross  <dross@adacore.com>
8329         * a-cfdlli.adb, a-cfdlli.ads, a-cfhama.adb, a-cfhama.ads,
8330         a-cfhase.adb, a-cfhase.ads, a-cforma.adb, a-cforma.ads,
8331         a-cforse.adb, a-cforse.ads, a-cofove.adb, a-cofove.ads: Rename
8332         Left/Right to First_To_Previous/Current_To_Last.
8334 2014-02-24  Thomas Quinot  <quinot@adacore.com>
8336         * adaint.h (struct file_attributes): New component "error"
8337         (__gnat_error_attributes): Accessor for the above.
8338         * adaint.c (__gnat_error_attributes): New subprogram
8339         (__gnat_stat): Fix returned value (expect errno value)
8340         (__gnat_stat_to_attr): Add management of error component (set to
8341         stat errno value, except for missing files where it is set to 0,
8342         and exists is set to 0).
8343         * osint.ads (File_Attributes_Size): Update per change above,
8344         also clarify documentation.
8345         * s-filatt.ads: New file, binding to file attributes related
8346         functions.
8347         * Makefile.rtl (s-filatt): New runtime unit.
8348         * s-crtl.ads (strlen): Expose binding to GCC builtin (falls back
8349         to library function if not available on target).
8350         * s-os_lib.ads, s-os_lib.adb (Errno_Message): New subprogram.
8351         * s-oscons-tmplt.c (SIZEOF_struct_file_attributes,
8352         SIZEOF_struct_dirent_alloc): New constants.
8353         * Make-generated.in (s-oscons.ads): Now requires adaint.h.
8354         * a-direct.adb (Fetch_Next_Entry): Fix incorrect buffer sizes.
8355         Perform appropriate error checking if stat fails (do not just
8356         ignore existing files if stat fails)
8357         * gcc-interface/Make-lang.in (GNAT_ADA_OBJS, GNATBIND_OBJS): Update
8358         dependencies.
8360 2014-02-24  Hristian Kirtchev  <kirtchev@adacore.com>
8362         * sem_prag.adb (Analyze_Global_Item): Move the check concerning
8363         the use of volatile objects as global items in a function to
8364         the variable related checks section.
8365         * sem_util.adb (Async_Readers_Enabled): Directly call
8366         Has_Enabled_Property.
8367         (Async_Writers_Enabled): Directly call Has_Enabled_Property.
8368         (Effective_Reads_Enabled): Directly call Has_Enabled_Property.
8369         (Effective_Writes_Enabled): Directly call Has_Enabled_Property.
8370         (Has_Enabled_Property): Rename formal parameter State_Id to Item_Id.
8371         Update the comment on usage. State_Has_Enabled_Property how handles
8372         the original logic of the routine. Add processing for variables.
8373         (State_Has_Enabled_Property): New routine.
8374         (Variable_Has_Enabled_Property): New routine.
8376 2014-02-24  Robert Dewar  <dewar@adacore.com>
8378         * sinfo.ads, sem_ch12.adb, sem_res.adb, sem_ch4.adb, par-ch12.adb:
8379         Minor reformatting.
8380         * atree.ads, atree.adb (Node35): New function.
8381         (Set_Node35): New procedure.
8382         * debug.adb: Define new debug flag -gnatd.X.
8383         * einfo.ads, einfo.adb (Import_Pragma): New field.
8384         * freeze.adb (Wrap_Imported_Procedure): New procedure (not
8385         really active yet, has to be activated with -gnatd.X.
8386         * sem_prag.adb (Set_Imported): Set new Import_Pragma
8387         field (Set_Imported): Don't set Is_Public (see
8388         Freeze.Wrap_Imported_Subprogram)
8389         * par-ch3.adb (P_Component_List): Handle unexpected null component.
8391 2014-02-24  Yannick Moy  <moy@adacore.com>
8393         * sem_ch3.adb: Correct reference to SPARK RM in error messages.
8394         * gnat_rm.texi: Correct documentation of attribute Update.
8396 2014-02-24  Ed Schonberg  <schonberg@adacore.com>
8398         * sem_ch5.adb (Analyze_Iterator_Specification): Reject container
8399         iterator in older versions of Ada.
8401 2014-02-24  Gary Dismukes  <dismukes@adacore.com>
8403         * sem_ch5.adb, sem_aux.ads, sem_ch12.adb, gnat_ugn.texi, par.adb,
8404         par-ch12.adb: Change spelling 'parametrization' to 'parameterization'.
8406 2014-02-24  Ed Schonberg  <schonberg@adacore.com>
8408         * sinfo.ads, sinfo.adb: New attribute Generalized_Indexing, for
8409         indexed_components that are instances of Ada 2012 container
8410         indexing operations. Analysis and resolution of such nodes
8411         is performed on the attribute, and the original source is
8412         preserved for ASIS operations. If expansion is enabled, the
8413         indexed component is replaced by the value of this attribute,
8414         which is in a call to an Indexing aspect, in most case wrapped
8415         in a dereference operation.
8416         * sem_ch4.adb (Analyze_Indexed_Component): Create
8417         Generalized_Indexing attribute when appropriate.
8418         (Analyze_Call): If prefix is not overloadable and has an indexing
8419         aspect, transform into an indexed component so it can be analyzed
8420         as a potential container indexing.
8421         (Analyze_Expression): If node is an indexed component with a
8422         Generalized_ Indexing, do not re-analyze.
8423         * sem_res.adb (Resolve_Generalized_Indexing): Complete resolution
8424         of an indexed_component that has been transformed into a container
8425         indexing operation.
8426         (Resolve_Indexed_Component): Call the above when required.
8427         (Resolve): Do not insert an explicit dereference operation on
8428         an indexed_component whose type has an implicit dereference:
8429         the operation is inserted when resolving the related
8430         Generalized_Indexing.
8432 2014-02-24  Olivier Ramonat  <ramonat@adacore.com>
8434         * gnat_rm.texi, gnat_ugn.texi: Replace Ada Compiler by Ada Development
8435         Environment.
8437 2014-02-24  Hristian Kirtchev  <kirtchev@adacore.com>
8439         * sem_prag.adb (Check_Constituent_Usage): Remove leading spaces in
8440         error messages.
8441         (Inconsistent_Mode_Error): Remove leading spaces in error messages.
8442         Merge the expected and available mode errors.
8443         (Report_Unused_Constituents): Remove leading spaces in error messages.
8444         (Report_Unused_States): Remove leading spaces in error messages.
8446 2014-02-24  Thomas Quinot  <quinot@adacore.com>
8448         * par_sco.adb (Traverse_One): Refine categorization of statement
8449         SCOs.
8451 2014-02-24  Robert Dewar  <dewar@adacore.com>
8453         * aspects.ads, aspects.adb: Remove aspects Ada_2005 and Ada_2012,
8454         Pure_05, Pure_12 and Preelaborate_05.
8455         * gnat_rm.texi: Update accordingly.
8456         * sem_prag.adb: Document one argument form of Ada_05/Ada_2005
8457         pragmas Document one argument form of Ada_12/Ada_2012 pragmas
8458         Recognize one argument form of these pragmas only in GNAT mode
8459         (-gnatg).
8461 2014-02-24  Ed Schonberg  <schonberg@adacore.com>
8463         * s-dimmks.ads: Replace symbol for temperature, previously the
8464         Greek letter Theta, by the ASCII @ sign.
8465         * s-diflio.ads: ditto.
8467 2014-02-24  Robert Dewar  <dewar@adacore.com>
8469         * exp_ch4.adb: Minor code reorganization (use OR for boolean
8470         variables).
8471         * sem_ch3.adb, sem_prag.adb, freeze.adb: Minor reformatting.
8473 2014-02-24  Ben Brosgol  <brosgol@adacore.com>
8475         * gnat_ugn.texi, projects.texi: Added the necessary conditionalization
8476         so that references to gnatmem and ASIS tools do not appear in the FSF
8477         edition of the GNAT User's Guide.
8479 2014-02-24  Yannick Moy  <moy@adacore.com>
8481         * freeze.adb (Freeze_Entity): Do not issue warning
8482         for pre/post being ignored on imported subprogram in GNATprove
8483         mode.
8485 2014-02-24  Robert Dewar  <dewar@adacore.com>
8487         * exp_ch5.adb, sem_ch5.adb, sem_type.adb, sem_res.adb, sem_attr.adb,
8488         stand.ads, sem_eval.adb: Minor reformatting.
8490 2014-02-24  Yannick Moy  <moy@adacore.com>
8492         * sem_prag.adb: Minor rewording in error message.
8494 2014-02-24  Johannes Kanig  <kanig@adacore.com>
8496         * exp_util.adb (Expand_Subtype_From_Expr): Do not expand subtypes in
8497         GNATprove_mode, gnat2why doesn't need nor use these types.
8499 2014-02-24  Gary Dismukes  <dismukes@adacore.com>
8501         * exp_ch4.adb (Expand_N_Op_Expon): On the AAMP
8502         target, in the case of signed integer exponentiation that uses a
8503         run-time routine, always select the Exp_* versions, since overflow
8504         checking is automatically done by AAMP arithmetic instructions.
8506 2014-02-24  Hristian Kirtchev  <kirtchev@adacore.com>
8508         * sem_ch13.adb (Analyze_Aspect_Specifications):
8509         When the related context is a package instace, insert pragma
8510         Abstract_State after all internally-generated renamings related
8511         to the instance "header".
8513 2014-02-24  Ed Schonberg  <schonberg@adacore.com>
8515         * sem_ch3.adb (Analyze_Declarations): Analyze Contract of abstract
8516         subprograms.
8517         * sem_disp.adb (Check_Dispatching_Context): A non-dispatching
8518         call to an abstract subprogram is legal if it appears in a
8519         pre/postcondition of another abstract operation.
8521 2014-02-24  Sergey Rybin  <rybin@adacore.com frybin>
8523         * gnat_ugn.texi: Misc updates.
8525 2014-02-24  Hristian Kirtchev  <kirtchev@adacore.com>
8527         * exp_prag.adb (Expand_Old): Set the type of the generated temporary.
8529 2014-02-24  Gary Dismukes  <dismukes@adacore.com>
8531         * layout.adb (Layout_Variant_Record): Instantiate
8532         Generic_Check_Choices and call Check_Choices before calling
8533         Build_Discr_Checking_Funcs, since we need Others_Discrete_Choices
8534         set to prevent generating incorrect discriminant-checking
8535         functions for 'others' variants (functions that unconditionally
8536         return True rather than accounting for the values covered by the
8537         'others' choice).
8538         * sem_eval.ads (Subtypes_Statically_Compatible): Add formal
8539         Formal_Derived_Matching.
8540         (Subtypes_Statically_Match): Add formal Formal_Derived_Matching.
8541         * sem_eval.adb (Subtypes_Statically_Compatible): Pass new
8542         Formal_Derived_Matching formal to Subtypes_Statically_Match.
8543         (Subtypes_Statically_Match): Suppress the Object_Size matching
8544         test in the case where Formal_Derived_Matching is True.
8545         * sem_ch12.adb (Validate_Derived_Type_Instance): Pass
8546         True for Formal_Derived_Matching_Formal on the call to
8547         Subtypes_Statically_Compatible.
8549 2014-02-23  Eric Botcazou  <ebotcazou@adacore.com>
8551         * gcc-interface/Make-lang.in (ADA_TOOLS_FLAGS_TO_PASS): Robustify.
8553 2014-02-23  Eric Botcazou  <ebotcazou@adacore.com>
8555         * gcc-interface/utils2.c (build_simple_component_ref): Fix formatting.
8556         Look through a conversion between original and packable version to get
8557         the base object.
8558         (build_component_ref): Rework comment and fix formatting.
8560 2014-02-20  Sergey Rybin  <rybin@adacore.com frybin>
8562         * gnat_ugn.texi, vms_data.ads (gnatelim): Add description of
8563         project-specific options.
8565 2014-02-20  Ed Schonberg  <schonberg@adacore.com>
8567         * a-cbdlli.adb (Insert): When capacity exceeded, raise Capacity_Error,
8568         not Constraint_Error.
8569         * a-cbmutr.adb (Append_Child, Insert_Child, Prepend_Child): Ditto.
8570         * sem_ch5.adb: Code clean up.
8572 2014-02-20  Hristian Kirtchev  <kirtchev@adacore.com>
8574         * sem_prag.adb (Usage_Error): Remove local
8575         constant Typ. Remove the specialized diagnostics for unconstrained
8576         or tagged items as those are not part of the explicit input set
8577         of the related subprogram and should not be flagged.
8579 2014-02-20  Ed Schonberg  <schonberg@adacore.com>
8581         * sem_attr.adb: Add guard to preserve all errors.
8583 2014-02-20  Vincent Celier  <celier@adacore.com>
8585         * switch-m.adb (Normalize_Compiler_Switches): Take into account
8586         switches that are recorded in ALI files: -gnateA, -gnateE,
8587         -gnateF, -gnateinn, -gnateu, -gnateV and -gnateY.
8589 2014-02-20  Ed Schonberg  <schonberg@adacore.com>
8591         * sem_ch5.adb (Analyze_Iterator_Specification): Check legality
8592         of an element iterator form over a formal container with an
8593         Iterable aspect.
8594         * exp_ch5.adb (Build_Formal_Container_Iteration): Utility
8595         to create declaration and loop statements for both forms of
8596         container iterators.
8597         (Expand_Formal_Container_Element_Iterator): New procedure
8598         to handle loops of the form  "for E of C" when C is a formal
8599         container.
8600         (Expand_Formal_Container_Iterator): Code cleanup.
8602 2014-02-20  Hristian Kirtchev  <kirtchev@adacore.com>
8604         * sem_prag.adb (Add_Item_To_Name_Buffer): New routine.
8605         (Analyze_Contract_Case): Remove the use of
8606         "may". Replace "aspect Contract_Cases" to avoid categorization
8607         of aspect vs pragma.
8608         (Analyze_External_Property_In_Decl_Part): Remove the use of "formal".
8609         (Analyze_Global_Item): Remove
8610         the use of "formal", specify the subprogram.  Split the
8611         error message about a state with visible refinement into
8612         two. Remove the use of "global" from "volatile global item".
8613         (Analyze_Initialization_Item): Ensure that the SPARK RM reference
8614         is on one line.
8615         (Analyze_Input_Output): Update the call to
8616         Check_Mode. Specify the duplicated item. Reword the error
8617         message concerning an input of a null output list. Use "\"
8618         for error message continuation.
8619         (Analyze_Part_Of): Remove
8620         the use of "may". Use "\" for error message continuation.
8621         (Analyze_Refined_Depends_In_Decl_Part): Update the error
8622         message concerning a useless refinement to match the format
8623         of Refined_Global.
8624         (Analyze_Refined_Global_In_Decl_Part): Reword the error message
8625         concerning a useless refinement.
8626         (Analyze_Refinement_Clause): Use "\" for error message continuation.
8627         (Check_Constituent_Usage): Use "\" for error message continuation.
8628         (Check_Dependency_Clause): Use "\" for error message continuation.
8629         (Check_Matching_Constituent): Use "\" for error message continuation.
8630         (Check_Missing_Part_Of): Use "\" for error message continuation.
8631         (Check_Mode): Renamed to
8632         Check_Role. Update the comment on usage. Redo the error reporting
8633         to use Role_Error.
8634         (Check_Mode_Restriction_In_Enclosing_Context): Use "\" for error
8635         message continuation.
8636         (Find_Mode): Renamed to Find_Role. Update the parameter profile along
8637         with comment on usage. Update all occurrences of Is_Input and Is_Output.
8638         (Inconsistent_Mode_Error): Use "\" for error message continuation.
8639         (Input_Match): Use "\" for error message continuation.
8640         (Role_Error): New routine.
8641         (Set_Convention_From_Pragma): Use "\" for error message continuation.
8642         (Usage_Error): Add local variable Error_Msg. Build specialized error
8643         message showcasing the offending item kind. Redo the diagnostics for
8644         unconstrained types.
8646 2014-02-20  Ed Schonberg  <schonberg@adacore.com>
8648         * exp_util.adb (Is_Iterated_Container): Use high-level primitives
8649         to determine whether a type is a container type, rather than
8650         examining only its type declaration, so that subtypes and derived
8651         types are handled properly.
8653 2014-02-20  Sergey Rybin  <rybin@adacore.com frybin>
8655         * gnat_ugn.texi: gnatmetric: add description of project-specific
8656         options.
8658 2014-02-20  Ed Schonberg  <schonberg@adacore.com>
8660         * sem_attr.adb (Analyze_Attribute, case 'Update): Verify that
8661         all choices in an association for a record type have the same
8662         type, as is done for record aggregates.
8664 2014-02-20  Robert Dewar  <dewar@adacore.com>
8666         * a-cborma.adb, a-cbhama.adb, a-cbdlli.adb, a-cbmutr.adb: Use pragma
8667         Unmodified rather than Warnings (Off). Make comments
8668         uniform in the four affected units.
8670 2014-02-20  Robert Dewar  <dewar@adacore.com>
8672         * sem_ch13.adb (Analyze_Attribute_Definition_Clause, case
8673         Object_Size): For non-scalar types allow any value that is a
8674         multiple of 8.
8675         * gnat_rm.texi: Document Object_Size for composites more clearly.
8677 2014-02-20  Yannick Moy  <moy@adacore.com>
8679         * sem_util.ads, sem_util.adb (Default_Initialization): Remove function.
8681 2014-02-20  Ed Schonberg  <schonberg@adacore.com>
8683         * stand.ads: Raise_Type: new predefined entity, used as the type
8684         of a Raise_Expression prior to resolution.
8685         * cstand.adb: Build entity for Raise_Type.
8686         * sem_ch11.adb (Analyze_Raise_Expression): use Raise_Type as the
8687         initial type of the node.
8688         * sem_type.adb (Covers): Raise_Type is compatible with all
8689         other types.
8690         * sem_res.adb (Resolve): Remove special handling of Any_Type on
8691         Raise_Expression nodes.
8692         (Resolve_Raise_Expression): Signal ambiguity if the type of the
8693         context is still Raise_Type.
8695 2014-02-20  Robert Dewar  <dewar@adacore.com>
8697         * sem_ch12.adb (Validate_Access_Type_Instance): Add message if
8698         mismatching predicates.
8699         * sem_ch6.adb (Check_Conformance): Give better messages on
8700         predicate mismatch.
8701         * sem_eval.adb (Predicates_Match): Move to spec.
8702         * sem_eval.ads (Predicates_Match): Moved here from body.
8704 2014-02-20  Ed Schonberg  <schonberg@adacore.com>
8706         * a-cbmutr.adb: Use default value in Insert_Child.
8708 2014-02-20  Vincent Celier  <celier@adacore.com>
8710         * gnatcmd.adb, make.adb, prj-makr.adb, clean.adb: Call
8711         Stringt.Initialize in all project aware tools.
8713 2014-02-20  Doug Rupp  <rupp@adacore.com>
8715         * gnat_ugn.texi: Document gnatbind -X option.
8716         * vms_data.ads: Minor warnings documentation reformatting.
8718 2014-02-20  Ed Schonberg  <schonberg@adacore.com>
8720         * exp_ch3.adb (Expand_Freeze_Array_Type): Only create invariant
8721         procedure for a base type.
8723 2014-02-20  Robert Dewar  <dewar@adacore.com>
8725         * sem_ch4.adb (Analyze_Case_Expression): Get type from first
8726         expression with type info.
8727         * sem_ch13.adb: Minor reformatting.
8728         * sem_eval.adb (Subtypes_Statically_Match): Make sure we return
8729         False if predicates do not match on the two types.
8731 2014-02-20  Arnaud Charlet  <charlet@adacore.com>
8733         * sem_prag.adb (Analyze_Pragma [pragma Attach_Handler]):
8734         In Relaxed_RM_Semantics mode, allow any static integer value,
8735         for compatibility with other compilers.
8737 2014-02-20  Vincent Celier  <celier@adacore.com>
8739         * errutil.adb (Initialize): Properly initialize entry in table
8740         Warnings when warnings are suppressed.
8742 2014-02-20  Robert Dewar  <dewar@adacore.com>
8744         * s-os_lib.ads: Add warning about non-portability of Rename_File.
8745         * sem_util.ads, sem_util.adb (Is_Junk_Name): New function.
8746         * sem_warn.adb: Use Is_Junk_Name to suppress some warnings.
8747         * gnat_ugn.texi: Document no warnings on junk variable names.
8748         * layout.adb: Minor code reorganization (use Ekind_In).
8749         * stringt.adb: Move initialization of Null_String_Id to Initialize
8750         routine.
8752 2014-02-20  Ed Schonberg  <schonberg@adacore.com>
8754         * sem_ch13.adb: Initialize optional Element_Id.
8756 2014-02-20  Robert Dewar  <dewar@adacore.com>
8758         * s-os_lib.ads (Rename_File): Minor commment addition.
8760 2014-02-20  Thomas Quinot  <quinot@adacore.com>
8762         * einfo.ads: Minor reformatting.
8764 2014-02-20  Hristian Kirtchev  <kirtchev@adacore.com>
8766         * aspects.adb (Exchange_Aspects): New routine.
8767         * aspects.ads (Exchange_Aspects): New routine.
8768         * atree.adb (Rewrite): Do not check whether the save node has
8769         aspects as it never will, instead check the node about to be clobbered.
8770         * einfo.adb (Write_Field25_Name): Abstract_States can appear in
8771         entities of generic packages.
8772         * sem_ch6.adb (Analyze_Expression_Function): Fix the parent
8773         pointer of an aspect specification list after rewriting takes place.
8774         * sem_ch7.adb (Analyze_Package_Body_Helper): Swap the aspect
8775         specifications of the generic template and the copy used for analysis.
8776         * sem_ch12.adb (Analyze_Generic_Package_Declaration): Swap
8777         the aspect specifications of the generic template and the
8778         copy used for analysis.
8779         (Analyze_Package_Instantiation): Propagate the aspect specifications
8780         from the generic template to the instantiation.
8781         (Build_Instance_Compilation_Unit_Nodes): Propagate the aspect
8782         specifications from the generic template to the instantiation.
8783         * sem_ch13.adb (Analyze_Aspect_Specifications): Handle aspects
8784         Abstract_State, Initializes and Initial_Condition when they
8785         apply to a package instantiation.
8787 2014-02-20  Robert Dewar  <dewar@adacore.com>
8789         * stringt.adb: Add call to Initialize in package initialization.
8791 2014-02-20  Robert Dewar  <dewar@adacore.com>
8793         * a-crbtgk.adb, a-cihama.adb, a-coinve.adb, a-ciorse.adb, a-crbtgo.adb,
8794         a-cidlli.adb, a-cimutr.adb, a-cihase.adb, a-cohama.adb, a-coorse.adb,
8795         a-chtgke.adb, a-chtgop.adb, a-comutr.adb, a-ciorma.adb, a-cobove.adb,
8796         a-convec.adb, a-cohase.adb, a-chtgbk.adb, a-chtgbo.adb: Minor
8797         reformatting.
8799 2014-02-20  Bob Duff  <duff@adacore.com>
8801         * s-os_lib.ads: Minor: Remove incorrect comment.
8803 2014-02-20  Robert Dewar  <dewar@adacore.com>
8805         * sem_elab.adb (Check_Elab_Assign): Clearer warning message.
8807 2014-02-20  Ed Schonberg  <schonberg@adacore.com>
8809         * a-cborma.adb (Assign): When creating a node without a specified
8810         element, insert an uninitialized element in the map, because
8811         the instance may provide an element type with a default
8812         initialization, e.g a scalar with a Default_Value aspect.
8813         * a-cbhama.adb (Assign_Key): Remove useless Allocate procedure.
8814         (Insert): In the version without explicit element, provide an
8815         uninitialized element, as above.
8816         * a-cbdlli.adb (Append): In the version without explicit element,
8817         provide an uninitalized element, as above.
8818         (Allocate): Remove unused version.
8820 2014-02-20  Robert Dewar  <dewar@adacore.com>
8822         * sem_elab.adb: Minor code reorganization (use Nkind_In).
8823         * stringt.adb: Remove temporary pragma Warnings (Off).
8824         * stringt.ads: Add pragma Elaborate_Body to ensure initialization
8825         of Null_String_Id.
8827 2014-02-20  Matthew Heaney  <heaney@adacore.com>
8829         * a-chtgbk.adb (Replace): Use correct offset when calculating bucket
8830         index.
8832 2014-02-20  Ed Schonberg  <schonberg@adacore.com>
8834         * sem_ch5.adb (Analyze_Iterator_Specification): Initialize
8835         properly the cursor type for subsequent volatile testing in SPARK
8836         mode, when domain is a formal container with an Iterabe aspect.
8838 2014-02-20  Robert Dewar  <dewar@adacore.com>
8840         * errout.adb (Set_Warnings_Mode_Off): Add Reason argument.
8841         (Set_Specific_Warning_Off): Add Reason argument.
8842         * errout.ads (Set_Warnings_Mode_Off): Add Reason argument.
8843         (Set_Specific_Warning_Off): Add Reason argument.
8844         * erroutc.adb (Warnings_Entry): Add Reason field
8845         (Specific_Warning_Entry): Add Reason field.
8846         (Warnings_Suppressed): return String_Id for Reason.
8847         (Warning_Specifically_Suppressed): return String_Id for Reason.
8848         * erroutc.ads (Warnings_Entry): Add Reason field.
8849         (Specific_Warning_Entry): Add Reason field.
8850         (Set_Specific_Warning_Off): Add Reason argument.
8851         (Set_Warnings_Mode_Off): Add Reason argument.
8852         (Warnings_Suppressed): return String_Id for Reason.
8853         (Warning_Specifically_Suppressed): return String_Id for Reason.
8854         * errutil.adb (Warnings_Suppressed): returns String_Id for Reason
8855         (Warning_Specifically_Suppressed): returns String_Id for Reason
8856         * gnat_rm.texi: Document that Warning parameter is string literal
8857         or a concatenation of string literals.
8858         * par-prag.adb: New handling for Reason argument.
8859         * sem_prag.adb (Analyze_Pragma, case Warning): New handling
8860         for Reason argument.
8861         * sem_util.ads, sem_util.adb (Get_Reason_String): New procedure.
8862         * sem_warn.ads (Warnings_Off_Entry): Add reason field.
8863         * stringt.adb: Set Null_String_Id.
8864         * stringt.ads (Null_String_Id): New constant.
8866 2014-02-20  Robert Dewar  <dewar@adacore.com>
8868         * einfo.ads: Minor comment addition: Etype of package is
8869         Standard_Void_Type.
8870         * checks.adb, exp_aggr.adb, exp_atag.adb, exp_attr.adb, exp_ch13.adb,
8871         exp_ch2.adb, exp_ch3.adb, exp_ch4.adb, exp_ch5.adb, exp_ch6.adb,
8872         exp_ch7.adb, exp_ch9.adb, exp_dbug.adb, exp_disp.adb, exp_imgv.adb,
8873         exp_intr.adb, exp_prag.adb, exp_sel.adb, exp_strm.adb, exp_util.adb,
8874         freeze.adb, rtsfind.adb, sem_aggr.adb, sem_attr.adb, sem_ch10.adb,
8875         sem_ch12.adb, sem_ch13.adb, sem_ch3.adb, sem_ch4.adb, sem_ch5.adb,
8876         sem_ch6.adb, sem_ch8.adb, sem_dim.adb, sem_prag.adb, sem_res.adb,
8877         sem_util.adb, tbuild.adb, tbuild.ads: Remove New_Reference_To.
8878         Replace all calls with calls to New_Occurrence_Of.
8880 2014-02-20  Robert Dewar  <dewar@adacore.com>
8882         * par-util.adb (Ignore, case of right paren): Make this a
8883         serious error.
8885 2014-02-19  Robert Dewar  <dewar@adacore.com>
8887         * sem_ch5.adb, sem_prag.adb, sem_attr.adb: Minor reformatting.
8888         * debug.adb: Remove -gnatd.X switch, no longer used.
8889         * styleg.adb (Check_Then): Remove check of -gnatd.X, check is
8890         now always made.
8892 2014-02-19  Bob Duff  <duff@adacore.com>
8894         * g-socket.ads: Minor: Correct some comments.
8896 2014-02-19  Ed Schonberg  <schonberg@adacore.com>
8898         * sem_ch5.adb: Inhibit iterator rewriting in ASIS mode.
8900 2014-02-19  Arnaud Charlet  <charlet@adacore.com>
8902         * sem_ch13.adb (Analyze_Aspect_Specifications): Do not generate
8903         an error on out of range priorities if Relaxed_RM_Semantics.
8904         * sem_prag.adb (Analyze_Pragma): Ditto.
8906 2014-02-19  Bob Duff  <duff@adacore.com>
8908         * sem_attr.adb (Resolve_Attribute): Detect the case of F'Access
8909         where F denotes the renaming of an enumeration literal, and
8910         issue a specialized error message.
8912 2014-02-19  Matthew Heaney  <heaney@adacore.com>
8914         * a-chtgop.ads (Checked_Index): New operation.
8915         (Next): Changed mode of hash table.
8916         * a-chtgop.adb (Adjust, Delete_Node_Sans_Free): Detect tampering
8917         (Generic_Read, Reserve_Capacity): Ditto.
8918         (Generic_Equal): Detect tampering.
8919         (Next): Changed mode of hash table, detect tampering.
8920         * a-chtgke.ads (Checked_Index, Checked_Equivalent_Keys): New
8921         operation.
8922         (Find): Changed mode of hash table.
8923         * a-chtgke.adb (Checked_Equivalent_Keys): New operation
8924         (Delete_Key_Sans_Free, Generic_Conditional_Insert): Detect
8925         tampering.
8926         (Find): Changed mode of hash table, check for tampering.
8927         (Generic_Replace_Element): Check for tampering.
8928         * a-chtgbk.ads (Checked_Index, Checked_Equivalent_Keys): New operation.
8929         * a-chtgbk.adb (Checked_Index, Checked_Equivalent_Keys): New
8930         operation (Delete_Key_Sans_Free, Generic_Conditional_Insert):
8931         Detect tampering.
8932         (Find, Generic_Replace_Element): Check for tampering.
8933         * a-chtgbo.ads (Checked_Index): New operation.
8934         * a-chtgbo.adb (Checked_Index): New operation
8935         (Delete_Node_Sans_Free, Generic_Equal): Detect tampering.
8936         (Generic_Read, Next): Ditto.
8937         * a-cohase.adb, a-cihase.adb (Is_In): Changed mode of hash
8938         table (Difference, Intersection): Use variable view of
8939         source, detect tampering (Find, Is_Subset, Overlap): Use
8940         variable view of container (Symmetric_Difference, Union):
8941         Detect tampering (Vet): Use Checked_Index to detect tampering
8942         (Constant_Reference, Element, Find): Use variable view of
8943         container.
8944         (Update_Element_Preserving_Key): Detect tampering.
8945         * a-cbhase.adb (Difference, Find, Is_In): Use variable view
8946         of container.
8947         (Is_Subset): Ditto.
8948         (Equivalent_Sets, Overlap): Use Node's Next component.
8949         (Vet): Use Checked_Index to detect tampering.
8950         (Constant_Reference, Element, Find): Use variable view of container.
8951         (Update_Element_Preserving_Key): Detect tampering.
8952         * a-cohama.adb, a-cihama.adb, a-cbhama.adb (Constant_Reference,
8953         Element, Find): Use variable view of container.
8954         (Reference): Rename hash table component.
8955         (Vet): Use Checked_Index to detect tampering.
8957 2014-02-19  Arnaud Charlet  <charlet@adacore.com>
8959         * adabkend.adb (Scan_Compiler_Arguments): Add missing handling
8960         of -nostdinc.
8962 2014-02-19  Thomas Quinot  <quinot@adacore.com>
8964         * tbuild.adb (New_Occurrence_Of, New_Rerefence_To): Guard
8965         against calls without Def_Id.
8967 2014-02-19  Claire Dross  <dross@adacore.com>
8969         * a-cfdlli.ads, a-cfhase.ads, a-cforma.ads, a-cfhama.ads, a-cforse.ads,
8970         a-cofove.ads: Add global annotations to subprograms.
8972 2014-02-19  Hristian Kirtchev  <kirtchev@adacore.com>
8974         * sem_prag.adb (Analyze_Initial_Condition_In_Decl_Part): Remove
8975         constants Errors, Pack_Id and Pack_Init. Remove variable Vars.
8976         Initial_Condition no longer requires the presence of pragma
8977         Initialized. Do not try to diagnose whether all variables mentioned in
8978         pragma Initializes also appear in Initial_Condition.
8979         (Collect_Variables): Removed.
8980         (Match_Variable): Removed.
8981         (Match_Variables): Removed.
8982         (Report_Unused_Variables): Removed.
8984 2014-02-19  Thomas Quinot  <quinot@adacore.com>
8986         * gnat_rm.texi (pragma Stream_Convert): Minor rewording.
8988 2014-02-19  Robert Dewar  <dewar@adacore.com>
8990         * sem_util.adb, sem_util.ads, prj-conf.adb, s-os_lib.adb: Minor
8991         reformatting.
8993 2014-02-19  Vincent Celier  <celier@adacore.com>
8995         * prj-part.adb (Parse_Single_Project): Use the fully resolved
8996         project path, with all symbolic links resolved, to check if the
8997         same project is imported with a different unresolved path.
8998         * prj-tree.ads (Project_Name_And_Node): Component Canonical_Path
8999         changed to Resolved_Path to reflect that all symbolic links
9000         are resolved.
9002 2014-02-19  Ed Schonberg  <schonberg@adacore.com>
9004         * sem_util.ads, sem_util.adb (Get_Cursor_Type): Moved to sem_util
9005         from sem_ch13, for use elsewhere.
9006         * sem_ch13.adb (Get_Cursor_Type): Moved to sem_util.
9007         * sem_ch5.adb (Analyze_Iterator_Specification): Set properly the
9008         cursor type on the loop variable when the iteration is over o
9009         formal container.
9011 2014-02-19  Vincent Celier  <celier@adacore.com>
9013         * prj-conf.adb (Add_Default_GNAT_Naming_Scheme): Add declaration
9014         for an empty Target (Check_Target): Never fail when an empty
9015         target is declared in the configuration project.
9017 2014-02-19  Ed Schonberg  <schonberg@adacore.com>
9019         * sem_prag.adb (Check_Arg_Is_Local_Name): Argument is local if
9020         the pragma comes fron a predicate aspect and the context is a
9021         record declaration within the scope that declares the type.
9023 2014-02-19  Robert Dewar  <dewar@adacore.com>
9025         * gnat_rm.texi: Minor clarifications.
9026         * expander.adb, sem_aggr.adb: Add comments.
9028 2014-02-19  Ed Schonberg  <schonberg@adacore.com>
9030         * sem_prag.adb (Check_Arg_Is_Local_Name): For an aspect that
9031         applies to a subprogram body, the name is the current scope,
9032         rather than being declared in the current scope.
9033         (Analyze_Pragma, case No_Return): Handle properly a No_Return
9034         aspect applied to a subprogram body.
9036 2014-02-19  Ed Schonberg  <schonberg@adacore.com>
9038         * sem_ch13.adb (Resolve_Iterable_Operation): Improve resolution
9039         of overloaded subprograms, and fix bug in handling of primitive
9040         operation Element.
9042 2014-02-19  Pascal Obry  <obry@adacore.com>
9044         * s-os_lib.adb: Minor reformatting.
9046 2014-02-19  Yannick Moy  <moy@adacore.com>
9048         * expander.adb (Expand): Do nothing inside generics.
9049         * sem_aggr.adb (Aggregate_Constraint_Checks): Do nothing inside
9050         generics.
9052 2014-02-19  Yannick Moy  <moy@adacore.com>
9054         * exp_ch2.adb: Remove useless 'with' of unit Uintp.
9056 2014-02-19  Robert Dewar  <dewar@adacore.com>
9058         * sem_ch3.adb, style.adb, sem_prag.adb, sem_ch13.adb: Minor reformatting
9059         * a-sequio.adb: Remove useless pragma Extensions_Allowed (no
9060         longer needed).
9062 2014-02-19  Claire Dross  <dross@adacore.com>
9064         * a-cfdlli.ads, a-cfhase.ads, a-cforma.ads, a-cfhama.ads,
9065         a-cforse.ads, a-cofove.ads: Add Iterable aspect to formal containers.
9067 2014-02-19  Hristian Kirtchev  <kirtchev@adacore.com>
9069         * sem_ch3.adb (Analyze_Declarations): Analyze
9070         a package contract at the end of the private declarations (if
9071         applicable), otherwise analyze it and the end of the visible
9072         declarations.
9074 2014-02-19  Ed Schonberg  <schonberg@adacore.com>
9076         * style.adb (Missing_Overriding): If subprogram is an
9077         instantiation, place warning on the instance node itself,
9078         without mention of the original generic. Do not emit message
9079         if explicit Ada version is older than the introduction of the
9080         overriding indicator.
9082 2014-02-19  Yannick Moy  <moy@adacore.com>
9084         * gnat_rm.texi: Doc clarifications.
9086 2014-02-19  Yannick Moy  <moy@adacore.com>
9088         * exp_util.adb (Remove_Side_Effects): Do not remove side-effects
9089         inside a generic.
9091 2014-02-19  Ed Schonberg  <schonberg@adacore.com>
9093         * sem_ch13.adb (Get_Cursor_Type): Obtain cursor type from
9094         specified First primitive, rather than by name.
9095         (Validate_Iterable_Aspect, Resolve_Iterable_Operation): Use it,
9096         and extend error checking for missing primitives and incorrect
9097         signatures.
9099 2014-02-19  Ed Schonberg  <schonberg@adacore.com>
9101         * sem_ch3.adb (Check_Pragma_Implemented): Detect additional
9102         errors when a Synchronization aspect on an overriding protected
9103         operation does not match the given aspect on the overridden
9104         operation of an ancestor interface.
9106 2014-02-19  Hristian Kirtchev  <kirtchev@adacore.com>
9108         * sem_prag.adb (Check_Loop_Pragma_Grouping): New routine.
9109         (Check_Loop_Pragma_Placement): Update
9110         comment on usage. Remove local variables Orig_Stmt and
9111         Within_Same_Sequence. Check that the current Loop_Invariant or
9112         Loop_Variant pragma is grouped together with other such pragmas.
9113         (Is_Loop_Pragma): New routine.
9114         (Prev_In_Loop): Removed.
9116 2014-02-19  Robert Dewar  <dewar@adacore.com>
9118         * par-ch6.adb (P_Return): For extended return, end column lines
9119         up with RETURN.
9120         * par.adb: Minor documentation clarification.
9122 2014-02-19  Yannick Moy  <moy@adacore.com>
9124         * sem_prag.adb (Check_Loop_Pragma_Placement): Add check
9125         that Loop_Invariant and Loop_Variant appear consecutively.
9126         * gnat_rm.texi Update documentation of Loop_Invariant and
9127         Loop_Variant pragmas.
9129 2014-02-19  Robert Dewar  <dewar@adacore.com>
9131         * debug.adb: Document -gnatd.X.
9132         * par-ch5.adb (P_If_Statement): Always check THEN, even if not
9133         first token
9134         (Check_Then_Column): Ditto.
9135         * styleg.adb (Check_Then): Allow THEN on line after IF.
9136         (Check_Then): Check THEN placement under control of -gnatd.X
9137         * styleg.ads (Check_Then): Now called even if THEN is not first
9138         token on line.
9139         * stylesw.ads (Style_Check_If_Then_Layout): Document new
9140         relaxed rules.
9141         * gnat_ugn.texi: For -gnatyi, THEN can now be on line after IF.
9143 2014-02-19  Robert Dewar  <dewar@adacore.com>
9145         * a-cfhama.adb, a-cfhase.adb, a-cforse.adb, a-cofove.adb, a-ngcefu.adb,
9146         a-teioed.adb, a-wtedit.adb, a-ztedit.adb, exp_ch5.adb, inline.adb,
9147         prj-pp.adb, prj-tree.adb, sem_ch12.adb, sem_ch8.adb,
9148         vms_conv.adb: Fix bad layout of IF statements
9150 2014-02-19  Robert Dewar  <dewar@adacore.com>
9152         * exp_util.adb (Side_Effect_Free): Scalar if expressions can be SEF.
9154 2014-02-19  Robert Dewar  <dewar@adacore.com>
9156         * exp_util.adb: Update comments.
9158 2014-02-19  Doug Rupp  <rupp@adacore.com>
9160         * bindgen.adb (Gen_Adainit) [VMS] New global Float_Format.
9161         * init.c (__gl_float_format): [VMS] New global.
9162         (__gnat_set_features): Call FP_CONTROL to set FPSR for the float
9163         representation in effect.
9165 2014-02-19  Hristian Kirtchev  <kirtchev@adacore.com>
9167         * exp_ch6.adb Add with and use clause for Exp_Prag.
9168         (Expand_Contract_Cases): Relocated to Exp_Prag.
9169         * exp_ch6.ads (Expand_Contract_Cases): Relocated to Exp_Prag.
9170         * exp_prag.adb Add with and use clauses for Checks and Validsw.
9171         (Expand_Contract_Cases): Relocated from Exp_Ch6. Update the
9172         structure of the expanded code to showcase the evaluation of
9173         attribute 'Old prefixes. Add local variable Old_Evals. Expand
9174         any attribute 'Old references found within a consequence. Add
9175         circuitry to evaluate the prefixes of attribute 'Old that
9176         belong to a selected consequence.
9177         (Expand_Old_In_Consequence): New routine.
9178         * exp_prag.ads (Expand_Contract_Cases): Relocated from Exp_Ch6.
9179         * sem_attr.adb (Check_Use_In_Contract_Cases): Warn that a
9180         potentially unevaluated prefix is always evaluated.
9182 2014-02-19  Robert Dewar  <dewar@adacore.com>
9184         * exp_attr.adb (Expand_Min_Max_Attribute): Use Insert_Declaration
9185         (Expand_Min_Max_Attribute): Use Matching_Standard_Type.
9186         * exp_ch4.adb (Expand_N_Expression_With_Actions): Remove special
9187         handling for the case of Modify_Tree_For_C, this approach did
9188         not work.
9189         * exp_util.adb (Matching_Standard_Type): New function
9190         (Side_Effect_Free): New top level functions (from
9191         Remove_Side_Effects).
9192         * exp_util.ads (Side_Effect_Free): New top level functions
9193         (moved from body).
9194         * sinfo.ads: Minor comment updates.
9196 2014-02-19  Ed Schonberg  <schonberg@adacore.com>
9198         * exp_ch6.adb (Expand_Simple_Function_Return): If return
9199         type is unconstrained and uses the secondary stack, mark the
9200         enclosing function accordingly, to ensure that the value is not
9201         prematurely removed.
9203 2014-02-19  Hristian Kirtchev  <kirtchev@adacore.com>
9205         * par.adb Alphabetize the routines in Par.Sync.
9206         (Resync_Past_Malformed_Aspect): New routine.
9207         * par-ch13.adb (Get_Aspect_Specifications): Alphabetize local
9208         variables. Code and comment reformatting. Detect missing
9209         parentheses on aspects [Refined_]Global and [Refined_]Depends
9210         with a non-null definition.
9211         * par-sync.adb: Alphabetize all routines in this separate unit.
9212         (Resync_Past_Malformed_Aspect): New routine.
9214 2014-02-19  Robert Dewar  <dewar@adacore.com>
9216         * sem_eval.ads, sem_eval.adb (Subtypes_Statically_Match): Return False
9217         if Esize values do not match.
9219 2014-02-19  Yannick Moy  <moy@adacore.com>
9221         * sinfo.ads: Minor comment update.
9223 2014-02-19  Hristian Kirtchev  <kirtchev@adacore.com>
9225         * atree.ads: Minor reformatting (change Entity_Info to Einfo).
9227 2014-02-19  Thomas Quinot  <quinot@adacore.com>
9229         * exp_ch7.adb (Find_Node_To_Be_Wrapped): An assignment statement
9230         that has the No_Ctrl_Actions flag is a suitable node to be
9231         wrapped if the assigned expression has no finalization actions.
9232         * sem_eval.adb (Eval_Entity_Name): For a compile time known
9233         boolean value, mark the corresponding condition SCO as constant.
9235 2014-02-19  Robert Dewar  <dewar@adacore.com>
9237         * exp_util.adb: Minor reformatting.
9238         * exp_util.ads (Matching_Standard_Type): New function.
9239         * exp_ch7.adb: Minor reformatting.
9241 2014-02-19  Ed Schonberg  <schonberg@adacore.com>
9243         * sem_ch13.adb (Get_Cursor_Type): Use scope of iterable type
9244         to find declaration for Cursor, to handle properly the case of
9245         a discriminated iterable type.
9247 2014-02-19  Vincent Celier  <celier@adacore.com>
9249         * gnatcmd.adb (GNATCmd): Always replace the object dirs of
9250         imported library projects with the library ALI dirs, when setting
9251         the object paths.
9252         * prj-env.ads (Ada_Objects_Path): Correct comments about
9253         argument Including_Libraries.
9255 2014-02-19  Gary Dismukes  <dismukes@adacore.com>
9257         * gnat_rm.texi: Minor spelling fixes.
9259 2014-02-19  Doug Rupp  <rupp@adacore.com>
9261         * init.c: Remove unneeded code.
9262         * fe.h (Float_Format): New macro
9263         * gcc-interface/trans.c (gigi): On VMS, set vms_float_format.
9265 2014-02-19  Hristian Kirtchev  <kirtchev@adacore.com>
9267         * sem_prag.adb (Check_Refined_Global_Item):
9268         A state or variable acts as a constituent only it is part of an
9269         encapsulating state and the state has visible refinement.
9271 2014-02-19  Ed Schonberg  <schonberg@adacore.com>
9273         * sem_ch6.adb (Analyze_Subprogram_Contract): Do not warn on a
9274         postcondition for a function when the expression does not mention
9275         'Result but the function has in-out parameters.
9277 2014-02-19  Robert Dewar  <dewar@adacore.com>
9279         * gnat_rm.texi: Add documentation on Value_Size forcing biased
9280         representation.
9282 2014-02-19  Hristian Kirtchev  <kirtchev@adacore.com>
9284         * lib-xref.ads Remove the small table of letter and symbol usage as we
9285         already have one.
9287 2014-02-19  Hristian Kirtchev  <kirtchev@adacore.com>
9289         * sem_ch6.adb (Analyze_Subprogram_Body_Helper): Emit specific error
9290         messages depending on the offending misplaced aspect specifications.
9291         (Diagnose_Misplaced_Aspect_Specifications): New routine.
9293 2014-02-19  Ed Schonberg  <schonberg@adacore.com>
9295         * sem_ch13.adb (Get_Cursor): Utility to retrieve cursor type
9296         for iterable aspect primitives.
9297         (Resolve_Iterable_Operation): Use expected signature of iterable
9298         aspect to resolve primitive when overloading is present.
9299         (Validate_Iterable_Aspect, Analyze_Aspects_At_Freeze_Point): use it.
9300         (Check_Signature): Removed.
9302 2014-02-19  Yannick Moy  <moy@adacore.com>
9304         * sem_ch10.adb (Analyze_Proper_Body): Issue error on missing
9305         subunit in GNATprove_Mode.
9306         * sinfo.ads (GNATprove_Mode): Document error issued in GNATprove_Mode.
9308 2014-02-19  Hristian Kirtchev  <kirtchev@adacore.com>
9310         * lib-xref.ads Alphabetize the contents of table
9311         Xref_Entity_Letters. Add an entry in table Xref_Entity_Letters
9312         for E_Abstract_State. List all letters and symbols in use.
9313         * sem_prag.adb (Analyze_Abstract_State): Update all calls
9314         to Create_Abstract_State to reflect the new signature.
9315         (Create_Abstract_State): Change subprogram profile and update
9316         the comment on usage. Use the proper location of the state
9317         declaration when creating a new abstract state entity. Do not
9318         generate an external name, but simply reuse the name coming from
9319         the state declaration.
9321 2014-02-19  Robert Dewar  <dewar@adacore.com>
9323         * exp_ch4.adb (Expand_N_Expression_With_Actions): Make sure
9324         declarations get properly inserted in Modify_Tree_For_C mode.
9325         * sinfo.ads: Minor comment addition.
9327 2014-02-19  Robert Dewar  <dewar@adacore.com>
9329         * par-ch9.adb, exp_ch5.adb, sem_ch5.adb, exp_attr.adb, sem_util.adb,
9330         sem_util.ads, sem_ch13.adb, sem_ch13.ads: Minor reformatting.
9332 2014-02-19  Ed Schonberg  <schonberg@adacore.com>
9334         * style.adb (Missing_Overriding): Warning does not apply in
9335         language versions prior to Ada 2005.
9336         * snames.ads-tmpl: Add Name_Iterable and Attribute_Iterable.
9337         * sem_attr.adb: Add Attribute_Iterable where needed.
9338         * exp_attr.adb: ditto.
9339         * exp_ch5.adb (Expand_Formal_Container_Loop): New procedure to
9340         handle loops and quantified expressions over types that have an
9341         iterable aspect.  Called from Expand_Iterator_Loop.
9342         * sem_ch5.adb (Analyze_Iterator_Specification): Recognize types
9343         with Iterable aspect.
9344         * sem_ch13.adb (Validate_Iterable_Aspect): Verify that the
9345         subprograms specified in the Iterable aspect have the proper
9346         signature involving container and cursor.
9347         (Check_Aspect_At_Freeze_Point): Analyze value of iterable aspect.
9348         * sem_ch13.ads (Validate_Iterable_Aspect): New subprogram.
9349         * sem_util.ads, sem_util.adb (Get_Iterable_Type_Primitive):
9350         New procedure to retrieve one of the primitives First, Last,
9351         or Has_Element, from the value of the iterable aspect of a
9352         formal container.
9353         (Is_Container_Element): Predicate to recognize expressions
9354         that denote an element of one of the predefined containers,
9355         for possible optimization.  This subprogram is not currently
9356         used, pending ARG discussions on the legality of the proposed
9357         optimization. Worth preserving for eventual use.
9358         (Is_Iterator): Recognize formal container types.
9359         * aspects.ads, aspects.adb: Add Aspect_Iterable where needed.
9361 2014-02-19  Robert Dewar  <dewar@adacore.com>
9363         * exp_attr.adb (Expand_Min_Max_Attribute): New procedure
9364         (Expand_N_Attribute_Reference): Use this procedure for Min and Max.
9365         * exp_ch4.adb (Expand_N_Expression_With_Actions): Remove object
9366         declarations from list of actions.
9367         * output.ads, output.adb (Delete_Last_Char): New procedure.
9368         * sinfo.ads: Document handling of Mod and expression with actions
9369         in Modify_Tree_For_C mode.
9371 2014-02-19  Ed Schonberg  <schonberg@adacore.com>
9373         * par-ch9.adb (P_Task): Add a null statement to produce a
9374         well-formed task body when due to a previous syntax error the
9375         statement list is empty.
9377 2014-02-19  Hristian Kirtchev  <kirtchev@adacore.com>
9379         * sem_prag.adb (Check_Dependency_Clause): Account
9380         for the case where a state with a non-null refinement matches a
9381         null output list. Comment reformatting.
9382         (Inputs_Match): Copy a solitary input to avoid an assertion failure
9383         when trying to match the same input in multiple clauses.
9385 2014-02-19  Gary Dismukes  <dismukes@adacore.com>
9387         * sem_attr.adb: Minor typo fix.
9389 2014-02-18  Robert Dewar  <dewar@adacore.com>
9391         * cstand.adb (Build_Signed_Integer_Type): Minor change of formal
9392         from Int to Nat (Build_Unsigned_Integer_Type): New procedure
9393         (Create_Standard): Create new unsigned types.
9394         * exp_ch4.adb (Expand_N_Op_Mod): Expand mod in Modify_Tree_For_C
9395         mode (Expand_N_Reference): Removed, problematic and not needed
9396         for now.
9397         * exp_ch4.ads (Expand_N_Reference): Removed, problematic and
9398         not needed for now.
9399         * exp_util.ads, exp_util.adb (Power_Of_Two): New function.
9400         * expander.adb: Remove call to Expand_N_Reference (problematic,
9401         and not needed now).
9402         * sem_aux.ads, sem_aux.adb (Corresponding_Unsigned_Type): New function.
9403         * stand.adb: Read and write unsigned type entities.
9404         * stand.ads: Add new unsigned types.
9406 2014-02-18  Hristian Kirtchev  <kirtchev@adacore.com>
9408         * sem_ch4.adb (Analyze_Call): Do not mark a function call
9409         as being inside an assertion expression as the flag is now removed.
9410         (Check_Ghost_Subprogram_Call): Do not query the
9411         In_Assertion_Expression flag as it is now removed, instead use
9412         a predicate function.
9413         * sem_elab.adb (Check_Internal_Call_Continue): Do not query the
9414         In_Assertion_Expression flag as it is now removed, instead use
9415         a predicate function.
9416         * sem_prag.ads: Add new table Assertion_Expression_Pragma.
9417         * sem_util.adb Add with and use clause for Sem_Prag.
9418         (In_Assertion_Expression_Pragma): New routine.
9419         * sem_util.ads (In_Assertion_Expression_Pragma): New routine.
9420         * sinfo.adb (In_Assertion_Expression): Removed.
9421         (Set_In_Assertion_Expression): Removed.
9422         * sinfo.ads Remove flag In_Assertion_Expression along with its
9423         use in nodes.
9424         (In_Assertion_Expression): Removed along with
9425         pragma Inline.  (Set_In_Assertion_Expression): Removed along
9426         with pragma Inline.
9428 2014-02-18  Sergey Rybin  <rybin@adacore.com frybin>
9430         * gnat_ugn.texi: gnatpp section: add note that '-j' cannot be
9431         used together with '-r', '-rf' or '-rnb' options.
9433 2014-02-18  Hristian Kirtchev  <kirtchev@adacore.com>
9435         * sem_attr.adb (Analyze_Attribute): Comment
9436         and code reformatting. Use separate routines to check the
9437         legality of attribute 'Old in certain pragmas. Verify
9438         the use of 'Old, 'Result and locally declared entities
9439         within the prefix of 'Old.
9440         (Check_References_In_Prefix): New routine.
9441         (Check_Use_In_Contract_Cases): New routine.
9442         (Check_Use_In_Test_Case): New routine.
9444 2014-02-18  Vincent Celier  <celier@adacore.com>
9446         * sem_aux.adb (Is_By_Reference_Type): For each components of
9447         a record type, check also if the component is volatile as it
9448         may have an aspect that makes it volatile. If it is, then the
9449         record type is a by reference type.
9451 2014-02-18  Robert Dewar  <dewar@adacore.com>
9453         * exp_attr.adb: Minor reformatting.
9454         * exp_ch4.ads, exp_ch4.adb (Expand_N_Reference): New procedure.
9455         * exp_util.adb (Remove_Side_Effects): Add conditional expressions
9456         as another case where we don't generate N_Reference nodes for
9457         primitive types.
9458         * expander.adb (Expand): Add call to Expand_N_Reference.
9460 2014-02-06  Hristian Kirtchev  <kirtchev@adacore.com>
9462         * sem_prag.adb (Analyze_Refined_Pragma): Remove
9463         local variable Pack_Spec. Refinement pragmas may now apply to
9464         bodies of both visible and private subprograms.
9466 2014-02-06  Robert Dewar  <dewar@adacore.com>
9468         * exp_attr.adb (Expand_Loop_Entry_Attribute):
9469         Minor change (Attr => N) (Expand_Pred_Succ): New name
9470         Expand_Pred_Succ_Attribute (Expand_N_Attribute_Reference, case
9471         Max): Expand into if expression if Modify_Tree_For_C mode.
9472         (Expand_N_Attribute_Reference, case Min): ditto
9473         * sinfo.ads: Modify_Tree_For_C takes care of expanding Min and
9474         Max attributes.
9476 2014-02-06  Ed Schonberg  <schonberg@adacore.com>
9478         * sem_ch3.adb (Analyze_Object_Declaration): Do not generate
9479         predicate check if this is an internal declaration with
9480         No_Initialization set, as for an expanded aggregate component.
9482 2014-02-06  Doug Rupp  <rupp@adacore.com>
9484         * init.c (__gnat_default_resignal_p) [VMS]: Test for and resignal
9485         conditions with severity of "SUCCESS" or "INFORMATIONAL".
9487 2014-02-06  Yannick Moy  <moy@adacore.com>
9489         * sem_prag.adb (Analyze_Pragma): Analyze pragma
9490         Debug rewritten node before rewriting it as a null statement in
9491         GNATprove mode.
9493 2014-02-06  Robert Dewar  <dewar@adacore.com>
9495         * sem_attr.adb (Min_Max): New procedure.
9496         (Max_Alignment_For_Allocation_Max_Size_In_Storage_Elements): New
9497         procedure.
9499 2014-02-06  Sergey Rybin  <rybin@adacore.com frybin>
9501         * gnat_ugn.texi, vms_data.ads: Add documentation of '-t' option for
9502         gnatmetric/gnatpp.
9504 2014-02-06  Hristian Kirtchev  <kirtchev@adacore.com>
9506         * sem_prag.adb (Analyze_Abstract_State): Update
9507         all calls to Create_Abstract_State to pass the proper state
9508         "declaration".
9509         (Create_Abstract_State): Add new formal parameter
9510         State_Decl along with comment on usage. Establish a link between
9511         the abstract state entity and the state declaration.
9513 2014-02-06  Robert Dewar  <dewar@adacore.com>
9515         * sem_attr.adb (Analyze_Attribute, case Max): Check for improper
9516         comparison of unordered enumeration type.
9517         (Analyze_Attribute, case Max): Check for improper comparison of
9518         unordered enumeration type.
9519         * sem_res.adb (Bad_Unordered_Enumeration_Reference): Moved to
9520         sem_util.adb.
9521         * sem_util.ads, sem_util.adb (Bad_Unordered_Enumeration_Reference):
9522         Moved here from Sem_Res.
9524 2014-02-06  Robert Dewar  <dewar@adacore.com>
9526         * sem_ch3.adb, sem_prag.adb, sem_res.adb, lib-xref.adb: Minor
9527         reformatting.
9529 2014-02-06  Hristian Kirtchev  <kirtchev@adacore.com>
9531         * sem_ch6.adb (Process_Formals): Error message reformatting.
9533 2014-02-06  Hristian Kirtchev  <kirtchev@adacore.com>
9535         * sem_ch3.adb (Handle_Late_Controlled_Primitive): Add local
9536         variable Spec. Do not inherit the null indicator from the
9537         subprogram body when generating the spec.
9539 2014-02-06  Robert Dewar  <dewar@adacore.com>
9541         * casing.adb (Determine_Casing): Consider SPARK_Mode to be
9542         mixed case.
9544 2014-02-06  Ed Schonberg  <schonberg@adacore.com>
9546         * exp_ch6.adb (Is_Build_In_Place_Function): Predicate is false
9547         when the function has a foreign convention, but not if only the
9548         limited return type has such a convention.
9550 2014-02-06  Hristian Kirtchev  <kirtchev@adacore.com>
9552         * sem_ch3.adb (Handle_Late_Controlled_Primitive): Remove local
9553         variable Spec. Comment reformatting. Use Copy_Separate_Tree
9554         rather than New_Copy_Tree when building the corresponding
9555         subprogram declaration.
9557 2014-02-06  Hristian Kirtchev  <kirtchev@adacore.com>
9559         * sem_prag.adb (Analyze_Global_Item): Remove
9560         the mode-related checks on abstract states with enabled external
9561         properties.
9562         (Property_Error): Removed.
9564 2014-02-06  Javier Miranda  <miranda@adacore.com>
9566         * lib-xref.adb (Generate_Reference): When
9567         generating the reference to the first private entity take care
9568         of handling swapped entities.
9570 2014-02-06  Sergey Rybin  <rybin@adacore.com frybin>
9572         * gnat_ugn.texi, vms_data.ads: Add documentation of -j option for
9573         gnatmetric.
9575 2014-02-06  Robert Dewar  <dewar@adacore.com>
9577         * exp_ch4.adb (Expand_N_Shift_Left): Handle shift counts greater
9578         than the word size when operating in Modify_Tree_For_C mode.
9579         * sinfo.ads: Add documentation section on Modify_Tree_For_C mode.
9581 2014-02-06  Robert Dewar  <dewar@adacore.com>
9583         * erroutc.adb (Warning_Specifically_Suppressed.Matches):
9584         compare is case insensitive.
9585         * gnat_rm.texi: Document that string compare for Warnings Off
9586         is now case insensitive.
9588 2014-02-06  Eric Botcazou  <ebotcazou@adacore.com>
9590         * gnat_rm.texi: Small wording tweak.
9592 2014-02-06  Pascal Obry  <obry@adacore.com>
9594         * prj-attr.adb, projects.texi, snames.ads-tmpl: Add Included_Patterns
9595         and Included_Artifact_Patterns attribute definitions.
9597 2014-02-06  Yannick Moy  <moy@adacore.com>
9599         * sem_ch6.adb (Analyze_Subprogram_Body_Helper): Set
9600         SPARK_Mode pragma component for all subprograms, including stubs.
9602 2014-02-06  Hristian Kirtchev  <kirtchev@adacore.com>
9604         * sem_ch10.adb (Analyze_Package_Body_Stub): Maintain
9605         the configuration options of the enclosing context in a
9606         stack-like fasion.
9607         (Analyze_Subprogram_Body_Stub): Maintain the
9608         configuration options of the enclosing context in a stack-like
9609         fashion.
9611 2014-02-06  Robert Dewar  <dewar@adacore.com>
9613         * debug.adb: -gnatd.u sets Modify_Tree_For C
9614         * exp_ch4.adb (Expand_N_Op_Rotate_Left): Expand out
9615         if Modify_Tree_For_C (Expand_N_Op_Rotate_Right): ditto.
9616         (Expand_N_Op_Arithmetic_Right_Shift): ditto.
9617         * exp_intr.adb (Expand_Shift): Call expander so we do
9618         Modify_Tree_For_C expansions.
9619         * gnat1drv.adb (Adjust_Global_Switches): Set Modify_Tree_For_C
9620         if -gnatd.u set.
9622 2014-02-06  Fedor Rybin  <frybin@adacore.com>
9624         * prj-proc.ads (Tree_Loaded_Callback): new type Callback used
9625         after the phase 1 of the processing of each aggregated project
9626         to get access to project trees of aggregated projects.
9627         (Process_Project_Tree_Phase_1): new parameter On_New_Tree_Loaded
9628         If specified, On_New_Tree_Loaded is called after each aggregated
9629         project has been processed succesfully.
9630         (Process): new parameter On_New_Tree_Loaded.
9631         * prj-proc.adb (Process_Aggregated_Projects): On_New_Tree_Loaded
9632         callback added after processing of each aggregated project.
9633         (Recursive_Process): new parameter On_New_Tree_Loaded.
9634         (Process): new parameter On_New_Tree_Loaded.
9635         (Process_Project_Tree_Phase_1): new parameter On_New_Tree_Loaded.
9636         * prj-conf.ads (Parse_Project_And_Apply_Config): new parameter
9637         On_New_Tree_Loaded.
9638         * prj-conf.adb (Parse_Project_And_Apply_Config): new parameter
9639         On_New_Tree_Loaded.
9641 2014-02-06  Bob Duff  <duff@adacore.com>
9643         * gnat_ugn.texi: Implement --insert-blank-lines and
9644         --preserve-blank-lines switches.
9646 2014-02-06  Sergey Rybin  <rybin@adacore.com frybin>
9648         * gnat_ugn.texi, vms_data.ads: Add documentation of -j option for
9649         gnatelim.
9651 2014-02-06  Eric Botcazou  <ebotcazou@adacore.com>
9653         * gnat_rm.texi (Pragma Optimize_Alignment): Document the effect
9654         of the pragma on individual objects.
9656 2014-02-06  Hristian Kirtchev  <kirtchev@adacore.com>
9658         * einfo.adb Node29 is now used as BIP_Initialization_Call.
9659         (BIP_Initialization_Call): New routine.
9660         (Set_BIP_Initialization_Call): New routine.
9661         (Write_Field29_Name): Add an entry for constants and variables.
9662         * einfo.ads Add new attribute BIP_Initialization_Call and update
9663         its usage in nodes.
9664         (BIP_Initialization_Call): New routine along with pragma Inline.
9665         (Set_BIP_Initialization_Call): New routine along with pragma Inline.
9666         * exp_ch6.adb (Make_Build_In_Place_Call_In_Object_Declaration):
9667         Add local declaration Res_Decl. Capture the build-in-place
9668         initialization call when the related object declaration has
9669         created a transient block.
9670         * exp_ch7.adb (Process_Transient_Objects): Add local variable
9671         Fin_Insrt. Recognize a scenario where an object declaration acts
9672         as a transient context and is initialized by a build-in-place
9673         function call.
9675 2014-02-06  Pascal Obry  <obry@adacore.com>
9677         * prj-util.adb (For_Interface_Sources): Fix handling of required
9678         bodies for aggregate libs.
9680 2014-02-06  Robert Dewar  <dewar@adacore.com>
9682         * nlists.ads: Minor comment clarifications.
9684 2014-02-06  Robert Dewar  <dewar@adacore.com>
9686         * gnat1drv.adb (Adjust_Global_Switches): Set Modify_Tree_For_C
9687         if gnatd.V set.
9688         * opt.ads (Modify_Tree_For_C): New flag.
9689         * output.ads, output.adb (Last_Char): New function.
9691 2014-02-06  Pascal Obry  <obry@adacore.com>
9693         * projects.texi, prj-env.adb (Initialize_Default_Project_Path): Add
9694         share/gpr for cross-builds.
9696 2014-02-06  Robert Dewar  <dewar@adacore.com>
9698         * exp_util.ads, checks.adb, sem_prag.adb, prj-util.adb, sem_ch13.adb:
9699         Minor reformatting and code clean ups.
9701 2014-02-06  Pascal Obry  <obry@adacore.com>
9703         * prj-util.adb (For_Interface_Sources): Skip non compilable languages.
9704         * prj.ads: Minor typo fix in comment.
9706 2014-02-06  Hristian Kirtchev  <kirtchev@adacore.com>
9708         * sem_prag.adb (Analyze_Depends_In_Decl_Part): Add
9709         local variable Expr. Flag clauses with extra parenthesis as this
9710         is not allowed by the syntax of the pragma. Code reformatting.
9712 2014-02-06  Hristian Kirtchev  <kirtchev@adacore.com>
9714         * exp_attr.adb (Expand_N_Attribute_Reference): Alphabetize
9715         variables. Rename variabme Tnn to Temp. Do not create a temporary
9716         if assertions are disabled. Find enclosing routine _Postconditions
9717         and insert the temporary that captures the value of the prefix
9718         before the routine.
9719         * exp_ch6.adb (Build_Postconditions_Procedure):
9720         Insert the generated _Postconditions routine
9721         before the first source declaration of the related
9722         subprogram.
9723         (Insert_After_Last_Declaration): Removed.
9724         (Insert_Before_First_Source_Declaration): New routine.
9726 2014-02-06  Ed Schonberg  <schonberg@adacore.com>
9728         * exp_util.adb, exp_util.ads (Within_Internal_Subprogram):
9729         Utility to determine whether current expansion is for the body
9730         of a predefined primitive operation.
9731         (Make_Predicate_Check): Use Within_Internal_Subpgram
9732         * checks.adb (Apply_Predicate_Check): Use
9733         Within_Internal_Subprogram
9734         * sem_ch13.adb (Freeze_Entity_Checks): Ditto.
9736 2014-02-06  Pascal Obry  <obry@adacore.com>
9738         * prj.ads, prj-util.adb: Minor reformatting.
9740 2014-02-06  Ed Schonberg  <schonberg@adacore.com>
9742         * exp_ch6.adb (Expand_Subprogram_Contract, Append_Enabled_Item):
9743         Take into account the Split_PPC flag to ensure that conjuncts
9744         in a composite postcondition aspect are tested in source order.
9746 2014-02-06  Hristian Kirtchev  <kirtchev@adacore.com>
9748         * sem_ch6.adb (Analyze_Generic_Subprogram_Body): Flag illegal
9749         use of SPARK_Mode.
9750         * sem_ch12.adb (Analyze_Generic_Subprogram_Declaration): Flag
9751         illegal use of SPARK_Mode.
9752         (Instantiate_Subprogram_Body): Flag illegal use of SPARK_Mode.
9753         * sem_prag.adb (Analyze_Pragma): Code reformatting.
9754         * sem_util.adb Add with and use clause for Aspects.
9755         (Check_SPARK_Mode_In_Generic): New routine.
9756         * sem_util.ads (Check_SPARK_Mode_In_Generic): New routine.
9758 2014-02-06  Thomas Quinot  <quinot@adacore.com>
9760         * a-calend.adb (Formatting_Operations.Split): Ensure that
9761         Time_Error is raised for invalid time values.
9763 2014-02-06  Arnaud Charlet  <charlet@adacore.com>
9765         * sem_prag.adb (Analyze_Pragma): Rewrite as a null statement
9766         in GNATprove_Mode.
9768 2014-02-06  Robert Dewar  <dewar@adacore.com>
9770         * einfo.ads, einfo.adb (Is_Discriminant_Check_Function): New flag.
9771         * exp_ch3.adb (Build_Dcheck_Function): Set
9772         Is_Discriminant_Check_Function.
9774 2014-02-06  Hristian Kirtchev  <kirtchev@adacore.com>
9776         * exp_ch7.adb (Is_Subprogram_Call): Inspect
9777         the original tree in certain cases where a construct has been
9778         factored out and replaced by a reference to a temporary.
9780 2014-02-06  Ed Schonberg  <schonberg@adacore.com>
9782         * sem_ch3.adb (Process_Full_View): Fix typo in the order of
9783         parameters when propagating predicate function to full view.
9784         (Find_Type_Of_Object): Freeze base type of object type to catch
9785         premature use of discriminated private type without a full view.
9787 2014-02-06  Robert Dewar  <dewar@adacore.com>
9789         * sprint.adb: Minor reformatting.
9791 2014-02-06  Hristian Kirtchev  <kirtchev@adacore.com>
9793         * exp_ch4.adb (Process_Transient_Object): Add local variable
9794         Temp_Ins. When the transient object is initialized by an
9795         aggregate, the hook must capture the object after the last
9796         component assignment takes place.
9797         * exp_ch7.adb (Detect_Subprogram_Call): Expose the subprogram to
9798         routine Is_Subprogram_Call.
9799         (Is_Subprogram_Call): Inspect an
9800         aggregate that has been heavily expanded for subprogram calls.
9801         (Process_Transient_Objects): Add local variables Expr, Ptr_Id
9802         and Temp_Ins.  Remove the nested declare block and adjust the
9803         indentation. When the transient object is initialized by an
9804         aggregate, the hook must capture the object after the last
9805         component assignment takes place.
9807 2014-02-06  Hristian Kirtchev  <kirtchev@adacore.com>
9809         * sem_prag.adb (Analyze_Global_Item): Detect illegal uses of
9810         external states with enabled properties that do not match the
9811         global mode.
9812         (Property_Error): New routine.
9813         * sem_res.adb (Property_Error): New routine.
9814         (Resolve_Actuals): Detect illegal uses of external variables with
9815         enabled properties in procedure calls that do not match the mode of
9816         the corresponding formal parameter.
9818 2014-02-06  Hristian Kirtchev  <kirtchev@adacore.com>
9820         * sem_util.adb (Has_Enabled_Property): Rename
9821         formal parameter Prop_Nam to Property. Update the comment on usage
9822         and all occurrences in the body. Add local variable Prop_Nam. When
9823         inspecting a property with an expression, the property name
9824         appears as the first choice of the component association.
9826 2014-02-04  Robert Dewar  <dewar@adacore.com>
9828         * exp_ch5.adb, einfo.ads, freeze.adb, sem_ch8.adb: Minor reformatting.
9830 2014-02-04  Gary Dismukes  <dismukes@adacore.com>
9832         * sem_aggr.adb: Change "runtime" to "run time" in warning message,
9833         for consistency with other messages.
9835 2014-02-04  Ed Schonberg  <schonberg@adacore.com>
9837         * exp_ch5.adb  (Expand_Iterator_Loop):  For a container element
9838         iterator, indicate that the element is a constant if the container
9839         type does not have a variable indexing aspect.
9840         * sem_ch8.adb (Analyze_Object_Renaming): If the entity is already
9841         marked as constant, do not reset its Ekind, to ensure that
9842         container elements in an element loop are not modified if the
9843         container (e.g. a hashed set) only has a constant indexing aspect.
9845 2014-02-04  Arnaud Charlet  <charlet@adacore.com>
9847         * g-souinf.ads: Subprograms in this unit are actually not pure.
9848         * freeze.adb (Freeze_Subprogram): Do not reset Is_Pure for Intrinsics.
9849         * einfo.ads (Is_Pure): Update doc to match implementation.
9851 2014-02-04  Gary Dismukes  <dismukes@adacore.com>
9853         * exp_ch13.adb: Minor spelling fix.
9855 2014-02-04  Robert Dewar  <dewar@adacore.com>
9857         * opt.ads: Minor comment update.
9859 2014-02-04  Robert Dewar  <dewar@adacore.com>
9861         * exp_ch4.adb (Expand_N_Expression_With_Actions): Use Rewrite
9862         instead of Replace.
9864 2014-02-04  Ed Schonberg  <schonberg@adacore.com>
9866         * sem_aggr.adb (Resolve_Array_Aggregate): Suppress warnings
9867         on null expressions if component type is non-null, when the
9868         corresponding association covers an empty range of index values.
9870 2014-02-04  Robert Dewar  <dewar@adacore.com>
9872         * sinfo.ads: Further comments on N_Expression_With_Actions node.
9874 2014-02-04  Hristian Kirtchev  <kirtchev@adacore.com>
9876         * sem_prag.adb (Analyze_Refined_Depends_In_Decl_Part): Remove global
9877         variables Out_Items and Ref_Global. Remove local constant
9878         Body_Id along with dummy variables D1, D2, D3, D4, D5, D6, D7
9879         and D8. Remove the useless collection of global items as this
9880         was a leftover from an earlier version of the routine. Move
9881         several routines out to avoid deep nesting and indentation.
9882         (Inputs_Match): Add formal parameter Dep_Clause. Rename formal
9883         parameter Do_Checks to Post_Errors. Update the comment on usage.
9884         (Is_Matching_Input): Renamed to Input_Match. Add formal parameters
9885         Ref_Inputs and Do_Checks. Rename formal parameter Do_Checks
9886         to Post_Errors. Update the comment on usage. Account for the
9887         case where a self referential state may have a null input_list.
9888         (Is_Self_Referential): New routine.
9890 2014-02-04  Ed Schonberg  <schonberg@adacore.com>
9892         * sem_ch13.adb (Analyze_Attribute_Definition_Clause): If the
9893         entity renames an expression, as in the case of an object of
9894         an unconstrained type initialized by a function call, defer the
9895         rewriting of the expression to the expander.
9896         * exp_ch13.adb (Expand_N_Attribute_Definition_Clause, case
9897         'Alignment): If the entity renames an expression, introduce
9898         temporary to capture value, and rewrite original declaration to
9899         use temporary.
9901 2014-02-04  Gary Dismukes  <dismukes@adacore.com>
9903         * g-comlin.adb: Minor typo fix.
9905 2014-02-04  Ed Schonberg  <schonberg@adacore.com>
9907         * freeze.adb (Freeze_All): Types derived from a formal
9908         access_to_classwide type do not have a finalization master.
9910 2014-02-04  Robert Dewar  <dewar@adacore.com>
9912         * sprint.adb: Minor reformatting.
9914 2014-02-04  Robert Dewar  <dewar@adacore.com>
9916         * exp_ch4.adb (Expand_N_Expression_With_Actions): Eliminate
9917         cases where Actions is a null list.
9918         * sinfo.ads (N_Expression_With_Actions): Actions can be
9919         temporarily empty during semantic analysis, but must be non-empty
9920         in the final expanded tree.
9922 2014-01-31  Robert Dewar  <dewar@adacore.com>
9924         * exp_ch9.adb: Minor reformatting.
9926 2014-01-31  Emmanuel Briot  <briot@adacore.com>
9928         * g-comlin.adb (Set_Command_Line): Take the switches
9929         configuration from the Command_Line_Config.
9931 2014-01-31  Hristian Kirtchev  <kirtchev@adacore.com>
9933         * sem_prag.adb (Analyze_Refinement_Clause): Guard against a malformed
9934         refinement clause.
9936 2014-01-31  Vincent Celier  <celier@adacore.com>
9938         * projects.texi: Add more documentation about others used as an
9939         index in indexed attributes.
9941 2014-01-31  Robert Dewar  <dewar@adacore.com>
9943         * gnat_ugn.texi: Minor update.
9944         * gnat_rm.texi: Add example to Restriction_Warnings documentation.
9945         * exp_util.adb: Minor reformatting.
9947 2014-01-31  Ed Schonberg  <schonberg@adacore.com>
9949         * exp_ch9.adb (Expand_Entry_Barrier): Warn if the barrier
9950         depends on data that is not private to the protected object,
9951         and potentially modifiable in unsynchronized fashion.
9953 2014-01-31  Yannick Moy  <moy@adacore.com>
9955         * erroutc.adb (Validate_Specific_Warnings): Remove special case for
9956         GNATprove_Mode.
9958 2014-01-31  Robert Dewar  <dewar@adacore.com>
9960         * prj-attr.ads (First_Attribute_Of): Returns Empty_Attribute
9961         for Unknown_Package.
9962         * sem_ch6.adb, sem_attr.adb: Minor comment addition.
9964 2014-01-31  Hristian Kirtchev  <kirtchev@adacore.com>
9966         * exp_util.adb (Build_Allocate_Deallocate_Proc): Rewrite
9967         the logic that generates a runtime check to determine the
9968         controlled status of the object about to be allocated or
9969         deallocated. Class-wide types now always use a runtime check
9970         even if they appear as generic actuals.
9971         (Find_Object): Detect
9972         a special case that involves interface class-wide types because
9973         the object appears as a complex expression.
9975 2014-01-31  Ed Schonberg  <schonberg@adacore.com>
9977         * sem_ch6.adb (Process_Formals): In Ada2012 mode, place
9978         subprogram with an incomplete untagged formals on the list of
9979         private dependents, to verify that the type is properly completed
9980         in the private part.
9981         * sem_attr.adb: Code clean up.
9983 2014-01-31  Robert Dewar  <dewar@adacore.com>
9985         * exp_ch6.adb: Minor reformatting.
9987 2014-01-31  Vincent Celier  <celier@adacore.com>
9989         * prj-attr.adb (First_Attribute_Of): Return Unknown_Attribute
9990         when Pkg is unknown.
9992 2014-01-31  Hristian Kirtchev  <kirtchev@adacore.com>
9994         * sem_res.adb (Resolve_Entity_Name): Comment
9995         reformatting. Allow volatile objects in various generated checks.
9997 2014-01-31  Ed Schonberg  <schonberg@adacore.com>
9999         * sem_attr.adb (Analyze_Attribute, case 'Update): For a record
10000         component association, set the etype of the identifier, for
10001         SPARK use.
10003 2014-01-31  Ed Schonberg  <schonberg@adacore.com>
10005         * exp_ch6.adb (Has_Visibility_Of_Subprogram): If type is not
10006         declared in a package, not checks can apply to the subprogram.
10008 2014-01-31  Robert Dewar  <dewar@adacore.com>
10010         * erroutc.adb (Validate_Specific_Warnings): Warnings are
10011         controlled -gnatw.W.
10012         * gnat_ugn.texi: Document new warnings controlled by -gnatw.w.
10013         * opt.ads (Warn_On_Warnings_Off): Now controls more cases.
10015 2014-01-31  Arnaud Charlet  <charlet@adacore.com>
10017         * exp_disp.adb: Update comments.
10019 2014-01-31  Yannick Moy  <moy@adacore.com>
10021         * sem_ch12.adb (Analyze_Generic_Subprogram_Declaration,
10022         Save_Global_References): Guard access to expression in aspect.
10024 2014-01-31  Yannick Moy  <moy@adacore.com>
10026         * sem_prag.adb (Analyze_Pragma/Pragma_SPARK_Mode):
10027         Issue an error when the pragma is applied to a generic unit,
10028         a generic declaration, or inside a generic.
10030 2014-01-31  Yannick Moy  <moy@adacore.com>
10032         * sem_ch8.adb (Analyze_Subprogram_Renaming): Set SPARK_Mode on renaming
10033         entity.
10035 2014-01-31  Robert Dewar  <dewar@adacore.com>
10037         * exp_ch9.adb, s-tassta.adb, s-tposen.adb, s-tposen.ads: Minor
10038         reformatting.
10040 2014-01-31  Tristan Gingold  <gingold@adacore.com>
10042         * exp_disp.adb: Add a historic note.
10044 2014-01-31  Robert Dewar  <dewar@adacore.com>
10046         * sem_warn.adb (Warn_On_Useless_Assignments): Add call to
10047         Process_Deferred_References.
10049 2014-01-31  Yannick Moy  <moy@adacore.com>
10051         * erroutc.adb (Validate_Specific_Warnings): Do not issue a message for
10052         ineffective pragma Warnings(Off) in GNATprove_Mode.
10054 2014-01-31  Bob Duff  <duff@adacore.com>
10056         * s-taskin.ads: Minor comment fix.
10057         * s-tassta.adb (Abort_Dependents): Don't abort all dependents;
10058         just direct dependents. If this is actually an abort, each task
10059         will take care of aborting its dependents, so all dependents will
10060         get aborted, as before. However, when this is called the second
10061         time from Vulnerable_Complete_Master "for convenience" (i.e. to
10062         kill off tasks waiting at terminate alternatives), aborting
10063         indirect dependents is wrong, because it causes some unrelated
10064         tasks to get aborted.
10066 2014-01-31  Robert Dewar  <dewar@adacore.com>
10068         * sem_ch4.adb: Minor reformatting.
10070 2014-01-31  Robert Dewar  <dewar@adacore.com>
10072         * exp_ch2.adb: New calling sequence for Is_LHS.
10073         * frontend.adb: Add call to Process_Deferred_References.
10074         * lib-xref.ads, lib-xref.adb (Process_Deferred_References): New.
10075         (Deferred_References): New table.
10076         * sem_ch8.adb (Find_Direct_Name): Make deferred reference table
10077         entries.
10078         (Find_Expanded_Name): Ditto.
10079         * sem_res.adb: New calling sequence for Is_LHS.
10080         * sem_util.ads, sem_util.adb (Is_LHS): New calling sequence.
10081         * sem_warn.adb: Call Process_Deferred_References before issuing
10082         warnings.
10084 2014-01-31  Tristan Gingold  <gingold@adacore.com>
10086         * exp_util.adb (Corresponding_Runtime_Package): Restrict the
10087         use of System_Tasking_Protected_Objects_Single_Entry.
10088         * exp_ch9.adb (Build_Simple_Entry_Call): Remove Mode parameter
10089         of Protected_Single_Entry_Call.
10090         (Expand_N_Timed_Entry_Call): Remove single_entry case.
10091         * exp_disp.adb (Make_Disp_Asynchronous_Select_Body): Remove
10092         single_entry case.
10093         (Make_Disp_Timed_Select_Body): Likewise.
10094         * rtsfind.ads (RE_Timed_Protected_Single_Entry_Call): Remove.
10095         * s-tposen.adb (Send_Program_Error, PO_Do_Or_Queue): Remove
10096         Self_Id parameter.
10097         (Wakeup_Entry_Caller): Remove Self_ID and New_State parameters.
10098         (Wait_For_Completion_With_Timeout): Remove.
10099         (Protected_Single_Entry_Call): Remove Mode parameter
10100         (always Simple_Call).
10101         (Service_Entry): Remove Self_Id constant (not used anymore).
10102         (Timed_Protected_Single_Entry_Call): Remove.
10103         * s-tposen.ads (Timed_Protected_Single_Entry_Call): Remove.
10104         (Protected_Single_Entry_Call): Remove Mode parameter.
10106 2014-01-29  Hristian Kirtchev  <kirtchev@adacore.com>
10108         * einfo.adb (Get_Pragma): Handle the retrieval of pragma Refined_Post.
10109         * einfo.ads (Get_Pragma): Update the comment on special pragmas
10110         handled by this routine.
10111         * sem_prag.adb (Analyze_Pragma): Add a legal pragma Refined_Post
10112         to the contract of the related subprogram body.
10113         * sem_util.adb (Add_Contract_Item): Handle the insertion of
10114         pragma Refined_Post into the contract of a subprogram body.
10115         * sinfo.ads Update the documentation of node N_Contract.
10116         * sem_res.adb (Resolve_Entity_Name): Add a guard
10117         to detect abstract states and variables only when checking the
10118         SPARK 2014 rules concerning volatile object placement.
10120 2014-01-29  Ed Schonberg  <schonberg@adacore.com>
10122         * sem_ch4.adb (Find_Equality_Types, Try_One_Interp): within an instance,
10123         null is compatible with any access type.
10125 2014-01-29  Hristian Kirtchev  <kirtchev@adacore.com>
10127         * sem_util.adb (Find_Placement_In_State_Space): Assume that the default
10128         placement is not in a package.
10130 2014-01-29  Hristian Kirtchev  <kirtchev@adacore.com>
10132         * sem_util.adb (Has_Enabled_Property): Compare the character field of
10133         the sole property.
10135 2014-01-29  Robert Dewar  <dewar@adacore.com>
10137         * sem_intr.adb, a-ztexio.ads, sinfo.ads, sem_res.adb, gnatlink.adb,
10138         vms_conv.adb, a-except.ads, a-except-2005.ads, a-teioed.adb,
10139         sem_warn.ads, treepr.ads, erroutc.ads, a-excach.adb: Minor reformatting.
10141 2014-01-29  Robert Dewar  <dewar@adacore.com>
10143         * sem_util.ads, sem_util.adb (In_Pragma_Expression): New function.
10144         * sem_warn.adb (Check_References): Suppress warnings if inside
10145         Initial_Condition pragma.
10147 2014-01-29  Hristian Kirtchev  <kirtchev@adacore.com>
10149         * sem_prag.adb (Check_Missing_Part_Of): List all values of
10150         State_Space_Kind for readability reasons. Do not emit an error on
10151         a private item when the enclosing package lacks aspect/pragma
10152         Abstract_State. Do not emit an error on a private package
10153         instantiation when the corresponding generic template lacks
10154         visible state.
10155         (Has_Visible_State): New routine.
10156         * sem_util.adb (Find_Placement_In_State_Space): The visible
10157         declarations of any kind of child units in general act as proper
10158         placement location.
10160 2014-01-29  Robert Dewar  <dewar@adacore.com>
10162         * a-except-2005.adb, a-except.adb, a-excpol-abort.adb, a-exstat.adb,
10163         ali.adb, a-numaux.ads, a-numaux-darwin.ads, a-numaux-libc-x86.ads,
10164         a-numaux-vms.ads, a-numaux-vxworks.ads, a-numaux-x86.ads, aspects.ads,
10165         a-taside.adb, a-teioed.adb, a-textio.adb, a-textio.ads, atree.adb,
10166         atree.ads, a-witeio.adb, a-witeio.ads, a-wtedit.adb, a-ztedit.adb,
10167         a-ztexio.adb, bcheck.adb, binde.adb, checks.adb, comperr.adb,
10168         cstand.adb, debug_a.adb, einfo.ads, errout.adb, erroutc.adb,
10169         eval_fat.adb, exp_aggr.adb, exp_attr.adb, exp_ch11.adb, exp_ch3.adb,
10170         exp_ch4.adb, exp_ch5.adb, exp_ch6.adb, exp_ch9.adb, exp_dbug.adb,
10171         exp_disp.adb, exp_fixd.adb, exp_imgv.adb, exp_intr.adb, exp_util.adb,
10172         freeze.adb, frontend.adb, g-comlin.ads, g-mbdira.adb, gnat1drv.adb,
10173         gprep.adb, g-spipat.adb, i-cpp.ads, i-vxwork.ads, i-vxwork-x86.ads,
10174         krunch.ads, layout.adb, lib-load.adb, lib-writ.adb, lib-writ.ads,
10175         live.adb, namet.ads, osint.adb, osint-c.adb, output.ads, par.adb,
10176         par-ch10.adb, par-ch13.adb, par-ch3.adb, par-ch4.adb, par-ch5.adb,
10177         par-ch6.adb, par-ch9.adb, par-endh.adb, par-labl.adb, par-prag.adb,
10178         par-sync.adb, par-tchk.adb, par-util.adb, prj.adb, repinfo.adb,
10179         rtsfind.adb, s-arit64.adb, s-asthan-vms-alpha.adb,
10180         s-asthan-vms-ia64.adb, s-bignum.adb, scans.adb, scng.adb, s-dimmks.ads,
10181         sem_aggr.adb, sem_attr.adb, sem_aux.adb, sem_cat.adb, sem_ch10.adb,
10182         sem_ch12.adb, sem_ch13.adb, sem_ch13.ads, sem_ch3.adb, sem_ch4.adb,
10183         sem_ch5.adb, sem_ch6.adb, sem_ch8.adb, sem_disp.adb, sem_elab.adb,
10184         sem_elim.adb, sem_eval.adb, sem_intr.adb, sem_prag.adb, sem_res.adb,
10185         sem_type.adb, sem_util.adb, sem_warn.adb, set_targ.adb, s-fatgen.adb,
10186         s-fatgen.ads, s-fileio.adb, s-imgcha.adb, s-imgrea.adb, sinfo.ads,
10187         sinput-c.adb, snames.ads-tmpl, s-os_lib.adb, sprint.adb,
10188         s-regpat.adb, s-secsta.adb, s-stalib.ads,
10189         s-stchop.adb, s-stoele.ads, stand.ads, s-taprop-solaris.adb,
10190         s-tasdeb-vms.adb, s-tasini.adb, s-tassta.adb, s-valdec.adb,
10191         s-valuti.adb, s-wchjis.adb, s-wchwts.adb, system.ads, system-vms_64.ads,
10192         system-vms-ia64.ads, treepr.adb, types.ads, uintp.adb, uname.adb,
10193         urealp.adb, usage.adb, vxaddr2line.adb: Minor reformatting.
10195 2014-01-29  Robert Dewar  <dewar@adacore.com>
10197         * expander.adb: Minor reformatting.
10199 2014-01-29  Javier Miranda  <miranda@adacore.com>
10201         * exp_ch3.adb (Predefined_Primitive_Bodies): Adding documentation to
10202         previous patch.
10204 2014-01-29  Javier Miranda  <miranda@adacore.com>
10206         * exp_ch3.adb (Predefined_Primitive_Bodies): Complete the code
10207         that checks if an interface types defines the predefined "="
10208         function because the compiler was erroneously not generating the
10209         predefined "=" primitive as soon as the name of some interface
10210         primitive is "=" (formals were not checked).
10212 2014-01-29  Ed Schonberg  <schonberg@adacore.com>
10214         * expander.adb (Expander): In GNATprove mode, do not process
10215         transient scopes: they are in general not created in this mode,
10216         and an attempt to examine them will lead to constraint errors when
10217         processing configuration pragmas that have analyzable expressions.
10219 2014-01-29  Vincent Celier  <celier@adacore.com>
10221         * clean.adb (Gnatclean): Fail if main project is an aggregate
10222         project or if there is an aggregate library project in the
10223         project tree.
10224         * gnatcmd.adb: Fail if the main project is an aggregate project
10225         or if there is an aggegate library project in the project tree.
10226         * make.adb (Initialize): : Fail if main project is an aggregate
10227         project or if there is an aggregate library project in the
10228         project tree.
10229         * makeutl.ads (Aggregate_Libraries_In): New Boolean function.
10230         * prj-makr.adb (Initialize): Fail if the main project is an
10231         aggregate project or an aggregate library project.
10233 2014-01-29  Vincent Celier  <celier@adacore.com>
10235         * prj-part.adb (Check_Import_Aggregate): New procedure
10236         to check if an imported project is an aggregate project.
10237         (Parse_Single_Project): Call Check_Import_Aggregate
10238         * projects.texi: Document that aggregate projects cannot be
10239         extended or imported.
10241 2014-01-29  Robert Dewar  <dewar@adacore.com>
10243         * exp_ch9.adb, sem_ch7.ads, s-regexp.adb, sem_ch13.adb: Minor
10244         reformatting and code clean up.
10245         * gnat_ugn.texi: Add documentation section on Atomic Variables
10246         and Optimization.
10248 2014-01-29  Hristian Kirtchev  <kirtchev@adacore.com>
10250         * einfo.adb Flag264 is now unused.
10251         (Has_Body_References): Removed.
10252         (Set_Has_Body_References): Removed.
10253         (Write_Entity_Flags): Remove the output for flag Has_Body_References.
10254         * einfo.ads Update the comment on usage of attribute
10255         Body_References. Remove attribute Has_Body_References and its
10256         usage in nodes.
10257         (Has_Body_References): Removed along with pragma Inline.
10258         (Set_Has_Body_References): Removed along with pragma Inline.
10259         * sem_prag.adb (Analyze_Global_Item): Move the call to
10260         Record_Possible_Body_Reference in the state related checks
10261         section. Add a comment intended function.
10262         (Analyze_Input_Output): Move the call to Record_Possible_Body_Reference
10263         in the state related checks section. Add a comment intended function.
10264         (Analyze_Refinement_Clause): Cleanup the illegal body reference
10265         reporting. Add a comment on timing of error reporting.
10266         (Record_Possible_Body_Reference): Reimplement the routine.
10268 2014-01-29  Vincent Celier  <celier@adacore.com>
10270         * makeutl.adb (Mains.Find_File_Add_Extension): Only look for specs for
10271         unit-based languages.
10272         (Mains.Complete_Mains.Do_Complete): Use the source file project
10273         tree when calling Find_File_Add_Extension. Use the correct
10274         project name when reporting an error.
10276 2014-01-29  Hristian Kirtchev  <kirtchev@adacore.com>
10278         * aspects.adb Add an entry for aspect Part_Of in table
10279         Canonical_Aspect.
10280         * aspects.ads Add an entry for aspect Part_Of in tables Aspect_Id,
10281         Aspect_Argument, Aspect_Names and Aspect_Delay.
10282         * atree.h Define Elist9.
10283         * atree.adb (Elist9): New routine.
10284         (Set_Elist9): New routine.
10285         * atree.ads (Elist9): New routine.
10286         (Set_Elist9): New routine.
10287         * einfo.adb Add Part_Of_Constituents and Encapsulating_State to
10288         the list of node usage.  Remove Refined_State from the list of
10289         node usage.
10290         (Encapsulating_State): New routine.
10291         (Get_Pragma):
10292         Handle pragma Part_Of; (Part_Of_Constituents): New routine.
10293         (Refined_State): Removed.
10294         (Set_Encapsulating_State): New routine.
10295         (Set_Part_Of_Constituents): New routine.
10296         (Set_Refined_State): Removed.
10297         (Write_Field9_Name): Add an entry
10298         for Part_Of_Constituents (Write_Field10_Name): Add an entry for
10299         Encapsulating_State. Remove the entry for Refined_State.
10300         * einfo.ads Add new attributes Encapsulating_State
10301         and Part_Of_Constituents alond with their usage in
10302         entities. Remove attribute Refined_State along with its
10303         usage in entities.
10304         (Encapsulating_State): New routine and
10305         pragma Inline.  (Get_Pragma): Update the comment on usage.
10306         (Part_Of_Constituents): New routine and pragma Inline.
10307         (Refined_State): Removed along with pragma Inline.
10308         (Set_Encapsulating_State): New routine and pragma Inline.
10309         (Set_Part_Of_Constituents): New routine and pragma Inline.
10310         (Set_Refined_State): Removed along with pragma Inline.
10311         * par-prag.adb Pragma Part_Of does not need any special processing
10312         by the parser.
10313         * sem_ch3.adb (Analyze_Declarations): Remove local variables
10314         Body_Id and Prag. Call separate routines to analyze the
10315         contract of a package [body].
10316         (Analyze_Object_Contract):
10317         Update the comment on usage. Remove local variables
10318         Items and Nam. Use Get_Pragma rather than traversing the
10319         classification list.  Verify whether the lack of indicator
10320         Part_Of agrees with the placement of the variable in state space.
10321         (Analyze_Object_Declaration): Initialize the encapsulating state
10322         of a variable.  (Requires_State_Refinement): Moved to sem_util.
10323         * sem_ch7.adb (Analyze_Package_Body_Contract): New routine.
10324         (Analyze_Package_Contract): New routine.
10325         * sem_ch7.ads (Analyze_Package_Body_Contract): New routine.
10326         (Analyze_Package_Contract): New routine.
10327         * sem_ch10.adb (Decorate_State): Initialize the encapsulating
10328         state and Part_Of constituents.
10329         * sem_ch13.adb (Analyze_Aspect_Specifications):
10330         Add processing for aspect Part_Of. Update all
10331         calls to Decorate_Delayed_Aspect_And_Pragma.
10332         (Check_Aspect_At_Freeze_Point): Aspect Part_Of does
10333         not need any special processing at freeze time.
10334         (Decorate_Delayed_Aspect_And_Pragma): Renamed to
10335         Decorate_Aspect_And_Pragma.  Add formal parameter Delayed and
10336         update the associated comment.
10337         * sem_prag.adb Add an entry for pragma Part_Of in table Sig_Flags.
10338         (Analyze_Abstract_State): Add new global variable State_Id. Remove
10339         local constants Errors and Loc. Remove local variables Is_Null
10340         and State_Nam. Create the entity of the abstract state on the
10341         spot, before all remaining checks are performed. Verify that a
10342         missing Part_Of option agrees with the placement of the abstract
10343         state within the state space.
10344         (Analyze_Depends_In_Decl_Part):
10345         Add new global variables Constits_Seen and States_Seen. Check
10346         that a state and a corresponding constituent do not appear
10347         in pragma [Refined_]Depends.
10348         (Analyze_Global_In_Decl_Part):
10349         Add new global variables Constits_Seen and States_Seen. Check
10350         that a state and a corresponding constituent do not appear
10351         in pragma [Refined_]Global.
10352         (Analyze_Global_Item):
10353         Remove the now obsolete code that deals with Part_Of.
10354         Add the entity of the global item to the list of processed
10355         items.  (Analyze_Initializes_In_Decl_Part): Add new global
10356         variables Constits_Seen and States_Seen. Check that a state
10357         and a corresponding constituent do not appear in pragma
10358         Initializes.
10359         (Analyze_Initialization_Item): Add the entity
10360         of the initialization item to the list of processed items.
10361         (Analyze_Input_Item): Add the entity of the initialization
10362         item to the list of processed items.
10363         (Analyze_Input_Output):
10364         Remove the now obsolete code that deals with Part_Of.  Add the
10365         entity of the input/output to the list of processed items.
10366         (Analyze_Part_Of): New routine.
10367         (Analyze_Part_Of_Option): Remove
10368         local constant Par_State. Add local constant Encaps and local
10369         variables Encaps_Id and Legal. Use Analyze_Part of to analyze
10370         the option. Turn the related state into a Part_Of constituent
10371         if the option is legal.
10372         (Analyze_Pragma): Add processing
10373         for pragma Part_Of.
10374         (Analyze_Refined_State_In_Decl_Part):
10375         Remove global constants Pack_Body and Spec_Id. Remove
10376         global variables Abstr_States and Hidden_States. Add new
10377         global variables Available_States, Body_Id, Body_States and
10378         Spec_Id. Add new local constant Body_Decl. Reimplement the
10379         logic that extracts the states available for refinement from
10380         the related package and the body hidden states of the said
10381         package.
10382         (Analyze_Refinement_Clause): Add local variable Part_Of_Constits.
10383         (Check_Applicable_Policy): Alphabetize body.
10384         (Check_Dependency_Clause): Replace Refined_State
10385         with Encapsulating_State.
10386         (Check_Matching_Constituent):
10387         Reimplement the logic that determines whether an item is a valid
10388         / invalid constituent of the current refined state. Return when
10389         a construct does not denote a valid abstract state. Extract the
10390         list of Part_Of constituents for further analysis. Check that all
10391         Part_Of constituents of a state have been used in its refinement.
10392         (Check_Matching_State): Update the comment on usage. Operate
10393         on the list of available states.
10394         (Check_Missing_Part_Of): New routine.
10395         (Check_Refined_Global_Item): Replace Refined_State
10396         with Encapsulating_State.
10397         (Check_State_And_Constituent_Use): New routine.
10398         (Create_Abstract_State): New routine.
10399         (Is_Matching_Input): Replace Refined_State with Encapsulating_State.
10400         (Is_Part_Of): Removed.
10401         (Collect_Body_States): New routine.
10402         (Collect_Constituent): Replace Refined_State with Encapsulating_State.
10403         (Collect_Hidden_States): Removed.
10404         (Report_Unrefined_States): Change the profile of the procedure along
10405         with the comment on usage.
10406         (Report_Unused_Constituents): New routine.
10407         (Report_Unused_Hidden_States): Removed.
10408         (Report_Unused_States): New routine.
10409         * sem_prag.ads (Check_Missing_Part_Of): New routine.
10410         * sem_util.adb (Add_Contract_Item): Pragma Part_Of can now
10411         appear in the classification pragmas of a package instantiation
10412         or a variable.
10413         (Find_Placement_In_State_Space): New routine.
10414         (Is_Child): Removed.
10415         (Is_Child_Or_Sibling): Remove formal
10416         parameter Private_Child. Remove the private child checks.
10417         (Requires_State_Refinement): Moved from sem_ch3.
10418         * sem_util.ads Add new type State_Space_Kind along with
10419         comment on its usage and values.
10420         (Add_Contract_Item): Update the comment on usage.
10421         (Find_Body_Discriminal): Alphabetize spec.
10422         (Find_Placement_In_State_Space): New routine.
10423         (Is_Child_Or_Sibling): Remove formal parameter Private_Child
10424         and update the comment on usage.
10425         (Requires_State_Refinement): Moved from sem_ch3.
10426         * sinfo.ads: Update the documentation of N_Contract.
10427         * snames.ads-tmpl The predefined name for Part_Of is now used
10428         to denote a pragma. Add Pragma_Id for Part_Of.
10430 2014-01-29  Emmanuel Briot  <briot@adacore.com>
10432         * s-regexp.adb (Create_Secondary_Table): Automatically grow the state
10433         machine as needed.
10434         (Dump): New subprogram.
10436 2014-01-29  Tristan Gingold  <gingold@adacore.com>
10438         * exp_ch9.adb (Expand_N_Protected_Type_Declaration): Add
10439         Expand_Entry_Declaration to factorize code.
10441 2014-01-29  Ed Schonberg  <schonberg@adacore.com>
10443         * checks.adb: minor clarification.
10444         * sem_ch7.adb (Declare_Inherited_Private_Subprograms): Limit
10445         search for primitive operations to the entities that immediately
10446         follow the type declaration.
10448 2014-01-29  Tristan Gingold  <gingold@adacore.com>
10450         * exp_ch9.adb (Build_Protected_Entry): Do not call
10451         Complete_Entry_Body anymore.
10452         * rtsfind.ads (RE_Complete_Single_Entry_Body): Remove.
10453         * s-tposen.ads, s-tposen.adb (Complete_Single_Entry_Body): Remove.
10455 2014-01-29  Pierre-Marie Derodat  <derodat@adacore.com>
10457         * s-os_lib.adb, s-os_lib.ads (Normalize_Pathname): Return an empty
10458         string when the Name input bigger than allowed. Adapt the function
10459         specification.
10461 2014-01-29  Ed Schonberg  <schonberg@adacore.com>
10463         * checks.adb (Install_Null_Excluding_Check): Do not emit warning
10464         if expression is within a case_expression of if_expression.
10466 2014-01-29  Robert Dewar  <dewar@adacore.com>
10468         * exp_ch9.adb, inline.ads: Minor reformatting.
10470 2014-01-29  Tristan Gingold  <gingold@adacore.com>
10472         * exp_ch9.adb (Is_Exception_Safe): Return true if no exceptions.
10474 2014-01-29  Yannick Moy  <moy@adacore.com>
10476         * inline.ads (Pending_Body_Info): Add SPARK_Mode and
10477         SPARK_Mode_Pragma components to be able to analyze generic
10478         instance.
10479         * sem_ch12.adb (Analyze_Package_Instantiation,
10480         Inline_Instance_Body, Need_Subprogram_Instance_Body,
10481         Load_Parent_Of_Generic): Pass in SPARK_Mode from instantiation
10482         for future analysis of the instance.
10483         (Instantiate_Package_Body,
10484         Instantiate_Subprogram_Body, Set_Instance_Inv): Set SPARK_Mode
10485         from instantiation to analyze the instance.
10487 2014-01-29  Robert Dewar  <dewar@adacore.com>
10489         * sem_ch7.adb, sem_prag.adb, sem_ch4.adb, sem_ch6.adb: Minor code
10490         reorganization.
10492 2014-01-29  Yannick Moy  <moy@adacore.com>
10494         * gnat_rm.texi: Update description of SPARK_Mode pragma.
10496 2014-01-29  Tristan Gingold  <gingold@adacore.com>
10498         * exp_ch9.adb (Expand_N_Protected_Body): Remove Num_Entries.
10500 2014-01-29  Thomas Quinot  <quinot@adacore.com>
10502         * sem_ch4.adb (Find_Component_In_Instance): Update comment.
10504 2014-01-29  Ed Schonberg  <schonberg@adacore.com>
10506         * exp_util.adb (Build_Task_Image_Prefix): Indicate that the
10507         resulting string is an internal entity. and thus requires no
10508         initialization. This is relevant when Initialize_ Scalars is
10509         enabled, because the resultant spurious initialization may lead to
10510         secondary stack anomalies that produce a mangled name for a task.
10512 2014-01-29  Yannick Moy  <moy@adacore.com>
10514         * sem_ch6.adb (Analyze_Subprogram_Body_Helper): SPARK_Mode
10515         not inherited from spec anymore. Check consistency
10516         rules after processing of declarations.
10517         * sem_ch7.adb (Analyze_Package_Body_Helper): SPARK_Mode not inherited
10518         from spec anymore. Check consistency rules after processing of
10519         declarations.
10520         (Analyze_Package_Declaration): Set SPARK_Mode only for non-generic
10521         packages.
10522         * sem_prag.adb (Analyze_Pragma/Pragma_SPARK_Mode): Implement new
10523         consistency rules.
10525 2014-01-27  Robert Dewar  <dewar@adacore.com>
10527         * sem_res.adb (Resolve_Comparison_Op): Add type name/location
10528         to unordered msg.
10529         (Resolve_Range): Add type name/location to unordered msg.
10531 2014-01-27  Claire Dross  <dross@adacore.com>
10533         * a-cofove.adb/s (Copy): Add precondition so that Copy (Source,
10534         Capacity) is only called with Capacity >= Length (Source) and
10535         Capacity in Capacity_Range.
10536         * a-cfdlli.adb/s, a-cfhase.adb/s, a-cfhama.adb/s, a-cforse.adb/s,
10537         a-cforma.adb/s (Copy): Add precondition so that Copy (Source, Capacity)
10538         is only called with Capacity >= Source.Capacity. Raise Capacity_Error
10539         in the code is this is not the case.
10541 2014-01-27  Thomas Quinot  <quinot@adacore.com>
10543         * sem_ch4.adb (Analyze_Selected_Component): Fix handling of
10544         selected component in an instance where the component of the
10545         actual is not visibile at instantiation.
10547 2014-01-27  Ed Schonberg  <schonberg@adacore.com>
10549         * sem_ch6.adb: sem_ch6.adb (Set_Actual_Subtypes): If the type
10550         has a dynamic predicate, generate freeze node for Actual_Subtype
10551         at once, because the declaration of the corresponding predicate
10552         function will make reference to it.
10554 2014-01-27  Tristan Gingold  <gingold@adacore.com>
10556         * exp_ch7.adb, exp_ch9.adb: Adjust comments.
10558 2014-01-27  Robert Dewar  <dewar@adacore.com>
10560         * exp_ch4.adb (Expand_N_Op_Expon): Remove unsigned type test
10561         for 2**X optimization.
10563 2014-01-27  Ed Schonberg  <schonberg@adacore.com>
10565         * a-suenst.adb: strings.utf_encoding.strings (Decode): Check
10566         explicitly whether value is in range of Character, because the
10567         library is typically compiled with range checks disabled, and
10568         we cannot rely on the implicit check on the argument of 'Val.
10570 2014-01-27  Vincent Celier  <celier@adacore.com>
10572         * a-ciorma.adb, a-cihama.adb (Assign): Copy the Source to the Target,
10573         not the Target to itself.
10575 2014-01-27  Robert Dewar  <dewar@adacore.com>
10577         * vms_conv.ads, ali.adb, sem_ch6.ads, opt.ads, vms_cmds.ads: Minor
10578         changes to avoid incorrect use of unordered enum types.
10580 2014-01-27  Thomas Quinot  <quinot@adacore.com>
10582         * sem_ch4.adb: Minor reformatting.
10584 2014-01-27  Robert Dewar  <dewar@adacore.com>
10586         * scn.adb (Check_End_Of_Line): Removed.
10587         (Error_Long_Line): Removed.
10588         (Determine_License): Use versions of above routines from Scanner.
10589         * scng.adb (Check_End_Of_Line): Moved to spec.
10590         (Error_Long_Line): Removed, no longer used.
10591         * scng.ads (Check_End_Of_Line): Moved here from body.
10593 2014-01-27  Tristan Gingold  <gingold@adacore.com>
10595         * exp_ch7.adb (Build_Cleanup_Statements): Call
10596         Build_Protected_Subprogram_Call_Cleanup to insert the cleanup
10597         for protected body.
10598         * exp_ch9.adb (Build_Protected_Subprogram_Body): Likewise.
10599          Remove Service_Name variable.
10600         (Build_Protected_SUbprogam_Call_Cleanup): New procedure that
10601         factorize code from the above subprograms.
10602         * exp_ch9.ads (Build_Protected_Subprogram_Call_Cleanup): New procedure.
10604 2014-01-27  Hristian Kirtchev  <kirtchev@adacore.com>
10606         * einfo.adb (Has_Option): Reimplemented.
10607         * sem_prag.adb (Analyze_Refinement_Clause): Add global
10608         variables AR_Constit, AW_Constit, ER_Constit, EW_Constit,
10609         External_Constit_Seen and State. Add local variables Body_Ref,
10610         Body_Ref_Elmt and Extra_State. Reimplement part of the logic to
10611         avoid a cumbersome while pool. Verify the legality of an external
10612         state and relevant properties.
10613         (Check_External_Property): New routine.
10614         (Check_Matching_State): Remove parameter profile
10615         and update comment on usage.
10616         (Collect_Constituent): Store the
10617         relevant external property of a constituent.
10618         * sem_util.adb (Async_Readers_Enabled): Update the call to
10619         Has_Enabled_Property.
10620         (Async_Writers_Enabled): Update the call to Has_Enabled_Property.
10621         (Effective_Reads_Enabled): Update the call to Has_Enabled_Property.
10622         (Effective_Writes_Enabled): Update the call to Has_Enabled_Property.
10623         (Has_Enabled_Property): Rename formal parameter Extern to State_Id.
10624         Update comment on usage. Reimplement the logic to recognize the various
10625         formats of properties.
10627 2014-01-27  Ed Schonberg  <schonberg@adacore.com>
10629         * par-ch5.adb: Minor reformatting.
10631 2014-01-27  Tristan Gingold  <gingold@adacore.com>
10633         * s-tposen.ads: Harmonize style and comments.
10635 2014-01-27  Vincent Celier  <celier@adacore.com>
10637         * projects.texi: Document that shared library projects, by
10638         default, cannot import projects that are not shared library
10639         projects.
10641 2014-01-27  Robert Dewar  <dewar@adacore.com>
10643         * sem_ch8.adb (Find_Selected_Component): Use Replace instead
10644         of Rewrite.
10646 2014-01-27  Ed Schonberg  <schonberg@adacore.com>
10648         * a-suenco.adb, a-suenst.adb (Decode): Raise encoding error if
10649         any other exception is raised.
10650         (Convert): If both Input_Scheme and Output_Scheme are UTF_8 it is
10651         still necessary to perform a conversion in order to remove overlong
10652         encodings.
10654 2014-01-27  Robert Dewar  <dewar@adacore.com>
10656         * exp_smem.adb: Minor reformatting.
10658 2014-01-27  Thomas Quinot  <quinot@adacore.com>
10660         * a-calfor.ads: Fix incorrect reference to operator "-" in comment.
10662 2014-01-27  Ed Schonberg  <schonberg@adacore.com>
10664         * sem_res.adb (Make_Call_Into_Operator): In ASIS mode, relocate
10665         nodes for operands to the original node for the call, to preserve
10666         Original_Node pointers within the resolved operands, given that
10667         they may have been rewritten as well. Previous approach copied
10668         the operands into a new tree and lost those pointers.
10670 2014-01-27  Claire Dross  <dross@adacore.com>
10673         * a-cofove.adb, a-cofove.ads: Add Strict_Equal function to the API.
10675 2014-01-27  Ed Schonberg  <schonberg@adacore.com>
10677         * sem_util.adb (Check_Internal_Protected_Use): A call through
10678         an anonymous access parameter of the current protected function
10679         is not a potential modification of the current object.
10681 2014-01-27  Ed Schonberg  <schonberg@adacore.com>
10683         * a-cobove.adb (Reserve_Capacity): Procedure raises
10684         Capacity_Error, not Constraint_Error, when request cannot be
10685         satisfied.
10687 2014-01-27  Vincent Celier  <celier@adacore.com>
10689         * a-coorma.adb, a-cohama.adb (Assign): Copy the Source to the Target,
10690         not the Target to itself.
10692 2014-01-27  Ed Schonberg  <schonberg@adacore.com>
10694         * exp_ch4.adb (Expand_Concatenate): If the target of the
10695         concatenation is a library-level entity, always use the off-line
10696         version of concatenation, regardless of optimization level. This
10697         is space-efficient, and prevents linking problems when some
10698         units are compiled with different optimization levels.
10700 2014-01-27  Ed Schonberg  <schonberg@adacore.com>
10702         * sem_ch5.adb: Code clean up.
10704 2014-01-27  Ed Schonberg  <schonberg@adacore.com>
10706         * par-ch5.adb (P_Iterator_Specification): Improve error recovery
10707         when an array or container iterator includes a subtype indication,
10708         which is only legal in an element iterator.
10710 2014-01-27  Thomas Quinot  <quinot@adacore.com>
10712         * exp_ch7.adb: Minor reformatting.
10714 2014-01-27  Robert Dewar  <dewar@adacore.com>
10716         * opt.adb (SPARK_Mode): Default for library units is None rather
10717         than Off.
10718         * opt.ads: Remove AUTO from SPARK_Mode_Type SPARK_Mode_Type is
10719         no longer ordered.
10720         * sem_prag.adb (Analyze_Pragma, case SPARK_Mode): Remove AUTO
10721         possibility.
10722         * snames.ads-tmpl (Name_Auto): Removed, no longer used.
10724 2014-01-27  Robert Dewar  <dewar@adacore.com>
10726         * par-ch5.adb (P_Sequence_Of_Statements): Make entry in
10727         Suspicious_Labels table if we have identifier; followed by loop
10728         or block.
10729         * par-endh.adb (Evaluate_End_Entry): Search Suspicious_Labels table.
10730         * par.adb (Suspicious_Labels): New table.
10732 2014-01-27  Robert Dewar  <dewar@adacore.com>
10734         * exp_aggr.adb (Check_Bounds): Reason is range check, not
10735         length check.
10737 2014-01-27  Yannick Moy  <moy@adacore.com>
10739         * get_spark_xrefs.adb (Get_SPARK_Xrefs): Accept new type 'c' for
10740         reference.
10741         * lib-xref-spark_specific.adb (Is_Global_Constant): Remove useless
10742         function now.
10743         (Add_SPARK_Xrefs): Include references to constants.
10744         * spark_xrefs.ads Document new character 'c' for references to
10745         constants.
10747 2014-01-27  Thomas Quinot  <quinot@adacore.com>
10749         * exp_smem.adb (Add_Write_After): For a function call, insert write as
10750         an after action in a transient scope.
10752 2014-01-27  Thomas Quinot  <quinot@adacore.com>
10754         * exp_smem.adb (Expand_Shared_Passive_Variable): For a reference
10755         to a shared variable as an OUT formal in a call to an init proc,
10756         the 'Read call must be emitted after, not before, the call.
10758 2014-01-27  Robert Dewar  <dewar@adacore.com>
10760         * gnat_rm.texi: Remove mention of AUTO mode for SPARK_Mode pragma.
10762 2014-01-27  Robert Dewar  <dewar@adacore.com>
10764         * a-wichha.adb (Character_Set_Version): Change to output proper
10765         value.
10767 2014-01-27  Hristian Kirtchev  <kirtchev@adacore.com>
10769         * einfo.adb (Is_Input_Only_State): Removed.
10770         (Is_Non_Volatile_State): Removed.
10771         (Is_Output_State): Removed.
10772         * einfo.ads (Is_Input_Only_State): Remove attribute and
10773         subprogram. Update related entity.
10774         (Is_Non_Volatile_State):
10775         Remove attribute and subprogram. Update related entity.
10776         (Is_Output_State): Removed attribute and subprogram. Update
10777         related entity.
10778         * exp_ch6.adb (Expand_Subprogram_Contract): Update comment on
10779         generated code.
10780         * sem_ch3.adb (Analyze_Declarations): Analyze the contract of
10781         an object, not just variables.
10782         (Analyze_Object_Contract): New routine.
10783         (Analyze_Variable_Contract): Removed.
10784         (Process_Discriminants): Detect an illegal use of volatile
10785         discriminant in SPARK mode.
10786         * sem_ch5.adb (Analyze_Iterator_Specification):
10787         Detect an illegal use of volatile loop variable.
10788         (Analyze_Loop_Parameter_Specification): Detect an illegal use
10789         of volatile loop variable.
10790         * sem_ch6.adb (Process_Formals): Update the volatile object
10791         detection. Detect an illegal formal of mode IN OUT or OUT in
10792         SPARK mode. Enhance the error messages with references.
10793         * sem_ch12.adb (Instantiate_Object): Update the volatile object
10794         detection. Enhance the error messages with references.
10795         * sem_prag.adb (Analyze_Abstract_State): Enhance the error
10796         messages with references.
10797         (Analyze_Contract_Case): Enhance the error messages with references.
10798         (Analyze_External_Property): Call Check_Duplicate_Property to process
10799         an external property.
10800         (Analyze_External_Property_In_Decl_Part): New routine.
10801         (Analyze_External_State_In_Decl_Part): Removed.
10802         (Analyze_Global_Item): Detect an illegal
10803         use of a volatile constant. Detect an illegal use
10804         of a variable with enabled Effective_Reads. Enhance
10805         the error messages with references. Remove obsolete
10806         checks concerning Input_Only and Output_Only states.
10807         (Analyze_Initialization_Item): Enhance the error messages
10808         with references.
10809         (Analyze_Initializes_In_Decl_Part): Do not
10810         collect the states and variables when the initialization list
10811         is null.
10812         (Analyze_Input_Item): Enhance the error messages with references.
10813         (Analyze_Input_Output): Enhance the error messages with references.
10814         (Analyze_Pragma): Enhance the error messages with references.
10815         (Analyze_Refinement_Clause): Code reformatting.
10816         (Analyze_Refined_Depends_In_Decl_Part):
10817         Rename global variable Global to Reg_Global and update all
10818         occurrences. Add local variables D7 and D8. Update the error
10819         messages with references. Update the call to Collect_Global_Items.
10820         (Analyze_Refined_Global_In_Decl_Part): Add local variables
10821         Has_Proof_In_State, Proof_In_Constits and Proof_In_Items. Update
10822         the call to Collect_Global_Items.  Account for a Proof_In state
10823         in null / useless refinement checks. Verify the coverage of
10824         Proof_In states.
10825         (Check_Dependency_Clause): Remove local variable
10826         Out_Constits. Remove the retrieval and removal of constituents
10827         for an Output_Only state. Remove the reporting of unused
10828         Output_Only state constituents.
10829         (Check_Duplicate_Mode): Enhance
10830         the error message with a reference.
10831         (Check_Duplicate_Property): New routine.
10832         (Check_Duplicate_Option): Enhance the error message with a reference.
10833         (Check_External_Properties): Enhance the error message with a reference.
10834         (Check_Function_Return): Enhance the error message with a reference.
10835         (Check_In_Out_States): Update
10836         comment on usage. Add a specialized error message for Proof_In
10837         constituents. Enhance the error message with a reference.
10838         (Check_Input_States): Update comment on usage. Account for
10839         possible Proof_In constituents. Enhance the error message
10840         with a areference.
10841         (Check_Matching_Constituent): Enhance the error message with a
10842         reference.
10843         (Check_Matching_State): Enchance the error message with a reference.
10844         (Check_Mode): Add local variable From_Global. Update the call to
10845         Find_Mode.  Emit more precise error messages concerning extra items
10846         (Check_Mode_Restriction_In_Enclosing_Context): Consider
10847         pragma Refined_Global.  Enhance the error message with a
10848         reference.
10849         (Check_Mode_Restriction_In_Function): Enhance the error message with
10850         a reference.
10851         (Check_Output_States): Update comment on usage. Add local variable
10852         Posted.  Account for possible Proof_In constituents. Produce a detailed
10853         list of missing constituents.
10854         (Check_Proof_In_States): New routine.
10855         (Check_Refined_Global_Item): Handle Proof_In
10856         constituents. Enchance the error message with a reference.
10857         (Collect_Global_Items): Add formal parameters Proof_In_Items
10858         and Has_Proof_In_State. Update the comment on usage. Account
10859         for Proof_In items.
10860         (Create_Or_Modify_Clause): Enchance
10861         the error message with a reference.
10862         (Find_Mode): Add
10863         formal parameter From_Global. Update the comment on usage.
10864         Detect when the mode is governed by pragma [Refined_]Global.
10865         (Output_Constituents): Removed.
10866         (Report_Extra_Constituents):
10867         Report extra Proof_In constituents.
10868         (Report_Unused_Constituents): Removed.
10869         (Usage_Error): Code reformatting. Enhance the error
10870         messages with reference.
10871         * sem_prag.ads (Analyze_External_Property_In_Decl_Part): New routine.
10872         (Analyze_External_State_In_Decl_Part): Removed.
10873         * sem_res.adb (Resolve_Actuals): Update the volatile object
10874         detection. Enhance the error message with a reference.
10875         (Resolve_Entity_Name): Update the volatile object
10876         detection. Enhance the error message with a reference.
10877         * sem_util.adb (Is_Refined_State): Add a guard to avoid a crash.
10878         (Is_SPARK_Volatile_Object): New routine.
10879         (Has_Volatile_Component): New routine.
10880         * sem_util.ads (Is_Delegate): Alphabetized.
10881         (Is_SPARK_Volatile_Object): New routine.
10882         (Has_Volatile_Component): New routine.
10883         * snames.ads-tmpl: Remove names Name_Input_Only and Name_Output_Only.
10885 2014-01-27  Ed Schonberg  <schonberg@adacore.com>
10887         * sem_attr.adb: Resolve fully prefix of 'Update.
10889 2014-01-27  Ben Brosgol  <brosgol@adacore.com>
10891         * gnat_rm.texi: Minor clarifications.
10893 2014-01-27  Robert Dewar  <dewar@adacore.com>
10895         * sem_elab.adb (Check_Internal_Call_Continue): Avoid complaining
10896         about call that is generated as part of an Initial_Condition
10897         check.
10898         * sem_prag.adb: Minor spelling correction.
10900 2014-01-27  Robert Dewar  <dewar@adacore.com>
10902         * sem_prag.adb (Set_Convention_From_Pragma): Check that
10903         convention Ghost can only apply to functions.
10904         * einfo.ads, einfo.adb (Is_Ghost_Subprogram): Add clarifying comment.
10906 2014-01-27  Robert Dewar  <dewar@adacore.com>
10908         * gnat_ugn.texi: Add Short_Enums to documentation of
10909         -gnatet/-gnateT.
10911 2014-01-27  Robert Dewar  <dewar@adacore.com>
10913         * sem_prag.adb (Analyze_Input_Item): Correct check for input
10914         item in same package.
10915         * sem_util.ads, sem_util.adb (Within_Scope): New function.
10917 2014-01-26  Arnaud Charlet  <charlet@adacore.com>
10919         * a-intnam-lynxos.ads, mlib-tgt-specific-lynxos.adb,
10920         s-osinte-lynxos-3.adb, s-osinte-lynxos-3.ads, s-osinte-lynxos.adb,
10921         s-osinte-lynxos.ads, s-taprop-lynxos.adb, s-tpopsp-lynxos.adb,
10922         system-lynxos-ppc.ads, system-lynxos-x86.ads: Removed, no longer
10923         maintained.
10925 2014-01-25  Eric Botcazou  <ebotcazou@adacore.com>
10927         * gcc-interface/Makefile.in: Fix oversight.
10929 2014-01-25  Eric Botcazou  <ebotcazou@adacore.com>
10931         * gcc-interface/utils.c (convert_to_fat_pointer): Un-obfuscate the
10932         conversion from a thin pointer with a shifted value.
10933         * gcc-interface/utils2.c (gnat_build_constructor): Propagate the
10934         read-only flag from the values onto the result.
10935         (gnat_invariant_expr): Accept read-only CONSTRUCTORs.
10937 2014-01-25  Tristan Gingold  <gingold@adacore.com>
10939         * gcc-interface/decl.c (gnat_to_gnu_entity): Always build a variable
10940         for E_Variable with a pragma Linker_Section.
10942 2014-01-25  Robert Dewar  <dewar@adacore.com>
10944         * gcc-interface/decl.c (gnat_to_gnu_param): Make sure an Out parameter
10945         with Default_Value aspect is passed in by copy.
10947 2014-01-24  Eric Botcazou  <ebotcazou@adacore.com>
10949         * set_targ.adb: Set Short_Enums.
10950         * gcc-interface/lang.opt (fshort-enums): New option.
10951         * gcc-interface/misc.c (gnat_handle_option): Handle it.
10952         (gnat_post_options): Do not modify the global settings.
10954 2014-01-24  Robert Dewar  <dewar@adacore.com>
10956         * g-rannum.ads, g-rannum.adb (Random_Ordinary_Fixed): New generic
10957         function.
10958         (Random_Decimal_Fixed): New generic function.
10959         * s-rannum.ads: Minor comment clarifications.
10961 2014-01-24  Robert Dewar  <dewar@adacore.com>
10963         * back_end.adb: Remove Short_Enums handling (handled in
10964         Ttypes/Get_Targ now) Minor added comments.
10965         * freeze.adb: Change name Short_Enums_On_Target to
10966         Target_Short_Enums.
10967         * get_targ.ads, get_targ.adb (Get_Short_Enums): New function.
10968         * opt.ads: Minor comment updates.
10969         * sem_ch13.adb: Change name Short_Enums_On_Target to
10970         Target_Short_Enums.
10971         * set_targ.adb: Set Short_Enums from gcc back end.
10972         * set_targ.ads (Short_Enums): New variable.
10973         * targparm.ads, targparm.adb: Remove Short_Enums entries (handled in
10974         Ttypes/Get_Targ now).
10975         * ttypes.ads (Target_Short_Enums): New constant boolean switch
10977 2014-01-24  Pascal Obry  <obry@adacore.com>
10979         * g-sercom-mingw.adb: Fix serial port name for port number > 10.
10981 2014-01-24  Gary Dismukes  <dismukes@adacore.com>
10983         * exp_disp.adb (Expand_Dispatching_Call): Call Unqualify on Param when
10984         comparing it with Ctrl_Arg, since Ctrl_Arg may have had qualification
10985         stripped off.
10987 2014-01-24  Robert Dewar  <dewar@adacore.com>
10989         * sinfo.ads, make.adb, prj-env.adb: Minor reformatting.
10991 2014-01-24  Vincent Celier  <celier@adacore.com>
10993         * prj.adb (Add_Aggregated_Project): Do not add a project in
10994         the list if it is already there.
10996 2014-01-24  Yannick Moy  <moy@adacore.com>
10998         * lib-xref-spark_specific.adb (Enclosing_Subprogram_Or_Package):
10999         Correct the search for a subrogram declaration to which a pragma is
11000         attached.
11002 2014-01-24  Bob Duff  <duff@adacore.com>
11004         * gnat_ugn.texi: Document --decimal-grouping and
11005         --based-grouping switches in gnatpp.
11007 2014-01-24  Ed Schonberg  <schonberg@adacore.com>
11009         * sinfo.ads: Documentation update.
11011 2014-01-24  Ed Schonberg  <schonberg@adacore.com>
11013         * sem_ch3.adb (Constant_Redeclaration): New declaration is
11014         illegal if previous one has an initial expression that is an
11015         aggregate expanded into assignments.
11017 2014-01-24  Ed Schonberg  <schonberg@adacore.com>
11019         * sem_ch5.adb (Analyze_Loop_Parameter_Specification): Small
11020         code reorganization to remove spurious warning on a loop with
11021         an array element iterator that has a null range.
11023 2014-01-24  Vincent Celier  <celier@adacore.com>
11025         * make.adb (Binding_Phase): When setting the Ada paths, use
11026         the library ALI dir, not the object dir in libraries.
11028 2014-01-24  Yannick Moy  <moy@adacore.com>
11030         * sinfo.ads: Add documentation of check flag fields.
11032 2014-01-24  Ed Schonberg  <schonberg@adacore.com>
11034         * sem_res.adb (Resolve_Actuals): If an actual is a view
11035         conversion of a discriminated object, and the formal type is
11036         discriminated and constrained, apply a discriminant check to
11037         the object itself.
11039 2014-01-24  Robert Dewar  <dewar@adacore.com>
11041         * prj.adb, prj-env.adb, back_end.adb: Add comment, minor code clean ups.
11043 2014-01-24  Ed Schonberg  <schonberg@adacore.com>
11045         * sem_ch3.adb (Analyze_Declarations): At the end of an
11046         appropriate declarative part, call Freeze_All from the first
11047         declaration in the scope, not from the first unfrozen one. This
11048         is necessary to apply visibility checks to entities with delayed
11049         aspects. Otherwise, in the presence of instantiations and cleanups
11050         that they may generate, the delayed aspects may be analyzed too
11051         late and produce spurious visibility errors.
11052         * sem_attr.adb: Place etype on range.
11053         * sem_ch6.adb: Documentation expression functions.
11055 2014-01-24  Robert Dewar  <dewar@adacore.com>
11057         * exp_ch7.adb: Minor change of Indices to Indexes (preferred
11058         terminology in compiler).
11060 2014-01-24  Robert Dewar  <dewar@adacore.com>
11062         * scans.ads: Remove Tok_Raise from Sterm, Eterm, After_SM
11063         categories, now that Ada 95 supports raise expressions.
11065 2014-01-24  Robert Dewar  <dewar@adacore.com>
11067         * freeze.adb (Freeze_Enumeration_Type): Use new target parameter
11068         Short_Enums_On_Target.
11069         * sem_ch13.adb (Set_Enum_Esize): Take Short_Enums_On_Target
11070         into account.
11071         * targparm.ads, targparm.adb: Add new target parameter Short_Enums.
11073 2014-01-24  Ed Schonberg  <schonberg@adacore.com>
11075         * sem_ch5.adb (Analyze_Iterator_Specification): If subtype
11076         indication is given explicity, check that it matches the array
11077         component type or the container element type of the domain
11078         of iteration.
11080 2014-01-24  Tristan Gingold  <gingold@adacore.com>
11082         * back_end.adb (Scan_Compiler_Arguments): Set Short_Enums_On_Target.
11083         * gcc-interface/misc.c (flag_short_enums): Declare.
11084         (gnat_post_options): Set it.
11086 2014-01-24  Vincent Celier  <celier@adacore.com>
11088         * prj-env.adb (Ada_Objects_Path): Use Ada_Objects_Path_No_Libs
11089         to cache the result when Including_Libraries is False.
11090         * prj-env.ads (Ada_Objects_Path): Update documentation
11091         * prj.adb (Free (Project_Id)): Also free Ada_Objects_Path_No_Libs
11092         (Get_Object_Directory): Return the Library_Ali_Dir only when
11093         when Including_Libraries is True.
11094         * prj.ads (Get_Object_Directory): Fix and complete documentation
11095         (Project_Data): New component Ada_Objects_Path_No_Libs
11097 2014-01-24  Robert Dewar  <dewar@adacore.com>
11099         * checks.adb (Expr_Known_Valid): Result of fpt operator never
11100         considered valid.
11102 2014-01-24  Eric Botcazou  <ebotcazou@adacore.com>
11104         * back_end.adb: Minor fix in comment.
11106 2014-01-24  Javier Miranda  <miranda@adacore.com>
11108         * sem_ch3.adb (Check_Abstract_Overriding): Code reestructuration
11109         required to report the error in case of task types.
11111 2014-01-24  Ed Schonberg  <schonberg@adacore.com>
11113         * sem_attr.adb: Additional index checking.
11115 2014-01-24  Ed Schonberg  <schonberg@adacore.com>
11117         * sem_attr.adb (Analyze_Attribute, case 'Update): Analyze
11118         expressions in each component association, and for records note
11119         the entity in each association choice, for subsequent resolution.
11120         (Resolve_Attribute, case 'Update): Complete resolution of
11121         expressions in each component association.
11123 2014-01-24  Robert Dewar  <dewar@adacore.com>
11125         * sem.adb (Sem): Avoid premature reference to Current_Sem_Unit
11126         (this was causing Is_Main_Unit_Or_Main_Unit_Spec to be set wrong,
11127         leading to wrong handling of SPARK_Mode for library units).
11129 2014-01-24  Robert Dewar  <dewar@adacore.com>
11131         * sem_ch6.adb (Analyze_Subprogram_Body_Helper): Set SPARK_Mode
11132         on generic instances (do not consider them to be internally
11133         generated)
11135 2014-01-24  Doug Rupp  <rupp@adacore.com>
11137         * s-osinte-android.ads (pthread_sigmask): Import sigprocmask
11138         vice pthread_sigmask.
11140 2014-01-24  Vincent Celier  <celier@adacore.com>
11142         * prj.adb (Debug_Output (Str, Str2)): Output if verbosity is
11143         not default.
11145 2014-01-24  Vincent Celier  <celier@adacore.com>
11147         * prj-ext.adb (Add): Do not output anything when Silent is True,
11148         whatever the verbosity. When Source is From_External_Attribute,
11149         set the corresponding environment variable if it is not already set.
11150         * prj-ext.ads (Add): New Boolean parameter Silent, defaulted
11151         to False
11152         * prj-proc.adb (Process_Expression_For_Associative_Array):
11153         For attribute External, call Prj.Ext.Add with Silent set to
11154         True for the child environment, to avoid useless output in non
11155         default verbosity.
11157 2014-01-24  Ed Schonberg  <schonberg@adacore.com>
11159         * sem_res.adb (Set_Slice_Subtype): Handle properly a discrete
11160         range given by a subtype indication, and force evaluation of
11161         the bounds, as for a simple range.
11162         * exp_util.adb (Evaluate_Slice_Bounds): Utility to force evaluation
11163         of bounds of slice for various kinds of discrete ranges.
11164         (Evaluate_Name, Evaluate_Subtype_From_Expr): use
11165         Evaluate_Slice_Bounds.
11167 2014-01-24  Bob Duff  <duff@adacore.com>
11169         * s-taskin.ads (Activator): Make this Atomic, because
11170         Activation_Is_Complete reads it, and that can be called
11171         from any task. Previously, this component was only
11172         modified by the activator before activation, and by
11173         Self after activation.
11174         * a-taside.ads, a-taside.adb (Environment_Task,
11175         Activation_Is_Complete): Implement these missing functions.
11177 2014-01-24  Doug Rupp  <rupp@adacore.com>
11179         * init.c: Add a handler section for Android.
11181 2014-01-24  Arnaud Charlet  <charlet@adacore.com>
11183         * i-cexten.ads (Unsigned_33..64, Unsigned_33..64): New types.
11185 2014-01-24  Ed Schonberg  <schonberg@adacore.com>
11187         * sem_ch4.adb (Operator_Check): If one operand is a
11188         Raise_Expression, set its type to that of the other operand.
11189         * sem_res.adb (Resolve_Raise_Expression): new procedure.
11190         (Resolve_Actuals): For an actual that is a Raise_Expression,
11191         set the type to that of the formal.
11192         * sem_type.adb (Find_Unique_Type): If one of the operands is a
11193         Raise_Expression, return type of the other operand.
11195 2014-01-24  Ed Schonberg  <schonberg@adacore.com>
11197         * sem_aggr.adb (Resolve_Record_Aggregate): If a scalar
11198         component of the record has a type with a default aspect, and
11199         the corresponding aggregate component is initiaized with a box,
11200         use the default value in the rewritten aggregate.
11202 2014-01-24  Tristan Gingold  <gingold@adacore.com>
11204         * s-interr.ads, s-interr.adb, s-interr-hwint.adb, s-interr-vms.adb,
11205         s-interr-sigaction.adb,
11206         s-interr-dummy.adb (Install_Restricted_Handlers): Add Prio parameter.
11207         * exp_ch9.adb (Make_Initialize_Protection): Add Prio parameter
11208         to the call to Install_Restricted_Handlers.
11210 2014-01-24  Emmanuel Briot  <briot@adacore.com>
11212         * prj-nmsc.adb (Check_File): Add protection when the source is
11213         not fully initialized.
11215 2014-01-24  Ed Schonberg  <schonberg@adacore.com>
11217         * sem_util.adb (Is_Post_State): In a postcondition, a selected
11218         component that denotes an implicit dereference is a reference
11219         to the post state of the subprogram.
11221 2014-01-24  Robert Dewar  <dewar@adacore.com>
11223         * sem_ch6.adb (Analyze_Subprogram_Body_Helper): SPARK_Mode OFF
11224         for generated subprograms.
11225         (Analyze_Subprogram_Specification): Ditto.
11227 2014-01-24  Vincent Celier  <celier@adacore.com>
11229         * prj-dect.adb (Check_Attribute_Allowed): Detect more forbidden
11230         attributes in package Builder of aggregate and aggregate library
11231         projects.
11232         * prj-nmsc.adb (Process_Naming_Scheme.Check.Check_Aggregate):
11233         Remove procedure (Process_Naming_Scheme.Check.Check_Aggregated):
11234         Remove parameters.  Change error message from "... externally
11235         build library ..." to "... externally built project ...".
11236         (Process_Naming_Scheme.Check): Do not do any check in aggregate
11237         project, as attribute Library_Dir and Library_Name have already
11238         been detected as forbidden.
11240 2014-01-24  Vincent Celier  <celier@adacore.com>
11242         * prj-env.adb (Find_Project): If cached project path is not in
11243         project directory, look in current directory first and use cached
11244         project path only if project is not found in project directory.
11246 2014-01-24  Robert Dewar  <dewar@adacore.com>
11248         * sem_util.adb, lib-xref.adb: Correct false positive warnings.
11250 2014-01-24  Vincent Celier  <celier@adacore.com>
11252         * projects.texi: Document that aggregate projects are only
11253         supported by gprbuild, but not by gnatmake.  Document that the
11254         only attribute Switches in package Binder of aggregate projects
11255         will be ignored if its index is not others.  Document that
11256         attribute Global_Config_File is allowed in package Binder of
11257         aggregate projects.
11259 2014-01-24  Robert Dewar  <dewar@adacore.com>
11261         * sem_prag.adb: Minor code reorganization.
11262         * sem_util.adb: Minor fix of potential latent bug in Is_LHS.
11264 2014-01-24  Pascal Obry  <obry@adacore.com>
11266         * prj-attr.adb, projects.texi, snames.ads-tmpl: Add Excluded_Patterns
11267         attribute definition.
11269 2014-01-24  Vincent Celier  <celier@adacore.com>
11271         * makeutl.adb (Queue.Insert_No_Roots): In gprbuild, do not put
11272         in the Queue the same source (same path, same multi-source index)
11273         from the same project file, to avoid compiling several times
11274         the same source.
11276 2014-01-24  Eric Botcazou  <ebotcazou@adacore.com>
11278         * einfo.ads (First_Rep_Item): Remove obsolete stuff.
11279         (Has_Gigi_Rep_Item): Likewise.
11280         * sem_prag.adb (Analyze_Pragma) <Pragma_Linker_Section>: Do not set
11281         Has_Gigi_Rep_Item for objects.
11282         * gcc-interface/decl.c (prepend_one_attribute_to): Rename into...
11283         (prepend_one_attribute): ...this.
11284         (prepend_one_attribute_pragma): New function extracted from...
11285         (prepend_attributes): ...here.  Swap the parameters for consistency.
11286         (gnat_to_gnu_entity): Adjust calls to prepend_one_attribute_to and to
11287         prepend_attributes.
11288         <object>: Deal with a pragma Linker_Section on a constant
11289         or variable.  <E_Function>: Deal with a pragma Linker_Section
11290         on a subprogram.
11291         (get_minimal_subprog_decl): Adjust calls to prepend_one_attribute_to.
11293 2014-01-24  Vincent Celier  <celier@adacore.com>
11295         * opt.ads: Minor comment update.
11297 2014-01-24  Robert Dewar  <dewar@adacore.com>
11299         * sem_prag.adb (Analyze_Input_Output): Add missing error check
11300         for junk operand.
11301         * sem_util.adb (Is_Refined_State): Add defense against junk
11302         tree from error.
11304 2014-01-24  Pascal Obry  <obry@adacore.com>
11306         * projects.texi: Removes Build_Slaves attribute documentation.
11308 2014-01-23  Robert Dewar  <dewar@adacore.com>
11310         * opt.adb (Register_Opt_Config_Switches): Save SPARK_Mode_Pragma
11311         setting.
11313 2014-01-23  Ed Schonberg  <schonberg@adacore.com>
11315         * sem_util.adb (Is_Potentially_Unevaluated): Predicate only
11316         applies to expressions that come from source.
11317         * sem_attr.adb (Analyze_Attribute, case 'Old): Improve error
11318         message.
11319         (Analyze_Attribute, case 'Loop_Entry): Apply SPARK 2014 legality
11320         rule regarding potentially unevaluated expressions, to prefix
11321         of attribute.
11323 2014-01-23  Ed Schonberg  <schonberg@adacore.com>
11325         * exp_util.adb (Make_Invqriant_Call): If type of expression is
11326         a private extension, get invariant from base type.
11328 2014-01-23  Robert Dewar  <dewar@adacore.com>
11330         * sem_util.adb, sem_attr.adb: Minor reformatting.
11332 2014-01-23  Robert Dewar  <dewar@adacore.com>
11334         * opt.adb (Save_Opt_Config_Switches): Save SPARK_Mode_Pragma
11335         (Restore_Opt_Config_Switches): Restore SPARK_Mode_Pragma.
11336         * sem.adb (Semantics): Remove save/restore of
11337         SPARK_Mode[_Pragma]. Not needed since already done in
11338         Save/Restore_Opt_Config_Switches.
11340 2014-01-23  Robert Dewar  <dewar@adacore.com>
11342         * gnat_rm.texi, einfo.adb, einfo.ads, sem_prag.adb, gnat_ugn.texi,
11343         freeze.adb, repinfo.adb, aspects.adb, aspects.ads, sem_ch13.adb:
11344         Linker_Section enhancements.
11346 2014-01-23  Tristan Gingold  <gingold@adacore.com>
11348         * gnat_rm.texi: Minor editing.
11350 2014-01-23  Robert Dewar  <dewar@adacore.com>
11352         * opt.adb (Set_Opt_Config_Switches): Reset SPARK mode for
11353         with'ed internal units.
11354         * sem.adb (Semantics): Save and restore SPARK_Mode[_Pragma].
11356 2014-01-23  Javier Miranda  <miranda@adacore.com>
11358         * lib-xref.adb (Generate_Reference): As part of processing the
11359         "end-of-spec" reference generate an extra reference to the first
11360         private entity of the package.
11361         * xr_tabls.adb (Add_Reference): No action needed for the extra
11362         'E' reference associated; similar to the processing of the
11363         'e' reference.
11365 2014-01-23  Bob Duff  <duff@adacore.com>
11367         * gnat_ugn.texi: Change "--&pp off" to "--!pp off".
11369 2014-01-23  Ed Schonberg  <schonberg@adacore.com>
11371         * sem_util.ads, sem_util.adb (Is_Potentially_Unevaluated): new
11372         predicate to implement rule given in 6.1.1 (20/3).
11373         * sem_attr.adb (Analyze_Attribute, case 'Old): Reject prefix of
11374         'Old in a postcondition, if it is potentially unevaluated and
11375         it is not an entity name.
11377 2014-01-23  Bob Duff  <duff@adacore.com>
11379         * gnat_ugn.texi: Document the new "--&pp off" feature of gnatpp.
11381 2014-01-23  Robert Dewar  <dewar@adacore.com>
11383         * gnatlink.adb (Gnatlink): Fix problem of generating bad name
11384         msg on VMS.
11386 2014-01-23  Bob Duff  <duff@adacore.com>
11388         * g-dynhta.ads: Minor comment fix.
11390 2014-01-23  Yannick Moy  <moy@adacore.com>
11392         * sem_ch6.adb (Analyze_Subprogram_Body_Helper): Inherit SPARK_Mode
11393         from spec on body only when not already inherited on spec. Set
11394         SPARK_Mode from context on body without previous spec.  *
11395         * sem_prag.adb (Analyze_Pragma): Check placement of pragma on
11396         library-level entities.  Correct retrieval of entity from
11397         declaration, for cases where the declaration is not a unit.
11398         * sem_ch12.adb (Instantiate_Object): Avoid
11399         calling Is_Volatile_Object on an empty node.
11401 2014-01-23  Robert Dewar  <dewar@adacore.com>
11403         * gnatlink.adb (Gnatlink): Check for suspicious executable file
11404         names on windows.
11406 2014-01-23  Robert Dewar  <dewar@adacore.com>
11408         * a-ngelfu.ads: Remove bad uses of AND which should be AND THEN.
11409         * sem_res.adb (Check_No_Direct_Boolean_Operators): Don't give
11410         style errors in instances.
11411         * g-dynhta.ads (Static_HTable): Comment updates.
11413 2014-01-23  Vincent Celier  <celier@adacore.com>
11415         * prj-conf.adb (Get_Or_Create_Configuration_File): Do not attempt
11416         to find a configuration project file when Config_File_Name is
11417         No_Configuration_File.
11418         * prj-conf.ads (No_Configuration_File): New constant String.
11419         * prj-pars.adb (Parse): Call Get_Or_Create_Configuration_File
11420         with Config_File_Name set to No_Configuration_File, so that
11421         no existing configuration project file will be used, and the
11422         configuration project will be only created in memory when
11423         Add_Default_GNAT_Naming_Scheme is called.
11424         * projects.texi: Minor reformatting.
11426 2014-01-23  Vincent Celier  <celier@adacore.com>
11428         * prj-conf.adb (Get_Or_Create_Configuration_File): Never parse
11429         a config project file if On_Load_Config is not null.
11430         * prj-pars.adb: Minor comment changes.
11432 2014-01-23  Ed Schonberg  <schonberg@adacore.com>
11434         * lib-xref.adb (Output_References): Output progenitors of
11435         synchronized tagged types, for source navigation.
11437 2014-01-23  Robert Dewar  <dewar@adacore.com>
11439         * exp_util.adb, sinfo.adb, sinfo.ads, sem.adb, sem_res.adb,
11440         expander.adb, exp_ch11.adb, exp_ch11.ads, sem_ch11.adb, sem_ch11.ads,
11441         sprint.adb, sprint.ads: Remove unused node N_Subprogram_Info.
11443 2014-01-23  Emmanuel Briot  <briot@adacore.com>
11445         * prj-conf.adb (Get_Or_Create_Configuration_File): call
11446         On_Load_Config later.
11448 2014-01-23  Hristian Kirtchev  <kirtchev@adacore.com>
11450         * sem_ch3.adb (Analyze_Declarations): Do not
11451         generate the spec of the late primitive in ASIS mode. Add two
11452         comments to explain the special cases when the expansion is
11453         not performed.
11455 2014-01-23  Robert Dewar  <dewar@adacore.com>
11457         * sem_util.adb (Note_Possible_Modification): Fix error of
11458         misbehaving for implicit dereference cases in -gnatc mode.
11460 2014-01-23  Emmanuel Briot  <briot@adacore.com>
11462         * prj-pars.adb: Minor reformatting.
11464 2014-01-22  Ed Schonberg  <schonberg@adacore.com>
11466         * sem_ch6.adb (Analyze_Subprogram_Body_Helper): A subprogram
11467         body generated for an expression function within a protected body
11468         needs a set of renaming declarations if the expression function
11469         comes from source.
11471 2014-01-22  Ed Schonberg  <schonberg@adacore.com>
11473         * lib-xref.adb (Get_Type_Reference): In semantics-only mode,
11474         list interface progenitor of a tagged concurrent type, for better
11475         source navigation.
11477 2014-01-22  Robert Dewar  <dewar@adacore.com>
11479         * lib.adb (In_Extended_Main_Code_Unit): Return False for
11480         Standard_Location.
11481         (In_Extended_Main_Source_Unit): Return False for Standard_Location.
11482         * lib.ads (In_Extended_Main_Code_Unit): Add documentation on
11483         treatment of Slocs No_Location and Standard_Location.
11484         * restrict.adb (Check_Restriction_No_Dependence): Explicitly
11485         check for entity with Standard_Location Sloc, rather than relying
11486         on Lib routines to do that.
11487         * sem_res.adb (Resolve_Call): Implement SPARK_05 restriction
11488         that a call cannot occur before a later occuring body within
11489         the same unit.
11491 2014-01-22  Thomas Quinot  <quinot@adacore.com>
11493         * rtsfind.adb: Update comment.
11495 2014-01-22  Hristian Kirtchev  <kirtchev@adacore.com>
11497         * sem_aux.ads, sem_aux.adb (Is_Body): New routine.
11498         * sem_ch3.adb (Analyze_Declarations): Add local variable
11499         Body_Seen. Generate the spec of a late controlled
11500         primitive body that is about to freeze its related type.
11501         (Handle_Late_Controlled_Primitive): New routine.
11503 2014-01-22  Robert Dewar  <dewar@adacore.com>
11505         * a-stream.adb: Minor reformatting.
11507 2014-01-22  Ed Schonberg  <schonberg@adacore.com>
11509         * sem_ch8.adb (From_Actual_Package): Introduce a recursive
11510         sub-procedure Declared_In_Actual to handle properly the visibility
11511         of actuals in actual packages, that are themselves actuals to a
11512         actual package of the current instance. This mimics properly the
11513         visibility of formals of formal packages declared with a box,
11514         within the corresponding generic unit.
11516 2014-01-22  Robert Dewar  <dewar@adacore.com>
11518         * checks.adb: Do not assume that a volatile variable is valid.
11520 2014-01-22  Thomas Quinot  <quinot@adacore.com>
11522         * g-catiio.ads (Image, Value): Clarify that these functions
11523         operate in the local time zone.  Minor documentation update.
11525 2014-01-22  Thomas Quinot  <quinot@adacore.com>
11527         * csets.adb, csets.ads, opt.ads: Minor documentation fixes.
11529 2014-01-22  Robert Dewar  <dewar@adacore.com>
11531         * sem_aux.adb, sem_aux.ads, sem_ch3.adb (Has_Unconstrained_Elements):
11532         Moved to sem_aux.adb.
11534 2014-01-22  Robert Dewar  <dewar@adacore.com>
11536         * vms_data.ads: Minor reformatting.
11538 2014-01-22  Robert Dewar  <dewar@adacore.com>
11540         * debug.adb: Document messages affected by -gnatd.E including
11541         the new ones that relate to late definition of equality.
11542         * sem_ch6.adb (Check_Untagged_Equality): In Ada 2012 mode, if
11543         debug flag -gnatd.E is set, then generate warnings rather than
11544         errors.
11545         (Check_Untagged_Equality): In earlier versions of Ada,
11546         generate warnings if Warn_On_Ada_2012_Incompatibility flag is set.
11548 2014-01-22  Robert Dewar  <dewar@adacore.com>
11550         * sem_prag.adb (Usage_Error): Output additional messages for
11551         unconstrained OUT parameters lacking an input dependency.
11553 2014-01-22  Robert Dewar  <dewar@adacore.com>
11555         * sem_ch4.adb: Minor reformatting.
11557 2014-01-22  Robert Dewar  <dewar@adacore.com>
11559         * restrict.ads: Minor reformatting.
11560         * sem_res.adb (Resolve_Call): Check for SPARK_05 restriction that
11561         forbids a call from within a subprogram to the same subprogram.
11563 2014-01-22  Thomas Quinot  <quinot@adacore.com>
11565         * a-stream.ads (Read_SEA, Write_SEA): New subprograms, optimized
11566         stream attributes for Stream_Element_Array.
11567         * a-stream.adb (Read_SEA, Write_SEA): Bodies for the above.
11568         * rtsfind.adb (Check_CRT): Do not reject a reference to an entity
11569         defined in the current scope.
11571 2014-01-22  Robert Dewar  <dewar@adacore.com>
11573         * debug.adb, exp_ch4.adb, erroutc.adb: Minor reformatting.
11575 2014-01-22  Thomas Quinot  <quinot@adacore.com>
11577         * sem_ch7.adb, sem_ch8.adb, exp_ch3.adb: Minor reformatting.
11579 2014-01-22  Thomas Quinot  <quinot@adacore.com>
11581         * sem_ch3.adb (Analyze_Object_Declaration): For a constant
11582         declaration initialized with a function call, whose type
11583         has variable size, need to remove side effects so that the
11584         initialization expression becomes a dereference of a temporary
11585         reference to the function result.
11587 2014-01-22  Yannick Moy  <moy@adacore.com>
11589         * errout.adb (Initialize): Remove trick to add dummy entry
11590         in Warnings table.
11591         * erroutc.adb (Set_Warnings_Mode_Off,
11592         Set_Warnings_Mode_On): Do nothing if warnings are suppressed by
11593         command line switch.
11594         * opt.ads (Warning_Mode): Document behavior
11595         wrt pragma Warnings, in normal mode and in GNATprove_Mode.
11597 2014-01-22  Robert Dewar  <dewar@adacore.com>
11599         * sem_ch3.adb, errout.adb, erroutc.adb: Minor reformatting.
11601 2014-01-22  Robert Dewar  <dewar@adacore.com>
11603         * sem_ch13.adb (Check_Pool_Size_Clash): New procedure
11604         (Analyze_Attribute_Definition_Clause, case Storage_Pool): call
11605         Check_Pool_Size_Clash (Analyze_Attribute_Definition_Clause,
11606         case Storage_Size): call Check_Pool_Size_Clash.
11608 2014-01-22  Robert Dewar  <dewar@adacore.com>
11610         * sem_ch3.adb, exp_util.adb, sem_dim.adb, sem_elab.adb, sem_ch8.adb,
11611         sem_eval.ads: Minor reformatting.
11613 2014-01-22  Thomas Quinot  <quinot@adacore.com>
11615         * sem_eval.adb (Compile_Time_Known_Bounds): Return False for
11616         Any_Composite to prevent cascaded errors.
11618 2014-01-22  Yannick Moy  <moy@adacore.com>
11620         * errout.adb (Initialize): Do not insert special entry in Warnings
11621         table in GNATprove_Mode.
11622         * erroutc.adb (Set_Warnings_Mode_On): Add info in Warnings table in
11623         GNATprove_Mode.
11624         * gnat1drv.adb (Adjust_Global_Switches): Do not suppress frontend
11625         warnings anymore.
11627 2014-01-22  Robert Dewar  <dewar@adacore.com>
11629         * sem_prag.adb (Analyze_Initializes_In_Decl_Part): Handle null
11630         initializes case.
11632 2014-01-22  Robert Dewar  <dewar@adacore.com>
11634         * snames.ads-tmpl: Update header.
11636 2014-01-22  Thomas Quinot  <quinot@adacore.com>
11638         * exp_util.adb (Insert_Actions): When inserting actions on a
11639         short circuit operator that has already been analyzed, do not park
11640         actions in node; instead introduce an N_Expression_With_Actions
11641         and insert actions immediately.
11642         Add guard for unexpected case of climbing up through statement
11643         in Actions list of an N_Expression_With_Actions.
11644         * sem_elab.adb (Insert_Elab_Check): Remove complex
11645         specialized circuitry for the case where the context is already
11646         analyzed, as it is not needed and introduces irregularities in
11647         finalization. Instead rely on the above change to Insert_Actions
11648         to ensure that late insertion on short circuit operators works
11649         as expected.
11651 2014-01-22  Ed Schonberg  <schonberg@adacore.com>
11653         * sem_ch4.adb (Operator_Check): Improve error message when an
11654         operand of concatenation is an access type.
11656 2014-01-22  Thomas Quinot  <quinot@adacore.com>
11658         * sem_dim.adb (Analyze_Dimension_Identifier): Add guard against
11659         cascaded error.
11661 2014-01-22  Ed Schonberg  <schonberg@adacore.com>
11663         * sem_ch8.adb (Find_Selected_Component): Handle properly the case
11664         of an expanded name in a proper body, whose prefix is a package
11665         in the context of the proper body, when there is a homonym of
11666         the package declared in the parent unit.
11668 2014-01-22  Robert Dewar  <dewar@adacore.com>
11670         * sem_warn.adb (Check_Use_Clause): Don't give no entities used
11671         msg if errors found.
11672         (Check_One_Unit): Same change.
11674 2014-01-22  Robert Dewar  <dewar@adacore.com>
11676         * ug_words: Add missing/wrong entries for VMS warning switches.
11677         * sem_prag.adb (Check_Duplicate_Pragma): Avoid flagging parent type.
11679 2014-01-22  Jerome Guitton  <guitton@adacore.com>
11681         * mlib-tgt-specific-vxworks.adb (Get_Target_Suffix): Replace xscale by
11682         arm.
11684 2014-01-22  Robert Dewar  <dewar@adacore.com>
11686         * gnat_rm.texi, gnat_ugn.texi: Document passive task optimization
11688 2014-01-22  Eric Botcazou  <ebotcazou@adacore.com>
11690         * gcc-interface/Makefile.in: Minor fixes.
11692 2014-01-21  Robert Dewar  <dewar@adacore.com>
11694         * par-ch4.adb (P_If_Expression): Rewritten to improve error recovery.
11695         * par-ch5.adb (P_Condition): New version with expression prescanned.
11696         * par.adb (P_Condition): New version with expression prescanned.
11698 2014-01-21  Robert Dewar  <dewar@adacore.com>
11700         * gnat_rm.texi: Document that Allow_Integer_Address is ignored
11701         if Address is not a private type.
11702         * sem_prag.adb (Analyze_Pragma, case Allow_Integer_Address):
11703         Ignore pragma if System.Address is not a private type.
11705 2014-01-21  Arnaud Charlet  <charlet@adacore.com>
11707         * namet.ads (Name_Len): Initialize to 0 to avoid accessing an
11708         uninitialized value.
11710 2014-01-21  Thomas Quinot  <quinot@adacore.com>
11712         * gnat_rm.texi (Scalar_Storage_Order): Update documentation.
11714 2014-01-21  Ed Schonberg  <schonberg@adacore.com>
11716         * sem_ch12.adb (Set_Instance_Env): In Ada 2012 mode, preserve
11717         the value of Assertions_Enabled flag when compiling an instance of
11718         an internal unit. This facilitates the use of pre/postconditions
11719         in generic internal units, such as the new elementary function
11720         libraries.
11722 2014-01-21  Robert Dewar  <dewar@adacore.com>
11724         * exp_aggr.adb: Minor reformatting.
11725         * sem_attr.adb: Minor reformatting.
11726         * sem_res.adb: Minor comment addition.
11727         * einfo.adb: Minor comment updates.
11728         * freeze.adb: Minor reformatting and code reorganization.
11730 2014-01-21  Ed Schonberg  <schonberg@adacore.com>
11732         * par-ch4.adb (P_If_Expression): Handle more gracefully an
11733         elsif clause that does not have an else part.
11735 2014-01-21  Robert Dewar  <dewar@adacore.com>
11737         * checks.adb, sem_util.ads, sem_ch4.adb: Minor reformatting.
11738         * gcc-interface/Makefile.in: clean up target pairs.
11740 2014-01-21  Pascal Obry  <obry@adacore.com>
11742         * projects.texi: Minor typo fix.
11744 2014-01-21  Thomas Quinot  <quinot@adacore.com>
11746         * freeze.adb (Check_Component_Storage_Order): If a record type
11747         has an explicit Scalar_Storage_Order attribute definition clause,
11748         reject any component that itself is of a composite type and does
11749         not have one.
11751 2014-01-21  Ed Schonberg  <schonberg@adacore.com>
11753         * sem_ch10.adb (Generate_Parent_Reference): Make public so it
11754         can be used to generate proper cross-reference information for
11755         the parent units of proper bodies.
11757 2014-01-21  Thomas Quinot  <quinot@adacore.com>
11759         * exp_pakd.adb (Expand_Packed_Element_Set,
11760         Expand_Packed_Element_Reference): No byte swapping required in
11761         the front-end for the case of a reverse storage order array,
11762         as this is now handled uniformly in the back-end.  However we
11763         still need to swap back an extracted element if it is itself a
11764         nested composite with reverse storage order.
11766 2014-01-21  Hristian Kirtchev  <kirtchev@adacore.com>
11768         * sem_prag.adb (Analyze_External_Property): Add processing for "others".
11769         (Analyze_Pragma): Update the grammar of pragma Abstract_State to
11770         include "others".
11772 2014-01-21  Arnaud Charlet  <charlet@adacore.com>
11774         * gnat_ugn.texi: Minor updates.
11776 2014-01-21  Thomas Quinot  <quinot@adacore.com>
11778         * exp_pakd.adb: Update comment, minor reformatting.
11780 2014-01-21  Hristian Kirtchev  <kirtchev@adacore.com>
11782         * sem_ch3.adb (Analyze_Variable_Contract): Trigger the volatile
11783         object check when SPARK_Mode is on.
11784         * sem_ch6.adb (Process_Formals): Trigger the volatile object
11785         check when SPARK_Mode is on.
11786         * sem_ch12.adb (Instantiate_Object): Trigger the volatile object
11787         check when SPARK_Mode is on.
11788         * sem_ch13.adb (Analyze_Aspect_Specifications): Insert the
11789         corresponding pragma of aspect SPARK_Mode in the visible
11790         declarations of a package declaration.
11791         * sem_prag.adb (Analyze_Pragma): Trigger the volatile object
11792         check when SPARK_Mode is on.
11793         * sem_res.adb (Resolve_Actuals): Trigger the volatile object
11794         check when SPARK_Mode is on.
11795         (Resolve_Entity_Name): Trigger
11796         the volatile object check when SPARK_Mode is on.
11798 2014-01-21  Robert Dewar  <dewar@adacore.com>
11800         * sem_ch3.adb, sem_prag.adb, sem_prag.ads, sem_ch12.adb, sem_res.adb,
11801         sem_ch6.adb, a-except-2005.adb: Minor reformatting.
11803 2014-01-21  Ed Schonberg  <schonberg@adacore.com>
11805         * exp_ch3.adb (Expand_N_Object_Declaration): When a class-wide
11806         object is declared, it is rewritten as a renaming of an dynamic
11807         expression that wraps the initial value.  The renaming declaration
11808         is first given an internal name, to prevent collisions with the
11809         entity already declared, and then the name is modified to reflect
11810         the original one. the modification of the name must preserve
11811         the source location of the original, to prevent spurious errors
11812         when compiling with style checks if the declaration involves
11813         more than one entity.
11815 2014-01-21  Hristian Kirtchev  <kirtchev@adacore.com>
11817         * aspects.adb Add entries for Async_Readers, Async_Writers,
11818         Effective_Reads and Effective_Writes in table Canonical_Aspect.
11819         * aspects.ads Add entries for Async_Readers, Async_Writers,
11820         Effective_Reads and Effective_Writes in tables Aspect_Id,
11821         Aspect_Names, Aspect_Delay and Implementation_Defined_Aspect.
11822         * atree.adb (Ekind_In): New version with 8 parameters.
11823         (Node34): New routine.
11824         (Set_Node34): New routine.
11825         * atree.ads (Ekind_In): New version with 8 parameters.
11826         (Node34): New routine.
11827         (Set_Node34): New routine.
11828         * einfo.adb Contract is now Node34.
11829         (Contract): Update the assertion and node usage.
11830         (Get_Pragma): Include pragmas Async_Readers, Async_Writers,
11831         Effective_Reads and Effective_Writes.
11832         (Set_Contract): Update the assertion and node usage.
11833         (Write_Field24_Name): Remove the output for a contract.
11834         (Write_Field34_Name): Add output for a contract.
11835         * einfo.ads Contract is now Node34. Update the comment on
11836         attribute usage and related node structures.
11837         (Get_Pragma): Update the comment on usage.
11838         * par-prag.adb (Prag): Pragmas Async_Readers, Async_Writers,
11839         Effective_Reads and Effective_Writes do not require special
11840         processing by the parser.
11841         * sem_ch3.adb (Analyze_Variable_Contract): New routine.
11842         (Analyze_Declarations): Analyze the contract of a variable at
11843         the end of the declarative region.
11844         (Analyze_Object_Declaration): Create a contract for a variable.
11845         * sem_ch6.adb (Analyze_Subprogram_Contract): Update the retrieval
11846         of classification pragmas.
11847         (Process_Formals): Detect an illegal
11848         use of a volatile object as a formal in a function.
11849         * sem_ch12.adb (Instantiate_Object): Detect an illegal use of
11850         a volatile object as an actual in generic instantiation.
11851         * sem_prag.adb Add entries for Async_Readers, Async_Writers,
11852         Effective_Reads and Effective_Writes in table Sig_Flags.
11853         (Analyze_External_State_In_Decl_Part): New routine.
11854         (Analyze_Global_Item): Detect an illegal use of a volatile object
11855         as a global item of a function.
11856         (Analyze_Pragma): Reimplement
11857         pragma Abstract_State. Add support for pragmas Async_Readers,
11858         Async_Writers, Effective_Reads and Effective_Writes.
11859         (Check_External_Properties): New routine.
11860         * sem_prag.ads (Analyze_External_State_In_Decl_Part): New routine.
11861         (Check_External_Properties): New routine.
11862         * sem_res.adb (Resolve_Actuals): Detect an illegal use of a
11863         volatile object as an actual in a call.
11864         (Resolve_Entity_Name):
11865         Add local variables Par, Prev and Usage_OK. Detect illegal
11866         contexts of volatile objects.
11867         * sem_util.adb (Add_Contract_Item): Add support for
11868         pragmas associated with the contract of a variable.
11869         (Async_Readers_Enabled): New routine.
11870         (Async_Writers_Enabled): New routine.
11871         (Effective_Reads_Enabled): New routine.
11872         (Effective_Writes_Enabled): New routine.
11873         (Has_Enabled_Property):
11874         New routine.
11875         (Is_Unchecked_Conversion_Instance): New routine.
11876         (Is_Volatile_Object): Add support for entities that may denote
11877         a volatile object.
11878         * sem_util.ads (Add_Contract_Item): Update the
11879         comment on usage.
11880         (Async_Readers_Enabled): New routine.
11881         (Async_Writers_Enabled): New routine.
11882         (Effective_Reads_Enabled): New routine.
11883         (Effective_Writes_Enabled): New routine.
11884         (Is_Unchecked_Conversion_Instance): New routine.
11885         * sinfo.ads Update the comment on the structure of N_Contract.
11886         * snames.ads-tmpl Add predefined names for Async_Readers,
11887         Async_Writers, Effective_Reads and Effective_Writes. Add
11888         pragma ids for Async_Readers, Async_Writers, Effective_Reads
11889         and Effective_Writes.
11891 2014-01-21  Robert Dewar  <dewar@adacore.com>
11893         * exp_ch4.adb (Eval_Op_Expon): Use CRT_Safe_Compile_Time_Known_Value
11894         * sem_eval.adb (Compile_Time_Known_Value): Remove special
11895         handling of CRT mode (CRT_Safe_Compile_Time_Known_Value): New
11896         function (Eval_Op_Expon): Add CRT_Safe in call to Test_Foldable
11897         (Test_Foldable): Add CRT_Safe parameter
11898         * sem_eval.ads (Compile_Time_Known_Value): Remove special
11899         handling of CRT mode.
11900         (CRT_Safe_Compile_Time_Known_Value): New function.
11902 2014-01-21  Robert Dewar  <dewar@adacore.com>
11904         * sem_prag.adb (Analyze_Pragma, case SPARK_Mode): Fix problem
11905         with pragma or aspect that applies to package spec or subprogram
11906         spec.
11908 2014-01-21  Robert Dewar  <dewar@adacore.com>
11910         * exp_aggr.adb: Minor reformatting.
11912 2014-01-21  Johannes Kanig  <kanig@adacore.com>
11914         * gnat1drv.adb (Gnat1drv) remove obsolete reference to -gnatd.H.
11916 2014-01-21  Bob Duff  <duff@adacore.com>
11918         * gnat_ugn.texi: Document the "checks" attribute in gnat2xml.
11920 2014-01-21  Steve Baird  <baird@adacore.com>
11922         * gnat_rm.texi: Improve description of SPARK_Mode pragma.
11924 2014-01-21  Vincent Celier  <celier@adacore.com>
11926         * prj-part.adb (Parse_Single_Project): Accept to extend a project
11927         if it has only be imported by an project being extended. When a
11928         project that has only been imported by a project being extended
11929         is imported by another project that is not being extended,
11930         reset the previous indication, so that it will be an error if
11931         this project is extended later.
11932         * prj-tree.adb (Create_Project): Include component From_Extended
11933         in table Projects_HT
11934         * prj-tree.ads (Project_Name_And_Node): New Boolean component
11935         From_Extended
11937 2014-01-21  Robert Dewar  <dewar@adacore.com>
11939         * atree.ads, atree.adb: Add Node33 and Set_Node33.
11940         * einfo.ads, einfo.adb (SPARK_Pragma): New field (SPARK_Aux_Pragma):
11941         New field (SPARK_Pragma_Inherited): New flag
11942         (SPARK_Aux_Pragma_Inherited): New flag (SPARK_Mode_Pragmas):
11943         Removed.
11944         * lib.ads, lib.adb: Remove SPARK_Mode_Pragma, no longer used.
11945         * opt.ads (SPARK_Mode_Pragma): New global variable.
11946         * sem.ads: Add Save_SPARK_Mode_Pragma field to Scope_Stack_Entry.
11947         * sem_ch3.adb: Use new SPARK_Mode data structures.
11948         * sem_ch6.adb: Set SPARK_Mode fields in subprogram specs and bodies.
11949         * sem_ch7.adb: Set SPARK_Mode fields in package spec and body entities.
11950         * sem_ch8.adb (Push_Scope): Save SPARK_Mode_Pragma.
11951         (Pop_Scope): Restore SPARK_Mode_Pragma.
11952         * sem_prag.adb (Analyze_Pragma, case SPARK_Mode): Rewrite for
11953         new data structures.
11955 2014-01-21  Arnaud Charlet  <charlet@adacore.com>
11957         * back_end.adb: Undo previous change, not needed. Minor reformatting.
11959 2014-01-21  Thomas Quinot  <quinot@adacore.com>
11961         * exp_ch5.adb: Fix comment.
11962         * switch-c.adb: Minor comment update.
11963         * exp_ch3.adb: Minor reformatting.
11965 2014-01-21  Arnaud Charlet  <charlet@adacore.com>
11967         * back_end.adb (Scan_Compiler_Arguments): Do not store object
11968         filename in gnatprove mode.
11970 2014-01-21  Thomas Quinot  <quinot@adacore.com>
11972         * sinfo.ads (No_Ctrl_Actions): Clarify documentation (flag also
11973         suppresses usage of primitive _assign for tagged types).
11974         * exp_aggr.adb (Build_Array_Aggr_Code.Gen_Assign): Set
11975         No_Ctrl_Actions for a tagged type that does not require
11976         finalization, as we want to disable usage of _assign (which
11977         may cause undesirable discriminant checks on an uninitialized,
11978         invalid target).
11980 2014-01-21  Ed Schonberg  <schonberg@adacore.com>
11982         * sem_prag.adb: Reject invariant'class on completion.
11984 2014-01-21  Javier Miranda  <miranda@adacore.com>
11986         * exp_ch3.adb (Build_Init_Procedure): For
11987         derivations of interfaces, do not move the the initialization
11988         of the _parent field since such assignment is not generated.
11990 2014-01-21  Ed Schonberg  <schonberg@adacore.com>
11992         * sem_res.adb (Rewrite_Renamed_Operator): Do not replace entity
11993         with the operator it renames if we are within an expression of
11994         a pre/postcondition, because the expression will be reanalyzed
11995         at a later point, and the analysis of the renaming may affect
11996         the visibility of the operator when in an instance.
11998 2014-01-21  Robert Dewar  <dewar@adacore.com>
12000         * sinfo.ads, sinfo.adb: Change Do_Discriminant_Check to use new Flag1.
12001         Add this flag to type conversion nodes and assignment nodes.
12002         * treepr.adb: Deal properly with Flag 1,2,3.
12003         * treeprs.adt: Minor comment update.
12005 2014-01-21  Robert Dewar  <dewar@adacore.com>
12007         * sem_eval.adb (Compile_Time_Known_Value): Add Ignore_CRT
12008         parameter.
12009         * sem_eval.ads (Compile_Time_Known_Value): Add Ignore_CRT
12010         parameter, completely rewrite spec.
12012 2014-01-21  Ed Schonberg  <schonberg@adacore.com>
12014         * sem_ch10.adb (Install_Withed_Unit): If the unit is a subprogram
12015         instance that is inlined, it may have been rewritten as a wrapper
12016         package. In that case the unit that must be made visible is the
12017         related instance of the package.
12019 2014-01-21  Arnaud Charlet  <charlet@adacore.com>
12021         * exp_ch9.adb (Expand_N_Selective_Accept.Add_Accept): Refine
12022         previous change in codepeer mode.
12024 2014-01-21  Arnaud Charlet  <charlet@adacore.com>
12026         * exp_ch9.adb (Expand_N_Selective_Accept.Add_Accept): Always add
12027         call to Abort_Undefer, as expected by the runtime.
12028         * s-tasren.adb (Local_Complete_Rendezvous): Replace
12029         Defer_Abort_Nestable by Defer_Abort, since we do not expect abort to be
12030         deferred at this point. Update comments.
12032 2014-01-21  Thomas Quinot  <quinot@adacore.com>
12034         * exp_ch4.adb, exp_ch5.adb, checks.adb: Minor reformatting.
12036 2014-01-21  Arnaud Charlet  <charlet@adacore.com>
12038         * switch-c.adb, usage.adb, gnat_ugn.texi: Mark -gnates as internal,
12039         remove from doc.
12041 2014-01-21  Robert Dewar  <dewar@adacore.com>
12043         * switch-c.adb, usage.adb, atree.adb, atree.ads: Minor reformatting.
12045 2014-01-21  Thomas Quinot  <quinot@adacore.com>
12047         * atree.adb, atree.ads (Num_Extension_Nodes): Switch to Node_Id, since
12048         this is value is used in Node_Id arithmetic operations.
12049         (Copy_Node, Exchange_Entities): Use loops indexed by Num_Extension_Nodes
12050         instead of hard-coded unrolled code.
12052 2014-01-21  Yannick Moy  <moy@adacore.com>
12054         * gnat1drv.adb: Minor code cleanup, removing useless code.
12056 2014-01-21  Arnaud Charlet  <charlet@adacore.com>
12058         * opt.ads (SPARK_Switches_File_Name): New.
12059         * switch-c.adb (Scan_Front_End_Switches): Add handling of -gnates=xxx *
12060         * usage.adb (Usage): Document -gnates, in gnatprove mode only.
12061         * gnat_ugn.texi: Document -gnates.
12063 2014-01-21  Yannick Moy  <moy@adacore.com>
12065         * errout.adb (Special_Msg_Delete): Update comment. Remove
12066         special case for GNATprove which should not ignore mismatch
12067         in sizes for representation clauses.
12068         * sem_prag.adb (Analyze_Pragma): Remove special case for GNATprove
12069         which should not ignore pragma Pack.
12071 2014-01-21  Ed Schonberg  <schonberg@adacore.com>
12073         * sem_ch4.adb: Code clean up.
12075 2014-01-21  Steve Baird  <baird@adacore.com>
12077         * gnat_rm.texi: Improve GNAT RM description of SPARK_Mode pragma.
12079 2014-01-21  Robert Dewar  <dewar@adacore.com>
12081         * gcc-interface/gigi.h: Get Flags array address.
12082         * gcc-interface/trans.c: Acquire Flags array address.
12083         * atree.adb: Add support for Flags array and Flag0,1,2,3.
12084         * atree.ads: Add support for Flags array and Flag0,1,2,3.
12085         * atree.h: Add support for Flags array and Flag0,1,2,3.
12086         * back_end.adb: Pass Flags array address to gigi.
12088 2014-01-21  Ed Schonberg  <schonberg@adacore.com>
12090         * sem_ch8.adb (Attribute_Renaming): Transfer original attribute
12091         reference to generated body so that legality checks on stream
12092         attributes are properly applied. If type is tagged and already
12093         frozen, insert generated body at the point of the renaming
12094         declaration.
12096 2014-01-21  Ed Schonberg  <schonberg@adacore.com>
12098         * sem_ch12.adb: Code clean up.
12099         * sem_ch8.adb: Minor reformatting
12101 2014-01-20  Robert Dewar  <dewar@adacore.com>
12103         * checks.adb: Check SPARK_Mode instead of GNATProve_Mode for
12104         converting warnings on inevitable exceptions to errors.
12105         * exp_ch4.adb: Check SPARK_Mode instead of GNATProve_Mode for
12106         converting warnings on inevitable exceptions to errors.
12107         * opt.adb (SPARK_Mode_Config): Handled like other config flags
12108         * opt.ads (SPARK_Mode_Type): Moved here from types (renamed from
12109         SPARK_Mode_Id) (SPARK_Mode_Type): Add pragma Ordered, remove
12110         SPARK_ from names (SPARK_Mode): New flag (SPARK_Mode_Config):
12111         New flag (Config_Switches_Type): Add SPARK_Mode field
12112         * sem.adb: Minor code reorganization (remove unnecessary with)
12113         * sem.ads (Scope_Stack_Entry): Add Save_SPARK_Mode field
12114         * sem_aggr.adb: Check SPARK_Mode instead of GNATProve_Mode for
12115         converting warnings on inevitable exceptions to errors.
12116         * sem_attr.adb: Check SPARK_Mode instead of GNATProve_Mode for
12117         converting warnings on inevitable exceptions to errors.
12118         * sem_ch3.adb: Check SPARK_Mode instead of GNATProve_Mode for
12119         converting warnings on inevitable exceptions to errors.
12120         * sem_ch4.adb: Check SPARK_Mode instead of GNATProve_Mode for
12121         converting warnings on inevitable exceptions to errors.
12122         * sem_ch6.adb (Analyze_Subprogram_Body_Helper): Reset SPARK_Mode
12123         from spec if needed
12124         * sem_ch7.adb (Analyze_Package_Body_Helper): Reset SPARK_Mode
12125         from spec if needed
12126         * sem_ch8.adb (Push_Scope): Save SPARK_Mode (Pop_Scope):
12127         Restore SPARK_Mode
12128         * sem_elab.adb: Check SPARK_Mode instead of GNATProve_Mode for
12129         converting warnings on inevitable exceptions to errors.
12130         * sem_prag.adb (Get_SPARK_Mode_From_Pragma): New function
12131         (Get_SPARK_Mode_Id): Removed (Get_SPARK_Mode_Type): New name
12132         of Get_SPARK_Mode_Id
12133         * sem_prag.ads (Get_SPARK_Mode_From_Pragma): New function
12134         * sem_res.adb: Check SPARK_Mode instead of GNATProve_Mode for
12135         converting warnings on inevitable exceptions to errors.
12136         * sem_util.adb: Check SPARK_Mode instead of GNATProve_Mode for
12137         converting warnings on inevitable exceptions to errors.
12138         * types.ads (SPARK_Mode_Id): Moved to opt.ads and renamed
12139         SPARK_Mode_Type
12141 2014-01-20  Ed Schonberg  <schonberg@adacore.com>
12143         * sem_ch13.adb: Add semantic information to rewritten type
12144         reference.
12146 2014-01-20  Ed Schonberg  <schonberg@adacore.com>
12148         * exp_ch5.adb (Expand_N_Assignment_Statement): If both sides
12149         are of a type with unknown discriminants, convert both to the
12150         underlying view of the type, so that the proper constraint check
12151         can be applied to the right-hand side.
12153 2014-01-20  Robert Dewar  <dewar@adacore.com>
12155         * atree.adb (Copy_Node): Fix failure to copy last component
12156         (Exchange_Entities): Fix failure to exchange last entity
12158 2014-01-20  Ed Schonberg  <schonberg@adacore.com>
12160         * sem_ch12.adb: Code clean up.
12162 2014-01-20  Robert Dewar  <dewar@adacore.com>
12164         * gnat_rm.texi, sem_ch4.adb: Minor reformatting.
12166 2014-01-20  Ed Schonberg  <schonberg@adacore.com>
12168         * sem_ch4.adb (Analyze_Quantified_Expression): If after
12169         pre-analysis  the loop parameter specification has been
12170         rewritten as a iterator specification, propagate the change to
12171         the quantified expression, for ASIS navigtion needs.
12173 2014-01-20  Vincent Celier  <celier@adacore.com>
12175         * par-ch10.adb: Minor error message change: escape [ and ].
12177 2014-01-20  Robert Dewar  <dewar@adacore.com>
12179         * checks.adb: Make warnings on exceptions into errors in GNATprove mode.
12180         * errout.adb: Implement [ and ] insertion characters.
12181         * errout.ads: Document new [ and ] insertion characters.
12182         * sem_ch12.adb, restrict.adb, frontend.adb, exp_ch7.adb: Minor
12183         addition of ??? comment.
12184         * lib-xref.adb, exp_util.adb, gnat1drv.adb: Minor reformatting
12185         * exp_ch4.adb, sem_ch3.adb, sem_ch4.adb, sem_ch6.adb, sem_elab.adb,
12186         sem_eval.adb, sem_res.adb, sem_util.adb, sem_attr.adb, sem_aggr.adb:
12187         Make warnings on exceptions into errors in GNATprove mode.
12188         * sem_dim.adb: Minor reformatting throughout Quote [ and ]
12189         in error messages.
12191 2014-01-20  Ed Schonberg  <schonberg@adacore.com>
12193         * sem_ch13.adb: Code clean up.
12195 2014-01-20  Robert Dewar  <dewar@adacore.com>
12197         * errout.ads, errout.adb: Implement >? >x? >X? sequences in error
12198         messages.
12199         * sem_ch6.adb (Check_Statement_Sequence): Missing return is an
12200         error in GNATprove mode.
12202 2014-01-20  Ed Schonberg  <schonberg@adacore.com>
12204         * par-ch4.adb (Is_Parameterless_Attribute): The Ada2012 attribute
12205         reference 'Old takes no parameters, and thus can appear as a
12206         prefix of a slice.
12208 2014-01-20  Eric Botcazou  <ebotcazou@adacore.com>
12210         * exp_aggr.adb: Fix minor typos.
12212 2014-01-20  Ed Schonberg  <schonberg@adacore.com>
12214         * sem_attr.adb (Analyze_Attribute, case 'Constrained): In an
12215         instance the attribute is legal, and its value is determined
12216         statically if the type has no discriminants. This choice is
12217         more useful than rechecking the legality rule in the instance,
12218         is consistent with older usage, and is also consistent with all
12219         existing tests.
12221 2014-01-20  Arnaud Charlet  <charlet@adacore.com>
12223         * sem_cat.adb (Validate_Static_Object_Name): Change error into
12224         warning in Relaxed_Semantic_Mode.
12226 2014-01-20  Ed Schonberg  <schonberg@adacore.com>
12228         * sem_attr.adb: Code and comments cleanup.
12230 2014-01-20  Yannick Moy  <moy@adacore.com>
12232         * debug.adb Free debug flags -gnatd.D, -gnatd.G and -gnatd.V *
12233         * errout.adb (Compilation_Errors): Remove special handling in
12234         GNATprove mode.
12235         * gnat1drv.adb (Adjust_Global_Switches): Remove handling of the
12236         removed debug flags.
12237         * gnat_rm.texi: Initial documentation for Abstract_State, Depends,
12238         Global, Initial_Condition, Initializes and Refined_State pragmas and
12239         aspects.
12240         * opt.ads (Frame_Condition_Mode, Formal_Extensions,
12241         SPARK_Strict_Mode): Remove global flags.
12242         * sem_ch3.adb (Analyze_Object_Declaration): Check of no hidden state
12243         always performed now, on packages declaring a null state.
12244         (Signed_Integer_Type_Declaration): Remove ill-designed attempt
12245         at providing pedantic mode for bounds of integer types.
12246         * sem_ch4.adb (Analyze_Quantified_Expression): Warning on suspicious
12247         "some" quantified expression now issued under control of -gnatw.t,
12248         like the other warning on unused bound variable.
12249         * sem_prag.adb (Check_Precondition_Postcondition): Remove useless test
12250         on removed flag.
12251         (Analyze_Pragma): Remove tests for SPARK 2014
12252         pragmas, not officially allowed by GNAT.
12254 2014-01-20  Hristian Kirtchev  <kirtchev@adacore.com>
12256         * sem_prag.adb (Analyze_Pragma): Ensure that
12257         the sole argument of pragmas Abstract_State, Contract_Cases,
12258         Depends, Global and Initializes in in aggregate form.
12259         (Analyze_Refined_Pragma): Ensure that the sole argument of
12260         pragmas Refined_Depends, Refined_Global and Refined_State is in
12261         aggregate form.
12262         (Ensure_Aggregate_Form): New routine.
12264 2014-01-20  Doug Rupp  <rupp@adacore.com>
12266         * sem_attr.adb (Analyze_Attribute): case
12267         Attribute_Constrained => treat all prefixes as legal for Declib
12268         compatibility.
12270 2014-01-20  Hristian Kirtchev  <kirtchev@adacore.com>
12272         * sem_prag.adb (Check_Mode): Reimplement the routine.
12273         (Find_Mode): New routine.
12275 2014-01-20  Robert Dewar  <dewar@adacore.com>
12277         * sem_ch4.adb (Operator_Check): Handle additional
12278         Allow_Integer_Address cases.
12280 2014-01-20  Robert Dewar  <dewar@adacore.com>
12282         * gnat_rm.texi (Allow_Integer_Address): Remove note about not
12283         allowed if address is non-private, no longer true.
12284         * sem_prag.adb (Analyze_Pragma, case Allow_Integer_Address):
12285         Remove check for address being private, causes difficulty when
12286         pragma used in gnat.adc file and is not needed, since we guard
12287         this in Address_Integer_Convert_OK.
12288         * exp_ch7.adb: Minor reformatting.
12289         * sem_ch4.adb: Handle operator operands in Allow_Integer_Address mode.
12291 2014-01-20  Robert Dewar  <dewar@adacore.com>
12293         * checks.adb (Apply_Range_Check): Remove gnatprove special
12294         casing of exponentiation.
12295         * sem_res.adb (Resolve_Op_Expon): Apply range check to right
12296         operand for integer case to check range against Natural.
12298 2014-01-20  Robert Dewar  <dewar@adacore.com>
12300         * s-tataat.adb: Minor reformatting.
12302 2014-01-20  Robert Dewar  <dewar@adacore.com>
12304         * einfo.adb (Is_Descendent_Of_Address): Now applies to all
12305         entities, and also fix documentation to remove mention of visible
12306         integer type, since this is not what the implementation does.
12307         * einfo.ads (Is_Descendent_Of_Address): Now applies to all
12308         entities, and also fix documentation to remove mention of visible
12309         integer type, since this is not what the implementation does.
12310         * gnat_rm.texi: Minor clarification of Allow_Integer_Address
12311         function.
12312         * sem_ch4.adb (Analyze_One_Call): Handle Allow_Integer_Address
12313         case for parameter type check.
12314         * sem_res.adb (Resolve): Use new function
12315         Address_Integer_Convert_OK.
12316         * sem_type.adb: Minor code reorganization (use Ekind_In) Minor
12317         reformatting throughout.
12318         * sem_util.adb (Address_Integer_Convert_OK): New function.
12319         * sem_util.ads: Minor reformatting (put specs in alpha order)
12320         (Address_Integer_Convert_OK): New function.
12322 2014-01-20  Thomas Quinot  <quinot@adacore.com>
12324         * exp_ch7.adb (Wrap_Transient_Expression):
12325         Insertion extra conditional expression only if
12326         Opt.Suppress_Control_Flow_Optimizations is set.
12328 2014-01-20  Arnaud Charlet  <charlet@adacore.com>
12330         * s-tataat.adb (Initialize_Attributes): Abort might already be
12331         deferred in Create_Task.
12333 2014-01-20  Hristian Kirtchev  <kirtchev@adacore.com>
12335         * checks.adb (Apply_Scalar_Range_Check): Flag
12336         the exponent as requiring a range check when the expression is
12337         an exponentiation.
12339 2014-01-20  Fedor Rybin  <frybin@adacore.com>
12341         * gnat_ugn.texi: Documenting --passed-tests option for gnattest.
12343 2014-01-20  Hristian Kirtchev  <kirtchev@adacore.com>
12345         * sem_util.adb (Default_Initialization): New routine.
12346         * sem_util.ads: Add new type Default_Initialization_Kind.
12347         (Default_Initialization): New routine.
12349 2014-01-20  Hristian Kirtchev  <kirtchev@adacore.com>
12351         * sem_prag.adb (Check_Mode): Correct all error
12352         message logic dealing with in/in out parameters that may appear
12353         as inputs or have a self reference.
12355 2014-01-20  Robert Dewar  <dewar@adacore.com>
12357         * exp_ch9.adb, checks.adb, exp_intr.adb: Minor reformatting.
12358         * sem_res.adb (Resolve): Fix error causing infinite loop for
12359         integer used as address. Allow addresses as integers.
12361 2014-01-20  Arnaud Charlet  <charlet@adacore.com>
12363         * s-osinte-linux.ads (struct_sigaction): Fix rep clause.
12365 2014-01-20  Bob Duff  <duff@adacore.com>
12367         * par-ch8.adb (P_Use_Type_Clause): Detect syntax
12368         error when "use all" is not followed by "type".
12370 2014-01-20  Bob Duff  <duff@adacore.com>
12372         * exp_intr.adb (Expand_Unc_Deallocation): Remove warning on abort
12373         followed by free.
12375 2014-01-20  Ed Schonberg  <schonberg@adacore.com>
12377         * checks.adb (Apply_Address_Clause_Check): If there is an
12378         alignment check on the expression in an address clause, and there
12379         is no local exception propagation, add an additional explanatory
12380         message to clarify the cause of previous warning.
12382 2014-01-20  Robert Dewar  <dewar@adacore.com>
12384         * exp_ch7.adb: Minor reformatting.
12385         * opt.ads: Minor comment updates.
12386         * sem.adb: Minor name change Is_Main_Unit =>
12387         Is_Main_Unit_Or_Main_Unit_Spec.
12388         * sem_ch6.adb: Minor reformatting and code reorganization.
12390 2014-01-20  Bob Duff  <duff@adacore.com>
12392         * gnat_ugn.texi: Update gnatpp switches.
12394 2014-01-20  Thomas Quinot  <quinot@adacore.com>
12396         * exp_ch9.adb: Minor comment edit.
12398 2014-01-20  Robert Dewar  <dewar@adacore.com>
12400         * gnat_rm.texi: Document that Allow_Integer_Address is permitted
12401         only if System.Address is a private type.
12402         * opt.ads (Allow_Integer_Address): No longer set by -gnates.
12403         * sem_prag.adb (Analyze_Pragma, case Allow_Integer_Address):
12404         Allowed only if type System.Address is private, since otherwise
12405         it makes no sense.
12406         * sem_res.adb: Fix failure to properly Analyze unchecked
12407         conversions that were introduced by Allow_Integer_Address.
12408         * switch-c.adb: Remove -gnates switch.
12409         * usage.adb: Remove -gnates switch.
12410         * gnat_ugn.texi: Remove documentation of -gnates flag.
12412 2014-01-20  Ed Schonberg  <schonberg@adacore.com>
12414         * sem_ch6.adb (Analyze_Expression_Function): Pre-analyze and
12415         resolve expression to perform proper name capture.
12417 2014-01-20  Ed Schonberg  <schonberg@adacore.com>
12419         * sem.adb (Semantics): When saving/restoring configuration
12420         switches, the spec of a pre- defined unit that is the main unit
12421         must be treated as a predefined unit as well.
12423 2014-01-20  Thomas Quinot  <quinot@adacore.com>
12425         * exp_ch7.adb (Wrap_Transient_Expression): For a Boolean
12426         expression, insert an extra conditional expression when saving
12427         the value of the expression, for the benefit of control flow
12428         graph based coverage analysis.
12429         * exp_ch3.adb: Minor reformatting.
12431 2014-01-20  Robert Dewar  <dewar@adacore.com>
12433         * gnat1drv.adb: Set Allow_Integer_Address in relaxed semantics mode.
12434         * gnat_rm.texi: Document pragma Allow_Integer_Address.
12435         * gnat_ugn.texi: Document pragma Allow_Integer_Address, -gnates.
12436         * opt.ads: New flag Allow_Integer_Address.
12437         * par-prag.adb: Dummy entry for pragma Allow_Integer_Address.
12438         * sem_ch5.adb: Minor reformatting.
12439         * sem_prag.adb: Implement pragma Allow_Integer_Address.
12440         * sem_res.adb (Resolve): Allow integer address value if
12441         switch set.
12442         * sem_util.adb: Minor reformatting.
12443         * snames.ads-tmpl: Add entry for pragma Allow_Integer_Address.
12444         * switch-c.adb: Recognize flag -gnates.
12445         * usage.adb: Document flag -gnates.
12447 2014-01-20  Thomas Quinot  <quinot@adacore.com>
12449         * s-tadeca.adb: Fix minor typos in comment.
12451 2014-01-20  Pascal Obry  <obry@adacore.com>
12453         * s-win32.ads (FreeLibrary): New import.
12455 2014-01-20  Robert Dewar  <dewar@adacore.com>
12457         * sem_res.adb, sem_cat.adb: Minor reformatting.
12458         * sem_ch11.adb (Analyze_Raise_Statement): Only give warning about
12459         assigning to OUT parameters for the current subprogram scope.
12460         * exp_ch4.adb: Minor reformatting.
12462 2014-01-20  Ed Schonberg  <schonberg@adacore.com>
12464         * exp_ch4.adb (Process_Transient_Object,
12465         Find_Enclosing_Contexts): If the top-level if-expression that
12466         generated the transient object is an actual in a call, the proper
12467         Hook_Context is a construct enclosing the call.
12468         * einfo.ads: Indicate that Related_Expression is used to link a
12469         loop variable to the container expression over which the loop
12470         takes place.
12471         (Analyze_Iterator_Specification): Set the Related_Expression of
12472         the loop variable in a container element iterator.
12473         (Note_Possible_Modification): If the variable is the loop
12474         variable in a container element iterator, indicate that the
12475         enclosing container is also modified.
12477 2014-01-20  Hristian Kirtchev  <kirtchev@adacore.com>
12479         * aspects.adb (Move_Or_Merge_Aspects): Reimplemented.
12481 2014-01-20  Robert Dewar  <dewar@adacore.com>
12483         * s-taasde.ads, gnat_ugn.texi, s-tadeca.adb, sem_res.adb, s-tadeca.ads:
12484         Minor reformatting and code clean up.
12486 2014-01-20  Arnaud Charlet  <charlet@adacore.com>
12488         * sem_cat.adb (Validate_Object_Declaration): Relax semantics
12489         of objects of private type if Relaxed_RM_Semantics.
12491 2014-01-20  Claire Dross  <dross@adacore.com>
12493         * a-cofove.ads (Vector): Capacity discriminant
12494         should be in range of the index.
12496 2014-01-20  Thomas Quinot  <quinot@adacore.com>
12498         * a-caldel.ads(To_Duration), s-taasde.ads(Time_Enqueue):
12499         Clarify specs s-tadeca.adb(Enqueue_Calendar): Compensate for
12500         possible difference between epoch of Ada.Calendar clock and Ada
12501         real-time/tasking clock.
12502         * s-taprop-posix.adb: Minor comment fix.
12504 2014-01-20  Doug Rupp  <rupp@adacore.com>
12506         * sysdep.c [vxworks]: Remove Vxworks version noise for RTP.
12508 2014-01-20  Hristian Kirtchev  <kirtchev@adacore.com>
12510         * exp_attr.adb (Expand_N_Attribute_Reference): Generate validity
12511         checks on the prefix of attribute 'Old.
12512         * sem_ch3.adb (Process_Range_Expr_In_Decl): Suppress the
12513         generation of validity checks on a range that belongs to the
12514         iteration scheme of a quantified expression.
12515         * sem_ch5.adb (One_Bound): Suppress the generation of validity
12516         checks on a bound that belongs to the iteration scheme of a
12517         quantified expression, generate the check in all other cases.
12519 2014-01-20  Bob Duff  <duff@adacore.com>
12521         * gnat_ugn.texi: Enable --pp-new by default. Minor reorganization.
12523 2014-01-20  Ed Schonberg  <schonberg@adacore.com>
12525         * sem_res.adb (Resolve): When compiling a predefined unit, ignore
12526         interpretations that do not come from other predefined units,
12527         to prevent spurious ambiguities in the presence of user-defined
12528         operators in the context of (an instance of) a predefined unit.
12530 2014-01-20  Robert Dewar  <dewar@adacore.com>
12532         * gnat_rm.texi: Document that Loop_Variant is included in
12533         Statement_Assertions.
12534         * sem_prag.adb (Check_Kind): Add Loop_Variant to
12535         Statement_Assertions (Check_Applicable_Policy): Add Loop_Variant
12536         to Statement_Assertions.
12538 2014-01-20  Doug Rupp  <rupp@adacore.com>
12540         * sysdep.c (__gnat_is_file_not_found_error) [vxworks6]: Add case
12541         for errno ENOENT from RTP on NFS mounted file system.
12543 2014-01-20  Ed Schonberg  <schonberg@adacore.com>
12545         * sem_util.adb (Check_Function_Writable_Actuals): 1) Do not
12546         examine code that does not come from source. The check does not
12547         apply to code generated for constraint checks, and such code may
12548         generate spurious error messages when compiled with expansion
12549         disabled (as in a generic unit) because side effects may not
12550         have been removed.
12551         2) Make error messages more explicit: indicate the component
12552         of the  construct whose value is indeterminate because of a
12553         call to a function with in-out parameter in another component,
12554         when there is no mandated order of execution between the two
12555         components (actuals, aggregate components, alternatives).
12557 2014-01-20  Robert Dewar  <dewar@adacore.com>
12559         * gnat_rm.texi: Minor cleanup.
12561 2014-01-20  Hristian Kirtchev  <kirtchev@adacore.com>
12563         * sem_attr.adb (Analyze_Attribute): Attributes 'Old and 'Result
12564         can now apply to a refined postcondition.
12565         * sem_ch6.adb (Analyze_Subprogram_Contract): Remove local
12566         variable Result_Seen. Add variables Case_Prag, Post_Prag,
12567         Seen_In_Case and Seen_In_Post. Update the mechanism that detects
12568         whether postconditions and/or constract-cases mention attribute
12569         'Result and introduce a post-state when applied to functions.
12570         (Check_Result_And_Post_State): Removed.
12571         * sem_prag.adb (Analyze_Pragma): Add local variable
12572         Result_Seen. Verify that the expression of pragma Refined_Post
12573         mentions attribute 'Result and introduces a post-state.
12574         * sem_util.ads, sem_util.adb (Check_Result_And_Post_State): New routine.
12576 2014-01-20  Hristian Kirtchev  <kirtchev@adacore.com>
12578         * exp_ch7.adb (Is_Subprogram_Call): New routine.
12579         (Process_Transient_Objects): Make variable Must_Hook global with
12580         respect to all locally declared subprograms. Search the context
12581         for at least one subprogram call.
12582         (Requires_Hooking): Removed.
12584 2014-01-20  Claire Dross  <dross@adacore.com>
12586         * a-cfdlli.ads a-cfhama.ads a-cfhase.ads a-cforma.ads
12587         * a-cforse.ads a-cofove.ads: Add pragma Annotate (GNATprove,
12588         External_Axiomatization);
12590 2014-01-20  Robert Dewar  <dewar@adacore.com>
12592         * sem_attr.adb (Analyze_Attribute, case Loop_Entry): Allow
12593         Loop_Entry in Assert, Assert_And_Cut, and Assume pragmas.
12594         * sem_prag.adb (Analyze_Pragma, case Assert[_And_Cut], Assume):
12595         Allow Loop_Entry to be used in these pragmas if they appear in
12596         an appropriate context.
12597         (Placement_Error): Specialize error
12598         message for pragma Assert[_And_Cut] or pragma Assume containing
12599         Loop_Entry attribute.
12600         * a-exexpr-gcc.adb, sinput.adb: Minor reformatting.
12601         * s-excmac-arm.ads, s-except.ads, s-excmac-gcc.ads: Minor reformatting
12602         and code clean ups.
12604 2014-01-20  Robert Dewar  <dewar@adacore.com>
12606         * gnat1drv.adb: Minor comment update.
12608 2014-01-20  Tristan Gingold  <gingold@adacore.com>
12610         * raise-gcc.c (PERSONALITY_FUNCTION/arm): Remove unused
12611         variables, comment out unused code.
12612         * a-exexpr-gcc.adb: Move declarations to s-excmac-gcc.ads
12613         * s-excmac-gcc.ads: New file, extracted from a-exexpr-gcc.adb
12614         * s-excmac-arm.ads: New file.
12616 2014-01-20  Hristian Kirtchev  <kirtchev@adacore.com>
12618         * exp_ch4.adb (Expand_N_Slice): Remove constant D and variables
12619         Drange and Index_Typ. Remove the circuitry which creates a
12620         range check to compare the index type of the array against the
12621         discrete_range.
12622         * sem_res.adb (Resolve_Slice): Add local variable Dexpr. Update
12623         the circuitry which creates a range check to handle a
12624         discrete_range denoted by a subtype indication.
12626 2014-01-20  Pierre-Marie Derodat  <derodat@adacore.com>
12628         * sinput.adb, sinput.ads (Sloc_Range): Traverse the tree of original
12629         nodes to get the original sloc range.
12631 2014-01-20  Hristian Kirtchev  <kirtchev@adacore.com>
12633         * sem_prag.adb (Analyze_Pragma): Use Defining_Entity to obtain the
12634         entity of a [library level] package.
12636 2014-01-20  Tristan Gingold  <gingold@adacore.com>
12638         * raise-gcc.c (exception_class_eq): New function.
12639         (is_handled_by): Use it to compare exception classes.
12640         (PERSONALITY_STORAGE): Define.  (continue_unwind): New function to
12641         be called to return URC_CONTINUE_UNWIND.
12642         (personality_body): New function, extracted from PERSONALITY_ROUTINE.
12643         (PERSONALITY_ROUTINE): Add an implementation for the ARM unwinder.
12645 2014-01-20  Robert Dewar  <dewar@adacore.com>
12647         * opt.ads: Minor comment update.
12649 2014-01-20  Hristian Kirtchev  <kirtchev@adacore.com>
12651         * exp_ch4.adb (Expand_N_Slice): Relocate some variables and
12652         constants to the "Local variables" area. Add new constant D. Add
12653         new variables Drange and Index_Typ.  Rename Pfx to Rep and Ptp
12654         to Pref_Typ and update all occurrences. Add circuitry to extract
12655         the discrete_range and the index type and build a range check.
12657 2014-01-20  Arnaud Charlet  <charlet@adacore.com>
12659         * gnat1drv.adb (Adjust_Global_Switches): Enable
12660         Treat_Categorization_Errors_As_Warnings when Relaxed_RM_Semantics
12661         is set.
12663 2014-01-20  Thomas Quinot  <quinot@adacore.com>
12665         * sem_ch5.adb, sem_ch4.adb: Minor reformatting.
12667 2014-01-20  Hristian Kirtchev  <kirtchev@adacore.com>
12669         * sem_ch13.adb (Analyze_Aspect_Specifications):
12670         When aspect SPARK_Mode appears on a package body, insert the
12671         generated pragma at the top of the body declarations.
12673 2014-01-20  Robert Dewar  <dewar@adacore.com>
12675         * sem_aggr.adb, exp_prag.adb, sem_aux.adb, sinfo.ads, sem_ch10.adb,
12676         checks.adb, sem_prag.adb, sem_ch12.adb, freeze.adb, g-arrspl.adb,
12677         expander.adb, gnat1drv.adb, exp_ch4.adb, sem_ch6.adb,
12678         sem_ch8.adb, exp_dist.adb: Minor reformatting.
12680 2014-01-20  Yannick Moy  <moy@adacore.com>
12682         * gnat1drv.adb (Gnat1drv): Call Write_ALI with Object=True in GNATprove
12683         mode.
12685 2014-01-20  Pascal Obry  <obry@adacore.com>
12687         * g-arrspl.ads (Slice_Set): New definition (will use a copy on
12688         write scheme).
12689         * g-arrspl.adb: Adapt all routine to this new implementation.
12690         (Set): Copy the Slice_Set definition before reusing it.
12692 2014-01-20  Arnaud Charlet  <charlet@adacore.com>
12694         * sem_prag.adb (Process_Import_Or_Interface): In
12695         Relaxed_RM_Semantics, support old Ada 83 style of pragma Import.
12696         (Analyze_Pragma): Ditto for pragma Export.
12697         * exp_prag.adb (Expand_Pragma_Import_Or_Interface): Handle old pragma
12698         Import style.
12700 2014-01-20  Hristian Kirtchev  <kirtchev@adacore.com>
12702         * einfo.ads: E_Abstract_State is now part of the entities that
12703         can be overloaded. Update type Overloadable_Kind to reflect the
12704         inclusion of abstract states.
12705         * sem_ch6.adb (New_Overloaded_Entity): A function can now
12706         overload an abstract state.
12707         * sem_prag.adb (Analyze_Constituent): Handle the overloading
12708         of states by functions. Use Entity_Of to obtain the entity of
12709         a constituent.  (Analyze_Global_Item): Handle the overloading of
12710         states by functions.
12711         (Analyze_Initialization_Item): Handle the
12712         overloading of states by functions.  Use Entity_Of to obtain the
12713         entity of an item.
12714         (Analyze_Input_Item): Handle the overloading
12715         of states by functions. Use Entity_Of to obtain the entity of an item.
12716         (Analyze_Input_Output): Handle the overloading of states by functions.
12717         (Analyze_Refinement_Clause): Handle the overloading
12718         of states by functions.  Use Entity_Of to obtain the entity of an item.
12719         (Appears_In): Use Entity_Of to obtain the entity of an element.
12720         (Check_Usage): Use Entity_Of to obtain the entity of
12721         an item. Add a guard to prevent a crash due to a previous error.
12722         (Resolve_State): New routine.
12724 2014-01-20  Yannick Moy  <moy@adacore.com>
12726         * spark_xrefs.ads, debug.adb, gnat1drv.adb, errout.adb, errout.ads,
12727         opt.ads: Minor comments updates.
12729 2014-01-20  Hristian Kirtchev  <kirtchev@adacore.com>
12731         * einfo.adb (Non_Limited_View): Applies to abstract states.
12732         (Set_From_Limited_With): Applies to abstract states.
12733         (Set_Non_Limited_View): Applies to abstract states.
12734         (Write_Field17): Output the non-limited view of an abstract state.
12735         * einfo.ads: Update the comment on usage and occurrences in
12736         nodes for attributes From_Limited_With and Non_Limited_View.
12737         * sem_aux.adb (Available_View): This routine can now handle
12738         abstract states.
12739         * sem_aux.ads (Available_View): This routine can now handle
12740         abstract states. Update the comment on usage.
12741         * sem_ch8.adb (Find_Expanded_Name): Handle abstract views
12742         of states and variables.
12743         (In_Pragmas_Depends_Or_Global): New routine.
12744         * sem_ch10.adb (Build_Limited_Views): Implement
12745         abstract (limited) views of variables and states.
12746         (Build_Shadow_Entity): This routine is now a procedure. Add
12747         formal parameter Shadow. Update the comment on usage. Add
12748         context-specific decoration for states and variables.
12749         (Decorate_State): New routine.  (Decorate_Variable): New routine.
12750         (Find_And_Process_States): New routine.
12751         (Process_Declarations): Renamed to Process_Declarations_And_States.
12752         (Process_Declarations_And_States): Add formal parameters
12753         Pack and Create_Abstract_Views. Update the comment on usage.
12754         (Process_States): New routine.
12755         * sem_prag.adb (Check_Dependency_Clause): Handle abstract
12756         views of states and variables. Match the abstract view of a state
12757         against its corresponding non-abstract view.
12758         (Is_Matching_Input):
12759         Handle abstract views of states and variables. Match the abstract
12760         view of a state against its corresponding non-abstract view.
12761         (Process_Global_Item): Handle abstract views of states and
12762         variables.
12764 2014-01-20  Bob Duff  <duff@adacore.com>
12766         * sem_ch10.adb (Expand_With_Clause): Don't
12767         recurse on the prefix if the current with-ed name refers to a
12768         package that renames its own parent, eg "package P.Q renames P;".
12770 2014-01-20  Yannick Moy  <moy@adacore.com>
12772         * exp_spark.adb (Expand_SPARK_Call): Remove procedure.
12773         * opt.adb, opt.ads (Full_Expander_Active): Remove function.
12774         * checks.adb, exp_ch6.adb, exp_ch9.adb, exp_disp.adb, sem_aggr.adb,
12775         * sem_ch10.adb, sem_ch5.adb, sem_ch6.adb, sem_ch8.adb, sem_ch9.adb,
12776         * sem_disp.adb, sem_res.adb Replace Full_Expander_Active by
12777         Expander_Active.
12779 2014-01-20  Yannick Moy  <moy@adacore.com>
12781         * sinfo.ads Update documentation of GNATprove mode.
12783 2014-01-20  Yannick Moy  <moy@adacore.com>
12785         * adabkend.adb, ali-util.adb, errout.adb, exp_ch7.adb,
12786         * exp_dbug.adb, freeze.adb, lib-xref.adb, restrict.adb,
12787         * sem_attr.adb, sem_ch4.adb, sem_ch5.adb, sem_ch6.adb, sem_ch8.adb,
12788         * sem_prag.adb, sem_res.adb, sem_util.adb Rename SPARK_Mode into
12789         GNATprove_Mode.
12790         * sem_ch13.adb: Remove blank.
12791         * exp_spark.adb, exp_spark.ads (Expand_SPARK_Call): Only replace
12792         subprograms by alias for renamings, not for inherited primitive
12793         operations.
12794         * exp_util.adb (Expand_Subtype_From_Expr): Apply the expansion
12795         in GNATprove mode.
12796         (Remove_Side_Effects): Apply the removal in
12797         GNATprove mode, for the full analysis of expressions.
12798         * expander.adb (Expand): Call the light SPARK expansion in GNATprove
12799         mode.
12800         (Expander_Mode_Restore, Expander_Mode_Save_And_Set): Ignore
12801         save/restore actions for Expander_Active flag in GNATprove mode,
12802         similar to what is done in ASIS mode.
12803         * frontend.adb (Frontend): Generic bodies are instantiated in
12804         GNATprove mode.
12805         * gnat1drv.adb (Adjust_Global_Switches): Set operating
12806         mode to Check_Semantics in GNATprove mode, although a light
12807         expansion is still performed.
12808         (Gnat1drv): Set Back_End_Mode to
12809         Declarations_Only in GNATprove mode, and later on special case
12810         the GNATprove mode to continue analysis anyway.
12811         * lib-writ.adb (Write_ALI): Always generate ALI files in
12812         GNATprove mode.
12813         * opt.adb, opt.ads (Full_Expander_Active): Make it equivalent to
12814         Expander_Active.
12815         (SPARK_Mode): Renamed as GNATprove_Mode.
12816         * sem_aggr.adb (Aggregate_Constraint_Checks): Add checks in the
12817         tree in GNATprove_Mode.
12818         * sem_ch12.adb (Analyze_Package_Instantiation): Always instantiate
12819         body in GNATprove mode.
12820         (Need_Subprogram_Instance_Body): Always instantiate body in GNATprove
12821         mode.
12822         * sem_ch3.adb (Constrain_Index, Process_Range_Expr_In_Decl):
12823         Make sure side effects are removed in GNATprove mode.
12825 2014-01-20  Eric Botcazou  <ebotcazou@adacore.com>
12827         * gcc-interface/decl.c (gnat_to_gnu_entity) <object>: Robustify tests
12828         for aliased objects with an unconstrained nominal subtype.
12829         * gcc-interface/trans.c (Call_to_gnu): Likewise.
12830         (gnat_to_gnu) <case N_Op_Not>: Robustify test for private type.
12831         <case N_Op_Minus>: Remove useless code.
12832         (Exception_Handler_to_gnu_zcx): Minor tweaks.
12834 2014-01-20  Eric Botcazou  <ebotcazou@adacore.com>
12836         * gcc-interface/decl.c (gnat_to_gnu_entity) <case E_Record_Subtype>:
12837         Tidy up.  For a subtype with discriminants and variant part, if a
12838         variant is statically selected and the fields all have a constant
12839         position, put them in order of increasing position.  Likewise if
12840         no variant part but representation clause is present.
12841         * gcc-interface/utils.c (make_packable_type): Robustify.
12842         (maybe_pad_type): Use local variable and tidy up condition.  If no
12843         alignment is specified, use the original one.
12844         (create_type_stub_decl): Minor tweak.
12845         (convert) <case VECTOR_CST>: Fix typo.
12846         <case CONSTRUCTOR>: Deal with padding types around the same type.
12847         Do not punt on missing fields.
12848         (unchecked_convert): Call finish_record_type to lay out the special
12849         record types made for conversions from/to problematic integer types.
12850         Bump the alignment of CONSTRUCTORs before converting them to a more
12851         aligned type.
12853 2014-01-20  Eric Botcazou  <ebotcazou@adacore.com>
12855         * gcc-interface/decl.c (gnat_to_gnu_entity) <case E_Component>: Remove
12856         obsolete code for type_annotate_only mode, simplify code and slightly
12857         improve wording of comments.
12859 2014-01-12  Eric Botcazou  <ebotcazou@adacore.com>
12861         PR ada/59772
12862         * gcc-interface/cuintp.c (build_cst_from_int): Use 32-bit integer type
12863         as intermediate type.
12864         (UI_To_gnu): Likewise.
12866 2014-01-03  Eric Botcazou  <ebotcazou@adacore.com>
12868         * gnatvsn.ads (Current_Year): Bump to 2014.
12870 2014-01-02  Tobias Burnus  <burnus@net-b.de>
12872         * gnat_ugn.texi: Bump @copying's copyright year.
12874 Copyright (C) 2014 Free Software Foundation, Inc.
12876 Copying and distribution of this file, with or without modification,
12877 are permitted in any medium without royalty provided the copyright
12878 notice and this notice are preserved.