* gcc-interface/decl.c (gnat_to_gnu_field): Post the error message
[official-gcc.git] / gcc / ada / ChangeLog
blobc6364eb22d15b13ed89766646882d3f52be13c15
1 2014-12-22  Eric Botcazou  <ebotcazou@adacore.com>
3         * gcc-interface/decl.c (gnat_to_gnu_field): Post the error message
4         for parent overlapping on the position instead of on the first bit.
5         For a field that needs strict alignment, issue the error for the
6         position first and, for the size, issue an error if it is too large
7         only for the atomic and aliased cases.  Issue a specific error if
8         the size is not a multiple of a byte in the volatile and the stric
9         alignment cases.
11 2014-12-22  Eric Botcazou  <ebotcazou@adacore.com>
13         * gcc-interface/decl.c (check_ok_for_atomic): Rename into...
14         (check_ok_for_atomic_type): ...this.  When checking the mode, also
15         check that the type is sufficient aligned.  Remove useless code and
16         tidy up implementation.
17         (gnat_to_gnu_entity): Adjust to above renaming.
18         (gnat_to_gnu_component_type): Likewise.
19         (gnat_to_gnu_field): Likewise.
21 2014-12-17  Pierre-Marie de Rodat  <derodat@adacore.com>
23         * gcc-interface/misc.c (gnat_get_array_descr_info): New.  Use it for
24         the get_array_descr_info lang-hook.  Use it to tune the DWARF output
25         for array types.
27 2014-11-24  Eric Botcazou  <ebotcazou@adacore.com>
29         * gcc-interface/Makefile.in (Cygwin/Mingw): Fix previous change.
31 2014-11-24  Eric Botcazou  <ebotcazou@adacore.com>
33         * gcc-interface/trans.c (build_return_expr): Use INIT_EXPR instead of
34         MODIFY_EXPR to assign to the return object.
35         (finalize_nrv_r): Adjust to above change.
36         (finalize_nrv_unc_r): Likewise.
38 2014-11-24  Eric Botcazou  <ebotcazou@adacore.com>
40         * gcc-interface/trans.c (push_range_check_info): Replace early test
41         with assertion.
42         (Raise_Error_to_gnu): Do not call push_range_check_info if the loop
43         stack is empty.
44         * gcc-interface/utils.c (convert_to_fat_pointer): Fix formatting.
45         * gcc-interface/utils2.c (gnat_invariant_expr): Deal with padded types
46         and revert latest change.
48 2014-11-22  Eric Botcazou  <ebotcazou@adacore.com>
50         * gcc-interface/trans.c (Call_to_gnu): Strip unchecked conversions on
51         actuals of In parameters if the destination type is an unconstrained
52         composite type.
54 2014-11-22  Eric Botcazou  <ebotcazou@adacore.com>
56         * gcc-interface/trans.c (gnat_gimplify_expr): Add 'type' variable.
57         <case NULL_EXPR>: Deal with unconstrained array types and use 'type'.
58         <case ADDR_EXPR>: Use 'type'.
59         <case DECL_EXPR>: Likewise.
61 2014-11-20  Trevor Saunders  <tsaunders@mozilla.com>
63         * gcc-interface/decl.c (annotate_value_cache): Replace htab with
64         hash_table.
65         (annotate_value): Adjust.
66         (init_gnat_decl): Likewise.
67         (destroy_gnat_decl): Likewise.
68         * gcc-interface/utils.c (pad_type_hash_table): Replace htab with
69         hash_table.
70         (init_gnat_utils): Adjust.
71         (destroy_gnat_utils): Likewise.
72         (lookup_and_insert_pad_type): Likewise.
74 2014-11-20  Arnaud Charlet  <charlet@adacore.com>
76         PR ada/63931
77         * gnatvsn.ads (Library_Version): Switch to "5".
79 2014-11-20  Thomas Quinot  <quinot@adacore.com>
81         * freeze.adb (Freeze_Entity): Do not reset Is_True_Constant
82         for aliased constant objects.
84 2014-11-20  Robert Dewar  <dewar@adacore.com>
86         * exp_util.adb (Following_Address_Clause): Use new Name_Table
87         boolean flag set by parser to avoid the search if there is no
88         address clause anywhere for the name.
89         * namet.adb (Name_Enter): Initialize Boolean_Info flag
90         (Name_Find): ditto (Reinitialize): ditto (Get_Name_Table_Boolean):
91         New function (Set_Name_Table_Boolean): New procedure
92         * namet.ads: Add and document new Boolean field in name table
93         (Get_Name_Table_Boolean): New function.
94         (Set_Name_Table_Boolean): New procedure.
95         * par-ch13.adb (P_Representation_Clause): Set Name_Table boolean
96         flag for an identifier name if we detect an address clause or
97         use-at clause for the identifier.
98         * sem_ch3.adb (Analyze_Object_Declaration): Remove comment about
99         Following_Address_Clause since this function is now optimized
100         and is not a performance concern.
101         * sem_prag.adb (Analyze_Pragma, case Elaborate): In SPARK
102         mode, pragma Elaborate is now allowed, but does not suppress
103         elaboration checking.
105 2014-11-20  Jerome Lambourg  <lambourg@adacore.com>
107         * gcc-interface/Makefile.in: Add some support for VxWorks7.
109 2014-11-20  Thomas Quinot  <quinot@adacore.com>
111         * sem_ch13.adb, freeze.adb: Minor reformatting.
112         * gnat_rm.texi: Minor editing.
114 2014-11-20  Robert Dewar  <dewar@adacore.com>
116         * sem_prag.adb (Analyze_Pragma): Minor reformatting.
117         (Process_Suppress_Unsuppress): Ignore suppress Elaboration_Check
118         in SPARK.
120 2014-11-20  Bob Duff  <duff@adacore.com>
122         * gnat_rm.texi: Correction to documentation of
123         'Unrestricted_Access in case of access to unconstrained array.
124         * a-cofove.adb (Capacity): Fix bug -- was always
125         returning Capacity_Range'Last.
126         (Is_Sorted): Fix bug -- was always returning True, because
127         Container.Last = Last. That test isn't even needed, because the
128         loop will go around zero times in that case, so deleted that
129         test rather than fixing it.
130         (Reverse_Elements): Make sure to use the correct array bounds.
132 2014-11-20  Ed Schonberg  <schonberg@adacore.com>
134         * sem_ch12.adb (Analyze_Associations): In GNATProve mode, build
135         wrappers for functions and operators that are actuals only if
136         expander is enabled. Wrappers play no role within a generic unit.
138 2014-11-20  Hristian Kirtchev  <kirtchev@adacore.com>
140         * sem_util.adb (Policy_In_Effect): Use the
141         configuration level assertion flag.
143 2014-11-20  Arnaud Charlet  <charlet@adacore.com>
145         * s-parame-ae653.ads: Update comments.
147 2014-11-20  Robert Dewar  <dewar@adacore.com>
149         * types.ads, einfo.ads: Minor reformatting.
150         * sem_elab.adb (Check_A_Call): Add guard for reference to Alias
151         for variable case.
153 2014-11-20  Bob Duff  <duff@adacore.com>
155         * a-cofove.adb (Elems,Elemsc): Use access-to-constrained arrays
156         instead of access-to-unconstrained, because the latter doesn't
157         work with 'Unrestricted_Access when the result is returned from
158         a function.
159         * a-cofove.ads (Vector): Move the discriminant-dependent array
160         after the other components for efficiency. Otherwise the compiler
161         will generate a lot of code to calculate the offset of the other
162         components every time they're accessed.
164 2014-11-20  Olivier Hainque  <hainque@adacore.com>
166         * opt.ads: Fix comment on Generate_SCO_Instance_Table wrt when
167         it is set to true.
169 2014-11-20  Ed Schonberg  <schonberg@adacore.com>
171         * exp_ch3.adb (Expand_N_Object_Declaration): Handle properly
172         a type invariant check on an object with default initialization
173         and an address clause.
175 2014-11-20  Robert Dewar  <dewar@adacore.com>
177         * sem_elab.adb (Check_A_Call): Handle variable ref case in
178         SPARK (Check_Elab_Call): ditto (Find_Elab_Reference): ditto
179         (Get_Referenced_Ent): ditto.
180         * sem_elab.ads: Comment fixes to account for the fact that we
181         now deal with variable references in SPARK mode.
182         * sem_res.adb (Resolve_Entity_Name): In SPARK_Mode Call
183         Check_Elab_Call for variable.
185 2014-11-20  Yannick Moy  <moy@adacore.com>
187         * a-cofove.ads (Copy): Fix precondition, which should allow
188         Capacity = 0.
189         (First_To_Previous, Current_To_Last): Add necessary preconditions.
191 2014-11-20  Hristian Kirtchev  <kirtchev@adacore.com>
193         * exp_ch3.adb (Build_Initialization_Call): Reimplement the
194         circuitry which extraacts the [underlying] full view of a
195         private type to handle a case where the private type acts as a
196         generic actual.
197         * exp_ch5.adb (Expand_Iterator_Loop_Over_Array): Inherit the
198         loop label form the original loop regardless of whether it came
199         from source.
200         * sem_attr.adb (Analyze_Attribute): When taking 'Access of an
201         expression function with a generated body that has not been
202         analyzed yet, analyze the body to freeze the expression.
203         * sem_util.adb (Set_Public_Status_Of): New routine.
204         (Transfer_Entities): Handle the case where a private type with
205         an internally generated full view is being transfered and update
206         its full view.
208 2014-11-20  Vincent Celier  <celier@adacore.com>
210         * prj-nmsc.adb (Check_Object): If a unit is in a multi-source
211         file, its object file is never the same as any other unit.
213 2014-11-20  Bob Duff  <duff@adacore.com>
215         * s-taskin.adb (Initialize_ATCB): Take into
216         account the fact that the domain of the activator can be null
217         if we're initializing a foreign task.
219 2014-11-20  Robert Dewar  <dewar@adacore.com>
221         * sem_ch12.adb: Minor reformatting.
223 2014-11-20  Jerome Lambourg  <lambourg@adacore.com>
225         * s-osinte-vxworks.ads: Add comments. Minor reformatting.
227 2014-11-20  Yannick Moy  <moy@adacore.com>
229         * sem_prag.adb, sem_elab.adb: Minor rewording of error message in
230         SPARK mode, for consistency.
232 2014-11-20  Vasiliy Fofanov  <fofanov@adacore.com>
234         * gnat_ugn.texi: New section on gnattest stubbing. Minor
235         reformatting.
237 2014-11-20  Jerome Lambourg  <lambourg@adacore.com>
239         * s-taprop-vxworks.adb (Create_Task): Fix thread comparison.
240         Minor reformatting.
242 2014-11-20  Robert Dewar  <dewar@adacore.com>
244         * s-tassta.adb, exp_aggr.adb, s-taskin.adb, exp_strm.adb: Minor
245         reformatting.
246         * comperr.adb (Compiler_Abort): New wording for bug box.
247         * par-ch13.adb: Minor reformatting.
248         * par-ch3.adb (P_Identifier_Declarations): Handle aspect
249         specifications given before initialization expression in object
250         declaration cleanly.
251         * gnat1drv.adb (Adjust_Global_Switches): Make sure static
252         elaboration mode is set if we are operating in SPARK mode.
253         * sem_ch12.adb (Analyze_Package_Instantiation): Make
254         sure static elab mode is set if we are in SPARK mode.
255         (Analyze_Subprogram_Instantiation): ditto.
256         (Set_Instance_Env): ditto.
257         * sem_elab.adb (Check_A_Call): In SPARK mode, we require
258         Elaborate_All in the case of a call during elaboration to a
259         subprogram in another unit.
261 2014-11-20  Ed Schonberg  <schonberg@adacore.com>
263         * inline.adb (Can_Split_Unconstrained_Function,
264         Build_Procedure): Copy parameter type rather than creating
265         reference to the entity, to capture class-wide reference, whose
266         name is not retrieved by visibility.
268 2014-11-20  Arnaud Charlet  <charlet@adacore.com>
270         * s-taspri-solaris.ads: Replace 64 by long_long_integer'size.
272 2014-11-20  Olivier Hainque  <hainque@adacore.com>
274         * init.c (__gnat_map_signal for VxWorks): Use a common mapping
275         scheme for VxWorks version >= 6, instead of falling back to the
276         vx5 scheme for versions > 6.
278 2014-11-20  Ed Schonberg  <schonberg@adacore.com>
280         * exp_strm.adb (Build_Mutable_Record_Read_Procedure): Use
281         base type when constructing subtype indication for constrained
282         target object.
284 2014-11-20  Jose Ruiz  <ruiz@adacore.com>
286         * projects.texi: Minor spelling fix.
288 2014-11-20  Bob Duff  <duff@adacore.com>
290         * gnat_ugn.texi: Add doc for --split-line-before-op switch in gnatpp.
292 2014-11-20  Vincent Celier  <celier@adacore.com>
294         * prj-attr.adb (Register_New_Package): Allow the registration
295         of an already unknown package and make it known.
297 2014-11-20  Trevor Saunders  <tsaunders@mozilla.com>
299         * gcc-interface/decl.c, gcc-interface/utils.c: replace htab with
300         hash_table.
302 2014-11-20  Robert Dewar  <dewar@adacore.com>
304         * sem_prag.adb (Analyze_Pragma, case Elaborate): Forbid pragma
305         Elaborate in SPARK mode.
307 2014-11-20  Bob Duff  <duff@adacore.com>
309         * s-taskin.adb, s-tassta.adb (Initialize_ATCB): If Domain
310         is null, then initialize T.Common.Domain to that of the
311         activating task (not the parent task!), as required by RM-D.16.1.
312         T.Common.Domain should never be null; so Assert. Remove similar
313         code from Create_Task in s-tassta.adb.
314         * s-mudido-affinity.adb: Remove checks for Domain = null,
315         because it can't be null.
316         * s-taskin.ads, s-taspri-dummy.ads, s-taspri-mingw.ads,
317         s-taspri-posix.ads, s-taspri-posix-noaltstack.ads,
318         s-taspri-solaris.ads, s-taspri-vxworks.ads: Mark limited types as
319         explicitly limited for clarity.
321 2014-11-20  Ed Schonberg  <schonberg@adacore.com>
323         * exp_aggr.adb (Init_Hidden_Discriminants): Code clean up.
325 2014-11-20  Robert Dewar  <dewar@adacore.com>
327         * errout.adb (Error_Msg): Don't suppress continuation msgs for
328         run-time files.
329         * sem_prag.adb (Analyze_Pragma, case Elaborate): Forbid pragma
330         Elaborate in SPARK mode.
332 2014-11-20  Yannick Moy  <moy@adacore.com>
334         * gnat_rm.texi: Update GNAT RM with rule about expressions in
335         Update attribute.
337 2014-11-20  Thomas Quinot  <quinot@adacore.com>
339         * g-socket.adb (To_Host_Entry): Guard against case of a
340         non-AF_INET entry.
342 2014-11-20  Vadim Godunko  <godunko@adacore.com>
344         * a-strunb-shared.adb (To_Unbounded_String): Use shared empty
345         object to construct return value when source string is empty or
346         requested length is zero.
347         * a-stwiun-shared.adb (To_Unbounded_Wide_String): Likewise.
348         * a-stzunb-shared.adb (To_Unbounded_Wide_Wide_String): Likewise.
350 2014-11-20  Yannick Moy  <moy@adacore.com>
352         * a-cfhase.adb, a-cfinve.adb, a-cforma.adb, a-cfhama.adb, a-cforse.adb,
353         a-cofove.adb: Skip CodePeer analysis on body of all formal containers.
355 2014-11-20  Arnaud Charlet  <charlet@adacore.com>
357         * adaint.c: Fix typo.
358         * exp_util.adb (Make_Subtype_From_Expr): Complete previous change,
359         generate constant values.
360         * sem_eval.adb (Decompose_Expr): Fix latent bug leading to a wrong
361         evaluation to '0' of some unknown values.
363 2014-11-20  Robert Dewar  <dewar@adacore.com>
365         * repinfo.adb (List_Record_Info): Do not list discriminant in
366         unchecked union.
367         * sem_ch13.adb (Has_Good_Profile): Minor reformatting
368         (Analyze_Stream_TSS_Definition): Minor reformatting
369         (Analyze_Record_Representation_Clause): Do not issue warning
370         for missing rep clause for discriminant in unchecked union.
372 2014-11-20  Vadim Godunko  <godunko@adacore.com>
374         * a-strunb-shared.adb, a-stwiun-shared.adb, a-stzunb-shared.adb
375         ("&") Use already computed value of data length to call allocation
376         subprogram.
378 2014-11-20  Ed Schonberg  <schonberg@adacore.com>
380         * exp_ch6.adb (Expand_Call, Inlined_Subprogram): Do not suppress
381         debugging information for a call to a predefined unit, if the
382         call comes from source and the unit is in the Ada hierarchy.
384 2014-11-20  Bob Duff  <duff@adacore.com>
386         * s-mudido.ads: Update signature of Create and Get_Last_CPU. Add
387         CPU_Set, another Create, and Get_CPU_Set.
388         * s-mudido.adb: Corresponding changes to the spec. New
389         operations just raise an exception.  Also minor cleanup: use
390         raise_expressions.
391         * s-mudido-affinity.adb: Implementations of new operations from
392         * s-mudido.ads, for the platforms that actually support processor
393         affinity. The new Create (which takes a set) now does all the
394         work; the old Create (which takes a range) now just calls the
395         new one. Change error messages to reflect the fact that it's an
396         arbitrary set, not just a range.
398 2014-11-20  Robert Dewar  <dewar@adacore.com>
400         * exp_attr.adb: Minor reformatting.
402 2014-11-20  Hristian Kirtchev  <kirtchev@adacore.com>
404         * exp_util.adb (Make_Subtype_From_Expr): Capture the bounds of
405         all index constracts when the expression is of an array type.
407 2014-11-20  Bob Duff  <duff@adacore.com>
409         * s-taskin.ads: Minor comment improvements.
411 2014-11-20  Bob Duff  <duff@adacore.com>
413         * exp_ch9.adb: Minor comment fixes.
414         * s-taskin.adb (Initialize): Small simplification: pass System_Domain
415         to Initialize_ATCB instead of passing null and then setting the Domain
416         to System_Domain. This requires moving the creation of System_Domain
417         earlier.
418         * s-taprop-linux.adb (Set_Task_Affinity): Only call CPU_SET for
419         processors that have a True in the Domain. This is necessary if the
420         Domain is not all-True values.
422 2014-11-20  Ed Schonberg  <schonberg@adacore.com>
424         * sem_ch13.adb (Has_Good_Profile): a) An stream attribute
425         for the class-wide type of an interface type is not a primitive
426         operation and is not subject to the restrictions of 13.13. (38/3).
427         b) A stream operation for an interface type must be a null
428         procedure, and it cannot be a function.
430 2014-11-20  Bob Duff  <duff@adacore.com>
432         * exp_attr.adb (Attribute_Max_Size_In_Storage_Elements):
433         Eliminate 'Class references from the tree, because gigi crashes on
434         'Class. Also, don't check Nkind (Attr) -- it is known to be
435         N_Attribute_Reference.  Assert that instead.
437 2014-11-20  Bob Duff  <duff@adacore.com>
439         * debug.adb: Minor comment fix.
441 2014-11-20  Arnaud Charlet  <charlet@adacore.com>
443         * a-ciorma.adb: Minor update: move pragma Annotate up.
444         * a-cfdlli.adb: Skip codepeer analysis on this body.
446 2014-11-20  Robert Dewar  <dewar@adacore.com>
448         * sem_prag.adb (Analyze_Pragma, case No_Elaboration_Code_All):
449         Allow use of this pragma with generic unit (package or subprogram).
450         * gnat_rm.texi: Clarify that pragma No_Elaboration_Code_All can
451         be applied to generics.
453 2014-11-20  Ed Schonberg  <schonberg@adacore.com>
455         * sem_aggr.adb (Valid_Limited_Ancestor): Ancestor part of
456         extension aggregate can itself be an extension aggregate, as
457         well as a call that is rewritten as a reference.
459 2014-11-20  Eric Botcazou  <ebotcazou@adacore.com>
461         * inline.adb (Add_Inlined_Subprogram): Insert all programs
462         generated as a body or whose declaration was provided along with
463         the body.
465 2014-11-20  Javier Miranda  <miranda@adacore.com>
467         * sem.adb (Semantics): Disable expansion if we are compiling a
468         separate unit under configurable runtime. By default separate
469         units are compiled with expansion disabled but under configurable
470         runtime we enable the expansion to get error messages about
471         missing entities.
473 2014-11-20  Robert Dewar  <dewar@adacore.com>
475         * sem_ch13.adb: Minor reformatting.
476         * exp_util.adb (Following_Address_Clause): Handle case of
477         package private part.
479 2014-11-20  Arnaud Charlet  <charlet@adacore.com>
481         * a-cdlili.adb, a-cihama.adb, a-coinve.adb, a-cusyqu.adb, a-ciorse.adb,
482         a-coorma.adb, a-cborma.adb, a-cidlli.adb, a-cimutr.adb, a-ciormu.adb,
483         a-cbprqu.adb, a-cihase.adb, a-cohama.adb, a-coorse.adb, a-coboho.adb,
484         a-cuprqu.adb, a-cbhama.adb, a-rbtgbo.adb, a-cborse.adb, a-comutr.adb,
485         a-ciorma.adb, a-cobove.adb, a-coormu.adb, a-convec.adb, a-cohase.adb,
486         a-coinho.adb, a-coinho-shared.adb, a-cbdlli.adb, a-cbsyqu.adb,
487         a-cbmutr.adb, a-cbhase.adb: Add pragma Annotate to prevent codepeer
488         from analyzing these bodies.
490 2014-11-20  Ed Schonberg  <schonberg@adacore.com>
492         * sem_ch6.adb (Analyze_Subprogram_Body_Helper): Do not apply
493         inlining expansion if function build in place, i.e. has a limited
494         return type.
496 2014-11-20  Hristian Kirtchev  <kirtchev@adacore.com>
498         * sem_prag.adb (Analyze_Refined_Depends_In_Decl_Part): Add
499         variables Body_Id, Body_Inputs, Body_Outputs, Spec_Inputs,
500         Spec_Outputs. Synthesize the inputs and outputs of the subprogram
501         when pragma [Refined_]Global is missing and perform legality
502         checks on output states with visible refinement.
503         (Appears_In): Update the comment on usage.
504         (Check_Output_States): New routine.
505         (Collect_Dependency_Clause): New routine.
506         (Collect_Global_Items): Relocated to
507         Analyze_Refined_Global_In_Decl_Part.
508         (Collect_Subprogram_Inputs_Outputs): Add new formal parameters
509         Synthesize and Depends_Seen. The routine can now synthesize inputs
510         and outputs from pragma [Refined_]Depends.
511         (Normalize_Clause): Update the comment on usage. The routine no longer
512         performs normalization of outputs.
513         (Normalize_Clauses): Normalize both inputs and outputs.
514         (Normalize_Output): Relocated to Normalize_Clauses.
515         * sem_prag.ads (Collect_Subprogram_Inputs_Outputs): Add new
516         formal parameters Synthesize and Depends_Seen and update the
517         comment on usage.
519 2014-11-20  Vincent Celier  <celier@adacore.com>
521         PR ada/47500
522         * back_end.adb (Scan_Back_End_Switches): Skip switch -G and
523         its argument.
525 2014-11-20  Ed Schonberg  <schonberg@adacore.com>
527         * sem_ch13.adb (Reset_Loop_Variable): New subsidiary procedure
528         in Build_Predicate_Functions, to handle properly quantified
529         expressions in dynamic predicates.
531 2014-11-20  Robert Dewar  <dewar@adacore.com>
533         * gnatcmd.adb, sem_ch6.adb, exp_dist.adb: Minor reformatting.
534         * sem_util.adb (Bad_Unordered_Enumeration_Reference): Suppress
535         warning (return False) for generic type.
537 2014-11-20  Hristian Kirtchev  <kirtchev@adacore.com>
539         * sem_res.adb (Appears_In_Check): Removed.
540         (Is_OK_Volatile_Context): Rewrite the checks which verify that
541         an effectively volatile object subject to enabled properties
542         Async_Writers or Effective_Reads appears in a suitable context to
543         properly recognize a procedure call.
544         (Within_Check): New routine.
545         (Within_Procedure_Call): New routine.
547 2014-11-20  Ed Schonberg  <schonberg@adacore.com>
549         * sem_ch6.adb: Improve better error message.
551 2014-11-20  Thomas Quinot  <quinot@adacore.com>
553         * freeze.adb, sem_ch13.adb: Minor editing.
555 2014-11-20  Vincent Celier  <celier@adacore.com>
557         * gnatcmd.adb: Remove any special processing for the ASIS tools
558         (gnatpp, gnatmetric, gnatcheck, gnatelim and gnatstup) and simply
559         invoke the tool with the provided switches and arguments.
561 2014-11-20  Ed Schonberg  <schonberg@adacore.com>
563         * sem_ch6.adb (Analyze_Expression_Function): Reject declaration
564         of expression function with identical profile as previous
565         expression function.
567 2014-11-20  Thomas Quinot  <quinot@adacore.com>
569         * sem_ch13.adb: Complete previous change.
570         * exp_dist.adb, exp_dist.ads: Rework PolyORB/DSA arguments processing
571         circuitry to correctly handle the case of non-private limited
572         unconstrained formals.
574 2014-11-20  Robert Dewar  <dewar@adacore.com>
576         * freeze.adb, exp_dbug.adb, sem_ch13.adb: Minor reformatting.
578 2014-11-20  Thomas Quinot  <quinot@adacore.com>
580         * einfo.ads: Fix minor typo in comment.
582 2014-11-20  Robert Dewar  <dewar@adacore.com>
584         * inline.adb, sem_util.adb: Minor reformatting.
586 2014-11-20  Pierre-Marie Derodat  <derodat@adacore.com>
588         * uintp.h (UI_Eq): Declare.
589         * urealp.h (Norm_Den): Declare.
590         (Norm_Num): Declare.
591         * exp_dbug.adb (Is_Handled_Scale_Factor): New.
592         (Get_Encoded_Name): Do not output ___XF GNAT encodings
593         for fixed-point types when these can be handled by GCC's DWARF
594         back-end.
596 2014-11-20  Thomas Quinot  <quinot@adacore.com>
598         * sem_ch13.db (Inherit_Aspects_At_Freeze_Point): Inherit parent
599         SSO even if set through a pragma Default_Scalar_Storage_Order.
600         * freeze.adb (Set_SSO_From_Default): For a type extension,
601         do not let the default SSO override the parent SSO.
602         * gnat_rm.texi: document the above
604 2014-11-20  Robert Dewar  <dewar@adacore.com>
606         * a-stream.ads, a-reatim.ads, a-calend.ads, sinfo.ads, s-crtl.ads,
607         interfac.ads, s-taskin.ads: Minor reformatting.
609 2014-11-20  Hristian Kirtchev  <kirtchev@adacore.com>
611         * sem_prag.adb (Analyze_Pragma): Extensions_Visible can now
612         apply to an expression function.
613         * sem_util.adb (Extensions_Visible_Status): Add special processing
614         for expression functions.
616 2014-11-20  Hristian Kirtchev  <kirtchev@adacore.com>
618         * inline.adb (Build_Body_To_Inline): Remove meaningless aspects
619         and pragmas.
620         (Generate_Subprogram_Body): Remove meaningless aspects and pragmas.
621         (Remove_Aspects_And_Pragmas): New routine.
622         (Remove_Pragmas): Removed.
623         * namet.ads, namet.adb (Nam_In): New versions of the routine.
625 2014-11-20  Thomas Quinot  <quinot@adacore.com>
627         * sem_util.adb: Minor reformatting.
629 2014-11-20  Robert Dewar  <dewar@adacore.com>
631         * sem_prag.adb (Analyze_Pragma, case Linker_Section): Detect
632         duplicate Linker_Section.
634 2014-11-20  Ed Schonberg  <schonberg@adacore.com>
636         * exp_ch4.adb: Add guard for build-in-place boolean op.
638 2014-11-20  Yannick Moy  <moy@adacore.com>
640         * checks.adb (Apply_Scalar_Range_Check): In GNATprove mode,
641         put a range check when an empty range is used, instead of an
642         error message.
643         * sinfo.ads Update comment on GNATprove mode.
645 2014-11-20  Arnaud Charlet  <charlet@adacore.com>
647         * a-stream.ads, s-osinte-linux.ads, a-reatim.ads, a-calend.ads,
648         s-crtl.ads, interfac.ads, s-taskin.ads: Replace uses of 2 ** 63 and
649         2 ** 64 by references to Long_Long_Integer instead, to allow these
650         units to be analyzed by codepeer or spark when using a target
651         configuration file with long_long_size set to 32.
653 2014-11-20  Hristian Kirtchev  <kirtchev@adacore.com>
655         * sem_util.adb (Extensions_Visible_Status): Modify the logic to account
656         for non-SPARK code.
657         (Object_Access_Level): In ASIS mode, recognize
658         a selected component with an implicit dereference so that it
659         yields the same value with and without expansion.
661 2014-11-20  Ed Schonberg  <schonberg@adacore.com>
663         * sem_prag.adb (Analyze_Pragma, case Implemented): In ASIS
664         (compile-only) mode, use original type declaration to determine
665         whether protected type implements an interface.
667 2014-11-20  Yannick Moy  <moy@adacore.com>
669         * a-cfdlli.adb, a-cfdlli.ads, a-cfinve.adb, a-cfinve.ads,
670         * a-cofove.adb, a-cofove.ads: Mark spec as SPARK_Mode, and private
671         part/body as SPARK_Mode Off.
672         * a-cfhama.adb, a-cfhama.ads, a-cfhase.adb, a-cfhase.ads,
673         * a-cforma.adb, a-cforma.ads, a-cforse.adb, a-cforse.ads: Use
674         aspect instead of pragma for uniformity.
676 2014-11-20  Hristian Kirtchev  <kirtchev@adacore.com>
678         * sem_util.adb (Is_EVF_Expression): Include
679         attributes 'Loop_Entry, 'Old and 'Update to the logic.
681 2014-11-20  Bob Duff  <duff@adacore.com>
683         * sem_res.adb (Make_Call_Into_Operator): Don't
684         call Left_Opnd in the case of unary operators, because they only
685         have Right.
687 2014-11-20  Pascal Obry  <obry@adacore.com>
689         * initialize.c (ProcListCS): New extern variable (critical section).
690         (ProcListEvt): New extern variable (handle).
691         (__gnat_initialize)[Win32]: Initialize the ProcListCS critical
692         section object and the ProcListEvt event.
693         * final.c (__gnat_finalize)[Win32]: Properly finalize the
694         ProcListCS critical section and the ProcListEvt event.
695         * adaint.c (ProcListEvt): New Win32 event handle.
696         (EnterCS): New routine to enter the critical section when dealing with
697         child processes chain list.
698         (LeaveCS): As above to exit from the critical section.
699         (SignalListChanged): Routine to signal that the chain process list has
700         been updated.
701         (add_handle): Use EnterCS/LeaveCS, also call SignalListChanged when the
702         handle has been added.
703         (__gnat_win32_remove_handle): Use EnterCS/LeaveCS,
704         also call SignalListChanged if the handle has been found and removed.
705         (remove_handle): Routine removed, implementation merged with the above.
706         (win32_wait): Use EnterCS/LeaveCS for the critical section. Properly
707         copy the PID list locally to ensure that even if the list is updated
708         the local copy remains valid. Add into the hl (handle list) the
709         ProcListEvt handle. This handle is used to signal that a change has
710         been made into the process chain list. This is to ensure that a waiting
711         call can be resumed to take into account new processes. We also make
712         sure that if the handle was not found into the list we start over
713         the wait call. Indeed another concurrent call to win32_wait()
714         could already have handled this process.
716 2014-11-20  Ed Schonberg  <schonberg@adacore.com>
718         * sem_res.adb (Resolve_Actuals): The legality rule concerning
719         the use of class-wide actuals for a non-controlling formal are
720         not rechecked in an instance.
722 2014-11-20  Pascal Obry  <obry@adacore.com>
724         * g-dirope.ads: Minor typo fix.
726 2014-11-20  Hristian Kirtchev  <kirtchev@adacore.com>
728         * exp_attr.adb (Expand_N_Attribute_Reference,
729         Expand_Update_Attribute): Preserve the tag of a prefix by offering
730         a specific view of the class-wide version of the prefix.
732 2014-11-20  Javier Miranda  <miranda@adacore.com>
734         * sem_ch6.adb (Analyze_Function_Return): For functions returning
735         an access to an interface add an implicit conversion to the target
736         type to force the displacement of the pointer to the object to
737         reference the secondary dispatch table.
738         (Check_Anonymous_Return): Skip internally built functions which handle
739         the case of null access when locating the master of a task.
740         * sem_res.adb (Valid_Conversion): Return true for internally
741         generated conversions of access to interface types added to force
742         the displacement of the pointer to reference the corresponding
743         dispatch table.
745 2014-11-20  Pascal Obry  <obry@adacore.com>
747         * adaint.c (add_handle): realloc with a size of +100.
749 2014-11-20  Ed Schonberg  <schonberg@adacore.com>
751         * sem_res.adb (Make_Call_Into_Operator): In ASIS mode, propagate
752         back the resolved operands to the original call node, taking
753         into account that the original call may have named associations.
755 2014-11-20  Hristian Kirtchev  <kirtchev@adacore.com>
757         * inline.adb (Has_Some_Contract): Change the
758         guard to test the Ekind of the entity rather than the Analyzed
759         flag. This handles partially analyzed contexts.
761 2014-11-20  Ed Schonberg  <schonberg@adacore.com>
763         * sem_ch8.adb (Analyze_Object_Renaming): In Ada 83 mode, do
764         not reject the renaming of a function result if the renaming
765         does not come for source.
767 2014-11-20  Robert Dewar  <dewar@adacore.com>
769         * exp_util.ads: Minor addition of ??? clause.
771 2014-11-20  Ed Schonberg  <schonberg@adacore.com>
773         * sem_util.adb (Is_Variable): For an Ada 2012 implicit
774         dereference introduced for an indexing opertion, check that the
775         type of the corresponding access discriminant is not an access
776         to constant.
778 2014-11-20  Hristian Kirtchev  <kirtchev@adacore.com>
780         * sem_ch6.adb (Find_Corresponding_Spec): Inherit
781         the ghostness of the matching spec, the same way convention
782         is inherited.
784 2014-11-20  Eric Botcazou  <ebotcazou@adacore.com>
786         * sem_ch3.adb (Analyze_Object_Declaration): Swap a couple of
787         tests in a condition so Following_Address_Clause is invoked
788         only if need be.
789         * exp_util.ads (Following_Address_Clause): Add small note.
791 2014-11-20  Pascal Obry  <obry@adacore.com>
793         * adaint.c (remove_handle): New local routine without a lock.
794         (win32_wait): fix the critical section to properly protect needed
795         code, use new remove_handle.
796         (__gnat_win32_remove_handle): refactor code with remove_handle.
798 2014-11-20  Eric Botcazou  <ebotcazou@adacore.com>
800         * inline.adb (Analyze_Inlined_Bodies): Iterate between loading
801         of the inlined bodies and instantiation of the generic bodies
802         until no more bodies need to be loaded.
804 2014-11-20  Vincent Celier  <celier@adacore.com>
806         * prj.adb, prj.ads, prj-conf.adb: Minor change of procedure name:
807         Update_Ignore_Missing_With becomes Set_Ignore_Missing_With.
809 2014-11-20  Robert Dewar  <dewar@adacore.com>
811         * exp_ch7.adb, sem_ch5.adb, sem_ch7.adb, sem_util.adb,
812         sem_ch6.adb: Minor reformatting.
814 2014-11-20  Javier Miranda  <miranda@adacore.com>
816         * exp_ch4.adb (Expand_N_Type_Conversion): Add missing implicit
817         conversion to force the displacement of the pointer to the object
818         to reference the secondary dispatch table.
820 2014-11-11  Simon Wright  <simon@pushface.org>
822         PR ada/42978
823         * mlib-utl.adb (ar): Output the options passed to ranlib.
825 2014-11-07  Arnaud Charlet  <charlet@adacore.com>
827         * debug.adb, snames.adb-tmpl (Is_Keyword_Name): Consider 'overriding'
828         a keyword in Ada 95 mode when -gnatd.D is used.
829         * gnat_ugn.texi: Document -gnatd.D.
831 2014-11-07  Vasiliy Fofanov  <fofanov@adacore.com>
833         * gnatls.adb: Lower severity of the program's return value in
834         some common cases.
836 2014-11-07  Ed Schonberg  <schonberg@adacore.com>
838         * sem_ch10.adb (Decorate_Type): The limited view of a tagged
839         type has an empty list of primitive operations.
841 2014-11-07  Hristian Kirtchev  <kirtchev@adacore.com>
843         * sem_ch3.adb (Analyze_Object_Declaration): Update references to SPARK
844         RM.
845         (Process_Full_View): Update references to SPARK RM.
846         * sem_ch6.adb (Analyze_Generic_Subprogram_Body): Update references
847         to SPARK RM.
848         (Analyze_Subprogram_Body_Helper): Update references
849         to SPARK RM.
850         * sem_ch7.adb (Analyze_Package_Body_Helper): Update references
851         to SPARK RM.
852         * sem_prag.adb (Check_Ghost_Constituent): Update references to
853         SPARK RM.
854         * sem_res.adb (Check_Ghost_Policy): Update references to SPARK RM.
855         (Resolve_Actuals): Ensure that the actual parameter of a Ghost
856         subprogram whose formal is of mode IN OUT or OUT is Ghost.
857         * sem_util.adb (Check_Ghost_Completion): Update references to
858         SPARK RM.
860 2014-11-07  Ed Schonberg  <schonberg@adacore.com>
862         * exp_ch7.adb (Make_Final_Call): If type of designated object is
863         derived from that of the formal of the Deep_Finalize procedure,
864         add an unchecked conversion to prevent spurious type error.
866 2014-11-07  Robert Dewar  <dewar@adacore.com>
868         * table.adb, inline.adb, einfo.adb, gnat1drv.adb, exp_ch13.adb,
869         exp_fixd.adb, prj-conf.adb, exp_strm.adb, a-cofove.adb, exp_ch3.ads:
870         Minor reformatting.
872 2014-11-07  Robert Dewar  <dewar@adacore.com>
874         * sem_ch12.adb, sem_ch13.adb, prj-tree.adb: Minor reformatting.
876 2014-11-07  Hristian Kirtchev  <kirtchev@adacore.com>
878         * einfo.adb (Set_Is_Checked_Ghost_Entity,
879         Set_Is_Ignored_Ghost_Entity): Add exceptions to the assertion
880         check.
881         * sem_ch6.adb (Check_Conformance): Consider only
882         source subprograms when checking for Ghost conformance.
883         * sem_prag.adb (Analyze_Pragma): Handle the case
884         where pragma Ghost applies to a stand alone subprogram body that
885         acts as a compilation unit.
886         * sem_res.adb: Minor reformatting (merge if statements).
888 2014-11-07  Ed Schonberg  <schonberg@adacore.com>
890         * exp_strm.adb (Build_Record_Or_Elementary_Input_Function):
891         Check whether underlying type is constrained before generating
892         the object declaration for the result object of the function.
894 2014-11-07  Robert Dewar  <dewar@adacore.com>
896         * freeze.adb: Code clean up.
898 2014-11-07  Yannick Moy  <moy@adacore.com>
900         * a-cfdlli.ads, a-cfhama.ads, a-cfhase.ads, a-cfinve.ads,
901         * a-cforma.ads, a-cforse.ads, a-cofove.ads: Mark First_To_Previous,
902         Current_To_Last and Strict_Equal as Ghost.
904 2014-11-07  Ed Schonberg  <schonberg@adacore.com>
906         * sem_ch3.adb: Code clean up.
908 2014-11-07  Hristian Kirtchev  <kirtchev@adacore.com>
910         * freeze.adb (Freeze_Entity): Issue an error regardless of the
911         SPARK_Mode when a ghost type is effectively volatile.
912         * sem_ch3.adb (Analyze_Object_Contract): Decouple the checks
913         related to Ghost from SPARK_Mode.
914         * sem_res.adb (Check_Ghost_Policy): Issue an error regardless
915         of the SPARK_Mode when the Ghost policies do not match.
916         * sem_util.adb (Check_Ghost_Completion): Issue an error regardless
917         of the SPARK_Mode when the Ghost policies do not match.
919 2014-11-07  Ed Schonberg  <schonberg@adacore.com>
921         * sem_ch5.adb (Analyze_Iterator_Specification): return if name
922         in iterator does not have any usable aspect for iteration.
924 2014-11-07  Ed Schonberg  <schonberg@adacore.com>
926         * sem_ch6.adb (Analyze_Null_Procedure): Reject a null procedure
927         that there is a previous null procedure in scope with a matching
928         profile.
930 2014-11-07  Hristian Kirtchev  <kirtchev@adacore.com>
932         * atree.adb (Copy_Separate_Tree): Copy the aspect specifications.
933         * inline.adb (Has_Some_Contract): Do the check only when the
934         related entity has been analyzed.
936 2014-11-07  Ed Schonberg  <schonberg@adacore.com>
938         * exp_fixd.adb (Expand_Multiply_Fixed_By_Fixed_Giving_Integer):
939         If the restriction No_Floating_Point is in effect, and the
940         operands have the same type, introduce a temporary to hold
941         the fixed point result, to prevent the use of floating-point
942         operations at run-time.
944 2014-11-07  Robert Dewar  <dewar@adacore.com>
946         * freeze.adb (Check_Address_Clause): Minor reformatting
947         (Find_Constant): Minor reformatting.
948         (Freeze_Array_Type): Modify check for packed declarations.
949         (Freeze_Entity): Minor reformatting.
951 2014-11-05  Eric Botcazou  <ebotcazou@adacore.com>
953         * gnatvsn.ads (Library_Version): Bump to 5.0.
955 2014-11-05  Eric Botcazou  <ebotcazou@adacore.com>
957         * gcc-interface/trans.c (Subprogram_Body_to_gnu): For a function with
958         copy-in/copy-out parameters and which returns by invisible reference,
959         do not create the variable for the return value; instead, manually
960         generate the indirect copy out statements on exit.
961         (gnat_to_gnu) <N_Simple_Return_Statement>: Adjust accordingly and build
962         a simple indirect assignment for the return value.
964 2014-11-05  Eric Botcazou  <ebotcazou@adacore.com>
966         * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Record_Type>: For a
967         derived untagged type that renames discriminants, be prepared for
968         a type derived from a private discriminated type when changing the
969         type of the stored discriminants.
971 2014-11-05  Eric Botcazou  <ebotcazou@adacore.com>
973         * gcc-interface/trans.c (Handled_Sequence_Of_Statements_to_gnu): Set
974         the SLOC of the node on the call to set_jmpbuf_address_soft emitted
975         on block entry with SJLJ.
977 2014-11-05  Eric Botcazou  <ebotcazou@adacore.com>
979         * gcc-interface/utils.c (create_subprog_decl): Move code dealing with
980         conflicting inlining status of nested subprograms to...
981         * gcc-interface/trans.c (check_inlining_for_nested_subprog): ...here.
982         (Attribute_to_gnu) <Attr_Access>: Call it.
983         (Call_to_gnu): Likewise.
984         (Subprogram_Body_to_gnu): Drop the body if it is an inlined external
985         function that has been marked uninlinable.
987 2014-10-31  Hristian Kirtchev  <kirtchev@adacore.com>
989         * aspects.adb Add an entry for aspect Ghost in table
990         Canonical_Aspect.
991         * aspects.ads Add an entry for aspect Ghost in tables
992         Aspect_Argument, Aspect_Delay, Aspect_Id, Aspect_Names and
993         Implementation_Defined_Aspect.
994         * einfo.adb: Flags 277 and 278 are now in use.
995         (Is_Checked_Ghost_Entity): New routine.
996         (Is_Ghost_Entity): Removed.
997         (Is_Ghost_Subprogram): Removed.
998         (Is_Ignored_Ghost_Entity): New routine.
999         (Set_Is_Checked_Ghost_Entity): New routine.
1000         (Set_Is_Ignored_Ghost_Entity): New routine.
1001         (Write_Entity_Flags): Output flags Is_Checked_Ghost_Entity and
1002         Is_Ignored_Ghost_Entity.
1003         * einfo.ads: Add new flags Is_Checked_Ghost_Entity
1004         and Is_Ignored_Ghost_Entity along with usage in nodes.
1005         (Is_Checked_Ghost_Entity): New routine and pragma Inline.
1006         (Is_Ghost_Entity): Removed along with synthesized flag
1007         description and usage in nodes.
1008         (Is_Ghost_Subprogram): Removed along with synthesized flag description
1009         and usage in nodes.
1010         (Is_Ignored_Ghost_Entity): New routine and pragma Inline.
1011         (Set_Is_Checked_Ghost_Entity): New routine and pragma Inline.
1012         (Set_Is_Ignored_Ghost_Entity): New routine and pragma Inline.
1013         * freeze.adb (Freeze_Entity): A Ghost type cannot be effectively
1014         volatile.
1015         * par-prag.adb Pragma Ghost does not need special handling by
1016         the parser.
1017         * repinfo.adb (List_Mechanisms): Remove the entry for convention Ghost.
1018         * sem_attr.adb (Analyze_Access_Attribute): Remove obsolete check.
1019         * sem_ch3.adb (Analyze_Full_Type_Declaration): Mark
1020         the type as Ghost when its enclosing context is Ghost.
1021         (Analyze_Incomplete_Type_Decl): Mark the type as Ghost when
1022         its enclosing context is Ghost.
1023         (Analyze_Number_Declaration): Mark the number as Ghost when its
1024         enclosing context is Ghost.
1025         (Analyze_Object_Declaration): Mark the object as Ghost when its
1026         enclosing context is Ghost. Verify the Ghost policy between
1027         initial declaration and completion of a deferred constant.
1028         (Analyze_Object_Contract): A Ghost variable cannot be effectively
1029         volatile, imported or exported.
1030         (Build_Derived_Record_Type): Mark a type extension as Ghost when it
1031         implements a Ghost interface.
1032         (Build_Record_Type): Inherit volatility and "ghostness" from
1033         the parent type.
1034         (Check_Completion): A Ghost entity declared
1035         in a non-Ghost package does not require completion in a body.
1036         (Implements_Ghost_Interface): New routine.
1037         (Process_Full_View): Inherit "ghostness" from the partial view. Verify
1038         the Ghost policy between the partial and full views. Verify the
1039         completion of a Ghost type extension.
1040         * sem_ch4.adb (Check_Ghost_Subprogram_Call): Removed.
1041         * sem_ch5.adb (Analyze_Assignment): Analyze the left hand side first.
1042         * sem_ch6.adb (Analyze_Abstract_Subprogram_Declaration): Mark
1043         the subprogram as Ghost when its enclosing context is Ghost.
1044         (Analyze_Generic_Subprogram_Body): Mark the generic body as Ghost
1045         when its enclosing context is Ghost. Verify the Ghost policy
1046         between the spec and body.
1047         (Analyze_Subprogram_Body_Helper): Mark the body as Ghost when its
1048         enclosing context is Ghost. Verify the Ghost policy between the spec
1049         and body.
1050         (Check_Conformance): A Ghost subprogram profile and a non-Ghost
1051         subprogram profile are not subtype conformant.
1052         (Convention_Of): Removed.
1053         * sem_ch7.adb (Analyze_Package_Body_Helper): Inherit the
1054         "ghostness" from the spec. Verify the Ghost policy between
1055         the spec and body.
1056         (Analyze_Private_Type_Declaration): Mark the type as Ghost when its
1057         enclosing context is Ghost.
1058         (Requires_Completion_In_Body): New routine.
1059         (Unit_Requires_Body): Use Requires_Completion_In_Body.
1060         (Unit_Requires_Body_Info): Rename formal parameter P to Pack_Id, update
1061         comment on usage and all uses of P in the body. Use
1062         Requires_Completion_In_Body.
1063         * sem_ch7.ads (Unit_Requires_Body): Rename formal parameter P
1064         to Pack_Id, update comment on usage and all uses of P in the body.
1065         * sem_ch8.adb (Analyze_Exception_Renaming): Inherit the "ghostness"
1066         from the renamed excention.
1067         (Analyze_Generic_Renaming): Inherit the "ghostness" from the
1068         renamed generic subprogram.
1069         (Analyze_Object_Renaming): Inherit the "ghostness" from the renamed
1070         object.
1071         (Analyze_Package_Renaming): Inherit the "ghostness" from the
1072         renamed package.
1073         (Analyze_Subprogram_Renaming): Inherit the "ghostness" from the
1074         renamed subprogram.
1075         * sem_ch11.adb (Analyze_Exception_Declaration): Mark an exception
1076         as Ghost when its enclosing context is Ghost.
1077         * sem_ch12.adb (Analyze_Generic_Package_Declaration,
1078         Analyze_Generic_Subprogram_Declaration): Mark an exception as
1079         Ghost when its enclosing context is Ghost.
1080         (Preanalyze_Actuals): Remove obsolete check.
1081         * sem_ch13.adb (Analyze_Aspect_Specifications): Add processing
1082         for aspect Ghost.
1083         (Check_Aspect_At_Freeze_Point): Aspects
1084         Depends and Global do no need special checking at freeze point.
1085         (Insert_After_SPARK_Mode): Update comment on usage.
1086         * sem_mech.adb (Set_Mechanisms): Remove the entry for convention Ghost.
1087         * sem_prag.adb Add an entry for pragma Ghost in table Sig_Flags.
1088         (Analyze_Abstract_State): Update the grammar of the pragma. Add
1089         formal parameter Pack_Id along with comment on usage. Mark an
1090         abstract state as Ghost when its enclosing context is Ghost. Add
1091         processing for option Ghost.
1092         (Analyze_Constituent): Verify
1093         that a Ghost abstract state is refined by Ghost constituents.
1094         (Analyze_Pragma): "Ghost" is now a valid policy. Add checks
1095         related to the use and placement of Check_Policy Ghost. Add
1096         processing for pragma Ghost.
1097         (Check_Ghost_Constituent): New routine.
1098         (Is_Valid_Assertion_Kind): "Ghost" is now a valid assertion.
1099         (Process_Convention): Remove obsolete check.
1100         (Set_Convention_From_Pragma): Remove the processing for convention
1101         Ghost.
1102         * sem_res.adb (Check_Ghost_Context): New routine.
1103         (Resolve_Call): Verify that a reference to a Ghost entity appears in a
1104         suitable context. Verify the Ghost polity between point of declaration
1105         and point of use.
1106         (Resolve_Entity_Name): Verify that a reference to
1107         a Ghost entity appears in a suitable context. Verify the Ghost
1108         polity between point of declaration and point of use.
1109         * sem_util.adb (Check_Ghost_Completion): New routine.
1110         (Check_Ghost_Derivation): New routine.
1111         (Incomplete_Or_Partial_View): New routine.
1112         (Incomplete_Or_Private_View): Removed.
1113         (Is_Ghost_Entity): New routine.
1114         (Is_Ghost_Statement_Or_Pragma): New routine.
1115         (Is_Subject_To_Ghost): New routine.
1116         (Policy_In_Effect): New routine.
1117         (Set_Is_Ghost_Entity): New routine.
1118         (Within_Ghost_Scope): New routine.
1119         * sem_util.ads (Check_Ghost_Completion): New routine.
1120         (Check_Ghost_Derivation): New routine.
1121         (Incomplete_Or_Partial_View): New routine.
1122         (Incomplete_Or_Private_View): Removed.
1123         (Is_Ghost_Entity): New routine.
1124         (Is_Ghost_Statement_Or_Pragma): New routine.
1125         (Is_Subject_To_Ghost): New routine.
1126         (Policy_In_Effect): New routine.
1127         (Set_Is_Ghost_Entity): New routine.
1128         (Within_Ghost_Scope): New routine.
1129         * snames.adb-tmpl (Get_Convention_Id): Remove the entry for
1130         convention Ghost.
1131         (Get_Convention_Name): Remove the entry for convention Ghost.
1132         * snames.ads-tmpl Remove the convention id for Ghost. Add a
1133         pragma id for Ghost.
1135 2014-10-31  Sergey Rybin  <rybin@adacore.com frybin>
1137         * gnat_ugn.texi: Add description of --RTS option for ASIS tools.
1139 2014-10-31  Olivier Hainque  <hainque@adacore.com>
1141         * gcc-interface/Makefile.in (arm-vxworks): Update target pairs.
1143 2014-10-31  Vincent Celier  <celier@adacore.com>
1145         * prj-part.adb (Parse_Single_Project): Call Set_Display_Name_Of.
1146         * prj-proc.adb (Recursive_Process): Call Display_Name_Of to
1147         get the project Display_Name.
1148         * prj-tree.adb (Display_Name_Of): New function
1149         (Set_Display_Name_Of): New procedure.
1150         (Create_Project): Call Set_Display_Name_Of.
1151         * prj-tree.ads (Display_Name_Of): New function.
1152         (Set_Display_Name_Of): New procedure.
1153         (Project_Node_Record): New component Display_Name.
1154         (Project_Name_And_Node): Remove component Display_Name.
1155         * prj-conf.adb (Parse_Project_And_Apply_Config): Use the full
1156         Config_File_Path as the Config_File_Name, not just its simple
1157         name.
1159 2014-10-31  Thomas Quinot  <quinot@adacore.com>
1161         * get_scos.adb: Minor reformatting.
1163 2014-10-31  Ed Schonberg  <schonberg@adacore.com>
1165         * exp_ch5.adb (Expand_Formal_Container_Loop): Create block to
1166         capture declaration for cursor to prevent spurious errors when
1167         several formal iterators that use the same cursoe name appear
1168         in the same context.
1170 2014-10-31  Vincent Celier  <celier@adacore.com>
1172         * prj-proc.adb (Recursive_Process): Make sure that the project
1173         display name is never No_Name.
1175 2014-10-31  Ed Schonberg  <schonberg@adacore.com>
1177         * sem_attr.adb (Analyze_Access_Attribute): Do not emit error
1178         message if reference does not come from source, as in the case
1179         for the controlling argument of a dispatching call. Error is
1180         diagnosed when call is resolved.
1181         * sem_ch4.adb (Complete_Object_Operation); Fix incorrect RM
1182         reference in error message.
1183         * sem_res.adb (Check_Prefixed_Call): ditto.
1185 2014-10-31  Yannick Moy  <moy@adacore.com>
1187         * sem_prag.adb (Process_Restrictions_Or_Restriction_Warnings): Do not
1188         suppress checks when pragma Restrictions (No_Exception) is used in
1189         CodePeer or GNATprove mode.
1191 2014-10-31  Yannick Moy  <moy@adacore.com>
1193         * gnat1drv.adb (Adjust_Global_Switches): Explicitly mark language
1194         checks as not suppressed in GNATprove mode.
1196 2014-10-31  Ed Schonberg  <schonberg@adacore.com>
1198         * sem_elab.adb (Check_Elab_Call): Nothing to check if call is
1199         being pre-analyzed.
1200         * sem_ch3.adb (Complete_Private_Subtype): If all rep items of full
1201         view are those of the base, use rep_item chain of partial view,
1202         which may include aspects.
1203         * sem_cat.adb (Is_non_Remote_Access_Type): Use underlying type
1204         of base type, to handle properly declared subtypes.
1206 2014-10-31  Ed Schonberg  <schonberg@adacore.com>
1208         * sem_ch12.adb (Analyze_Generic_Package_Declaration): If there
1209         is a default storage pool, add a corresponding aspect to the
1210         generic unit, to be used at the point of instantiation.
1211         (Analyze_Package_Instantiation): If generic unit has aspect
1212         specifications, propagate them to instance. If instance has a
1213         Default_Storage_Pool aspect, make sure that it overrides the
1214         one that may be inherited from the generic.
1216 2014-10-31  Vincent Celier  <celier@adacore.com>
1218         * prj-attr.adb: Minor removal of attributes of package Linker
1219         that have never been used and never been documented.
1220         * projects.texi: Add documentation for attribute Runtime.
1221         * prj-nmsc.adb (Check_Configuration): Do not report a warning
1222         for unknown compilers when the project is externally built.
1224 2014-10-31  Vasiliy Fofanov  <fofanov@adacore.com>
1226         * prj-conf.adb (Do_Autoconf): Refactor the code so that empty
1227         Normalized_Pathname doesn't inhibit the custom Selected_Target
1228         value.
1229         * prj-conf.adb (Parse_Project_And_Apply_Config): Make sure that
1230         Automatically_Generated is correctly set after the first call
1231         to Process_Project_And_Apply_Config and not modified after the
1232         second call, if any.
1234 2014-10-31  Yannick Moy  <moy@adacore.com>
1236         * Makefile.rtl, gnat_rm.texi, impunit.adb: Add mention of new library
1237         files.
1238         * a-cfinve.adb, a-cfinve.ads: New unit for formal indefinite
1239         vectors, suitable for use in client SPARK code, also more
1240         efficient than the standard vectors.
1241         * a-coboho.adb, a-coboho.ads New unit for bounded holders, that
1242         are used to define formal indefinite vectors in terms of formal
1243         definite ones.
1244         * a-cofove.adb, a-cofove.ads: Simplification of the API of formal
1245         definite vectors, similar to the API of the new indefinite ones. A
1246         new formal parameter of the generic unit called Bounded allows
1247         to define growable vectors that use dynamic allocation.
1249 2014-10-31  Vincent Celier  <celier@adacore.com>
1251         * prj-conf.adb (Look_For_Project_Paths): New procedure
1252         (Parse_Project_And_Apply_Config): Initially, parse the project
1253         files ignoring missing withs. If there are missing withs, extend
1254         the project path with directories rooted at the compiler roots,
1255         including directories rooted at the runtime roots, if there are
1256         non default runtimes, in the PATH orser.
1257         * prj-env.adb (Initialize_Default_Project_Path): Do not add
1258         any directory from the prefix if the target is "-".
1259         * prj-part.adb (Parse): Initialize the tables, as Parse may be
1260         call several times by gprbuild.
1261         * prj.adb (Update_Ignore_Missing_With): New procedure.
1263 2014-10-31  Ed Schonberg  <schonberg@adacore.com>
1265         * sem_aux.adb (First_Stored_Discriminant,
1266         Has_Completely_Hidden_Discriminant): When scanning the list of
1267         discriminants to locate possibly hidden (inherited) discriminants,
1268         ignore itypes that may appear in the entity list, when an access
1269         discriminants is constrained by an access attribute reference.
1271 2014-10-31  Javier Miranda  <miranda@adacore.com>
1273         * freeze.adb (Freeze_Record_Type): Add missing
1274         check to verify that all the primitives of an interface type
1275         are abstract or null procedures.
1277 2014-10-31  Vincent Celier  <celier@adacore.com>
1279         * s-os_lib.adb, s-os_lib.ads: New function Non_Blocking_Spawn that
1280         redirects standard output and standard error to two different files.
1282 2014-10-31  Bob Duff  <duff@adacore.com>
1284         * makeutl.ads: Minor comment fix.
1286 2014-10-31  Arnaud Charlet  <charlet@adacore.com>
1288         * system-linux-x86_64.ads, system-mingw-x86_64.ads (Word_Size,
1289         Memory_Size): Use Standard'Word_Size so that the value can be changed
1290         via a target configuration file.
1292 2014-10-31  Eric Botcazou  <ebotcazou@adacore.com>
1294         * exp_ch4.adb: Minor tweak.
1296 2014-10-31  Eric Botcazou  <ebotcazou@adacore.com>
1298         * sem_ch12.adb (Analyze_Package_Instantiation): Do not inline with
1299         back-end inlining.
1300         (Must_Inline_Subp): Delete.
1301         * sem_util.ads, sem_util.adb (Must_Inline): Likewise.
1303 2014-10-31  Ed Schonberg  <schonberg@adacore.com>
1305         * freeze.adb (Freeze_Entity): A default_pool does not apply to
1306         internal access types generated for 'access references.
1307         * sem_prag (Analyze_Pragma, case Default_Pool): If the name is
1308         not null it must designate a variable.
1310 2014-10-31  Eric Botcazou  <ebotcazou@adacore.com>
1312         * inline.adb: Minor reformatting.
1314 2014-10-31  Ed Schonberg  <schonberg@adacore.com>
1316         * sem_ch3.adb (Build_Derived_Private_Type): If the derived
1317         type has access discriminants, create itype references for their
1318         anonymous types, so that they are elaborated before the generated
1319         bodies for the primitive operations of the type.
1321 2014-10-31  Tristan Gingold  <gingold@adacore.com>
1323         * prj-conf.adb (Locate_Runtime): Remove procedure.
1325 2014-10-31  Eric Botcazou  <ebotcazou@adacore.com>
1327         * inline.adb (Has_Excluded_Declaration): With back-end inlining,
1328         only return true for nested packages.
1329         (Cannot_Inline): Issue errors/warnings whatever the optimization level
1330         for back-end inlining and remove assertion.
1332 2014-10-31  Sergey Rybin  <rybin@adacore.com frybin>
1334         * table.adb (Tree_Read, Tree_Write): Use parentheses to specify
1335         the desired order of '*' and '/' operations to avoid overflow.
1337 2014-10-31  Eric Botcazou  <ebotcazou@adacore.com>
1339         * exp_ch6.adb (Do_Inline): Remove unreachable code.
1340         (Do_Inline_Always): Likewise.
1342 2014-10-31  Vincent Celier  <celier@adacore.com>
1344         * prj-nmsc.adb (Check_Stand_Alone_Library): Change error message
1345         when library has no Ada interfaces and Library_Standalone is
1346         declared.
1348 2014-10-31  Arnaud Charlet  <charlet@adacore.com>
1350         * sem_ch13.adb (Check_Constant_Address_Clause): Disable checks
1351         on address clauses in CodePeer mode.
1353 2014-10-31  Javier Miranda  <miranda@adacore.com>
1355         * inline.adb (Expand_Inlined_Call): Do not skip
1356         inlining of calls to subprogram renamings.
1358 2014-10-31  Hristian Kirtchev  <kirtchev@adacore.com>
1360         * sem_res.adb (Resolve_Entity_Name): Account for
1361         the case where the immediate parent of a reference to an entity
1362         is a parameter association.
1364 2014-10-31  Eric Botcazou  <ebotcazou@adacore.com>
1366         * inline.adb (Check_And_Split_Unconstrained_Function): Do not
1367         test for the presence of nested subprograms.
1369 2014-10-31  Ed Schonberg  <schonberg@adacore.com>
1371         * aspects.ads, aspects.adb: Add aspect Default_Storage_Pool.
1372         * sem_ch13.adb (Analyze_One_Aspect): Generate pragma for aspect
1373         Default_Storage_Pool.
1375 2014-10-31  Eric Botcazou  <ebotcazou@adacore.com>
1377         * sem_ch6.adb: Remove obsolete comment.
1379 2014-10-31  Olivier Hainque  <hainque@adacore.com>
1381         * g-allein.ads: bind vec_sld for pixels to 8hi vsldoi instead
1382         of 4si, as pixels are short.
1384 2014-10-31  Ed Schonberg  <schonberg@adacore.com>
1386         * sem_res.adb (Resolve_Call): Do not reject a call to a protected
1387         operation in the spec of a protected type, when the call appears
1388         in a pre/postcondition for another protected operation.
1390 2014-10-31  Tristan Gingold  <gingold@adacore.com>
1392         * prj-conf.adb: Locate_Runtime: Always search the runtime in
1393         project path.
1395 2014-10-31  Eric Botcazou  <ebotcazou@adacore.com>
1397         * inline.adb (Check_Package_Body_For_Inlining): Adjust previous
1398         change to use correct idiom for back-end inlining.
1400 2014-10-31  Ed Schonberg  <schonberg@adacore.com>
1402         * freeze.adb (Freeze_Record_Type): Do not check component size
1403         if its type is generic.
1405 2014-10-31  Bob Duff  <duff@adacore.com>
1407         * gnat_rm.texi: Fix documentation w.r.t -gnatw.w.
1409 2014-10-31  Ed Schonberg  <schonberg@adacore.com>
1411         * sem_ch4.adb (Try_Container_Indexing): Use Check_Implicit_Dereference.
1412         * sem_util.adb (Check_Implicit_Dereference): a) Handle generalized
1413         indexing as well as function calls.  b)  If the context is a
1414         selected component and whe are in an instance, remove entity from
1415         selector name to force resolution of the node, so that explicit
1416         dereferences can be generated in the instance if they were in
1417         the generic unit.
1419 2014-10-31  Eric Botcazou  <ebotcazou@adacore.com>
1421         * inline.adb (Back_End_Cannot_Inline): Delete.
1422         (Add_Inlined_Subprogram): Do not call it.
1424 2014-10-31  Ed Schonberg  <schonberg@adacore.com>
1426         * exp_ch3.ads (Make_Tag_Assignment): New function, used to
1427         re-initialize the tag in a tagged object declaration with
1428         initial value.
1429         * exp_ch3.adb (Expand_N_Object_Declaration): Use
1430         Make_Tag_Assignment to simplify code for a tagged object
1431         declaration.
1432         * exp_ch13.adb (Expand_Freeze_Entity): Analyze freeze actions
1433         for the freeze node of an object.
1434         * freeze.adb (Check_Address_Clause): Use Make_Tag_Assignment when
1435         needed to extend Freeze_Actions for a tagged object declaration.
1437 2014-10-31  Eric Botcazou  <ebotcazou@adacore.com>
1439         * gnat_ugn.texi: Further minor improvement to -flto entry.
1441 2014-10-31  Gary Dismukes  <dismukes@adacore.com>
1443         * g-dynhta.adb, g-dynhta.ads: Minor typo fixes and reformatting.
1445 2014-10-30  Ed Schonberg  <schonberg@adacore.com>
1447         * exp_ch3.adb (Expand_N_Object_Declaration): Code cleanup.
1449 2014-10-30  Ed Schonberg  <schonberg@adacore.com>
1451         * sem_ch5.adb (Analyze_Iterator_Specification): If a subtype
1452         indication is provided, check properly that it covers the element
1453         type of of the container type.
1455 2014-10-30  Hristian Kirtchev  <kirtchev@adacore.com>
1457         * g-dynhta.ads, g-dynhta.adb: Add the implementation of a load facto
1458         -based hash table.
1460 2014-10-30  Ed Schonberg  <schonberg@adacore.com>
1462         * exp_util.ads, exp_util.adb (Following_Address_Clause): Modify
1463         Has_Following_Address_Clause so that it returns the address
1464         clause if present, rather than a boolean value.
1465         * sem_ch3.adb (Analyze_Object_Declaration): use
1466         Following_Address_Clause.
1467         * exp_ch3.adb (Expand_N_Object_Declaration): When a tagged object
1468         is initialized, insert tag assignment after object is frozen,
1469         which may be after an address clause that follows the declaration.
1471 2014-10-30  Tristan Gingold  <gingold@adacore.com>
1473         * system-darwin-x86.ads, system-linux-s390x.ads, system-linux-alpha.ads,
1474         system-vxworks-arm.ads, system-freebsd-x86_64.ads,
1475         system-linux-hppa.ads, system-linux-s390.ads,
1476         system-solaris-sparcv9.ads, system-mingw.ads, system-linux-ia64.ads,
1477         system-vxworks-sparcv9.ads, system-linux-ppc.ads, system-aix64.ads,
1478         system-linux-sh4.ads, system-solaris-x86.ads, system-linux-x86_64.ads,
1479         system-linux-x86.ads, system-vxworks-ppc.ads, system-hpux.ads,
1480         system-linux-armel.ads, system-darwin-ppc.ads, system-solaris-sparc.ads,
1481         system-vxworks-m68k.ads, system-hpux-ia64.ads, system.ads,
1482         system-solaris-x86_64.ads, system-mingw-x86_64.ads,
1483         system-vxworks-mips.ads, system-linux-sparc.ads, system-freebsd-x86.ads,
1484         system-aix.ads, system-darwin-x86_64.ads, system-vxworks-x86.ads: Add
1485         pragma No_Elaboration_Code_All.
1487 2014-10-30  Eric Botcazou  <ebotcazou@adacore.com>
1489         * gnat_ugn.texi: Minor improvement to -flto entry.
1491 2014-10-30  Hristian Kirtchev  <kirtchev@adacore.com>
1493         * sem_util.adb (Inherit_Subprogram_Contract):
1494         Add a guard to protect against enumeration literal overriding.
1495         * sem_ch3.adb, sem_ch4.adb, sem_res.adb, sem_util.adb:
1496         Minor reformatting (add SPARK RM references).
1498 2014-10-30  Robert Dewar  <dewar@adacore.com>
1500         * exp_dbug.adb, opt.ads: Minor reformatting.
1502 2014-10-30  Yannick Moy  <moy@adacore.com>
1504         * inline.adb (Has_Single_Return_In_GNATprove_Mode):
1505         Return False when return statement is inside one or more blocks.
1507 2014-10-30  Hristian Kirtchev  <kirtchev@adacore.com>
1509         * exp_ch7.adb (Is_Subprogram_Call): Account for the case where an
1510         object declaration initialized by a function call that returns
1511         an unconstrained result may be rewritted as a renaming of the
1512         secondary stack result.
1514 2014-10-30  Hristian Kirtchev  <kirtchev@adacore.com>
1516         * aspects.adb: Add an entry for aspect Extensions_Visible in
1517         table Canonical_Aspect.
1518         * aspects.ads: Add entry for aspect Extensions_Visible in
1519         tables Aspect_Argument, Aspect_Delay, Aspect_Id, Aspect_Names,
1520         Implementation_Defined_Aspect.
1521         * einfo.adb (Get_Pragma): Include pragma Extensions_Visible in
1522         the list of contract pragmas.
1523         * par-prag.adb Pragma Extensions_Visible does not require special
1524         processing from the parser.
1525         * sem_ch3.adb (Analyze_Object_Declaration): Prevent an
1526         implicit class-wide conversion of a formal parameter
1527         of a specific tagged type whose related subprogram is
1528         subject to pragma Extensions_Visible with value "False".
1529         (Check_Abstract_Overriding): Add various overriding checks
1530         related to pragma Extensions_Visible.
1531         (Derive_Subprogram):
1532         A subprogram subject to pragma Extensions_Visible with value
1533         False requires overriding if the subprogram has at least one
1534         controlling OUT parameter.
1535         (Is_EVF_Procedure): New routine.
1536         * sem_ch4.adb (Analyze_Type_Conversion): A formal parameter of
1537         a specific tagged type whose related subprogram is subject to
1538         pragma Extensions_Visible with value "False" cannot appear in
1539         a class-wide conversion.
1540         * sem_ch6.adb (Analyze_Subprogram_Contract): Remove
1541         the assertion to account for pragma Extensions_Visible.
1542         (Check_Overriding_Indicator): An overriding subprogram
1543         inherits the contact of the overridden subprogram.
1544         (New_Overloaded_Entity): An overriding subprogram inherits the
1545         contact of the overridden subprogram.
1546         * sem_ch13.adb (Analyze_Aspect_Specifications): Add processing
1547         for aspect Extensions_Visible.
1548         (Check_Aspect_At_Freeze_Point): Aspect Extensions_Visible does not
1549         require special processing at the freeze point.
1550         * sem_prag.adb Add an entry for pragma Extensions_Visible in
1551         table Sig_Flags.
1552         (Analyze_Pragma): Ensure that various SPARK
1553         pragmas lack identifiers in their arguments. Add processing for
1554         pragma Extensions_Visible.
1555         (Chain_CTC): Code reformatting.
1556         * sem_res.adb (Resolve_Actuals): A formal parameter of a
1557         specific tagged type whose related subprogram is subject to
1558         pragma Extensions_Visible with value "False" cannot act as an
1559         actual in a subprogram with value "True".
1560         * sem_util.adb (Add_Classification): New routine.
1561         (Add_Contract_Item): Account for pragma Extensions_Visible. Code
1562         reformatting.
1563         (Add_Contract_Test_Case): New routine.
1564         (Add_Pre_Post_Condition): New routine.
1565         (Extensions_Visible_Status): New routine.
1566         (Inherit_Subprogram_Contract): New routine.
1567         (Is_EVF_Expression): New routine.
1568         (Is_Specific_Tagged_Type): New routine.
1569         * sem_util.ads Add type Extensions_Visible_Mode and document all values.
1570         (Add_Contract_Item): Add pragma Extensions_Visible to the
1571         comment on usage.
1572         (Inherit_Subprogram_Contract): New routine.
1573         (Is_EVF_Expression): New routine.
1574         (Is_Specific_Tagged_Type): New routine.
1575         * sinfo.adb (Is_Inherited): New routine.
1576         (Set_Is_Inherited): New routine.
1577         * sinfo.ads Add flag Is_Inherited along with its usage in
1578         nodes.
1579         (Is_Inherited): New routine along with pragma Inline.
1580         (Set_Is_Inherited): New routine along with pragma Inline.
1581         * snames.ads-tmpl: Add predefined name "Extensions_Visible"
1582         and a new Pragma_Id for the pragma.
1584 2014-10-30  Vincent Celier  <celier@adacore.com>
1586         * prj-proc.adb (Process_Case_Construction): Do not look for
1587         the ultimate extending project for a case variable.
1589 2014-10-30  Pierre-Marie Derodat  <derodat@adacore.com>
1591         * exp_dbug.adb, opt.ads (GNAT_Encodings): Import from C. Define
1592         enumerators.
1593         (gnat_encodings): Define a dummy variable for the AAMP back-end.
1594         (Get_Encoded_Name): When -fgnat-encodings=all|gdb, encode names
1595         for all discrete types whose bounds do not match size and do so
1596         only for biased types when -fgnat-encodings=minimal.
1597         * gcc-interface/decl.c (gnat_to_gnu_entity): Do not create ___XA
1598         parallel types when array bounds are constant while the lower bound is
1599         not 1.  Also stop generating them because the bound type is
1600         larger than sizetype.
1601         * gcc-interface/misc.c (gnat_encodings): New.
1603 2014-10-30  Thomas Quinot  <quinot@adacore.com>
1605         * opt.adb (Set_Opt_Config_Switches): For an internal unit,
1606         always reset Default_SSO to ' '.
1608 2014-10-30  Thomas Quinot  <quinot@adacore.com>
1610         * freeze.adb (Freeze_Record_Type): Set SSO from default before
1611         checking SSO consistency.
1613 2014-10-30  Javier Miranda  <miranda@adacore.com>
1615         * inline.adb (Check_Package_Body_For_Inlining):
1616         Cleanup this subprogram to implement exactly the behavior
1617         documented in the spec.
1619 2014-10-30  Hristian Kirtchev  <kirtchev@adacore.com>
1621         * a-comutr.adb, a-cimutr.adb (Insert_Child): Add new variable First.
1622         Update the position after all insertions have taken place.
1624 2014-10-30  Ed Schonberg  <schonberg@adacore.com>
1626         * sem_prag.adb (Analyze_Pragma, case License): Do not perform
1627         analysis of pragma arguments when in CodePeer mode, pragma has
1628         different format on other compilers.
1630 2014-10-30  Thomas Quinot  <quinot@adacore.com>
1632         * s-os_lib.adb: Minor reformatting.
1634 2014-10-29  Richard Sandiford  <richard.sandiford@arm.com>
1636         * gcc-interface/decl.c, gcc-interface/gigi.h, gcc-interface/misc.c,
1637         gcc-interface/trans.c, gcc-interface/utils.c, gcc-interface/utils2.c:
1638         Remove redundant enum from machine_mode.
1640 2014-10-28  Andrew MacLeod  <amacleod@redhat.com>
1642         * gcc-interface/trans.c: Adjust include files.
1643         * gcc-interface/utils.c: Ditto.
1645 2014-10-27  Eric Botcazou  <ebotcazou@adacore.com>
1647         * gcc-interface/utils.c (create_subprog_decl): Adjust condition.
1649 2014-10-27  Eric Botcazou  <ebotcazou@adacore.com>
1651         * gcc-interface/misc.c (gnat_init_options_struct): Parameterize errno
1652         support here instead of...
1653         Do not set flag_delete_dead_exceptions to 1 unconditionally.
1654         (gnat_init_gcc_eh): Set flag_delete_dead_exceptions to 1.
1655         (gnat_init_gcc_fp): ...here.
1657 2014-10-27  Eric Botcazou  <ebotcazou@adacore.com>
1659         * gcc-interface/trans.c (gnat_to_gnu) <N_Real_Literal>: Minor tweaks.
1661 2014-10-27  Eric Botcazou  <ebotcazou@adacore.com>
1663         * gcc-interface/utils.c (create_var_decl_1): For a variable declared
1664         in the unit, set TREE_PUBLIC only if it has static storage duration.
1666 2014-10-27  Eric Botcazou  <ebotcazou@adacore.com>
1668         * gcc-interface/decl.c (gnat_to_gnu_entity): Apply special treatment
1669         of derived packed array types to constrained subtypes only.
1671 2014-10-27  Eric Botcazou  <ebotcazou@adacore.com>
1673         * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Array_Type>: Remove
1674         superfluous computation for the max size.
1675         <E_Array_Subtype>: Likewise.  Make sure that the max size calculation
1676         does not overflow at compile time.
1678 2014-10-23  Ed Schonberg  <schonberg@adacore.com>
1680         * sem_eval.adb (Check_Non_Static_Context): Do not set
1681         Is_Machine_Number on a literal of a fixed-point type.
1683 2014-10-23  Robert Dewar  <dewar@adacore.com>
1685         * mlib-prj.adb, sem_ch4.adb, exp_ch3.adb: Minor reformatting.
1687 2014-10-23  Pierre-Marie Derodat  <derodat@adacore.com>
1689         * exp_dbug.ads: Update ___XA parallel type specification.
1691 2014-10-23  Hristian Kirtchev  <kirtchev@adacore.com>
1693         * sem_ch3.adb (Copy_Array_Subtype_Attributes): Inherit the rep
1694         chain of the source type.
1695         * sem_ch13.adb (Analyze_Aspect_Specifications): Minor
1696         reformatting of an error message.
1697         * sem_util.adb (Inherit_Rep_Item_Chain): Do not inherit a rep
1698         chain that has been inherited already.
1700 2014-10-23  Ed Schonberg  <schonberg@adacore.com>
1702         * sem_ch6.adb (Analyze_Expression_Function): Simplify analysis
1703         in generic context, and generate body in this case as well,
1704         to simplify ASIS traversals on the construct.
1706 2014-10-23  Ed Schonberg  <schonberg@adacore.com>
1708         * sem_ch4.adb (Complete_Object_Operation): Indicate that the
1709         scope of the operation (s) is referenced, to prevent spurious
1710         warnings about unused units.
1712 2014-10-23  Johannes Kanig  <kanig@adacore.com>
1714         * errout.adb (Error_Msg_Internal): Copy check flag, increment
1715         check msg count.
1716         * erroutc.adb (Delete_Msg) adjust check msg count.
1717         (Output_Msg_Text) handle check msg case (do nothing).
1718         (Prescan_Message) recognize check messages with severity prefixes.
1719         * errutil.adb (Error_Msg) handle check flag, adjust counter.
1721 2014-10-23  Ed Schonberg  <schonberg@adacore.com>
1723         * sem_eval.adb (Subtypes_Statically_Match): For a generic actual
1724         type, check for the presence of discriminants in its parent type,
1725         against the presence of discriminants in the context type.
1727 2014-10-23  Tristan Gingold  <gingold@adacore.com>
1729         * adaint.c: __gnat_get_file_names_case_sensitive: Default is
1730         true on arm-darwin.
1732 2014-10-23  Arnaud Charlet  <charlet@adacore.com>
1734         * pprint.adb (Expression_Image): Add handling of quantifiers.
1736 2014-10-23  Ed Schonberg  <schonberg@adacore.com>
1738         * exp_pakd.adb (Expand_Packed_Element_Reference): If the
1739         prefix is a source entity, generate a reference to it before
1740         transformation, because rewritten node might not generate a
1741         proper reference, leading to spurious warnings.
1743 2014-10-23  Tristan Gingold  <gingold@adacore.com>
1745         * init.c: Fix thinko in previous patch.
1747 2014-10-23  Hristian Kirtchev  <kirtchev@adacore.com>
1749         * sem_ch3.adb (Decimal_Fixed_Point_Type_Declaration):
1750         Inherit the rep chain of the implicit base type.
1751         (Floating_Point_Type_Declaration): Inherit the rep chain of the
1752         implicit base type.
1753         (Ordinary_Fixed_Point_Type_Declaration): Inherit the rep chain of the
1754         implicit base type.
1755         (Signed_Integer_Type_Declaration): Inherit the rep chain of the
1756         implicit base type.
1757         * sem_util.ads, sem_util.adb (Inherit_Rep_Item_Chain): New routine.
1759 2014-10-23  Pascal Obry  <obry@adacore.com>
1761         * g-regist.adb, g-regist.ads: Add support for reading 32bit or 64bit
1762         view of the registry.
1764 2014-10-23  Ed Schonberg  <schonberg@adacore.com>
1766         * exp_ch3.adb (Expand_N_Object_Declaration): If type is abstract,
1767         return without expanding expression, to prevent subsequent crash.
1768         * freeze.adb: better error message for illegal declaration.
1770 2014-10-23  Hristian Kirtchev  <kirtchev@adacore.com>
1772         * sysdep.c (__gnat_localtime_tzoff): Properly delimit the
1773         substring which represents the time zone on VxWorks.
1775 2014-10-23  Vincent Celier  <celier@adacore.com>
1777         * gnatls.adb: If --RTS= was not used, check if there is a default
1778         runtime. If there is none, in verbose mode, indicate that the
1779         default runtime is not available and show only the current
1780         directory in the source and the object search paths.
1782 2014-10-23  Ed Schonberg  <schonberg@adacore.com>
1784         * sem_ch6.adb (Process_Formals): A thunk procedure with a
1785         parameter of a limited view does not need a freeze node.
1787 2014-10-23  Hristian Kirtchev  <kirtchev@adacore.com>
1789         * sem_ch7.adb (Analyze_Package_Body_Helper):
1790         The logic which hides local entities from external
1791         visibility is now contained in routine Hide_Public_Entities.
1792         (Hide_Public_Entities): New routine. Object and subprogram
1793         renamings are now hidden from external visibility the same way
1794         objects are.
1796 2014-10-23  Ed Schonberg  <schonberg@adacore.com>
1798         * sem_attr.adb (Analyze_Attribute): The prefix of attribute Elaborated
1799         does not require freezing, in particular if it denotes a generic
1800         function.
1802 2014-10-23  Yannick Moy  <moy@adacore.com>
1804         * sem_prag.adb (Analyze_Pragma/Pragma_Inline & Pragma_Inline_Always):
1805         Disable analysis in GNATprove mode.
1807 2014-10-23  Arnaud Charlet  <charlet@adacore.com>
1809         * mlib-prj.adb: Remove obsolete references to libdecgnat (VMS only).
1811 2014-10-23  Arnaud Charlet  <charlet@adacore.com>
1813         * gnat1drv.adb (Adjust_Global_Switches): Ignore style check
1814         pragmas in codepeer mode.
1816 2014-10-23  Gary Dismukes  <dismukes@adacore.com>
1818         * gnat_rm.texi: Minor syntax fix for pragma Annotate (missing ',').
1820 2014-10-23  Hristian Kirtchev  <kirtchev@adacore.com>
1822         * sem_ch12.adb (Inline_Instance_Body): Alphabetize
1823         local variables and constants. Add constants Save_SM and Save_SMP
1824         to capture SPARK_Mode-related attributes.  Compile the inlined
1825         body with the SPARK_Mode of the enclosing context.
1827 2014-10-23  Hristian Kirtchev  <kirtchev@adacore.com>
1829         * sinfo.adb (Elaboration_Boolean): Removed.
1830         (Set_Elaboration_Boolean): Removed.
1831         * sinfo.ads Remove attribute Elaboration_Boolean along with its
1832         occurrence in nodes.
1833         (Elaboration_Boolean): Removed along with pragma Inline.
1834         (Set_Elaboration_Boolean): Removed along with pragma Inline.
1836 2014-10-23  Ed Schonberg  <schonberg@adacore.com>
1838         * sem_ch3.adb (Constant_Redeclaration): Make error message more
1839         explicit on a deferred constant whose object_definition is an
1840         anonymous array.
1842 2014-10-23  Vincent Celier  <celier@adacore.com>
1844         * gnatls.adb: Never call Targparm.Get_Target_Parameters.
1846 2014-10-23  Ed Schonberg  <schonberg@adacore.com>
1848         * sem_ch6.adb (Analyze_Expression_Function): In a generic
1849         context do not create a body, and only pre-analyze the expression,
1850         which may include incomplete views.
1852 2014-10-23  Robert Dewar  <dewar@adacore.com>
1854         * sem_type.adb: Minor code reorganization (use Nkind_In, Ekind_In).
1855         * sem_ch3.adb: Minor reformatting.
1857 2014-10-23  Ed Schonberg  <schonberg@adacore.com>
1859         * sem_ch12.adb (Analyze_Associations): If an actual for a formal
1860         object is a call to a parameterless expression function, add
1861         the function to the list of actuals to freeze.
1862         * freeze.adb (Check_Expression_Function): Create freeze nodes of
1863         outer types that may be references in the body of the expression.
1865 2014-10-23  Hristian Kirtchev  <kirtchev@adacore.com>
1867         * exp_util.ads, checks.ads: Minor comment reformatting.
1869 2014-10-23  Javier Miranda  <miranda@adacore.com>
1871         * sem_eval (Test_In_Range): Disable removal of range_check for
1872         VM targets.
1874 2014-10-23  Robert Dewar  <dewar@adacore.com>
1876         * erroutc.adb (Validate_Specific_Warnings): Fix test for -W
1877         messages, which got disabled when we unconditionally added an
1878         asterisk at the start of the string.
1880 2014-10-23  Vincent Celier  <celier@adacore.com>
1882         * gnatls.adb: Ensure that "gnatls -l" works even when there is
1883         no default runtime.
1885 2014-10-23  Eric Botcazou  <ebotcazou@adacore.com>
1887         * sem_ch3.adb (Build_Derived_Private_Type): When the parent is
1888         untagged and has discriminants, build the implicit full view after
1889         building the derived type. Capture original declaration and type
1890         here instead of...
1891         (Copy_And_Build): ...here.
1892         * sem_type.adb (Full_View_Covers): Handle the Underlying_Full_View.
1894 2014-10-23  Hristian Kirtchev  <kirtchev@adacore.com>
1896         * checks.adb (Ensure_Valid): Update the subprogram
1897         profile. Propagate the contex attributes to Insert_Valid_Check.
1898         (Insert_Valid_Check): Update the subprogram profile. Propagate
1899         the attributes of the context to Duplicate_Subexpr_No_Checks.
1900         (Validity_Check_Range): Update the subprogram profile. Propagate
1901         the context attribute to Ensure_Valid.
1902         * checks.ads (Ensure_Valid): Update the subprogram profile
1903         along with the comment on usage.
1904         (Insert_Valid_Check): Update the subprogram profile along with the
1905         comment on usage.
1906         (Validity_Check_Range): Update the subprogram profile along with
1907         the comment on usage.
1908         * exp_util.adb (Build_Temporary): New routine.
1909         (Duplicate_Subexpr_No_Checks): Update the subprogram
1910         profile. Propagate the attributes of the context to Remove_Side_Effects.
1911         (Remove_Side_Effects): Update the subprogram profile. Update all calls
1912         to Make_Temporary to invoke Build_Temporary.
1913         * exp_util.ads (Duplicate_Subexpr_No_Checks): Update
1914         the subprogram profile along with the comment on usage.
1915         (Remove_Side_Effects): Update the subprogram profile along with
1916         the comment on usage.
1917         * sem_ch3.adb (Process_Range_Expr_In_Decl): Pass the subtype
1918         to the validity check machinery.  Explain the reason for this
1919         propagation.
1921 2014-10-23  Robert Dewar  <dewar@adacore.com>
1923         * a-strsea.adb: Minor reformatting.
1925 2014-10-23  Thomas Quinot  <quinot@adacore.com>
1927         * bcheck.adb (Check_Consistent_SSO_Default): Exclude internal
1928         units from consistency check.
1929         * gnat_rm.texi (Default_Scalar_Storage_Order): Document that
1930         consistency check excludes run-time units.
1932 2014-10-23  Ed Schonberg  <schonberg@adacore.com>
1934         * a-strsea.adb (Find_Token): Enable constraint checking in this
1935         procedure, so that even when compiling with checks suppressed, as is
1936         the case for the run-time, an exception is raised in this routine when
1937         the input meets the conditions described in RM 2005 A.4.3 (68/1).
1939 2014-10-20  Eric Botcazou  <ebotcazou@adacore.com>
1941         * sem_ch3.adb (Build_Derived_Private_Type): When the parent
1942         is untagged and has discriminants, build the implicit full
1943         view even if the derived type is a completion, and make it
1944         the Underlying_Full_View of the type.
1945         (Copy_And_Build): Fix Is_Completion actual parameter in the calls to
1946         Build_Derived_Type.
1947         (Build_Derived_Record_Type): Likewise.
1949 2014-10-20  Ed Schonberg  <schonberg@adacore.com>
1951         * sem_ch13.adb: Add guard to convention setting.
1953 2014-10-20  Robert Dewar  <dewar@adacore.com>
1955         * sem_ch3.adb, prj-proc.adb, prj-proc.ads, prj-conf.adb: Minor
1956         reformatting.
1958 2014-10-20  Robert Dewar  <dewar@adacore.com>
1960         * par-prag.adb (Add_List_Pragma_Entry): New procedure.
1961         * par.adb (P_Pragma): Document requirement to handle multiple calls.
1963 2014-10-20  Robert Dewar  <dewar@adacore.com>
1965         * sem_prag.adb (Analyze_Pragma, case No_Elaboration_Code_All):
1966         Fix error of bad inheritance of this pragma from with'ed unit.
1968 2014-10-20  Ed Schonberg  <schonberg@adacore.com>
1970         * sem_ch13.adb (Inherit_Aspects_At_Freeze_Point): For a subtype,
1971         inherit convention from parent type, because the subtype may
1972         have been declared on a partial view, prior to the pragma on
1973         the parent.
1975 2014-10-20  Olivier Hainque  <hainque@adacore.com>
1976             Tristan Gingold  <gingold@adacore.com>
1978         * gcc-interface/Makefile.in: Handle arm-darwin and VxWorks 7.
1979         Misc clean ups.
1981 2014-10-20  Nicolas Roche  <roche@adacore.com>
1983         * gcc-interface/Make-lang.in: ensure that automatically generated
1984         dependency are referencing generated gnatvsn rather than original
1985         one.
1987 2014-10-20  Gary Dismukes  <dismukes@adacore.com>
1989         * gnat_ugn.texi: Minor reformatting.
1990         * sem_ch3.adb: Minor reformatting.
1992 2014-10-20  Vincent Celier  <celier@adacore.com>
1994         * prj-attr.adb: New project level attribute Runtime.
1995         * prj-conf.adb (Get_Project_Runtimes): New procedure to get
1996         the attributes Runtime declared in the main project, to use
1997         in auto-configuration.
1998         (Get_Or_Create_Configuration_File): Call Get_Project_Runtimes.
1999         * prj-proc.adb (Runtime_Defaults): New table to store
2000         the default values of attributes Runtime (<language>).
2001         (Set_Default_Runtime_For): New procedure to store the default
2002         value of a Runtime (<language>) in table Runtime_Defaults.
2003         (Expression): Use the value stored in table Runtime_Defaults as
2004         the default for Runtime (<language>).
2005         * prj-proc.ads (Set_Default_Runtime_For): New procedure.
2006         * prj.ads (Attribute_Default_Value): New enumerated value
2007         Runtime_Value.
2009 2014-10-20  Ed Schonberg  <schonberg@adacore.com>
2011         * sem_ch3.adb (Analyze_Object_Declaration): If the type is
2012         an unconstrained unchecked_union type, rewrite declaration
2013         as a renaming to prevent attempt to retrieve non- existent
2014         discriminants from expression.
2016 2014-10-20  Ed Schonberg  <schonberg@adacore.com>
2018         * gnat_ugn.texi: Minor reformatting.
2020 2014-10-20  Tristan Gingold  <gingold@adacore.com>
2022         * init.c (__gnat_is_stack_guard): Don't use mach_vm_region_recurse on
2023         arm-darwin.
2024         * raise-gcc.c: Add ATTRIBUTE_UNUSED to remove warnings for
2025         unused arguments.
2027 2014-10-20  Hristian Kirtchev  <kirtchev@adacore.com>
2029         * sem_attr.adb (Analyze_Attribute): Replace
2030         variables CS and PS with Proc_Id and Subp_Id to better illustrate
2031         their purpose. Account for the case where _Postconditions
2032         has not been generated yet and the context is aspect/pragma
2033         Refined_Post. In that scenario the expected prefix of attribute
2034         'Result is the current scope.
2036 2014-10-20  Robert Dewar  <dewar@adacore.com>
2038         * par-ch4.adb (P_Expression): Handle extraneous comma/semicolon
2039         in middle of expression with logical operators.
2041 2014-10-20  Robert Dewar  <dewar@adacore.com>
2043         * par-ch13.adb (Possible_Misspelled_Aspect): New function.
2045 2014-10-20  Steve Baird  <baird@adacore.com>
2047         * pprint.adb: Improve Expression_Image function.
2049 2014-10-20  Robert Dewar  <dewar@adacore.com>
2051         * gnat_rm.texi: Document No_Tagged_Streams pragma and aspect.
2052         * snames.ads-tmpl: Add entry for pragma No_Tagged_Streams.
2053         * aspects.ads, aspects.adb: Add aspect No_Tagged_Streams.
2054         * einfo.adb (No_Tagged_Streams_Pragma): New field.
2055         * einfo.ads: Minor reformatting (reorder entries).
2056         (No_Tagged_Streams_Pragma): New field.
2057         * exp_ch3.adb: Minor comment update.
2058         * opt.ads (No_Tagged_Streams): New variable.
2059         * par-prag.adb: Add dummy entry for pragma No_Tagged_Streams.
2060         * sem.ads (Save_No_Tagged_Streams): New field in scope record.
2061         * sem_attr.adb (Check_Stream_Attribute): Check stream ops
2062         prohibited by No_Tagged_Streams.
2063         * sem_ch3.adb (Analyze_Full_Type_Declaration): Set
2064         No_Tagged_Streams_Pragma.
2065         (Analyze_Subtype_Declaration): ditto.
2066         (Build_Derived_Record_Type): ditto.
2067         (Record_Type_Declaration): ditto.
2068         * sem_ch8.adb (Pop_Scope): Restore No_Tagged_Streams.
2069         (Push_Scope): Save No_Tagged_Streams.
2070         * sem_prag.adb (Analyze_Pragma, case No_Tagged_Streams): Implement new
2071         pragma.
2073 2014-10-20  Robert Dewar  <dewar@adacore.com>
2075         * sem_ch3.adb, prj-proc.adb, sem_ch4.adb, prj-env.adb, lib.ads,
2076         sem_ch13.adb: Minor reformatting.
2078 2014-10-20  Javier Miranda  <miranda@adacore.com>
2080         * exp_ch3.adb (Expand_N_Object_Declaration): Expand the
2081         declaration of a class-wide limited object containing an
2082         initializing expression into a renaming declaration.  Required to
2083         avoid passing such declaration to the backend and also to avoid
2084         generating an extra copy.
2086 2014-10-20  Eric Botcazou  <ebotcazou@adacore.com>
2088         * inline.adb (List_Inlining_Info): Minor tweaks.
2089         (Add_Inlined_Body): Inline the enclosing package
2090         if it is not internally generated, even if it doesn't come
2091         from source.
2093 2014-10-20  Ed Schonberg  <schonberg@adacore.com>
2095         * sem_ch4.adb (Process_Function_Call): If the first actual
2096         denotes a discrete type, the mode must be interpreted as a slice
2097         of an array returned by a parameterless call.
2099 2014-10-20  Vasiliy Fofanov  <fofanov@adacore.com>
2101         * prj-env.ads, prj-env.adb (Get_Runtime_Path): No longer inhibit
2102         searching for runtime referenced by a simple name on a project path.
2104 2014-10-20  Olivier Hainque  <hainque@adacore.com>
2106         * vxworks-x86-link.spec: New file.
2107         * system-vxworks-x86.ads: Add pragma Linker_Options to link with
2108         vxworks-x86-link.spec.
2110 2014-10-20  Vincent Celier  <celier@adacore.com>
2112         * opt.ads (Origin_Of_Target): New type.
2113         (Target_Origin): New variable.
2114         * prj-conf.adb (Parse_Project_And_Apply_Config): Record
2115         Target_Value and Target_Origin.  If target was not specified
2116         on the command line with --target=, check if attribute Target
2117         is declared in the main project. If it is and it is not the
2118         native target, parse again the projects so that 'Target get
2119         the new value. Fail if the target has changed again.  Invoke
2120         Process_Project_And_Apply_Config with Do_Phase_1 set to False
2121         is Process_Project_Tree_Phase_1 has already been invoked.
2122         * prj-conf.ads (Process_Project_And_Apply_Config): New Boolean
2123         parameter Do_Phase_1, defaulted to True.
2124         * prj-proc.adb (Expression): Check the special values and
2125         defaults for attribute Target.
2127 2014-10-20  Ed Schonberg  <schonberg@adacore.com>
2129         * sem_ch3.adb (Handle_Late_Controlled_Primitive): Do not analyze
2130         the subprogram spec of the body in full, because it will be
2131         reanalyzed when the declaration itself is analyzed;  otherwise. a
2132         formal may end up duplicated in the list of formals leading to
2133         spurious conformance errors with an existing declaration.
2135 2014-10-20  Ed Schonberg  <schonberg@adacore.com>
2137         * sem_ch13.adb: Improve error recovery on illegal aspect.
2139 2014-10-20  Arnaud Charlet  <charlet@adacore.com>
2141         * set_targ.adb (Write_Target_Dependent_Values, Write_Line):
2142         Fix calling C APIs with no trailing NUL char by calling better
2143         wrappers instead.
2145 2014-10-20  Tristan Gingold  <gingold@adacore.com>
2147         * gnat_ugn.texi: Document that gdb users must be in group
2148         _developer on mac os.
2150 2014-10-20  Arnaud Charlet  <charlet@adacore.com>
2152         * a-tgdico.ads: Fix typo.
2154 2014-10-20  Ed Schonberg  <schonberg@adacore.com>
2156         * exp_aggr.adb (Convert_To_Assignments): Do not create a
2157         transient scope for a component whose type requires it, if the
2158         context is an initialization procedure, because the target of
2159         the assignment must be visible outside of the block.
2161 2014-10-20  Tristan Gingold  <gingold@adacore.com>
2163         * tracebak.c: Define PC_ADJUST for arm-darwin.
2164         * env.c: Remove darwin specific code.
2165         * raise-gcc.c (__gnat_Unwind_ForcedUnwind): Error on arm-darwin.
2167 2014-10-20  Ed Schonberg  <schonberg@adacore.com>
2169         * sem_ch3.adb (Analyze_Full_Type_Declaration): If previous view
2170         is incomplete rather than private, and full type declaration
2171         has aspects, analyze aspects on the full view rather than
2172         the incomplete view, to prevent freezing anomalies with the
2173         class-wide type.
2175 2014-10-17  Robert Dewar  <dewar@adacore.com>
2177         * exp_ch9.adb (Expand_N_Task_Body): Add defense against
2178         previous errors.
2179         * freeze.adb (Freeze_Entity): Add defense against checking null
2180         scope for generic.
2181         * restrict.adb (Tasking_Allowed): Add test for No_Run_Time mode.
2182         * sem_ch13.adb (Freeze_Entity_Checks): Add defense against
2183         previous errors.
2184         * sem_ch9.adb (Analyze_Task_Type_Declaration): Give error if
2185         in No_Run_Time mode.
2187 2014-10-17  Robert Dewar  <dewar@adacore.com>
2189         * prj-makr.adb: Minor reformatting.
2191 2014-10-17  Robert Dewar  <dewar@adacore.com>
2193         * gnatcmd.adb, make.adb, prj-part.adb, gnatlink.adb, prj-nmsc.adb,
2194         prj-conf.adb, prj-env.adb: Use Is_Directory_Separator where possible.
2196 2014-10-17  Ed Schonberg  <schonberg@adacore.com>
2198         * exp_prag.adb (Undo_Initialization): If Initialize_Scalars
2199         is enabled, code will be generated for some composite types
2200         to initialize an object after its declaration. If there is
2201         a subsequent Import pragma for the object, that code must be
2202         removed as specified byw the semantics of the pragma, and to
2203         prevent out-of-order elaboration issues in the back-end.
2205 2014-10-17  Hristian Kirtchev  <kirtchev@adacore.com>
2207         * exp_ch4.adb (Expand_N_Op_Concat): Keep concatenation operator
2208         wrapping mechanism under debug flag -gnatd.h.
2209         * debug.adb: Claim debug switch -gnatd.h.
2211 2014-10-17  Doug Rupp  <rupp@adacore.com>
2213         * gcc-interface/Makefile.in: Enable the socket runtime bits
2214         for Android.
2216 2014-10-17  Ed Schonberg  <schonberg@adacore.com>
2218         * sem_ch13.adb (Add_Invariants, Replace_Type_References): Do
2219         not perform the replacement on the expression for an inherited
2220         class-wide invariant if in ASIS_Mode and the type reference is
2221         already the prefix of a 'Class attribute reference: the expression
2222         has already been preanalyzed and the replacement performed when
2223         first encountered on the declaration of the parent type.
2225 2014-10-17  Robert Dewar  <dewar@adacore.com>
2227         * sem_ch5.adb, sem_ch7.adb, prj-nmsc.adb, sem_ch13.adb, exp_ch3.adb:
2228         Minor reformatting.
2230 2014-10-17  Ed Schonberg  <schonberg@adacore.com>
2232         * exp_ch3.adb (Build_Component_Invariant_Call): Retrieve Invariant
2233         subprogram from base type.
2234         * sem_ch7.adb (Analyze_Package_Specification): Build invariant
2235         subprogram for private type, not any of its subtypes.
2236         * sem_ch13.adb (Build_Invariant_Procedure_Declaration): Set type
2237         of procedure entity, because a call to it may be generated in
2238         a client unit before the corresponding subprogram declaration
2239         is analyzed.
2241 2014-10-17  Vincent Celier  <celier@adacore.com>
2243         * prj-nmsc.adb (Get_Directories): Do not create directories
2244         when a project is abstract.
2246 2014-10-17  Ed Schonberg  <schonberg@adacore.com>
2248         * sem_ch5.adb (Analyze_Iterator_Specification): If the domain
2249         of iteration is given by an expression that is not an array type,
2250         verify that its type implements an iterator iterface.
2252 2014-10-17  Robert Dewar  <dewar@adacore.com>
2254         * sem_attr.adb (Eval_Attribute): Ensure that attribute
2255         reference is not marked as being a static expression if the
2256         prefix evaluation raises CE.
2258 2014-10-17  Robert Dewar  <dewar@adacore.com>
2260         * exp_pakd.adb: Move bit packed entity tables to spec.
2261         * exp_pakd.ads: Move bit packed entity tables here from body.
2262         * freeze.adb (Freeze_Array_Type): Check that packed array type
2263         is supported.
2264         * rtsfind.adb (PRE_Id_Table): New table (Entity_Not_Defined):
2265         Specialize messages using PRE_Id_Table.
2266         * uintp.ads, uintp.adb (UI_Image): New functional form.
2268 2014-10-17  Robert Dewar  <dewar@adacore.com>
2270         * aspects.ads, aspects.adb: Add Suppress_Initialization aspect.
2271         * einfo.ads, einfo.adb (Suppress_Initialization): Now applies to
2272         E_Variable.
2273         * exp_ch3.adb (Default_Initialize_Object): Handle
2274         Suppress_Initialization.
2275         * exp_prag.adb (Expand_Pragma_Suppress_Initialization): New
2276         procedure (Expand_N_Pragma): Handle Suppress_Initialization
2277         (Expand_Pragma_Import_Or_Interface): Use Undo_Initialization
2278         (Undo_Initialization): New procedure.
2279         * sem_prag.adb (Analyze_Pragma, case Suppress_Initialization):
2280         This is now allowed for E_Variable case.
2281         * gnat_rm.texi: Document new aspect Suppress_Initialization
2282         Suppress_Initialization aspect/pragma can apply to variable.
2283         * einfo.ads: Minor reformatting.
2285 2014-10-17  Arnaud Charlet  <charlet@adacore.com>
2287         * spark_xrefs.ads: Add documentation pointer to Flow_Computed_Globals.
2289 2014-10-17  Robert Dewar  <dewar@adacore.com>
2291         * cstand.adb (Create_Standard): Mark Short_Integer as
2292         implementation defined.
2293         * sem_util.adb (Set_Entity_With_Checks): Avoid blow up for
2294         compiler built with assertions for No_Implementation_Identifiers test.
2296 2014-10-17  Robert Dewar  <dewar@adacore.com>
2298         * aspects.ads: Documentation fix, aspect Lock_Free does have a
2299         corresponding pragma.
2300         * gnat_rm.texi: Document implementation defined boolean aspects
2301         as boolean.
2303 2014-10-17  Ed Schonberg  <schonberg@adacore.com>
2305         * sem_ch13.adb (Add_Invariants): For a class-wide type invariant,
2306         preserve semantic information on the invariant expression
2307         (typically a function call) because it may be inherited by a
2308         type extension in a different unit, and it cannot be resolved
2309         by visibility elsewhere because it may refer to local entities.
2311 2014-10-17  Robert Dewar  <dewar@adacore.com>
2313         * gnat_rm.texi: Document that string literal can be used for
2314         pragma Warnings when operating in Ada 83 mode.
2316 2014-10-17  Ed Schonberg  <schonberg@adacore.com>
2318         * freeze.adb (Find_Aggregate_Component_Desig_Type): New
2319         subsidiary function to Freeze_ Expression, used to determine
2320         whether an aggregate for an array of access types also freezes the
2321         designated type, when some aggregate components are allocators.
2323 2014-10-17  Ed Schonberg  <schonberg@adacore.com>
2325         * a-strsea.adb (Find_Token): AI05-031 indicates that the
2326         procedure must raise Index_Error when Source is not empty and
2327         the From parameter is not within the range of the Source string.
2329 2014-10-17  Robert Dewar  <dewar@adacore.com>
2331         * sem_prag.adb (Is_Static_String_Expression): Allow string
2332         literal in Ada 83 mode.
2334 2014-10-17  Vincent Celier  <celier@adacore.com>
2336         * prj-conf.adb (Get_Config_Switches): In CodePeer mode, do
2337         not take into account any compiler command from package IDE.
2339 2014-10-17  Ed Schonberg  <schonberg@adacore.com>
2341         * sem_ch12.adb (Build_Function_Wrapper): The formals of the
2342         wrapper must have the same identifiers as those of the formal
2343         subprogram, because calls within the generic may use named
2344         associations.
2346 2014-10-17  Robert Dewar  <dewar@adacore.com>
2348         * sem_ch3.adb, a-strsea.adb: Minor reformatting.
2349         * par-ch6.adb (P_Subprogram): Fix bad handling of null procedures.
2351 2014-10-17  Ed Schonberg  <schonberg@adacore.com>
2353         * sem_ch3.adb (Build_Derived_Enumeration_Type): Propagate aspect
2354         specfications from original type declaration to declaration of
2355         implicit base, because original node is rewritten as a subtype
2356         declaration on which type aspects do not belong.
2358 2014-10-17  Hristian Kirtchev  <kirtchev@adacore.com>
2360         * sem_ch3.adb (Propagate_Default_Init_Cond_Attributes): A derived type
2361         inherits the attributes related to pragma Default_Initial_Condition
2362         from its parent type.
2364 2014-10-17  Ed Schonberg  <schonberg@adacore.com>
2366         * a-strsea.adb (Index - versions with a From parameter):
2367         According to AI05-056, the Index functions with a From parameter
2368         return 0 if the source is an empty string.
2370 2014-10-17  Hristian Kirtchev  <kirtchev@adacore.com>
2372         * sem_prag.adb (Analyze_Refined_Depends_In_Decl_Part): Disable
2373         the consistency checks in ASIS mode.
2375 2014-10-17  Arnaud Charlet  <charlet@adacore.com>
2377         * s-expmod.ads: Minor typo fix.
2379 2014-10-17  Robert Dewar  <dewar@adacore.com>
2381         * sem_util.adb: Minor reformatting.
2383 2014-10-17  Ed Schonberg  <schonberg@adacore.com>
2385         * sem_ch12.adb (Build_Function_Wrapper): Build wrappers for
2386         actuals that are defaulted subprograms of the formal subprogram
2387         declaration.
2389 2014-10-17  Robert Dewar  <dewar@adacore.com>
2391         * exp_ch4.adb (Expand_N_Op_Eq): Make sure we deal with the
2392         implementation base type.
2393         * sinfo.ads: Add a note for N_Op_Eq and N_Op_Ne that record
2394         operands are always expanded out into component comparisons.
2396 2014-10-17  Robert Dewar  <dewar@adacore.com>
2398         * s-vallli.adb: Minor comment correction.
2399         * s-valuti.ads: Minor comment reformatting.
2401 2014-10-17  Robert Dewar  <dewar@adacore.com>
2403         * gnat_rm.texi: Document System.Atomic_Counters.
2404         * impunit.adb: Add System.Atomic_Counters (s-atocou.ads) to the
2405         list of user- accessible units added as children of System.
2406         * s-atocou.ads: Update comment.
2408 2014-10-17  Arnaud Charlet  <charlet@adacore.com>
2410         * s-expmod.ads: Add comments.
2412 2014-10-17  Hristian Kirtchev  <kirtchev@adacore.com>
2414         * sem_ch3.adb (Build_Derived_Record_Type): Remove the propagation
2415         of all attributes related to pragma Default_Initial_Condition.
2416         (Build_Derived_Type): Propagation of all attributes related
2417         to pragma Default_Initial_Condition.
2418         (Process_Full_View): Account for the case where the full view derives
2419         from another private type and propagate the attributes related
2420         to pragma Default_Initial_Condition to the private view.
2421         (Propagate_Default_Init_Cond_Attributes): New routine.
2422         * sem_util.adb: Alphabetize various routines.
2423         (Build_Default_Init_Cond_Call): Use an unchecked type conversion
2424         when calling the default initial condition procedure of a private type.
2425         (Build_Default_Init_Cond_Procedure_Declaration): Prevent
2426         the generation of multiple default initial condition procedures.
2428 2014-10-17  Robert Dewar  <dewar@adacore.com>
2430         * prj-conf.adb: Revert previous change.
2432 2014-10-17  Robert Dewar  <dewar@adacore.com>
2434         * lib-writ.ads, s-valdec.ads: Minor reformatting.
2436 2014-10-17  Ed Schonberg  <schonberg@adacore.com>
2438         * sem_ch12.adb: Additional work on function wrappers.
2440 2014-10-17  Eric Botcazou  <ebotcazou@adacore.com>
2442         * exp_util.adb (Possible_Bit_Aligned_Component): Also recurse
2443         on the renamed object of renamings.
2445 2014-10-17  Vincent Celier  <celier@adacore.com>
2447         * prj-conf.adb (Parse_Project_And_Apply_Config): In CodePeer
2448         mode, always use the native target.
2450 2014-10-16  Andrew MacLeod  <amacleod@redhat.com>
2452         * gcc-interface/misc.c: Adjust include files.
2454 2014-10-13  Eric Botcazou  <ebotcazou@adacore.com>
2455             Alan Modra  <amodra@gmail.com>
2457         PR ada/63225
2458         * uintp.adb (Vector_To_Uint): Move from here to...
2459         * uintp.ads (UI_Vector): Make public.
2460         (Vector_To_Uint): ...here.
2462 2014-10-10  Robert Dewar  <dewar@adacore.com>
2464         * freeze.adb, sem_attr.adb: Minor reformatting.
2466 2014-10-10  Johannes Kanig  <kanig@adacore.com>
2468         * a-cfdlli.ads, a-cfhama.ads, a-cfhase.ads, a-cforma.ads,
2469         a-cforse.ads, a-cofove.ads: add "Default_Initial_Condition"
2470         to container type.
2472 2014-10-10  Vincent Celier  <celier@adacore.com>
2474         * prj-conf.adb (Do_Autoconf): In Codepeer mode, do not try to get
2475         any configuration switches from the project file.
2477 2014-10-10  Ed Schonberg  <schonberg@adacore.com>
2479         * sem_ch12.adb (Build_Wrapper): Renamed as Build_Operator_Wrapper.
2480         (Build_Function_Wrapper): New function, to construct a wrapper
2481         function for actuals that are functions with an arbitrary
2482         number of parameters. Used in GNATProve mode to simplify proof
2483         propagation in instantiations.
2485 2014-10-10  Robert Dewar  <dewar@adacore.com>
2487         * freeze.adb, gnat1drv.adb, sem_ch13.adb: Minor reformatting and
2488         code clean up.
2490 2014-10-10  Hristian Kirtchev  <kirtchev@adacore.com>
2492         * sem_res.adb (Is_OK_Volatile_Context): Allow
2493         a volatile object reference to appear as the expression of a
2494         type conversion.
2496 2014-10-10  Ed Schonberg  <schonberg@adacore.com>
2498         * sem_ch13.adb (Analyze_Aspect_Specifications, Library_Unit_Aspects):
2499         Aspect specification is legal on a local instantiation of a
2500         library-level generic unit.
2502 2014-10-10  Gary Dismukes  <dismukes@adacore.com>
2504         * gnat1drv.adb (Adjust_Global_Switches): Set Front_End_Inlining
2505         if inlining has been enabled via -gnatn and the target is not GCC.
2507 2014-10-10  Ed Schonberg  <schonberg@adacore.com>
2509         * freeze.adb (Freeze_Entity): Freezing a subprogram does
2510         not always freeze its profile.  In particular, an attribute
2511         reference that takes the access type does not freeze the types
2512         of the formals.
2514 2014-10-10  Robert Dewar  <dewar@adacore.com>
2516         * errout.adb (Adjust_Name_Case): New procedure.
2517         (Set_Msg_Node): Use Adjust_Name_Case.
2518         * errout.ads (Adjust_Name_Case): New procedure.
2519         * exp_intr.adb (Add_Source_Info): Minor code reorganization
2520         (use Ekind_In).
2521         (Write_Entity_Name): Use Errout.Adjust_Name_Case.
2522         * sem_prag.adb (Is_Non_Significant_Pragma_Reference): Review
2523         and fix up entries in Sig_Flags, and correct logical errors in
2524         function itself.
2525         * sprint.adb (Sprint_Node_Actual): Properly print string for
2526         raise statement.
2528 2014-10-10  Ed Schonberg  <schonberg@adacore.com>
2530         * sem_ch3.adb (Analyze_Object_Declaration): For an object of an
2531         anonymous array type with delayed aspects, defer freezing of
2532         type until object itself is frozen.
2533         * freeze.adb (Freeze_Entity): When freezing an object of an
2534         anonymous array type with delayed aspects, remove freeze node of
2535         object after freezing type, to prevent out-of-order elaboration
2536         in the back-end. The initialization call for the object has
2537         already been constructed when expanding the object declaration.
2539 2014-10-10  Robert Dewar  <dewar@adacore.com>
2541         * exp_intr.adb (Write_Entity_Name): Moved to outer level
2542         (Write_Entity_Name): Properly handle operator names
2543         (Expand_Source_Info): New procedure.
2544         * exp_intr.ads (Add_Source_Info): New procedure.
2546 2014-10-10  Robert Dewar  <dewar@adacore.com>
2548         * butil.ads: Minor reformatting.
2549         * sem_ch5.adb: Code clean up.
2551 2014-10-10  Robert Dewar  <dewar@adacore.com>
2553         * exp_ch11.adb (Expand_N_Raise_Statement): Handle
2554         Prefix_Exception_Messages.
2555         * opt.adb: Handle new flags Prefix_Exception_Message[_Config].
2556         * opt.ads: New flags Prefix_Exception_Message[_Config].
2557         * par-prag.adb: New dummy entry for pragma Prefix_Exception_Messages.
2558         * snames.ads-tmpl: Add entries for new pragma Prefix_Exception_Messages.
2559         * sem_prag.adb: Implement new pragma Prefix_Exception_Messages
2560         * gnat_rm.texi: Document pragma Prefix_Exception_Messages.
2562 2014-10-10  Gary Dismukes  <dismukes@adacore.com>
2564         * sinfo.ads, gnat_ugn.texi, a-except.adb, a-except-2005.adb,
2565         raise-gcc.c Spelling changes (prolog => prologue, epilog => epilogue).
2567 2014-10-10  Ed Schonberg  <schonberg@adacore.com>
2569         * sem_ch5.adb (Is_Wrapped_In_Block): Handle properly blocks that
2570         contain pragmas generated for loop invariants and type predicates.
2571         Clarify use of this subprogram.
2573 2014-10-10  Yannick Moy  <moy@adacore.com>
2575         * sem_prag.adb (Analyze_Global_Item): Accept formal objects in Global
2576         contracts.
2577         * errout.adb, errout.ads (SPARK_Msg_NE): Issue error unless
2578         SPARK_Mode is Off.
2580 2014-10-10  Vadim Godunko  <godunko@adacore.com>
2582         * a-stwima.adb (To_Sequence): Compute size of result array.
2584 2014-10-10  Javier Miranda  <miranda@adacore.com>
2586         * gnat_ugn.texi (Interfacing with C++ at the Class Level): Update the
2587         sources of the example to avoid a warning when the Ada files are
2588         automatically generated by the binding generator.
2590 2014-10-10  Ed Schonberg  <schonberg@adacore.com>
2592         * sem_attr.adb (Resolve_Attribute, case 'Update): Set
2593         Do_Range_Check on the expression of a record component
2594         association when needed, as is done for array components, when
2595         the corresponding type is a scalar type.
2597 2014-10-10  Gary Dismukes  <dismukes@adacore.com>
2599         * a-coinho-shared.adb: Minor typo fix.
2600         * prj-env.ads: Minor reformatting.
2602 2014-10-10  Hristian Kirtchev  <kirtchev@adacore.com>
2604         * sem_res.adb (Resolve_String_Literal): Do not
2605         generate a string literal subtype for the default expression of
2606         a formal parameter in GNATprove mode.
2608 2014-10-10  Yannick Moy  <moy@adacore.com>
2610         * errout.adb (SPARK_Msg_N): Issue error unless SPARK_Mode is Off.
2612 2014-10-10  Ed Schonberg  <schonberg@adacore.com>
2614         * exp_ch5.adb (Expand_Formal_Container_Element_Loop): Analyze
2615         declaration for loop parameter before rest of loop, and set
2616         entity kind to prevent assignments to it in the user code.
2617         * sem_ch3.adb (Analyze_Object_Contract): No contracts apply to the
2618         loop parameter in an element iteration over o formal container.
2620 2014-10-10  Robert Dewar  <dewar@adacore.com>
2622         * gnat_ugn.texi: Document use of user-level routines to handle
2623         e.g. col major arrays.
2625 2014-10-10  Doug Rupp  <rupp@adacore.com>
2627         * s-osinte-android.adb: Fix misspelling.
2628         * gsocket.h: Tweak the Android quirks.
2630 2014-10-10  Robert Dewar  <dewar@adacore.com>
2632         * errout.ads (SPARK_Msg_N): Fix spec to match change in body.
2634 2014-10-10  Robert Dewar  <dewar@adacore.com>
2636         * sem_ch13.adb: Minor code reorganization.
2638 2014-10-10  Pat Rogers  <rogers@adacore.com>
2640         * gnat_rm.texi: Text now indicates pragma No_Run_Time is not
2641         for users.
2643 2014-10-10  Vadim Godunko  <godunko@adacore.com>
2645         * a-coinho-shared.adb: Add minor comment.
2646         * a-stzmap.adb (To_Sequence): Compute size of result array.
2648 2014-10-10  Javier Miranda  <miranda@adacore.com>
2650         * exp_ch3.adb (Build_Init_Procedure): Complete the condition of an
2651         if-stmt to match its current documentation.
2653 2014-10-10  Robert Dewar  <dewar@adacore.com>
2655         * sem_ch7.adb, einfo.adb, einfo.ads, sem_prag.adb, sem_ch12.adb,
2656         freeze.adb, sem_util.adb, sem_res.adb, exp_ch6.adb, exp_ch13.adb,
2657         sem_ch6.adb, sem_cat.adb, sem_disp.adb
2658         (Is_Subprogram_Or_Generic_Subprogram): New primitive. Use this primitive
2659         throughout where appropriate.
2661 2014-10-10  Bob Duff  <duff@adacore.com>
2663         * a-coinho-shared.ads: Minor reformatting.
2664         * s-traceb.adb: Minor clean up.
2666 2014-10-10  Robert Dewar  <dewar@adacore.com>
2668         * ali.adb (Scan_ALI): Read and process new GP flag on ALI P line.
2669         * ali.ads (GNATprove_Mode): New component in ALI table.
2670         (GNATprove_Mode_Specified): New global.
2671         * gnatbind.adb (Gnatbind): Give fatal error if any file compiled
2672         in GNATProve mode.
2673         * lib-writ.ads, lib-writ.adb (GP): New flag on P line for
2674         GNATProve_Mode.
2676 2014-10-10  Javier Miranda  <miranda@adacore.com>
2678         * exp_ch3.adb (Build_Init_Procedure): Adding assertion.
2679         (Build_Init_Statement): Ensure that statements
2680         associated with the parent components are located at the beginning
2681         of the returned list of statements.
2683 2014-10-10  Ed Schonberg  <schonberg@adacore.com>
2685         * sem_ch13.adb (Inherit_Aspects_At_Freeze_Node): If the full
2686         view of a private type T that has a type invariant is a scalar
2687         or constrained array type, the base type created for the full
2688         view has the same type invariant.
2690 2014-10-10  Robert Dewar  <dewar@adacore.com>
2692         * exp_util.ads, sem_ch12.adb, exp_util.adb, i-fortra.ads: Minor code
2693         reorganization.
2695 2014-09-22  Eric Botcazou  <ebotcazou@adacore.com>
2697         * gcc-interface/decl.c (gnat_to_gnu_entity): Adjust comment.
2698         * gcc-interface/utils.c (gnat_write_global_declarations): Fix typo.
2700 2014-09-15  Jakub Jelinek  <jakub@redhat.com>
2702         * gcc-interface/Make-lang.in (check_acats_numbers0,
2703         check_acats_numbers1, check_acats_numbers2, check_acats_numbers3,
2704         check_acats_numbers4, check_acats_numbers5, check_acats_numbers6,
2705         check_acats_numbers, check_acats_subdirs): New variables.
2706         (check_acats_targets): Use $(check_acats_subdirs).
2707         (check-acats, check-acats%): Rewritten so that for parallelized
2708         testing each job runs all the chapters files, with
2709         GCC_RUNTEST_PARALLELIZE_DIR set in environment.  Prepare the support
2710         directory sequentially and share it.
2711         (check-acats-subtargets): Always print just check-acats.
2713 2014-08-25  Martin Liska  <mliska@suse.cz>
2715         * gcc-interface/utils.c (rest_of_subprog_body_compilation): Adjust to
2716         new cgraph interface.
2717         (gnat_write_global_declarations): Likewise.
2719 2014-08-13  Sylvestre Ledru  <sylvestre@debian.org>
2721         * 9drpc.adb: Fix a typo
2722         * s-interr.ads: Likewise
2723         * s-taskin.ads: Likewise
2724         * s-traces.ads: Likewise
2725         * sysdep.c: Likewise
2727 2014-08-12  Joel Sherrill <joel.sherrill@oarcorp.com>
2729         * socket.c: For RTEMS, use correct prototype of gethostbyname_r().
2730         * gsocket.h Add include of <unistd.h> on RTEMS.
2732 2014-08-11  Joel Sherrill <joel.sherrill@oarcorp.com>
2734         * s-osinte-rtems.adb: Correct formatting of line in license block.
2736 2014-08-04  Claire Dross  <dross@adacore.com>
2738         * exp_util.adb (Get_First_Parent_With_Ext_Axioms_For_Entity):
2739         For an instance, look at the scope before the generic parent.
2741 2014-08-04  Yannick Moy  <moy@adacore.com>
2743         * lib-writ.ads: Update comments.
2744         * sem_disp.ads, sem_disp.adb (Inherited_Subprograms): Add
2745         parameters to filter inherited subprograms.
2747 2014-08-04  Robert Dewar  <dewar@adacore.com>
2749         * gnat_rm.texi: Add section on use of address clause for memory
2750         mapped I/O.
2752 2014-08-04  Ed Schonberg  <schonberg@adacore.com>
2754         * sem_ch3.adb (Analyze_Subtype_Declaration): A subtype, in
2755         particular the subtype created for a generic actual, inherits
2756         invariant information from the base type.
2758 2014-08-04  Robert Dewar  <dewar@adacore.com>
2760         * aspects.ads, aspects.adb: Add entries for aspect Obsolescent.
2761         * gnat_rm.texi: Add documentation for aspect Obsolescent.
2762         * sem_ch13.adb (Analyze_Aspect_Specifications): Implement aspect
2763         Obsolescent.
2764         (Check_Aspect_At_Freeze_Point): Add dummy entry for pragma Obsolescent.
2765         * s-osprim-mingw.adb: Minor reformatting.
2766         * sem_res.adb (Is_Atomic_Ref_With_Address): New function
2767         (Resolve_Indexed_Component): Rework warnings for non-atomic access
2768         (Resolve_Selected_Component): Add warnings for non-atomic access.
2770 2014-08-04  Doug Rupp  <rupp@adacore.com>
2772         * g-calend.adb (timeval_to_duration, duration_to_timeval): Change sec
2773         formal to long_long.
2774         * g-calend.ads (timeval): Bump up size to accomodate sec type.
2775         * s-taprop-linux.adb (timeval_to_duration): Change sec formal to
2776         long_long
2777         * s-osprim-posix.adb (timeval): Bump up size to accomodate
2778         new sec type.
2779         (timeval_to_duration): Change sec formal to Long_Long_Integer
2780         * s-osinte-darwin.adb (timeval): Bump up
2781         size to accomodate new sec type.
2782         (timeval_to_duration): Change sec formal to long_long
2783         * s-osinte-android.adb: Likewise.
2784         * cal.c (__gnat_timeal_to_duration, __gnat_duration_to_timeval): Change
2785         sec formal from long to long long.
2787 2014-08-04  Robert Dewar  <dewar@adacore.com>
2789         * sem_res.adb (Resolve_Qualified_Expression): Make sure
2790         Do_Range_Check flag gets set.
2792 2014-08-04  Robert Dewar  <dewar@adacore.com>
2794         * einfo.ads, einfo.adb (Is_Standard_String_Type): New function.
2795         * exp_ch3.adb (Build_Array_Init_Proc): Use
2796         Is_Standard_String_Type.
2797         (Expand_Freeze_Array_Type): ditto.
2798         (Get_Simple_Init_Val): ditto.
2799         (Needs_Simple_Initialization): ditto.
2800         * sem_eval.adb (Eval_String_Literal): Use Is_Standard_String_Type.
2801         * sem_warn.adb (Is_Suspicious_Type): Use Is_Standard_String_Type.
2803 2014-08-04  Pascal Obry  <obry@adacore.com>
2805         * adaint.c (__gnat_try_lock): Use _tcscpy and _tcscat instead of
2806         _stprintf which insert garbage into the wfull_path buffer.
2808 2014-08-04  Arnaud Charlet  <charlet@adacore.com>
2810         * cal.c: Remove old VMS/nucleus code. Remove obsolete vxworks
2811         code.
2812         * fe.h: Minor reformatting.
2814 2014-08-04  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
2816         * cstreams.c: (_LARGEFILE_SOURCE): Guard definition.
2818 2014-08-04  Robert Dewar  <dewar@adacore.com>
2820         * par-ch13.adb (Get_Aspect_Specifications): Improve error
2821         recovery, fixing a -gnatQ bomb.
2823 2014-08-04  Yannick Moy  <moy@adacore.com>
2825         * sem_ch3.adb (Analyze_Object_Declaration): In GNATprove mode,
2826         do not generate two Itypes with the same name for an array
2827         definition.
2828         * sinfo.ads: Expand doc on GNATprove mode.
2830 2014-08-04  Hristian Kirtchev  <kirtchev@adacore.com>
2832         * exp_ch3.adb (Expand_Freeze_Record_Type): Set the finalization
2833         master and storage pool attributes on the root type of an
2834         anonymous access type.
2835         * exp_ch4.adb (Expand_N_Allocator): Set the finalization master
2836         and storage pool attributes on the root type of an anonymous
2837         access type.
2839 2014-08-04  Arnaud Charlet  <charlet@adacore.com>
2841         * exp_ch3.adb: Minor reformatting.
2842         * tb-alvms.c, tb-alvxw.c, tb-ivms.c: Removed.
2843         * tracebak.c: Remove use of above files.
2844         * gcc-interface/Makefile.in: Update dependencies.
2846 2014-08-04  Pierre-Marie Derodat  <derodat@adacore.com>
2848         * gcc-interface/utils.c (gnat_set_type_context): Also set the
2849         context for parallel types' TYPE_STUB_DECL.  Do not change
2850         anything if the context is already set for them.
2851         (gnat_pushdecl): Update the comment for calls to
2852         gnat_set_type_context to mention parallel types.
2853         (add_parallel_type): When adding a context-less parallel type to
2854         a type that has a context, propagate the context from the latter
2855         type to the former.
2856         (process_deferred_decl_context): Call gnat_set_type_context
2857         rather than manually setting the type context.
2858         (build_unc_object_type): Call gnat_set_type_context on the
2859         template type.
2861 2014-08-04  Ed Schonberg  <schonberg@adacore.com>
2863         * exp_ch5.adb (Expand_N_Case_Statement): If a choice is a
2864         subtype indication and the case statement has only two choices,
2865         replace subtype indication with its range, because the resulting
2866         membership test cannot have a subtype indication as an operand.
2868 2014-08-04  Arnaud Charlet  <charlet@adacore.com>
2870         * exp_ch3.adb: Update comments, minor reformatting.
2872 2014-08-04  Hristian Kirtchev  <kirtchev@adacore.com>
2874         * sem_ch3.adb (Analyze_Declarations): Explain why the bodies of
2875         the default initial condition procedures are build here.
2876         * sem_util.adb (Build_Default_Init_Cond_Procedure): Wrap the
2877         analyzed argument of pragma Default_Initial_Condition in some
2878         dummy code as GNATprove mode disables assertions, but still
2879         needs to see the argument.
2881 2014-08-04  Robert Dewar  <dewar@adacore.com>
2883         * exp_ch6.adb, sem_util.adb: Minor reformatting.
2885 2014-08-04  Olivier Hainque  <hainque@adacore.com>
2887         * a-comutr.ads: Set Root_Node_Type'Alignment to
2888         Standard'Maximum_Alignment, so that it is at least as large as
2889         the max default for Tree_Node_Type'Alignment.
2891 2014-08-04  Hristian Kirtchev  <kirtchev@adacore.com>
2893         * exp_ch3.adb (Freeze_Type): Remove the generation and inheritance
2894         of the default initial condition procedure [body].
2895         * sem_ch3.adb (Analyze_Declarations): Create the bodies of
2896         all default initial condition procedures at the end of private
2897         declaration analysis.
2898         * sem_util.adb (Build_Default_Init_Cond_Procedure_Bodies): New
2899         routine.
2900         (Build_Default_Init_Cond_Procedure_Body): Merged in the
2901         processing of routine Build_Default_Init_Cond_Procedure_Bodies.
2902         * sem_util.ads (Build_Default_Init_Cond_Procedure_Bodies):
2903         New routine.
2904         (Build_Default_Init_Cond_Procedure_Body): Removed.
2906 2014-08-04  Ed Schonberg  <schonberg@adacore.com>
2908         * sem_elab.adb (Check_Elab_Call): Do not check a call to a
2909         postcondtion.
2910         * exp_ch6.adb (Expand_Call): Clarify handling of inserted
2911         postcondition call.
2913 2014-08-04  Hristian Kirtchev  <kirtchev@adacore.com>
2915         * sem_prag.adb (Analyze_Pragma): Ensure that an
2916         internally generated spec for a stand alone body is recognized
2917         as a proper context for pragma SPARK_Mode.
2919 2014-08-04  Robert Dewar  <dewar@adacore.com>
2921         * erroutc.adb (Delete_Msg): Do not decrement Warnings_Treated_As_Errors.
2923 2014-08-04  Arnaud Charlet  <charlet@adacore.com>
2925         * adabkend.adb (Scan_Back_End_Switches): Ignore extra -o
2926         when -gnatO has already been specified, for compatibility
2927         with gcc driver.
2928         (Scan_Compiler_Args): Do not call Set_Output_Object_File_Name in
2929         codepeer mode.
2930         * g-expect.ads: Fix typo.
2932 2014-08-04  Thomas Quinot  <quinot@adacore.com>
2934         * exp_ch4.adb (Insert_Dereference_Action): the actual Size
2935         must account for the bounds template if the designated type is
2936         an unconstrained array.
2938 2014-08-04  Hristian Kirtchev  <kirtchev@adacore.com>
2940         * a-cfhama.adb, a-cfhase.adb, a-cforma.adb, a-cforse.adb Add
2941         SPARK_Mode in the body.
2942         * sem_ch7.adb (Analyze_Package_Body_Helper): Restore the original
2943         way to verify the consistency of SPARK_Mode between a spec and
2944         a body.
2945         * sem_ch12.adb (Analyze_Package_Instantiation): Remove the call
2946         to Set_Ignore_Pragma_SPARK_Mode. Set flag Ignore_Pragma_SPARK_Mode
2947         manually.
2948         (Analyze_Subprogram_Instantiation): Remove the call to
2949         Set_Ignore_Pragma_SPARK_Mode. Set flag Ignore_Pragma_SPARK_Mode
2950         manually.
2951         * sem_prag.adb (Analyze_Pragma): Remove local variable
2952         Inst_Id. SPARK_Mode can no longer be applied to a package or
2953         subprogram instantiation.
2954         * sem_util.adb, sem_util.ads (Set_Ignore_Pragma_SPARK_Mode):
2955         Removed.
2957 2014-08-04  Robert Dewar  <dewar@adacore.com>
2959         * sem_prag.adb, osint.adb, osint.ads: Minor reformatting.
2961 2014-08-04  Yannick Moy  <moy@adacore.com>
2963         * sem_ch3.adb (Derive_Type_Declaration,
2964         Process_Discriminants): Remove SPARK-specific legality checks.
2966 2014-08-04  Thomas Quinot  <quinot@adacore.com>
2968         * g-sechas.ads, g-sechas.adb (HMAC_Initial_Context): New subprogram.
2969         * gnat_rm.texi (GNAT.MD5/SHA1/SHA224/SHA256/SHA512): Document support
2970         for HMAC.
2972 2014-08-04  Hristian Kirtchev  <kirtchev@adacore.com>
2974         * sem_ch7.adb (Analyze_Package_Body_Helper): When verifying the
2975         compatibility of SPARK_Mode between a spec and a body, use the
2976         SPARK_Mode of the public part.
2977         * sem_ch12.adb (Analyze_Generic_Subprogram_Declaration): Use
2978         the already available routine to exchange the aspects between
2979         the template and its copy. Analyze the aspects of copy to
2980         ensure that the corresponding pragmas perform their semantic
2981         effects.  The partial analysis of aspects is no longer needed.
2982         (Analyze_Package_Instantiation): Save and restore the SPARK_Mode
2983         of the context.
2984         (Analyze_Subprogram_Instantiation): Save and restore the SPARK_Mode of
2985         the context.
2986         * sem_prag.adb (Analyze_Pragma): Do not bypass a subprogram
2987         instantiation which does not come from source.
2989 2014-08-04  Hristian Kirtchev  <kirtchev@adacore.com>
2991         * a-cfhama.ads, a-cfhase.ads, a-cforma.ads, a-cforse.ads Add
2992         SPARK_Mode pragmas to the public and private part of the unit.
2993         * sem_ch3.adb (Derive_Type_Declaration): Ensure that a derived
2994         type cannot have discriminants if the parent type already has
2995         discriminants.
2996         (Process_Discriminants): Ensure that the type of a discriminant is
2997         discrete.
2998         * sem_ch6.adb (Analyze_Subprogram_Body_Helper): The check on
2999         SPARK_Mode compatibility between a spec and a body can now be
3000         safely performed while processing a generic.
3001         * sem_ch7.adb (Analyze_Package_Body_Helper): The check on
3002         SPARK_Mode compatibility between a spec and a body can now be
3003         safely performed while processing a generic.
3004         * sem_prag.adb (Analyze_Pragma): Pragma SPARK_Mode can now be
3005         safely analyzed when processing a generic.
3007 2014-08-04  Nicolas Roche  <roche@adacore.com>
3009         * g-dirope.adb: Minor reformating.
3011 2014-08-04  Robert Dewar  <dewar@adacore.com>
3013         * sem_ch6.adb: Minor reformatting.
3015 2014-08-04  Ed Schonberg  <schonberg@adacore.com>
3017         * sem_prag.adb (Analyze_Pragma, case Assert and related pragmas):
3018         Before normalizing these pragmas into a pragma Check, preanalyze
3019         the optional Message argument, (which is subsequently copied)
3020         so that it has the proper semantic information for ASIS use.
3021         * sem_case.adb: Initialize flag earlier.
3022         * osint.adb, osint.ads (Find_File): Add parameter Full_Name, used when
3023         the full source path of a configuration file is requested.
3024         (Read_Source_File): Use Full_Name parameter..
3026 2014-08-04  Hristian Kirtchev  <kirtchev@adacore.com>
3028         * opt.ads Alphabetize various global flags. New flag
3029         Ignore_Pragma_SPARK_Mode along with a comment on usage.
3030         * sem_ch6.adb (Analyze_Generic_Subprogram_Body):
3031         Pragma SPARK_Mode is now allowed in generic units.
3032         (Analyze_Subprogram_Body_Helper): Do not verify the compatibility
3033         between the SPARK_Mode of a spec and that of a body when inside
3034         a generic.
3035         * sem_ch7.adb (Analyze_Package_Body_Helper): Do not verify the
3036         compatibility between the SPARK_Mode of a spec and that of a
3037         body when inside a generic.
3038         * sem_ch12.adb (Analyze_Generic_Subprogram_Declaration):
3039         Pragma SPARK_Mode is now allowed in generic units.
3040         (Analyze_Package_Instantiation): Save and restore the value of
3041         flag Ignore_ Pragma_SPARK_Mode in a stack-like fasion. Set
3042         the governing SPARK_Mode before analyzing the instance.
3043         (Analyze_Subprogram_Instantiation): Save and restore the value
3044         of flag Ignore_ Pragma_SPARK_Mode in a stack-like fasion. Set
3045         the governing SPARK_Mode before analyzing the instance.
3046         * sem_ch13.adb (Analyze_Aspect_Specifications): Emulate the
3047         placement of a source pragma when inserting the generated pragma
3048         for aspect SPARK_Mode.
3049         * sem_prag.adb (Analyze_Pragma): Reimplement the handling of
3050         pragma SPARK_Mode to allow for generics and their respective
3051         instantiations.
3052         * sem_util.ads, sem_util.adb (Check_SPARK_Mode_In_Generic): Removed.
3053         (Set_Ignore_Pragma_SPARK_Mode): New routine.
3055 2014-08-04  Eric Botcazou  <ebotcazou@adacore.com>
3057         * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Component>: Deal with
3058         renaming discriminants in tagged types first.
3059         * gcc-interface/trans.c (gnat_to_gnu) <N_Selected_Component>: Test
3060         the underlying type of the prefix.
3061         (Pragma_to_gnu, case Pragma_Warning): Ignore Reason => "..."
3062         (process_freeze_entity): Reset the nodes of all the view of a type,
3063         if any.
3065 2014-08-04  Doug Rupp  <rupp@adacore.com>
3066             Olivier Hainque  <hainque@adacore.com>
3068         * gcc-interface/Makefile.in (x86 VxWorks): Add filter-out for vxworks7
3069         and remove incorrect EH_MECHANISM macros.
3070         Add sigtramp.h to EXTRA_LIBGNAT_SRCS when we add sigtramp-vxworks.o to
3071         EXTRA_LIBGNAT_OBJS.
3073 2014-08-04  Robert Dewar  <dewar@adacore.com>
3075         * exp_attr.adb (Expand_N_Attribute_Reference): Make sure prefix
3076         of constructed 'Valid attribute in -gnatVa mode does not appear
3077         to come from source.
3078         * sem_attr.adb (Analyze_Access_Attribute): Don't set
3079         Never_Set_In_Source for non-source reference.
3080         * sem_util.adb: Minor reformatting.
3081         * sem_warn.adb (Check_References): Don't check Address_Taken,
3082         not necessary, see comment.
3084 2014-08-04  Robert Dewar  <dewar@adacore.com>
3086         * sem_util.adb, sem_case.adb: Minor reformatting.
3088 2014-08-04  Ed Schonberg  <schonberg@adacore.com>
3090         * exp_ch9.adb (Extract_Entry): If the synchronized object is a
3091         limited view, replace with non-limited view, which is available
3092         at the point of an entry call.
3094 2014-08-04  Ed Schonberg  <schonberg@adacore.com>
3096         * exp_ch6.adb (Expand_Call): If the call is to a function in
3097         a run-time unit that is marked Inline_Always, we must suppress
3098         debugging information on it, so that the code that is eventually
3099         inlined will not affect debugging of the user program.
3101 2014-08-04  Robert Dewar  <dewar@adacore.com>
3103         * inline.adb, einfo.ads, s-tassta.adb, s-tarest.adb: Minor comment
3104         fixes.
3106 2014-08-04  Ed Schonberg  <schonberg@adacore.com>
3108         * sem_prag.adb (Process_Import_Or_Interface): Handle properly
3109         an aspect Import that specifies a False value.
3111 2014-08-04  Robert Dewar  <dewar@adacore.com>
3113         * gnat_rm.texi: Add section on aspect Invariant'Class.
3115 2014-08-04  Ed Schonberg  <schonberg@adacore.com>
3117         * sem_case.adb (Check_Choice_Set): New flag Predicate_Error,
3118         for better control of cascaded error messages when some choice
3119         in a case statement over a predicated type violates the given
3120         static predicate.
3122 2014-08-04  Hristian Kirtchev  <kirtchev@adacore.com>
3124         * sem_ch3.adb (Build_Derived_Type): Modify the
3125         inheritance of the rep chain to ensure that a non-tagged type's
3126         items are not clobbered during the inheritance.
3128 2014-08-04  Robert Dewar  <dewar@adacore.com>
3130         * sem_ch3.adb, einfo.ads: Minor reformatting.
3132 2014-08-04  Yannick Moy  <moy@adacore.com>
3134         * inline.adb (Can_Be_Inlined_In_GNATprove_Mode): Fix
3135         detection of subprograms that cannot be inlined in GNATprove mode.
3137 2014-08-04  Ed Schonberg  <schonberg@adacore.com>
3139         * einfo.adb: Add guard to Returns_Limited_View.
3141 2014-08-04  Jose Ruiz  <ruiz@adacore.com>
3143         * s-tassta.adb, s-tarest.adb (Task_Wrapper): Force maximum alignment of
3144         the secondary stack to respect the alignments of the returned objects.
3146 2014-08-04  Ed Schonberg  <schonberg@adacore.com>
3148         * einfo.ads, einfo.adb (Returns_Limited_View): New flag defined
3149         on function entities whose return type is a limited view.
3150         * freeze.adb (Freeze_Entity): Use Returns_Limited_View to determine
3151         where to place the freeze node for a function that returns the
3152         limited view of a type, when the function is called and frozen
3153         in a different unit.
3155 2014-08-04  Eric Botcazou  <ebotcazou@adacore.com>
3157         * sem_ch3.adb (Build_Derived_Private_Type): Minor code
3158         refactoring.
3160 2014-08-04  Robert Dewar  <dewar@adacore.com>
3162         * gnat_ugn.texi: Clarify documentation on assertions.
3164 2014-08-04  Ed Schonberg  <schonberg@adacore.com>
3166         * sem_aggr.adb (Resolve_Record_Aggregate, Get_Value): Warn
3167         if a component association has a box initialization when the
3168         component type has no default initialization, either through an
3169         initial value, an aspect, or an implicit initialization procedure.
3171 2014-08-04  Ed Schonberg  <schonberg@adacore.com>
3173         * freeze.adb: Code clean up.
3175 2014-08-04  Thomas Quinot  <quinot@adacore.com>
3177         * sem_ch5.adb: Minor reformatting.
3179 2014-08-04  Ed Schonberg  <schonberg@adacore.com>
3181         * freeze.adb (Late_Freeze_Subprogram): Following AI05-151,
3182         a function can return a limited view of a type declared
3183         elsewhere. In that case the function cannot be frozen at the end
3184         of its enclosing package. If its first use is in a different unit,
3185         it cannot be frozen there, but if the call is legal the full view
3186         of the return type is available and the subprogram can now be
3187         frozen. However the freeze node cannot be inserted at the point
3188         of call, but rather must go in the package holding the function,
3189         so that the backend can process it in the proper context.
3191 2014-08-04  Robert Dewar  <dewar@adacore.com>
3193         * exp_ch5.adb, sem_ch5.adb, einfo.ads: Minor reformatting.
3195 2014-08-04  Arnaud Charlet  <charlet@adacore.com>
3197         * sem_ch4.adb (Operator_Check): Refine previous change.
3199 2014-08-04  Arnaud Charlet  <charlet@adacore.com>
3201         * sem_scil.ads: Improve comments.
3202         * sem_ch4.adb (Analyze_Equality_Op): Add support for
3203         Allow_Integer_Address (equality between Address and Integer).
3205 2014-08-04  Yannick Moy  <moy@adacore.com>
3207         * a-cfhama.adb, a-cforse.adb: Minor fixes to avoid using prefix
3208         notation on untagged objects.
3209         * sem.ads: Update comment.
3210         * inline.adb (Can_Be_Inlined_In_GNATprove_Mode): Do
3211         not inline subprograms declared in the visible part of a package.
3213 2014-08-04  Ed Schonberg  <schonberg@adacore.com>
3215         * exp_ch5.adb: minor reformatting.
3216         * einfo.ads, einfo.adb (Is_Processed_Transient): Applies to loop
3217         parameters.
3219 2014-08-04  Thomas Quinot  <quinot@adacore.com>
3221         * s-fatgen.adb: Minor reformatting.
3223 2014-08-04  Arnaud Charlet  <charlet@adacore.com>
3225         * exp_util.adb (Is_Possibly_Unaligned_Object): Always return
3226         False on .NET.
3228 2014-08-04  Ed Schonberg  <schonberg@adacore.com>
3230         * sem_ch5.adb (Analyze_Loop_Statement): Set properly the kind of
3231         the loop parameter for element iterators over containers and
3232         arrays, so that improper uses of it are detected in the loop
3233         body when expansion is disabled.
3234         * exp_ch5.adb (Expand_Iterator_Loop): The entity kind of the
3235         generated cursor is that of the analyzed loop parameter.
3237 2014-08-04  Hristian Kirtchev  <kirtchev@adacore.com>
3239         * exp_ch3.adb (Build_CPP_Init_Procedure): Remove
3240         Flag_Decl. Do not analyze the declaration of the flag as it is
3241         not part of the tree yet, instead add it to the freeze actions
3242         of the C++ type.
3244 2014-08-04  Robert Dewar  <dewar@adacore.com>
3246         * checks.adb (Apply_Scalar_Range_Check): Make sure we handle
3247         case of OUT and IN OUT parameter correctly (where Source_Typ is
3248         set), we were missing one case where a check must be applied.
3250 2014-08-04  Hristian Kirtchev  <kirtchev@adacore.com>
3252         * sem_ch8.adb (Build_Class_Wide_Wrapper): Update the comment on
3253         the generated code. Instead of hiding the renaming and using the
3254         wrapper as the proper association, have the subprogram renaming
3255         alias the wrapper.
3256         (Build_Spec): The entity of the wrapper is
3257         now derived from the entity of the related primitive.
3259 2014-08-04  Emmanuel Briot  <briot@adacore.com>
3261         * s-regpat.adb: s-regpat.adb (Parse): fix incorrect link when
3262         using non-capturing groups.
3264 2014-08-04  Ed Schonberg  <schonberg@adacore.com>
3266         * inline.adb (Build_Body_To_Inline): Remove Unmodified and
3267         related pragmas before copying the original body, to prevent
3268         spurious errors when the pragmas apply to formals that will not
3269         appear in the inlined body.
3271 2014-08-04  Robert Dewar  <dewar@adacore.com>
3273         * exp_prag.adb, sem_ch7.adb, einfo.adb, sem_prag.adb, sem_util.adb,
3274         exp_ch3.adb: Minor reformatting.
3276 2014-08-04  Robert Dewar  <dewar@adacore.com>
3278         * prj-strt.adb, prj-strt.ads, sem_attr.adb: Minor reformatting.
3280 2014-08-04  Hristian Kirtchev  <kirtchev@adacore.com>
3282         * aspects.adb Add an entry in table Canonical_Aspect for
3283         Default_Initial_Condition.
3284         * aspects.ads Add an entry in tables Aspect_Id, Aspect_Argument,
3285         Aspect_Names and Aspect_Delay for Default_Initial_Condition.
3286         * einfo.adb Flag3 is now Has_Default_Init_Cond. Flag132
3287         is now Is_Default_Init_Cond_ Procedure. Flag133 is now
3288         Has_Inherited_Default_Init_Cond.
3289         (Default_Init_Cond_Procedure): New routine.
3290         (Has_Default_Init_Cond): New routine.
3291         (Has_Inherited_Default_Init_Cond): New routine.
3292         (Is_Default_Init_Cond_Procedure): New routine.
3293         (Set_Default_Init_Cond_Procedure): New routine.
3294         (Set_Has_Default_Init_Cond): New routine.
3295         (Set_Has_Inherited_Default_Init_Cond): New routine.
3296         (Set_Is_Default_Init_Cond_Procedure): New routine.
3297         (Write_Entity_Flags): Output all the new flags.
3298         * einfo.ads New attributes Default_Init_Cond_Procedure,
3299         Has_Inherited_Default_Init_Cond and Is_Default_Init_Cond_Procedure
3300         along with usage in nodes.
3301         (Default_Init_Cond_Procedure): New routine.
3302         (Has_Default_Init_Cond): New routine and pragma Inline.
3303         (Has_Inherited_Default_Init_Cond): New routine and
3304         pragma Inline.
3305         (Is_Default_Init_Cond_Procedure): New routine and
3306         pragma Inline.
3307         (Set_Default_Init_Cond_Procedure): New routine.
3308         (Set_Has_Default_Init_Cond): New routine and pragma Inline.
3309         (Set_Has_Inherited_Default_Init_Cond): New routine and pragma Inline.
3310         (Set_Is_Default_Init_Cond_Procedure): New routine and pragma Inline.
3311         * exp_ch3.adb (Expand_N_Object_Declaration): New constant
3312         Next_N. Generate a call to the default initial condition procedure
3313         if the object's type is subject to the pragma.  (Freeze_Type):
3314         Generate the body of the default initial condition procedure or
3315         inherit the spec from a parent type.
3316         * exp_ch7.adb Add with and use clause for Exp_Prag.
3317         (Expand_Pragma_Initial_Condition): Removed.
3318         * exp_prag.ads, exp_prag.adb (Expand_Pragma_Initial_Condition): New
3319         routine.
3320         * par-prag.adb (Prag): Pragma Default_Initial_Condition does
3321         not need special treatment by the parser.
3322         * sem_ch3.adb (Build_Derived_Record_Type): Propagate the
3323         attributes related to pragma Default_Initial_Condition to the
3324         derived type.
3325         (Process_Full_View): Propagate the attributes
3326         related to pragma Default_Initial_Condition to the full view.
3327         * sem_ch7.adb (Analyze_Package_Specification): Build the
3328         declaration of the default initial condition procedure for all
3329         types that qualify or inherit the one from the parent type.
3330         * sem_ch13.adb (Analyze_Aspect_Specifications):
3331         Add processing for aspect Default_Initial_Condition.
3332         (Check_Aspect_At_Freeze_Point): Aspect
3333         Default_Initial_Condition does not require delayed analysis.
3334         (Replace_Type_References_Generic): Moved to spec.
3335         * sem_ch13.ads (Replace_Type_References_Generic): Moved from body.
3336         * sem_prag.adb Add an entry in table Sif_Glags for
3337         Default_Initial_Condition.
3338         (Analyze_Pragma): Pragma
3339         Default_Initial_Condition is now part of assertion
3340         policy. Add processing for pragma Default_Initial_Condition.
3341         (Is_Valid_Assertion_Kind): Pragma Default_Initial_Condition is
3342         now recognized as a proper assertion policy.
3343         * sem_util.ads, sem_util.adb (Build_Default_Init_Cond_Call): New
3344         routine.
3345         (Build_Default_Init_Cond_Procedure_Body): New routine.
3346         (Build_Default_Init_Cond_Procedure_Declaration): New routine.
3347         (Inherit_Default_Init_Cond_Procedure): New routine.
3348         * snames.ads-tmpl Add new predefined name and pragma id for
3349         Default_Initial_Condition.
3351 2014-08-04  Vincent Celier  <celier@adacore.com>
3353         * prj-dect.adb (Parse_Case_Construction): It is no longer
3354         an error if the variable for a case construction is not
3355         typed, only if the variable value is not a single string. Call
3356         Parse_Choice_List and End_Case_Construction with the new parameter
3357         to indicate that the variable is typed.
3358         * prj-strt.adb (End_Case_Construction): Only check the labels
3359         if the variable is typed.  If the variable is not typed,
3360         issue a warning when there is no "when others" allternative.
3361         (Parse_Choice_List): Manage the labels only if the variable
3362         is typed.
3363         * prj-strt.ads (End_Case_Construction): New Boolean parameter
3364         String_Type.
3365         (Parse_Choice_List): Ditto.
3367 2014-08-04  Ed Schonberg  <schonberg@adacore.com>
3369         * sem_ch5.adb: Additional fix to Check_Predicate_Use.
3371 2014-08-04  Vincent Celier  <celier@adacore.com>
3373         * projects.texi: Update documentation of case constructions with
3374         variables that are not typed.
3376 2014-08-04  Ed Schonberg  <schonberg@adacore.com>
3378         * sem_ch8.adb (Build_Class_Wide_Wrapper): If the operator carries
3379         an Eliminated pragma, indicate that the wrapper is also to be
3380         eliminated, to prevent spurious errors when using gnatelim on
3381         programs that include box-initialization of equality operators
3382         (consequence of AI05-071)..
3384 2014-08-04  Robert Dewar  <dewar@adacore.com>
3386         * checks.adb (Activate_Overflow_Check): Handle floating-point
3387         case correctly.
3388         * checks.ads (Activate_Overflow_Check): Clarify handling of
3389         floating-point cases.
3390         * exp_util.adb (Check_Float_Op_Overflow): Reset Do_Overflow_Check
3391         flag if we generate an explicit overflow check (for
3392         Check_Float_Overflow mode).
3394 2014-08-04  Robert Dewar  <dewar@adacore.com>
3396         * prj-proc.adb, prj-part.adb, prj-strt.adb, prj.adb, prj.ads,
3397         prj-attr.adb, prj-attr.ads: Minor reformatting.
3399 2014-08-04  Yannick Moy  <moy@adacore.com>
3401         * expander.adb (Expand): Always perform special
3402         expansion in GNATprove mode, even when doing pre-analysis.
3404 2014-08-04  Thomas Quinot  <quinot@adacore.com>
3406         * repinfo.adb (List_Scalar_Storage_Order): List bit order if
3407         not default. Also list bit order if SSO is specified. Do not
3408         assume that bit order is always equal to scalar storage order.
3410 2014-08-04  Thomas Quinot  <quinot@adacore.com>
3412         * freeze.adb (Set_SSO_From_Default): Do not set scalar storage
3413         order to reverse SSO for a type that has an explicit native
3414         Bit_Order.
3416 2014-08-04  Doug Rupp  <rupp@adacore.com>
3418         * cal.c: Macro check for VxWorks7.
3419         * init.c (getpid): Likewise.
3420         * mkdir.c (__gnat_mkdir): Likewise.
3421         * sysdep.c (__gnat_is_file_not_found_error): Likewise.
3423 2014-08-04  Gary Dismukes  <dismukes@adacore.com>
3425         * exp_ch3.adb (Expand_N_Object_Declaration): Inhibit generation
3426         of an invariant check in the case where No_Initialization is set,
3427         since the object is uninitialized.
3429 2014-08-04  Thomas Quinot  <quinot@adacore.com>
3431         * snames.ads-tmpl (Default_Scalar_Storage_Order): Now an attribute
3432         name, in addition to a pragma name.
3433         * snames.adb-tmpl (Get_Pragma_Id, Is_Configuration_Pragma_Name,
3434         Is_Pragma_Name): Adjust accordingly.
3435         * sem_attr.ads, sem_attr.adb, exp_attr.adb
3436         (Attribute_Default_Scalar_Storage_Order): Add handling of new
3437         attribute.
3438         * gnat_rm.texi: Document the above.
3440 2014-08-04  Arnaud Charlet  <charlet@adacore.com>
3442         * exp_util.adb (Check_Float_Op_Overflow): No-op in codepeer
3443         mode for now, to revert to previous behavior.
3444         * checks.adb: Revert previous change, no longer needed.
3446 2014-08-04  Robert Dewar  <dewar@adacore.com>
3448         * gnat1drv.adb (Adjust_Global_Switches): Don't set
3449         Check_Float_Overflow if Machine_Oveflows_On_Target is True.
3450         * sem_prag.adb (Analyze_Pragma, case Check_Float_Overflow): Don't
3451         set Check_Float_Overflow if Machine_Oveflows_On_Target is True.
3452         * switch-c.adb (Scan_Front_End_Switches): Don't set
3453         Check_Float_Overflow if Machine_Oveflows_On_Target is True.
3455 2014-08-04  Vincent Celier  <celier@adacore.com>
3457         * prj-attr.adb: Add new default indications for
3458         attributes Object_Dir, Exec_Dir, Source_Dirs and Target.
3459         (Attribute_Default_Of): New function (Initialize): Set the
3460         default for those attributes that have one specified.
3461         * prj-attr.ads (Attribute_Data): New component Default.
3462         * prj-proc.adb (Expression): Take into account the new defaults
3463         for attributes Object_Dir, Exec_Dir and Source_Dirs.
3464         * prj-strt.adb (Attribute_Reference): Set the default for
3465         the attribute.
3466         * prj-tree.ads, prj-tree.adb (Default_Of): New function.
3467         (Set_Default_Of): New procedure.
3468         * prj.adb (The_Dot_String): New global Name_Id variable,
3469         initialized in procedure Initialize.
3470         (Dot_String): New function
3471         (Initialize): Initialize The_Dot_String.
3472         (Reset): Create the string list Shared.Dot_String_List.
3473         * prj.ads (Attribute_Default_Value): New enumeration type.
3474         (Project_Qualifier): Change enumeration value Dry to Abstract_Project.
3475         (Dot_String): New function.
3476         (Shared_Project_Tree_Data): New string list component Dot_String_List.
3477         * projects.texi: Document new defaults for attribute Object_Dir,
3478         Exec_Dir and Source_Dirs.
3480 2014-08-04  Robert Dewar  <dewar@adacore.com>
3482         * sem_ch12.adb: Minor reformatting.
3484 2014-08-04  Arnaud Charlet  <charlet@adacore.com>
3486         * exp_util.adb, checks.adb (Check_Float_Op_Overflow): Add special
3487         expansion in CodePeer_Mode.
3488         (Selected_Range_Checks): Add handling of overflow checks in
3489         CodePeer_Mode.
3491 2014-08-04  Robert Dewar  <dewar@adacore.com>
3493         * exp_attr.adb (Expand_N_Attribute_Reference, case Pred):
3494         Remove special test for Float'First, no longer required.
3495         (Expand_N_Attribute_Reference, case Succ): Remove special test
3496         for Float'First, no longer required.
3497         * s-fatgen.adb (Pred): return infinity unchanged.
3498         (Succ): ditto.
3500 2014-08-04  Claire Dross  <dross@adacore.com>
3502         * sem_ch12.adb (Analyze_Associations): Defaults should only be
3503         used if there is no explicit match.
3504         * exp_util.adb (Get_First_Parent_With_Ext_Axioms_For_Entity):
3505         Also check for pragma external_axiomatization on generic units.
3507 2014-08-04  Robert Dewar  <dewar@adacore.com>
3509         * checks.adb (Activate_Overflow_Check): Remove
3510         Check_Float_Overflow processing.
3511         (Apply_Scalar_Range_Check): Ditto.
3512         (Generate_Range_Check): Ditto.
3513         * exp_ch4.adb (Expand_N_Op_Add): Add call to
3514         Check_Float_Op_Overflow.
3515         (Expand_N_Op_Divide): ditto.
3516         (Expand_N_Op_Multiply): ditto.
3517         (Expand_N_Op_Subtract): ditto.
3518         * exp_util.ads, exp_util.adb (Check_Float_Op_Overflow): New procedure.
3519         * sem_attr.adb (Analyze_Attribute, case Pred): Make sure
3520         Do_Range_Check is set for floating-point case in -gnatc or
3521         GNATprove mode.
3522         (Analyze_Attribute, case Succ): Make sure
3523         Do_Range_Check is set for floating-point case in -gnatc or
3524         GNATprove mode.
3525         * sem_res.adb (Resolve_Type_Conversion): Make sure Do_Range_Check
3526         flag is set for real to integer conversion in GNATprove or
3527         -gnatc mode.
3529 2014-08-04  Gary Dismukes  <dismukes@adacore.com>
3531         * sem_ch13.adb (Analyze_Aspect_Specifications): Resolve
3532         the expression of an Import or Export aspect as type Boolean
3533         and require it to be static. Add ??? comment. Also, set the
3534         Is_Exported flag when appropriate.
3536 2014-08-04  Robert Dewar  <dewar@adacore.com>
3538         * exp_ch4.adb: Minor reformatting.
3539         * exp_attr.adb: Minor reformatting.
3541 2014-08-04  Thomas Quinot  <quinot@adacore.com>
3543         * s-fatgen.ads, s-fatgen.adb (S, P): New visible type declarations
3544         (Unaligned_Valid): Remove now unused subprogram.
3545         * exp_attr.adb (Expand_N_Attribute_Reference, case
3546         Attribute_Valid): If the prefix is in reverse SSO or potentially
3547         unaligned, copy it using a byte copy operation to a temporary
3548         variable.
3549         * einfo.adb: Minor comment fix.
3551 2014-08-04  Hristian Kirtchev  <kirtchev@adacore.com>
3553         * freeze.adb (Freeze_Entity): Do not freeze formal subprograms.
3555 2014-08-04  Robert Dewar  <dewar@adacore.com>
3557         * s-imgrea.adb (Image_Floating_Point): Don't add space before +Inf.
3558         * s-fatgen.adb (Pred): Handle Float'First.
3559         (Succ): Handle Float'Last.
3561 2014-08-04  Ed Schonberg  <schonberg@adacore.com>
3563         * sem_util.adb (Is_Potentially_Unevaluated): If the original
3564         node of a parent node in the tree is a short-circuit operation,
3565         the node is potentially unevaluated.
3567 2014-08-04  Robert Dewar  <dewar@adacore.com>
3569         * sem_res.adb (Resolve_Type_Conversion): Set Do_Range_Check on
3570         conversion from a real type to an integer type.
3572 2014-08-04  Yannick Moy  <moy@adacore.com>
3574         * sem_aggr.adb, sem_ch3.adb, sem_ch5.adb, sem_ch7.adb, sem_ch9.adb,
3575         sem_ch12.adb, sem_util.adb, sem_util.ads, sem_res.adb, sem_attr.adb,
3576         exp_ch6.adb, sem_ch4.adb, restrict.adb, restrict.ads, sem_ch6.adb,
3577         sem_ch8.adb, sem_ch11.adb: Update some subprogram names to refer to
3578         SPARK_05 instead of SPARK.
3580 2014-08-04  Robert Dewar  <dewar@adacore.com>
3582         * sem.ads: Minor reformatting.
3583         * sem_ch13.adb (Analyze_Aspect_External_Or_Link_Name): Minor
3584         reformatting.
3585         (Analyze_Aspect_Specifications, case Convention): Put External_Name
3586         before Link_Name when constructing pragma.
3588 2014-08-04  Yannick Moy  <moy@adacore.com>
3590         * sem.adb, sem.ads (In_Default_Expr): Global flag that is set
3591         to True during analysis of a default component expression.
3592         (Semantics): Save and restore In_Default_Expr around analysis.
3593         * sem_ch3.adb, sem_ch3.ads (Analyze_Component_Declaration):
3594         Call new wrapper Preanalyze_Default_Expression.
3595         (Preanalyze_Default_Expression): New wrapper on
3596         Preanalyze_Spec_Expression which sets and restores In_Default_Expr.
3597         * sem_res.adb (Resolve_Call): Mark calls inside default
3598         expressions as not inlined in GNATprove mode.
3600 2014-08-04  Robert Dewar  <dewar@adacore.com>
3602         * exp_ch4.adb: Minor reformatting.
3604 2014-08-04  Olivier Hainque  <hainque@adacore.com>
3606         * link.c: remove const on __gnat_objlist_file_supported for AIX
3608 2014-08-04  Robert Dewar  <dewar@adacore.com>
3610         * sem_util.ads: Minor addition of comment.
3612 2014-08-04  Vincent Celier  <celier@adacore.com>
3614         * prj-dect.adb (Check_Package_Allowed): Allow package IDE in
3615         all projects, including aggregate and aggregate library projects.
3617 2014-08-04  Yannick Moy  <moy@adacore.com>
3619         * back_end.adb (Call_Back_End): Do not call gigi in GNATprove mode.
3621 2014-08-04  Robert Dewar  <dewar@adacore.com>
3623         * sem_eval.adb (Test_In_Range): Always in range for
3624         Is_Known_Valid target type, where input type has smaller or
3625         equal size and does not have biased rep.
3627 2014-08-04  Ed Schonberg  <schonberg@adacore.com>
3629         * sem_attr.adb (Eval_Attribute): Constrained is not treated as
3630         a static attribute, and the Static flag must not be set on it
3631         during resolution. It may be constant-folded during expansion,
3632         but if expansion is disabled it is not a static expression.
3634 2014-08-04  Hristian Kirtchev  <kirtchev@adacore.com>
3636         * sem_ch8.adb (Build_Class_Wide_Wrapper): Mark the primitive as
3637         referenced once resolution has taken place.
3639 2014-08-04  Gary Dismukes  <dismukes@adacore.com>
3641         * exp_ch4.adb (Expand_N_Type_Conversion): Don't
3642         compare access levels in the case where the target type is the
3643         anonymous type of an access discriminant, since the level of
3644         such types is defined based on context. Add comment.
3646 2014-08-04  Hristian Kirtchev  <kirtchev@adacore.com>
3648         * sem_ch8.adb (Build_Class_Wide_Wrapper): Handle various special
3649         cases related to equality.  Remove the special processing
3650         for dispatching abstract subprograms as it is not needed.
3651         (Interpretation_Error): Add a specialized error message for
3652         predefined operators.
3653         (Is_Intrinsic_Equality): New routine.
3654         (Is_Suitable_Candidate): New routine.
3656 2014-08-04  Gary Dismukes  <dismukes@adacore.com>
3658         * checks.adb: Minor comment reformatting.
3660 2014-08-04  Ed Schonberg  <schonberg@adacore.com>
3662         * restrict.adb (Check_Restriction): For checked max_parameter
3663         restrictions reset Violated flag, so that subsequent violations
3664         are properly detected.
3666 2014-08-04  Robert Dewar  <dewar@adacore.com>
3668         * sem_ch3.adb (Check_Initialization): Fix bad test of GNATprove
3669         mode.
3670         (Process_Discriminants): Fix bad test of GNATprove mode
3672 2014-08-04  Hristian Kirtchev  <kirtchev@adacore.com>
3674         * sem_ch12.adb (Instantiate_Formal_Subprogram):
3675         Move variable to their own section. Propagate the source
3676         location of a formal parameter to the corresponding formal of
3677         the subprogram renaming declaration. Code reformatting.
3679 2014-08-04  Arnaud Charlet  <charlet@adacore.com>
3681         * g-trasym-vms-ia64.adb, g-trasym-vms-alpha.adb: Removed.
3683 2014-08-04  Ed Schonberg  <schonberg@adacore.com>
3685         * exp_aggr.adb (Expand_Array_Aggregate): Do not attempt expansion
3686         if error already detected.  We may reach this point in spite of
3687         previous errors when compiling with -gnatq, to force all possible
3688         errors (this is the usual ACATS mode).
3690 2014-08-04  Gary Dismukes  <dismukes@adacore.com>
3692         * checks.adb (Generate_Range_Check): For the case of converting
3693         a base type with a larger range to a smaller target subtype, only
3694         use unchecked conversions of bounds in the range check followed
3695         by conversion in the case where both types are discrete. In other
3696         cases, convert to the target base type and save in a temporary
3697         followed by the range check.
3698         (Convert_And_Check_Range): New procedure factoring code to save
3699         conversion to a temporary followed by a range check (called two
3700         places in Generate_Range_Check).
3701         * exp_ch4.adb (Expand_N_Type_Conversion): Relax previous
3702         check-in, to generate range checks for conversions between
3703         any floating-point types rather than limiting it to matching
3704         base types.
3706 2014-08-02  Trevor Saunders  <tsaunders@mozilla.com>
3708         * gcc-interface/trans.c: Use hash_set instead of pointer_set.
3710 2014-08-01  Ed Schonberg  <schonberg@adacore.com>
3712         * restrict.adb (Update_Restrictions): For restrictions with a
3713         maximum parameter (e.g. number of protected entries in Ravenscar)
3714         do not compute the maximum of the violation over several objects,
3715         because the restriction is per-object.
3716         (Check_Restriction): After possible message, reset the value
3717         of of a checked max_parameter restriction to zero, to prevent
3718         cascaded errors.
3719         * sem_ch3.adb (Build_Derived_Private_Type): Use base of parent
3720         (sub)type to determine whether derived type should be on the
3721         list of private dependents of a type whose full view may become
3722         visible subsequently.
3724 2014-08-01  Olivier Hainque  <hainque@adacore.com>
3726         * gcc-interface/Make-lang.in (ADA_TOOLS_FLAGS_TO_PASS, native): use
3727         $(CXX) instead of ../../xg++ to feed CXX.
3728         (CXX_LFLAGS): Remove. Now unused as the proper flags
3729         are expected to be included in the CXX variable.
3731 2014-08-01  Pierre-Marie Derodat  <derodat@adacore.com>
3733         * gcc-interface/decl.c (elaborate_expression_1): Return the new
3734         variable when debug info is needed and the expression is not
3735         constant.  Tag as external only new variables that are global.
3736         (gnat_to_gnu_entity): Call it after the GNU declaration is saved.
3737         * gcc-interface/trans.c (Attribute_to_gnu): Do not cache
3738         attributes for IN array parameters when their actual subtype
3739         needs debug info.
3740         (Compilation_Unit_to_gnu): Call it to process all remaining nodes.
3741         * gcc-interface/gigi.h (process_deferred_decl_context): New.
3742         * gcc-interface/utils.c (gnat_write_global_declarations): Do not
3743         emit debug info for ignored global declarations.
3744         (struct deferred_decl_context_node,
3745         add_deferred_decl_context, add_deferred_type_context,
3746         compute_deferred_decl_context, defer_or_set_type_context,
3747         deferred_decl_context_queue, get_debug_scope,
3748         get_global_context, process_deferred_decl_context): New.
3749         (gnat_pushdecl): Re-implement the DECL_CONTEXT and TYPE_CONTEXT
3750         computation machinery to rely on the GNAT Scope attribute.
3752 2014-08-01  Eric Botcazou  <ebotcazou@adacore.com>
3754         * gcc-interface/utils2.c (build_simple_component_ref): Add guard.
3756 2014-08-01  Robert Dewar  <dewar@adacore.com>
3758         * sem_ch8.adb, opt.ads Minor comment updates.
3760 2014-08-01  Hristian Kirtchev  <kirtchev@adacore.com>
3762         * exp_intr.adb (Expand_Unc_Deallocation): Request a renaming
3763         from the side effects removal machinery.
3764         * exp_util.adb (Duplicate_Subexpr): Add formal parameter
3765         Renaming_Req. Update the nested call to Remove_Side_Effects.
3766         (Duplicate_Subexpr_No_Checks): Add formal parameter
3767         Renaming_Req. Update the nested call to Remove_Side_Effects.
3768         (Duplicate_Subexpr_Move_Checks): Add formal parameter
3769         Renaming_Req. Update the nested call to Remove_Side_Effects.
3770         (Remove_Side_Effects): Add formal parameter Renaming_Req. Generate
3771         an object renaming declaration when the caller requests it.
3772         * exp_util.ads (Duplicate_Subexpr): Add formal
3773         parameter Renaming_Req. Update comment on usage.
3774         (Duplicate_Subexpr_No_Checks): Add formal parameter Renaming_Req.
3775         (Duplicate_Subexpr_Move_Checks): Add formal parameter
3776         Renaming_Req.
3778 2014-08-01  Bob Duff  <duff@adacore.com>
3780         * gnat_ugn.texi: Minor updates.
3782 2014-08-01  Robert Dewar  <dewar@adacore.com>
3784         * atree.adb: Minor reformatting.
3786 2014-08-01  Ed Schonberg  <schonberg@adacore.com>
3788         * exp_aggr.adb (Init_Hidden_Discriminants): If some ancestor is a
3789         private extension, get stored constraint, if any, from full view.
3791 2014-08-01  Robert Dewar  <dewar@adacore.com>
3793         * opt.ads (No_Elab_Code_All_Pragma): New global variable.
3794         * sem_ch10.adb (Check_No_Elab_Code_All): New procedure
3795         (Analyze_Compilation_Unit): Call Check_No_Elab_Code_All
3796         (Analyze_Subunit_Context): Call Check_No_Elab_Code_All.
3797         * sem_prag.adb (Analyze_Pragma, case No_Elaboration_Code_All):
3798         Remove code for checking with's, now in sem_ch10.adb, set
3799         Opt.No_Elab_Code_All_Pragma.
3801 2014-08-01  Eric Botcazou  <ebotcazou@adacore.com>
3803         * sem_ch3.adb (Copy_And_Build): Copy the declaration for
3804         access types as well and adjust the subtype mark if there are
3805         no constraints.
3807 2014-08-01  Robert Dewar  <dewar@adacore.com>
3809         * sem_eval.adb (Test_In_Range): Return Unknown if error posted.
3811 2014-08-01  Robert Dewar  <dewar@adacore.com>
3813         * sem_ch3.adb, einfo.ads, exp_ch4.adb: Code clean ups.
3815 2014-08-01  Eric Botcazou  <ebotcazou@adacore.com>
3817         * einfo.ads (Has_Private_Ancestor): Remove obsolete usage.
3818         * exp_ch4.adb (Expand_Composite_Equality): Add conversion
3819         of the actuals in the case of untagged record types too.
3820         * sem_ch3.adb (Build_Full_Derivation): New procedure to create the
3821         full derivation of a derived private type, extracted from...
3822         (Copy_And_Build): In the case of record types and most
3823         enumeration types, copy the original declaration.  Build the
3824         full derivation according to the approach extracted from...
3825         (Build_Derived_Private_Type): ...here.  Call Build_Full_Derivation
3826         to create the full derivation in all existing cases and also
3827         create it in the no-discriminants/discriminants case instead of
3828         deriving directly from the full view.
3829         (Is_Visible_Component): Remove obsolete code.
3830         * sem_aggr.adb (Resolve_Record_Aggregate): Likewise.
3832 2014-08-01  Arnaud Charlet  <charlet@adacore.com>
3834         * fe.h (GNAT_Mode): New.
3835         * gcc-interface/decl.c (gnat_to_gnu_entity): Do not error out on
3836         reverse SSO in GNAT mode.
3838 2014-08-01  Thomas Quinot  <quinot@adacore.com>
3840         * freeze.adb: Minor reformatting.
3842 2014-08-01  Thomas Quinot  <quinot@adacore.com>
3844         * exp_ch3.adb (Default_Initialize_Object): Do not generate
3845         default initialization for an imported object.
3847 2014-08-01  Olivier Hainque  <hainque@adacore.com>
3849         * seh_init.c (__gnat_map_SEH): Cast argument of IsBadCodePtr
3850         to the expected FARPROC type instead of void *.
3851         * adaint.c (f2t): Expect __time64_t * as second argument, in line with
3852         other datastructures.
3853         (__gnat_file_time_name_attr): Adjust accordingly.
3854         (__gnat_check_OWNER_ACL): Declare pSD as PSECURITY_DESCRIPTOR,
3855         in line with uses.
3856         (__gnat_check_OWNER_ACL): Declare AccessMode
3857         parameter as ACCESS_MODE instead of DWORD, in line with callers
3858         and uses.
3859         (__gnat_set_executable): Add ATTRIBUTE_UNUSED on mode,
3860         unused on win32.  Correct cast of "args" on call to spawnvp.
3861         (add_handle): Cast realloc calls into their destination types.
3862         (win32_wait): Remove declaration and initialization of unused variable.
3863         (__gnat_locate_exec_on_path): Cast alloca calls
3864         into their destination types.
3865         * initialize.c (append_arg, __gnat_initialize): Cast xmalloc calls into
3866         their destination types.
3868 2014-08-01  Gary Dismukes  <dismukes@adacore.com>
3870         * exp_ch4.adb (Expand_N_Type_Conversion): Expand
3871         range checks for conversions between floating-point subtypes
3872         when the target and source types are the same.
3874 2014-08-01  Robert Dewar  <dewar@adacore.com>
3876         * exp_aggr.adb: Minor reformatting.
3878 2014-08-01  Eric Botcazou  <ebotcazou@adacore.com>
3880         * sem_ch13.adb (Check_Indexing_Functions): Initialize
3881         Indexing_Found.
3883 2014-08-01  Arnaud Charlet  <charlet@adacore.com>
3885         * gnat1drv.adb (Gnat1drv): In gnatprove mode, we now write the
3886         ALI file before we call the backend (so that gnat2why can append
3887         to it).
3889 2014-08-01  Thomas Quinot  <quinot@adacore.com>
3891         * exp_pakd.adb (Expand_Bit_Packed_Element_Set,
3892         Expand_Packed_Element_Reference): Pass additional Rev_SSO
3893         parameter indicating whether the packed array type has reverse
3894         scalar storage order to the s-pack* Set/Get routines.
3895         * s-pack*.ad* (Get, Set, GetU, SetU): New formal Rev_SSO
3896         indicating reverse scalar storage order.
3898 2014-08-01  Robert Dewar  <dewar@adacore.com>
3900         * sem_ch3.adb (Check_Initialization): Set Do_Range_Check
3901         for initial component value in -gnatc or GNATprove mode.
3902         (Process_Discriminants): Same fix for default discriminant values.
3903         * sem_eval.adb (Test_In_Range): Improve accuracy of results by
3904         checking subtypes.
3906 2014-08-01  Robert Dewar  <dewar@adacore.com>
3908         * sinfo.ads: Minor comment clarification.
3910 2014-08-01  Hristian Kirtchev  <kirtchev@adacore.com>
3912         * sem_ch13.adb (Analyze_Aspect_Specifications): Code
3913         reformatting. Store the generated pragma Import in the related
3914         subprogram as routine Wrap_Imported_Subprogram will need it later.
3915         * sem_prag.adb (Is_Unconstrained_Or_Tagged_Item): An item of
3916         a private type with discriminants is considered to fall in the
3917         category of unconstrained or tagged items.
3919 2014-08-01  Arnaud charlet  <charlet@adacore.com>
3921         * s-os_lib.adb (Open_Append): New functions to open a file for
3922         appending. This binds to the already existing (but not used)
3923         __gnat_open_append.
3924         * osint.ads, osint.adb (Open_File_To_Append_And_Check): New procedure
3925         to open a file for appending.
3926         * osint-c.ads, osint-c.adb (Open_Output_Library_Info): New procedure
3927         to open the ALI file for appending.
3929 2014-08-01  Robert Dewar  <dewar@adacore.com>
3931         * sem_ch8.adb: Minor reformatting.
3933 2014-08-01  Yannick Moy  <moy@adacore.com>
3935         * sem_ch13.adb (Insert_Pragma): Add special case for precondition
3936         pragmas from aspects, which need to be inserted in proper order.
3938 2014-08-01  Ed Schonberg  <schonberg@adacore.com>
3940         * exp_aggr.adb (Expand_Record_Aggregate, Init_Hidden_Discriminants):
3941         Handle properly a type extension that constrains a discriminated
3942         derived type that renames other discriminants of an ancestor.
3944 2014-08-01  Thomas Quinot  <quinot@adacore.com>
3946         * s-pack06.adb, s-pack10.adb, s-pack03.ads, s-pack12.adb, s-pack14.ads,
3947         s-pack25.adb: Fix minor inconsistencies and typos.
3949 2014-08-01  Hristian Kirtchev  <kirtchev@adacore.com>
3951         * sem_ch8.adb (Analyze_Subprogram_Renaming): Alphabetize
3952         globals and move certain variables to the "local
3953         variable" section. Call Build_Class_Wide_Wrapper when
3954         renaming a default actual subprogram with a class-wide actual.
3955         (Build_Class_Wide_Wrapper): New routine.
3956         (Check_Class_Wide_Actual): Removed.
3957         (Find_Renamed_Entity): Code reformatting.
3958         (Has_Class_Wide_Actual): Alphabetize. Change the
3959         logic of the predicate as the renamed name may not necessarely
3960         denote the correct subprogram.
3962 2014-08-01  Eric Botcazou  <ebotcazou@adacore.com>
3964         * sem_ch7.adb: Fix minor oversight in condition.
3966 2014-08-01  Bob Duff  <duff@adacore.com>
3968         * projects.texi: Minor documentation improvements.
3970 2014-08-01  Robert Dewar  <dewar@adacore.com>
3972         * aspects.ads, aspects.adb: Add aspect No_Elaboration_Code_All.
3973         * gnat_rm.texi: Document No_Elaboration_Code_All pragma and aspect.
3974         * lib-load.adb: Initialize No_Elab_Code_All field.
3975         * lib-writ.adb: Initialize No_Elab_Code_All.
3976         * lib.ads, lib.adb: New field No_Elab_Code_All.
3977         * par-prag.adb: Add dummy entry for pragma No_Elaboration_Code_All.
3978         * restrict.ads, restrict.adb: Restriction No_Elaboration_Code_All no
3979         longer exists.
3980         * sem_ch10.adb (Analyze_Context): Processing for
3981         No_Elaboration_Code_All removed.
3982         (Generate_Parent_References): Moved to Sem_Util.
3983         * sem_prag.adb: Add processing for pragma No_Elaboration_Code_All.
3984         * sem_util.ads, sem_util.adb (Get_Parent_Entity): Moved here from
3985         Sem_Ch10.
3986         * snames.ads-tmpl: Add entry for pragma No_Elaboration_Code_All.
3987         * targparm.adb: Minor comment updates Add comments on ignoring
3988         pragma No_Elaboration_Code_All.
3990 2014-08-01  Nicolas Roche  <roche@adacore.com>
3992         * adaint.c (__gnat_set_close_on_exec): Ensure that
3993         we can unset "close_on_exec" flag.
3995 2014-08-01  Ed Schonberg  <schonberg@adacore.com>
3997         * exp_ch9.adb (Build_Wrapper_Spec, Replicate_Formals): When building
3998         the parameter specs of the wrapper program for a primitive operation
3999         of a synchronized type that implements an interface, copy the
4000         null_exclusion indicator as well.
4002 2014-08-01  Robert Dewar  <dewar@adacore.com>
4004         * sem_eval.ads: Minor reformatting.
4006 2014-08-01  Eric Botcazou  <ebotcazou@adacore.com>
4008         * exp_ch3.adb (Build_Initialization_Call): Call Underlying_Type
4009         to go down the chain of private derivations.
4010         * freeze.adb (Freeze_Entity): Fix typo in comment.
4012 2014-08-01  Ed Schonberg  <schonberg@adacore.com>
4014         * sem_ch3.adb (Access_Type_Declaration): If designated type is
4015         a limited view, create a master entity (as is already done for
4016         class-wide types) in case the full view designates a type that
4017         contains tasks.
4018         * sem_ch8.adb (Find_Selected_Component): If prefix is a dereference
4019         and the designated type is a limited view, use the non-limited
4020         view if available.
4022 2014-08-01  Eric Botcazou  <ebotcazou@adacore.com>
4024         * gcc-interface/ada-tree.h (DECL_BY_DESCRIPTOR_P): Delete.
4025         (DECL_FUNCTION_STUB): Likewise.
4026         (SET_DECL_FUNCTION_STUB): Likewise.
4027         (DECL_PARM_ALT_TYPE): Likewise.
4028         (SET_DECL_PARM_ALT_TYPE): Likewise.
4029         (TYPE_VAX_FLOATING_POINT_P): Delete.
4030         (TYPE_DIGITS_VALUE): Likewise.
4031         (SET_TYPE_DIGITS_VALUE): Likewise.
4032         * gcc-interface/gigi.h (standard_datatypes): Remove ADT_malloc32_decl.
4033         (malloc32_decl): Delete.
4034         (build_vms_descriptor): Likewise.
4035         (build_vms_descriptor32): Likewise.
4036         (fill_vms_descriptor): Likewise.
4037         (convert_vms_descriptor): Likewise.
4038         (TARGET_ABI_OPEN_VMS): Likewise.
4039         (TARGET_MALLOC64): Likewise.
4040         * gcc-interface/decl.c (add_parallel_type_for_packed_array): New.
4041         (gnat_to_gnu_entity): Call it to add the original type as a parallel
4042         type to the implementation type of a packed array type.
4043         <E_Procedure>: Remove now obsolete kludge.
4044         <E_Exception>: Delete obsolete comment.
4045         <object>: Small tweak.
4046         <E_Subprogram_Type>: Remove support for stub subprograms, as well as
4047         for the descriptor passing mechanism.
4048         (gnat_to_gnu_param): Likewise.
4049         * gcc-interface/misc.c (gnat_init_gcc_fp): Remove special case.
4050         (gnat_print_type): Adjust.
4051         * gcc-interface/trans.c (gigi): Remove obsolete initializations.
4052         (vms_builtin_establish_handler_decl): Delete.
4053         (gnat_vms_condition_handler_decl): Likewise.
4054         (establish_gnat_vms_condition_handler): Likewise.
4055         (build_function_stub): Likewise.
4056         (Subprogram_Body_to_gnu): Do not call above functions.
4057         (Call_to_gnu): Remove support for the descriptor passing mechanism.
4058         * gcc-interface/utils.c (make_descriptor_field): Delete.
4059         (build_vms_descriptor32): Likewise.
4060         (build_vms_descriptor): Likewise.
4061         (fill_vms_descriptor): Likewise.
4062         (convert_vms_descriptor64): Likewise.
4063         (convert_vms_descriptor32): Likewise.
4064         (convert_vms_descriptor): Likewise.
4065         * gcc-interface/utils.c (unchecked_convert): Likewise.
4066         * gcc-interface/utils2.c (maybe_wrap_malloc): Remove obsolete stuff.
4068 2014-08-01  Eric Botcazou  <ebotcazou@adacore.com>
4070         * gcc-interface/trans.c (gigi): Use gnat_to_gnu_type for the exception
4071         type and get_unpadded_type for the longest FP type.
4072         (Attribute_to_gnu) <Machine>: Compare the precision of the types.
4073         (convert_with_check): Adjust formatting and remove FIXME.
4075 2014-08-01  Eric Botcazou  <ebotcazou@adacore.com>
4077         * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Signed_Integer_Subtype>:
4078         Do not convert the RM bounds to the base type.
4079         (E_Floating_Point_Subtype): Likewise.
4080         (E_Array_Subtype): Convert the bounds to the base type.
4081         * gcc-interface/trans.c (get_type_length): New function.
4082         (Attribute_to_gnu) <Range_Length>: Call it.
4083         <Length>: Likewise.
4084         (Loop_Statement_to_gnu): Convert the bounds to the base type.
4085         (gnat_to_gnu) <N_In>: Likewise.
4086         * gcc-interface/utils.c (make_type_from_size): Do not convert the RM
4087         bounds to the base type.
4088         (create_range_type): Likewise.
4089         (convert): Convert the bounds to the base type for biased types.
4090         * gcc-interface/utils2.c (compare_arrays): Convert the bounds to the
4091         base type.
4093 2014-08-01  Eric Botcazou  <ebotcazou@adacore.com>
4095         * gcc-interface/trans.c (gnat_to_gnu) <N_Selected_Component>: Remove
4096         incorrect implicit type derivation.
4097         * gcc-interface/utils.c (max_size) <tcc_reference>: Convert the bounds
4098         to the base type.
4100 2014-08-01  Hristian Kirtchev  <kirtchev@adacore.com>
4102         * sem_attr.adb (Analyze_Attribute): Preanalyze and resolve the
4103         prefix of attribute Loop_Entry.
4104         * sem_prag.adb (Analyze_Pragma): Verify the placement of pragma
4105         Loop_Variant with respect to an enclosing loop (if any).
4106         (Contains_Loop_Entry): Update the parameter profile and all
4107         calls to this routine.
4108         * sem_res.adb (Resolve_Call): Code reformatting. Do not ask
4109         for the corresponding body before determining the nature of the
4110         ultimate alias's declarative node.
4112 2014-08-01  Robert Dewar  <dewar@adacore.com>
4114         * gnat1drv.adb, sem_ch4.adb: Minor reformatting.
4116 2014-08-01  Robert Dewar  <dewar@adacore.com>
4118         * sem_eval.adb (Rewrite_In_Raise_CE): Don't try to reuse inner
4119         constraint error node since it is a list member.
4121 2014-08-01  Robert Dewar  <dewar@adacore.com>
4123         * sem_warn.adb: Minor reformatting.
4125 2014-08-01  Eric Botcazou  <ebotcazou@adacore.com>
4127         * einfo.adb (Underlying_Type): Return the underlying full view
4128         of a private type if present.
4129         * freeze.adb (Freeze_Entity):
4130         Build a single freeze node for partial, full and underlying full
4131         views, if any.
4132         * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Private_Type>: Add a
4133         missing guard before the access to the Underlying_Full_View.
4134         * gcc-interface/trans.c (process_freeze_entity): Deal with underlying
4135         full view if present.
4136         * gcc-interface/utils.c (make_dummy_type): Avoid superfluous work.
4138 2014-08-01  Ed Schonberg  <schonberg@adacore.com>
4140         * sem_res.adb (Resolve_Entry_Call): When an entry has
4141         preconditions, the entry call is wrapped in a procedure call
4142         that incorporates the precondition checks. To prevent a double
4143         expansion, with possible duplication of extra formals, that
4144         procedure call must only be pre-analyzed and resolved. Expansion
4145         takes place upon return to the caller Resolve_Call.
4147 2014-08-01  Hristian Kirtchev  <kirtchev@adacore.com>
4149         * sem_res.adb (Resolve_Call): Do not perform
4150         GNATprove-specific inlining while within a generic.
4152 2014-08-01  Ed Schonberg  <schonberg@adacore.com>
4154         * sem_ch4.adb (Analyze_Case_Expression): Handle properly a
4155         case expression with incompatible alternatives, when the first
4156         alternative is overloaded.
4158 2014-08-01  Ed Schonberg  <schonberg@adacore.com>
4160         * sem_res.adb (Check_Parameterless_Call): Use Relocate_Node
4161         to create the name of the parameterless call, rather than
4162         New_Copy, to preserve the tree structure when the name is a
4163         complex expression, e.g. a selected component that denotes a
4164         protected operation, whose prefix is itself a selected component.
4166 2014-08-01  Ed Schonberg  <schonberg@adacore.com>
4168         * sem_ch6.adb (Analyze_Subprogram_Body_Helper): Use
4169         Unit_Declaration_Node to retrieve body when inlining, to handle
4170         properly subprogram child units.
4172 2014-08-01  Robert Dewar  <dewar@adacore.com>
4174         * sem_attr.adb: Minor reformatting.
4176 2014-08-01  Vincent Celier  <celier@adacore.com>
4178         * debug.adb: Minor documentation addition for -dn switch.
4180 2014-08-01  Robert Dewar  <dewar@adacore.com>
4182         * sem_aggr.adb, exp_ch9.adb, sem_prag.adb, sem_util.adb,
4183         sem_attr.adb, sem_eval.ads, sem_cat.adb, sem_ch13.adb: Improve
4184         documentation of Is_Static_Expression vs Is_OK_Static_Expression.
4185         In several places, use the Is_OK version as suggested by the spec.
4187 2014-08-01  Vincent Celier  <celier@adacore.com>
4189         * gnatcmd.adb: Revert last change which was not correct.
4191 2014-08-01  Hristian Kirtchev  <kirtchev@adacore.com>
4193         * freeze.adb (Find_Constant): Ensure that the constant being
4194         inspected is still an object declaration (i.e. not a renaming).
4196 2014-08-01  Ed Schonberg  <schonberg@adacore.com>
4198         * sem_ch5.adb (Analyze_Loop_Parameter_Specification): a)
4199         An attribute_reference to Loop_Entry denotes an iterator
4200         specification: its prefix is an object, as is the case for 'Old.
4201         b) If the domain of iteration is an expression whose type has
4202         the Iterable aspect defined, this is an iterator specification.
4204 2014-08-01  Robert Dewar  <dewar@adacore.com>
4206         * gnatcmd.adb: Minor reformatting.
4208 2014-08-01  Robert Dewar  <dewar@adacore.com>
4210         * atree.ads (Info_Messages): New counter.
4211         * err_vars.ads: Minor comment update.
4212         * errout.adb (Delete_Warning_And_Continuations): Deal
4213         with new Info_Messages counter.
4214         (Error_Msg_Internal): ditto.
4215         (Delete_Warning): ditto.
4216         (Initialize): ditto.
4217         (Write_Error_Summary): ditto.
4218         (Output_Messages): ditto.
4219         (To_Be_Removed): ditto.
4220         * erroutc.adb (Delete_Msg): Deal with Info_Messages counter.
4221         (Compilation_Errors): ditto.
4222         * errutil.adb (Error_Msg): Deal with Info_Messages counter.
4223         (Finalize): ditto.
4224         (Initialize): ditto.
4225         * sem_prag.adb (Analyze_Pragma): Minor comment addition.
4226         * gnat_ugn.texi: Document that -gnatwe does not affect info
4227         messages.
4229 2014-08-01  Robert Dewar  <dewar@adacore.com>
4231         * debug.adb: Document debug switch -gnatd.Z.
4232         * sem.adb (Semantics): Force expansion on in no or configurable
4233         run time mode.
4235 2014-08-01  Ed Schonberg  <schonberg@adacore.com>
4237         * sem_ch5.adb (Analyze_Loop_Parameter_Specification): An
4238         unchecked conversion denotes an iterator specification. Such a
4239         conversion will be inserted in the context of an inlined call
4240         when needed, and its argument is always an object.
4242 2014-08-01  Robert Dewar  <dewar@adacore.com>
4244         * make.adb, makeutl.ads: Minor reformatting.
4245         * debug.adb, opt.ads: Clarify documentation of Front_End_Inlining and
4246         Back_End_Inlining.
4248 2014-08-01  Tristan Gingold  <gingold@adacore.com>
4250         * gnatcmd.adb (GNATCmd): Set AAMP_On_Target using command name.
4252 2014-08-01  Javier Miranda  <miranda@adacore.com>
4254         * gnat1drv.adb (Adjust_Global_Switches): Reverse meaning of
4255         -gnatd.z.
4256         * debug.adb: Updating documentation.
4257         * exp_ch6.adb (Expand_Call): Remove assertion.
4259 2014-08-01  Robert Dewar  <dewar@adacore.com>
4261         * sem_aggr.adb, sem_ch3.adb, sem_ch5.adb, sem_util.adb,
4262         sem_res.adb: Minor reformatting.
4264 2014-08-01  Vincent Celier  <celier@adacore.com>
4266         * make.adb (Initialize): Set Keep_Temporary_Files to True when
4267         -dn is specified.
4268         * makeusg.adb: Add line for new switch --keep-temp-files.
4269         * makeutl.ads (Keep_Temp_Files_Option): New constant String.
4270         * opt.ads (Keep_Temporary_Files): Document that it is also used
4271         by gnatmake and gprbuild.
4272         * switch-m.adb: Recognize new switch --keep-temp-files.
4274 2014-08-01  Tristan Gingold  <gingold@adacore.com>
4276         * sem_ch9.adb (Analyze_Task_Type_Declaration): Move code from ...
4277         * exp_ch9.adb (Make_Task_Create_Call): ... here.
4279 2014-08-01  Vincent Celier  <celier@adacore.com>
4281         * gnat1drv.adb: Do not try to get the target parameters when
4282         invoked with -gnats.
4284 2014-08-01  Hristian Kirtchev  <kirtchev@adacore.com>
4286         * exp_ch7.adb (Find_Last_Init): Nothing to do for an object
4287         declaration subject to No_Initialization.
4289 2014-08-01  Ed Schonberg  <schonberg@adacore.com>
4291         * sem_aggr.adb (Resolve_Array_Aggregate): Reject choice that
4292         is a subtype with dynamic predicates, or a non-static subtype
4293         with predicates.
4294         * sem_ch3.adb (Analyze_Number_Declaration): Reject qualified
4295         expression if subtype has a dynamic predicate.
4296         (Constrain_Index): Reject subtype indication if subtype mark
4297         has predicates.
4298         (Inerit_Predicate_Flags): Inherit Has_Predicates as well.
4299         (Make_Index): If index is a subtype indication, itype inhereits
4300         predicate flags for subsequent testing.
4301         * sem_ch5.adb (Analyze_Loop_Parameter_Specification): New
4302         procedure Check_Predicate_Use, to reject illegal uses of domains
4303         of iteration that have dynamic predicates.
4304         * sem_res.adb (Resolve_Slice): Reject slices given by a subtype
4305         indication to which a predicate applies.
4306         * sem_util.adb (Bad_Predicated_Subtype_Use): Add guard to
4307         prevent cascaded errors when subtype is invalid.
4309 2014-08-01  Robert Dewar  <dewar@adacore.com>
4311         * sem_ch10.adb: Minor reformatting.
4313 2014-08-01  Ed Schonberg  <schonberg@adacore.com>
4315         * sem_ch6.adb (Same_Generic_Actual): Make function symmetric,
4316         because either type may be a subtype of the other.
4318 2014-08-01  Vincent Celier  <celier@adacore.com>
4320         * makeusg.adb: Add documentation for debug switch -dn.
4322 2014-08-01  Ed Schonberg  <schonberg@adacore.com>
4324         * sem_dim.adb (Process_Minus, Process_Divide): Label dimension
4325         expression with standard operator and type, for pretty-printing
4326         use, when in ASIS_Mode. When generating code dimensional analysis
4327         is not involved and dimension expressions are handled statically,
4328         and other operators are resolved in the usual way.
4330 2014-08-01  Ed Schonberg  <schonberg@adacore.com>
4332         * sem_ch3.adb (Build_Derived_Record_Type): Remove setting of
4333         Parent_Subtype in ASIS mode, leads to several failures.
4334         * sem_ch4.adb (Analyze_Selected_Component): In an instance,
4335         if the prefix is a type extension, check whether component is
4336         declared in the parent type, possibly in a parent unit. Needed
4337         in ASIS mode when Parent_Subtype is not set.
4339 2014-08-01  Robert Dewar  <dewar@adacore.com>
4341         * sem_prag.adb: Minor reformatting.
4342         * s-regpat.adb: Minor reformatting.
4343         * sem_ch3.adb (Analyze_Object_Declaration): Do not set
4344         Treat_As_Volatile on constants.
4346 2014-08-01  Tristan Gingold  <gingold@adacore.com>
4348         * exp_ch9.adb (Make_Task_Create_Call): Improve error message.
4350 2014-08-01  Ed Schonberg  <schonberg@adacore.com>
4352         * sem_ch10.adb (Analyze_Compilation_Unit): Do not place a
4353         warning on a with_clause created for the renaming of a parent
4354         unit in an explicit with_clause.
4356 2014-08-01  Ed Schonberg  <schonberg@adacore.com>
4358         * sem_ch13.adb (Analyze_Aspect_Specifications, case Aspect_Import):
4359         Set Is_Imported flag at once, to simplify subsequent legality
4360         checks. Reject the aspect on an object whose declaration has an
4361         explicit initial value.
4362         * sem_prag.adb (Process_Import_Or_Interface): Use original node
4363         to check legality of an initial value for an imported entity.
4364         Set Is_Imported flag in case of error to prevent cascaded errors.
4365         Do not set the Is_Imported flag if the pragma comes from an
4366         aspect, because it is already done when analyzing the aspect.
4368 2014-08-01  Emmanuel Briot  <briot@adacore.com>
4370         * g-regpat.adb (Parse): Add support for non-capturing parenthesis.
4372 2014-08-01  Robert Dewar  <dewar@adacore.com>
4374         * sem_ch7.adb, einfo.adb, einfo.ads, sem_ch13.adb: Minor change of
4375         identifier name.
4377 2014-08-01  Hristian Kirtchev  <kirtchev@adacore.com>
4379         * sem_ch3.adb (Analyze_Object_Contract): Enable the volatility
4380         checks when the related variable comes from source.
4381         * sem_res.adb (Resolve_Actuals): Enable the volatility checks
4382         when the related actual parameter comes from source. Update comment.
4383         * freeze.adb (Freeze_Record_Type): Do not freeze the designated
4384         type of an array of pointers when the designated type is
4385         class-wide and its root type is the record being currently frozen.
4387 2014-08-01  Ed Schonberg  <schonberg@adacore.com>
4389         * sem_ch5.adb (Analyze_Iterator_Specification): Preserve Ekind
4390         of renaming declaration created for domain of iteration.
4391         * sem_aggr.adb (Resolve_Array_Aggregate): Better placement
4392         for error messages on aggregates whose index subtypes have
4393         predicates. The new placement avoids posting messages on previous
4394         subtype declarations rather than on the aggregate itself.
4395         * sem_disp.adb (Is_Inherited_Public_Operation): New predicate for
4396         Add_Dispatching_Operation, to handle properly the overriding of
4397         the predefined operations on controlled types, when the partial
4398         view of a type is not visibly controlled.
4400 2014-08-01  Ben Brosgol  <brosgol@adacore.com>
4402         * gnat_ugn.texi: Add tutorial on portable fixed-point types as an
4403         appendix.
4405 2014-08-01  Hristian Kirtchev  <kirtchev@adacore.com>
4407         * einfo.adb (Is_Hidden_Non_Overridden_Subprogram): Remove the
4408         assertion check as the attribute is defined for all entities.
4409         (Set_Is_Hidden_Non_Overridden_Subprogram): Remove the assertion
4410         check as the attribute is defined for all entities.
4411         * einfo.ads Update the documentation of attribute
4412         Is_Hidden_Non_Overridden_Subprogram.
4413         * sem_ch7.adb (Install_Package_Entity): No need to check the
4414         entity kind of the Id.
4415         * sem_ch13.adb (Hide_Matching_Homograph): Update the comment on
4416         usage. Ensure that the homographs are of the same entity kind
4417         and not fully conformant.
4418         (Hide_Non_Overridden_Subprograms): Update the comment on usage.
4420 2014-08-01  Robert Dewar  <dewar@adacore.com>
4422         * inline.adb: Minor code reorganization.
4423         * sem_ch12.adb, s-tasdeb.ads: Minor reformatting.
4425 2014-08-01  Robert Dewar  <dewar@adacore.com>
4427         * inline.adb, s-os_lib.ads: Minor reformatting.
4429 2014-08-01  Arnaud Charlet  <charlet@adacore.com>
4431         * s-tasdeb.ads, s-tasdeb.adb (Master_Hook, Master_Completed_Hook): New.
4432         * s-tassta.adb (Task_Wrapper, Vulnerable_Complete_Master): Call new
4433         hooks.
4435 2014-08-01  Yannick Moy  <moy@adacore.com>
4437         * inline.adb (Cannot_Inline): Issue info message instead of
4438         warning for subprograms not inlined in GNATprove mode.
4439         * sem_res.adb (Resolve_Call): Take body into account for deciding
4440         whether subprogram can be inlined in GNATprove mode or not.
4442 2014-08-01  Claire Dross  <dross@adacore.com>
4444         * exp_util.ads (Get_First_Parent_With_Ext_Axioms_For_Entity): Renaming
4445         of Get_First_Parent_With_External_Axiomatization_For_Entity for
4446         shorter.
4447         * sem_ch12.adb (Analyze_Associations): Only call Build_Wrapper
4448         for parameters of packages with external axiomatization.
4450 2014-08-01  Robert Dewar  <dewar@adacore.com>
4452         * sem_res.adb: Minor comment addition.
4454 2014-08-01  Arnaud Charlet  <charlet@adacore.com>
4456         * s-crtl.ads, i-cstrea.ads, adaint.c, adaint.h, osint.adb,
4457         s-fileio.adb (__gnat_fopen, __gnat_freopen): Remove vms_form parameter,
4458         no longer used.
4459         * s-os_lib.ads: Minor reformatting.
4461 2014-08-01  Arnaud Charlet  <charlet@adacore.com>
4463         * exp_attr.adb (Is_Inline_Floating_Point_Attribute): Restore more
4464         completely previous code since only GCC back-ends are prepared
4465         to handle e.g. 'Machine attribute.
4466         * targparm.adb, targparm.ads: Remove remaining refs and
4467         handling of OpenVMS_On_Target, VAX_Float_On_Target and
4468         RTX_RTSS_Kernel_Module_On_Target.
4469         * hostparm.ads (OpenVMS, Max_Debug_Name_Length): Removed,
4470         no longer used.
4472 2014-08-01  Robert Dewar  <dewar@adacore.com>
4474         * exp_dist.adb, exp_attr.adb: Minor reformatting.
4475         * sem_ch3.adb, mlib-tgt-specific-hpux.adb, a-direct.ads,
4476         a-synbar-posix.adb, exp_ch9.adb, sem_ch10.adb, sem_prag.adb,
4477         sem_ch12.adb, sem.ads, sem_res.adb, s-exctra.adb, s-soflin.ads,
4478         g-alveop.ads, sem_ch8.adb, vxaddr2line.adb, sem_cat.ads: Remove
4479         improper use of shall.
4481 2014-08-01  Robert Dewar  <dewar@adacore.com>
4483         * sem_aggr.adb, exp_atag.adb, layout.adb, nlists.adb, nlists.ads,
4484         exp_attr.adb, exp_ch9.adb, par-ch12.adb, exp_aggr.adb,
4485         exp_ch3.adb: Minor reformatting & code reorganization.
4487 2014-08-01  Robert Dewar  <dewar@adacore.com>
4489         * gnat_rm.texi: Remove VMS specific rules for pragma Ident.
4490         * Makefile.rtl, adaint.c, gnat_rm.texi, s-asthan.adb, s-asthan.ads,
4491         s-filofl.ads, s-fishfl.ads, s-fvadfl.ads, s-fvaffl.ads, s-fvagfl.ads,
4492         s-po32gl.adb, s-po32gl.ads, s-vaflop.adb, s-vaflop.ads, s-vmexta.adb,
4493         s-vmexta.ads, sem_vfpt.adb, sem_vfpt.ads, socket.c: Remove VMS specific
4494         code.
4495         * gcc-interface/decl.c, gcc-interface/Makefile.in,
4496         gcc-interface/Make-lang.in: Ditto. Also remove refs to rTX.
4498 2014-08-01  Pascal Obry  <obry@adacore.com>
4500         * s-os_lib.ads: Rename File_Size to Large_File_Size.
4502 2014-08-01  Robert Dewar  <dewar@adacore.com>
4504         * a-numaux-vxworks.ads, a-numaux-x86.adb, a-numaux-x86.ads,
4505         a-numaux-darwin.adb, a-numaux-darwin.ads, a-numaux.ads,
4506         a-numaux-libc-x86.ads: Fix bad package header comments.
4507         * elists.ads, elists.adb (Append_New_Elmt): New procedure.
4508         * gnat_rm.texi, a-calend.adb, gnatcmd.adb, einfo.adb, einfo.ads,
4509         checks.adb, sem_prag.adb, sem_prag.ads, rtsfind.ads, freeze.adb,
4510         sem_util.adb, sem_attr.adb, exp_dbug.adb, exp_dbug.ads, gnat1drv.adb,
4511         targparm.adb, targparm.ads, exp_ch6.adb, switch-b.adb, s-shasto.ads,
4512         stand.ads, s-auxdec.ads, opt.adb, opt.ads, mlib-tgt.ads, s-fatgen.adb,
4513         s-fatgen.ads, system.ads, snames.ads-tmpl, s-stalib.ads,
4514         s-os_lib.adb: Remove VMS-specific code.
4516 2014-08-01  Arnaud Charlet  <charlet@adacore.com>
4518         * exp_attr.adb (Is_Inline_Floating_Point_Attribute): Revert to
4519         previous state in CodePeer_Mode.
4521 2014-08-01  Robert Dewar  <dewar@adacore.com>
4523         * hostparm.ads: Put back definition of OpenVMS as False to aid
4524         the transition process.
4525         * sem_ch7.adb: Minor reformatting.
4526         * prj-env.adb: Minor code fix.
4527         * gnat_rm.texi: Complete previous change.
4528         * sem_ch3.adb: Minor reformatting.
4529         * sem_ch6.adb: Minor reformatting.
4530         * sem_elab.adb: Minor reformatting.
4531         * exp_strm.adb: Complete previous change.
4533 2014-08-01  Vincent Celier  <celier@adacore.com>
4535         * sem_warn.adb (Warn_On_Unreferenced_Entity): Do not issue a
4536         warning when a constant is unreferenced and its type has pragma
4537         Unreferenced_Objects.
4539 2014-08-01  Hristian Kirtchev  <kirtchev@adacore.com>
4541         * einfo.adb: Flag2 is now known as
4542         Is_Hidden_Non_Overridden_Subprogram.
4543         (Is_Hidden_Non_Overridden_Subprogram): New routine.
4544         (Set_Is_Hidden_Non_Overridden_Subprogram): New routine.
4545         (Write_Entity_Fields): Output Flag2.
4546         * einfo.ads: New attribute Is_Hidden_Non_Overridden_Subprogram
4547         along with occurrences in entities.
4548         (Is_Hidden_Non_Overridden_Subprogram): New routine and pragma Inline.
4549         (Set_Is_Hidden_Non_Overridden_Subprogram): New routine
4550         and pragma Inline.
4551         * sem_ch7.adb (Install_Package_Entity): Do not enter implicitly
4552         declared non-overriden homographs into visibility.
4553         * sem_ch13.adb (Freeze_Entity_Checks): Hide all
4554         implicitly declared non-overriden homographs.
4555         (Hide_Non_Overridden_Subprograms): New routine.
4557 2014-08-01  Robert Dewar  <dewar@adacore.com>
4559         * snames.ads-tmpl, s-os_lib.adb, s-os_lib.ads, s-fileio.adb: Remove
4560         VMS-specific code.
4561         * prj-conf.adb: Minor reformatting.
4562         * xr_tabls.adb (Read_File): Restore code which was enabled on
4563         non VMS platforms before.
4564         * prj-env.adb (Initialize_Default_Project_Path): Ditto.
4565         * sem_ch5.adb: Minor reformatting.
4566         * lib-writ.adb, lib-writ.ads, bindgen.adb, sem_vfpt.adb,
4567         sem_vfpt.ads, ali.adb, ali.ads, opt.ads, bcheck.adb, exp_strm.adb:
4568         Remove VMS-specific code.
4570 2014-08-01  Vincent Celier  <celier@adacore.com>
4572         * make.adb (Await_Compile): Remove loop that was only needed
4573         for VMS.
4575 2014-08-01  Robert Dewar  <dewar@adacore.com>
4577         * a-calcon.ads, a-direct.adb, a-dirval-mingw.adb, a-dirval.adb,
4578         a-dirval.ads, a-except-2005.adb, a-excpol-abort.adb,
4579         a-numaux-darwin.ads, a-numaux.ads, bindgen.adb, bindusg.adb,
4580         einfo.adb, einfo.ads, err_vars.ads, errout.ads, errutil.adb,
4581         exp_ch3.adb, exp_ch4.adb, exp_ch7.adb, exp_ch7.ads, fname-uf.adb,
4582         fname.adb, fname.ads, freeze.adb, g-debpoo.adb, g-dirope.ads,
4583         g-excact.ads, g-expect.ads, g-socket.adb, g-socket.ads, g-sothco.ads,
4584         g-traceb.ads, gnat_rm.texi, gnatlink.adb, gnatls.adb, i-cstrea.adb,
4585         krunch.adb, krunch.ads, layout.adb, lib-util.adb, make.adb,
4586         mlib.adb, osint-b.adb, osint-b.ads, osint-c.adb, osint.adb,
4587         osint.ads, output.ads, par.adb, prj-conf.adb, prj-env.adb,
4588         prj-makr.adb, prj-nmsc.adb, prj.adb, prj.ads, repinfo.adb, rtsfind.adb,
4589         rtsfind.ads, s-excmac-gcc.ads, s-fatgen.adb, s-mastop.ads,
4590         s-parame-ae653.ads, s-parame-hpux.ads, s-parame-vxworks.ads,
4591         s-parame.ads, s-soflin.ads, s-stoele.adb, s-tasini.adb,
4592         s-taspri-dummy.ads, s-taspri-hpux-dce.ads, s-taspri-mingw.ads,
4593         s-taspri-posix-noaltstack.ads, s-taspri-posix.ads,
4594         s-taspri-solaris.ads, s-taspri-vxworks.ads, s-trasym.ads,
4595         sem_ch12.adb, sem_ch4.adb, sem_eval.adb, sem_intr.adb, sem_mech.adb,
4596         sem_mech.ads, sem_prag.adb, sem_res.adb, sem_util.adb, sem_util.ads,
4597         sinfo.adb, sinfo.ads, sinput-c.adb, symbols.ads, targparm.adb,
4598         treepr.adb, types.ads, xr_tabls.adb, xr_tabls.ads: Remove VMS
4599         specific code and comments.
4601 2014-08-01  Ed Schonberg  <schonberg@adacore.com>
4603         * sem_ch5.adb (Analyze_Iterator_Specification): New procedure
4604         Check_Reverse_Iteration, to verify the legality of the Reverse
4605         indicator on various container types, and to detect illegal
4606         reverse iterations on containers that only supoort forward
4607         iteration.
4609 2014-08-01  Vincent Celier  <celier@adacore.com>
4611         * gnatcmd.adb: Remove the VMS specific stuff.  Integrate in
4612         procedure GNATCmd the relevant declarations from packages VMS_Cmds
4613         and VMS_Conv.
4614         * gnatcmd.ads: Update comments to remove any trace of VMS
4616 2014-08-01  Ed Schonberg  <schonberg@adacore.com>
4618         * sem_ch12.adb: sem_ch12.adb (Build_Wrapper): Capture entity for
4619         defaulted actual that is an operator, before building wrapper
4620         for it in GNATprove mode. Restrict construction of wrapper to
4621         actuals that are operators.
4623 2014-08-01  Vincent Celier  <celier@adacore.com>
4625         * vms_conv.adb, vms_conv.ads, vms_data.ads, vms_cmds.ads: Remove VMS
4626         specific packages no longer needed.
4628 2014-08-01  Pascal Obry  <obry@adacore.com>
4630         * s-os_lib.ads (System.CRTL): Move with clause to body.
4631         (File_Size): New type.
4632         (File_Length64): Use it.
4633         (File_Length): Restore previous spec returning a Long_Integer.
4634         * s-os_lib.adb (System.CRTL): Move with clause here.
4636 2014-08-01  Vincent Celier  <celier@adacore.com>
4638         * mlib-prj.adb: Update comments to remove any mention of VMS.
4640 2014-08-01  Arnaud Charlet  <charlet@adacore.com>
4642         * ug_words, xgnatugn.adb, gcc-interface/Make-lang.in: Remove
4643         xgnatugn.adb and ug_words.
4645 2014-08-01  Eric Botcazou  <ebotcazou@adacore.com>
4647         * exp_attr.adb (Expand_N_Attribute_Reference): Check whether
4648         expansion can be avoid for Machine, Model and Rounding.
4649         (Is_Inline_Floating_Point_Attribute): Return true for Machine
4650         & Model, as well as Rounding if wrapped in a conversion to an
4651         integer type.
4652         * sem_res.adb (Simplify_Type_Conversion): Deal with Rounding as well.
4653         * gcc-interface/gigi.h (fp_arith_may_widen): Declare.
4654         * gcc-interface/utils.c (fp_arith_may_widen): New global variable.
4655         * gcc-interface/misc.c (enumerate_modes): Compute it.
4656         * gcc-interface/trans.c (FP_ARITH_MAY_WIDEN): Delete.
4657         (lvalue_required_for_attribute_p): Deal with Descriptor_Size,
4658         Machine and Model.
4659         (Attribute_to_gnu) <Attr_Model>: New case.
4660         <Attr_Machine>): Likewise.
4661         (convert_with_check): Test
4662         fp_arith_may_widen variable.
4664 2014-08-01  Pascal Obry  <obry@adacore.com>
4666         * adaint.h (GNAT_FOPEN): New definition for Windows.
4667         (GNAT_OPEN): Likewise.
4668         (GNAT_STAT): Likewise.
4669         (GNAT_FSTAT): Likewise.
4670         (GNAT_LSTAT): Likewise.
4671         (GNAT_STRUCT_STAT): Likewise.
4672         * adaint.c (__gnat_stat): Fix computation of file size for
4673         Windows.
4675 2014-08-01  Vincent Celier  <celier@adacore.com>
4677         * Makefile.rtl: Minor comment update.
4679 2014-08-01  Vincent Celier  <celier@adacore.com>
4681         * Make-generated.in: Remove dependencies for vms-help.
4683 2014-08-01  Gary Dismukes  <dismukes@adacore.com>
4685         * makeutl.ads, opt.ads: Minor grammar fixes.
4686         * makeutl.adb: Minor code reorganization.
4688 2014-08-01  Arnaud Charlet  <charlet@adacore.com>
4690         * gcc-interface/Makefile.in, gcc-interface/Make-lang.in,
4691         gnatsym.adb: Remove gnatsym (VMS only tool).
4693 2014-08-01  Ben Brosgol  <brosgol@adacore.com>
4695         * gnat_ugn.texi, projects.texi, xgnatugn.adb: Removed all VMS
4696         conditionalization from gnat_ugn.texi and projects.texi, and updated
4697         (considerably simplified) xgnatugn.adb, to be removed soon.
4699 2014-08-01  Vincent Celier  <celier@adacore.com>
4701         * debug.adb: Remove doc for gnatmake/gprbuild switch -ds.
4702         * make.adb (List_Bad_Compilations): Use Opt.No_Exit_Message
4703         instead of Debug.Debug_Flag_S.
4704         * makeutl.adb (Finish_Program, Fail_Program): Use Opt flag
4705         No_Exit_Message instead of Debug.Debug_Flag_S to suppress exit
4706         error messages.
4707         * makeutl.ads (No_Exit_Message_Option): New constant string
4708         for switch --no-exit-message.
4709         * opt.ads (No_Exit_Message): New Boolean flag, defaulted to False.
4710         * switch-m.adb (Scan_Make_Switches): Recognize new switch
4711         --no-exit-message.
4713 2014-08-01  Arnaud Charlet  <charlet@adacore.com>
4715         * exp_vfpt.adb, exp_vfpt.ads: Removed, no longer used.
4716         * gcc-interface/Make-lang.in: Remove exp_vfpt.o
4718 2014-08-01  Javier Miranda  <miranda@adacore.com>
4720         * inline.ads (Inlined_Calls, Backend_Calls,
4721         Backend_Inlined_Subps, Backend_Not_Inlined_Subps): Declarations
4722         moved to inline.adb (Cannot_Inline): Update documentation.
4723         (Check_And_Build_Body_To_Inline): Renamed.
4724         (List_Inlining_Info): Subprogram moved here from package exp_ch6.
4725         * inline.adb (Check_Inlining_Restrictions): New local variable.
4726         (Inlined_Calls, Backend_Calls, Backend_Inlined_Subps,
4727         Backend_Not_Inlined_Subps): Declarations moved here
4728         from inline.ads (Number_Of_Statements): Removed.
4729         (Remove_Pragmas): Avoid duplicated version of this subprogram.
4730         (Build_Body_To_Inline): Code cleanup.
4731         (Build_Body_To_Inline.Has_Excluded_Statament): Removed.
4732         (Check_And_Build_Body_To_Inline): Renamed. Code cleanup.
4733         (Check_Body_To_Inline): Removed.
4734         (Generate_Body_To_Inline): Renamed as Generate_Subprogram_Body.
4735         (Has_Excluded_Declaration): No action if not
4736         Check_Inlining_Restrictions.
4737         (Has_Excluded_Statement): No action if not Check_Inlining_Restrictions.
4738         (Initialize): Initialize the lists of inlined calls and subprograms.
4739         (List_Inlining_Info): Subprogram moved here from package exp_ch6.
4740         * sem_ch6.adb (Analyze_Subprogram_Body_Helper): Update call
4741         to Check_And_Build_Body_To_Inline since it has been renamed as
4742         Check_And_Split_Unconstrained_Function
4743         * exp_ch6.ad[sb] (List_Inlining_Info): Subprogram moved to
4744         package inline.
4745         * gnat1drv.adb Update call to Inline.List_Inlining_Info.
4747 2014-08-01  Vincent Celier  <celier@adacore.com>
4749         * debug.adb: Add documentation for new debug switch -ds.
4750         * make.adb (List_Bad_Compilations): Do not issue any message
4751         when switch -ds is specified.
4752         * makeutl.adb (Fail_Program): Do not issue any message when
4753         -ds is specified.
4754         (Finish_Program): Ditto.
4756 2014-08-01  Robert Dewar  <dewar@adacore.com>
4758         * s-exnint.adb, s-exnint.ads, s-wwdwch.ads, s-carsi8.ads,
4759         s-casi32.ads, indepsw.adb, a-timoau.ads, s-explli.adb, s-explli.ads,
4760         s-casi16.ads, s-powtab.ads, g-wistsp.ads, a-ztmoau.adb,
4761         indepsw-gnu.adb, s-imgllb.ads, types.adb, gnat.ads, s-proinf.adb,
4762         indepsw-aix.adb, s-caun64.ads, s-imgllw.ads, s-traces-default.adb,
4763         s-vxwork-x86.ads, s-expllu.adb, s-exnlli.adb, s-exnlli.ads,
4764         s-traces.adb, widechar.ads, stand.adb, s-expint.adb,
4765         s-tratas-default.adb, s-expint.ads, s-geveop.ads, s-caun32.ads,
4766         s-expuns.adb, s-mantis.adb, s-mantis.ads, s-caun16.ads, s-tasinf.adb,
4767         s-memcop.ads, s-dsaser.ads, s-imgbiu.ads, a-szmzco.ads, g-strspl.ads,
4768         s-casi64.ads, g-zstspl.ads, indepsw-mingw.adb, tree_io.adb,
4769         s-boarop.ads, uname.ads, s-fore.adb, s-fore.ads, g-timsta.adb,
4770         g-timsta.ads, s-assert.adb, s-vector.ads, s-tratas.adb,
4771         s-tratas.ads: Minor fix to copyright notices.
4773 2014-08-01  Eric Botcazou  <ebotcazou@adacore.com>
4775         * sinfo.ads: Remove long obsolete comment.
4776 2014-08-01  Ed Schonberg  <schonberg@adacore.com>
4778         * sem_util.adb: Add guard to setting of No_Predicate_On_Actual.
4779         * sem_ch3.adb: Minor reformatting.
4781 2014-08-01  Pascal Obry  <obry@adacore.com>
4783         * cstreams.c: Only enable large file support on know supported
4784         platforms. Add missing defines/includes.
4786 2014-08-01  Ed Schonberg  <schonberg@adacore.com>
4788         * einfo.ads, einfo.adb New flags No_Predicate_On_Actual and
4789         No_Dynamic_Predicate_On_Actual, to enforce the generic contract
4790         on generic units that contain constructs that forbid subtypes
4791         with predicates.
4792         * sem_ch3.adb (Analyze_Subtype_Declaration, Process_Subtype):
4793         Inherit flags indicating the presence of predicates in subtype
4794         declarations with and without constraints.
4795         (Inherit_Predicate_Flags): Utility for the above.
4796         * sem_util.adb (Bad_Predicated_Subtype_Use): In a generic context,
4797         indicate that the actual cannot have predicates, and preserve
4798         warning. In an instance, report error if actual has predicates
4799         and the construct appears in a package declaration.
4800         * sem_ch12.adb (Diagnose_Predicated_Actual): Report error
4801         for an actual with predicates, if the corresponding formal
4802         carries No_Predicate_On_Actual or (in the case of a loop)
4803         No_Dynamic_Predicate_On_Actual.
4804         * sem_ch13.adb (Build_Predicate_Functions); Do not build a
4805         Static_Predicate function if the type is non-static (in the
4806         presence of previous errors),
4807         * sem_ch5.adb (Analyze_Loop_Parameter_Specification): Set flag
4808         No_Dynamic_Predicate_On_Actual in a generic context, to enforce
4809         generic contract on actuals that cannot have predicates.
4811 2014-08-01  Pascal Obry  <obry@adacore.com>
4813         * a-direct.adb (C_Size): Returns an int64.
4814         * osint.adb (System.CRTL): New with clause.
4815         (File_Length.Internal): Returns an int64.
4816         * s-os_lib.ads (File_Length): Returns an int64.
4818 2014-08-01  Robert Dewar  <dewar@adacore.com>
4820         * gnatchop.adb, gnatcmd.adb, make.adb, mlib-prj.adb, bindgen.adb,
4821         mlib.ads, butil.adb, clean.adb, binde.adb, gnatls.adb, gnatname.adb,
4822         osint.adb, krunch.adb: Minor reformatting.
4824 2014-08-01  Robert Dewar  <dewar@adacore.com>
4826         * inline.adb, inline.ads, fe.h, einfo.adb, einfo.ads, sem_util.adb,
4827         sem_util.ads, exp_ch4.adb, exp_ch11.adb, exp_ch6.adb, cstand.adb,
4828         sem_mech.adb, sem_ch6.adb, sem_ch8.adb, sem_ch11.adb, snames.ads-tmpl:
4829         Remove VMS-specific code.
4830         * gcc-interface/decl.c, gcc-interface/trans.c: Ditto.
4832 2014-08-01  Arnaud Charlet  <charlet@adacore.com>
4834         * binde.adb, bindgen.adb, butil.adb, clean.adb, gnatbind.adb,
4835         gnatchop.adb, gnatcmd.adb, gnatls.adb, gnatname.adb, krunch.adb,
4836         make.adb, makeutl.adb, memtrack.adb, mlib-prj.adb, mlib.adb,
4837         mlib.ads, tempdir.adb: Remove VMS handling.
4839 2014-08-01  Pascal Obry  <obry@adacore.com>
4841         * adaint.h, adaint.c (__gnat_file_length): Returns an __int64.
4842         (__gnat_named_file_length): Likewise.
4843         (__gnat_file_length_attr): Likewise.
4844         * a-direct.adb (C_Size): Use size_t as returned type.
4845         * osint.adb (File_Length): Adjust spec for Internal routine
4846         (returns size_t).
4847         * s-os_lib.adb (File_Length): Now returns a CRTL.size_t.
4848         (System.CRTL): With claused moved to spec.
4849         * s-os_lib.ads (System.CRTL): With clause moved to here.
4851 2014-08-01  Pascal Obry  <obry@adacore.com>
4853         * adaint.h, adaint.c (__gnat_open): Added.
4854         * s-crtl.ads (open): Import __gnat_open for large file support.
4856 2014-08-01  Robert Dewar  <dewar@adacore.com>
4858         * sem_case.adb (Dup_Choice): Improve message for integer constants.
4860 2014-08-01  Arnaud Charlet  <charlet@adacore.com>
4862         * gnatlink.adb: Remove special handling of VMS, RTX and JVM.
4864 2014-08-01  Pascal Obry  <obry@adacore.com>
4866         * adaint.h (GNAT_OPEN): Defines as open64 where supported.
4867         * adaint.c (GNAT_OPEN): Uses new macro where needed.
4869 2014-07-31  Eric Botcazou  <ebotcazou@adacore.com>
4871         * gcc-interface/utils.c (lookup_and_insert_pad_type): New function
4872         extracted from...
4873         (maybe_pad_type): ...here.  Call it to canonicalize the pad type.
4874         * gcc-interface/gigi.h: Update comment.
4876 2014-07-31  Javier Miranda  <miranda@adacore.com>
4878         * debug.adb Remove documentation of -gnatd.k (no longer needed).
4879         * sem_ch6.adb (Analyze_Subprogram_Body_Helper): Code cleanup.
4880         * inline.ads (Backend_Inlined_Subps): New
4881         Elist.  (Backend_Not_Inlined_Subps): New Elist.
4882         (Has_Excluded_Declaration): Declaration previously located in
4883         * inline.adb (Has_Excluded_Statement): Declaration previously
4884         located in inline.adb
4885         * inline.adb (Has_Single_Return): Moved out of
4886         Build_Body_To_Inline to avoid having duplicated code.
4887         (Number_Of_Statements): New subprogram.
4888         (Register_Backend_Inlined_Subprogram): New subprogram.
4889         (Register_Backend_Not_Inlined_Subprogram): New subprogram.
4890         (Add_Inlined_Subprogram): Register backend inlined subprograms and
4891         also register subprograms that cannot be inlined by the backend.
4892         (Has_Excluded_Declaration): Moved out of Build_Body_To_Inline
4893         to avoid having duplicated code.  Replace occurrences of
4894         Debug_Flag_Dot_K by Back_End_Inlining.
4895         * sem_res.adb (Resolve_Call): Code cleanup.
4896         * exp_ch6.adb (Expand_Call): Complete previous patch. Replace
4897         occurrence of Debug_Flag_Dot_K by Back_End_Inlining.
4898         (List_Inlining_Info): Add listing of subprograms passed to the
4899         backend and listing of subprograms that cannot be inlined by
4900         the backend.
4901         * sem_ch12.adb, sem_ch3.adb Replace occurrences of
4902         Debug_Flag_Dot_K by Back_End_Inlining.
4904 2014-07-31  Robert Dewar  <dewar@adacore.com>
4906         * nlists.ads: Minor code fix (remove unwise Inline for
4907         List_Length).
4909 2014-07-31  Arnaud Charlet  <charlet@adacore.com>
4911         * einfo.adb: Remove VMS specific code.
4912         * exp_attr.adb: Remove VAX specific code.
4913         * set_targ.adb: Remove handling of VAX_Float.
4914         * sem_vfpt.adb: Remove references to Vax_Native.
4915         * sem_attr.adb (Is_VAX_Float): Remove ref to VAX_Native.
4917 2014-07-31  Robert Dewar  <dewar@adacore.com>
4919         * sem_ch4.adb: Minor reformatting.
4921 2014-07-31  Arnaud Charlet  <charlet@adacore.com>
4923         * gcc-interface/trans.c, gcc-interface/misc.c: Remove references
4924         to VMS. Misc clean ups.
4925         * gcc-interface/Makefile.in (gnatlib-shared-vms): Remove.
4927 2014-07-31  Robert Dewar  <dewar@adacore.com>
4929         * cstand.adb, einfo.adb, einfo.ads, errout.adb, exp_attr.adb,
4930         exp_prag.adb, frontend.adb, interfac.ads,
4931         par-prag.adb, s-auxdec.ads, s-filofl.ads, s-fishfl.ads, s-fvadfl.ads,
4932         s-fvaffl.ads, s-fvagfl.ads, s-vaflop.ads, sem_attr.adb, sem_attr.ads,
4933         sem_ch13.adb, sem_ch3.adb, sem_ch8.adb, sem_prag.adb, snames.adb-tmpl,
4934         snames.ads-tmpl: Remove obsolete VMS-specific code.
4936 2014-07-31  Robert Dewar  <dewar@adacore.com>
4938         * sem_ch3.adb, sem_ch13.adb: Minor reformatting.
4940 2014-07-31  Arnaud Charlet  <charlet@adacore.com>
4942         * a-intnam-linux.ads: Minor: update obsolete comments.
4943         * s-taasde.adb: Minor: fix comment header.
4945 2014-07-31  Arnaud Charlet  <charlet@adacore.com>
4947         * s-auxdec-vms-ia64.adb, s-parame-vms-alpha.ads, s-asthan-vms-alpha.adb,
4948         s-tpopde-vms.adb, s-mastop-vms.adb, s-tpopde-vms.ads, s-taprop-vms.adb,
4949         mlib-tgt-vms_common.adb, mlib-tgt-vms_common.ads, s-inmaop-vms.adb,
4950         g-enblsp-vms-alpha.adb, s-ransee-vms.adb, s-osprim-vms.adb,
4951         s-osprim-vms.ads, g-socthi-vms.adb, g-socthi-vms.ads, system-vms_64.ads,
4952         s-osinte-vms.adb, s-osinte-vms.ads, g-eacodu-vms.adb,
4953         s-vaflop-vms-alpha.adb, s-parame-vms-ia64.ads, a-dirval-vms.adb,
4954         a-caldel-vms.adb, mlib-tgt-specific-vms-alpha.adb, s-tasdeb-vms.adb,
4955         symbols-vms.adb, a-intnam-vms.ads, g-expect-vms.adb,
4956         symbols-processing-vms-alpha.adb, mlib-tgt-specific-vms-ia64.adb,
4957         s-traent-vms.adb, s-traent-vms.ads, i-cstrea-vms.adb, a-numaux-vms.ads,
4958         symbols-processing-vms-ia64.adb, s-interr-vms.adb, s-memory-vms_64.adb,
4959         s-memory-vms_64.ads, g-enblsp-vms-ia64.adb, s-taspri-vms.ads,
4960         s-auxdec-vms_64.ads, s-intman-vms.adb, s-intman-vms.ads,
4961         s-tpopsp-vms.adb, s-asthan-vms-ia64.adb, a-calend-vms.adb,
4962         a-calend-vms.ads, system-vms-ia64.ads, s-auxdec-vms-alpha.adb: Removed.
4963         * namet.h (Is_Non_Ada_Error): Remove.
4965 2014-07-31  Robert Dewar  <dewar@adacore.com>
4967         * exp_util.adb, lib-writ.adb, sem_ch12.adb, s-direio.adb: Minor
4968         reformatting.
4970 2014-07-31  Hristian Kirtchev  <kirtchev@adacore.com>
4972         * exp_attr.adb (Expand_Loop_Entry_Attribute): Update the comment
4973         which demonstrates the expansion of while loops subject to
4974         attribute 'Loop_Entry. The condition of a while loop along with
4975         related condition actions is now wrapped in a function.  Instead
4976         of repeating the condition, the expansion now calls the function.
4978 2014-07-31  Ed Schonberg  <schonberg@adacore.com>
4980         * sem_case.adb (Check_Against_Predicate): Correct off-by-one
4981         error when reporting of missing values in a case statement for
4982         a type with a static predicate.
4983         (Check_Choices): Reject a choice given by a subtype to which a
4984         Dynamic_Predicate applies.
4985         * sem_ch3.adb (Analyze_Subtype_Declaration): Inherit
4986         Has_Dynamic_Predicate_Aspect flag from parent.
4988 2014-07-31  Ed Schonberg  <schonberg@adacore.com>
4990         * sem_ch13.adb (Analyze_Aspect_Specifications): A predicate
4991         cannot apply to a subtype of an incomplete type.
4992         (Is_Static_Choice): Treat an Others_Clause as static. The
4993         staticness of the expression and of the range are checked
4994         elsewhere.
4996 2014-07-31  Pascal Obry  <obry@adacore.com>
4998         * adaint.h (__gnat_ftell64): Added.
4999         (__gnat_fseek64): Added.
5000         (__int64): Added.
5001         * cstreams.c (__int64): Removed.
5003 2014-07-31  Pascal Obry  <obry@adacore.com>
5005         * a-stream.ads (Stream_Element_Offset): Now a signed 64bit type.
5006         * i-cstrea.ads, s-crtl.ads (fseek64): Offset is always a 64bit value.
5007         (ftell64): Always returns a 64bit value.
5008         * cstreams.c (int64): New definition.
5009         (_FILE_OFFSET_BITS): Set to 64 to enable 64bit offset support.
5010         (__gnat_ftell64): Always returns a 64bit value. The implemenation now
5011         uses ftello() on UNIX.
5012         (__gnat_fseek64): Offset is always a 64bit value. The
5013         implementation now uses fseeko() on UNIX.
5014         * a-ststio.adb, s-direio.adb (Set_Position): Simplify code,
5015         always use fseek64 to set the offset.
5016         (Size): Simplify code, always use fseek64/ftell64.
5017         * s-direio.ads (Count): Now an int64.
5018         * g-socket.ads (Vector_Element): Adjust definition for Length
5019         to be a size_t. This matches the C definition and avoid using
5020         a 64bit integer on 32bit platforms now that Count is always 64bit.
5021         * g-socthi-mingw.adb (Ada.Streams): Removed as not used anymore.
5022         (C_Recvmsg): Change some conversion to account for change in
5023         Vector_Element.
5024         (C_Sendmsg): Likewise.
5026 2014-07-31  Robert Dewar  <dewar@adacore.com>
5028         * cstand.adb (Create_Standard): Remove handling of -gnatdm flag.
5029         * debug.adb: Remove documentation of -gnatdm flag.
5030         * gnat1drv.adb (Adjust_Global_Switches): Remove handling of
5031         -gnatdm flag.
5033 2014-07-31  Arnaud Charlet  <charlet@adacore.com>
5035         * lib-writ.adb (Write_Unit_Information): Fix case where U =
5036         No_Unit.
5038 2014-07-31  Claire Dross  <dross@adacore.com>
5040         * exp_util.adb, exp_util.ads
5041         (Get_First_Parent_With_External_Axiomatization_For_Entity):
5042         New routine to find the first parent of an entity with
5043         a pragma Annotate (GNATprove, External_Axiomatization).
5044         (Has_Annotate_Pragma_For_External_Axiomatization): New function
5045         to check if a package has a pragma Annotate (GNATprove,
5046         External_Axiomatization).
5047         * einfo.ads, einfo.adb (Is_Generic_Actual_Subprogram): New
5048         flag on the entity for the declaration created for a formal
5049         subprogram in an instance. This is a renaming declaration,
5050         or in GNATprove_Mode the declaration of an expression function
5051         that captures the axiomatization of the actual.
5052         * sem_ch6.adb (Analyze_Expression_Function): For a
5053         Generic_Actual_Subprogram, place body immediately after the
5054         declaration because it may be used in a subsequent declaration
5055         in the instance.
5056         * sem_ch12.adb (Build_Wrapper): Add code to handle instances where
5057         the actual is a function, not an operator. Handle functions with
5058         one and two parameters and binary and unary operators.
5060 2014-07-31  Pascal Obry  <obry@adacore.com>
5062         * cstreams.c (__gnat_is_regular_file_fd): Removed.
5063         * adaint.c (__gnat_is_regular_file_fd): Added.
5065 2014-07-31  Robert Dewar  <dewar@adacore.com>
5067         * exp_strm.adb: Minor reformatting.
5069 2014-07-31  Ed Schonberg  <schonberg@adacore.com>
5071         * sem_ch12.adb (Build_Wrapper): New procedure, subsidiary to
5072         Analyze_Associations, to create a wrapper around operators that
5073         are actuals to formal subprograms. This is done in GNATProve
5074         mode in order to propagate the contracts of the operators to
5075         the body of the instance.
5077 2014-07-31  Ed Schonberg  <schonberg@adacore.com>
5079         * sem_attr.adb (Analyze_Attribute, case 'Old):  The reference is
5080         legal if within an aspect specification for a generic subprogram.
5082 2014-07-31  Javier Miranda  <miranda@adacore.com>
5084         * gnat1drv.adb (Back_End_Inlining): Set to false if
5085         Suppress_All_Inlining is set.
5086         * debug.adb: Adding documentation for -gnatd.z.
5087         * inline.adb (Add_Inlined_Body): Extend the -gnatn2
5088         processing to -gnatn1 for calls to Inline_Always routines.
5089         (Add_Inlined_Subprogram): Remove previous patch.
5091 2014-07-31  Ed Schonberg  <schonberg@adacore.com>
5093         * sem_ch13.adb (Check_One_Function): Apply properly the static
5094         semantic rules for indexing aspects and the functions they denote.
5096 2014-07-31  Javier Miranda  <miranda@adacore.com>
5098         * debug.adb: Complete documentation of -gnatd.z.
5100 2014-07-31  Bob Duff  <duff@adacore.com>
5102         * gnat_ugn.texi: Minor doc fixes.
5104 2014-07-31  Robert Dewar  <dewar@adacore.com>
5106         * sem_aggr.adb (Resolve_Array_Aggregate): Fix posting of missing
5107         index value.
5109 2014-07-31  Tristan Gingold  <gingold@adacore.com>
5111         * s-unstyp.ads (Packed_Byte): Make this type universal aliasing.
5112         (Packed_Bytes1): Make component aliased.
5114 2014-07-31  Robert Dewar  <dewar@adacore.com>
5116         * s-unstyp.ads, s-fileio.adb: Minor reformatting.
5118 2014-07-31  Robert Dewar  <dewar@adacore.com>
5120         * inline.adb, gnat1drv.adb, exp_ch6.adb, s-fileio.adb: Minor
5121         reformatting.
5123 2014-07-31  Eric Botcazou  <ebotcazou@adacore.com>
5125         * gcc-interface/utils2.c ((build_binary_op): Don't set TREE_THIS_NOTRAP
5126         on array references here, now done more selectively in trans.c.
5128 2014-07-31  Doug Rupp  <rupp@adacore.com>
5130         * gcc-interface/misc.c (gnat_init_gcc_fp(): Set flag_errno_math to 0.
5132 2014-07-31  Hristian Kirtchev  <kirtchev@adacore.com>
5134         * sem_util.adb (Is_Effectively_Volatile): New routine.
5136 2014-07-31  Fedor Rybin  <frybin@adacore.com>
5138         * gnat_ugn.texi: Document --test-duration option for gnattest.
5140 2014-07-31  Javier Miranda  <miranda@adacore.com>
5141             Eric Botcazou  <ebotcazou@adacore.com>
5143         * opt.ads (Back_End_Inlining): New variable which controls
5144         activation of inlining by back-end expansion.
5145         * gnat1drv.adb (Adjust_Global_Switches): Initialize Back_End_Inlining
5146         * sem_ch6.adb (Analyze_Subprogram_Body_Helper): Do not build
5147         the body to be inlined by the frontend if Back_End_Inlining
5148         is enabled.
5149         * exp_ch6.adb (Register_Backend_Call): Moved to inline.adb.
5150         (Expand_Call): If backend inlining is enabled let the backend to
5151         handle inlined subprograms.
5152         * inline.ads (Register_Backend_Call): Moved here from exp_ch6
5153         * inline.adb (Register_Backend_Call): Moved here from exp_ch6.
5154         (Add_Inlined_Subprogram): Add subprograms when Back_End_Inlining is set.
5155         (Must_Inline): Do not return Inline_Call if Back_End_Inlining is
5156         enabled.
5157         * debug.adb Document -gnatd.z
5158         * fe.h Import Back_End_Inlining variable.
5159         * gcc-interface/utils.c (create_subprog_decl): If Back_End_Inlining is
5160         enabled then declare attribute "always inline"
5161         * gcc-interface/decl.c, gcc-interface/trans.c,
5162         gcc-interface/gigi.h: Add handling of Inline_Always pragma.
5164 2014-07-31  Robert Dewar  <dewar@adacore.com>
5166         * a-ngelfu.ads: Minor comment fix.
5168 2014-07-31  Hristian Kirtchev  <kirtchev@adacore.com>
5170         * freeze.adb (Freeze_Record_Type): Replace all calls to
5171         Is_SPARK_Volatile with Is_Effectively_Volatile and update
5172         related comments.
5173         * sem_ch3.adb (Analyze_Object_Contract, Process_Discriminants):
5174         Replace all calls to Is_SPARK_Volatile with
5175         Is_Effectively_Volatile and update related comments.
5176         * sem_ch5.adb (Analyze_Iterator_Specification,
5177         Analyze_Loop_Parameter_Specification): Replace all calls to
5178         Is_SPARK_Volatile with Is_Effectively_Volatile and update
5179         related comments.
5180         * sem_ch6.adb (Process_Formals): Replace all calls to
5181         Is_SPARK_Volatile with Is_Effectively_Volatile and update
5182         related comments.
5183         * sem_ch12.adb (Instantiate_Object): Replace the call to
5184         Is_SPARK_Volatile_Object with Is_Effectively_Volatile_Object
5185         and update related comment.
5186         * sem_prag.adb (Analyze_External_Property_In_Decl_Part,
5187         Analyze_Global_Item): Replace all calls to Is_SPARK_Volatile
5188         with Is_Effectively_Volatile and update related comments.
5189         * sem_res.adb (Resolve_Actuals, Resolve_Entity_Name): Replace
5190         all calls to Is_SPARK_Volatile with Is_Effectively_Volatile and
5191         update related comments.
5192         * sem_util.adb (Has_Enabled_Property,
5193         Variable_Has_Enabled_Property): Replace all calls
5194         to Is_SPARK_Volatile with Is_Effectively_Volatile and
5195         update related comments.
5196         (Is_Effectively_Volatile): New routine.
5197         (Is_Effectively_Volatile_Object): New routine.
5198         (Is_SPARK_Volatile): Removed.
5199         (Is_SPARK_Volatile_Object): Removed.
5200         * sem_util.ads (Is_Effectively_Volatile): New routine.
5201         (Is_Effectively_Volatile_Object): New routine.
5202         (Is_SPARK_Volatile): Removed.
5203         (Is_SPARK_Volatile_Object): Removed.
5205 2014-07-31  Pascal Obry  <obry@adacore.com>
5207         * s-fileio.adb (Open): Make sure a shared file gets inserted into
5208         the global list atomically. This ensures that the file descriptor
5209         won't be freed because another tasks is closing the file.
5211 2014-07-31  Robert Dewar  <dewar@adacore.com>
5213         * sem_ch3.adb (Process_Range_Expr_In_Decl): Add comments on
5214         generation of _FIRST and _LAST variables even in GNATprove_Mode.
5215         * gnat_ugn.texi: Minor editing.
5216         * sem_prag.adb (Ensure_Aggregate_Form): Make sure generated
5217         aggregate is marked Comes_From_Source if argument is CFS.
5219 2014-07-31  Pascal Obry  <obry@adacore.com>
5221         * s-fileio.adb: Remove obsolete comment.
5223 2014-07-31  Vincent Celier  <celier@adacore.com>
5225         * a-strbou.ads ("=" (Bounded_String, Bounded_String): Add
5226         overriding keyword before function to avoid error when compiler
5227         is called with -gnatyO (check overriding indicators).
5229 2014-07-31  Tucker Taft  <taft@adacore.com>
5231         * gnat_ugn.texi: Add a paragraph pointing the reader
5232         to the "plugins" example.
5234 2014-07-31  Hristian Kirtchev  <kirtchev@adacore.com>
5236         * freeze.adb (Freeze_Expression): Document the
5237         purpose of the parent chain traversal.
5239 2014-07-31  Robert Dewar  <dewar@adacore.com>
5241         * checks.ads, checks.adb (Activate_Overflow_Check): Do not set flag for
5242         unconstrained fpt ops.
5244 2014-07-31  Pascal Obry  <obry@adacore.com>
5246         * s-fileio.adb (Open): Make sure a shared file gets inserted into
5247         the global list atomically. This ensures that the file descriptor
5248         won't be freed because another tasks is closing the file.
5250 2014-07-31  Vincent Celier  <celier@adacore.com>
5252         * projects.texi: Minor spelling error fix.
5254 2014-07-31  Robert Dewar  <dewar@adacore.com>
5256         * gnat_rm.texi: Document No_Elaboration_Code_All restriction.
5257         * lib-writ.adb, lib-load.adb: Initialize No_Elab_Code field in unit
5258         information.
5259         * lib.ads, lib.adb (No_Elab_Code): New field in unit information.
5260         * restrict.adb (Process_Restriction_Synonyms): Add handling
5261         of No_Elaboration_Code_All.
5262         * restrict.ads (Process_Restriction_Synonyms): Now handles
5263         No_Elaboration_Code_All.
5264         * sem_ch10.adb (Analyze_Context): Enforce transitive with for
5265         No_Elaboration_Code_All.
5266         * sem_prag.adb (Process_Restrictions_Or_Restriction_Warnings):
5267         Handle setting of No_Elab_Code in unit information. Handle
5268         No_Elaboration_Code_All.
5269         * snames.ads-tmpl (Name_No_Elaboration_Code): New name for
5270         pragma processing.
5271         (Name_No_Elaboration_Code_All): New name for pragma processing.
5273 2014-07-31  Eric Botcazou  <ebotcazou@adacore.com>
5275         * exp_aggr.adb (Aggr_Assignment_OK_For_Backend): Reject array
5276         types with a null range and use the Esize of the component
5277         instead of its RM_Size to identify appropriate values.
5279 2014-07-31  Hristian Kirtchev  <kirtchev@adacore.com>
5281         * freeze.adb Add with and use clause for Aspects.
5282         (Freeze_Expression): Emit an error when a volatile constant lacks
5283         Boolean aspect Import.
5284         (Has_Boolean_Aspect_Import): New routine.
5286 2014-07-31  Gary Dismukes  <dismukes@adacore.com>
5288         * exp_util.adb: Minor reformatting.
5290 2014-07-31  Vincent Celier  <celier@adacore.com>
5292         * errutil.adb (Error_Msg): Make sure that all components of
5293         the error message object are initialized.
5295 2014-07-31  Ed Schonberg  <schonberg@adacore.com>
5297         * sem_ch4.adb (Try_Container_Indexing): If the container type is
5298         class-wide, use specific type to locate iteration primitives.
5299         * sem_ch13.adb (Check_Indexing_Functions): Add legality checks for
5300         rules in RM 4.1.6 (Illegal_Indexing): New diagnostic procedure.
5301         Minor error message reformating.
5302         * exp_ch5.adb (Expand_Iterator_Loop): Handle properly Iterator
5303         aspect for a derived type.
5305 2014-07-31  Robert Dewar  <dewar@adacore.com>
5307         * debug.adb: Document debug flag d.X.
5309 2014-07-31  Ed Schonberg  <schonberg@adacore.com>
5311         * sem_util.ads (Find_Specific_Type): Moved here from exp_disp.adb.
5312         * sem_util.adb (Find_Specific_Type): If type is untagged private,
5313         retrieve full view so that primitive operations can be located.
5314         * exp_disp.adb Move Find_Specific_Type to sem_util.
5315         * exp_ch4.adb (Expand_N_Op_Eq): If operands are class-wide, use
5316         Find_Specific_Type to locate primitive equality.
5317         * exp_util.adb (Make_CW_Equivalent_Type): A class_wide equivalent
5318         type does not require initialization.
5319         * exp_attr.adb (Compile_Stream_Body_In_Scope): Within an instance
5320         body all visibility is established, and the enclosing package
5321         declarations must not be installed.
5323 2014-07-31  Yannick Moy  <moy@adacore.com>
5325         * sem_parg.adb, sem_prag.ads (Collect_Subprogram_Inputs_Outputs):
5326         Make subprogram public.
5328 2014-07-31  Ed Schonberg  <schonberg@adacore.com>
5330         * exp_ch9.adb (Expand_N_Protected_Type_Declaration): New
5331         predicate Discriminated_Size, to distinguish between private
5332         components that depend on discriminants from those whose size
5333         depends on some other non-static expression.
5335 2014-07-31  Nicolas Setton  <setton@adacore.com>
5337         * g-exptty.adb (Close): Fix binding to Waitpid: use the
5338         tty version.
5340 2014-07-31  Ed Schonberg  <schonberg@adacore.com>
5342         * sem_ch3.adb (Make_Index): Reject properly the use of 'Length
5343         in a discrete range, when 'range was probably intended.
5345 2014-07-31  Robert Dewar  <dewar@adacore.com>
5347         * sem_warn.adb, sem_warn.ads (Has_Junk_Name): Moved from body to spec.
5349 2014-07-31  Robert Dewar  <dewar@adacore.com>
5351         * frontend.adb: Minor reformatting.
5352         * sem.adb: Minor reformatting.
5353         * sem_ch6.adb (Analyze_Null_Procedure): Set proper sloc for
5354         identifiers on rewrite.
5355         * par.adb: Minor comment updates.
5356         * a-ngelfu.adb (Cos): Minor simplification.
5357         * par-ch13.adb (Get_Aspect_Specifications): Improve messages
5358         and recovery for bad aspect.
5359         * exp_ch3.adb: Code clean up.
5360         * sem_util.ads: Minor comment correction.
5361         * sem_ch13.adb (Check_Array_Type): Properly handle large types.
5362         * sem_ch3.adb: Code clean up.
5363         * binderr.ads: Minor comment correction.
5365 2014-07-31  Ed Schonberg  <schonberg@adacore.com>
5367         * exp_disp.adb (Expand_Interface_Conversion): A call whose
5368         prefix is a static conversion to an interface type that is not
5369         class-wide is not dispatching.
5371 2014-07-31  Robert Dewar  <dewar@adacore.com>
5373         * inline.adb, s-traceb.adb, s-traceb-hpux.adb, memtrack.adb,
5374         s-traceb-mastop.adb: Minor reformatting.
5376 2014-07-31  Ed Schonberg  <schonberg@adacore.com>
5378         * exp_ch3.adb (Expand_Record_Extension): In ASIS_Mode perform
5379         expansion, to handle properly visibility of selected components
5380         in instance bodies.
5382 2014-07-31  Robert Dewar  <dewar@adacore.com>
5384         * par-ch13.adb (Get_Aspect_Specifications): Set Inside_Depends.
5385         * par-ch2.adb (P_Pragma): Set Inside_Depends.
5386         * par-ch4.adb (P_Simple_Expression): Pass Inside_Depends to
5387         Check_Unary_Plus_Or_Minus.
5388         * scans.ads (Inside_Depends): New flag.
5389         * scng.adb (Scan): Pass Inside_Depends to Check_Arrow.
5390         * style.ads: Add Inside_Depends parameter to Check_Arrow Add
5391         Inside_Depends parameter to Check_Unary_Plus_Or_Minus.
5392         * styleg.adb (Check_Arrow): Handle Inside_Depends case.
5393         (Check_Unary_Plus_Or_Minus): Handle Inside_Depends case.
5394         * styleg.ads: Add Inside_Depends parameter to Check_Arrow Add.
5395         Inside_Depends parameter to Check_Unary_Plus_Or_Minus.
5397 2014-07-31  Javier Miranda  <miranda@adacore.com>
5399         * s-vaflop.adb Move the body of function T_To_G before
5400         T_To_D. Required for frontend inlining.
5401         * inline.adb (Has_Excluded_Contract): New subprogram used to
5402         check if a subprogram inlined by the frontend has contracts
5403         which cannot be inlined.
5405 2014-07-31  Bob Duff  <duff@adacore.com>
5407         * s-traceb.adb, s-traceb-hpux.adb, s-traceb-mastop.adb:
5408         (Call_Chain): Add 1 to number of frames to skip, to account for
5409         the fact that there's one more frame on the stack.
5410         * gcc-interface/Makefile.in (s-traceb.o): Adjust rules.
5412 2014-07-31  Robert Dewar  <dewar@adacore.com>
5414         * checks.adb (Enable_Overflow_Check): More precise setting of
5415         Do_Overflow_Check flag for division.
5417 2014-07-31  Eric Botcazou  <ebotcazou@adacore.com>
5419         * exp_aggr.adb (Aggr_Assignment_OK_For_Backend): Reject packed
5420         array types with implementation type.
5422 2014-07-31  Hristian Kirtchev  <kirtchev@adacore.com>
5424         * sem_ch10.adb (Process_State): Remove local variable Name. Add
5425         local variable Decl. Partially declare an abstract state by
5426         generating an entity and storing it in the state declaration.
5427         * sem_prag.adb (Create_Abstract_State): Fully declare a
5428         semi-declared abstract state.
5430 2014-07-31  Robert Dewar  <dewar@adacore.com>
5432         * prj-nmsc.adb: Minor reformatting.
5434 2014-07-31  Bob Duff  <duff@adacore.com>
5436         * s-tasdeb.adb (System.Tasking.Debug): Remove
5437         all usage of the secondary stack from this package.
5439 2014-07-31  Hristian Kirtchev  <kirtchev@adacore.com>
5441         * freeze.adb (Freeze_Expression): Update the loop in charge
5442         of finding a proper insertion place for freeze nodes to handle
5443         N_Expression_With_Actions nodes.
5445 2014-07-31  Robert Dewar  <dewar@adacore.com>
5447         * sem_util.adb, a-ngelfu.ads, prj-nmsc.adb, prj-conf.adb: Minor
5448         reformatting.
5450 2014-07-31  Pascal Obry  <obry@adacore.com>
5452         * prj-nmsc.adb: Minor reformatting.
5454 2014-07-31  Ed Schonberg  <schonberg@adacore.com>
5456         * sem_util.adb (Has_Preelaborable_Initialization): Check that
5457         type is tagged before checking whether a user-defined Initialize
5458         procedure is present.
5460 2014-07-31  Gary Dismukes  <dismukes@adacore.com>
5462         * a-ngelfu.ads (Sqrt): Augment postcondition.
5464 2014-07-31  Pascal Obry  <obry@adacore.com>
5466         * prj-nmsc.adb (Check_Library_Attributes): An aggegate library
5467         directory and ALI directory must be different than all object
5468         and library directories of aggregated projects.
5470 2014-07-31  Vincent Celier  <celier@adacore.com>
5472         * prj-pars.adb, prj-conf.ads, prj-conf.adb (Locate_Runtime): Move spec
5473         to package body, as it is not called from outside. Remove argument
5474         Project_Tree, no longer used. When runtime cannot be found,
5475         call Raise_Invalid_Config instead of failing the program.
5477 2014-07-31  Robert Dewar  <dewar@adacore.com>
5479         * bindgen.adb (Gen_Output_File_Ada): Generate pragma Suppress
5480         (Overflow_Check).
5481         * gnatlink.adb (Process_Args): Remove generation of -gnato0,
5482         no longer needed.
5484 2014-07-31  Robert Dewar  <dewar@adacore.com>
5486         * gnat_ugn.texi: Document new switch -gnato0.
5487         * sem_ch3.ads: Minor reformatting.
5488         * gnatlink.adb (Process_Args): Compile bind file with -gnato0
5489         (we do not want overflow checks when incrementing elaboration
5490         counters).
5491         * einfo.ads: Minor reformatting.
5493 2014-07-31  Robert Dewar  <dewar@adacore.com>
5495         * exp_ch5.adb, freeze.adb, exp_ch3.adb: Minor comment correction.
5496         * s-arit64.adb: Minor reformatting.
5498 2014-07-31  Robert Dewar  <dewar@adacore.com>
5500         * gnat1drv.adb (Adjust_Global_Switches): Default for overflow
5501         checking is enabled except in GNAT_Mode.
5502         * switch-c.adb (Scan_Front_End_Switches): Implement -gnato0
5503         (suppress overflow checks).
5505 2014-07-31  Ed Schonberg  <schonberg@adacore.com>
5507         * exp_ch3.adb (Expand_Freeze_Record_Type): Do not build an
5508         invariant procedure for an internally generated subtype that is
5509         created for an object of a class-wide type.
5511 2014-07-31  Vincent Celier  <celier@adacore.com>
5513         * prj-nmsc.adb, errutil.adb: Make code similar to Errout.
5515 2014-07-31  Gary Dismukes  <dismukes@adacore.com>
5517         * gnat_rm.texi, sem_aux.ads, einfo.ads, sem_util.ads, sem_ch6.adb,
5518         exp_disp.adb: Minor reformatting.
5520 2014-07-31  Robert Dewar  <dewar@adacore.com>
5522         * exp_ch5.adb, sem_ch3.adb, exp_ch7.adb, exp_util.adb, exp_ch9.adb,
5523         sem_ch7.adb, checks.adb, s-exctra.adb, exp_ch6.adb, exp_disp.adb,
5524         exp_dist.adb, sem_ch13.adb, exp_strm.adb, exp_ch3.adb: Minor
5525         reformatting.
5527 2014-07-31  Robert Dewar  <dewar@adacore.com>
5529         * sem_ch13.adb: Minor reformatting.
5531 2014-07-31  Ed Schonberg  <schonberg@adacore.com>
5533         * exp_ch3.adb (Build_Invariant_Checks): If the enclosing record
5534         is an unchecked_union, warn that invariants will not be checked
5535         on components that have them.
5537 2014-07-31  Robert Dewar  <dewar@adacore.com>
5539         * freeze.adb (Freeze_Entity): Check for error of
5540         Type_Invariant'Class applied to a untagged type.
5541         * sem_ch6.adb (Analyze_Null_Procedure): Unconditionally rewrite
5542         as null body, so that we perform error checks even if expansion
5543         is off.
5545 2014-07-31  Ed Schonberg  <schonberg@adacore.com>
5547         * sem_ch13.adb (Build_Invariant_Procedure): If body of procedure
5548         is already present, nothing to do.
5549         * exp_ch3.adb (Build_Component_Invariant_Call): For an access
5550         component, check whether the access type has an invariant before
5551         checking the designated type.
5552         (Build_Record_Invariant_Proc): Change suffix of generated
5553         name to prevent ambiguity when record type has invariants
5554         in addition to those of components, and two subprograms are
5555         constructed. Consistent with handling of array types.
5556         (Insert_Component_Invariant_Checks): Build invariant procedure
5557         body when one has not been created yet, in the case of composite
5558         types that are completions and whose full declarations carry
5559         invariants.
5561 2014-07-30  Thomas Quinot  <quinot@adacore.com>
5563         * gnat_rm.texi: Minor doc fixes.
5565 2014-07-30  Robert Dewar  <dewar@adacore.com>
5567         * a-rbtgbo.adb, sem_ch13.adb: Minor reformatting.
5569 2014-07-30  Vincent Celier  <celier@adacore.com>
5571         * errutil.adb (Set_Msg_Text): Process tilde ('~'): no processing
5572         of error message.
5573         * prj-nmsc.adb (Locate_Directory): Use a tilde ('~') in the
5574         message to report that a directory cannot be created, to avoid
5575         processing of the directory path that may contains special
5576         insertion characters.
5578 2014-07-30  Ed Schonberg  <schonberg@adacore.com>
5580         * a-crdlli.ads: Place declaration of Empty_List after full type
5581         declaration for Curosr, to prevent freezing error.
5583 2014-07-30  Robert Dewar  <dewar@adacore.com>
5585         * get_targ.adb: Minor code reorganization.
5586         * prj-proc.adb, prj-proc.ads, get_targ.ads, sem_ch6.adb: Minor
5587         reformatting.
5589 2014-07-30  Ed Schonberg  <schonberg@adacore.com>
5591         * a-cbhase.adb: a-cbhase.adb (Insert): Raise Constraint_Error,
5592         not Program_Error, when attempting to remove an element not in
5593         the set. This is the given semantics for all set containers.
5595 2014-07-30  Ed Schonberg  <schonberg@adacore.com>
5597         * a-rbtgbo.adb (Delete_Node_Sans_Free): If
5598         element is not present in tree return rather than violating
5599         an assertion. Constraint_Error will be raised in the caller if
5600         element is not in the container.
5602 2014-07-30  Arnaud Charlet  <charlet@adacore.com>
5604         * set_targ.adb (Read_Target_Dependent_Values): New subprogram.
5605         (elab body): Add provision for default target config file.
5606         * get_targ.ads, get_targ.adb (Get_Back_End_Config_File): New subprogram.
5608 2014-07-30  Ed Schonberg  <schonberg@adacore.com>
5610         * a-cbhase.adb (Delete): Raise Constraint_Error, not Program_Error,
5611         when attempting to remove an element not in the set. This is
5612         the given semantics for all set containers.
5613         * a-cborse.adb (Delete): Attempt removal first, to check for
5614         tampering, before checking whether this is an attempt to
5615         delete a  non-existing element, and in fthe latter case raise
5616         Constraint_Error.
5618 2014-07-30  Vincent Celier  <celier@adacore.com>
5620         * prj-proc.adb (Recursive_Process): Do not create a new
5621         Project_Id if the project is already in the list of projects of
5622         the tree.
5624 2014-07-30  Ed Schonberg  <schonberg@adacore.com>
5626         * sem_ch6.adb (Analyze_Function_Return): Reject a return expression
5627         whose type is an incomplete formal type.
5628         (Analyze_Return_Type): Reject a return type that is an untagged
5629         imcomplete formal type.
5630         (Process_Formals): Reject a formal parameter whose type is an
5631         untagged formal incomplete type.
5632         * sem_res.adb (Resolve_Actuals): Reject an actual whose type is
5633         an untagged formal incomplete type.
5635 2014-07-30  Robert Dewar  <dewar@adacore.com>
5637         * gnat_ugn.texi: Minor spelling correction.
5638         * makeutl.adb: Minor code reorganization.
5639         * exp_ch4.adb, exp_aggr.adb, exp_ch3.adb: Minor reformatting.
5641 2014-07-30  Robert Dewar  <dewar@adacore.com>
5643         * einfo.ads (Has_Unchecked_Union): Document that this is used
5644         to check for illegal Valid_Scalars attribute references.
5645         * exp_attr.adb (Build_Record_VS_Func): New function
5646         (Expand_N_Attribute_Reference, case Valid_Scalars): Call this
5647         function.
5648         * gnat_rm.texi: Document 'Valid_Scalars cannot be applied to
5649         Unchecked_Union Add note on 'Valid_Scalars generating a lot
5650         of code.
5651         * sem_attr.adb (Analyze_Attribute, case Valid_Scalars): Give
5652         error on attempt to apply Valid_Scalars to Unchecked_Union type.
5654 2014-07-30  Steve Baird  <baird@adacore.com>
5656         * exp_ch4.adb (Expand_N_Indexed_Component): Disable optimized handling
5657         of A(I..J)(K) in CodePeer_Mode.
5659 2014-07-30  Ben Brosgol  <brosgol@adacore.com>
5661         * gnat_ugn.texi: Fix typo.
5663 2014-07-30  Thomas Quinot  <quinot@adacore.com>
5665         * lib-writ.ads: document format change.
5667 2014-07-30  Pascal Obry  <obry@adacore.com>
5669         * prj-util.adb (For_Interface_Sources): Do not
5670         include sources from withed externally built projects.
5672 2014-07-30  Robert Dewar  <dewar@adacore.com>
5674         * lib.adb: Minor reformatting.
5675         * prj-util.adb: Minor reformatting.
5677 2014-07-30  Ed Schonberg  <schonberg@adacore.com>
5679         * exp_aggr.adb (Build_Record_Aggr_Code): For an array component
5680         that depends on discriminants, and which is given by an others
5681         clause, create an explicit subtype with the discriminant values
5682         of the enclosing aggregate, because the backend cannot otherwise
5683         retrieve the actual bounds of the array.
5685 2014-07-30  Fedor Rybin  <frybin@adacore.com>
5687         * gnat_ugn.texi: Improve gnattest documentation.
5689 2014-07-30  Pascal Obry  <obry@adacore.com>
5691         * makeutl.adb (Insert_Project_Sources): Properly handle sources
5692         that are aggregated. We want to include sources not only part
5693         of libraries but also if part of an aggregated project from an
5694         aggregate library.
5695         * prj.adb (For_Project_And_Aggregated_Context): Properly check
5696         state of root project.
5698 2014-07-30  Thomas Quinot  <quinot@adacore.com>
5700         * lib-load.ads: Minor reformatting.
5701         * sinfo.ads (Library_Unit): Update comment.
5702         * lib.ads (Notes): Simplify. The Unit component in Notes_Entry
5703         is redundant. Instead used the pragma Node_Id directly as the
5704         element type.
5706 2014-07-30  Thomas Quinot  <quinot@adacore.com>
5708         * lib.adb (Store_Note): Store only notes that do not come from
5709         an instance, and that are in the extended main source unit.
5710         * lib-writ (Write_Unit_Information): Annotations from subunits
5711         must be emitted along with those for the main unit, and they
5712         must carry a specific file name.
5713         * ali.ads (Notes_Record): Use a File_Name_Type instead of a
5714         Unit_Id for the source file containing the pragma, as in the
5715         case of annotations from subunits we might not have a readily
5716         available unit id.
5717         * ali.adb (Scan_ALI): Account for above change in data structure.
5719 2014-07-30  Vincent Celier  <celier@adacore.com>
5721         * makeutl.adb (Insert_Project_Sources): When the library project
5722         is an aggregate Stand-Alone Library, insert in the queue the
5723         Ada interface units, with Closure set to True;
5725 2014-07-30  Eric Botcazou  <ebotcazou@adacore.com>
5727         * sem_util.adb: Fix minor typo.
5728         * makeutl.adb: Minor reformatting.
5730 2014-07-30  Robert Dewar  <dewar@adacore.com>
5732         * exp_ch7.adb, checks.adb, makeutl.adb, makeutl.ads: Minor reformatting.
5734 2014-07-30  Yannick Moy  <moy@adacore.com>
5736         * checks.ads: Fix typo in comment.
5738 2014-07-30  Pierre-Marie Derodat  <derodat@adacore.com>
5740         * sem_util.adb (Set_Debug_Info_Needed): For scalar types, recurse on
5741         entities that materialize range bounds, if any.
5743 2014-07-30  Vincent Celier  <celier@adacore.com>
5745         * projects.texi: Minor spelling fix.
5747 2014-07-30  Hristian Kirtchev  <kirtchev@adacore.com>
5749         * checks.adb (Make_Bignum_Block): Use the new secondary stack
5750         build routines to manage the mark.
5751         * exp_ch7.adb (Create_Finalizer, Expand_Cleanup_Actions):
5752         Use the new secodary stack build routines to manage the mark.
5753         (Insert_Actions_In_Scope_Around): Add new formal parameter
5754         Manage_SS along with comment on its usage. Code and comment
5755         reformatting. Mark and release the secondary stack when the
5756         context warrants it.
5757         (Make_Transient_Block): Update the call
5758         to Insert_Actions_In_Scope_Around to account for parameter Manage_SS.
5759         (Wrap_Transient_Declaration): Remove local variable
5760         Uses_SS. Ensure that the secondary stack is marked and released
5761         when the related object declaration appears in a library level
5762         package or package body. Code and comment reformatting.
5763         * exp_util.ads, exp_util.adb (Build_SS_Mark_Call): New routine.
5764         (Build_SS_Release_Call): New routine.
5766 2014-07-30  Steve Baird  <baird@adacore.com>
5768         * exp_attr.adb: Revert previous change, not needed after all.
5770 2014-07-30  Vincent Celier  <celier@adacore.com>
5772         * makeutl.adb (Queue.Insert_Project_Sources): Insert with
5773         Closure => True for interfaces of Stand-Alone Libraries.
5774         * makeutl.ads (Source_Info (Format => Gprbuild)): Add new
5775         Boolean component Closure, defaulted to False.
5777 2014-07-30  Yannick Moy  <moy@adacore.com>
5779         * sem_res.adb: Fix typo in error message.
5781 2014-07-30  Robert Dewar  <dewar@adacore.com>
5783         * sem_ch3.adb (Process_Range_Expr_In_Decl): Use _FIRST/_LAST
5784         as name suffixes rather than L/H for subtype bounds.
5785         * tbuild.ads: Minor comment improvements and fixes
5786         (Make_External_Name): Document that suffix can start with an
5787         underscore.
5789 2014-07-30  Bob Duff  <duff@adacore.com>
5791         * gnat_ugn.texi: Document --rep-clauses switch.
5793 2014-07-30  Ed Schonberg  <schonberg@adacore.com>
5795         * sem_ch13.adb (Analyze_Aspect_Specifications): Default_Value and
5796         Default_Component_Value can only be specified for scalar type or
5797         arrays of scalar types respectively.  This legality check must
5798         be performed at the point the aspect is analyzed, in order to
5799         reject aspect specifications that apply to a partial view.
5801 2014-07-30  Thomas Quinot  <quinot@adacore.com>
5803         * freeze.adb: Minor reformatting.
5805 2014-07-30  Robert Dewar  <dewar@adacore.com>
5807         * exp_attr.adb (Expand_Attribute, case First/Last): Don't expand in
5808         codepeer mode.
5810 2014-07-30  Ed Schonberg  <schonberg@adacore.com>
5812         * freeze.adb (Check_Expression_Function): At the freeze point
5813         of an expression function, verify that the expression in the
5814         function does not contain references to any deferred constants
5815         that have no completion yet.
5816         (Freeze_Expression, Freeze_Before): call
5817         Check_Expression_Function.
5818         * a-ciorse.ads: Add Reference_Control_Type to detect tampering.
5819         * a-ciorse.adb: Add Adjust and Finalize routines for
5820         Reference_Control_Type. Use it in the construction of Reference
5821         and Constant_Reference values.
5823 2014-07-30  Robert Dewar  <dewar@adacore.com>
5825         * exp_aggr.adb: Update comments.
5826         * a-chtgbo.adb, a-chtgbo.ads, a-cbhase.adb, a-cbhase.ads: Minor
5827         reformatting.
5829 2014-07-30  Robert Dewar  <dewar@adacore.com>
5831         * cstand.adb (New_Standard_Entity): New version takes name
5832         string to call Make_Name.
5833         (Create_Standard): Use this routine to set name before setting other
5834         fields.
5836 2014-07-30  Robert Dewar  <dewar@adacore.com>
5838         * exp_attr.adb (Expand_Attribute, case First): Rewrite simple
5839         entity reference.
5840         (Expand_Attribute, case Last): Ditto.
5841         * exp_ch3.adb (Constrain_Index): New calling sequence for
5842         Process_Range_Expr_In_Decl.
5843         (Expand_N_Object_Declaration): Avoid setting Is_Known_Valid in one
5844         problematical case.
5845         * sem_ch3.adb (Constrain_Index): New calling sequence for
5846         Process_Range_Expr_In_Decl.
5847         (Set_Scalar_Range_For_Subtype): ditto.
5848         (Process_Range_Expr_In_Decl): Create constants to hold bounds for
5849         subtype.
5850         * sem_ch3.ads (Process_Range_Expr_In_Decl): Add Subtyp parameter.
5851         * sem_eval.adb (Compile_Time_Compare): Make sure we use base
5852         types if we are not assuming no invalid values.
5854 2014-07-30  Robert Dewar  <dewar@adacore.com>
5856         * clean.adb: Minor reformatting.
5857         * opt.ads: Minor fix to incorrect comment.
5859 2014-07-30  Ed Schonberg  <schonberg@adacore.com>
5861         * a-chtgbo.ads, a-chtgbo.adb (Delete_Node_At_Index): New
5862         subprogram, used by bounded hashed sets, to delete a node at
5863         a given index, whose element may have been improperly updated
5864         through a Reference_Preserving key.
5865         * a-cbhase.ads: Add Reference_Control_Type to package Generic_Keys.
5866         * a-cbhase.adb: Add Adjust and Finalize routines for
5867         Reference_Control_Type.
5868         (Delete, Insert): Raise Program_Error, not Constraint_Error,
5869         when operation is illegal.
5870         (Reference_Preserving_Key): Build aggregate for Reference_Control_Type
5871         * a-cmbutr.ads: Add Reference_Control_Type to detect tampering. Add
5872         private with_clause for Ada.Finalization.
5873         * a-cbmutr.adb: Add Adjust and Finalize routines for
5874         Reference_Control_Type. Use it in the construction of Reference
5875         and Constant_Reference values.
5877 2014-07-30  Robert Dewar  <dewar@adacore.com>
5879         * sem_ch3.adb, sem_ch3.ads: Minor code reorganization.
5881 2014-07-30  Pascal Obry  <obry@adacore.com>
5883         * clean.adb (Clean_Project): Properly check for directory
5884         existence before trying to enter it.
5886 2014-07-30  Robert Dewar  <dewar@adacore.com>
5888         * sem_ch3.ads, prj.ads, prj-nmsc.adb: Minor reformatting.
5890 2014-07-30  Robert Dewar  <dewar@adacore.com>
5892         * par-ch5.adb (P_Sequence_Of_Statements): Properly handle
5893         missing semicolon after name.
5895 2014-07-30  Pascal Obry  <obry@adacore.com>
5897         * prj.ads (Gprinstall_Flags): New constant.
5898         * prj-nmsc.adb (Check_Library_Attributes): Do not fails for
5899         missing library dir if Directories_Must_Exist_In_Projects
5900         is false.
5902 2014-07-30  Bob Duff  <duff@adacore.com>
5904         * a-except-2005.adb, a-except.adb: Remove obsolete comments.
5905         * s-traceb.ads: Updagte comments.
5907 2014-07-30  Robert Dewar  <dewar@adacore.com>
5909         * checks.adb, a-cihase.adb, a-cihase.ads, a-chtgop.adb, a-chtgop.ads,
5910         a-except.adb, a-except-2005.adb, a-cborse.adb, a-cborse.ads,
5911         a-exexda.adb, a-elchha.adb, exp_aggr.adb, a-cohase.adb: Minor
5912         reformatting.
5914 2014-07-30  Ed Schonberg  <schonberg@adacore.com>
5916         * a-chtgop.ads, a-chtgop.adb (Delete_Node_At_Index): New
5917         subprogram, used by all versions of hashed sets, to delete a node
5918         whose element has been improperly updated through a Reference_
5919         Preserving key.
5920         * a-cohase.adb: Remove Delete_Node, use new common procedure
5921         Delete_Node_At_Index.
5922         * a-cihase.ads: Add Reference_Control_Type to package Generic_Keys.
5923         * a-cihase.adb: Add Adjust and Finalize routines for
5924         Reference_Control_Type.
5925         (Reference_Preserving_Key): Build aggregate for
5926         Reference_Control_Type
5928 2014-07-30  Yannick Moy  <moy@adacore.com>
5930         * checks.adb, checks.ads (Determine_Range_R): New procedure to
5931         determine the possible range of a floating-point expression.
5933 2014-07-30  Ed Schonberg  <schonberg@adacore.com>
5935         * a-cborse.ads: Add Reference_Control_Type to package Generic_Keys.
5936         * a-cborse.adb: Add Adjust and Finalize routines for
5937         Reference_Control_Type.
5938         (Reference_Preserving_Key): Build aggregate for
5939         Reference_Control_Type.
5940         (Delete): Check for tampering, and raise Program_Error (not
5941         Constraint_Error) when attempting to delete an element not in
5942         the set.
5943         (Insert): Ditto.
5945 2014-07-30  Bob Duff  <duff@adacore.com>
5947         * a-elchha.adb, a-except-2005.adb, a-except.adb, a-exexda.adb,
5948         * a-exextr.adb, a-exstat.adb, exp_intr.ads, s-tassta.adb:
5949         Exception_Information is used to produce useful debugging
5950         information for the programmer. However, it was also used to
5951         implement the stream attributes for type Exception_Occurrence. The
5952         latter requires a stable and portable interface, which meant
5953         that we couldn't include a symbolic traceback. A separate set of
5954         routines was used to provide symbolic tracebacks under program
5955         control (i.e. not automatically). The goal of this ticket is
5956         to provide such automatic tracebacks, so the change here is to
5957         split the two functionalities: Exception_Information gives the
5958         maximally useful information for debugging (i.e. it now includes
5959         a symbolic traceback when a decorator is set, and it can be
5960         improved freely in the future without disturbing streaming).
5961         Untailored_Exception_Information always uses hexadecimal addresses
5962         in the traceback, has a stable and portable output, and is now
5963         used for streaming.
5965 2014-07-30  Eric Botcazou  <ebotcazou@adacore.com>
5967         * exp_aggr.adb (Expand_Array_Aggregate): Add missing test
5968         on the target of the assignment to find out whether it
5969         can be directly done by the back-end.
5970         * exp_util.adb (Is_Possibly_Unaligned_Slice): Remove obscure test.
5972 2014-07-30  Robert Dewar  <dewar@adacore.com>
5974         * inline.adb, a-coorse.adb, a-coorse.ads, a-cohase.adb, a-cohase.ads,
5975         a-tasatt.adb: Minor reformatting.
5977 2014-07-30  Robert Dewar  <dewar@adacore.com>
5979         * exp_ch4.adb: Minor reformatting.
5981 2014-07-30  Ed Schonberg  <schonberg@adacore.com>
5983         * a-coorse.adb, a-coorse.ads (Generic_Keys): Add a
5984         Reference_Control_Type to generic package, to keep additional
5985         information for Reference_Types that manipulate keys. Add Adjust and
5986         Finalize procedures for this type.
5987         (Finalize): When finalizing a reference_preserving_key, verify
5988         that the key of the new value is equivalent to the key of the
5989         original element, raise Program_Error otherwise.
5990         (Insert): Detect tampering.
5991         (Reference_Preserving_Key): Build proper Reference_Control_Type,
5992         and update Busy and Lock bits to detect tampering.
5993         * a-cohase.ads: Keep with-clause private.
5995 2014-07-30  Hristian Kirtchev  <kirtchev@adacore.com>
5997         * exp_ch4.adb (Expand_N_Op_Eq): Emit a warning when the operands
5998         of an equality are of an Unchecked_Union type and lack inferable
5999         discriminants.
6001 2014-07-30  Bob Duff  <duff@adacore.com>
6003         * g-exctra.adb, g-exctra.ads, s-exctra.adb, s-exctra.ads, Makefile.rtl,
6004         g-trasym.adb, g-trasym.ads, s-trasym.adb, s-trasym.ads: Move
6005         GNAT.Traceback.Symbolic and GNAT.Exception_Traces into the System
6006         hierarchy (System.Traceback.Symbolic and System.Exception_Traces), so
6007         we can call them from the runtimes. Leave renamings in place under GNAT.
6009 2014-07-30  Yannick Moy  <moy@adacore.com>
6011         * inline.adb (Check_And_Build_Body_To_Inline): Include code for
6012         inlining in GNATprove mode.
6014 2014-07-30  Ed Schonberg  <schonberg@adacore.com>
6016         * a-cohase.adb, a-cohase.ads (Generic_Keys): Add a
6017         Reference_Control_Type to generic package, to keep additional
6018         information for Reference_Types that manipulate keys. Add Adjust and
6019         Finalize procedures for this type.
6020         (Delete_Node): New procedure called when finalizing a
6021         Reference_Control_Type, to remove a node whose element has been
6022         improperly updated through a Reference.
6023         (Insert): Detect tampering.
6024         (Reference_Preserving_Key): Build proper Reference_Control_Type,
6025         and update Busy and Lock bits to detect tampering.
6027 2014-07-30  Bob Duff  <duff@adacore.com>
6029         * exp_intr.ads: Minor comment fix.
6031 2014-07-30  Gary Dismukes  <dismukes@adacore.com>
6033         * exp_prag.adb, a-tags.ads: Minor typo fixes.
6035 2014-07-30  Bob Duff  <duff@adacore.com>
6037         * a-excach.adb, a-excach-cert.adb, a-except-2005.ads,
6038         a-except.ads, g-traceb.adb, memtrack.adb,
6039         s-traceb.adb, s-traceb.ads, s-traceb-hpux.adb, s-traceb-mastop.adb:
6040         Cleanup: Make the three versions of System.Traceback.Call_Chain
6041         have the same interface. Use an array for the Traceback parameter
6042         instead of an Address.  This will enable reduction in code
6043         duplication.
6045 2014-07-30  Pat Rogers  <rogers@adacore.com>
6047         * gnat_ugn.texi: Corrected minor textual error in description
6048         of switch -gnatwl.
6050 2014-07-30  Bob Duff  <duff@adacore.com>
6052         * Makefile.rtl: Sort file names.
6054 2014-07-30  Arnaud Charlet  <charlet@adacore.com>
6056         * a-tasatt.adb: Complete previous change: kill spurious warning
6057         on e.g. sparc, and make sure we only use the fast path when the
6058         alignment is compatible.
6060 2014-07-30  Yannick Moy  <moy@adacore.com>
6062         * sem_ch6.adb (Analyze_Subprogram_Body_Helper): Mark new Spec_Id as
6063         coming from source.
6065 2014-07-30  Yannick Moy  <moy@adacore.com>
6067         * inline.adb (Build_Body_To_Inline): Issue more precise messages
6068         for declarations that prevent inlining.
6069         (Cannot_Inline): Change usual start of message to refer to contextual
6070         analysis in GNATprove mode.
6071         * sem_res.adb (Resolve_Call): Change usual start of message to
6072         refer to contextual analysis in GNATprove mode, when inlining
6073         not possible.
6075 2014-07-30  Robert Dewar  <dewar@adacore.com>
6077         * sem_res.adb, sem_ch6.adb: Minor code reorganization.
6078         * inline.adb: Minor reformatting.
6080 2014-07-30  Javier Miranda  <miranda@adacore.com>
6082         * a-tags.ads: Add comments.
6084 2014-07-30  Pat Rogers  <rogers@adacore.com>
6086         * gnat_rm.texi: Minor word error.
6088 2014-07-30  Ed Schonberg  <schonberg@adacore.com>
6090         * exp_prag.adb (Expand_Old): Insert declarationss of temporaries
6091         created to capture the value of the prefix of 'Old at the
6092         beginning of the current declarative part, to prevent data flow
6093         anomalies in the postcondition procedure that will follow.
6095 2014-07-30  Yannick Moy  <moy@adacore.com>
6097         * debug.adb: Retire debug flag -gnatdQ.
6098         * inline.adb (Can_Be_Inlined_In_GNATprove_Mode): Check SPARK_Mode
6099         on decl, not on body.  Ignore predicate functions.
6100         * sem_ch6.adb (Analyze_Subprogram_Body_Helper): Remove use of
6101         debug flag -gnatdQ.  Correctly analyze SPARK_Mode on decl and
6102         body when generating a decl for a body on which SPARK_Mode aspect
6103         is given.
6104         * sem_prag.adb (Analyze_Pragma|SPARK_Mode): Reorder tests for
6105         attaching pragma to entity, to account for declaration not coming
6106         from source.
6107         * sem_res.adb (Resolve_Call): Issue warning and flag subprogram
6108         as not always inlined in GNATprove mode, when called in an
6109         assertion context.
6111 2014-07-30  Vincent Celier  <celier@adacore.com>
6113         * debug.adb: Minor comment update.
6115 2014-07-30  Robert Dewar  <dewar@adacore.com>
6117         * s-tasuti.adb, s-tassta.adb: Minor reformatting.
6118         * sprint.adb (Sprint_Node): Handle N_Contract case.
6119         * exp_prag.adb: Minor reformatting.
6120         * freeze.adb (Freeze_Entity): Check useless postcondition for
6121         No_Return subprogram.
6122         * sem_prag.adb: Minor reformatting.
6124 2014-07-30  Javier Miranda  <miranda@adacore.com>
6126         * a-tags.ads: Complete comments about performance.
6128 2014-07-30  Fedor Rybin  <frybin@adacore.com>
6130         * gnat_ugn.texi: Adding description for --exit-status option to
6131         gnattest section.  Fixing index entry of --passed-tests option
6132         in gnattest section.
6134 2014-07-30  Javier Miranda  <miranda@adacore.com>
6136         * Makefile.rtl, gnat_rm.texi, i-cpp.adb, i-cpp.ads, impunit.adb,
6137         rtsfind.ads: Remove references to package Interfaces.CPP since this
6138         package is no longer needed.
6140 2014-07-30  Bob Duff  <duff@adacore.com>
6142         * s-taasde.adb (Timer_Queue): Don't use a
6143         build-in-place function call to initialize the Timer_Queue.
6144         * s-traent.adb, s-traent.ads, s-traent-vms.adb, s-traent-vms.ads:
6145         Turn off polling in these units, because otherwise we get
6146         elaboration circularities with Ada.Exceptions when the -gnatP
6147         switch is used.
6148         * s-tassta.adb (Create_Task): Make sure independent tasks
6149         are created with Parent = Environment_Task. This was not true,
6150         for example, in s-interr.adb, when Interrupt_Manager does "new
6151         Server_Task"; the Server_Task had Parent = Interrupt_Manager,
6152         which is wrong because the master is determined by the access
6153         type, which is at library level.
6154         * s-tasuti.adb (Make_Independent): Avoid setting Parent; it is
6155         now set correctly by Create_Task.
6156         (Make_Passive): Remove the workaround for the race condition in
6157         Make_Independent.
6158         * frontend.adb (Frontend): Revert to previous method of detecting
6159         temporary configuration pragma files, recognizing such files by
6160         ".tmp" in the name. This is more general than detecting pragmas
6161         Source_File_Name_Project, because it allows any tool to use
6162         this naming convention, no matter the content of the file.
6163         * gnat_ugn.texi: Document this naming convention.
6165 2014-07-30  Robert Dewar  <dewar@adacore.com>
6167         * exp_ch7.adb, s-tataat.adb, s-tataat.ads, s-parame-vms-alpha.ads,
6168         inline.adb, s-parame-hpux.ads, exp_smem.adb, s-tasini.adb,
6169         s-tasini.ads, s-parame-vms-ia64.ads, s-parame.ads, s-taskin.ads,
6170         s-parame-vxworks.ads, a-tasatt.adb, a-tasatt.ads: Minor reformatting.
6171         * a-suenco.adb (Convert): Handle overlong encodings in UTF8-UTF8
6172         conversion.
6174 2014-07-30  Ed Schonberg  <schonberg@adacore.com>
6176         * sem_ch5.adb: Improve error recovery.
6177         * inline.adb (Build_Body_To_Inline): Set Full_Analysis to false
6178         before analyzing the body, so that in GNATprove mode there is
6179         no light expansion. Whatever expansion is required by SPARK will
6180         be performed when analysing the inlined code.
6182 2014-07-30  Bob Duff  <duff@adacore.com>
6184         * s-tataat.adb, s-tataat.ads, a-tasatt.adb: Minor comment fixes.
6186 2014-07-30  Ed Schonberg  <schonberg@adacore.com>
6188         * sem_ch5.adb (Analyze_Loop_Statement): If loop has a label,
6189         verify that it is not hidden by an inner implicit declaration.
6191 2014-07-30  Thomas Quinot  <quinot@adacore.com>
6193         * sem.ads (Scope_Table_Entry): New component Locked_Shared_Objects.
6194         * sem_ch8.adb (Push_Scope): Initialize Locked_Shared_Objects.
6195         * exp_smem.adb (Add_Shared_Var_Lock_Procs): Handle the case where
6196         the call returns an unconstrained type: in this case there is
6197         already a transient scope, and we should not establish a new one.
6198         * exp_ch7.adb (Insert_Actions_In_Scope_Around): New formal Clean. If
6199         True, also insert cleanup actions in the tree.
6200         (Wrap_Transient_Declaration): Call Insert_Actions_In_Scope_Around
6201         with Clean set True.
6203 2014-07-30  Arnaud Charlet  <charlet@adacore.com>
6205         * s-taskin.ads (Direct_Index, Direct_Index_Range,
6206         Direct_Attribute_Element, Direct_Attribute_Array,
6207         Direct_Index_Vector, Direct_Attributes, Is_Defined,
6208         Indirect_Attributes): Removed.  (Atomic_Address,
6209         Attribute_Array, Attributes): New.
6210         * s-tasini.ads, s-tasini.adb (Proc_T, Initialize_Attributes,
6211         Finalize_Attributes_Link, Initialize_Attributes_Link): Removed.
6212         (Finalize_Attributes): Reimplement.
6213         * s-tassta.adb (Create_Task): Remove call to
6214         Initialize_Attributes_Link (Free_Task, Vulnerable_Free_Task):
6215         Replace Finalize_Attributes_Link by Finalize_Attributes.
6216         * a-tasatt.ads, a-tasatt.adb, s-tataat.ads, s-tataat.adb:
6217         Reimplement from scratch, using a simpler and more efficient
6218         implementation.
6219         * s-tporft.adb (Register_Foreign_Thread): Remove now obsolete comment.
6220         * s-parame.ads, s-parame-hpux.ads,
6221         * s-parame-vms-alpha.ads, s-parame-vms-ia64.ads,
6222         * s-parame-vxworks.ads (Max_Attribute_Count): New, replace
6223         Default_Attribute_Count.
6225 2014-07-30  Olivier Hainque  <hainque@adacore.com>
6227         * vxworks-ppc-link.spec: New file. Extra link
6228         instructions for ppc-vxworks.
6229         * vxworks-crtbe-link.spec: Likewise, for ZCX related support.
6230         * system-vxworks-ppc.ads: Adjust linker options to use spec files.
6231         * system-vxworks-arm.ads: Likewise.
6232         * gcc-interface/Makefile.in: Enable .spec files.
6234 2014-07-30  Ed Schonberg  <schonberg@adacore.com>
6236         * sem_aggr.adb: Minor comment reformatting.
6238 2014-07-30  Robert Dewar  <dewar@adacore.com>
6240         * sem_util.ads, sem_util.adb (Is_Junk_Name): Removed.
6241         * sem_warn.adb (Has_Junk_Name): New function
6242         (Check_References): Use Has_Junk_Name to delete junk warnings
6243         (Check_Unset_Reference): ditto.
6244         (Warn_On_Unreferenced_Entity): ditto.
6245         (Warn_On_Useless_Assignment): ditto.
6247 2014-07-30  Ed Schonberg  <schonberg@adacore.com>
6249         * checks.adb (Insert_Valid_Check): Do not check for the packed
6250         array type of a prefix that is an access type.
6252 2014-07-30  Ed Schonberg  <schonberg@adacore.com>
6254         * sem_attr.adb (Eval_Attribute): Evaluate the GNAT attribute
6255         Unconstrained_Array even if prefix is not frozen yet, as can
6256         occur with a private subtype used as a generic actual.
6258 2014-07-30  Gary Dismukes  <dismukes@adacore.com>
6260         * sem_attr.adb: Minor reformatting.
6262 2014-07-30  Pat Rogers  <rogers@adacore.com>
6264         * gnat_rm.texi: Corrected minor wording error in description
6265         of No_Exception_Registration.
6267 2014-07-30  Yannick Moy  <moy@adacore.com>
6269         * einfo.ads, einfo.adb: New flag Is_Inlined_Always for use in GNATprove
6270         mode. Realphabetize two subprograms.
6271         * inline.adb (Cannot_Inline): Use Is_Inlined_Always in GNATprove mode.
6272         (Can_Be_Inlined_In_GNATprove_Mode): Adapt to possible Empty Body_Id.
6273         (Check_And_Build_Body_To_Inline): Use Is_Inlined_Always in GNATprove
6274         mode.
6275         (Expand_Inline_Call): Use Is_Inlined_Always in GNATprove mode.
6276         * sem_ch6.adb (Analyze_Subprogram_Body_Helper): Do not use
6277         Is_Inline in GNATprove mode.
6278         (Analyze_Subprogram_Specification):
6279         Set Is_Inlined_Always at subprogram entity creation.
6280         * sem_res.adb (Resolve_Call): Do not deal with inlining during
6281         pre-analysis.  Issue warning on call to possibly inlined
6282         subprogram when body not seen.
6284 2014-07-30  Yannick Moy  <moy@adacore.com>
6286         * lib-xref.adb (Generate_Reference): Add special
6287         case for compiler-generated formals in GNATprove mode.
6289 2014-07-30  Yannick Moy  <moy@adacore.com>
6291         * sem_ch6.adb: Add comments.
6293 2014-07-30  Thomas Quinot  <quinot@adacore.com>
6295         * s-os_lib.ads (GM_Time_Of): Clarify documentation.
6297 2014-07-30  Robert Dewar  <dewar@adacore.com>
6299         * sem_aggr.adb, sem_res.adb: Minor reformatting.
6301 2014-07-30  Thomas Quinot  <quinot@adacore.com>
6303         * sem_ch13.adb (Analyze_Attribute_Definition_Clause, case
6304         Bit_Order): Set Reverse_Bit_Order on the base type of the
6305         specified first subtype.
6307 2014-07-30  Ed Schonberg  <schonberg@adacore.com>
6309         * inline.adb (Expand_Inlined_Call): Use a renaming declaration
6310         to capture the value of actuals of a limited type rather than
6311         an object declaration, to prevent spurious errors when analyzing
6312         the inlined body.
6314 2014-07-30  Ed Schonberg  <schonberg@adacore.com>
6316         * sem_ch4.adb (Analyze_Type_Conversion): Treat an inlined body
6317         as an instance, and inhibit semantic checks on already analyzed
6318         code to prevent spurious errors.
6320 2014-07-30  Arnaud Charlet  <charlet@adacore.com>
6322         * a-exctra.ads ("="): New function, to restore compatibility.
6324 2014-07-30  Pascal Obry  <obry@adacore.com>
6326         * adaint.c (__gnat_to_os_time): Set isdst to -1 for the mktime
6327         routine to use the OS dst setting.
6329 2014-07-30  Pat Rogers  <rogers@adacore.com>
6331         * gnat_ugn.texi: Minor correction to description of -gnatw.K.
6333 2014-07-30  Ed Schonberg  <schonberg@adacore.com>
6335         * sem_util.adb (Wrong_Type): Disable some checks equally within
6336         instances and within inlined bodies, to suppress spurious type
6337         errors on already analyzed code.
6338         * sem_aggr.adb (Check_Expr_OK_In_Limited_Aggregate): Expression
6339         is legal in an inlined body, juts as it is in an instance body.
6341 2014-07-30  Ed Schonberg  <schonberg@adacore.com>
6343         * sem_res.adb (Resolve_Unchecked_Conversion): Within an inlined
6344         body the operand of an unchecked conversion may be a literal, in
6345         which case its type is the target type of the conversion. This
6346         is in contrast to conversions in other contexts, where the
6347         operand cannot be a literal and must be resolvable independent
6348         of the context.
6350 2014-07-30  Pierre-Marie Derodat  <derodat@adacore.com>
6352         * gcc-interface/decl.c (gnat_to_gnu_entity) <object>: Create a
6353         mere scalar constant instead of a reference for a renaming of
6354         scalar literal.
6355         * gcc-interface/utils.c (renaming_from_generic_instantiation_p): New.
6356         * gcc-interface/gigi.h (renaming_from_generic_instantiation_p): New.
6358 2014-07-30  Robert Dewar  <dewar@adacore.com>
6360         * s-tasuti.adb, s-tasuti.ads, einfo.ads, sem_prag.adb, s-taasde.adb,
6361         g-socthi-vms.adb, s-taprop-mingw.adb, s-interr.adb, s-interr-hwint.adb,
6362         g-decstr.adb, s-tasdeb-vms.adb, g-expect-vms.adb, makeutl.adb,
6363         s-interr-vms.adb, g-socthi.adb, exp_aggr.adb, s-tasdeb.adb,
6364         g-awk.adb, gnatls.adb, s-taspri-posix.ads, g-catiio.adb,
6365         s-interr-sigaction.adb, s-os_lib.adb, s-fileio.adb: Minor reformatting
6366         & code reorganization.
6368 2014-07-30  Bob Duff  <duff@adacore.com>
6370         * s-tassta.adb, sem_util.ads: Minor reformatting.
6372 2014-07-30  Yannick Moy  <moy@adacore.com>
6374         * inline.adb (Build_Body_To_Inline): Detect when
6375         subprogram has multiple returns, or not a single last return
6376         statement, in GNATprove mode.
6377         (Cannot_Inline): Simplify logic to handle case of GNATprove
6378         inlining first.
6380 2014-07-30  Ed Schonberg  <schonberg@adacore.com>
6382         * sem_ch6.adb: Stubs are not subject to inlining.
6384 2014-07-30  Bob Duff  <duff@adacore.com>
6386         * s-tasuti.ads, s-tasuti.adb (Make_Independent): Change this
6387         from a procedure to a function, so that it can more easily be
6388         called before the "begin" of a task.
6389         * s-taasde.ads (Delay_Block): Make this type immutably limited,
6390         so we can use a build-in-place function call to initialize
6391         Timer_Queue in the body.
6392         * a-rttiev.adb, s-asthan-vms-alpha.adb, s-asthan-vms-ia64.adb,
6393         * s-interr.adb, s-interr-hwint.adb, s-interr-sigaction.adb,
6394         * s-interr-vms.adb, s-taasde.adb: Each independent task now calls
6395         Make_Independent before reaching its "begin", to avoid race
6396         conditions. This causes the activating task to wait until after
6397         Make_Independent is complete before proceeding.  In addition,
6398         we initialize data structures used by independent tasks before
6399         activating those tasks, to avoid possible use of uninitialized data.
6400         * s-interr.ads, s-intman.ads, s-taspri-posix.ads, s-tasdeb.ads:
6401         Minor comment fixes.
6403 2014-07-30  Bob Duff  <duff@adacore.com>
6405         * a-exctra.ads, s-traent-vms.ads, s-traent.ads (Tracebacks_Array): Move
6406         the declaration of Tracebacks_Array from Ada.Exceptions.Traceback to
6407         System.Traceback_Entries (s-traent.ads and s-traent-vms.ads).  Add
6408         subtypes renaming Tracebacks_Array in Ada.Exceptions.Traceback.
6409         * g-debpoo.adb: Refer to Tracebacks_Array in its new home.
6411 2014-07-30  Arnaud Charlet  <charlet@adacore.com>
6413         * a-tasatt.adb: Remove old comments.
6415 2014-07-30  Yannick Moy  <moy@adacore.com>
6417         * einfo.ads (Is_Inlined): Document new use in GNATprove mode.
6418         * inline.adb (Can_Be_Inlined_In_GNATprove_Mode): Add comments
6419         to explain rationale for inlining or not in GNATprove mode.
6420         (Expand_Inlined_Call): In GNATprove mode, set Is_Inlined flag
6421         to False when inlining is not possible.
6422         * sem_ch6.adb (Analyze_Subprogram_Body_Helper): Set Is_Inlined
6423         flag to indicate that subprogram is fully inlined. To be reversed
6424         if inlining problem is found.
6425         * sem_res.adb (Resolve_Call): Set Is_Inlined flag to False when
6426         call in potentially unevaluated context.
6428 2014-07-30  Jose Ruiz  <ruiz@adacore.com>
6430         * s-tarest.adb, s-tarest.ads: Fix comments.
6432 2014-07-30  Robert Dewar  <dewar@adacore.com>
6434         * exp_attr.adb, checks.adb, sem_util.adb, sem_util.ads, sem_attr.adb:
6435         Change No_Scalar_Parts predicate to Scalar_Part_Present and
6436         invert sense of test. This avoids the "not No_xxx" situation
6437         which is always ugly.
6439 2014-07-30  Ed Schonberg  <schonberg@adacore.com>
6441         * inline.adb (Expand_Inlined_Call): When generating code for
6442         an internal subprogram the expansion uses the location of the
6443         call, so that gdb can skip over it. In GNATprove mode we want to
6444         preserve slocs of original subprogram when expanding an inlined
6445         call, to obtain better warnings, even though subprogram appears
6446         not to come from source if it is the inlining of a subprogram
6447         body without a previous spec.
6449 2014-07-30  Eric Botcazou  <ebotcazou@adacore.com>
6451         * exp_aggr.adb (Aggr_Assignment_OK_For_Backend): Reject array
6452         types with atomic components.
6454 2014-07-30  Thomas Quinot  <quinot@adacore.com>
6456         * Make-generated.in: Remove now unnecessary targets after s-oscons
6457         reorg.
6459 2014-07-30  Yannick Moy  <moy@adacore.com>
6461         * sem_res.adb (Resolve_Call): Use ultimate alias
6462         of callee when available.
6464 2014-07-30  Ed Schonberg  <schonberg@adacore.com>
6466         * sem_ch6.adb (Analyze_Expression_Function): To check whether
6467         an expression function is a completion, use the specification of
6468         the previous declaration, not its entity, which may be internally
6469         generated in an inlined context.
6471 2014-07-30  Doug Rupp  <rupp@adacore.com>
6473         * adaint.c (__gnat_tmp_name) [__ANDROID__]: Default to putting
6474         temp files in /cache directory unless overridden by TMPDIR.
6476 2014-07-30  Jose Ruiz  <ruiz@adacore.com>
6478         * s-tassta.adb, s-tarest.adb (Initialize, Create_Task,
6479         Create_Restricted_Task): Remove redundant check. Number_Of_CPUs returns
6480         type CPU, so it can never be greater than CPU_Range'Last.
6482 2014-07-30  Bob Duff  <duff@adacore.com>
6484         * s-taskin.ads: Minor comment fix.
6486 2014-07-30  Thomas Quinot  <quinot@adacore.com>
6488         * g-socket.adb: Remove now useless WITH, USE, and USE TYPE
6489         clauses.
6491 2014-07-30  Yannick Moy  <moy@adacore.com>
6493         * debug.adb: Free debug flag dQ used for frontend inlining in
6494         GNATprove mode..
6495         * sem_ch6.adb (Analyze_Subprogram_Body_Helper): Remove test of
6496         debug flag..
6498 2014-07-30  Thomas Quinot  <quinot@adacore.com>
6500         * Make-generated.in: Remove generation of s-oscons.ads, only
6501         generate the xoscons utility, in runtime-agnostic rules.
6502         * gcc-interface/Makefile.in: Clean up rules. Remove VMS parts,
6503         no longer supported.
6505 2014-07-30  Bob Duff  <duff@adacore.com>
6507         * exp_ch6.adb (Add_Task_Actuals_To_Build_In_Place_Call): New
6508         parameter Chain to be used in the allocator case.
6509         (Make_Build_In_Place_Call_In_Allocator): If the allocated object
6510         has tasks, wrap the code in a block that will activate them,
6511         including the usual finalization code to kill them off in case
6512         of exception or abort.
6514 2014-07-30  Robert Dewar  <dewar@adacore.com>
6516         * treepr.adb, treepr.ads; Reorganize documentation for new pp routines
6517         Remove renamings (don't work for gdb).
6518         (par): New synonym for p (avoid gdb ambiguities).
6519         * inline.adb, sem_ch6.adb, sem_ch13.adb: Minor reformatting.
6521 2014-07-30  Bob Duff  <duff@adacore.com>
6523         * exp_ch9.ads, sem_prag.adb, exp_ch4.adb, sem_ch13.adb: Minor comment
6524         fixes.
6525         * treepr.ads, treepr.adb (ppp): Make this debugging routine
6526         accept any type covered by Union_Id.
6528 2014-07-30  Robert Dewar  <dewar@adacore.com>
6530         * sem_ch4.adb (Analyze_If_Expression): Resolve condition before
6531         analyzing branches.
6532         * sem_eval.adb (Out_Of_Range): Check for statically unevaluated
6533         expression case.
6535 2014-07-30  Robert Dewar  <dewar@adacore.com>
6537         * sem_ch13.adb (Analyze_Aspect, predicate cases): Diagnose use
6538         of predicate aspect on entity other than a type.
6540 2014-07-30  Ed Schonberg  <schonberg@adacore.com>
6542         * sem_ch6.adb (Body_Has_Contract): New predicate to determine
6543         when a subprogram body without a previous spec cannot be inlined
6544         in GNATprove mode, because it includes aspects or pragmas that
6545         generate a SPARK contract clause.
6546         * inline.adb (Can_Be_Inlined_In_GNATprove_Mode): A subprogram
6547         instance cannot be inlined.
6549 2014-07-30  Robert Dewar  <dewar@adacore.com>
6551         * debug.adb: Document that d7 suppresses compilation time output.
6552         * errout.adb (Write_Header): Include compilation time in
6553         header output.
6554         * exp_intr.adb (Expand_Intrinsic_Call): Add
6555         Compilation_Date/Compilation_Time (Expand_Source_Info): Expand
6556         Compilation_Date/Compilation_Time.
6557         * g-souinf.ads (Compilation_Date): New function
6558         (Compilation_Time): New function.
6559         * gnat1drv.adb (Gnat1drv): Set Opt.Compilation_Time.
6560         * gnat_rm.texi (Compilation_Date): New function
6561         (Compilation_Time): New function.
6562         * opt.ads (Compilation_Time): New variable.
6563         * s-os_lib.ads, s-os_lib.adb (Current_Time_String): New function.
6564         * sem_intr.adb (Compilation_Date): New function.
6565         (Compilation_Time): New function.
6566         * snames.ads-tmpl (Name_Compilation_Date): New entry.
6567         (Name_Compilation_Time): New entry.
6569 2014-07-30  Yannick Moy  <moy@adacore.com>
6571         * inline.adb: Add comment.
6573 2014-07-30  Ed Schonberg  <schonberg@adacore.com>
6575         * par-ch4.adb (Is_Parameterless_Attribute): 'Result is a
6576         parameterless attribute, and a postondition can mention an
6577         indexed component or a slice whose prefix is an attribute
6578         reference F'Result.
6580 2014-07-30  Robert Dewar  <dewar@adacore.com>
6582         * sprint.adb (Sprint_Node_Actual, case Object_Declaration):
6583         Avoid bomb when printing package Standard.
6585 2014-07-30  Ed Schonberg  <schonberg@adacore.com>
6587         * sem_elab.adb (Check_Internal_Call_Continue): If an elaboration
6588         entity is created at this point, ensure that the name of the
6589         flag is unique, because the subprogram may be overloaded and
6590         other homonyms may also have elaboration flags created on the fly.
6592 2014-07-30  Hristian Kirtchev  <kirtchev@adacore.com>
6594         * sem_attr.adb (Analyze_Array_Component_Update): New routine.
6595         (Analyze_Attribute): Major cleanup of attribute
6596         'Update. The logic is now split into two distinct routines
6597         depending on the type of the prefix. The use of <> is now illegal
6598         in attribute 'Update.
6599         (Analyze_Record_Component_Update): New routine.
6600         (Check_Component_Reference): Removed.
6601         (Resolve_Attribute): Remove the return statement and ??? comment
6602         following the processing for attribute 'Update. As a result,
6603         the attribute now freezes its prefix.
6605 2014-07-30  Javier Miranda  <miranda@adacore.com>
6607         * exp_ch4.adb (Apply_Accessibility_Check): Do
6608         not call Base_Address() in VM targets.
6610 2014-07-30  Yannick Moy  <moy@adacore.com>
6612         * gnat1drv.adb (Adjust_Global_Switches): Set
6613         Ineffective_Inline_Warnings to True in GNATprove mode.
6614         * inline.adb (Cannot_Inline): Prepare new semantics for GNATprove
6615         mode of inlining.
6616         * opt.ads (Ineffective_Inline_Warnings): Add comment that
6617         describes use in GNATprove mode.
6618         * sem_prag.adb (Analyze_Pragma|SPARK_Mode): Ignore
6619         pragma when applied to the special body created for inlining.
6621 2014-07-30  Robert Dewar  <dewar@adacore.com>
6623         * inline.adb, exp_ch4.adb, sinput.adb, sem_ch6.adb, sem_ch13.adb:
6624         Minor reformatting.
6626 2014-07-30  Hristian Kirtchev  <kirtchev@adacore.com>
6628         * aspects.ads Add a comment explaining why SPARK 2014 aspects are
6629         not delayed. Update the delay status of most SPARK 2014 aspects.
6630         * sem_ch13.adb (Analyze_Aspect_Specifications): Update all calls
6631         to Decorate_Aspect_And_Pragma and Insert_Delayed_Pragma to refert
6632         to Decorate and Insert_Pragma. Add various comments concerning
6633         the delay status of several SPARK 2014 aspects. The insertion
6634         of Refined_State now uses routine Insert_After_SPARK_Mode.
6635         (Decorate): New routine.
6636         (Decorate_Aspect_And_Pragma): Removed.
6637         (Insert_Delayed_Pragma): Removed.
6638         (Insert_Pragma): New routine.
6640 2014-07-30  Ed Schonberg  <schonberg@adacore.com>
6642         * inline.adb (Expand_Inlined_Call): In GNATprove mode, emit
6643         only a warning, not an error on an attempt to inline a recursive
6644         subprogram.
6646 2014-07-30  Robert Dewar  <dewar@adacore.com>
6648         * g-forstr.adb: Minor code reorganization (use J rather than I
6649         as a variable name).
6650         * gnat_rm.texi, sem_prag.adb, sem_util.adb, sem_ch13.adb,
6651         g-forstr.ads: Minor reformatting.
6653 2014-07-30  Eric Botcazou  <ebotcazou@adacore.com>
6655         * sprint.adb (Set_Debug_Sloc): Also reset the end location if
6656         we are debugging the generated code.
6658 2014-07-30  Yannick Moy  <moy@adacore.com>
6660         * sinput.ads, sinput.adb (Comes_From_Inlined_Body): New function that
6661         returns True for source pointer for an inlined body.
6663 2014-07-30  Javier Miranda  <miranda@adacore.com>
6665         * exp_ch4.adb (Apply_Accessibility_Check): Add
6666         missing calls to Base_Address().
6668 2014-07-30  Ed Schonberg  <schonberg@adacore.com>
6670         * sem_ch6.adb (Hanalyze_Subprogram_Body_Helper): In GNATprove
6671         mode, subprogram bodies without a previous declaration are also
6672         candidates for front-end inlining.
6674 2014-07-30  Hristian Kirtchev  <kirtchev@adacore.com>
6676         * aspects.ads Aspects Async_Readers, Async_Writers,
6677         Effective_Reads and Effective_Writes do not need to be delayed.
6678         * sem_ch13.adb (Analyze_Aspect_Specifications): Propagate the
6679         optional Boolean expression when generating the corresponding
6680         pragma for an external property aspect.
6681         * sem_prag.adb (Analyze_External_Property_In_Decl_Part): Remove
6682         local constant Obj. Add local constant Obj_Id. Reimplement the
6683         check which ensures that the related variable is in fact volatile.
6684         (Analyze_Pragma): Reimplement the analysis of external property pragmas.
6685         * sem_util.adb (Is_Enabled): New routine.
6686         (Variable_Has_Enabled_Property): Reimplement the detection of
6687         an enabled external property.
6689 2014-07-30  Sergey Rybin  <rybin@adacore.com frybin>
6691         * gnat_ugn.texi, vms_data.ads: gnatstub: describe generating subunits
6692         for body stubs.
6694 2014-07-30  Pascal Obry  <obry@adacore.com>
6696         * g-forstr.adb, g-forstr.ads: New.
6697         * gnat_rm.texi, impunit.adb Makefile.rtl: Add new unit
6698         GNAT.Formatted_String.
6700 2014-07-30  Eric Botcazou  <ebotcazou@adacore.com>
6702         * exp_aggr.adb (Aggr_Assignment_OK_For_Backend): New predicate.
6703         (Expand_Array_Aggregate): Also enable in-place expansion for
6704         code generated by the compiler.  For an object declaration,
6705         set the kind of the object in addition to its type.  If an
6706         in-place assignment is to be generated and it can be directly
6707         done by the back-end, do not expand the aggregate.
6708         * fe.h (Is_Others_Aggregate): Declare.
6709         * gcc-interface/trans.c
6710         (gnat_to_gnu) <N_Assignment_Statement>: Add support for an
6711         aggregate with a single Others choice on the RHS by means of
6712         __builtin_memset.  Tidy up.
6714 2014-07-30  Ed Schonberg  <schonberg@adacore.com>
6716         * gnat_rm.texi: minor reformatting.
6718 2014-07-30  Yannick Moy  <moy@adacore.com>
6720         * sem_ch6.adb (Analyze_Subprogram_Helper_Body): Remove body to inline
6721         in SPARK_Mode Off.
6723 2014-07-30  Robert Dewar  <dewar@adacore.com>
6725         * gnat_rm.texi: Document additional implementation-defined use
6726         of Constrained.
6728 2014-07-30  Robert Dewar  <dewar@adacore.com>
6730         * prj-proc.adb, prj-strt.adb: Update comments.
6732 2014-07-30  Gary Dismukes  <dismukes@adacore.com>
6734         * sinfo.ads, einfo.ads, checks.ads: Minor typo fix and reformatting.
6736 2014-07-30  Vincent Celier  <celier@adacore.com>
6738         * prj-proc.adb (Imported_Or_Extended_Project_From): New Boolean
6739         parameter No_Extending, defaulted to False. When No_Extending
6740         is True, do not look for an extending project.
6741         (Expression): For a variable reference that is not for the current
6742         project, get its Id calling Imported_Or_Extended_Project_From
6743         with No_Extending set to True.
6744         * prj-strt.adb (Parse_Variable_Reference): If a referenced
6745         variable is not found in the current project, check if it is
6746         defined in one of the projects it extends.
6748 2014-07-30  Robert Dewar  <dewar@adacore.com>
6750         * sem_util.adb (Predicate_Tests_On_Arguments): Omit tests for
6751         some additional cases of internally generated routines.
6753 2014-07-30  Ed Schonberg  <schonberg@adacore.com>
6755         * sem_ch10.adb (Analyze_Proper_Body): When compiling for ASIS,
6756         if the compilation unit is a subunit, extend optional processing
6757         to all subunits of the current one. This allows gnatstub to
6758         supress generation of spurious bodies.
6760 2014-07-30  Hristian Kirtchev  <kirtchev@adacore.com>
6762         * a-cbmutr.adb (Insert_Child): Use local variable First to keep
6763         track of the initial element's index within the tree.
6765 2014-07-29  Hristian Kirtchev  <kirtchev@adacore.com>
6767         * a-cbmutr.adb (Allocate_Node): Remove the two parameter version.
6768         (Insert_Child): Add local variable First. Capture the index of the
6769         first node being created to ensure correct cursor construction
6770         later on. Use the three parameter version of Allocate_Node
6771         when creating multiple children as this method allows aspect
6772         Default_Value to take effect (if applicable).
6774 2014-07-29  Eric Botcazou  <ebotcazou@adacore.com>
6776         * exp_aggr.adb (Safe_Slice_Assignment): Remove.
6777         (Expand_Array_Aggregate): For a safe slice assignment, just set
6778         the target and use the common code path.
6780 2014-07-29  Robert Dewar  <dewar@adacore.com>
6782         * sem_util.adb, sem_util.ads, sem_res.adb, exp_ch6.adb: Invert
6783         predicate No_Predicate_Test_On_Arguments, new name is
6784         Predicate_Tests_On_Arguments (with the opposite sense).
6786 2014-07-29  Hristian Kirtchev  <kirtchev@adacore.com>
6788         * sem_attr.adb (Resolve_Attribute): Clean up the code for
6789         attribute 'Access. Do not generate an elaboration flag for a
6790         stand alone expression function. The expression of an expression
6791         function is now frozen when the expression function appears as
6792         the prefix of attribute 'Access.
6793         * sem_ch6.adb (Analyze_Expression_Function): Remove local
6794         variable New_Decl and update all references to it after the
6795         rewriting has taken place. Establish the linkages between the
6796         generated spec and body.
6798 2014-07-29  Robert Dewar  <dewar@adacore.com>
6800         * sem_prag.adb (ip, rv): Prevent from being optimized away.
6801         * gnatls.adb (gnatls): Set E_Fatal exit status if ali file not found.
6802         * s-imgllb.adb, s-imgllw.adb, s-imgwiu.adb, s-imgbiu.adb: Minor
6803         reformatting.
6805 2014-07-29  Vincent Celier  <celier@adacore.com>
6807         * prj-pp.adb: Minor comment update.
6808         * frontend.adb: If a target dependency info file has been read
6809         through switch -gnateT= add it to the dependencies of the source
6810         being compiled.
6812 2014-07-29  Robert Dewar  <dewar@adacore.com>
6814         * sem_ch3.adb, prj.adb: Minor reformatting.
6816 2014-07-29  Vincent Celier  <celier@adacore.com>
6818         * prj-pp.adb (Pretty_Print.Output_Project_File): New
6819         procedure to output project file names between quotes without
6820         concatenation, even if the line is too long.
6821         (Pretty_Print): Use Output_Project_File for project being extended and
6822         project imported.
6824 2014-07-29  Vincent Celier  <celier@adacore.com>
6826         * gnat_ugn.texi: Document that configuration pragmas files are
6827         added to the dependencies, unless they contain only pragmas
6828         Source_File_Name_Project.
6830 2014-07-29  Robert Dewar  <dewar@adacore.com>
6832         * frontend.adb: Minor reformatting.
6834 2014-07-29  Robert Dewar  <dewar@adacore.com>
6836         * exp_ch6.adb (Add_Call_By_Copy_Code): Minor reformatting
6837         (Expand_Actuals): Make sure predicate checks are properly applied
6838         for the case of OUT or IN OUT parameters.
6839         * sem_res.adb: Minor reformatting (Resolve_Actuals): Skip
6840         predicate tests on arguments for Finalize
6841         * sem_util.adb (No_Predicate_Test_On_Arguments): Returns True
6842         if predicate tests on subprogram arguments should be skipped.
6843         * sem_util.ads (No_Predicate_Test_On_Arguments): New function
6845 2014-07-29  Ed Schonberg  <schonberg@adacore.com>
6847         * sem_ch3.adb (Analyze_Object_Declaration): If there is an address
6848         clause for the object and the expression is an aggregate, defer
6849         resolution and expansion of the aggregate until the freeze point
6850         of the entity.
6851         * sem_aggr.adb (Resolve_Aggregate): An others_clause is legal if
6852         the parent node is an N_Reference generated during expansion.
6854 2014-07-29  Vincent Celier  <celier@adacore.com>
6856         * prj.adb (Add_To_Buffer): Effectively double the size of the buffer.
6858 2014-07-29  Robert Dewar  <dewar@adacore.com>
6860         * frontend.adb, inline.adb, sem_util.adb, sem_res.adb,
6861         prepcomp.ads: Minor reformatting and code clean up.
6862         * exp_ch6.adb (Expand_Actuals): Generate predicate test
6863         unconditionally for case of OUT or IN OUT actual (before this
6864         was generated only for certain subcases, which is wrong, the
6865         test is always needed).
6867 2014-07-29  Ed Schonberg  <schonberg@adacore.com>
6869         * sem_ch3.adb: Move Has_Defaulted_Discriminants to sem_util.
6870         * sem_ch4.adb (Analyze_Allocator): Defer resolution of expression
6871         until context type is available.
6872         * sem_res.adb (Resolve_Allocator): In the case of a qualified
6873         expression, complete resolution of expression.
6874         (Check_Aliased_Parameter): New procedure within Resolve_Actuals,
6875         to apply Ada2012 checks on aliased formals, as well as
6876         accesibility checks when the context of the call is an allocator
6877         or a qualified expression.
6878         * sem_util.ads, sem_util.adb (Has_Defaulted_Discriminants):
6879         Moved here from sem_ch3.
6880         (Object_Access_Level): Handle properly aliased formals and
6881         aggregates.
6882         * exp_ch6.adb (Expand_Call): Remove check on aliased parameters,
6883         now properly performed in sem_res (Resolve_Actuals,
6884         Check_Aliased_Parameter).
6886 2014-07-29  Yannick Moy  <moy@adacore.com>
6888         * debug.adb Enable GNATprove inlining under debug flag -gnatdQ for now.
6889         * inline.ads, inline.adb (Can_Be_Inlined_In_GNATprove_Mode): New
6890         function to decide when a subprogram can be inlined in GNATprove mode.
6891         (Check_And_Build_Body_To_Inline): Include GNATprove_Mode as a
6892         condition for possible inlining.
6893         * sem_ch10.adb (Analyze_Compilation_Unit): Remove special case
6894         for Inline_Always in GNATprove mode.
6895         * sem_ch6.adb (Analyze_Subprogram_Body_Helper): Build inlined
6896         body for subprograms in GNATprove mode, under debug flag -gnatdQ.
6897         * sem_prag.adb Minor change in comments.
6898         * sem_res.adb (Resolve_Call): Only perform GNATprove inlining
6899         inside subprograms marked as SPARK_Mode On.
6900         * sinfo.ads: Minor typo fix.
6902 2014-07-29  Vincent Celier  <celier@adacore.com>
6904         * frontend.adb: Add dependency on gnat.adc when taken into account
6905         and on non-temporary configuration pragmas files specified in
6906         switches -gnatec.
6907         * prepcomp.ads, prepcomp.adb (Add_Dependency): New procedure to add
6908         dependencies on configuration pragmas files.
6910 2014-07-29  Pat Rogers  <rogers@adacore.com>
6912         * gnat_ugn.texi: Minor clarification to the explanation for the
6913         GNATtest -v switch.
6915 2014-07-29  Robert Dewar  <dewar@adacore.com>
6917         * types.ads (Mechanism_Type): Change range back to -18 .. Int'Last with
6918         documentation that explains the need for this extended range
6919         (use by C_Pass_By_Copy).
6921 2014-07-29  Robert Dewar  <dewar@adacore.com>
6923         * gnat_rm.texi, sem_prag.adb: Minor reformatting.
6925 2014-07-29  Sergey Rybin  <rybin@adacore.com frybin>
6927         * gnat_ugn.texi: gnatmetric: clarify documentation for cyclomatic
6928         complexity metrics.
6930 2014-07-29  Thomas Quinot  <quinot@adacore.com>
6932         PR ada/60652
6933         * s-oscons-tmplt.c: For Linux, define _BSD_SOURCE in order for
6934         CRTSCTS to be visible.
6936 2014-07-29  Bob Duff  <duff@adacore.com>
6938         * g-trasym.adb, g-trasym.ads: Code cleanup.
6940 2014-07-29  Doug Rupp  <rupp@adacore.com>
6942         * sigtramp-vxworks.c: Minor reformatting.
6944 2014-07-29  Ed Schonberg  <schonberg@adacore.com>
6946         * gnat_rm.texi: No doc needed for Ada2012 aspect
6947         Implicit_dereference.
6949 2014-07-29  Robert Dewar  <dewar@adacore.com>
6951         * sem_attr.adb (Attribute_12): New array
6952         (Analyze_Attribute): Check impl-defined Ada 2012 attributes.
6953         (Check_Ada_2012_Attribute): Removed.
6955 2014-07-29  Doug Rupp  <rupp@adacore.com>
6957         * init.c (vxworks6): Call sigtramp for RTP (as well as DKM) for ARM,
6958         PPC, and e500.
6959         * sigtramp-vxworks.c: New file.
6960         * sigtramp-armvxw.c, sigtramp-ppcvxw.c: removed files.
6962 2014-07-29  Ed Schonberg  <schonberg@adacore.com>
6964         * lib-xref.adb (Output_Refs, Check_Type_Reference): For a
6965         derived array type, add information about component type, which
6966         was previously missing in ali file.
6967         * gnat_rm.texi: Add documentation for Atomic_Always_Lock_Free.
6969 2014-07-29  Thomas Quinot  <quinot@adacore.com>
6971         * sem_ch3.adb (Constrain_Corresponding_Record): For the case
6972         of the subtype created for a record component, do not mark
6973         the subtype as frozen. For one thing, this is anomalous (in
6974         particular, the base type might not itself be frozen yet);
6975         furthermore, proper freezing of the subtype must happen in any
6976         case. So, we just mark the subtype as requiring delayed freezing
6977         (and we'll actually freeze it when generating the init_proc of
6978         the enclosing record).
6979         Also change the name of the constrained record subtype (append a
6980         'C' so that it is clearly different from the unconstrained record
6981         type, "related_idV") to make debugging easier.
6982         (Process_Full_View): When creating a full subtype for a pending
6983         private subtype, re-establish the scope of the private subtype
6984         so that we get proper visibility on outer discriminants.
6985         * exp_ch3.adb (Build_Init_Statements): Freeze any component
6986         subtype that is not frozen yet.
6988 2014-07-29  Vincent Celier  <celier@adacore.com>
6990         * prj-proc.adb (Recursive_Process): Always initialize the
6991         environment when the project is an aggregate project, even when
6992         it is not the root tree.
6993 2014-07-29  Robert Dewar  <dewar@adacore.com>
6995         * exp_ch5.adb, exp_ch9.adb: Minor comment additions.
6996         * gnat_rm.texi: Complete list of implementation aspects.
6997         * aspects.ads: Minor comment clarification.
6999 2014-07-29  Ed Schonberg  <schonberg@adacore.com>
7001         * exp_ch5.adb (Expand_N_Assignment_Statement): If the target type
7002         is a null-excluding access type, do not generate a constraint
7003         check if Suppress_Assignment_Checks is set on assignment node.
7004         * exp_ch9.adb (Build_Simple_Entry_Call): If actual is an out
7005         parameter of a null-excluding access type, there is access check
7006         on entry, so set Suppress_Assignment_Checks on generated statement
7007         that assigns actual to parameter block.
7008         * sinfo.ads: Document additional use of Suppress_Assignment_Checks.
7010 2014-07-29  Robert Dewar  <dewar@adacore.com>
7012         * gnat_rm.texi: Change theta to @ in documentation of aspect
7013         Dimension_System.
7015 2014-07-29  Robert Dewar  <dewar@adacore.com>
7017         * sem_attr.adb (Uneval_Old_Msg): Flags Uneval_Old_Accept/Warn
7018         are now on pragma.
7019         * sem_ch13.adb (Analyze_Aspect_Specifications): Remove setting
7020         of Uneval_Old_*
7021         * sem_prag.adb (Analyze_Pragma): Set Uneval_Old_* flags
7022         * sinfo.ads, sinfo.adb: Move Uneval_Old_Accept/Warn to N_Pragma node.
7024 2014-07-29  Javier Miranda  <miranda@adacore.com>
7026         * types.ads Update documentation on how to add new reason codes
7027         for exceptions.
7028         (RT_Exception_Code): Keep values ordered by their
7029         reason code.  Required by the .NET backend.
7030         (RT_CE_Exceptions): Subtype declaration removed.
7031         (RT_PE_Exceptions): Subtype declaration removed.
7032         (RT_SE_Exceptions): Subtype declaration removed.
7033         (Kind): New mapping table of RT_Exception_Codes.
7034         * exp_ch11.adb (Get_RT_Exception_Entity): Updated to use the
7035         new mapping table.
7036         * tbuild.adb (Make_Raise_Storage_Error): Updated to use the new
7037         mapping table.  (Make_Raise_Program_Error): Updated to use the
7038         new mapping table.
7039         (Make_Raise_Storage_Error): Updated to use the new mapping table.
7040         * a-except.adb Keep Rcheck_CE_xxx entities ordered according to
7041         their reason code.
7043 2014-07-29  Thomas Quinot  <quinot@adacore.com>
7045         * gnat_rm.texi: Document internal attributes used for PolyORB/DSA
7046         distributed stubs generation.
7047         * exp_ch3.adb: Minor reformatting.
7049 2014-07-29  Yannick Moy  <moy@adacore.com>
7051         * sinfo.ads: Document constraint between frontend and GNATprove.
7053 2014-07-29  Robert Dewar  <dewar@adacore.com>
7055         * a-except.adb: Minor comment clarification.
7057 2014-07-29  Robert Dewar  <dewar@adacore.com>
7059         * gnat_rm.texi: Complete list of implementation attributes.
7060         * snames.ads-tmpl: Clean up list of impl-defined attributes.
7062 2014-07-29  Hristian Kirtchev  <kirtchev@adacore.com>
7064         * freeze.adb (Freeze_Record_Type): Perform various
7065         volatility-related checks.
7067 2014-07-29  Robert Dewar  <dewar@adacore.com>
7069         * sem_ch3.adb, sem_eval.adb: Minor reformatting.
7071 2014-07-29  Ed Schonberg  <schonberg@adacore.com>
7073         * sem_attr.adb: sem_attr.adb (Access_Attribute): Handle properly
7074         the case where the attribute reference appears in a nested scope
7075         from that of the subprogram prefix.
7076         * sem_attr.adb: Minor reformatting.
7078 2014-07-29  Robert Dewar  <dewar@adacore.com>
7080         * gnat_ugn.texi: Clarify documentation of Initialize_Scalar
7081         initialization options.
7083 2014-07-29  Robert Dewar  <dewar@adacore.com>
7085         * sinfo.ads: Minor comment addition.
7087 2014-07-29  Bob Duff  <duff@adacore.com>
7089         * sem_eval.adb, sem_ch13.adb: Minor reformatting.
7091 2014-07-29  Doug Rupp  <rupp@adacore.com>
7093         * init.c: Complete previous change.
7095 2014-07-29  Robert Dewar  <dewar@adacore.com>
7097         * exp_ch4.adb (Expand_N_If_Expression): Deal with unconstrained
7098         array case.
7100 2014-07-29  Ed Schonberg  <schonberg@adacore.com>
7102         * sem_attr.adb (Access_Attribute): If the prefix is a subprogram
7103         and the completion will appear in the same declarative part,
7104         create elaboration flag.
7105         * exp_util.adb (Set_Elaboration_Flag): If the subprogram body
7106         is a completion of a declaration in the same declarative part,
7107         and the subprogram has had its address taken, add elaboration
7108         check inside the subprogram body, to detect elaboration errors
7109         that may occur through indirect calls.
7111 2014-07-29  Doug Rupp  <rupp@adacore.com>
7113         * sigtramp-armvxw.c: Enhance to handle RTP trampolining.
7114         * init.c: Remove guard on sigtramp for ARM VxWorks RTP.
7116 2014-07-29  Vincent Celier  <celier@adacore.com>
7118         * switch-c.adb (Scan_Front_End_Switches): Do not fail when two
7119         runtime directorie specified with two switches --RTS= designate
7120         the same directory, even when there are no literarily the same.
7122 2014-07-29  Robert Dewar  <dewar@adacore.com>
7124         * gnat_ugn.texi: Minor documentation clarification.
7125         * switch-c.adb: Minor reformatting.
7127 2014-07-29  Robert Dewar  <dewar@adacore.com>
7129         * sem_prag.adb (Analyze_Pragma, case Allow_Integer_Address):
7130         Fix incorrect RTE call which caused bomb if pragma was in
7131         configuration pragma file.
7133 2014-07-29  Jerome Lambourg  <lambourg@adacore.com>
7135         * expect.c (__gnat_expect_poll): Fix typo in previous change.
7136         * g-expect.adb: Update comments.
7138 2014-07-29  Arnaud Charlet  <charlet@adacore.com>
7140         * s-parame-hpux.ads, s-parame-vms-ia64.ads, s-parame.ads
7141         (Default_Attribute_Count): Bump to 16 on native platforms.
7143 2014-07-29  Ed Schonberg  <schonberg@adacore.com>
7145         * sem_res.adb: Add guard to front-end inlining for SPARK.
7147 2014-07-29  Robert Dewar  <dewar@adacore.com>
7149         * sem_ch10.adb, debug.adb, sem_prag.adb, sem_res.adb, sem_ch6.adb:
7150         Minor reformatting.
7152 2014-07-29  Ed Schonberg  <schonberg@adacore.com>
7154         * sem_ch6.adb (Analyze_Subprogram_Body_Helper): Build body to
7155         inline in GNATprove mode when subprogran is marked Inline_Always.
7156         * sem_res.adb (Resolve_Call): Expand call in place in GNATProve
7157         mode if body to inline is available.
7158         * sem_prag.adb (Analyze_Pragma, case Inline_Always): Make pragma
7159         effective in GNATprove mode.
7160         * sem_ch10.adb (Analyze_Compilation_Unit): Call
7161         Check_Package_Body_For_Inlining in GNATprove mode, so that body
7162         containing subprograms with Inline_Always can be available before
7163         calls to them.
7165 2014-07-29  Ed Schonberg  <schonberg@adacore.com>
7167         * inline.ads, inline.adb, sem_ch10.adb: Rename Check_Body_For_Inlining
7168         to Check_Package_Body_For_Inlining, to prevent confusion with other
7169         inlining subprograms.
7171 2014-07-29  Robert Dewar  <dewar@adacore.com>
7173         * opt.ads: Minor comment update.
7174         * sem_attr.adb (Uneval_Old_Msg): Deal with case of aspect, where
7175         we want setting of Uneval_Old at time of encountering the aspect.
7176         * sem_ch13.adb (Analyze_Aspect_Specifications): Capture setting
7177         of Opt.Uneval_Old.
7178         * sinfo.adb (Uneval_Old_Accept): New function (Uneval_Old_Warn):
7179         New function (Set_Uneval_Old_Accept): New procedure.
7180         (Set_Uneval_Old_Warn): New procedure.
7181         * sinfo.ads: Uneval_Old_Accept: New flag Uneval_Old_Warn: New flag.
7183 2014-07-29  Robert Dewar  <dewar@adacore.com>
7185         * sinfo.ads, inline.adb, inline.ads, sem_ch6.adb: Minor reformatting.
7186         * snames.ads-tmpl: Minor reformatting.
7187         * xsnamest.adb (XSnamesT): Remove special casing of Name_Error
7188         to give <Error>.  Not clear why this was there, but the compiler
7189         sources do not reference Name_Error, and this interfered with
7190         the circuits for pragma Unevaluated_Use_Of_Old.
7192 2014-07-29  Hristian Kirtchev  <kirtchev@adacore.com>
7194         * sem_prag.adb (Process_Atomic_Shared_Volatile): Allow volatile
7195         types in SPARK 2014 (again).
7196         * sem_res.adb (Is_OK_Volatile_Context): New routine.
7197         (Resolve_Entity_Name): Ensure that a volatile object with
7198         enabled properties Async_Writers or Effectire_Reads appears in
7199         a non-interfering context.
7201 2014-07-29  Ed Schonberg  <schonberg@adacore.com>
7203         * sem_ch6.adb: Move Build_Body_To_Inline,
7204         Check_And_Buid_Body_To_Inline, and Cannot_Inline to package Inline.
7205         * exp_ch6.adb: Mode Expand_Inlined_Body to package Inline.
7206         * inline.ads, inline.adb: Package now contains subprograms that
7207         implement front-end inlining.  No functional changes, no test
7208         needed.
7210 2014-07-29  Robert Dewar  <dewar@adacore.com>
7212         * exp_dbug.adb, g-expect.adb, sem_elab.adb: Minor typo fix.
7214 2014-07-29  Ed Schonberg  <schonberg@adacore.com>
7216         * sem_ch6.adb (Analyze_Return_Type): Reject a return type that
7217         is a limited view when the context is a package body, because
7218         there is no subsequent place at which the non-limited view may
7219         become visible.
7220         (Process_Formals): Ditto.
7221         * sinfo.ads, par-ch3.adb: Minor reformatting.
7223 2014-07-29  Jerome Lambourg  <lambourg@adacore.com>
7225         * expect.c (__gnat_expect_poll): New parameter dead_process
7226         used to return the dead process among the array of file
7227         descriptors. The Windows, VMS and HPUX implementations now
7228         properly report the dead process via this parameter. Other unixes
7229         don't need it.
7230         * g-expect.adb (Poll): Adapt to the C profile.
7231         (Expect_Internal): Use the new parameter to properly close the
7232         File Descriptor.  This then can be properly reported by the
7233         function First_Dead_Process as is expected.
7235 2014-07-29  Robert Dewar  <dewar@adacore.com>
7237         * gnat_ugn.texi: Minor clarification of -gnatQ switch.
7239 2014-07-29  Robert Dewar  <dewar@adacore.com>
7241         * einfo.adb (Derived_Type_Link): New function
7242         (Set_Derived_Type_Link): New procedure.
7243         (Write_Field31_Name): Output Derived_Type_Link.
7244         * einfo.ads: New field Derived_Type_Link.
7245         * exp_ch6.adb (Expand_Call): Warn if change of representation
7246         needed on call.
7247         * sem_ch13.adb: Minor addition of ??? comment.
7248         (Rep_Item_Too_Late): Warn on case that is legal but could cause an
7249         expensive implicit conversion.
7250         * sem_ch3.adb (Build_Derived_Type): Set Derived_Type_Link if needed.
7252 2014-07-29  Hristian Kirtchev  <kirtchev@adacore.com>
7254         * exp_ch3.adb (Build_Init_Procedure): Renamed Local_DF_Id
7255         to DF_Id. Add new local variable DF_Call. Do not perform any
7256         elaboration-related checks on the call to the partial finalization
7257         routine within an init proc to avoid generating bogus elaboration
7258         warnings on expansion-related code.
7259         * sem_elab.adb (Check_A_Call): Move constant Access_Case to
7260         the top level of the routine.  Ensure that Output_Calls takes
7261         into account flags -gnatel and -gnatwl when emitting warnings
7262         or info messages.
7263         (Check_Internal_Call_Continue): Update the call to Output_Calls.
7264         (Elab_Warning): Moved to the top level of routine Check_A_Call.
7265         (Emit): New routines.
7266         (Output_Calls): Add new formal parameter Check_Elab_Flag along with a
7267         comment on usage. Output all warnings or info messages only when the
7268         caller context demands it and the proper elaboration flag is set.
7270 2014-07-29  Yannick Moy  <moy@adacore.com>
7272         * sem_attr.adb (Analyze_Attribute/Attribute_Old):
7273         Check rule about Old appearing in potentially unevaluated
7274         expression everywhere, not only in Post.
7276 2014-07-29  Arnaud Charlet  <charlet@adacore.com>
7278         * sem_prag.adb: Update comment.
7279         * a-except.adb, a-except-2005.adb: Minor editing.
7281 2014-07-29  Pierre-Marie Derodat  <derodat@adacore.com>
7283         * exp_dbug.adb (Debug_Renaming_Declaration):
7284         Do not create renaming entities for renamings of non-packed
7285         objects and for exceptions.
7287 2014-07-29  Robert Dewar  <dewar@adacore.com>
7289         * sem_ch3.adb, sinfo.ads, types.ads, sem_prag.adb, a-except-2005.adb,
7290         sem_ch6.adb, par-ch3.adb: Minor reformatting.
7292 2014-07-29  Ed Schonberg  <schonberg@adacore.com>
7294         * sem_ch6.adb (Check_Return_Subtype_Indication): Reject a return
7295         subtype indication in an extended return statement when the
7296         return value is an ancestor of the return type of the function,
7297         and that return type is a null record extension.
7299 2014-07-29  Thomas Quinot  <quinot@adacore.com>
7301         * sem_ch13.adb (Rep_Item_Too_Late): Specialize/clarify error
7302         message produced for the case of a type-related representation
7303         item that is made illegal by 13.10(1).
7304         * gnat_rm.texi (Scalar_Storage_Order): Minor change in
7305         documentation.
7307 2014-07-29  Robert Dewar  <dewar@adacore.com>
7309         * gnat_ugn.texi: Add section on Wide_Wide_Character encodings.
7310         * erroutc.adb (Output_Error_Msgs): Take wide characters into
7311         account in computing position of error flags.
7312         * sinput.adb (Get_Column_Number): Take wide characters into
7313         account.
7315 2014-07-29  Ed Schonberg  <schonberg@adacore.com>
7317         * par-ch3.adb (P_Access_Type_Definition): The subtype indication
7318         in an access type definition can carry a null_exclusion indicator.
7319         * sem_ch3.adb (Access_Type_Declaration): If the subtype indication
7320         carries a null_exclusion indicator, verify that the subtype
7321         indication denotes an access type, and create a null-excluding
7322         subtype for it.
7323         * sinfo.ads, sinfo.adb: New attribute Null_Excluding_Subtype,
7324         defined on N_Access_To_Object_Definition to indicate that the
7325         subtype indication carries a null_exclusion indicator.
7327 2014-07-29  Hristian Kirtchev  <kirtchev@adacore.com>
7329         * exp_ch6.adb (Add_Extra_Actual): Do not construct
7330         the extra actual by name, generate a reference instead.
7332 2014-07-29  Arnaud Charlet  <charlet@adacore.com>
7334         * sem_prag.adb (Analyze_Pragma): Do not crash analyzing
7335         Allow_Integer_Address if already set.
7336         * a-except-2005.adb (Rcheck_PE_Stream_Operation_Not_Allowed):
7337         Fix order, for consistency with Rmsg_xx declarations.
7339 2014-07-29  Ed Schonberg  <schonberg@adacore.com>
7341         * sem_ch4.adb (Complete_Object_Operation): If the type of the
7342         candidate subprogram is a limited view, use non-limited view
7343         when available.
7345 2014-07-29  Robert Dewar  <dewar@adacore.com>
7347         * sem_ch13.adb: Minor change in RM reference.
7348         * sem_mech.ads: Minor reformatting.
7349         * einfo.ads: Minor comment fix.
7350         * types.ads: Minor correction to range given for Mechanism_Type.
7351         * exp_ch6.adb (Add_Invariant_And_Predicate_Checks): Do not
7352         check predicate on way out for OUT or IN OUT parameters.
7353         * par-ch3.adb (P_Constraint_Opt): Handle missing RANGE keyword
7354         better (P_Range_Constraint): Corresponding fix.
7355         * checks.ads: Minor comment clarification.
7357 2014-07-29  Gary Dismukes  <dismukes@adacore.com>
7359         * sem_ch8.adb (Analyze_Object_Renaming): Set the Is_Volatile
7360         and Treat_As_Volatile flags based on whether the renamed object
7361         is a volatile object.
7363 2014-07-29  Olivier Hainque  <hainque@adacore.com>
7365         * g-debpoo.adb
7366         (Default_Alignment): Rename as Storage_Alignment. This is not
7367         a "default" that can be overriden. Augment comment to clarify
7368         intent and document why we need to manage alignment padding.
7369         (Header_Offset): Set to Header'Object_Size instead of 'Size
7370         rounded up to Storage_Alignment. Storage_Alignment on the
7371         allocation header is not required by our internals so was
7372         overkill. 'Object_Size is enough to ensure proper alignment
7373         of the header address when substracted from a storage address
7374         aligned on Storage_Alignment.
7375         (Minimum_Allocation): Rename as Extra_Allocation, conveying that
7376         this is always added on top of the incoming allocation requests.
7377         (Align): New function, to perform alignment rounding operations.
7378         (Allocate): Add comments on the Storage_Address computation
7379         scheme and adjust so that the alignment padding applies to that
7380         (Storage_Address) only.
7382 2014-07-29  Robert Dewar  <dewar@adacore.com>
7384         * exp_ch3.adb (Default_Initialize_Object): Remove incorrect
7385         pragma Unreferenced.
7386         * cstand.adb (Create_Standard): Use E_Array_Type for standard
7387         string types. Make sure index of Any_String/Any_Array is in a list.
7388         * errout.adb: Minor reformatting.
7390 2014-07-29  Robert Dewar  <dewar@adacore.com>
7392         * gnat_ugn.texi: Clean up and correct documentation of warnings.
7393         * usage.adb: Minor corrections to make sure warnings are properly
7394         documented.
7395         * warnsw.adb (Set_Warning_Switch): Remove redundant return statement.
7396         (WA_Warnings): Add Warn_On_Suspicious_Modulus_Value.
7398 2014-07-29  Ed Schonberg  <schonberg@adacore.com>
7400         * exp_ch3.adb (Expand_N_Object_Declaration): The dummy block
7401         created to match internal sequence numbers between compilations
7402         with/without abort must have its type properly set.
7404 2014-07-29  Robert Dewar  <dewar@adacore.com>
7406         * ali.adb (Initialize_ALI): Initialize SSO_Default_Specified
7407         (Scan_ALI): Set SSO_Default in ALIs_Record (Scan_ALI): Set
7408         SSO_Default_Specified.
7409         * ali.ads (ALIs_Record): Add field SSO_Default
7410         (SSO_Default_Specified): New global switch.
7411         * bcheck.adb (Check_Consistent_SSO_Default): New procedure
7412         (Check_Configuration_Consistency): Call this procedure
7413         * einfo.adb (SSO_Set_High_By_Default): New
7414         function (SSO_Set_Low_By_Default): New function
7415         (Set_SSO_Set_High_By_Default): New procedure
7416         (Set_SSO_Set_Low_By_Default): New procedure (Write_Entity_Flags):
7417         List new flags
7418         * einfo.ads (SSO_Set_Low_By_Default): New flag
7419         (SSO_Set_High_By_Default): New flag
7420         * freeze.adb (Set_SSO_From_Default): New procedure
7421         (Freeze_Array_Type): Call Set_SSO_From_Default
7422         (Freeze_Record_Type): Call Set_SSO_From_Default
7423         * gnat_rm.texi: Document pragma Default_Scalar_Storage_Order
7424         * lib-writ.adb (Write_ALI): Set OL/OH in P line as needed
7425         * lib-writ.ads: Add OL/OH parameters to P line
7426         * opt.adb: Set Default_SSO, Default_SSO_Config as appropriate
7427         * opt.ads (Default_SSO): New global switch (Default_SSO_Config):
7428         New global switch
7429         * repinfo.adb (List_Scalar_Storage_Order): List SSO when it is
7430         set by default using pragma Default_Scalar_Storage_Order.
7431         * sem.ads (Scope_Stack_Entry): Add component Save_Default_SSO
7432         * sem_ch13.adb (Inherit_Delayed_Rep_Aspects):
7433         Clear SSO defaults when explicit SSO is inherited.
7434         (Analyze_Attribute_Definition_Clause): Clear SSO defaults when
7435         explicit SSO is specified.
7436         (Inherit_Aspects_At_Freeze_Point):
7437         Clear SSO default when inheriting SSO.
7438         * sem_ch3.adb (Set_Default_SSO): New procedure
7439         (Analyze_Private_Extension_Declaration): Set defualt SSO
7440         (Array_Type_Declaration): ditto (Build_Derived_Array_Type): ditto
7441         (Build_Derived_Private_Type): ditto (Build_Derived_Record_Type):
7442         ditto (Build_Derived_Type): ditto (Make_Class_Wide_Type): ditto
7443         (Record_Type_Declaration): ditto
7444         * sem_ch8.adb (Pop_Scope): Restore Default_SSO (Push_Scope):
7445         Save Default_SSO
7446         * sem_prag.adb (Analyze_Pragma, case
7447         Default_Scalar_Storage_Order): Set Default_SSO
7449 2014-07-29  Ed Schonberg  <schonberg@adacore.com>
7451         * sem_ch6.adb (Valid_Operator_Definition): Verify that
7452         all parameter have mode IN. This check must be done here for
7453         subprogram instantiations that have operator names, because their
7454         analysis does not follow the same path as that for subprogram
7455         declarations.
7457 2014-07-29  Robert Dewar  <dewar@adacore.com>
7459         * freeze.adb (Freeze_Entity, Concurrent_Type case): Add a guard
7460         to make sure that the Etype of a component of the corresponding
7461         record type is present before trying to freeze it.
7462         * sem_ch5.adb: Minor reformatting.
7464 2014-07-29  Robert Dewar  <dewar@adacore.com>
7466         * exp_attr.adb, types.ads, types.h, exp_ch11.adb, a-except.adb,
7467         a-except-2005.adb: Add new reason code PE_Stream_Operation_Not_Allowed,
7468         and then use it when a stream operation is used from a library generic
7469         when the restriction (No_Streams) is active.
7471 2014-07-29  Thomas Quinot  <quinot@adacore.com>
7473         * projects.texi: Fix minor typo.
7475 2014-07-29  Yannick Moy  <moy@adacore.com>
7477         * sem_attr.adb (Analyze_Attribute): Fix generation of warning.
7479 2014-07-29  Arnaud Charlet  <charlet@adacore.com>
7481         * sem_ch5.adb (Check_Unreachable_Code): Do not remove code in
7482         CodePeer mode.
7484 2014-07-29  Hristian Kirtchev  <kirtchev@adacore.com>
7486         * exp_ch7.adb (Find_Last_Init): Add local variable
7487         Deep_Init_Found. Check the statement immediately following the
7488         declaration if [Deep_]Initialization was not found.
7490 2014-07-29  Hristian Kirtchev  <kirtchev@adacore.com>
7492         * exp_util.adb (Is_Aliased): It appears that
7493         'reference-d and renamed objects still play some role in Boolean
7494         expression with actions and cannot be finalized immediately.
7496 2014-07-29  Ed Schonberg  <schonberg@adacore.com>
7498         * exp_dbug.adb (Qualify_Needed):  For debugging purposes,
7499         Loop names are not part of the full qualification of entity names.
7501 2014-07-29  Robert Dewar  <dewar@adacore.com>
7503         * einfo.adb (Has_Protected): Test base type.
7504         * sem_ch4.adb (Analyze_Allocator): Reorganize code to make sure
7505         that we always properly check No_Protected_Type_Allocators.
7507 2014-07-29  Ed Schonberg  <schonberg@adacore.com>
7509         * sem_util.ads, sem_util.adb (Defining_Entity): Now applies to
7510         loop declarations as well.
7511         * exp_ch5.adb (Expand_Loop_Statement): Apply Qualify_Entity_Names
7512         to an iterator loop, because it may contain local renaming
7513         declarations that require debugging information.
7515 2014-07-29  Robert Dewar  <dewar@adacore.com>
7517         * sem_util.ads, exp_util.adb, sem_attr.adb: Minor reformatting.
7519 2014-07-29  Robert Dewar  <dewar@adacore.com>
7521         * einfo.ads, einfo.adb (Static_Real_Or_String_Predicate): New function
7522         (Set_Static_Real_Or_String_Predicate): New procedure
7523         * sem_ch13.adb (Build_Predicate_Functions): Accomodate static
7524         string predicates (Is_Predicate_Static): Handle static string
7525         predicates.
7526         * sem_eval.adb (Real_Or_String_Static_Predicate_Matches):
7527         New procedure (Check_Expression_Against_Static_Predicate):
7528         Deal with static string predicates, now fully implemented
7529         (Eval_Relational_Op): Allow string equality/inequality as static
7530         if not comes from source.
7532 2014-07-29  Robert Dewar  <dewar@adacore.com>
7534         * sem_aggr.adb, exp_ch5.adb, sem_ch5.adb, exp_util.adb, einfo.adb,
7535         einfo.ads, sem_util.adb, sem_attr.adb, sem_case.adb, sem_eval.adb,
7536         sem_eval.ads, sem_ch13.adb: General cleanup of static predicate
7537         handling. Change name of Discrete_Predicate to
7538         Discrete_Static_Predicate, and replace testing of the presence of this
7539         field by testing the flag Has_Static_Expression.
7541 2014-07-29  Robert Dewar  <dewar@adacore.com>
7543         * gnat_rm.texi: Document pragma Unevaluated_Use_Of_Old.
7544         * opt.adb: Handle Uneval_Old.
7545         * opt.ads (Uneval_Old, Uneval_Old_Config): New variables.
7546         * par-prag.adb: Add dummy entry for pragma Unevaluated_Use_Of_Old.
7547         * sem.ads (Save_Uneval_Old): New field in Scope_Stack_Entry.
7548         * sem_attr.adb (Uneval_Old_Msg): New procedure.
7549         * sem_ch8.adb (Push_Scope): Save Uneval_Old.
7550         (Pop_Scope): Restore Uneval_Old.
7551         * sem_prag.adb (Analyze_Pragma, case Unevaluated_Use_Of_Old):
7552         Implemented.
7553         * snames.ads-tmpl: Add entries for pragma Unevaluated_Use_Of_Old
7554         Add entries for Name_Warn, Name_Allow.
7556 2014-07-29  Robert Dewar  <dewar@adacore.com>
7558         * sem_aggr.adb (Resolve_Array_Aggregate): Change Is_Static_Range
7559         to Is_OK_Static_Range.
7560         * sem_attr.adb (Eval_Attribute): Make sure we properly flag
7561         static attributes (Eval_Attribute, case Size): Handle size of
7562         zero properly (Eval_Attribute, case Value_Size): Handle size of
7563         zero properly.
7564         * sem_ch13.adb: Minor reformatting.
7565         * sem_ch3.adb (Process_Range_Expr_In_Decl): Change
7566         Is_Static_Range to Is_OK_Static_Range.
7567         * sem_eval.adb (Eval_Case_Expression): Total rewrite, was
7568         wrong in several ways (Is_Static_Range): Moved here from spec
7569         (Is_Static_Subtype): Moved here from spec Change some incorrect
7570         Is_Static_Subtype calls to Is_OK_Static_Subtype.
7571         * sem_eval.ads: Add comments to section on
7572         Is_Static_Expression/Raises_Constraint_Error (Is_OK_Static_Range):
7573         Add clarifying comments (Is_Static_Range): Moved to body
7574         (Is_Statically_Unevaluated): New function.
7575         * sem_util.ads, sem_util.adb (Is_Preelaborable_Expression): Change
7576         Is_Static_Range to Is_OK_Static_Range.
7577         * sinfo.ads: Additional commments for Is_Static_Expression noting
7578         that clients should almost always use Is_OK_Static_Expression
7579         instead. Many other changes throughout front end units to obey
7580         this rule.
7581         * tbuild.ads, tbuild.adb (New_Occurrence_Of): Set Is_Static_Expression
7582         for enumeration literal.
7583         * exp_ch5.adb, sem_intr.adb, sem_ch5.adb, exp_attr.adb, exp_ch9.adb,
7584         lib-writ.adb, sem_ch9.adb, einfo.ads, checks.adb, checks.ads,
7585         sem_prag.adb, sem_ch12.adb, freeze.adb, sem_res.adb, exp_ch4.adb,
7586         exp_ch6.adb, sem_ch4.adb, sem_ch6.adb, exp_aggr.adb, sem_cat.adb:
7587         Replace all occurrences of Is_Static_Expression by
7588         Is_OK_Static_Expression.
7590 2014-07-29  Hristian Kirtchev  <kirtchev@adacore.com>
7592         * exp_ch4.adb (Process_Transient_Object): Remove constant
7593         In_Cond_Expr, use its initialization expression in place.
7594         * exp_ch7.adb (Process_Declarations): There is no need to check
7595         that a transient object being hooked is controlled as it would
7596         not have been hooked in the first place.
7597         * exp_util.adb (Is_Aliased): 'Reference-d or renamed transient
7598         objects are not considered aliased when the related context is
7599         a Boolean expression_with_actions.
7600         (Requires_Cleanup_Actions): There is no need to check that a transient
7601         object being hooked is controlled as it would not have been hooked in
7602         the first place.
7604 2014-07-29  Robert Dewar  <dewar@adacore.com>
7606         * errout.adb: Minor reformatting.
7608 2014-07-29  Hristian Kirtchev  <kirtchev@adacore.com>
7610         * exp_ch3.adb (Default_Initialize_Object): Add new variables
7611         Abrt_Blk and Dummy. Generate a dummy temporary when aborts are
7612         not allowed to ensure the symmetrical generation of symbols.
7613         * exp_ch7.adb (Build_Object_Declarations): Remove variables A_Expr
7614         and E_Decl. Add new variables Decl and Dummy. Generate a dummy
7615         temporary when aborts are not allowed to ensure symmertrical
7616         generation of symbols.
7617         * exp_intr.adb (Expand_Unc_Deallocation): Add new variable
7618         Dummy. Generate a dummy temporary when aborts are not allowed
7619         to ensure symmertrical generation of symbols.
7621 2014-07-29  Ed Schonberg  <schonberg@adacore.com>
7623         * exp_dbug.adb (Debug_Renaming_Declaration): For an object
7624         renaming, indicate that the renamed entity itself needs debug
7625         information. This is necessary if that entity is a temporary,
7626         e.g. part of the expansion of an explicit dereference in an
7627         iterator.
7629 2014-07-29  Thomas Quinot  <quinot@adacore.com>
7631         * errout.adb (Set_Error_Posted): When propagating flag to
7632         an enclosing named association, also propagate to the parent
7633         of that node, so that named and positional associations are
7634         treated consistently.
7636 2014-07-29  Ed Schonberg  <schonberg@adacore.com>
7638         * sem_attr.adb (Resolve_Attribute, case 'Update):  Set
7639         Do_Range_Check properly on array component expressions that
7640         have a scalar type. In GNATprove mode, only checks on scalar
7641         components must be marked by the front-end.
7643 2014-07-29  Ed Schonberg  <schonberg@adacore.com>
7645         * sem_res.adb (Resolve_Type_Conversion): If the type of the
7646         expression is a limited view, use the non-limited view when
7647         available.
7649 2014-07-29  Hristian Kirtchev  <kirtchev@adacore.com>
7651         * exp_ch4.adb (Expand_N_Case_Expression): Mark the generated
7652         case statement as coming from a conditional expression.
7653         (Expand_N_If_Expression): Mark the generated if statement as
7654         coming from a conditional expression.
7655         * exp_ch5.adb (Expand_N_Case_Statement): Do not process controlled
7656         objects found in case statement alternatives when the case
7657         statement is actually a case expression.
7658         (Expand_N_If_Statement):
7659         Do not process controlled objects found in an if statement when
7660         the if statement is actually an if expression.
7661         * sinfo.adb (From_Conditional_Expression): New routine.
7662         (Set_From_Conditional_Expression): New routine.
7663         * sinfo.ads Add new semantic flag From_Conditional_Expression and
7664         update related nodes.
7665         (From_Conditional_Expression): New routine along with pragma Inline.
7666         (Set_From_Conditional_Expression): New routine along with pragma Inline.
7668 2014-07-29  Hristian Kirtchev  <kirtchev@adacore.com>
7670         * exp_ch7.adb (Build_BIP_Cleanup_Stmts): Remove
7671         formal parameter Obj_Id and update the comment on usage. Renamed
7672         Obj_Typ to Func_Typ and update all occurrences.
7673         (Find_Last_Init): Remove formal parameter Decl and update the comment
7674         on usage.
7675         Remove local constants Obj_Id and Obj_Typ. Remove local variables
7676         Init_Typ and Is_Conc. Remove the extraction of the initialization type.
7677         (Find_Last_Init_In_Block): Remove formal parameter
7678         Init_Typ and update the comment on usage.
7679         (Is_Init_Call): Remove formal parameter Init_Typ and update the comment
7680         on usage. Check whether the procedure call is an initialization
7681         procedure of either the object type or the initialization type.
7682         (Is_Init_Proc_Of): New routine.
7683         (Process_Object_Declaration): Obj_Id and Obj_Typ are now global to this
7684         routine. Add new variable Init_Typ. Add circuitry to extract the object
7685         type as well as the initialization type.
7687 2014-07-29  Robert Dewar  <dewar@adacore.com>
7689         * sem_case.adb: Minor reformatting.
7690         * sem_aux.ads: Minor reformatting.
7692 2014-07-29  Ed Schonberg  <schonberg@adacore.com>
7694         * sinfo.adb (Set_Else_Actions, Set_Then_Actions): Set parent
7695         pointer on these fields, even though they are semantic, because
7696         subsequent analysis and expansion of action nades may require
7697         exploring the tree, for example to locate a node to be wrapped
7698         when a function with controlled result is called.
7700 2014-07-29  Claire Dross  <dross@adacore.com>
7702         * sem_aux.adb (Get_Binary_Nkind): Use case on
7703         Name_Id instead of an intermediate string.
7704         (Get_Unary_Nkind): Use case on Name_Id instead of an intermediate
7705         string.
7707 2014-07-29  Sergey Rybin  <rybin@adacore.com frybin>
7709         * gnat_ugn.texi (gnatelim, gnatstub, gnatmetric): Add note
7710         about processing sources with preprocessor directives.
7712 2014-07-24  Martin Liska  <mliska@suse.cz>
7714         * gcc-interface/trans.c (finalize_nrv): Adjust function call.
7715         * gcc-interface/utils.c (rest_of_subprog_body_compilation): Likewise.
7716         (gnat_write_global_declarations): Likewise.
7718 2014-07-19  David Wohlferd  <dw@LimeGreenSocks.com>
7720         * gnat_rm.texi: Clean up for makeinfo 5.2.
7722 2014-07-19  David Wohlferd  <dw@LimeGreenSocks.com>
7724         * gnat_rm.texi (Machine Code Insertions): Clean up.
7726 2014-07-18  Robert Dewar  <dewar@adacore.com>
7728         * exp_ch7.adb: Minor reformatting.
7730 2014-07-18  Claire Dross  <dross@adacore.com>
7732         * sem_aux.ads (Get_Binary_Nkind): New function that returns
7733         the Node_Kind value of an entity defining a binary operator.
7734         (Get_Unary_Nkind): New function that returns the Node_Kind value
7735         of an entity defining a unary operator.
7737 2014-07-18  Pascal Obry  <obry@adacore.com>
7739         * sysdep.c: comment update.
7740         * adaint.c (__gnat_fputwc): Use wchar_t on a limited set of
7741         platforms where it is known to be supported.
7743 2014-07-18  Thomas Quinot  <quinot@adacore.com>
7745         * sem_dist.adb (Process_Remote_AST_Declaration): Need
7746         to set Fat_Type's Ekind in order to be able to use its
7747         Corresponding_Remote_Type attribute.
7749 2014-07-18  Hristian Kirtchev  <kirtchev@adacore.com>
7751         * einfo.adb Last_Aggregate_Assignment is now Node 30.
7752         (Last_Aggregate_Assignment): Include
7753         constants in the assertion. Update the underlying node.
7754         (Set_Last_Aggregate_Assignment): Include constants in the
7755         assertion. Update the underlying node.  (Write_Field11_Name):
7756         Remove the entry for Last_Aggregate_Assignment.
7757         (Write_Field30_Name): Add an entry for Last_Aggregate_Assignment.
7758         * einfo.ads Update the node designation and usage of attribute
7759         Last_Aggregate_Assignment.
7760         * exp_aggr.adb (Expand_Array_Aggregate): Store the last
7761         assignment statement used to initialize a controlled object.
7762         (Late_Expansion): Store the last assignment statement used to
7763         initialize a controlled record or an array of controlled objects.
7764         * exp_ch3.adb (Expand_N_Object_Declaration): Default
7765         initialization of objects is now performed in a separate routine.
7766         (Default_Initialize_Object): New routine.
7767         * exp_ch7.adb (Build_BIP_Cleanup_Stmts): Add formal parameter
7768         Obj_Id. Update the comment on usage.
7769         (Find_Last_Init): Remove formal parameter Typ. Update comment on usage.
7770         Reimplement the logic.  (Find_Last_Init_In_Block): New routine.
7771         (Is_Init_Call): Add formal parameter Init_Typ. Update the
7772         comment on usage.  Account for the type init proc when trying
7773         to determine whether a statement is an initialization call.
7774         (Make_Adjust_Call): Rename formal parameter For_Parent to
7775         Skip_Self. Update all occurrences of For_Parent. Account for
7776         non-tagged types. Update the call to Make_Call.
7777         (Make_Call): Rename formal parameter For_Parent to Skip_Self. Update
7778         comment on usage. Update all occurrences of For_Parent.
7779         (Make_Final_Call): Rename formal parameter For_Parent to
7780         Skip_Self. Update all occurrences of For_Parent. Account
7781         for non-tagged types. Update the call to Make_Call.
7782         (Process_Object_Declaration): Most variables and constants are
7783         now local to the routine.
7784         * exp_ch7.ads (Make_Adjust_Call): Rename formal parameter
7785         For_Parent to Skip_Self. Update the comment on usage.
7786         (Make_Final_Call): Rename formal parameter For_Parent to
7787         Skip_Self. Update the comment on usage.
7789 2014-07-18  Ed Schonberg  <schonberg@adacore.com>
7791         * sem_ch9.adb (Analyze_Requeue): The entry being referenced
7792         can be a procedure that is implemented by entry, and have a
7793         formal that is a synchronized interface.  It does not have to
7794         be declared as a protected operation.
7796 2014-07-18  Robert Dewar  <dewar@adacore.com>
7798         * gnat_rm.texi: Remove mention of obsolete attributes
7799         Max[_Interrupt]_Priority, which have never been implemented
7800         (or at the very least were removed long ago if they ever were
7801         implemented.  Add documentation of Max[_Interrupt]_Priority
7802         constants in package System.
7803         * ttypes.ads: Document actual handling of package System,
7804         rather than a historical fantasy version.  Remove mention of
7805         non-existent attributes Max[_Interrupt]_Priority.
7807 2014-07-18  Pascal Obry  <obry@adacore.com>
7809         * a-witeio.adb (Put): No 16-bit character output when text
7810         translation is disabled.
7811         * i-cstrea.ads: Code clean up.
7813 2014-07-18  Robert Dewar  <dewar@adacore.com>
7815         * gnat_rm.texi: Document that Wchar_T_Size and Word_Size are
7816         static attributes.
7818 2014-07-18  Arnaud Charlet  <charlet@adacore.com>
7820         * a-witeio.adb, initialize.c: Update comments. Minor clean ups.
7822 2014-07-18  Pascal Obry  <obry@adacore.com>
7824         * adaint.c: Do not include wchar.h on VxWorks.
7825         * mingw32.h: Remove obsolete definition.
7827 2014-07-18  Pascal Obry  <obry@adacore.com>
7829         * a-textio.adb, a-witeio.adb, a-ztexio.adb: Use C_Streams Default_Text.
7830         * i-cstrea.ads (Content_Encoding): Moved here, add convention C.
7831         * s-ficobl.ads (Content_Encoding): Moved to C_Streams.
7832         * s-fileio.adb (Open): Adjust to use Content_Encoding from C_Streams.
7834 2014-07-18  Pascal Obry  <obry@adacore.com>
7836         * a-textio.adb: Rename Is_Text_File to Text_Encoding.
7837         * a-ztexio.adb: Likewise.
7838         * a-witeio.adb: Likewise.
7839         (Open): Pass file's translation mode to set_text_mode.
7840         * s-ficobl.ads (Content_Encoding): New type.
7841         (Text_Content_Encoding): New subtype.
7842         (AFCB): Rename Is_Text_File to Text_Encoding.
7843         * s-fileio.adb (Open): Handles new text_translation
7844         values. Remove Is_Text_File which is equivalent to Text_Encoding
7845         in Text_Content_Encoding.
7846         * adaint.h (__gnat_set_mode): New routine.
7847         * sysdep.c (__gnat_set_wide_text_mode): Removed.
7848         (__gnat_set_mode): New routine.
7850 2014-07-18  Arnaud Charlet  <charlet@adacore.com>
7852         * gcc-interface/decl.c, gcc-interface/trans.c,
7853         gcc-interface/utils.c (Is_Packed_Array_Type): Renamed 
7854         Is_Packed_Array_Impl_Type.
7856 2014-07-18  Gary Dismukes  <dismukes@adacore.com>
7858         * sem_util.adb: Minor typo correction.
7860 2014-07-18  Ben Brosgol  <brosgol@adacore.com>
7862         * gnat_rm.texi: Complete previous change.
7864 2014-07-18  Pascal Obry  <obry@adacore.com>
7866         * s-fileio.adb: Minor style fix.
7868 2014-07-18  Ed Schonberg  <schonberg@adacore.com>
7870         * sem_ch13.adb (Analyze_Aspect_Specifications): Detect improper
7871         specification of stream attributes for subtypes that are not
7872         first subtypes, to prevent malformed rep_item chains in the case
7873         of such illegal specifications for discriminated private subtypes.
7874         (Check_Overloaded_Name): Verify that the name is an entity name
7875         before other checks.
7877 2014-07-18  Pascal Obry  <obry@adacore.com>
7879         * adaint.c (__gnat_fputwc) Do not disable on cross-build.
7881 2014-07-18  Robert Dewar  <dewar@adacore.com>
7883         * sem_prag.adb, sem_attr.adb,
7884         sem_aggr.adb, sinfo.ads, sem_eval.ads: Minor reformatting.
7886 2014-07-18  Pascal Obry  <obry@adacore.com>
7888         * sysdep.c (__gnat_wide_text_translation_required): Removed from here.
7889         * initialize.c (__gnat_wide_text_translation_required): Defined here.
7891 2014-07-18  Pascal Obry  <obry@adacore.com>
7893         * adaint.c (__gnat_fputwc): New routine.
7894         * s-crtl.ads (fputwc): Now imported as __gnat_fputwc.
7896 2014-07-18  Hristian Kirtchev  <kirtchev@adacore.com>
7898         * einfo.adb: Flag 270 is now used as Stores_Attribute_Old_Prefix.
7899         (Set_Stores_Attribute_Old_Prefix): New routine.
7900         (Stores_Attribute_Old_Prefix): New routine.
7901         (Write_Entity_Flags):
7902         Output flag Stores_Attribute_Old_Prefix.
7903         * einfo.ads Add new flag Stores_Attribute_Old_Prefix along with
7904         comment on usage.
7905         (Set_Stores_Attribute_Old_Prefix): New routine
7906         along with pragma Inline.
7907         (Stores_Attribute_Old_Prefix): New
7908         routine along with pragma Inline.
7909         * exp_attr.adb (Expand_N_Attribute_Reference): Mark the generated
7910         constant which captures the result of attribute 'Old's prefix.
7911         * sem_util.adb (In_Assertion_Expression_Pragma): Recognize a
7912         relocated expression which acted as a prefix of attribute 'Old.
7914 2014-07-18  Bob Duff  <duff@adacore.com>
7916         * s-spsufi.adb (Finalize_And_Deallocate): Set Subpool.Owner to
7917         null before dispatching to Deallocate_Subpool.
7918         * s-stposu.ads (Default_Subpool_For_Pool): Change mode of
7919         parameter of Default_Subpool_For_Pool to 'in out'.
7920         * s-stposu.adb (Set_Pool_Of_Subpool): Use raise expression. Add
7921         a message to the raise.
7922         * sem_util.adb: Minor reformatting.
7924 2014-07-18  Robert Dewar  <dewar@adacore.com>
7926         * sem_util.adb (Check_Expression_Against_Static_Predicate):
7927         Mark expression as non-static if it fails static predicate check,
7928         and issue additional warning.
7930 2014-07-18  Pascal Obry  <obry@adacore.com>
7932         * a-witeio.adb (Put): Control translation based on
7933         wide_text_translation_required.
7934         * adaint.c (CurrentCCSEncoding): New variable.
7935         * initialize.c (__gnat_initialize): On Windows initialize
7936         CurrentCCSEncoding based on values in GNAT_CCS_ENCODING
7937         environment variable.
7938         * mingw32.h (CurrentCCSEncoding): New external.
7939         (__gnat_wide_text_translation_required): Likewise.
7940         * sysdep.c (wide_text_translation_required): New variable.
7941         (__gnat_set_wide_text_mode): Set mode based on CurrentCCSEncoding.
7943 2014-07-18  Hristian Kirtchev  <kirtchev@adacore.com>
7945         * sem_prag.adb (Analyze_Refined_Depends_In_Decl_Part): Remove global
7946         variable Refined_States.  Add global variable Matched_Items.
7947         (Check_Dependency_Clause): Account for dependency
7948         clauses utilizing states with visible null refinements.
7949         (Is_Null_Refined_State): New routine.
7950         (Match_Items): Record each successfully matched item of pragma Depends.
7951         (Record_Item): New routine.
7953 2014-07-18  Ed Schonberg  <schonberg@adacore.com>
7955         * sem_attr.adb (Analyze_Attribute, case 'Update): Set
7956         Do_Range_Check flag on a dynamic index expression used in a
7957         component association in the argument of Update.
7959 2014-07-18  Gary Dismukes  <dismukes@adacore.com>
7961         * einfo.ads, sem_eval.ads, sem_ch13.adb: Minor reformatting.
7963 2014-07-18  Hristian Kirtchev  <kirtchev@adacore.com>
7965         * exp_ch6.adb (Expand_Simple_Function_Return): Redo the marking
7966         of enclosing blocks, loops and the enclosing function using a
7967         parent-based traversal.
7968         * exp_util.adb (Wrap_Statements_In_Block): Suppress the secondary
7969         stack reclamation if the iterator loop contains a return statement
7970         that uses the stack.
7971         * sem_ch5.adb (Analyze_Loop_Statement): There is no need to
7972         patch up the scope stack as the secondary stack management now
7973         takes into account the enclosing function of the iterator loop.
7975 2014-07-18  Robert Dewar  <dewar@adacore.com>
7977         * sem_ch3.adb, g-memdum.ads, i-cstrea.ads: Minor reformatting.
7979 2014-07-18  Robert Dewar  <dewar@adacore.com>
7981         * einfo.adb (Has_Static_Predicate): New function.
7982         (Set_Has_Static_Predicate): New procedure.
7983         * einfo.ads (Has_Static_Predicate): New flag.
7984         * sem_ch13.adb (Is_Predicate_Static): New function
7985         (Build_Predicate_Functions): Use Is_Predicate_Static to reorganize
7986         (Add_Call): Minor change in Sloc of generated expression
7987         (Add_Predicates): Remove setting of Static_Pred, no longer used.
7988         * sem_ch4.adb (Has_Static_Predicate): Removed this function,
7989         replace by use of the entity flag Has_Static_Predicate_Aspect.
7990         * sem_eval.adb (Eval_Static_Predicate_Check): Check real case
7991         and issue warning that predicate is not checked for now.
7992         * sem_eval.ads (Eval_Static_Predicate_Check): Fix comments in
7993         spec.
7994         * sem_util.adb (Check_Expression_Against_Static_Predicate):
7995         Carry out check for any case where there is a static predicate,
7996         and output appropriate message.
7997         * sinfo.ads: Minor comment corrections.
7999 2014-07-18  Ed Schonberg  <schonberg@adacore.com>
8001         * exp_ch3.adb (Expand_Freeze_Record_Type): If the type is derived
8002         from an untagged private type whose full view is tagged, the type
8003         is marked tagged for layout reasons, but it has no dispatch table,
8004         so Set_All_DT_Position must not be called.
8005         * exp_ch13.adb: If the freeze node is for a type internal to a
8006         record declaration, as is the case for a class-wide subtype
8007         of a parent component, the relevant scope is the scope of the
8008         enclosing record.
8010 2014-07-18  Thomas Quinot  <quinot@adacore.com>
8012         * g-memdum.adb, g-memdum.ads: Code clean ups.
8014 2014-07-18  Hristian Kirtchev  <kirtchev@adacore.com>
8016         * sem_prag.adb (Check_Dependency_Clause):
8017         Update the comment on usage. Reimplement the mechanism which
8018         attempts to match a single clause of Depends against one or
8019         more clauses of Refined_Depends.
8020         (Input_Match): Removed.
8021         (Inputs_Match): Removed.
8022         (Is_Self_Referential): Removed.
8023         (Normalize_Clause): Update the call to Split_Multiple_Outputs.
8024         (Normalize_Outputs): Rename variable Split to New_Claue and update
8025         all its occurrences.
8026         (Report_Extra_Clauses): Update the comment on usage.
8027         (Split_Multiple_Outputs): Renamed to Normalize_Outputs.
8029 2014-07-18  Gary Dismukes  <dismukes@adacore.com>
8031         * i-cstrea.ads: Minor reformatting.
8033 2014-07-18  Hristian Kirtchev  <kirtchev@adacore.com>
8035         * exp_util.adb (Wrap_Statements_In_Block): Propagate both
8036         secondary stack-related flags to the generated block.
8037         * sem_ch5.adb (Analyze_Loop_Statement): Update the scope chain
8038         once the loop is relocated in a block.
8040 2014-07-18  Robert Dewar  <dewar@adacore.com>
8042         * repinfo.ads: Add documentation on handling of back annotation
8043         for dynamic case.
8045 2014-07-18  Ed Schonberg  <schonberg@adacore.com>
8047         * sinfo.ads, sinfo.adb (Incomplete_View): New semantic attribute
8048         of full type declaration, denotes previous declaration for
8049         incomplete view of the type.
8050         * sem_ch3.adb (Analyze_Full_Type_Declaration): Set Incomplete_View
8051         of declaration if one is present.
8052         (Replace_Type): When constructing the signature of an inherited
8053         operation, handle properly the case where the operation has a
8054         formal whose type is an incomplete view.
8055         * sem_util.adb (Collect_Primitive_Operations): Handle properly
8056         the case of an operation declared after an incomplete declaration
8057         for a type T and before the full declaration of T.
8059 2014-07-18  Pascal Obry  <obry@adacore.com>
8061         * i-cstrea.ads: Add documentation for set_wide_text_mode.
8063 2014-07-18  Robert Dewar  <dewar@adacore.com>
8065         * a-witeio.adb: Minor code reorganization.
8066         * i-cstrea.ads: Add comment.
8068 2014-07-18  Thomas Quinot  <quinot@adacore.com>
8070         * s-oscons-tmplt.c (NAME_MAX): Minor cleaup and comment
8071         clarifications.
8073 2014-07-18  Robert Dewar  <dewar@adacore.com>
8075         * g-memdum.adb, g-memdum.ads, exp_strm.adb: Minor reformatting.
8077 2014-07-18  Pascal Obry  <obry@adacore.com>
8079         * s-crtl.ads, i-cstrea.ads (fputwc): New routine.
8080         * a-witeio.adb (Put): On platforms where there is translation
8081         done by the OS output the raw text.
8082         (New_Line): Use Put above to properly handle the LM wide characters.
8084 2014-07-18  Thomas Quinot  <quinot@adacore.com>
8086         * g-memdum.adb, g-memdum.ads (Dump): New parameter Prefix, defaulted
8087         to Absolute_Address.
8089 2014-07-18  Eric Botcazou  <ebotcazou@adacore.com>
8091         * opt.ads (Suppress_Back_Annotation): Remove as unused.
8092         * fe.h (Back_Annotate_Rep_Info): Likewise.
8093         (Global_Discard_Names): Likewise.
8095 2014-07-18  Robert Dewar  <dewar@adacore.com>
8097         * sem_ch13.adb (Is_Type_Ref): Check that type name is not
8098         parenthesized.
8100 2014-07-18  Vincent Celier  <celier@adacore.com>
8102         * s-osinte-vms.ads: Fix style errors.
8104 2014-07-18  Thomas Quinot  <quinot@adacore.com>
8106         * s-oscons-tmplt.c (_POSIX_SOURCE): Define in order to get
8107         NAME_MAX and PATH_MAX.
8109 2014-07-18  Bob Duff  <duff@adacore.com>
8111         * exp_strm.adb (Build_Record_Or_Elementary_Input_Function,
8112         Build_Record_Or_Elementary_Output_Procedure): For Input and
8113         Output attributes, do not read/write the discriminants if they
8114         have default values; that will be done by Read/Write.
8116 2014-07-18  Robert Dewar  <dewar@adacore.com>
8118         * sem_aggr.adb, exp_ch5.adb, sem_ch3.adb, layout.adb, sem_type.adb,
8119         exp_util.adb, exp_attr.adb, einfo.adb, einfo.ads, exp_pakd.adb,
8120         checks.adb, exp_pakd.ads, freeze.adb, sem_util.adb, exp_dbug.adb,
8121         exp_dbug.ads, exp_ch4.adb, sem_ch8.adb, exp_aggr.adb, sem_eval.adb,
8122         sem_ch13.adb: Change name Packed_Array_Type to Packed_Array_Impl_Type.
8124 2014-07-18  Robert Dewar  <dewar@adacore.com>
8126         * lib-writ.adb, makeutl.adb, ali.ads: Minor reformatting.
8128 2014-07-18  Vincent Celier  <celier@adacore.com>
8130         * lib-writ.ads: Update documentation about the D lines.
8132 2014-07-18  Ed Schonberg  <schonberg@adacore.com>
8134         * sem_ch13.adb (Replace_Type_References_Generic): Use type entity
8135         as a parameter, rather than its Chars field, in order to locate
8136         freeze node of type. If the predicate or invariant has references
8137         to types other than the one to which the contract applies, these
8138         types must be frozen, and the corresponding predicate functions
8139         created, before that freeze node.
8141 2014-07-18  Robert Dewar  <dewar@adacore.com>
8143         * freeze.adb, einfo.ads, einfo.adb: Minor code reorganization.
8144         * par_sco.adb: Minor reformatting.
8146 2014-07-18  Gary Dismukes  <dismukes@adacore.com>
8148         * exp_ch4.adb (Real_Range_Check): Turn off
8149         the Do_Range_Check flag on the conversion's current Expression
8150         argument rather than on the originally captured Operand node,
8151         as Expression may reflect a rewriting (as in conversions to a
8152         fixed-point type).
8154 2014-07-18  Vincent Celier  <celier@adacore.com>
8156         * ali.adb (Scan_ALI): Set Sdep_Record.Unit_Name, when the unit
8157         is not a subunit.
8158         * ali.ads (Sdep_Record): New component Unit_Name.
8159         * lib-writ.adb (Write_ALI): Write the unit name in D lines.
8160         * makeutl.adb (Check_Source_Info_In_ALI): Return False if a
8161         dependent unit is in a project and the source file name is not
8162         one of its sources.
8164 2014-07-18  Bob Duff  <duff@adacore.com>
8166         * s-addima.ads: Minor: add comment.
8168 2014-07-18  Thomas Quinot  <quinot@adacore.com>
8170         * freeze.adb (Check_Component_Storage_Order): Fix enforcement
8171         of nesting rules for composites with different SSOs.
8173 2014-07-18  Thomas Quinot  <quinot@adacore.com>
8175         * par_sco.adb (Is_Logical_Operator): An If_Expression is not
8176         a proper logical operator.
8177         (Has_Decision): An If_Expression indicates the presence of a decision
8178         although it is not a logical operator.
8180 2014-07-18  Robert Dewar  <dewar@adacore.com>
8182         * gnat_ugn.texi: Remove note that -gnatR not allowed with -gnatc.
8183         * switch-c.adb: Remove prohibition of -gnatR and -gnatc together.
8185 2014-07-18  Eric Botcazou  <ebotcazou@adacore.com>
8187         * sem_ch13.adb (Kill_Rep_Clause): Clear Comes_From_Source flag
8188         on the null statement.
8190 2014-07-18  Thomas Quinot  <quinot@adacore.com>
8192         * adaint.c: Minor comment rewording.
8193         * socket.c: Define macros _REENTRANT and _THREAD_SAFE so that
8194         use of errno in this file is thread safe.
8196 2014-07-18  Arnaud Charlet  <charlet@adacore.com>
8198         * gnat_ugn.texi: Doc clarification.
8199         * sem_ch13.adb (Kill_Rep_Clause): Use Replace not Rewrite.
8200         * sem_ch13.ads: Minor comment update.
8202 2014-07-18  Robert Dewar  <dewar@adacore.com>
8204         * repinfo.ads: Minor comment fix.
8206 2014-07-18  Robert Dewar  <dewar@adacore.com>
8208         * par-prag.adb: Add dummy entry for Default_Scalar_Storage_Order.
8209         * sem_prag.adb: Add dummy implementation of
8210         Default_Scalar_Storage_Order.
8211         * snames.ads-tmpl: Add dummy entry for
8212         Default_Scalar_Storage_Order pragma.
8214 2014-07-18  Robert Dewar  <dewar@adacore.com>
8216         * opt.adb (Tree_Read): Read Address_Is_Private,
8217         Ignore_Rep_Clauses, Ignore_Style_Check_Pragmas, Multiple_Unit_Index.
8218         (Tree_Write): Corresponding writes
8219         * opt.ads: Minor comment reformatting and fixes.
8220         * tree_io.ads: Increment ASIS_Version_Number.
8222 2014-07-18  Robert Dewar  <dewar@adacore.com>
8224         * sem_attr.adb, s-os_lib.ads, prj-tree.adb: Minor reformatting.
8225         * types.h: Fix typo.
8227 2014-07-18  Robert Dewar  <dewar@adacore.com>
8229         * freeze.adb (Check_Address_Clause): Use Kill_Rep_Clause (no
8230         functional change).
8231         * gnat_ugn.texi: Document that -gnatI removes rep clauses from
8232         ASIS trees.
8233         * sem_ch13.adb (Kill_Rep_Clause): New procedure
8234         (Analyze_Attribute_Definition_Clause): Use
8235         Kill_Rep_Clause. This is just a cleanup, no functional effect.
8236         (Analyze_Enumeration_Representation_Clause):
8237         Use Kill_Rep_Clause. This means that enum rep
8238         clauses are now properly removed from -gnatct trees.
8239         (Analyze_Record_Representation_Clause): Same change.
8240         * sem_ch13.ads (Kill_Rep_Clause): New procedure.
8242 2014-07-18  Pascal Obry  <obry@adacore.com>
8244         * s-os_lib.ads, s-os_lib.adb (GM_Time_Of): New routine to create an
8245         OS_Time from time parts.
8246         * adaint.h, adaint.c (__gnat_to_os_time): New routine.
8248 2014-07-18  Ed Schonberg  <schonberg@adacore.com>
8250         * sem_ch4.adb (Try_Container_Indexing): Refine previous patch for
8251         indexing over containers that are derived types: check whether
8252         signature of found operation has the correct first parameter
8253         before retrieving directly a primitive operation.
8255 2014-07-18  Ed Schonberg  <schonberg@adacore.com>
8257         * sem_attr.adb (Analyze_Attribute, case 'Update): Set
8258         Do_Range_Check flag on dynamic bounds of a range used in a
8259         component association in the argument of Update.
8261 2014-07-18  Thomas Quinot  <quinot@adacore.com>
8263         * adaint.c: #define _REENTRANT and _THREAD_SAFE in order for
8264         accesses to errno(3) to be thread safe.
8266 2014-07-18  Vincent Celier  <celier@adacore.com>
8268         * prj-tree.adb (Imported_Or_Extended_Project_Of): For each non
8269         limited imported project that is an extending project, return
8270         a project being extended if it has the expected name.
8272 2014-07-18  Pascal Obry  <obry@adacore.com>
8274         * s-os_lib.ads, s-os_lib.adb (Set_File_Last_Modify_Time_Stamp): New
8275         routine to set the last modification time stamp for the given file.
8276         * gnatchop.adb (File_Time_Stamp): Removed.
8277         (Write_Unit): Use
8278         Set_File_Last_Modify_Time_Stamp instead of ad-hoc implementation.
8280 2014-07-18  Ed Schonberg  <schonberg@adacore.com>
8282         * sem_aggr.adb (Aggregate_Constraint_Checks): Moved to sem_util.
8283         * sem_util.ads, sem_util.adb (Aggregate_Constraint_Checks):
8284         Moved here, so it can be shared with the resolution of 'Update,
8285         whose argument shares some features with aggregates.
8286         * sem_attr.adb (Resolve_Attribute, case 'Update): Apply
8287         Aggregate_Constraint_Checks with the expression of each
8288         association, so that the Do_Range_Check flag is set when needed.
8290 2014-07-18  Ed Schonberg  <schonberg@adacore.com>
8292         * sem_ch4.adb (Try_Container_Indexing):  If the container
8293         type is a derived type, the value of the inherited  aspect is
8294         the Reference operation declared for the parent type. However,
8295         Reference is also a primitive operation of the new type, and
8296         the inherited operation has a different signature. We retrieve
8297         the right one from the list of primitive operations of the
8298         derived type.
8300 2014-07-18  Vincent Celier  <celier@adacore.com>
8302         * debug.adb: Update comment.
8304 2014-07-18  Hristian Kirtchev  <kirtchev@adacore.com>
8306         * exp_util.adb (Needs_Finalization): There is no reason why a
8307         C type should not benefit from finalization actions.
8309 2014-07-18  Thomas Quinot  <quinot@adacore.com>
8311         * s-oscons-tmplt.c (NAME_MAX): Fix definition for Solaris
8312         (FILENAME_MAX): Remove unneeded definition.
8314 2014-07-18  Robert Dewar  <dewar@adacore.com>
8316         * exp_attr.adb, debug.adb: Update comments.
8318 2014-07-18  Vincent Celier  <celier@adacore.com>
8320         * par-ch4.adb (Simple_Expression): Add missing style check
8321         for binary adding operators.
8322         (Term): Add missing style check for multiplying operators.
8324 2014-07-18  Robert Dewar  <dewar@adacore.com>
8326         * impunit.adb: Minor comment correction.
8327         * widechar.adb, s-wchcon.ads: Minor comment corrections.
8329 2014-07-18  Robert Dewar  <dewar@adacore.com>
8331         * sem_ch13.adb (Build_Discrete_Static_Predicate): New name
8332         for Build_Static_Predicate (Build_Predicate_Functions):
8333         Don't try to build discrete predicate for real type.
8334         (Build_Predicate_Functions): Report attempt to use
8335         Static_Predicate function on real type as unimplemented.
8336         * sem_util.adb (Check_Expression_Against_Static_Predicate):
8337         Add guard to prevent blow up on predicate for real type.
8339 2014-07-18  Ed Schonberg  <schonberg@adacore.com>
8341         * einfo.adb (Set_Static_Predicate): Simplify assertion to handle
8342         properly static predicate on enumeration types and modular types
8343         (not subtypes).
8345 2014-07-18  Pierre-Marie Derodat  <derodat@adacore.com>
8347         * scos.ads (SCO_Unit_Table_Entry): Add a field to keep track of
8348         the corresponding source file index.
8349         * get_scos.ads (Get_SCOs): Add a default value for it.
8350         * par_sco.adb (SCO_Record): Fill the corresponding value.
8351         * scos.h: New.
8353 2014-07-18  Vincent Celier  <celier@adacore.com>
8355         * a-strunb-shared.adb, s-auxdec.ads, s-rannum.adb, atree.ads,
8356         urealp.adb, vms_data.ads, lib.ads, s-auxdec-vms_64.ads: Minor
8357         reformatting.
8358         * gnat_ugn.texi: Add documentation for new gnatmem switch -t.
8360 2014-07-18  Thomas Quinot  <quinot@adacore.com>
8362         * g-sercom.ads (Set): document possible data loss.
8364 2014-07-18  Ed Schonberg  <schonberg@adacore.com>
8366         * exp_attr.adb (Expand_N_Attribute_Reference, cases Input,
8367         Output, Read, Write): If the restriction No_Streams is active,
8368         replace each occurrence of a stream attribute by an explicit
8369         Raise statement.
8371 2014-07-18  Robert Dewar  <dewar@adacore.com>
8373         * par_sco.adb, a-reatim.ads, exp_attr.adb, sem_util.adb: Minor
8374         reformatting.
8376 2014-07-18  Robert Dewar  <dewar@adacore.com>
8378         * einfo.ads, einfo.adb (Has_Out_Or_In_Out_Parameter): New flag and
8379         function.
8380         (Set_Has_Out_Or_In_Out_Parameter): New procedure.
8381         * sem_ch6.adb (Set_Formal_Mode): Set Has_Out_Or_In_Out_Parameter flag.
8382         * sem_res.adb (Resolve_Call): Error if call of Ada 2012 function
8383         with OUT or IN OUT from earlier Ada mode (e.g. Ada 2005)
8385 2014-07-18  Robert Dewar  <dewar@adacore.com>
8387         * bcheck.adb (Check_Consistent_Restrictions):
8388         Remove obsolete code checking for violation of
8389         No_Standard_Allocators_After_Elaboration (main program)
8390         * bindgen.adb (Gen_Adainit): Handle
8391         No_Standard_Allocators_After_Elaboration
8392         (Gen_Output_File_Ada): ditto.
8393         * exp_ch4.adb (Expand_N_Allocator): Handle
8394         No_Standard_Allocators_After_Elaboration.
8395         * Makefile.rtl: Add entry for s-elaall
8396         * rtsfind.ads: Add entry for Check_Standard_Allocator.
8397         * s-elaall.ads, s-elaall.adb: New files.
8398         * sem_ch4.adb (Analyze_Allocator): Handle
8399         No_Standard_Allocators_After_Elaboration.
8401 2014-07-18  Robert Dewar  <dewar@adacore.com>
8403         * lib.adb, lib.ads, lib-writ.adb, lib-writ.ads, ali.adb,
8404         ali.ads, lib-load.adb: Remove Lib.Has_Allocator and all uses.
8405         Remove AB parameter from ali files and all uses.
8406         Remove Allocator_In_Body and all uses.
8408 2014-07-18  Robert Dewar  <dewar@adacore.com>
8410         * g-expect-vms.adb: Add comment.
8412 2014-07-18  Thomas Quinot  <quinot@adacore.com>
8414         * par_sco.adb (Is_Logical_Operation): return True for
8415         N_If_Expression.
8417 2014-07-18  Ed Schonberg  <schonberg@adacore.com>
8419         * sem_attr.adb (Resolve_Attribute, case 'Update): Do full
8420         analysis and resolution of each choice in the associations within
8421         the argument of Update, because they may be variable names.
8423 2014-07-18  Hristian Kirtchev  <kirtchev@adacore.com>
8425         * exp_attr.adb (Expand_Loop_Entry_Attribute): Insert any condition
8426         actions before the generated if statement.
8428 2014-07-18  Hristian Kirtchev  <kirtchev@adacore.com>
8430         * gnat_ugn.texi Enhance the documentation of
8431         switches -gnateA and -gnateV.
8433 2014-07-18  Ed Schonberg  <schonberg@adacore.com>
8435         * sem_util.adb (Build_Default_Subtype): Add missing condition
8436         so that code matches description: use the full view of the base
8437         only if the base is private and the subtype is not.
8439 2014-07-17  Gary Dismukes  <dismukes@adacore.com>
8441         * exp_disp.adb: Minor reformatting.
8442         * exp_disp.adb: Minor code reorganization.
8444 2014-07-17  Thomas Quinot  <quinot@adacore.com>
8446         * gnat_rm.texi, freeze.adb (Check_Component_Storage_Order): Do not
8447         require an explicit SSO attribute definition clause on a composite type
8448         just because one of its components has one.
8450 2014-07-17  Robert Dewar  <dewar@adacore.com>
8452         * sem_attr.adb (Analyze_Attribute, case Loop_Entry): Rewrite
8453         attribute out of existence if the enclosing pragma is ignored.
8454         * sem_util.adb: Minor reformatting.
8456 2014-07-17  Ed Schonberg  <schonberg@adacore.com>
8458         * exp_aggr.adb (Expand_Array_Aggregate): Handle properly an
8459         array aggregate expanded into assignments when it appears as a
8460         local declaration in an inlined body.
8462 2014-07-17  Doug Rupp  <rupp@adacore.com>
8464         * init.c [__ANDROID__]: Modify for ZCX.
8465         * exp_aggr.adb: Minor reformatting
8466         * sigtramp-armvxw.c, sigtramp-ppcvxw.c: Update comments.
8468 2014-07-17  Robert Dewar  <dewar@adacore.com>
8470         * a-strunb-shared.ads, a-stwiun-shared.ads, a-stzunb-shared.ads,
8471         exp_ch7.adb, g-pehage.ads, g-socket.ads, gnat_ugn.texi, gnat_ugx.texi,
8472         scng.adb: Remove incorrect usage "allow to" and "allows to".
8474 2014-07-17  Robert Dewar  <dewar@adacore.com>
8476         * exp_dist.adb: Minor reformatting.
8478 2014-07-17  Bob Duff  <duff@adacore.com>
8480         * gnat_ugn.texi: Improve documentation of Unrestricted_Access.
8482 2014-07-17  Robert Dewar  <dewar@adacore.com>
8484         * sem_ch13.adb (Build_Invariant_Procedure): Add variable Nam
8485         (Add_Invariants): Set Nam to Name_Type_Invariant if from aspect.
8487 2014-07-17  Thomas Quinot  <quinot@adacore.com>
8489         * exp_pakd.adb (Create_Packed_Array_Type.Install_PAT): For a
8490         non-bit-packed array, propagate Reverse_Storage_Order to the
8491         packed array type.
8493 2014-07-17  Javier Miranda  <miranda@adacore.com>
8495         * exp_disp.adb: Fix comment.
8496         * exp_pakd.adb: Minor reformatting.
8498 2014-07-17  Robert Dewar  <dewar@adacore.com>
8500         * bindgen.adb (Gen_Elab_Calls): Skip reference to elab
8501         entity if none exists (Gen_Elab_Calls): Complain if clash with
8502         No_Multiple_Elaboration.
8503         * s-rident.ads, restrict.ads: Add restriction No_Multiple_Elaboration.
8504         * sem_util.adb (Build_Elaboration_Entity): Skip building entity
8505         if not needed.
8506         * gnat_rm.texi: Document restriction No_Multiple_Elaboration.
8507         * sem_ch4.adb: Minor comment updates.
8509 2014-07-17  Ed Schonberg  <schonberg@adacore.com>
8511         * exp_ch9.adb (Buid_Protected_Subprogram_Call): Preserve type
8512         of function call for later use when shared passive objects
8513         are involved.
8515 2014-07-17  Hristian Kirtchev  <kirtchev@adacore.com>
8517         * par-ch13.adb (Get_Aspect_Specifications):
8518         Catch a case where the argument of SPARK aspect Refined_State
8519         is not properly parenthesized.
8521 2014-07-17  Hristian Kirtchev  <kirtchev@adacore.com>
8523         * exp_ch6.adb (Expand_Ctrl_Function_Call): Do not extend
8524         the lifetime of a reference to an Ada 2012 container element.
8525         (Is_Element_Reference): New routine.
8527 2014-07-17  Robert Dewar  <dewar@adacore.com>
8529         * ali.ads: Minor comment fix.
8530         * lib-writ.adb: Minor reformatting.
8532 2014-07-17  Ed Schonberg  <schonberg@adacore.com>
8534         * sem_ch10.adb (Analyze_Proper_Body): When analyzing a subunit
8535         in ASIS mode, load another subunit only if it a subunit of the
8536         current one, not a sibling that has been reached through the
8537         analysis of an ancestor. This allows the construction of the
8538         ASIS tree for the subunit even when sibling subunits have errors.
8540 2014-07-17  Hristian Kirtchev  <kirtchev@adacore.com>
8542         * sem_ch3.adb (Analyze_Declarations): Remove the guard which
8543         prevents the analysis of various contracts when the associated
8544         construct is erroneous.
8545         * sem_util.adb (Save_SPARK_Mode_And_Set): Do not query the
8546         SPARK_Pragma of an illegal or a partially decorated construct.
8548 2014-07-17  Robert Dewar  <dewar@adacore.com>
8550         * s-imguns.ads: Minor reformatting.
8552 2014-07-17  Hristian Kirtchev  <kirtchev@adacore.com>
8554         * exp_ch7.adb (Build_Finalization_Master): Move all local
8555         variables to the proper code section. When looking for an existing
8556         finalization master, inspect the ultimate ancestor type of the
8557         full view.
8558         * sem_util.ads, sem_util.adb (Root_Type_Of_Full_View): New routine.
8560 2014-07-17  Robert Dewar  <dewar@adacore.com>
8562         * aspects.ads, aspects.adb: Add entries for aspect Annotate.
8563         * gnat_rm.texi: Document Entity argument for pragma Annotate and
8564         Annotate aspect.
8565         * sem_ch13.adb (Analyze_Aspect_Specification): Add processing
8566         for Annotate aspect.
8567         * sem_prag.adb (Analyze_Pragma, case Annotate): Allow optional
8568         Entity argument at end.
8569         * sinfo.ads (N_Aspect_Specification): Add note on Annotate aspect.
8571 2014-07-17  Tristan Gingold  <gingold@adacore.com>
8573         * s-imguns.ads: Fix minor typo.
8575 2014-07-17  Thomas Quinot  <quinot@adacore.com>
8577         * sprint.adb: Minor reformatting.
8579 2014-07-17  Robert Dewar  <dewar@adacore.com>
8581         * sprint.adb (Write_Itype): Print proper header for string
8582         literal subtype.
8584 2014-07-17  Steve Baird  <baird@adacore.com>
8586         * sinfo.ads, sem_scil.ads: Improve comments, minor reformatting.
8588 2014-07-17  Vincent Celier  <celier@adacore.com>
8590         * gnatbind.adb: Change in message "try ... for more information".
8592 2014-07-17  Robert Dewar  <dewar@adacore.com>
8594         * sprint.adb: Code clean up.
8596 2014-07-17  Hristian Kirtchev  <kirtchev@adacore.com>
8598         * exp_ch7.adb (Find_Last_Init): Relocate local variables to
8599         the relevant code section. Add new local constant Obj_Id. When
8600         a limited controlled object is initialized by a function call,
8601         the build-in-place object access function call acts as the last
8602         initialization statement.
8603         * exp_util.adb (Is_Object_Access_BIP_Func_Call): New routine.
8604         (Is_Secondary_Stack_BIP_Func_Call): Code reformatting.
8605         * exp_util.ads (Is_Object_Access_BIP_Func_Call): New routine.
8607 2014-07-17  Ed Schonberg  <schonberg@adacore.com>
8609         * sem_ch8.adb (Analyze_Generic_Renaming): For generic subprograms,
8610         propagate intrinsic flag to renamed entity, to allow e.g. renaming
8611         of Unchecked_Conversion.
8612         * sem_ch3.adb (Analyze_Declarations): Do not analyze contracts
8613         if the declaration has errors.
8615 2014-07-17  Ed Schonberg  <schonberg@adacore.com>
8617         * a-rbtgbk.adb: a-rbtgbk.adb (Generic_Insert_Post): Check whether
8618         container is busy before checking whether capacity allows for
8619         a further insertion. Insertion in a busy container that is full
8620         raises Program_Error rather than Capacity_Error. Previous to that
8621         patch which exception was raised varied among container types.
8623 2014-07-17  Robert Dewar  <dewar@adacore.com>
8625         * g-comlin.ads, g-comlin.adb: Minor clean up.
8627 2014-07-17  Bob Duff  <duff@adacore.com>
8629         * gnat_ugn.texi: Update gnatpp doc.
8631 2014-07-17  Robert Dewar  <dewar@adacore.com>
8633         * gnat_rm.texi: Document new restriction No_Long_Long_Integers.
8634         * exp_ch4.adb (Make_Array_Comparison_Op): Add note that we
8635         could do this by actually expanding a real generic.
8636         * a-tags.ads: Add comments about performance.
8637         * sprint.adb (Sprint_Node_Actual, case N_Object_Declaration):
8638         Print Etype of defining identifier, rather than the object
8639         definition. More information.
8641 2014-07-17  Thomas Quinot  <quinot@adacore.com>
8643         * exp_dist.adb: Minor documentation clarification.
8645 2014-07-17  Hristian Kirtchev  <kirtchev@adacore.com>
8647         * exp_util.adb (Is_Aliased): Revert previous change.
8649 2014-07-17  Vincent Celier  <celier@adacore.com>
8651         * g-comlin.adb (Try_Help): New procedure.
8652         (Getopt): Use new procedure Try_Help.
8653         * g-comlin.ads (Try_Help): New procedure.
8655 2014-07-17  Bob Duff  <duff@adacore.com>
8657         * gnat_ugn.texi: Minor update.
8659 2014-07-17  Robert Dewar  <dewar@adacore.com>
8661         * gnat_rm.texi: Improve documentation of Unrestricted_Access.
8662         * sinfo.ads: Document restriction on aggregates (must expand to
8663         assignments if one or more assignments needs expansion, e.g. for
8664         controlled types).
8665         * sem_ch13.adb: All warning messages regarding bit order should
8666         be info: messages.
8667         * gnat_ugn.texi: Minor correction of missing @ on @code
8669 2014-07-17  Robert Dewar  <dewar@adacore.com>
8671         * restrict.ads (Implementation_Restriction): Add No_Long_Long_Integer.
8672         * s-rident.ads (Partition_Boolean_Restrictions): Add
8673         No_Long_Long_Integer.
8674         * sem_ch3.adb (Modular_Type_Declaration): Size must be <=
8675         Long_Integer'Size if restriction No_Long_Long_Integer is active.
8676         (Signed_Integer_Type_Declaration): Do not allow Long_Long_Integer
8677         as the implicit base type for a signed integer type declaration
8678         if restriction No_Long_Long_Integer is active.
8679         * sem_util.ads, sem_util.adb (Set_Entity_With_Checks): Include check for
8680         No_Long_Long_Integer.
8682 2014-07-17  Robert Dewar  <dewar@adacore.com>
8684         * sem_ch3.adb, a-ztexio.ads, exp_imgv.adb, casing.adb, casing.ads,
8685         einfo.ads, checks.adb, sem_ch12.adb, a-textio.ads, freeze.adb,
8686         repinfo.adb, exp_ch6.adb, sem_ch4.adb, a-witeio.ads, sem_ch8.adb,
8687         sem_warn.adb, exp_aggr.adb, exp_dist.adb, par-tchk.adb, s-fatgen.adb,
8688         treepr.adb, lib-xref.adb: Remove the word kludge from ada sources.
8690 2014-07-17  Robert Dewar  <dewar@adacore.com>
8692         * debug.adb: Remove -gnatdQ.
8693         * exp_disp.adb: Remove -gnatdQ.
8694         * a-ztenio.ads, a-wtinio.ads, a-wtmoio.ads, a-ztcoau.ads, a-tiinio.ads,
8695         a-wtfiio.ads, a-timoio.ads, sem_ch12.adb, a-tifiio.ads, a-ztinio.ads,
8696         rtsfind.adb, rtsfind.ads, a-ztmoio.ads, a-wtdeio.ads, a-ztfiio.ads,
8697         a-tideio.ads, a-wtflio.ads, a-ztdeio.ads, sem_ch8.adb, a-tiflio.ads,
8698         sprint.adb, a-ztflio.ads, snames.ads-tmpl, a-wtenio.ads,
8699         a-tienio.ads: Rename Text_IO_Kludge to Text_IO_Special_Unit.
8701 2014-07-17  Robert Dewar  <dewar@adacore.com>
8703         * back_end.adb: Minor reformatting and comment additions.
8704         * checks.ads, checks.adb (Duplicated_Tag_Checks_Suppressed): New
8705         function.
8706         * exp_disp.adb (Make_DT): Use Duplicated_Tag_Checks_Suppressed.
8707         (Make_VM_TSD): Use Duplicated_Tag_Checks_Suppressed.
8708         * gnat_rm.texi: Document new check Duplicated_Tag_Checks_Suppressed.
8709         * gnat_ugn.texi: Additional documentation for Duplicated_Tag_Check.
8710         * snames.ads-tmpl (Duplicated_Tag_Checks_Suppressed): New check.
8711         * types.ads (Duplicated_Tag_Checks_Suppressed): New check.
8713 2014-07-17  Robert Dewar  <dewar@adacore.com>
8715         * gnat_rm.texi: Minor comment updates.
8717 2014-07-17  Ed Schonberg  <schonberg@adacore.com>
8719         * sem_util.adb (Make_Explicit_Dereference): If the expression
8720         being dereferenced is a generalized indexing, reset the overloaded
8721         flag on the generalized indexing call, consistent with the
8722         resetting of the flag on the original indexed component.
8724 2014-07-17  Robert Dewar  <dewar@adacore.com>
8726         * gnat_ugn.texi: Document advise not to mix -gnatV? and
8727         optimization.
8729 2014-07-17  Robert Dewar  <dewar@adacore.com>
8731         * checks.adb (Insert_Valid_Check): Don't insist on a name
8732         for the prefix when we make calls to Force_Evaluation and
8733         Duplicate_Subexpr_No_Checks.
8734         * exp_util.adb (Is_Volatile_Reference): Handle all cases properly
8735         (Remove_Side_Effects): Handle all volatile references right
8736         (Side_Effect_Free): Volatile reference is never side effect free
8737         * sinfo.ads (N_Attribute_Reference): Add comments explaining
8738         that in the tree, the prefix can be a general expression.
8740 2014-07-17  Hristian Kirtchev  <kirtchev@adacore.com>
8742         * sem_ch6.adb (Analyze_Subprogram_Body_Contract,
8743         Analyze_Subprogram_Contract): Add comments on SPARK_Mode save/restore.
8744         * sem_ch7.adb (Analyze_Package_Body_Contract,
8745         Analyze_Package_Contract): Add comments on SPARK_Mode save/restore.
8747 2014-07-17  Robert Dewar  <dewar@adacore.com>
8749         * exp_ch7.ads, exp_util.ads: Document Insert_Action_After,
8750         Store_After_Actions_In_Scope.
8752 2014-07-17  Robert Dewar  <dewar@adacore.com>
8754         * sem_aux.ads: Minor comment addition.
8756 2014-07-17  Ed Schonberg  <schonberg@adacore.com>
8758         * sem_res.adb (Make_Call_Into_Operator): If the call is already
8759         a rewriting of an operator node, there are no actuals to be
8760         propagated from original node to rewritten node when in ASIS mode.
8762 2014-07-17  Hristian Kirtchev  <kirtchev@adacore.com>
8764         * sem_ch6.adb (Analyze_Subprogram_Body_Contract,
8765         Analyze_Subprogram_Contract): Add new local variable Mode. Save
8766         and restore the SPARK mode of the related construct in a
8767         stack-like fashion.
8768         * sem_ch7.adb (Analyze_Package_Body_Contract,
8769         Analyze_Package_Contract): Add new local variable Mode. Save and
8770         restore the SPARK mode of the related construct in a stack-like fashion.
8771         * sem_util.adb Remove with and use clause for Opt.
8772         (Restore_SPARK_Mode): New routine.
8773         (Save_SPARK_Mode_And_Set): New routine.
8774         * sem_util.ads Add with and use clause for Opt.
8775         (Restore_SPARK_Mode): New routine.
8776         (Save_SPARK_Mode_And_Set): New routine.
8778 2014-07-17  Hristian Kirtchev  <kirtchev@adacore.com>
8780         * exp_util.adb (Is_Aliased): Transient objects
8781         within an expression with actions cannot be considered aliased.
8783 2014-07-17  Thomas Quinot  <quinot@adacore.com>
8785         * sem.ads (Scope_Stack_Entry): Reorganize storage of action lists;
8786         introduce a new list (cleanup actions) for each (transient) scope.
8787         * sinfo.ads, sinfo.adb (Cleanup_Actions): New attribute for
8788         N_Block_Statement
8789         * exp_ch7.ads (Store_Cleanup_Actions_In_Scope): New subprogram.
8790         * exp_ch7.adb (Store_Actions_In_Scope): New subprogram, common
8791         processing for Store_xxx_Actions_In_Scope.
8792         (Build_Cleanup_Statements): Allow for a list of additional
8793         cleanup statements to be passed by the caller.
8794         (Expand_Cleanup_Actions): Take custom cleanup actions associated
8795         with an N_Block_Statement into account.
8796         (Insert_Actions_In_Scope_Around): Account for Scope_Stack_Entry
8797         reorganization (refactoring only, no behaviour change).
8798         (Make_Transient_Block): Add assertion to ensure that the current
8799         scope is indeed a block (namely, the entity for the transient
8800         block being constructed syntactically, which has already been
8801         established as a scope).  If cleanup actions are present in the
8802         transient scope, transfer them now to the transient block.
8803         * exp_ch6.adb (Expand_Protected_Subprogram_Call): Freeze the
8804         called function while it is still present as the name in a call
8805         in the tree. This may not be the case later on if the call is
8806         rewritten into a transient block.
8807         * exp_smem.adb (Add_Shared_Var_Lock_Procs): The post-actions
8808         inserted after calling a protected operation on a shared passive
8809         protected must be performed in a block finalizer, not just
8810         inserted in the tree, so that they are executed even in case of
8811         a normal (RETURN) or abnormal (exception) transfer of control
8812         outside of the current scope.
8813         * exp_smem.ads (Add_Shared_Var_Lock_Procs): Update documentation
8814         * sem_ch8.adb, expander.adb, exp_ch11.adb: Adjust for
8815         Scope_Stack_Entry reorganization.
8817 2014-07-17  Thomas Quinot  <quinot@adacore.com>
8819         * exp_disp.adb (Make_DT, Make_VM_TSD): Do not omit Check_TSD
8820         call for types that do not have an explicit attribute definition
8821         clause for External_Tag, as their default tag may clash with an
8822         explicit tag defined for some other type.
8824 2014-07-17  Hristian Kirtchev  <kirtchev@adacore.com>
8826         * exp_util.adb (Is_Controlled_Function_Call): Recognize a
8827         controlled function call with multiple actual parameters that
8828         appears in Object.Operation form.
8830 2014-07-17  Thomas Quinot  <quinot@adacore.com>
8832         * einfo.ads, einfo.adb (Has_External_Tag_Rep_Clause): Remove
8833         entity flag.
8834         * sem_ch13.adb (Analyze_Attribute_Definition_Clause, case
8835         External_Tag): No need to set entity flag.
8836         * sem_aux.ads, sem_aux.adb (Has_External_Tag_Rep_Clause):
8837         Reimplement correctly in terms of Has_Rep_Item.
8839 2014-07-17  Thomas Quinot  <quinot@adacore.com>
8841         * exp_ch7.adb (Establish_Transient_Scope.Find_Node_To_Be_Wrapped):
8842         Start examining the tree at the node passed to
8843         Establish_Transient_Scope (not its parent).
8844         * exp_ch6.adb (Make_Build_In_Place_Call_In_Object_Declaration):
8845         The access type for the variable storing the reference to
8846         the call must be declared and frozen prior to establishing a
8847         transient scope.
8848         * exp_ch9.adb: Minor reformatting.
8850 2014-07-17  Pascal Obry  <obry@adacore.com>
8852         * s-os_lib.ads: Minor comment update.
8854 2014-07-17  Tristan Gingold  <gingold@adacore.com>
8856         * sysdep.c: Add ATTRIBUTE_UNUSED to avoid warnings.  Fix some
8857         indentation.
8858         * socket.c: Remove #warning to avoid warning.
8859         * expect.c: Indent some preprocessor directives to clarify
8860         nested if.  Do not use wait.h on PikeOS.  Add ATTRIBUTE_UNUSED
8861         to remove warnings.
8862         * env.c: Fix indentation.  Port to PikeOS.
8863         * gsocket.h: Port to PikeOS.  Remove #warning.
8864         * terminals.c: Port to PikeOS.  Fix indentation of the stubs.
8865         Add ATTRIBUTE_UNUSED to stubs arguments.  Fix return statement
8866         of stubbed __gnat_setup_parent_communication.
8867         * adaint.c: Port to PikeOS.  Reindent some preprocessor
8868         directives to clarify nested if.  Fix indentation.  Add missing
8869         ATTRIBUTE_UNUSED.
8871 2014-07-17  Robert Dewar  <dewar@adacore.com>
8873         * sem_attr.adb: Minor reformatting.
8875 2014-07-17  Robert Dewar  <dewar@adacore.com>
8877         * exp_ch7.adb, exp_ch7.ads, sinfo.ads: Minor reformatting.
8879 2014-07-17  Ed Schonberg  <schonberg@adacore.com>
8881         * sem_case.adb (Check_Choice_Set): If the case expression is the
8882         expression in a predicate, do not recheck coverage against itself,
8883         to prevent spurious errors.
8884         * sem_ch13.adb (Check_Aspect_At_End_Of_Declarations): Indicate that
8885         expression comes from an aspect specification, to prevent spurious
8886         errors when expression is a case expression in a predicate.
8888 2014-07-17  Pascal Obry  <obry@adacore.com>
8890         * adaint.c, adaint.h (__gnat_set_executable): Add mode parameter.
8891         * s-os_lib.ads, s-os_lib.adb (Set_Executable): Add Mode parameter.
8893 2014-07-17  Vincent Celier  <celier@adacore.com>
8895         * gnatchop.adb, make.adb, gnatbind.adb, clean.adb, gprep.adb,
8896         gnatxref.adb, gnatls.adb, gnatfind.adb, gnatname.adb: Do not output
8897         the usage for an erroneous invocation of a gnat tool.
8899 2014-07-16  Vincent Celier  <celier@adacore.com>
8901         * gnatls.adb: Get the target parameters only if -nostdinc was
8902         not specified.
8904 2014-07-16  Ed Schonberg  <schonberg@adacore.com>
8906         * checks.adb (Insert_Valid_Check): If the expression is a packed
8907         component of a modular type of the right size the data is always
8908         valid. This os particularly useful if the component is part of
8909         a volatile variable.
8911 2014-07-16  Robert Dewar  <dewar@adacore.com>
8913         * gnat_rm.texi, sinfo.ads, freeze.adb, exp_aggr.adb: Minor reformatting
8915 2014-07-16  Thomas Quinot  <quinot@adacore.com>
8917         * exp_ch7.ads: Minor documentation fix.
8919 2014-07-16  Ed Schonberg  <schonberg@adacore.com>
8921         * sem_ch3.adb (Find_Type_Name): Diagnose properly
8922         a private extension completion that is an interface definition
8923         with an interface list.
8925 2014-07-16  Arnaud Charlet  <charlet@adacore.com>
8927         * gnatls.adb (Gnatls): Code clean ups.
8929 2014-07-16  Thomas Quinot  <quinot@adacore.com>
8931         * sinfo.ads, sinfo.adb (N_Compound_Statement): New node kind.
8932         * sem.adb (Analyze): Handle N_Compound_Statement.
8933         * sprint.adb (Sprint_Node_Actual): Ditto.
8934         * sem_ch5.ads, sem_ch5.adb (Analyze_Compound_Statement): New
8935         procedure to handle N_Compound_Statement.
8936         * exp_aggr.adb (Collect_Initialization_Statements):
8937         Use a proper compound statement node, instead of a bogus
8938         expression-with-actions with a NULL statement as its expression,
8939         to wrap collected initialization statements.
8940         * freeze.ads, freeze.adb
8941         (Explode_Initialization_Compound_Statement): New public procedure,
8942         lifted from Freeze_Entity.
8943         (Freeze_Entity): When freezing
8944         an object with captured initialization statements and without
8945         delayed freezing, explode compount statement.
8946         * sem_ch4.adb (Analyze_Expression_With_Actions): Remove special
8947         case that used to handle bogus EWAs with NULL statement as
8948         the expression.
8949         * exp_ch13.adb (Expand_N_Freeze_Entity): For an object with
8950         delayed freezing and captured initialization statements, explode
8951         compound statement.
8953 2014-07-16  Gary Dismukes  <dismukes@adacore.com>
8955         * g-rewdat.adb, g-rewdat.ads: Minor reformatting.
8957 2014-07-16  Doug Rupp  <rupp@adacore.com>
8959         * s-interr-hwint.adb: Casing error on parameter.
8961 2014-07-16  Pascal Obry  <obry@adacore.com>
8963         * Makefile.rtl: Add g-rewdat.o dependencies in
8964         GNATRTL_NONTASKING_OBJS.
8966 2014-07-16  Ed Schonberg  <schonberg@adacore.com>
8968         * sem_case.adb: Code clean up.
8970 2014-07-16  Vincent Celier  <celier@adacore.com>
8972         * make.adb: Do not read gnat.adc when gnatmake is invoked
8973         with -gnatA.
8975 2014-07-16  Pascal Obry  <obry@adacore.com>
8977         * gnat_rm.texi, impunit.adb, g-rewdat.adb, g-rewdat.ads: Initial
8978         implementation of GNAT.Rewrite_Data.
8980 2014-07-16  Vincent Celier  <celier@adacore.com>
8982         * gnatls.adb (Normalize): New function.
8983         (Gnatls): Get the target parameters. On targets other than VMS,
8984         normalize the path names in the source search path, the object search
8985         path and the project search path.
8987 2014-07-16  Ed Schonberg  <schonberg@adacore.com>
8989         * sem_case.adb: Avoid self-checking of case expressions in
8990         dynamic predicates.
8992 2014-07-16  Robert Dewar  <dewar@adacore.com>
8994         * gnat_rm.texi: Document effect of Suppress_Initialization on tags and
8995         discriminants.
8997 2014-07-16  Eric Botcazou  <ebotcazou@adacore.com>
8999         * switch-b.adb (Scan_Binder_Switches): Add missing guard.
9001 2014-07-16  Ben Brosgol  <brosgol@adacore.com>
9003         * gnat_ugn.texi: Fix typo.
9005 2014-07-16  Ed Schonberg  <schonberg@adacore.com>
9007         * exp_ch4.adb (Expand_N_Case_Expression): Do not expand case
9008         expression if it is the specification of a subtype predicate:
9009         it will be expanded when the return statement is analyzed, or
9010         when a static predicate is transformed into a static expression
9011         for evaluation by the front-end.
9012         * sem_ch13.adb (Get_RList): If the expression for a static
9013         predicate is a case expression, extract the alternatives of the
9014         branches with a True value to create the required statically
9015         evaluable expression.
9017 2014-07-16  Thomas Quinot  <quinot@adacore.com>
9019         * exp_prag.adb (Expand_Pragma_Check): Use the location of the
9020         expression, not the location of the aspect, for all generated
9021         code, so that in particular the call to raise_assert_failure
9022         gets the sloc of the associated condition.
9023         * exp_ch6.adb
9024         (Expand_Subprogram_Contract.Build_Postconditions_Procedure):
9025         Set an explicit End_Label on the handled sequence of statements
9026         for the _Postconditions procedure so that the implicit return
9027         statement does not erroneously get associated with code generated
9028         for the last condition in postconditions.
9030 2014-07-16  Thomas Quinot  <quinot@adacore.com>
9032         * ug_words: Fix name of VMS synonym for -gnatw.z (SIZE_ALIGNMENT,
9033         not SIZE_ALIGN) and -gnatw.Z (NOSIZE_ALIGNMENT, not NOSIZE_ALIGN).
9034         * vms_data.ads: Add missing spaces in VMS synonyms for -gnatw.z /
9035         -gnatw.Z.
9037 2014-07-16  Robert Dewar  <dewar@adacore.com>
9039         * sem_ch3.adb, sem_prag.adb, sem_util.adb, sem_res.adb, sem_ch13.adb:
9040         Minor code reorganization (use Is_Access_Type, not in Access_Kind).
9041         * exp_ch3.adb: Minor code reorganization, use Is_Access_Type,
9042         not in Access_Kind.
9043         * par-ch4.adb (At_Start_Of_Attribute): New function
9044         (P_Simple_Expression): Better msg for bad attribute prefix.
9045         * scans.ads: Minor reformatting.
9047 2014-07-16  Ed Schonberg  <schonberg@adacore.com>
9049         * sem_attr.adb (Resolve_Attribute, case 'Update): If choice is a
9050         static constant, check that in belongs to the corresponding index
9051         subtype, to produce the proer warning when expansion is disabled.
9053 2014-07-16  Robert Dewar  <dewar@adacore.com>
9055         * freeze.adb (Freeze_Entity): Warn on incompatible size/alignment.
9056         * gnat_ugn.texi: Document -gnatw.z and -gnatw.Z.
9057         * ug_words: VMS synonyms (WARNINGS=[NO]SIZE_ALIGN) for -gnatw.z/-gnatw.Z
9058         * usage.adb: Add lines for -gnatw.z/-gnatw.Z.
9059         * vms_data.ads: VMS synonyms (WARNINGS=[NO]SIZE_ALIGN) for
9060         -gnatw.z/-gnatw.Z
9061         * warnsw.adb: Set Warn_On_Size_Alignment appropriately.
9062         * warnsw.ads (Warn_On_Size_Alignment): New flag Minor
9063         reformatting.
9065 2014-07-16  Hristian Kirtchev  <kirtchev@adacore.com>
9067         * exp_ch7.adb (Process_Declarations): Reinstate the check on
9068         a hook object to ensure that the related transient declaration
9069         is finalizable.
9070         * exp_util.adb (Is_Aliased): Do not consider expresison with
9071         actions as a special context.
9072         (Requires_Cleanup_Actions): Reinstate the check on a hook object to
9073         ensure that the related transient declaration is finalizable.
9075 2014-07-16  Robert Dewar  <dewar@adacore.com>
9077         * checks.ads, checks.adb (Allocation_Checks_Suppressed): New function.
9078         * snames.ads-tmpl: Add Allocation_Check to list of check names.
9079         * types.ads: Add Allocation_Check to list of check names.
9081 2014-07-16  Thomas Quinot  <quinot@adacore.com>
9083         * sem_util.adb (Enter_Name): replace bogus test for presence of
9084         Corresponding_Remote_Type with correct test on Ekind.
9085         * sem_res.adb (Valid_Conversion): ditto; also clarify validity
9086         of calls to Corresponding_ Remote_Type (documentation fix).
9088 2014-07-16  Robert Dewar  <dewar@adacore.com>
9090         * gnat_rm.texi: Document illegal case of Unrestricted_Access.
9091         * sem_attr.adb (Analyze_Access_Attribute): Set_Non_Aliased_Prefix
9092         where it applies.
9093         (Resolve_Attribute, case Access): Flag illegal Unrestricted_Access use.
9094         * sinfo.ads, sinfo.adb (Non_Aliased_Prefix): New flag.
9096 2014-07-16  Robert Dewar  <dewar@adacore.com>
9098         * gnat_ugn.texi: Document binder switch -Ra.
9099         * gnatbind.adb (List_Closure_Display): Implement -Ra switch
9100         (List_Closure_All).
9101         * opt.ads (List_Closure_All): New switch.
9102         * switch-b.adb (Scan_Binder_Switches): Recognize -Ra to set
9103         List_Closure_All.
9105 2014-07-16  Ben Brosgol  <brosgol@adacore.com>
9107         * gnat_rm.texi: Minor edits, to make case consistent in names
9108         of types and fields.
9110 2014-07-16  Robert Dewar  <dewar@adacore.com>
9112         * gnat_rm.texi: Document erroneous mixing of thin pointers and
9113         unrestricted access
9114         * gnat_ugn.texi: Add note on size of access types about thin
9115         pointers and the use of attribute Unrestricted_Access.
9117 2014-07-16  Ed Schonberg  <schonberg@adacore.com>
9119         * a-cbdlli.ads, a-cbdlli.adb, a-cbhama.ads, a-cbhama.adb,
9120         * a-cbhase.ads, a-cbhase.adb, a-cborma.ads, a-cborma.adb,
9121         * a-cborse.ads, a-cborse.adb, a-cobove.ads a-cobove.adb: Add Control
9122         machinery to detect tampering on bounded vectors.
9124 2014-07-16  Robert Dewar  <dewar@adacore.com>
9126         * gnat_rm.texi: Document that leading/trailing asterisks are
9127         now implied for the pattern match string for pragma Warnings
9128         and Warning_As_Error.
9129         * sem_prag.adb (Acquire_Warning_Match_String): New procedure.
9130         (Analyze_Pragma, case Warning_As_Error): Call
9131         Acquire_Warning_Match_String.
9132         (Analyze_Pragma, case Warnings): Call Acquire_Warning_Match_String.
9134 2014-07-16  Bob Duff  <duff@adacore.com>
9136         * gnat_ugn.texi: Document need for project file
9137         for --incremental switch for gnat2xml.
9139 2014-07-16  Robert Dewar  <dewar@adacore.com>
9141         * gnat_rm.texi: Fix example of non-packable components in packed
9142         records section.
9144 2014-07-16  Robert Dewar  <dewar@adacore.com>
9146         * s-tpoben.adb, s-tasren.adb, s-interr.adb, s-interr-hwint.adb,
9147         s-shasto.adb, s-interr-vms.adb, s-interr-sigaction.adb: Avoid use of
9148         upper case in exception messages.
9150 2014-07-16  Robert Dewar  <dewar@adacore.com>
9152         * snames.ads-tmpl, sem_attr.adb, exp_attr.adb: Same_Storage attribute
9153         is renamed Has_Same_Storage.
9154         * gnat_rm.texi: Document missing SPARK pragmas and attributes.
9155         * sem_prag.adb: Minor comment fix (use LOCAL_NAME in syntax
9156         descriptions).
9158 2014-07-16  Robert Dewar  <dewar@adacore.com>
9160         * exp_util.adb, sem_attr.adb, exp_ch4.adb, a-cohase.ads,
9161         a-coinho-shared.adb, a-coinho-shared.ads: Minor reformatting.
9163 2014-07-16  Robert Dewar  <dewar@adacore.com>
9165         * gnat_ugn.texi: Add note that integrated
9166         preprocessing cannot be applied to configuration pragma files.
9168 2014-07-16  Yannick Moy  <moy@adacore.com>
9170         * sem_attr.adb (Analyze_Attribute/cases Pred
9171         and Succ): Always enable range check on fixed-point types if
9172         not suppressed for the type.
9174 2014-07-16  Hristian Kirtchev  <kirtchev@adacore.com>
9176         * sem_util.adb (State_Has_Enabled_Property):
9177         Account for an external property denoted by an others choice.
9179 2014-07-16  Hristian Kirtchev  <kirtchev@adacore.com>
9181         * exp_ch4.ads, exp_ch4.adb (Find_Hook_Context): Relocated to Exp_Util.
9182         * exp_ch7.adb (Process_Declarations): There is no need to check
9183         that a transient object being hooked is controlled as it would
9184         not have been hooked in the first place.
9185         * exp_ch9.adb Remove with and use clause for Exp_Ch4.
9186         * exp_util.adb (Find_Hook_Context): Relocated from Exp_Ch4.
9187         (Is_Aliased): A renaming of a transient controlled object is
9188         not considered aliasing when it occurs within an expression
9189         with actions.
9190         (Requires_Cleanup_Actions): There is no need to
9191         check that a transient object being hooked is controlled as it
9192         would not have been hooked in the first place.
9193         * exp_util.ads (Find_Hook_Context): Relocated from Exp_Ch4.
9195 2014-07-16  Hristian Kirtchev  <kirtchev@adacore.com>
9197         * sem_ch13.adb (Insert_After_SPARK_Mode): Moved to
9198         the outer level of routine Analyze_Aspect_Specifications. Ensure
9199         that the corresponding pragmas of aspects Initial_Condition and
9200         Initializes are inserted after pragma SPARK_Mode.
9202 2014-07-16  Ed Schonberg  <schonberg@adacore.com>
9204         * sem_attr.adb (Analyze_Attribute, case 'Update): Handle
9205         properly a choice list with more than one choice, where each
9206         is an aggregate denoting a sequence of array indices for a
9207         multidimentional array. For SPARK use.
9209 2014-07-16  Vadim Godunko  <godunko@adacore.com>
9211         * a-coinho-shared.adb (Adjust): Create
9212         copy of internal shared object and element when source container
9213         is locked.
9214         (Copy): Likewise.
9215         (Query_Element): Likewise.
9216         (Update_Element): Likewise.
9217         (Constant_Reference): Likewise. Raise Constraint_Error on attempt
9218         to get reference for empty holder.
9219         (Reference): Likewise.
9221 2014-07-16  Thomas Quinot  <quinot@adacore.com>
9223         * exp_ch4.adb (Find_Hook_Context): New subprogram, extracted
9224         from Process_Transient_Oject.
9225         * exp_ch4.ads: Ditto.
9226         * exp_ch9.adb (Build_Class_Wide_Master): Insert the _master
9227         declaration as an action on the topmost enclosing expression,
9228         not on a possibly conditional subexpreession.
9230 2014-07-16  Vadim Godunko  <godunko@adacore.com>
9232         * a-coinho.adb, a-coinho-shared.adb, a-coinho.ads, a-coinho-shared.ads:
9233         Fix parameter mode of Update_Element.
9235 2014-07-16  Robert Dewar  <dewar@adacore.com>
9237         * a-coinho.adb, a-coinho-shared.adb, a-coinho-shared.ads: Minor
9238         reformatting.
9240 2014-07-16  Ed Schonberg  <schonberg@adacore.com>
9242         * a-cohase.ads: Type Iterator must be controlled, so that the
9243         tampering bit is properly set through an iteration.
9244         * a-cohase.adb: Add Finalize operation for type Iterator.
9246 2014-07-16  Ed Schonberg  <schonberg@adacore.com>
9248         * a-coinho-shared.adb, a-coinho-shared.ads: Proper structures for
9249         tampering checks.
9251 2014-07-16  Ed Schonberg  <schonberg@adacore.com>
9253         * a-coinho-shared.adb: Fix spurious accessibility check.
9255 2014-06-15  Jan Hubicka  <hubicka@ucw.cz>
9257         * gcc-interface/utils.c (process_attributes): Use set_decl_tls_model.
9259 2014-06-14  Bernd Edlinger  <bernd.edlinger@hotmail.de>
9261         PR ada/61505
9262         * gnat_rm.texi: Fix errors with makeinfo 5.1.
9264 2014-06-14  Arnaud Charlet  <charlet@adacore.com>
9266         PR ada/61505
9267         * gnat_rm.texi: Attempt to fix error with makeinfo 5.1.
9269 2014-06-13  Yannick Moy  <moy@adacore.com>
9271         * exp_attr.adb: Fix typo in comment.
9272         * gnat1drv.adb (Adjust_Global_Switches): Force float overflow
9273         checking in GNATprove_Mode.
9275 2014-06-13  Ed Schonberg  <schonberg@adacore.com>
9277         * a-coinho-shared.adb, a-coinho-shared.ads: Update shared version.
9279 2014-06-13  Robert Dewar  <dewar@adacore.com>
9281         * sem_ch3.adb, sem_ch9.adb, a-coinho.adb, a-coinho.ads: Minor
9282         reformatting.
9284 2014-06-13  Hristian Kirtchev  <kirtchev@adacore.com>
9286         * sem_prag.adb (Analyze_Pragma): Add local
9287         variable Missing_Parentheses. Emit an error when a state
9288         declaration with options appears without parentheses. Add a
9289         guard to prevent a bogus error when a state declaration may be
9290         interpreted as an option if a previous declaration with options
9291         was not parenthesized.
9293 2014-06-13  Robert Dewar  <dewar@adacore.com>
9295         * checks.adb: Validate_Alignment_Check_Warnings: New procedure
9296         (Apply_Address_Clause_Check): Make Aligment_Warnings table entry.
9297         * checks.ads (Alignment_Warnings_Record): New type.
9298         (Alignment_Warnings): New table
9299         (Validate_Alignment_Check_Warnings): New procedure.
9300         * errout.adb (Delete_Warning_And_Continuations): New procedure
9301         (Error_Msg_Internal): Set Warning_Msg (Delete_Warning): Handle
9302         Warnings_Treated_As_Errors (Finalize): Minor reformatting
9303         * errout.ads (Warning_Msg): New variable
9304         (Delete_Warning_And_Continuations): New procedure
9305         * erroutc.adb (Delete_Msg): Handle Warnings_Treated_As_Errors count.
9306         * gnat1drv.adb (Post_Compilation_Validation_Checks): New procedure.
9308 2014-06-13  Ed Schonberg  <schonberg@adacore.com>
9310         * a-coinho.adb, a-coinho.ads: Add Reference machinery.
9312 2014-06-13  Hristian Kirtchev  <kirtchev@adacore.com>
9314         * errout.adb (SPARK_Msg_N): New routine.
9315         (SPARK_Msg_NE): New routine.
9316         * errout.ads Add a section on SPARK-related error routines.
9317         (SPARK_Msg_N): New routine.
9318         (SPARK_Msg_NE): New routine.
9319         * sem_ch13.adb (Analyze_Aspect_Specifications): Ensure that
9320         pragma Abstract_State is always inserted after SPARK_Mode.
9321         (Insert_After_SPARK_Mode): New routine.
9322         * sem_prag.adb (Analyze_Abstract_State,
9323         Analyze_Constituent, Analyze_External_Property,
9324         Analyze_External_Property_In_Decl_Part, Analyze_Global_Item,
9325         Analyze_Global_List, Analyze_Initialization_Item,
9326         Analyze_Initialization_Item_With_Inputs, Analyze_Input_Item,
9327         Analyze_Input_List, Analyze_Input_Output, Analyze_Part_Of,
9328         Analyze_Pragma, Analyze_Refined_Depends_In_Decl_Part,
9329         Analyze_Refined_Global_In_Decl_Part,
9330         Analyze_Refined_State_In_Decl_Part, Analyze_Refinement_Clause,
9331         Check_Aspect_Specification_Order, Check_Constituent_Usage,
9332         Check_Declaration_Order, Check_Dependency_Clause,
9333         Check_Duplicate_Mode, Check_Duplicate_Option,
9334         Check_Duplicate_Property, Check_External_Properties,
9335         Check_External_Property, Check_Function_Return,
9336         Check_Matching_Constituent, Check_Matching_State,
9337         Check_Mode_Restriction_In_Enclosing_Context,
9338         Check_Mode_Restriction_In_Function, Check_Refined_Global_Item,
9339         Check_State_And_Constituent_Use, Create_Or_Modify_Clause,
9340         Has_Extra_Parentheses, Inconsistent_Mode_Error,
9341         Match_Error, Propagate_Part_Of, Report_Extra_Clauses,
9342         Report_Extra_Constituents_In_List, Report_Extra_Inputs,
9343         Report_Unrefined_States, Report_Unused_Constituents,
9344         Report_Unused_States, Role_Error, Usage_Error):
9345         Convert Error_Msg_XXX calls to SPARK_Msg_XXX calls
9346         to report semantic errors only when SPARK_Mode is on.
9347         (Analyze_Depends_In_Decl_Part): Do not check the syntax of
9348         pragma Depends explicitly, this is now done by the analysis.
9349         (Analyze_Global_In_Decl_List): Do not check the syntax of
9350         pragma Global explicitly, this is now done by the analysis.
9351         (Analyze_Initializes_In_Decl_Part): Do not check the syntax of
9352         pragma Initializes explicitly, this is now done by the analysis.
9353         (Analyze_Part_Of): Do not check the syntax of the encapsulating
9354         state, this is now done by the analysis.
9355         (Analyze_Pragma): Do
9356         not check the syntax of a state declaration, this is now done
9357         by the analysis.
9358         (Analyze_Refined_Depends_In_Decl_Part): Do not
9359         check the syntax of pragma Refined_Depends explicitly, this is now
9360         done by the analysis.
9361         (Analyze_Refined_Global_In_Decl_Part): Do
9362         not check the syntax of pragma Refined_Global explicitly, this is
9363         now done by the analysis.
9364         (Analyze_Refined_State_In_Decl_Part):
9365         Do not check the syntax of pragma Refined_State explicitly, this
9366         is now done by the analysis.
9367         (Check_Dependence_List_Syntax): Removed.
9368         (Check_Global_List_Syntax): Removed.
9369         (Check_Initialization_List_Syntax): Removed.
9370         (Check_Item_Syntax): Removed.
9371         (Check_Missing_Part_Of): Do not consider items from an instance.
9372         (Check_Refinement_List_Syntax): Removed.
9373         (Check_State_Declaration_Syntax): Removed.
9374         (Collect_Global_List): Do not raise Program_Error when the input is
9375         malformed.
9376         (Process_Global_List): Do not raise Program_Error when the input
9377         is malformed.
9378         * sem_ch13.adb: Minor reformatting.
9380 2014-06-13  Ed Schonberg  <schonberg@adacore.com>
9382         * sem_ch3.adb (Find_Type_Name): Diagnose a private type completion
9383         that is an interface definition with an interface list.
9384         (Process_Full_View): Move error message on missmatched interfaces
9385         between views to the declaration of full view, for clarity.
9386         * sem_ch9.adb (Check_Interfaces): Move error message to full view,
9387         for clarity.
9389 2014-06-13  Robert Dewar  <dewar@adacore.com>
9391         * exp_attr.adb (Expand_N_Attribute_Reference, case Pred/Succ): Change
9392         reason to Overflow.
9394 2014-06-13  Robert Dewar  <dewar@adacore.com>
9396         * makeutl.adb: Minor reformatting.
9398 2014-06-13  Gail Schenker  <schenker@adacore.com>
9400         * debug.adb, sem_eval.adb (Why_Not_Static): Remove temporary code and
9401         associated flag (d.z), no longer needed.
9403 2014-06-13  Ed Schonberg  <schonberg@adacore.com>
9405         * sem_ch13.adb (Analyze_Aspect_Specifications): For Import and
9406         Export aspects, do not check whether a corresponding Convention
9407         aspect has been specified. Convention is optional in Ada2012,
9408         and defaults to Convention_Ada.
9410 2014-06-13  Eric Botcazou  <ebotcazou@adacore.com>
9412         * checks.adb (Apply_Address_Clause_Check): Only issue the new
9413         warning if the propagation warning is issued.
9415 2014-06-13  Thomas Quinot  <quinot@adacore.com>
9417         * exp_ch4.adb: Minor reformatting.
9419 2014-06-13  Robert Dewar  <dewar@adacore.com>
9421         * exp_attr.adb (Expand_N_Attribute_Reference, case Pred):
9422         Handle float range check case (Expand_N_Attribute_Reference,
9423         case Succ): Handle float range check case.
9424         * sem_attr.adb (Analyze_Attribute, case Pred/Succ): Handle float
9425         range check case.
9427 2014-06-13  Vincent Celier  <celier@adacore.com>
9429         * makeutl.ads (Compute_Builder_Switches): Change name of
9430         parameter Root_Environment to Env.
9431         * prj-conf.adb (Check_Switches): Call Locate_Runtime with the
9432         Env parameter of procedure Get_Or_Create_Configuration_File.
9433         (Locate_Runtime): Call Find_Rts_In_Path with the Project_Path
9434         of new parameter Env.
9435         * prj-conf.ads (Locate_Runtime): New parameter Env of type
9436         Prj.Tree.Environment.
9438 2014-06-13  Robert Dewar  <dewar@adacore.com>
9440         * gnat_rm.texi: Minor comment clarification for Check_Float_Overflow.
9442 2014-06-13  Robert Dewar  <dewar@adacore.com>
9444         * exp_attr.adb, exp_ch9.adb, lib-writ.adb, g-comlin.adb: Minor
9445         reformatting.
9446         * sem_attr.adb: Minor code reformatting and simplification.
9447         * checks.adb: Fix minor typo.
9449 2014-06-13  Emmanuel Briot  <briot@adacore.com>
9451         * g-comlin.adb (Get_Argument): fix expansion
9452         of command line arguments (e.g. "*.adb") when using a custom
9453         parser. The parser was not passed to the recursive call, and
9454         thus we were trying to do the expansion on the default command
9455         line parser.
9457 2014-06-13  Thomas Quinot  <quinot@adacore.com>
9459         * exp_ch9.adb: Minor reformatting.
9461 2014-06-13  Ed Schonberg  <schonberg@adacore.com>
9463         * exp_attr.adb (Expand_N_Attribute_Reference, case 'Old):
9464         To determine whether the attribute should be expanded, examine
9465         whether the enclosing postcondition pragma is to be checked,
9466         rather than using the internal flag Assertions_Enabled.
9468 2014-06-13  Ben Brosgol  <brosgol@adacore.com>
9470         * gnat_rm.texi: Minor fixes.
9471         * gnat_ugn.texi: Added a missing "@itemize".
9473 2014-06-13  Robert Dewar  <dewar@adacore.com>
9475         * debug.adb: Remove -gnatd.1 flag documentation.
9476         * layout.adb (Layout_Type): Remove special handling of size
9477         for anonymous access type.
9478         * sem_ch3.adb (Replace_Type): Remove special handling of size
9479         for anonymous access type.
9481 2014-06-13  Robert Dewar  <dewar@adacore.com>
9483         * debug.adb: Document debug flag -gnatd.1.
9484         * layout.adb (Layout_Type): Size change for anonymous access
9485         types under -gnatd.1.
9486         * sem_ch3.adb (Replace_Type): Size change for anonymous access
9487         types under -gnatd.1.
9489 2014-06-13  Robert Dewar  <dewar@adacore.com>
9491         * layout.adb (Layout_Type): Anonymous access types designating
9492         unconstrained arrays are always thin pointers.
9493         * sem_ch3.adb (Replace_Type): Anonymous access types designating
9494         unconstrained arrays are always thin pointers.
9496 2014-06-13  Ed Schonberg  <schonberg@adacore.com>
9498         * sem_attr.adb (Analyze_Attribute): Use Check_Parameterless_Call
9499         to resolve the prefix of an attribute that is an entity name
9500         and may be a parameterless call.  Minor code reorganization.
9502 2014-06-13  Robert Dewar  <dewar@adacore.com>
9504         * lib.ads, lib.adb, lib-writ.adb, lib-load.adb (Is_Compiler_Unit):
9505         Removed.
9506         * opt.ads (Compiler_Unit): New flag.
9507         * par-ch5.adb (Test_Statement_Required): Call Check_Compiler_Unit
9508         for null statement sequence (not allowed in compiler unit).
9509         * par-prag.adb (Prag): Handle Compiler_Unit[_Warning] during
9510         parsing.
9511         * restrict.ads, restrict.adb (Check_Compiler_Unit): New version and new
9512         calling sequence.
9513         * sem_ch11.adb, sem_ch3.adb, sem_ch4.adb: New calling sequence for
9514         Check_Compiler_Unit.
9515         * sem_ch6.adb (Analyze_Extended_Return_Statement): Call
9516         Check_Compiler_Unit (this construct is not allowed in compiler
9517         units).
9518         * sem_prag.adb (Analyze_Pragma, case Compiler_Unit[_Warning]):
9519         Set Opt.Compiler_Unit.
9521 2014-06-13  Geert Bosch  <bosch@adacore.com>
9523         * gnat_rm.texi, s-tasinf-solaris.ads, sem_prag.adb, gnat_ugn.texi,
9524         s-tasinf-mingw.ads, s-tasinf.ads, s-tasinf-linux.ads,
9525         s-tasinf-vxworks.ads: Make Task_Info pragma and package obsolescent.
9527 2014-06-13  Robert Dewar  <dewar@adacore.com>
9529         * s-tasini.adb, s-tarest.adb, s-taprob.adb: Minor reformatting.
9531 2014-06-13  Hristian Kirtchev  <kirtchev@adacore.com>
9533         * freeze.adb (Freeze_Entity): Remove the check concerning volatile
9534         types in SPARK as it is poorly placed and poorly formulated. The
9535         check was flagging ALL volatile entities as illegal in SPARK.
9536         * sem_prag.adb (Process_Atomic_Shared_Volatile): Flag volatile
9537         types as illegal in SPARK.
9539 2014-06-13  Robert Dewar  <dewar@adacore.com>
9541         * sem_cat.adb: Minor reformatting.
9543 2014-06-13  Yannick Moy  <moy@adacore.com>
9545         * sem_prag.adb (Analyze_Pragma/Post_Class): Fix typo.
9547 2014-06-13  Arnaud Charlet  <charlet@adacore.com>
9549         * gnat_rm.texi: Add detail on SPARK_05 restriction.
9551 2014-06-13  Bob Duff  <duff@adacore.com>
9553         * s-solita.adb (Get_Sec_Stack_Addr, Init_Tasking_Soft_Links):
9554         Add assertions requiring the secondary stack to be initialized.
9555         * s-solita.ads (Init_Tasking_Soft_Links): Comment.
9556         * s-taprob.adb, s-tarest.adb, s-tasini.adb (elab code): Make sure the
9557         secondary stack is initialized before calling Init_Tasking_Soft_Links,
9558         by adding pragmas Elaborate_Body.
9560 2014-06-13  Thomas Quinot  <quinot@adacore.com>
9562         * sem_ch13.adb (Analyze_Stream_TSS_Definition): Remove temporary
9563         kludge disabling new legality check.
9565 2014-06-13  Hristian Kirtchev  <kirtchev@adacore.com>
9567         * freeze.adb (Freeze_Record_Type): Remove checks related to SPARK
9568         volatile types.
9569         (Freeze_Type): Volatile types are now illegal in SPARK.
9571 2014-06-13  Robert Dewar  <dewar@adacore.com>
9573         * aspects.ads, aspects.adb: Add aspect Thread_Local_Storage.
9574         * gnat_rm.texi: Document aspect Thread_Local_Storage.
9576 2014-06-13  Ed Schonberg  <schonberg@adacore.com>
9578         * sem_cat.adb (Validate_Static_Object_Name): A constant whose
9579         value is a temporary that renames an aggregate is legal in a
9580         preelaborated unit. Illegalities, if any will be detected in
9581         the aggregate components.
9583 2014-06-13  Ed Schonberg  <schonberg@adacore.com>
9585         * einfo.ads: Minor reformatting an comment expansion.
9587 2014-06-13  Robert Dewar  <dewar@adacore.com>
9589         * back_end.ads, back_end.adb: Make_Id, Make_SC, Set_RND are moved to
9590         Tbuild.
9591         * tbuild.ads, tbuild.adb: Make_Id, Make_SC, Set_RND are moved here from
9592         Back_End.
9593         * gnat1drv.adb: Make_Id, Make_SC, Set_RND are moved to Tbuild
9594         * sem_warn.adb: Minor reformatting.
9596 2014-06-13  Doug Rupp  <rupp@adacore.com>
9598         * adaint.c (__gnat_open_new_temp) [VMS]: Open binary
9599         files with rfm=udf.
9601 2014-06-13  Yannick Moy  <moy@adacore.com>
9603         * sem_warn.adb (Check_Unset_References): Take
9604         case of Refined_Post into account in Within_Postcondition check.
9606 2014-06-13  Hristian Kirtchev  <kirtchev@adacore.com>
9608         * freeze.adb (Freeze_Record_Type): Volatile types are not allowed in
9609         SPARK.
9611 2014-06-13  Yannick Moy  <moy@adacore.com>
9613         * sem_ch13.adb (Analyze_Aspect_Specifications/Aspect_Import,
9614         Aspect_Export): Consider that variables may be set outside the program.
9616 2014-06-13  Robert Dewar  <dewar@adacore.com>
9618         * back_end.adb (Make_Id): New function.
9619         (Make_SC): New function.
9620         (Set_RND): New procedure.
9621         * back_end.ads (Make_Id): New function.
9622         (Make_SC): New function.
9623         (Set_RND): New procedure.
9624         * einfo.ads: Minor comment updates.
9625         * frontend.adb: Move Atree.Initialize call to Gnat1drv.
9626         * gnat1drv.adb (Gnat1drv): New calling sequence for
9627         Get_Target_Parameters.
9628         (Gnat1drv): Move Atree.Initialize here from Frontend.
9629         * targparm.adb (Get_Target_Parameters): New calling
9630         sequence (Get_Target_Parameters): Handle pragma Restriction
9631         (No_Dependence,..)
9632         * targparm.ads (Get_Target_Parameters): New calling sequence.
9634 2014-06-13  Gary Dismukes  <dismukes@adacore.com>
9636         * sem_prag.adb (Process_Import_Or_Interface): Exit the homonym
9637         loop if the pragma does not come from source, so that an implicit
9638         pragma Import only applies to the first declaration, avoiding
9639         possible conflicts with earlier explicit and implicit declarations
9640         due to multiple Provide_Shift_Operators pragmas.
9641         (Set_Imported): Remove previous fix that bypassed pragma duplication
9642         error.
9643         * gnat_rm.texi: Change 'equivalent' to 'similar' in description
9644         of Provide_Shift_Operators.
9646 2014-06-12  Jan Hubicka  <hubicka@ucw.cz>
9648         * gcc-interface/utils.c (process_attributes) <ATTR_LINK_SECTION>: Pass
9649         string pointer directly to set_decl_section_name.
9651 2014-06-11  Robert Dewar  <dewar@adacore.com>
9653         * sem_ch13.adb: Minor reformatting.
9655 2014-06-11  Hristian Kirtchev  <kirtchev@adacore.com>
9657         * sem_prag.adb (Check_Clause_Syntax): Add new
9658         local variable Outputs. Account for the case where multiple
9659         output items appear as an aggregate.
9661 2014-06-11  Robert Dewar  <dewar@adacore.com>
9663         * sem_warn.adb (Output_Obsolescent_Entity_Warnings): Tag warning
9664         with ?j? not ??.
9666 2014-06-11  Ed Schonberg  <schonberg@adacore.com>
9668         * einfo.ads: Minor reformatting.
9670 2014-06-11  Hristian Kirtchev  <kirtchev@adacore.com>
9672         * a-cbdlli.adb, a-cdlili.adb, a-cidlli.adb, a-crdlli.adb (Insert): Add
9673         new variable First_Node. Update the position after all insertions have
9674         taken place to First_Node.
9676 2014-06-11  Robert Dewar  <dewar@adacore.com>
9678         * debug.adb: Remove debug flag -gnatd.1, no longer needed.
9679         * layout.adb (Layout_Type): Remove test of -gnatd.1.
9681 2014-06-11  Robert Dewar  <dewar@adacore.com>
9683         * sem_ch13.adb: Minor reformatting.
9685 2014-06-11  Hristian Kirtchev  <kirtchev@adacore.com>
9687         * sem_prag.adb (Check_Clause_Syntax): Add new
9688         local variable Outputs. Account for the case where multiple
9689         output items appear as an aggregate.
9691 2014-06-11  Robert Dewar  <dewar@adacore.com>
9693         * sem_warn.adb (Output_Obsolescent_Entity_Warnings): Tag warning
9694         with ?j? not ??.
9696 2014-06-11  Ed Schonberg  <schonberg@adacore.com>
9698         * einfo.ads: Minor reformatting.
9700 2014-06-11  Hristian Kirtchev  <kirtchev@adacore.com>
9702         * a-cbdlli.adb, a-cdlili.adb, a-cidlli.adb, a-crdlli.adb (Insert): Add
9703         new variable First_Node. Update the position after all insertions have
9704         taken place to First_Node.
9706 2014-06-11  Robert Dewar  <dewar@adacore.com>
9708         * debug.adb: Remove debug flag -gnatd.1, no longer needed.
9709         * layout.adb (Layout_Type): Remove test of -gnatd.1.
9711 2014-06-11  Thomas Quinot  <quinot@adacore.com>
9713         * freeze.ads: Minor reformatting.
9714         * checks.adb (Determine_Range): Do not attempt to determine
9715         the range of a deferred constant whose full view has not been
9716         seen yet.
9717         * sem_res.adb (Resolve): Remove undesirable guard against
9718         resolving expressions from expression functions.
9720 2014-06-11  Robert Dewar  <dewar@adacore.com>
9722         * debug.adb (Debug_Flag_Dot_1): Set to enable fix for anonymous
9723         access types.
9724         * layout.adb (Layout_Type): Make anonymous access types for
9725         subprogram formal types and return types always thin. For now
9726         only enabled if -gnatd.1 set.
9728 2014-06-11  Ed Schonberg  <schonberg@adacore.com>
9730         * sem_ch13.adb (Analyze_Stream_TSS_Definition): Apply legality
9731         rule for stream attributes of interface types (RM 13.13.2 (38/3)):
9732         subprogram must be a null procedure.
9734 2014-06-11  Hristian Kirtchev  <kirtchev@adacore.com>
9736         * sem_prag.adb (Analyze_Input_Item): Allow formal
9737         parameters to appear as input_items in an initialization_list
9738         of pragma Initializes. Encapsulation now applies to states and
9739         variables only (as it should). Add RM references to key errors.
9740         * sem_prag.adb (Set_Imported): Suppress errors
9741         about preceding Imports when the pragma does not come from source,
9742         which can happen through use of pragma Provide_Shift_Operators.
9744 2014-06-11  Thomas Quinot  <quinot@adacore.com>
9746         * sem_ch3.adb: Minor reformatting.
9747         * einfo.ads (Full_View): Minor comment update.
9749 2014-06-11  Robert Dewar  <dewar@adacore.com>
9751         * einfo.adb (Is_Independent): New flag.
9752         * einfo.ads (Is_Independent): New flag.
9753         (Has_Independent_Components): Clean up and fix comments.
9754         * sem_prag.adb (Fix_Error): Deal with changing argument
9755         [of] to entity [for].
9756         (Analyze_Pragma, case Independent): Set Is_Independent flag
9757         (Analyze_Pragma, case Independent_Components): Set Is_Independent flag
9758         in all components of specified record.
9760 2014-06-11  Thomas Quinot  <quinot@adacore.com>
9762         * sem_ch12.adb (Analyze_Formal_Decimal_Fixed_Point_Type):
9763         Set proper Etype on bounds of dummy type created for analysis
9764         of the generic.
9766 2014-06-11  Robert Dewar  <dewar@adacore.com>
9768         * debug.adb: Minor comment fix (add missing section of dot
9769         numeric flags).
9771 2014-06-11  Robert Dewar  <dewar@adacore.com>
9773         * gnat_rm.texi, switch-c.adb, sem_prag.adb, a-tgdico.ads, par-prag.adb,
9774         opt.ads, a-finali.ads, snames.ads-tmpl: Remove all traces of
9775         pragma/aspects Pure_05 Pure_12 Preelaborate_05.
9776         * errout.adb (Output_Messages): Avoid duplicate output for
9777         library level instance.
9778         * sem_elab.adb (Is_Call_Of_Generic_Formal): Moved to outer level
9779         (Check_Elab_Call): Add call to Is_Call_Of_Generic_Formal
9780         * exp_ch4.adb (Expand_N_Op_Expon): New interface for Exp_Modular.
9781         * s-expmod.ads, s-expmod.adb (Exp_Modular): Change interface to
9782         accomodate largest modulus value.
9783         * gnat_ugn.texi: Minor updates.
9785 2014-06-11  Ed Schonberg  <schonberg@adacore.com>
9787         * sem_ch12.adb (Instantiate_Package_Body): Do not attempt to
9788         load body of generic package or its parent, if body is optional
9789         and the unit does not require a body.
9791 2014-06-11  Robert Dewar  <dewar@adacore.com>
9793         * gnat_rm.texi: Document System.Unsigned_Types.
9794         * impunit.adb: System.Unsigned_Types (s-unstyp.ads) is user accessible.
9795         * s-unstyp.ads: Update comments (this is now user available unit).
9797 2014-06-11  Robert Dewar  <dewar@adacore.com>
9799         * make.adb, sem_res.adb: Minor reformatting.
9801 2014-06-11  Thomas Quinot  <quinot@adacore.com>
9803         * a-astaco.ads, a-tags.ads, s-excdeb.ads, a-tgdico.ads, a-stmaco.ads,
9804         a-except-2005.ads, s-except.ads, a-taside.ads, a-dynpri.ads,
9805         a-chahan.ads, a-sytaco.ads, s-stalib.ads, a-strmap.ads: Change pragmas
9806         Preelaborate_05 to just Preelaborate in runtime units, and similarly
9807         change Pure_05 to just Pure.
9809 2014-06-11  Ed Schonberg  <schonberg@adacore.com>
9811         * sem_ch6.adb (Analyze_Subprogram_Body_Contract): Do not attempt
9812         analysis if error has been posted on subprogram body.
9814 2014-06-11  Ed Schonberg  <schonberg@adacore.com>
9816         * sem_ch13.adb (Analyze_Stream_TSS_Definition): Apply legality
9817         rule given in RM 13.1 (8/1) for operational attributes to stream
9818         attributes: the attribute must apply to a first subtype. Fixes
9819         missing errors in ACATS test bdd2004.
9821 2014-06-11  Robert Dewar  <dewar@adacore.com>
9823         * exp_ch3.adb (Build_Record_Init_Proc): Don't build for variant
9824         record type if restriction No_Implicit_Conditionals is active.
9825         (Expand_N_Object_Declaration): Don't allow default initialization
9826         for variant record type if restriction No_Implicit_Condition is active.
9827         (Build_Variant_Record_Equality): Don't build for variant
9828         record type if restriction No_Implicit_Conditionals is active.
9829         * exp_ch4.adb (Expand_N_Op_Eq): Error if variant records with
9830         No_Implicit_Conditionals.
9831         * sem_aux.ads, sem_aux.adb (Has_Variant_Part): New function.
9833 2014-06-11  Ramon Fernandez  <fernandez@adacore.com>
9835         * i-cstrin.ads: Update comments.
9837 2014-06-11  Ed Schonberg  <schonberg@adacore.com>
9839         * sem_res.adb (Resolve_Selected_Component): Handle properly a
9840         selected component whose prefix is overloaded, when none of the
9841         interpretations matches the expected type.
9843 2014-06-11  Bob Duff  <duff@adacore.com>
9845         * make.adb (Wait_For_Available_Slot): Give a more
9846         informative error message; if the ALI file is not found, print
9847         the full path of what it's looking for.
9849 2014-06-11  Sergey Rybin  <rybin@adacore.com frybin>
9851         * gnat_ugn.texi, vms_data.ads: add description of gnatstub -W<par>
9852         option to specify the result file encoding.
9854 2014-06-11  Robert Dewar  <dewar@adacore.com>
9856         * errout.ads, sem_ch12.adb: Minor reformatting.
9857         * debug.adb, erroutc.adb: Remove -gnatd.q debug switch.
9858         * lib-xref.adb: Minor reformatting.
9859         * restrict.adb: Minor code reorganization (put routines in
9860         alpha order).
9862 2014-06-11  Yannick Moy  <moy@adacore.com>
9864         * einfo.ads: Minor typo in comment
9866 2014-06-11  Ed Schonberg  <schonberg@adacore.com>
9868         * sinfo.ads, sinfo.adb: New attribute Uninitialized_Variable, for
9869         formal private types and private type extensions, to indicate
9870         variable in a generic unit whose uninitialized use suggest that
9871         actual type should be fully initialized.
9872         Needs_Initialized_Actual:  removed, functionaity replaced by
9873         the above.
9874         * lib-xref.adb (Generate_Reference): Generate a reference for
9875         variables of a formal type when the unit is not the main unit,
9876         to enable appropriate warnings in an instance.
9877         * sem_ch12.adb (Check_Ininialized_Type): Improve warning on use
9878         of variable in a generic unit that suggests that actual type
9879         should be full initialized.
9880         * sem_warn.adb; (May_Need_Initialized_Actual): Make into procedure
9881         and do not emot warning, which now only appears in an instance.
9883 2014-06-11  Eric Botcazou  <ebotcazou@adacore.com>
9885         * gnat_ugn.texi: Fix minor typo.
9887 2014-06-11  Hristian Kirtchev  <kirtchev@adacore.com>
9889         * sem_ch3.adb Add with and use clause for Sem_Ch10.
9890         (Analyze_Declarations): Code reformatting. Analyze the contract
9891         of a subprogram body stub at the end of the declarative region.
9892         * sem_ch6.adb (Analyze_Subprogram_Body_Contract): Spec_Id is
9893         now a variable. Do not process the body if its contract is not
9894         available. Account for subprogram body stubs when extracting
9895         the corresponding spec.
9896         * sem_ch6.ads (Analyze_Subprogram_Contract): Update the comment
9897         on usage.
9898         * sem_ch10.ads, sem_ch10.adb (Analyze_Subprogram_Body_Stub_Contract):
9899         New routine.
9900         * sem_prag.adb (Analyze_Depends_In_Decl_Part):
9901         Account for subprogram body stubs when extracting the
9902         corresponding spec.
9903         (Analyze_Global_In_Decl_List):
9904         Account for subprogram body stubs when extracting the
9905         corresponding spec.
9906         (Analyze_Refined_Depends_In_Decl_Part):
9907         Use Find_Related_Subprogram_Or_Body to retrieve the declaration
9908         of the related body. Spec_Is now a variable. Account for
9909         subprogram body stubs when extracting the corresponding spec.
9910         (Analyze_Refined_Global_In_Decl_Part): Use
9911         Find_Related_Subprogram_Or_Body to retrieve the declaration
9912         of the related body. Spec_Is now a variable. Account for
9913         subprogram body stubs when extracting the corresponding spec.
9914         (Collect_Subprogram_Inputs_Output): Account for subprogram body
9915         stubs when extracting the corresponding spec.
9917 2014-06-11  Vincent Celier  <celier@adacore.com>
9919         * gnatcmd.adb (Process_Link): Do not invoke gnatlink with
9920         -lgnarl or -lgnat.
9922 2014-06-11  Robert Dewar  <dewar@adacore.com>
9924         * debug.adb: Add debug flag -gnatd.q.
9925         * erroutc.adb (Prescan_Message): Bomb if untagged warning with
9926         -gnatd.q set.
9927         * styleg.adb (Check_Xtra_Parens): Message should be a style
9928         message.
9929         * sem_aggr.adb, sem_ch3.adb, exp_ch9.adb, checks.adb, sem_prag.adb,
9930         par-endh.adb, eval_fat.adb, freeze.adb, sem_util.adb, sem_attr.adb,
9931         sem_elab.adb, sem_ch6.adb, sem_warn.adb, sem_cat.adb,
9932         sem_ch13.adb, lib-xref.adb: Add remaining warning tags.
9934 2014-06-11  Ben Brosgol  <brosgol@adacore.com>
9936         * gnat_rm.texi: Revised chapter on Implementation Defined
9937         Characteristics.
9939 2014-06-11  Geert Bosch  <bosch@adacore.com>
9941         * s-exctab.adb: avoid race conditions in exception registration.
9943 2014-06-11  Robert Dewar  <dewar@adacore.com>
9945         * errout.adb (Warn_Insertion): New function.
9946         (Error_Msg): Use Warn_Insertion and Prescan_Message.
9947         (Error_Msg_Internal): Set Info field of error object.
9948         (Error_Msg_NEL): Use Prescan_Message.
9949         (Set_Msg_Text): Don't store info: at start of message.
9950         (Skip_Msg_Insertion_Warning): New name for Set_Msg_Insertion_Warning.
9951         (Skip_Msg_Insertion_Warning): Now just skips warning insertion.
9952         * errout.ads: Document new ?$? and >$> insertion sequences
9953         Document use of "(style)" and "info: "
9954         * erroutc.adb (dmsg): Print several missing fields
9955         (Get_Warning_Tag): Handle -gnatel case (?$?)  (Output_Msg_Text):
9956         Deal with new tagging of info messages
9957         * erroutc.ads: Is_Info_Msg: New global (Error_Msg_Object):
9958         Add field Info (Prescan_Message): New procedure, this procedure
9959         replaces the old Test_Style_Warning_Serious_Unconditional_Msg
9960         * errutil.adb, exp_util.adb, par-ch7.adb, sem_ch13.adb, sem_ch7.adb,
9961         sem_elab.adb: Follow new rules for info message (info belongs
9962         only at the start of a message, and only in the first message,
9963         not in any of the continuations).
9964         * gnat_ugn.texi: Document full set of warning tags.
9966 2014-06-11  Gary Dismukes  <dismukes@adacore.com>
9968         * sem_util.adb: Minor typo fix.
9970 2014-06-11  Ed Schonberg  <schonberg@adacore.com>
9972         * sem_warn.adb (Check_References): Do not emit spurious warnings
9973         on uninitialzed variable of a formal private type if variable
9974         is not read.
9976 2014-06-09  Jan Hubicka  <hubicka@ucw.cz>
9978         * gcc-interface/utils.c (process_attributes) <ATTR_LINK_SECTION>: Use
9979         set_decl_section_name accessor.
9981 2014-05-22  Thomas Schwinge  <thomas@codesourcery.com>
9983         * gcc-interface/utils.c (DEF_FUNCTION_TYPE_0, DEF_FUNCTION_TYPE_6)
9984         (DEF_FUNCTION_TYPE_7, DEF_FUNCTION_TYPE_8)
9985         (DEF_FUNCTION_TYPE_VAR_5): Cosmetic fixes.
9987 2014-05-21  Robert Dewar  <dewar@adacore.com>
9989         * layout.adb: Minor reformatting.
9990         * sem_prag.adb (Analyze_Pragma, case Inspection_Point): Call
9991         dummy procedure ip.
9993 2014-05-21  Robert Dewar  <dewar@adacore.com>
9995         * restrict.ads (Implementation_Restriction): Add entry for
9996         No_Fixed_IO.
9997         * rtsfind.ads: Add entries for Fixed_IO and Decimal_IO in
9998         Ada.[Wide_[Wide_]Text_IO.
9999         * s-rident.ads (Restriction_Id): Add entry for No_Fixed_IO.
10000         * sem_attr.adb (Analyze_Attribute): Disallow fixed point types
10001         for Img, Image, Value, Wide_Image, Wide_Value, Wide_Wide_Image,
10002         Wide_Wide_Value if restriction No_Fixed_IO is set.
10003         * sem_util.adb (Set_Entity_Checks): Check restriction No_Fixed_IO.
10005 2014-05-21  Robert Dewar  <dewar@adacore.com>
10007         * gnatcmd.adb: Minor error msg changes (no upper case letter
10008         at start).
10009         * sem_ch12.adb, sem_ch5.adb, sem_res.adb, sem_util.adb: Minor
10010         reformatting.
10012 2014-05-21  Robert Dewar  <dewar@adacore.com>
10014         * debug.adb: Debug flag -gnatd.G inhibits static elab tracing
10015         via generic formals.
10016         * sem_elab.adb (Is_Call_Of_Generic_Formal): Return False if
10017         -gnatd.G is set.
10019 2014-05-21  Thomas Quinot  <quinot@adacore.com>
10021         * exp_pakd.adb (Revert_Storage_Order): Renamed from Byte_Swap to
10022         more accurately describe that this subprogram needs to come into
10023         play also in cases where no byte swapping is involved, because
10024         it also takes care of some required shifts (left-justification
10025         of values).
10027 2014-05-21  Thomas Quinot  <quinot@adacore.com>
10029         * freeze.adb (Check_Component_Storage_Order): Indicate whether
10030         a Scalar_Storage_Order attribute definition is present for the
10031         component's type.
10032         (Freeze_Record_Type): Suppress junk warnings
10033         about purportedly junk Bit_Order / Scalar_Storage_Order attribute
10034         definitions.
10036 2014-05-21  Robert Dewar  <dewar@adacore.com>
10038         * sem_ch8.adb (Analyze_Subprogram_Renaming): Put back call
10039         to Kill_Elaboration_Checks.
10041 2014-05-21  Gary Dismukes  <dismukes@adacore.com>
10043         * layout.adb (Assoc_Add): Suppress the optimization of the (E
10044         - C1) + C2 case, when the expression type is unsigned and C1 <
10045         C2, to avoid creating a negative literal when folding.
10047 2014-05-21  Hristian Kirtchev  <kirtchev@adacore.com>
10049         * freeze.adb (Freeze_Record_Type): Update the use of
10050         Is_SPARK_Volatile.
10051         * sem_ch3.adb (Analyze_Object_Contract): Update the use of
10052         Is_SPARK_Volatile.
10053         (Process_Discriminants): Update the use of Is_SPARK_Volatile.
10054         * sem_ch5.adb (Analyze_Iterator_Specification): Update the use
10055         of Is_SPARK_Volatile.
10056         (Analyze_Loop_Parameter_Specification):
10057         Update the use of Is_SPARK_Volatile.
10058         * sem_ch6.adb (Process_Formals): Catch an illegal use of an IN
10059         formal parameter when its type is volatile.
10060         * sem_prag.adb (Analyze_Global_Item): Update the use of
10061         Is_SPARK_Volatile.
10062         * sem_res.adb (Resolve_Entity_Name): Correct the guard which
10063         determines whether an entity is a volatile source SPARK object.
10064         * sem_util.adb (Has_Enabled_Property): Accout for external
10065         properties being set on objects other than abstract states
10066         and variables. An example would be a formal parameter.
10067         (Is_SPARK_Volatile): New routine.
10068         (Is_SPARK_Volatile_Object):
10069         Remove the entity-specific tests. Call routine Is_SPARK_Volatile
10070         when checking entities and/or types.
10071         * sem_util.ads (Is_SPARK_Volatile): New routine.
10073 2014-05-21  Robert Dewar  <dewar@adacore.com>
10075         * sem_warn.adb: Minor fix to warning messages (use ?? instead
10076         of ?).
10078 2014-05-21  Vincent Celier  <celier@adacore.com>
10080         * gnatcmd.adb (GNATCmd): For platforms other than VMS, recognize
10081         switch --version and --help.
10083 2014-05-21  Robert Dewar  <dewar@adacore.com>
10085         * sem_elab.adb (Is_Call_Of_Generic_Formal): New function.
10087 2014-05-21  Ed Schonberg  <schonberg@adacore.com>
10089         * sem_ch5.adb (Analyze_Iterator_Specification): Set type of
10090         iterator variable when the domain of iteration is a formal
10091         container and this is an element iterator.
10093 2014-05-21  Bob Duff  <duff@adacore.com>
10095         * sem_ch12.adb: Minor reformatting.
10097 2014-05-21  Robert Dewar  <dewar@adacore.com>
10099         * sinfo.ads, sem_ch12.adb, sem_warn.adb: Minor reformatting.
10101 2014-05-21  Robert Dewar  <dewar@adacore.com>
10103         * sem_elab.adb: Minor reformatting.
10104         * s-taprop.ads: Minor comment fix.
10105         * sem_ch8.adb (Analyze_Subprogram_Renaming): Remove call to
10106         Kill_Elaboration_Checks.
10107         * errout.adb, erroutc.adb: Minor reformatting.
10109 2014-05-21  Thomas Quinot  <quinot@adacore.com>
10111         * exp_pakd.adb (Byte_Swap): Handle the case of a sub-byte
10112         component. No byte swapping occurs, but this procedure also takes
10113         care of appropriately justifying the argument.
10115 2014-05-21  Hristian Kirtchev  <kirtchev@adacore.com>
10117         * sem_ch6.adb: sem_ch6.adb (Analyze_Aspects_On_Body_Or_Stub):
10118         New routine.
10119         (Analyze_Subprogram_Body_Helper): Move the
10120         analysis of aspect specifications and the processing of the
10121         subprogram body contract after inlining has taken place.
10122         (Diagnose_Misplaced_Aspect_Specifications): Removed.
10124 2014-05-21  Javier Miranda  <miranda@adacore.com>
10126         * sem_ch3.adb (Build_Derived_Record_Type): Revert previous change.
10128 2014-05-21  Robert Dewar  <dewar@adacore.com>
10130         * sem_eval.ads, sem_eval.adb (Why_Not_Static): Messages are not
10131         continuations any more.
10133 2014-05-21  Ed Schonberg  <schonberg@adacore.com>
10135         * sinfo.ads, sinfo.adb: New flag Needs_Initialized_Actual,
10136         present in formal_Private_Definitions and on private extension
10137         declarations of a formal derived type. Set when the use of the
10138         formal type in a generic suggests that the actual should be a
10139         fully initialized type.
10140         * sem_warn.adb (May_Need_Initialized_Actual): new subprogram
10141         to indicate that an entity of a generic type has default
10142         initialization, and that the corresponing actual type in any
10143         subsequent instantiation should be fully initialized.
10144         * sem_ch12.adb (Check_Initialized_Type): new subprogram,
10145         to emit a warning if the actual for a generic type on which
10146         Needs_Initialized_Actual is set is not a fully initialized type.
10148 2014-05-21  Robert Dewar  <dewar@adacore.com>
10150         * sem_elab.adb, prj-dect.adb: Minor reformatting.
10152 2014-05-21  Robert Dewar  <dewar@adacore.com>
10154         * erroutc.ads: Minor comment addition.
10156 2014-05-21  Robert Dewar  <dewar@adacore.com>
10158         * errout.ads: Add documentation for use of >*> tag.
10159         * restrict.adb: Make sure we use >*> tag for restriction warnings.
10161 2014-05-21  Gary Dismukes  <dismukes@adacore.com>
10163         * debug.adb: Add case of illegal overriding_indicator for a
10164         protected subprogram body to description of -gnatd.E switch.
10165         * sem_ch6.adb (Verify_Overriding_Indicator): Issue error message
10166         for cases of giving overriding_indicators on protected subprogram
10167         bodies, but change this to a warning if -gnatd.E is enabled. No
10168         longer give a style warning about missing indicators on protected
10169         subprogram bodies.
10171 2014-05-21  Robert Dewar  <dewar@adacore.com>
10173         * prj.ads, sem_ch12.adb, prj.adb, exp_pakd.adb,
10174         sem_elab.ads: Minor reformatting.
10175         * erroutc.adb, erroutc.ads (Warning_Specifically_Suppressed): Make Tag
10176         parameter optional.
10178 2014-05-21  Pascal Obry  <obry@adacore.com>
10180         * prj-dect.adb: Allow package Install in aggregate project.
10182 2014-05-21  Robert Dewar  <dewar@adacore.com>
10184         * sem_ch13.adb (Analyze_Aspect_Specifications):
10185         Insert_Delayed_Pragma is now used for the case of Attach_Handler.
10186         * sem_prag.adb: Minor comment improvements.
10188 2014-05-21  Ed Schonberg  <schonberg@adacore.com>
10190         * sem_ch12.adb (Install_Body): When checking whether freezing of
10191         instantiation must be delayed, verify that the common enclosing
10192         subprogram to generic and instance is in fact an overloadable
10193         entity.
10195 2014-05-21  Vincent Celier  <celier@adacore.com>
10197         * makeutl.adb (Mains.Complete_Mains.Do_Complete): Look for all
10198         mains with the same name and fail if there is more than one.
10199         * prj.ads, prj.adb (Find_All_Sources): New function
10201 2014-05-21  Robert Dewar  <dewar@adacore.com>
10203         * sem_ch13.adb: Minor reformatting.
10204         * lib-xref-spark_specific.adb, sem_util.adb: Minor reformatting.
10205         * sem_prag.adb: Minor error message improvement.
10207 2014-05-21  Yannick Moy  <moy@adacore.com>
10209         * lib-xref-spark_specific.adb, lib-xref.ads, lib-xref.adb
10210         (Enclosing_Subprogram_Or_Package): Only return a library-level
10211         package.
10213 2014-05-21  Javier Miranda  <miranda@adacore.com>
10215         * sem_ch3.adb (Build_Derived_Record_Type): Initialize Parent_Base
10216         to the full view of the parent type when processing a derived type
10217         which is the full view of a private type not defined in a generic
10218         unit which is derived from a private type with discriminants
10219         whose full view is a non-tagged record type.
10221 2014-05-21  Javier Miranda  <miranda@adacore.com>
10223         * exp_ch4.adb (Expand_Allocator_Expression.Apply_Accessibility_Check):
10224         Complete previous patch.
10226 2014-05-21  Thomas Quinot  <quinot@adacore.com>
10228         PR ada/9535
10229         * g-socket.adb (Read and Write for Datagram_Socket_Stream_Type):
10230         Provide a behaviour more consistent with underlying datagram
10231         socket: do not attempt to loop over Send_Socket/Receive_Socket
10232         iterating along the buffer.
10234 2014-05-21  Hristian Kirtchev  <kirtchev@adacore.com>
10236         * freeze.adb (Freeze_Record_Type): Ensure that a discriminated
10237         or a tagged type is not labelled as volatile. Ensure that a
10238         non-volatile type has no volatile components.
10239         * sem_ch3.adb (Analyze_Object_Contract): Add local constant
10240         Obj_Typ. Code reformatting.  Ensure that a discriminated or
10241         tagged object is not labelled as volatile.
10242         * sem_prag.adb (Process_Atomic_Shared_Volatile): Ensure that
10243         pragma Volatile applies to a full type declaration or an object
10244         declaration when SPARK mode is on.
10246 2014-05-21  Sergey Rybin  <rybin@adacore.com frybin>
10248         * gnat_ugn.texi: For ASIS tools, reword the paragraph about
10249         providing options needed for compiling the argument source for
10250         the situation when a project file can be used as a tool parameter.
10252 2014-05-21  Gary Dismukes  <dismukes@adacore.com>
10254         * gnat_rm.texi: Minor typo fix.
10256 2014-05-21  Robert Dewar  <dewar@adacore.com>
10258         * stand.adb (Tree_Read): Read missing entities.
10259         (Tree_Write): Write missing entities.
10261 2014-05-21  Ben Brosgol  <brosgol@adacore.com>
10263         * gnat_ugn.texi: Wordsmithing edits to Coupling Metrics Control
10264         section in gnatmetric chapter.
10266 2014-05-21  Robert Dewar  <dewar@adacore.com>
10268         * exp_ch6.adb (Expand_Actuals): Spec moved here, since not used
10269         outside Exp_Ch6 (Expand_Actuals): Deal with proper insertion of
10270         post-call copy write back (see detailed comment in code).
10271         * exp_ch6.ads (Expand_Actuals): Moved to body, not used outside
10272         Exp_Ch6.
10273         * tbuild.ads: Minor reformatting.
10275 2014-05-21  Robert Dewar  <dewar@adacore.com>
10277         * stand.ads: Add warning about adding new entities and
10278         Tree_Read/Tree_Write.
10280 2014-05-21  Robert Dewar  <dewar@adacore.com>
10282         * sem_util.adb (Set_Entity_With_Checks): Don't complain about
10283         references to restricted entities within the units in which they
10284         are declared.
10286 2014-05-21  Robert Dewar  <dewar@adacore.com>
10288         * gnat1drv.adb (Check_Bad_Body): Use Source_File_Is_Body to
10289         simplify the needed test, and also deal with failure to catch
10290         situations with non-standard names.
10291         * sinput-l.ads, sinput-l.adb (Source_File_Is_No_Body): New function
10292         (Source_File_Is_Subunit): Removed, no longer used.
10294 2014-05-21  Javier Miranda  <miranda@adacore.com>
10296         * exp_ch4.adb
10297         (Expand_Allocator_Expression.Apply_Accessibility_Check): for a
10298         renaming of an access to interface object there is no need to
10299         generate extra code to reference the tag.
10301 2014-05-21  Robert Dewar  <dewar@adacore.com>
10303         * errout.adb, erroutc.adb, erroutc.ads: Allow warning tag in pragma
10304         Warnings (Off, string).
10306 2014-05-21  Robert Dewar  <dewar@adacore.com>
10308         * osint.adb: Fix three error messages to say invalid instead
10309         of erroneous.
10310         * par-ch4.adb, exp_aggr.adb, sem_attr.adb, sem_aux.adb, sem_ch3.adb,
10311         sem_ch5.adb, sem_ch6.adb, sem_ch7.adb, sem_dim.adb, sem_res.adb,
10312         sem_util.adb, sem_util.ads: Fix incorrect use of erroneous in comments.
10314 2014-05-21  Ed Schonberg  <schonberg@adacore.com>
10316         * freeze.adb, sem_ch13.adb, sem_ch13.ads, sem_ch9.adb,
10317         sem_ch9.ads: Move discriminant manipulation routines for analysis of
10318         aspect specifications from sem_ch9 to sem_ch13, where they belong.
10320 2014-05-21  Robert Dewar  <dewar@adacore.com>
10322         * gnat_ugn.texi: Clearly document -gnatw.g (GNAT warnings).
10323         Clearly document -gnatyg (GNAT style switches).
10324         * usage.adb: Add line line for -gnatw.g (GNAT warnings) More
10325         detail for line for -gnatyg (GNAT style switches) -gnatw.d/D is
10326         available for VMS after all.
10327         * warnsw.adb: Reorganize to eliminate duplicated code
10328         (Restore_Warnings): Add a couple of missing entries
10329         (Save_Warnings): Add a couple of missing entries.
10330         * warnsw.ads: Add missing entries to Warning_Record (not clear
10331         what the impact is).
10333 2014-05-21  Robert Dewar  <dewar@adacore.com>
10335         * errout.adb (Set_Msg_Insertion_Warning): Handle ?*? (restriction
10336         warning) case.
10337         * errout.ads: Document ?*? (restriction warning) insertion.
10338         * erroutc.adb (Get_Warning_Tag): Deal with ?*? (restriction
10339         warning) case.
10340         * erroutc.ads: Document use of * for restriction warning tag.
10341         * restrict.adb (Restriction_Msg): Tag with ?*? instead of ??.
10343 2014-05-21  Ed Schonberg  <schonberg@adacore.com>
10345         * sem_ch9.adb (Push_Scope_And_Install_Discriminants): Do not
10346         make discriminants immediately visible when analyzing an aspect
10347         of a subtype declaration.
10348         (Uninstall_Discriminants): Do not apply to the entity in a
10349         subtype declaration.
10351 2014-05-21  Ed Schonberg  <schonberg@adacore.com>
10353         * sem_util.adb: Code clean up.
10355 2014-05-21  Eric Botcazou  <ebotcazou@adacore.com>
10357         * gnat_ugn.texi: Document -Werror.
10359 2014-05-21  Bob Duff  <duff@adacore.com>
10361         * sem_util.adb (Is_Dependent_Component_Of_Mutable_Object):
10362         This was returning False if the Object is a constant view. Fix
10363         it to return True in that case, because it might be a view of
10364         a variable.
10365         (Has_Discriminant_Dependent_Constraint): Fix latent
10366         bug; this function was crashing when passed a discriminant.
10368 2014-05-21  Robert Dewar  <dewar@adacore.com>
10370         * gnat_ugn.texi: Remove misplaced section that is now obsolete.
10371         * s-arit64.adb: Minor code reorganization.
10372         * sem_prag.adb: Minor comment fix (remove erroneous use of the
10373         term erroneous).
10375 2014-05-21  Robert Dewar  <dewar@adacore.com>
10377         * g-table.adb, g-dyntab.adb (Reallocate): Fix possible overflow in
10378         computing new table size.
10380 2014-05-21  Robert Dewar  <dewar@adacore.com>
10382         * einfo.ads: Minor reformatting.
10383         * ceinfo.adb: Deal with slight format change of einfo.ads.
10385 2014-05-21  Ed Schonberg  <schonberg@adacore.com>
10387         * sem_prag.adb (Analyze_Part_Of): Further work on the proper
10388         implementation of the SPARK 2014 rule concerning private child
10389         units (LRM 7.2.6).
10391 2014-05-21  Vincent Celier  <celier@adacore.com>
10393         * makeusg.adb: Add switch -d to usage.
10395 2014-05-21  Ed Schonberg  <schonberg@adacore.com>
10397         * sem_util.adb (Find_Actual): If an actual that is the prefix
10398         of an enclosing prefixed call has been rewritten, use Nkind
10399         and Sloc to identify the corresponding formal, when handling
10400         deferred references.
10402 2014-05-21  Robert Dewar  <dewar@adacore.com>
10404         * debug.adb: Document -gnatd.z switch.
10405         * sem_eval.adb (Why_Non_Static): Test -gnatd.z switch.
10407 2014-05-21  Robert Dewar  <dewar@adacore.com>
10409         * einfo.ads (Can_Never_Be_Null): Minor comment update.
10410         * sem_prag.adb (Check_Arg_Is_Task_Dispatching_Policy): Minor
10411         error message change.
10412         * s-arit64.adb ("abs"): New function. Use expression functions
10413         for the simple conversions and arithmetic.
10415 2014-05-18  Eric Botcazou  <ebotcazou@adacore.com>
10417         * gcc-interface/trans.c (Subprogram_Body_to_gnu): Rework comment and
10418         set function_start_locus.
10420 2014-05-18  Eric Botcazou  <ebotcazou@adacore.com>
10422         * utils.c (gnat_write_global_declarations): Adjust the flags put on
10423         dummy_global.
10425 2014-05-18  Eric Botcazou  <ebotcazou@adacore.com>
10427         * gcc-interface/decl.c (change_qualified_type): New static function.
10428         (gnat_to_gnu_entity): Use it throughout to add qualifiers on types.
10429         <E_Array_Type>: Set TYPE_VOLATILE on the array type directly.
10430         <E_Array_Subtype>: Likewise.
10431         Do not set flags on an UNCONSTRAINED_ARRAY_TYPE directly.
10432         (gnat_to_gnu_component_type): Likewise.
10433         (gnat_to_gnu_param): Likewise.
10435 2014-05-18  Eric Botcazou  <ebotcazou@adacore.com>
10437         * fe.h (Set_Present_Expr): Move around.
10438         (End_Location): New macro.
10439         * gcc-interface/trans.c (Case_Statement_to_gnu): Use End_Location.
10441 2014-05-18  Eric Botcazou  <ebotcazou@adacore.com>
10443         * gcc-interface/decl.c (gnat_to_gnu_entity): Use Underlying_Type in
10444         lieu of more verbose construct.
10445         * gcc-interface/trans.c (Call_to_gnu): Likewise.
10446         (gnat_to_gnu): Likewise.  Remove obsolete code.
10448 2014-05-18  Eric Botcazou  <ebotcazou@adacore.com>
10450         * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Array_Subtype>: Do not
10451         consider that regular packed arrays can never be superflat.
10453 2014-05-17  Trevor Saunders  <tsaunders@mozilla.com>
10455         * gcc-interface/ada-tree.h: Remove usage of variable_size gty
10456         annotation.
10457         * gcc-interface/decl.c (annotate_value): Adjust.
10458         * gcc-interface/trans.c (Attribute_to_gnu): Likewise.
10459         (push_range_check_info): Likewise.
10460         (Loop_Statement_to_gnu): Likewise.
10461         (Subprogram_Body_to_gnu): Likewise.
10462         (Compilation_Unit_to_gnu): Likewise.
10463         (start_stmt_group): Likewise.
10464         * gcc-interface/utils.c (init_gnat_utils): Likewise.
10465         (gnat_pushlevel): Likewise.
10466         (maybe_pad_type): Likewise.
10468 2014-05-14  Eric Botcazou  <ebotcazou@adacore.com>
10470         * seh_init.c: Fix copyright year.
10472 2014-05-14  Bernd Edlinger  <bernd.edlinger@hotmail.de>
10474         * seh_init.c (__gnat_map_SEH): Compile also when __CYGWIN__ and __SEH__
10475         are defined.  Move include windows.h before system.h.
10476         * s-oscons-tmplt.c (DTR_CONTROL_ENABLE, RTS_CONTROL_ENABLE): Compile
10477         also when __CYGWIN__ is defined.  Include windef.h before winbase.h.
10479 2014-05-14  Richard Sandiford  <r.sandiford@uk.ibm.com>
10481         * gcc-interface/decl.c (gnat_to_gnu_entity): Convert integer_one_node
10482         to the appropriate type.
10483         * gcc-interface/trans.c (gnat_to_gnu): Likewise.
10484         (pos_to_constructor): Likewise.
10486 2014-05-13  Eric Botcazou  <ebotcazou@adacore.com>
10488         * gcc-interface/decl.c (annotate_value): Fix thinko in latest change.
10490 2014-05-06  Kenneth Zadeck  <zadeck@naturalbridge.com>
10491             Mike Stump  <mikestump@comcast.net>
10492             Richard Sandiford  <rdsandiford@googlemail.com>
10494         * gcc-interface/cuintp.c (UI_From_gnu): Use wide-int interfaces.
10495         * gcc-interface/decl.c (gnat_to_gnu_entity): Use TYPE_SIGN.
10496         (annotate_value): Use wide-int interfaces.
10497         * gcc-interface/utils.c (get_nonnull_operand): Use tree_fits_uhwi_p.
10499 2014-04-28  Richard Henderson  <rth@redhat.com>
10501         * gcc-interface/Makefile.in: Support aarch64-linux.
10503 2014-04-28  Eric Botcazou  <ebotcazou@adacore.com>
10505         * exp_dbug.ads (Get_External_Name): Add 'False' default to Has_Suffix,
10506         add 'Suffix' parameter and adjust comment.
10507         (Get_External_Name_With_Suffix): Delete.
10508         * exp_dbug.adb (Get_External_Name_With_Suffix): Merge into...
10509         (Get_External_Name): ...here.  Add 'False' default to Has_Suffix, add
10510         'Suffix' parameter.
10511         (Get_Encoded_Name): Remove 2nd argument in call to Get_External_Name.
10512         Call Get_External_Name instead of Get_External_Name_With_Suffix.
10513         (Get_Secondary_DT_External_Name): Likewise.
10514         * exp_cg.adb (Write_Call_Info): Likewise.
10515         * exp_disp.adb (Export_DT): Likewise.
10516         (Import_DT): Likewise.
10517         * comperr.ads (Compiler_Abort): Remove Code parameter and add From_GCC
10518         parameter with False default.
10519         * comperr.adb (Compiler_Abort): Likewise.  Adjust accordingly.
10520         * types.h (Fat_Pointer): Rename into...
10521         (String_Pointer): ...this.  Add comment on interfacing rules.
10522         * fe.h (Compiler_Abort): Adjust for above renaming.
10523         (Error_Msg_N): Likewise.
10524         (Error_Msg_NE): Likewise.
10525         (Get_External_Name): Likewise.  Add third parameter.
10526         (Get_External_Name_With_Suffix): Delete.
10527         * gcc-interface/decl.c (STDCALL_PREFIX): Define.
10528         (create_concat_name): Adjust call to Get_External_Name, remove call to
10529         Get_External_Name_With_Suffix, use STDCALL_PREFIX, adjust for renaming.
10530         * gcc-interface/trans.c (post_error): Likewise.
10531         (post_error_ne): Likewise.
10532         * gcc-interface/misc.c (internal_error_function): Likewise.
10534 2014-04-28  Richard Biener  <rguenther@suse.de>
10536         PR middle-end/60092
10537         * gcc-interface/utils.c: Define flag_isoc11.
10539 2014-04-26  Eric Botcazou  <ebotcazou@adacore.com>
10541         * gnatvsn.ads (Library_Version): Bump to 4.10.
10543 2014-04-23  Eric Botcazou  <ebotcazou@adacore.com>
10545         Revert
10546         2014-04-22  Richard Henderson  <rth@redhat.com>
10548         * gcc-interface/Makefile.in: Support aarch64-linux.
10550         2014-04-22  Eric Botcazou  <ebotcazou@adacore.com>
10552         * fe.h (Compiler_Abort): Replace Fat_Pointer with String_Pointer.
10553         (Error_Msg_N): Likewise.
10554         (Error_Msg_NE): Likewise.
10555         (Get_External_Name_With_Suffix): Likewise.
10556         * types.h (Fat_Pointer): Delete.
10557         (String_Pointer): New type.
10558         (DECLARE_STRING_POINTER): New macro.
10559         * gcc-interface/decl.c (create_concat_name): Adjust.
10560         * gcc-interface/trans.c (post_error): Likewise.
10561         (post_error_ne): Likewise.
10562         * gcc-interface/misc.c (internal_error_function): Likewise.
10564 2014-04-22  Richard Henderson  <rth@redhat.com>
10566         * gcc-interface/Makefile.in: Support aarch64-linux.
10568         * init.c [__linux__] (HAVE_GNAT_ALTERNATE_STACK): New define.
10569         (__gnat_alternate_stack): Enable for all linux except ia64.
10571 2014-04-22  Eric Botcazou  <ebotcazou@adacore.com>
10573         * fe.h (Compiler_Abort): Replace Fat_Pointer with String_Pointer.
10574         (Error_Msg_N): Likewise.
10575         (Error_Msg_NE): Likewise.
10576         (Get_External_Name_With_Suffix): Likewise.
10577         * types.h (Fat_Pointer): Delete.
10578         (String_Pointer): New type.
10579         (DECLARE_STRING_POINTER): New macro.
10580         * gcc-interface/decl.c (create_concat_name): Adjust.
10581         * gcc-interface/trans.c (post_error): Likewise.
10582         (post_error_ne): Likewise.
10583         * gcc-interface/misc.c (internal_error_function): Likewise.
10585 2014-04-15  Eric Botcazou  <ebotcazou@adacore.com>
10586             Pierre-Marie de Rodat  <derodat@adacore.com>
10588         * gcc-interface/decl.c (gnat_to_gnu_entity) <object>: Create a mere
10589         scalar constant instead of a reference for renaming of scalar literal.
10590         Do not create a new object for constant renaming except for a function
10591         call.  Make sure a VAR_DECL is created for the renaming pointer.
10592         * gcc-interface/trans.c (constant_decl_with_initializer_p): New.
10593         (fold_constant_decl_in_expr): New function.
10594         (Identifier_to_gnu): Use constant_decl_with_initializer_p.
10595         For a constant renaming, try to fold a constant DECL in the result.
10596         (lvalue_required_p) <N_Object_Renaming_Declaration>: Always return 1.
10597         (Identifier_to_gnu): Reference the renamed object of constant renaming
10598         pointers directly.
10599         * gcc-interface/utils.c (invalidate_global_renaming_pointers): Do not
10600         invalidate constant renaming pointers.
10602 2014-04-15  Eric Botcazou  <ebotcazou@adacore.com>
10604         * gcc-interface/utils.c (type_for_vector_element_p): New predicate.
10605         (build_vector_type_for_size): New function.
10606         (build_vector_type_for_array): Likewise.
10607         (unchecked_convert): Build an intermediate vector type to convert
10608         from a generic array type to a vector type.
10609         (handle_vector_size_attribute): Reimplement.
10610         (handle_vector_type_attribute): Likewise.
10612 2014-04-15  Eric Botcazou  <ebotcazou@adacore.com>
10614         * gcc-interface/decl.c (prepend_one_attribute_pragma): Call
10615         Is_OK_Static_Expression in lieu of Is_Static_Expression to
10616         detect valid arguments.
10618 2014-04-15  Eric Botcazou  <ebotcazou@adacore.com>
10620         * gcc-interface/trans.c (gnat_gimplify_stmt): Propagate loop hints.
10622 2014-04-14  Paolo Carlini  <paolo.carlini@oracle.com>
10624         * gcc-interface/decl.c (gnat_to_gnu_entity): Use TYPE_IDENTIFIER.
10625         (components_to_record): Likewise.
10626         * gcc-interface/utils.c (make_aligning_type): Likewise.
10627         (maybe_pad_type): Likewise.
10628         (finish_record_type): Likewise.
10629         (rest_of_record_type_compilation): Likewise.
10631 2014-04-14  Eric Botcazou  <ebotcazou@adacore.com>
10633         * snames.ads-tmpl (Name_Ivdep): New pragma-related name.
10634         * sem_prag.adb (Analyze_Pragma) <Pragma_Loop_Optimize>: Add support
10635         for Ivdep hint.
10636         * gnat_rm.texi (Implementation Defined Pragmas): Document new Ivdep
10637         hint for Loop_Optimize.
10638         * gnat_ugn.texi (Vectorization of loops): Mention new Ivdep hint.
10639         * gcc-interface/trans.c (Pragma_to_gnu) <Pragma_Loop_Optimize>: Deal
10640         with new Ivdep hint.
10641         * gcc-interface/ada-tree.h (LOOP_STMT_IVDEP): New macro.
10642         * gcc-interface/trans.c (Pragma_to_gnu) <Pragma_Loop_Optimize>: Deal
10643         with new Ivdep hint.
10644         (gnat_gimplify_stmt) <LOOP_STMT>: Propagate loop hints.
10646 2014-04-14  Eric Botcazou  <ebotcazou@adacore.com>
10647             Robert Dewar  <dewar@adacore.com>
10649         * opt.ads (Suppress_Back_Annotation): Remove as unused.
10650         * fe.h (Back_Annotate_Rep_Info): Likewise.
10651         (Global_Discard_Names): Likewise.
10652         (List_Representation_Info): Declare.
10653         * types.h (Uint_Minus_1): Likewise.
10654         * repinfo.ads: Document back-annotation change.
10655         * gcc-interface/gigi.h (init_gnat_decl): Declare.
10656         (destroy_gnat_decl): Likewise.
10657         * gcc-interface/decl.c (annotate_value): Do not create the cache of
10658         annotated values here but...
10659         <CALL_EXPR>: Only inline the call if -gnatR3 is specified or we are
10660         in ASIS mode.
10661         (init_gnat_decl): ...here instead.  New function.
10662         (destroy_gnat_decl): Likewise.
10663         * gcc-interface/trans.c (gigi): Call {init|destroy}_gnat_decl.
10664         * gcc-interface/utils.c (init_gnat_utils): Minor reformatting.
10666 2014-04-14  Eric Botcazou  <ebotcazou@adacore.com>
10668         * gcc-interface/decl.c (create_field_decl_from): Finalize non-constant
10669         offset for the field, if any.
10671 2014-04-09  Eric Botcazou  <ebotcazou@adacore.com>
10672             Svante Signell  <svante.signell@gmail.com>
10674         PR ada/54040
10675         PR ada/59346
10676         * s-osinte-x32.adb: New file.
10677         * s-linux.ads (Time): New section.
10678         * s-linux-alpha.ads (Time): Likewise.
10679         * s-linux-android.ads (Time: Likewise.
10680         * s-linux-hppa.ads (Time): Likewise.
10681         * s-linux-mipsel.ads (Time): Likewise.
10682         * s-linux-sparc.ads (Time): Likewise.
10683         * s-linux-x32.ads (Time): Likewise.
10684         * s-osprim-x32.ads (timespec): Adjust.
10685         (Clock): Likewise.
10686         (To_Timespec): Likewise.
10687         * s-osinte-linux.ads (Time): Define local subtypes for those defined
10688         in System.Linux.
10689         * s-taprop-linux.adb (Monotonic_Clock): Do not define timeval.
10690         * s-osinte-hpux.ads (timespec): Revert POSIX breakage.
10691         * s-osinte-kfreebsd-gnu.ads (timespec): Likewise.
10692         * s-osinte-solaris-posix.ads (timespec): Likewise.
10693         * s-osinte-posix.adb (To_Timespec): Likewise.
10694         * gcc-interface/Makefile.in (x32/Linux): Use s-osinte-x32.adb.
10696 2014-04-08  Eric Botcazou  <ebotcazou@adacore.com>
10698         PR ada/60411
10699         * gcc-interface/Makefile.in (arm% linux-android): Switch to EHABI.
10700         * s-linux-android.ads: New file.
10701         * s-intman-android.adb: Likewise.
10702         * s-osinte-android.ads: Adjust.
10703         * sigtramp-armdroid.c: Likewise.
10704         * sigtramp.h: Add Android support.
10706 2014-04-07  Eric Botcazou  <ebotcazou@adacore.com>
10708         * gcc-interface/Makefile.in (alpha-vms): Add missing line.
10710 2014-03-30  Eric Botcazou  <ebotcazou@adacore.com>
10712         PR ada/60703
10713         * system-linux-alpha.ads: Adjust for Ada 2005.
10714         * system-linux-mips.ads: Likewise.
10715         * system-linux-mips64el.ads: Likewise.
10716         * system-linux-mipsel.ads: Likewise.
10717         * system-linux-s390.ads: Likewise.
10718         * system-linux-s390x.ads: Likewise.
10719         * system-linux-sparc.ads: Likewise.
10720         * system-linux-sparcv9.ads: Likewise.
10721         * system-rtems.ads: Likewise.
10722         * system-vxworks-arm.ads: Likewise.
10724 2014-03-16  Andreas Schwab  <schwab@linux-m68k.org>
10726         PR ada/39172
10727         * gcc-interface/Makefile.in (target_cpu_default): Revert
10728         2013-10-11 change.
10730 2014-03-13  Eric Botcazou  <ebotcazou@adacore.com>
10732         PR ada/51483
10733         * cstand.adb (Register_Float_Type): Add 'precision' parameter and use
10734         it to set the RM size.  Use directly 'size' for the Esize.
10735         (Create_Back_End_Float_Types): Adjust call to above.
10736         * get_targ.ads (Register_Type_Proc): Add 'precision' parameter.
10737         * set_targ.ads (FPT_Mode_Entry): Add 'precision' component.
10738         (Write_Target_Dependent_Values): Adjust comment.
10739         * set_targ.adb (Register_Float_Type): Add 'precision' parameter and
10740         deal with it.
10741         (Write_Target_Dependent_Values): Write the precision in lieu of size.
10742         (Initialization): Read the precision in lieu of size and compute the
10743         size from the precision and the alignment.
10744         * gcc-interface/gigi.h (enumerate_modes): Add integer parameter.
10745         * gcc-interface/misc.c (enumerate_modes): Likewise.  Do not register
10746         types for vector modes, pass the size in addition to the precision.
10748 2014-03-10  Eric Botcazou  <ebotcazou@adacore.com>
10750         * gcc-interface/Make-lang.in (ADA_DEPFILES): Fix typo.
10752 2014-03-07  Doug Rupp  <rupp@adacore.com>
10754         PR ada/60411
10755         * system-linux-armel.ads (Backend_Overflow_Checks): Set to True.
10756         (Support_64_Bit_Divides): Removed, no longer used.
10757         (ZCX_By_Default): Enabled.
10759 2014-02-25  Doug Rupp  <rupp@adacore.com>
10761         * gcc-interface/Makefile.in (arm-linux):
10762         (EH_MECHANISM): Use ARM unwinder (-arm)
10763         (LIBGNAT_TARGET_PAIRS: Override defaults with a-exexpr-gcc.adb and
10764         s-excmac-arm.ads.
10765         (EXTRA_LIBGNAT_OBJS): Add raise-gcc.o
10766         (EXTRA_GNATRTL_NONTASKING_OBJS): Add g-cppexc.o s-excmac.o.
10767         (arm-wrs-vxworks): Add EH_MECHANISM=-gcc for kernel mode.
10768         (EXTRA_LIBGNAT_OBJS): Add sigtramp-armvxw.o
10769         Add dependencies for sigtramp-armvxw.o.
10771 2014-02-25  Eric Botcazou  <ebotcazou@adacore.com>
10773         * gcc-interface/trans.c (Pragma_to_gnu): Deal with Warning_As_Error.
10775 2014-02-25  Robert Dewar  <dewar@adacore.com>
10777         * rtsfind.adb (Is_RTE): Protect against entity with no scope
10778         field (previously this call blew up on the Standard entity).
10779         * sem_attr.adb (Analyze_Attribute, case Access): Remove
10780         test for No_Abort_Statements, this is now handled in
10781         Set_Entity_With_Checks.
10782         * exp_ch6.adb, sem_ch10.adb, sem_ch4.adb, sem_ch8.adb, sem_res.adb:
10783         Change name Set_Entity_With_Style_Check => Set_Entity_With_Checks.
10784         * sem_util.ads, sem_util.adb: Change name Set_Entity_With_Style_Check =>
10785         Set_Entity_With_Checks.
10786         (Set_Entity_With_Checks): Add checks for No_Dynamic_Attachment,
10787         Add checks for No_Abort_Statements.
10789 2014-02-25  Robert Dewar  <dewar@adacore.com>
10791         * exp_ch9.adb (Expand_Entry_Barrier): Add comment that call to
10792         Check_Restriction is OK.
10794 2014-02-25  Ed Schonberg  <schonberg@adacore.com>
10796         * sem_ch3.adb (Process_Full_View): Better error message when
10797         the full view of  a private type without discriminants is an
10798         unconstrained type.
10799         * sem_ch7.adb (Uninstall_Declarations): Ditto.
10801 2014-02-25  Eric Botcazou  <ebotcazou@adacore.com>
10803         * sigtramp-armvxw.c: Also restore r0.
10805 2014-02-25  Robert Dewar  <dewar@adacore.com>
10807         * errout.adb (Error_Msg_Internal): Warning_Msg_Char set
10808         unconditionally (Set_Msg_Insertion_Warning): Warning_Msg_Char
10809         set unconditionally.
10810         * erroutc.adb (Get_Warning_Tag): Does not give a leading space
10811         any more (Output_Msg_Text): Rewritten with new convention on
10812         output of warnings that are treated as errors.
10813         * erroutc.ads (Error_Msg_Object): Warn_Chr is always set even
10814         if Warn is False.
10815         * gnat_rm.texi: Updates to documentation on pragma
10816         Warning_As_Error.
10817         * warnsw.adb (Set_Dot_Warning_Switch): -gnatw.e should not
10818         set Warning_Doc_Switch.
10819         * lib-writ.ads: Add documentation note on ALI file generation
10820         for C.
10821         * exp_ch6.adb (Expand_Call): Remove check for No_Abort_Statements
10822         (belongs in Sem).
10823         * sem_attr.adb (Resolve_Attribute, case Access):
10824         Abort_Task'Access violates the No_Abort_Statements restriction.
10825         * sem_res.adb (Resolve_Call): Check restriction
10826         No_Abort_Statements for call to Abort_Task or a renaming of it.
10828 2014-02-25  Robert Dewar  <dewar@adacore.com>
10830         * sem_ch3.adb (Array_Type_Declaration): Check for case of using
10831         type name as index.
10832         * lib.ads: Minor reformatting.
10833         * einfo.ads: Minor reformatting.
10835 2014-02-25  Doug Rupp  <rupp@adacore.com>
10837         * sem_mech.adb (Set_Mechanisms): For convention Fortran on VMS
10838         use Short_Descriptor(S) as the argument passing mechanism.
10840 2014-02-25  Eric Botcazou  <ebotcazou@adacore.com>
10842         * sigtramp-ppcvxw.c (CFI_COMMON_REGS): Also include r0.
10844 2014-02-25  Robert Dewar  <dewar@adacore.com>
10846         * atree.ads (Warnings_Treated_As_Errors): New variable.
10847         * errout.adb (Error_Msg_Internal): Set Warn_Err flag in
10848         error object (Initialize): Initialize Warnings_As_Errors_Count
10849         (Write_Error_Summary): Include count of warnings treated as errors.
10850         * erroutc.adb (Warning_Treated_As_Error): New function.
10851         (Matches): Function moved to outer level of package.
10852         * erroutc.ads (Error_Msg_Object): Add Warn_Err flag.
10853         (Warning_Treated_As_Error): New function.
10854         * gnat_rm.texi: Document pragma Treat_Warning_As_Error.
10855         * opt.adb: Add handling of Warnings_As_Errors_Count[_Config].
10856         * opt.ads (Config_Switches_Type): Add entry for
10857         Warnings_As_Errors_Count.
10858         (Warnings_As_Errors_Count): New variable.
10859         (Warnings_As_Errors): New array.
10860         * par-prag.adb: Add dummy entry for Warning_As_Error.
10861         * sem_prag.adb (Analyze_Pragma): Implement new pragma
10862         Warning_As_Error.
10863         * snames.ads-tmpl: Add entries for Warning_As_Error pragma.
10865 2014-02-25  Eric Botcazou  <ebotcazou@adacore.com>
10867         * sigtramp.h: Fix minor inaccuracy.
10869 2014-02-25  Ben Brosgol  <brosgol@adacore.com>
10871         * gnat_ugn.texi: Added description of kill command.
10873 2014-02-25  Robert Dewar  <dewar@adacore.com>
10875         * gnat_rm.texi (Address_Clauses): Add a section discussing the
10876         problem of address clauses causing unexpected initialization,
10877         including the effect of Initialize_Scalars.
10879 2014-02-25  Robert Dewar  <dewar@adacore.com>
10881         * errout.adb: Various changes for better msgs for anonmous access
10882         subprogram types.
10883         * erroutc.ads, erroutc.adb (Buffer_Ends_With): Version with character
10884         argument.
10885         (Buffer_Remove): Version with character argument.
10886         * sem_attr.adb (Resolve_Attribute, case Access): Better handling
10887         of mismatching conventions for access-to-subprogram case.
10888         * sem_prag.adb (Set_Convention_From_Pragma): Deal with anonymous
10889         access types in record.
10890         * sem_util.ads, sem_util.adb (Set_Convention): Handle anonymous access
10891         types, including in records.
10893 2014-02-25  Doug Rupp  <rupp@adacore.com>
10895         * sigtramp-ppcvxw.c, sigtramp.h, sigtramp-armvxw.c: Comment
10896         enhancements and corrections.
10898 2014-02-25  Robert Dewar  <dewar@adacore.com>
10900         * gnat_rm.texi: New section "Conventions and Anonymous Access Types"
10902 2014-02-25  Robert Dewar  <dewar@adacore.com>
10904         * gnat_rm.texi: First set of documentation additions for
10905         predefined RM units.
10906         * checks.adb: Minor reformatting.
10907         * sem_elab.adb (Check_Task_Activation): Minor fix to error
10908         message.
10909         * sem_util.adb: Minor reformatting.
10911 2014-02-25  Arnaud Charlet  <charlet@adacore.com>
10913         * usage.adb (Usage): Add help on -gnateC.
10914         * switch-c.adb (Scan_Front_End_Switches): Add handling of -gnateC.
10915         * opt.ads (Generate_CodePeer_Messages): New flag.
10916         * gnat_ugn.texi: Document new switch -gnateC.
10918 2014-02-25  Ben Brosgol  <brosgol@adacore.com>
10920         * gnat_rm.texi: Corrected minor typos in Implementation Defined
10921         Aspects.
10922         * opt.ads: Minor reformatting.
10924 2014-02-25  Robert Dewar  <dewar@adacore.com>
10926         * binde.adb: Change messages to mention -gnatel instead of -gnatwl.
10927         * gnat_ugn.texi: Update documentation of -gnatwl Add documentation
10928         of -gnatel/-gnateL.
10929         * opt.ads (Warn_Info_Messages): New flag.
10930         * sem_elab.adb: Use Elab_Warnings, Elab_Info_Messages to control
10931         messages.
10932         * sem_prag.adb: Use Elab_Warnings, Elab_Info_Messages to control
10933         messages.
10934         * switch-m.ad, switch-c.adb: Recognize new -gnatel/EL switches.
10935         * usage.adb: Add documentation of -gnatel/-gnateL Update
10936         documentation of -gnatwl/-gnatwL.
10937         * warnsw.adb: New handling of Elab_Warnings, Elab_Info_Messages
10938         * warnsw.ads (Elab_Info_Messages): New field in Warning_Record
10940 2014-02-25  Robert Dewar  <dewar@adacore.com>
10942         * einfo.ads, einfo.adb (Has_Shift_Operator): New flag.
10943         * gnat_rm.texi: Document pragma Provide_Shift_Operators.
10944         * interfac.ads: Minor code reorganization (add pragma
10945         Compiler_Unit_Warning).
10946         * par-prag.adb: Add dummy entry for Provide_Shift_Operators.
10947         * sem_ch3.adb (Build_Derived_Numeric_Type): Copy
10948         Has_Shift_Operator flag.
10949         * sem_intr.adb (Check_Intrinsic_Subprogram): Make sure
10950         Check_Shift is always called (Check_Shift): Set Has_Shift_Operator.
10951         * sem_prag.adb: Implement pragma Provide_Shift_Operators.
10952         * snames.ads-tmpl: Add entries for pragma Provide_Shift_Operators
10953         Add entry for Name_Amount.
10954         * checks.adb (Selected_Range_Checks): When checking for a null
10955         range, make sure we use the base type, and not the subtype for
10956         deciding a range is null.
10957         * sem_ch5.adb (Analyze_Loop_Parameter_Specification): Check
10958         for suspicious loop bound which is outside the range of the
10959         loop subtype.
10960         * gnat_ugn.texi: Add documentation section "Determining the
10961         Chosen Elaboration Order"
10962         * sem_ch13.adb (UC_Entry): Add field Act_Unit
10963         (Validate_Unchecked_Conversion): Store Act_Unit
10964         (Validate_Unchecked_Conversions): Test Warnings_Off in Act_Unit
10965         * treepr.adb: Minor reformatting.
10967 2014-02-25  Arnaud Charlet  <charlet@adacore.com>
10969         * usage.adb: Minor: fix typo.
10971 2014-02-25  Robert Dewar  <dewar@adacore.com>
10973         * lib.ads, s-bitops.adb, s-bitops.ads, s-conca5.adb, gnat_rm.texi,
10974         s-conca5.ads, s-conca7.adb, s-conca7.ads, s-crc32.adb, s-crc32.ads,
10975         s-conca9.adb, s-conca9.ads, g-dyntab.adb, s-crtl.ads, g-dyntab.ads,
10976         s-excdeb.adb, s-addope.adb, s-addope.ads, s-carun8.adb, s-carun8.ads,
10977         g-htable.adb, g-htable.ads, g-hesora.adb, g-hesora.ads, s-conca2.adb,
10978         s-conca2.ads, a-comlin.adb, a-chlat1.ads, a-comlin.ads, errout.ads,
10979         a-except.adb, s-conca4.adb, a-except.ads, s-conca4.ads, s-conca6.adb,
10980         s-conca6.ads, g-spchge.adb, g-spchge.ads, g-u3spch.adb, g-u3spch.ads,
10981         a-strhas.ads, restrict.adb, aspects.adb, aspects.ads, s-conca8.adb,
10982         s-conca8.ads, back_end.adb, par-prag.adb, g-byorma.adb, g-byorma.ads,
10983         a-elchha.adb, a-elchha.ads, g-speche.adb, g-speche.ads, s-casuti.adb,
10984         s-assert.adb, s-casuti.ads, s-assert.ads, a-clrefi.adb, a-clrefi.ads,
10985         s-conca3.adb, s-conca3.ads, a-ioexce.ads: Implement pragma
10986         Compiler_Unit_Warning, change Compiler_Unit everywhere to
10987         Compiler_Unit_Warning.
10989 2014-02-25  Sergey Rybin  <rybin@adacore.com frybin>
10991         * sem_prag.adb (Analyze_Depends_In_Decl_Part): Do not normalize
10992         in ASIS mode aggregates that are used as aspect definitions.
10994 2014-02-25  Robert Dewar  <dewar@adacore.com>
10996         * exp_ch7.adb, sem_util.adb, sem_util.ads, exp_ch6.adb: Minor
10997         reformatting.
10999 2014-02-25  Ed Schonberg  <schonberg@adacore.com>
11001         * freeze.adb (Freeze_Entity): If the return type of a function
11002         is a limited view, and the non-limited view has not been seen yet,
11003         defer freezing to some later point.
11005 2014-02-25  Robert Dewar  <dewar@adacore.com>
11007         * sem_ch3.adb: Minor reformatting.
11009 2014-02-25  Robert Dewar  <dewar@adacore.com>
11011         * s-excdeb.ads, s-except.ads, s-exctab.adb, s-exctab.ads, s-finmas.ads,
11012         s-htable.adb, s-htable.ads, s-imenne.adb, s-imenne.ads, s-imgenu.adb,
11013         s-imgenu.ads, s-mastop.adb, s-mastop.ads, s-memory-vms_64.adb,
11014         s-memory-vms_64.ads, s-memory.adb, s-memory.ads, s-os_lib.adb,
11015         s-os_lib.ads, s-parame.adb, s-parame.ads, s-purexc.ads, s-restri.adb,
11016         s-restri.ads, s-rident.ads, s-secsta.adb, s-secsta.ads, s-soflin.adb,
11017         s-soflin.ads, s-sopco3.adb, s-sopco3.ads, s-sopco4.adb, s-sopco4.ads,
11018         s-sopco5.adb, s-sopco5.ads, s-spsufi.ads, s-stache.adb, s-stache.ads,
11019         s-stalib.adb, s-stalib.ads, s-stoele.adb, s-stoele.ads, s-strcom.adb,
11020         s-strcom.ads, s-strhas.adb, s-string.adb, s-string.ads, s-strops.adb,
11021         s-strops.ads, s-ststop.adb, s-ststop.ads, s-traceb.adb, s-traceb.ads,
11022         s-traent.adb, s-traent.ads, s-unstyp.ads, s-utf_32.adb, s-utf_32.ads,
11023         s-wchcnv.adb, s-wchcnv.ads, s-wchcon.adb, s-wchcon.ads, s-wchjis.adb,
11024         s-wchjis.ads, sem_ch11.adb, sem_ch4.adb, sem_ch5.adb, sem_prag.adb,
11025         snames.ads-tmpl: Change Compiler_Unit everywhere to
11026         Compiler_Unit_Warning.
11028 2014-02-25  Hristian Kirtchev  <kirtchev@adacore.com>
11030         * exp_ch6.adb (Add_Or_Save_Precondition): New routine.
11031         (Collect_Body_Postconditions_In_Decls): New routine.
11032         (Collect_Body_Postconditions_Of_Kind): Factor out code. Handle
11033         postcondition aspects or pragmas that appear on a subprogram
11034         body stub.
11035         (Collect_Spec_Preconditions): Factor out code. Handle
11036         precondition aspects or pragmas that appear on a subprogram
11037         body stub.
11038         * sem_ch6.adb (Analyze_Subprogram_Body_Helper): The analysis of
11039         aspects that apply to a subprogram body stub is no longer delayed,
11040         the aspects are analyzed on the spot.
11041         (SPARK_Aspect_Error):
11042         Aspects that apply to a subprogram declaration cannot appear in
11043         a subunit.
11044         * sem_ch10.adb Remove with and use clause for Sem_Ch13.
11045         (Analyze_Proper_Body): Add local variable Comp_Unit. Unum
11046         is now a local variable. Code cleanup. Analysis related to
11047         the aspects of a subprogram body stub is now carried out by
11048         Analyze_Subprogram_Body_Helper. Do not propagate the aspects
11049         and/or pragmas of a subprogram body stub to the proper body
11050         as this is no longer needed. Do not analyze the aspects of a
11051         subprogram stub when the corresponding source unit is missing.
11052         (Analyze_Protected_Body_Stub): Flag the illegal use of aspects
11053         on a stub.
11054         (Analyze_Task_Body_Stub): Flag the illegal use of
11055         aspects on a stub.
11056         (Optional_Subunit): Add local variable Unum.
11057         * sem_ch13.adb (Insert_Delayed_Pragma): Do not analyze a generated
11058         pragma when it applies to a subprogram body stub.
11059         * sem_prag.adb (Analyze_Pragma): Pragmas Contract_Cases,
11060         Depends and Global can now apply to a subprogram body stub as
11061         long as it acts as its own spec.
11062         (Analyze_Refined_Pragma):
11063         Code reformatting. Refinement pragmas cannot apply to a subunit.
11065 2014-02-25  Hristian Kirtchev  <kirtchev@adacore.com>
11067         * einfo.ads Update the usage of flag
11068         Uses_Sec_Stack. Uses_Sec_Stack now applies to E_Loop entities.
11069         * exp_ch5.adb (Expand_Iterator_Loop): The temporary for a cursor
11070         now starts with the letter 'C'. This makes reading expanded
11071         code easier.
11072         * exp_ch7.adb (Establish_Transient_Scope): Add local variable
11073         Iter_Loop. Signal that an Ada 2012 iterator loop requires
11074         secondary stack management when creating a transient scope for
11075         an element reference.
11076         * exp_util.adb (Process_Statements_For_Controlled_Objects):
11077         When wrapping the statements of a loop, pass the E_Loop entity
11078         to the wrapping machinery.
11079         (Wrap_Statements_In_Block): Add
11080         formal parameter Scop along with comment on usage. Add local
11081         variables Block_Id, Block_Nod and Iter_Loop. Mark the generated
11082         block as requiring secondary stack management when the block is
11083         created inside an Ada 2012 iterator loop. This ensures that any
11084         reference objects are reclaimed on each iteration of the loop.
11085         * sem_ch5.adb (Analyze_Loop_Statement): Mark the generated block
11086         tasked with the handling of container iterators as requiring
11087         secondary stack management. This ensures that iterators are
11088         reclaimed when the loop terminates or is exited in any fashion.
11089         * sem_util.adb (Add_Block_Identifier): New routine.
11090         (Find_Enclosing_Iterator_Loop): New routine.
11091         * sem_util.ads (Add_Block_Identifier): New routine.
11092         (Find_Enclosing_Iterator_Loop): New routine.
11094 2014-02-25  Robert Dewar  <dewar@adacore.com>
11096         * sinfo.ads: Minor reformatting.
11098 2014-02-25  Tristan Gingold  <gingold@adacore.com>
11100         * s-expllu.ads, s-expuns.ads, s-expmod.ads: Minor comment fix.
11102 2014-02-25  Pascal Obry  <obry@adacore.com>
11104         * sinput-l.adb, osint.adb, osint.ads: Add Prep_Suffix to factorize code.
11106 2014-02-25  Tristan Gingold  <gingold@adacore.com>
11108         * sem_ch10.adb: Minor comment fix.
11110 2014-02-25  Bob Duff  <duff@adacore.com>
11112         * s-tasdeb.adb: Misc cleanup of this package,
11113         including printing addresses in hexadecimal.
11114         (Write): Fix minor bug when taking 'Address of an empty string.
11116 2014-02-25  Ed Schonberg  <schonberg@adacore.com>
11118         * sem_prag.adb (Analyze_Part_Of): Reject state refinement in a
11119         public child unit when it does not refer to the abstract state
11120         of a public ancestor.
11122 2014-02-25  Yannick Moy  <moy@adacore.com>
11124         * sem_prag.adb (Analyze_Pragma/Pragma_Validity_Checks): Ignore pragma
11125         Validity_Checks in GNATprove and CodePeer modes.
11127 2014-02-25  Pascal Obry  <obry@adacore.com>
11129         * prj-attr.adb, projects.texi, snames.ads-tmpl: Add package Install's
11130         Artifacts attribute.
11132 2014-02-25  Yannick Moy  <moy@adacore.com>
11134         * sem_prag.adb: Minor reformatting to get consistent messages.
11136 2014-02-25  Robert Dewar  <dewar@adacore.com>
11138         * checks.adb: Minor reformatting.
11139         * sinfo.ads (Do_Range_Check): Document that this flag is never
11140         passed to the back end.
11142 2014-02-25  Yannick Moy  <moy@adacore.com>
11144         * sem_ch3.adb, sem_ch5.adb, sem_ch9.adb, sem_prag.adb, sem_attr.adb,
11145         sem_ch6.adb: Remove useless references to SPARK RM in error messages.
11147 2014-02-25  Hristian Kirtchev  <kirtchev@adacore.com>
11149         * sem_res.adb (Appears_In_Check): New routine.
11150         (Resolve_Entity_Name): Remove local variables Prev and
11151         Usage_OK. Par is now a constant. Remove the parent chain traversal
11152         as the placement of a volatile object with enabled property
11153         Async_Writers and/or Effective_Reads must appear immediately
11154         within a legal construct.
11156 2014-02-25  Hristian Kirtchev  <kirtchev@adacore.com>
11158         * checks.adb (Apply_Selected_Range_Checks):
11159         Alphabetize local constants and variables. Add comments.
11160         Always insert a range check that requires runtime evaluation into
11161         the tree.
11163 2014-02-25  Robert Dewar  <dewar@adacore.com>
11165         * sem_attr.adb, sem_ch6.adb, par-ch3.adb: Minor reformatting.
11167 2014-02-25  Bob Duff  <duff@adacore.com>
11169         * s-tassta.adb (Finalize_Global_Tasks): Limit the number of loop
11170         iterations while waiting for independent tasks to terminate;
11171         if an independent task does not terminate, we do not want to
11172         hang here. In that case, the thread will be terminated when the
11173         process exits.
11174         * s-taprop-linux.adb (Abort_Task): Fix Assert to allow for ESRCH.
11176 2014-02-25  Ed Schonberg  <schonberg@adacore.com>
11178         * sem_prag.adb (Check_SPARK_Aspect_For_ASIS): New subprogram,
11179         used to perform pre-analysis of the expression for SPARK
11180         aspects that have a non-standard syntax, such as GLobal and
11181         Initializes. The procedure applies to the original expression
11182         in an aspect specification, prior to the analysis of the
11183         corresponding pragma, in order to provide semantic information
11184         for ASIS navigation purposes.
11185         (Analyze_Global_In_Decl_List, Analyze_Initializes_In_Decl_Part):
11186         Call new subprogram.
11188 2014-02-25  Yannick Moy  <moy@adacore.com>
11190         * sem_prag.adb: Remove obsolete reference to SPARK RM in error message.
11192 2014-02-25  Doug Rupp  <rupp@adacore.com>
11194         * init.c (HAVE_GNAT_ADJUST_CONTEXT_FOR_RAISE): Enable for ARM.
11195         (__gnat_adjust_context_for_raise): Bump the PC by 2.
11197 2014-02-25  Ed Schonberg  <schonberg@adacore.com>
11199         * par-ch3.adb (P_Basic_Declarative_Items): In the case of a
11200         misplaced IS, add a statement sequence to improper body only if
11201         one has not been parsed already.
11203 2014-02-25  Ed Schonberg  <schonberg@adacore.com>
11205         * sem_attr.adb (Analyze_Attribute, case 'Update): Check for
11206         mismatch when multidimensional array is updated with a single
11207         index.
11209 2014-02-25  Yannick Moy  <moy@adacore.com>
11211         * sem_ch3.adb, sem_ch5.adb, sem_prag.adb, sem_attr.adb, errout.ads,
11212         sem_ch6.adb: Mark most references to SPARK RM in error messages
11213         for removal.
11215 2014-02-24  Ed Schonberg  <schonberg@adacore.com>
11217         * par-ch3.adb (P_Basic_Declarative_Items): If an improper body
11218         appears in a list of basic declarations, complete the tree with
11219         an empty statement list, to prevent cascaded errors and crashes
11220         if semantic analysis is attempted.
11222 2014-02-24  Thomas Quinot  <quinot@adacore.com>
11224         * g-sercom-mingw.adb (Open): Fix incorrect test for error return
11225         value.
11226         * erroutc.adb: Minor reformatting.
11228 2014-02-24  Hristian Kirtchev  <kirtchev@adacore.com>
11230         * sem_prag.adb (Check_Clause_Syntax): Account
11231         for a solitary input item in a dependency list.
11233 2014-02-24  Yannick Moy  <moy@adacore.com>
11235         * gnat1drv.adb (Adjust_Global_Switches): Do not
11236         use validity checks at all in GNATprove_Mode.
11238 2014-02-24  Robert Dewar  <dewar@adacore.com>
11240         * g-sercom-mingw.adb, g-sercom-linux.adb, sem_prag.adb, freeze.adb,
11241         atree.adb, atree.ads: Minor reformatting.
11243 2014-02-24  Hristian Kirtchev  <kirtchev@adacore.com>
11245         * sem_ch6.adb (Analyze_Subprogram_Body_Contract): Do not enforce
11246         global and dependence refinement when SPARK_Mode is off.
11247         * sem_ch7.adb (Analyze_Package_Body_Contract): Do not enforce
11248         state refinement when SPARK_Mode is off.
11249         * sem_ch13.adb (Analyze_Aspect_Specifications): Add local
11250         variable Decl. Insert the generated pragma for Refined_State
11251         after a potential pragma SPARK_Mode.
11252         * sem_prag.adb (Analyze_Depends_In_Decl_Part): Add local
11253         constant Deps. Remove local variable Expr. Check the syntax
11254         of pragma Depends when SPARK_Mode is off. Factor out the
11255         processing for extra parenthesis around individual clauses.
11256         (Analyze_Global_In_Decl_List): Items is now a constant. Check
11257         the syntax of pragma Global when SPARK_Mode is off.
11258         (Analyze_Initializes_In_Decl_Part): Check the syntax of pragma
11259         Initializes when SPARK_Mode is off.
11260         (Analyze_Part_Of): Check
11261         the syntax of the encapsulating state when SPARK_Mode is off.
11262         (Analyze_Pragma): Check the syntax of pragma Abstract_State when
11263         SPARK_Mode is off. Move the declaration order check with respect
11264         to pragma Initializes to the end of the processing. Do not verify
11265         the declaration order for pragma Initial_Condition when SPARK_Mode
11266         is off. Do not complain about a useless package refinement when
11267         SPARK_Mode is off.
11268         (Analyze_Refined_Depends_In_Decl_Part): Refs
11269         is now a constant. Check the syntax of pragma Refined_Depends
11270         when SPARK_Mode is off.
11271         (Analyze_Refined_Global_In_Decl_Part):
11272         Check the syntax of pragma Refined_Global when SPARK_Mode is off.
11273         (Analyze_Refined_State_In_Decl_Part): Check the syntax of pragma
11274         Refined_State when SPARK_Mode is off.
11275         (Check_Dependence_List_Syntax): New routine.
11276         (Check_Global_List_Syntax): New routine.
11277         (Check_Initialization_List_Syntax): New routine.
11278         (Check_Item_Syntax): New routine.
11279         (Check_State_Declaration_Syntax): New routine.
11280         (Check_Refinement_List_Syntax): New routine.
11281         (Has_Extra_Parentheses): Moved to the top level of Sem_Prag.
11283 2014-02-24  Robert Dewar  <dewar@adacore.com>
11285         * a-tags.adb, s-os_lib.adb: Minor reformatting.
11287 2014-02-24  Thomas Quinot  <quinot@adacore.com>
11289         * g-sercom-mingw.adb, g-sercom-linux.adb (Raise_Error): Include
11290         strerror message, not just numeric errno value.
11292 2014-02-24  Doug Rupp  <rupp@adacore.com>
11294         * raise-gcc.c (exception_class_eq): Make endian neutral.
11296 2014-02-24  Ed Schonberg  <schonberg@adacore.com>
11298         * atree.ads, atree,adb (Copy_Separate_Tree): Remove Syntax_Only
11299         flag, and reset Etype and Analyzed attributes unconditionally
11300         when copying a tree that may be partly analyzed.
11301         * freeze.adb: Change calls to Copy_Separate_Tree accordingly.
11302         * sem_ch6.adb (Check_Inline_Pragma): If the Inline pragma appears
11303         within a subprogram body and applies to it, remove it from the
11304         body before making a copy of it, to prevent spurious errors when
11305         analyzing the copied body.
11307 2014-02-24  Thomas Quinot  <quinot@adacore.com>
11309         * s-os_lib.adb (Errno_Message): Do not depend on Integer'Image.
11310         * s-oscons-tmplt.c: On VxWorks, include adaint.h only after
11311         vxWorks.h has been included.  Also ensure that file attributes
11312         related definitions are output even in cases where socket support
11313         is not enabled.
11314         * a-tags.adb: Code clean up.
11315         * Make-generated.in (OSCONS_CPP, OSCONS_EXTRACT): Use -iquote
11316         instead of -I to add the main ada source directory to the header
11317         search path, in order to avoid conflict between our own "types.h"
11318         and VxWork's <types.h>.
11320 2014-02-24  Robert Dewar  <dewar@adacore.com>
11322         * atree.ads, atree.adb (Copy_Separate_Tree): Add Syntax_Only parameter.
11323         * debug.adb: Remove documentation of -gnatd.X, no longer used.
11324         * freeze.adb (Wrap_Imported_Subprogram): Fixed and activated.
11326 2014-02-24  Bob Duff  <duff@adacore.com>
11328         * gnat_ugn.texi: Improve documentation of gnatpp.
11330 2014-02-24  Thomas Quinot  <quinot@adacore.com>
11332         * g-stheme.adb, g-socthi-vms.adb, g-socthi-vms.ads,
11333         g-socthi-vxworks.adb, g-socthi-vxworks.ads, g-stseme.adb,
11334         g-socthi-mingw.adb, g-socthi-mingw.ads, g-socthi.adb,
11335         g-socthi.ads, g-socket.adb (Host_Error_Message): Return a string, not
11336         a chars_ptr, because on Windows this is a renaming of
11337         Socket_Error_Message.
11339 2014-02-24  Robert Dewar  <dewar@adacore.com>
11341         * a-direct.adb, sem_ch5.adb, a-cfdlli.adb, a-cfhase.adb, a-tags.adb,
11342         s-filatt.ads, a-cforma.adb, sem_ch6.adb, g-socthi-mingw.adb,
11343         a-cfhama.adb, a-cforse.adb, a-cofove.adb: Minor reformatting and code
11344         reorganization.
11346 2014-02-24  Thomas Quinot  <quinot@adacore.com>
11348         * Make-generated.in (OSCONS_CPP, OSCONS_EXTRACT): Make sure
11349         that the source directory containing s-oscons-tmplt.c is on the
11350         include path, so that all internal header files are available.
11352 2014-02-24  Ed Schonberg  <schonberg@adacore.com>
11354         * sem_ch5.adb (Analyze_Loop_Parameter_Specification): If the
11355         domain of iteration is an attribute reference 'Old, this is an
11356         Ada 2012 iterator and the loop must be rewritten as such.
11358 2014-02-24  Thomas Quinot  <quinot@adacore.com>
11360         * s-fileio.adb (Errno_Message): Remove, use shared version from
11361         s-os_lib instead.
11362         * s-crtrun.ads, Makefile.rtl: Remove now unused unit.
11363         * g-stseme (Socket_Error_Message): Reimplement in terms of new
11364         s-os_lib function.
11365         * g-socthi.ads, g-socthi.adb: Change profile of
11366         Socket_Error_Message to return String to allow the above.
11367         * g-socket.adb, g-socthi-mingw.adb, g-socthi-mingw.ads,
11368         * g-socthi-vms.adb, g-socthi-vms.ads, g-socthi-vxworks.adb,
11369         * g-socthi-vxworks.ads: Update to account for the above profile
11370         change.
11371         * a-tags.adb: Use strlen builtin binding provided by s-crtl.
11372         * s-crtl.ads (strncpy): New procedure.
11373         * s-os_lib.adb (Copy_Attributes): Import just once (strncpy):
11374         Use import from s-crtl.
11375         * a-envvar.adb, osint.adb: Use imports of C runtime functions
11376         from s-crtl instead of re-importing locally.
11378 2014-02-24  Hristian Kirtchev  <kirtchev@adacore.com>
11380         * sem_prag.adb (Analyze_Global_Item): Emit the
11381         variable related checks concerning volatile objects only when
11382         SPARK_Mode is on.
11384 2014-02-24  Robert Dewar  <dewar@adacore.com>
11386         * sem_ch5.adb (Analyze_Iterator_Specification): use
11387         Error_Msg_Ada_2012_Feature.
11389 2014-02-24  Jose Ruiz  <ruiz@adacore.com>
11391         * s-rident.ads (Profile_Info): For Ravenscar, the restrictions
11392         No_Local_Timing_Events and No_Specific_Termination_Handlers
11393         must be set, according to the Ravenscar profile definition
11394         in D.13(6/3).
11396 2014-02-24  Ed Schonberg  <schonberg@adacore.com>
11398         * sem_ch6.adb (Analyze_Expression_Function): If this is a
11399         completion, freeze return type and its designated type if needed.
11401 2014-02-24  Thomas Quinot  <quinot@adacore.com>
11403         * sem_ch13.adb (Analyze_Attribute_Definition_Clause, case
11404         'Address): When moving initialization statements to a freeze
11405         entity, keep them under a single node (i.e. do not unwrap
11406         expressions with actions), and set the Initialization_Statements
11407         attribute again so that processing of a later pragma Import can
11408         still remove them.
11410 2014-02-24  Claire Dross  <dross@adacore.com>
11412         * a-cfdlli.adb, a-cfdlli.ads, a-cfhama.adb, a-cfhama.ads,
11413         a-cfhase.adb, a-cfhase.ads, a-cforma.adb, a-cforma.ads,
11414         a-cforse.adb, a-cforse.ads, a-cofove.adb, a-cofove.ads: Rename
11415         Left/Right to First_To_Previous/Current_To_Last.
11417 2014-02-24  Thomas Quinot  <quinot@adacore.com>
11419         * adaint.h (struct file_attributes): New component "error"
11420         (__gnat_error_attributes): Accessor for the above.
11421         * adaint.c (__gnat_error_attributes): New subprogram
11422         (__gnat_stat): Fix returned value (expect errno value)
11423         (__gnat_stat_to_attr): Add management of error component (set to
11424         stat errno value, except for missing files where it is set to 0,
11425         and exists is set to 0).
11426         * osint.ads (File_Attributes_Size): Update per change above,
11427         also clarify documentation.
11428         * s-filatt.ads: New file, binding to file attributes related
11429         functions.
11430         * Makefile.rtl (s-filatt): New runtime unit.
11431         * s-crtl.ads (strlen): Expose binding to GCC builtin (falls back
11432         to library function if not available on target).
11433         * s-os_lib.ads, s-os_lib.adb (Errno_Message): New subprogram.
11434         * s-oscons-tmplt.c (SIZEOF_struct_file_attributes,
11435         SIZEOF_struct_dirent_alloc): New constants.
11436         * Make-generated.in (s-oscons.ads): Now requires adaint.h.
11437         * a-direct.adb (Fetch_Next_Entry): Fix incorrect buffer sizes.
11438         Perform appropriate error checking if stat fails (do not just
11439         ignore existing files if stat fails)
11440         * gcc-interface/Make-lang.in (GNAT_ADA_OBJS, GNATBIND_OBJS): Update
11441         dependencies.
11443 2014-02-24  Hristian Kirtchev  <kirtchev@adacore.com>
11445         * sem_prag.adb (Analyze_Global_Item): Move the check concerning
11446         the use of volatile objects as global items in a function to
11447         the variable related checks section.
11448         * sem_util.adb (Async_Readers_Enabled): Directly call
11449         Has_Enabled_Property.
11450         (Async_Writers_Enabled): Directly call Has_Enabled_Property.
11451         (Effective_Reads_Enabled): Directly call Has_Enabled_Property.
11452         (Effective_Writes_Enabled): Directly call Has_Enabled_Property.
11453         (Has_Enabled_Property): Rename formal parameter State_Id to Item_Id.
11454         Update the comment on usage. State_Has_Enabled_Property how handles
11455         the original logic of the routine. Add processing for variables.
11456         (State_Has_Enabled_Property): New routine.
11457         (Variable_Has_Enabled_Property): New routine.
11459 2014-02-24  Robert Dewar  <dewar@adacore.com>
11461         * sinfo.ads, sem_ch12.adb, sem_res.adb, sem_ch4.adb, par-ch12.adb:
11462         Minor reformatting.
11463         * atree.ads, atree.adb (Node35): New function.
11464         (Set_Node35): New procedure.
11465         * debug.adb: Define new debug flag -gnatd.X.
11466         * einfo.ads, einfo.adb (Import_Pragma): New field.
11467         * freeze.adb (Wrap_Imported_Procedure): New procedure (not
11468         really active yet, has to be activated with -gnatd.X.
11469         * sem_prag.adb (Set_Imported): Set new Import_Pragma
11470         field (Set_Imported): Don't set Is_Public (see
11471         Freeze.Wrap_Imported_Subprogram)
11472         * par-ch3.adb (P_Component_List): Handle unexpected null component.
11474 2014-02-24  Yannick Moy  <moy@adacore.com>
11476         * sem_ch3.adb: Correct reference to SPARK RM in error messages.
11477         * gnat_rm.texi: Correct documentation of attribute Update.
11479 2014-02-24  Ed Schonberg  <schonberg@adacore.com>
11481         * sem_ch5.adb (Analyze_Iterator_Specification): Reject container
11482         iterator in older versions of Ada.
11484 2014-02-24  Gary Dismukes  <dismukes@adacore.com>
11486         * sem_ch5.adb, sem_aux.ads, sem_ch12.adb, gnat_ugn.texi, par.adb,
11487         par-ch12.adb: Change spelling 'parametrization' to 'parameterization'.
11489 2014-02-24  Ed Schonberg  <schonberg@adacore.com>
11491         * sinfo.ads, sinfo.adb: New attribute Generalized_Indexing, for
11492         indexed_components that are instances of Ada 2012 container
11493         indexing operations. Analysis and resolution of such nodes
11494         is performed on the attribute, and the original source is
11495         preserved for ASIS operations. If expansion is enabled, the
11496         indexed component is replaced by the value of this attribute,
11497         which is in a call to an Indexing aspect, in most case wrapped
11498         in a dereference operation.
11499         * sem_ch4.adb (Analyze_Indexed_Component): Create
11500         Generalized_Indexing attribute when appropriate.
11501         (Analyze_Call): If prefix is not overloadable and has an indexing
11502         aspect, transform into an indexed component so it can be analyzed
11503         as a potential container indexing.
11504         (Analyze_Expression): If node is an indexed component with a
11505         Generalized_ Indexing, do not re-analyze.
11506         * sem_res.adb (Resolve_Generalized_Indexing): Complete resolution
11507         of an indexed_component that has been transformed into a container
11508         indexing operation.
11509         (Resolve_Indexed_Component): Call the above when required.
11510         (Resolve): Do not insert an explicit dereference operation on
11511         an indexed_component whose type has an implicit dereference:
11512         the operation is inserted when resolving the related
11513         Generalized_Indexing.
11515 2014-02-24  Olivier Ramonat  <ramonat@adacore.com>
11517         * gnat_rm.texi, gnat_ugn.texi: Replace Ada Compiler by Ada Development
11518         Environment.
11520 2014-02-24  Hristian Kirtchev  <kirtchev@adacore.com>
11522         * sem_prag.adb (Check_Constituent_Usage): Remove leading spaces in
11523         error messages.
11524         (Inconsistent_Mode_Error): Remove leading spaces in error messages.
11525         Merge the expected and available mode errors.
11526         (Report_Unused_Constituents): Remove leading spaces in error messages.
11527         (Report_Unused_States): Remove leading spaces in error messages.
11529 2014-02-24  Thomas Quinot  <quinot@adacore.com>
11531         * par_sco.adb (Traverse_One): Refine categorization of statement
11532         SCOs.
11534 2014-02-24  Robert Dewar  <dewar@adacore.com>
11536         * aspects.ads, aspects.adb: Remove aspects Ada_2005 and Ada_2012,
11537         Pure_05, Pure_12 and Preelaborate_05.
11538         * gnat_rm.texi: Update accordingly.
11539         * sem_prag.adb: Document one argument form of Ada_05/Ada_2005
11540         pragmas Document one argument form of Ada_12/Ada_2012 pragmas
11541         Recognize one argument form of these pragmas only in GNAT mode
11542         (-gnatg).
11544 2014-02-24  Ed Schonberg  <schonberg@adacore.com>
11546         * s-dimmks.ads: Replace symbol for temperature, previously the
11547         Greek letter Theta, by the ASCII @ sign.
11548         * s-diflio.ads: ditto.
11550 2014-02-24  Robert Dewar  <dewar@adacore.com>
11552         * exp_ch4.adb: Minor code reorganization (use OR for boolean
11553         variables).
11554         * sem_ch3.adb, sem_prag.adb, freeze.adb: Minor reformatting.
11556 2014-02-24  Ben Brosgol  <brosgol@adacore.com>
11558         * gnat_ugn.texi, projects.texi: Added the necessary conditionalization
11559         so that references to gnatmem and ASIS tools do not appear in the FSF
11560         edition of the GNAT User's Guide.
11562 2014-02-24  Yannick Moy  <moy@adacore.com>
11564         * freeze.adb (Freeze_Entity): Do not issue warning
11565         for pre/post being ignored on imported subprogram in GNATprove
11566         mode.
11568 2014-02-24  Robert Dewar  <dewar@adacore.com>
11570         * exp_ch5.adb, sem_ch5.adb, sem_type.adb, sem_res.adb, sem_attr.adb,
11571         stand.ads, sem_eval.adb: Minor reformatting.
11573 2014-02-24  Yannick Moy  <moy@adacore.com>
11575         * sem_prag.adb: Minor rewording in error message.
11577 2014-02-24  Johannes Kanig  <kanig@adacore.com>
11579         * exp_util.adb (Expand_Subtype_From_Expr): Do not expand subtypes in
11580         GNATprove_mode, gnat2why doesn't need nor use these types.
11582 2014-02-24  Gary Dismukes  <dismukes@adacore.com>
11584         * exp_ch4.adb (Expand_N_Op_Expon): On the AAMP
11585         target, in the case of signed integer exponentiation that uses a
11586         run-time routine, always select the Exp_* versions, since overflow
11587         checking is automatically done by AAMP arithmetic instructions.
11589 2014-02-24  Hristian Kirtchev  <kirtchev@adacore.com>
11591         * sem_ch13.adb (Analyze_Aspect_Specifications):
11592         When the related context is a package instace, insert pragma
11593         Abstract_State after all internally-generated renamings related
11594         to the instance "header".
11596 2014-02-24  Ed Schonberg  <schonberg@adacore.com>
11598         * sem_ch3.adb (Analyze_Declarations): Analyze Contract of abstract
11599         subprograms.
11600         * sem_disp.adb (Check_Dispatching_Context): A non-dispatching
11601         call to an abstract subprogram is legal if it appears in a
11602         pre/postcondition of another abstract operation.
11604 2014-02-24  Sergey Rybin  <rybin@adacore.com frybin>
11606         * gnat_ugn.texi: Misc updates.
11608 2014-02-24  Hristian Kirtchev  <kirtchev@adacore.com>
11610         * exp_prag.adb (Expand_Old): Set the type of the generated temporary.
11612 2014-02-24  Gary Dismukes  <dismukes@adacore.com>
11614         * layout.adb (Layout_Variant_Record): Instantiate
11615         Generic_Check_Choices and call Check_Choices before calling
11616         Build_Discr_Checking_Funcs, since we need Others_Discrete_Choices
11617         set to prevent generating incorrect discriminant-checking
11618         functions for 'others' variants (functions that unconditionally
11619         return True rather than accounting for the values covered by the
11620         'others' choice).
11621         * sem_eval.ads (Subtypes_Statically_Compatible): Add formal
11622         Formal_Derived_Matching.
11623         (Subtypes_Statically_Match): Add formal Formal_Derived_Matching.
11624         * sem_eval.adb (Subtypes_Statically_Compatible): Pass new
11625         Formal_Derived_Matching formal to Subtypes_Statically_Match.
11626         (Subtypes_Statically_Match): Suppress the Object_Size matching
11627         test in the case where Formal_Derived_Matching is True.
11628         * sem_ch12.adb (Validate_Derived_Type_Instance): Pass
11629         True for Formal_Derived_Matching_Formal on the call to
11630         Subtypes_Statically_Compatible.
11632 2014-02-23  Eric Botcazou  <ebotcazou@adacore.com>
11634         * gcc-interface/Make-lang.in (ADA_TOOLS_FLAGS_TO_PASS): Robustify.
11636 2014-02-23  Eric Botcazou  <ebotcazou@adacore.com>
11638         * gcc-interface/utils2.c (build_simple_component_ref): Fix formatting.
11639         Look through a conversion between original and packable version to get
11640         the base object.
11641         (build_component_ref): Rework comment and fix formatting.
11643 2014-02-20  Sergey Rybin  <rybin@adacore.com frybin>
11645         * gnat_ugn.texi, vms_data.ads (gnatelim): Add description of
11646         project-specific options.
11648 2014-02-20  Ed Schonberg  <schonberg@adacore.com>
11650         * a-cbdlli.adb (Insert): When capacity exceeded, raise Capacity_Error,
11651         not Constraint_Error.
11652         * a-cbmutr.adb (Append_Child, Insert_Child, Prepend_Child): Ditto.
11653         * sem_ch5.adb: Code clean up.
11655 2014-02-20  Hristian Kirtchev  <kirtchev@adacore.com>
11657         * sem_prag.adb (Usage_Error): Remove local
11658         constant Typ. Remove the specialized diagnostics for unconstrained
11659         or tagged items as those are not part of the explicit input set
11660         of the related subprogram and should not be flagged.
11662 2014-02-20  Ed Schonberg  <schonberg@adacore.com>
11664         * sem_attr.adb: Add guard to preserve all errors.
11666 2014-02-20  Vincent Celier  <celier@adacore.com>
11668         * switch-m.adb (Normalize_Compiler_Switches): Take into account
11669         switches that are recorded in ALI files: -gnateA, -gnateE,
11670         -gnateF, -gnateinn, -gnateu, -gnateV and -gnateY.
11672 2014-02-20  Ed Schonberg  <schonberg@adacore.com>
11674         * sem_ch5.adb (Analyze_Iterator_Specification): Check legality
11675         of an element iterator form over a formal container with an
11676         Iterable aspect.
11677         * exp_ch5.adb (Build_Formal_Container_Iteration): Utility
11678         to create declaration and loop statements for both forms of
11679         container iterators.
11680         (Expand_Formal_Container_Element_Iterator): New procedure
11681         to handle loops of the form  "for E of C" when C is a formal
11682         container.
11683         (Expand_Formal_Container_Iterator): Code cleanup.
11685 2014-02-20  Hristian Kirtchev  <kirtchev@adacore.com>
11687         * sem_prag.adb (Add_Item_To_Name_Buffer): New routine.
11688         (Analyze_Contract_Case): Remove the use of
11689         "may". Replace "aspect Contract_Cases" to avoid categorization
11690         of aspect vs pragma.
11691         (Analyze_External_Property_In_Decl_Part): Remove the use of "formal".
11692         (Analyze_Global_Item): Remove
11693         the use of "formal", specify the subprogram.  Split the
11694         error message about a state with visible refinement into
11695         two. Remove the use of "global" from "volatile global item".
11696         (Analyze_Initialization_Item): Ensure that the SPARK RM reference
11697         is on one line.
11698         (Analyze_Input_Output): Update the call to
11699         Check_Mode. Specify the duplicated item. Reword the error
11700         message concerning an input of a null output list. Use "\"
11701         for error message continuation.
11702         (Analyze_Part_Of): Remove
11703         the use of "may". Use "\" for error message continuation.
11704         (Analyze_Refined_Depends_In_Decl_Part): Update the error
11705         message concerning a useless refinement to match the format
11706         of Refined_Global.
11707         (Analyze_Refined_Global_In_Decl_Part): Reword the error message
11708         concerning a useless refinement.
11709         (Analyze_Refinement_Clause): Use "\" for error message continuation.
11710         (Check_Constituent_Usage): Use "\" for error message continuation.
11711         (Check_Dependency_Clause): Use "\" for error message continuation.
11712         (Check_Matching_Constituent): Use "\" for error message continuation.
11713         (Check_Missing_Part_Of): Use "\" for error message continuation.
11714         (Check_Mode): Renamed to
11715         Check_Role. Update the comment on usage. Redo the error reporting
11716         to use Role_Error.
11717         (Check_Mode_Restriction_In_Enclosing_Context): Use "\" for error
11718         message continuation.
11719         (Find_Mode): Renamed to Find_Role. Update the parameter profile along
11720         with comment on usage. Update all occurrences of Is_Input and Is_Output.
11721         (Inconsistent_Mode_Error): Use "\" for error message continuation.
11722         (Input_Match): Use "\" for error message continuation.
11723         (Role_Error): New routine.
11724         (Set_Convention_From_Pragma): Use "\" for error message continuation.
11725         (Usage_Error): Add local variable Error_Msg. Build specialized error
11726         message showcasing the offending item kind. Redo the diagnostics for
11727         unconstrained types.
11729 2014-02-20  Ed Schonberg  <schonberg@adacore.com>
11731         * exp_util.adb (Is_Iterated_Container): Use high-level primitives
11732         to determine whether a type is a container type, rather than
11733         examining only its type declaration, so that subtypes and derived
11734         types are handled properly.
11736 2014-02-20  Sergey Rybin  <rybin@adacore.com frybin>
11738         * gnat_ugn.texi: gnatmetric: add description of project-specific
11739         options.
11741 2014-02-20  Ed Schonberg  <schonberg@adacore.com>
11743         * sem_attr.adb (Analyze_Attribute, case 'Update): Verify that
11744         all choices in an association for a record type have the same
11745         type, as is done for record aggregates.
11747 2014-02-20  Robert Dewar  <dewar@adacore.com>
11749         * a-cborma.adb, a-cbhama.adb, a-cbdlli.adb, a-cbmutr.adb: Use pragma
11750         Unmodified rather than Warnings (Off). Make comments
11751         uniform in the four affected units.
11753 2014-02-20  Robert Dewar  <dewar@adacore.com>
11755         * sem_ch13.adb (Analyze_Attribute_Definition_Clause, case
11756         Object_Size): For non-scalar types allow any value that is a
11757         multiple of 8.
11758         * gnat_rm.texi: Document Object_Size for composites more clearly.
11760 2014-02-20  Yannick Moy  <moy@adacore.com>
11762         * sem_util.ads, sem_util.adb (Default_Initialization): Remove function.
11764 2014-02-20  Ed Schonberg  <schonberg@adacore.com>
11766         * stand.ads: Raise_Type: new predefined entity, used as the type
11767         of a Raise_Expression prior to resolution.
11768         * cstand.adb: Build entity for Raise_Type.
11769         * sem_ch11.adb (Analyze_Raise_Expression): use Raise_Type as the
11770         initial type of the node.
11771         * sem_type.adb (Covers): Raise_Type is compatible with all
11772         other types.
11773         * sem_res.adb (Resolve): Remove special handling of Any_Type on
11774         Raise_Expression nodes.
11775         (Resolve_Raise_Expression): Signal ambiguity if the type of the
11776         context is still Raise_Type.
11778 2014-02-20  Robert Dewar  <dewar@adacore.com>
11780         * sem_ch12.adb (Validate_Access_Type_Instance): Add message if
11781         mismatching predicates.
11782         * sem_ch6.adb (Check_Conformance): Give better messages on
11783         predicate mismatch.
11784         * sem_eval.adb (Predicates_Match): Move to spec.
11785         * sem_eval.ads (Predicates_Match): Moved here from body.
11787 2014-02-20  Ed Schonberg  <schonberg@adacore.com>
11789         * a-cbmutr.adb: Use default value in Insert_Child.
11791 2014-02-20  Vincent Celier  <celier@adacore.com>
11793         * gnatcmd.adb, make.adb, prj-makr.adb, clean.adb: Call
11794         Stringt.Initialize in all project aware tools.
11796 2014-02-20  Doug Rupp  <rupp@adacore.com>
11798         * gnat_ugn.texi: Document gnatbind -X option.
11799         * vms_data.ads: Minor warnings documentation reformatting.
11801 2014-02-20  Ed Schonberg  <schonberg@adacore.com>
11803         * exp_ch3.adb (Expand_Freeze_Array_Type): Only create invariant
11804         procedure for a base type.
11806 2014-02-20  Robert Dewar  <dewar@adacore.com>
11808         * sem_ch4.adb (Analyze_Case_Expression): Get type from first
11809         expression with type info.
11810         * sem_ch13.adb: Minor reformatting.
11811         * sem_eval.adb (Subtypes_Statically_Match): Make sure we return
11812         False if predicates do not match on the two types.
11814 2014-02-20  Arnaud Charlet  <charlet@adacore.com>
11816         * sem_prag.adb (Analyze_Pragma [pragma Attach_Handler]):
11817         In Relaxed_RM_Semantics mode, allow any static integer value,
11818         for compatibility with other compilers.
11820 2014-02-20  Vincent Celier  <celier@adacore.com>
11822         * errutil.adb (Initialize): Properly initialize entry in table
11823         Warnings when warnings are suppressed.
11825 2014-02-20  Robert Dewar  <dewar@adacore.com>
11827         * s-os_lib.ads: Add warning about non-portability of Rename_File.
11828         * sem_util.ads, sem_util.adb (Is_Junk_Name): New function.
11829         * sem_warn.adb: Use Is_Junk_Name to suppress some warnings.
11830         * gnat_ugn.texi: Document no warnings on junk variable names.
11831         * layout.adb: Minor code reorganization (use Ekind_In).
11832         * stringt.adb: Move initialization of Null_String_Id to Initialize
11833         routine.
11835 2014-02-20  Ed Schonberg  <schonberg@adacore.com>
11837         * sem_ch13.adb: Initialize optional Element_Id.
11839 2014-02-20  Robert Dewar  <dewar@adacore.com>
11841         * s-os_lib.ads (Rename_File): Minor commment addition.
11843 2014-02-20  Thomas Quinot  <quinot@adacore.com>
11845         * einfo.ads: Minor reformatting.
11847 2014-02-20  Hristian Kirtchev  <kirtchev@adacore.com>
11849         * aspects.adb (Exchange_Aspects): New routine.
11850         * aspects.ads (Exchange_Aspects): New routine.
11851         * atree.adb (Rewrite): Do not check whether the save node has
11852         aspects as it never will, instead check the node about to be clobbered.
11853         * einfo.adb (Write_Field25_Name): Abstract_States can appear in
11854         entities of generic packages.
11855         * sem_ch6.adb (Analyze_Expression_Function): Fix the parent
11856         pointer of an aspect specification list after rewriting takes place.
11857         * sem_ch7.adb (Analyze_Package_Body_Helper): Swap the aspect
11858         specifications of the generic template and the copy used for analysis.
11859         * sem_ch12.adb (Analyze_Generic_Package_Declaration): Swap
11860         the aspect specifications of the generic template and the
11861         copy used for analysis.
11862         (Analyze_Package_Instantiation): Propagate the aspect specifications
11863         from the generic template to the instantiation.
11864         (Build_Instance_Compilation_Unit_Nodes): Propagate the aspect
11865         specifications from the generic template to the instantiation.
11866         * sem_ch13.adb (Analyze_Aspect_Specifications): Handle aspects
11867         Abstract_State, Initializes and Initial_Condition when they
11868         apply to a package instantiation.
11870 2014-02-20  Robert Dewar  <dewar@adacore.com>
11872         * stringt.adb: Add call to Initialize in package initialization.
11874 2014-02-20  Robert Dewar  <dewar@adacore.com>
11876         * a-crbtgk.adb, a-cihama.adb, a-coinve.adb, a-ciorse.adb, a-crbtgo.adb,
11877         a-cidlli.adb, a-cimutr.adb, a-cihase.adb, a-cohama.adb, a-coorse.adb,
11878         a-chtgke.adb, a-chtgop.adb, a-comutr.adb, a-ciorma.adb, a-cobove.adb,
11879         a-convec.adb, a-cohase.adb, a-chtgbk.adb, a-chtgbo.adb: Minor
11880         reformatting.
11882 2014-02-20  Bob Duff  <duff@adacore.com>
11884         * s-os_lib.ads: Minor: Remove incorrect comment.
11886 2014-02-20  Robert Dewar  <dewar@adacore.com>
11888         * sem_elab.adb (Check_Elab_Assign): Clearer warning message.
11890 2014-02-20  Ed Schonberg  <schonberg@adacore.com>
11892         * a-cborma.adb (Assign): When creating a node without a specified
11893         element, insert an uninitialized element in the map, because
11894         the instance may provide an element type with a default
11895         initialization, e.g a scalar with a Default_Value aspect.
11896         * a-cbhama.adb (Assign_Key): Remove useless Allocate procedure.
11897         (Insert): In the version without explicit element, provide an
11898         uninitialized element, as above.
11899         * a-cbdlli.adb (Append): In the version without explicit element,
11900         provide an uninitalized element, as above.
11901         (Allocate): Remove unused version.
11903 2014-02-20  Robert Dewar  <dewar@adacore.com>
11905         * sem_elab.adb: Minor code reorganization (use Nkind_In).
11906         * stringt.adb: Remove temporary pragma Warnings (Off).
11907         * stringt.ads: Add pragma Elaborate_Body to ensure initialization
11908         of Null_String_Id.
11910 2014-02-20  Matthew Heaney  <heaney@adacore.com>
11912         * a-chtgbk.adb (Replace): Use correct offset when calculating bucket
11913         index.
11915 2014-02-20  Ed Schonberg  <schonberg@adacore.com>
11917         * sem_ch5.adb (Analyze_Iterator_Specification): Initialize
11918         properly the cursor type for subsequent volatile testing in SPARK
11919         mode, when domain is a formal container with an Iterabe aspect.
11921 2014-02-20  Robert Dewar  <dewar@adacore.com>
11923         * errout.adb (Set_Warnings_Mode_Off): Add Reason argument.
11924         (Set_Specific_Warning_Off): Add Reason argument.
11925         * errout.ads (Set_Warnings_Mode_Off): Add Reason argument.
11926         (Set_Specific_Warning_Off): Add Reason argument.
11927         * erroutc.adb (Warnings_Entry): Add Reason field
11928         (Specific_Warning_Entry): Add Reason field.
11929         (Warnings_Suppressed): return String_Id for Reason.
11930         (Warning_Specifically_Suppressed): return String_Id for Reason.
11931         * erroutc.ads (Warnings_Entry): Add Reason field.
11932         (Specific_Warning_Entry): Add Reason field.
11933         (Set_Specific_Warning_Off): Add Reason argument.
11934         (Set_Warnings_Mode_Off): Add Reason argument.
11935         (Warnings_Suppressed): return String_Id for Reason.
11936         (Warning_Specifically_Suppressed): return String_Id for Reason.
11937         * errutil.adb (Warnings_Suppressed): returns String_Id for Reason
11938         (Warning_Specifically_Suppressed): returns String_Id for Reason
11939         * gnat_rm.texi: Document that Warning parameter is string literal
11940         or a concatenation of string literals.
11941         * par-prag.adb: New handling for Reason argument.
11942         * sem_prag.adb (Analyze_Pragma, case Warning): New handling
11943         for Reason argument.
11944         * sem_util.ads, sem_util.adb (Get_Reason_String): New procedure.
11945         * sem_warn.ads (Warnings_Off_Entry): Add reason field.
11946         * stringt.adb: Set Null_String_Id.
11947         * stringt.ads (Null_String_Id): New constant.
11949 2014-02-20  Robert Dewar  <dewar@adacore.com>
11951         * einfo.ads: Minor comment addition: Etype of package is
11952         Standard_Void_Type.
11953         * checks.adb, exp_aggr.adb, exp_atag.adb, exp_attr.adb, exp_ch13.adb,
11954         exp_ch2.adb, exp_ch3.adb, exp_ch4.adb, exp_ch5.adb, exp_ch6.adb,
11955         exp_ch7.adb, exp_ch9.adb, exp_dbug.adb, exp_disp.adb, exp_imgv.adb,
11956         exp_intr.adb, exp_prag.adb, exp_sel.adb, exp_strm.adb, exp_util.adb,
11957         freeze.adb, rtsfind.adb, sem_aggr.adb, sem_attr.adb, sem_ch10.adb,
11958         sem_ch12.adb, sem_ch13.adb, sem_ch3.adb, sem_ch4.adb, sem_ch5.adb,
11959         sem_ch6.adb, sem_ch8.adb, sem_dim.adb, sem_prag.adb, sem_res.adb,
11960         sem_util.adb, tbuild.adb, tbuild.ads: Remove New_Reference_To.
11961         Replace all calls with calls to New_Occurrence_Of.
11963 2014-02-20  Robert Dewar  <dewar@adacore.com>
11965         * par-util.adb (Ignore, case of right paren): Make this a
11966         serious error.
11968 2014-02-19  Robert Dewar  <dewar@adacore.com>
11970         * sem_ch5.adb, sem_prag.adb, sem_attr.adb: Minor reformatting.
11971         * debug.adb: Remove -gnatd.X switch, no longer used.
11972         * styleg.adb (Check_Then): Remove check of -gnatd.X, check is
11973         now always made.
11975 2014-02-19  Bob Duff  <duff@adacore.com>
11977         * g-socket.ads: Minor: Correct some comments.
11979 2014-02-19  Ed Schonberg  <schonberg@adacore.com>
11981         * sem_ch5.adb: Inhibit iterator rewriting in ASIS mode.
11983 2014-02-19  Arnaud Charlet  <charlet@adacore.com>
11985         * sem_ch13.adb (Analyze_Aspect_Specifications): Do not generate
11986         an error on out of range priorities if Relaxed_RM_Semantics.
11987         * sem_prag.adb (Analyze_Pragma): Ditto.
11989 2014-02-19  Bob Duff  <duff@adacore.com>
11991         * sem_attr.adb (Resolve_Attribute): Detect the case of F'Access
11992         where F denotes the renaming of an enumeration literal, and
11993         issue a specialized error message.
11995 2014-02-19  Matthew Heaney  <heaney@adacore.com>
11997         * a-chtgop.ads (Checked_Index): New operation.
11998         (Next): Changed mode of hash table.
11999         * a-chtgop.adb (Adjust, Delete_Node_Sans_Free): Detect tampering
12000         (Generic_Read, Reserve_Capacity): Ditto.
12001         (Generic_Equal): Detect tampering.
12002         (Next): Changed mode of hash table, detect tampering.
12003         * a-chtgke.ads (Checked_Index, Checked_Equivalent_Keys): New
12004         operation.
12005         (Find): Changed mode of hash table.
12006         * a-chtgke.adb (Checked_Equivalent_Keys): New operation
12007         (Delete_Key_Sans_Free, Generic_Conditional_Insert): Detect
12008         tampering.
12009         (Find): Changed mode of hash table, check for tampering.
12010         (Generic_Replace_Element): Check for tampering.
12011         * a-chtgbk.ads (Checked_Index, Checked_Equivalent_Keys): New operation.
12012         * a-chtgbk.adb (Checked_Index, Checked_Equivalent_Keys): New
12013         operation (Delete_Key_Sans_Free, Generic_Conditional_Insert):
12014         Detect tampering.
12015         (Find, Generic_Replace_Element): Check for tampering.
12016         * a-chtgbo.ads (Checked_Index): New operation.
12017         * a-chtgbo.adb (Checked_Index): New operation
12018         (Delete_Node_Sans_Free, Generic_Equal): Detect tampering.
12019         (Generic_Read, Next): Ditto.
12020         * a-cohase.adb, a-cihase.adb (Is_In): Changed mode of hash
12021         table (Difference, Intersection): Use variable view of
12022         source, detect tampering (Find, Is_Subset, Overlap): Use
12023         variable view of container (Symmetric_Difference, Union):
12024         Detect tampering (Vet): Use Checked_Index to detect tampering
12025         (Constant_Reference, Element, Find): Use variable view of
12026         container.
12027         (Update_Element_Preserving_Key): Detect tampering.
12028         * a-cbhase.adb (Difference, Find, Is_In): Use variable view
12029         of container.
12030         (Is_Subset): Ditto.
12031         (Equivalent_Sets, Overlap): Use Node's Next component.
12032         (Vet): Use Checked_Index to detect tampering.
12033         (Constant_Reference, Element, Find): Use variable view of container.
12034         (Update_Element_Preserving_Key): Detect tampering.
12035         * a-cohama.adb, a-cihama.adb, a-cbhama.adb (Constant_Reference,
12036         Element, Find): Use variable view of container.
12037         (Reference): Rename hash table component.
12038         (Vet): Use Checked_Index to detect tampering.
12040 2014-02-19  Arnaud Charlet  <charlet@adacore.com>
12042         * adabkend.adb (Scan_Compiler_Arguments): Add missing handling
12043         of -nostdinc.
12045 2014-02-19  Thomas Quinot  <quinot@adacore.com>
12047         * tbuild.adb (New_Occurrence_Of, New_Rerefence_To): Guard
12048         against calls without Def_Id.
12050 2014-02-19  Claire Dross  <dross@adacore.com>
12052         * a-cfdlli.ads, a-cfhase.ads, a-cforma.ads, a-cfhama.ads, a-cforse.ads,
12053         a-cofove.ads: Add global annotations to subprograms.
12055 2014-02-19  Hristian Kirtchev  <kirtchev@adacore.com>
12057         * sem_prag.adb (Analyze_Initial_Condition_In_Decl_Part): Remove
12058         constants Errors, Pack_Id and Pack_Init. Remove variable Vars.
12059         Initial_Condition no longer requires the presence of pragma
12060         Initialized. Do not try to diagnose whether all variables mentioned in
12061         pragma Initializes also appear in Initial_Condition.
12062         (Collect_Variables): Removed.
12063         (Match_Variable): Removed.
12064         (Match_Variables): Removed.
12065         (Report_Unused_Variables): Removed.
12067 2014-02-19  Thomas Quinot  <quinot@adacore.com>
12069         * gnat_rm.texi (pragma Stream_Convert): Minor rewording.
12071 2014-02-19  Robert Dewar  <dewar@adacore.com>
12073         * sem_util.adb, sem_util.ads, prj-conf.adb, s-os_lib.adb: Minor
12074         reformatting.
12076 2014-02-19  Vincent Celier  <celier@adacore.com>
12078         * prj-part.adb (Parse_Single_Project): Use the fully resolved
12079         project path, with all symbolic links resolved, to check if the
12080         same project is imported with a different unresolved path.
12081         * prj-tree.ads (Project_Name_And_Node): Component Canonical_Path
12082         changed to Resolved_Path to reflect that all symbolic links
12083         are resolved.
12085 2014-02-19  Ed Schonberg  <schonberg@adacore.com>
12087         * sem_util.ads, sem_util.adb (Get_Cursor_Type): Moved to sem_util
12088         from sem_ch13, for use elsewhere.
12089         * sem_ch13.adb (Get_Cursor_Type): Moved to sem_util.
12090         * sem_ch5.adb (Analyze_Iterator_Specification): Set properly the
12091         cursor type on the loop variable when the iteration is over o
12092         formal container.
12094 2014-02-19  Vincent Celier  <celier@adacore.com>
12096         * prj-conf.adb (Add_Default_GNAT_Naming_Scheme): Add declaration
12097         for an empty Target (Check_Target): Never fail when an empty
12098         target is declared in the configuration project.
12100 2014-02-19  Ed Schonberg  <schonberg@adacore.com>
12102         * sem_prag.adb (Check_Arg_Is_Local_Name): Argument is local if
12103         the pragma comes fron a predicate aspect and the context is a
12104         record declaration within the scope that declares the type.
12106 2014-02-19  Robert Dewar  <dewar@adacore.com>
12108         * gnat_rm.texi: Minor clarifications.
12109         * expander.adb, sem_aggr.adb: Add comments.
12111 2014-02-19  Ed Schonberg  <schonberg@adacore.com>
12113         * sem_prag.adb (Check_Arg_Is_Local_Name): For an aspect that
12114         applies to a subprogram body, the name is the current scope,
12115         rather than being declared in the current scope.
12116         (Analyze_Pragma, case No_Return): Handle properly a No_Return
12117         aspect applied to a subprogram body.
12119 2014-02-19  Ed Schonberg  <schonberg@adacore.com>
12121         * sem_ch13.adb (Resolve_Iterable_Operation): Improve resolution
12122         of overloaded subprograms, and fix bug in handling of primitive
12123         operation Element.
12125 2014-02-19  Pascal Obry  <obry@adacore.com>
12127         * s-os_lib.adb: Minor reformatting.
12129 2014-02-19  Yannick Moy  <moy@adacore.com>
12131         * expander.adb (Expand): Do nothing inside generics.
12132         * sem_aggr.adb (Aggregate_Constraint_Checks): Do nothing inside
12133         generics.
12135 2014-02-19  Yannick Moy  <moy@adacore.com>
12137         * exp_ch2.adb: Remove useless 'with' of unit Uintp.
12139 2014-02-19  Robert Dewar  <dewar@adacore.com>
12141         * sem_ch3.adb, style.adb, sem_prag.adb, sem_ch13.adb: Minor reformatting
12142         * a-sequio.adb: Remove useless pragma Extensions_Allowed (no
12143         longer needed).
12145 2014-02-19  Claire Dross  <dross@adacore.com>
12147         * a-cfdlli.ads, a-cfhase.ads, a-cforma.ads, a-cfhama.ads,
12148         a-cforse.ads, a-cofove.ads: Add Iterable aspect to formal containers.
12150 2014-02-19  Hristian Kirtchev  <kirtchev@adacore.com>
12152         * sem_ch3.adb (Analyze_Declarations): Analyze
12153         a package contract at the end of the private declarations (if
12154         applicable), otherwise analyze it and the end of the visible
12155         declarations.
12157 2014-02-19  Ed Schonberg  <schonberg@adacore.com>
12159         * style.adb (Missing_Overriding): If subprogram is an
12160         instantiation, place warning on the instance node itself,
12161         without mention of the original generic. Do not emit message
12162         if explicit Ada version is older than the introduction of the
12163         overriding indicator.
12165 2014-02-19  Yannick Moy  <moy@adacore.com>
12167         * gnat_rm.texi: Doc clarifications.
12169 2014-02-19  Yannick Moy  <moy@adacore.com>
12171         * exp_util.adb (Remove_Side_Effects): Do not remove side-effects
12172         inside a generic.
12174 2014-02-19  Ed Schonberg  <schonberg@adacore.com>
12176         * sem_ch13.adb (Get_Cursor_Type): Obtain cursor type from
12177         specified First primitive, rather than by name.
12178         (Validate_Iterable_Aspect, Resolve_Iterable_Operation): Use it,
12179         and extend error checking for missing primitives and incorrect
12180         signatures.
12182 2014-02-19  Ed Schonberg  <schonberg@adacore.com>
12184         * sem_ch3.adb (Check_Pragma_Implemented): Detect additional
12185         errors when a Synchronization aspect on an overriding protected
12186         operation does not match the given aspect on the overridden
12187         operation of an ancestor interface.
12189 2014-02-19  Hristian Kirtchev  <kirtchev@adacore.com>
12191         * sem_prag.adb (Check_Loop_Pragma_Grouping): New routine.
12192         (Check_Loop_Pragma_Placement): Update
12193         comment on usage. Remove local variables Orig_Stmt and
12194         Within_Same_Sequence. Check that the current Loop_Invariant or
12195         Loop_Variant pragma is grouped together with other such pragmas.
12196         (Is_Loop_Pragma): New routine.
12197         (Prev_In_Loop): Removed.
12199 2014-02-19  Robert Dewar  <dewar@adacore.com>
12201         * par-ch6.adb (P_Return): For extended return, end column lines
12202         up with RETURN.
12203         * par.adb: Minor documentation clarification.
12205 2014-02-19  Yannick Moy  <moy@adacore.com>
12207         * sem_prag.adb (Check_Loop_Pragma_Placement): Add check
12208         that Loop_Invariant and Loop_Variant appear consecutively.
12209         * gnat_rm.texi Update documentation of Loop_Invariant and
12210         Loop_Variant pragmas.
12212 2014-02-19  Robert Dewar  <dewar@adacore.com>
12214         * debug.adb: Document -gnatd.X.
12215         * par-ch5.adb (P_If_Statement): Always check THEN, even if not
12216         first token
12217         (Check_Then_Column): Ditto.
12218         * styleg.adb (Check_Then): Allow THEN on line after IF.
12219         (Check_Then): Check THEN placement under control of -gnatd.X
12220         * styleg.ads (Check_Then): Now called even if THEN is not first
12221         token on line.
12222         * stylesw.ads (Style_Check_If_Then_Layout): Document new
12223         relaxed rules.
12224         * gnat_ugn.texi: For -gnatyi, THEN can now be on line after IF.
12226 2014-02-19  Robert Dewar  <dewar@adacore.com>
12228         * a-cfhama.adb, a-cfhase.adb, a-cforse.adb, a-cofove.adb, a-ngcefu.adb,
12229         a-teioed.adb, a-wtedit.adb, a-ztedit.adb, exp_ch5.adb, inline.adb,
12230         prj-pp.adb, prj-tree.adb, sem_ch12.adb, sem_ch8.adb,
12231         vms_conv.adb: Fix bad layout of IF statements
12233 2014-02-19  Robert Dewar  <dewar@adacore.com>
12235         * exp_util.adb (Side_Effect_Free): Scalar if expressions can be SEF.
12237 2014-02-19  Robert Dewar  <dewar@adacore.com>
12239         * exp_util.adb: Update comments.
12241 2014-02-19  Doug Rupp  <rupp@adacore.com>
12243         * bindgen.adb (Gen_Adainit) [VMS] New global Float_Format.
12244         * init.c (__gl_float_format): [VMS] New global.
12245         (__gnat_set_features): Call FP_CONTROL to set FPSR for the float
12246         representation in effect.
12248 2014-02-19  Hristian Kirtchev  <kirtchev@adacore.com>
12250         * exp_ch6.adb Add with and use clause for Exp_Prag.
12251         (Expand_Contract_Cases): Relocated to Exp_Prag.
12252         * exp_ch6.ads (Expand_Contract_Cases): Relocated to Exp_Prag.
12253         * exp_prag.adb Add with and use clauses for Checks and Validsw.
12254         (Expand_Contract_Cases): Relocated from Exp_Ch6. Update the
12255         structure of the expanded code to showcase the evaluation of
12256         attribute 'Old prefixes. Add local variable Old_Evals. Expand
12257         any attribute 'Old references found within a consequence. Add
12258         circuitry to evaluate the prefixes of attribute 'Old that
12259         belong to a selected consequence.
12260         (Expand_Old_In_Consequence): New routine.
12261         * exp_prag.ads (Expand_Contract_Cases): Relocated from Exp_Ch6.
12262         * sem_attr.adb (Check_Use_In_Contract_Cases): Warn that a
12263         potentially unevaluated prefix is always evaluated.
12265 2014-02-19  Robert Dewar  <dewar@adacore.com>
12267         * exp_attr.adb (Expand_Min_Max_Attribute): Use Insert_Declaration
12268         (Expand_Min_Max_Attribute): Use Matching_Standard_Type.
12269         * exp_ch4.adb (Expand_N_Expression_With_Actions): Remove special
12270         handling for the case of Modify_Tree_For_C, this approach did
12271         not work.
12272         * exp_util.adb (Matching_Standard_Type): New function
12273         (Side_Effect_Free): New top level functions (from
12274         Remove_Side_Effects).
12275         * exp_util.ads (Side_Effect_Free): New top level functions
12276         (moved from body).
12277         * sinfo.ads: Minor comment updates.
12279 2014-02-19  Ed Schonberg  <schonberg@adacore.com>
12281         * exp_ch6.adb (Expand_Simple_Function_Return): If return
12282         type is unconstrained and uses the secondary stack, mark the
12283         enclosing function accordingly, to ensure that the value is not
12284         prematurely removed.
12286 2014-02-19  Hristian Kirtchev  <kirtchev@adacore.com>
12288         * par.adb Alphabetize the routines in Par.Sync.
12289         (Resync_Past_Malformed_Aspect): New routine.
12290         * par-ch13.adb (Get_Aspect_Specifications): Alphabetize local
12291         variables. Code and comment reformatting. Detect missing
12292         parentheses on aspects [Refined_]Global and [Refined_]Depends
12293         with a non-null definition.
12294         * par-sync.adb: Alphabetize all routines in this separate unit.
12295         (Resync_Past_Malformed_Aspect): New routine.
12297 2014-02-19  Robert Dewar  <dewar@adacore.com>
12299         * sem_eval.ads, sem_eval.adb (Subtypes_Statically_Match): Return False
12300         if Esize values do not match.
12302 2014-02-19  Yannick Moy  <moy@adacore.com>
12304         * sinfo.ads: Minor comment update.
12306 2014-02-19  Hristian Kirtchev  <kirtchev@adacore.com>
12308         * atree.ads: Minor reformatting (change Entity_Info to Einfo).
12310 2014-02-19  Thomas Quinot  <quinot@adacore.com>
12312         * exp_ch7.adb (Find_Node_To_Be_Wrapped): An assignment statement
12313         that has the No_Ctrl_Actions flag is a suitable node to be
12314         wrapped if the assigned expression has no finalization actions.
12315         * sem_eval.adb (Eval_Entity_Name): For a compile time known
12316         boolean value, mark the corresponding condition SCO as constant.
12318 2014-02-19  Robert Dewar  <dewar@adacore.com>
12320         * exp_util.adb: Minor reformatting.
12321         * exp_util.ads (Matching_Standard_Type): New function.
12322         * exp_ch7.adb: Minor reformatting.
12324 2014-02-19  Ed Schonberg  <schonberg@adacore.com>
12326         * sem_ch13.adb (Get_Cursor_Type): Use scope of iterable type
12327         to find declaration for Cursor, to handle properly the case of
12328         a discriminated iterable type.
12330 2014-02-19  Vincent Celier  <celier@adacore.com>
12332         * gnatcmd.adb (GNATCmd): Always replace the object dirs of
12333         imported library projects with the library ALI dirs, when setting
12334         the object paths.
12335         * prj-env.ads (Ada_Objects_Path): Correct comments about
12336         argument Including_Libraries.
12338 2014-02-19  Gary Dismukes  <dismukes@adacore.com>
12340         * gnat_rm.texi: Minor spelling fixes.
12342 2014-02-19  Doug Rupp  <rupp@adacore.com>
12344         * init.c: Remove unneeded code.
12345         * fe.h (Float_Format): New macro
12346         * gcc-interface/trans.c (gigi): On VMS, set vms_float_format.
12348 2014-02-19  Hristian Kirtchev  <kirtchev@adacore.com>
12350         * sem_prag.adb (Check_Refined_Global_Item):
12351         A state or variable acts as a constituent only it is part of an
12352         encapsulating state and the state has visible refinement.
12354 2014-02-19  Ed Schonberg  <schonberg@adacore.com>
12356         * sem_ch6.adb (Analyze_Subprogram_Contract): Do not warn on a
12357         postcondition for a function when the expression does not mention
12358         'Result but the function has in-out parameters.
12360 2014-02-19  Robert Dewar  <dewar@adacore.com>
12362         * gnat_rm.texi: Add documentation on Value_Size forcing biased
12363         representation.
12365 2014-02-19  Hristian Kirtchev  <kirtchev@adacore.com>
12367         * lib-xref.ads Remove the small table of letter and symbol usage as we
12368         already have one.
12370 2014-02-19  Hristian Kirtchev  <kirtchev@adacore.com>
12372         * sem_ch6.adb (Analyze_Subprogram_Body_Helper): Emit specific error
12373         messages depending on the offending misplaced aspect specifications.
12374         (Diagnose_Misplaced_Aspect_Specifications): New routine.
12376 2014-02-19  Ed Schonberg  <schonberg@adacore.com>
12378         * sem_ch13.adb (Get_Cursor): Utility to retrieve cursor type
12379         for iterable aspect primitives.
12380         (Resolve_Iterable_Operation): Use expected signature of iterable
12381         aspect to resolve primitive when overloading is present.
12382         (Validate_Iterable_Aspect, Analyze_Aspects_At_Freeze_Point): use it.
12383         (Check_Signature): Removed.
12385 2014-02-19  Yannick Moy  <moy@adacore.com>
12387         * sem_ch10.adb (Analyze_Proper_Body): Issue error on missing
12388         subunit in GNATprove_Mode.
12389         * sinfo.ads (GNATprove_Mode): Document error issued in GNATprove_Mode.
12391 2014-02-19  Hristian Kirtchev  <kirtchev@adacore.com>
12393         * lib-xref.ads Alphabetize the contents of table
12394         Xref_Entity_Letters. Add an entry in table Xref_Entity_Letters
12395         for E_Abstract_State. List all letters and symbols in use.
12396         * sem_prag.adb (Analyze_Abstract_State): Update all calls
12397         to Create_Abstract_State to reflect the new signature.
12398         (Create_Abstract_State): Change subprogram profile and update
12399         the comment on usage. Use the proper location of the state
12400         declaration when creating a new abstract state entity. Do not
12401         generate an external name, but simply reuse the name coming from
12402         the state declaration.
12404 2014-02-19  Robert Dewar  <dewar@adacore.com>
12406         * exp_ch4.adb (Expand_N_Expression_With_Actions): Make sure
12407         declarations get properly inserted in Modify_Tree_For_C mode.
12408         * sinfo.ads: Minor comment addition.
12410 2014-02-19  Robert Dewar  <dewar@adacore.com>
12412         * par-ch9.adb, exp_ch5.adb, sem_ch5.adb, exp_attr.adb, sem_util.adb,
12413         sem_util.ads, sem_ch13.adb, sem_ch13.ads: Minor reformatting.
12415 2014-02-19  Ed Schonberg  <schonberg@adacore.com>
12417         * style.adb (Missing_Overriding): Warning does not apply in
12418         language versions prior to Ada 2005.
12419         * snames.ads-tmpl: Add Name_Iterable and Attribute_Iterable.
12420         * sem_attr.adb: Add Attribute_Iterable where needed.
12421         * exp_attr.adb: ditto.
12422         * exp_ch5.adb (Expand_Formal_Container_Loop): New procedure to
12423         handle loops and quantified expressions over types that have an
12424         iterable aspect.  Called from Expand_Iterator_Loop.
12425         * sem_ch5.adb (Analyze_Iterator_Specification): Recognize types
12426         with Iterable aspect.
12427         * sem_ch13.adb (Validate_Iterable_Aspect): Verify that the
12428         subprograms specified in the Iterable aspect have the proper
12429         signature involving container and cursor.
12430         (Check_Aspect_At_Freeze_Point): Analyze value of iterable aspect.
12431         * sem_ch13.ads (Validate_Iterable_Aspect): New subprogram.
12432         * sem_util.ads, sem_util.adb (Get_Iterable_Type_Primitive):
12433         New procedure to retrieve one of the primitives First, Last,
12434         or Has_Element, from the value of the iterable aspect of a
12435         formal container.
12436         (Is_Container_Element): Predicate to recognize expressions
12437         that denote an element of one of the predefined containers,
12438         for possible optimization.  This subprogram is not currently
12439         used, pending ARG discussions on the legality of the proposed
12440         optimization. Worth preserving for eventual use.
12441         (Is_Iterator): Recognize formal container types.
12442         * aspects.ads, aspects.adb: Add Aspect_Iterable where needed.
12444 2014-02-19  Robert Dewar  <dewar@adacore.com>
12446         * exp_attr.adb (Expand_Min_Max_Attribute): New procedure
12447         (Expand_N_Attribute_Reference): Use this procedure for Min and Max.
12448         * exp_ch4.adb (Expand_N_Expression_With_Actions): Remove object
12449         declarations from list of actions.
12450         * output.ads, output.adb (Delete_Last_Char): New procedure.
12451         * sinfo.ads: Document handling of Mod and expression with actions
12452         in Modify_Tree_For_C mode.
12454 2014-02-19  Ed Schonberg  <schonberg@adacore.com>
12456         * par-ch9.adb (P_Task): Add a null statement to produce a
12457         well-formed task body when due to a previous syntax error the
12458         statement list is empty.
12460 2014-02-19  Hristian Kirtchev  <kirtchev@adacore.com>
12462         * sem_prag.adb (Check_Dependency_Clause): Account
12463         for the case where a state with a non-null refinement matches a
12464         null output list. Comment reformatting.
12465         (Inputs_Match): Copy a solitary input to avoid an assertion failure
12466         when trying to match the same input in multiple clauses.
12468 2014-02-19  Gary Dismukes  <dismukes@adacore.com>
12470         * sem_attr.adb: Minor typo fix.
12472 2014-02-18  Robert Dewar  <dewar@adacore.com>
12474         * cstand.adb (Build_Signed_Integer_Type): Minor change of formal
12475         from Int to Nat (Build_Unsigned_Integer_Type): New procedure
12476         (Create_Standard): Create new unsigned types.
12477         * exp_ch4.adb (Expand_N_Op_Mod): Expand mod in Modify_Tree_For_C
12478         mode (Expand_N_Reference): Removed, problematic and not needed
12479         for now.
12480         * exp_ch4.ads (Expand_N_Reference): Removed, problematic and
12481         not needed for now.
12482         * exp_util.ads, exp_util.adb (Power_Of_Two): New function.
12483         * expander.adb: Remove call to Expand_N_Reference (problematic,
12484         and not needed now).
12485         * sem_aux.ads, sem_aux.adb (Corresponding_Unsigned_Type): New function.
12486         * stand.adb: Read and write unsigned type entities.
12487         * stand.ads: Add new unsigned types.
12489 2014-02-18  Hristian Kirtchev  <kirtchev@adacore.com>
12491         * sem_ch4.adb (Analyze_Call): Do not mark a function call
12492         as being inside an assertion expression as the flag is now removed.
12493         (Check_Ghost_Subprogram_Call): Do not query the
12494         In_Assertion_Expression flag as it is now removed, instead use
12495         a predicate function.
12496         * sem_elab.adb (Check_Internal_Call_Continue): Do not query the
12497         In_Assertion_Expression flag as it is now removed, instead use
12498         a predicate function.
12499         * sem_prag.ads: Add new table Assertion_Expression_Pragma.
12500         * sem_util.adb Add with and use clause for Sem_Prag.
12501         (In_Assertion_Expression_Pragma): New routine.
12502         * sem_util.ads (In_Assertion_Expression_Pragma): New routine.
12503         * sinfo.adb (In_Assertion_Expression): Removed.
12504         (Set_In_Assertion_Expression): Removed.
12505         * sinfo.ads Remove flag In_Assertion_Expression along with its
12506         use in nodes.
12507         (In_Assertion_Expression): Removed along with
12508         pragma Inline.  (Set_In_Assertion_Expression): Removed along
12509         with pragma Inline.
12511 2014-02-18  Sergey Rybin  <rybin@adacore.com frybin>
12513         * gnat_ugn.texi: gnatpp section: add note that '-j' cannot be
12514         used together with '-r', '-rf' or '-rnb' options.
12516 2014-02-18  Hristian Kirtchev  <kirtchev@adacore.com>
12518         * sem_attr.adb (Analyze_Attribute): Comment
12519         and code reformatting. Use separate routines to check the
12520         legality of attribute 'Old in certain pragmas. Verify
12521         the use of 'Old, 'Result and locally declared entities
12522         within the prefix of 'Old.
12523         (Check_References_In_Prefix): New routine.
12524         (Check_Use_In_Contract_Cases): New routine.
12525         (Check_Use_In_Test_Case): New routine.
12527 2014-02-18  Vincent Celier  <celier@adacore.com>
12529         * sem_aux.adb (Is_By_Reference_Type): For each components of
12530         a record type, check also if the component is volatile as it
12531         may have an aspect that makes it volatile. If it is, then the
12532         record type is a by reference type.
12534 2014-02-18  Robert Dewar  <dewar@adacore.com>
12536         * exp_attr.adb: Minor reformatting.
12537         * exp_ch4.ads, exp_ch4.adb (Expand_N_Reference): New procedure.
12538         * exp_util.adb (Remove_Side_Effects): Add conditional expressions
12539         as another case where we don't generate N_Reference nodes for
12540         primitive types.
12541         * expander.adb (Expand): Add call to Expand_N_Reference.
12543 2014-02-06  Hristian Kirtchev  <kirtchev@adacore.com>
12545         * sem_prag.adb (Analyze_Refined_Pragma): Remove
12546         local variable Pack_Spec. Refinement pragmas may now apply to
12547         bodies of both visible and private subprograms.
12549 2014-02-06  Robert Dewar  <dewar@adacore.com>
12551         * exp_attr.adb (Expand_Loop_Entry_Attribute):
12552         Minor change (Attr => N) (Expand_Pred_Succ): New name
12553         Expand_Pred_Succ_Attribute (Expand_N_Attribute_Reference, case
12554         Max): Expand into if expression if Modify_Tree_For_C mode.
12555         (Expand_N_Attribute_Reference, case Min): ditto
12556         * sinfo.ads: Modify_Tree_For_C takes care of expanding Min and
12557         Max attributes.
12559 2014-02-06  Ed Schonberg  <schonberg@adacore.com>
12561         * sem_ch3.adb (Analyze_Object_Declaration): Do not generate
12562         predicate check if this is an internal declaration with
12563         No_Initialization set, as for an expanded aggregate component.
12565 2014-02-06  Doug Rupp  <rupp@adacore.com>
12567         * init.c (__gnat_default_resignal_p) [VMS]: Test for and resignal
12568         conditions with severity of "SUCCESS" or "INFORMATIONAL".
12570 2014-02-06  Yannick Moy  <moy@adacore.com>
12572         * sem_prag.adb (Analyze_Pragma): Analyze pragma
12573         Debug rewritten node before rewriting it as a null statement in
12574         GNATprove mode.
12576 2014-02-06  Robert Dewar  <dewar@adacore.com>
12578         * sem_attr.adb (Min_Max): New procedure.
12579         (Max_Alignment_For_Allocation_Max_Size_In_Storage_Elements): New
12580         procedure.
12582 2014-02-06  Sergey Rybin  <rybin@adacore.com frybin>
12584         * gnat_ugn.texi, vms_data.ads: Add documentation of '-t' option for
12585         gnatmetric/gnatpp.
12587 2014-02-06  Hristian Kirtchev  <kirtchev@adacore.com>
12589         * sem_prag.adb (Analyze_Abstract_State): Update
12590         all calls to Create_Abstract_State to pass the proper state
12591         "declaration".
12592         (Create_Abstract_State): Add new formal parameter
12593         State_Decl along with comment on usage. Establish a link between
12594         the abstract state entity and the state declaration.
12596 2014-02-06  Robert Dewar  <dewar@adacore.com>
12598         * sem_attr.adb (Analyze_Attribute, case Max): Check for improper
12599         comparison of unordered enumeration type.
12600         (Analyze_Attribute, case Max): Check for improper comparison of
12601         unordered enumeration type.
12602         * sem_res.adb (Bad_Unordered_Enumeration_Reference): Moved to
12603         sem_util.adb.
12604         * sem_util.ads, sem_util.adb (Bad_Unordered_Enumeration_Reference):
12605         Moved here from Sem_Res.
12607 2014-02-06  Robert Dewar  <dewar@adacore.com>
12609         * sem_ch3.adb, sem_prag.adb, sem_res.adb, lib-xref.adb: Minor
12610         reformatting.
12612 2014-02-06  Hristian Kirtchev  <kirtchev@adacore.com>
12614         * sem_ch6.adb (Process_Formals): Error message reformatting.
12616 2014-02-06  Hristian Kirtchev  <kirtchev@adacore.com>
12618         * sem_ch3.adb (Handle_Late_Controlled_Primitive): Add local
12619         variable Spec. Do not inherit the null indicator from the
12620         subprogram body when generating the spec.
12622 2014-02-06  Robert Dewar  <dewar@adacore.com>
12624         * casing.adb (Determine_Casing): Consider SPARK_Mode to be
12625         mixed case.
12627 2014-02-06  Ed Schonberg  <schonberg@adacore.com>
12629         * exp_ch6.adb (Is_Build_In_Place_Function): Predicate is false
12630         when the function has a foreign convention, but not if only the
12631         limited return type has such a convention.
12633 2014-02-06  Hristian Kirtchev  <kirtchev@adacore.com>
12635         * sem_ch3.adb (Handle_Late_Controlled_Primitive): Remove local
12636         variable Spec. Comment reformatting. Use Copy_Separate_Tree
12637         rather than New_Copy_Tree when building the corresponding
12638         subprogram declaration.
12640 2014-02-06  Hristian Kirtchev  <kirtchev@adacore.com>
12642         * sem_prag.adb (Analyze_Global_Item): Remove
12643         the mode-related checks on abstract states with enabled external
12644         properties.
12645         (Property_Error): Removed.
12647 2014-02-06  Javier Miranda  <miranda@adacore.com>
12649         * lib-xref.adb (Generate_Reference): When
12650         generating the reference to the first private entity take care
12651         of handling swapped entities.
12653 2014-02-06  Sergey Rybin  <rybin@adacore.com frybin>
12655         * gnat_ugn.texi, vms_data.ads: Add documentation of -j option for
12656         gnatmetric.
12658 2014-02-06  Robert Dewar  <dewar@adacore.com>
12660         * exp_ch4.adb (Expand_N_Shift_Left): Handle shift counts greater
12661         than the word size when operating in Modify_Tree_For_C mode.
12662         * sinfo.ads: Add documentation section on Modify_Tree_For_C mode.
12664 2014-02-06  Robert Dewar  <dewar@adacore.com>
12666         * erroutc.adb (Warning_Specifically_Suppressed.Matches):
12667         compare is case insensitive.
12668         * gnat_rm.texi: Document that string compare for Warnings Off
12669         is now case insensitive.
12671 2014-02-06  Eric Botcazou  <ebotcazou@adacore.com>
12673         * gnat_rm.texi: Small wording tweak.
12675 2014-02-06  Pascal Obry  <obry@adacore.com>
12677         * prj-attr.adb, projects.texi, snames.ads-tmpl: Add Included_Patterns
12678         and Included_Artifact_Patterns attribute definitions.
12680 2014-02-06  Yannick Moy  <moy@adacore.com>
12682         * sem_ch6.adb (Analyze_Subprogram_Body_Helper): Set
12683         SPARK_Mode pragma component for all subprograms, including stubs.
12685 2014-02-06  Hristian Kirtchev  <kirtchev@adacore.com>
12687         * sem_ch10.adb (Analyze_Package_Body_Stub): Maintain
12688         the configuration options of the enclosing context in a
12689         stack-like fasion.
12690         (Analyze_Subprogram_Body_Stub): Maintain the
12691         configuration options of the enclosing context in a stack-like
12692         fashion.
12694 2014-02-06  Robert Dewar  <dewar@adacore.com>
12696         * debug.adb: -gnatd.u sets Modify_Tree_For C
12697         * exp_ch4.adb (Expand_N_Op_Rotate_Left): Expand out
12698         if Modify_Tree_For_C (Expand_N_Op_Rotate_Right): ditto.
12699         (Expand_N_Op_Arithmetic_Right_Shift): ditto.
12700         * exp_intr.adb (Expand_Shift): Call expander so we do
12701         Modify_Tree_For_C expansions.
12702         * gnat1drv.adb (Adjust_Global_Switches): Set Modify_Tree_For_C
12703         if -gnatd.u set.
12705 2014-02-06  Fedor Rybin  <frybin@adacore.com>
12707         * prj-proc.ads (Tree_Loaded_Callback): new type Callback used
12708         after the phase 1 of the processing of each aggregated project
12709         to get access to project trees of aggregated projects.
12710         (Process_Project_Tree_Phase_1): new parameter On_New_Tree_Loaded
12711         If specified, On_New_Tree_Loaded is called after each aggregated
12712         project has been processed succesfully.
12713         (Process): new parameter On_New_Tree_Loaded.
12714         * prj-proc.adb (Process_Aggregated_Projects): On_New_Tree_Loaded
12715         callback added after processing of each aggregated project.
12716         (Recursive_Process): new parameter On_New_Tree_Loaded.
12717         (Process): new parameter On_New_Tree_Loaded.
12718         (Process_Project_Tree_Phase_1): new parameter On_New_Tree_Loaded.
12719         * prj-conf.ads (Parse_Project_And_Apply_Config): new parameter
12720         On_New_Tree_Loaded.
12721         * prj-conf.adb (Parse_Project_And_Apply_Config): new parameter
12722         On_New_Tree_Loaded.
12724 2014-02-06  Bob Duff  <duff@adacore.com>
12726         * gnat_ugn.texi: Implement --insert-blank-lines and
12727         --preserve-blank-lines switches.
12729 2014-02-06  Sergey Rybin  <rybin@adacore.com frybin>
12731         * gnat_ugn.texi, vms_data.ads: Add documentation of -j option for
12732         gnatelim.
12734 2014-02-06  Eric Botcazou  <ebotcazou@adacore.com>
12736         * gnat_rm.texi (Pragma Optimize_Alignment): Document the effect
12737         of the pragma on individual objects.
12739 2014-02-06  Hristian Kirtchev  <kirtchev@adacore.com>
12741         * einfo.adb Node29 is now used as BIP_Initialization_Call.
12742         (BIP_Initialization_Call): New routine.
12743         (Set_BIP_Initialization_Call): New routine.
12744         (Write_Field29_Name): Add an entry for constants and variables.
12745         * einfo.ads Add new attribute BIP_Initialization_Call and update
12746         its usage in nodes.
12747         (BIP_Initialization_Call): New routine along with pragma Inline.
12748         (Set_BIP_Initialization_Call): New routine along with pragma Inline.
12749         * exp_ch6.adb (Make_Build_In_Place_Call_In_Object_Declaration):
12750         Add local declaration Res_Decl. Capture the build-in-place
12751         initialization call when the related object declaration has
12752         created a transient block.
12753         * exp_ch7.adb (Process_Transient_Objects): Add local variable
12754         Fin_Insrt. Recognize a scenario where an object declaration acts
12755         as a transient context and is initialized by a build-in-place
12756         function call.
12758 2014-02-06  Pascal Obry  <obry@adacore.com>
12760         * prj-util.adb (For_Interface_Sources): Fix handling of required
12761         bodies for aggregate libs.
12763 2014-02-06  Robert Dewar  <dewar@adacore.com>
12765         * nlists.ads: Minor comment clarifications.
12767 2014-02-06  Robert Dewar  <dewar@adacore.com>
12769         * gnat1drv.adb (Adjust_Global_Switches): Set Modify_Tree_For_C
12770         if gnatd.V set.
12771         * opt.ads (Modify_Tree_For_C): New flag.
12772         * output.ads, output.adb (Last_Char): New function.
12774 2014-02-06  Pascal Obry  <obry@adacore.com>
12776         * projects.texi, prj-env.adb (Initialize_Default_Project_Path): Add
12777         share/gpr for cross-builds.
12779 2014-02-06  Robert Dewar  <dewar@adacore.com>
12781         * exp_util.ads, checks.adb, sem_prag.adb, prj-util.adb, sem_ch13.adb:
12782         Minor reformatting and code clean ups.
12784 2014-02-06  Pascal Obry  <obry@adacore.com>
12786         * prj-util.adb (For_Interface_Sources): Skip non compilable languages.
12787         * prj.ads: Minor typo fix in comment.
12789 2014-02-06  Hristian Kirtchev  <kirtchev@adacore.com>
12791         * sem_prag.adb (Analyze_Depends_In_Decl_Part): Add
12792         local variable Expr. Flag clauses with extra parenthesis as this
12793         is not allowed by the syntax of the pragma. Code reformatting.
12795 2014-02-06  Hristian Kirtchev  <kirtchev@adacore.com>
12797         * exp_attr.adb (Expand_N_Attribute_Reference): Alphabetize
12798         variables. Rename variabme Tnn to Temp. Do not create a temporary
12799         if assertions are disabled. Find enclosing routine _Postconditions
12800         and insert the temporary that captures the value of the prefix
12801         before the routine.
12802         * exp_ch6.adb (Build_Postconditions_Procedure):
12803         Insert the generated _Postconditions routine
12804         before the first source declaration of the related
12805         subprogram.
12806         (Insert_After_Last_Declaration): Removed.
12807         (Insert_Before_First_Source_Declaration): New routine.
12809 2014-02-06  Ed Schonberg  <schonberg@adacore.com>
12811         * exp_util.adb, exp_util.ads (Within_Internal_Subprogram):
12812         Utility to determine whether current expansion is for the body
12813         of a predefined primitive operation.
12814         (Make_Predicate_Check): Use Within_Internal_Subpgram
12815         * checks.adb (Apply_Predicate_Check): Use
12816         Within_Internal_Subprogram
12817         * sem_ch13.adb (Freeze_Entity_Checks): Ditto.
12819 2014-02-06  Pascal Obry  <obry@adacore.com>
12821         * prj.ads, prj-util.adb: Minor reformatting.
12823 2014-02-06  Ed Schonberg  <schonberg@adacore.com>
12825         * exp_ch6.adb (Expand_Subprogram_Contract, Append_Enabled_Item):
12826         Take into account the Split_PPC flag to ensure that conjuncts
12827         in a composite postcondition aspect are tested in source order.
12829 2014-02-06  Hristian Kirtchev  <kirtchev@adacore.com>
12831         * sem_ch6.adb (Analyze_Generic_Subprogram_Body): Flag illegal
12832         use of SPARK_Mode.
12833         * sem_ch12.adb (Analyze_Generic_Subprogram_Declaration): Flag
12834         illegal use of SPARK_Mode.
12835         (Instantiate_Subprogram_Body): Flag illegal use of SPARK_Mode.
12836         * sem_prag.adb (Analyze_Pragma): Code reformatting.
12837         * sem_util.adb Add with and use clause for Aspects.
12838         (Check_SPARK_Mode_In_Generic): New routine.
12839         * sem_util.ads (Check_SPARK_Mode_In_Generic): New routine.
12841 2014-02-06  Thomas Quinot  <quinot@adacore.com>
12843         * a-calend.adb (Formatting_Operations.Split): Ensure that
12844         Time_Error is raised for invalid time values.
12846 2014-02-06  Arnaud Charlet  <charlet@adacore.com>
12848         * sem_prag.adb (Analyze_Pragma): Rewrite as a null statement
12849         in GNATprove_Mode.
12851 2014-02-06  Robert Dewar  <dewar@adacore.com>
12853         * einfo.ads, einfo.adb (Is_Discriminant_Check_Function): New flag.
12854         * exp_ch3.adb (Build_Dcheck_Function): Set
12855         Is_Discriminant_Check_Function.
12857 2014-02-06  Hristian Kirtchev  <kirtchev@adacore.com>
12859         * exp_ch7.adb (Is_Subprogram_Call): Inspect
12860         the original tree in certain cases where a construct has been
12861         factored out and replaced by a reference to a temporary.
12863 2014-02-06  Ed Schonberg  <schonberg@adacore.com>
12865         * sem_ch3.adb (Process_Full_View): Fix typo in the order of
12866         parameters when propagating predicate function to full view.
12867         (Find_Type_Of_Object): Freeze base type of object type to catch
12868         premature use of discriminated private type without a full view.
12870 2014-02-06  Robert Dewar  <dewar@adacore.com>
12872         * sprint.adb: Minor reformatting.
12874 2014-02-06  Hristian Kirtchev  <kirtchev@adacore.com>
12876         * exp_ch4.adb (Process_Transient_Object): Add local variable
12877         Temp_Ins. When the transient object is initialized by an
12878         aggregate, the hook must capture the object after the last
12879         component assignment takes place.
12880         * exp_ch7.adb (Detect_Subprogram_Call): Expose the subprogram to
12881         routine Is_Subprogram_Call.
12882         (Is_Subprogram_Call): Inspect an
12883         aggregate that has been heavily expanded for subprogram calls.
12884         (Process_Transient_Objects): Add local variables Expr, Ptr_Id
12885         and Temp_Ins.  Remove the nested declare block and adjust the
12886         indentation. When the transient object is initialized by an
12887         aggregate, the hook must capture the object after the last
12888         component assignment takes place.
12890 2014-02-06  Hristian Kirtchev  <kirtchev@adacore.com>
12892         * sem_prag.adb (Analyze_Global_Item): Detect illegal uses of
12893         external states with enabled properties that do not match the
12894         global mode.
12895         (Property_Error): New routine.
12896         * sem_res.adb (Property_Error): New routine.
12897         (Resolve_Actuals): Detect illegal uses of external variables with
12898         enabled properties in procedure calls that do not match the mode of
12899         the corresponding formal parameter.
12901 2014-02-06  Hristian Kirtchev  <kirtchev@adacore.com>
12903         * sem_util.adb (Has_Enabled_Property): Rename
12904         formal parameter Prop_Nam to Property. Update the comment on usage
12905         and all occurrences in the body. Add local variable Prop_Nam. When
12906         inspecting a property with an expression, the property name
12907         appears as the first choice of the component association.
12909 2014-02-04  Robert Dewar  <dewar@adacore.com>
12911         * exp_ch5.adb, einfo.ads, freeze.adb, sem_ch8.adb: Minor reformatting.
12913 2014-02-04  Gary Dismukes  <dismukes@adacore.com>
12915         * sem_aggr.adb: Change "runtime" to "run time" in warning message,
12916         for consistency with other messages.
12918 2014-02-04  Ed Schonberg  <schonberg@adacore.com>
12920         * exp_ch5.adb  (Expand_Iterator_Loop):  For a container element
12921         iterator, indicate that the element is a constant if the container
12922         type does not have a variable indexing aspect.
12923         * sem_ch8.adb (Analyze_Object_Renaming): If the entity is already
12924         marked as constant, do not reset its Ekind, to ensure that
12925         container elements in an element loop are not modified if the
12926         container (e.g. a hashed set) only has a constant indexing aspect.
12928 2014-02-04  Arnaud Charlet  <charlet@adacore.com>
12930         * g-souinf.ads: Subprograms in this unit are actually not pure.
12931         * freeze.adb (Freeze_Subprogram): Do not reset Is_Pure for Intrinsics.
12932         * einfo.ads (Is_Pure): Update doc to match implementation.
12934 2014-02-04  Gary Dismukes  <dismukes@adacore.com>
12936         * exp_ch13.adb: Minor spelling fix.
12938 2014-02-04  Robert Dewar  <dewar@adacore.com>
12940         * opt.ads: Minor comment update.
12942 2014-02-04  Robert Dewar  <dewar@adacore.com>
12944         * exp_ch4.adb (Expand_N_Expression_With_Actions): Use Rewrite
12945         instead of Replace.
12947 2014-02-04  Ed Schonberg  <schonberg@adacore.com>
12949         * sem_aggr.adb (Resolve_Array_Aggregate): Suppress warnings
12950         on null expressions if component type is non-null, when the
12951         corresponding association covers an empty range of index values.
12953 2014-02-04  Robert Dewar  <dewar@adacore.com>
12955         * sinfo.ads: Further comments on N_Expression_With_Actions node.
12957 2014-02-04  Hristian Kirtchev  <kirtchev@adacore.com>
12959         * sem_prag.adb (Analyze_Refined_Depends_In_Decl_Part): Remove global
12960         variables Out_Items and Ref_Global. Remove local constant
12961         Body_Id along with dummy variables D1, D2, D3, D4, D5, D6, D7
12962         and D8. Remove the useless collection of global items as this
12963         was a leftover from an earlier version of the routine. Move
12964         several routines out to avoid deep nesting and indentation.
12965         (Inputs_Match): Add formal parameter Dep_Clause. Rename formal
12966         parameter Do_Checks to Post_Errors. Update the comment on usage.
12967         (Is_Matching_Input): Renamed to Input_Match. Add formal parameters
12968         Ref_Inputs and Do_Checks. Rename formal parameter Do_Checks
12969         to Post_Errors. Update the comment on usage. Account for the
12970         case where a self referential state may have a null input_list.
12971         (Is_Self_Referential): New routine.
12973 2014-02-04  Ed Schonberg  <schonberg@adacore.com>
12975         * sem_ch13.adb (Analyze_Attribute_Definition_Clause): If the
12976         entity renames an expression, as in the case of an object of
12977         an unconstrained type initialized by a function call, defer the
12978         rewriting of the expression to the expander.
12979         * exp_ch13.adb (Expand_N_Attribute_Definition_Clause, case
12980         'Alignment): If the entity renames an expression, introduce
12981         temporary to capture value, and rewrite original declaration to
12982         use temporary.
12984 2014-02-04  Gary Dismukes  <dismukes@adacore.com>
12986         * g-comlin.adb: Minor typo fix.
12988 2014-02-04  Ed Schonberg  <schonberg@adacore.com>
12990         * freeze.adb (Freeze_All): Types derived from a formal
12991         access_to_classwide type do not have a finalization master.
12993 2014-02-04  Robert Dewar  <dewar@adacore.com>
12995         * sprint.adb: Minor reformatting.
12997 2014-02-04  Robert Dewar  <dewar@adacore.com>
12999         * exp_ch4.adb (Expand_N_Expression_With_Actions): Eliminate
13000         cases where Actions is a null list.
13001         * sinfo.ads (N_Expression_With_Actions): Actions can be
13002         temporarily empty during semantic analysis, but must be non-empty
13003         in the final expanded tree.
13005 2014-01-31  Robert Dewar  <dewar@adacore.com>
13007         * exp_ch9.adb: Minor reformatting.
13009 2014-01-31  Emmanuel Briot  <briot@adacore.com>
13011         * g-comlin.adb (Set_Command_Line): Take the switches
13012         configuration from the Command_Line_Config.
13014 2014-01-31  Hristian Kirtchev  <kirtchev@adacore.com>
13016         * sem_prag.adb (Analyze_Refinement_Clause): Guard against a malformed
13017         refinement clause.
13019 2014-01-31  Vincent Celier  <celier@adacore.com>
13021         * projects.texi: Add more documentation about others used as an
13022         index in indexed attributes.
13024 2014-01-31  Robert Dewar  <dewar@adacore.com>
13026         * gnat_ugn.texi: Minor update.
13027         * gnat_rm.texi: Add example to Restriction_Warnings documentation.
13028         * exp_util.adb: Minor reformatting.
13030 2014-01-31  Ed Schonberg  <schonberg@adacore.com>
13032         * exp_ch9.adb (Expand_Entry_Barrier): Warn if the barrier
13033         depends on data that is not private to the protected object,
13034         and potentially modifiable in unsynchronized fashion.
13036 2014-01-31  Yannick Moy  <moy@adacore.com>
13038         * erroutc.adb (Validate_Specific_Warnings): Remove special case for
13039         GNATprove_Mode.
13041 2014-01-31  Robert Dewar  <dewar@adacore.com>
13043         * prj-attr.ads (First_Attribute_Of): Returns Empty_Attribute
13044         for Unknown_Package.
13045         * sem_ch6.adb, sem_attr.adb: Minor comment addition.
13047 2014-01-31  Hristian Kirtchev  <kirtchev@adacore.com>
13049         * exp_util.adb (Build_Allocate_Deallocate_Proc): Rewrite
13050         the logic that generates a runtime check to determine the
13051         controlled status of the object about to be allocated or
13052         deallocated. Class-wide types now always use a runtime check
13053         even if they appear as generic actuals.
13054         (Find_Object): Detect
13055         a special case that involves interface class-wide types because
13056         the object appears as a complex expression.
13058 2014-01-31  Ed Schonberg  <schonberg@adacore.com>
13060         * sem_ch6.adb (Process_Formals): In Ada2012 mode, place
13061         subprogram with an incomplete untagged formals on the list of
13062         private dependents, to verify that the type is properly completed
13063         in the private part.
13064         * sem_attr.adb: Code clean up.
13066 2014-01-31  Robert Dewar  <dewar@adacore.com>
13068         * exp_ch6.adb: Minor reformatting.
13070 2014-01-31  Vincent Celier  <celier@adacore.com>
13072         * prj-attr.adb (First_Attribute_Of): Return Unknown_Attribute
13073         when Pkg is unknown.
13075 2014-01-31  Hristian Kirtchev  <kirtchev@adacore.com>
13077         * sem_res.adb (Resolve_Entity_Name): Comment
13078         reformatting. Allow volatile objects in various generated checks.
13080 2014-01-31  Ed Schonberg  <schonberg@adacore.com>
13082         * sem_attr.adb (Analyze_Attribute, case 'Update): For a record
13083         component association, set the etype of the identifier, for
13084         SPARK use.
13086 2014-01-31  Ed Schonberg  <schonberg@adacore.com>
13088         * exp_ch6.adb (Has_Visibility_Of_Subprogram): If type is not
13089         declared in a package, not checks can apply to the subprogram.
13091 2014-01-31  Robert Dewar  <dewar@adacore.com>
13093         * erroutc.adb (Validate_Specific_Warnings): Warnings are
13094         controlled -gnatw.W.
13095         * gnat_ugn.texi: Document new warnings controlled by -gnatw.w.
13096         * opt.ads (Warn_On_Warnings_Off): Now controls more cases.
13098 2014-01-31  Arnaud Charlet  <charlet@adacore.com>
13100         * exp_disp.adb: Update comments.
13102 2014-01-31  Yannick Moy  <moy@adacore.com>
13104         * sem_ch12.adb (Analyze_Generic_Subprogram_Declaration,
13105         Save_Global_References): Guard access to expression in aspect.
13107 2014-01-31  Yannick Moy  <moy@adacore.com>
13109         * sem_prag.adb (Analyze_Pragma/Pragma_SPARK_Mode):
13110         Issue an error when the pragma is applied to a generic unit,
13111         a generic declaration, or inside a generic.
13113 2014-01-31  Yannick Moy  <moy@adacore.com>
13115         * sem_ch8.adb (Analyze_Subprogram_Renaming): Set SPARK_Mode on renaming
13116         entity.
13118 2014-01-31  Robert Dewar  <dewar@adacore.com>
13120         * exp_ch9.adb, s-tassta.adb, s-tposen.adb, s-tposen.ads: Minor
13121         reformatting.
13123 2014-01-31  Tristan Gingold  <gingold@adacore.com>
13125         * exp_disp.adb: Add a historic note.
13127 2014-01-31  Robert Dewar  <dewar@adacore.com>
13129         * sem_warn.adb (Warn_On_Useless_Assignments): Add call to
13130         Process_Deferred_References.
13132 2014-01-31  Yannick Moy  <moy@adacore.com>
13134         * erroutc.adb (Validate_Specific_Warnings): Do not issue a message for
13135         ineffective pragma Warnings(Off) in GNATprove_Mode.
13137 2014-01-31  Bob Duff  <duff@adacore.com>
13139         * s-taskin.ads: Minor comment fix.
13140         * s-tassta.adb (Abort_Dependents): Don't abort all dependents;
13141         just direct dependents. If this is actually an abort, each task
13142         will take care of aborting its dependents, so all dependents will
13143         get aborted, as before. However, when this is called the second
13144         time from Vulnerable_Complete_Master "for convenience" (i.e. to
13145         kill off tasks waiting at terminate alternatives), aborting
13146         indirect dependents is wrong, because it causes some unrelated
13147         tasks to get aborted.
13149 2014-01-31  Robert Dewar  <dewar@adacore.com>
13151         * sem_ch4.adb: Minor reformatting.
13153 2014-01-31  Robert Dewar  <dewar@adacore.com>
13155         * exp_ch2.adb: New calling sequence for Is_LHS.
13156         * frontend.adb: Add call to Process_Deferred_References.
13157         * lib-xref.ads, lib-xref.adb (Process_Deferred_References): New.
13158         (Deferred_References): New table.
13159         * sem_ch8.adb (Find_Direct_Name): Make deferred reference table
13160         entries.
13161         (Find_Expanded_Name): Ditto.
13162         * sem_res.adb: New calling sequence for Is_LHS.
13163         * sem_util.ads, sem_util.adb (Is_LHS): New calling sequence.
13164         * sem_warn.adb: Call Process_Deferred_References before issuing
13165         warnings.
13167 2014-01-31  Tristan Gingold  <gingold@adacore.com>
13169         * exp_util.adb (Corresponding_Runtime_Package): Restrict the
13170         use of System_Tasking_Protected_Objects_Single_Entry.
13171         * exp_ch9.adb (Build_Simple_Entry_Call): Remove Mode parameter
13172         of Protected_Single_Entry_Call.
13173         (Expand_N_Timed_Entry_Call): Remove single_entry case.
13174         * exp_disp.adb (Make_Disp_Asynchronous_Select_Body): Remove
13175         single_entry case.
13176         (Make_Disp_Timed_Select_Body): Likewise.
13177         * rtsfind.ads (RE_Timed_Protected_Single_Entry_Call): Remove.
13178         * s-tposen.adb (Send_Program_Error, PO_Do_Or_Queue): Remove
13179         Self_Id parameter.
13180         (Wakeup_Entry_Caller): Remove Self_ID and New_State parameters.
13181         (Wait_For_Completion_With_Timeout): Remove.
13182         (Protected_Single_Entry_Call): Remove Mode parameter
13183         (always Simple_Call).
13184         (Service_Entry): Remove Self_Id constant (not used anymore).
13185         (Timed_Protected_Single_Entry_Call): Remove.
13186         * s-tposen.ads (Timed_Protected_Single_Entry_Call): Remove.
13187         (Protected_Single_Entry_Call): Remove Mode parameter.
13189 2014-01-29  Hristian Kirtchev  <kirtchev@adacore.com>
13191         * einfo.adb (Get_Pragma): Handle the retrieval of pragma Refined_Post.
13192         * einfo.ads (Get_Pragma): Update the comment on special pragmas
13193         handled by this routine.
13194         * sem_prag.adb (Analyze_Pragma): Add a legal pragma Refined_Post
13195         to the contract of the related subprogram body.
13196         * sem_util.adb (Add_Contract_Item): Handle the insertion of
13197         pragma Refined_Post into the contract of a subprogram body.
13198         * sinfo.ads Update the documentation of node N_Contract.
13199         * sem_res.adb (Resolve_Entity_Name): Add a guard
13200         to detect abstract states and variables only when checking the
13201         SPARK 2014 rules concerning volatile object placement.
13203 2014-01-29  Ed Schonberg  <schonberg@adacore.com>
13205         * sem_ch4.adb (Find_Equality_Types, Try_One_Interp): within an instance,
13206         null is compatible with any access type.
13208 2014-01-29  Hristian Kirtchev  <kirtchev@adacore.com>
13210         * sem_util.adb (Find_Placement_In_State_Space): Assume that the default
13211         placement is not in a package.
13213 2014-01-29  Hristian Kirtchev  <kirtchev@adacore.com>
13215         * sem_util.adb (Has_Enabled_Property): Compare the character field of
13216         the sole property.
13218 2014-01-29  Robert Dewar  <dewar@adacore.com>
13220         * sem_intr.adb, a-ztexio.ads, sinfo.ads, sem_res.adb, gnatlink.adb,
13221         vms_conv.adb, a-except.ads, a-except-2005.ads, a-teioed.adb,
13222         sem_warn.ads, treepr.ads, erroutc.ads, a-excach.adb: Minor reformatting.
13224 2014-01-29  Robert Dewar  <dewar@adacore.com>
13226         * sem_util.ads, sem_util.adb (In_Pragma_Expression): New function.
13227         * sem_warn.adb (Check_References): Suppress warnings if inside
13228         Initial_Condition pragma.
13230 2014-01-29  Hristian Kirtchev  <kirtchev@adacore.com>
13232         * sem_prag.adb (Check_Missing_Part_Of): List all values of
13233         State_Space_Kind for readability reasons. Do not emit an error on
13234         a private item when the enclosing package lacks aspect/pragma
13235         Abstract_State. Do not emit an error on a private package
13236         instantiation when the corresponding generic template lacks
13237         visible state.
13238         (Has_Visible_State): New routine.
13239         * sem_util.adb (Find_Placement_In_State_Space): The visible
13240         declarations of any kind of child units in general act as proper
13241         placement location.
13243 2014-01-29  Robert Dewar  <dewar@adacore.com>
13245         * a-except-2005.adb, a-except.adb, a-excpol-abort.adb, a-exstat.adb,
13246         ali.adb, a-numaux.ads, a-numaux-darwin.ads, a-numaux-libc-x86.ads,
13247         a-numaux-vms.ads, a-numaux-vxworks.ads, a-numaux-x86.ads, aspects.ads,
13248         a-taside.adb, a-teioed.adb, a-textio.adb, a-textio.ads, atree.adb,
13249         atree.ads, a-witeio.adb, a-witeio.ads, a-wtedit.adb, a-ztedit.adb,
13250         a-ztexio.adb, bcheck.adb, binde.adb, checks.adb, comperr.adb,
13251         cstand.adb, debug_a.adb, einfo.ads, errout.adb, erroutc.adb,
13252         eval_fat.adb, exp_aggr.adb, exp_attr.adb, exp_ch11.adb, exp_ch3.adb,
13253         exp_ch4.adb, exp_ch5.adb, exp_ch6.adb, exp_ch9.adb, exp_dbug.adb,
13254         exp_disp.adb, exp_fixd.adb, exp_imgv.adb, exp_intr.adb, exp_util.adb,
13255         freeze.adb, frontend.adb, g-comlin.ads, g-mbdira.adb, gnat1drv.adb,
13256         gprep.adb, g-spipat.adb, i-cpp.ads, i-vxwork.ads, i-vxwork-x86.ads,
13257         krunch.ads, layout.adb, lib-load.adb, lib-writ.adb, lib-writ.ads,
13258         live.adb, namet.ads, osint.adb, osint-c.adb, output.ads, par.adb,
13259         par-ch10.adb, par-ch13.adb, par-ch3.adb, par-ch4.adb, par-ch5.adb,
13260         par-ch6.adb, par-ch9.adb, par-endh.adb, par-labl.adb, par-prag.adb,
13261         par-sync.adb, par-tchk.adb, par-util.adb, prj.adb, repinfo.adb,
13262         rtsfind.adb, s-arit64.adb, s-asthan-vms-alpha.adb,
13263         s-asthan-vms-ia64.adb, s-bignum.adb, scans.adb, scng.adb, s-dimmks.ads,
13264         sem_aggr.adb, sem_attr.adb, sem_aux.adb, sem_cat.adb, sem_ch10.adb,
13265         sem_ch12.adb, sem_ch13.adb, sem_ch13.ads, sem_ch3.adb, sem_ch4.adb,
13266         sem_ch5.adb, sem_ch6.adb, sem_ch8.adb, sem_disp.adb, sem_elab.adb,
13267         sem_elim.adb, sem_eval.adb, sem_intr.adb, sem_prag.adb, sem_res.adb,
13268         sem_type.adb, sem_util.adb, sem_warn.adb, set_targ.adb, s-fatgen.adb,
13269         s-fatgen.ads, s-fileio.adb, s-imgcha.adb, s-imgrea.adb, sinfo.ads,
13270         sinput-c.adb, snames.ads-tmpl, s-os_lib.adb, sprint.adb,
13271         s-regpat.adb, s-secsta.adb, s-stalib.ads,
13272         s-stchop.adb, s-stoele.ads, stand.ads, s-taprop-solaris.adb,
13273         s-tasdeb-vms.adb, s-tasini.adb, s-tassta.adb, s-valdec.adb,
13274         s-valuti.adb, s-wchjis.adb, s-wchwts.adb, system.ads, system-vms_64.ads,
13275         system-vms-ia64.ads, treepr.adb, types.ads, uintp.adb, uname.adb,
13276         urealp.adb, usage.adb, vxaddr2line.adb: Minor reformatting.
13278 2014-01-29  Robert Dewar  <dewar@adacore.com>
13280         * expander.adb: Minor reformatting.
13282 2014-01-29  Javier Miranda  <miranda@adacore.com>
13284         * exp_ch3.adb (Predefined_Primitive_Bodies): Adding documentation to
13285         previous patch.
13287 2014-01-29  Javier Miranda  <miranda@adacore.com>
13289         * exp_ch3.adb (Predefined_Primitive_Bodies): Complete the code
13290         that checks if an interface types defines the predefined "="
13291         function because the compiler was erroneously not generating the
13292         predefined "=" primitive as soon as the name of some interface
13293         primitive is "=" (formals were not checked).
13295 2014-01-29  Ed Schonberg  <schonberg@adacore.com>
13297         * expander.adb (Expander): In GNATprove mode, do not process
13298         transient scopes: they are in general not created in this mode,
13299         and an attempt to examine them will lead to constraint errors when
13300         processing configuration pragmas that have analyzable expressions.
13302 2014-01-29  Vincent Celier  <celier@adacore.com>
13304         * clean.adb (Gnatclean): Fail if main project is an aggregate
13305         project or if there is an aggregate library project in the
13306         project tree.
13307         * gnatcmd.adb: Fail if the main project is an aggregate project
13308         or if there is an aggegate library project in the project tree.
13309         * make.adb (Initialize): : Fail if main project is an aggregate
13310         project or if there is an aggregate library project in the
13311         project tree.
13312         * makeutl.ads (Aggregate_Libraries_In): New Boolean function.
13313         * prj-makr.adb (Initialize): Fail if the main project is an
13314         aggregate project or an aggregate library project.
13316 2014-01-29  Vincent Celier  <celier@adacore.com>
13318         * prj-part.adb (Check_Import_Aggregate): New procedure
13319         to check if an imported project is an aggregate project.
13320         (Parse_Single_Project): Call Check_Import_Aggregate
13321         * projects.texi: Document that aggregate projects cannot be
13322         extended or imported.
13324 2014-01-29  Robert Dewar  <dewar@adacore.com>
13326         * exp_ch9.adb, sem_ch7.ads, s-regexp.adb, sem_ch13.adb: Minor
13327         reformatting and code clean up.
13328         * gnat_ugn.texi: Add documentation section on Atomic Variables
13329         and Optimization.
13331 2014-01-29  Hristian Kirtchev  <kirtchev@adacore.com>
13333         * einfo.adb Flag264 is now unused.
13334         (Has_Body_References): Removed.
13335         (Set_Has_Body_References): Removed.
13336         (Write_Entity_Flags): Remove the output for flag Has_Body_References.
13337         * einfo.ads Update the comment on usage of attribute
13338         Body_References. Remove attribute Has_Body_References and its
13339         usage in nodes.
13340         (Has_Body_References): Removed along with pragma Inline.
13341         (Set_Has_Body_References): Removed along with pragma Inline.
13342         * sem_prag.adb (Analyze_Global_Item): Move the call to
13343         Record_Possible_Body_Reference in the state related checks
13344         section. Add a comment intended function.
13345         (Analyze_Input_Output): Move the call to Record_Possible_Body_Reference
13346         in the state related checks section. Add a comment intended function.
13347         (Analyze_Refinement_Clause): Cleanup the illegal body reference
13348         reporting. Add a comment on timing of error reporting.
13349         (Record_Possible_Body_Reference): Reimplement the routine.
13351 2014-01-29  Vincent Celier  <celier@adacore.com>
13353         * makeutl.adb (Mains.Find_File_Add_Extension): Only look for specs for
13354         unit-based languages.
13355         (Mains.Complete_Mains.Do_Complete): Use the source file project
13356         tree when calling Find_File_Add_Extension. Use the correct
13357         project name when reporting an error.
13359 2014-01-29  Hristian Kirtchev  <kirtchev@adacore.com>
13361         * aspects.adb Add an entry for aspect Part_Of in table
13362         Canonical_Aspect.
13363         * aspects.ads Add an entry for aspect Part_Of in tables Aspect_Id,
13364         Aspect_Argument, Aspect_Names and Aspect_Delay.
13365         * atree.h Define Elist9.
13366         * atree.adb (Elist9): New routine.
13367         (Set_Elist9): New routine.
13368         * atree.ads (Elist9): New routine.
13369         (Set_Elist9): New routine.
13370         * einfo.adb Add Part_Of_Constituents and Encapsulating_State to
13371         the list of node usage.  Remove Refined_State from the list of
13372         node usage.
13373         (Encapsulating_State): New routine.
13374         (Get_Pragma):
13375         Handle pragma Part_Of; (Part_Of_Constituents): New routine.
13376         (Refined_State): Removed.
13377         (Set_Encapsulating_State): New routine.
13378         (Set_Part_Of_Constituents): New routine.
13379         (Set_Refined_State): Removed.
13380         (Write_Field9_Name): Add an entry
13381         for Part_Of_Constituents (Write_Field10_Name): Add an entry for
13382         Encapsulating_State. Remove the entry for Refined_State.
13383         * einfo.ads Add new attributes Encapsulating_State
13384         and Part_Of_Constituents alond with their usage in
13385         entities. Remove attribute Refined_State along with its
13386         usage in entities.
13387         (Encapsulating_State): New routine and
13388         pragma Inline.  (Get_Pragma): Update the comment on usage.
13389         (Part_Of_Constituents): New routine and pragma Inline.
13390         (Refined_State): Removed along with pragma Inline.
13391         (Set_Encapsulating_State): New routine and pragma Inline.
13392         (Set_Part_Of_Constituents): New routine and pragma Inline.
13393         (Set_Refined_State): Removed along with pragma Inline.
13394         * par-prag.adb Pragma Part_Of does not need any special processing
13395         by the parser.
13396         * sem_ch3.adb (Analyze_Declarations): Remove local variables
13397         Body_Id and Prag. Call separate routines to analyze the
13398         contract of a package [body].
13399         (Analyze_Object_Contract):
13400         Update the comment on usage. Remove local variables
13401         Items and Nam. Use Get_Pragma rather than traversing the
13402         classification list.  Verify whether the lack of indicator
13403         Part_Of agrees with the placement of the variable in state space.
13404         (Analyze_Object_Declaration): Initialize the encapsulating state
13405         of a variable.  (Requires_State_Refinement): Moved to sem_util.
13406         * sem_ch7.adb (Analyze_Package_Body_Contract): New routine.
13407         (Analyze_Package_Contract): New routine.
13408         * sem_ch7.ads (Analyze_Package_Body_Contract): New routine.
13409         (Analyze_Package_Contract): New routine.
13410         * sem_ch10.adb (Decorate_State): Initialize the encapsulating
13411         state and Part_Of constituents.
13412         * sem_ch13.adb (Analyze_Aspect_Specifications):
13413         Add processing for aspect Part_Of. Update all
13414         calls to Decorate_Delayed_Aspect_And_Pragma.
13415         (Check_Aspect_At_Freeze_Point): Aspect Part_Of does
13416         not need any special processing at freeze time.
13417         (Decorate_Delayed_Aspect_And_Pragma): Renamed to
13418         Decorate_Aspect_And_Pragma.  Add formal parameter Delayed and
13419         update the associated comment.
13420         * sem_prag.adb Add an entry for pragma Part_Of in table Sig_Flags.
13421         (Analyze_Abstract_State): Add new global variable State_Id. Remove
13422         local constants Errors and Loc. Remove local variables Is_Null
13423         and State_Nam. Create the entity of the abstract state on the
13424         spot, before all remaining checks are performed. Verify that a
13425         missing Part_Of option agrees with the placement of the abstract
13426         state within the state space.
13427         (Analyze_Depends_In_Decl_Part):
13428         Add new global variables Constits_Seen and States_Seen. Check
13429         that a state and a corresponding constituent do not appear
13430         in pragma [Refined_]Depends.
13431         (Analyze_Global_In_Decl_Part):
13432         Add new global variables Constits_Seen and States_Seen. Check
13433         that a state and a corresponding constituent do not appear
13434         in pragma [Refined_]Global.
13435         (Analyze_Global_Item):
13436         Remove the now obsolete code that deals with Part_Of.
13437         Add the entity of the global item to the list of processed
13438         items.  (Analyze_Initializes_In_Decl_Part): Add new global
13439         variables Constits_Seen and States_Seen. Check that a state
13440         and a corresponding constituent do not appear in pragma
13441         Initializes.
13442         (Analyze_Initialization_Item): Add the entity
13443         of the initialization item to the list of processed items.
13444         (Analyze_Input_Item): Add the entity of the initialization
13445         item to the list of processed items.
13446         (Analyze_Input_Output):
13447         Remove the now obsolete code that deals with Part_Of.  Add the
13448         entity of the input/output to the list of processed items.
13449         (Analyze_Part_Of): New routine.
13450         (Analyze_Part_Of_Option): Remove
13451         local constant Par_State. Add local constant Encaps and local
13452         variables Encaps_Id and Legal. Use Analyze_Part of to analyze
13453         the option. Turn the related state into a Part_Of constituent
13454         if the option is legal.
13455         (Analyze_Pragma): Add processing
13456         for pragma Part_Of.
13457         (Analyze_Refined_State_In_Decl_Part):
13458         Remove global constants Pack_Body and Spec_Id. Remove
13459         global variables Abstr_States and Hidden_States. Add new
13460         global variables Available_States, Body_Id, Body_States and
13461         Spec_Id. Add new local constant Body_Decl. Reimplement the
13462         logic that extracts the states available for refinement from
13463         the related package and the body hidden states of the said
13464         package.
13465         (Analyze_Refinement_Clause): Add local variable Part_Of_Constits.
13466         (Check_Applicable_Policy): Alphabetize body.
13467         (Check_Dependency_Clause): Replace Refined_State
13468         with Encapsulating_State.
13469         (Check_Matching_Constituent):
13470         Reimplement the logic that determines whether an item is a valid
13471         / invalid constituent of the current refined state. Return when
13472         a construct does not denote a valid abstract state. Extract the
13473         list of Part_Of constituents for further analysis. Check that all
13474         Part_Of constituents of a state have been used in its refinement.
13475         (Check_Matching_State): Update the comment on usage. Operate
13476         on the list of available states.
13477         (Check_Missing_Part_Of): New routine.
13478         (Check_Refined_Global_Item): Replace Refined_State
13479         with Encapsulating_State.
13480         (Check_State_And_Constituent_Use): New routine.
13481         (Create_Abstract_State): New routine.
13482         (Is_Matching_Input): Replace Refined_State with Encapsulating_State.
13483         (Is_Part_Of): Removed.
13484         (Collect_Body_States): New routine.
13485         (Collect_Constituent): Replace Refined_State with Encapsulating_State.
13486         (Collect_Hidden_States): Removed.
13487         (Report_Unrefined_States): Change the profile of the procedure along
13488         with the comment on usage.
13489         (Report_Unused_Constituents): New routine.
13490         (Report_Unused_Hidden_States): Removed.
13491         (Report_Unused_States): New routine.
13492         * sem_prag.ads (Check_Missing_Part_Of): New routine.
13493         * sem_util.adb (Add_Contract_Item): Pragma Part_Of can now
13494         appear in the classification pragmas of a package instantiation
13495         or a variable.
13496         (Find_Placement_In_State_Space): New routine.
13497         (Is_Child): Removed.
13498         (Is_Child_Or_Sibling): Remove formal
13499         parameter Private_Child. Remove the private child checks.
13500         (Requires_State_Refinement): Moved from sem_ch3.
13501         * sem_util.ads Add new type State_Space_Kind along with
13502         comment on its usage and values.
13503         (Add_Contract_Item): Update the comment on usage.
13504         (Find_Body_Discriminal): Alphabetize spec.
13505         (Find_Placement_In_State_Space): New routine.
13506         (Is_Child_Or_Sibling): Remove formal parameter Private_Child
13507         and update the comment on usage.
13508         (Requires_State_Refinement): Moved from sem_ch3.
13509         * sinfo.ads: Update the documentation of N_Contract.
13510         * snames.ads-tmpl The predefined name for Part_Of is now used
13511         to denote a pragma. Add Pragma_Id for Part_Of.
13513 2014-01-29  Emmanuel Briot  <briot@adacore.com>
13515         * s-regexp.adb (Create_Secondary_Table): Automatically grow the state
13516         machine as needed.
13517         (Dump): New subprogram.
13519 2014-01-29  Tristan Gingold  <gingold@adacore.com>
13521         * exp_ch9.adb (Expand_N_Protected_Type_Declaration): Add
13522         Expand_Entry_Declaration to factorize code.
13524 2014-01-29  Ed Schonberg  <schonberg@adacore.com>
13526         * checks.adb: minor clarification.
13527         * sem_ch7.adb (Declare_Inherited_Private_Subprograms): Limit
13528         search for primitive operations to the entities that immediately
13529         follow the type declaration.
13531 2014-01-29  Tristan Gingold  <gingold@adacore.com>
13533         * exp_ch9.adb (Build_Protected_Entry): Do not call
13534         Complete_Entry_Body anymore.
13535         * rtsfind.ads (RE_Complete_Single_Entry_Body): Remove.
13536         * s-tposen.ads, s-tposen.adb (Complete_Single_Entry_Body): Remove.
13538 2014-01-29  Pierre-Marie Derodat  <derodat@adacore.com>
13540         * s-os_lib.adb, s-os_lib.ads (Normalize_Pathname): Return an empty
13541         string when the Name input bigger than allowed. Adapt the function
13542         specification.
13544 2014-01-29  Ed Schonberg  <schonberg@adacore.com>
13546         * checks.adb (Install_Null_Excluding_Check): Do not emit warning
13547         if expression is within a case_expression of if_expression.
13549 2014-01-29  Robert Dewar  <dewar@adacore.com>
13551         * exp_ch9.adb, inline.ads: Minor reformatting.
13553 2014-01-29  Tristan Gingold  <gingold@adacore.com>
13555         * exp_ch9.adb (Is_Exception_Safe): Return true if no exceptions.
13557 2014-01-29  Yannick Moy  <moy@adacore.com>
13559         * inline.ads (Pending_Body_Info): Add SPARK_Mode and
13560         SPARK_Mode_Pragma components to be able to analyze generic
13561         instance.
13562         * sem_ch12.adb (Analyze_Package_Instantiation,
13563         Inline_Instance_Body, Need_Subprogram_Instance_Body,
13564         Load_Parent_Of_Generic): Pass in SPARK_Mode from instantiation
13565         for future analysis of the instance.
13566         (Instantiate_Package_Body,
13567         Instantiate_Subprogram_Body, Set_Instance_Inv): Set SPARK_Mode
13568         from instantiation to analyze the instance.
13570 2014-01-29  Robert Dewar  <dewar@adacore.com>
13572         * sem_ch7.adb, sem_prag.adb, sem_ch4.adb, sem_ch6.adb: Minor code
13573         reorganization.
13575 2014-01-29  Yannick Moy  <moy@adacore.com>
13577         * gnat_rm.texi: Update description of SPARK_Mode pragma.
13579 2014-01-29  Tristan Gingold  <gingold@adacore.com>
13581         * exp_ch9.adb (Expand_N_Protected_Body): Remove Num_Entries.
13583 2014-01-29  Thomas Quinot  <quinot@adacore.com>
13585         * sem_ch4.adb (Find_Component_In_Instance): Update comment.
13587 2014-01-29  Ed Schonberg  <schonberg@adacore.com>
13589         * exp_util.adb (Build_Task_Image_Prefix): Indicate that the
13590         resulting string is an internal entity. and thus requires no
13591         initialization. This is relevant when Initialize_ Scalars is
13592         enabled, because the resultant spurious initialization may lead to
13593         secondary stack anomalies that produce a mangled name for a task.
13595 2014-01-29  Yannick Moy  <moy@adacore.com>
13597         * sem_ch6.adb (Analyze_Subprogram_Body_Helper): SPARK_Mode
13598         not inherited from spec anymore. Check consistency
13599         rules after processing of declarations.
13600         * sem_ch7.adb (Analyze_Package_Body_Helper): SPARK_Mode not inherited
13601         from spec anymore. Check consistency rules after processing of
13602         declarations.
13603         (Analyze_Package_Declaration): Set SPARK_Mode only for non-generic
13604         packages.
13605         * sem_prag.adb (Analyze_Pragma/Pragma_SPARK_Mode): Implement new
13606         consistency rules.
13608 2014-01-27  Robert Dewar  <dewar@adacore.com>
13610         * sem_res.adb (Resolve_Comparison_Op): Add type name/location
13611         to unordered msg.
13612         (Resolve_Range): Add type name/location to unordered msg.
13614 2014-01-27  Claire Dross  <dross@adacore.com>
13616         * a-cofove.adb/s (Copy): Add precondition so that Copy (Source,
13617         Capacity) is only called with Capacity >= Length (Source) and
13618         Capacity in Capacity_Range.
13619         * a-cfdlli.adb/s, a-cfhase.adb/s, a-cfhama.adb/s, a-cforse.adb/s,
13620         a-cforma.adb/s (Copy): Add precondition so that Copy (Source, Capacity)
13621         is only called with Capacity >= Source.Capacity. Raise Capacity_Error
13622         in the code is this is not the case.
13624 2014-01-27  Thomas Quinot  <quinot@adacore.com>
13626         * sem_ch4.adb (Analyze_Selected_Component): Fix handling of
13627         selected component in an instance where the component of the
13628         actual is not visibile at instantiation.
13630 2014-01-27  Ed Schonberg  <schonberg@adacore.com>
13632         * sem_ch6.adb: sem_ch6.adb (Set_Actual_Subtypes): If the type
13633         has a dynamic predicate, generate freeze node for Actual_Subtype
13634         at once, because the declaration of the corresponding predicate
13635         function will make reference to it.
13637 2014-01-27  Tristan Gingold  <gingold@adacore.com>
13639         * exp_ch7.adb, exp_ch9.adb: Adjust comments.
13641 2014-01-27  Robert Dewar  <dewar@adacore.com>
13643         * exp_ch4.adb (Expand_N_Op_Expon): Remove unsigned type test
13644         for 2**X optimization.
13646 2014-01-27  Ed Schonberg  <schonberg@adacore.com>
13648         * a-suenst.adb: strings.utf_encoding.strings (Decode): Check
13649         explicitly whether value is in range of Character, because the
13650         library is typically compiled with range checks disabled, and
13651         we cannot rely on the implicit check on the argument of 'Val.
13653 2014-01-27  Vincent Celier  <celier@adacore.com>
13655         * a-ciorma.adb, a-cihama.adb (Assign): Copy the Source to the Target,
13656         not the Target to itself.
13658 2014-01-27  Robert Dewar  <dewar@adacore.com>
13660         * vms_conv.ads, ali.adb, sem_ch6.ads, opt.ads, vms_cmds.ads: Minor
13661         changes to avoid incorrect use of unordered enum types.
13663 2014-01-27  Thomas Quinot  <quinot@adacore.com>
13665         * sem_ch4.adb: Minor reformatting.
13667 2014-01-27  Robert Dewar  <dewar@adacore.com>
13669         * scn.adb (Check_End_Of_Line): Removed.
13670         (Error_Long_Line): Removed.
13671         (Determine_License): Use versions of above routines from Scanner.
13672         * scng.adb (Check_End_Of_Line): Moved to spec.
13673         (Error_Long_Line): Removed, no longer used.
13674         * scng.ads (Check_End_Of_Line): Moved here from body.
13676 2014-01-27  Tristan Gingold  <gingold@adacore.com>
13678         * exp_ch7.adb (Build_Cleanup_Statements): Call
13679         Build_Protected_Subprogram_Call_Cleanup to insert the cleanup
13680         for protected body.
13681         * exp_ch9.adb (Build_Protected_Subprogram_Body): Likewise.
13682          Remove Service_Name variable.
13683         (Build_Protected_SUbprogam_Call_Cleanup): New procedure that
13684         factorize code from the above subprograms.
13685         * exp_ch9.ads (Build_Protected_Subprogram_Call_Cleanup): New procedure.
13687 2014-01-27  Hristian Kirtchev  <kirtchev@adacore.com>
13689         * einfo.adb (Has_Option): Reimplemented.
13690         * sem_prag.adb (Analyze_Refinement_Clause): Add global
13691         variables AR_Constit, AW_Constit, ER_Constit, EW_Constit,
13692         External_Constit_Seen and State. Add local variables Body_Ref,
13693         Body_Ref_Elmt and Extra_State. Reimplement part of the logic to
13694         avoid a cumbersome while pool. Verify the legality of an external
13695         state and relevant properties.
13696         (Check_External_Property): New routine.
13697         (Check_Matching_State): Remove parameter profile
13698         and update comment on usage.
13699         (Collect_Constituent): Store the
13700         relevant external property of a constituent.
13701         * sem_util.adb (Async_Readers_Enabled): Update the call to
13702         Has_Enabled_Property.
13703         (Async_Writers_Enabled): Update the call to Has_Enabled_Property.
13704         (Effective_Reads_Enabled): Update the call to Has_Enabled_Property.
13705         (Effective_Writes_Enabled): Update the call to Has_Enabled_Property.
13706         (Has_Enabled_Property): Rename formal parameter Extern to State_Id.
13707         Update comment on usage. Reimplement the logic to recognize the various
13708         formats of properties.
13710 2014-01-27  Ed Schonberg  <schonberg@adacore.com>
13712         * par-ch5.adb: Minor reformatting.
13714 2014-01-27  Tristan Gingold  <gingold@adacore.com>
13716         * s-tposen.ads: Harmonize style and comments.
13718 2014-01-27  Vincent Celier  <celier@adacore.com>
13720         * projects.texi: Document that shared library projects, by
13721         default, cannot import projects that are not shared library
13722         projects.
13724 2014-01-27  Robert Dewar  <dewar@adacore.com>
13726         * sem_ch8.adb (Find_Selected_Component): Use Replace instead
13727         of Rewrite.
13729 2014-01-27  Ed Schonberg  <schonberg@adacore.com>
13731         * a-suenco.adb, a-suenst.adb (Decode): Raise encoding error if
13732         any other exception is raised.
13733         (Convert): If both Input_Scheme and Output_Scheme are UTF_8 it is
13734         still necessary to perform a conversion in order to remove overlong
13735         encodings.
13737 2014-01-27  Robert Dewar  <dewar@adacore.com>
13739         * exp_smem.adb: Minor reformatting.
13741 2014-01-27  Thomas Quinot  <quinot@adacore.com>
13743         * a-calfor.ads: Fix incorrect reference to operator "-" in comment.
13745 2014-01-27  Ed Schonberg  <schonberg@adacore.com>
13747         * sem_res.adb (Make_Call_Into_Operator): In ASIS mode, relocate
13748         nodes for operands to the original node for the call, to preserve
13749         Original_Node pointers within the resolved operands, given that
13750         they may have been rewritten as well. Previous approach copied
13751         the operands into a new tree and lost those pointers.
13753 2014-01-27  Claire Dross  <dross@adacore.com>
13756         * a-cofove.adb, a-cofove.ads: Add Strict_Equal function to the API.
13758 2014-01-27  Ed Schonberg  <schonberg@adacore.com>
13760         * sem_util.adb (Check_Internal_Protected_Use): A call through
13761         an anonymous access parameter of the current protected function
13762         is not a potential modification of the current object.
13764 2014-01-27  Ed Schonberg  <schonberg@adacore.com>
13766         * a-cobove.adb (Reserve_Capacity): Procedure raises
13767         Capacity_Error, not Constraint_Error, when request cannot be
13768         satisfied.
13770 2014-01-27  Vincent Celier  <celier@adacore.com>
13772         * a-coorma.adb, a-cohama.adb (Assign): Copy the Source to the Target,
13773         not the Target to itself.
13775 2014-01-27  Ed Schonberg  <schonberg@adacore.com>
13777         * exp_ch4.adb (Expand_Concatenate): If the target of the
13778         concatenation is a library-level entity, always use the off-line
13779         version of concatenation, regardless of optimization level. This
13780         is space-efficient, and prevents linking problems when some
13781         units are compiled with different optimization levels.
13783 2014-01-27  Ed Schonberg  <schonberg@adacore.com>
13785         * sem_ch5.adb: Code clean up.
13787 2014-01-27  Ed Schonberg  <schonberg@adacore.com>
13789         * par-ch5.adb (P_Iterator_Specification): Improve error recovery
13790         when an array or container iterator includes a subtype indication,
13791         which is only legal in an element iterator.
13793 2014-01-27  Thomas Quinot  <quinot@adacore.com>
13795         * exp_ch7.adb: Minor reformatting.
13797 2014-01-27  Robert Dewar  <dewar@adacore.com>
13799         * opt.adb (SPARK_Mode): Default for library units is None rather
13800         than Off.
13801         * opt.ads: Remove AUTO from SPARK_Mode_Type SPARK_Mode_Type is
13802         no longer ordered.
13803         * sem_prag.adb (Analyze_Pragma, case SPARK_Mode): Remove AUTO
13804         possibility.
13805         * snames.ads-tmpl (Name_Auto): Removed, no longer used.
13807 2014-01-27  Robert Dewar  <dewar@adacore.com>
13809         * par-ch5.adb (P_Sequence_Of_Statements): Make entry in
13810         Suspicious_Labels table if we have identifier; followed by loop
13811         or block.
13812         * par-endh.adb (Evaluate_End_Entry): Search Suspicious_Labels table.
13813         * par.adb (Suspicious_Labels): New table.
13815 2014-01-27  Robert Dewar  <dewar@adacore.com>
13817         * exp_aggr.adb (Check_Bounds): Reason is range check, not
13818         length check.
13820 2014-01-27  Yannick Moy  <moy@adacore.com>
13822         * get_spark_xrefs.adb (Get_SPARK_Xrefs): Accept new type 'c' for
13823         reference.
13824         * lib-xref-spark_specific.adb (Is_Global_Constant): Remove useless
13825         function now.
13826         (Add_SPARK_Xrefs): Include references to constants.
13827         * spark_xrefs.ads Document new character 'c' for references to
13828         constants.
13830 2014-01-27  Thomas Quinot  <quinot@adacore.com>
13832         * exp_smem.adb (Add_Write_After): For a function call, insert write as
13833         an after action in a transient scope.
13835 2014-01-27  Thomas Quinot  <quinot@adacore.com>
13837         * exp_smem.adb (Expand_Shared_Passive_Variable): For a reference
13838         to a shared variable as an OUT formal in a call to an init proc,
13839         the 'Read call must be emitted after, not before, the call.
13841 2014-01-27  Robert Dewar  <dewar@adacore.com>
13843         * gnat_rm.texi: Remove mention of AUTO mode for SPARK_Mode pragma.
13845 2014-01-27  Robert Dewar  <dewar@adacore.com>
13847         * a-wichha.adb (Character_Set_Version): Change to output proper
13848         value.
13850 2014-01-27  Hristian Kirtchev  <kirtchev@adacore.com>
13852         * einfo.adb (Is_Input_Only_State): Removed.
13853         (Is_Non_Volatile_State): Removed.
13854         (Is_Output_State): Removed.
13855         * einfo.ads (Is_Input_Only_State): Remove attribute and
13856         subprogram. Update related entity.
13857         (Is_Non_Volatile_State):
13858         Remove attribute and subprogram. Update related entity.
13859         (Is_Output_State): Removed attribute and subprogram. Update
13860         related entity.
13861         * exp_ch6.adb (Expand_Subprogram_Contract): Update comment on
13862         generated code.
13863         * sem_ch3.adb (Analyze_Declarations): Analyze the contract of
13864         an object, not just variables.
13865         (Analyze_Object_Contract): New routine.
13866         (Analyze_Variable_Contract): Removed.
13867         (Process_Discriminants): Detect an illegal use of volatile
13868         discriminant in SPARK mode.
13869         * sem_ch5.adb (Analyze_Iterator_Specification):
13870         Detect an illegal use of volatile loop variable.
13871         (Analyze_Loop_Parameter_Specification): Detect an illegal use
13872         of volatile loop variable.
13873         * sem_ch6.adb (Process_Formals): Update the volatile object
13874         detection. Detect an illegal formal of mode IN OUT or OUT in
13875         SPARK mode. Enhance the error messages with references.
13876         * sem_ch12.adb (Instantiate_Object): Update the volatile object
13877         detection. Enhance the error messages with references.
13878         * sem_prag.adb (Analyze_Abstract_State): Enhance the error
13879         messages with references.
13880         (Analyze_Contract_Case): Enhance the error messages with references.
13881         (Analyze_External_Property): Call Check_Duplicate_Property to process
13882         an external property.
13883         (Analyze_External_Property_In_Decl_Part): New routine.
13884         (Analyze_External_State_In_Decl_Part): Removed.
13885         (Analyze_Global_Item): Detect an illegal
13886         use of a volatile constant. Detect an illegal use
13887         of a variable with enabled Effective_Reads. Enhance
13888         the error messages with references. Remove obsolete
13889         checks concerning Input_Only and Output_Only states.
13890         (Analyze_Initialization_Item): Enhance the error messages
13891         with references.
13892         (Analyze_Initializes_In_Decl_Part): Do not
13893         collect the states and variables when the initialization list
13894         is null.
13895         (Analyze_Input_Item): Enhance the error messages with references.
13896         (Analyze_Input_Output): Enhance the error messages with references.
13897         (Analyze_Pragma): Enhance the error messages with references.
13898         (Analyze_Refinement_Clause): Code reformatting.
13899         (Analyze_Refined_Depends_In_Decl_Part):
13900         Rename global variable Global to Reg_Global and update all
13901         occurrences. Add local variables D7 and D8. Update the error
13902         messages with references. Update the call to Collect_Global_Items.
13903         (Analyze_Refined_Global_In_Decl_Part): Add local variables
13904         Has_Proof_In_State, Proof_In_Constits and Proof_In_Items. Update
13905         the call to Collect_Global_Items.  Account for a Proof_In state
13906         in null / useless refinement checks. Verify the coverage of
13907         Proof_In states.
13908         (Check_Dependency_Clause): Remove local variable
13909         Out_Constits. Remove the retrieval and removal of constituents
13910         for an Output_Only state. Remove the reporting of unused
13911         Output_Only state constituents.
13912         (Check_Duplicate_Mode): Enhance
13913         the error message with a reference.
13914         (Check_Duplicate_Property): New routine.
13915         (Check_Duplicate_Option): Enhance the error message with a reference.
13916         (Check_External_Properties): Enhance the error message with a reference.
13917         (Check_Function_Return): Enhance the error message with a reference.
13918         (Check_In_Out_States): Update
13919         comment on usage. Add a specialized error message for Proof_In
13920         constituents. Enhance the error message with a reference.
13921         (Check_Input_States): Update comment on usage. Account for
13922         possible Proof_In constituents. Enhance the error message
13923         with a areference.
13924         (Check_Matching_Constituent): Enhance the error message with a
13925         reference.
13926         (Check_Matching_State): Enchance the error message with a reference.
13927         (Check_Mode): Add local variable From_Global. Update the call to
13928         Find_Mode.  Emit more precise error messages concerning extra items
13929         (Check_Mode_Restriction_In_Enclosing_Context): Consider
13930         pragma Refined_Global.  Enhance the error message with a
13931         reference.
13932         (Check_Mode_Restriction_In_Function): Enhance the error message with
13933         a reference.
13934         (Check_Output_States): Update comment on usage. Add local variable
13935         Posted.  Account for possible Proof_In constituents. Produce a detailed
13936         list of missing constituents.
13937         (Check_Proof_In_States): New routine.
13938         (Check_Refined_Global_Item): Handle Proof_In
13939         constituents. Enchance the error message with a reference.
13940         (Collect_Global_Items): Add formal parameters Proof_In_Items
13941         and Has_Proof_In_State. Update the comment on usage. Account
13942         for Proof_In items.
13943         (Create_Or_Modify_Clause): Enchance
13944         the error message with a reference.
13945         (Find_Mode): Add
13946         formal parameter From_Global. Update the comment on usage.
13947         Detect when the mode is governed by pragma [Refined_]Global.
13948         (Output_Constituents): Removed.
13949         (Report_Extra_Constituents):
13950         Report extra Proof_In constituents.
13951         (Report_Unused_Constituents): Removed.
13952         (Usage_Error): Code reformatting. Enhance the error
13953         messages with reference.
13954         * sem_prag.ads (Analyze_External_Property_In_Decl_Part): New routine.
13955         (Analyze_External_State_In_Decl_Part): Removed.
13956         * sem_res.adb (Resolve_Actuals): Update the volatile object
13957         detection. Enhance the error message with a reference.
13958         (Resolve_Entity_Name): Update the volatile object
13959         detection. Enhance the error message with a reference.
13960         * sem_util.adb (Is_Refined_State): Add a guard to avoid a crash.
13961         (Is_SPARK_Volatile_Object): New routine.
13962         (Has_Volatile_Component): New routine.
13963         * sem_util.ads (Is_Delegate): Alphabetized.
13964         (Is_SPARK_Volatile_Object): New routine.
13965         (Has_Volatile_Component): New routine.
13966         * snames.ads-tmpl: Remove names Name_Input_Only and Name_Output_Only.
13968 2014-01-27  Ed Schonberg  <schonberg@adacore.com>
13970         * sem_attr.adb: Resolve fully prefix of 'Update.
13972 2014-01-27  Ben Brosgol  <brosgol@adacore.com>
13974         * gnat_rm.texi: Minor clarifications.
13976 2014-01-27  Robert Dewar  <dewar@adacore.com>
13978         * sem_elab.adb (Check_Internal_Call_Continue): Avoid complaining
13979         about call that is generated as part of an Initial_Condition
13980         check.
13981         * sem_prag.adb: Minor spelling correction.
13983 2014-01-27  Robert Dewar  <dewar@adacore.com>
13985         * sem_prag.adb (Set_Convention_From_Pragma): Check that
13986         convention Ghost can only apply to functions.
13987         * einfo.ads, einfo.adb (Is_Ghost_Subprogram): Add clarifying comment.
13989 2014-01-27  Robert Dewar  <dewar@adacore.com>
13991         * gnat_ugn.texi: Add Short_Enums to documentation of
13992         -gnatet/-gnateT.
13994 2014-01-27  Robert Dewar  <dewar@adacore.com>
13996         * sem_prag.adb (Analyze_Input_Item): Correct check for input
13997         item in same package.
13998         * sem_util.ads, sem_util.adb (Within_Scope): New function.
14000 2014-01-26  Arnaud Charlet  <charlet@adacore.com>
14002         * a-intnam-lynxos.ads, mlib-tgt-specific-lynxos.adb,
14003         s-osinte-lynxos-3.adb, s-osinte-lynxos-3.ads, s-osinte-lynxos.adb,
14004         s-osinte-lynxos.ads, s-taprop-lynxos.adb, s-tpopsp-lynxos.adb,
14005         system-lynxos-ppc.ads, system-lynxos-x86.ads: Removed, no longer
14006         maintained.
14008 2014-01-25  Eric Botcazou  <ebotcazou@adacore.com>
14010         * gcc-interface/Makefile.in: Fix oversight.
14012 2014-01-25  Eric Botcazou  <ebotcazou@adacore.com>
14014         * gcc-interface/utils.c (convert_to_fat_pointer): Un-obfuscate the
14015         conversion from a thin pointer with a shifted value.
14016         * gcc-interface/utils2.c (gnat_build_constructor): Propagate the
14017         read-only flag from the values onto the result.
14018         (gnat_invariant_expr): Accept read-only CONSTRUCTORs.
14020 2014-01-25  Tristan Gingold  <gingold@adacore.com>
14022         * gcc-interface/decl.c (gnat_to_gnu_entity): Always build a variable
14023         for E_Variable with a pragma Linker_Section.
14025 2014-01-25  Robert Dewar  <dewar@adacore.com>
14027         * gcc-interface/decl.c (gnat_to_gnu_param): Make sure an Out parameter
14028         with Default_Value aspect is passed in by copy.
14030 2014-01-24  Eric Botcazou  <ebotcazou@adacore.com>
14032         * set_targ.adb: Set Short_Enums.
14033         * gcc-interface/lang.opt (fshort-enums): New option.
14034         * gcc-interface/misc.c (gnat_handle_option): Handle it.
14035         (gnat_post_options): Do not modify the global settings.
14037 2014-01-24  Robert Dewar  <dewar@adacore.com>
14039         * g-rannum.ads, g-rannum.adb (Random_Ordinary_Fixed): New generic
14040         function.
14041         (Random_Decimal_Fixed): New generic function.
14042         * s-rannum.ads: Minor comment clarifications.
14044 2014-01-24  Robert Dewar  <dewar@adacore.com>
14046         * back_end.adb: Remove Short_Enums handling (handled in
14047         Ttypes/Get_Targ now) Minor added comments.
14048         * freeze.adb: Change name Short_Enums_On_Target to
14049         Target_Short_Enums.
14050         * get_targ.ads, get_targ.adb (Get_Short_Enums): New function.
14051         * opt.ads: Minor comment updates.
14052         * sem_ch13.adb: Change name Short_Enums_On_Target to
14053         Target_Short_Enums.
14054         * set_targ.adb: Set Short_Enums from gcc back end.
14055         * set_targ.ads (Short_Enums): New variable.
14056         * targparm.ads, targparm.adb: Remove Short_Enums entries (handled in
14057         Ttypes/Get_Targ now).
14058         * ttypes.ads (Target_Short_Enums): New constant boolean switch
14060 2014-01-24  Pascal Obry  <obry@adacore.com>
14062         * g-sercom-mingw.adb: Fix serial port name for port number > 10.
14064 2014-01-24  Gary Dismukes  <dismukes@adacore.com>
14066         * exp_disp.adb (Expand_Dispatching_Call): Call Unqualify on Param when
14067         comparing it with Ctrl_Arg, since Ctrl_Arg may have had qualification
14068         stripped off.
14070 2014-01-24  Robert Dewar  <dewar@adacore.com>
14072         * sinfo.ads, make.adb, prj-env.adb: Minor reformatting.
14074 2014-01-24  Vincent Celier  <celier@adacore.com>
14076         * prj.adb (Add_Aggregated_Project): Do not add a project in
14077         the list if it is already there.
14079 2014-01-24  Yannick Moy  <moy@adacore.com>
14081         * lib-xref-spark_specific.adb (Enclosing_Subprogram_Or_Package):
14082         Correct the search for a subrogram declaration to which a pragma is
14083         attached.
14085 2014-01-24  Bob Duff  <duff@adacore.com>
14087         * gnat_ugn.texi: Document --decimal-grouping and
14088         --based-grouping switches in gnatpp.
14090 2014-01-24  Ed Schonberg  <schonberg@adacore.com>
14092         * sinfo.ads: Documentation update.
14094 2014-01-24  Ed Schonberg  <schonberg@adacore.com>
14096         * sem_ch3.adb (Constant_Redeclaration): New declaration is
14097         illegal if previous one has an initial expression that is an
14098         aggregate expanded into assignments.
14100 2014-01-24  Ed Schonberg  <schonberg@adacore.com>
14102         * sem_ch5.adb (Analyze_Loop_Parameter_Specification): Small
14103         code reorganization to remove spurious warning on a loop with
14104         an array element iterator that has a null range.
14106 2014-01-24  Vincent Celier  <celier@adacore.com>
14108         * make.adb (Binding_Phase): When setting the Ada paths, use
14109         the library ALI dir, not the object dir in libraries.
14111 2014-01-24  Yannick Moy  <moy@adacore.com>
14113         * sinfo.ads: Add documentation of check flag fields.
14115 2014-01-24  Ed Schonberg  <schonberg@adacore.com>
14117         * sem_res.adb (Resolve_Actuals): If an actual is a view
14118         conversion of a discriminated object, and the formal type is
14119         discriminated and constrained, apply a discriminant check to
14120         the object itself.
14122 2014-01-24  Robert Dewar  <dewar@adacore.com>
14124         * prj.adb, prj-env.adb, back_end.adb: Add comment, minor code clean ups.
14126 2014-01-24  Ed Schonberg  <schonberg@adacore.com>
14128         * sem_ch3.adb (Analyze_Declarations): At the end of an
14129         appropriate declarative part, call Freeze_All from the first
14130         declaration in the scope, not from the first unfrozen one. This
14131         is necessary to apply visibility checks to entities with delayed
14132         aspects. Otherwise, in the presence of instantiations and cleanups
14133         that they may generate, the delayed aspects may be analyzed too
14134         late and produce spurious visibility errors.
14135         * sem_attr.adb: Place etype on range.
14136         * sem_ch6.adb: Documentation expression functions.
14138 2014-01-24  Robert Dewar  <dewar@adacore.com>
14140         * exp_ch7.adb: Minor change of Indices to Indexes (preferred
14141         terminology in compiler).
14143 2014-01-24  Robert Dewar  <dewar@adacore.com>
14145         * scans.ads: Remove Tok_Raise from Sterm, Eterm, After_SM
14146         categories, now that Ada 95 supports raise expressions.
14148 2014-01-24  Robert Dewar  <dewar@adacore.com>
14150         * freeze.adb (Freeze_Enumeration_Type): Use new target parameter
14151         Short_Enums_On_Target.
14152         * sem_ch13.adb (Set_Enum_Esize): Take Short_Enums_On_Target
14153         into account.
14154         * targparm.ads, targparm.adb: Add new target parameter Short_Enums.
14156 2014-01-24  Ed Schonberg  <schonberg@adacore.com>
14158         * sem_ch5.adb (Analyze_Iterator_Specification): If subtype
14159         indication is given explicity, check that it matches the array
14160         component type or the container element type of the domain
14161         of iteration.
14163 2014-01-24  Tristan Gingold  <gingold@adacore.com>
14165         * back_end.adb (Scan_Compiler_Arguments): Set Short_Enums_On_Target.
14166         * gcc-interface/misc.c (flag_short_enums): Declare.
14167         (gnat_post_options): Set it.
14169 2014-01-24  Vincent Celier  <celier@adacore.com>
14171         * prj-env.adb (Ada_Objects_Path): Use Ada_Objects_Path_No_Libs
14172         to cache the result when Including_Libraries is False.
14173         * prj-env.ads (Ada_Objects_Path): Update documentation
14174         * prj.adb (Free (Project_Id)): Also free Ada_Objects_Path_No_Libs
14175         (Get_Object_Directory): Return the Library_Ali_Dir only when
14176         when Including_Libraries is True.
14177         * prj.ads (Get_Object_Directory): Fix and complete documentation
14178         (Project_Data): New component Ada_Objects_Path_No_Libs
14180 2014-01-24  Robert Dewar  <dewar@adacore.com>
14182         * checks.adb (Expr_Known_Valid): Result of fpt operator never
14183         considered valid.
14185 2014-01-24  Eric Botcazou  <ebotcazou@adacore.com>
14187         * back_end.adb: Minor fix in comment.
14189 2014-01-24  Javier Miranda  <miranda@adacore.com>
14191         * sem_ch3.adb (Check_Abstract_Overriding): Code reestructuration
14192         required to report the error in case of task types.
14194 2014-01-24  Ed Schonberg  <schonberg@adacore.com>
14196         * sem_attr.adb: Additional index checking.
14198 2014-01-24  Ed Schonberg  <schonberg@adacore.com>
14200         * sem_attr.adb (Analyze_Attribute, case 'Update): Analyze
14201         expressions in each component association, and for records note
14202         the entity in each association choice, for subsequent resolution.
14203         (Resolve_Attribute, case 'Update): Complete resolution of
14204         expressions in each component association.
14206 2014-01-24  Robert Dewar  <dewar@adacore.com>
14208         * sem.adb (Sem): Avoid premature reference to Current_Sem_Unit
14209         (this was causing Is_Main_Unit_Or_Main_Unit_Spec to be set wrong,
14210         leading to wrong handling of SPARK_Mode for library units).
14212 2014-01-24  Robert Dewar  <dewar@adacore.com>
14214         * sem_ch6.adb (Analyze_Subprogram_Body_Helper): Set SPARK_Mode
14215         on generic instances (do not consider them to be internally
14216         generated)
14218 2014-01-24  Doug Rupp  <rupp@adacore.com>
14220         * s-osinte-android.ads (pthread_sigmask): Import sigprocmask
14221         vice pthread_sigmask.
14223 2014-01-24  Vincent Celier  <celier@adacore.com>
14225         * prj.adb (Debug_Output (Str, Str2)): Output if verbosity is
14226         not default.
14228 2014-01-24  Vincent Celier  <celier@adacore.com>
14230         * prj-ext.adb (Add): Do not output anything when Silent is True,
14231         whatever the verbosity. When Source is From_External_Attribute,
14232         set the corresponding environment variable if it is not already set.
14233         * prj-ext.ads (Add): New Boolean parameter Silent, defaulted
14234         to False
14235         * prj-proc.adb (Process_Expression_For_Associative_Array):
14236         For attribute External, call Prj.Ext.Add with Silent set to
14237         True for the child environment, to avoid useless output in non
14238         default verbosity.
14240 2014-01-24  Ed Schonberg  <schonberg@adacore.com>
14242         * sem_res.adb (Set_Slice_Subtype): Handle properly a discrete
14243         range given by a subtype indication, and force evaluation of
14244         the bounds, as for a simple range.
14245         * exp_util.adb (Evaluate_Slice_Bounds): Utility to force evaluation
14246         of bounds of slice for various kinds of discrete ranges.
14247         (Evaluate_Name, Evaluate_Subtype_From_Expr): use
14248         Evaluate_Slice_Bounds.
14250 2014-01-24  Bob Duff  <duff@adacore.com>
14252         * s-taskin.ads (Activator): Make this Atomic, because
14253         Activation_Is_Complete reads it, and that can be called
14254         from any task. Previously, this component was only
14255         modified by the activator before activation, and by
14256         Self after activation.
14257         * a-taside.ads, a-taside.adb (Environment_Task,
14258         Activation_Is_Complete): Implement these missing functions.
14260 2014-01-24  Doug Rupp  <rupp@adacore.com>
14262         * init.c: Add a handler section for Android.
14264 2014-01-24  Arnaud Charlet  <charlet@adacore.com>
14266         * i-cexten.ads (Unsigned_33..64, Unsigned_33..64): New types.
14268 2014-01-24  Ed Schonberg  <schonberg@adacore.com>
14270         * sem_ch4.adb (Operator_Check): If one operand is a
14271         Raise_Expression, set its type to that of the other operand.
14272         * sem_res.adb (Resolve_Raise_Expression): new procedure.
14273         (Resolve_Actuals): For an actual that is a Raise_Expression,
14274         set the type to that of the formal.
14275         * sem_type.adb (Find_Unique_Type): If one of the operands is a
14276         Raise_Expression, return type of the other operand.
14278 2014-01-24  Ed Schonberg  <schonberg@adacore.com>
14280         * sem_aggr.adb (Resolve_Record_Aggregate): If a scalar
14281         component of the record has a type with a default aspect, and
14282         the corresponding aggregate component is initiaized with a box,
14283         use the default value in the rewritten aggregate.
14285 2014-01-24  Tristan Gingold  <gingold@adacore.com>
14287         * s-interr.ads, s-interr.adb, s-interr-hwint.adb, s-interr-vms.adb,
14288         s-interr-sigaction.adb,
14289         s-interr-dummy.adb (Install_Restricted_Handlers): Add Prio parameter.
14290         * exp_ch9.adb (Make_Initialize_Protection): Add Prio parameter
14291         to the call to Install_Restricted_Handlers.
14293 2014-01-24  Emmanuel Briot  <briot@adacore.com>
14295         * prj-nmsc.adb (Check_File): Add protection when the source is
14296         not fully initialized.
14298 2014-01-24  Ed Schonberg  <schonberg@adacore.com>
14300         * sem_util.adb (Is_Post_State): In a postcondition, a selected
14301         component that denotes an implicit dereference is a reference
14302         to the post state of the subprogram.
14304 2014-01-24  Robert Dewar  <dewar@adacore.com>
14306         * sem_ch6.adb (Analyze_Subprogram_Body_Helper): SPARK_Mode OFF
14307         for generated subprograms.
14308         (Analyze_Subprogram_Specification): Ditto.
14310 2014-01-24  Vincent Celier  <celier@adacore.com>
14312         * prj-dect.adb (Check_Attribute_Allowed): Detect more forbidden
14313         attributes in package Builder of aggregate and aggregate library
14314         projects.
14315         * prj-nmsc.adb (Process_Naming_Scheme.Check.Check_Aggregate):
14316         Remove procedure (Process_Naming_Scheme.Check.Check_Aggregated):
14317         Remove parameters.  Change error message from "... externally
14318         build library ..." to "... externally built project ...".
14319         (Process_Naming_Scheme.Check): Do not do any check in aggregate
14320         project, as attribute Library_Dir and Library_Name have already
14321         been detected as forbidden.
14323 2014-01-24  Vincent Celier  <celier@adacore.com>
14325         * prj-env.adb (Find_Project): If cached project path is not in
14326         project directory, look in current directory first and use cached
14327         project path only if project is not found in project directory.
14329 2014-01-24  Robert Dewar  <dewar@adacore.com>
14331         * sem_util.adb, lib-xref.adb: Correct false positive warnings.
14333 2014-01-24  Vincent Celier  <celier@adacore.com>
14335         * projects.texi: Document that aggregate projects are only
14336         supported by gprbuild, but not by gnatmake.  Document that the
14337         only attribute Switches in package Binder of aggregate projects
14338         will be ignored if its index is not others.  Document that
14339         attribute Global_Config_File is allowed in package Binder of
14340         aggregate projects.
14342 2014-01-24  Robert Dewar  <dewar@adacore.com>
14344         * sem_prag.adb: Minor code reorganization.
14345         * sem_util.adb: Minor fix of potential latent bug in Is_LHS.
14347 2014-01-24  Pascal Obry  <obry@adacore.com>
14349         * prj-attr.adb, projects.texi, snames.ads-tmpl: Add Excluded_Patterns
14350         attribute definition.
14352 2014-01-24  Vincent Celier  <celier@adacore.com>
14354         * makeutl.adb (Queue.Insert_No_Roots): In gprbuild, do not put
14355         in the Queue the same source (same path, same multi-source index)
14356         from the same project file, to avoid compiling several times
14357         the same source.
14359 2014-01-24  Eric Botcazou  <ebotcazou@adacore.com>
14361         * einfo.ads (First_Rep_Item): Remove obsolete stuff.
14362         (Has_Gigi_Rep_Item): Likewise.
14363         * sem_prag.adb (Analyze_Pragma) <Pragma_Linker_Section>: Do not set
14364         Has_Gigi_Rep_Item for objects.
14365         * gcc-interface/decl.c (prepend_one_attribute_to): Rename into...
14366         (prepend_one_attribute): ...this.
14367         (prepend_one_attribute_pragma): New function extracted from...
14368         (prepend_attributes): ...here.  Swap the parameters for consistency.
14369         (gnat_to_gnu_entity): Adjust calls to prepend_one_attribute_to and to
14370         prepend_attributes.
14371         <object>: Deal with a pragma Linker_Section on a constant
14372         or variable.  <E_Function>: Deal with a pragma Linker_Section
14373         on a subprogram.
14374         (get_minimal_subprog_decl): Adjust calls to prepend_one_attribute_to.
14376 2014-01-24  Vincent Celier  <celier@adacore.com>
14378         * opt.ads: Minor comment update.
14380 2014-01-24  Robert Dewar  <dewar@adacore.com>
14382         * sem_prag.adb (Analyze_Input_Output): Add missing error check
14383         for junk operand.
14384         * sem_util.adb (Is_Refined_State): Add defense against junk
14385         tree from error.
14387 2014-01-24  Pascal Obry  <obry@adacore.com>
14389         * projects.texi: Removes Build_Slaves attribute documentation.
14391 2014-01-23  Robert Dewar  <dewar@adacore.com>
14393         * opt.adb (Register_Opt_Config_Switches): Save SPARK_Mode_Pragma
14394         setting.
14396 2014-01-23  Ed Schonberg  <schonberg@adacore.com>
14398         * sem_util.adb (Is_Potentially_Unevaluated): Predicate only
14399         applies to expressions that come from source.
14400         * sem_attr.adb (Analyze_Attribute, case 'Old): Improve error
14401         message.
14402         (Analyze_Attribute, case 'Loop_Entry): Apply SPARK 2014 legality
14403         rule regarding potentially unevaluated expressions, to prefix
14404         of attribute.
14406 2014-01-23  Ed Schonberg  <schonberg@adacore.com>
14408         * exp_util.adb (Make_Invqriant_Call): If type of expression is
14409         a private extension, get invariant from base type.
14411 2014-01-23  Robert Dewar  <dewar@adacore.com>
14413         * sem_util.adb, sem_attr.adb: Minor reformatting.
14415 2014-01-23  Robert Dewar  <dewar@adacore.com>
14417         * opt.adb (Save_Opt_Config_Switches): Save SPARK_Mode_Pragma
14418         (Restore_Opt_Config_Switches): Restore SPARK_Mode_Pragma.
14419         * sem.adb (Semantics): Remove save/restore of
14420         SPARK_Mode[_Pragma]. Not needed since already done in
14421         Save/Restore_Opt_Config_Switches.
14423 2014-01-23  Robert Dewar  <dewar@adacore.com>
14425         * gnat_rm.texi, einfo.adb, einfo.ads, sem_prag.adb, gnat_ugn.texi,
14426         freeze.adb, repinfo.adb, aspects.adb, aspects.ads, sem_ch13.adb:
14427         Linker_Section enhancements.
14429 2014-01-23  Tristan Gingold  <gingold@adacore.com>
14431         * gnat_rm.texi: Minor editing.
14433 2014-01-23  Robert Dewar  <dewar@adacore.com>
14435         * opt.adb (Set_Opt_Config_Switches): Reset SPARK mode for
14436         with'ed internal units.
14437         * sem.adb (Semantics): Save and restore SPARK_Mode[_Pragma].
14439 2014-01-23  Javier Miranda  <miranda@adacore.com>
14441         * lib-xref.adb (Generate_Reference): As part of processing the
14442         "end-of-spec" reference generate an extra reference to the first
14443         private entity of the package.
14444         * xr_tabls.adb (Add_Reference): No action needed for the extra
14445         'E' reference associated; similar to the processing of the
14446         'e' reference.
14448 2014-01-23  Bob Duff  <duff@adacore.com>
14450         * gnat_ugn.texi: Change "--&pp off" to "--!pp off".
14452 2014-01-23  Ed Schonberg  <schonberg@adacore.com>
14454         * sem_util.ads, sem_util.adb (Is_Potentially_Unevaluated): new
14455         predicate to implement rule given in 6.1.1 (20/3).
14456         * sem_attr.adb (Analyze_Attribute, case 'Old): Reject prefix of
14457         'Old in a postcondition, if it is potentially unevaluated and
14458         it is not an entity name.
14460 2014-01-23  Bob Duff  <duff@adacore.com>
14462         * gnat_ugn.texi: Document the new "--&pp off" feature of gnatpp.
14464 2014-01-23  Robert Dewar  <dewar@adacore.com>
14466         * gnatlink.adb (Gnatlink): Fix problem of generating bad name
14467         msg on VMS.
14469 2014-01-23  Bob Duff  <duff@adacore.com>
14471         * g-dynhta.ads: Minor comment fix.
14473 2014-01-23  Yannick Moy  <moy@adacore.com>
14475         * sem_ch6.adb (Analyze_Subprogram_Body_Helper): Inherit SPARK_Mode
14476         from spec on body only when not already inherited on spec. Set
14477         SPARK_Mode from context on body without previous spec.  *
14478         * sem_prag.adb (Analyze_Pragma): Check placement of pragma on
14479         library-level entities.  Correct retrieval of entity from
14480         declaration, for cases where the declaration is not a unit.
14481         * sem_ch12.adb (Instantiate_Object): Avoid
14482         calling Is_Volatile_Object on an empty node.
14484 2014-01-23  Robert Dewar  <dewar@adacore.com>
14486         * gnatlink.adb (Gnatlink): Check for suspicious executable file
14487         names on windows.
14489 2014-01-23  Robert Dewar  <dewar@adacore.com>
14491         * a-ngelfu.ads: Remove bad uses of AND which should be AND THEN.
14492         * sem_res.adb (Check_No_Direct_Boolean_Operators): Don't give
14493         style errors in instances.
14494         * g-dynhta.ads (Static_HTable): Comment updates.
14496 2014-01-23  Vincent Celier  <celier@adacore.com>
14498         * prj-conf.adb (Get_Or_Create_Configuration_File): Do not attempt
14499         to find a configuration project file when Config_File_Name is
14500         No_Configuration_File.
14501         * prj-conf.ads (No_Configuration_File): New constant String.
14502         * prj-pars.adb (Parse): Call Get_Or_Create_Configuration_File
14503         with Config_File_Name set to No_Configuration_File, so that
14504         no existing configuration project file will be used, and the
14505         configuration project will be only created in memory when
14506         Add_Default_GNAT_Naming_Scheme is called.
14507         * projects.texi: Minor reformatting.
14509 2014-01-23  Vincent Celier  <celier@adacore.com>
14511         * prj-conf.adb (Get_Or_Create_Configuration_File): Never parse
14512         a config project file if On_Load_Config is not null.
14513         * prj-pars.adb: Minor comment changes.
14515 2014-01-23  Ed Schonberg  <schonberg@adacore.com>
14517         * lib-xref.adb (Output_References): Output progenitors of
14518         synchronized tagged types, for source navigation.
14520 2014-01-23  Robert Dewar  <dewar@adacore.com>
14522         * exp_util.adb, sinfo.adb, sinfo.ads, sem.adb, sem_res.adb,
14523         expander.adb, exp_ch11.adb, exp_ch11.ads, sem_ch11.adb, sem_ch11.ads,
14524         sprint.adb, sprint.ads: Remove unused node N_Subprogram_Info.
14526 2014-01-23  Emmanuel Briot  <briot@adacore.com>
14528         * prj-conf.adb (Get_Or_Create_Configuration_File): call
14529         On_Load_Config later.
14531 2014-01-23  Hristian Kirtchev  <kirtchev@adacore.com>
14533         * sem_ch3.adb (Analyze_Declarations): Do not
14534         generate the spec of the late primitive in ASIS mode. Add two
14535         comments to explain the special cases when the expansion is
14536         not performed.
14538 2014-01-23  Robert Dewar  <dewar@adacore.com>
14540         * sem_util.adb (Note_Possible_Modification): Fix error of
14541         misbehaving for implicit dereference cases in -gnatc mode.
14543 2014-01-23  Emmanuel Briot  <briot@adacore.com>
14545         * prj-pars.adb: Minor reformatting.
14547 2014-01-22  Ed Schonberg  <schonberg@adacore.com>
14549         * sem_ch6.adb (Analyze_Subprogram_Body_Helper): A subprogram
14550         body generated for an expression function within a protected body
14551         needs a set of renaming declarations if the expression function
14552         comes from source.
14554 2014-01-22  Ed Schonberg  <schonberg@adacore.com>
14556         * lib-xref.adb (Get_Type_Reference): In semantics-only mode,
14557         list interface progenitor of a tagged concurrent type, for better
14558         source navigation.
14560 2014-01-22  Robert Dewar  <dewar@adacore.com>
14562         * lib.adb (In_Extended_Main_Code_Unit): Return False for
14563         Standard_Location.
14564         (In_Extended_Main_Source_Unit): Return False for Standard_Location.
14565         * lib.ads (In_Extended_Main_Code_Unit): Add documentation on
14566         treatment of Slocs No_Location and Standard_Location.
14567         * restrict.adb (Check_Restriction_No_Dependence): Explicitly
14568         check for entity with Standard_Location Sloc, rather than relying
14569         on Lib routines to do that.
14570         * sem_res.adb (Resolve_Call): Implement SPARK_05 restriction
14571         that a call cannot occur before a later occuring body within
14572         the same unit.
14574 2014-01-22  Thomas Quinot  <quinot@adacore.com>
14576         * rtsfind.adb: Update comment.
14578 2014-01-22  Hristian Kirtchev  <kirtchev@adacore.com>
14580         * sem_aux.ads, sem_aux.adb (Is_Body): New routine.
14581         * sem_ch3.adb (Analyze_Declarations): Add local variable
14582         Body_Seen. Generate the spec of a late controlled
14583         primitive body that is about to freeze its related type.
14584         (Handle_Late_Controlled_Primitive): New routine.
14586 2014-01-22  Robert Dewar  <dewar@adacore.com>
14588         * a-stream.adb: Minor reformatting.
14590 2014-01-22  Ed Schonberg  <schonberg@adacore.com>
14592         * sem_ch8.adb (From_Actual_Package): Introduce a recursive
14593         sub-procedure Declared_In_Actual to handle properly the visibility
14594         of actuals in actual packages, that are themselves actuals to a
14595         actual package of the current instance. This mimics properly the
14596         visibility of formals of formal packages declared with a box,
14597         within the corresponding generic unit.
14599 2014-01-22  Robert Dewar  <dewar@adacore.com>
14601         * checks.adb: Do not assume that a volatile variable is valid.
14603 2014-01-22  Thomas Quinot  <quinot@adacore.com>
14605         * g-catiio.ads (Image, Value): Clarify that these functions
14606         operate in the local time zone.  Minor documentation update.
14608 2014-01-22  Thomas Quinot  <quinot@adacore.com>
14610         * csets.adb, csets.ads, opt.ads: Minor documentation fixes.
14612 2014-01-22  Robert Dewar  <dewar@adacore.com>
14614         * sem_aux.adb, sem_aux.ads, sem_ch3.adb (Has_Unconstrained_Elements):
14615         Moved to sem_aux.adb.
14617 2014-01-22  Robert Dewar  <dewar@adacore.com>
14619         * vms_data.ads: Minor reformatting.
14621 2014-01-22  Robert Dewar  <dewar@adacore.com>
14623         * debug.adb: Document messages affected by -gnatd.E including
14624         the new ones that relate to late definition of equality.
14625         * sem_ch6.adb (Check_Untagged_Equality): In Ada 2012 mode, if
14626         debug flag -gnatd.E is set, then generate warnings rather than
14627         errors.
14628         (Check_Untagged_Equality): In earlier versions of Ada,
14629         generate warnings if Warn_On_Ada_2012_Incompatibility flag is set.
14631 2014-01-22  Robert Dewar  <dewar@adacore.com>
14633         * sem_prag.adb (Usage_Error): Output additional messages for
14634         unconstrained OUT parameters lacking an input dependency.
14636 2014-01-22  Robert Dewar  <dewar@adacore.com>
14638         * sem_ch4.adb: Minor reformatting.
14640 2014-01-22  Robert Dewar  <dewar@adacore.com>
14642         * restrict.ads: Minor reformatting.
14643         * sem_res.adb (Resolve_Call): Check for SPARK_05 restriction that
14644         forbids a call from within a subprogram to the same subprogram.
14646 2014-01-22  Thomas Quinot  <quinot@adacore.com>
14648         * a-stream.ads (Read_SEA, Write_SEA): New subprograms, optimized
14649         stream attributes for Stream_Element_Array.
14650         * a-stream.adb (Read_SEA, Write_SEA): Bodies for the above.
14651         * rtsfind.adb (Check_CRT): Do not reject a reference to an entity
14652         defined in the current scope.
14654 2014-01-22  Robert Dewar  <dewar@adacore.com>
14656         * debug.adb, exp_ch4.adb, erroutc.adb: Minor reformatting.
14658 2014-01-22  Thomas Quinot  <quinot@adacore.com>
14660         * sem_ch7.adb, sem_ch8.adb, exp_ch3.adb: Minor reformatting.
14662 2014-01-22  Thomas Quinot  <quinot@adacore.com>
14664         * sem_ch3.adb (Analyze_Object_Declaration): For a constant
14665         declaration initialized with a function call, whose type
14666         has variable size, need to remove side effects so that the
14667         initialization expression becomes a dereference of a temporary
14668         reference to the function result.
14670 2014-01-22  Yannick Moy  <moy@adacore.com>
14672         * errout.adb (Initialize): Remove trick to add dummy entry
14673         in Warnings table.
14674         * erroutc.adb (Set_Warnings_Mode_Off,
14675         Set_Warnings_Mode_On): Do nothing if warnings are suppressed by
14676         command line switch.
14677         * opt.ads (Warning_Mode): Document behavior
14678         wrt pragma Warnings, in normal mode and in GNATprove_Mode.
14680 2014-01-22  Robert Dewar  <dewar@adacore.com>
14682         * sem_ch3.adb, errout.adb, erroutc.adb: Minor reformatting.
14684 2014-01-22  Robert Dewar  <dewar@adacore.com>
14686         * sem_ch13.adb (Check_Pool_Size_Clash): New procedure
14687         (Analyze_Attribute_Definition_Clause, case Storage_Pool): call
14688         Check_Pool_Size_Clash (Analyze_Attribute_Definition_Clause,
14689         case Storage_Size): call Check_Pool_Size_Clash.
14691 2014-01-22  Robert Dewar  <dewar@adacore.com>
14693         * sem_ch3.adb, exp_util.adb, sem_dim.adb, sem_elab.adb, sem_ch8.adb,
14694         sem_eval.ads: Minor reformatting.
14696 2014-01-22  Thomas Quinot  <quinot@adacore.com>
14698         * sem_eval.adb (Compile_Time_Known_Bounds): Return False for
14699         Any_Composite to prevent cascaded errors.
14701 2014-01-22  Yannick Moy  <moy@adacore.com>
14703         * errout.adb (Initialize): Do not insert special entry in Warnings
14704         table in GNATprove_Mode.
14705         * erroutc.adb (Set_Warnings_Mode_On): Add info in Warnings table in
14706         GNATprove_Mode.
14707         * gnat1drv.adb (Adjust_Global_Switches): Do not suppress frontend
14708         warnings anymore.
14710 2014-01-22  Robert Dewar  <dewar@adacore.com>
14712         * sem_prag.adb (Analyze_Initializes_In_Decl_Part): Handle null
14713         initializes case.
14715 2014-01-22  Robert Dewar  <dewar@adacore.com>
14717         * snames.ads-tmpl: Update header.
14719 2014-01-22  Thomas Quinot  <quinot@adacore.com>
14721         * exp_util.adb (Insert_Actions): When inserting actions on a
14722         short circuit operator that has already been analyzed, do not park
14723         actions in node; instead introduce an N_Expression_With_Actions
14724         and insert actions immediately.
14725         Add guard for unexpected case of climbing up through statement
14726         in Actions list of an N_Expression_With_Actions.
14727         * sem_elab.adb (Insert_Elab_Check): Remove complex
14728         specialized circuitry for the case where the context is already
14729         analyzed, as it is not needed and introduces irregularities in
14730         finalization. Instead rely on the above change to Insert_Actions
14731         to ensure that late insertion on short circuit operators works
14732         as expected.
14734 2014-01-22  Ed Schonberg  <schonberg@adacore.com>
14736         * sem_ch4.adb (Operator_Check): Improve error message when an
14737         operand of concatenation is an access type.
14739 2014-01-22  Thomas Quinot  <quinot@adacore.com>
14741         * sem_dim.adb (Analyze_Dimension_Identifier): Add guard against
14742         cascaded error.
14744 2014-01-22  Ed Schonberg  <schonberg@adacore.com>
14746         * sem_ch8.adb (Find_Selected_Component): Handle properly the case
14747         of an expanded name in a proper body, whose prefix is a package
14748         in the context of the proper body, when there is a homonym of
14749         the package declared in the parent unit.
14751 2014-01-22  Robert Dewar  <dewar@adacore.com>
14753         * sem_warn.adb (Check_Use_Clause): Don't give no entities used
14754         msg if errors found.
14755         (Check_One_Unit): Same change.
14757 2014-01-22  Robert Dewar  <dewar@adacore.com>
14759         * ug_words: Add missing/wrong entries for VMS warning switches.
14760         * sem_prag.adb (Check_Duplicate_Pragma): Avoid flagging parent type.
14762 2014-01-22  Jerome Guitton  <guitton@adacore.com>
14764         * mlib-tgt-specific-vxworks.adb (Get_Target_Suffix): Replace xscale by
14765         arm.
14767 2014-01-22  Robert Dewar  <dewar@adacore.com>
14769         * gnat_rm.texi, gnat_ugn.texi: Document passive task optimization
14771 2014-01-22  Eric Botcazou  <ebotcazou@adacore.com>
14773         * gcc-interface/Makefile.in: Minor fixes.
14775 2014-01-21  Robert Dewar  <dewar@adacore.com>
14777         * par-ch4.adb (P_If_Expression): Rewritten to improve error recovery.
14778         * par-ch5.adb (P_Condition): New version with expression prescanned.
14779         * par.adb (P_Condition): New version with expression prescanned.
14781 2014-01-21  Robert Dewar  <dewar@adacore.com>
14783         * gnat_rm.texi: Document that Allow_Integer_Address is ignored
14784         if Address is not a private type.
14785         * sem_prag.adb (Analyze_Pragma, case Allow_Integer_Address):
14786         Ignore pragma if System.Address is not a private type.
14788 2014-01-21  Arnaud Charlet  <charlet@adacore.com>
14790         * namet.ads (Name_Len): Initialize to 0 to avoid accessing an
14791         uninitialized value.
14793 2014-01-21  Thomas Quinot  <quinot@adacore.com>
14795         * gnat_rm.texi (Scalar_Storage_Order): Update documentation.
14797 2014-01-21  Ed Schonberg  <schonberg@adacore.com>
14799         * sem_ch12.adb (Set_Instance_Env): In Ada 2012 mode, preserve
14800         the value of Assertions_Enabled flag when compiling an instance of
14801         an internal unit. This facilitates the use of pre/postconditions
14802         in generic internal units, such as the new elementary function
14803         libraries.
14805 2014-01-21  Robert Dewar  <dewar@adacore.com>
14807         * exp_aggr.adb: Minor reformatting.
14808         * sem_attr.adb: Minor reformatting.
14809         * sem_res.adb: Minor comment addition.
14810         * einfo.adb: Minor comment updates.
14811         * freeze.adb: Minor reformatting and code reorganization.
14813 2014-01-21  Ed Schonberg  <schonberg@adacore.com>
14815         * par-ch4.adb (P_If_Expression): Handle more gracefully an
14816         elsif clause that does not have an else part.
14818 2014-01-21  Robert Dewar  <dewar@adacore.com>
14820         * checks.adb, sem_util.ads, sem_ch4.adb: Minor reformatting.
14821         * gcc-interface/Makefile.in: clean up target pairs.
14823 2014-01-21  Pascal Obry  <obry@adacore.com>
14825         * projects.texi: Minor typo fix.
14827 2014-01-21  Thomas Quinot  <quinot@adacore.com>
14829         * freeze.adb (Check_Component_Storage_Order): If a record type
14830         has an explicit Scalar_Storage_Order attribute definition clause,
14831         reject any component that itself is of a composite type and does
14832         not have one.
14834 2014-01-21  Ed Schonberg  <schonberg@adacore.com>
14836         * sem_ch10.adb (Generate_Parent_Reference): Make public so it
14837         can be used to generate proper cross-reference information for
14838         the parent units of proper bodies.
14840 2014-01-21  Thomas Quinot  <quinot@adacore.com>
14842         * exp_pakd.adb (Expand_Packed_Element_Set,
14843         Expand_Packed_Element_Reference): No byte swapping required in
14844         the front-end for the case of a reverse storage order array,
14845         as this is now handled uniformly in the back-end.  However we
14846         still need to swap back an extracted element if it is itself a
14847         nested composite with reverse storage order.
14849 2014-01-21  Hristian Kirtchev  <kirtchev@adacore.com>
14851         * sem_prag.adb (Analyze_External_Property): Add processing for "others".
14852         (Analyze_Pragma): Update the grammar of pragma Abstract_State to
14853         include "others".
14855 2014-01-21  Arnaud Charlet  <charlet@adacore.com>
14857         * gnat_ugn.texi: Minor updates.
14859 2014-01-21  Thomas Quinot  <quinot@adacore.com>
14861         * exp_pakd.adb: Update comment, minor reformatting.
14863 2014-01-21  Hristian Kirtchev  <kirtchev@adacore.com>
14865         * sem_ch3.adb (Analyze_Variable_Contract): Trigger the volatile
14866         object check when SPARK_Mode is on.
14867         * sem_ch6.adb (Process_Formals): Trigger the volatile object
14868         check when SPARK_Mode is on.
14869         * sem_ch12.adb (Instantiate_Object): Trigger the volatile object
14870         check when SPARK_Mode is on.
14871         * sem_ch13.adb (Analyze_Aspect_Specifications): Insert the
14872         corresponding pragma of aspect SPARK_Mode in the visible
14873         declarations of a package declaration.
14874         * sem_prag.adb (Analyze_Pragma): Trigger the volatile object
14875         check when SPARK_Mode is on.
14876         * sem_res.adb (Resolve_Actuals): Trigger the volatile object
14877         check when SPARK_Mode is on.
14878         (Resolve_Entity_Name): Trigger
14879         the volatile object check when SPARK_Mode is on.
14881 2014-01-21  Robert Dewar  <dewar@adacore.com>
14883         * sem_ch3.adb, sem_prag.adb, sem_prag.ads, sem_ch12.adb, sem_res.adb,
14884         sem_ch6.adb, a-except-2005.adb: Minor reformatting.
14886 2014-01-21  Ed Schonberg  <schonberg@adacore.com>
14888         * exp_ch3.adb (Expand_N_Object_Declaration): When a class-wide
14889         object is declared, it is rewritten as a renaming of an dynamic
14890         expression that wraps the initial value.  The renaming declaration
14891         is first given an internal name, to prevent collisions with the
14892         entity already declared, and then the name is modified to reflect
14893         the original one. the modification of the name must preserve
14894         the source location of the original, to prevent spurious errors
14895         when compiling with style checks if the declaration involves
14896         more than one entity.
14898 2014-01-21  Hristian Kirtchev  <kirtchev@adacore.com>
14900         * aspects.adb Add entries for Async_Readers, Async_Writers,
14901         Effective_Reads and Effective_Writes in table Canonical_Aspect.
14902         * aspects.ads Add entries for Async_Readers, Async_Writers,
14903         Effective_Reads and Effective_Writes in tables Aspect_Id,
14904         Aspect_Names, Aspect_Delay and Implementation_Defined_Aspect.
14905         * atree.adb (Ekind_In): New version with 8 parameters.
14906         (Node34): New routine.
14907         (Set_Node34): New routine.
14908         * atree.ads (Ekind_In): New version with 8 parameters.
14909         (Node34): New routine.
14910         (Set_Node34): New routine.
14911         * einfo.adb Contract is now Node34.
14912         (Contract): Update the assertion and node usage.
14913         (Get_Pragma): Include pragmas Async_Readers, Async_Writers,
14914         Effective_Reads and Effective_Writes.
14915         (Set_Contract): Update the assertion and node usage.
14916         (Write_Field24_Name): Remove the output for a contract.
14917         (Write_Field34_Name): Add output for a contract.
14918         * einfo.ads Contract is now Node34. Update the comment on
14919         attribute usage and related node structures.
14920         (Get_Pragma): Update the comment on usage.
14921         * par-prag.adb (Prag): Pragmas Async_Readers, Async_Writers,
14922         Effective_Reads and Effective_Writes do not require special
14923         processing by the parser.
14924         * sem_ch3.adb (Analyze_Variable_Contract): New routine.
14925         (Analyze_Declarations): Analyze the contract of a variable at
14926         the end of the declarative region.
14927         (Analyze_Object_Declaration): Create a contract for a variable.
14928         * sem_ch6.adb (Analyze_Subprogram_Contract): Update the retrieval
14929         of classification pragmas.
14930         (Process_Formals): Detect an illegal
14931         use of a volatile object as a formal in a function.
14932         * sem_ch12.adb (Instantiate_Object): Detect an illegal use of
14933         a volatile object as an actual in generic instantiation.
14934         * sem_prag.adb Add entries for Async_Readers, Async_Writers,
14935         Effective_Reads and Effective_Writes in table Sig_Flags.
14936         (Analyze_External_State_In_Decl_Part): New routine.
14937         (Analyze_Global_Item): Detect an illegal use of a volatile object
14938         as a global item of a function.
14939         (Analyze_Pragma): Reimplement
14940         pragma Abstract_State. Add support for pragmas Async_Readers,
14941         Async_Writers, Effective_Reads and Effective_Writes.
14942         (Check_External_Properties): New routine.
14943         * sem_prag.ads (Analyze_External_State_In_Decl_Part): New routine.
14944         (Check_External_Properties): New routine.
14945         * sem_res.adb (Resolve_Actuals): Detect an illegal use of a
14946         volatile object as an actual in a call.
14947         (Resolve_Entity_Name):
14948         Add local variables Par, Prev and Usage_OK. Detect illegal
14949         contexts of volatile objects.
14950         * sem_util.adb (Add_Contract_Item): Add support for
14951         pragmas associated with the contract of a variable.
14952         (Async_Readers_Enabled): New routine.
14953         (Async_Writers_Enabled): New routine.
14954         (Effective_Reads_Enabled): New routine.
14955         (Effective_Writes_Enabled): New routine.
14956         (Has_Enabled_Property):
14957         New routine.
14958         (Is_Unchecked_Conversion_Instance): New routine.
14959         (Is_Volatile_Object): Add support for entities that may denote
14960         a volatile object.
14961         * sem_util.ads (Add_Contract_Item): Update the
14962         comment on usage.
14963         (Async_Readers_Enabled): New routine.
14964         (Async_Writers_Enabled): New routine.
14965         (Effective_Reads_Enabled): New routine.
14966         (Effective_Writes_Enabled): New routine.
14967         (Is_Unchecked_Conversion_Instance): New routine.
14968         * sinfo.ads Update the comment on the structure of N_Contract.
14969         * snames.ads-tmpl Add predefined names for Async_Readers,
14970         Async_Writers, Effective_Reads and Effective_Writes. Add
14971         pragma ids for Async_Readers, Async_Writers, Effective_Reads
14972         and Effective_Writes.
14974 2014-01-21  Robert Dewar  <dewar@adacore.com>
14976         * exp_ch4.adb (Eval_Op_Expon): Use CRT_Safe_Compile_Time_Known_Value
14977         * sem_eval.adb (Compile_Time_Known_Value): Remove special
14978         handling of CRT mode (CRT_Safe_Compile_Time_Known_Value): New
14979         function (Eval_Op_Expon): Add CRT_Safe in call to Test_Foldable
14980         (Test_Foldable): Add CRT_Safe parameter
14981         * sem_eval.ads (Compile_Time_Known_Value): Remove special
14982         handling of CRT mode.
14983         (CRT_Safe_Compile_Time_Known_Value): New function.
14985 2014-01-21  Robert Dewar  <dewar@adacore.com>
14987         * sem_prag.adb (Analyze_Pragma, case SPARK_Mode): Fix problem
14988         with pragma or aspect that applies to package spec or subprogram
14989         spec.
14991 2014-01-21  Robert Dewar  <dewar@adacore.com>
14993         * exp_aggr.adb: Minor reformatting.
14995 2014-01-21  Johannes Kanig  <kanig@adacore.com>
14997         * gnat1drv.adb (Gnat1drv) remove obsolete reference to -gnatd.H.
14999 2014-01-21  Bob Duff  <duff@adacore.com>
15001         * gnat_ugn.texi: Document the "checks" attribute in gnat2xml.
15003 2014-01-21  Steve Baird  <baird@adacore.com>
15005         * gnat_rm.texi: Improve description of SPARK_Mode pragma.
15007 2014-01-21  Vincent Celier  <celier@adacore.com>
15009         * prj-part.adb (Parse_Single_Project): Accept to extend a project
15010         if it has only be imported by an project being extended. When a
15011         project that has only been imported by a project being extended
15012         is imported by another project that is not being extended,
15013         reset the previous indication, so that it will be an error if
15014         this project is extended later.
15015         * prj-tree.adb (Create_Project): Include component From_Extended
15016         in table Projects_HT
15017         * prj-tree.ads (Project_Name_And_Node): New Boolean component
15018         From_Extended
15020 2014-01-21  Robert Dewar  <dewar@adacore.com>
15022         * atree.ads, atree.adb: Add Node33 and Set_Node33.
15023         * einfo.ads, einfo.adb (SPARK_Pragma): New field (SPARK_Aux_Pragma):
15024         New field (SPARK_Pragma_Inherited): New flag
15025         (SPARK_Aux_Pragma_Inherited): New flag (SPARK_Mode_Pragmas):
15026         Removed.
15027         * lib.ads, lib.adb: Remove SPARK_Mode_Pragma, no longer used.
15028         * opt.ads (SPARK_Mode_Pragma): New global variable.
15029         * sem.ads: Add Save_SPARK_Mode_Pragma field to Scope_Stack_Entry.
15030         * sem_ch3.adb: Use new SPARK_Mode data structures.
15031         * sem_ch6.adb: Set SPARK_Mode fields in subprogram specs and bodies.
15032         * sem_ch7.adb: Set SPARK_Mode fields in package spec and body entities.
15033         * sem_ch8.adb (Push_Scope): Save SPARK_Mode_Pragma.
15034         (Pop_Scope): Restore SPARK_Mode_Pragma.
15035         * sem_prag.adb (Analyze_Pragma, case SPARK_Mode): Rewrite for
15036         new data structures.
15038 2014-01-21  Arnaud Charlet  <charlet@adacore.com>
15040         * back_end.adb: Undo previous change, not needed. Minor reformatting.
15042 2014-01-21  Thomas Quinot  <quinot@adacore.com>
15044         * exp_ch5.adb: Fix comment.
15045         * switch-c.adb: Minor comment update.
15046         * exp_ch3.adb: Minor reformatting.
15048 2014-01-21  Arnaud Charlet  <charlet@adacore.com>
15050         * back_end.adb (Scan_Compiler_Arguments): Do not store object
15051         filename in gnatprove mode.
15053 2014-01-21  Thomas Quinot  <quinot@adacore.com>
15055         * sinfo.ads (No_Ctrl_Actions): Clarify documentation (flag also
15056         suppresses usage of primitive _assign for tagged types).
15057         * exp_aggr.adb (Build_Array_Aggr_Code.Gen_Assign): Set
15058         No_Ctrl_Actions for a tagged type that does not require
15059         finalization, as we want to disable usage of _assign (which
15060         may cause undesirable discriminant checks on an uninitialized,
15061         invalid target).
15063 2014-01-21  Ed Schonberg  <schonberg@adacore.com>
15065         * sem_prag.adb: Reject invariant'class on completion.
15067 2014-01-21  Javier Miranda  <miranda@adacore.com>
15069         * exp_ch3.adb (Build_Init_Procedure): For
15070         derivations of interfaces, do not move the the initialization
15071         of the _parent field since such assignment is not generated.
15073 2014-01-21  Ed Schonberg  <schonberg@adacore.com>
15075         * sem_res.adb (Rewrite_Renamed_Operator): Do not replace entity
15076         with the operator it renames if we are within an expression of
15077         a pre/postcondition, because the expression will be reanalyzed
15078         at a later point, and the analysis of the renaming may affect
15079         the visibility of the operator when in an instance.
15081 2014-01-21  Robert Dewar  <dewar@adacore.com>
15083         * sinfo.ads, sinfo.adb: Change Do_Discriminant_Check to use new Flag1.
15084         Add this flag to type conversion nodes and assignment nodes.
15085         * treepr.adb: Deal properly with Flag 1,2,3.
15086         * treeprs.adt: Minor comment update.
15088 2014-01-21  Robert Dewar  <dewar@adacore.com>
15090         * sem_eval.adb (Compile_Time_Known_Value): Add Ignore_CRT
15091         parameter.
15092         * sem_eval.ads (Compile_Time_Known_Value): Add Ignore_CRT
15093         parameter, completely rewrite spec.
15095 2014-01-21  Ed Schonberg  <schonberg@adacore.com>
15097         * sem_ch10.adb (Install_Withed_Unit): If the unit is a subprogram
15098         instance that is inlined, it may have been rewritten as a wrapper
15099         package. In that case the unit that must be made visible is the
15100         related instance of the package.
15102 2014-01-21  Arnaud Charlet  <charlet@adacore.com>
15104         * exp_ch9.adb (Expand_N_Selective_Accept.Add_Accept): Refine
15105         previous change in codepeer mode.
15107 2014-01-21  Arnaud Charlet  <charlet@adacore.com>
15109         * exp_ch9.adb (Expand_N_Selective_Accept.Add_Accept): Always add
15110         call to Abort_Undefer, as expected by the runtime.
15111         * s-tasren.adb (Local_Complete_Rendezvous): Replace
15112         Defer_Abort_Nestable by Defer_Abort, since we do not expect abort to be
15113         deferred at this point. Update comments.
15115 2014-01-21  Thomas Quinot  <quinot@adacore.com>
15117         * exp_ch4.adb, exp_ch5.adb, checks.adb: Minor reformatting.
15119 2014-01-21  Arnaud Charlet  <charlet@adacore.com>
15121         * switch-c.adb, usage.adb, gnat_ugn.texi: Mark -gnates as internal,
15122         remove from doc.
15124 2014-01-21  Robert Dewar  <dewar@adacore.com>
15126         * switch-c.adb, usage.adb, atree.adb, atree.ads: Minor reformatting.
15128 2014-01-21  Thomas Quinot  <quinot@adacore.com>
15130         * atree.adb, atree.ads (Num_Extension_Nodes): Switch to Node_Id, since
15131         this is value is used in Node_Id arithmetic operations.
15132         (Copy_Node, Exchange_Entities): Use loops indexed by Num_Extension_Nodes
15133         instead of hard-coded unrolled code.
15135 2014-01-21  Yannick Moy  <moy@adacore.com>
15137         * gnat1drv.adb: Minor code cleanup, removing useless code.
15139 2014-01-21  Arnaud Charlet  <charlet@adacore.com>
15141         * opt.ads (SPARK_Switches_File_Name): New.
15142         * switch-c.adb (Scan_Front_End_Switches): Add handling of -gnates=xxx *
15143         * usage.adb (Usage): Document -gnates, in gnatprove mode only.
15144         * gnat_ugn.texi: Document -gnates.
15146 2014-01-21  Yannick Moy  <moy@adacore.com>
15148         * errout.adb (Special_Msg_Delete): Update comment. Remove
15149         special case for GNATprove which should not ignore mismatch
15150         in sizes for representation clauses.
15151         * sem_prag.adb (Analyze_Pragma): Remove special case for GNATprove
15152         which should not ignore pragma Pack.
15154 2014-01-21  Ed Schonberg  <schonberg@adacore.com>
15156         * sem_ch4.adb: Code clean up.
15158 2014-01-21  Steve Baird  <baird@adacore.com>
15160         * gnat_rm.texi: Improve GNAT RM description of SPARK_Mode pragma.
15162 2014-01-21  Robert Dewar  <dewar@adacore.com>
15164         * gcc-interface/gigi.h: Get Flags array address.
15165         * gcc-interface/trans.c: Acquire Flags array address.
15166         * atree.adb: Add support for Flags array and Flag0,1,2,3.
15167         * atree.ads: Add support for Flags array and Flag0,1,2,3.
15168         * atree.h: Add support for Flags array and Flag0,1,2,3.
15169         * back_end.adb: Pass Flags array address to gigi.
15171 2014-01-21  Ed Schonberg  <schonberg@adacore.com>
15173         * sem_ch8.adb (Attribute_Renaming): Transfer original attribute
15174         reference to generated body so that legality checks on stream
15175         attributes are properly applied. If type is tagged and already
15176         frozen, insert generated body at the point of the renaming
15177         declaration.
15179 2014-01-21  Ed Schonberg  <schonberg@adacore.com>
15181         * sem_ch12.adb: Code clean up.
15182         * sem_ch8.adb: Minor reformatting
15184 2014-01-20  Robert Dewar  <dewar@adacore.com>
15186         * checks.adb: Check SPARK_Mode instead of GNATProve_Mode for
15187         converting warnings on inevitable exceptions to errors.
15188         * exp_ch4.adb: Check SPARK_Mode instead of GNATProve_Mode for
15189         converting warnings on inevitable exceptions to errors.
15190         * opt.adb (SPARK_Mode_Config): Handled like other config flags
15191         * opt.ads (SPARK_Mode_Type): Moved here from types (renamed from
15192         SPARK_Mode_Id) (SPARK_Mode_Type): Add pragma Ordered, remove
15193         SPARK_ from names (SPARK_Mode): New flag (SPARK_Mode_Config):
15194         New flag (Config_Switches_Type): Add SPARK_Mode field
15195         * sem.adb: Minor code reorganization (remove unnecessary with)
15196         * sem.ads (Scope_Stack_Entry): Add Save_SPARK_Mode field
15197         * sem_aggr.adb: Check SPARK_Mode instead of GNATProve_Mode for
15198         converting warnings on inevitable exceptions to errors.
15199         * sem_attr.adb: Check SPARK_Mode instead of GNATProve_Mode for
15200         converting warnings on inevitable exceptions to errors.
15201         * sem_ch3.adb: Check SPARK_Mode instead of GNATProve_Mode for
15202         converting warnings on inevitable exceptions to errors.
15203         * sem_ch4.adb: Check SPARK_Mode instead of GNATProve_Mode for
15204         converting warnings on inevitable exceptions to errors.
15205         * sem_ch6.adb (Analyze_Subprogram_Body_Helper): Reset SPARK_Mode
15206         from spec if needed
15207         * sem_ch7.adb (Analyze_Package_Body_Helper): Reset SPARK_Mode
15208         from spec if needed
15209         * sem_ch8.adb (Push_Scope): Save SPARK_Mode (Pop_Scope):
15210         Restore SPARK_Mode
15211         * sem_elab.adb: Check SPARK_Mode instead of GNATProve_Mode for
15212         converting warnings on inevitable exceptions to errors.
15213         * sem_prag.adb (Get_SPARK_Mode_From_Pragma): New function
15214         (Get_SPARK_Mode_Id): Removed (Get_SPARK_Mode_Type): New name
15215         of Get_SPARK_Mode_Id
15216         * sem_prag.ads (Get_SPARK_Mode_From_Pragma): New function
15217         * sem_res.adb: Check SPARK_Mode instead of GNATProve_Mode for
15218         converting warnings on inevitable exceptions to errors.
15219         * sem_util.adb: Check SPARK_Mode instead of GNATProve_Mode for
15220         converting warnings on inevitable exceptions to errors.
15221         * types.ads (SPARK_Mode_Id): Moved to opt.ads and renamed
15222         SPARK_Mode_Type
15224 2014-01-20  Ed Schonberg  <schonberg@adacore.com>
15226         * sem_ch13.adb: Add semantic information to rewritten type
15227         reference.
15229 2014-01-20  Ed Schonberg  <schonberg@adacore.com>
15231         * exp_ch5.adb (Expand_N_Assignment_Statement): If both sides
15232         are of a type with unknown discriminants, convert both to the
15233         underlying view of the type, so that the proper constraint check
15234         can be applied to the right-hand side.
15236 2014-01-20  Robert Dewar  <dewar@adacore.com>
15238         * atree.adb (Copy_Node): Fix failure to copy last component
15239         (Exchange_Entities): Fix failure to exchange last entity
15241 2014-01-20  Ed Schonberg  <schonberg@adacore.com>
15243         * sem_ch12.adb: Code clean up.
15245 2014-01-20  Robert Dewar  <dewar@adacore.com>
15247         * gnat_rm.texi, sem_ch4.adb: Minor reformatting.
15249 2014-01-20  Ed Schonberg  <schonberg@adacore.com>
15251         * sem_ch4.adb (Analyze_Quantified_Expression): If after
15252         pre-analysis  the loop parameter specification has been
15253         rewritten as a iterator specification, propagate the change to
15254         the quantified expression, for ASIS navigtion needs.
15256 2014-01-20  Vincent Celier  <celier@adacore.com>
15258         * par-ch10.adb: Minor error message change: escape [ and ].
15260 2014-01-20  Robert Dewar  <dewar@adacore.com>
15262         * checks.adb: Make warnings on exceptions into errors in GNATprove mode.
15263         * errout.adb: Implement [ and ] insertion characters.
15264         * errout.ads: Document new [ and ] insertion characters.
15265         * sem_ch12.adb, restrict.adb, frontend.adb, exp_ch7.adb: Minor
15266         addition of ??? comment.
15267         * lib-xref.adb, exp_util.adb, gnat1drv.adb: Minor reformatting
15268         * exp_ch4.adb, sem_ch3.adb, sem_ch4.adb, sem_ch6.adb, sem_elab.adb,
15269         sem_eval.adb, sem_res.adb, sem_util.adb, sem_attr.adb, sem_aggr.adb:
15270         Make warnings on exceptions into errors in GNATprove mode.
15271         * sem_dim.adb: Minor reformatting throughout Quote [ and ]
15272         in error messages.
15274 2014-01-20  Ed Schonberg  <schonberg@adacore.com>
15276         * sem_ch13.adb: Code clean up.
15278 2014-01-20  Robert Dewar  <dewar@adacore.com>
15280         * errout.ads, errout.adb: Implement >? >x? >X? sequences in error
15281         messages.
15282         * sem_ch6.adb (Check_Statement_Sequence): Missing return is an
15283         error in GNATprove mode.
15285 2014-01-20  Ed Schonberg  <schonberg@adacore.com>
15287         * par-ch4.adb (Is_Parameterless_Attribute): The Ada2012 attribute
15288         reference 'Old takes no parameters, and thus can appear as a
15289         prefix of a slice.
15291 2014-01-20  Eric Botcazou  <ebotcazou@adacore.com>
15293         * exp_aggr.adb: Fix minor typos.
15295 2014-01-20  Ed Schonberg  <schonberg@adacore.com>
15297         * sem_attr.adb (Analyze_Attribute, case 'Constrained): In an
15298         instance the attribute is legal, and its value is determined
15299         statically if the type has no discriminants. This choice is
15300         more useful than rechecking the legality rule in the instance,
15301         is consistent with older usage, and is also consistent with all
15302         existing tests.
15304 2014-01-20  Arnaud Charlet  <charlet@adacore.com>
15306         * sem_cat.adb (Validate_Static_Object_Name): Change error into
15307         warning in Relaxed_Semantic_Mode.
15309 2014-01-20  Ed Schonberg  <schonberg@adacore.com>
15311         * sem_attr.adb: Code and comments cleanup.
15313 2014-01-20  Yannick Moy  <moy@adacore.com>
15315         * debug.adb Free debug flags -gnatd.D, -gnatd.G and -gnatd.V *
15316         * errout.adb (Compilation_Errors): Remove special handling in
15317         GNATprove mode.
15318         * gnat1drv.adb (Adjust_Global_Switches): Remove handling of the
15319         removed debug flags.
15320         * gnat_rm.texi: Initial documentation for Abstract_State, Depends,
15321         Global, Initial_Condition, Initializes and Refined_State pragmas and
15322         aspects.
15323         * opt.ads (Frame_Condition_Mode, Formal_Extensions,
15324         SPARK_Strict_Mode): Remove global flags.
15325         * sem_ch3.adb (Analyze_Object_Declaration): Check of no hidden state
15326         always performed now, on packages declaring a null state.
15327         (Signed_Integer_Type_Declaration): Remove ill-designed attempt
15328         at providing pedantic mode for bounds of integer types.
15329         * sem_ch4.adb (Analyze_Quantified_Expression): Warning on suspicious
15330         "some" quantified expression now issued under control of -gnatw.t,
15331         like the other warning on unused bound variable.
15332         * sem_prag.adb (Check_Precondition_Postcondition): Remove useless test
15333         on removed flag.
15334         (Analyze_Pragma): Remove tests for SPARK 2014
15335         pragmas, not officially allowed by GNAT.
15337 2014-01-20  Hristian Kirtchev  <kirtchev@adacore.com>
15339         * sem_prag.adb (Analyze_Pragma): Ensure that
15340         the sole argument of pragmas Abstract_State, Contract_Cases,
15341         Depends, Global and Initializes in in aggregate form.
15342         (Analyze_Refined_Pragma): Ensure that the sole argument of
15343         pragmas Refined_Depends, Refined_Global and Refined_State is in
15344         aggregate form.
15345         (Ensure_Aggregate_Form): New routine.
15347 2014-01-20  Doug Rupp  <rupp@adacore.com>
15349         * sem_attr.adb (Analyze_Attribute): case
15350         Attribute_Constrained => treat all prefixes as legal for Declib
15351         compatibility.
15353 2014-01-20  Hristian Kirtchev  <kirtchev@adacore.com>
15355         * sem_prag.adb (Check_Mode): Reimplement the routine.
15356         (Find_Mode): New routine.
15358 2014-01-20  Robert Dewar  <dewar@adacore.com>
15360         * sem_ch4.adb (Operator_Check): Handle additional
15361         Allow_Integer_Address cases.
15363 2014-01-20  Robert Dewar  <dewar@adacore.com>
15365         * gnat_rm.texi (Allow_Integer_Address): Remove note about not
15366         allowed if address is non-private, no longer true.
15367         * sem_prag.adb (Analyze_Pragma, case Allow_Integer_Address):
15368         Remove check for address being private, causes difficulty when
15369         pragma used in gnat.adc file and is not needed, since we guard
15370         this in Address_Integer_Convert_OK.
15371         * exp_ch7.adb: Minor reformatting.
15372         * sem_ch4.adb: Handle operator operands in Allow_Integer_Address mode.
15374 2014-01-20  Robert Dewar  <dewar@adacore.com>
15376         * checks.adb (Apply_Range_Check): Remove gnatprove special
15377         casing of exponentiation.
15378         * sem_res.adb (Resolve_Op_Expon): Apply range check to right
15379         operand for integer case to check range against Natural.
15381 2014-01-20  Robert Dewar  <dewar@adacore.com>
15383         * s-tataat.adb: Minor reformatting.
15385 2014-01-20  Robert Dewar  <dewar@adacore.com>
15387         * einfo.adb (Is_Descendent_Of_Address): Now applies to all
15388         entities, and also fix documentation to remove mention of visible
15389         integer type, since this is not what the implementation does.
15390         * einfo.ads (Is_Descendent_Of_Address): Now applies to all
15391         entities, and also fix documentation to remove mention of visible
15392         integer type, since this is not what the implementation does.
15393         * gnat_rm.texi: Minor clarification of Allow_Integer_Address
15394         function.
15395         * sem_ch4.adb (Analyze_One_Call): Handle Allow_Integer_Address
15396         case for parameter type check.
15397         * sem_res.adb (Resolve): Use new function
15398         Address_Integer_Convert_OK.
15399         * sem_type.adb: Minor code reorganization (use Ekind_In) Minor
15400         reformatting throughout.
15401         * sem_util.adb (Address_Integer_Convert_OK): New function.
15402         * sem_util.ads: Minor reformatting (put specs in alpha order)
15403         (Address_Integer_Convert_OK): New function.
15405 2014-01-20  Thomas Quinot  <quinot@adacore.com>
15407         * exp_ch7.adb (Wrap_Transient_Expression):
15408         Insertion extra conditional expression only if
15409         Opt.Suppress_Control_Flow_Optimizations is set.
15411 2014-01-20  Arnaud Charlet  <charlet@adacore.com>
15413         * s-tataat.adb (Initialize_Attributes): Abort might already be
15414         deferred in Create_Task.
15416 2014-01-20  Hristian Kirtchev  <kirtchev@adacore.com>
15418         * checks.adb (Apply_Scalar_Range_Check): Flag
15419         the exponent as requiring a range check when the expression is
15420         an exponentiation.
15422 2014-01-20  Fedor Rybin  <frybin@adacore.com>
15424         * gnat_ugn.texi: Documenting --passed-tests option for gnattest.
15426 2014-01-20  Hristian Kirtchev  <kirtchev@adacore.com>
15428         * sem_util.adb (Default_Initialization): New routine.
15429         * sem_util.ads: Add new type Default_Initialization_Kind.
15430         (Default_Initialization): New routine.
15432 2014-01-20  Hristian Kirtchev  <kirtchev@adacore.com>
15434         * sem_prag.adb (Check_Mode): Correct all error
15435         message logic dealing with in/in out parameters that may appear
15436         as inputs or have a self reference.
15438 2014-01-20  Robert Dewar  <dewar@adacore.com>
15440         * exp_ch9.adb, checks.adb, exp_intr.adb: Minor reformatting.
15441         * sem_res.adb (Resolve): Fix error causing infinite loop for
15442         integer used as address. Allow addresses as integers.
15444 2014-01-20  Arnaud Charlet  <charlet@adacore.com>
15446         * s-osinte-linux.ads (struct_sigaction): Fix rep clause.
15448 2014-01-20  Bob Duff  <duff@adacore.com>
15450         * par-ch8.adb (P_Use_Type_Clause): Detect syntax
15451         error when "use all" is not followed by "type".
15453 2014-01-20  Bob Duff  <duff@adacore.com>
15455         * exp_intr.adb (Expand_Unc_Deallocation): Remove warning on abort
15456         followed by free.
15458 2014-01-20  Ed Schonberg  <schonberg@adacore.com>
15460         * checks.adb (Apply_Address_Clause_Check): If there is an
15461         alignment check on the expression in an address clause, and there
15462         is no local exception propagation, add an additional explanatory
15463         message to clarify the cause of previous warning.
15465 2014-01-20  Robert Dewar  <dewar@adacore.com>
15467         * exp_ch7.adb: Minor reformatting.
15468         * opt.ads: Minor comment updates.
15469         * sem.adb: Minor name change Is_Main_Unit =>
15470         Is_Main_Unit_Or_Main_Unit_Spec.
15471         * sem_ch6.adb: Minor reformatting and code reorganization.
15473 2014-01-20  Bob Duff  <duff@adacore.com>
15475         * gnat_ugn.texi: Update gnatpp switches.
15477 2014-01-20  Thomas Quinot  <quinot@adacore.com>
15479         * exp_ch9.adb: Minor comment edit.
15481 2014-01-20  Robert Dewar  <dewar@adacore.com>
15483         * gnat_rm.texi: Document that Allow_Integer_Address is permitted
15484         only if System.Address is a private type.
15485         * opt.ads (Allow_Integer_Address): No longer set by -gnates.
15486         * sem_prag.adb (Analyze_Pragma, case Allow_Integer_Address):
15487         Allowed only if type System.Address is private, since otherwise
15488         it makes no sense.
15489         * sem_res.adb: Fix failure to properly Analyze unchecked
15490         conversions that were introduced by Allow_Integer_Address.
15491         * switch-c.adb: Remove -gnates switch.
15492         * usage.adb: Remove -gnates switch.
15493         * gnat_ugn.texi: Remove documentation of -gnates flag.
15495 2014-01-20  Ed Schonberg  <schonberg@adacore.com>
15497         * sem_ch6.adb (Analyze_Expression_Function): Pre-analyze and
15498         resolve expression to perform proper name capture.
15500 2014-01-20  Ed Schonberg  <schonberg@adacore.com>
15502         * sem.adb (Semantics): When saving/restoring configuration
15503         switches, the spec of a pre- defined unit that is the main unit
15504         must be treated as a predefined unit as well.
15506 2014-01-20  Thomas Quinot  <quinot@adacore.com>
15508         * exp_ch7.adb (Wrap_Transient_Expression): For a Boolean
15509         expression, insert an extra conditional expression when saving
15510         the value of the expression, for the benefit of control flow
15511         graph based coverage analysis.
15512         * exp_ch3.adb: Minor reformatting.
15514 2014-01-20  Robert Dewar  <dewar@adacore.com>
15516         * gnat1drv.adb: Set Allow_Integer_Address in relaxed semantics mode.
15517         * gnat_rm.texi: Document pragma Allow_Integer_Address.
15518         * gnat_ugn.texi: Document pragma Allow_Integer_Address, -gnates.
15519         * opt.ads: New flag Allow_Integer_Address.
15520         * par-prag.adb: Dummy entry for pragma Allow_Integer_Address.
15521         * sem_ch5.adb: Minor reformatting.
15522         * sem_prag.adb: Implement pragma Allow_Integer_Address.
15523         * sem_res.adb (Resolve): Allow integer address value if
15524         switch set.
15525         * sem_util.adb: Minor reformatting.
15526         * snames.ads-tmpl: Add entry for pragma Allow_Integer_Address.
15527         * switch-c.adb: Recognize flag -gnates.
15528         * usage.adb: Document flag -gnates.
15530 2014-01-20  Thomas Quinot  <quinot@adacore.com>
15532         * s-tadeca.adb: Fix minor typos in comment.
15534 2014-01-20  Pascal Obry  <obry@adacore.com>
15536         * s-win32.ads (FreeLibrary): New import.
15538 2014-01-20  Robert Dewar  <dewar@adacore.com>
15540         * sem_res.adb, sem_cat.adb: Minor reformatting.
15541         * sem_ch11.adb (Analyze_Raise_Statement): Only give warning about
15542         assigning to OUT parameters for the current subprogram scope.
15543         * exp_ch4.adb: Minor reformatting.
15545 2014-01-20  Ed Schonberg  <schonberg@adacore.com>
15547         * exp_ch4.adb (Process_Transient_Object,
15548         Find_Enclosing_Contexts): If the top-level if-expression that
15549         generated the transient object is an actual in a call, the proper
15550         Hook_Context is a construct enclosing the call.
15551         * einfo.ads: Indicate that Related_Expression is used to link a
15552         loop variable to the container expression over which the loop
15553         takes place.
15554         (Analyze_Iterator_Specification): Set the Related_Expression of
15555         the loop variable in a container element iterator.
15556         (Note_Possible_Modification): If the variable is the loop
15557         variable in a container element iterator, indicate that the
15558         enclosing container is also modified.
15560 2014-01-20  Hristian Kirtchev  <kirtchev@adacore.com>
15562         * aspects.adb (Move_Or_Merge_Aspects): Reimplemented.
15564 2014-01-20  Robert Dewar  <dewar@adacore.com>
15566         * s-taasde.ads, gnat_ugn.texi, s-tadeca.adb, sem_res.adb, s-tadeca.ads:
15567         Minor reformatting and code clean up.
15569 2014-01-20  Arnaud Charlet  <charlet@adacore.com>
15571         * sem_cat.adb (Validate_Object_Declaration): Relax semantics
15572         of objects of private type if Relaxed_RM_Semantics.
15574 2014-01-20  Claire Dross  <dross@adacore.com>
15576         * a-cofove.ads (Vector): Capacity discriminant
15577         should be in range of the index.
15579 2014-01-20  Thomas Quinot  <quinot@adacore.com>
15581         * a-caldel.ads(To_Duration), s-taasde.ads(Time_Enqueue):
15582         Clarify specs s-tadeca.adb(Enqueue_Calendar): Compensate for
15583         possible difference between epoch of Ada.Calendar clock and Ada
15584         real-time/tasking clock.
15585         * s-taprop-posix.adb: Minor comment fix.
15587 2014-01-20  Doug Rupp  <rupp@adacore.com>
15589         * sysdep.c [vxworks]: Remove Vxworks version noise for RTP.
15591 2014-01-20  Hristian Kirtchev  <kirtchev@adacore.com>
15593         * exp_attr.adb (Expand_N_Attribute_Reference): Generate validity
15594         checks on the prefix of attribute 'Old.
15595         * sem_ch3.adb (Process_Range_Expr_In_Decl): Suppress the
15596         generation of validity checks on a range that belongs to the
15597         iteration scheme of a quantified expression.
15598         * sem_ch5.adb (One_Bound): Suppress the generation of validity
15599         checks on a bound that belongs to the iteration scheme of a
15600         quantified expression, generate the check in all other cases.
15602 2014-01-20  Bob Duff  <duff@adacore.com>
15604         * gnat_ugn.texi: Enable --pp-new by default. Minor reorganization.
15606 2014-01-20  Ed Schonberg  <schonberg@adacore.com>
15608         * sem_res.adb (Resolve): When compiling a predefined unit, ignore
15609         interpretations that do not come from other predefined units,
15610         to prevent spurious ambiguities in the presence of user-defined
15611         operators in the context of (an instance of) a predefined unit.
15613 2014-01-20  Robert Dewar  <dewar@adacore.com>
15615         * gnat_rm.texi: Document that Loop_Variant is included in
15616         Statement_Assertions.
15617         * sem_prag.adb (Check_Kind): Add Loop_Variant to
15618         Statement_Assertions (Check_Applicable_Policy): Add Loop_Variant
15619         to Statement_Assertions.
15621 2014-01-20  Doug Rupp  <rupp@adacore.com>
15623         * sysdep.c (__gnat_is_file_not_found_error) [vxworks6]: Add case
15624         for errno ENOENT from RTP on NFS mounted file system.
15626 2014-01-20  Ed Schonberg  <schonberg@adacore.com>
15628         * sem_util.adb (Check_Function_Writable_Actuals): 1) Do not
15629         examine code that does not come from source. The check does not
15630         apply to code generated for constraint checks, and such code may
15631         generate spurious error messages when compiled with expansion
15632         disabled (as in a generic unit) because side effects may not
15633         have been removed.
15634         2) Make error messages more explicit: indicate the component
15635         of the  construct whose value is indeterminate because of a
15636         call to a function with in-out parameter in another component,
15637         when there is no mandated order of execution between the two
15638         components (actuals, aggregate components, alternatives).
15640 2014-01-20  Robert Dewar  <dewar@adacore.com>
15642         * gnat_rm.texi: Minor cleanup.
15644 2014-01-20  Hristian Kirtchev  <kirtchev@adacore.com>
15646         * sem_attr.adb (Analyze_Attribute): Attributes 'Old and 'Result
15647         can now apply to a refined postcondition.
15648         * sem_ch6.adb (Analyze_Subprogram_Contract): Remove local
15649         variable Result_Seen. Add variables Case_Prag, Post_Prag,
15650         Seen_In_Case and Seen_In_Post. Update the mechanism that detects
15651         whether postconditions and/or constract-cases mention attribute
15652         'Result and introduce a post-state when applied to functions.
15653         (Check_Result_And_Post_State): Removed.
15654         * sem_prag.adb (Analyze_Pragma): Add local variable
15655         Result_Seen. Verify that the expression of pragma Refined_Post
15656         mentions attribute 'Result and introduces a post-state.
15657         * sem_util.ads, sem_util.adb (Check_Result_And_Post_State): New routine.
15659 2014-01-20  Hristian Kirtchev  <kirtchev@adacore.com>
15661         * exp_ch7.adb (Is_Subprogram_Call): New routine.
15662         (Process_Transient_Objects): Make variable Must_Hook global with
15663         respect to all locally declared subprograms. Search the context
15664         for at least one subprogram call.
15665         (Requires_Hooking): Removed.
15667 2014-01-20  Claire Dross  <dross@adacore.com>
15669         * a-cfdlli.ads a-cfhama.ads a-cfhase.ads a-cforma.ads
15670         * a-cforse.ads a-cofove.ads: Add pragma Annotate (GNATprove,
15671         External_Axiomatization);
15673 2014-01-20  Robert Dewar  <dewar@adacore.com>
15675         * sem_attr.adb (Analyze_Attribute, case Loop_Entry): Allow
15676         Loop_Entry in Assert, Assert_And_Cut, and Assume pragmas.
15677         * sem_prag.adb (Analyze_Pragma, case Assert[_And_Cut], Assume):
15678         Allow Loop_Entry to be used in these pragmas if they appear in
15679         an appropriate context.
15680         (Placement_Error): Specialize error
15681         message for pragma Assert[_And_Cut] or pragma Assume containing
15682         Loop_Entry attribute.
15683         * a-exexpr-gcc.adb, sinput.adb: Minor reformatting.
15684         * s-excmac-arm.ads, s-except.ads, s-excmac-gcc.ads: Minor reformatting
15685         and code clean ups.
15687 2014-01-20  Robert Dewar  <dewar@adacore.com>
15689         * gnat1drv.adb: Minor comment update.
15691 2014-01-20  Tristan Gingold  <gingold@adacore.com>
15693         * raise-gcc.c (PERSONALITY_FUNCTION/arm): Remove unused
15694         variables, comment out unused code.
15695         * a-exexpr-gcc.adb: Move declarations to s-excmac-gcc.ads
15696         * s-excmac-gcc.ads: New file, extracted from a-exexpr-gcc.adb
15697         * s-excmac-arm.ads: New file.
15699 2014-01-20  Hristian Kirtchev  <kirtchev@adacore.com>
15701         * exp_ch4.adb (Expand_N_Slice): Remove constant D and variables
15702         Drange and Index_Typ. Remove the circuitry which creates a
15703         range check to compare the index type of the array against the
15704         discrete_range.
15705         * sem_res.adb (Resolve_Slice): Add local variable Dexpr. Update
15706         the circuitry which creates a range check to handle a
15707         discrete_range denoted by a subtype indication.
15709 2014-01-20  Pierre-Marie Derodat  <derodat@adacore.com>
15711         * sinput.adb, sinput.ads (Sloc_Range): Traverse the tree of original
15712         nodes to get the original sloc range.
15714 2014-01-20  Hristian Kirtchev  <kirtchev@adacore.com>
15716         * sem_prag.adb (Analyze_Pragma): Use Defining_Entity to obtain the
15717         entity of a [library level] package.
15719 2014-01-20  Tristan Gingold  <gingold@adacore.com>
15721         * raise-gcc.c (exception_class_eq): New function.
15722         (is_handled_by): Use it to compare exception classes.
15723         (PERSONALITY_STORAGE): Define.  (continue_unwind): New function to
15724         be called to return URC_CONTINUE_UNWIND.
15725         (personality_body): New function, extracted from PERSONALITY_ROUTINE.
15726         (PERSONALITY_ROUTINE): Add an implementation for the ARM unwinder.
15728 2014-01-20  Robert Dewar  <dewar@adacore.com>
15730         * opt.ads: Minor comment update.
15732 2014-01-20  Hristian Kirtchev  <kirtchev@adacore.com>
15734         * exp_ch4.adb (Expand_N_Slice): Relocate some variables and
15735         constants to the "Local variables" area. Add new constant D. Add
15736         new variables Drange and Index_Typ.  Rename Pfx to Rep and Ptp
15737         to Pref_Typ and update all occurrences. Add circuitry to extract
15738         the discrete_range and the index type and build a range check.
15740 2014-01-20  Arnaud Charlet  <charlet@adacore.com>
15742         * gnat1drv.adb (Adjust_Global_Switches): Enable
15743         Treat_Categorization_Errors_As_Warnings when Relaxed_RM_Semantics
15744         is set.
15746 2014-01-20  Thomas Quinot  <quinot@adacore.com>
15748         * sem_ch5.adb, sem_ch4.adb: Minor reformatting.
15750 2014-01-20  Hristian Kirtchev  <kirtchev@adacore.com>
15752         * sem_ch13.adb (Analyze_Aspect_Specifications):
15753         When aspect SPARK_Mode appears on a package body, insert the
15754         generated pragma at the top of the body declarations.
15756 2014-01-20  Robert Dewar  <dewar@adacore.com>
15758         * sem_aggr.adb, exp_prag.adb, sem_aux.adb, sinfo.ads, sem_ch10.adb,
15759         checks.adb, sem_prag.adb, sem_ch12.adb, freeze.adb, g-arrspl.adb,
15760         expander.adb, gnat1drv.adb, exp_ch4.adb, sem_ch6.adb,
15761         sem_ch8.adb, exp_dist.adb: Minor reformatting.
15763 2014-01-20  Yannick Moy  <moy@adacore.com>
15765         * gnat1drv.adb (Gnat1drv): Call Write_ALI with Object=True in GNATprove
15766         mode.
15768 2014-01-20  Pascal Obry  <obry@adacore.com>
15770         * g-arrspl.ads (Slice_Set): New definition (will use a copy on
15771         write scheme).
15772         * g-arrspl.adb: Adapt all routine to this new implementation.
15773         (Set): Copy the Slice_Set definition before reusing it.
15775 2014-01-20  Arnaud Charlet  <charlet@adacore.com>
15777         * sem_prag.adb (Process_Import_Or_Interface): In
15778         Relaxed_RM_Semantics, support old Ada 83 style of pragma Import.
15779         (Analyze_Pragma): Ditto for pragma Export.
15780         * exp_prag.adb (Expand_Pragma_Import_Or_Interface): Handle old pragma
15781         Import style.
15783 2014-01-20  Hristian Kirtchev  <kirtchev@adacore.com>
15785         * einfo.ads: E_Abstract_State is now part of the entities that
15786         can be overloaded. Update type Overloadable_Kind to reflect the
15787         inclusion of abstract states.
15788         * sem_ch6.adb (New_Overloaded_Entity): A function can now
15789         overload an abstract state.
15790         * sem_prag.adb (Analyze_Constituent): Handle the overloading
15791         of states by functions. Use Entity_Of to obtain the entity of
15792         a constituent.  (Analyze_Global_Item): Handle the overloading of
15793         states by functions.
15794         (Analyze_Initialization_Item): Handle the
15795         overloading of states by functions.  Use Entity_Of to obtain the
15796         entity of an item.
15797         (Analyze_Input_Item): Handle the overloading
15798         of states by functions. Use Entity_Of to obtain the entity of an item.
15799         (Analyze_Input_Output): Handle the overloading of states by functions.
15800         (Analyze_Refinement_Clause): Handle the overloading
15801         of states by functions.  Use Entity_Of to obtain the entity of an item.
15802         (Appears_In): Use Entity_Of to obtain the entity of an element.
15803         (Check_Usage): Use Entity_Of to obtain the entity of
15804         an item. Add a guard to prevent a crash due to a previous error.
15805         (Resolve_State): New routine.
15807 2014-01-20  Yannick Moy  <moy@adacore.com>
15809         * spark_xrefs.ads, debug.adb, gnat1drv.adb, errout.adb, errout.ads,
15810         opt.ads: Minor comments updates.
15812 2014-01-20  Hristian Kirtchev  <kirtchev@adacore.com>
15814         * einfo.adb (Non_Limited_View): Applies to abstract states.
15815         (Set_From_Limited_With): Applies to abstract states.
15816         (Set_Non_Limited_View): Applies to abstract states.
15817         (Write_Field17): Output the non-limited view of an abstract state.
15818         * einfo.ads: Update the comment on usage and occurrences in
15819         nodes for attributes From_Limited_With and Non_Limited_View.
15820         * sem_aux.adb (Available_View): This routine can now handle
15821         abstract states.
15822         * sem_aux.ads (Available_View): This routine can now handle
15823         abstract states. Update the comment on usage.
15824         * sem_ch8.adb (Find_Expanded_Name): Handle abstract views
15825         of states and variables.
15826         (In_Pragmas_Depends_Or_Global): New routine.
15827         * sem_ch10.adb (Build_Limited_Views): Implement
15828         abstract (limited) views of variables and states.
15829         (Build_Shadow_Entity): This routine is now a procedure. Add
15830         formal parameter Shadow. Update the comment on usage. Add
15831         context-specific decoration for states and variables.
15832         (Decorate_State): New routine.  (Decorate_Variable): New routine.
15833         (Find_And_Process_States): New routine.
15834         (Process_Declarations): Renamed to Process_Declarations_And_States.
15835         (Process_Declarations_And_States): Add formal parameters
15836         Pack and Create_Abstract_Views. Update the comment on usage.
15837         (Process_States): New routine.
15838         * sem_prag.adb (Check_Dependency_Clause): Handle abstract
15839         views of states and variables. Match the abstract view of a state
15840         against its corresponding non-abstract view.
15841         (Is_Matching_Input):
15842         Handle abstract views of states and variables. Match the abstract
15843         view of a state against its corresponding non-abstract view.
15844         (Process_Global_Item): Handle abstract views of states and
15845         variables.
15847 2014-01-20  Bob Duff  <duff@adacore.com>
15849         * sem_ch10.adb (Expand_With_Clause): Don't
15850         recurse on the prefix if the current with-ed name refers to a
15851         package that renames its own parent, eg "package P.Q renames P;".
15853 2014-01-20  Yannick Moy  <moy@adacore.com>
15855         * exp_spark.adb (Expand_SPARK_Call): Remove procedure.
15856         * opt.adb, opt.ads (Full_Expander_Active): Remove function.
15857         * checks.adb, exp_ch6.adb, exp_ch9.adb, exp_disp.adb, sem_aggr.adb,
15858         * sem_ch10.adb, sem_ch5.adb, sem_ch6.adb, sem_ch8.adb, sem_ch9.adb,
15859         * sem_disp.adb, sem_res.adb Replace Full_Expander_Active by
15860         Expander_Active.
15862 2014-01-20  Yannick Moy  <moy@adacore.com>
15864         * sinfo.ads Update documentation of GNATprove mode.
15866 2014-01-20  Yannick Moy  <moy@adacore.com>
15868         * adabkend.adb, ali-util.adb, errout.adb, exp_ch7.adb,
15869         * exp_dbug.adb, freeze.adb, lib-xref.adb, restrict.adb,
15870         * sem_attr.adb, sem_ch4.adb, sem_ch5.adb, sem_ch6.adb, sem_ch8.adb,
15871         * sem_prag.adb, sem_res.adb, sem_util.adb Rename SPARK_Mode into
15872         GNATprove_Mode.
15873         * sem_ch13.adb: Remove blank.
15874         * exp_spark.adb, exp_spark.ads (Expand_SPARK_Call): Only replace
15875         subprograms by alias for renamings, not for inherited primitive
15876         operations.
15877         * exp_util.adb (Expand_Subtype_From_Expr): Apply the expansion
15878         in GNATprove mode.
15879         (Remove_Side_Effects): Apply the removal in
15880         GNATprove mode, for the full analysis of expressions.
15881         * expander.adb (Expand): Call the light SPARK expansion in GNATprove
15882         mode.
15883         (Expander_Mode_Restore, Expander_Mode_Save_And_Set): Ignore
15884         save/restore actions for Expander_Active flag in GNATprove mode,
15885         similar to what is done in ASIS mode.
15886         * frontend.adb (Frontend): Generic bodies are instantiated in
15887         GNATprove mode.
15888         * gnat1drv.adb (Adjust_Global_Switches): Set operating
15889         mode to Check_Semantics in GNATprove mode, although a light
15890         expansion is still performed.
15891         (Gnat1drv): Set Back_End_Mode to
15892         Declarations_Only in GNATprove mode, and later on special case
15893         the GNATprove mode to continue analysis anyway.
15894         * lib-writ.adb (Write_ALI): Always generate ALI files in
15895         GNATprove mode.
15896         * opt.adb, opt.ads (Full_Expander_Active): Make it equivalent to
15897         Expander_Active.
15898         (SPARK_Mode): Renamed as GNATprove_Mode.
15899         * sem_aggr.adb (Aggregate_Constraint_Checks): Add checks in the
15900         tree in GNATprove_Mode.
15901         * sem_ch12.adb (Analyze_Package_Instantiation): Always instantiate
15902         body in GNATprove mode.
15903         (Need_Subprogram_Instance_Body): Always instantiate body in GNATprove
15904         mode.
15905         * sem_ch3.adb (Constrain_Index, Process_Range_Expr_In_Decl):
15906         Make sure side effects are removed in GNATprove mode.
15908 2014-01-20  Eric Botcazou  <ebotcazou@adacore.com>
15910         * gcc-interface/decl.c (gnat_to_gnu_entity) <object>: Robustify tests
15911         for aliased objects with an unconstrained nominal subtype.
15912         * gcc-interface/trans.c (Call_to_gnu): Likewise.
15913         (gnat_to_gnu) <case N_Op_Not>: Robustify test for private type.
15914         <case N_Op_Minus>: Remove useless code.
15915         (Exception_Handler_to_gnu_zcx): Minor tweaks.
15917 2014-01-20  Eric Botcazou  <ebotcazou@adacore.com>
15919         * gcc-interface/decl.c (gnat_to_gnu_entity) <case E_Record_Subtype>:
15920         Tidy up.  For a subtype with discriminants and variant part, if a
15921         variant is statically selected and the fields all have a constant
15922         position, put them in order of increasing position.  Likewise if
15923         no variant part but representation clause is present.
15924         * gcc-interface/utils.c (make_packable_type): Robustify.
15925         (maybe_pad_type): Use local variable and tidy up condition.  If no
15926         alignment is specified, use the original one.
15927         (create_type_stub_decl): Minor tweak.
15928         (convert) <case VECTOR_CST>: Fix typo.
15929         <case CONSTRUCTOR>: Deal with padding types around the same type.
15930         Do not punt on missing fields.
15931         (unchecked_convert): Call finish_record_type to lay out the special
15932         record types made for conversions from/to problematic integer types.
15933         Bump the alignment of CONSTRUCTORs before converting them to a more
15934         aligned type.
15936 2014-01-20  Eric Botcazou  <ebotcazou@adacore.com>
15938         * gcc-interface/decl.c (gnat_to_gnu_entity) <case E_Component>: Remove
15939         obsolete code for type_annotate_only mode, simplify code and slightly
15940         improve wording of comments.
15942 2014-01-12  Eric Botcazou  <ebotcazou@adacore.com>
15944         PR ada/59772
15945         * gcc-interface/cuintp.c (build_cst_from_int): Use 32-bit integer type
15946         as intermediate type.
15947         (UI_To_gnu): Likewise.
15949 2014-01-03  Eric Botcazou  <ebotcazou@adacore.com>
15951         * gnatvsn.ads (Current_Year): Bump to 2014.
15953 2014-01-02  Tobias Burnus  <burnus@net-b.de>
15955         * gnat_ugn.texi: Bump @copying's copyright year.
15957 Copyright (C) 2014 Free Software Foundation, Inc.
15959 Copying and distribution of this file, with or without modification,
15960 are permitted in any medium without royalty provided the copyright
15961 notice and this notice are preserved.