PR preprocessor/63831
[official-gcc.git] / gcc / ada / ChangeLog
blob890d4361e0c56ef67deac36bffa75b7de5013ada
1 2014-12-17  Pierre-Marie de Rodat  <derodat@adacore.com>
3         * gcc-interface/misc.c (gnat_get_array_descr_info): New.  Use it for
4         the get_array_descr_info lang-hook.  Use it to tune the DWARF output
5         for array types.
7 2014-11-24  Eric Botcazou  <ebotcazou@adacore.com>
9         * gcc-interface/Makefile.in (Cygwin/Mingw): Fix previous change.
11 2014-11-24  Eric Botcazou  <ebotcazou@adacore.com>
13         * gcc-interface/trans.c (build_return_expr): Use INIT_EXPR instead of
14         MODIFY_EXPR to assign to the return object.
15         (finalize_nrv_r): Adjust to above change.
16         (finalize_nrv_unc_r): Likewise.
18 2014-11-24  Eric Botcazou  <ebotcazou@adacore.com>
20         * gcc-interface/trans.c (push_range_check_info): Replace early test
21         with assertion.
22         (Raise_Error_to_gnu): Do not call push_range_check_info if the loop
23         stack is empty.
24         * gcc-interface/utils.c (convert_to_fat_pointer): Fix formatting.
25         * gcc-interface/utils2.c (gnat_invariant_expr): Deal with padded types
26         and revert latest change.
28 2014-11-22  Eric Botcazou  <ebotcazou@adacore.com>
30         * gcc-interface/trans.c (Call_to_gnu): Strip unchecked conversions on
31         actuals of In parameters if the destination type is an unconstrained
32         composite type.
34 2014-11-22  Eric Botcazou  <ebotcazou@adacore.com>
36         * gcc-interface/trans.c (gnat_gimplify_expr): Add 'type' variable.
37         <case NULL_EXPR>: Deal with unconstrained array types and use 'type'.
38         <case ADDR_EXPR>: Use 'type'.
39         <case DECL_EXPR>: Likewise.
41 2014-11-20  Trevor Saunders  <tsaunders@mozilla.com>
43         * gcc-interface/decl.c (annotate_value_cache): Replace htab with
44         hash_table.
45         (annotate_value): Adjust.
46         (init_gnat_decl): Likewise.
47         (destroy_gnat_decl): Likewise.
48         * gcc-interface/utils.c (pad_type_hash_table): Replace htab with
49         hash_table.
50         (init_gnat_utils): Adjust.
51         (destroy_gnat_utils): Likewise.
52         (lookup_and_insert_pad_type): Likewise.
54 2014-11-20  Arnaud Charlet  <charlet@adacore.com>
56         PR ada/63931
57         * gnatvsn.ads (Library_Version): Switch to "5".
59 2014-11-20  Thomas Quinot  <quinot@adacore.com>
61         * freeze.adb (Freeze_Entity): Do not reset Is_True_Constant
62         for aliased constant objects.
64 2014-11-20  Robert Dewar  <dewar@adacore.com>
66         * exp_util.adb (Following_Address_Clause): Use new Name_Table
67         boolean flag set by parser to avoid the search if there is no
68         address clause anywhere for the name.
69         * namet.adb (Name_Enter): Initialize Boolean_Info flag
70         (Name_Find): ditto (Reinitialize): ditto (Get_Name_Table_Boolean):
71         New function (Set_Name_Table_Boolean): New procedure
72         * namet.ads: Add and document new Boolean field in name table
73         (Get_Name_Table_Boolean): New function.
74         (Set_Name_Table_Boolean): New procedure.
75         * par-ch13.adb (P_Representation_Clause): Set Name_Table boolean
76         flag for an identifier name if we detect an address clause or
77         use-at clause for the identifier.
78         * sem_ch3.adb (Analyze_Object_Declaration): Remove comment about
79         Following_Address_Clause since this function is now optimized
80         and is not a performance concern.
81         * sem_prag.adb (Analyze_Pragma, case Elaborate): In SPARK
82         mode, pragma Elaborate is now allowed, but does not suppress
83         elaboration checking.
85 2014-11-20  Jerome Lambourg  <lambourg@adacore.com>
87         * gcc-interface/Makefile.in: Add some support for VxWorks7.
89 2014-11-20  Thomas Quinot  <quinot@adacore.com>
91         * sem_ch13.adb, freeze.adb: Minor reformatting.
92         * gnat_rm.texi: Minor editing.
94 2014-11-20  Robert Dewar  <dewar@adacore.com>
96         * sem_prag.adb (Analyze_Pragma): Minor reformatting.
97         (Process_Suppress_Unsuppress): Ignore suppress Elaboration_Check
98         in SPARK.
100 2014-11-20  Bob Duff  <duff@adacore.com>
102         * gnat_rm.texi: Correction to documentation of
103         'Unrestricted_Access in case of access to unconstrained array.
104         * a-cofove.adb (Capacity): Fix bug -- was always
105         returning Capacity_Range'Last.
106         (Is_Sorted): Fix bug -- was always returning True, because
107         Container.Last = Last. That test isn't even needed, because the
108         loop will go around zero times in that case, so deleted that
109         test rather than fixing it.
110         (Reverse_Elements): Make sure to use the correct array bounds.
112 2014-11-20  Ed Schonberg  <schonberg@adacore.com>
114         * sem_ch12.adb (Analyze_Associations): In GNATProve mode, build
115         wrappers for functions and operators that are actuals only if
116         expander is enabled. Wrappers play no role within a generic unit.
118 2014-11-20  Hristian Kirtchev  <kirtchev@adacore.com>
120         * sem_util.adb (Policy_In_Effect): Use the
121         configuration level assertion flag.
123 2014-11-20  Arnaud Charlet  <charlet@adacore.com>
125         * s-parame-ae653.ads: Update comments.
127 2014-11-20  Robert Dewar  <dewar@adacore.com>
129         * types.ads, einfo.ads: Minor reformatting.
130         * sem_elab.adb (Check_A_Call): Add guard for reference to Alias
131         for variable case.
133 2014-11-20  Bob Duff  <duff@adacore.com>
135         * a-cofove.adb (Elems,Elemsc): Use access-to-constrained arrays
136         instead of access-to-unconstrained, because the latter doesn't
137         work with 'Unrestricted_Access when the result is returned from
138         a function.
139         * a-cofove.ads (Vector): Move the discriminant-dependent array
140         after the other components for efficiency. Otherwise the compiler
141         will generate a lot of code to calculate the offset of the other
142         components every time they're accessed.
144 2014-11-20  Olivier Hainque  <hainque@adacore.com>
146         * opt.ads: Fix comment on Generate_SCO_Instance_Table wrt when
147         it is set to true.
149 2014-11-20  Ed Schonberg  <schonberg@adacore.com>
151         * exp_ch3.adb (Expand_N_Object_Declaration): Handle properly
152         a type invariant check on an object with default initialization
153         and an address clause.
155 2014-11-20  Robert Dewar  <dewar@adacore.com>
157         * sem_elab.adb (Check_A_Call): Handle variable ref case in
158         SPARK (Check_Elab_Call): ditto (Find_Elab_Reference): ditto
159         (Get_Referenced_Ent): ditto.
160         * sem_elab.ads: Comment fixes to account for the fact that we
161         now deal with variable references in SPARK mode.
162         * sem_res.adb (Resolve_Entity_Name): In SPARK_Mode Call
163         Check_Elab_Call for variable.
165 2014-11-20  Yannick Moy  <moy@adacore.com>
167         * a-cofove.ads (Copy): Fix precondition, which should allow
168         Capacity = 0.
169         (First_To_Previous, Current_To_Last): Add necessary preconditions.
171 2014-11-20  Hristian Kirtchev  <kirtchev@adacore.com>
173         * exp_ch3.adb (Build_Initialization_Call): Reimplement the
174         circuitry which extraacts the [underlying] full view of a
175         private type to handle a case where the private type acts as a
176         generic actual.
177         * exp_ch5.adb (Expand_Iterator_Loop_Over_Array): Inherit the
178         loop label form the original loop regardless of whether it came
179         from source.
180         * sem_attr.adb (Analyze_Attribute): When taking 'Access of an
181         expression function with a generated body that has not been
182         analyzed yet, analyze the body to freeze the expression.
183         * sem_util.adb (Set_Public_Status_Of): New routine.
184         (Transfer_Entities): Handle the case where a private type with
185         an internally generated full view is being transfered and update
186         its full view.
188 2014-11-20  Vincent Celier  <celier@adacore.com>
190         * prj-nmsc.adb (Check_Object): If a unit is in a multi-source
191         file, its object file is never the same as any other unit.
193 2014-11-20  Bob Duff  <duff@adacore.com>
195         * s-taskin.adb (Initialize_ATCB): Take into
196         account the fact that the domain of the activator can be null
197         if we're initializing a foreign task.
199 2014-11-20  Robert Dewar  <dewar@adacore.com>
201         * sem_ch12.adb: Minor reformatting.
203 2014-11-20  Jerome Lambourg  <lambourg@adacore.com>
205         * s-osinte-vxworks.ads: Add comments. Minor reformatting.
207 2014-11-20  Yannick Moy  <moy@adacore.com>
209         * sem_prag.adb, sem_elab.adb: Minor rewording of error message in
210         SPARK mode, for consistency.
212 2014-11-20  Vasiliy Fofanov  <fofanov@adacore.com>
214         * gnat_ugn.texi: New section on gnattest stubbing. Minor
215         reformatting.
217 2014-11-20  Jerome Lambourg  <lambourg@adacore.com>
219         * s-taprop-vxworks.adb (Create_Task): Fix thread comparison.
220         Minor reformatting.
222 2014-11-20  Robert Dewar  <dewar@adacore.com>
224         * s-tassta.adb, exp_aggr.adb, s-taskin.adb, exp_strm.adb: Minor
225         reformatting.
226         * comperr.adb (Compiler_Abort): New wording for bug box.
227         * par-ch13.adb: Minor reformatting.
228         * par-ch3.adb (P_Identifier_Declarations): Handle aspect
229         specifications given before initialization expression in object
230         declaration cleanly.
231         * gnat1drv.adb (Adjust_Global_Switches): Make sure static
232         elaboration mode is set if we are operating in SPARK mode.
233         * sem_ch12.adb (Analyze_Package_Instantiation): Make
234         sure static elab mode is set if we are in SPARK mode.
235         (Analyze_Subprogram_Instantiation): ditto.
236         (Set_Instance_Env): ditto.
237         * sem_elab.adb (Check_A_Call): In SPARK mode, we require
238         Elaborate_All in the case of a call during elaboration to a
239         subprogram in another unit.
241 2014-11-20  Ed Schonberg  <schonberg@adacore.com>
243         * inline.adb (Can_Split_Unconstrained_Function,
244         Build_Procedure): Copy parameter type rather than creating
245         reference to the entity, to capture class-wide reference, whose
246         name is not retrieved by visibility.
248 2014-11-20  Arnaud Charlet  <charlet@adacore.com>
250         * s-taspri-solaris.ads: Replace 64 by long_long_integer'size.
252 2014-11-20  Olivier Hainque  <hainque@adacore.com>
254         * init.c (__gnat_map_signal for VxWorks): Use a common mapping
255         scheme for VxWorks version >= 6, instead of falling back to the
256         vx5 scheme for versions > 6.
258 2014-11-20  Ed Schonberg  <schonberg@adacore.com>
260         * exp_strm.adb (Build_Mutable_Record_Read_Procedure): Use
261         base type when constructing subtype indication for constrained
262         target object.
264 2014-11-20  Jose Ruiz  <ruiz@adacore.com>
266         * projects.texi: Minor spelling fix.
268 2014-11-20  Bob Duff  <duff@adacore.com>
270         * gnat_ugn.texi: Add doc for --split-line-before-op switch in gnatpp.
272 2014-11-20  Vincent Celier  <celier@adacore.com>
274         * prj-attr.adb (Register_New_Package): Allow the registration
275         of an already unknown package and make it known.
277 2014-11-20  Trevor Saunders  <tsaunders@mozilla.com>
279         * gcc-interface/decl.c, gcc-interface/utils.c: replace htab with
280         hash_table.
282 2014-11-20  Robert Dewar  <dewar@adacore.com>
284         * sem_prag.adb (Analyze_Pragma, case Elaborate): Forbid pragma
285         Elaborate in SPARK mode.
287 2014-11-20  Bob Duff  <duff@adacore.com>
289         * s-taskin.adb, s-tassta.adb (Initialize_ATCB): If Domain
290         is null, then initialize T.Common.Domain to that of the
291         activating task (not the parent task!), as required by RM-D.16.1.
292         T.Common.Domain should never be null; so Assert. Remove similar
293         code from Create_Task in s-tassta.adb.
294         * s-mudido-affinity.adb: Remove checks for Domain = null,
295         because it can't be null.
296         * s-taskin.ads, s-taspri-dummy.ads, s-taspri-mingw.ads,
297         s-taspri-posix.ads, s-taspri-posix-noaltstack.ads,
298         s-taspri-solaris.ads, s-taspri-vxworks.ads: Mark limited types as
299         explicitly limited for clarity.
301 2014-11-20  Ed Schonberg  <schonberg@adacore.com>
303         * exp_aggr.adb (Init_Hidden_Discriminants): Code clean up.
305 2014-11-20  Robert Dewar  <dewar@adacore.com>
307         * errout.adb (Error_Msg): Don't suppress continuation msgs for
308         run-time files.
309         * sem_prag.adb (Analyze_Pragma, case Elaborate): Forbid pragma
310         Elaborate in SPARK mode.
312 2014-11-20  Yannick Moy  <moy@adacore.com>
314         * gnat_rm.texi: Update GNAT RM with rule about expressions in
315         Update attribute.
317 2014-11-20  Thomas Quinot  <quinot@adacore.com>
319         * g-socket.adb (To_Host_Entry): Guard against case of a
320         non-AF_INET entry.
322 2014-11-20  Vadim Godunko  <godunko@adacore.com>
324         * a-strunb-shared.adb (To_Unbounded_String): Use shared empty
325         object to construct return value when source string is empty or
326         requested length is zero.
327         * a-stwiun-shared.adb (To_Unbounded_Wide_String): Likewise.
328         * a-stzunb-shared.adb (To_Unbounded_Wide_Wide_String): Likewise.
330 2014-11-20  Yannick Moy  <moy@adacore.com>
332         * a-cfhase.adb, a-cfinve.adb, a-cforma.adb, a-cfhama.adb, a-cforse.adb,
333         a-cofove.adb: Skip CodePeer analysis on body of all formal containers.
335 2014-11-20  Arnaud Charlet  <charlet@adacore.com>
337         * adaint.c: Fix typo.
338         * exp_util.adb (Make_Subtype_From_Expr): Complete previous change,
339         generate constant values.
340         * sem_eval.adb (Decompose_Expr): Fix latent bug leading to a wrong
341         evaluation to '0' of some unknown values.
343 2014-11-20  Robert Dewar  <dewar@adacore.com>
345         * repinfo.adb (List_Record_Info): Do not list discriminant in
346         unchecked union.
347         * sem_ch13.adb (Has_Good_Profile): Minor reformatting
348         (Analyze_Stream_TSS_Definition): Minor reformatting
349         (Analyze_Record_Representation_Clause): Do not issue warning
350         for missing rep clause for discriminant in unchecked union.
352 2014-11-20  Vadim Godunko  <godunko@adacore.com>
354         * a-strunb-shared.adb, a-stwiun-shared.adb, a-stzunb-shared.adb
355         ("&") Use already computed value of data length to call allocation
356         subprogram.
358 2014-11-20  Ed Schonberg  <schonberg@adacore.com>
360         * exp_ch6.adb (Expand_Call, Inlined_Subprogram): Do not suppress
361         debugging information for a call to a predefined unit, if the
362         call comes from source and the unit is in the Ada hierarchy.
364 2014-11-20  Bob Duff  <duff@adacore.com>
366         * s-mudido.ads: Update signature of Create and Get_Last_CPU. Add
367         CPU_Set, another Create, and Get_CPU_Set.
368         * s-mudido.adb: Corresponding changes to the spec. New
369         operations just raise an exception.  Also minor cleanup: use
370         raise_expressions.
371         * s-mudido-affinity.adb: Implementations of new operations from
372         * s-mudido.ads, for the platforms that actually support processor
373         affinity. The new Create (which takes a set) now does all the
374         work; the old Create (which takes a range) now just calls the
375         new one. Change error messages to reflect the fact that it's an
376         arbitrary set, not just a range.
378 2014-11-20  Robert Dewar  <dewar@adacore.com>
380         * exp_attr.adb: Minor reformatting.
382 2014-11-20  Hristian Kirtchev  <kirtchev@adacore.com>
384         * exp_util.adb (Make_Subtype_From_Expr): Capture the bounds of
385         all index constracts when the expression is of an array type.
387 2014-11-20  Bob Duff  <duff@adacore.com>
389         * s-taskin.ads: Minor comment improvements.
391 2014-11-20  Bob Duff  <duff@adacore.com>
393         * exp_ch9.adb: Minor comment fixes.
394         * s-taskin.adb (Initialize): Small simplification: pass System_Domain
395         to Initialize_ATCB instead of passing null and then setting the Domain
396         to System_Domain. This requires moving the creation of System_Domain
397         earlier.
398         * s-taprop-linux.adb (Set_Task_Affinity): Only call CPU_SET for
399         processors that have a True in the Domain. This is necessary if the
400         Domain is not all-True values.
402 2014-11-20  Ed Schonberg  <schonberg@adacore.com>
404         * sem_ch13.adb (Has_Good_Profile): a) An stream attribute
405         for the class-wide type of an interface type is not a primitive
406         operation and is not subject to the restrictions of 13.13. (38/3).
407         b) A stream operation for an interface type must be a null
408         procedure, and it cannot be a function.
410 2014-11-20  Bob Duff  <duff@adacore.com>
412         * exp_attr.adb (Attribute_Max_Size_In_Storage_Elements):
413         Eliminate 'Class references from the tree, because gigi crashes on
414         'Class. Also, don't check Nkind (Attr) -- it is known to be
415         N_Attribute_Reference.  Assert that instead.
417 2014-11-20  Bob Duff  <duff@adacore.com>
419         * debug.adb: Minor comment fix.
421 2014-11-20  Arnaud Charlet  <charlet@adacore.com>
423         * a-ciorma.adb: Minor update: move pragma Annotate up.
424         * a-cfdlli.adb: Skip codepeer analysis on this body.
426 2014-11-20  Robert Dewar  <dewar@adacore.com>
428         * sem_prag.adb (Analyze_Pragma, case No_Elaboration_Code_All):
429         Allow use of this pragma with generic unit (package or subprogram).
430         * gnat_rm.texi: Clarify that pragma No_Elaboration_Code_All can
431         be applied to generics.
433 2014-11-20  Ed Schonberg  <schonberg@adacore.com>
435         * sem_aggr.adb (Valid_Limited_Ancestor): Ancestor part of
436         extension aggregate can itself be an extension aggregate, as
437         well as a call that is rewritten as a reference.
439 2014-11-20  Eric Botcazou  <ebotcazou@adacore.com>
441         * inline.adb (Add_Inlined_Subprogram): Insert all programs
442         generated as a body or whose declaration was provided along with
443         the body.
445 2014-11-20  Javier Miranda  <miranda@adacore.com>
447         * sem.adb (Semantics): Disable expansion if we are compiling a
448         separate unit under configurable runtime. By default separate
449         units are compiled with expansion disabled but under configurable
450         runtime we enable the expansion to get error messages about
451         missing entities.
453 2014-11-20  Robert Dewar  <dewar@adacore.com>
455         * sem_ch13.adb: Minor reformatting.
456         * exp_util.adb (Following_Address_Clause): Handle case of
457         package private part.
459 2014-11-20  Arnaud Charlet  <charlet@adacore.com>
461         * a-cdlili.adb, a-cihama.adb, a-coinve.adb, a-cusyqu.adb, a-ciorse.adb,
462         a-coorma.adb, a-cborma.adb, a-cidlli.adb, a-cimutr.adb, a-ciormu.adb,
463         a-cbprqu.adb, a-cihase.adb, a-cohama.adb, a-coorse.adb, a-coboho.adb,
464         a-cuprqu.adb, a-cbhama.adb, a-rbtgbo.adb, a-cborse.adb, a-comutr.adb,
465         a-ciorma.adb, a-cobove.adb, a-coormu.adb, a-convec.adb, a-cohase.adb,
466         a-coinho.adb, a-coinho-shared.adb, a-cbdlli.adb, a-cbsyqu.adb,
467         a-cbmutr.adb, a-cbhase.adb: Add pragma Annotate to prevent codepeer
468         from analyzing these bodies.
470 2014-11-20  Ed Schonberg  <schonberg@adacore.com>
472         * sem_ch6.adb (Analyze_Subprogram_Body_Helper): Do not apply
473         inlining expansion if function build in place, i.e. has a limited
474         return type.
476 2014-11-20  Hristian Kirtchev  <kirtchev@adacore.com>
478         * sem_prag.adb (Analyze_Refined_Depends_In_Decl_Part): Add
479         variables Body_Id, Body_Inputs, Body_Outputs, Spec_Inputs,
480         Spec_Outputs. Synthesize the inputs and outputs of the subprogram
481         when pragma [Refined_]Global is missing and perform legality
482         checks on output states with visible refinement.
483         (Appears_In): Update the comment on usage.
484         (Check_Output_States): New routine.
485         (Collect_Dependency_Clause): New routine.
486         (Collect_Global_Items): Relocated to
487         Analyze_Refined_Global_In_Decl_Part.
488         (Collect_Subprogram_Inputs_Outputs): Add new formal parameters
489         Synthesize and Depends_Seen. The routine can now synthesize inputs
490         and outputs from pragma [Refined_]Depends.
491         (Normalize_Clause): Update the comment on usage. The routine no longer
492         performs normalization of outputs.
493         (Normalize_Clauses): Normalize both inputs and outputs.
494         (Normalize_Output): Relocated to Normalize_Clauses.
495         * sem_prag.ads (Collect_Subprogram_Inputs_Outputs): Add new
496         formal parameters Synthesize and Depends_Seen and update the
497         comment on usage.
499 2014-11-20  Vincent Celier  <celier@adacore.com>
501         PR ada/47500
502         * back_end.adb (Scan_Back_End_Switches): Skip switch -G and
503         its argument.
505 2014-11-20  Ed Schonberg  <schonberg@adacore.com>
507         * sem_ch13.adb (Reset_Loop_Variable): New subsidiary procedure
508         in Build_Predicate_Functions, to handle properly quantified
509         expressions in dynamic predicates.
511 2014-11-20  Robert Dewar  <dewar@adacore.com>
513         * gnatcmd.adb, sem_ch6.adb, exp_dist.adb: Minor reformatting.
514         * sem_util.adb (Bad_Unordered_Enumeration_Reference): Suppress
515         warning (return False) for generic type.
517 2014-11-20  Hristian Kirtchev  <kirtchev@adacore.com>
519         * sem_res.adb (Appears_In_Check): Removed.
520         (Is_OK_Volatile_Context): Rewrite the checks which verify that
521         an effectively volatile object subject to enabled properties
522         Async_Writers or Effective_Reads appears in a suitable context to
523         properly recognize a procedure call.
524         (Within_Check): New routine.
525         (Within_Procedure_Call): New routine.
527 2014-11-20  Ed Schonberg  <schonberg@adacore.com>
529         * sem_ch6.adb: Improve better error message.
531 2014-11-20  Thomas Quinot  <quinot@adacore.com>
533         * freeze.adb, sem_ch13.adb: Minor editing.
535 2014-11-20  Vincent Celier  <celier@adacore.com>
537         * gnatcmd.adb: Remove any special processing for the ASIS tools
538         (gnatpp, gnatmetric, gnatcheck, gnatelim and gnatstup) and simply
539         invoke the tool with the provided switches and arguments.
541 2014-11-20  Ed Schonberg  <schonberg@adacore.com>
543         * sem_ch6.adb (Analyze_Expression_Function): Reject declaration
544         of expression function with identical profile as previous
545         expression function.
547 2014-11-20  Thomas Quinot  <quinot@adacore.com>
549         * sem_ch13.adb: Complete previous change.
550         * exp_dist.adb, exp_dist.ads: Rework PolyORB/DSA arguments processing
551         circuitry to correctly handle the case of non-private limited
552         unconstrained formals.
554 2014-11-20  Robert Dewar  <dewar@adacore.com>
556         * freeze.adb, exp_dbug.adb, sem_ch13.adb: Minor reformatting.
558 2014-11-20  Thomas Quinot  <quinot@adacore.com>
560         * einfo.ads: Fix minor typo in comment.
562 2014-11-20  Robert Dewar  <dewar@adacore.com>
564         * inline.adb, sem_util.adb: Minor reformatting.
566 2014-11-20  Pierre-Marie Derodat  <derodat@adacore.com>
568         * uintp.h (UI_Eq): Declare.
569         * urealp.h (Norm_Den): Declare.
570         (Norm_Num): Declare.
571         * exp_dbug.adb (Is_Handled_Scale_Factor): New.
572         (Get_Encoded_Name): Do not output ___XF GNAT encodings
573         for fixed-point types when these can be handled by GCC's DWARF
574         back-end.
576 2014-11-20  Thomas Quinot  <quinot@adacore.com>
578         * sem_ch13.db (Inherit_Aspects_At_Freeze_Point): Inherit parent
579         SSO even if set through a pragma Default_Scalar_Storage_Order.
580         * freeze.adb (Set_SSO_From_Default): For a type extension,
581         do not let the default SSO override the parent SSO.
582         * gnat_rm.texi: document the above
584 2014-11-20  Robert Dewar  <dewar@adacore.com>
586         * a-stream.ads, a-reatim.ads, a-calend.ads, sinfo.ads, s-crtl.ads,
587         interfac.ads, s-taskin.ads: Minor reformatting.
589 2014-11-20  Hristian Kirtchev  <kirtchev@adacore.com>
591         * sem_prag.adb (Analyze_Pragma): Extensions_Visible can now
592         apply to an expression function.
593         * sem_util.adb (Extensions_Visible_Status): Add special processing
594         for expression functions.
596 2014-11-20  Hristian Kirtchev  <kirtchev@adacore.com>
598         * inline.adb (Build_Body_To_Inline): Remove meaningless aspects
599         and pragmas.
600         (Generate_Subprogram_Body): Remove meaningless aspects and pragmas.
601         (Remove_Aspects_And_Pragmas): New routine.
602         (Remove_Pragmas): Removed.
603         * namet.ads, namet.adb (Nam_In): New versions of the routine.
605 2014-11-20  Thomas Quinot  <quinot@adacore.com>
607         * sem_util.adb: Minor reformatting.
609 2014-11-20  Robert Dewar  <dewar@adacore.com>
611         * sem_prag.adb (Analyze_Pragma, case Linker_Section): Detect
612         duplicate Linker_Section.
614 2014-11-20  Ed Schonberg  <schonberg@adacore.com>
616         * exp_ch4.adb: Add guard for build-in-place boolean op.
618 2014-11-20  Yannick Moy  <moy@adacore.com>
620         * checks.adb (Apply_Scalar_Range_Check): In GNATprove mode,
621         put a range check when an empty range is used, instead of an
622         error message.
623         * sinfo.ads Update comment on GNATprove mode.
625 2014-11-20  Arnaud Charlet  <charlet@adacore.com>
627         * a-stream.ads, s-osinte-linux.ads, a-reatim.ads, a-calend.ads,
628         s-crtl.ads, interfac.ads, s-taskin.ads: Replace uses of 2 ** 63 and
629         2 ** 64 by references to Long_Long_Integer instead, to allow these
630         units to be analyzed by codepeer or spark when using a target
631         configuration file with long_long_size set to 32.
633 2014-11-20  Hristian Kirtchev  <kirtchev@adacore.com>
635         * sem_util.adb (Extensions_Visible_Status): Modify the logic to account
636         for non-SPARK code.
637         (Object_Access_Level): In ASIS mode, recognize
638         a selected component with an implicit dereference so that it
639         yields the same value with and without expansion.
641 2014-11-20  Ed Schonberg  <schonberg@adacore.com>
643         * sem_prag.adb (Analyze_Pragma, case Implemented): In ASIS
644         (compile-only) mode, use original type declaration to determine
645         whether protected type implements an interface.
647 2014-11-20  Yannick Moy  <moy@adacore.com>
649         * a-cfdlli.adb, a-cfdlli.ads, a-cfinve.adb, a-cfinve.ads,
650         * a-cofove.adb, a-cofove.ads: Mark spec as SPARK_Mode, and private
651         part/body as SPARK_Mode Off.
652         * a-cfhama.adb, a-cfhama.ads, a-cfhase.adb, a-cfhase.ads,
653         * a-cforma.adb, a-cforma.ads, a-cforse.adb, a-cforse.ads: Use
654         aspect instead of pragma for uniformity.
656 2014-11-20  Hristian Kirtchev  <kirtchev@adacore.com>
658         * sem_util.adb (Is_EVF_Expression): Include
659         attributes 'Loop_Entry, 'Old and 'Update to the logic.
661 2014-11-20  Bob Duff  <duff@adacore.com>
663         * sem_res.adb (Make_Call_Into_Operator): Don't
664         call Left_Opnd in the case of unary operators, because they only
665         have Right.
667 2014-11-20  Pascal Obry  <obry@adacore.com>
669         * initialize.c (ProcListCS): New extern variable (critical section).
670         (ProcListEvt): New extern variable (handle).
671         (__gnat_initialize)[Win32]: Initialize the ProcListCS critical
672         section object and the ProcListEvt event.
673         * final.c (__gnat_finalize)[Win32]: Properly finalize the
674         ProcListCS critical section and the ProcListEvt event.
675         * adaint.c (ProcListEvt): New Win32 event handle.
676         (EnterCS): New routine to enter the critical section when dealing with
677         child processes chain list.
678         (LeaveCS): As above to exit from the critical section.
679         (SignalListChanged): Routine to signal that the chain process list has
680         been updated.
681         (add_handle): Use EnterCS/LeaveCS, also call SignalListChanged when the
682         handle has been added.
683         (__gnat_win32_remove_handle): Use EnterCS/LeaveCS,
684         also call SignalListChanged if the handle has been found and removed.
685         (remove_handle): Routine removed, implementation merged with the above.
686         (win32_wait): Use EnterCS/LeaveCS for the critical section. Properly
687         copy the PID list locally to ensure that even if the list is updated
688         the local copy remains valid. Add into the hl (handle list) the
689         ProcListEvt handle. This handle is used to signal that a change has
690         been made into the process chain list. This is to ensure that a waiting
691         call can be resumed to take into account new processes. We also make
692         sure that if the handle was not found into the list we start over
693         the wait call. Indeed another concurrent call to win32_wait()
694         could already have handled this process.
696 2014-11-20  Ed Schonberg  <schonberg@adacore.com>
698         * sem_res.adb (Resolve_Actuals): The legality rule concerning
699         the use of class-wide actuals for a non-controlling formal are
700         not rechecked in an instance.
702 2014-11-20  Pascal Obry  <obry@adacore.com>
704         * g-dirope.ads: Minor typo fix.
706 2014-11-20  Hristian Kirtchev  <kirtchev@adacore.com>
708         * exp_attr.adb (Expand_N_Attribute_Reference,
709         Expand_Update_Attribute): Preserve the tag of a prefix by offering
710         a specific view of the class-wide version of the prefix.
712 2014-11-20  Javier Miranda  <miranda@adacore.com>
714         * sem_ch6.adb (Analyze_Function_Return): For functions returning
715         an access to an interface add an implicit conversion to the target
716         type to force the displacement of the pointer to the object to
717         reference the secondary dispatch table.
718         (Check_Anonymous_Return): Skip internally built functions which handle
719         the case of null access when locating the master of a task.
720         * sem_res.adb (Valid_Conversion): Return true for internally
721         generated conversions of access to interface types added to force
722         the displacement of the pointer to reference the corresponding
723         dispatch table.
725 2014-11-20  Pascal Obry  <obry@adacore.com>
727         * adaint.c (add_handle): realloc with a size of +100.
729 2014-11-20  Ed Schonberg  <schonberg@adacore.com>
731         * sem_res.adb (Make_Call_Into_Operator): In ASIS mode, propagate
732         back the resolved operands to the original call node, taking
733         into account that the original call may have named associations.
735 2014-11-20  Hristian Kirtchev  <kirtchev@adacore.com>
737         * inline.adb (Has_Some_Contract): Change the
738         guard to test the Ekind of the entity rather than the Analyzed
739         flag. This handles partially analyzed contexts.
741 2014-11-20  Ed Schonberg  <schonberg@adacore.com>
743         * sem_ch8.adb (Analyze_Object_Renaming): In Ada 83 mode, do
744         not reject the renaming of a function result if the renaming
745         does not come for source.
747 2014-11-20  Robert Dewar  <dewar@adacore.com>
749         * exp_util.ads: Minor addition of ??? clause.
751 2014-11-20  Ed Schonberg  <schonberg@adacore.com>
753         * sem_util.adb (Is_Variable): For an Ada 2012 implicit
754         dereference introduced for an indexing opertion, check that the
755         type of the corresponding access discriminant is not an access
756         to constant.
758 2014-11-20  Hristian Kirtchev  <kirtchev@adacore.com>
760         * sem_ch6.adb (Find_Corresponding_Spec): Inherit
761         the ghostness of the matching spec, the same way convention
762         is inherited.
764 2014-11-20  Eric Botcazou  <ebotcazou@adacore.com>
766         * sem_ch3.adb (Analyze_Object_Declaration): Swap a couple of
767         tests in a condition so Following_Address_Clause is invoked
768         only if need be.
769         * exp_util.ads (Following_Address_Clause): Add small note.
771 2014-11-20  Pascal Obry  <obry@adacore.com>
773         * adaint.c (remove_handle): New local routine without a lock.
774         (win32_wait): fix the critical section to properly protect needed
775         code, use new remove_handle.
776         (__gnat_win32_remove_handle): refactor code with remove_handle.
778 2014-11-20  Eric Botcazou  <ebotcazou@adacore.com>
780         * inline.adb (Analyze_Inlined_Bodies): Iterate between loading
781         of the inlined bodies and instantiation of the generic bodies
782         until no more bodies need to be loaded.
784 2014-11-20  Vincent Celier  <celier@adacore.com>
786         * prj.adb, prj.ads, prj-conf.adb: Minor change of procedure name:
787         Update_Ignore_Missing_With becomes Set_Ignore_Missing_With.
789 2014-11-20  Robert Dewar  <dewar@adacore.com>
791         * exp_ch7.adb, sem_ch5.adb, sem_ch7.adb, sem_util.adb,
792         sem_ch6.adb: Minor reformatting.
794 2014-11-20  Javier Miranda  <miranda@adacore.com>
796         * exp_ch4.adb (Expand_N_Type_Conversion): Add missing implicit
797         conversion to force the displacement of the pointer to the object
798         to reference the secondary dispatch table.
800 2014-11-11  Simon Wright  <simon@pushface.org>
802         PR ada/42978
803         * mlib-utl.adb (ar): Output the options passed to ranlib.
805 2014-11-07  Arnaud Charlet  <charlet@adacore.com>
807         * debug.adb, snames.adb-tmpl (Is_Keyword_Name): Consider 'overriding'
808         a keyword in Ada 95 mode when -gnatd.D is used.
809         * gnat_ugn.texi: Document -gnatd.D.
811 2014-11-07  Vasiliy Fofanov  <fofanov@adacore.com>
813         * gnatls.adb: Lower severity of the program's return value in
814         some common cases.
816 2014-11-07  Ed Schonberg  <schonberg@adacore.com>
818         * sem_ch10.adb (Decorate_Type): The limited view of a tagged
819         type has an empty list of primitive operations.
821 2014-11-07  Hristian Kirtchev  <kirtchev@adacore.com>
823         * sem_ch3.adb (Analyze_Object_Declaration): Update references to SPARK
824         RM.
825         (Process_Full_View): Update references to SPARK RM.
826         * sem_ch6.adb (Analyze_Generic_Subprogram_Body): Update references
827         to SPARK RM.
828         (Analyze_Subprogram_Body_Helper): Update references
829         to SPARK RM.
830         * sem_ch7.adb (Analyze_Package_Body_Helper): Update references
831         to SPARK RM.
832         * sem_prag.adb (Check_Ghost_Constituent): Update references to
833         SPARK RM.
834         * sem_res.adb (Check_Ghost_Policy): Update references to SPARK RM.
835         (Resolve_Actuals): Ensure that the actual parameter of a Ghost
836         subprogram whose formal is of mode IN OUT or OUT is Ghost.
837         * sem_util.adb (Check_Ghost_Completion): Update references to
838         SPARK RM.
840 2014-11-07  Ed Schonberg  <schonberg@adacore.com>
842         * exp_ch7.adb (Make_Final_Call): If type of designated object is
843         derived from that of the formal of the Deep_Finalize procedure,
844         add an unchecked conversion to prevent spurious type error.
846 2014-11-07  Robert Dewar  <dewar@adacore.com>
848         * table.adb, inline.adb, einfo.adb, gnat1drv.adb, exp_ch13.adb,
849         exp_fixd.adb, prj-conf.adb, exp_strm.adb, a-cofove.adb, exp_ch3.ads:
850         Minor reformatting.
852 2014-11-07  Robert Dewar  <dewar@adacore.com>
854         * sem_ch12.adb, sem_ch13.adb, prj-tree.adb: Minor reformatting.
856 2014-11-07  Hristian Kirtchev  <kirtchev@adacore.com>
858         * einfo.adb (Set_Is_Checked_Ghost_Entity,
859         Set_Is_Ignored_Ghost_Entity): Add exceptions to the assertion
860         check.
861         * sem_ch6.adb (Check_Conformance): Consider only
862         source subprograms when checking for Ghost conformance.
863         * sem_prag.adb (Analyze_Pragma): Handle the case
864         where pragma Ghost applies to a stand alone subprogram body that
865         acts as a compilation unit.
866         * sem_res.adb: Minor reformatting (merge if statements).
868 2014-11-07  Ed Schonberg  <schonberg@adacore.com>
870         * exp_strm.adb (Build_Record_Or_Elementary_Input_Function):
871         Check whether underlying type is constrained before generating
872         the object declaration for the result object of the function.
874 2014-11-07  Robert Dewar  <dewar@adacore.com>
876         * freeze.adb: Code clean up.
878 2014-11-07  Yannick Moy  <moy@adacore.com>
880         * a-cfdlli.ads, a-cfhama.ads, a-cfhase.ads, a-cfinve.ads,
881         * a-cforma.ads, a-cforse.ads, a-cofove.ads: Mark First_To_Previous,
882         Current_To_Last and Strict_Equal as Ghost.
884 2014-11-07  Ed Schonberg  <schonberg@adacore.com>
886         * sem_ch3.adb: Code clean up.
888 2014-11-07  Hristian Kirtchev  <kirtchev@adacore.com>
890         * freeze.adb (Freeze_Entity): Issue an error regardless of the
891         SPARK_Mode when a ghost type is effectively volatile.
892         * sem_ch3.adb (Analyze_Object_Contract): Decouple the checks
893         related to Ghost from SPARK_Mode.
894         * sem_res.adb (Check_Ghost_Policy): Issue an error regardless
895         of the SPARK_Mode when the Ghost policies do not match.
896         * sem_util.adb (Check_Ghost_Completion): Issue an error regardless
897         of the SPARK_Mode when the Ghost policies do not match.
899 2014-11-07  Ed Schonberg  <schonberg@adacore.com>
901         * sem_ch5.adb (Analyze_Iterator_Specification): return if name
902         in iterator does not have any usable aspect for iteration.
904 2014-11-07  Ed Schonberg  <schonberg@adacore.com>
906         * sem_ch6.adb (Analyze_Null_Procedure): Reject a null procedure
907         that there is a previous null procedure in scope with a matching
908         profile.
910 2014-11-07  Hristian Kirtchev  <kirtchev@adacore.com>
912         * atree.adb (Copy_Separate_Tree): Copy the aspect specifications.
913         * inline.adb (Has_Some_Contract): Do the check only when the
914         related entity has been analyzed.
916 2014-11-07  Ed Schonberg  <schonberg@adacore.com>
918         * exp_fixd.adb (Expand_Multiply_Fixed_By_Fixed_Giving_Integer):
919         If the restriction No_Floating_Point is in effect, and the
920         operands have the same type, introduce a temporary to hold
921         the fixed point result, to prevent the use of floating-point
922         operations at run-time.
924 2014-11-07  Robert Dewar  <dewar@adacore.com>
926         * freeze.adb (Check_Address_Clause): Minor reformatting
927         (Find_Constant): Minor reformatting.
928         (Freeze_Array_Type): Modify check for packed declarations.
929         (Freeze_Entity): Minor reformatting.
931 2014-11-05  Eric Botcazou  <ebotcazou@adacore.com>
933         * gnatvsn.ads (Library_Version): Bump to 5.0.
935 2014-11-05  Eric Botcazou  <ebotcazou@adacore.com>
937         * gcc-interface/trans.c (Subprogram_Body_to_gnu): For a function with
938         copy-in/copy-out parameters and which returns by invisible reference,
939         do not create the variable for the return value; instead, manually
940         generate the indirect copy out statements on exit.
941         (gnat_to_gnu) <N_Simple_Return_Statement>: Adjust accordingly and build
942         a simple indirect assignment for the return value.
944 2014-11-05  Eric Botcazou  <ebotcazou@adacore.com>
946         * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Record_Type>: For a
947         derived untagged type that renames discriminants, be prepared for
948         a type derived from a private discriminated type when changing the
949         type of the stored discriminants.
951 2014-11-05  Eric Botcazou  <ebotcazou@adacore.com>
953         * gcc-interface/trans.c (Handled_Sequence_Of_Statements_to_gnu): Set
954         the SLOC of the node on the call to set_jmpbuf_address_soft emitted
955         on block entry with SJLJ.
957 2014-11-05  Eric Botcazou  <ebotcazou@adacore.com>
959         * gcc-interface/utils.c (create_subprog_decl): Move code dealing with
960         conflicting inlining status of nested subprograms to...
961         * gcc-interface/trans.c (check_inlining_for_nested_subprog): ...here.
962         (Attribute_to_gnu) <Attr_Access>: Call it.
963         (Call_to_gnu): Likewise.
964         (Subprogram_Body_to_gnu): Drop the body if it is an inlined external
965         function that has been marked uninlinable.
967 2014-10-31  Hristian Kirtchev  <kirtchev@adacore.com>
969         * aspects.adb Add an entry for aspect Ghost in table
970         Canonical_Aspect.
971         * aspects.ads Add an entry for aspect Ghost in tables
972         Aspect_Argument, Aspect_Delay, Aspect_Id, Aspect_Names and
973         Implementation_Defined_Aspect.
974         * einfo.adb: Flags 277 and 278 are now in use.
975         (Is_Checked_Ghost_Entity): New routine.
976         (Is_Ghost_Entity): Removed.
977         (Is_Ghost_Subprogram): Removed.
978         (Is_Ignored_Ghost_Entity): New routine.
979         (Set_Is_Checked_Ghost_Entity): New routine.
980         (Set_Is_Ignored_Ghost_Entity): New routine.
981         (Write_Entity_Flags): Output flags Is_Checked_Ghost_Entity and
982         Is_Ignored_Ghost_Entity.
983         * einfo.ads: Add new flags Is_Checked_Ghost_Entity
984         and Is_Ignored_Ghost_Entity along with usage in nodes.
985         (Is_Checked_Ghost_Entity): New routine and pragma Inline.
986         (Is_Ghost_Entity): Removed along with synthesized flag
987         description and usage in nodes.
988         (Is_Ghost_Subprogram): Removed along with synthesized flag description
989         and usage in nodes.
990         (Is_Ignored_Ghost_Entity): New routine and pragma Inline.
991         (Set_Is_Checked_Ghost_Entity): New routine and pragma Inline.
992         (Set_Is_Ignored_Ghost_Entity): New routine and pragma Inline.
993         * freeze.adb (Freeze_Entity): A Ghost type cannot be effectively
994         volatile.
995         * par-prag.adb Pragma Ghost does not need special handling by
996         the parser.
997         * repinfo.adb (List_Mechanisms): Remove the entry for convention Ghost.
998         * sem_attr.adb (Analyze_Access_Attribute): Remove obsolete check.
999         * sem_ch3.adb (Analyze_Full_Type_Declaration): Mark
1000         the type as Ghost when its enclosing context is Ghost.
1001         (Analyze_Incomplete_Type_Decl): Mark the type as Ghost when
1002         its enclosing context is Ghost.
1003         (Analyze_Number_Declaration): Mark the number as Ghost when its
1004         enclosing context is Ghost.
1005         (Analyze_Object_Declaration): Mark the object as Ghost when its
1006         enclosing context is Ghost. Verify the Ghost policy between
1007         initial declaration and completion of a deferred constant.
1008         (Analyze_Object_Contract): A Ghost variable cannot be effectively
1009         volatile, imported or exported.
1010         (Build_Derived_Record_Type): Mark a type extension as Ghost when it
1011         implements a Ghost interface.
1012         (Build_Record_Type): Inherit volatility and "ghostness" from
1013         the parent type.
1014         (Check_Completion): A Ghost entity declared
1015         in a non-Ghost package does not require completion in a body.
1016         (Implements_Ghost_Interface): New routine.
1017         (Process_Full_View): Inherit "ghostness" from the partial view. Verify
1018         the Ghost policy between the partial and full views. Verify the
1019         completion of a Ghost type extension.
1020         * sem_ch4.adb (Check_Ghost_Subprogram_Call): Removed.
1021         * sem_ch5.adb (Analyze_Assignment): Analyze the left hand side first.
1022         * sem_ch6.adb (Analyze_Abstract_Subprogram_Declaration): Mark
1023         the subprogram as Ghost when its enclosing context is Ghost.
1024         (Analyze_Generic_Subprogram_Body): Mark the generic body as Ghost
1025         when its enclosing context is Ghost. Verify the Ghost policy
1026         between the spec and body.
1027         (Analyze_Subprogram_Body_Helper): Mark the body as Ghost when its
1028         enclosing context is Ghost. Verify the Ghost policy between the spec
1029         and body.
1030         (Check_Conformance): A Ghost subprogram profile and a non-Ghost
1031         subprogram profile are not subtype conformant.
1032         (Convention_Of): Removed.
1033         * sem_ch7.adb (Analyze_Package_Body_Helper): Inherit the
1034         "ghostness" from the spec. Verify the Ghost policy between
1035         the spec and body.
1036         (Analyze_Private_Type_Declaration): Mark the type as Ghost when its
1037         enclosing context is Ghost.
1038         (Requires_Completion_In_Body): New routine.
1039         (Unit_Requires_Body): Use Requires_Completion_In_Body.
1040         (Unit_Requires_Body_Info): Rename formal parameter P to Pack_Id, update
1041         comment on usage and all uses of P in the body. Use
1042         Requires_Completion_In_Body.
1043         * sem_ch7.ads (Unit_Requires_Body): Rename formal parameter P
1044         to Pack_Id, update comment on usage and all uses of P in the body.
1045         * sem_ch8.adb (Analyze_Exception_Renaming): Inherit the "ghostness"
1046         from the renamed excention.
1047         (Analyze_Generic_Renaming): Inherit the "ghostness" from the
1048         renamed generic subprogram.
1049         (Analyze_Object_Renaming): Inherit the "ghostness" from the renamed
1050         object.
1051         (Analyze_Package_Renaming): Inherit the "ghostness" from the
1052         renamed package.
1053         (Analyze_Subprogram_Renaming): Inherit the "ghostness" from the
1054         renamed subprogram.
1055         * sem_ch11.adb (Analyze_Exception_Declaration): Mark an exception
1056         as Ghost when its enclosing context is Ghost.
1057         * sem_ch12.adb (Analyze_Generic_Package_Declaration,
1058         Analyze_Generic_Subprogram_Declaration): Mark an exception as
1059         Ghost when its enclosing context is Ghost.
1060         (Preanalyze_Actuals): Remove obsolete check.
1061         * sem_ch13.adb (Analyze_Aspect_Specifications): Add processing
1062         for aspect Ghost.
1063         (Check_Aspect_At_Freeze_Point): Aspects
1064         Depends and Global do no need special checking at freeze point.
1065         (Insert_After_SPARK_Mode): Update comment on usage.
1066         * sem_mech.adb (Set_Mechanisms): Remove the entry for convention Ghost.
1067         * sem_prag.adb Add an entry for pragma Ghost in table Sig_Flags.
1068         (Analyze_Abstract_State): Update the grammar of the pragma. Add
1069         formal parameter Pack_Id along with comment on usage. Mark an
1070         abstract state as Ghost when its enclosing context is Ghost. Add
1071         processing for option Ghost.
1072         (Analyze_Constituent): Verify
1073         that a Ghost abstract state is refined by Ghost constituents.
1074         (Analyze_Pragma): "Ghost" is now a valid policy. Add checks
1075         related to the use and placement of Check_Policy Ghost. Add
1076         processing for pragma Ghost.
1077         (Check_Ghost_Constituent): New routine.
1078         (Is_Valid_Assertion_Kind): "Ghost" is now a valid assertion.
1079         (Process_Convention): Remove obsolete check.
1080         (Set_Convention_From_Pragma): Remove the processing for convention
1081         Ghost.
1082         * sem_res.adb (Check_Ghost_Context): New routine.
1083         (Resolve_Call): Verify that a reference to a Ghost entity appears in a
1084         suitable context. Verify the Ghost polity between point of declaration
1085         and point of use.
1086         (Resolve_Entity_Name): Verify that a reference to
1087         a Ghost entity appears in a suitable context. Verify the Ghost
1088         polity between point of declaration and point of use.
1089         * sem_util.adb (Check_Ghost_Completion): New routine.
1090         (Check_Ghost_Derivation): New routine.
1091         (Incomplete_Or_Partial_View): New routine.
1092         (Incomplete_Or_Private_View): Removed.
1093         (Is_Ghost_Entity): New routine.
1094         (Is_Ghost_Statement_Or_Pragma): New routine.
1095         (Is_Subject_To_Ghost): New routine.
1096         (Policy_In_Effect): New routine.
1097         (Set_Is_Ghost_Entity): New routine.
1098         (Within_Ghost_Scope): New routine.
1099         * sem_util.ads (Check_Ghost_Completion): New routine.
1100         (Check_Ghost_Derivation): New routine.
1101         (Incomplete_Or_Partial_View): New routine.
1102         (Incomplete_Or_Private_View): Removed.
1103         (Is_Ghost_Entity): New routine.
1104         (Is_Ghost_Statement_Or_Pragma): New routine.
1105         (Is_Subject_To_Ghost): New routine.
1106         (Policy_In_Effect): New routine.
1107         (Set_Is_Ghost_Entity): New routine.
1108         (Within_Ghost_Scope): New routine.
1109         * snames.adb-tmpl (Get_Convention_Id): Remove the entry for
1110         convention Ghost.
1111         (Get_Convention_Name): Remove the entry for convention Ghost.
1112         * snames.ads-tmpl Remove the convention id for Ghost. Add a
1113         pragma id for Ghost.
1115 2014-10-31  Sergey Rybin  <rybin@adacore.com frybin>
1117         * gnat_ugn.texi: Add description of --RTS option for ASIS tools.
1119 2014-10-31  Olivier Hainque  <hainque@adacore.com>
1121         * gcc-interface/Makefile.in (arm-vxworks): Update target pairs.
1123 2014-10-31  Vincent Celier  <celier@adacore.com>
1125         * prj-part.adb (Parse_Single_Project): Call Set_Display_Name_Of.
1126         * prj-proc.adb (Recursive_Process): Call Display_Name_Of to
1127         get the project Display_Name.
1128         * prj-tree.adb (Display_Name_Of): New function
1129         (Set_Display_Name_Of): New procedure.
1130         (Create_Project): Call Set_Display_Name_Of.
1131         * prj-tree.ads (Display_Name_Of): New function.
1132         (Set_Display_Name_Of): New procedure.
1133         (Project_Node_Record): New component Display_Name.
1134         (Project_Name_And_Node): Remove component Display_Name.
1135         * prj-conf.adb (Parse_Project_And_Apply_Config): Use the full
1136         Config_File_Path as the Config_File_Name, not just its simple
1137         name.
1139 2014-10-31  Thomas Quinot  <quinot@adacore.com>
1141         * get_scos.adb: Minor reformatting.
1143 2014-10-31  Ed Schonberg  <schonberg@adacore.com>
1145         * exp_ch5.adb (Expand_Formal_Container_Loop): Create block to
1146         capture declaration for cursor to prevent spurious errors when
1147         several formal iterators that use the same cursoe name appear
1148         in the same context.
1150 2014-10-31  Vincent Celier  <celier@adacore.com>
1152         * prj-proc.adb (Recursive_Process): Make sure that the project
1153         display name is never No_Name.
1155 2014-10-31  Ed Schonberg  <schonberg@adacore.com>
1157         * sem_attr.adb (Analyze_Access_Attribute): Do not emit error
1158         message if reference does not come from source, as in the case
1159         for the controlling argument of a dispatching call. Error is
1160         diagnosed when call is resolved.
1161         * sem_ch4.adb (Complete_Object_Operation); Fix incorrect RM
1162         reference in error message.
1163         * sem_res.adb (Check_Prefixed_Call): ditto.
1165 2014-10-31  Yannick Moy  <moy@adacore.com>
1167         * sem_prag.adb (Process_Restrictions_Or_Restriction_Warnings): Do not
1168         suppress checks when pragma Restrictions (No_Exception) is used in
1169         CodePeer or GNATprove mode.
1171 2014-10-31  Yannick Moy  <moy@adacore.com>
1173         * gnat1drv.adb (Adjust_Global_Switches): Explicitly mark language
1174         checks as not suppressed in GNATprove mode.
1176 2014-10-31  Ed Schonberg  <schonberg@adacore.com>
1178         * sem_elab.adb (Check_Elab_Call): Nothing to check if call is
1179         being pre-analyzed.
1180         * sem_ch3.adb (Complete_Private_Subtype): If all rep items of full
1181         view are those of the base, use rep_item chain of partial view,
1182         which may include aspects.
1183         * sem_cat.adb (Is_non_Remote_Access_Type): Use underlying type
1184         of base type, to handle properly declared subtypes.
1186 2014-10-31  Ed Schonberg  <schonberg@adacore.com>
1188         * sem_ch12.adb (Analyze_Generic_Package_Declaration): If there
1189         is a default storage pool, add a corresponding aspect to the
1190         generic unit, to be used at the point of instantiation.
1191         (Analyze_Package_Instantiation): If generic unit has aspect
1192         specifications, propagate them to instance. If instance has a
1193         Default_Storage_Pool aspect, make sure that it overrides the
1194         one that may be inherited from the generic.
1196 2014-10-31  Vincent Celier  <celier@adacore.com>
1198         * prj-attr.adb: Minor removal of attributes of package Linker
1199         that have never been used and never been documented.
1200         * projects.texi: Add documentation for attribute Runtime.
1201         * prj-nmsc.adb (Check_Configuration): Do not report a warning
1202         for unknown compilers when the project is externally built.
1204 2014-10-31  Vasiliy Fofanov  <fofanov@adacore.com>
1206         * prj-conf.adb (Do_Autoconf): Refactor the code so that empty
1207         Normalized_Pathname doesn't inhibit the custom Selected_Target
1208         value.
1209         * prj-conf.adb (Parse_Project_And_Apply_Config): Make sure that
1210         Automatically_Generated is correctly set after the first call
1211         to Process_Project_And_Apply_Config and not modified after the
1212         second call, if any.
1214 2014-10-31  Yannick Moy  <moy@adacore.com>
1216         * Makefile.rtl, gnat_rm.texi, impunit.adb: Add mention of new library
1217         files.
1218         * a-cfinve.adb, a-cfinve.ads: New unit for formal indefinite
1219         vectors, suitable for use in client SPARK code, also more
1220         efficient than the standard vectors.
1221         * a-coboho.adb, a-coboho.ads New unit for bounded holders, that
1222         are used to define formal indefinite vectors in terms of formal
1223         definite ones.
1224         * a-cofove.adb, a-cofove.ads: Simplification of the API of formal
1225         definite vectors, similar to the API of the new indefinite ones. A
1226         new formal parameter of the generic unit called Bounded allows
1227         to define growable vectors that use dynamic allocation.
1229 2014-10-31  Vincent Celier  <celier@adacore.com>
1231         * prj-conf.adb (Look_For_Project_Paths): New procedure
1232         (Parse_Project_And_Apply_Config): Initially, parse the project
1233         files ignoring missing withs. If there are missing withs, extend
1234         the project path with directories rooted at the compiler roots,
1235         including directories rooted at the runtime roots, if there are
1236         non default runtimes, in the PATH orser.
1237         * prj-env.adb (Initialize_Default_Project_Path): Do not add
1238         any directory from the prefix if the target is "-".
1239         * prj-part.adb (Parse): Initialize the tables, as Parse may be
1240         call several times by gprbuild.
1241         * prj.adb (Update_Ignore_Missing_With): New procedure.
1243 2014-10-31  Ed Schonberg  <schonberg@adacore.com>
1245         * sem_aux.adb (First_Stored_Discriminant,
1246         Has_Completely_Hidden_Discriminant): When scanning the list of
1247         discriminants to locate possibly hidden (inherited) discriminants,
1248         ignore itypes that may appear in the entity list, when an access
1249         discriminants is constrained by an access attribute reference.
1251 2014-10-31  Javier Miranda  <miranda@adacore.com>
1253         * freeze.adb (Freeze_Record_Type): Add missing
1254         check to verify that all the primitives of an interface type
1255         are abstract or null procedures.
1257 2014-10-31  Vincent Celier  <celier@adacore.com>
1259         * s-os_lib.adb, s-os_lib.ads: New function Non_Blocking_Spawn that
1260         redirects standard output and standard error to two different files.
1262 2014-10-31  Bob Duff  <duff@adacore.com>
1264         * makeutl.ads: Minor comment fix.
1266 2014-10-31  Arnaud Charlet  <charlet@adacore.com>
1268         * system-linux-x86_64.ads, system-mingw-x86_64.ads (Word_Size,
1269         Memory_Size): Use Standard'Word_Size so that the value can be changed
1270         via a target configuration file.
1272 2014-10-31  Eric Botcazou  <ebotcazou@adacore.com>
1274         * exp_ch4.adb: Minor tweak.
1276 2014-10-31  Eric Botcazou  <ebotcazou@adacore.com>
1278         * sem_ch12.adb (Analyze_Package_Instantiation): Do not inline with
1279         back-end inlining.
1280         (Must_Inline_Subp): Delete.
1281         * sem_util.ads, sem_util.adb (Must_Inline): Likewise.
1283 2014-10-31  Ed Schonberg  <schonberg@adacore.com>
1285         * freeze.adb (Freeze_Entity): A default_pool does not apply to
1286         internal access types generated for 'access references.
1287         * sem_prag (Analyze_Pragma, case Default_Pool): If the name is
1288         not null it must designate a variable.
1290 2014-10-31  Eric Botcazou  <ebotcazou@adacore.com>
1292         * inline.adb: Minor reformatting.
1294 2014-10-31  Ed Schonberg  <schonberg@adacore.com>
1296         * sem_ch3.adb (Build_Derived_Private_Type): If the derived
1297         type has access discriminants, create itype references for their
1298         anonymous types, so that they are elaborated before the generated
1299         bodies for the primitive operations of the type.
1301 2014-10-31  Tristan Gingold  <gingold@adacore.com>
1303         * prj-conf.adb (Locate_Runtime): Remove procedure.
1305 2014-10-31  Eric Botcazou  <ebotcazou@adacore.com>
1307         * inline.adb (Has_Excluded_Declaration): With back-end inlining,
1308         only return true for nested packages.
1309         (Cannot_Inline): Issue errors/warnings whatever the optimization level
1310         for back-end inlining and remove assertion.
1312 2014-10-31  Sergey Rybin  <rybin@adacore.com frybin>
1314         * table.adb (Tree_Read, Tree_Write): Use parentheses to specify
1315         the desired order of '*' and '/' operations to avoid overflow.
1317 2014-10-31  Eric Botcazou  <ebotcazou@adacore.com>
1319         * exp_ch6.adb (Do_Inline): Remove unreachable code.
1320         (Do_Inline_Always): Likewise.
1322 2014-10-31  Vincent Celier  <celier@adacore.com>
1324         * prj-nmsc.adb (Check_Stand_Alone_Library): Change error message
1325         when library has no Ada interfaces and Library_Standalone is
1326         declared.
1328 2014-10-31  Arnaud Charlet  <charlet@adacore.com>
1330         * sem_ch13.adb (Check_Constant_Address_Clause): Disable checks
1331         on address clauses in CodePeer mode.
1333 2014-10-31  Javier Miranda  <miranda@adacore.com>
1335         * inline.adb (Expand_Inlined_Call): Do not skip
1336         inlining of calls to subprogram renamings.
1338 2014-10-31  Hristian Kirtchev  <kirtchev@adacore.com>
1340         * sem_res.adb (Resolve_Entity_Name): Account for
1341         the case where the immediate parent of a reference to an entity
1342         is a parameter association.
1344 2014-10-31  Eric Botcazou  <ebotcazou@adacore.com>
1346         * inline.adb (Check_And_Split_Unconstrained_Function): Do not
1347         test for the presence of nested subprograms.
1349 2014-10-31  Ed Schonberg  <schonberg@adacore.com>
1351         * aspects.ads, aspects.adb: Add aspect Default_Storage_Pool.
1352         * sem_ch13.adb (Analyze_One_Aspect): Generate pragma for aspect
1353         Default_Storage_Pool.
1355 2014-10-31  Eric Botcazou  <ebotcazou@adacore.com>
1357         * sem_ch6.adb: Remove obsolete comment.
1359 2014-10-31  Olivier Hainque  <hainque@adacore.com>
1361         * g-allein.ads: bind vec_sld for pixels to 8hi vsldoi instead
1362         of 4si, as pixels are short.
1364 2014-10-31  Ed Schonberg  <schonberg@adacore.com>
1366         * sem_res.adb (Resolve_Call): Do not reject a call to a protected
1367         operation in the spec of a protected type, when the call appears
1368         in a pre/postcondition for another protected operation.
1370 2014-10-31  Tristan Gingold  <gingold@adacore.com>
1372         * prj-conf.adb: Locate_Runtime: Always search the runtime in
1373         project path.
1375 2014-10-31  Eric Botcazou  <ebotcazou@adacore.com>
1377         * inline.adb (Check_Package_Body_For_Inlining): Adjust previous
1378         change to use correct idiom for back-end inlining.
1380 2014-10-31  Ed Schonberg  <schonberg@adacore.com>
1382         * freeze.adb (Freeze_Record_Type): Do not check component size
1383         if its type is generic.
1385 2014-10-31  Bob Duff  <duff@adacore.com>
1387         * gnat_rm.texi: Fix documentation w.r.t -gnatw.w.
1389 2014-10-31  Ed Schonberg  <schonberg@adacore.com>
1391         * sem_ch4.adb (Try_Container_Indexing): Use Check_Implicit_Dereference.
1392         * sem_util.adb (Check_Implicit_Dereference): a) Handle generalized
1393         indexing as well as function calls.  b)  If the context is a
1394         selected component and whe are in an instance, remove entity from
1395         selector name to force resolution of the node, so that explicit
1396         dereferences can be generated in the instance if they were in
1397         the generic unit.
1399 2014-10-31  Eric Botcazou  <ebotcazou@adacore.com>
1401         * inline.adb (Back_End_Cannot_Inline): Delete.
1402         (Add_Inlined_Subprogram): Do not call it.
1404 2014-10-31  Ed Schonberg  <schonberg@adacore.com>
1406         * exp_ch3.ads (Make_Tag_Assignment): New function, used to
1407         re-initialize the tag in a tagged object declaration with
1408         initial value.
1409         * exp_ch3.adb (Expand_N_Object_Declaration): Use
1410         Make_Tag_Assignment to simplify code for a tagged object
1411         declaration.
1412         * exp_ch13.adb (Expand_Freeze_Entity): Analyze freeze actions
1413         for the freeze node of an object.
1414         * freeze.adb (Check_Address_Clause): Use Make_Tag_Assignment when
1415         needed to extend Freeze_Actions for a tagged object declaration.
1417 2014-10-31  Eric Botcazou  <ebotcazou@adacore.com>
1419         * gnat_ugn.texi: Further minor improvement to -flto entry.
1421 2014-10-31  Gary Dismukes  <dismukes@adacore.com>
1423         * g-dynhta.adb, g-dynhta.ads: Minor typo fixes and reformatting.
1425 2014-10-30  Ed Schonberg  <schonberg@adacore.com>
1427         * exp_ch3.adb (Expand_N_Object_Declaration): Code cleanup.
1429 2014-10-30  Ed Schonberg  <schonberg@adacore.com>
1431         * sem_ch5.adb (Analyze_Iterator_Specification): If a subtype
1432         indication is provided, check properly that it covers the element
1433         type of of the container type.
1435 2014-10-30  Hristian Kirtchev  <kirtchev@adacore.com>
1437         * g-dynhta.ads, g-dynhta.adb: Add the implementation of a load facto
1438         -based hash table.
1440 2014-10-30  Ed Schonberg  <schonberg@adacore.com>
1442         * exp_util.ads, exp_util.adb (Following_Address_Clause): Modify
1443         Has_Following_Address_Clause so that it returns the address
1444         clause if present, rather than a boolean value.
1445         * sem_ch3.adb (Analyze_Object_Declaration): use
1446         Following_Address_Clause.
1447         * exp_ch3.adb (Expand_N_Object_Declaration): When a tagged object
1448         is initialized, insert tag assignment after object is frozen,
1449         which may be after an address clause that follows the declaration.
1451 2014-10-30  Tristan Gingold  <gingold@adacore.com>
1453         * system-darwin-x86.ads, system-linux-s390x.ads, system-linux-alpha.ads,
1454         system-vxworks-arm.ads, system-freebsd-x86_64.ads,
1455         system-linux-hppa.ads, system-linux-s390.ads,
1456         system-solaris-sparcv9.ads, system-mingw.ads, system-linux-ia64.ads,
1457         system-vxworks-sparcv9.ads, system-linux-ppc.ads, system-aix64.ads,
1458         system-linux-sh4.ads, system-solaris-x86.ads, system-linux-x86_64.ads,
1459         system-linux-x86.ads, system-vxworks-ppc.ads, system-hpux.ads,
1460         system-linux-armel.ads, system-darwin-ppc.ads, system-solaris-sparc.ads,
1461         system-vxworks-m68k.ads, system-hpux-ia64.ads, system.ads,
1462         system-solaris-x86_64.ads, system-mingw-x86_64.ads,
1463         system-vxworks-mips.ads, system-linux-sparc.ads, system-freebsd-x86.ads,
1464         system-aix.ads, system-darwin-x86_64.ads, system-vxworks-x86.ads: Add
1465         pragma No_Elaboration_Code_All.
1467 2014-10-30  Eric Botcazou  <ebotcazou@adacore.com>
1469         * gnat_ugn.texi: Minor improvement to -flto entry.
1471 2014-10-30  Hristian Kirtchev  <kirtchev@adacore.com>
1473         * sem_util.adb (Inherit_Subprogram_Contract):
1474         Add a guard to protect against enumeration literal overriding.
1475         * sem_ch3.adb, sem_ch4.adb, sem_res.adb, sem_util.adb:
1476         Minor reformatting (add SPARK RM references).
1478 2014-10-30  Robert Dewar  <dewar@adacore.com>
1480         * exp_dbug.adb, opt.ads: Minor reformatting.
1482 2014-10-30  Yannick Moy  <moy@adacore.com>
1484         * inline.adb (Has_Single_Return_In_GNATprove_Mode):
1485         Return False when return statement is inside one or more blocks.
1487 2014-10-30  Hristian Kirtchev  <kirtchev@adacore.com>
1489         * exp_ch7.adb (Is_Subprogram_Call): Account for the case where an
1490         object declaration initialized by a function call that returns
1491         an unconstrained result may be rewritted as a renaming of the
1492         secondary stack result.
1494 2014-10-30  Hristian Kirtchev  <kirtchev@adacore.com>
1496         * aspects.adb: Add an entry for aspect Extensions_Visible in
1497         table Canonical_Aspect.
1498         * aspects.ads: Add entry for aspect Extensions_Visible in
1499         tables Aspect_Argument, Aspect_Delay, Aspect_Id, Aspect_Names,
1500         Implementation_Defined_Aspect.
1501         * einfo.adb (Get_Pragma): Include pragma Extensions_Visible in
1502         the list of contract pragmas.
1503         * par-prag.adb Pragma Extensions_Visible does not require special
1504         processing from the parser.
1505         * sem_ch3.adb (Analyze_Object_Declaration): Prevent an
1506         implicit class-wide conversion of a formal parameter
1507         of a specific tagged type whose related subprogram is
1508         subject to pragma Extensions_Visible with value "False".
1509         (Check_Abstract_Overriding): Add various overriding checks
1510         related to pragma Extensions_Visible.
1511         (Derive_Subprogram):
1512         A subprogram subject to pragma Extensions_Visible with value
1513         False requires overriding if the subprogram has at least one
1514         controlling OUT parameter.
1515         (Is_EVF_Procedure): New routine.
1516         * sem_ch4.adb (Analyze_Type_Conversion): A formal parameter of
1517         a specific tagged type whose related subprogram is subject to
1518         pragma Extensions_Visible with value "False" cannot appear in
1519         a class-wide conversion.
1520         * sem_ch6.adb (Analyze_Subprogram_Contract): Remove
1521         the assertion to account for pragma Extensions_Visible.
1522         (Check_Overriding_Indicator): An overriding subprogram
1523         inherits the contact of the overridden subprogram.
1524         (New_Overloaded_Entity): An overriding subprogram inherits the
1525         contact of the overridden subprogram.
1526         * sem_ch13.adb (Analyze_Aspect_Specifications): Add processing
1527         for aspect Extensions_Visible.
1528         (Check_Aspect_At_Freeze_Point): Aspect Extensions_Visible does not
1529         require special processing at the freeze point.
1530         * sem_prag.adb Add an entry for pragma Extensions_Visible in
1531         table Sig_Flags.
1532         (Analyze_Pragma): Ensure that various SPARK
1533         pragmas lack identifiers in their arguments. Add processing for
1534         pragma Extensions_Visible.
1535         (Chain_CTC): Code reformatting.
1536         * sem_res.adb (Resolve_Actuals): A formal parameter of a
1537         specific tagged type whose related subprogram is subject to
1538         pragma Extensions_Visible with value "False" cannot act as an
1539         actual in a subprogram with value "True".
1540         * sem_util.adb (Add_Classification): New routine.
1541         (Add_Contract_Item): Account for pragma Extensions_Visible. Code
1542         reformatting.
1543         (Add_Contract_Test_Case): New routine.
1544         (Add_Pre_Post_Condition): New routine.
1545         (Extensions_Visible_Status): New routine.
1546         (Inherit_Subprogram_Contract): New routine.
1547         (Is_EVF_Expression): New routine.
1548         (Is_Specific_Tagged_Type): New routine.
1549         * sem_util.ads Add type Extensions_Visible_Mode and document all values.
1550         (Add_Contract_Item): Add pragma Extensions_Visible to the
1551         comment on usage.
1552         (Inherit_Subprogram_Contract): New routine.
1553         (Is_EVF_Expression): New routine.
1554         (Is_Specific_Tagged_Type): New routine.
1555         * sinfo.adb (Is_Inherited): New routine.
1556         (Set_Is_Inherited): New routine.
1557         * sinfo.ads Add flag Is_Inherited along with its usage in
1558         nodes.
1559         (Is_Inherited): New routine along with pragma Inline.
1560         (Set_Is_Inherited): New routine along with pragma Inline.
1561         * snames.ads-tmpl: Add predefined name "Extensions_Visible"
1562         and a new Pragma_Id for the pragma.
1564 2014-10-30  Vincent Celier  <celier@adacore.com>
1566         * prj-proc.adb (Process_Case_Construction): Do not look for
1567         the ultimate extending project for a case variable.
1569 2014-10-30  Pierre-Marie Derodat  <derodat@adacore.com>
1571         * exp_dbug.adb, opt.ads (GNAT_Encodings): Import from C. Define
1572         enumerators.
1573         (gnat_encodings): Define a dummy variable for the AAMP back-end.
1574         (Get_Encoded_Name): When -fgnat-encodings=all|gdb, encode names
1575         for all discrete types whose bounds do not match size and do so
1576         only for biased types when -fgnat-encodings=minimal.
1577         * gcc-interface/decl.c (gnat_to_gnu_entity): Do not create ___XA
1578         parallel types when array bounds are constant while the lower bound is
1579         not 1.  Also stop generating them because the bound type is
1580         larger than sizetype.
1581         * gcc-interface/misc.c (gnat_encodings): New.
1583 2014-10-30  Thomas Quinot  <quinot@adacore.com>
1585         * opt.adb (Set_Opt_Config_Switches): For an internal unit,
1586         always reset Default_SSO to ' '.
1588 2014-10-30  Thomas Quinot  <quinot@adacore.com>
1590         * freeze.adb (Freeze_Record_Type): Set SSO from default before
1591         checking SSO consistency.
1593 2014-10-30  Javier Miranda  <miranda@adacore.com>
1595         * inline.adb (Check_Package_Body_For_Inlining):
1596         Cleanup this subprogram to implement exactly the behavior
1597         documented in the spec.
1599 2014-10-30  Hristian Kirtchev  <kirtchev@adacore.com>
1601         * a-comutr.adb, a-cimutr.adb (Insert_Child): Add new variable First.
1602         Update the position after all insertions have taken place.
1604 2014-10-30  Ed Schonberg  <schonberg@adacore.com>
1606         * sem_prag.adb (Analyze_Pragma, case License): Do not perform
1607         analysis of pragma arguments when in CodePeer mode, pragma has
1608         different format on other compilers.
1610 2014-10-30  Thomas Quinot  <quinot@adacore.com>
1612         * s-os_lib.adb: Minor reformatting.
1614 2014-10-29  Richard Sandiford  <richard.sandiford@arm.com>
1616         * gcc-interface/decl.c, gcc-interface/gigi.h, gcc-interface/misc.c,
1617         gcc-interface/trans.c, gcc-interface/utils.c, gcc-interface/utils2.c:
1618         Remove redundant enum from machine_mode.
1620 2014-10-28  Andrew MacLeod  <amacleod@redhat.com>
1622         * gcc-interface/trans.c: Adjust include files.
1623         * gcc-interface/utils.c: Ditto.
1625 2014-10-27  Eric Botcazou  <ebotcazou@adacore.com>
1627         * gcc-interface/utils.c (create_subprog_decl): Adjust condition.
1629 2014-10-27  Eric Botcazou  <ebotcazou@adacore.com>
1631         * gcc-interface/misc.c (gnat_init_options_struct): Parameterize errno
1632         support here instead of...
1633         Do not set flag_delete_dead_exceptions to 1 unconditionally.
1634         (gnat_init_gcc_eh): Set flag_delete_dead_exceptions to 1.
1635         (gnat_init_gcc_fp): ...here.
1637 2014-10-27  Eric Botcazou  <ebotcazou@adacore.com>
1639         * gcc-interface/trans.c (gnat_to_gnu) <N_Real_Literal>: Minor tweaks.
1641 2014-10-27  Eric Botcazou  <ebotcazou@adacore.com>
1643         * gcc-interface/utils.c (create_var_decl_1): For a variable declared
1644         in the unit, set TREE_PUBLIC only if it has static storage duration.
1646 2014-10-27  Eric Botcazou  <ebotcazou@adacore.com>
1648         * gcc-interface/decl.c (gnat_to_gnu_entity): Apply special treatment
1649         of derived packed array types to constrained subtypes only.
1651 2014-10-27  Eric Botcazou  <ebotcazou@adacore.com>
1653         * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Array_Type>: Remove
1654         superfluous computation for the max size.
1655         <E_Array_Subtype>: Likewise.  Make sure that the max size calculation
1656         does not overflow at compile time.
1658 2014-10-23  Ed Schonberg  <schonberg@adacore.com>
1660         * sem_eval.adb (Check_Non_Static_Context): Do not set
1661         Is_Machine_Number on a literal of a fixed-point type.
1663 2014-10-23  Robert Dewar  <dewar@adacore.com>
1665         * mlib-prj.adb, sem_ch4.adb, exp_ch3.adb: Minor reformatting.
1667 2014-10-23  Pierre-Marie Derodat  <derodat@adacore.com>
1669         * exp_dbug.ads: Update ___XA parallel type specification.
1671 2014-10-23  Hristian Kirtchev  <kirtchev@adacore.com>
1673         * sem_ch3.adb (Copy_Array_Subtype_Attributes): Inherit the rep
1674         chain of the source type.
1675         * sem_ch13.adb (Analyze_Aspect_Specifications): Minor
1676         reformatting of an error message.
1677         * sem_util.adb (Inherit_Rep_Item_Chain): Do not inherit a rep
1678         chain that has been inherited already.
1680 2014-10-23  Ed Schonberg  <schonberg@adacore.com>
1682         * sem_ch6.adb (Analyze_Expression_Function): Simplify analysis
1683         in generic context, and generate body in this case as well,
1684         to simplify ASIS traversals on the construct.
1686 2014-10-23  Ed Schonberg  <schonberg@adacore.com>
1688         * sem_ch4.adb (Complete_Object_Operation): Indicate that the
1689         scope of the operation (s) is referenced, to prevent spurious
1690         warnings about unused units.
1692 2014-10-23  Johannes Kanig  <kanig@adacore.com>
1694         * errout.adb (Error_Msg_Internal): Copy check flag, increment
1695         check msg count.
1696         * erroutc.adb (Delete_Msg) adjust check msg count.
1697         (Output_Msg_Text) handle check msg case (do nothing).
1698         (Prescan_Message) recognize check messages with severity prefixes.
1699         * errutil.adb (Error_Msg) handle check flag, adjust counter.
1701 2014-10-23  Ed Schonberg  <schonberg@adacore.com>
1703         * sem_eval.adb (Subtypes_Statically_Match): For a generic actual
1704         type, check for the presence of discriminants in its parent type,
1705         against the presence of discriminants in the context type.
1707 2014-10-23  Tristan Gingold  <gingold@adacore.com>
1709         * adaint.c: __gnat_get_file_names_case_sensitive: Default is
1710         true on arm-darwin.
1712 2014-10-23  Arnaud Charlet  <charlet@adacore.com>
1714         * pprint.adb (Expression_Image): Add handling of quantifiers.
1716 2014-10-23  Ed Schonberg  <schonberg@adacore.com>
1718         * exp_pakd.adb (Expand_Packed_Element_Reference): If the
1719         prefix is a source entity, generate a reference to it before
1720         transformation, because rewritten node might not generate a
1721         proper reference, leading to spurious warnings.
1723 2014-10-23  Tristan Gingold  <gingold@adacore.com>
1725         * init.c: Fix thinko in previous patch.
1727 2014-10-23  Hristian Kirtchev  <kirtchev@adacore.com>
1729         * sem_ch3.adb (Decimal_Fixed_Point_Type_Declaration):
1730         Inherit the rep chain of the implicit base type.
1731         (Floating_Point_Type_Declaration): Inherit the rep chain of the
1732         implicit base type.
1733         (Ordinary_Fixed_Point_Type_Declaration): Inherit the rep chain of the
1734         implicit base type.
1735         (Signed_Integer_Type_Declaration): Inherit the rep chain of the
1736         implicit base type.
1737         * sem_util.ads, sem_util.adb (Inherit_Rep_Item_Chain): New routine.
1739 2014-10-23  Pascal Obry  <obry@adacore.com>
1741         * g-regist.adb, g-regist.ads: Add support for reading 32bit or 64bit
1742         view of the registry.
1744 2014-10-23  Ed Schonberg  <schonberg@adacore.com>
1746         * exp_ch3.adb (Expand_N_Object_Declaration): If type is abstract,
1747         return without expanding expression, to prevent subsequent crash.
1748         * freeze.adb: better error message for illegal declaration.
1750 2014-10-23  Hristian Kirtchev  <kirtchev@adacore.com>
1752         * sysdep.c (__gnat_localtime_tzoff): Properly delimit the
1753         substring which represents the time zone on VxWorks.
1755 2014-10-23  Vincent Celier  <celier@adacore.com>
1757         * gnatls.adb: If --RTS= was not used, check if there is a default
1758         runtime. If there is none, in verbose mode, indicate that the
1759         default runtime is not available and show only the current
1760         directory in the source and the object search paths.
1762 2014-10-23  Ed Schonberg  <schonberg@adacore.com>
1764         * sem_ch6.adb (Process_Formals): A thunk procedure with a
1765         parameter of a limited view does not need a freeze node.
1767 2014-10-23  Hristian Kirtchev  <kirtchev@adacore.com>
1769         * sem_ch7.adb (Analyze_Package_Body_Helper):
1770         The logic which hides local entities from external
1771         visibility is now contained in routine Hide_Public_Entities.
1772         (Hide_Public_Entities): New routine. Object and subprogram
1773         renamings are now hidden from external visibility the same way
1774         objects are.
1776 2014-10-23  Ed Schonberg  <schonberg@adacore.com>
1778         * sem_attr.adb (Analyze_Attribute): The prefix of attribute Elaborated
1779         does not require freezing, in particular if it denotes a generic
1780         function.
1782 2014-10-23  Yannick Moy  <moy@adacore.com>
1784         * sem_prag.adb (Analyze_Pragma/Pragma_Inline & Pragma_Inline_Always):
1785         Disable analysis in GNATprove mode.
1787 2014-10-23  Arnaud Charlet  <charlet@adacore.com>
1789         * mlib-prj.adb: Remove obsolete references to libdecgnat (VMS only).
1791 2014-10-23  Arnaud Charlet  <charlet@adacore.com>
1793         * gnat1drv.adb (Adjust_Global_Switches): Ignore style check
1794         pragmas in codepeer mode.
1796 2014-10-23  Gary Dismukes  <dismukes@adacore.com>
1798         * gnat_rm.texi: Minor syntax fix for pragma Annotate (missing ',').
1800 2014-10-23  Hristian Kirtchev  <kirtchev@adacore.com>
1802         * sem_ch12.adb (Inline_Instance_Body): Alphabetize
1803         local variables and constants. Add constants Save_SM and Save_SMP
1804         to capture SPARK_Mode-related attributes.  Compile the inlined
1805         body with the SPARK_Mode of the enclosing context.
1807 2014-10-23  Hristian Kirtchev  <kirtchev@adacore.com>
1809         * sinfo.adb (Elaboration_Boolean): Removed.
1810         (Set_Elaboration_Boolean): Removed.
1811         * sinfo.ads Remove attribute Elaboration_Boolean along with its
1812         occurrence in nodes.
1813         (Elaboration_Boolean): Removed along with pragma Inline.
1814         (Set_Elaboration_Boolean): Removed along with pragma Inline.
1816 2014-10-23  Ed Schonberg  <schonberg@adacore.com>
1818         * sem_ch3.adb (Constant_Redeclaration): Make error message more
1819         explicit on a deferred constant whose object_definition is an
1820         anonymous array.
1822 2014-10-23  Vincent Celier  <celier@adacore.com>
1824         * gnatls.adb: Never call Targparm.Get_Target_Parameters.
1826 2014-10-23  Ed Schonberg  <schonberg@adacore.com>
1828         * sem_ch6.adb (Analyze_Expression_Function): In a generic
1829         context do not create a body, and only pre-analyze the expression,
1830         which may include incomplete views.
1832 2014-10-23  Robert Dewar  <dewar@adacore.com>
1834         * sem_type.adb: Minor code reorganization (use Nkind_In, Ekind_In).
1835         * sem_ch3.adb: Minor reformatting.
1837 2014-10-23  Ed Schonberg  <schonberg@adacore.com>
1839         * sem_ch12.adb (Analyze_Associations): If an actual for a formal
1840         object is a call to a parameterless expression function, add
1841         the function to the list of actuals to freeze.
1842         * freeze.adb (Check_Expression_Function): Create freeze nodes of
1843         outer types that may be references in the body of the expression.
1845 2014-10-23  Hristian Kirtchev  <kirtchev@adacore.com>
1847         * exp_util.ads, checks.ads: Minor comment reformatting.
1849 2014-10-23  Javier Miranda  <miranda@adacore.com>
1851         * sem_eval (Test_In_Range): Disable removal of range_check for
1852         VM targets.
1854 2014-10-23  Robert Dewar  <dewar@adacore.com>
1856         * erroutc.adb (Validate_Specific_Warnings): Fix test for -W
1857         messages, which got disabled when we unconditionally added an
1858         asterisk at the start of the string.
1860 2014-10-23  Vincent Celier  <celier@adacore.com>
1862         * gnatls.adb: Ensure that "gnatls -l" works even when there is
1863         no default runtime.
1865 2014-10-23  Eric Botcazou  <ebotcazou@adacore.com>
1867         * sem_ch3.adb (Build_Derived_Private_Type): When the parent is
1868         untagged and has discriminants, build the implicit full view after
1869         building the derived type. Capture original declaration and type
1870         here instead of...
1871         (Copy_And_Build): ...here.
1872         * sem_type.adb (Full_View_Covers): Handle the Underlying_Full_View.
1874 2014-10-23  Hristian Kirtchev  <kirtchev@adacore.com>
1876         * checks.adb (Ensure_Valid): Update the subprogram
1877         profile. Propagate the contex attributes to Insert_Valid_Check.
1878         (Insert_Valid_Check): Update the subprogram profile. Propagate
1879         the attributes of the context to Duplicate_Subexpr_No_Checks.
1880         (Validity_Check_Range): Update the subprogram profile. Propagate
1881         the context attribute to Ensure_Valid.
1882         * checks.ads (Ensure_Valid): Update the subprogram profile
1883         along with the comment on usage.
1884         (Insert_Valid_Check): Update the subprogram profile along with the
1885         comment on usage.
1886         (Validity_Check_Range): Update the subprogram profile along with
1887         the comment on usage.
1888         * exp_util.adb (Build_Temporary): New routine.
1889         (Duplicate_Subexpr_No_Checks): Update the subprogram
1890         profile. Propagate the attributes of the context to Remove_Side_Effects.
1891         (Remove_Side_Effects): Update the subprogram profile. Update all calls
1892         to Make_Temporary to invoke Build_Temporary.
1893         * exp_util.ads (Duplicate_Subexpr_No_Checks): Update
1894         the subprogram profile along with the comment on usage.
1895         (Remove_Side_Effects): Update the subprogram profile along with
1896         the comment on usage.
1897         * sem_ch3.adb (Process_Range_Expr_In_Decl): Pass the subtype
1898         to the validity check machinery.  Explain the reason for this
1899         propagation.
1901 2014-10-23  Robert Dewar  <dewar@adacore.com>
1903         * a-strsea.adb: Minor reformatting.
1905 2014-10-23  Thomas Quinot  <quinot@adacore.com>
1907         * bcheck.adb (Check_Consistent_SSO_Default): Exclude internal
1908         units from consistency check.
1909         * gnat_rm.texi (Default_Scalar_Storage_Order): Document that
1910         consistency check excludes run-time units.
1912 2014-10-23  Ed Schonberg  <schonberg@adacore.com>
1914         * a-strsea.adb (Find_Token): Enable constraint checking in this
1915         procedure, so that even when compiling with checks suppressed, as is
1916         the case for the run-time, an exception is raised in this routine when
1917         the input meets the conditions described in RM 2005 A.4.3 (68/1).
1919 2014-10-20  Eric Botcazou  <ebotcazou@adacore.com>
1921         * sem_ch3.adb (Build_Derived_Private_Type): When the parent
1922         is untagged and has discriminants, build the implicit full
1923         view even if the derived type is a completion, and make it
1924         the Underlying_Full_View of the type.
1925         (Copy_And_Build): Fix Is_Completion actual parameter in the calls to
1926         Build_Derived_Type.
1927         (Build_Derived_Record_Type): Likewise.
1929 2014-10-20  Ed Schonberg  <schonberg@adacore.com>
1931         * sem_ch13.adb: Add guard to convention setting.
1933 2014-10-20  Robert Dewar  <dewar@adacore.com>
1935         * sem_ch3.adb, prj-proc.adb, prj-proc.ads, prj-conf.adb: Minor
1936         reformatting.
1938 2014-10-20  Robert Dewar  <dewar@adacore.com>
1940         * par-prag.adb (Add_List_Pragma_Entry): New procedure.
1941         * par.adb (P_Pragma): Document requirement to handle multiple calls.
1943 2014-10-20  Robert Dewar  <dewar@adacore.com>
1945         * sem_prag.adb (Analyze_Pragma, case No_Elaboration_Code_All):
1946         Fix error of bad inheritance of this pragma from with'ed unit.
1948 2014-10-20  Ed Schonberg  <schonberg@adacore.com>
1950         * sem_ch13.adb (Inherit_Aspects_At_Freeze_Point): For a subtype,
1951         inherit convention from parent type, because the subtype may
1952         have been declared on a partial view, prior to the pragma on
1953         the parent.
1955 2014-10-20  Olivier Hainque  <hainque@adacore.com>
1956             Tristan Gingold  <gingold@adacore.com>
1958         * gcc-interface/Makefile.in: Handle arm-darwin and VxWorks 7.
1959         Misc clean ups.
1961 2014-10-20  Nicolas Roche  <roche@adacore.com>
1963         * gcc-interface/Make-lang.in: ensure that automatically generated
1964         dependency are referencing generated gnatvsn rather than original
1965         one.
1967 2014-10-20  Gary Dismukes  <dismukes@adacore.com>
1969         * gnat_ugn.texi: Minor reformatting.
1970         * sem_ch3.adb: Minor reformatting.
1972 2014-10-20  Vincent Celier  <celier@adacore.com>
1974         * prj-attr.adb: New project level attribute Runtime.
1975         * prj-conf.adb (Get_Project_Runtimes): New procedure to get
1976         the attributes Runtime declared in the main project, to use
1977         in auto-configuration.
1978         (Get_Or_Create_Configuration_File): Call Get_Project_Runtimes.
1979         * prj-proc.adb (Runtime_Defaults): New table to store
1980         the default values of attributes Runtime (<language>).
1981         (Set_Default_Runtime_For): New procedure to store the default
1982         value of a Runtime (<language>) in table Runtime_Defaults.
1983         (Expression): Use the value stored in table Runtime_Defaults as
1984         the default for Runtime (<language>).
1985         * prj-proc.ads (Set_Default_Runtime_For): New procedure.
1986         * prj.ads (Attribute_Default_Value): New enumerated value
1987         Runtime_Value.
1989 2014-10-20  Ed Schonberg  <schonberg@adacore.com>
1991         * sem_ch3.adb (Analyze_Object_Declaration): If the type is
1992         an unconstrained unchecked_union type, rewrite declaration
1993         as a renaming to prevent attempt to retrieve non- existent
1994         discriminants from expression.
1996 2014-10-20  Ed Schonberg  <schonberg@adacore.com>
1998         * gnat_ugn.texi: Minor reformatting.
2000 2014-10-20  Tristan Gingold  <gingold@adacore.com>
2002         * init.c (__gnat_is_stack_guard): Don't use mach_vm_region_recurse on
2003         arm-darwin.
2004         * raise-gcc.c: Add ATTRIBUTE_UNUSED to remove warnings for
2005         unused arguments.
2007 2014-10-20  Hristian Kirtchev  <kirtchev@adacore.com>
2009         * sem_attr.adb (Analyze_Attribute): Replace
2010         variables CS and PS with Proc_Id and Subp_Id to better illustrate
2011         their purpose. Account for the case where _Postconditions
2012         has not been generated yet and the context is aspect/pragma
2013         Refined_Post. In that scenario the expected prefix of attribute
2014         'Result is the current scope.
2016 2014-10-20  Robert Dewar  <dewar@adacore.com>
2018         * par-ch4.adb (P_Expression): Handle extraneous comma/semicolon
2019         in middle of expression with logical operators.
2021 2014-10-20  Robert Dewar  <dewar@adacore.com>
2023         * par-ch13.adb (Possible_Misspelled_Aspect): New function.
2025 2014-10-20  Steve Baird  <baird@adacore.com>
2027         * pprint.adb: Improve Expression_Image function.
2029 2014-10-20  Robert Dewar  <dewar@adacore.com>
2031         * gnat_rm.texi: Document No_Tagged_Streams pragma and aspect.
2032         * snames.ads-tmpl: Add entry for pragma No_Tagged_Streams.
2033         * aspects.ads, aspects.adb: Add aspect No_Tagged_Streams.
2034         * einfo.adb (No_Tagged_Streams_Pragma): New field.
2035         * einfo.ads: Minor reformatting (reorder entries).
2036         (No_Tagged_Streams_Pragma): New field.
2037         * exp_ch3.adb: Minor comment update.
2038         * opt.ads (No_Tagged_Streams): New variable.
2039         * par-prag.adb: Add dummy entry for pragma No_Tagged_Streams.
2040         * sem.ads (Save_No_Tagged_Streams): New field in scope record.
2041         * sem_attr.adb (Check_Stream_Attribute): Check stream ops
2042         prohibited by No_Tagged_Streams.
2043         * sem_ch3.adb (Analyze_Full_Type_Declaration): Set
2044         No_Tagged_Streams_Pragma.
2045         (Analyze_Subtype_Declaration): ditto.
2046         (Build_Derived_Record_Type): ditto.
2047         (Record_Type_Declaration): ditto.
2048         * sem_ch8.adb (Pop_Scope): Restore No_Tagged_Streams.
2049         (Push_Scope): Save No_Tagged_Streams.
2050         * sem_prag.adb (Analyze_Pragma, case No_Tagged_Streams): Implement new
2051         pragma.
2053 2014-10-20  Robert Dewar  <dewar@adacore.com>
2055         * sem_ch3.adb, prj-proc.adb, sem_ch4.adb, prj-env.adb, lib.ads,
2056         sem_ch13.adb: Minor reformatting.
2058 2014-10-20  Javier Miranda  <miranda@adacore.com>
2060         * exp_ch3.adb (Expand_N_Object_Declaration): Expand the
2061         declaration of a class-wide limited object containing an
2062         initializing expression into a renaming declaration.  Required to
2063         avoid passing such declaration to the backend and also to avoid
2064         generating an extra copy.
2066 2014-10-20  Eric Botcazou  <ebotcazou@adacore.com>
2068         * inline.adb (List_Inlining_Info): Minor tweaks.
2069         (Add_Inlined_Body): Inline the enclosing package
2070         if it is not internally generated, even if it doesn't come
2071         from source.
2073 2014-10-20  Ed Schonberg  <schonberg@adacore.com>
2075         * sem_ch4.adb (Process_Function_Call): If the first actual
2076         denotes a discrete type, the mode must be interpreted as a slice
2077         of an array returned by a parameterless call.
2079 2014-10-20  Vasiliy Fofanov  <fofanov@adacore.com>
2081         * prj-env.ads, prj-env.adb (Get_Runtime_Path): No longer inhibit
2082         searching for runtime referenced by a simple name on a project path.
2084 2014-10-20  Olivier Hainque  <hainque@adacore.com>
2086         * vxworks-x86-link.spec: New file.
2087         * system-vxworks-x86.ads: Add pragma Linker_Options to link with
2088         vxworks-x86-link.spec.
2090 2014-10-20  Vincent Celier  <celier@adacore.com>
2092         * opt.ads (Origin_Of_Target): New type.
2093         (Target_Origin): New variable.
2094         * prj-conf.adb (Parse_Project_And_Apply_Config): Record
2095         Target_Value and Target_Origin.  If target was not specified
2096         on the command line with --target=, check if attribute Target
2097         is declared in the main project. If it is and it is not the
2098         native target, parse again the projects so that 'Target get
2099         the new value. Fail if the target has changed again.  Invoke
2100         Process_Project_And_Apply_Config with Do_Phase_1 set to False
2101         is Process_Project_Tree_Phase_1 has already been invoked.
2102         * prj-conf.ads (Process_Project_And_Apply_Config): New Boolean
2103         parameter Do_Phase_1, defaulted to True.
2104         * prj-proc.adb (Expression): Check the special values and
2105         defaults for attribute Target.
2107 2014-10-20  Ed Schonberg  <schonberg@adacore.com>
2109         * sem_ch3.adb (Handle_Late_Controlled_Primitive): Do not analyze
2110         the subprogram spec of the body in full, because it will be
2111         reanalyzed when the declaration itself is analyzed;  otherwise. a
2112         formal may end up duplicated in the list of formals leading to
2113         spurious conformance errors with an existing declaration.
2115 2014-10-20  Ed Schonberg  <schonberg@adacore.com>
2117         * sem_ch13.adb: Improve error recovery on illegal aspect.
2119 2014-10-20  Arnaud Charlet  <charlet@adacore.com>
2121         * set_targ.adb (Write_Target_Dependent_Values, Write_Line):
2122         Fix calling C APIs with no trailing NUL char by calling better
2123         wrappers instead.
2125 2014-10-20  Tristan Gingold  <gingold@adacore.com>
2127         * gnat_ugn.texi: Document that gdb users must be in group
2128         _developer on mac os.
2130 2014-10-20  Arnaud Charlet  <charlet@adacore.com>
2132         * a-tgdico.ads: Fix typo.
2134 2014-10-20  Ed Schonberg  <schonberg@adacore.com>
2136         * exp_aggr.adb (Convert_To_Assignments): Do not create a
2137         transient scope for a component whose type requires it, if the
2138         context is an initialization procedure, because the target of
2139         the assignment must be visible outside of the block.
2141 2014-10-20  Tristan Gingold  <gingold@adacore.com>
2143         * tracebak.c: Define PC_ADJUST for arm-darwin.
2144         * env.c: Remove darwin specific code.
2145         * raise-gcc.c (__gnat_Unwind_ForcedUnwind): Error on arm-darwin.
2147 2014-10-20  Ed Schonberg  <schonberg@adacore.com>
2149         * sem_ch3.adb (Analyze_Full_Type_Declaration): If previous view
2150         is incomplete rather than private, and full type declaration
2151         has aspects, analyze aspects on the full view rather than
2152         the incomplete view, to prevent freezing anomalies with the
2153         class-wide type.
2155 2014-10-17  Robert Dewar  <dewar@adacore.com>
2157         * exp_ch9.adb (Expand_N_Task_Body): Add defense against
2158         previous errors.
2159         * freeze.adb (Freeze_Entity): Add defense against checking null
2160         scope for generic.
2161         * restrict.adb (Tasking_Allowed): Add test for No_Run_Time mode.
2162         * sem_ch13.adb (Freeze_Entity_Checks): Add defense against
2163         previous errors.
2164         * sem_ch9.adb (Analyze_Task_Type_Declaration): Give error if
2165         in No_Run_Time mode.
2167 2014-10-17  Robert Dewar  <dewar@adacore.com>
2169         * prj-makr.adb: Minor reformatting.
2171 2014-10-17  Robert Dewar  <dewar@adacore.com>
2173         * gnatcmd.adb, make.adb, prj-part.adb, gnatlink.adb, prj-nmsc.adb,
2174         prj-conf.adb, prj-env.adb: Use Is_Directory_Separator where possible.
2176 2014-10-17  Ed Schonberg  <schonberg@adacore.com>
2178         * exp_prag.adb (Undo_Initialization): If Initialize_Scalars
2179         is enabled, code will be generated for some composite types
2180         to initialize an object after its declaration. If there is
2181         a subsequent Import pragma for the object, that code must be
2182         removed as specified byw the semantics of the pragma, and to
2183         prevent out-of-order elaboration issues in the back-end.
2185 2014-10-17  Hristian Kirtchev  <kirtchev@adacore.com>
2187         * exp_ch4.adb (Expand_N_Op_Concat): Keep concatenation operator
2188         wrapping mechanism under debug flag -gnatd.h.
2189         * debug.adb: Claim debug switch -gnatd.h.
2191 2014-10-17  Doug Rupp  <rupp@adacore.com>
2193         * gcc-interface/Makefile.in: Enable the socket runtime bits
2194         for Android.
2196 2014-10-17  Ed Schonberg  <schonberg@adacore.com>
2198         * sem_ch13.adb (Add_Invariants, Replace_Type_References): Do
2199         not perform the replacement on the expression for an inherited
2200         class-wide invariant if in ASIS_Mode and the type reference is
2201         already the prefix of a 'Class attribute reference: the expression
2202         has already been preanalyzed and the replacement performed when
2203         first encountered on the declaration of the parent type.
2205 2014-10-17  Robert Dewar  <dewar@adacore.com>
2207         * sem_ch5.adb, sem_ch7.adb, prj-nmsc.adb, sem_ch13.adb, exp_ch3.adb:
2208         Minor reformatting.
2210 2014-10-17  Ed Schonberg  <schonberg@adacore.com>
2212         * exp_ch3.adb (Build_Component_Invariant_Call): Retrieve Invariant
2213         subprogram from base type.
2214         * sem_ch7.adb (Analyze_Package_Specification): Build invariant
2215         subprogram for private type, not any of its subtypes.
2216         * sem_ch13.adb (Build_Invariant_Procedure_Declaration): Set type
2217         of procedure entity, because a call to it may be generated in
2218         a client unit before the corresponding subprogram declaration
2219         is analyzed.
2221 2014-10-17  Vincent Celier  <celier@adacore.com>
2223         * prj-nmsc.adb (Get_Directories): Do not create directories
2224         when a project is abstract.
2226 2014-10-17  Ed Schonberg  <schonberg@adacore.com>
2228         * sem_ch5.adb (Analyze_Iterator_Specification): If the domain
2229         of iteration is given by an expression that is not an array type,
2230         verify that its type implements an iterator iterface.
2232 2014-10-17  Robert Dewar  <dewar@adacore.com>
2234         * sem_attr.adb (Eval_Attribute): Ensure that attribute
2235         reference is not marked as being a static expression if the
2236         prefix evaluation raises CE.
2238 2014-10-17  Robert Dewar  <dewar@adacore.com>
2240         * exp_pakd.adb: Move bit packed entity tables to spec.
2241         * exp_pakd.ads: Move bit packed entity tables here from body.
2242         * freeze.adb (Freeze_Array_Type): Check that packed array type
2243         is supported.
2244         * rtsfind.adb (PRE_Id_Table): New table (Entity_Not_Defined):
2245         Specialize messages using PRE_Id_Table.
2246         * uintp.ads, uintp.adb (UI_Image): New functional form.
2248 2014-10-17  Robert Dewar  <dewar@adacore.com>
2250         * aspects.ads, aspects.adb: Add Suppress_Initialization aspect.
2251         * einfo.ads, einfo.adb (Suppress_Initialization): Now applies to
2252         E_Variable.
2253         * exp_ch3.adb (Default_Initialize_Object): Handle
2254         Suppress_Initialization.
2255         * exp_prag.adb (Expand_Pragma_Suppress_Initialization): New
2256         procedure (Expand_N_Pragma): Handle Suppress_Initialization
2257         (Expand_Pragma_Import_Or_Interface): Use Undo_Initialization
2258         (Undo_Initialization): New procedure.
2259         * sem_prag.adb (Analyze_Pragma, case Suppress_Initialization):
2260         This is now allowed for E_Variable case.
2261         * gnat_rm.texi: Document new aspect Suppress_Initialization
2262         Suppress_Initialization aspect/pragma can apply to variable.
2263         * einfo.ads: Minor reformatting.
2265 2014-10-17  Arnaud Charlet  <charlet@adacore.com>
2267         * spark_xrefs.ads: Add documentation pointer to Flow_Computed_Globals.
2269 2014-10-17  Robert Dewar  <dewar@adacore.com>
2271         * cstand.adb (Create_Standard): Mark Short_Integer as
2272         implementation defined.
2273         * sem_util.adb (Set_Entity_With_Checks): Avoid blow up for
2274         compiler built with assertions for No_Implementation_Identifiers test.
2276 2014-10-17  Robert Dewar  <dewar@adacore.com>
2278         * aspects.ads: Documentation fix, aspect Lock_Free does have a
2279         corresponding pragma.
2280         * gnat_rm.texi: Document implementation defined boolean aspects
2281         as boolean.
2283 2014-10-17  Ed Schonberg  <schonberg@adacore.com>
2285         * sem_ch13.adb (Add_Invariants): For a class-wide type invariant,
2286         preserve semantic information on the invariant expression
2287         (typically a function call) because it may be inherited by a
2288         type extension in a different unit, and it cannot be resolved
2289         by visibility elsewhere because it may refer to local entities.
2291 2014-10-17  Robert Dewar  <dewar@adacore.com>
2293         * gnat_rm.texi: Document that string literal can be used for
2294         pragma Warnings when operating in Ada 83 mode.
2296 2014-10-17  Ed Schonberg  <schonberg@adacore.com>
2298         * freeze.adb (Find_Aggregate_Component_Desig_Type): New
2299         subsidiary function to Freeze_ Expression, used to determine
2300         whether an aggregate for an array of access types also freezes the
2301         designated type, when some aggregate components are allocators.
2303 2014-10-17  Ed Schonberg  <schonberg@adacore.com>
2305         * a-strsea.adb (Find_Token): AI05-031 indicates that the
2306         procedure must raise Index_Error when Source is not empty and
2307         the From parameter is not within the range of the Source string.
2309 2014-10-17  Robert Dewar  <dewar@adacore.com>
2311         * sem_prag.adb (Is_Static_String_Expression): Allow string
2312         literal in Ada 83 mode.
2314 2014-10-17  Vincent Celier  <celier@adacore.com>
2316         * prj-conf.adb (Get_Config_Switches): In CodePeer mode, do
2317         not take into account any compiler command from package IDE.
2319 2014-10-17  Ed Schonberg  <schonberg@adacore.com>
2321         * sem_ch12.adb (Build_Function_Wrapper): The formals of the
2322         wrapper must have the same identifiers as those of the formal
2323         subprogram, because calls within the generic may use named
2324         associations.
2326 2014-10-17  Robert Dewar  <dewar@adacore.com>
2328         * sem_ch3.adb, a-strsea.adb: Minor reformatting.
2329         * par-ch6.adb (P_Subprogram): Fix bad handling of null procedures.
2331 2014-10-17  Ed Schonberg  <schonberg@adacore.com>
2333         * sem_ch3.adb (Build_Derived_Enumeration_Type): Propagate aspect
2334         specfications from original type declaration to declaration of
2335         implicit base, because original node is rewritten as a subtype
2336         declaration on which type aspects do not belong.
2338 2014-10-17  Hristian Kirtchev  <kirtchev@adacore.com>
2340         * sem_ch3.adb (Propagate_Default_Init_Cond_Attributes): A derived type
2341         inherits the attributes related to pragma Default_Initial_Condition
2342         from its parent type.
2344 2014-10-17  Ed Schonberg  <schonberg@adacore.com>
2346         * a-strsea.adb (Index - versions with a From parameter):
2347         According to AI05-056, the Index functions with a From parameter
2348         return 0 if the source is an empty string.
2350 2014-10-17  Hristian Kirtchev  <kirtchev@adacore.com>
2352         * sem_prag.adb (Analyze_Refined_Depends_In_Decl_Part): Disable
2353         the consistency checks in ASIS mode.
2355 2014-10-17  Arnaud Charlet  <charlet@adacore.com>
2357         * s-expmod.ads: Minor typo fix.
2359 2014-10-17  Robert Dewar  <dewar@adacore.com>
2361         * sem_util.adb: Minor reformatting.
2363 2014-10-17  Ed Schonberg  <schonberg@adacore.com>
2365         * sem_ch12.adb (Build_Function_Wrapper): Build wrappers for
2366         actuals that are defaulted subprograms of the formal subprogram
2367         declaration.
2369 2014-10-17  Robert Dewar  <dewar@adacore.com>
2371         * exp_ch4.adb (Expand_N_Op_Eq): Make sure we deal with the
2372         implementation base type.
2373         * sinfo.ads: Add a note for N_Op_Eq and N_Op_Ne that record
2374         operands are always expanded out into component comparisons.
2376 2014-10-17  Robert Dewar  <dewar@adacore.com>
2378         * s-vallli.adb: Minor comment correction.
2379         * s-valuti.ads: Minor comment reformatting.
2381 2014-10-17  Robert Dewar  <dewar@adacore.com>
2383         * gnat_rm.texi: Document System.Atomic_Counters.
2384         * impunit.adb: Add System.Atomic_Counters (s-atocou.ads) to the
2385         list of user- accessible units added as children of System.
2386         * s-atocou.ads: Update comment.
2388 2014-10-17  Arnaud Charlet  <charlet@adacore.com>
2390         * s-expmod.ads: Add comments.
2392 2014-10-17  Hristian Kirtchev  <kirtchev@adacore.com>
2394         * sem_ch3.adb (Build_Derived_Record_Type): Remove the propagation
2395         of all attributes related to pragma Default_Initial_Condition.
2396         (Build_Derived_Type): Propagation of all attributes related
2397         to pragma Default_Initial_Condition.
2398         (Process_Full_View): Account for the case where the full view derives
2399         from another private type and propagate the attributes related
2400         to pragma Default_Initial_Condition to the private view.
2401         (Propagate_Default_Init_Cond_Attributes): New routine.
2402         * sem_util.adb: Alphabetize various routines.
2403         (Build_Default_Init_Cond_Call): Use an unchecked type conversion
2404         when calling the default initial condition procedure of a private type.
2405         (Build_Default_Init_Cond_Procedure_Declaration): Prevent
2406         the generation of multiple default initial condition procedures.
2408 2014-10-17  Robert Dewar  <dewar@adacore.com>
2410         * prj-conf.adb: Revert previous change.
2412 2014-10-17  Robert Dewar  <dewar@adacore.com>
2414         * lib-writ.ads, s-valdec.ads: Minor reformatting.
2416 2014-10-17  Ed Schonberg  <schonberg@adacore.com>
2418         * sem_ch12.adb: Additional work on function wrappers.
2420 2014-10-17  Eric Botcazou  <ebotcazou@adacore.com>
2422         * exp_util.adb (Possible_Bit_Aligned_Component): Also recurse
2423         on the renamed object of renamings.
2425 2014-10-17  Vincent Celier  <celier@adacore.com>
2427         * prj-conf.adb (Parse_Project_And_Apply_Config): In CodePeer
2428         mode, always use the native target.
2430 2014-10-16  Andrew MacLeod  <amacleod@redhat.com>
2432         * gcc-interface/misc.c: Adjust include files.
2434 2014-10-13  Eric Botcazou  <ebotcazou@adacore.com>
2435             Alan Modra  <amodra@gmail.com>
2437         PR ada/63225
2438         * uintp.adb (Vector_To_Uint): Move from here to...
2439         * uintp.ads (UI_Vector): Make public.
2440         (Vector_To_Uint): ...here.
2442 2014-10-10  Robert Dewar  <dewar@adacore.com>
2444         * freeze.adb, sem_attr.adb: Minor reformatting.
2446 2014-10-10  Johannes Kanig  <kanig@adacore.com>
2448         * a-cfdlli.ads, a-cfhama.ads, a-cfhase.ads, a-cforma.ads,
2449         a-cforse.ads, a-cofove.ads: add "Default_Initial_Condition"
2450         to container type.
2452 2014-10-10  Vincent Celier  <celier@adacore.com>
2454         * prj-conf.adb (Do_Autoconf): In Codepeer mode, do not try to get
2455         any configuration switches from the project file.
2457 2014-10-10  Ed Schonberg  <schonberg@adacore.com>
2459         * sem_ch12.adb (Build_Wrapper): Renamed as Build_Operator_Wrapper.
2460         (Build_Function_Wrapper): New function, to construct a wrapper
2461         function for actuals that are functions with an arbitrary
2462         number of parameters. Used in GNATProve mode to simplify proof
2463         propagation in instantiations.
2465 2014-10-10  Robert Dewar  <dewar@adacore.com>
2467         * freeze.adb, gnat1drv.adb, sem_ch13.adb: Minor reformatting and
2468         code clean up.
2470 2014-10-10  Hristian Kirtchev  <kirtchev@adacore.com>
2472         * sem_res.adb (Is_OK_Volatile_Context): Allow
2473         a volatile object reference to appear as the expression of a
2474         type conversion.
2476 2014-10-10  Ed Schonberg  <schonberg@adacore.com>
2478         * sem_ch13.adb (Analyze_Aspect_Specifications, Library_Unit_Aspects):
2479         Aspect specification is legal on a local instantiation of a
2480         library-level generic unit.
2482 2014-10-10  Gary Dismukes  <dismukes@adacore.com>
2484         * gnat1drv.adb (Adjust_Global_Switches): Set Front_End_Inlining
2485         if inlining has been enabled via -gnatn and the target is not GCC.
2487 2014-10-10  Ed Schonberg  <schonberg@adacore.com>
2489         * freeze.adb (Freeze_Entity): Freezing a subprogram does
2490         not always freeze its profile.  In particular, an attribute
2491         reference that takes the access type does not freeze the types
2492         of the formals.
2494 2014-10-10  Robert Dewar  <dewar@adacore.com>
2496         * errout.adb (Adjust_Name_Case): New procedure.
2497         (Set_Msg_Node): Use Adjust_Name_Case.
2498         * errout.ads (Adjust_Name_Case): New procedure.
2499         * exp_intr.adb (Add_Source_Info): Minor code reorganization
2500         (use Ekind_In).
2501         (Write_Entity_Name): Use Errout.Adjust_Name_Case.
2502         * sem_prag.adb (Is_Non_Significant_Pragma_Reference): Review
2503         and fix up entries in Sig_Flags, and correct logical errors in
2504         function itself.
2505         * sprint.adb (Sprint_Node_Actual): Properly print string for
2506         raise statement.
2508 2014-10-10  Ed Schonberg  <schonberg@adacore.com>
2510         * sem_ch3.adb (Analyze_Object_Declaration): For an object of an
2511         anonymous array type with delayed aspects, defer freezing of
2512         type until object itself is frozen.
2513         * freeze.adb (Freeze_Entity): When freezing an object of an
2514         anonymous array type with delayed aspects, remove freeze node of
2515         object after freezing type, to prevent out-of-order elaboration
2516         in the back-end. The initialization call for the object has
2517         already been constructed when expanding the object declaration.
2519 2014-10-10  Robert Dewar  <dewar@adacore.com>
2521         * exp_intr.adb (Write_Entity_Name): Moved to outer level
2522         (Write_Entity_Name): Properly handle operator names
2523         (Expand_Source_Info): New procedure.
2524         * exp_intr.ads (Add_Source_Info): New procedure.
2526 2014-10-10  Robert Dewar  <dewar@adacore.com>
2528         * butil.ads: Minor reformatting.
2529         * sem_ch5.adb: Code clean up.
2531 2014-10-10  Robert Dewar  <dewar@adacore.com>
2533         * exp_ch11.adb (Expand_N_Raise_Statement): Handle
2534         Prefix_Exception_Messages.
2535         * opt.adb: Handle new flags Prefix_Exception_Message[_Config].
2536         * opt.ads: New flags Prefix_Exception_Message[_Config].
2537         * par-prag.adb: New dummy entry for pragma Prefix_Exception_Messages.
2538         * snames.ads-tmpl: Add entries for new pragma Prefix_Exception_Messages.
2539         * sem_prag.adb: Implement new pragma Prefix_Exception_Messages
2540         * gnat_rm.texi: Document pragma Prefix_Exception_Messages.
2542 2014-10-10  Gary Dismukes  <dismukes@adacore.com>
2544         * sinfo.ads, gnat_ugn.texi, a-except.adb, a-except-2005.adb,
2545         raise-gcc.c Spelling changes (prolog => prologue, epilog => epilogue).
2547 2014-10-10  Ed Schonberg  <schonberg@adacore.com>
2549         * sem_ch5.adb (Is_Wrapped_In_Block): Handle properly blocks that
2550         contain pragmas generated for loop invariants and type predicates.
2551         Clarify use of this subprogram.
2553 2014-10-10  Yannick Moy  <moy@adacore.com>
2555         * sem_prag.adb (Analyze_Global_Item): Accept formal objects in Global
2556         contracts.
2557         * errout.adb, errout.ads (SPARK_Msg_NE): Issue error unless
2558         SPARK_Mode is Off.
2560 2014-10-10  Vadim Godunko  <godunko@adacore.com>
2562         * a-stwima.adb (To_Sequence): Compute size of result array.
2564 2014-10-10  Javier Miranda  <miranda@adacore.com>
2566         * gnat_ugn.texi (Interfacing with C++ at the Class Level): Update the
2567         sources of the example to avoid a warning when the Ada files are
2568         automatically generated by the binding generator.
2570 2014-10-10  Ed Schonberg  <schonberg@adacore.com>
2572         * sem_attr.adb (Resolve_Attribute, case 'Update): Set
2573         Do_Range_Check on the expression of a record component
2574         association when needed, as is done for array components, when
2575         the corresponding type is a scalar type.
2577 2014-10-10  Gary Dismukes  <dismukes@adacore.com>
2579         * a-coinho-shared.adb: Minor typo fix.
2580         * prj-env.ads: Minor reformatting.
2582 2014-10-10  Hristian Kirtchev  <kirtchev@adacore.com>
2584         * sem_res.adb (Resolve_String_Literal): Do not
2585         generate a string literal subtype for the default expression of
2586         a formal parameter in GNATprove mode.
2588 2014-10-10  Yannick Moy  <moy@adacore.com>
2590         * errout.adb (SPARK_Msg_N): Issue error unless SPARK_Mode is Off.
2592 2014-10-10  Ed Schonberg  <schonberg@adacore.com>
2594         * exp_ch5.adb (Expand_Formal_Container_Element_Loop): Analyze
2595         declaration for loop parameter before rest of loop, and set
2596         entity kind to prevent assignments to it in the user code.
2597         * sem_ch3.adb (Analyze_Object_Contract): No contracts apply to the
2598         loop parameter in an element iteration over o formal container.
2600 2014-10-10  Robert Dewar  <dewar@adacore.com>
2602         * gnat_ugn.texi: Document use of user-level routines to handle
2603         e.g. col major arrays.
2605 2014-10-10  Doug Rupp  <rupp@adacore.com>
2607         * s-osinte-android.adb: Fix misspelling.
2608         * gsocket.h: Tweak the Android quirks.
2610 2014-10-10  Robert Dewar  <dewar@adacore.com>
2612         * errout.ads (SPARK_Msg_N): Fix spec to match change in body.
2614 2014-10-10  Robert Dewar  <dewar@adacore.com>
2616         * sem_ch13.adb: Minor code reorganization.
2618 2014-10-10  Pat Rogers  <rogers@adacore.com>
2620         * gnat_rm.texi: Text now indicates pragma No_Run_Time is not
2621         for users.
2623 2014-10-10  Vadim Godunko  <godunko@adacore.com>
2625         * a-coinho-shared.adb: Add minor comment.
2626         * a-stzmap.adb (To_Sequence): Compute size of result array.
2628 2014-10-10  Javier Miranda  <miranda@adacore.com>
2630         * exp_ch3.adb (Build_Init_Procedure): Complete the condition of an
2631         if-stmt to match its current documentation.
2633 2014-10-10  Robert Dewar  <dewar@adacore.com>
2635         * sem_ch7.adb, einfo.adb, einfo.ads, sem_prag.adb, sem_ch12.adb,
2636         freeze.adb, sem_util.adb, sem_res.adb, exp_ch6.adb, exp_ch13.adb,
2637         sem_ch6.adb, sem_cat.adb, sem_disp.adb
2638         (Is_Subprogram_Or_Generic_Subprogram): New primitive. Use this primitive
2639         throughout where appropriate.
2641 2014-10-10  Bob Duff  <duff@adacore.com>
2643         * a-coinho-shared.ads: Minor reformatting.
2644         * s-traceb.adb: Minor clean up.
2646 2014-10-10  Robert Dewar  <dewar@adacore.com>
2648         * ali.adb (Scan_ALI): Read and process new GP flag on ALI P line.
2649         * ali.ads (GNATprove_Mode): New component in ALI table.
2650         (GNATprove_Mode_Specified): New global.
2651         * gnatbind.adb (Gnatbind): Give fatal error if any file compiled
2652         in GNATProve mode.
2653         * lib-writ.ads, lib-writ.adb (GP): New flag on P line for
2654         GNATProve_Mode.
2656 2014-10-10  Javier Miranda  <miranda@adacore.com>
2658         * exp_ch3.adb (Build_Init_Procedure): Adding assertion.
2659         (Build_Init_Statement): Ensure that statements
2660         associated with the parent components are located at the beginning
2661         of the returned list of statements.
2663 2014-10-10  Ed Schonberg  <schonberg@adacore.com>
2665         * sem_ch13.adb (Inherit_Aspects_At_Freeze_Node): If the full
2666         view of a private type T that has a type invariant is a scalar
2667         or constrained array type, the base type created for the full
2668         view has the same type invariant.
2670 2014-10-10  Robert Dewar  <dewar@adacore.com>
2672         * exp_util.ads, sem_ch12.adb, exp_util.adb, i-fortra.ads: Minor code
2673         reorganization.
2675 2014-09-22  Eric Botcazou  <ebotcazou@adacore.com>
2677         * gcc-interface/decl.c (gnat_to_gnu_entity): Adjust comment.
2678         * gcc-interface/utils.c (gnat_write_global_declarations): Fix typo.
2680 2014-09-15  Jakub Jelinek  <jakub@redhat.com>
2682         * gcc-interface/Make-lang.in (check_acats_numbers0,
2683         check_acats_numbers1, check_acats_numbers2, check_acats_numbers3,
2684         check_acats_numbers4, check_acats_numbers5, check_acats_numbers6,
2685         check_acats_numbers, check_acats_subdirs): New variables.
2686         (check_acats_targets): Use $(check_acats_subdirs).
2687         (check-acats, check-acats%): Rewritten so that for parallelized
2688         testing each job runs all the chapters files, with
2689         GCC_RUNTEST_PARALLELIZE_DIR set in environment.  Prepare the support
2690         directory sequentially and share it.
2691         (check-acats-subtargets): Always print just check-acats.
2693 2014-08-25  Martin Liska  <mliska@suse.cz>
2695         * gcc-interface/utils.c (rest_of_subprog_body_compilation): Adjust to
2696         new cgraph interface.
2697         (gnat_write_global_declarations): Likewise.
2699 2014-08-13  Sylvestre Ledru  <sylvestre@debian.org>
2701         * 9drpc.adb: Fix a typo
2702         * s-interr.ads: Likewise
2703         * s-taskin.ads: Likewise
2704         * s-traces.ads: Likewise
2705         * sysdep.c: Likewise
2707 2014-08-12  Joel Sherrill <joel.sherrill@oarcorp.com>
2709         * socket.c: For RTEMS, use correct prototype of gethostbyname_r().
2710         * gsocket.h Add include of <unistd.h> on RTEMS.
2712 2014-08-11  Joel Sherrill <joel.sherrill@oarcorp.com>
2714         * s-osinte-rtems.adb: Correct formatting of line in license block.
2716 2014-08-04  Claire Dross  <dross@adacore.com>
2718         * exp_util.adb (Get_First_Parent_With_Ext_Axioms_For_Entity):
2719         For an instance, look at the scope before the generic parent.
2721 2014-08-04  Yannick Moy  <moy@adacore.com>
2723         * lib-writ.ads: Update comments.
2724         * sem_disp.ads, sem_disp.adb (Inherited_Subprograms): Add
2725         parameters to filter inherited subprograms.
2727 2014-08-04  Robert Dewar  <dewar@adacore.com>
2729         * gnat_rm.texi: Add section on use of address clause for memory
2730         mapped I/O.
2732 2014-08-04  Ed Schonberg  <schonberg@adacore.com>
2734         * sem_ch3.adb (Analyze_Subtype_Declaration): A subtype, in
2735         particular the subtype created for a generic actual, inherits
2736         invariant information from the base type.
2738 2014-08-04  Robert Dewar  <dewar@adacore.com>
2740         * aspects.ads, aspects.adb: Add entries for aspect Obsolescent.
2741         * gnat_rm.texi: Add documentation for aspect Obsolescent.
2742         * sem_ch13.adb (Analyze_Aspect_Specifications): Implement aspect
2743         Obsolescent.
2744         (Check_Aspect_At_Freeze_Point): Add dummy entry for pragma Obsolescent.
2745         * s-osprim-mingw.adb: Minor reformatting.
2746         * sem_res.adb (Is_Atomic_Ref_With_Address): New function
2747         (Resolve_Indexed_Component): Rework warnings for non-atomic access
2748         (Resolve_Selected_Component): Add warnings for non-atomic access.
2750 2014-08-04  Doug Rupp  <rupp@adacore.com>
2752         * g-calend.adb (timeval_to_duration, duration_to_timeval): Change sec
2753         formal to long_long.
2754         * g-calend.ads (timeval): Bump up size to accomodate sec type.
2755         * s-taprop-linux.adb (timeval_to_duration): Change sec formal to
2756         long_long
2757         * s-osprim-posix.adb (timeval): Bump up size to accomodate
2758         new sec type.
2759         (timeval_to_duration): Change sec formal to Long_Long_Integer
2760         * s-osinte-darwin.adb (timeval): Bump up
2761         size to accomodate new sec type.
2762         (timeval_to_duration): Change sec formal to long_long
2763         * s-osinte-android.adb: Likewise.
2764         * cal.c (__gnat_timeal_to_duration, __gnat_duration_to_timeval): Change
2765         sec formal from long to long long.
2767 2014-08-04  Robert Dewar  <dewar@adacore.com>
2769         * sem_res.adb (Resolve_Qualified_Expression): Make sure
2770         Do_Range_Check flag gets set.
2772 2014-08-04  Robert Dewar  <dewar@adacore.com>
2774         * einfo.ads, einfo.adb (Is_Standard_String_Type): New function.
2775         * exp_ch3.adb (Build_Array_Init_Proc): Use
2776         Is_Standard_String_Type.
2777         (Expand_Freeze_Array_Type): ditto.
2778         (Get_Simple_Init_Val): ditto.
2779         (Needs_Simple_Initialization): ditto.
2780         * sem_eval.adb (Eval_String_Literal): Use Is_Standard_String_Type.
2781         * sem_warn.adb (Is_Suspicious_Type): Use Is_Standard_String_Type.
2783 2014-08-04  Pascal Obry  <obry@adacore.com>
2785         * adaint.c (__gnat_try_lock): Use _tcscpy and _tcscat instead of
2786         _stprintf which insert garbage into the wfull_path buffer.
2788 2014-08-04  Arnaud Charlet  <charlet@adacore.com>
2790         * cal.c: Remove old VMS/nucleus code. Remove obsolete vxworks
2791         code.
2792         * fe.h: Minor reformatting.
2794 2014-08-04  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
2796         * cstreams.c: (_LARGEFILE_SOURCE): Guard definition.
2798 2014-08-04  Robert Dewar  <dewar@adacore.com>
2800         * par-ch13.adb (Get_Aspect_Specifications): Improve error
2801         recovery, fixing a -gnatQ bomb.
2803 2014-08-04  Yannick Moy  <moy@adacore.com>
2805         * sem_ch3.adb (Analyze_Object_Declaration): In GNATprove mode,
2806         do not generate two Itypes with the same name for an array
2807         definition.
2808         * sinfo.ads: Expand doc on GNATprove mode.
2810 2014-08-04  Hristian Kirtchev  <kirtchev@adacore.com>
2812         * exp_ch3.adb (Expand_Freeze_Record_Type): Set the finalization
2813         master and storage pool attributes on the root type of an
2814         anonymous access type.
2815         * exp_ch4.adb (Expand_N_Allocator): Set the finalization master
2816         and storage pool attributes on the root type of an anonymous
2817         access type.
2819 2014-08-04  Arnaud Charlet  <charlet@adacore.com>
2821         * exp_ch3.adb: Minor reformatting.
2822         * tb-alvms.c, tb-alvxw.c, tb-ivms.c: Removed.
2823         * tracebak.c: Remove use of above files.
2824         * gcc-interface/Makefile.in: Update dependencies.
2826 2014-08-04  Pierre-Marie Derodat  <derodat@adacore.com>
2828         * gcc-interface/utils.c (gnat_set_type_context): Also set the
2829         context for parallel types' TYPE_STUB_DECL.  Do not change
2830         anything if the context is already set for them.
2831         (gnat_pushdecl): Update the comment for calls to
2832         gnat_set_type_context to mention parallel types.
2833         (add_parallel_type): When adding a context-less parallel type to
2834         a type that has a context, propagate the context from the latter
2835         type to the former.
2836         (process_deferred_decl_context): Call gnat_set_type_context
2837         rather than manually setting the type context.
2838         (build_unc_object_type): Call gnat_set_type_context on the
2839         template type.
2841 2014-08-04  Ed Schonberg  <schonberg@adacore.com>
2843         * exp_ch5.adb (Expand_N_Case_Statement): If a choice is a
2844         subtype indication and the case statement has only two choices,
2845         replace subtype indication with its range, because the resulting
2846         membership test cannot have a subtype indication as an operand.
2848 2014-08-04  Arnaud Charlet  <charlet@adacore.com>
2850         * exp_ch3.adb: Update comments, minor reformatting.
2852 2014-08-04  Hristian Kirtchev  <kirtchev@adacore.com>
2854         * sem_ch3.adb (Analyze_Declarations): Explain why the bodies of
2855         the default initial condition procedures are build here.
2856         * sem_util.adb (Build_Default_Init_Cond_Procedure): Wrap the
2857         analyzed argument of pragma Default_Initial_Condition in some
2858         dummy code as GNATprove mode disables assertions, but still
2859         needs to see the argument.
2861 2014-08-04  Robert Dewar  <dewar@adacore.com>
2863         * exp_ch6.adb, sem_util.adb: Minor reformatting.
2865 2014-08-04  Olivier Hainque  <hainque@adacore.com>
2867         * a-comutr.ads: Set Root_Node_Type'Alignment to
2868         Standard'Maximum_Alignment, so that it is at least as large as
2869         the max default for Tree_Node_Type'Alignment.
2871 2014-08-04  Hristian Kirtchev  <kirtchev@adacore.com>
2873         * exp_ch3.adb (Freeze_Type): Remove the generation and inheritance
2874         of the default initial condition procedure [body].
2875         * sem_ch3.adb (Analyze_Declarations): Create the bodies of
2876         all default initial condition procedures at the end of private
2877         declaration analysis.
2878         * sem_util.adb (Build_Default_Init_Cond_Procedure_Bodies): New
2879         routine.
2880         (Build_Default_Init_Cond_Procedure_Body): Merged in the
2881         processing of routine Build_Default_Init_Cond_Procedure_Bodies.
2882         * sem_util.ads (Build_Default_Init_Cond_Procedure_Bodies):
2883         New routine.
2884         (Build_Default_Init_Cond_Procedure_Body): Removed.
2886 2014-08-04  Ed Schonberg  <schonberg@adacore.com>
2888         * sem_elab.adb (Check_Elab_Call): Do not check a call to a
2889         postcondtion.
2890         * exp_ch6.adb (Expand_Call): Clarify handling of inserted
2891         postcondition call.
2893 2014-08-04  Hristian Kirtchev  <kirtchev@adacore.com>
2895         * sem_prag.adb (Analyze_Pragma): Ensure that an
2896         internally generated spec for a stand alone body is recognized
2897         as a proper context for pragma SPARK_Mode.
2899 2014-08-04  Robert Dewar  <dewar@adacore.com>
2901         * erroutc.adb (Delete_Msg): Do not decrement Warnings_Treated_As_Errors.
2903 2014-08-04  Arnaud Charlet  <charlet@adacore.com>
2905         * adabkend.adb (Scan_Back_End_Switches): Ignore extra -o
2906         when -gnatO has already been specified, for compatibility
2907         with gcc driver.
2908         (Scan_Compiler_Args): Do not call Set_Output_Object_File_Name in
2909         codepeer mode.
2910         * g-expect.ads: Fix typo.
2912 2014-08-04  Thomas Quinot  <quinot@adacore.com>
2914         * exp_ch4.adb (Insert_Dereference_Action): the actual Size
2915         must account for the bounds template if the designated type is
2916         an unconstrained array.
2918 2014-08-04  Hristian Kirtchev  <kirtchev@adacore.com>
2920         * a-cfhama.adb, a-cfhase.adb, a-cforma.adb, a-cforse.adb Add
2921         SPARK_Mode in the body.
2922         * sem_ch7.adb (Analyze_Package_Body_Helper): Restore the original
2923         way to verify the consistency of SPARK_Mode between a spec and
2924         a body.
2925         * sem_ch12.adb (Analyze_Package_Instantiation): Remove the call
2926         to Set_Ignore_Pragma_SPARK_Mode. Set flag Ignore_Pragma_SPARK_Mode
2927         manually.
2928         (Analyze_Subprogram_Instantiation): Remove the call to
2929         Set_Ignore_Pragma_SPARK_Mode. Set flag Ignore_Pragma_SPARK_Mode
2930         manually.
2931         * sem_prag.adb (Analyze_Pragma): Remove local variable
2932         Inst_Id. SPARK_Mode can no longer be applied to a package or
2933         subprogram instantiation.
2934         * sem_util.adb, sem_util.ads (Set_Ignore_Pragma_SPARK_Mode):
2935         Removed.
2937 2014-08-04  Robert Dewar  <dewar@adacore.com>
2939         * sem_prag.adb, osint.adb, osint.ads: Minor reformatting.
2941 2014-08-04  Yannick Moy  <moy@adacore.com>
2943         * sem_ch3.adb (Derive_Type_Declaration,
2944         Process_Discriminants): Remove SPARK-specific legality checks.
2946 2014-08-04  Thomas Quinot  <quinot@adacore.com>
2948         * g-sechas.ads, g-sechas.adb (HMAC_Initial_Context): New subprogram.
2949         * gnat_rm.texi (GNAT.MD5/SHA1/SHA224/SHA256/SHA512): Document support
2950         for HMAC.
2952 2014-08-04  Hristian Kirtchev  <kirtchev@adacore.com>
2954         * sem_ch7.adb (Analyze_Package_Body_Helper): When verifying the
2955         compatibility of SPARK_Mode between a spec and a body, use the
2956         SPARK_Mode of the public part.
2957         * sem_ch12.adb (Analyze_Generic_Subprogram_Declaration): Use
2958         the already available routine to exchange the aspects between
2959         the template and its copy. Analyze the aspects of copy to
2960         ensure that the corresponding pragmas perform their semantic
2961         effects.  The partial analysis of aspects is no longer needed.
2962         (Analyze_Package_Instantiation): Save and restore the SPARK_Mode
2963         of the context.
2964         (Analyze_Subprogram_Instantiation): Save and restore the SPARK_Mode of
2965         the context.
2966         * sem_prag.adb (Analyze_Pragma): Do not bypass a subprogram
2967         instantiation which does not come from source.
2969 2014-08-04  Hristian Kirtchev  <kirtchev@adacore.com>
2971         * a-cfhama.ads, a-cfhase.ads, a-cforma.ads, a-cforse.ads Add
2972         SPARK_Mode pragmas to the public and private part of the unit.
2973         * sem_ch3.adb (Derive_Type_Declaration): Ensure that a derived
2974         type cannot have discriminants if the parent type already has
2975         discriminants.
2976         (Process_Discriminants): Ensure that the type of a discriminant is
2977         discrete.
2978         * sem_ch6.adb (Analyze_Subprogram_Body_Helper): The check on
2979         SPARK_Mode compatibility between a spec and a body can now be
2980         safely performed while processing a generic.
2981         * sem_ch7.adb (Analyze_Package_Body_Helper): The check on
2982         SPARK_Mode compatibility between a spec and a body can now be
2983         safely performed while processing a generic.
2984         * sem_prag.adb (Analyze_Pragma): Pragma SPARK_Mode can now be
2985         safely analyzed when processing a generic.
2987 2014-08-04  Nicolas Roche  <roche@adacore.com>
2989         * g-dirope.adb: Minor reformating.
2991 2014-08-04  Robert Dewar  <dewar@adacore.com>
2993         * sem_ch6.adb: Minor reformatting.
2995 2014-08-04  Ed Schonberg  <schonberg@adacore.com>
2997         * sem_prag.adb (Analyze_Pragma, case Assert and related pragmas):
2998         Before normalizing these pragmas into a pragma Check, preanalyze
2999         the optional Message argument, (which is subsequently copied)
3000         so that it has the proper semantic information for ASIS use.
3001         * sem_case.adb: Initialize flag earlier.
3002         * osint.adb, osint.ads (Find_File): Add parameter Full_Name, used when
3003         the full source path of a configuration file is requested.
3004         (Read_Source_File): Use Full_Name parameter..
3006 2014-08-04  Hristian Kirtchev  <kirtchev@adacore.com>
3008         * opt.ads Alphabetize various global flags. New flag
3009         Ignore_Pragma_SPARK_Mode along with a comment on usage.
3010         * sem_ch6.adb (Analyze_Generic_Subprogram_Body):
3011         Pragma SPARK_Mode is now allowed in generic units.
3012         (Analyze_Subprogram_Body_Helper): Do not verify the compatibility
3013         between the SPARK_Mode of a spec and that of a body when inside
3014         a generic.
3015         * sem_ch7.adb (Analyze_Package_Body_Helper): Do not verify the
3016         compatibility between the SPARK_Mode of a spec and that of a
3017         body when inside a generic.
3018         * sem_ch12.adb (Analyze_Generic_Subprogram_Declaration):
3019         Pragma SPARK_Mode is now allowed in generic units.
3020         (Analyze_Package_Instantiation): Save and restore the value of
3021         flag Ignore_ Pragma_SPARK_Mode in a stack-like fasion. Set
3022         the governing SPARK_Mode before analyzing the instance.
3023         (Analyze_Subprogram_Instantiation): Save and restore the value
3024         of flag Ignore_ Pragma_SPARK_Mode in a stack-like fasion. Set
3025         the governing SPARK_Mode before analyzing the instance.
3026         * sem_ch13.adb (Analyze_Aspect_Specifications): Emulate the
3027         placement of a source pragma when inserting the generated pragma
3028         for aspect SPARK_Mode.
3029         * sem_prag.adb (Analyze_Pragma): Reimplement the handling of
3030         pragma SPARK_Mode to allow for generics and their respective
3031         instantiations.
3032         * sem_util.ads, sem_util.adb (Check_SPARK_Mode_In_Generic): Removed.
3033         (Set_Ignore_Pragma_SPARK_Mode): New routine.
3035 2014-08-04  Eric Botcazou  <ebotcazou@adacore.com>
3037         * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Component>: Deal with
3038         renaming discriminants in tagged types first.
3039         * gcc-interface/trans.c (gnat_to_gnu) <N_Selected_Component>: Test
3040         the underlying type of the prefix.
3041         (Pragma_to_gnu, case Pragma_Warning): Ignore Reason => "..."
3042         (process_freeze_entity): Reset the nodes of all the view of a type,
3043         if any.
3045 2014-08-04  Doug Rupp  <rupp@adacore.com>
3046             Olivier Hainque  <hainque@adacore.com>
3048         * gcc-interface/Makefile.in (x86 VxWorks): Add filter-out for vxworks7
3049         and remove incorrect EH_MECHANISM macros.
3050         Add sigtramp.h to EXTRA_LIBGNAT_SRCS when we add sigtramp-vxworks.o to
3051         EXTRA_LIBGNAT_OBJS.
3053 2014-08-04  Robert Dewar  <dewar@adacore.com>
3055         * exp_attr.adb (Expand_N_Attribute_Reference): Make sure prefix
3056         of constructed 'Valid attribute in -gnatVa mode does not appear
3057         to come from source.
3058         * sem_attr.adb (Analyze_Access_Attribute): Don't set
3059         Never_Set_In_Source for non-source reference.
3060         * sem_util.adb: Minor reformatting.
3061         * sem_warn.adb (Check_References): Don't check Address_Taken,
3062         not necessary, see comment.
3064 2014-08-04  Robert Dewar  <dewar@adacore.com>
3066         * sem_util.adb, sem_case.adb: Minor reformatting.
3068 2014-08-04  Ed Schonberg  <schonberg@adacore.com>
3070         * exp_ch9.adb (Extract_Entry): If the synchronized object is a
3071         limited view, replace with non-limited view, which is available
3072         at the point of an entry call.
3074 2014-08-04  Ed Schonberg  <schonberg@adacore.com>
3076         * exp_ch6.adb (Expand_Call): If the call is to a function in
3077         a run-time unit that is marked Inline_Always, we must suppress
3078         debugging information on it, so that the code that is eventually
3079         inlined will not affect debugging of the user program.
3081 2014-08-04  Robert Dewar  <dewar@adacore.com>
3083         * inline.adb, einfo.ads, s-tassta.adb, s-tarest.adb: Minor comment
3084         fixes.
3086 2014-08-04  Ed Schonberg  <schonberg@adacore.com>
3088         * sem_prag.adb (Process_Import_Or_Interface): Handle properly
3089         an aspect Import that specifies a False value.
3091 2014-08-04  Robert Dewar  <dewar@adacore.com>
3093         * gnat_rm.texi: Add section on aspect Invariant'Class.
3095 2014-08-04  Ed Schonberg  <schonberg@adacore.com>
3097         * sem_case.adb (Check_Choice_Set): New flag Predicate_Error,
3098         for better control of cascaded error messages when some choice
3099         in a case statement over a predicated type violates the given
3100         static predicate.
3102 2014-08-04  Hristian Kirtchev  <kirtchev@adacore.com>
3104         * sem_ch3.adb (Build_Derived_Type): Modify the
3105         inheritance of the rep chain to ensure that a non-tagged type's
3106         items are not clobbered during the inheritance.
3108 2014-08-04  Robert Dewar  <dewar@adacore.com>
3110         * sem_ch3.adb, einfo.ads: Minor reformatting.
3112 2014-08-04  Yannick Moy  <moy@adacore.com>
3114         * inline.adb (Can_Be_Inlined_In_GNATprove_Mode): Fix
3115         detection of subprograms that cannot be inlined in GNATprove mode.
3117 2014-08-04  Ed Schonberg  <schonberg@adacore.com>
3119         * einfo.adb: Add guard to Returns_Limited_View.
3121 2014-08-04  Jose Ruiz  <ruiz@adacore.com>
3123         * s-tassta.adb, s-tarest.adb (Task_Wrapper): Force maximum alignment of
3124         the secondary stack to respect the alignments of the returned objects.
3126 2014-08-04  Ed Schonberg  <schonberg@adacore.com>
3128         * einfo.ads, einfo.adb (Returns_Limited_View): New flag defined
3129         on function entities whose return type is a limited view.
3130         * freeze.adb (Freeze_Entity): Use Returns_Limited_View to determine
3131         where to place the freeze node for a function that returns the
3132         limited view of a type, when the function is called and frozen
3133         in a different unit.
3135 2014-08-04  Eric Botcazou  <ebotcazou@adacore.com>
3137         * sem_ch3.adb (Build_Derived_Private_Type): Minor code
3138         refactoring.
3140 2014-08-04  Robert Dewar  <dewar@adacore.com>
3142         * gnat_ugn.texi: Clarify documentation on assertions.
3144 2014-08-04  Ed Schonberg  <schonberg@adacore.com>
3146         * sem_aggr.adb (Resolve_Record_Aggregate, Get_Value): Warn
3147         if a component association has a box initialization when the
3148         component type has no default initialization, either through an
3149         initial value, an aspect, or an implicit initialization procedure.
3151 2014-08-04  Ed Schonberg  <schonberg@adacore.com>
3153         * freeze.adb: Code clean up.
3155 2014-08-04  Thomas Quinot  <quinot@adacore.com>
3157         * sem_ch5.adb: Minor reformatting.
3159 2014-08-04  Ed Schonberg  <schonberg@adacore.com>
3161         * freeze.adb (Late_Freeze_Subprogram): Following AI05-151,
3162         a function can return a limited view of a type declared
3163         elsewhere. In that case the function cannot be frozen at the end
3164         of its enclosing package. If its first use is in a different unit,
3165         it cannot be frozen there, but if the call is legal the full view
3166         of the return type is available and the subprogram can now be
3167         frozen. However the freeze node cannot be inserted at the point
3168         of call, but rather must go in the package holding the function,
3169         so that the backend can process it in the proper context.
3171 2014-08-04  Robert Dewar  <dewar@adacore.com>
3173         * exp_ch5.adb, sem_ch5.adb, einfo.ads: Minor reformatting.
3175 2014-08-04  Arnaud Charlet  <charlet@adacore.com>
3177         * sem_ch4.adb (Operator_Check): Refine previous change.
3179 2014-08-04  Arnaud Charlet  <charlet@adacore.com>
3181         * sem_scil.ads: Improve comments.
3182         * sem_ch4.adb (Analyze_Equality_Op): Add support for
3183         Allow_Integer_Address (equality between Address and Integer).
3185 2014-08-04  Yannick Moy  <moy@adacore.com>
3187         * a-cfhama.adb, a-cforse.adb: Minor fixes to avoid using prefix
3188         notation on untagged objects.
3189         * sem.ads: Update comment.
3190         * inline.adb (Can_Be_Inlined_In_GNATprove_Mode): Do
3191         not inline subprograms declared in the visible part of a package.
3193 2014-08-04  Ed Schonberg  <schonberg@adacore.com>
3195         * exp_ch5.adb: minor reformatting.
3196         * einfo.ads, einfo.adb (Is_Processed_Transient): Applies to loop
3197         parameters.
3199 2014-08-04  Thomas Quinot  <quinot@adacore.com>
3201         * s-fatgen.adb: Minor reformatting.
3203 2014-08-04  Arnaud Charlet  <charlet@adacore.com>
3205         * exp_util.adb (Is_Possibly_Unaligned_Object): Always return
3206         False on .NET.
3208 2014-08-04  Ed Schonberg  <schonberg@adacore.com>
3210         * sem_ch5.adb (Analyze_Loop_Statement): Set properly the kind of
3211         the loop parameter for element iterators over containers and
3212         arrays, so that improper uses of it are detected in the loop
3213         body when expansion is disabled.
3214         * exp_ch5.adb (Expand_Iterator_Loop): The entity kind of the
3215         generated cursor is that of the analyzed loop parameter.
3217 2014-08-04  Hristian Kirtchev  <kirtchev@adacore.com>
3219         * exp_ch3.adb (Build_CPP_Init_Procedure): Remove
3220         Flag_Decl. Do not analyze the declaration of the flag as it is
3221         not part of the tree yet, instead add it to the freeze actions
3222         of the C++ type.
3224 2014-08-04  Robert Dewar  <dewar@adacore.com>
3226         * checks.adb (Apply_Scalar_Range_Check): Make sure we handle
3227         case of OUT and IN OUT parameter correctly (where Source_Typ is
3228         set), we were missing one case where a check must be applied.
3230 2014-08-04  Hristian Kirtchev  <kirtchev@adacore.com>
3232         * sem_ch8.adb (Build_Class_Wide_Wrapper): Update the comment on
3233         the generated code. Instead of hiding the renaming and using the
3234         wrapper as the proper association, have the subprogram renaming
3235         alias the wrapper.
3236         (Build_Spec): The entity of the wrapper is
3237         now derived from the entity of the related primitive.
3239 2014-08-04  Emmanuel Briot  <briot@adacore.com>
3241         * s-regpat.adb: s-regpat.adb (Parse): fix incorrect link when
3242         using non-capturing groups.
3244 2014-08-04  Ed Schonberg  <schonberg@adacore.com>
3246         * inline.adb (Build_Body_To_Inline): Remove Unmodified and
3247         related pragmas before copying the original body, to prevent
3248         spurious errors when the pragmas apply to formals that will not
3249         appear in the inlined body.
3251 2014-08-04  Robert Dewar  <dewar@adacore.com>
3253         * exp_prag.adb, sem_ch7.adb, einfo.adb, sem_prag.adb, sem_util.adb,
3254         exp_ch3.adb: Minor reformatting.
3256 2014-08-04  Robert Dewar  <dewar@adacore.com>
3258         * prj-strt.adb, prj-strt.ads, sem_attr.adb: Minor reformatting.
3260 2014-08-04  Hristian Kirtchev  <kirtchev@adacore.com>
3262         * aspects.adb Add an entry in table Canonical_Aspect for
3263         Default_Initial_Condition.
3264         * aspects.ads Add an entry in tables Aspect_Id, Aspect_Argument,
3265         Aspect_Names and Aspect_Delay for Default_Initial_Condition.
3266         * einfo.adb Flag3 is now Has_Default_Init_Cond. Flag132
3267         is now Is_Default_Init_Cond_ Procedure. Flag133 is now
3268         Has_Inherited_Default_Init_Cond.
3269         (Default_Init_Cond_Procedure): New routine.
3270         (Has_Default_Init_Cond): New routine.
3271         (Has_Inherited_Default_Init_Cond): New routine.
3272         (Is_Default_Init_Cond_Procedure): New routine.
3273         (Set_Default_Init_Cond_Procedure): New routine.
3274         (Set_Has_Default_Init_Cond): New routine.
3275         (Set_Has_Inherited_Default_Init_Cond): New routine.
3276         (Set_Is_Default_Init_Cond_Procedure): New routine.
3277         (Write_Entity_Flags): Output all the new flags.
3278         * einfo.ads New attributes Default_Init_Cond_Procedure,
3279         Has_Inherited_Default_Init_Cond and Is_Default_Init_Cond_Procedure
3280         along with usage in nodes.
3281         (Default_Init_Cond_Procedure): New routine.
3282         (Has_Default_Init_Cond): New routine and pragma Inline.
3283         (Has_Inherited_Default_Init_Cond): New routine and
3284         pragma Inline.
3285         (Is_Default_Init_Cond_Procedure): New routine and
3286         pragma Inline.
3287         (Set_Default_Init_Cond_Procedure): New routine.
3288         (Set_Has_Default_Init_Cond): New routine and pragma Inline.
3289         (Set_Has_Inherited_Default_Init_Cond): New routine and pragma Inline.
3290         (Set_Is_Default_Init_Cond_Procedure): New routine and pragma Inline.
3291         * exp_ch3.adb (Expand_N_Object_Declaration): New constant
3292         Next_N. Generate a call to the default initial condition procedure
3293         if the object's type is subject to the pragma.  (Freeze_Type):
3294         Generate the body of the default initial condition procedure or
3295         inherit the spec from a parent type.
3296         * exp_ch7.adb Add with and use clause for Exp_Prag.
3297         (Expand_Pragma_Initial_Condition): Removed.
3298         * exp_prag.ads, exp_prag.adb (Expand_Pragma_Initial_Condition): New
3299         routine.
3300         * par-prag.adb (Prag): Pragma Default_Initial_Condition does
3301         not need special treatment by the parser.
3302         * sem_ch3.adb (Build_Derived_Record_Type): Propagate the
3303         attributes related to pragma Default_Initial_Condition to the
3304         derived type.
3305         (Process_Full_View): Propagate the attributes
3306         related to pragma Default_Initial_Condition to the full view.
3307         * sem_ch7.adb (Analyze_Package_Specification): Build the
3308         declaration of the default initial condition procedure for all
3309         types that qualify or inherit the one from the parent type.
3310         * sem_ch13.adb (Analyze_Aspect_Specifications):
3311         Add processing for aspect Default_Initial_Condition.
3312         (Check_Aspect_At_Freeze_Point): Aspect
3313         Default_Initial_Condition does not require delayed analysis.
3314         (Replace_Type_References_Generic): Moved to spec.
3315         * sem_ch13.ads (Replace_Type_References_Generic): Moved from body.
3316         * sem_prag.adb Add an entry in table Sif_Glags for
3317         Default_Initial_Condition.
3318         (Analyze_Pragma): Pragma
3319         Default_Initial_Condition is now part of assertion
3320         policy. Add processing for pragma Default_Initial_Condition.
3321         (Is_Valid_Assertion_Kind): Pragma Default_Initial_Condition is
3322         now recognized as a proper assertion policy.
3323         * sem_util.ads, sem_util.adb (Build_Default_Init_Cond_Call): New
3324         routine.
3325         (Build_Default_Init_Cond_Procedure_Body): New routine.
3326         (Build_Default_Init_Cond_Procedure_Declaration): New routine.
3327         (Inherit_Default_Init_Cond_Procedure): New routine.
3328         * snames.ads-tmpl Add new predefined name and pragma id for
3329         Default_Initial_Condition.
3331 2014-08-04  Vincent Celier  <celier@adacore.com>
3333         * prj-dect.adb (Parse_Case_Construction): It is no longer
3334         an error if the variable for a case construction is not
3335         typed, only if the variable value is not a single string. Call
3336         Parse_Choice_List and End_Case_Construction with the new parameter
3337         to indicate that the variable is typed.
3338         * prj-strt.adb (End_Case_Construction): Only check the labels
3339         if the variable is typed.  If the variable is not typed,
3340         issue a warning when there is no "when others" allternative.
3341         (Parse_Choice_List): Manage the labels only if the variable
3342         is typed.
3343         * prj-strt.ads (End_Case_Construction): New Boolean parameter
3344         String_Type.
3345         (Parse_Choice_List): Ditto.
3347 2014-08-04  Ed Schonberg  <schonberg@adacore.com>
3349         * sem_ch5.adb: Additional fix to Check_Predicate_Use.
3351 2014-08-04  Vincent Celier  <celier@adacore.com>
3353         * projects.texi: Update documentation of case constructions with
3354         variables that are not typed.
3356 2014-08-04  Ed Schonberg  <schonberg@adacore.com>
3358         * sem_ch8.adb (Build_Class_Wide_Wrapper): If the operator carries
3359         an Eliminated pragma, indicate that the wrapper is also to be
3360         eliminated, to prevent spurious errors when using gnatelim on
3361         programs that include box-initialization of equality operators
3362         (consequence of AI05-071)..
3364 2014-08-04  Robert Dewar  <dewar@adacore.com>
3366         * checks.adb (Activate_Overflow_Check): Handle floating-point
3367         case correctly.
3368         * checks.ads (Activate_Overflow_Check): Clarify handling of
3369         floating-point cases.
3370         * exp_util.adb (Check_Float_Op_Overflow): Reset Do_Overflow_Check
3371         flag if we generate an explicit overflow check (for
3372         Check_Float_Overflow mode).
3374 2014-08-04  Robert Dewar  <dewar@adacore.com>
3376         * prj-proc.adb, prj-part.adb, prj-strt.adb, prj.adb, prj.ads,
3377         prj-attr.adb, prj-attr.ads: Minor reformatting.
3379 2014-08-04  Yannick Moy  <moy@adacore.com>
3381         * expander.adb (Expand): Always perform special
3382         expansion in GNATprove mode, even when doing pre-analysis.
3384 2014-08-04  Thomas Quinot  <quinot@adacore.com>
3386         * repinfo.adb (List_Scalar_Storage_Order): List bit order if
3387         not default. Also list bit order if SSO is specified. Do not
3388         assume that bit order is always equal to scalar storage order.
3390 2014-08-04  Thomas Quinot  <quinot@adacore.com>
3392         * freeze.adb (Set_SSO_From_Default): Do not set scalar storage
3393         order to reverse SSO for a type that has an explicit native
3394         Bit_Order.
3396 2014-08-04  Doug Rupp  <rupp@adacore.com>
3398         * cal.c: Macro check for VxWorks7.
3399         * init.c (getpid): Likewise.
3400         * mkdir.c (__gnat_mkdir): Likewise.
3401         * sysdep.c (__gnat_is_file_not_found_error): Likewise.
3403 2014-08-04  Gary Dismukes  <dismukes@adacore.com>
3405         * exp_ch3.adb (Expand_N_Object_Declaration): Inhibit generation
3406         of an invariant check in the case where No_Initialization is set,
3407         since the object is uninitialized.
3409 2014-08-04  Thomas Quinot  <quinot@adacore.com>
3411         * snames.ads-tmpl (Default_Scalar_Storage_Order): Now an attribute
3412         name, in addition to a pragma name.
3413         * snames.adb-tmpl (Get_Pragma_Id, Is_Configuration_Pragma_Name,
3414         Is_Pragma_Name): Adjust accordingly.
3415         * sem_attr.ads, sem_attr.adb, exp_attr.adb
3416         (Attribute_Default_Scalar_Storage_Order): Add handling of new
3417         attribute.
3418         * gnat_rm.texi: Document the above.
3420 2014-08-04  Arnaud Charlet  <charlet@adacore.com>
3422         * exp_util.adb (Check_Float_Op_Overflow): No-op in codepeer
3423         mode for now, to revert to previous behavior.
3424         * checks.adb: Revert previous change, no longer needed.
3426 2014-08-04  Robert Dewar  <dewar@adacore.com>
3428         * gnat1drv.adb (Adjust_Global_Switches): Don't set
3429         Check_Float_Overflow if Machine_Oveflows_On_Target is True.
3430         * sem_prag.adb (Analyze_Pragma, case Check_Float_Overflow): Don't
3431         set Check_Float_Overflow if Machine_Oveflows_On_Target is True.
3432         * switch-c.adb (Scan_Front_End_Switches): Don't set
3433         Check_Float_Overflow if Machine_Oveflows_On_Target is True.
3435 2014-08-04  Vincent Celier  <celier@adacore.com>
3437         * prj-attr.adb: Add new default indications for
3438         attributes Object_Dir, Exec_Dir, Source_Dirs and Target.
3439         (Attribute_Default_Of): New function (Initialize): Set the
3440         default for those attributes that have one specified.
3441         * prj-attr.ads (Attribute_Data): New component Default.
3442         * prj-proc.adb (Expression): Take into account the new defaults
3443         for attributes Object_Dir, Exec_Dir and Source_Dirs.
3444         * prj-strt.adb (Attribute_Reference): Set the default for
3445         the attribute.
3446         * prj-tree.ads, prj-tree.adb (Default_Of): New function.
3447         (Set_Default_Of): New procedure.
3448         * prj.adb (The_Dot_String): New global Name_Id variable,
3449         initialized in procedure Initialize.
3450         (Dot_String): New function
3451         (Initialize): Initialize The_Dot_String.
3452         (Reset): Create the string list Shared.Dot_String_List.
3453         * prj.ads (Attribute_Default_Value): New enumeration type.
3454         (Project_Qualifier): Change enumeration value Dry to Abstract_Project.
3455         (Dot_String): New function.
3456         (Shared_Project_Tree_Data): New string list component Dot_String_List.
3457         * projects.texi: Document new defaults for attribute Object_Dir,
3458         Exec_Dir and Source_Dirs.
3460 2014-08-04  Robert Dewar  <dewar@adacore.com>
3462         * sem_ch12.adb: Minor reformatting.
3464 2014-08-04  Arnaud Charlet  <charlet@adacore.com>
3466         * exp_util.adb, checks.adb (Check_Float_Op_Overflow): Add special
3467         expansion in CodePeer_Mode.
3468         (Selected_Range_Checks): Add handling of overflow checks in
3469         CodePeer_Mode.
3471 2014-08-04  Robert Dewar  <dewar@adacore.com>
3473         * exp_attr.adb (Expand_N_Attribute_Reference, case Pred):
3474         Remove special test for Float'First, no longer required.
3475         (Expand_N_Attribute_Reference, case Succ): Remove special test
3476         for Float'First, no longer required.
3477         * s-fatgen.adb (Pred): return infinity unchanged.
3478         (Succ): ditto.
3480 2014-08-04  Claire Dross  <dross@adacore.com>
3482         * sem_ch12.adb (Analyze_Associations): Defaults should only be
3483         used if there is no explicit match.
3484         * exp_util.adb (Get_First_Parent_With_Ext_Axioms_For_Entity):
3485         Also check for pragma external_axiomatization on generic units.
3487 2014-08-04  Robert Dewar  <dewar@adacore.com>
3489         * checks.adb (Activate_Overflow_Check): Remove
3490         Check_Float_Overflow processing.
3491         (Apply_Scalar_Range_Check): Ditto.
3492         (Generate_Range_Check): Ditto.
3493         * exp_ch4.adb (Expand_N_Op_Add): Add call to
3494         Check_Float_Op_Overflow.
3495         (Expand_N_Op_Divide): ditto.
3496         (Expand_N_Op_Multiply): ditto.
3497         (Expand_N_Op_Subtract): ditto.
3498         * exp_util.ads, exp_util.adb (Check_Float_Op_Overflow): New procedure.
3499         * sem_attr.adb (Analyze_Attribute, case Pred): Make sure
3500         Do_Range_Check is set for floating-point case in -gnatc or
3501         GNATprove mode.
3502         (Analyze_Attribute, case Succ): Make sure
3503         Do_Range_Check is set for floating-point case in -gnatc or
3504         GNATprove mode.
3505         * sem_res.adb (Resolve_Type_Conversion): Make sure Do_Range_Check
3506         flag is set for real to integer conversion in GNATprove or
3507         -gnatc mode.
3509 2014-08-04  Gary Dismukes  <dismukes@adacore.com>
3511         * sem_ch13.adb (Analyze_Aspect_Specifications): Resolve
3512         the expression of an Import or Export aspect as type Boolean
3513         and require it to be static. Add ??? comment. Also, set the
3514         Is_Exported flag when appropriate.
3516 2014-08-04  Robert Dewar  <dewar@adacore.com>
3518         * exp_ch4.adb: Minor reformatting.
3519         * exp_attr.adb: Minor reformatting.
3521 2014-08-04  Thomas Quinot  <quinot@adacore.com>
3523         * s-fatgen.ads, s-fatgen.adb (S, P): New visible type declarations
3524         (Unaligned_Valid): Remove now unused subprogram.
3525         * exp_attr.adb (Expand_N_Attribute_Reference, case
3526         Attribute_Valid): If the prefix is in reverse SSO or potentially
3527         unaligned, copy it using a byte copy operation to a temporary
3528         variable.
3529         * einfo.adb: Minor comment fix.
3531 2014-08-04  Hristian Kirtchev  <kirtchev@adacore.com>
3533         * freeze.adb (Freeze_Entity): Do not freeze formal subprograms.
3535 2014-08-04  Robert Dewar  <dewar@adacore.com>
3537         * s-imgrea.adb (Image_Floating_Point): Don't add space before +Inf.
3538         * s-fatgen.adb (Pred): Handle Float'First.
3539         (Succ): Handle Float'Last.
3541 2014-08-04  Ed Schonberg  <schonberg@adacore.com>
3543         * sem_util.adb (Is_Potentially_Unevaluated): If the original
3544         node of a parent node in the tree is a short-circuit operation,
3545         the node is potentially unevaluated.
3547 2014-08-04  Robert Dewar  <dewar@adacore.com>
3549         * sem_res.adb (Resolve_Type_Conversion): Set Do_Range_Check on
3550         conversion from a real type to an integer type.
3552 2014-08-04  Yannick Moy  <moy@adacore.com>
3554         * sem_aggr.adb, sem_ch3.adb, sem_ch5.adb, sem_ch7.adb, sem_ch9.adb,
3555         sem_ch12.adb, sem_util.adb, sem_util.ads, sem_res.adb, sem_attr.adb,
3556         exp_ch6.adb, sem_ch4.adb, restrict.adb, restrict.ads, sem_ch6.adb,
3557         sem_ch8.adb, sem_ch11.adb: Update some subprogram names to refer to
3558         SPARK_05 instead of SPARK.
3560 2014-08-04  Robert Dewar  <dewar@adacore.com>
3562         * sem.ads: Minor reformatting.
3563         * sem_ch13.adb (Analyze_Aspect_External_Or_Link_Name): Minor
3564         reformatting.
3565         (Analyze_Aspect_Specifications, case Convention): Put External_Name
3566         before Link_Name when constructing pragma.
3568 2014-08-04  Yannick Moy  <moy@adacore.com>
3570         * sem.adb, sem.ads (In_Default_Expr): Global flag that is set
3571         to True during analysis of a default component expression.
3572         (Semantics): Save and restore In_Default_Expr around analysis.
3573         * sem_ch3.adb, sem_ch3.ads (Analyze_Component_Declaration):
3574         Call new wrapper Preanalyze_Default_Expression.
3575         (Preanalyze_Default_Expression): New wrapper on
3576         Preanalyze_Spec_Expression which sets and restores In_Default_Expr.
3577         * sem_res.adb (Resolve_Call): Mark calls inside default
3578         expressions as not inlined in GNATprove mode.
3580 2014-08-04  Robert Dewar  <dewar@adacore.com>
3582         * exp_ch4.adb: Minor reformatting.
3584 2014-08-04  Olivier Hainque  <hainque@adacore.com>
3586         * link.c: remove const on __gnat_objlist_file_supported for AIX
3588 2014-08-04  Robert Dewar  <dewar@adacore.com>
3590         * sem_util.ads: Minor addition of comment.
3592 2014-08-04  Vincent Celier  <celier@adacore.com>
3594         * prj-dect.adb (Check_Package_Allowed): Allow package IDE in
3595         all projects, including aggregate and aggregate library projects.
3597 2014-08-04  Yannick Moy  <moy@adacore.com>
3599         * back_end.adb (Call_Back_End): Do not call gigi in GNATprove mode.
3601 2014-08-04  Robert Dewar  <dewar@adacore.com>
3603         * sem_eval.adb (Test_In_Range): Always in range for
3604         Is_Known_Valid target type, where input type has smaller or
3605         equal size and does not have biased rep.
3607 2014-08-04  Ed Schonberg  <schonberg@adacore.com>
3609         * sem_attr.adb (Eval_Attribute): Constrained is not treated as
3610         a static attribute, and the Static flag must not be set on it
3611         during resolution. It may be constant-folded during expansion,
3612         but if expansion is disabled it is not a static expression.
3614 2014-08-04  Hristian Kirtchev  <kirtchev@adacore.com>
3616         * sem_ch8.adb (Build_Class_Wide_Wrapper): Mark the primitive as
3617         referenced once resolution has taken place.
3619 2014-08-04  Gary Dismukes  <dismukes@adacore.com>
3621         * exp_ch4.adb (Expand_N_Type_Conversion): Don't
3622         compare access levels in the case where the target type is the
3623         anonymous type of an access discriminant, since the level of
3624         such types is defined based on context. Add comment.
3626 2014-08-04  Hristian Kirtchev  <kirtchev@adacore.com>
3628         * sem_ch8.adb (Build_Class_Wide_Wrapper): Handle various special
3629         cases related to equality.  Remove the special processing
3630         for dispatching abstract subprograms as it is not needed.
3631         (Interpretation_Error): Add a specialized error message for
3632         predefined operators.
3633         (Is_Intrinsic_Equality): New routine.
3634         (Is_Suitable_Candidate): New routine.
3636 2014-08-04  Gary Dismukes  <dismukes@adacore.com>
3638         * checks.adb: Minor comment reformatting.
3640 2014-08-04  Ed Schonberg  <schonberg@adacore.com>
3642         * restrict.adb (Check_Restriction): For checked max_parameter
3643         restrictions reset Violated flag, so that subsequent violations
3644         are properly detected.
3646 2014-08-04  Robert Dewar  <dewar@adacore.com>
3648         * sem_ch3.adb (Check_Initialization): Fix bad test of GNATprove
3649         mode.
3650         (Process_Discriminants): Fix bad test of GNATprove mode
3652 2014-08-04  Hristian Kirtchev  <kirtchev@adacore.com>
3654         * sem_ch12.adb (Instantiate_Formal_Subprogram):
3655         Move variable to their own section. Propagate the source
3656         location of a formal parameter to the corresponding formal of
3657         the subprogram renaming declaration. Code reformatting.
3659 2014-08-04  Arnaud Charlet  <charlet@adacore.com>
3661         * g-trasym-vms-ia64.adb, g-trasym-vms-alpha.adb: Removed.
3663 2014-08-04  Ed Schonberg  <schonberg@adacore.com>
3665         * exp_aggr.adb (Expand_Array_Aggregate): Do not attempt expansion
3666         if error already detected.  We may reach this point in spite of
3667         previous errors when compiling with -gnatq, to force all possible
3668         errors (this is the usual ACATS mode).
3670 2014-08-04  Gary Dismukes  <dismukes@adacore.com>
3672         * checks.adb (Generate_Range_Check): For the case of converting
3673         a base type with a larger range to a smaller target subtype, only
3674         use unchecked conversions of bounds in the range check followed
3675         by conversion in the case where both types are discrete. In other
3676         cases, convert to the target base type and save in a temporary
3677         followed by the range check.
3678         (Convert_And_Check_Range): New procedure factoring code to save
3679         conversion to a temporary followed by a range check (called two
3680         places in Generate_Range_Check).
3681         * exp_ch4.adb (Expand_N_Type_Conversion): Relax previous
3682         check-in, to generate range checks for conversions between
3683         any floating-point types rather than limiting it to matching
3684         base types.
3686 2014-08-02  Trevor Saunders  <tsaunders@mozilla.com>
3688         * gcc-interface/trans.c: Use hash_set instead of pointer_set.
3690 2014-08-01  Ed Schonberg  <schonberg@adacore.com>
3692         * restrict.adb (Update_Restrictions): For restrictions with a
3693         maximum parameter (e.g. number of protected entries in Ravenscar)
3694         do not compute the maximum of the violation over several objects,
3695         because the restriction is per-object.
3696         (Check_Restriction): After possible message, reset the value
3697         of of a checked max_parameter restriction to zero, to prevent
3698         cascaded errors.
3699         * sem_ch3.adb (Build_Derived_Private_Type): Use base of parent
3700         (sub)type to determine whether derived type should be on the
3701         list of private dependents of a type whose full view may become
3702         visible subsequently.
3704 2014-08-01  Olivier Hainque  <hainque@adacore.com>
3706         * gcc-interface/Make-lang.in (ADA_TOOLS_FLAGS_TO_PASS, native): use
3707         $(CXX) instead of ../../xg++ to feed CXX.
3708         (CXX_LFLAGS): Remove. Now unused as the proper flags
3709         are expected to be included in the CXX variable.
3711 2014-08-01  Pierre-Marie Derodat  <derodat@adacore.com>
3713         * gcc-interface/decl.c (elaborate_expression_1): Return the new
3714         variable when debug info is needed and the expression is not
3715         constant.  Tag as external only new variables that are global.
3716         (gnat_to_gnu_entity): Call it after the GNU declaration is saved.
3717         * gcc-interface/trans.c (Attribute_to_gnu): Do not cache
3718         attributes for IN array parameters when their actual subtype
3719         needs debug info.
3720         (Compilation_Unit_to_gnu): Call it to process all remaining nodes.
3721         * gcc-interface/gigi.h (process_deferred_decl_context): New.
3722         * gcc-interface/utils.c (gnat_write_global_declarations): Do not
3723         emit debug info for ignored global declarations.
3724         (struct deferred_decl_context_node,
3725         add_deferred_decl_context, add_deferred_type_context,
3726         compute_deferred_decl_context, defer_or_set_type_context,
3727         deferred_decl_context_queue, get_debug_scope,
3728         get_global_context, process_deferred_decl_context): New.
3729         (gnat_pushdecl): Re-implement the DECL_CONTEXT and TYPE_CONTEXT
3730         computation machinery to rely on the GNAT Scope attribute.
3732 2014-08-01  Eric Botcazou  <ebotcazou@adacore.com>
3734         * gcc-interface/utils2.c (build_simple_component_ref): Add guard.
3736 2014-08-01  Robert Dewar  <dewar@adacore.com>
3738         * sem_ch8.adb, opt.ads Minor comment updates.
3740 2014-08-01  Hristian Kirtchev  <kirtchev@adacore.com>
3742         * exp_intr.adb (Expand_Unc_Deallocation): Request a renaming
3743         from the side effects removal machinery.
3744         * exp_util.adb (Duplicate_Subexpr): Add formal parameter
3745         Renaming_Req. Update the nested call to Remove_Side_Effects.
3746         (Duplicate_Subexpr_No_Checks): Add formal parameter
3747         Renaming_Req. Update the nested call to Remove_Side_Effects.
3748         (Duplicate_Subexpr_Move_Checks): Add formal parameter
3749         Renaming_Req. Update the nested call to Remove_Side_Effects.
3750         (Remove_Side_Effects): Add formal parameter Renaming_Req. Generate
3751         an object renaming declaration when the caller requests it.
3752         * exp_util.ads (Duplicate_Subexpr): Add formal
3753         parameter Renaming_Req. Update comment on usage.
3754         (Duplicate_Subexpr_No_Checks): Add formal parameter Renaming_Req.
3755         (Duplicate_Subexpr_Move_Checks): Add formal parameter
3756         Renaming_Req.
3758 2014-08-01  Bob Duff  <duff@adacore.com>
3760         * gnat_ugn.texi: Minor updates.
3762 2014-08-01  Robert Dewar  <dewar@adacore.com>
3764         * atree.adb: Minor reformatting.
3766 2014-08-01  Ed Schonberg  <schonberg@adacore.com>
3768         * exp_aggr.adb (Init_Hidden_Discriminants): If some ancestor is a
3769         private extension, get stored constraint, if any, from full view.
3771 2014-08-01  Robert Dewar  <dewar@adacore.com>
3773         * opt.ads (No_Elab_Code_All_Pragma): New global variable.
3774         * sem_ch10.adb (Check_No_Elab_Code_All): New procedure
3775         (Analyze_Compilation_Unit): Call Check_No_Elab_Code_All
3776         (Analyze_Subunit_Context): Call Check_No_Elab_Code_All.
3777         * sem_prag.adb (Analyze_Pragma, case No_Elaboration_Code_All):
3778         Remove code for checking with's, now in sem_ch10.adb, set
3779         Opt.No_Elab_Code_All_Pragma.
3781 2014-08-01  Eric Botcazou  <ebotcazou@adacore.com>
3783         * sem_ch3.adb (Copy_And_Build): Copy the declaration for
3784         access types as well and adjust the subtype mark if there are
3785         no constraints.
3787 2014-08-01  Robert Dewar  <dewar@adacore.com>
3789         * sem_eval.adb (Test_In_Range): Return Unknown if error posted.
3791 2014-08-01  Robert Dewar  <dewar@adacore.com>
3793         * sem_ch3.adb, einfo.ads, exp_ch4.adb: Code clean ups.
3795 2014-08-01  Eric Botcazou  <ebotcazou@adacore.com>
3797         * einfo.ads (Has_Private_Ancestor): Remove obsolete usage.
3798         * exp_ch4.adb (Expand_Composite_Equality): Add conversion
3799         of the actuals in the case of untagged record types too.
3800         * sem_ch3.adb (Build_Full_Derivation): New procedure to create the
3801         full derivation of a derived private type, extracted from...
3802         (Copy_And_Build): In the case of record types and most
3803         enumeration types, copy the original declaration.  Build the
3804         full derivation according to the approach extracted from...
3805         (Build_Derived_Private_Type): ...here.  Call Build_Full_Derivation
3806         to create the full derivation in all existing cases and also
3807         create it in the no-discriminants/discriminants case instead of
3808         deriving directly from the full view.
3809         (Is_Visible_Component): Remove obsolete code.
3810         * sem_aggr.adb (Resolve_Record_Aggregate): Likewise.
3812 2014-08-01  Arnaud Charlet  <charlet@adacore.com>
3814         * fe.h (GNAT_Mode): New.
3815         * gcc-interface/decl.c (gnat_to_gnu_entity): Do not error out on
3816         reverse SSO in GNAT mode.
3818 2014-08-01  Thomas Quinot  <quinot@adacore.com>
3820         * freeze.adb: Minor reformatting.
3822 2014-08-01  Thomas Quinot  <quinot@adacore.com>
3824         * exp_ch3.adb (Default_Initialize_Object): Do not generate
3825         default initialization for an imported object.
3827 2014-08-01  Olivier Hainque  <hainque@adacore.com>
3829         * seh_init.c (__gnat_map_SEH): Cast argument of IsBadCodePtr
3830         to the expected FARPROC type instead of void *.
3831         * adaint.c (f2t): Expect __time64_t * as second argument, in line with
3832         other datastructures.
3833         (__gnat_file_time_name_attr): Adjust accordingly.
3834         (__gnat_check_OWNER_ACL): Declare pSD as PSECURITY_DESCRIPTOR,
3835         in line with uses.
3836         (__gnat_check_OWNER_ACL): Declare AccessMode
3837         parameter as ACCESS_MODE instead of DWORD, in line with callers
3838         and uses.
3839         (__gnat_set_executable): Add ATTRIBUTE_UNUSED on mode,
3840         unused on win32.  Correct cast of "args" on call to spawnvp.
3841         (add_handle): Cast realloc calls into their destination types.
3842         (win32_wait): Remove declaration and initialization of unused variable.
3843         (__gnat_locate_exec_on_path): Cast alloca calls
3844         into their destination types.
3845         * initialize.c (append_arg, __gnat_initialize): Cast xmalloc calls into
3846         their destination types.
3848 2014-08-01  Gary Dismukes  <dismukes@adacore.com>
3850         * exp_ch4.adb (Expand_N_Type_Conversion): Expand
3851         range checks for conversions between floating-point subtypes
3852         when the target and source types are the same.
3854 2014-08-01  Robert Dewar  <dewar@adacore.com>
3856         * exp_aggr.adb: Minor reformatting.
3858 2014-08-01  Eric Botcazou  <ebotcazou@adacore.com>
3860         * sem_ch13.adb (Check_Indexing_Functions): Initialize
3861         Indexing_Found.
3863 2014-08-01  Arnaud Charlet  <charlet@adacore.com>
3865         * gnat1drv.adb (Gnat1drv): In gnatprove mode, we now write the
3866         ALI file before we call the backend (so that gnat2why can append
3867         to it).
3869 2014-08-01  Thomas Quinot  <quinot@adacore.com>
3871         * exp_pakd.adb (Expand_Bit_Packed_Element_Set,
3872         Expand_Packed_Element_Reference): Pass additional Rev_SSO
3873         parameter indicating whether the packed array type has reverse
3874         scalar storage order to the s-pack* Set/Get routines.
3875         * s-pack*.ad* (Get, Set, GetU, SetU): New formal Rev_SSO
3876         indicating reverse scalar storage order.
3878 2014-08-01  Robert Dewar  <dewar@adacore.com>
3880         * sem_ch3.adb (Check_Initialization): Set Do_Range_Check
3881         for initial component value in -gnatc or GNATprove mode.
3882         (Process_Discriminants): Same fix for default discriminant values.
3883         * sem_eval.adb (Test_In_Range): Improve accuracy of results by
3884         checking subtypes.
3886 2014-08-01  Robert Dewar  <dewar@adacore.com>
3888         * sinfo.ads: Minor comment clarification.
3890 2014-08-01  Hristian Kirtchev  <kirtchev@adacore.com>
3892         * sem_ch13.adb (Analyze_Aspect_Specifications): Code
3893         reformatting. Store the generated pragma Import in the related
3894         subprogram as routine Wrap_Imported_Subprogram will need it later.
3895         * sem_prag.adb (Is_Unconstrained_Or_Tagged_Item): An item of
3896         a private type with discriminants is considered to fall in the
3897         category of unconstrained or tagged items.
3899 2014-08-01  Arnaud charlet  <charlet@adacore.com>
3901         * s-os_lib.adb (Open_Append): New functions to open a file for
3902         appending. This binds to the already existing (but not used)
3903         __gnat_open_append.
3904         * osint.ads, osint.adb (Open_File_To_Append_And_Check): New procedure
3905         to open a file for appending.
3906         * osint-c.ads, osint-c.adb (Open_Output_Library_Info): New procedure
3907         to open the ALI file for appending.
3909 2014-08-01  Robert Dewar  <dewar@adacore.com>
3911         * sem_ch8.adb: Minor reformatting.
3913 2014-08-01  Yannick Moy  <moy@adacore.com>
3915         * sem_ch13.adb (Insert_Pragma): Add special case for precondition
3916         pragmas from aspects, which need to be inserted in proper order.
3918 2014-08-01  Ed Schonberg  <schonberg@adacore.com>
3920         * exp_aggr.adb (Expand_Record_Aggregate, Init_Hidden_Discriminants):
3921         Handle properly a type extension that constrains a discriminated
3922         derived type that renames other discriminants of an ancestor.
3924 2014-08-01  Thomas Quinot  <quinot@adacore.com>
3926         * s-pack06.adb, s-pack10.adb, s-pack03.ads, s-pack12.adb, s-pack14.ads,
3927         s-pack25.adb: Fix minor inconsistencies and typos.
3929 2014-08-01  Hristian Kirtchev  <kirtchev@adacore.com>
3931         * sem_ch8.adb (Analyze_Subprogram_Renaming): Alphabetize
3932         globals and move certain variables to the "local
3933         variable" section. Call Build_Class_Wide_Wrapper when
3934         renaming a default actual subprogram with a class-wide actual.
3935         (Build_Class_Wide_Wrapper): New routine.
3936         (Check_Class_Wide_Actual): Removed.
3937         (Find_Renamed_Entity): Code reformatting.
3938         (Has_Class_Wide_Actual): Alphabetize. Change the
3939         logic of the predicate as the renamed name may not necessarely
3940         denote the correct subprogram.
3942 2014-08-01  Eric Botcazou  <ebotcazou@adacore.com>
3944         * sem_ch7.adb: Fix minor oversight in condition.
3946 2014-08-01  Bob Duff  <duff@adacore.com>
3948         * projects.texi: Minor documentation improvements.
3950 2014-08-01  Robert Dewar  <dewar@adacore.com>
3952         * aspects.ads, aspects.adb: Add aspect No_Elaboration_Code_All.
3953         * gnat_rm.texi: Document No_Elaboration_Code_All pragma and aspect.
3954         * lib-load.adb: Initialize No_Elab_Code_All field.
3955         * lib-writ.adb: Initialize No_Elab_Code_All.
3956         * lib.ads, lib.adb: New field No_Elab_Code_All.
3957         * par-prag.adb: Add dummy entry for pragma No_Elaboration_Code_All.
3958         * restrict.ads, restrict.adb: Restriction No_Elaboration_Code_All no
3959         longer exists.
3960         * sem_ch10.adb (Analyze_Context): Processing for
3961         No_Elaboration_Code_All removed.
3962         (Generate_Parent_References): Moved to Sem_Util.
3963         * sem_prag.adb: Add processing for pragma No_Elaboration_Code_All.
3964         * sem_util.ads, sem_util.adb (Get_Parent_Entity): Moved here from
3965         Sem_Ch10.
3966         * snames.ads-tmpl: Add entry for pragma No_Elaboration_Code_All.
3967         * targparm.adb: Minor comment updates Add comments on ignoring
3968         pragma No_Elaboration_Code_All.
3970 2014-08-01  Nicolas Roche  <roche@adacore.com>
3972         * adaint.c (__gnat_set_close_on_exec): Ensure that
3973         we can unset "close_on_exec" flag.
3975 2014-08-01  Ed Schonberg  <schonberg@adacore.com>
3977         * exp_ch9.adb (Build_Wrapper_Spec, Replicate_Formals): When building
3978         the parameter specs of the wrapper program for a primitive operation
3979         of a synchronized type that implements an interface, copy the
3980         null_exclusion indicator as well.
3982 2014-08-01  Robert Dewar  <dewar@adacore.com>
3984         * sem_eval.ads: Minor reformatting.
3986 2014-08-01  Eric Botcazou  <ebotcazou@adacore.com>
3988         * exp_ch3.adb (Build_Initialization_Call): Call Underlying_Type
3989         to go down the chain of private derivations.
3990         * freeze.adb (Freeze_Entity): Fix typo in comment.
3992 2014-08-01  Ed Schonberg  <schonberg@adacore.com>
3994         * sem_ch3.adb (Access_Type_Declaration): If designated type is
3995         a limited view, create a master entity (as is already done for
3996         class-wide types) in case the full view designates a type that
3997         contains tasks.
3998         * sem_ch8.adb (Find_Selected_Component): If prefix is a dereference
3999         and the designated type is a limited view, use the non-limited
4000         view if available.
4002 2014-08-01  Eric Botcazou  <ebotcazou@adacore.com>
4004         * gcc-interface/ada-tree.h (DECL_BY_DESCRIPTOR_P): Delete.
4005         (DECL_FUNCTION_STUB): Likewise.
4006         (SET_DECL_FUNCTION_STUB): Likewise.
4007         (DECL_PARM_ALT_TYPE): Likewise.
4008         (SET_DECL_PARM_ALT_TYPE): Likewise.
4009         (TYPE_VAX_FLOATING_POINT_P): Delete.
4010         (TYPE_DIGITS_VALUE): Likewise.
4011         (SET_TYPE_DIGITS_VALUE): Likewise.
4012         * gcc-interface/gigi.h (standard_datatypes): Remove ADT_malloc32_decl.
4013         (malloc32_decl): Delete.
4014         (build_vms_descriptor): Likewise.
4015         (build_vms_descriptor32): Likewise.
4016         (fill_vms_descriptor): Likewise.
4017         (convert_vms_descriptor): Likewise.
4018         (TARGET_ABI_OPEN_VMS): Likewise.
4019         (TARGET_MALLOC64): Likewise.
4020         * gcc-interface/decl.c (add_parallel_type_for_packed_array): New.
4021         (gnat_to_gnu_entity): Call it to add the original type as a parallel
4022         type to the implementation type of a packed array type.
4023         <E_Procedure>: Remove now obsolete kludge.
4024         <E_Exception>: Delete obsolete comment.
4025         <object>: Small tweak.
4026         <E_Subprogram_Type>: Remove support for stub subprograms, as well as
4027         for the descriptor passing mechanism.
4028         (gnat_to_gnu_param): Likewise.
4029         * gcc-interface/misc.c (gnat_init_gcc_fp): Remove special case.
4030         (gnat_print_type): Adjust.
4031         * gcc-interface/trans.c (gigi): Remove obsolete initializations.
4032         (vms_builtin_establish_handler_decl): Delete.
4033         (gnat_vms_condition_handler_decl): Likewise.
4034         (establish_gnat_vms_condition_handler): Likewise.
4035         (build_function_stub): Likewise.
4036         (Subprogram_Body_to_gnu): Do not call above functions.
4037         (Call_to_gnu): Remove support for the descriptor passing mechanism.
4038         * gcc-interface/utils.c (make_descriptor_field): Delete.
4039         (build_vms_descriptor32): Likewise.
4040         (build_vms_descriptor): Likewise.
4041         (fill_vms_descriptor): Likewise.
4042         (convert_vms_descriptor64): Likewise.
4043         (convert_vms_descriptor32): Likewise.
4044         (convert_vms_descriptor): Likewise.
4045         * gcc-interface/utils.c (unchecked_convert): Likewise.
4046         * gcc-interface/utils2.c (maybe_wrap_malloc): Remove obsolete stuff.
4048 2014-08-01  Eric Botcazou  <ebotcazou@adacore.com>
4050         * gcc-interface/trans.c (gigi): Use gnat_to_gnu_type for the exception
4051         type and get_unpadded_type for the longest FP type.
4052         (Attribute_to_gnu) <Machine>: Compare the precision of the types.
4053         (convert_with_check): Adjust formatting and remove FIXME.
4055 2014-08-01  Eric Botcazou  <ebotcazou@adacore.com>
4057         * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Signed_Integer_Subtype>:
4058         Do not convert the RM bounds to the base type.
4059         (E_Floating_Point_Subtype): Likewise.
4060         (E_Array_Subtype): Convert the bounds to the base type.
4061         * gcc-interface/trans.c (get_type_length): New function.
4062         (Attribute_to_gnu) <Range_Length>: Call it.
4063         <Length>: Likewise.
4064         (Loop_Statement_to_gnu): Convert the bounds to the base type.
4065         (gnat_to_gnu) <N_In>: Likewise.
4066         * gcc-interface/utils.c (make_type_from_size): Do not convert the RM
4067         bounds to the base type.
4068         (create_range_type): Likewise.
4069         (convert): Convert the bounds to the base type for biased types.
4070         * gcc-interface/utils2.c (compare_arrays): Convert the bounds to the
4071         base type.
4073 2014-08-01  Eric Botcazou  <ebotcazou@adacore.com>
4075         * gcc-interface/trans.c (gnat_to_gnu) <N_Selected_Component>: Remove
4076         incorrect implicit type derivation.
4077         * gcc-interface/utils.c (max_size) <tcc_reference>: Convert the bounds
4078         to the base type.
4080 2014-08-01  Hristian Kirtchev  <kirtchev@adacore.com>
4082         * sem_attr.adb (Analyze_Attribute): Preanalyze and resolve the
4083         prefix of attribute Loop_Entry.
4084         * sem_prag.adb (Analyze_Pragma): Verify the placement of pragma
4085         Loop_Variant with respect to an enclosing loop (if any).
4086         (Contains_Loop_Entry): Update the parameter profile and all
4087         calls to this routine.
4088         * sem_res.adb (Resolve_Call): Code reformatting. Do not ask
4089         for the corresponding body before determining the nature of the
4090         ultimate alias's declarative node.
4092 2014-08-01  Robert Dewar  <dewar@adacore.com>
4094         * gnat1drv.adb, sem_ch4.adb: Minor reformatting.
4096 2014-08-01  Robert Dewar  <dewar@adacore.com>
4098         * sem_eval.adb (Rewrite_In_Raise_CE): Don't try to reuse inner
4099         constraint error node since it is a list member.
4101 2014-08-01  Robert Dewar  <dewar@adacore.com>
4103         * sem_warn.adb: Minor reformatting.
4105 2014-08-01  Eric Botcazou  <ebotcazou@adacore.com>
4107         * einfo.adb (Underlying_Type): Return the underlying full view
4108         of a private type if present.
4109         * freeze.adb (Freeze_Entity):
4110         Build a single freeze node for partial, full and underlying full
4111         views, if any.
4112         * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Private_Type>: Add a
4113         missing guard before the access to the Underlying_Full_View.
4114         * gcc-interface/trans.c (process_freeze_entity): Deal with underlying
4115         full view if present.
4116         * gcc-interface/utils.c (make_dummy_type): Avoid superfluous work.
4118 2014-08-01  Ed Schonberg  <schonberg@adacore.com>
4120         * sem_res.adb (Resolve_Entry_Call): When an entry has
4121         preconditions, the entry call is wrapped in a procedure call
4122         that incorporates the precondition checks. To prevent a double
4123         expansion, with possible duplication of extra formals, that
4124         procedure call must only be pre-analyzed and resolved. Expansion
4125         takes place upon return to the caller Resolve_Call.
4127 2014-08-01  Hristian Kirtchev  <kirtchev@adacore.com>
4129         * sem_res.adb (Resolve_Call): Do not perform
4130         GNATprove-specific inlining while within a generic.
4132 2014-08-01  Ed Schonberg  <schonberg@adacore.com>
4134         * sem_ch4.adb (Analyze_Case_Expression): Handle properly a
4135         case expression with incompatible alternatives, when the first
4136         alternative is overloaded.
4138 2014-08-01  Ed Schonberg  <schonberg@adacore.com>
4140         * sem_res.adb (Check_Parameterless_Call): Use Relocate_Node
4141         to create the name of the parameterless call, rather than
4142         New_Copy, to preserve the tree structure when the name is a
4143         complex expression, e.g. a selected component that denotes a
4144         protected operation, whose prefix is itself a selected component.
4146 2014-08-01  Ed Schonberg  <schonberg@adacore.com>
4148         * sem_ch6.adb (Analyze_Subprogram_Body_Helper): Use
4149         Unit_Declaration_Node to retrieve body when inlining, to handle
4150         properly subprogram child units.
4152 2014-08-01  Robert Dewar  <dewar@adacore.com>
4154         * sem_attr.adb: Minor reformatting.
4156 2014-08-01  Vincent Celier  <celier@adacore.com>
4158         * debug.adb: Minor documentation addition for -dn switch.
4160 2014-08-01  Robert Dewar  <dewar@adacore.com>
4162         * sem_aggr.adb, exp_ch9.adb, sem_prag.adb, sem_util.adb,
4163         sem_attr.adb, sem_eval.ads, sem_cat.adb, sem_ch13.adb: Improve
4164         documentation of Is_Static_Expression vs Is_OK_Static_Expression.
4165         In several places, use the Is_OK version as suggested by the spec.
4167 2014-08-01  Vincent Celier  <celier@adacore.com>
4169         * gnatcmd.adb: Revert last change which was not correct.
4171 2014-08-01  Hristian Kirtchev  <kirtchev@adacore.com>
4173         * freeze.adb (Find_Constant): Ensure that the constant being
4174         inspected is still an object declaration (i.e. not a renaming).
4176 2014-08-01  Ed Schonberg  <schonberg@adacore.com>
4178         * sem_ch5.adb (Analyze_Loop_Parameter_Specification): a)
4179         An attribute_reference to Loop_Entry denotes an iterator
4180         specification: its prefix is an object, as is the case for 'Old.
4181         b) If the domain of iteration is an expression whose type has
4182         the Iterable aspect defined, this is an iterator specification.
4184 2014-08-01  Robert Dewar  <dewar@adacore.com>
4186         * gnatcmd.adb: Minor reformatting.
4188 2014-08-01  Robert Dewar  <dewar@adacore.com>
4190         * atree.ads (Info_Messages): New counter.
4191         * err_vars.ads: Minor comment update.
4192         * errout.adb (Delete_Warning_And_Continuations): Deal
4193         with new Info_Messages counter.
4194         (Error_Msg_Internal): ditto.
4195         (Delete_Warning): ditto.
4196         (Initialize): ditto.
4197         (Write_Error_Summary): ditto.
4198         (Output_Messages): ditto.
4199         (To_Be_Removed): ditto.
4200         * erroutc.adb (Delete_Msg): Deal with Info_Messages counter.
4201         (Compilation_Errors): ditto.
4202         * errutil.adb (Error_Msg): Deal with Info_Messages counter.
4203         (Finalize): ditto.
4204         (Initialize): ditto.
4205         * sem_prag.adb (Analyze_Pragma): Minor comment addition.
4206         * gnat_ugn.texi: Document that -gnatwe does not affect info
4207         messages.
4209 2014-08-01  Robert Dewar  <dewar@adacore.com>
4211         * debug.adb: Document debug switch -gnatd.Z.
4212         * sem.adb (Semantics): Force expansion on in no or configurable
4213         run time mode.
4215 2014-08-01  Ed Schonberg  <schonberg@adacore.com>
4217         * sem_ch5.adb (Analyze_Loop_Parameter_Specification): An
4218         unchecked conversion denotes an iterator specification. Such a
4219         conversion will be inserted in the context of an inlined call
4220         when needed, and its argument is always an object.
4222 2014-08-01  Robert Dewar  <dewar@adacore.com>
4224         * make.adb, makeutl.ads: Minor reformatting.
4225         * debug.adb, opt.ads: Clarify documentation of Front_End_Inlining and
4226         Back_End_Inlining.
4228 2014-08-01  Tristan Gingold  <gingold@adacore.com>
4230         * gnatcmd.adb (GNATCmd): Set AAMP_On_Target using command name.
4232 2014-08-01  Javier Miranda  <miranda@adacore.com>
4234         * gnat1drv.adb (Adjust_Global_Switches): Reverse meaning of
4235         -gnatd.z.
4236         * debug.adb: Updating documentation.
4237         * exp_ch6.adb (Expand_Call): Remove assertion.
4239 2014-08-01  Robert Dewar  <dewar@adacore.com>
4241         * sem_aggr.adb, sem_ch3.adb, sem_ch5.adb, sem_util.adb,
4242         sem_res.adb: Minor reformatting.
4244 2014-08-01  Vincent Celier  <celier@adacore.com>
4246         * make.adb (Initialize): Set Keep_Temporary_Files to True when
4247         -dn is specified.
4248         * makeusg.adb: Add line for new switch --keep-temp-files.
4249         * makeutl.ads (Keep_Temp_Files_Option): New constant String.
4250         * opt.ads (Keep_Temporary_Files): Document that it is also used
4251         by gnatmake and gprbuild.
4252         * switch-m.adb: Recognize new switch --keep-temp-files.
4254 2014-08-01  Tristan Gingold  <gingold@adacore.com>
4256         * sem_ch9.adb (Analyze_Task_Type_Declaration): Move code from ...
4257         * exp_ch9.adb (Make_Task_Create_Call): ... here.
4259 2014-08-01  Vincent Celier  <celier@adacore.com>
4261         * gnat1drv.adb: Do not try to get the target parameters when
4262         invoked with -gnats.
4264 2014-08-01  Hristian Kirtchev  <kirtchev@adacore.com>
4266         * exp_ch7.adb (Find_Last_Init): Nothing to do for an object
4267         declaration subject to No_Initialization.
4269 2014-08-01  Ed Schonberg  <schonberg@adacore.com>
4271         * sem_aggr.adb (Resolve_Array_Aggregate): Reject choice that
4272         is a subtype with dynamic predicates, or a non-static subtype
4273         with predicates.
4274         * sem_ch3.adb (Analyze_Number_Declaration): Reject qualified
4275         expression if subtype has a dynamic predicate.
4276         (Constrain_Index): Reject subtype indication if subtype mark
4277         has predicates.
4278         (Inerit_Predicate_Flags): Inherit Has_Predicates as well.
4279         (Make_Index): If index is a subtype indication, itype inhereits
4280         predicate flags for subsequent testing.
4281         * sem_ch5.adb (Analyze_Loop_Parameter_Specification): New
4282         procedure Check_Predicate_Use, to reject illegal uses of domains
4283         of iteration that have dynamic predicates.
4284         * sem_res.adb (Resolve_Slice): Reject slices given by a subtype
4285         indication to which a predicate applies.
4286         * sem_util.adb (Bad_Predicated_Subtype_Use): Add guard to
4287         prevent cascaded errors when subtype is invalid.
4289 2014-08-01  Robert Dewar  <dewar@adacore.com>
4291         * sem_ch10.adb: Minor reformatting.
4293 2014-08-01  Ed Schonberg  <schonberg@adacore.com>
4295         * sem_ch6.adb (Same_Generic_Actual): Make function symmetric,
4296         because either type may be a subtype of the other.
4298 2014-08-01  Vincent Celier  <celier@adacore.com>
4300         * makeusg.adb: Add documentation for debug switch -dn.
4302 2014-08-01  Ed Schonberg  <schonberg@adacore.com>
4304         * sem_dim.adb (Process_Minus, Process_Divide): Label dimension
4305         expression with standard operator and type, for pretty-printing
4306         use, when in ASIS_Mode. When generating code dimensional analysis
4307         is not involved and dimension expressions are handled statically,
4308         and other operators are resolved in the usual way.
4310 2014-08-01  Ed Schonberg  <schonberg@adacore.com>
4312         * sem_ch3.adb (Build_Derived_Record_Type): Remove setting of
4313         Parent_Subtype in ASIS mode, leads to several failures.
4314         * sem_ch4.adb (Analyze_Selected_Component): In an instance,
4315         if the prefix is a type extension, check whether component is
4316         declared in the parent type, possibly in a parent unit. Needed
4317         in ASIS mode when Parent_Subtype is not set.
4319 2014-08-01  Robert Dewar  <dewar@adacore.com>
4321         * sem_prag.adb: Minor reformatting.
4322         * s-regpat.adb: Minor reformatting.
4323         * sem_ch3.adb (Analyze_Object_Declaration): Do not set
4324         Treat_As_Volatile on constants.
4326 2014-08-01  Tristan Gingold  <gingold@adacore.com>
4328         * exp_ch9.adb (Make_Task_Create_Call): Improve error message.
4330 2014-08-01  Ed Schonberg  <schonberg@adacore.com>
4332         * sem_ch10.adb (Analyze_Compilation_Unit): Do not place a
4333         warning on a with_clause created for the renaming of a parent
4334         unit in an explicit with_clause.
4336 2014-08-01  Ed Schonberg  <schonberg@adacore.com>
4338         * sem_ch13.adb (Analyze_Aspect_Specifications, case Aspect_Import):
4339         Set Is_Imported flag at once, to simplify subsequent legality
4340         checks. Reject the aspect on an object whose declaration has an
4341         explicit initial value.
4342         * sem_prag.adb (Process_Import_Or_Interface): Use original node
4343         to check legality of an initial value for an imported entity.
4344         Set Is_Imported flag in case of error to prevent cascaded errors.
4345         Do not set the Is_Imported flag if the pragma comes from an
4346         aspect, because it is already done when analyzing the aspect.
4348 2014-08-01  Emmanuel Briot  <briot@adacore.com>
4350         * g-regpat.adb (Parse): Add support for non-capturing parenthesis.
4352 2014-08-01  Robert Dewar  <dewar@adacore.com>
4354         * sem_ch7.adb, einfo.adb, einfo.ads, sem_ch13.adb: Minor change of
4355         identifier name.
4357 2014-08-01  Hristian Kirtchev  <kirtchev@adacore.com>
4359         * sem_ch3.adb (Analyze_Object_Contract): Enable the volatility
4360         checks when the related variable comes from source.
4361         * sem_res.adb (Resolve_Actuals): Enable the volatility checks
4362         when the related actual parameter comes from source. Update comment.
4363         * freeze.adb (Freeze_Record_Type): Do not freeze the designated
4364         type of an array of pointers when the designated type is
4365         class-wide and its root type is the record being currently frozen.
4367 2014-08-01  Ed Schonberg  <schonberg@adacore.com>
4369         * sem_ch5.adb (Analyze_Iterator_Specification): Preserve Ekind
4370         of renaming declaration created for domain of iteration.
4371         * sem_aggr.adb (Resolve_Array_Aggregate): Better placement
4372         for error messages on aggregates whose index subtypes have
4373         predicates. The new placement avoids posting messages on previous
4374         subtype declarations rather than on the aggregate itself.
4375         * sem_disp.adb (Is_Inherited_Public_Operation): New predicate for
4376         Add_Dispatching_Operation, to handle properly the overriding of
4377         the predefined operations on controlled types, when the partial
4378         view of a type is not visibly controlled.
4380 2014-08-01  Ben Brosgol  <brosgol@adacore.com>
4382         * gnat_ugn.texi: Add tutorial on portable fixed-point types as an
4383         appendix.
4385 2014-08-01  Hristian Kirtchev  <kirtchev@adacore.com>
4387         * einfo.adb (Is_Hidden_Non_Overridden_Subprogram): Remove the
4388         assertion check as the attribute is defined for all entities.
4389         (Set_Is_Hidden_Non_Overridden_Subprogram): Remove the assertion
4390         check as the attribute is defined for all entities.
4391         * einfo.ads Update the documentation of attribute
4392         Is_Hidden_Non_Overridden_Subprogram.
4393         * sem_ch7.adb (Install_Package_Entity): No need to check the
4394         entity kind of the Id.
4395         * sem_ch13.adb (Hide_Matching_Homograph): Update the comment on
4396         usage. Ensure that the homographs are of the same entity kind
4397         and not fully conformant.
4398         (Hide_Non_Overridden_Subprograms): Update the comment on usage.
4400 2014-08-01  Robert Dewar  <dewar@adacore.com>
4402         * inline.adb: Minor code reorganization.
4403         * sem_ch12.adb, s-tasdeb.ads: Minor reformatting.
4405 2014-08-01  Robert Dewar  <dewar@adacore.com>
4407         * inline.adb, s-os_lib.ads: Minor reformatting.
4409 2014-08-01  Arnaud Charlet  <charlet@adacore.com>
4411         * s-tasdeb.ads, s-tasdeb.adb (Master_Hook, Master_Completed_Hook): New.
4412         * s-tassta.adb (Task_Wrapper, Vulnerable_Complete_Master): Call new
4413         hooks.
4415 2014-08-01  Yannick Moy  <moy@adacore.com>
4417         * inline.adb (Cannot_Inline): Issue info message instead of
4418         warning for subprograms not inlined in GNATprove mode.
4419         * sem_res.adb (Resolve_Call): Take body into account for deciding
4420         whether subprogram can be inlined in GNATprove mode or not.
4422 2014-08-01  Claire Dross  <dross@adacore.com>
4424         * exp_util.ads (Get_First_Parent_With_Ext_Axioms_For_Entity): Renaming
4425         of Get_First_Parent_With_External_Axiomatization_For_Entity for
4426         shorter.
4427         * sem_ch12.adb (Analyze_Associations): Only call Build_Wrapper
4428         for parameters of packages with external axiomatization.
4430 2014-08-01  Robert Dewar  <dewar@adacore.com>
4432         * sem_res.adb: Minor comment addition.
4434 2014-08-01  Arnaud Charlet  <charlet@adacore.com>
4436         * s-crtl.ads, i-cstrea.ads, adaint.c, adaint.h, osint.adb,
4437         s-fileio.adb (__gnat_fopen, __gnat_freopen): Remove vms_form parameter,
4438         no longer used.
4439         * s-os_lib.ads: Minor reformatting.
4441 2014-08-01  Arnaud Charlet  <charlet@adacore.com>
4443         * exp_attr.adb (Is_Inline_Floating_Point_Attribute): Restore more
4444         completely previous code since only GCC back-ends are prepared
4445         to handle e.g. 'Machine attribute.
4446         * targparm.adb, targparm.ads: Remove remaining refs and
4447         handling of OpenVMS_On_Target, VAX_Float_On_Target and
4448         RTX_RTSS_Kernel_Module_On_Target.
4449         * hostparm.ads (OpenVMS, Max_Debug_Name_Length): Removed,
4450         no longer used.
4452 2014-08-01  Robert Dewar  <dewar@adacore.com>
4454         * exp_dist.adb, exp_attr.adb: Minor reformatting.
4455         * sem_ch3.adb, mlib-tgt-specific-hpux.adb, a-direct.ads,
4456         a-synbar-posix.adb, exp_ch9.adb, sem_ch10.adb, sem_prag.adb,
4457         sem_ch12.adb, sem.ads, sem_res.adb, s-exctra.adb, s-soflin.ads,
4458         g-alveop.ads, sem_ch8.adb, vxaddr2line.adb, sem_cat.ads: Remove
4459         improper use of shall.
4461 2014-08-01  Robert Dewar  <dewar@adacore.com>
4463         * sem_aggr.adb, exp_atag.adb, layout.adb, nlists.adb, nlists.ads,
4464         exp_attr.adb, exp_ch9.adb, par-ch12.adb, exp_aggr.adb,
4465         exp_ch3.adb: Minor reformatting & code reorganization.
4467 2014-08-01  Robert Dewar  <dewar@adacore.com>
4469         * gnat_rm.texi: Remove VMS specific rules for pragma Ident.
4470         * Makefile.rtl, adaint.c, gnat_rm.texi, s-asthan.adb, s-asthan.ads,
4471         s-filofl.ads, s-fishfl.ads, s-fvadfl.ads, s-fvaffl.ads, s-fvagfl.ads,
4472         s-po32gl.adb, s-po32gl.ads, s-vaflop.adb, s-vaflop.ads, s-vmexta.adb,
4473         s-vmexta.ads, sem_vfpt.adb, sem_vfpt.ads, socket.c: Remove VMS specific
4474         code.
4475         * gcc-interface/decl.c, gcc-interface/Makefile.in,
4476         gcc-interface/Make-lang.in: Ditto. Also remove refs to rTX.
4478 2014-08-01  Pascal Obry  <obry@adacore.com>
4480         * s-os_lib.ads: Rename File_Size to Large_File_Size.
4482 2014-08-01  Robert Dewar  <dewar@adacore.com>
4484         * a-numaux-vxworks.ads, a-numaux-x86.adb, a-numaux-x86.ads,
4485         a-numaux-darwin.adb, a-numaux-darwin.ads, a-numaux.ads,
4486         a-numaux-libc-x86.ads: Fix bad package header comments.
4487         * elists.ads, elists.adb (Append_New_Elmt): New procedure.
4488         * gnat_rm.texi, a-calend.adb, gnatcmd.adb, einfo.adb, einfo.ads,
4489         checks.adb, sem_prag.adb, sem_prag.ads, rtsfind.ads, freeze.adb,
4490         sem_util.adb, sem_attr.adb, exp_dbug.adb, exp_dbug.ads, gnat1drv.adb,
4491         targparm.adb, targparm.ads, exp_ch6.adb, switch-b.adb, s-shasto.ads,
4492         stand.ads, s-auxdec.ads, opt.adb, opt.ads, mlib-tgt.ads, s-fatgen.adb,
4493         s-fatgen.ads, system.ads, snames.ads-tmpl, s-stalib.ads,
4494         s-os_lib.adb: Remove VMS-specific code.
4496 2014-08-01  Arnaud Charlet  <charlet@adacore.com>
4498         * exp_attr.adb (Is_Inline_Floating_Point_Attribute): Revert to
4499         previous state in CodePeer_Mode.
4501 2014-08-01  Robert Dewar  <dewar@adacore.com>
4503         * hostparm.ads: Put back definition of OpenVMS as False to aid
4504         the transition process.
4505         * sem_ch7.adb: Minor reformatting.
4506         * prj-env.adb: Minor code fix.
4507         * gnat_rm.texi: Complete previous change.
4508         * sem_ch3.adb: Minor reformatting.
4509         * sem_ch6.adb: Minor reformatting.
4510         * sem_elab.adb: Minor reformatting.
4511         * exp_strm.adb: Complete previous change.
4513 2014-08-01  Vincent Celier  <celier@adacore.com>
4515         * sem_warn.adb (Warn_On_Unreferenced_Entity): Do not issue a
4516         warning when a constant is unreferenced and its type has pragma
4517         Unreferenced_Objects.
4519 2014-08-01  Hristian Kirtchev  <kirtchev@adacore.com>
4521         * einfo.adb: Flag2 is now known as
4522         Is_Hidden_Non_Overridden_Subprogram.
4523         (Is_Hidden_Non_Overridden_Subprogram): New routine.
4524         (Set_Is_Hidden_Non_Overridden_Subprogram): New routine.
4525         (Write_Entity_Fields): Output Flag2.
4526         * einfo.ads: New attribute Is_Hidden_Non_Overridden_Subprogram
4527         along with occurrences in entities.
4528         (Is_Hidden_Non_Overridden_Subprogram): New routine and pragma Inline.
4529         (Set_Is_Hidden_Non_Overridden_Subprogram): New routine
4530         and pragma Inline.
4531         * sem_ch7.adb (Install_Package_Entity): Do not enter implicitly
4532         declared non-overriden homographs into visibility.
4533         * sem_ch13.adb (Freeze_Entity_Checks): Hide all
4534         implicitly declared non-overriden homographs.
4535         (Hide_Non_Overridden_Subprograms): New routine.
4537 2014-08-01  Robert Dewar  <dewar@adacore.com>
4539         * snames.ads-tmpl, s-os_lib.adb, s-os_lib.ads, s-fileio.adb: Remove
4540         VMS-specific code.
4541         * prj-conf.adb: Minor reformatting.
4542         * xr_tabls.adb (Read_File): Restore code which was enabled on
4543         non VMS platforms before.
4544         * prj-env.adb (Initialize_Default_Project_Path): Ditto.
4545         * sem_ch5.adb: Minor reformatting.
4546         * lib-writ.adb, lib-writ.ads, bindgen.adb, sem_vfpt.adb,
4547         sem_vfpt.ads, ali.adb, ali.ads, opt.ads, bcheck.adb, exp_strm.adb:
4548         Remove VMS-specific code.
4550 2014-08-01  Vincent Celier  <celier@adacore.com>
4552         * make.adb (Await_Compile): Remove loop that was only needed
4553         for VMS.
4555 2014-08-01  Robert Dewar  <dewar@adacore.com>
4557         * a-calcon.ads, a-direct.adb, a-dirval-mingw.adb, a-dirval.adb,
4558         a-dirval.ads, a-except-2005.adb, a-excpol-abort.adb,
4559         a-numaux-darwin.ads, a-numaux.ads, bindgen.adb, bindusg.adb,
4560         einfo.adb, einfo.ads, err_vars.ads, errout.ads, errutil.adb,
4561         exp_ch3.adb, exp_ch4.adb, exp_ch7.adb, exp_ch7.ads, fname-uf.adb,
4562         fname.adb, fname.ads, freeze.adb, g-debpoo.adb, g-dirope.ads,
4563         g-excact.ads, g-expect.ads, g-socket.adb, g-socket.ads, g-sothco.ads,
4564         g-traceb.ads, gnat_rm.texi, gnatlink.adb, gnatls.adb, i-cstrea.adb,
4565         krunch.adb, krunch.ads, layout.adb, lib-util.adb, make.adb,
4566         mlib.adb, osint-b.adb, osint-b.ads, osint-c.adb, osint.adb,
4567         osint.ads, output.ads, par.adb, prj-conf.adb, prj-env.adb,
4568         prj-makr.adb, prj-nmsc.adb, prj.adb, prj.ads, repinfo.adb, rtsfind.adb,
4569         rtsfind.ads, s-excmac-gcc.ads, s-fatgen.adb, s-mastop.ads,
4570         s-parame-ae653.ads, s-parame-hpux.ads, s-parame-vxworks.ads,
4571         s-parame.ads, s-soflin.ads, s-stoele.adb, s-tasini.adb,
4572         s-taspri-dummy.ads, s-taspri-hpux-dce.ads, s-taspri-mingw.ads,
4573         s-taspri-posix-noaltstack.ads, s-taspri-posix.ads,
4574         s-taspri-solaris.ads, s-taspri-vxworks.ads, s-trasym.ads,
4575         sem_ch12.adb, sem_ch4.adb, sem_eval.adb, sem_intr.adb, sem_mech.adb,
4576         sem_mech.ads, sem_prag.adb, sem_res.adb, sem_util.adb, sem_util.ads,
4577         sinfo.adb, sinfo.ads, sinput-c.adb, symbols.ads, targparm.adb,
4578         treepr.adb, types.ads, xr_tabls.adb, xr_tabls.ads: Remove VMS
4579         specific code and comments.
4581 2014-08-01  Ed Schonberg  <schonberg@adacore.com>
4583         * sem_ch5.adb (Analyze_Iterator_Specification): New procedure
4584         Check_Reverse_Iteration, to verify the legality of the Reverse
4585         indicator on various container types, and to detect illegal
4586         reverse iterations on containers that only supoort forward
4587         iteration.
4589 2014-08-01  Vincent Celier  <celier@adacore.com>
4591         * gnatcmd.adb: Remove the VMS specific stuff.  Integrate in
4592         procedure GNATCmd the relevant declarations from packages VMS_Cmds
4593         and VMS_Conv.
4594         * gnatcmd.ads: Update comments to remove any trace of VMS
4596 2014-08-01  Ed Schonberg  <schonberg@adacore.com>
4598         * sem_ch12.adb: sem_ch12.adb (Build_Wrapper): Capture entity for
4599         defaulted actual that is an operator, before building wrapper
4600         for it in GNATprove mode. Restrict construction of wrapper to
4601         actuals that are operators.
4603 2014-08-01  Vincent Celier  <celier@adacore.com>
4605         * vms_conv.adb, vms_conv.ads, vms_data.ads, vms_cmds.ads: Remove VMS
4606         specific packages no longer needed.
4608 2014-08-01  Pascal Obry  <obry@adacore.com>
4610         * s-os_lib.ads (System.CRTL): Move with clause to body.
4611         (File_Size): New type.
4612         (File_Length64): Use it.
4613         (File_Length): Restore previous spec returning a Long_Integer.
4614         * s-os_lib.adb (System.CRTL): Move with clause here.
4616 2014-08-01  Vincent Celier  <celier@adacore.com>
4618         * mlib-prj.adb: Update comments to remove any mention of VMS.
4620 2014-08-01  Arnaud Charlet  <charlet@adacore.com>
4622         * ug_words, xgnatugn.adb, gcc-interface/Make-lang.in: Remove
4623         xgnatugn.adb and ug_words.
4625 2014-08-01  Eric Botcazou  <ebotcazou@adacore.com>
4627         * exp_attr.adb (Expand_N_Attribute_Reference): Check whether
4628         expansion can be avoid for Machine, Model and Rounding.
4629         (Is_Inline_Floating_Point_Attribute): Return true for Machine
4630         & Model, as well as Rounding if wrapped in a conversion to an
4631         integer type.
4632         * sem_res.adb (Simplify_Type_Conversion): Deal with Rounding as well.
4633         * gcc-interface/gigi.h (fp_arith_may_widen): Declare.
4634         * gcc-interface/utils.c (fp_arith_may_widen): New global variable.
4635         * gcc-interface/misc.c (enumerate_modes): Compute it.
4636         * gcc-interface/trans.c (FP_ARITH_MAY_WIDEN): Delete.
4637         (lvalue_required_for_attribute_p): Deal with Descriptor_Size,
4638         Machine and Model.
4639         (Attribute_to_gnu) <Attr_Model>: New case.
4640         <Attr_Machine>): Likewise.
4641         (convert_with_check): Test
4642         fp_arith_may_widen variable.
4644 2014-08-01  Pascal Obry  <obry@adacore.com>
4646         * adaint.h (GNAT_FOPEN): New definition for Windows.
4647         (GNAT_OPEN): Likewise.
4648         (GNAT_STAT): Likewise.
4649         (GNAT_FSTAT): Likewise.
4650         (GNAT_LSTAT): Likewise.
4651         (GNAT_STRUCT_STAT): Likewise.
4652         * adaint.c (__gnat_stat): Fix computation of file size for
4653         Windows.
4655 2014-08-01  Vincent Celier  <celier@adacore.com>
4657         * Makefile.rtl: Minor comment update.
4659 2014-08-01  Vincent Celier  <celier@adacore.com>
4661         * Make-generated.in: Remove dependencies for vms-help.
4663 2014-08-01  Gary Dismukes  <dismukes@adacore.com>
4665         * makeutl.ads, opt.ads: Minor grammar fixes.
4666         * makeutl.adb: Minor code reorganization.
4668 2014-08-01  Arnaud Charlet  <charlet@adacore.com>
4670         * gcc-interface/Makefile.in, gcc-interface/Make-lang.in,
4671         gnatsym.adb: Remove gnatsym (VMS only tool).
4673 2014-08-01  Ben Brosgol  <brosgol@adacore.com>
4675         * gnat_ugn.texi, projects.texi, xgnatugn.adb: Removed all VMS
4676         conditionalization from gnat_ugn.texi and projects.texi, and updated
4677         (considerably simplified) xgnatugn.adb, to be removed soon.
4679 2014-08-01  Vincent Celier  <celier@adacore.com>
4681         * debug.adb: Remove doc for gnatmake/gprbuild switch -ds.
4682         * make.adb (List_Bad_Compilations): Use Opt.No_Exit_Message
4683         instead of Debug.Debug_Flag_S.
4684         * makeutl.adb (Finish_Program, Fail_Program): Use Opt flag
4685         No_Exit_Message instead of Debug.Debug_Flag_S to suppress exit
4686         error messages.
4687         * makeutl.ads (No_Exit_Message_Option): New constant string
4688         for switch --no-exit-message.
4689         * opt.ads (No_Exit_Message): New Boolean flag, defaulted to False.
4690         * switch-m.adb (Scan_Make_Switches): Recognize new switch
4691         --no-exit-message.
4693 2014-08-01  Arnaud Charlet  <charlet@adacore.com>
4695         * exp_vfpt.adb, exp_vfpt.ads: Removed, no longer used.
4696         * gcc-interface/Make-lang.in: Remove exp_vfpt.o
4698 2014-08-01  Javier Miranda  <miranda@adacore.com>
4700         * inline.ads (Inlined_Calls, Backend_Calls,
4701         Backend_Inlined_Subps, Backend_Not_Inlined_Subps): Declarations
4702         moved to inline.adb (Cannot_Inline): Update documentation.
4703         (Check_And_Build_Body_To_Inline): Renamed.
4704         (List_Inlining_Info): Subprogram moved here from package exp_ch6.
4705         * inline.adb (Check_Inlining_Restrictions): New local variable.
4706         (Inlined_Calls, Backend_Calls, Backend_Inlined_Subps,
4707         Backend_Not_Inlined_Subps): Declarations moved here
4708         from inline.ads (Number_Of_Statements): Removed.
4709         (Remove_Pragmas): Avoid duplicated version of this subprogram.
4710         (Build_Body_To_Inline): Code cleanup.
4711         (Build_Body_To_Inline.Has_Excluded_Statament): Removed.
4712         (Check_And_Build_Body_To_Inline): Renamed. Code cleanup.
4713         (Check_Body_To_Inline): Removed.
4714         (Generate_Body_To_Inline): Renamed as Generate_Subprogram_Body.
4715         (Has_Excluded_Declaration): No action if not
4716         Check_Inlining_Restrictions.
4717         (Has_Excluded_Statement): No action if not Check_Inlining_Restrictions.
4718         (Initialize): Initialize the lists of inlined calls and subprograms.
4719         (List_Inlining_Info): Subprogram moved here from package exp_ch6.
4720         * sem_ch6.adb (Analyze_Subprogram_Body_Helper): Update call
4721         to Check_And_Build_Body_To_Inline since it has been renamed as
4722         Check_And_Split_Unconstrained_Function
4723         * exp_ch6.ad[sb] (List_Inlining_Info): Subprogram moved to
4724         package inline.
4725         * gnat1drv.adb Update call to Inline.List_Inlining_Info.
4727 2014-08-01  Vincent Celier  <celier@adacore.com>
4729         * debug.adb: Add documentation for new debug switch -ds.
4730         * make.adb (List_Bad_Compilations): Do not issue any message
4731         when switch -ds is specified.
4732         * makeutl.adb (Fail_Program): Do not issue any message when
4733         -ds is specified.
4734         (Finish_Program): Ditto.
4736 2014-08-01  Robert Dewar  <dewar@adacore.com>
4738         * s-exnint.adb, s-exnint.ads, s-wwdwch.ads, s-carsi8.ads,
4739         s-casi32.ads, indepsw.adb, a-timoau.ads, s-explli.adb, s-explli.ads,
4740         s-casi16.ads, s-powtab.ads, g-wistsp.ads, a-ztmoau.adb,
4741         indepsw-gnu.adb, s-imgllb.ads, types.adb, gnat.ads, s-proinf.adb,
4742         indepsw-aix.adb, s-caun64.ads, s-imgllw.ads, s-traces-default.adb,
4743         s-vxwork-x86.ads, s-expllu.adb, s-exnlli.adb, s-exnlli.ads,
4744         s-traces.adb, widechar.ads, stand.adb, s-expint.adb,
4745         s-tratas-default.adb, s-expint.ads, s-geveop.ads, s-caun32.ads,
4746         s-expuns.adb, s-mantis.adb, s-mantis.ads, s-caun16.ads, s-tasinf.adb,
4747         s-memcop.ads, s-dsaser.ads, s-imgbiu.ads, a-szmzco.ads, g-strspl.ads,
4748         s-casi64.ads, g-zstspl.ads, indepsw-mingw.adb, tree_io.adb,
4749         s-boarop.ads, uname.ads, s-fore.adb, s-fore.ads, g-timsta.adb,
4750         g-timsta.ads, s-assert.adb, s-vector.ads, s-tratas.adb,
4751         s-tratas.ads: Minor fix to copyright notices.
4753 2014-08-01  Eric Botcazou  <ebotcazou@adacore.com>
4755         * sinfo.ads: Remove long obsolete comment.
4756 2014-08-01  Ed Schonberg  <schonberg@adacore.com>
4758         * sem_util.adb: Add guard to setting of No_Predicate_On_Actual.
4759         * sem_ch3.adb: Minor reformatting.
4761 2014-08-01  Pascal Obry  <obry@adacore.com>
4763         * cstreams.c: Only enable large file support on know supported
4764         platforms. Add missing defines/includes.
4766 2014-08-01  Ed Schonberg  <schonberg@adacore.com>
4768         * einfo.ads, einfo.adb New flags No_Predicate_On_Actual and
4769         No_Dynamic_Predicate_On_Actual, to enforce the generic contract
4770         on generic units that contain constructs that forbid subtypes
4771         with predicates.
4772         * sem_ch3.adb (Analyze_Subtype_Declaration, Process_Subtype):
4773         Inherit flags indicating the presence of predicates in subtype
4774         declarations with and without constraints.
4775         (Inherit_Predicate_Flags): Utility for the above.
4776         * sem_util.adb (Bad_Predicated_Subtype_Use): In a generic context,
4777         indicate that the actual cannot have predicates, and preserve
4778         warning. In an instance, report error if actual has predicates
4779         and the construct appears in a package declaration.
4780         * sem_ch12.adb (Diagnose_Predicated_Actual): Report error
4781         for an actual with predicates, if the corresponding formal
4782         carries No_Predicate_On_Actual or (in the case of a loop)
4783         No_Dynamic_Predicate_On_Actual.
4784         * sem_ch13.adb (Build_Predicate_Functions); Do not build a
4785         Static_Predicate function if the type is non-static (in the
4786         presence of previous errors),
4787         * sem_ch5.adb (Analyze_Loop_Parameter_Specification): Set flag
4788         No_Dynamic_Predicate_On_Actual in a generic context, to enforce
4789         generic contract on actuals that cannot have predicates.
4791 2014-08-01  Pascal Obry  <obry@adacore.com>
4793         * a-direct.adb (C_Size): Returns an int64.
4794         * osint.adb (System.CRTL): New with clause.
4795         (File_Length.Internal): Returns an int64.
4796         * s-os_lib.ads (File_Length): Returns an int64.
4798 2014-08-01  Robert Dewar  <dewar@adacore.com>
4800         * gnatchop.adb, gnatcmd.adb, make.adb, mlib-prj.adb, bindgen.adb,
4801         mlib.ads, butil.adb, clean.adb, binde.adb, gnatls.adb, gnatname.adb,
4802         osint.adb, krunch.adb: Minor reformatting.
4804 2014-08-01  Robert Dewar  <dewar@adacore.com>
4806         * inline.adb, inline.ads, fe.h, einfo.adb, einfo.ads, sem_util.adb,
4807         sem_util.ads, exp_ch4.adb, exp_ch11.adb, exp_ch6.adb, cstand.adb,
4808         sem_mech.adb, sem_ch6.adb, sem_ch8.adb, sem_ch11.adb, snames.ads-tmpl:
4809         Remove VMS-specific code.
4810         * gcc-interface/decl.c, gcc-interface/trans.c: Ditto.
4812 2014-08-01  Arnaud Charlet  <charlet@adacore.com>
4814         * binde.adb, bindgen.adb, butil.adb, clean.adb, gnatbind.adb,
4815         gnatchop.adb, gnatcmd.adb, gnatls.adb, gnatname.adb, krunch.adb,
4816         make.adb, makeutl.adb, memtrack.adb, mlib-prj.adb, mlib.adb,
4817         mlib.ads, tempdir.adb: Remove VMS handling.
4819 2014-08-01  Pascal Obry  <obry@adacore.com>
4821         * adaint.h, adaint.c (__gnat_file_length): Returns an __int64.
4822         (__gnat_named_file_length): Likewise.
4823         (__gnat_file_length_attr): Likewise.
4824         * a-direct.adb (C_Size): Use size_t as returned type.
4825         * osint.adb (File_Length): Adjust spec for Internal routine
4826         (returns size_t).
4827         * s-os_lib.adb (File_Length): Now returns a CRTL.size_t.
4828         (System.CRTL): With claused moved to spec.
4829         * s-os_lib.ads (System.CRTL): With clause moved to here.
4831 2014-08-01  Pascal Obry  <obry@adacore.com>
4833         * adaint.h, adaint.c (__gnat_open): Added.
4834         * s-crtl.ads (open): Import __gnat_open for large file support.
4836 2014-08-01  Robert Dewar  <dewar@adacore.com>
4838         * sem_case.adb (Dup_Choice): Improve message for integer constants.
4840 2014-08-01  Arnaud Charlet  <charlet@adacore.com>
4842         * gnatlink.adb: Remove special handling of VMS, RTX and JVM.
4844 2014-08-01  Pascal Obry  <obry@adacore.com>
4846         * adaint.h (GNAT_OPEN): Defines as open64 where supported.
4847         * adaint.c (GNAT_OPEN): Uses new macro where needed.
4849 2014-07-31  Eric Botcazou  <ebotcazou@adacore.com>
4851         * gcc-interface/utils.c (lookup_and_insert_pad_type): New function
4852         extracted from...
4853         (maybe_pad_type): ...here.  Call it to canonicalize the pad type.
4854         * gcc-interface/gigi.h: Update comment.
4856 2014-07-31  Javier Miranda  <miranda@adacore.com>
4858         * debug.adb Remove documentation of -gnatd.k (no longer needed).
4859         * sem_ch6.adb (Analyze_Subprogram_Body_Helper): Code cleanup.
4860         * inline.ads (Backend_Inlined_Subps): New
4861         Elist.  (Backend_Not_Inlined_Subps): New Elist.
4862         (Has_Excluded_Declaration): Declaration previously located in
4863         * inline.adb (Has_Excluded_Statement): Declaration previously
4864         located in inline.adb
4865         * inline.adb (Has_Single_Return): Moved out of
4866         Build_Body_To_Inline to avoid having duplicated code.
4867         (Number_Of_Statements): New subprogram.
4868         (Register_Backend_Inlined_Subprogram): New subprogram.
4869         (Register_Backend_Not_Inlined_Subprogram): New subprogram.
4870         (Add_Inlined_Subprogram): Register backend inlined subprograms and
4871         also register subprograms that cannot be inlined by the backend.
4872         (Has_Excluded_Declaration): Moved out of Build_Body_To_Inline
4873         to avoid having duplicated code.  Replace occurrences of
4874         Debug_Flag_Dot_K by Back_End_Inlining.
4875         * sem_res.adb (Resolve_Call): Code cleanup.
4876         * exp_ch6.adb (Expand_Call): Complete previous patch. Replace
4877         occurrence of Debug_Flag_Dot_K by Back_End_Inlining.
4878         (List_Inlining_Info): Add listing of subprograms passed to the
4879         backend and listing of subprograms that cannot be inlined by
4880         the backend.
4881         * sem_ch12.adb, sem_ch3.adb Replace occurrences of
4882         Debug_Flag_Dot_K by Back_End_Inlining.
4884 2014-07-31  Robert Dewar  <dewar@adacore.com>
4886         * nlists.ads: Minor code fix (remove unwise Inline for
4887         List_Length).
4889 2014-07-31  Arnaud Charlet  <charlet@adacore.com>
4891         * einfo.adb: Remove VMS specific code.
4892         * exp_attr.adb: Remove VAX specific code.
4893         * set_targ.adb: Remove handling of VAX_Float.
4894         * sem_vfpt.adb: Remove references to Vax_Native.
4895         * sem_attr.adb (Is_VAX_Float): Remove ref to VAX_Native.
4897 2014-07-31  Robert Dewar  <dewar@adacore.com>
4899         * sem_ch4.adb: Minor reformatting.
4901 2014-07-31  Arnaud Charlet  <charlet@adacore.com>
4903         * gcc-interface/trans.c, gcc-interface/misc.c: Remove references
4904         to VMS. Misc clean ups.
4905         * gcc-interface/Makefile.in (gnatlib-shared-vms): Remove.
4907 2014-07-31  Robert Dewar  <dewar@adacore.com>
4909         * cstand.adb, einfo.adb, einfo.ads, errout.adb, exp_attr.adb,
4910         exp_prag.adb, frontend.adb, interfac.ads,
4911         par-prag.adb, s-auxdec.ads, s-filofl.ads, s-fishfl.ads, s-fvadfl.ads,
4912         s-fvaffl.ads, s-fvagfl.ads, s-vaflop.ads, sem_attr.adb, sem_attr.ads,
4913         sem_ch13.adb, sem_ch3.adb, sem_ch8.adb, sem_prag.adb, snames.adb-tmpl,
4914         snames.ads-tmpl: Remove obsolete VMS-specific code.
4916 2014-07-31  Robert Dewar  <dewar@adacore.com>
4918         * sem_ch3.adb, sem_ch13.adb: Minor reformatting.
4920 2014-07-31  Arnaud Charlet  <charlet@adacore.com>
4922         * a-intnam-linux.ads: Minor: update obsolete comments.
4923         * s-taasde.adb: Minor: fix comment header.
4925 2014-07-31  Arnaud Charlet  <charlet@adacore.com>
4927         * s-auxdec-vms-ia64.adb, s-parame-vms-alpha.ads, s-asthan-vms-alpha.adb,
4928         s-tpopde-vms.adb, s-mastop-vms.adb, s-tpopde-vms.ads, s-taprop-vms.adb,
4929         mlib-tgt-vms_common.adb, mlib-tgt-vms_common.ads, s-inmaop-vms.adb,
4930         g-enblsp-vms-alpha.adb, s-ransee-vms.adb, s-osprim-vms.adb,
4931         s-osprim-vms.ads, g-socthi-vms.adb, g-socthi-vms.ads, system-vms_64.ads,
4932         s-osinte-vms.adb, s-osinte-vms.ads, g-eacodu-vms.adb,
4933         s-vaflop-vms-alpha.adb, s-parame-vms-ia64.ads, a-dirval-vms.adb,
4934         a-caldel-vms.adb, mlib-tgt-specific-vms-alpha.adb, s-tasdeb-vms.adb,
4935         symbols-vms.adb, a-intnam-vms.ads, g-expect-vms.adb,
4936         symbols-processing-vms-alpha.adb, mlib-tgt-specific-vms-ia64.adb,
4937         s-traent-vms.adb, s-traent-vms.ads, i-cstrea-vms.adb, a-numaux-vms.ads,
4938         symbols-processing-vms-ia64.adb, s-interr-vms.adb, s-memory-vms_64.adb,
4939         s-memory-vms_64.ads, g-enblsp-vms-ia64.adb, s-taspri-vms.ads,
4940         s-auxdec-vms_64.ads, s-intman-vms.adb, s-intman-vms.ads,
4941         s-tpopsp-vms.adb, s-asthan-vms-ia64.adb, a-calend-vms.adb,
4942         a-calend-vms.ads, system-vms-ia64.ads, s-auxdec-vms-alpha.adb: Removed.
4943         * namet.h (Is_Non_Ada_Error): Remove.
4945 2014-07-31  Robert Dewar  <dewar@adacore.com>
4947         * exp_util.adb, lib-writ.adb, sem_ch12.adb, s-direio.adb: Minor
4948         reformatting.
4950 2014-07-31  Hristian Kirtchev  <kirtchev@adacore.com>
4952         * exp_attr.adb (Expand_Loop_Entry_Attribute): Update the comment
4953         which demonstrates the expansion of while loops subject to
4954         attribute 'Loop_Entry. The condition of a while loop along with
4955         related condition actions is now wrapped in a function.  Instead
4956         of repeating the condition, the expansion now calls the function.
4958 2014-07-31  Ed Schonberg  <schonberg@adacore.com>
4960         * sem_case.adb (Check_Against_Predicate): Correct off-by-one
4961         error when reporting of missing values in a case statement for
4962         a type with a static predicate.
4963         (Check_Choices): Reject a choice given by a subtype to which a
4964         Dynamic_Predicate applies.
4965         * sem_ch3.adb (Analyze_Subtype_Declaration): Inherit
4966         Has_Dynamic_Predicate_Aspect flag from parent.
4968 2014-07-31  Ed Schonberg  <schonberg@adacore.com>
4970         * sem_ch13.adb (Analyze_Aspect_Specifications): A predicate
4971         cannot apply to a subtype of an incomplete type.
4972         (Is_Static_Choice): Treat an Others_Clause as static. The
4973         staticness of the expression and of the range are checked
4974         elsewhere.
4976 2014-07-31  Pascal Obry  <obry@adacore.com>
4978         * adaint.h (__gnat_ftell64): Added.
4979         (__gnat_fseek64): Added.
4980         (__int64): Added.
4981         * cstreams.c (__int64): Removed.
4983 2014-07-31  Pascal Obry  <obry@adacore.com>
4985         * a-stream.ads (Stream_Element_Offset): Now a signed 64bit type.
4986         * i-cstrea.ads, s-crtl.ads (fseek64): Offset is always a 64bit value.
4987         (ftell64): Always returns a 64bit value.
4988         * cstreams.c (int64): New definition.
4989         (_FILE_OFFSET_BITS): Set to 64 to enable 64bit offset support.
4990         (__gnat_ftell64): Always returns a 64bit value. The implemenation now
4991         uses ftello() on UNIX.
4992         (__gnat_fseek64): Offset is always a 64bit value. The
4993         implementation now uses fseeko() on UNIX.
4994         * a-ststio.adb, s-direio.adb (Set_Position): Simplify code,
4995         always use fseek64 to set the offset.
4996         (Size): Simplify code, always use fseek64/ftell64.
4997         * s-direio.ads (Count): Now an int64.
4998         * g-socket.ads (Vector_Element): Adjust definition for Length
4999         to be a size_t. This matches the C definition and avoid using
5000         a 64bit integer on 32bit platforms now that Count is always 64bit.
5001         * g-socthi-mingw.adb (Ada.Streams): Removed as not used anymore.
5002         (C_Recvmsg): Change some conversion to account for change in
5003         Vector_Element.
5004         (C_Sendmsg): Likewise.
5006 2014-07-31  Robert Dewar  <dewar@adacore.com>
5008         * cstand.adb (Create_Standard): Remove handling of -gnatdm flag.
5009         * debug.adb: Remove documentation of -gnatdm flag.
5010         * gnat1drv.adb (Adjust_Global_Switches): Remove handling of
5011         -gnatdm flag.
5013 2014-07-31  Arnaud Charlet  <charlet@adacore.com>
5015         * lib-writ.adb (Write_Unit_Information): Fix case where U =
5016         No_Unit.
5018 2014-07-31  Claire Dross  <dross@adacore.com>
5020         * exp_util.adb, exp_util.ads
5021         (Get_First_Parent_With_External_Axiomatization_For_Entity):
5022         New routine to find the first parent of an entity with
5023         a pragma Annotate (GNATprove, External_Axiomatization).
5024         (Has_Annotate_Pragma_For_External_Axiomatization): New function
5025         to check if a package has a pragma Annotate (GNATprove,
5026         External_Axiomatization).
5027         * einfo.ads, einfo.adb (Is_Generic_Actual_Subprogram): New
5028         flag on the entity for the declaration created for a formal
5029         subprogram in an instance. This is a renaming declaration,
5030         or in GNATprove_Mode the declaration of an expression function
5031         that captures the axiomatization of the actual.
5032         * sem_ch6.adb (Analyze_Expression_Function): For a
5033         Generic_Actual_Subprogram, place body immediately after the
5034         declaration because it may be used in a subsequent declaration
5035         in the instance.
5036         * sem_ch12.adb (Build_Wrapper): Add code to handle instances where
5037         the actual is a function, not an operator. Handle functions with
5038         one and two parameters and binary and unary operators.
5040 2014-07-31  Pascal Obry  <obry@adacore.com>
5042         * cstreams.c (__gnat_is_regular_file_fd): Removed.
5043         * adaint.c (__gnat_is_regular_file_fd): Added.
5045 2014-07-31  Robert Dewar  <dewar@adacore.com>
5047         * exp_strm.adb: Minor reformatting.
5049 2014-07-31  Ed Schonberg  <schonberg@adacore.com>
5051         * sem_ch12.adb (Build_Wrapper): New procedure, subsidiary to
5052         Analyze_Associations, to create a wrapper around operators that
5053         are actuals to formal subprograms. This is done in GNATProve
5054         mode in order to propagate the contracts of the operators to
5055         the body of the instance.
5057 2014-07-31  Ed Schonberg  <schonberg@adacore.com>
5059         * sem_attr.adb (Analyze_Attribute, case 'Old):  The reference is
5060         legal if within an aspect specification for a generic subprogram.
5062 2014-07-31  Javier Miranda  <miranda@adacore.com>
5064         * gnat1drv.adb (Back_End_Inlining): Set to false if
5065         Suppress_All_Inlining is set.
5066         * debug.adb: Adding documentation for -gnatd.z.
5067         * inline.adb (Add_Inlined_Body): Extend the -gnatn2
5068         processing to -gnatn1 for calls to Inline_Always routines.
5069         (Add_Inlined_Subprogram): Remove previous patch.
5071 2014-07-31  Ed Schonberg  <schonberg@adacore.com>
5073         * sem_ch13.adb (Check_One_Function): Apply properly the static
5074         semantic rules for indexing aspects and the functions they denote.
5076 2014-07-31  Javier Miranda  <miranda@adacore.com>
5078         * debug.adb: Complete documentation of -gnatd.z.
5080 2014-07-31  Bob Duff  <duff@adacore.com>
5082         * gnat_ugn.texi: Minor doc fixes.
5084 2014-07-31  Robert Dewar  <dewar@adacore.com>
5086         * sem_aggr.adb (Resolve_Array_Aggregate): Fix posting of missing
5087         index value.
5089 2014-07-31  Tristan Gingold  <gingold@adacore.com>
5091         * s-unstyp.ads (Packed_Byte): Make this type universal aliasing.
5092         (Packed_Bytes1): Make component aliased.
5094 2014-07-31  Robert Dewar  <dewar@adacore.com>
5096         * s-unstyp.ads, s-fileio.adb: Minor reformatting.
5098 2014-07-31  Robert Dewar  <dewar@adacore.com>
5100         * inline.adb, gnat1drv.adb, exp_ch6.adb, s-fileio.adb: Minor
5101         reformatting.
5103 2014-07-31  Eric Botcazou  <ebotcazou@adacore.com>
5105         * gcc-interface/utils2.c ((build_binary_op): Don't set TREE_THIS_NOTRAP
5106         on array references here, now done more selectively in trans.c.
5108 2014-07-31  Doug Rupp  <rupp@adacore.com>
5110         * gcc-interface/misc.c (gnat_init_gcc_fp(): Set flag_errno_math to 0.
5112 2014-07-31  Hristian Kirtchev  <kirtchev@adacore.com>
5114         * sem_util.adb (Is_Effectively_Volatile): New routine.
5116 2014-07-31  Fedor Rybin  <frybin@adacore.com>
5118         * gnat_ugn.texi: Document --test-duration option for gnattest.
5120 2014-07-31  Javier Miranda  <miranda@adacore.com>
5121             Eric Botcazou  <ebotcazou@adacore.com>
5123         * opt.ads (Back_End_Inlining): New variable which controls
5124         activation of inlining by back-end expansion.
5125         * gnat1drv.adb (Adjust_Global_Switches): Initialize Back_End_Inlining
5126         * sem_ch6.adb (Analyze_Subprogram_Body_Helper): Do not build
5127         the body to be inlined by the frontend if Back_End_Inlining
5128         is enabled.
5129         * exp_ch6.adb (Register_Backend_Call): Moved to inline.adb.
5130         (Expand_Call): If backend inlining is enabled let the backend to
5131         handle inlined subprograms.
5132         * inline.ads (Register_Backend_Call): Moved here from exp_ch6
5133         * inline.adb (Register_Backend_Call): Moved here from exp_ch6.
5134         (Add_Inlined_Subprogram): Add subprograms when Back_End_Inlining is set.
5135         (Must_Inline): Do not return Inline_Call if Back_End_Inlining is
5136         enabled.
5137         * debug.adb Document -gnatd.z
5138         * fe.h Import Back_End_Inlining variable.
5139         * gcc-interface/utils.c (create_subprog_decl): If Back_End_Inlining is
5140         enabled then declare attribute "always inline"
5141         * gcc-interface/decl.c, gcc-interface/trans.c,
5142         gcc-interface/gigi.h: Add handling of Inline_Always pragma.
5144 2014-07-31  Robert Dewar  <dewar@adacore.com>
5146         * a-ngelfu.ads: Minor comment fix.
5148 2014-07-31  Hristian Kirtchev  <kirtchev@adacore.com>
5150         * freeze.adb (Freeze_Record_Type): Replace all calls to
5151         Is_SPARK_Volatile with Is_Effectively_Volatile and update
5152         related comments.
5153         * sem_ch3.adb (Analyze_Object_Contract, Process_Discriminants):
5154         Replace all calls to Is_SPARK_Volatile with
5155         Is_Effectively_Volatile and update related comments.
5156         * sem_ch5.adb (Analyze_Iterator_Specification,
5157         Analyze_Loop_Parameter_Specification): Replace all calls to
5158         Is_SPARK_Volatile with Is_Effectively_Volatile and update
5159         related comments.
5160         * sem_ch6.adb (Process_Formals): Replace all calls to
5161         Is_SPARK_Volatile with Is_Effectively_Volatile and update
5162         related comments.
5163         * sem_ch12.adb (Instantiate_Object): Replace the call to
5164         Is_SPARK_Volatile_Object with Is_Effectively_Volatile_Object
5165         and update related comment.
5166         * sem_prag.adb (Analyze_External_Property_In_Decl_Part,
5167         Analyze_Global_Item): Replace all calls to Is_SPARK_Volatile
5168         with Is_Effectively_Volatile and update related comments.
5169         * sem_res.adb (Resolve_Actuals, Resolve_Entity_Name): Replace
5170         all calls to Is_SPARK_Volatile with Is_Effectively_Volatile and
5171         update related comments.
5172         * sem_util.adb (Has_Enabled_Property,
5173         Variable_Has_Enabled_Property): Replace all calls
5174         to Is_SPARK_Volatile with Is_Effectively_Volatile and
5175         update related comments.
5176         (Is_Effectively_Volatile): New routine.
5177         (Is_Effectively_Volatile_Object): New routine.
5178         (Is_SPARK_Volatile): Removed.
5179         (Is_SPARK_Volatile_Object): Removed.
5180         * sem_util.ads (Is_Effectively_Volatile): New routine.
5181         (Is_Effectively_Volatile_Object): New routine.
5182         (Is_SPARK_Volatile): Removed.
5183         (Is_SPARK_Volatile_Object): Removed.
5185 2014-07-31  Pascal Obry  <obry@adacore.com>
5187         * s-fileio.adb (Open): Make sure a shared file gets inserted into
5188         the global list atomically. This ensures that the file descriptor
5189         won't be freed because another tasks is closing the file.
5191 2014-07-31  Robert Dewar  <dewar@adacore.com>
5193         * sem_ch3.adb (Process_Range_Expr_In_Decl): Add comments on
5194         generation of _FIRST and _LAST variables even in GNATprove_Mode.
5195         * gnat_ugn.texi: Minor editing.
5196         * sem_prag.adb (Ensure_Aggregate_Form): Make sure generated
5197         aggregate is marked Comes_From_Source if argument is CFS.
5199 2014-07-31  Pascal Obry  <obry@adacore.com>
5201         * s-fileio.adb: Remove obsolete comment.
5203 2014-07-31  Vincent Celier  <celier@adacore.com>
5205         * a-strbou.ads ("=" (Bounded_String, Bounded_String): Add
5206         overriding keyword before function to avoid error when compiler
5207         is called with -gnatyO (check overriding indicators).
5209 2014-07-31  Tucker Taft  <taft@adacore.com>
5211         * gnat_ugn.texi: Add a paragraph pointing the reader
5212         to the "plugins" example.
5214 2014-07-31  Hristian Kirtchev  <kirtchev@adacore.com>
5216         * freeze.adb (Freeze_Expression): Document the
5217         purpose of the parent chain traversal.
5219 2014-07-31  Robert Dewar  <dewar@adacore.com>
5221         * checks.ads, checks.adb (Activate_Overflow_Check): Do not set flag for
5222         unconstrained fpt ops.
5224 2014-07-31  Pascal Obry  <obry@adacore.com>
5226         * s-fileio.adb (Open): Make sure a shared file gets inserted into
5227         the global list atomically. This ensures that the file descriptor
5228         won't be freed because another tasks is closing the file.
5230 2014-07-31  Vincent Celier  <celier@adacore.com>
5232         * projects.texi: Minor spelling error fix.
5234 2014-07-31  Robert Dewar  <dewar@adacore.com>
5236         * gnat_rm.texi: Document No_Elaboration_Code_All restriction.
5237         * lib-writ.adb, lib-load.adb: Initialize No_Elab_Code field in unit
5238         information.
5239         * lib.ads, lib.adb (No_Elab_Code): New field in unit information.
5240         * restrict.adb (Process_Restriction_Synonyms): Add handling
5241         of No_Elaboration_Code_All.
5242         * restrict.ads (Process_Restriction_Synonyms): Now handles
5243         No_Elaboration_Code_All.
5244         * sem_ch10.adb (Analyze_Context): Enforce transitive with for
5245         No_Elaboration_Code_All.
5246         * sem_prag.adb (Process_Restrictions_Or_Restriction_Warnings):
5247         Handle setting of No_Elab_Code in unit information. Handle
5248         No_Elaboration_Code_All.
5249         * snames.ads-tmpl (Name_No_Elaboration_Code): New name for
5250         pragma processing.
5251         (Name_No_Elaboration_Code_All): New name for pragma processing.
5253 2014-07-31  Eric Botcazou  <ebotcazou@adacore.com>
5255         * exp_aggr.adb (Aggr_Assignment_OK_For_Backend): Reject array
5256         types with a null range and use the Esize of the component
5257         instead of its RM_Size to identify appropriate values.
5259 2014-07-31  Hristian Kirtchev  <kirtchev@adacore.com>
5261         * freeze.adb Add with and use clause for Aspects.
5262         (Freeze_Expression): Emit an error when a volatile constant lacks
5263         Boolean aspect Import.
5264         (Has_Boolean_Aspect_Import): New routine.
5266 2014-07-31  Gary Dismukes  <dismukes@adacore.com>
5268         * exp_util.adb: Minor reformatting.
5270 2014-07-31  Vincent Celier  <celier@adacore.com>
5272         * errutil.adb (Error_Msg): Make sure that all components of
5273         the error message object are initialized.
5275 2014-07-31  Ed Schonberg  <schonberg@adacore.com>
5277         * sem_ch4.adb (Try_Container_Indexing): If the container type is
5278         class-wide, use specific type to locate iteration primitives.
5279         * sem_ch13.adb (Check_Indexing_Functions): Add legality checks for
5280         rules in RM 4.1.6 (Illegal_Indexing): New diagnostic procedure.
5281         Minor error message reformating.
5282         * exp_ch5.adb (Expand_Iterator_Loop): Handle properly Iterator
5283         aspect for a derived type.
5285 2014-07-31  Robert Dewar  <dewar@adacore.com>
5287         * debug.adb: Document debug flag d.X.
5289 2014-07-31  Ed Schonberg  <schonberg@adacore.com>
5291         * sem_util.ads (Find_Specific_Type): Moved here from exp_disp.adb.
5292         * sem_util.adb (Find_Specific_Type): If type is untagged private,
5293         retrieve full view so that primitive operations can be located.
5294         * exp_disp.adb Move Find_Specific_Type to sem_util.
5295         * exp_ch4.adb (Expand_N_Op_Eq): If operands are class-wide, use
5296         Find_Specific_Type to locate primitive equality.
5297         * exp_util.adb (Make_CW_Equivalent_Type): A class_wide equivalent
5298         type does not require initialization.
5299         * exp_attr.adb (Compile_Stream_Body_In_Scope): Within an instance
5300         body all visibility is established, and the enclosing package
5301         declarations must not be installed.
5303 2014-07-31  Yannick Moy  <moy@adacore.com>
5305         * sem_parg.adb, sem_prag.ads (Collect_Subprogram_Inputs_Outputs):
5306         Make subprogram public.
5308 2014-07-31  Ed Schonberg  <schonberg@adacore.com>
5310         * exp_ch9.adb (Expand_N_Protected_Type_Declaration): New
5311         predicate Discriminated_Size, to distinguish between private
5312         components that depend on discriminants from those whose size
5313         depends on some other non-static expression.
5315 2014-07-31  Nicolas Setton  <setton@adacore.com>
5317         * g-exptty.adb (Close): Fix binding to Waitpid: use the
5318         tty version.
5320 2014-07-31  Ed Schonberg  <schonberg@adacore.com>
5322         * sem_ch3.adb (Make_Index): Reject properly the use of 'Length
5323         in a discrete range, when 'range was probably intended.
5325 2014-07-31  Robert Dewar  <dewar@adacore.com>
5327         * sem_warn.adb, sem_warn.ads (Has_Junk_Name): Moved from body to spec.
5329 2014-07-31  Robert Dewar  <dewar@adacore.com>
5331         * frontend.adb: Minor reformatting.
5332         * sem.adb: Minor reformatting.
5333         * sem_ch6.adb (Analyze_Null_Procedure): Set proper sloc for
5334         identifiers on rewrite.
5335         * par.adb: Minor comment updates.
5336         * a-ngelfu.adb (Cos): Minor simplification.
5337         * par-ch13.adb (Get_Aspect_Specifications): Improve messages
5338         and recovery for bad aspect.
5339         * exp_ch3.adb: Code clean up.
5340         * sem_util.ads: Minor comment correction.
5341         * sem_ch13.adb (Check_Array_Type): Properly handle large types.
5342         * sem_ch3.adb: Code clean up.
5343         * binderr.ads: Minor comment correction.
5345 2014-07-31  Ed Schonberg  <schonberg@adacore.com>
5347         * exp_disp.adb (Expand_Interface_Conversion): A call whose
5348         prefix is a static conversion to an interface type that is not
5349         class-wide is not dispatching.
5351 2014-07-31  Robert Dewar  <dewar@adacore.com>
5353         * inline.adb, s-traceb.adb, s-traceb-hpux.adb, memtrack.adb,
5354         s-traceb-mastop.adb: Minor reformatting.
5356 2014-07-31  Ed Schonberg  <schonberg@adacore.com>
5358         * exp_ch3.adb (Expand_Record_Extension): In ASIS_Mode perform
5359         expansion, to handle properly visibility of selected components
5360         in instance bodies.
5362 2014-07-31  Robert Dewar  <dewar@adacore.com>
5364         * par-ch13.adb (Get_Aspect_Specifications): Set Inside_Depends.
5365         * par-ch2.adb (P_Pragma): Set Inside_Depends.
5366         * par-ch4.adb (P_Simple_Expression): Pass Inside_Depends to
5367         Check_Unary_Plus_Or_Minus.
5368         * scans.ads (Inside_Depends): New flag.
5369         * scng.adb (Scan): Pass Inside_Depends to Check_Arrow.
5370         * style.ads: Add Inside_Depends parameter to Check_Arrow Add
5371         Inside_Depends parameter to Check_Unary_Plus_Or_Minus.
5372         * styleg.adb (Check_Arrow): Handle Inside_Depends case.
5373         (Check_Unary_Plus_Or_Minus): Handle Inside_Depends case.
5374         * styleg.ads: Add Inside_Depends parameter to Check_Arrow Add.
5375         Inside_Depends parameter to Check_Unary_Plus_Or_Minus.
5377 2014-07-31  Javier Miranda  <miranda@adacore.com>
5379         * s-vaflop.adb Move the body of function T_To_G before
5380         T_To_D. Required for frontend inlining.
5381         * inline.adb (Has_Excluded_Contract): New subprogram used to
5382         check if a subprogram inlined by the frontend has contracts
5383         which cannot be inlined.
5385 2014-07-31  Bob Duff  <duff@adacore.com>
5387         * s-traceb.adb, s-traceb-hpux.adb, s-traceb-mastop.adb:
5388         (Call_Chain): Add 1 to number of frames to skip, to account for
5389         the fact that there's one more frame on the stack.
5390         * gcc-interface/Makefile.in (s-traceb.o): Adjust rules.
5392 2014-07-31  Robert Dewar  <dewar@adacore.com>
5394         * checks.adb (Enable_Overflow_Check): More precise setting of
5395         Do_Overflow_Check flag for division.
5397 2014-07-31  Eric Botcazou  <ebotcazou@adacore.com>
5399         * exp_aggr.adb (Aggr_Assignment_OK_For_Backend): Reject packed
5400         array types with implementation type.
5402 2014-07-31  Hristian Kirtchev  <kirtchev@adacore.com>
5404         * sem_ch10.adb (Process_State): Remove local variable Name. Add
5405         local variable Decl. Partially declare an abstract state by
5406         generating an entity and storing it in the state declaration.
5407         * sem_prag.adb (Create_Abstract_State): Fully declare a
5408         semi-declared abstract state.
5410 2014-07-31  Robert Dewar  <dewar@adacore.com>
5412         * prj-nmsc.adb: Minor reformatting.
5414 2014-07-31  Bob Duff  <duff@adacore.com>
5416         * s-tasdeb.adb (System.Tasking.Debug): Remove
5417         all usage of the secondary stack from this package.
5419 2014-07-31  Hristian Kirtchev  <kirtchev@adacore.com>
5421         * freeze.adb (Freeze_Expression): Update the loop in charge
5422         of finding a proper insertion place for freeze nodes to handle
5423         N_Expression_With_Actions nodes.
5425 2014-07-31  Robert Dewar  <dewar@adacore.com>
5427         * sem_util.adb, a-ngelfu.ads, prj-nmsc.adb, prj-conf.adb: Minor
5428         reformatting.
5430 2014-07-31  Pascal Obry  <obry@adacore.com>
5432         * prj-nmsc.adb: Minor reformatting.
5434 2014-07-31  Ed Schonberg  <schonberg@adacore.com>
5436         * sem_util.adb (Has_Preelaborable_Initialization): Check that
5437         type is tagged before checking whether a user-defined Initialize
5438         procedure is present.
5440 2014-07-31  Gary Dismukes  <dismukes@adacore.com>
5442         * a-ngelfu.ads (Sqrt): Augment postcondition.
5444 2014-07-31  Pascal Obry  <obry@adacore.com>
5446         * prj-nmsc.adb (Check_Library_Attributes): An aggegate library
5447         directory and ALI directory must be different than all object
5448         and library directories of aggregated projects.
5450 2014-07-31  Vincent Celier  <celier@adacore.com>
5452         * prj-pars.adb, prj-conf.ads, prj-conf.adb (Locate_Runtime): Move spec
5453         to package body, as it is not called from outside. Remove argument
5454         Project_Tree, no longer used. When runtime cannot be found,
5455         call Raise_Invalid_Config instead of failing the program.
5457 2014-07-31  Robert Dewar  <dewar@adacore.com>
5459         * bindgen.adb (Gen_Output_File_Ada): Generate pragma Suppress
5460         (Overflow_Check).
5461         * gnatlink.adb (Process_Args): Remove generation of -gnato0,
5462         no longer needed.
5464 2014-07-31  Robert Dewar  <dewar@adacore.com>
5466         * gnat_ugn.texi: Document new switch -gnato0.
5467         * sem_ch3.ads: Minor reformatting.
5468         * gnatlink.adb (Process_Args): Compile bind file with -gnato0
5469         (we do not want overflow checks when incrementing elaboration
5470         counters).
5471         * einfo.ads: Minor reformatting.
5473 2014-07-31  Robert Dewar  <dewar@adacore.com>
5475         * exp_ch5.adb, freeze.adb, exp_ch3.adb: Minor comment correction.
5476         * s-arit64.adb: Minor reformatting.
5478 2014-07-31  Robert Dewar  <dewar@adacore.com>
5480         * gnat1drv.adb (Adjust_Global_Switches): Default for overflow
5481         checking is enabled except in GNAT_Mode.
5482         * switch-c.adb (Scan_Front_End_Switches): Implement -gnato0
5483         (suppress overflow checks).
5485 2014-07-31  Ed Schonberg  <schonberg@adacore.com>
5487         * exp_ch3.adb (Expand_Freeze_Record_Type): Do not build an
5488         invariant procedure for an internally generated subtype that is
5489         created for an object of a class-wide type.
5491 2014-07-31  Vincent Celier  <celier@adacore.com>
5493         * prj-nmsc.adb, errutil.adb: Make code similar to Errout.
5495 2014-07-31  Gary Dismukes  <dismukes@adacore.com>
5497         * gnat_rm.texi, sem_aux.ads, einfo.ads, sem_util.ads, sem_ch6.adb,
5498         exp_disp.adb: Minor reformatting.
5500 2014-07-31  Robert Dewar  <dewar@adacore.com>
5502         * exp_ch5.adb, sem_ch3.adb, exp_ch7.adb, exp_util.adb, exp_ch9.adb,
5503         sem_ch7.adb, checks.adb, s-exctra.adb, exp_ch6.adb, exp_disp.adb,
5504         exp_dist.adb, sem_ch13.adb, exp_strm.adb, exp_ch3.adb: Minor
5505         reformatting.
5507 2014-07-31  Robert Dewar  <dewar@adacore.com>
5509         * sem_ch13.adb: Minor reformatting.
5511 2014-07-31  Ed Schonberg  <schonberg@adacore.com>
5513         * exp_ch3.adb (Build_Invariant_Checks): If the enclosing record
5514         is an unchecked_union, warn that invariants will not be checked
5515         on components that have them.
5517 2014-07-31  Robert Dewar  <dewar@adacore.com>
5519         * freeze.adb (Freeze_Entity): Check for error of
5520         Type_Invariant'Class applied to a untagged type.
5521         * sem_ch6.adb (Analyze_Null_Procedure): Unconditionally rewrite
5522         as null body, so that we perform error checks even if expansion
5523         is off.
5525 2014-07-31  Ed Schonberg  <schonberg@adacore.com>
5527         * sem_ch13.adb (Build_Invariant_Procedure): If body of procedure
5528         is already present, nothing to do.
5529         * exp_ch3.adb (Build_Component_Invariant_Call): For an access
5530         component, check whether the access type has an invariant before
5531         checking the designated type.
5532         (Build_Record_Invariant_Proc): Change suffix of generated
5533         name to prevent ambiguity when record type has invariants
5534         in addition to those of components, and two subprograms are
5535         constructed. Consistent with handling of array types.
5536         (Insert_Component_Invariant_Checks): Build invariant procedure
5537         body when one has not been created yet, in the case of composite
5538         types that are completions and whose full declarations carry
5539         invariants.
5541 2014-07-30  Thomas Quinot  <quinot@adacore.com>
5543         * gnat_rm.texi: Minor doc fixes.
5545 2014-07-30  Robert Dewar  <dewar@adacore.com>
5547         * a-rbtgbo.adb, sem_ch13.adb: Minor reformatting.
5549 2014-07-30  Vincent Celier  <celier@adacore.com>
5551         * errutil.adb (Set_Msg_Text): Process tilde ('~'): no processing
5552         of error message.
5553         * prj-nmsc.adb (Locate_Directory): Use a tilde ('~') in the
5554         message to report that a directory cannot be created, to avoid
5555         processing of the directory path that may contains special
5556         insertion characters.
5558 2014-07-30  Ed Schonberg  <schonberg@adacore.com>
5560         * a-crdlli.ads: Place declaration of Empty_List after full type
5561         declaration for Curosr, to prevent freezing error.
5563 2014-07-30  Robert Dewar  <dewar@adacore.com>
5565         * get_targ.adb: Minor code reorganization.
5566         * prj-proc.adb, prj-proc.ads, get_targ.ads, sem_ch6.adb: Minor
5567         reformatting.
5569 2014-07-30  Ed Schonberg  <schonberg@adacore.com>
5571         * a-cbhase.adb: a-cbhase.adb (Insert): Raise Constraint_Error,
5572         not Program_Error, when attempting to remove an element not in
5573         the set. This is the given semantics for all set containers.
5575 2014-07-30  Ed Schonberg  <schonberg@adacore.com>
5577         * a-rbtgbo.adb (Delete_Node_Sans_Free): If
5578         element is not present in tree return rather than violating
5579         an assertion. Constraint_Error will be raised in the caller if
5580         element is not in the container.
5582 2014-07-30  Arnaud Charlet  <charlet@adacore.com>
5584         * set_targ.adb (Read_Target_Dependent_Values): New subprogram.
5585         (elab body): Add provision for default target config file.
5586         * get_targ.ads, get_targ.adb (Get_Back_End_Config_File): New subprogram.
5588 2014-07-30  Ed Schonberg  <schonberg@adacore.com>
5590         * a-cbhase.adb (Delete): Raise Constraint_Error, not Program_Error,
5591         when attempting to remove an element not in the set. This is
5592         the given semantics for all set containers.
5593         * a-cborse.adb (Delete): Attempt removal first, to check for
5594         tampering, before checking whether this is an attempt to
5595         delete a  non-existing element, and in fthe latter case raise
5596         Constraint_Error.
5598 2014-07-30  Vincent Celier  <celier@adacore.com>
5600         * prj-proc.adb (Recursive_Process): Do not create a new
5601         Project_Id if the project is already in the list of projects of
5602         the tree.
5604 2014-07-30  Ed Schonberg  <schonberg@adacore.com>
5606         * sem_ch6.adb (Analyze_Function_Return): Reject a return expression
5607         whose type is an incomplete formal type.
5608         (Analyze_Return_Type): Reject a return type that is an untagged
5609         imcomplete formal type.
5610         (Process_Formals): Reject a formal parameter whose type is an
5611         untagged formal incomplete type.
5612         * sem_res.adb (Resolve_Actuals): Reject an actual whose type is
5613         an untagged formal incomplete type.
5615 2014-07-30  Robert Dewar  <dewar@adacore.com>
5617         * gnat_ugn.texi: Minor spelling correction.
5618         * makeutl.adb: Minor code reorganization.
5619         * exp_ch4.adb, exp_aggr.adb, exp_ch3.adb: Minor reformatting.
5621 2014-07-30  Robert Dewar  <dewar@adacore.com>
5623         * einfo.ads (Has_Unchecked_Union): Document that this is used
5624         to check for illegal Valid_Scalars attribute references.
5625         * exp_attr.adb (Build_Record_VS_Func): New function
5626         (Expand_N_Attribute_Reference, case Valid_Scalars): Call this
5627         function.
5628         * gnat_rm.texi: Document 'Valid_Scalars cannot be applied to
5629         Unchecked_Union Add note on 'Valid_Scalars generating a lot
5630         of code.
5631         * sem_attr.adb (Analyze_Attribute, case Valid_Scalars): Give
5632         error on attempt to apply Valid_Scalars to Unchecked_Union type.
5634 2014-07-30  Steve Baird  <baird@adacore.com>
5636         * exp_ch4.adb (Expand_N_Indexed_Component): Disable optimized handling
5637         of A(I..J)(K) in CodePeer_Mode.
5639 2014-07-30  Ben Brosgol  <brosgol@adacore.com>
5641         * gnat_ugn.texi: Fix typo.
5643 2014-07-30  Thomas Quinot  <quinot@adacore.com>
5645         * lib-writ.ads: document format change.
5647 2014-07-30  Pascal Obry  <obry@adacore.com>
5649         * prj-util.adb (For_Interface_Sources): Do not
5650         include sources from withed externally built projects.
5652 2014-07-30  Robert Dewar  <dewar@adacore.com>
5654         * lib.adb: Minor reformatting.
5655         * prj-util.adb: Minor reformatting.
5657 2014-07-30  Ed Schonberg  <schonberg@adacore.com>
5659         * exp_aggr.adb (Build_Record_Aggr_Code): For an array component
5660         that depends on discriminants, and which is given by an others
5661         clause, create an explicit subtype with the discriminant values
5662         of the enclosing aggregate, because the backend cannot otherwise
5663         retrieve the actual bounds of the array.
5665 2014-07-30  Fedor Rybin  <frybin@adacore.com>
5667         * gnat_ugn.texi: Improve gnattest documentation.
5669 2014-07-30  Pascal Obry  <obry@adacore.com>
5671         * makeutl.adb (Insert_Project_Sources): Properly handle sources
5672         that are aggregated. We want to include sources not only part
5673         of libraries but also if part of an aggregated project from an
5674         aggregate library.
5675         * prj.adb (For_Project_And_Aggregated_Context): Properly check
5676         state of root project.
5678 2014-07-30  Thomas Quinot  <quinot@adacore.com>
5680         * lib-load.ads: Minor reformatting.
5681         * sinfo.ads (Library_Unit): Update comment.
5682         * lib.ads (Notes): Simplify. The Unit component in Notes_Entry
5683         is redundant. Instead used the pragma Node_Id directly as the
5684         element type.
5686 2014-07-30  Thomas Quinot  <quinot@adacore.com>
5688         * lib.adb (Store_Note): Store only notes that do not come from
5689         an instance, and that are in the extended main source unit.
5690         * lib-writ (Write_Unit_Information): Annotations from subunits
5691         must be emitted along with those for the main unit, and they
5692         must carry a specific file name.
5693         * ali.ads (Notes_Record): Use a File_Name_Type instead of a
5694         Unit_Id for the source file containing the pragma, as in the
5695         case of annotations from subunits we might not have a readily
5696         available unit id.
5697         * ali.adb (Scan_ALI): Account for above change in data structure.
5699 2014-07-30  Vincent Celier  <celier@adacore.com>
5701         * makeutl.adb (Insert_Project_Sources): When the library project
5702         is an aggregate Stand-Alone Library, insert in the queue the
5703         Ada interface units, with Closure set to True;
5705 2014-07-30  Eric Botcazou  <ebotcazou@adacore.com>
5707         * sem_util.adb: Fix minor typo.
5708         * makeutl.adb: Minor reformatting.
5710 2014-07-30  Robert Dewar  <dewar@adacore.com>
5712         * exp_ch7.adb, checks.adb, makeutl.adb, makeutl.ads: Minor reformatting.
5714 2014-07-30  Yannick Moy  <moy@adacore.com>
5716         * checks.ads: Fix typo in comment.
5718 2014-07-30  Pierre-Marie Derodat  <derodat@adacore.com>
5720         * sem_util.adb (Set_Debug_Info_Needed): For scalar types, recurse on
5721         entities that materialize range bounds, if any.
5723 2014-07-30  Vincent Celier  <celier@adacore.com>
5725         * projects.texi: Minor spelling fix.
5727 2014-07-30  Hristian Kirtchev  <kirtchev@adacore.com>
5729         * checks.adb (Make_Bignum_Block): Use the new secondary stack
5730         build routines to manage the mark.
5731         * exp_ch7.adb (Create_Finalizer, Expand_Cleanup_Actions):
5732         Use the new secodary stack build routines to manage the mark.
5733         (Insert_Actions_In_Scope_Around): Add new formal parameter
5734         Manage_SS along with comment on its usage. Code and comment
5735         reformatting. Mark and release the secondary stack when the
5736         context warrants it.
5737         (Make_Transient_Block): Update the call
5738         to Insert_Actions_In_Scope_Around to account for parameter Manage_SS.
5739         (Wrap_Transient_Declaration): Remove local variable
5740         Uses_SS. Ensure that the secondary stack is marked and released
5741         when the related object declaration appears in a library level
5742         package or package body. Code and comment reformatting.
5743         * exp_util.ads, exp_util.adb (Build_SS_Mark_Call): New routine.
5744         (Build_SS_Release_Call): New routine.
5746 2014-07-30  Steve Baird  <baird@adacore.com>
5748         * exp_attr.adb: Revert previous change, not needed after all.
5750 2014-07-30  Vincent Celier  <celier@adacore.com>
5752         * makeutl.adb (Queue.Insert_Project_Sources): Insert with
5753         Closure => True for interfaces of Stand-Alone Libraries.
5754         * makeutl.ads (Source_Info (Format => Gprbuild)): Add new
5755         Boolean component Closure, defaulted to False.
5757 2014-07-30  Yannick Moy  <moy@adacore.com>
5759         * sem_res.adb: Fix typo in error message.
5761 2014-07-30  Robert Dewar  <dewar@adacore.com>
5763         * sem_ch3.adb (Process_Range_Expr_In_Decl): Use _FIRST/_LAST
5764         as name suffixes rather than L/H for subtype bounds.
5765         * tbuild.ads: Minor comment improvements and fixes
5766         (Make_External_Name): Document that suffix can start with an
5767         underscore.
5769 2014-07-30  Bob Duff  <duff@adacore.com>
5771         * gnat_ugn.texi: Document --rep-clauses switch.
5773 2014-07-30  Ed Schonberg  <schonberg@adacore.com>
5775         * sem_ch13.adb (Analyze_Aspect_Specifications): Default_Value and
5776         Default_Component_Value can only be specified for scalar type or
5777         arrays of scalar types respectively.  This legality check must
5778         be performed at the point the aspect is analyzed, in order to
5779         reject aspect specifications that apply to a partial view.
5781 2014-07-30  Thomas Quinot  <quinot@adacore.com>
5783         * freeze.adb: Minor reformatting.
5785 2014-07-30  Robert Dewar  <dewar@adacore.com>
5787         * exp_attr.adb (Expand_Attribute, case First/Last): Don't expand in
5788         codepeer mode.
5790 2014-07-30  Ed Schonberg  <schonberg@adacore.com>
5792         * freeze.adb (Check_Expression_Function): At the freeze point
5793         of an expression function, verify that the expression in the
5794         function does not contain references to any deferred constants
5795         that have no completion yet.
5796         (Freeze_Expression, Freeze_Before): call
5797         Check_Expression_Function.
5798         * a-ciorse.ads: Add Reference_Control_Type to detect tampering.
5799         * a-ciorse.adb: Add Adjust and Finalize routines for
5800         Reference_Control_Type. Use it in the construction of Reference
5801         and Constant_Reference values.
5803 2014-07-30  Robert Dewar  <dewar@adacore.com>
5805         * exp_aggr.adb: Update comments.
5806         * a-chtgbo.adb, a-chtgbo.ads, a-cbhase.adb, a-cbhase.ads: Minor
5807         reformatting.
5809 2014-07-30  Robert Dewar  <dewar@adacore.com>
5811         * cstand.adb (New_Standard_Entity): New version takes name
5812         string to call Make_Name.
5813         (Create_Standard): Use this routine to set name before setting other
5814         fields.
5816 2014-07-30  Robert Dewar  <dewar@adacore.com>
5818         * exp_attr.adb (Expand_Attribute, case First): Rewrite simple
5819         entity reference.
5820         (Expand_Attribute, case Last): Ditto.
5821         * exp_ch3.adb (Constrain_Index): New calling sequence for
5822         Process_Range_Expr_In_Decl.
5823         (Expand_N_Object_Declaration): Avoid setting Is_Known_Valid in one
5824         problematical case.
5825         * sem_ch3.adb (Constrain_Index): New calling sequence for
5826         Process_Range_Expr_In_Decl.
5827         (Set_Scalar_Range_For_Subtype): ditto.
5828         (Process_Range_Expr_In_Decl): Create constants to hold bounds for
5829         subtype.
5830         * sem_ch3.ads (Process_Range_Expr_In_Decl): Add Subtyp parameter.
5831         * sem_eval.adb (Compile_Time_Compare): Make sure we use base
5832         types if we are not assuming no invalid values.
5834 2014-07-30  Robert Dewar  <dewar@adacore.com>
5836         * clean.adb: Minor reformatting.
5837         * opt.ads: Minor fix to incorrect comment.
5839 2014-07-30  Ed Schonberg  <schonberg@adacore.com>
5841         * a-chtgbo.ads, a-chtgbo.adb (Delete_Node_At_Index): New
5842         subprogram, used by bounded hashed sets, to delete a node at
5843         a given index, whose element may have been improperly updated
5844         through a Reference_Preserving key.
5845         * a-cbhase.ads: Add Reference_Control_Type to package Generic_Keys.
5846         * a-cbhase.adb: Add Adjust and Finalize routines for
5847         Reference_Control_Type.
5848         (Delete, Insert): Raise Program_Error, not Constraint_Error,
5849         when operation is illegal.
5850         (Reference_Preserving_Key): Build aggregate for Reference_Control_Type
5851         * a-cmbutr.ads: Add Reference_Control_Type to detect tampering. Add
5852         private with_clause for Ada.Finalization.
5853         * a-cbmutr.adb: Add Adjust and Finalize routines for
5854         Reference_Control_Type. Use it in the construction of Reference
5855         and Constant_Reference values.
5857 2014-07-30  Robert Dewar  <dewar@adacore.com>
5859         * sem_ch3.adb, sem_ch3.ads: Minor code reorganization.
5861 2014-07-30  Pascal Obry  <obry@adacore.com>
5863         * clean.adb (Clean_Project): Properly check for directory
5864         existence before trying to enter it.
5866 2014-07-30  Robert Dewar  <dewar@adacore.com>
5868         * sem_ch3.ads, prj.ads, prj-nmsc.adb: Minor reformatting.
5870 2014-07-30  Robert Dewar  <dewar@adacore.com>
5872         * par-ch5.adb (P_Sequence_Of_Statements): Properly handle
5873         missing semicolon after name.
5875 2014-07-30  Pascal Obry  <obry@adacore.com>
5877         * prj.ads (Gprinstall_Flags): New constant.
5878         * prj-nmsc.adb (Check_Library_Attributes): Do not fails for
5879         missing library dir if Directories_Must_Exist_In_Projects
5880         is false.
5882 2014-07-30  Bob Duff  <duff@adacore.com>
5884         * a-except-2005.adb, a-except.adb: Remove obsolete comments.
5885         * s-traceb.ads: Updagte comments.
5887 2014-07-30  Robert Dewar  <dewar@adacore.com>
5889         * checks.adb, a-cihase.adb, a-cihase.ads, a-chtgop.adb, a-chtgop.ads,
5890         a-except.adb, a-except-2005.adb, a-cborse.adb, a-cborse.ads,
5891         a-exexda.adb, a-elchha.adb, exp_aggr.adb, a-cohase.adb: Minor
5892         reformatting.
5894 2014-07-30  Ed Schonberg  <schonberg@adacore.com>
5896         * a-chtgop.ads, a-chtgop.adb (Delete_Node_At_Index): New
5897         subprogram, used by all versions of hashed sets, to delete a node
5898         whose element has been improperly updated through a Reference_
5899         Preserving key.
5900         * a-cohase.adb: Remove Delete_Node, use new common procedure
5901         Delete_Node_At_Index.
5902         * a-cihase.ads: Add Reference_Control_Type to package Generic_Keys.
5903         * a-cihase.adb: Add Adjust and Finalize routines for
5904         Reference_Control_Type.
5905         (Reference_Preserving_Key): Build aggregate for
5906         Reference_Control_Type
5908 2014-07-30  Yannick Moy  <moy@adacore.com>
5910         * checks.adb, checks.ads (Determine_Range_R): New procedure to
5911         determine the possible range of a floating-point expression.
5913 2014-07-30  Ed Schonberg  <schonberg@adacore.com>
5915         * a-cborse.ads: Add Reference_Control_Type to package Generic_Keys.
5916         * a-cborse.adb: Add Adjust and Finalize routines for
5917         Reference_Control_Type.
5918         (Reference_Preserving_Key): Build aggregate for
5919         Reference_Control_Type.
5920         (Delete): Check for tampering, and raise Program_Error (not
5921         Constraint_Error) when attempting to delete an element not in
5922         the set.
5923         (Insert): Ditto.
5925 2014-07-30  Bob Duff  <duff@adacore.com>
5927         * a-elchha.adb, a-except-2005.adb, a-except.adb, a-exexda.adb,
5928         * a-exextr.adb, a-exstat.adb, exp_intr.ads, s-tassta.adb:
5929         Exception_Information is used to produce useful debugging
5930         information for the programmer. However, it was also used to
5931         implement the stream attributes for type Exception_Occurrence. The
5932         latter requires a stable and portable interface, which meant
5933         that we couldn't include a symbolic traceback. A separate set of
5934         routines was used to provide symbolic tracebacks under program
5935         control (i.e. not automatically). The goal of this ticket is
5936         to provide such automatic tracebacks, so the change here is to
5937         split the two functionalities: Exception_Information gives the
5938         maximally useful information for debugging (i.e. it now includes
5939         a symbolic traceback when a decorator is set, and it can be
5940         improved freely in the future without disturbing streaming).
5941         Untailored_Exception_Information always uses hexadecimal addresses
5942         in the traceback, has a stable and portable output, and is now
5943         used for streaming.
5945 2014-07-30  Eric Botcazou  <ebotcazou@adacore.com>
5947         * exp_aggr.adb (Expand_Array_Aggregate): Add missing test
5948         on the target of the assignment to find out whether it
5949         can be directly done by the back-end.
5950         * exp_util.adb (Is_Possibly_Unaligned_Slice): Remove obscure test.
5952 2014-07-30  Robert Dewar  <dewar@adacore.com>
5954         * inline.adb, a-coorse.adb, a-coorse.ads, a-cohase.adb, a-cohase.ads,
5955         a-tasatt.adb: Minor reformatting.
5957 2014-07-30  Robert Dewar  <dewar@adacore.com>
5959         * exp_ch4.adb: Minor reformatting.
5961 2014-07-30  Ed Schonberg  <schonberg@adacore.com>
5963         * a-coorse.adb, a-coorse.ads (Generic_Keys): Add a
5964         Reference_Control_Type to generic package, to keep additional
5965         information for Reference_Types that manipulate keys. Add Adjust and
5966         Finalize procedures for this type.
5967         (Finalize): When finalizing a reference_preserving_key, verify
5968         that the key of the new value is equivalent to the key of the
5969         original element, raise Program_Error otherwise.
5970         (Insert): Detect tampering.
5971         (Reference_Preserving_Key): Build proper Reference_Control_Type,
5972         and update Busy and Lock bits to detect tampering.
5973         * a-cohase.ads: Keep with-clause private.
5975 2014-07-30  Hristian Kirtchev  <kirtchev@adacore.com>
5977         * exp_ch4.adb (Expand_N_Op_Eq): Emit a warning when the operands
5978         of an equality are of an Unchecked_Union type and lack inferable
5979         discriminants.
5981 2014-07-30  Bob Duff  <duff@adacore.com>
5983         * g-exctra.adb, g-exctra.ads, s-exctra.adb, s-exctra.ads, Makefile.rtl,
5984         g-trasym.adb, g-trasym.ads, s-trasym.adb, s-trasym.ads: Move
5985         GNAT.Traceback.Symbolic and GNAT.Exception_Traces into the System
5986         hierarchy (System.Traceback.Symbolic and System.Exception_Traces), so
5987         we can call them from the runtimes. Leave renamings in place under GNAT.
5989 2014-07-30  Yannick Moy  <moy@adacore.com>
5991         * inline.adb (Check_And_Build_Body_To_Inline): Include code for
5992         inlining in GNATprove mode.
5994 2014-07-30  Ed Schonberg  <schonberg@adacore.com>
5996         * a-cohase.adb, a-cohase.ads (Generic_Keys): Add a
5997         Reference_Control_Type to generic package, to keep additional
5998         information for Reference_Types that manipulate keys. Add Adjust and
5999         Finalize procedures for this type.
6000         (Delete_Node): New procedure called when finalizing a
6001         Reference_Control_Type, to remove a node whose element has been
6002         improperly updated through a Reference.
6003         (Insert): Detect tampering.
6004         (Reference_Preserving_Key): Build proper Reference_Control_Type,
6005         and update Busy and Lock bits to detect tampering.
6007 2014-07-30  Bob Duff  <duff@adacore.com>
6009         * exp_intr.ads: Minor comment fix.
6011 2014-07-30  Gary Dismukes  <dismukes@adacore.com>
6013         * exp_prag.adb, a-tags.ads: Minor typo fixes.
6015 2014-07-30  Bob Duff  <duff@adacore.com>
6017         * a-excach.adb, a-excach-cert.adb, a-except-2005.ads,
6018         a-except.ads, g-traceb.adb, memtrack.adb,
6019         s-traceb.adb, s-traceb.ads, s-traceb-hpux.adb, s-traceb-mastop.adb:
6020         Cleanup: Make the three versions of System.Traceback.Call_Chain
6021         have the same interface. Use an array for the Traceback parameter
6022         instead of an Address.  This will enable reduction in code
6023         duplication.
6025 2014-07-30  Pat Rogers  <rogers@adacore.com>
6027         * gnat_ugn.texi: Corrected minor textual error in description
6028         of switch -gnatwl.
6030 2014-07-30  Bob Duff  <duff@adacore.com>
6032         * Makefile.rtl: Sort file names.
6034 2014-07-30  Arnaud Charlet  <charlet@adacore.com>
6036         * a-tasatt.adb: Complete previous change: kill spurious warning
6037         on e.g. sparc, and make sure we only use the fast path when the
6038         alignment is compatible.
6040 2014-07-30  Yannick Moy  <moy@adacore.com>
6042         * sem_ch6.adb (Analyze_Subprogram_Body_Helper): Mark new Spec_Id as
6043         coming from source.
6045 2014-07-30  Yannick Moy  <moy@adacore.com>
6047         * inline.adb (Build_Body_To_Inline): Issue more precise messages
6048         for declarations that prevent inlining.
6049         (Cannot_Inline): Change usual start of message to refer to contextual
6050         analysis in GNATprove mode.
6051         * sem_res.adb (Resolve_Call): Change usual start of message to
6052         refer to contextual analysis in GNATprove mode, when inlining
6053         not possible.
6055 2014-07-30  Robert Dewar  <dewar@adacore.com>
6057         * sem_res.adb, sem_ch6.adb: Minor code reorganization.
6058         * inline.adb: Minor reformatting.
6060 2014-07-30  Javier Miranda  <miranda@adacore.com>
6062         * a-tags.ads: Add comments.
6064 2014-07-30  Pat Rogers  <rogers@adacore.com>
6066         * gnat_rm.texi: Minor word error.
6068 2014-07-30  Ed Schonberg  <schonberg@adacore.com>
6070         * exp_prag.adb (Expand_Old): Insert declarationss of temporaries
6071         created to capture the value of the prefix of 'Old at the
6072         beginning of the current declarative part, to prevent data flow
6073         anomalies in the postcondition procedure that will follow.
6075 2014-07-30  Yannick Moy  <moy@adacore.com>
6077         * debug.adb: Retire debug flag -gnatdQ.
6078         * inline.adb (Can_Be_Inlined_In_GNATprove_Mode): Check SPARK_Mode
6079         on decl, not on body.  Ignore predicate functions.
6080         * sem_ch6.adb (Analyze_Subprogram_Body_Helper): Remove use of
6081         debug flag -gnatdQ.  Correctly analyze SPARK_Mode on decl and
6082         body when generating a decl for a body on which SPARK_Mode aspect
6083         is given.
6084         * sem_prag.adb (Analyze_Pragma|SPARK_Mode): Reorder tests for
6085         attaching pragma to entity, to account for declaration not coming
6086         from source.
6087         * sem_res.adb (Resolve_Call): Issue warning and flag subprogram
6088         as not always inlined in GNATprove mode, when called in an
6089         assertion context.
6091 2014-07-30  Vincent Celier  <celier@adacore.com>
6093         * debug.adb: Minor comment update.
6095 2014-07-30  Robert Dewar  <dewar@adacore.com>
6097         * s-tasuti.adb, s-tassta.adb: Minor reformatting.
6098         * sprint.adb (Sprint_Node): Handle N_Contract case.
6099         * exp_prag.adb: Minor reformatting.
6100         * freeze.adb (Freeze_Entity): Check useless postcondition for
6101         No_Return subprogram.
6102         * sem_prag.adb: Minor reformatting.
6104 2014-07-30  Javier Miranda  <miranda@adacore.com>
6106         * a-tags.ads: Complete comments about performance.
6108 2014-07-30  Fedor Rybin  <frybin@adacore.com>
6110         * gnat_ugn.texi: Adding description for --exit-status option to
6111         gnattest section.  Fixing index entry of --passed-tests option
6112         in gnattest section.
6114 2014-07-30  Javier Miranda  <miranda@adacore.com>
6116         * Makefile.rtl, gnat_rm.texi, i-cpp.adb, i-cpp.ads, impunit.adb,
6117         rtsfind.ads: Remove references to package Interfaces.CPP since this
6118         package is no longer needed.
6120 2014-07-30  Bob Duff  <duff@adacore.com>
6122         * s-taasde.adb (Timer_Queue): Don't use a
6123         build-in-place function call to initialize the Timer_Queue.
6124         * s-traent.adb, s-traent.ads, s-traent-vms.adb, s-traent-vms.ads:
6125         Turn off polling in these units, because otherwise we get
6126         elaboration circularities with Ada.Exceptions when the -gnatP
6127         switch is used.
6128         * s-tassta.adb (Create_Task): Make sure independent tasks
6129         are created with Parent = Environment_Task. This was not true,
6130         for example, in s-interr.adb, when Interrupt_Manager does "new
6131         Server_Task"; the Server_Task had Parent = Interrupt_Manager,
6132         which is wrong because the master is determined by the access
6133         type, which is at library level.
6134         * s-tasuti.adb (Make_Independent): Avoid setting Parent; it is
6135         now set correctly by Create_Task.
6136         (Make_Passive): Remove the workaround for the race condition in
6137         Make_Independent.
6138         * frontend.adb (Frontend): Revert to previous method of detecting
6139         temporary configuration pragma files, recognizing such files by
6140         ".tmp" in the name. This is more general than detecting pragmas
6141         Source_File_Name_Project, because it allows any tool to use
6142         this naming convention, no matter the content of the file.
6143         * gnat_ugn.texi: Document this naming convention.
6145 2014-07-30  Robert Dewar  <dewar@adacore.com>
6147         * exp_ch7.adb, s-tataat.adb, s-tataat.ads, s-parame-vms-alpha.ads,
6148         inline.adb, s-parame-hpux.ads, exp_smem.adb, s-tasini.adb,
6149         s-tasini.ads, s-parame-vms-ia64.ads, s-parame.ads, s-taskin.ads,
6150         s-parame-vxworks.ads, a-tasatt.adb, a-tasatt.ads: Minor reformatting.
6151         * a-suenco.adb (Convert): Handle overlong encodings in UTF8-UTF8
6152         conversion.
6154 2014-07-30  Ed Schonberg  <schonberg@adacore.com>
6156         * sem_ch5.adb: Improve error recovery.
6157         * inline.adb (Build_Body_To_Inline): Set Full_Analysis to false
6158         before analyzing the body, so that in GNATprove mode there is
6159         no light expansion. Whatever expansion is required by SPARK will
6160         be performed when analysing the inlined code.
6162 2014-07-30  Bob Duff  <duff@adacore.com>
6164         * s-tataat.adb, s-tataat.ads, a-tasatt.adb: Minor comment fixes.
6166 2014-07-30  Ed Schonberg  <schonberg@adacore.com>
6168         * sem_ch5.adb (Analyze_Loop_Statement): If loop has a label,
6169         verify that it is not hidden by an inner implicit declaration.
6171 2014-07-30  Thomas Quinot  <quinot@adacore.com>
6173         * sem.ads (Scope_Table_Entry): New component Locked_Shared_Objects.
6174         * sem_ch8.adb (Push_Scope): Initialize Locked_Shared_Objects.
6175         * exp_smem.adb (Add_Shared_Var_Lock_Procs): Handle the case where
6176         the call returns an unconstrained type: in this case there is
6177         already a transient scope, and we should not establish a new one.
6178         * exp_ch7.adb (Insert_Actions_In_Scope_Around): New formal Clean. If
6179         True, also insert cleanup actions in the tree.
6180         (Wrap_Transient_Declaration): Call Insert_Actions_In_Scope_Around
6181         with Clean set True.
6183 2014-07-30  Arnaud Charlet  <charlet@adacore.com>
6185         * s-taskin.ads (Direct_Index, Direct_Index_Range,
6186         Direct_Attribute_Element, Direct_Attribute_Array,
6187         Direct_Index_Vector, Direct_Attributes, Is_Defined,
6188         Indirect_Attributes): Removed.  (Atomic_Address,
6189         Attribute_Array, Attributes): New.
6190         * s-tasini.ads, s-tasini.adb (Proc_T, Initialize_Attributes,
6191         Finalize_Attributes_Link, Initialize_Attributes_Link): Removed.
6192         (Finalize_Attributes): Reimplement.
6193         * s-tassta.adb (Create_Task): Remove call to
6194         Initialize_Attributes_Link (Free_Task, Vulnerable_Free_Task):
6195         Replace Finalize_Attributes_Link by Finalize_Attributes.
6196         * a-tasatt.ads, a-tasatt.adb, s-tataat.ads, s-tataat.adb:
6197         Reimplement from scratch, using a simpler and more efficient
6198         implementation.
6199         * s-tporft.adb (Register_Foreign_Thread): Remove now obsolete comment.
6200         * s-parame.ads, s-parame-hpux.ads,
6201         * s-parame-vms-alpha.ads, s-parame-vms-ia64.ads,
6202         * s-parame-vxworks.ads (Max_Attribute_Count): New, replace
6203         Default_Attribute_Count.
6205 2014-07-30  Olivier Hainque  <hainque@adacore.com>
6207         * vxworks-ppc-link.spec: New file. Extra link
6208         instructions for ppc-vxworks.
6209         * vxworks-crtbe-link.spec: Likewise, for ZCX related support.
6210         * system-vxworks-ppc.ads: Adjust linker options to use spec files.
6211         * system-vxworks-arm.ads: Likewise.
6212         * gcc-interface/Makefile.in: Enable .spec files.
6214 2014-07-30  Ed Schonberg  <schonberg@adacore.com>
6216         * sem_aggr.adb: Minor comment reformatting.
6218 2014-07-30  Robert Dewar  <dewar@adacore.com>
6220         * sem_util.ads, sem_util.adb (Is_Junk_Name): Removed.
6221         * sem_warn.adb (Has_Junk_Name): New function
6222         (Check_References): Use Has_Junk_Name to delete junk warnings
6223         (Check_Unset_Reference): ditto.
6224         (Warn_On_Unreferenced_Entity): ditto.
6225         (Warn_On_Useless_Assignment): ditto.
6227 2014-07-30  Ed Schonberg  <schonberg@adacore.com>
6229         * checks.adb (Insert_Valid_Check): Do not check for the packed
6230         array type of a prefix that is an access type.
6232 2014-07-30  Ed Schonberg  <schonberg@adacore.com>
6234         * sem_attr.adb (Eval_Attribute): Evaluate the GNAT attribute
6235         Unconstrained_Array even if prefix is not frozen yet, as can
6236         occur with a private subtype used as a generic actual.
6238 2014-07-30  Gary Dismukes  <dismukes@adacore.com>
6240         * sem_attr.adb: Minor reformatting.
6242 2014-07-30  Pat Rogers  <rogers@adacore.com>
6244         * gnat_rm.texi: Corrected minor wording error in description
6245         of No_Exception_Registration.
6247 2014-07-30  Yannick Moy  <moy@adacore.com>
6249         * einfo.ads, einfo.adb: New flag Is_Inlined_Always for use in GNATprove
6250         mode. Realphabetize two subprograms.
6251         * inline.adb (Cannot_Inline): Use Is_Inlined_Always in GNATprove mode.
6252         (Can_Be_Inlined_In_GNATprove_Mode): Adapt to possible Empty Body_Id.
6253         (Check_And_Build_Body_To_Inline): Use Is_Inlined_Always in GNATprove
6254         mode.
6255         (Expand_Inline_Call): Use Is_Inlined_Always in GNATprove mode.
6256         * sem_ch6.adb (Analyze_Subprogram_Body_Helper): Do not use
6257         Is_Inline in GNATprove mode.
6258         (Analyze_Subprogram_Specification):
6259         Set Is_Inlined_Always at subprogram entity creation.
6260         * sem_res.adb (Resolve_Call): Do not deal with inlining during
6261         pre-analysis.  Issue warning on call to possibly inlined
6262         subprogram when body not seen.
6264 2014-07-30  Yannick Moy  <moy@adacore.com>
6266         * lib-xref.adb (Generate_Reference): Add special
6267         case for compiler-generated formals in GNATprove mode.
6269 2014-07-30  Yannick Moy  <moy@adacore.com>
6271         * sem_ch6.adb: Add comments.
6273 2014-07-30  Thomas Quinot  <quinot@adacore.com>
6275         * s-os_lib.ads (GM_Time_Of): Clarify documentation.
6277 2014-07-30  Robert Dewar  <dewar@adacore.com>
6279         * sem_aggr.adb, sem_res.adb: Minor reformatting.
6281 2014-07-30  Thomas Quinot  <quinot@adacore.com>
6283         * sem_ch13.adb (Analyze_Attribute_Definition_Clause, case
6284         Bit_Order): Set Reverse_Bit_Order on the base type of the
6285         specified first subtype.
6287 2014-07-30  Ed Schonberg  <schonberg@adacore.com>
6289         * inline.adb (Expand_Inlined_Call): Use a renaming declaration
6290         to capture the value of actuals of a limited type rather than
6291         an object declaration, to prevent spurious errors when analyzing
6292         the inlined body.
6294 2014-07-30  Ed Schonberg  <schonberg@adacore.com>
6296         * sem_ch4.adb (Analyze_Type_Conversion): Treat an inlined body
6297         as an instance, and inhibit semantic checks on already analyzed
6298         code to prevent spurious errors.
6300 2014-07-30  Arnaud Charlet  <charlet@adacore.com>
6302         * a-exctra.ads ("="): New function, to restore compatibility.
6304 2014-07-30  Pascal Obry  <obry@adacore.com>
6306         * adaint.c (__gnat_to_os_time): Set isdst to -1 for the mktime
6307         routine to use the OS dst setting.
6309 2014-07-30  Pat Rogers  <rogers@adacore.com>
6311         * gnat_ugn.texi: Minor correction to description of -gnatw.K.
6313 2014-07-30  Ed Schonberg  <schonberg@adacore.com>
6315         * sem_util.adb (Wrong_Type): Disable some checks equally within
6316         instances and within inlined bodies, to suppress spurious type
6317         errors on already analyzed code.
6318         * sem_aggr.adb (Check_Expr_OK_In_Limited_Aggregate): Expression
6319         is legal in an inlined body, juts as it is in an instance body.
6321 2014-07-30  Ed Schonberg  <schonberg@adacore.com>
6323         * sem_res.adb (Resolve_Unchecked_Conversion): Within an inlined
6324         body the operand of an unchecked conversion may be a literal, in
6325         which case its type is the target type of the conversion. This
6326         is in contrast to conversions in other contexts, where the
6327         operand cannot be a literal and must be resolvable independent
6328         of the context.
6330 2014-07-30  Pierre-Marie Derodat  <derodat@adacore.com>
6332         * gcc-interface/decl.c (gnat_to_gnu_entity) <object>: Create a
6333         mere scalar constant instead of a reference for a renaming of
6334         scalar literal.
6335         * gcc-interface/utils.c (renaming_from_generic_instantiation_p): New.
6336         * gcc-interface/gigi.h (renaming_from_generic_instantiation_p): New.
6338 2014-07-30  Robert Dewar  <dewar@adacore.com>
6340         * s-tasuti.adb, s-tasuti.ads, einfo.ads, sem_prag.adb, s-taasde.adb,
6341         g-socthi-vms.adb, s-taprop-mingw.adb, s-interr.adb, s-interr-hwint.adb,
6342         g-decstr.adb, s-tasdeb-vms.adb, g-expect-vms.adb, makeutl.adb,
6343         s-interr-vms.adb, g-socthi.adb, exp_aggr.adb, s-tasdeb.adb,
6344         g-awk.adb, gnatls.adb, s-taspri-posix.ads, g-catiio.adb,
6345         s-interr-sigaction.adb, s-os_lib.adb, s-fileio.adb: Minor reformatting
6346         & code reorganization.
6348 2014-07-30  Bob Duff  <duff@adacore.com>
6350         * s-tassta.adb, sem_util.ads: Minor reformatting.
6352 2014-07-30  Yannick Moy  <moy@adacore.com>
6354         * inline.adb (Build_Body_To_Inline): Detect when
6355         subprogram has multiple returns, or not a single last return
6356         statement, in GNATprove mode.
6357         (Cannot_Inline): Simplify logic to handle case of GNATprove
6358         inlining first.
6360 2014-07-30  Ed Schonberg  <schonberg@adacore.com>
6362         * sem_ch6.adb: Stubs are not subject to inlining.
6364 2014-07-30  Bob Duff  <duff@adacore.com>
6366         * s-tasuti.ads, s-tasuti.adb (Make_Independent): Change this
6367         from a procedure to a function, so that it can more easily be
6368         called before the "begin" of a task.
6369         * s-taasde.ads (Delay_Block): Make this type immutably limited,
6370         so we can use a build-in-place function call to initialize
6371         Timer_Queue in the body.
6372         * a-rttiev.adb, s-asthan-vms-alpha.adb, s-asthan-vms-ia64.adb,
6373         * s-interr.adb, s-interr-hwint.adb, s-interr-sigaction.adb,
6374         * s-interr-vms.adb, s-taasde.adb: Each independent task now calls
6375         Make_Independent before reaching its "begin", to avoid race
6376         conditions. This causes the activating task to wait until after
6377         Make_Independent is complete before proceeding.  In addition,
6378         we initialize data structures used by independent tasks before
6379         activating those tasks, to avoid possible use of uninitialized data.
6380         * s-interr.ads, s-intman.ads, s-taspri-posix.ads, s-tasdeb.ads:
6381         Minor comment fixes.
6383 2014-07-30  Bob Duff  <duff@adacore.com>
6385         * a-exctra.ads, s-traent-vms.ads, s-traent.ads (Tracebacks_Array): Move
6386         the declaration of Tracebacks_Array from Ada.Exceptions.Traceback to
6387         System.Traceback_Entries (s-traent.ads and s-traent-vms.ads).  Add
6388         subtypes renaming Tracebacks_Array in Ada.Exceptions.Traceback.
6389         * g-debpoo.adb: Refer to Tracebacks_Array in its new home.
6391 2014-07-30  Arnaud Charlet  <charlet@adacore.com>
6393         * a-tasatt.adb: Remove old comments.
6395 2014-07-30  Yannick Moy  <moy@adacore.com>
6397         * einfo.ads (Is_Inlined): Document new use in GNATprove mode.
6398         * inline.adb (Can_Be_Inlined_In_GNATprove_Mode): Add comments
6399         to explain rationale for inlining or not in GNATprove mode.
6400         (Expand_Inlined_Call): In GNATprove mode, set Is_Inlined flag
6401         to False when inlining is not possible.
6402         * sem_ch6.adb (Analyze_Subprogram_Body_Helper): Set Is_Inlined
6403         flag to indicate that subprogram is fully inlined. To be reversed
6404         if inlining problem is found.
6405         * sem_res.adb (Resolve_Call): Set Is_Inlined flag to False when
6406         call in potentially unevaluated context.
6408 2014-07-30  Jose Ruiz  <ruiz@adacore.com>
6410         * s-tarest.adb, s-tarest.ads: Fix comments.
6412 2014-07-30  Robert Dewar  <dewar@adacore.com>
6414         * exp_attr.adb, checks.adb, sem_util.adb, sem_util.ads, sem_attr.adb:
6415         Change No_Scalar_Parts predicate to Scalar_Part_Present and
6416         invert sense of test. This avoids the "not No_xxx" situation
6417         which is always ugly.
6419 2014-07-30  Ed Schonberg  <schonberg@adacore.com>
6421         * inline.adb (Expand_Inlined_Call): When generating code for
6422         an internal subprogram the expansion uses the location of the
6423         call, so that gdb can skip over it. In GNATprove mode we want to
6424         preserve slocs of original subprogram when expanding an inlined
6425         call, to obtain better warnings, even though subprogram appears
6426         not to come from source if it is the inlining of a subprogram
6427         body without a previous spec.
6429 2014-07-30  Eric Botcazou  <ebotcazou@adacore.com>
6431         * exp_aggr.adb (Aggr_Assignment_OK_For_Backend): Reject array
6432         types with atomic components.
6434 2014-07-30  Thomas Quinot  <quinot@adacore.com>
6436         * Make-generated.in: Remove now unnecessary targets after s-oscons
6437         reorg.
6439 2014-07-30  Yannick Moy  <moy@adacore.com>
6441         * sem_res.adb (Resolve_Call): Use ultimate alias
6442         of callee when available.
6444 2014-07-30  Ed Schonberg  <schonberg@adacore.com>
6446         * sem_ch6.adb (Analyze_Expression_Function): To check whether
6447         an expression function is a completion, use the specification of
6448         the previous declaration, not its entity, which may be internally
6449         generated in an inlined context.
6451 2014-07-30  Doug Rupp  <rupp@adacore.com>
6453         * adaint.c (__gnat_tmp_name) [__ANDROID__]: Default to putting
6454         temp files in /cache directory unless overridden by TMPDIR.
6456 2014-07-30  Jose Ruiz  <ruiz@adacore.com>
6458         * s-tassta.adb, s-tarest.adb (Initialize, Create_Task,
6459         Create_Restricted_Task): Remove redundant check. Number_Of_CPUs returns
6460         type CPU, so it can never be greater than CPU_Range'Last.
6462 2014-07-30  Bob Duff  <duff@adacore.com>
6464         * s-taskin.ads: Minor comment fix.
6466 2014-07-30  Thomas Quinot  <quinot@adacore.com>
6468         * g-socket.adb: Remove now useless WITH, USE, and USE TYPE
6469         clauses.
6471 2014-07-30  Yannick Moy  <moy@adacore.com>
6473         * debug.adb: Free debug flag dQ used for frontend inlining in
6474         GNATprove mode..
6475         * sem_ch6.adb (Analyze_Subprogram_Body_Helper): Remove test of
6476         debug flag..
6478 2014-07-30  Thomas Quinot  <quinot@adacore.com>
6480         * Make-generated.in: Remove generation of s-oscons.ads, only
6481         generate the xoscons utility, in runtime-agnostic rules.
6482         * gcc-interface/Makefile.in: Clean up rules. Remove VMS parts,
6483         no longer supported.
6485 2014-07-30  Bob Duff  <duff@adacore.com>
6487         * exp_ch6.adb (Add_Task_Actuals_To_Build_In_Place_Call): New
6488         parameter Chain to be used in the allocator case.
6489         (Make_Build_In_Place_Call_In_Allocator): If the allocated object
6490         has tasks, wrap the code in a block that will activate them,
6491         including the usual finalization code to kill them off in case
6492         of exception or abort.
6494 2014-07-30  Robert Dewar  <dewar@adacore.com>
6496         * treepr.adb, treepr.ads; Reorganize documentation for new pp routines
6497         Remove renamings (don't work for gdb).
6498         (par): New synonym for p (avoid gdb ambiguities).
6499         * inline.adb, sem_ch6.adb, sem_ch13.adb: Minor reformatting.
6501 2014-07-30  Bob Duff  <duff@adacore.com>
6503         * exp_ch9.ads, sem_prag.adb, exp_ch4.adb, sem_ch13.adb: Minor comment
6504         fixes.
6505         * treepr.ads, treepr.adb (ppp): Make this debugging routine
6506         accept any type covered by Union_Id.
6508 2014-07-30  Robert Dewar  <dewar@adacore.com>
6510         * sem_ch4.adb (Analyze_If_Expression): Resolve condition before
6511         analyzing branches.
6512         * sem_eval.adb (Out_Of_Range): Check for statically unevaluated
6513         expression case.
6515 2014-07-30  Robert Dewar  <dewar@adacore.com>
6517         * sem_ch13.adb (Analyze_Aspect, predicate cases): Diagnose use
6518         of predicate aspect on entity other than a type.
6520 2014-07-30  Ed Schonberg  <schonberg@adacore.com>
6522         * sem_ch6.adb (Body_Has_Contract): New predicate to determine
6523         when a subprogram body without a previous spec cannot be inlined
6524         in GNATprove mode, because it includes aspects or pragmas that
6525         generate a SPARK contract clause.
6526         * inline.adb (Can_Be_Inlined_In_GNATprove_Mode): A subprogram
6527         instance cannot be inlined.
6529 2014-07-30  Robert Dewar  <dewar@adacore.com>
6531         * debug.adb: Document that d7 suppresses compilation time output.
6532         * errout.adb (Write_Header): Include compilation time in
6533         header output.
6534         * exp_intr.adb (Expand_Intrinsic_Call): Add
6535         Compilation_Date/Compilation_Time (Expand_Source_Info): Expand
6536         Compilation_Date/Compilation_Time.
6537         * g-souinf.ads (Compilation_Date): New function
6538         (Compilation_Time): New function.
6539         * gnat1drv.adb (Gnat1drv): Set Opt.Compilation_Time.
6540         * gnat_rm.texi (Compilation_Date): New function
6541         (Compilation_Time): New function.
6542         * opt.ads (Compilation_Time): New variable.
6543         * s-os_lib.ads, s-os_lib.adb (Current_Time_String): New function.
6544         * sem_intr.adb (Compilation_Date): New function.
6545         (Compilation_Time): New function.
6546         * snames.ads-tmpl (Name_Compilation_Date): New entry.
6547         (Name_Compilation_Time): New entry.
6549 2014-07-30  Yannick Moy  <moy@adacore.com>
6551         * inline.adb: Add comment.
6553 2014-07-30  Ed Schonberg  <schonberg@adacore.com>
6555         * par-ch4.adb (Is_Parameterless_Attribute): 'Result is a
6556         parameterless attribute, and a postondition can mention an
6557         indexed component or a slice whose prefix is an attribute
6558         reference F'Result.
6560 2014-07-30  Robert Dewar  <dewar@adacore.com>
6562         * sprint.adb (Sprint_Node_Actual, case Object_Declaration):
6563         Avoid bomb when printing package Standard.
6565 2014-07-30  Ed Schonberg  <schonberg@adacore.com>
6567         * sem_elab.adb (Check_Internal_Call_Continue): If an elaboration
6568         entity is created at this point, ensure that the name of the
6569         flag is unique, because the subprogram may be overloaded and
6570         other homonyms may also have elaboration flags created on the fly.
6572 2014-07-30  Hristian Kirtchev  <kirtchev@adacore.com>
6574         * sem_attr.adb (Analyze_Array_Component_Update): New routine.
6575         (Analyze_Attribute): Major cleanup of attribute
6576         'Update. The logic is now split into two distinct routines
6577         depending on the type of the prefix. The use of <> is now illegal
6578         in attribute 'Update.
6579         (Analyze_Record_Component_Update): New routine.
6580         (Check_Component_Reference): Removed.
6581         (Resolve_Attribute): Remove the return statement and ??? comment
6582         following the processing for attribute 'Update. As a result,
6583         the attribute now freezes its prefix.
6585 2014-07-30  Javier Miranda  <miranda@adacore.com>
6587         * exp_ch4.adb (Apply_Accessibility_Check): Do
6588         not call Base_Address() in VM targets.
6590 2014-07-30  Yannick Moy  <moy@adacore.com>
6592         * gnat1drv.adb (Adjust_Global_Switches): Set
6593         Ineffective_Inline_Warnings to True in GNATprove mode.
6594         * inline.adb (Cannot_Inline): Prepare new semantics for GNATprove
6595         mode of inlining.
6596         * opt.ads (Ineffective_Inline_Warnings): Add comment that
6597         describes use in GNATprove mode.
6598         * sem_prag.adb (Analyze_Pragma|SPARK_Mode): Ignore
6599         pragma when applied to the special body created for inlining.
6601 2014-07-30  Robert Dewar  <dewar@adacore.com>
6603         * inline.adb, exp_ch4.adb, sinput.adb, sem_ch6.adb, sem_ch13.adb:
6604         Minor reformatting.
6606 2014-07-30  Hristian Kirtchev  <kirtchev@adacore.com>
6608         * aspects.ads Add a comment explaining why SPARK 2014 aspects are
6609         not delayed. Update the delay status of most SPARK 2014 aspects.
6610         * sem_ch13.adb (Analyze_Aspect_Specifications): Update all calls
6611         to Decorate_Aspect_And_Pragma and Insert_Delayed_Pragma to refert
6612         to Decorate and Insert_Pragma. Add various comments concerning
6613         the delay status of several SPARK 2014 aspects. The insertion
6614         of Refined_State now uses routine Insert_After_SPARK_Mode.
6615         (Decorate): New routine.
6616         (Decorate_Aspect_And_Pragma): Removed.
6617         (Insert_Delayed_Pragma): Removed.
6618         (Insert_Pragma): New routine.
6620 2014-07-30  Ed Schonberg  <schonberg@adacore.com>
6622         * inline.adb (Expand_Inlined_Call): In GNATprove mode, emit
6623         only a warning, not an error on an attempt to inline a recursive
6624         subprogram.
6626 2014-07-30  Robert Dewar  <dewar@adacore.com>
6628         * g-forstr.adb: Minor code reorganization (use J rather than I
6629         as a variable name).
6630         * gnat_rm.texi, sem_prag.adb, sem_util.adb, sem_ch13.adb,
6631         g-forstr.ads: Minor reformatting.
6633 2014-07-30  Eric Botcazou  <ebotcazou@adacore.com>
6635         * sprint.adb (Set_Debug_Sloc): Also reset the end location if
6636         we are debugging the generated code.
6638 2014-07-30  Yannick Moy  <moy@adacore.com>
6640         * sinput.ads, sinput.adb (Comes_From_Inlined_Body): New function that
6641         returns True for source pointer for an inlined body.
6643 2014-07-30  Javier Miranda  <miranda@adacore.com>
6645         * exp_ch4.adb (Apply_Accessibility_Check): Add
6646         missing calls to Base_Address().
6648 2014-07-30  Ed Schonberg  <schonberg@adacore.com>
6650         * sem_ch6.adb (Hanalyze_Subprogram_Body_Helper): In GNATprove
6651         mode, subprogram bodies without a previous declaration are also
6652         candidates for front-end inlining.
6654 2014-07-30  Hristian Kirtchev  <kirtchev@adacore.com>
6656         * aspects.ads Aspects Async_Readers, Async_Writers,
6657         Effective_Reads and Effective_Writes do not need to be delayed.
6658         * sem_ch13.adb (Analyze_Aspect_Specifications): Propagate the
6659         optional Boolean expression when generating the corresponding
6660         pragma for an external property aspect.
6661         * sem_prag.adb (Analyze_External_Property_In_Decl_Part): Remove
6662         local constant Obj. Add local constant Obj_Id. Reimplement the
6663         check which ensures that the related variable is in fact volatile.
6664         (Analyze_Pragma): Reimplement the analysis of external property pragmas.
6665         * sem_util.adb (Is_Enabled): New routine.
6666         (Variable_Has_Enabled_Property): Reimplement the detection of
6667         an enabled external property.
6669 2014-07-30  Sergey Rybin  <rybin@adacore.com frybin>
6671         * gnat_ugn.texi, vms_data.ads: gnatstub: describe generating subunits
6672         for body stubs.
6674 2014-07-30  Pascal Obry  <obry@adacore.com>
6676         * g-forstr.adb, g-forstr.ads: New.
6677         * gnat_rm.texi, impunit.adb Makefile.rtl: Add new unit
6678         GNAT.Formatted_String.
6680 2014-07-30  Eric Botcazou  <ebotcazou@adacore.com>
6682         * exp_aggr.adb (Aggr_Assignment_OK_For_Backend): New predicate.
6683         (Expand_Array_Aggregate): Also enable in-place expansion for
6684         code generated by the compiler.  For an object declaration,
6685         set the kind of the object in addition to its type.  If an
6686         in-place assignment is to be generated and it can be directly
6687         done by the back-end, do not expand the aggregate.
6688         * fe.h (Is_Others_Aggregate): Declare.
6689         * gcc-interface/trans.c
6690         (gnat_to_gnu) <N_Assignment_Statement>: Add support for an
6691         aggregate with a single Others choice on the RHS by means of
6692         __builtin_memset.  Tidy up.
6694 2014-07-30  Ed Schonberg  <schonberg@adacore.com>
6696         * gnat_rm.texi: minor reformatting.
6698 2014-07-30  Yannick Moy  <moy@adacore.com>
6700         * sem_ch6.adb (Analyze_Subprogram_Helper_Body): Remove body to inline
6701         in SPARK_Mode Off.
6703 2014-07-30  Robert Dewar  <dewar@adacore.com>
6705         * gnat_rm.texi: Document additional implementation-defined use
6706         of Constrained.
6708 2014-07-30  Robert Dewar  <dewar@adacore.com>
6710         * prj-proc.adb, prj-strt.adb: Update comments.
6712 2014-07-30  Gary Dismukes  <dismukes@adacore.com>
6714         * sinfo.ads, einfo.ads, checks.ads: Minor typo fix and reformatting.
6716 2014-07-30  Vincent Celier  <celier@adacore.com>
6718         * prj-proc.adb (Imported_Or_Extended_Project_From): New Boolean
6719         parameter No_Extending, defaulted to False. When No_Extending
6720         is True, do not look for an extending project.
6721         (Expression): For a variable reference that is not for the current
6722         project, get its Id calling Imported_Or_Extended_Project_From
6723         with No_Extending set to True.
6724         * prj-strt.adb (Parse_Variable_Reference): If a referenced
6725         variable is not found in the current project, check if it is
6726         defined in one of the projects it extends.
6728 2014-07-30  Robert Dewar  <dewar@adacore.com>
6730         * sem_util.adb (Predicate_Tests_On_Arguments): Omit tests for
6731         some additional cases of internally generated routines.
6733 2014-07-30  Ed Schonberg  <schonberg@adacore.com>
6735         * sem_ch10.adb (Analyze_Proper_Body): When compiling for ASIS,
6736         if the compilation unit is a subunit, extend optional processing
6737         to all subunits of the current one. This allows gnatstub to
6738         supress generation of spurious bodies.
6740 2014-07-30  Hristian Kirtchev  <kirtchev@adacore.com>
6742         * a-cbmutr.adb (Insert_Child): Use local variable First to keep
6743         track of the initial element's index within the tree.
6745 2014-07-29  Hristian Kirtchev  <kirtchev@adacore.com>
6747         * a-cbmutr.adb (Allocate_Node): Remove the two parameter version.
6748         (Insert_Child): Add local variable First. Capture the index of the
6749         first node being created to ensure correct cursor construction
6750         later on. Use the three parameter version of Allocate_Node
6751         when creating multiple children as this method allows aspect
6752         Default_Value to take effect (if applicable).
6754 2014-07-29  Eric Botcazou  <ebotcazou@adacore.com>
6756         * exp_aggr.adb (Safe_Slice_Assignment): Remove.
6757         (Expand_Array_Aggregate): For a safe slice assignment, just set
6758         the target and use the common code path.
6760 2014-07-29  Robert Dewar  <dewar@adacore.com>
6762         * sem_util.adb, sem_util.ads, sem_res.adb, exp_ch6.adb: Invert
6763         predicate No_Predicate_Test_On_Arguments, new name is
6764         Predicate_Tests_On_Arguments (with the opposite sense).
6766 2014-07-29  Hristian Kirtchev  <kirtchev@adacore.com>
6768         * sem_attr.adb (Resolve_Attribute): Clean up the code for
6769         attribute 'Access. Do not generate an elaboration flag for a
6770         stand alone expression function. The expression of an expression
6771         function is now frozen when the expression function appears as
6772         the prefix of attribute 'Access.
6773         * sem_ch6.adb (Analyze_Expression_Function): Remove local
6774         variable New_Decl and update all references to it after the
6775         rewriting has taken place. Establish the linkages between the
6776         generated spec and body.
6778 2014-07-29  Robert Dewar  <dewar@adacore.com>
6780         * sem_prag.adb (ip, rv): Prevent from being optimized away.
6781         * gnatls.adb (gnatls): Set E_Fatal exit status if ali file not found.
6782         * s-imgllb.adb, s-imgllw.adb, s-imgwiu.adb, s-imgbiu.adb: Minor
6783         reformatting.
6785 2014-07-29  Vincent Celier  <celier@adacore.com>
6787         * prj-pp.adb: Minor comment update.
6788         * frontend.adb: If a target dependency info file has been read
6789         through switch -gnateT= add it to the dependencies of the source
6790         being compiled.
6792 2014-07-29  Robert Dewar  <dewar@adacore.com>
6794         * sem_ch3.adb, prj.adb: Minor reformatting.
6796 2014-07-29  Vincent Celier  <celier@adacore.com>
6798         * prj-pp.adb (Pretty_Print.Output_Project_File): New
6799         procedure to output project file names between quotes without
6800         concatenation, even if the line is too long.
6801         (Pretty_Print): Use Output_Project_File for project being extended and
6802         project imported.
6804 2014-07-29  Vincent Celier  <celier@adacore.com>
6806         * gnat_ugn.texi: Document that configuration pragmas files are
6807         added to the dependencies, unless they contain only pragmas
6808         Source_File_Name_Project.
6810 2014-07-29  Robert Dewar  <dewar@adacore.com>
6812         * frontend.adb: Minor reformatting.
6814 2014-07-29  Robert Dewar  <dewar@adacore.com>
6816         * exp_ch6.adb (Add_Call_By_Copy_Code): Minor reformatting
6817         (Expand_Actuals): Make sure predicate checks are properly applied
6818         for the case of OUT or IN OUT parameters.
6819         * sem_res.adb: Minor reformatting (Resolve_Actuals): Skip
6820         predicate tests on arguments for Finalize
6821         * sem_util.adb (No_Predicate_Test_On_Arguments): Returns True
6822         if predicate tests on subprogram arguments should be skipped.
6823         * sem_util.ads (No_Predicate_Test_On_Arguments): New function
6825 2014-07-29  Ed Schonberg  <schonberg@adacore.com>
6827         * sem_ch3.adb (Analyze_Object_Declaration): If there is an address
6828         clause for the object and the expression is an aggregate, defer
6829         resolution and expansion of the aggregate until the freeze point
6830         of the entity.
6831         * sem_aggr.adb (Resolve_Aggregate): An others_clause is legal if
6832         the parent node is an N_Reference generated during expansion.
6834 2014-07-29  Vincent Celier  <celier@adacore.com>
6836         * prj.adb (Add_To_Buffer): Effectively double the size of the buffer.
6838 2014-07-29  Robert Dewar  <dewar@adacore.com>
6840         * frontend.adb, inline.adb, sem_util.adb, sem_res.adb,
6841         prepcomp.ads: Minor reformatting and code clean up.
6842         * exp_ch6.adb (Expand_Actuals): Generate predicate test
6843         unconditionally for case of OUT or IN OUT actual (before this
6844         was generated only for certain subcases, which is wrong, the
6845         test is always needed).
6847 2014-07-29  Ed Schonberg  <schonberg@adacore.com>
6849         * sem_ch3.adb: Move Has_Defaulted_Discriminants to sem_util.
6850         * sem_ch4.adb (Analyze_Allocator): Defer resolution of expression
6851         until context type is available.
6852         * sem_res.adb (Resolve_Allocator): In the case of a qualified
6853         expression, complete resolution of expression.
6854         (Check_Aliased_Parameter): New procedure within Resolve_Actuals,
6855         to apply Ada2012 checks on aliased formals, as well as
6856         accesibility checks when the context of the call is an allocator
6857         or a qualified expression.
6858         * sem_util.ads, sem_util.adb (Has_Defaulted_Discriminants):
6859         Moved here from sem_ch3.
6860         (Object_Access_Level): Handle properly aliased formals and
6861         aggregates.
6862         * exp_ch6.adb (Expand_Call): Remove check on aliased parameters,
6863         now properly performed in sem_res (Resolve_Actuals,
6864         Check_Aliased_Parameter).
6866 2014-07-29  Yannick Moy  <moy@adacore.com>
6868         * debug.adb Enable GNATprove inlining under debug flag -gnatdQ for now.
6869         * inline.ads, inline.adb (Can_Be_Inlined_In_GNATprove_Mode): New
6870         function to decide when a subprogram can be inlined in GNATprove mode.
6871         (Check_And_Build_Body_To_Inline): Include GNATprove_Mode as a
6872         condition for possible inlining.
6873         * sem_ch10.adb (Analyze_Compilation_Unit): Remove special case
6874         for Inline_Always in GNATprove mode.
6875         * sem_ch6.adb (Analyze_Subprogram_Body_Helper): Build inlined
6876         body for subprograms in GNATprove mode, under debug flag -gnatdQ.
6877         * sem_prag.adb Minor change in comments.
6878         * sem_res.adb (Resolve_Call): Only perform GNATprove inlining
6879         inside subprograms marked as SPARK_Mode On.
6880         * sinfo.ads: Minor typo fix.
6882 2014-07-29  Vincent Celier  <celier@adacore.com>
6884         * frontend.adb: Add dependency on gnat.adc when taken into account
6885         and on non-temporary configuration pragmas files specified in
6886         switches -gnatec.
6887         * prepcomp.ads, prepcomp.adb (Add_Dependency): New procedure to add
6888         dependencies on configuration pragmas files.
6890 2014-07-29  Pat Rogers  <rogers@adacore.com>
6892         * gnat_ugn.texi: Minor clarification to the explanation for the
6893         GNATtest -v switch.
6895 2014-07-29  Robert Dewar  <dewar@adacore.com>
6897         * types.ads (Mechanism_Type): Change range back to -18 .. Int'Last with
6898         documentation that explains the need for this extended range
6899         (use by C_Pass_By_Copy).
6901 2014-07-29  Robert Dewar  <dewar@adacore.com>
6903         * gnat_rm.texi, sem_prag.adb: Minor reformatting.
6905 2014-07-29  Sergey Rybin  <rybin@adacore.com frybin>
6907         * gnat_ugn.texi: gnatmetric: clarify documentation for cyclomatic
6908         complexity metrics.
6910 2014-07-29  Thomas Quinot  <quinot@adacore.com>
6912         PR ada/60652
6913         * s-oscons-tmplt.c: For Linux, define _BSD_SOURCE in order for
6914         CRTSCTS to be visible.
6916 2014-07-29  Bob Duff  <duff@adacore.com>
6918         * g-trasym.adb, g-trasym.ads: Code cleanup.
6920 2014-07-29  Doug Rupp  <rupp@adacore.com>
6922         * sigtramp-vxworks.c: Minor reformatting.
6924 2014-07-29  Ed Schonberg  <schonberg@adacore.com>
6926         * gnat_rm.texi: No doc needed for Ada2012 aspect
6927         Implicit_dereference.
6929 2014-07-29  Robert Dewar  <dewar@adacore.com>
6931         * sem_attr.adb (Attribute_12): New array
6932         (Analyze_Attribute): Check impl-defined Ada 2012 attributes.
6933         (Check_Ada_2012_Attribute): Removed.
6935 2014-07-29  Doug Rupp  <rupp@adacore.com>
6937         * init.c (vxworks6): Call sigtramp for RTP (as well as DKM) for ARM,
6938         PPC, and e500.
6939         * sigtramp-vxworks.c: New file.
6940         * sigtramp-armvxw.c, sigtramp-ppcvxw.c: removed files.
6942 2014-07-29  Ed Schonberg  <schonberg@adacore.com>
6944         * lib-xref.adb (Output_Refs, Check_Type_Reference): For a
6945         derived array type, add information about component type, which
6946         was previously missing in ali file.
6947         * gnat_rm.texi: Add documentation for Atomic_Always_Lock_Free.
6949 2014-07-29  Thomas Quinot  <quinot@adacore.com>
6951         * sem_ch3.adb (Constrain_Corresponding_Record): For the case
6952         of the subtype created for a record component, do not mark
6953         the subtype as frozen. For one thing, this is anomalous (in
6954         particular, the base type might not itself be frozen yet);
6955         furthermore, proper freezing of the subtype must happen in any
6956         case. So, we just mark the subtype as requiring delayed freezing
6957         (and we'll actually freeze it when generating the init_proc of
6958         the enclosing record).
6959         Also change the name of the constrained record subtype (append a
6960         'C' so that it is clearly different from the unconstrained record
6961         type, "related_idV") to make debugging easier.
6962         (Process_Full_View): When creating a full subtype for a pending
6963         private subtype, re-establish the scope of the private subtype
6964         so that we get proper visibility on outer discriminants.
6965         * exp_ch3.adb (Build_Init_Statements): Freeze any component
6966         subtype that is not frozen yet.
6968 2014-07-29  Vincent Celier  <celier@adacore.com>
6970         * prj-proc.adb (Recursive_Process): Always initialize the
6971         environment when the project is an aggregate project, even when
6972         it is not the root tree.
6973 2014-07-29  Robert Dewar  <dewar@adacore.com>
6975         * exp_ch5.adb, exp_ch9.adb: Minor comment additions.
6976         * gnat_rm.texi: Complete list of implementation aspects.
6977         * aspects.ads: Minor comment clarification.
6979 2014-07-29  Ed Schonberg  <schonberg@adacore.com>
6981         * exp_ch5.adb (Expand_N_Assignment_Statement): If the target type
6982         is a null-excluding access type, do not generate a constraint
6983         check if Suppress_Assignment_Checks is set on assignment node.
6984         * exp_ch9.adb (Build_Simple_Entry_Call): If actual is an out
6985         parameter of a null-excluding access type, there is access check
6986         on entry, so set Suppress_Assignment_Checks on generated statement
6987         that assigns actual to parameter block.
6988         * sinfo.ads: Document additional use of Suppress_Assignment_Checks.
6990 2014-07-29  Robert Dewar  <dewar@adacore.com>
6992         * gnat_rm.texi: Change theta to @ in documentation of aspect
6993         Dimension_System.
6995 2014-07-29  Robert Dewar  <dewar@adacore.com>
6997         * sem_attr.adb (Uneval_Old_Msg): Flags Uneval_Old_Accept/Warn
6998         are now on pragma.
6999         * sem_ch13.adb (Analyze_Aspect_Specifications): Remove setting
7000         of Uneval_Old_*
7001         * sem_prag.adb (Analyze_Pragma): Set Uneval_Old_* flags
7002         * sinfo.ads, sinfo.adb: Move Uneval_Old_Accept/Warn to N_Pragma node.
7004 2014-07-29  Javier Miranda  <miranda@adacore.com>
7006         * types.ads Update documentation on how to add new reason codes
7007         for exceptions.
7008         (RT_Exception_Code): Keep values ordered by their
7009         reason code.  Required by the .NET backend.
7010         (RT_CE_Exceptions): Subtype declaration removed.
7011         (RT_PE_Exceptions): Subtype declaration removed.
7012         (RT_SE_Exceptions): Subtype declaration removed.
7013         (Kind): New mapping table of RT_Exception_Codes.
7014         * exp_ch11.adb (Get_RT_Exception_Entity): Updated to use the
7015         new mapping table.
7016         * tbuild.adb (Make_Raise_Storage_Error): Updated to use the new
7017         mapping table.  (Make_Raise_Program_Error): Updated to use the
7018         new mapping table.
7019         (Make_Raise_Storage_Error): Updated to use the new mapping table.
7020         * a-except.adb Keep Rcheck_CE_xxx entities ordered according to
7021         their reason code.
7023 2014-07-29  Thomas Quinot  <quinot@adacore.com>
7025         * gnat_rm.texi: Document internal attributes used for PolyORB/DSA
7026         distributed stubs generation.
7027         * exp_ch3.adb: Minor reformatting.
7029 2014-07-29  Yannick Moy  <moy@adacore.com>
7031         * sinfo.ads: Document constraint between frontend and GNATprove.
7033 2014-07-29  Robert Dewar  <dewar@adacore.com>
7035         * a-except.adb: Minor comment clarification.
7037 2014-07-29  Robert Dewar  <dewar@adacore.com>
7039         * gnat_rm.texi: Complete list of implementation attributes.
7040         * snames.ads-tmpl: Clean up list of impl-defined attributes.
7042 2014-07-29  Hristian Kirtchev  <kirtchev@adacore.com>
7044         * freeze.adb (Freeze_Record_Type): Perform various
7045         volatility-related checks.
7047 2014-07-29  Robert Dewar  <dewar@adacore.com>
7049         * sem_ch3.adb, sem_eval.adb: Minor reformatting.
7051 2014-07-29  Ed Schonberg  <schonberg@adacore.com>
7053         * sem_attr.adb: sem_attr.adb (Access_Attribute): Handle properly
7054         the case where the attribute reference appears in a nested scope
7055         from that of the subprogram prefix.
7056         * sem_attr.adb: Minor reformatting.
7058 2014-07-29  Robert Dewar  <dewar@adacore.com>
7060         * gnat_ugn.texi: Clarify documentation of Initialize_Scalar
7061         initialization options.
7063 2014-07-29  Robert Dewar  <dewar@adacore.com>
7065         * sinfo.ads: Minor comment addition.
7067 2014-07-29  Bob Duff  <duff@adacore.com>
7069         * sem_eval.adb, sem_ch13.adb: Minor reformatting.
7071 2014-07-29  Doug Rupp  <rupp@adacore.com>
7073         * init.c: Complete previous change.
7075 2014-07-29  Robert Dewar  <dewar@adacore.com>
7077         * exp_ch4.adb (Expand_N_If_Expression): Deal with unconstrained
7078         array case.
7080 2014-07-29  Ed Schonberg  <schonberg@adacore.com>
7082         * sem_attr.adb (Access_Attribute): If the prefix is a subprogram
7083         and the completion will appear in the same declarative part,
7084         create elaboration flag.
7085         * exp_util.adb (Set_Elaboration_Flag): If the subprogram body
7086         is a completion of a declaration in the same declarative part,
7087         and the subprogram has had its address taken, add elaboration
7088         check inside the subprogram body, to detect elaboration errors
7089         that may occur through indirect calls.
7091 2014-07-29  Doug Rupp  <rupp@adacore.com>
7093         * sigtramp-armvxw.c: Enhance to handle RTP trampolining.
7094         * init.c: Remove guard on sigtramp for ARM VxWorks RTP.
7096 2014-07-29  Vincent Celier  <celier@adacore.com>
7098         * switch-c.adb (Scan_Front_End_Switches): Do not fail when two
7099         runtime directorie specified with two switches --RTS= designate
7100         the same directory, even when there are no literarily the same.
7102 2014-07-29  Robert Dewar  <dewar@adacore.com>
7104         * gnat_ugn.texi: Minor documentation clarification.
7105         * switch-c.adb: Minor reformatting.
7107 2014-07-29  Robert Dewar  <dewar@adacore.com>
7109         * sem_prag.adb (Analyze_Pragma, case Allow_Integer_Address):
7110         Fix incorrect RTE call which caused bomb if pragma was in
7111         configuration pragma file.
7113 2014-07-29  Jerome Lambourg  <lambourg@adacore.com>
7115         * expect.c (__gnat_expect_poll): Fix typo in previous change.
7116         * g-expect.adb: Update comments.
7118 2014-07-29  Arnaud Charlet  <charlet@adacore.com>
7120         * s-parame-hpux.ads, s-parame-vms-ia64.ads, s-parame.ads
7121         (Default_Attribute_Count): Bump to 16 on native platforms.
7123 2014-07-29  Ed Schonberg  <schonberg@adacore.com>
7125         * sem_res.adb: Add guard to front-end inlining for SPARK.
7127 2014-07-29  Robert Dewar  <dewar@adacore.com>
7129         * sem_ch10.adb, debug.adb, sem_prag.adb, sem_res.adb, sem_ch6.adb:
7130         Minor reformatting.
7132 2014-07-29  Ed Schonberg  <schonberg@adacore.com>
7134         * sem_ch6.adb (Analyze_Subprogram_Body_Helper): Build body to
7135         inline in GNATprove mode when subprogran is marked Inline_Always.
7136         * sem_res.adb (Resolve_Call): Expand call in place in GNATProve
7137         mode if body to inline is available.
7138         * sem_prag.adb (Analyze_Pragma, case Inline_Always): Make pragma
7139         effective in GNATprove mode.
7140         * sem_ch10.adb (Analyze_Compilation_Unit): Call
7141         Check_Package_Body_For_Inlining in GNATprove mode, so that body
7142         containing subprograms with Inline_Always can be available before
7143         calls to them.
7145 2014-07-29  Ed Schonberg  <schonberg@adacore.com>
7147         * inline.ads, inline.adb, sem_ch10.adb: Rename Check_Body_For_Inlining
7148         to Check_Package_Body_For_Inlining, to prevent confusion with other
7149         inlining subprograms.
7151 2014-07-29  Robert Dewar  <dewar@adacore.com>
7153         * opt.ads: Minor comment update.
7154         * sem_attr.adb (Uneval_Old_Msg): Deal with case of aspect, where
7155         we want setting of Uneval_Old at time of encountering the aspect.
7156         * sem_ch13.adb (Analyze_Aspect_Specifications): Capture setting
7157         of Opt.Uneval_Old.
7158         * sinfo.adb (Uneval_Old_Accept): New function (Uneval_Old_Warn):
7159         New function (Set_Uneval_Old_Accept): New procedure.
7160         (Set_Uneval_Old_Warn): New procedure.
7161         * sinfo.ads: Uneval_Old_Accept: New flag Uneval_Old_Warn: New flag.
7163 2014-07-29  Robert Dewar  <dewar@adacore.com>
7165         * sinfo.ads, inline.adb, inline.ads, sem_ch6.adb: Minor reformatting.
7166         * snames.ads-tmpl: Minor reformatting.
7167         * xsnamest.adb (XSnamesT): Remove special casing of Name_Error
7168         to give <Error>.  Not clear why this was there, but the compiler
7169         sources do not reference Name_Error, and this interfered with
7170         the circuits for pragma Unevaluated_Use_Of_Old.
7172 2014-07-29  Hristian Kirtchev  <kirtchev@adacore.com>
7174         * sem_prag.adb (Process_Atomic_Shared_Volatile): Allow volatile
7175         types in SPARK 2014 (again).
7176         * sem_res.adb (Is_OK_Volatile_Context): New routine.
7177         (Resolve_Entity_Name): Ensure that a volatile object with
7178         enabled properties Async_Writers or Effectire_Reads appears in
7179         a non-interfering context.
7181 2014-07-29  Ed Schonberg  <schonberg@adacore.com>
7183         * sem_ch6.adb: Move Build_Body_To_Inline,
7184         Check_And_Buid_Body_To_Inline, and Cannot_Inline to package Inline.
7185         * exp_ch6.adb: Mode Expand_Inlined_Body to package Inline.
7186         * inline.ads, inline.adb: Package now contains subprograms that
7187         implement front-end inlining.  No functional changes, no test
7188         needed.
7190 2014-07-29  Robert Dewar  <dewar@adacore.com>
7192         * exp_dbug.adb, g-expect.adb, sem_elab.adb: Minor typo fix.
7194 2014-07-29  Ed Schonberg  <schonberg@adacore.com>
7196         * sem_ch6.adb (Analyze_Return_Type): Reject a return type that
7197         is a limited view when the context is a package body, because
7198         there is no subsequent place at which the non-limited view may
7199         become visible.
7200         (Process_Formals): Ditto.
7201         * sinfo.ads, par-ch3.adb: Minor reformatting.
7203 2014-07-29  Jerome Lambourg  <lambourg@adacore.com>
7205         * expect.c (__gnat_expect_poll): New parameter dead_process
7206         used to return the dead process among the array of file
7207         descriptors. The Windows, VMS and HPUX implementations now
7208         properly report the dead process via this parameter. Other unixes
7209         don't need it.
7210         * g-expect.adb (Poll): Adapt to the C profile.
7211         (Expect_Internal): Use the new parameter to properly close the
7212         File Descriptor.  This then can be properly reported by the
7213         function First_Dead_Process as is expected.
7215 2014-07-29  Robert Dewar  <dewar@adacore.com>
7217         * gnat_ugn.texi: Minor clarification of -gnatQ switch.
7219 2014-07-29  Robert Dewar  <dewar@adacore.com>
7221         * einfo.adb (Derived_Type_Link): New function
7222         (Set_Derived_Type_Link): New procedure.
7223         (Write_Field31_Name): Output Derived_Type_Link.
7224         * einfo.ads: New field Derived_Type_Link.
7225         * exp_ch6.adb (Expand_Call): Warn if change of representation
7226         needed on call.
7227         * sem_ch13.adb: Minor addition of ??? comment.
7228         (Rep_Item_Too_Late): Warn on case that is legal but could cause an
7229         expensive implicit conversion.
7230         * sem_ch3.adb (Build_Derived_Type): Set Derived_Type_Link if needed.
7232 2014-07-29  Hristian Kirtchev  <kirtchev@adacore.com>
7234         * exp_ch3.adb (Build_Init_Procedure): Renamed Local_DF_Id
7235         to DF_Id. Add new local variable DF_Call. Do not perform any
7236         elaboration-related checks on the call to the partial finalization
7237         routine within an init proc to avoid generating bogus elaboration
7238         warnings on expansion-related code.
7239         * sem_elab.adb (Check_A_Call): Move constant Access_Case to
7240         the top level of the routine.  Ensure that Output_Calls takes
7241         into account flags -gnatel and -gnatwl when emitting warnings
7242         or info messages.
7243         (Check_Internal_Call_Continue): Update the call to Output_Calls.
7244         (Elab_Warning): Moved to the top level of routine Check_A_Call.
7245         (Emit): New routines.
7246         (Output_Calls): Add new formal parameter Check_Elab_Flag along with a
7247         comment on usage. Output all warnings or info messages only when the
7248         caller context demands it and the proper elaboration flag is set.
7250 2014-07-29  Yannick Moy  <moy@adacore.com>
7252         * sem_attr.adb (Analyze_Attribute/Attribute_Old):
7253         Check rule about Old appearing in potentially unevaluated
7254         expression everywhere, not only in Post.
7256 2014-07-29  Arnaud Charlet  <charlet@adacore.com>
7258         * sem_prag.adb: Update comment.
7259         * a-except.adb, a-except-2005.adb: Minor editing.
7261 2014-07-29  Pierre-Marie Derodat  <derodat@adacore.com>
7263         * exp_dbug.adb (Debug_Renaming_Declaration):
7264         Do not create renaming entities for renamings of non-packed
7265         objects and for exceptions.
7267 2014-07-29  Robert Dewar  <dewar@adacore.com>
7269         * sem_ch3.adb, sinfo.ads, types.ads, sem_prag.adb, a-except-2005.adb,
7270         sem_ch6.adb, par-ch3.adb: Minor reformatting.
7272 2014-07-29  Ed Schonberg  <schonberg@adacore.com>
7274         * sem_ch6.adb (Check_Return_Subtype_Indication): Reject a return
7275         subtype indication in an extended return statement when the
7276         return value is an ancestor of the return type of the function,
7277         and that return type is a null record extension.
7279 2014-07-29  Thomas Quinot  <quinot@adacore.com>
7281         * sem_ch13.adb (Rep_Item_Too_Late): Specialize/clarify error
7282         message produced for the case of a type-related representation
7283         item that is made illegal by 13.10(1).
7284         * gnat_rm.texi (Scalar_Storage_Order): Minor change in
7285         documentation.
7287 2014-07-29  Robert Dewar  <dewar@adacore.com>
7289         * gnat_ugn.texi: Add section on Wide_Wide_Character encodings.
7290         * erroutc.adb (Output_Error_Msgs): Take wide characters into
7291         account in computing position of error flags.
7292         * sinput.adb (Get_Column_Number): Take wide characters into
7293         account.
7295 2014-07-29  Ed Schonberg  <schonberg@adacore.com>
7297         * par-ch3.adb (P_Access_Type_Definition): The subtype indication
7298         in an access type definition can carry a null_exclusion indicator.
7299         * sem_ch3.adb (Access_Type_Declaration): If the subtype indication
7300         carries a null_exclusion indicator, verify that the subtype
7301         indication denotes an access type, and create a null-excluding
7302         subtype for it.
7303         * sinfo.ads, sinfo.adb: New attribute Null_Excluding_Subtype,
7304         defined on N_Access_To_Object_Definition to indicate that the
7305         subtype indication carries a null_exclusion indicator.
7307 2014-07-29  Hristian Kirtchev  <kirtchev@adacore.com>
7309         * exp_ch6.adb (Add_Extra_Actual): Do not construct
7310         the extra actual by name, generate a reference instead.
7312 2014-07-29  Arnaud Charlet  <charlet@adacore.com>
7314         * sem_prag.adb (Analyze_Pragma): Do not crash analyzing
7315         Allow_Integer_Address if already set.
7316         * a-except-2005.adb (Rcheck_PE_Stream_Operation_Not_Allowed):
7317         Fix order, for consistency with Rmsg_xx declarations.
7319 2014-07-29  Ed Schonberg  <schonberg@adacore.com>
7321         * sem_ch4.adb (Complete_Object_Operation): If the type of the
7322         candidate subprogram is a limited view, use non-limited view
7323         when available.
7325 2014-07-29  Robert Dewar  <dewar@adacore.com>
7327         * sem_ch13.adb: Minor change in RM reference.
7328         * sem_mech.ads: Minor reformatting.
7329         * einfo.ads: Minor comment fix.
7330         * types.ads: Minor correction to range given for Mechanism_Type.
7331         * exp_ch6.adb (Add_Invariant_And_Predicate_Checks): Do not
7332         check predicate on way out for OUT or IN OUT parameters.
7333         * par-ch3.adb (P_Constraint_Opt): Handle missing RANGE keyword
7334         better (P_Range_Constraint): Corresponding fix.
7335         * checks.ads: Minor comment clarification.
7337 2014-07-29  Gary Dismukes  <dismukes@adacore.com>
7339         * sem_ch8.adb (Analyze_Object_Renaming): Set the Is_Volatile
7340         and Treat_As_Volatile flags based on whether the renamed object
7341         is a volatile object.
7343 2014-07-29  Olivier Hainque  <hainque@adacore.com>
7345         * g-debpoo.adb
7346         (Default_Alignment): Rename as Storage_Alignment. This is not
7347         a "default" that can be overriden. Augment comment to clarify
7348         intent and document why we need to manage alignment padding.
7349         (Header_Offset): Set to Header'Object_Size instead of 'Size
7350         rounded up to Storage_Alignment. Storage_Alignment on the
7351         allocation header is not required by our internals so was
7352         overkill. 'Object_Size is enough to ensure proper alignment
7353         of the header address when substracted from a storage address
7354         aligned on Storage_Alignment.
7355         (Minimum_Allocation): Rename as Extra_Allocation, conveying that
7356         this is always added on top of the incoming allocation requests.
7357         (Align): New function, to perform alignment rounding operations.
7358         (Allocate): Add comments on the Storage_Address computation
7359         scheme and adjust so that the alignment padding applies to that
7360         (Storage_Address) only.
7362 2014-07-29  Robert Dewar  <dewar@adacore.com>
7364         * exp_ch3.adb (Default_Initialize_Object): Remove incorrect
7365         pragma Unreferenced.
7366         * cstand.adb (Create_Standard): Use E_Array_Type for standard
7367         string types. Make sure index of Any_String/Any_Array is in a list.
7368         * errout.adb: Minor reformatting.
7370 2014-07-29  Robert Dewar  <dewar@adacore.com>
7372         * gnat_ugn.texi: Clean up and correct documentation of warnings.
7373         * usage.adb: Minor corrections to make sure warnings are properly
7374         documented.
7375         * warnsw.adb (Set_Warning_Switch): Remove redundant return statement.
7376         (WA_Warnings): Add Warn_On_Suspicious_Modulus_Value.
7378 2014-07-29  Ed Schonberg  <schonberg@adacore.com>
7380         * exp_ch3.adb (Expand_N_Object_Declaration): The dummy block
7381         created to match internal sequence numbers between compilations
7382         with/without abort must have its type properly set.
7384 2014-07-29  Robert Dewar  <dewar@adacore.com>
7386         * ali.adb (Initialize_ALI): Initialize SSO_Default_Specified
7387         (Scan_ALI): Set SSO_Default in ALIs_Record (Scan_ALI): Set
7388         SSO_Default_Specified.
7389         * ali.ads (ALIs_Record): Add field SSO_Default
7390         (SSO_Default_Specified): New global switch.
7391         * bcheck.adb (Check_Consistent_SSO_Default): New procedure
7392         (Check_Configuration_Consistency): Call this procedure
7393         * einfo.adb (SSO_Set_High_By_Default): New
7394         function (SSO_Set_Low_By_Default): New function
7395         (Set_SSO_Set_High_By_Default): New procedure
7396         (Set_SSO_Set_Low_By_Default): New procedure (Write_Entity_Flags):
7397         List new flags
7398         * einfo.ads (SSO_Set_Low_By_Default): New flag
7399         (SSO_Set_High_By_Default): New flag
7400         * freeze.adb (Set_SSO_From_Default): New procedure
7401         (Freeze_Array_Type): Call Set_SSO_From_Default
7402         (Freeze_Record_Type): Call Set_SSO_From_Default
7403         * gnat_rm.texi: Document pragma Default_Scalar_Storage_Order
7404         * lib-writ.adb (Write_ALI): Set OL/OH in P line as needed
7405         * lib-writ.ads: Add OL/OH parameters to P line
7406         * opt.adb: Set Default_SSO, Default_SSO_Config as appropriate
7407         * opt.ads (Default_SSO): New global switch (Default_SSO_Config):
7408         New global switch
7409         * repinfo.adb (List_Scalar_Storage_Order): List SSO when it is
7410         set by default using pragma Default_Scalar_Storage_Order.
7411         * sem.ads (Scope_Stack_Entry): Add component Save_Default_SSO
7412         * sem_ch13.adb (Inherit_Delayed_Rep_Aspects):
7413         Clear SSO defaults when explicit SSO is inherited.
7414         (Analyze_Attribute_Definition_Clause): Clear SSO defaults when
7415         explicit SSO is specified.
7416         (Inherit_Aspects_At_Freeze_Point):
7417         Clear SSO default when inheriting SSO.
7418         * sem_ch3.adb (Set_Default_SSO): New procedure
7419         (Analyze_Private_Extension_Declaration): Set defualt SSO
7420         (Array_Type_Declaration): ditto (Build_Derived_Array_Type): ditto
7421         (Build_Derived_Private_Type): ditto (Build_Derived_Record_Type):
7422         ditto (Build_Derived_Type): ditto (Make_Class_Wide_Type): ditto
7423         (Record_Type_Declaration): ditto
7424         * sem_ch8.adb (Pop_Scope): Restore Default_SSO (Push_Scope):
7425         Save Default_SSO
7426         * sem_prag.adb (Analyze_Pragma, case
7427         Default_Scalar_Storage_Order): Set Default_SSO
7429 2014-07-29  Ed Schonberg  <schonberg@adacore.com>
7431         * sem_ch6.adb (Valid_Operator_Definition): Verify that
7432         all parameter have mode IN. This check must be done here for
7433         subprogram instantiations that have operator names, because their
7434         analysis does not follow the same path as that for subprogram
7435         declarations.
7437 2014-07-29  Robert Dewar  <dewar@adacore.com>
7439         * freeze.adb (Freeze_Entity, Concurrent_Type case): Add a guard
7440         to make sure that the Etype of a component of the corresponding
7441         record type is present before trying to freeze it.
7442         * sem_ch5.adb: Minor reformatting.
7444 2014-07-29  Robert Dewar  <dewar@adacore.com>
7446         * exp_attr.adb, types.ads, types.h, exp_ch11.adb, a-except.adb,
7447         a-except-2005.adb: Add new reason code PE_Stream_Operation_Not_Allowed,
7448         and then use it when a stream operation is used from a library generic
7449         when the restriction (No_Streams) is active.
7451 2014-07-29  Thomas Quinot  <quinot@adacore.com>
7453         * projects.texi: Fix minor typo.
7455 2014-07-29  Yannick Moy  <moy@adacore.com>
7457         * sem_attr.adb (Analyze_Attribute): Fix generation of warning.
7459 2014-07-29  Arnaud Charlet  <charlet@adacore.com>
7461         * sem_ch5.adb (Check_Unreachable_Code): Do not remove code in
7462         CodePeer mode.
7464 2014-07-29  Hristian Kirtchev  <kirtchev@adacore.com>
7466         * exp_ch7.adb (Find_Last_Init): Add local variable
7467         Deep_Init_Found. Check the statement immediately following the
7468         declaration if [Deep_]Initialization was not found.
7470 2014-07-29  Hristian Kirtchev  <kirtchev@adacore.com>
7472         * exp_util.adb (Is_Aliased): It appears that
7473         'reference-d and renamed objects still play some role in Boolean
7474         expression with actions and cannot be finalized immediately.
7476 2014-07-29  Ed Schonberg  <schonberg@adacore.com>
7478         * exp_dbug.adb (Qualify_Needed):  For debugging purposes,
7479         Loop names are not part of the full qualification of entity names.
7481 2014-07-29  Robert Dewar  <dewar@adacore.com>
7483         * einfo.adb (Has_Protected): Test base type.
7484         * sem_ch4.adb (Analyze_Allocator): Reorganize code to make sure
7485         that we always properly check No_Protected_Type_Allocators.
7487 2014-07-29  Ed Schonberg  <schonberg@adacore.com>
7489         * sem_util.ads, sem_util.adb (Defining_Entity): Now applies to
7490         loop declarations as well.
7491         * exp_ch5.adb (Expand_Loop_Statement): Apply Qualify_Entity_Names
7492         to an iterator loop, because it may contain local renaming
7493         declarations that require debugging information.
7495 2014-07-29  Robert Dewar  <dewar@adacore.com>
7497         * sem_util.ads, exp_util.adb, sem_attr.adb: Minor reformatting.
7499 2014-07-29  Robert Dewar  <dewar@adacore.com>
7501         * einfo.ads, einfo.adb (Static_Real_Or_String_Predicate): New function
7502         (Set_Static_Real_Or_String_Predicate): New procedure
7503         * sem_ch13.adb (Build_Predicate_Functions): Accomodate static
7504         string predicates (Is_Predicate_Static): Handle static string
7505         predicates.
7506         * sem_eval.adb (Real_Or_String_Static_Predicate_Matches):
7507         New procedure (Check_Expression_Against_Static_Predicate):
7508         Deal with static string predicates, now fully implemented
7509         (Eval_Relational_Op): Allow string equality/inequality as static
7510         if not comes from source.
7512 2014-07-29  Robert Dewar  <dewar@adacore.com>
7514         * sem_aggr.adb, exp_ch5.adb, sem_ch5.adb, exp_util.adb, einfo.adb,
7515         einfo.ads, sem_util.adb, sem_attr.adb, sem_case.adb, sem_eval.adb,
7516         sem_eval.ads, sem_ch13.adb: General cleanup of static predicate
7517         handling. Change name of Discrete_Predicate to
7518         Discrete_Static_Predicate, and replace testing of the presence of this
7519         field by testing the flag Has_Static_Expression.
7521 2014-07-29  Robert Dewar  <dewar@adacore.com>
7523         * gnat_rm.texi: Document pragma Unevaluated_Use_Of_Old.
7524         * opt.adb: Handle Uneval_Old.
7525         * opt.ads (Uneval_Old, Uneval_Old_Config): New variables.
7526         * par-prag.adb: Add dummy entry for pragma Unevaluated_Use_Of_Old.
7527         * sem.ads (Save_Uneval_Old): New field in Scope_Stack_Entry.
7528         * sem_attr.adb (Uneval_Old_Msg): New procedure.
7529         * sem_ch8.adb (Push_Scope): Save Uneval_Old.
7530         (Pop_Scope): Restore Uneval_Old.
7531         * sem_prag.adb (Analyze_Pragma, case Unevaluated_Use_Of_Old):
7532         Implemented.
7533         * snames.ads-tmpl: Add entries for pragma Unevaluated_Use_Of_Old
7534         Add entries for Name_Warn, Name_Allow.
7536 2014-07-29  Robert Dewar  <dewar@adacore.com>
7538         * sem_aggr.adb (Resolve_Array_Aggregate): Change Is_Static_Range
7539         to Is_OK_Static_Range.
7540         * sem_attr.adb (Eval_Attribute): Make sure we properly flag
7541         static attributes (Eval_Attribute, case Size): Handle size of
7542         zero properly (Eval_Attribute, case Value_Size): Handle size of
7543         zero properly.
7544         * sem_ch13.adb: Minor reformatting.
7545         * sem_ch3.adb (Process_Range_Expr_In_Decl): Change
7546         Is_Static_Range to Is_OK_Static_Range.
7547         * sem_eval.adb (Eval_Case_Expression): Total rewrite, was
7548         wrong in several ways (Is_Static_Range): Moved here from spec
7549         (Is_Static_Subtype): Moved here from spec Change some incorrect
7550         Is_Static_Subtype calls to Is_OK_Static_Subtype.
7551         * sem_eval.ads: Add comments to section on
7552         Is_Static_Expression/Raises_Constraint_Error (Is_OK_Static_Range):
7553         Add clarifying comments (Is_Static_Range): Moved to body
7554         (Is_Statically_Unevaluated): New function.
7555         * sem_util.ads, sem_util.adb (Is_Preelaborable_Expression): Change
7556         Is_Static_Range to Is_OK_Static_Range.
7557         * sinfo.ads: Additional commments for Is_Static_Expression noting
7558         that clients should almost always use Is_OK_Static_Expression
7559         instead. Many other changes throughout front end units to obey
7560         this rule.
7561         * tbuild.ads, tbuild.adb (New_Occurrence_Of): Set Is_Static_Expression
7562         for enumeration literal.
7563         * exp_ch5.adb, sem_intr.adb, sem_ch5.adb, exp_attr.adb, exp_ch9.adb,
7564         lib-writ.adb, sem_ch9.adb, einfo.ads, checks.adb, checks.ads,
7565         sem_prag.adb, sem_ch12.adb, freeze.adb, sem_res.adb, exp_ch4.adb,
7566         exp_ch6.adb, sem_ch4.adb, sem_ch6.adb, exp_aggr.adb, sem_cat.adb:
7567         Replace all occurrences of Is_Static_Expression by
7568         Is_OK_Static_Expression.
7570 2014-07-29  Hristian Kirtchev  <kirtchev@adacore.com>
7572         * exp_ch4.adb (Process_Transient_Object): Remove constant
7573         In_Cond_Expr, use its initialization expression in place.
7574         * exp_ch7.adb (Process_Declarations): There is no need to check
7575         that a transient object being hooked is controlled as it would
7576         not have been hooked in the first place.
7577         * exp_util.adb (Is_Aliased): 'Reference-d or renamed transient
7578         objects are not considered aliased when the related context is
7579         a Boolean expression_with_actions.
7580         (Requires_Cleanup_Actions): There is no need to check that a transient
7581         object being hooked is controlled as it would not have been hooked in
7582         the first place.
7584 2014-07-29  Robert Dewar  <dewar@adacore.com>
7586         * errout.adb: Minor reformatting.
7588 2014-07-29  Hristian Kirtchev  <kirtchev@adacore.com>
7590         * exp_ch3.adb (Default_Initialize_Object): Add new variables
7591         Abrt_Blk and Dummy. Generate a dummy temporary when aborts are
7592         not allowed to ensure the symmetrical generation of symbols.
7593         * exp_ch7.adb (Build_Object_Declarations): Remove variables A_Expr
7594         and E_Decl. Add new variables Decl and Dummy. Generate a dummy
7595         temporary when aborts are not allowed to ensure symmertrical
7596         generation of symbols.
7597         * exp_intr.adb (Expand_Unc_Deallocation): Add new variable
7598         Dummy. Generate a dummy temporary when aborts are not allowed
7599         to ensure symmertrical generation of symbols.
7601 2014-07-29  Ed Schonberg  <schonberg@adacore.com>
7603         * exp_dbug.adb (Debug_Renaming_Declaration): For an object
7604         renaming, indicate that the renamed entity itself needs debug
7605         information. This is necessary if that entity is a temporary,
7606         e.g. part of the expansion of an explicit dereference in an
7607         iterator.
7609 2014-07-29  Thomas Quinot  <quinot@adacore.com>
7611         * errout.adb (Set_Error_Posted): When propagating flag to
7612         an enclosing named association, also propagate to the parent
7613         of that node, so that named and positional associations are
7614         treated consistently.
7616 2014-07-29  Ed Schonberg  <schonberg@adacore.com>
7618         * sem_attr.adb (Resolve_Attribute, case 'Update):  Set
7619         Do_Range_Check properly on array component expressions that
7620         have a scalar type. In GNATprove mode, only checks on scalar
7621         components must be marked by the front-end.
7623 2014-07-29  Ed Schonberg  <schonberg@adacore.com>
7625         * sem_res.adb (Resolve_Type_Conversion): If the type of the
7626         expression is a limited view, use the non-limited view when
7627         available.
7629 2014-07-29  Hristian Kirtchev  <kirtchev@adacore.com>
7631         * exp_ch4.adb (Expand_N_Case_Expression): Mark the generated
7632         case statement as coming from a conditional expression.
7633         (Expand_N_If_Expression): Mark the generated if statement as
7634         coming from a conditional expression.
7635         * exp_ch5.adb (Expand_N_Case_Statement): Do not process controlled
7636         objects found in case statement alternatives when the case
7637         statement is actually a case expression.
7638         (Expand_N_If_Statement):
7639         Do not process controlled objects found in an if statement when
7640         the if statement is actually an if expression.
7641         * sinfo.adb (From_Conditional_Expression): New routine.
7642         (Set_From_Conditional_Expression): New routine.
7643         * sinfo.ads Add new semantic flag From_Conditional_Expression and
7644         update related nodes.
7645         (From_Conditional_Expression): New routine along with pragma Inline.
7646         (Set_From_Conditional_Expression): New routine along with pragma Inline.
7648 2014-07-29  Hristian Kirtchev  <kirtchev@adacore.com>
7650         * exp_ch7.adb (Build_BIP_Cleanup_Stmts): Remove
7651         formal parameter Obj_Id and update the comment on usage. Renamed
7652         Obj_Typ to Func_Typ and update all occurrences.
7653         (Find_Last_Init): Remove formal parameter Decl and update the comment
7654         on usage.
7655         Remove local constants Obj_Id and Obj_Typ. Remove local variables
7656         Init_Typ and Is_Conc. Remove the extraction of the initialization type.
7657         (Find_Last_Init_In_Block): Remove formal parameter
7658         Init_Typ and update the comment on usage.
7659         (Is_Init_Call): Remove formal parameter Init_Typ and update the comment
7660         on usage. Check whether the procedure call is an initialization
7661         procedure of either the object type or the initialization type.
7662         (Is_Init_Proc_Of): New routine.
7663         (Process_Object_Declaration): Obj_Id and Obj_Typ are now global to this
7664         routine. Add new variable Init_Typ. Add circuitry to extract the object
7665         type as well as the initialization type.
7667 2014-07-29  Robert Dewar  <dewar@adacore.com>
7669         * sem_case.adb: Minor reformatting.
7670         * sem_aux.ads: Minor reformatting.
7672 2014-07-29  Ed Schonberg  <schonberg@adacore.com>
7674         * sinfo.adb (Set_Else_Actions, Set_Then_Actions): Set parent
7675         pointer on these fields, even though they are semantic, because
7676         subsequent analysis and expansion of action nades may require
7677         exploring the tree, for example to locate a node to be wrapped
7678         when a function with controlled result is called.
7680 2014-07-29  Claire Dross  <dross@adacore.com>
7682         * sem_aux.adb (Get_Binary_Nkind): Use case on
7683         Name_Id instead of an intermediate string.
7684         (Get_Unary_Nkind): Use case on Name_Id instead of an intermediate
7685         string.
7687 2014-07-29  Sergey Rybin  <rybin@adacore.com frybin>
7689         * gnat_ugn.texi (gnatelim, gnatstub, gnatmetric): Add note
7690         about processing sources with preprocessor directives.
7692 2014-07-24  Martin Liska  <mliska@suse.cz>
7694         * gcc-interface/trans.c (finalize_nrv): Adjust function call.
7695         * gcc-interface/utils.c (rest_of_subprog_body_compilation): Likewise.
7696         (gnat_write_global_declarations): Likewise.
7698 2014-07-19  David Wohlferd  <dw@LimeGreenSocks.com>
7700         * gnat_rm.texi: Clean up for makeinfo 5.2.
7702 2014-07-19  David Wohlferd  <dw@LimeGreenSocks.com>
7704         * gnat_rm.texi (Machine Code Insertions): Clean up.
7706 2014-07-18  Robert Dewar  <dewar@adacore.com>
7708         * exp_ch7.adb: Minor reformatting.
7710 2014-07-18  Claire Dross  <dross@adacore.com>
7712         * sem_aux.ads (Get_Binary_Nkind): New function that returns
7713         the Node_Kind value of an entity defining a binary operator.
7714         (Get_Unary_Nkind): New function that returns the Node_Kind value
7715         of an entity defining a unary operator.
7717 2014-07-18  Pascal Obry  <obry@adacore.com>
7719         * sysdep.c: comment update.
7720         * adaint.c (__gnat_fputwc): Use wchar_t on a limited set of
7721         platforms where it is known to be supported.
7723 2014-07-18  Thomas Quinot  <quinot@adacore.com>
7725         * sem_dist.adb (Process_Remote_AST_Declaration): Need
7726         to set Fat_Type's Ekind in order to be able to use its
7727         Corresponding_Remote_Type attribute.
7729 2014-07-18  Hristian Kirtchev  <kirtchev@adacore.com>
7731         * einfo.adb Last_Aggregate_Assignment is now Node 30.
7732         (Last_Aggregate_Assignment): Include
7733         constants in the assertion. Update the underlying node.
7734         (Set_Last_Aggregate_Assignment): Include constants in the
7735         assertion. Update the underlying node.  (Write_Field11_Name):
7736         Remove the entry for Last_Aggregate_Assignment.
7737         (Write_Field30_Name): Add an entry for Last_Aggregate_Assignment.
7738         * einfo.ads Update the node designation and usage of attribute
7739         Last_Aggregate_Assignment.
7740         * exp_aggr.adb (Expand_Array_Aggregate): Store the last
7741         assignment statement used to initialize a controlled object.
7742         (Late_Expansion): Store the last assignment statement used to
7743         initialize a controlled record or an array of controlled objects.
7744         * exp_ch3.adb (Expand_N_Object_Declaration): Default
7745         initialization of objects is now performed in a separate routine.
7746         (Default_Initialize_Object): New routine.
7747         * exp_ch7.adb (Build_BIP_Cleanup_Stmts): Add formal parameter
7748         Obj_Id. Update the comment on usage.
7749         (Find_Last_Init): Remove formal parameter Typ. Update comment on usage.
7750         Reimplement the logic.  (Find_Last_Init_In_Block): New routine.
7751         (Is_Init_Call): Add formal parameter Init_Typ. Update the
7752         comment on usage.  Account for the type init proc when trying
7753         to determine whether a statement is an initialization call.
7754         (Make_Adjust_Call): Rename formal parameter For_Parent to
7755         Skip_Self. Update all occurrences of For_Parent. Account for
7756         non-tagged types. Update the call to Make_Call.
7757         (Make_Call): Rename formal parameter For_Parent to Skip_Self. Update
7758         comment on usage. Update all occurrences of For_Parent.
7759         (Make_Final_Call): Rename formal parameter For_Parent to
7760         Skip_Self. Update all occurrences of For_Parent. Account
7761         for non-tagged types. Update the call to Make_Call.
7762         (Process_Object_Declaration): Most variables and constants are
7763         now local to the routine.
7764         * exp_ch7.ads (Make_Adjust_Call): Rename formal parameter
7765         For_Parent to Skip_Self. Update the comment on usage.
7766         (Make_Final_Call): Rename formal parameter For_Parent to
7767         Skip_Self. Update the comment on usage.
7769 2014-07-18  Ed Schonberg  <schonberg@adacore.com>
7771         * sem_ch9.adb (Analyze_Requeue): The entry being referenced
7772         can be a procedure that is implemented by entry, and have a
7773         formal that is a synchronized interface.  It does not have to
7774         be declared as a protected operation.
7776 2014-07-18  Robert Dewar  <dewar@adacore.com>
7778         * gnat_rm.texi: Remove mention of obsolete attributes
7779         Max[_Interrupt]_Priority, which have never been implemented
7780         (or at the very least were removed long ago if they ever were
7781         implemented.  Add documentation of Max[_Interrupt]_Priority
7782         constants in package System.
7783         * ttypes.ads: Document actual handling of package System,
7784         rather than a historical fantasy version.  Remove mention of
7785         non-existent attributes Max[_Interrupt]_Priority.
7787 2014-07-18  Pascal Obry  <obry@adacore.com>
7789         * a-witeio.adb (Put): No 16-bit character output when text
7790         translation is disabled.
7791         * i-cstrea.ads: Code clean up.
7793 2014-07-18  Robert Dewar  <dewar@adacore.com>
7795         * gnat_rm.texi: Document that Wchar_T_Size and Word_Size are
7796         static attributes.
7798 2014-07-18  Arnaud Charlet  <charlet@adacore.com>
7800         * a-witeio.adb, initialize.c: Update comments. Minor clean ups.
7802 2014-07-18  Pascal Obry  <obry@adacore.com>
7804         * adaint.c: Do not include wchar.h on VxWorks.
7805         * mingw32.h: Remove obsolete definition.
7807 2014-07-18  Pascal Obry  <obry@adacore.com>
7809         * a-textio.adb, a-witeio.adb, a-ztexio.adb: Use C_Streams Default_Text.
7810         * i-cstrea.ads (Content_Encoding): Moved here, add convention C.
7811         * s-ficobl.ads (Content_Encoding): Moved to C_Streams.
7812         * s-fileio.adb (Open): Adjust to use Content_Encoding from C_Streams.
7814 2014-07-18  Pascal Obry  <obry@adacore.com>
7816         * a-textio.adb: Rename Is_Text_File to Text_Encoding.
7817         * a-ztexio.adb: Likewise.
7818         * a-witeio.adb: Likewise.
7819         (Open): Pass file's translation mode to set_text_mode.
7820         * s-ficobl.ads (Content_Encoding): New type.
7821         (Text_Content_Encoding): New subtype.
7822         (AFCB): Rename Is_Text_File to Text_Encoding.
7823         * s-fileio.adb (Open): Handles new text_translation
7824         values. Remove Is_Text_File which is equivalent to Text_Encoding
7825         in Text_Content_Encoding.
7826         * adaint.h (__gnat_set_mode): New routine.
7827         * sysdep.c (__gnat_set_wide_text_mode): Removed.
7828         (__gnat_set_mode): New routine.
7830 2014-07-18  Arnaud Charlet  <charlet@adacore.com>
7832         * gcc-interface/decl.c, gcc-interface/trans.c,
7833         gcc-interface/utils.c (Is_Packed_Array_Type): Renamed 
7834         Is_Packed_Array_Impl_Type.
7836 2014-07-18  Gary Dismukes  <dismukes@adacore.com>
7838         * sem_util.adb: Minor typo correction.
7840 2014-07-18  Ben Brosgol  <brosgol@adacore.com>
7842         * gnat_rm.texi: Complete previous change.
7844 2014-07-18  Pascal Obry  <obry@adacore.com>
7846         * s-fileio.adb: Minor style fix.
7848 2014-07-18  Ed Schonberg  <schonberg@adacore.com>
7850         * sem_ch13.adb (Analyze_Aspect_Specifications): Detect improper
7851         specification of stream attributes for subtypes that are not
7852         first subtypes, to prevent malformed rep_item chains in the case
7853         of such illegal specifications for discriminated private subtypes.
7854         (Check_Overloaded_Name): Verify that the name is an entity name
7855         before other checks.
7857 2014-07-18  Pascal Obry  <obry@adacore.com>
7859         * adaint.c (__gnat_fputwc) Do not disable on cross-build.
7861 2014-07-18  Robert Dewar  <dewar@adacore.com>
7863         * sem_prag.adb, sem_attr.adb,
7864         sem_aggr.adb, sinfo.ads, sem_eval.ads: Minor reformatting.
7866 2014-07-18  Pascal Obry  <obry@adacore.com>
7868         * sysdep.c (__gnat_wide_text_translation_required): Removed from here.
7869         * initialize.c (__gnat_wide_text_translation_required): Defined here.
7871 2014-07-18  Pascal Obry  <obry@adacore.com>
7873         * adaint.c (__gnat_fputwc): New routine.
7874         * s-crtl.ads (fputwc): Now imported as __gnat_fputwc.
7876 2014-07-18  Hristian Kirtchev  <kirtchev@adacore.com>
7878         * einfo.adb: Flag 270 is now used as Stores_Attribute_Old_Prefix.
7879         (Set_Stores_Attribute_Old_Prefix): New routine.
7880         (Stores_Attribute_Old_Prefix): New routine.
7881         (Write_Entity_Flags):
7882         Output flag Stores_Attribute_Old_Prefix.
7883         * einfo.ads Add new flag Stores_Attribute_Old_Prefix along with
7884         comment on usage.
7885         (Set_Stores_Attribute_Old_Prefix): New routine
7886         along with pragma Inline.
7887         (Stores_Attribute_Old_Prefix): New
7888         routine along with pragma Inline.
7889         * exp_attr.adb (Expand_N_Attribute_Reference): Mark the generated
7890         constant which captures the result of attribute 'Old's prefix.
7891         * sem_util.adb (In_Assertion_Expression_Pragma): Recognize a
7892         relocated expression which acted as a prefix of attribute 'Old.
7894 2014-07-18  Bob Duff  <duff@adacore.com>
7896         * s-spsufi.adb (Finalize_And_Deallocate): Set Subpool.Owner to
7897         null before dispatching to Deallocate_Subpool.
7898         * s-stposu.ads (Default_Subpool_For_Pool): Change mode of
7899         parameter of Default_Subpool_For_Pool to 'in out'.
7900         * s-stposu.adb (Set_Pool_Of_Subpool): Use raise expression. Add
7901         a message to the raise.
7902         * sem_util.adb: Minor reformatting.
7904 2014-07-18  Robert Dewar  <dewar@adacore.com>
7906         * sem_util.adb (Check_Expression_Against_Static_Predicate):
7907         Mark expression as non-static if it fails static predicate check,
7908         and issue additional warning.
7910 2014-07-18  Pascal Obry  <obry@adacore.com>
7912         * a-witeio.adb (Put): Control translation based on
7913         wide_text_translation_required.
7914         * adaint.c (CurrentCCSEncoding): New variable.
7915         * initialize.c (__gnat_initialize): On Windows initialize
7916         CurrentCCSEncoding based on values in GNAT_CCS_ENCODING
7917         environment variable.
7918         * mingw32.h (CurrentCCSEncoding): New external.
7919         (__gnat_wide_text_translation_required): Likewise.
7920         * sysdep.c (wide_text_translation_required): New variable.
7921         (__gnat_set_wide_text_mode): Set mode based on CurrentCCSEncoding.
7923 2014-07-18  Hristian Kirtchev  <kirtchev@adacore.com>
7925         * sem_prag.adb (Analyze_Refined_Depends_In_Decl_Part): Remove global
7926         variable Refined_States.  Add global variable Matched_Items.
7927         (Check_Dependency_Clause): Account for dependency
7928         clauses utilizing states with visible null refinements.
7929         (Is_Null_Refined_State): New routine.
7930         (Match_Items): Record each successfully matched item of pragma Depends.
7931         (Record_Item): New routine.
7933 2014-07-18  Ed Schonberg  <schonberg@adacore.com>
7935         * sem_attr.adb (Analyze_Attribute, case 'Update): Set
7936         Do_Range_Check flag on a dynamic index expression used in a
7937         component association in the argument of Update.
7939 2014-07-18  Gary Dismukes  <dismukes@adacore.com>
7941         * einfo.ads, sem_eval.ads, sem_ch13.adb: Minor reformatting.
7943 2014-07-18  Hristian Kirtchev  <kirtchev@adacore.com>
7945         * exp_ch6.adb (Expand_Simple_Function_Return): Redo the marking
7946         of enclosing blocks, loops and the enclosing function using a
7947         parent-based traversal.
7948         * exp_util.adb (Wrap_Statements_In_Block): Suppress the secondary
7949         stack reclamation if the iterator loop contains a return statement
7950         that uses the stack.
7951         * sem_ch5.adb (Analyze_Loop_Statement): There is no need to
7952         patch up the scope stack as the secondary stack management now
7953         takes into account the enclosing function of the iterator loop.
7955 2014-07-18  Robert Dewar  <dewar@adacore.com>
7957         * sem_ch3.adb, g-memdum.ads, i-cstrea.ads: Minor reformatting.
7959 2014-07-18  Robert Dewar  <dewar@adacore.com>
7961         * einfo.adb (Has_Static_Predicate): New function.
7962         (Set_Has_Static_Predicate): New procedure.
7963         * einfo.ads (Has_Static_Predicate): New flag.
7964         * sem_ch13.adb (Is_Predicate_Static): New function
7965         (Build_Predicate_Functions): Use Is_Predicate_Static to reorganize
7966         (Add_Call): Minor change in Sloc of generated expression
7967         (Add_Predicates): Remove setting of Static_Pred, no longer used.
7968         * sem_ch4.adb (Has_Static_Predicate): Removed this function,
7969         replace by use of the entity flag Has_Static_Predicate_Aspect.
7970         * sem_eval.adb (Eval_Static_Predicate_Check): Check real case
7971         and issue warning that predicate is not checked for now.
7972         * sem_eval.ads (Eval_Static_Predicate_Check): Fix comments in
7973         spec.
7974         * sem_util.adb (Check_Expression_Against_Static_Predicate):
7975         Carry out check for any case where there is a static predicate,
7976         and output appropriate message.
7977         * sinfo.ads: Minor comment corrections.
7979 2014-07-18  Ed Schonberg  <schonberg@adacore.com>
7981         * exp_ch3.adb (Expand_Freeze_Record_Type): If the type is derived
7982         from an untagged private type whose full view is tagged, the type
7983         is marked tagged for layout reasons, but it has no dispatch table,
7984         so Set_All_DT_Position must not be called.
7985         * exp_ch13.adb: If the freeze node is for a type internal to a
7986         record declaration, as is the case for a class-wide subtype
7987         of a parent component, the relevant scope is the scope of the
7988         enclosing record.
7990 2014-07-18  Thomas Quinot  <quinot@adacore.com>
7992         * g-memdum.adb, g-memdum.ads: Code clean ups.
7994 2014-07-18  Hristian Kirtchev  <kirtchev@adacore.com>
7996         * sem_prag.adb (Check_Dependency_Clause):
7997         Update the comment on usage. Reimplement the mechanism which
7998         attempts to match a single clause of Depends against one or
7999         more clauses of Refined_Depends.
8000         (Input_Match): Removed.
8001         (Inputs_Match): Removed.
8002         (Is_Self_Referential): Removed.
8003         (Normalize_Clause): Update the call to Split_Multiple_Outputs.
8004         (Normalize_Outputs): Rename variable Split to New_Claue and update
8005         all its occurrences.
8006         (Report_Extra_Clauses): Update the comment on usage.
8007         (Split_Multiple_Outputs): Renamed to Normalize_Outputs.
8009 2014-07-18  Gary Dismukes  <dismukes@adacore.com>
8011         * i-cstrea.ads: Minor reformatting.
8013 2014-07-18  Hristian Kirtchev  <kirtchev@adacore.com>
8015         * exp_util.adb (Wrap_Statements_In_Block): Propagate both
8016         secondary stack-related flags to the generated block.
8017         * sem_ch5.adb (Analyze_Loop_Statement): Update the scope chain
8018         once the loop is relocated in a block.
8020 2014-07-18  Robert Dewar  <dewar@adacore.com>
8022         * repinfo.ads: Add documentation on handling of back annotation
8023         for dynamic case.
8025 2014-07-18  Ed Schonberg  <schonberg@adacore.com>
8027         * sinfo.ads, sinfo.adb (Incomplete_View): New semantic attribute
8028         of full type declaration, denotes previous declaration for
8029         incomplete view of the type.
8030         * sem_ch3.adb (Analyze_Full_Type_Declaration): Set Incomplete_View
8031         of declaration if one is present.
8032         (Replace_Type): When constructing the signature of an inherited
8033         operation, handle properly the case where the operation has a
8034         formal whose type is an incomplete view.
8035         * sem_util.adb (Collect_Primitive_Operations): Handle properly
8036         the case of an operation declared after an incomplete declaration
8037         for a type T and before the full declaration of T.
8039 2014-07-18  Pascal Obry  <obry@adacore.com>
8041         * i-cstrea.ads: Add documentation for set_wide_text_mode.
8043 2014-07-18  Robert Dewar  <dewar@adacore.com>
8045         * a-witeio.adb: Minor code reorganization.
8046         * i-cstrea.ads: Add comment.
8048 2014-07-18  Thomas Quinot  <quinot@adacore.com>
8050         * s-oscons-tmplt.c (NAME_MAX): Minor cleaup and comment
8051         clarifications.
8053 2014-07-18  Robert Dewar  <dewar@adacore.com>
8055         * g-memdum.adb, g-memdum.ads, exp_strm.adb: Minor reformatting.
8057 2014-07-18  Pascal Obry  <obry@adacore.com>
8059         * s-crtl.ads, i-cstrea.ads (fputwc): New routine.
8060         * a-witeio.adb (Put): On platforms where there is translation
8061         done by the OS output the raw text.
8062         (New_Line): Use Put above to properly handle the LM wide characters.
8064 2014-07-18  Thomas Quinot  <quinot@adacore.com>
8066         * g-memdum.adb, g-memdum.ads (Dump): New parameter Prefix, defaulted
8067         to Absolute_Address.
8069 2014-07-18  Eric Botcazou  <ebotcazou@adacore.com>
8071         * opt.ads (Suppress_Back_Annotation): Remove as unused.
8072         * fe.h (Back_Annotate_Rep_Info): Likewise.
8073         (Global_Discard_Names): Likewise.
8075 2014-07-18  Robert Dewar  <dewar@adacore.com>
8077         * sem_ch13.adb (Is_Type_Ref): Check that type name is not
8078         parenthesized.
8080 2014-07-18  Vincent Celier  <celier@adacore.com>
8082         * s-osinte-vms.ads: Fix style errors.
8084 2014-07-18  Thomas Quinot  <quinot@adacore.com>
8086         * s-oscons-tmplt.c (_POSIX_SOURCE): Define in order to get
8087         NAME_MAX and PATH_MAX.
8089 2014-07-18  Bob Duff  <duff@adacore.com>
8091         * exp_strm.adb (Build_Record_Or_Elementary_Input_Function,
8092         Build_Record_Or_Elementary_Output_Procedure): For Input and
8093         Output attributes, do not read/write the discriminants if they
8094         have default values; that will be done by Read/Write.
8096 2014-07-18  Robert Dewar  <dewar@adacore.com>
8098         * sem_aggr.adb, exp_ch5.adb, sem_ch3.adb, layout.adb, sem_type.adb,
8099         exp_util.adb, exp_attr.adb, einfo.adb, einfo.ads, exp_pakd.adb,
8100         checks.adb, exp_pakd.ads, freeze.adb, sem_util.adb, exp_dbug.adb,
8101         exp_dbug.ads, exp_ch4.adb, sem_ch8.adb, exp_aggr.adb, sem_eval.adb,
8102         sem_ch13.adb: Change name Packed_Array_Type to Packed_Array_Impl_Type.
8104 2014-07-18  Robert Dewar  <dewar@adacore.com>
8106         * lib-writ.adb, makeutl.adb, ali.ads: Minor reformatting.
8108 2014-07-18  Vincent Celier  <celier@adacore.com>
8110         * lib-writ.ads: Update documentation about the D lines.
8112 2014-07-18  Ed Schonberg  <schonberg@adacore.com>
8114         * sem_ch13.adb (Replace_Type_References_Generic): Use type entity
8115         as a parameter, rather than its Chars field, in order to locate
8116         freeze node of type. If the predicate or invariant has references
8117         to types other than the one to which the contract applies, these
8118         types must be frozen, and the corresponding predicate functions
8119         created, before that freeze node.
8121 2014-07-18  Robert Dewar  <dewar@adacore.com>
8123         * freeze.adb, einfo.ads, einfo.adb: Minor code reorganization.
8124         * par_sco.adb: Minor reformatting.
8126 2014-07-18  Gary Dismukes  <dismukes@adacore.com>
8128         * exp_ch4.adb (Real_Range_Check): Turn off
8129         the Do_Range_Check flag on the conversion's current Expression
8130         argument rather than on the originally captured Operand node,
8131         as Expression may reflect a rewriting (as in conversions to a
8132         fixed-point type).
8134 2014-07-18  Vincent Celier  <celier@adacore.com>
8136         * ali.adb (Scan_ALI): Set Sdep_Record.Unit_Name, when the unit
8137         is not a subunit.
8138         * ali.ads (Sdep_Record): New component Unit_Name.
8139         * lib-writ.adb (Write_ALI): Write the unit name in D lines.
8140         * makeutl.adb (Check_Source_Info_In_ALI): Return False if a
8141         dependent unit is in a project and the source file name is not
8142         one of its sources.
8144 2014-07-18  Bob Duff  <duff@adacore.com>
8146         * s-addima.ads: Minor: add comment.
8148 2014-07-18  Thomas Quinot  <quinot@adacore.com>
8150         * freeze.adb (Check_Component_Storage_Order): Fix enforcement
8151         of nesting rules for composites with different SSOs.
8153 2014-07-18  Thomas Quinot  <quinot@adacore.com>
8155         * par_sco.adb (Is_Logical_Operator): An If_Expression is not
8156         a proper logical operator.
8157         (Has_Decision): An If_Expression indicates the presence of a decision
8158         although it is not a logical operator.
8160 2014-07-18  Robert Dewar  <dewar@adacore.com>
8162         * gnat_ugn.texi: Remove note that -gnatR not allowed with -gnatc.
8163         * switch-c.adb: Remove prohibition of -gnatR and -gnatc together.
8165 2014-07-18  Eric Botcazou  <ebotcazou@adacore.com>
8167         * sem_ch13.adb (Kill_Rep_Clause): Clear Comes_From_Source flag
8168         on the null statement.
8170 2014-07-18  Thomas Quinot  <quinot@adacore.com>
8172         * adaint.c: Minor comment rewording.
8173         * socket.c: Define macros _REENTRANT and _THREAD_SAFE so that
8174         use of errno in this file is thread safe.
8176 2014-07-18  Arnaud Charlet  <charlet@adacore.com>
8178         * gnat_ugn.texi: Doc clarification.
8179         * sem_ch13.adb (Kill_Rep_Clause): Use Replace not Rewrite.
8180         * sem_ch13.ads: Minor comment update.
8182 2014-07-18  Robert Dewar  <dewar@adacore.com>
8184         * repinfo.ads: Minor comment fix.
8186 2014-07-18  Robert Dewar  <dewar@adacore.com>
8188         * par-prag.adb: Add dummy entry for Default_Scalar_Storage_Order.
8189         * sem_prag.adb: Add dummy implementation of
8190         Default_Scalar_Storage_Order.
8191         * snames.ads-tmpl: Add dummy entry for
8192         Default_Scalar_Storage_Order pragma.
8194 2014-07-18  Robert Dewar  <dewar@adacore.com>
8196         * opt.adb (Tree_Read): Read Address_Is_Private,
8197         Ignore_Rep_Clauses, Ignore_Style_Check_Pragmas, Multiple_Unit_Index.
8198         (Tree_Write): Corresponding writes
8199         * opt.ads: Minor comment reformatting and fixes.
8200         * tree_io.ads: Increment ASIS_Version_Number.
8202 2014-07-18  Robert Dewar  <dewar@adacore.com>
8204         * sem_attr.adb, s-os_lib.ads, prj-tree.adb: Minor reformatting.
8205         * types.h: Fix typo.
8207 2014-07-18  Robert Dewar  <dewar@adacore.com>
8209         * freeze.adb (Check_Address_Clause): Use Kill_Rep_Clause (no
8210         functional change).
8211         * gnat_ugn.texi: Document that -gnatI removes rep clauses from
8212         ASIS trees.
8213         * sem_ch13.adb (Kill_Rep_Clause): New procedure
8214         (Analyze_Attribute_Definition_Clause): Use
8215         Kill_Rep_Clause. This is just a cleanup, no functional effect.
8216         (Analyze_Enumeration_Representation_Clause):
8217         Use Kill_Rep_Clause. This means that enum rep
8218         clauses are now properly removed from -gnatct trees.
8219         (Analyze_Record_Representation_Clause): Same change.
8220         * sem_ch13.ads (Kill_Rep_Clause): New procedure.
8222 2014-07-18  Pascal Obry  <obry@adacore.com>
8224         * s-os_lib.ads, s-os_lib.adb (GM_Time_Of): New routine to create an
8225         OS_Time from time parts.
8226         * adaint.h, adaint.c (__gnat_to_os_time): New routine.
8228 2014-07-18  Ed Schonberg  <schonberg@adacore.com>
8230         * sem_ch4.adb (Try_Container_Indexing): Refine previous patch for
8231         indexing over containers that are derived types: check whether
8232         signature of found operation has the correct first parameter
8233         before retrieving directly a primitive operation.
8235 2014-07-18  Ed Schonberg  <schonberg@adacore.com>
8237         * sem_attr.adb (Analyze_Attribute, case 'Update): Set
8238         Do_Range_Check flag on dynamic bounds of a range used in a
8239         component association in the argument of Update.
8241 2014-07-18  Thomas Quinot  <quinot@adacore.com>
8243         * adaint.c: #define _REENTRANT and _THREAD_SAFE in order for
8244         accesses to errno(3) to be thread safe.
8246 2014-07-18  Vincent Celier  <celier@adacore.com>
8248         * prj-tree.adb (Imported_Or_Extended_Project_Of): For each non
8249         limited imported project that is an extending project, return
8250         a project being extended if it has the expected name.
8252 2014-07-18  Pascal Obry  <obry@adacore.com>
8254         * s-os_lib.ads, s-os_lib.adb (Set_File_Last_Modify_Time_Stamp): New
8255         routine to set the last modification time stamp for the given file.
8256         * gnatchop.adb (File_Time_Stamp): Removed.
8257         (Write_Unit): Use
8258         Set_File_Last_Modify_Time_Stamp instead of ad-hoc implementation.
8260 2014-07-18  Ed Schonberg  <schonberg@adacore.com>
8262         * sem_aggr.adb (Aggregate_Constraint_Checks): Moved to sem_util.
8263         * sem_util.ads, sem_util.adb (Aggregate_Constraint_Checks):
8264         Moved here, so it can be shared with the resolution of 'Update,
8265         whose argument shares some features with aggregates.
8266         * sem_attr.adb (Resolve_Attribute, case 'Update): Apply
8267         Aggregate_Constraint_Checks with the expression of each
8268         association, so that the Do_Range_Check flag is set when needed.
8270 2014-07-18  Ed Schonberg  <schonberg@adacore.com>
8272         * sem_ch4.adb (Try_Container_Indexing):  If the container
8273         type is a derived type, the value of the inherited  aspect is
8274         the Reference operation declared for the parent type. However,
8275         Reference is also a primitive operation of the new type, and
8276         the inherited operation has a different signature. We retrieve
8277         the right one from the list of primitive operations of the
8278         derived type.
8280 2014-07-18  Vincent Celier  <celier@adacore.com>
8282         * debug.adb: Update comment.
8284 2014-07-18  Hristian Kirtchev  <kirtchev@adacore.com>
8286         * exp_util.adb (Needs_Finalization): There is no reason why a
8287         C type should not benefit from finalization actions.
8289 2014-07-18  Thomas Quinot  <quinot@adacore.com>
8291         * s-oscons-tmplt.c (NAME_MAX): Fix definition for Solaris
8292         (FILENAME_MAX): Remove unneeded definition.
8294 2014-07-18  Robert Dewar  <dewar@adacore.com>
8296         * exp_attr.adb, debug.adb: Update comments.
8298 2014-07-18  Vincent Celier  <celier@adacore.com>
8300         * par-ch4.adb (Simple_Expression): Add missing style check
8301         for binary adding operators.
8302         (Term): Add missing style check for multiplying operators.
8304 2014-07-18  Robert Dewar  <dewar@adacore.com>
8306         * impunit.adb: Minor comment correction.
8307         * widechar.adb, s-wchcon.ads: Minor comment corrections.
8309 2014-07-18  Robert Dewar  <dewar@adacore.com>
8311         * sem_ch13.adb (Build_Discrete_Static_Predicate): New name
8312         for Build_Static_Predicate (Build_Predicate_Functions):
8313         Don't try to build discrete predicate for real type.
8314         (Build_Predicate_Functions): Report attempt to use
8315         Static_Predicate function on real type as unimplemented.
8316         * sem_util.adb (Check_Expression_Against_Static_Predicate):
8317         Add guard to prevent blow up on predicate for real type.
8319 2014-07-18  Ed Schonberg  <schonberg@adacore.com>
8321         * einfo.adb (Set_Static_Predicate): Simplify assertion to handle
8322         properly static predicate on enumeration types and modular types
8323         (not subtypes).
8325 2014-07-18  Pierre-Marie Derodat  <derodat@adacore.com>
8327         * scos.ads (SCO_Unit_Table_Entry): Add a field to keep track of
8328         the corresponding source file index.
8329         * get_scos.ads (Get_SCOs): Add a default value for it.
8330         * par_sco.adb (SCO_Record): Fill the corresponding value.
8331         * scos.h: New.
8333 2014-07-18  Vincent Celier  <celier@adacore.com>
8335         * a-strunb-shared.adb, s-auxdec.ads, s-rannum.adb, atree.ads,
8336         urealp.adb, vms_data.ads, lib.ads, s-auxdec-vms_64.ads: Minor
8337         reformatting.
8338         * gnat_ugn.texi: Add documentation for new gnatmem switch -t.
8340 2014-07-18  Thomas Quinot  <quinot@adacore.com>
8342         * g-sercom.ads (Set): document possible data loss.
8344 2014-07-18  Ed Schonberg  <schonberg@adacore.com>
8346         * exp_attr.adb (Expand_N_Attribute_Reference, cases Input,
8347         Output, Read, Write): If the restriction No_Streams is active,
8348         replace each occurrence of a stream attribute by an explicit
8349         Raise statement.
8351 2014-07-18  Robert Dewar  <dewar@adacore.com>
8353         * par_sco.adb, a-reatim.ads, exp_attr.adb, sem_util.adb: Minor
8354         reformatting.
8356 2014-07-18  Robert Dewar  <dewar@adacore.com>
8358         * einfo.ads, einfo.adb (Has_Out_Or_In_Out_Parameter): New flag and
8359         function.
8360         (Set_Has_Out_Or_In_Out_Parameter): New procedure.
8361         * sem_ch6.adb (Set_Formal_Mode): Set Has_Out_Or_In_Out_Parameter flag.
8362         * sem_res.adb (Resolve_Call): Error if call of Ada 2012 function
8363         with OUT or IN OUT from earlier Ada mode (e.g. Ada 2005)
8365 2014-07-18  Robert Dewar  <dewar@adacore.com>
8367         * bcheck.adb (Check_Consistent_Restrictions):
8368         Remove obsolete code checking for violation of
8369         No_Standard_Allocators_After_Elaboration (main program)
8370         * bindgen.adb (Gen_Adainit): Handle
8371         No_Standard_Allocators_After_Elaboration
8372         (Gen_Output_File_Ada): ditto.
8373         * exp_ch4.adb (Expand_N_Allocator): Handle
8374         No_Standard_Allocators_After_Elaboration.
8375         * Makefile.rtl: Add entry for s-elaall
8376         * rtsfind.ads: Add entry for Check_Standard_Allocator.
8377         * s-elaall.ads, s-elaall.adb: New files.
8378         * sem_ch4.adb (Analyze_Allocator): Handle
8379         No_Standard_Allocators_After_Elaboration.
8381 2014-07-18  Robert Dewar  <dewar@adacore.com>
8383         * lib.adb, lib.ads, lib-writ.adb, lib-writ.ads, ali.adb,
8384         ali.ads, lib-load.adb: Remove Lib.Has_Allocator and all uses.
8385         Remove AB parameter from ali files and all uses.
8386         Remove Allocator_In_Body and all uses.
8388 2014-07-18  Robert Dewar  <dewar@adacore.com>
8390         * g-expect-vms.adb: Add comment.
8392 2014-07-18  Thomas Quinot  <quinot@adacore.com>
8394         * par_sco.adb (Is_Logical_Operation): return True for
8395         N_If_Expression.
8397 2014-07-18  Ed Schonberg  <schonberg@adacore.com>
8399         * sem_attr.adb (Resolve_Attribute, case 'Update): Do full
8400         analysis and resolution of each choice in the associations within
8401         the argument of Update, because they may be variable names.
8403 2014-07-18  Hristian Kirtchev  <kirtchev@adacore.com>
8405         * exp_attr.adb (Expand_Loop_Entry_Attribute): Insert any condition
8406         actions before the generated if statement.
8408 2014-07-18  Hristian Kirtchev  <kirtchev@adacore.com>
8410         * gnat_ugn.texi Enhance the documentation of
8411         switches -gnateA and -gnateV.
8413 2014-07-18  Ed Schonberg  <schonberg@adacore.com>
8415         * sem_util.adb (Build_Default_Subtype): Add missing condition
8416         so that code matches description: use the full view of the base
8417         only if the base is private and the subtype is not.
8419 2014-07-17  Gary Dismukes  <dismukes@adacore.com>
8421         * exp_disp.adb: Minor reformatting.
8422         * exp_disp.adb: Minor code reorganization.
8424 2014-07-17  Thomas Quinot  <quinot@adacore.com>
8426         * gnat_rm.texi, freeze.adb (Check_Component_Storage_Order): Do not
8427         require an explicit SSO attribute definition clause on a composite type
8428         just because one of its components has one.
8430 2014-07-17  Robert Dewar  <dewar@adacore.com>
8432         * sem_attr.adb (Analyze_Attribute, case Loop_Entry): Rewrite
8433         attribute out of existence if the enclosing pragma is ignored.
8434         * sem_util.adb: Minor reformatting.
8436 2014-07-17  Ed Schonberg  <schonberg@adacore.com>
8438         * exp_aggr.adb (Expand_Array_Aggregate): Handle properly an
8439         array aggregate expanded into assignments when it appears as a
8440         local declaration in an inlined body.
8442 2014-07-17  Doug Rupp  <rupp@adacore.com>
8444         * init.c [__ANDROID__]: Modify for ZCX.
8445         * exp_aggr.adb: Minor reformatting
8446         * sigtramp-armvxw.c, sigtramp-ppcvxw.c: Update comments.
8448 2014-07-17  Robert Dewar  <dewar@adacore.com>
8450         * a-strunb-shared.ads, a-stwiun-shared.ads, a-stzunb-shared.ads,
8451         exp_ch7.adb, g-pehage.ads, g-socket.ads, gnat_ugn.texi, gnat_ugx.texi,
8452         scng.adb: Remove incorrect usage "allow to" and "allows to".
8454 2014-07-17  Robert Dewar  <dewar@adacore.com>
8456         * exp_dist.adb: Minor reformatting.
8458 2014-07-17  Bob Duff  <duff@adacore.com>
8460         * gnat_ugn.texi: Improve documentation of Unrestricted_Access.
8462 2014-07-17  Robert Dewar  <dewar@adacore.com>
8464         * sem_ch13.adb (Build_Invariant_Procedure): Add variable Nam
8465         (Add_Invariants): Set Nam to Name_Type_Invariant if from aspect.
8467 2014-07-17  Thomas Quinot  <quinot@adacore.com>
8469         * exp_pakd.adb (Create_Packed_Array_Type.Install_PAT): For a
8470         non-bit-packed array, propagate Reverse_Storage_Order to the
8471         packed array type.
8473 2014-07-17  Javier Miranda  <miranda@adacore.com>
8475         * exp_disp.adb: Fix comment.
8476         * exp_pakd.adb: Minor reformatting.
8478 2014-07-17  Robert Dewar  <dewar@adacore.com>
8480         * bindgen.adb (Gen_Elab_Calls): Skip reference to elab
8481         entity if none exists (Gen_Elab_Calls): Complain if clash with
8482         No_Multiple_Elaboration.
8483         * s-rident.ads, restrict.ads: Add restriction No_Multiple_Elaboration.
8484         * sem_util.adb (Build_Elaboration_Entity): Skip building entity
8485         if not needed.
8486         * gnat_rm.texi: Document restriction No_Multiple_Elaboration.
8487         * sem_ch4.adb: Minor comment updates.
8489 2014-07-17  Ed Schonberg  <schonberg@adacore.com>
8491         * exp_ch9.adb (Buid_Protected_Subprogram_Call): Preserve type
8492         of function call for later use when shared passive objects
8493         are involved.
8495 2014-07-17  Hristian Kirtchev  <kirtchev@adacore.com>
8497         * par-ch13.adb (Get_Aspect_Specifications):
8498         Catch a case where the argument of SPARK aspect Refined_State
8499         is not properly parenthesized.
8501 2014-07-17  Hristian Kirtchev  <kirtchev@adacore.com>
8503         * exp_ch6.adb (Expand_Ctrl_Function_Call): Do not extend
8504         the lifetime of a reference to an Ada 2012 container element.
8505         (Is_Element_Reference): New routine.
8507 2014-07-17  Robert Dewar  <dewar@adacore.com>
8509         * ali.ads: Minor comment fix.
8510         * lib-writ.adb: Minor reformatting.
8512 2014-07-17  Ed Schonberg  <schonberg@adacore.com>
8514         * sem_ch10.adb (Analyze_Proper_Body): When analyzing a subunit
8515         in ASIS mode, load another subunit only if it a subunit of the
8516         current one, not a sibling that has been reached through the
8517         analysis of an ancestor. This allows the construction of the
8518         ASIS tree for the subunit even when sibling subunits have errors.
8520 2014-07-17  Hristian Kirtchev  <kirtchev@adacore.com>
8522         * sem_ch3.adb (Analyze_Declarations): Remove the guard which
8523         prevents the analysis of various contracts when the associated
8524         construct is erroneous.
8525         * sem_util.adb (Save_SPARK_Mode_And_Set): Do not query the
8526         SPARK_Pragma of an illegal or a partially decorated construct.
8528 2014-07-17  Robert Dewar  <dewar@adacore.com>
8530         * s-imguns.ads: Minor reformatting.
8532 2014-07-17  Hristian Kirtchev  <kirtchev@adacore.com>
8534         * exp_ch7.adb (Build_Finalization_Master): Move all local
8535         variables to the proper code section. When looking for an existing
8536         finalization master, inspect the ultimate ancestor type of the
8537         full view.
8538         * sem_util.ads, sem_util.adb (Root_Type_Of_Full_View): New routine.
8540 2014-07-17  Robert Dewar  <dewar@adacore.com>
8542         * aspects.ads, aspects.adb: Add entries for aspect Annotate.
8543         * gnat_rm.texi: Document Entity argument for pragma Annotate and
8544         Annotate aspect.
8545         * sem_ch13.adb (Analyze_Aspect_Specification): Add processing
8546         for Annotate aspect.
8547         * sem_prag.adb (Analyze_Pragma, case Annotate): Allow optional
8548         Entity argument at end.
8549         * sinfo.ads (N_Aspect_Specification): Add note on Annotate aspect.
8551 2014-07-17  Tristan Gingold  <gingold@adacore.com>
8553         * s-imguns.ads: Fix minor typo.
8555 2014-07-17  Thomas Quinot  <quinot@adacore.com>
8557         * sprint.adb: Minor reformatting.
8559 2014-07-17  Robert Dewar  <dewar@adacore.com>
8561         * sprint.adb (Write_Itype): Print proper header for string
8562         literal subtype.
8564 2014-07-17  Steve Baird  <baird@adacore.com>
8566         * sinfo.ads, sem_scil.ads: Improve comments, minor reformatting.
8568 2014-07-17  Vincent Celier  <celier@adacore.com>
8570         * gnatbind.adb: Change in message "try ... for more information".
8572 2014-07-17  Robert Dewar  <dewar@adacore.com>
8574         * sprint.adb: Code clean up.
8576 2014-07-17  Hristian Kirtchev  <kirtchev@adacore.com>
8578         * exp_ch7.adb (Find_Last_Init): Relocate local variables to
8579         the relevant code section. Add new local constant Obj_Id. When
8580         a limited controlled object is initialized by a function call,
8581         the build-in-place object access function call acts as the last
8582         initialization statement.
8583         * exp_util.adb (Is_Object_Access_BIP_Func_Call): New routine.
8584         (Is_Secondary_Stack_BIP_Func_Call): Code reformatting.
8585         * exp_util.ads (Is_Object_Access_BIP_Func_Call): New routine.
8587 2014-07-17  Ed Schonberg  <schonberg@adacore.com>
8589         * sem_ch8.adb (Analyze_Generic_Renaming): For generic subprograms,
8590         propagate intrinsic flag to renamed entity, to allow e.g. renaming
8591         of Unchecked_Conversion.
8592         * sem_ch3.adb (Analyze_Declarations): Do not analyze contracts
8593         if the declaration has errors.
8595 2014-07-17  Ed Schonberg  <schonberg@adacore.com>
8597         * a-rbtgbk.adb: a-rbtgbk.adb (Generic_Insert_Post): Check whether
8598         container is busy before checking whether capacity allows for
8599         a further insertion. Insertion in a busy container that is full
8600         raises Program_Error rather than Capacity_Error. Previous to that
8601         patch which exception was raised varied among container types.
8603 2014-07-17  Robert Dewar  <dewar@adacore.com>
8605         * g-comlin.ads, g-comlin.adb: Minor clean up.
8607 2014-07-17  Bob Duff  <duff@adacore.com>
8609         * gnat_ugn.texi: Update gnatpp doc.
8611 2014-07-17  Robert Dewar  <dewar@adacore.com>
8613         * gnat_rm.texi: Document new restriction No_Long_Long_Integers.
8614         * exp_ch4.adb (Make_Array_Comparison_Op): Add note that we
8615         could do this by actually expanding a real generic.
8616         * a-tags.ads: Add comments about performance.
8617         * sprint.adb (Sprint_Node_Actual, case N_Object_Declaration):
8618         Print Etype of defining identifier, rather than the object
8619         definition. More information.
8621 2014-07-17  Thomas Quinot  <quinot@adacore.com>
8623         * exp_dist.adb: Minor documentation clarification.
8625 2014-07-17  Hristian Kirtchev  <kirtchev@adacore.com>
8627         * exp_util.adb (Is_Aliased): Revert previous change.
8629 2014-07-17  Vincent Celier  <celier@adacore.com>
8631         * g-comlin.adb (Try_Help): New procedure.
8632         (Getopt): Use new procedure Try_Help.
8633         * g-comlin.ads (Try_Help): New procedure.
8635 2014-07-17  Bob Duff  <duff@adacore.com>
8637         * gnat_ugn.texi: Minor update.
8639 2014-07-17  Robert Dewar  <dewar@adacore.com>
8641         * gnat_rm.texi: Improve documentation of Unrestricted_Access.
8642         * sinfo.ads: Document restriction on aggregates (must expand to
8643         assignments if one or more assignments needs expansion, e.g. for
8644         controlled types).
8645         * sem_ch13.adb: All warning messages regarding bit order should
8646         be info: messages.
8647         * gnat_ugn.texi: Minor correction of missing @ on @code
8649 2014-07-17  Robert Dewar  <dewar@adacore.com>
8651         * restrict.ads (Implementation_Restriction): Add No_Long_Long_Integer.
8652         * s-rident.ads (Partition_Boolean_Restrictions): Add
8653         No_Long_Long_Integer.
8654         * sem_ch3.adb (Modular_Type_Declaration): Size must be <=
8655         Long_Integer'Size if restriction No_Long_Long_Integer is active.
8656         (Signed_Integer_Type_Declaration): Do not allow Long_Long_Integer
8657         as the implicit base type for a signed integer type declaration
8658         if restriction No_Long_Long_Integer is active.
8659         * sem_util.ads, sem_util.adb (Set_Entity_With_Checks): Include check for
8660         No_Long_Long_Integer.
8662 2014-07-17  Robert Dewar  <dewar@adacore.com>
8664         * sem_ch3.adb, a-ztexio.ads, exp_imgv.adb, casing.adb, casing.ads,
8665         einfo.ads, checks.adb, sem_ch12.adb, a-textio.ads, freeze.adb,
8666         repinfo.adb, exp_ch6.adb, sem_ch4.adb, a-witeio.ads, sem_ch8.adb,
8667         sem_warn.adb, exp_aggr.adb, exp_dist.adb, par-tchk.adb, s-fatgen.adb,
8668         treepr.adb, lib-xref.adb: Remove the word kludge from ada sources.
8670 2014-07-17  Robert Dewar  <dewar@adacore.com>
8672         * debug.adb: Remove -gnatdQ.
8673         * exp_disp.adb: Remove -gnatdQ.
8674         * a-ztenio.ads, a-wtinio.ads, a-wtmoio.ads, a-ztcoau.ads, a-tiinio.ads,
8675         a-wtfiio.ads, a-timoio.ads, sem_ch12.adb, a-tifiio.ads, a-ztinio.ads,
8676         rtsfind.adb, rtsfind.ads, a-ztmoio.ads, a-wtdeio.ads, a-ztfiio.ads,
8677         a-tideio.ads, a-wtflio.ads, a-ztdeio.ads, sem_ch8.adb, a-tiflio.ads,
8678         sprint.adb, a-ztflio.ads, snames.ads-tmpl, a-wtenio.ads,
8679         a-tienio.ads: Rename Text_IO_Kludge to Text_IO_Special_Unit.
8681 2014-07-17  Robert Dewar  <dewar@adacore.com>
8683         * back_end.adb: Minor reformatting and comment additions.
8684         * checks.ads, checks.adb (Duplicated_Tag_Checks_Suppressed): New
8685         function.
8686         * exp_disp.adb (Make_DT): Use Duplicated_Tag_Checks_Suppressed.
8687         (Make_VM_TSD): Use Duplicated_Tag_Checks_Suppressed.
8688         * gnat_rm.texi: Document new check Duplicated_Tag_Checks_Suppressed.
8689         * gnat_ugn.texi: Additional documentation for Duplicated_Tag_Check.
8690         * snames.ads-tmpl (Duplicated_Tag_Checks_Suppressed): New check.
8691         * types.ads (Duplicated_Tag_Checks_Suppressed): New check.
8693 2014-07-17  Robert Dewar  <dewar@adacore.com>
8695         * gnat_rm.texi: Minor comment updates.
8697 2014-07-17  Ed Schonberg  <schonberg@adacore.com>
8699         * sem_util.adb (Make_Explicit_Dereference): If the expression
8700         being dereferenced is a generalized indexing, reset the overloaded
8701         flag on the generalized indexing call, consistent with the
8702         resetting of the flag on the original indexed component.
8704 2014-07-17  Robert Dewar  <dewar@adacore.com>
8706         * gnat_ugn.texi: Document advise not to mix -gnatV? and
8707         optimization.
8709 2014-07-17  Robert Dewar  <dewar@adacore.com>
8711         * checks.adb (Insert_Valid_Check): Don't insist on a name
8712         for the prefix when we make calls to Force_Evaluation and
8713         Duplicate_Subexpr_No_Checks.
8714         * exp_util.adb (Is_Volatile_Reference): Handle all cases properly
8715         (Remove_Side_Effects): Handle all volatile references right
8716         (Side_Effect_Free): Volatile reference is never side effect free
8717         * sinfo.ads (N_Attribute_Reference): Add comments explaining
8718         that in the tree, the prefix can be a general expression.
8720 2014-07-17  Hristian Kirtchev  <kirtchev@adacore.com>
8722         * sem_ch6.adb (Analyze_Subprogram_Body_Contract,
8723         Analyze_Subprogram_Contract): Add comments on SPARK_Mode save/restore.
8724         * sem_ch7.adb (Analyze_Package_Body_Contract,
8725         Analyze_Package_Contract): Add comments on SPARK_Mode save/restore.
8727 2014-07-17  Robert Dewar  <dewar@adacore.com>
8729         * exp_ch7.ads, exp_util.ads: Document Insert_Action_After,
8730         Store_After_Actions_In_Scope.
8732 2014-07-17  Robert Dewar  <dewar@adacore.com>
8734         * sem_aux.ads: Minor comment addition.
8736 2014-07-17  Ed Schonberg  <schonberg@adacore.com>
8738         * sem_res.adb (Make_Call_Into_Operator): If the call is already
8739         a rewriting of an operator node, there are no actuals to be
8740         propagated from original node to rewritten node when in ASIS mode.
8742 2014-07-17  Hristian Kirtchev  <kirtchev@adacore.com>
8744         * sem_ch6.adb (Analyze_Subprogram_Body_Contract,
8745         Analyze_Subprogram_Contract): Add new local variable Mode. Save
8746         and restore the SPARK mode of the related construct in a
8747         stack-like fashion.
8748         * sem_ch7.adb (Analyze_Package_Body_Contract,
8749         Analyze_Package_Contract): Add new local variable Mode. Save and
8750         restore the SPARK mode of the related construct in a stack-like fashion.
8751         * sem_util.adb Remove with and use clause for Opt.
8752         (Restore_SPARK_Mode): New routine.
8753         (Save_SPARK_Mode_And_Set): New routine.
8754         * sem_util.ads Add with and use clause for Opt.
8755         (Restore_SPARK_Mode): New routine.
8756         (Save_SPARK_Mode_And_Set): New routine.
8758 2014-07-17  Hristian Kirtchev  <kirtchev@adacore.com>
8760         * exp_util.adb (Is_Aliased): Transient objects
8761         within an expression with actions cannot be considered aliased.
8763 2014-07-17  Thomas Quinot  <quinot@adacore.com>
8765         * sem.ads (Scope_Stack_Entry): Reorganize storage of action lists;
8766         introduce a new list (cleanup actions) for each (transient) scope.
8767         * sinfo.ads, sinfo.adb (Cleanup_Actions): New attribute for
8768         N_Block_Statement
8769         * exp_ch7.ads (Store_Cleanup_Actions_In_Scope): New subprogram.
8770         * exp_ch7.adb (Store_Actions_In_Scope): New subprogram, common
8771         processing for Store_xxx_Actions_In_Scope.
8772         (Build_Cleanup_Statements): Allow for a list of additional
8773         cleanup statements to be passed by the caller.
8774         (Expand_Cleanup_Actions): Take custom cleanup actions associated
8775         with an N_Block_Statement into account.
8776         (Insert_Actions_In_Scope_Around): Account for Scope_Stack_Entry
8777         reorganization (refactoring only, no behaviour change).
8778         (Make_Transient_Block): Add assertion to ensure that the current
8779         scope is indeed a block (namely, the entity for the transient
8780         block being constructed syntactically, which has already been
8781         established as a scope).  If cleanup actions are present in the
8782         transient scope, transfer them now to the transient block.
8783         * exp_ch6.adb (Expand_Protected_Subprogram_Call): Freeze the
8784         called function while it is still present as the name in a call
8785         in the tree. This may not be the case later on if the call is
8786         rewritten into a transient block.
8787         * exp_smem.adb (Add_Shared_Var_Lock_Procs): The post-actions
8788         inserted after calling a protected operation on a shared passive
8789         protected must be performed in a block finalizer, not just
8790         inserted in the tree, so that they are executed even in case of
8791         a normal (RETURN) or abnormal (exception) transfer of control
8792         outside of the current scope.
8793         * exp_smem.ads (Add_Shared_Var_Lock_Procs): Update documentation
8794         * sem_ch8.adb, expander.adb, exp_ch11.adb: Adjust for
8795         Scope_Stack_Entry reorganization.
8797 2014-07-17  Thomas Quinot  <quinot@adacore.com>
8799         * exp_disp.adb (Make_DT, Make_VM_TSD): Do not omit Check_TSD
8800         call for types that do not have an explicit attribute definition
8801         clause for External_Tag, as their default tag may clash with an
8802         explicit tag defined for some other type.
8804 2014-07-17  Hristian Kirtchev  <kirtchev@adacore.com>
8806         * exp_util.adb (Is_Controlled_Function_Call): Recognize a
8807         controlled function call with multiple actual parameters that
8808         appears in Object.Operation form.
8810 2014-07-17  Thomas Quinot  <quinot@adacore.com>
8812         * einfo.ads, einfo.adb (Has_External_Tag_Rep_Clause): Remove
8813         entity flag.
8814         * sem_ch13.adb (Analyze_Attribute_Definition_Clause, case
8815         External_Tag): No need to set entity flag.
8816         * sem_aux.ads, sem_aux.adb (Has_External_Tag_Rep_Clause):
8817         Reimplement correctly in terms of Has_Rep_Item.
8819 2014-07-17  Thomas Quinot  <quinot@adacore.com>
8821         * exp_ch7.adb (Establish_Transient_Scope.Find_Node_To_Be_Wrapped):
8822         Start examining the tree at the node passed to
8823         Establish_Transient_Scope (not its parent).
8824         * exp_ch6.adb (Make_Build_In_Place_Call_In_Object_Declaration):
8825         The access type for the variable storing the reference to
8826         the call must be declared and frozen prior to establishing a
8827         transient scope.
8828         * exp_ch9.adb: Minor reformatting.
8830 2014-07-17  Pascal Obry  <obry@adacore.com>
8832         * s-os_lib.ads: Minor comment update.
8834 2014-07-17  Tristan Gingold  <gingold@adacore.com>
8836         * sysdep.c: Add ATTRIBUTE_UNUSED to avoid warnings.  Fix some
8837         indentation.
8838         * socket.c: Remove #warning to avoid warning.
8839         * expect.c: Indent some preprocessor directives to clarify
8840         nested if.  Do not use wait.h on PikeOS.  Add ATTRIBUTE_UNUSED
8841         to remove warnings.
8842         * env.c: Fix indentation.  Port to PikeOS.
8843         * gsocket.h: Port to PikeOS.  Remove #warning.
8844         * terminals.c: Port to PikeOS.  Fix indentation of the stubs.
8845         Add ATTRIBUTE_UNUSED to stubs arguments.  Fix return statement
8846         of stubbed __gnat_setup_parent_communication.
8847         * adaint.c: Port to PikeOS.  Reindent some preprocessor
8848         directives to clarify nested if.  Fix indentation.  Add missing
8849         ATTRIBUTE_UNUSED.
8851 2014-07-17  Robert Dewar  <dewar@adacore.com>
8853         * sem_attr.adb: Minor reformatting.
8855 2014-07-17  Robert Dewar  <dewar@adacore.com>
8857         * exp_ch7.adb, exp_ch7.ads, sinfo.ads: Minor reformatting.
8859 2014-07-17  Ed Schonberg  <schonberg@adacore.com>
8861         * sem_case.adb (Check_Choice_Set): If the case expression is the
8862         expression in a predicate, do not recheck coverage against itself,
8863         to prevent spurious errors.
8864         * sem_ch13.adb (Check_Aspect_At_End_Of_Declarations): Indicate that
8865         expression comes from an aspect specification, to prevent spurious
8866         errors when expression is a case expression in a predicate.
8868 2014-07-17  Pascal Obry  <obry@adacore.com>
8870         * adaint.c, adaint.h (__gnat_set_executable): Add mode parameter.
8871         * s-os_lib.ads, s-os_lib.adb (Set_Executable): Add Mode parameter.
8873 2014-07-17  Vincent Celier  <celier@adacore.com>
8875         * gnatchop.adb, make.adb, gnatbind.adb, clean.adb, gprep.adb,
8876         gnatxref.adb, gnatls.adb, gnatfind.adb, gnatname.adb: Do not output
8877         the usage for an erroneous invocation of a gnat tool.
8879 2014-07-16  Vincent Celier  <celier@adacore.com>
8881         * gnatls.adb: Get the target parameters only if -nostdinc was
8882         not specified.
8884 2014-07-16  Ed Schonberg  <schonberg@adacore.com>
8886         * checks.adb (Insert_Valid_Check): If the expression is a packed
8887         component of a modular type of the right size the data is always
8888         valid. This os particularly useful if the component is part of
8889         a volatile variable.
8891 2014-07-16  Robert Dewar  <dewar@adacore.com>
8893         * gnat_rm.texi, sinfo.ads, freeze.adb, exp_aggr.adb: Minor reformatting
8895 2014-07-16  Thomas Quinot  <quinot@adacore.com>
8897         * exp_ch7.ads: Minor documentation fix.
8899 2014-07-16  Ed Schonberg  <schonberg@adacore.com>
8901         * sem_ch3.adb (Find_Type_Name): Diagnose properly
8902         a private extension completion that is an interface definition
8903         with an interface list.
8905 2014-07-16  Arnaud Charlet  <charlet@adacore.com>
8907         * gnatls.adb (Gnatls): Code clean ups.
8909 2014-07-16  Thomas Quinot  <quinot@adacore.com>
8911         * sinfo.ads, sinfo.adb (N_Compound_Statement): New node kind.
8912         * sem.adb (Analyze): Handle N_Compound_Statement.
8913         * sprint.adb (Sprint_Node_Actual): Ditto.
8914         * sem_ch5.ads, sem_ch5.adb (Analyze_Compound_Statement): New
8915         procedure to handle N_Compound_Statement.
8916         * exp_aggr.adb (Collect_Initialization_Statements):
8917         Use a proper compound statement node, instead of a bogus
8918         expression-with-actions with a NULL statement as its expression,
8919         to wrap collected initialization statements.
8920         * freeze.ads, freeze.adb
8921         (Explode_Initialization_Compound_Statement): New public procedure,
8922         lifted from Freeze_Entity.
8923         (Freeze_Entity): When freezing
8924         an object with captured initialization statements and without
8925         delayed freezing, explode compount statement.
8926         * sem_ch4.adb (Analyze_Expression_With_Actions): Remove special
8927         case that used to handle bogus EWAs with NULL statement as
8928         the expression.
8929         * exp_ch13.adb (Expand_N_Freeze_Entity): For an object with
8930         delayed freezing and captured initialization statements, explode
8931         compound statement.
8933 2014-07-16  Gary Dismukes  <dismukes@adacore.com>
8935         * g-rewdat.adb, g-rewdat.ads: Minor reformatting.
8937 2014-07-16  Doug Rupp  <rupp@adacore.com>
8939         * s-interr-hwint.adb: Casing error on parameter.
8941 2014-07-16  Pascal Obry  <obry@adacore.com>
8943         * Makefile.rtl: Add g-rewdat.o dependencies in
8944         GNATRTL_NONTASKING_OBJS.
8946 2014-07-16  Ed Schonberg  <schonberg@adacore.com>
8948         * sem_case.adb: Code clean up.
8950 2014-07-16  Vincent Celier  <celier@adacore.com>
8952         * make.adb: Do not read gnat.adc when gnatmake is invoked
8953         with -gnatA.
8955 2014-07-16  Pascal Obry  <obry@adacore.com>
8957         * gnat_rm.texi, impunit.adb, g-rewdat.adb, g-rewdat.ads: Initial
8958         implementation of GNAT.Rewrite_Data.
8960 2014-07-16  Vincent Celier  <celier@adacore.com>
8962         * gnatls.adb (Normalize): New function.
8963         (Gnatls): Get the target parameters. On targets other than VMS,
8964         normalize the path names in the source search path, the object search
8965         path and the project search path.
8967 2014-07-16  Ed Schonberg  <schonberg@adacore.com>
8969         * sem_case.adb: Avoid self-checking of case expressions in
8970         dynamic predicates.
8972 2014-07-16  Robert Dewar  <dewar@adacore.com>
8974         * gnat_rm.texi: Document effect of Suppress_Initialization on tags and
8975         discriminants.
8977 2014-07-16  Eric Botcazou  <ebotcazou@adacore.com>
8979         * switch-b.adb (Scan_Binder_Switches): Add missing guard.
8981 2014-07-16  Ben Brosgol  <brosgol@adacore.com>
8983         * gnat_ugn.texi: Fix typo.
8985 2014-07-16  Ed Schonberg  <schonberg@adacore.com>
8987         * exp_ch4.adb (Expand_N_Case_Expression): Do not expand case
8988         expression if it is the specification of a subtype predicate:
8989         it will be expanded when the return statement is analyzed, or
8990         when a static predicate is transformed into a static expression
8991         for evaluation by the front-end.
8992         * sem_ch13.adb (Get_RList): If the expression for a static
8993         predicate is a case expression, extract the alternatives of the
8994         branches with a True value to create the required statically
8995         evaluable expression.
8997 2014-07-16  Thomas Quinot  <quinot@adacore.com>
8999         * exp_prag.adb (Expand_Pragma_Check): Use the location of the
9000         expression, not the location of the aspect, for all generated
9001         code, so that in particular the call to raise_assert_failure
9002         gets the sloc of the associated condition.
9003         * exp_ch6.adb
9004         (Expand_Subprogram_Contract.Build_Postconditions_Procedure):
9005         Set an explicit End_Label on the handled sequence of statements
9006         for the _Postconditions procedure so that the implicit return
9007         statement does not erroneously get associated with code generated
9008         for the last condition in postconditions.
9010 2014-07-16  Thomas Quinot  <quinot@adacore.com>
9012         * ug_words: Fix name of VMS synonym for -gnatw.z (SIZE_ALIGNMENT,
9013         not SIZE_ALIGN) and -gnatw.Z (NOSIZE_ALIGNMENT, not NOSIZE_ALIGN).
9014         * vms_data.ads: Add missing spaces in VMS synonyms for -gnatw.z /
9015         -gnatw.Z.
9017 2014-07-16  Robert Dewar  <dewar@adacore.com>
9019         * sem_ch3.adb, sem_prag.adb, sem_util.adb, sem_res.adb, sem_ch13.adb:
9020         Minor code reorganization (use Is_Access_Type, not in Access_Kind).
9021         * exp_ch3.adb: Minor code reorganization, use Is_Access_Type,
9022         not in Access_Kind.
9023         * par-ch4.adb (At_Start_Of_Attribute): New function
9024         (P_Simple_Expression): Better msg for bad attribute prefix.
9025         * scans.ads: Minor reformatting.
9027 2014-07-16  Ed Schonberg  <schonberg@adacore.com>
9029         * sem_attr.adb (Resolve_Attribute, case 'Update): If choice is a
9030         static constant, check that in belongs to the corresponding index
9031         subtype, to produce the proer warning when expansion is disabled.
9033 2014-07-16  Robert Dewar  <dewar@adacore.com>
9035         * freeze.adb (Freeze_Entity): Warn on incompatible size/alignment.
9036         * gnat_ugn.texi: Document -gnatw.z and -gnatw.Z.
9037         * ug_words: VMS synonyms (WARNINGS=[NO]SIZE_ALIGN) for -gnatw.z/-gnatw.Z
9038         * usage.adb: Add lines for -gnatw.z/-gnatw.Z.
9039         * vms_data.ads: VMS synonyms (WARNINGS=[NO]SIZE_ALIGN) for
9040         -gnatw.z/-gnatw.Z
9041         * warnsw.adb: Set Warn_On_Size_Alignment appropriately.
9042         * warnsw.ads (Warn_On_Size_Alignment): New flag Minor
9043         reformatting.
9045 2014-07-16  Hristian Kirtchev  <kirtchev@adacore.com>
9047         * exp_ch7.adb (Process_Declarations): Reinstate the check on
9048         a hook object to ensure that the related transient declaration
9049         is finalizable.
9050         * exp_util.adb (Is_Aliased): Do not consider expresison with
9051         actions as a special context.
9052         (Requires_Cleanup_Actions): Reinstate the check on a hook object to
9053         ensure that the related transient declaration is finalizable.
9055 2014-07-16  Robert Dewar  <dewar@adacore.com>
9057         * checks.ads, checks.adb (Allocation_Checks_Suppressed): New function.
9058         * snames.ads-tmpl: Add Allocation_Check to list of check names.
9059         * types.ads: Add Allocation_Check to list of check names.
9061 2014-07-16  Thomas Quinot  <quinot@adacore.com>
9063         * sem_util.adb (Enter_Name): replace bogus test for presence of
9064         Corresponding_Remote_Type with correct test on Ekind.
9065         * sem_res.adb (Valid_Conversion): ditto; also clarify validity
9066         of calls to Corresponding_ Remote_Type (documentation fix).
9068 2014-07-16  Robert Dewar  <dewar@adacore.com>
9070         * gnat_rm.texi: Document illegal case of Unrestricted_Access.
9071         * sem_attr.adb (Analyze_Access_Attribute): Set_Non_Aliased_Prefix
9072         where it applies.
9073         (Resolve_Attribute, case Access): Flag illegal Unrestricted_Access use.
9074         * sinfo.ads, sinfo.adb (Non_Aliased_Prefix): New flag.
9076 2014-07-16  Robert Dewar  <dewar@adacore.com>
9078         * gnat_ugn.texi: Document binder switch -Ra.
9079         * gnatbind.adb (List_Closure_Display): Implement -Ra switch
9080         (List_Closure_All).
9081         * opt.ads (List_Closure_All): New switch.
9082         * switch-b.adb (Scan_Binder_Switches): Recognize -Ra to set
9083         List_Closure_All.
9085 2014-07-16  Ben Brosgol  <brosgol@adacore.com>
9087         * gnat_rm.texi: Minor edits, to make case consistent in names
9088         of types and fields.
9090 2014-07-16  Robert Dewar  <dewar@adacore.com>
9092         * gnat_rm.texi: Document erroneous mixing of thin pointers and
9093         unrestricted access
9094         * gnat_ugn.texi: Add note on size of access types about thin
9095         pointers and the use of attribute Unrestricted_Access.
9097 2014-07-16  Ed Schonberg  <schonberg@adacore.com>
9099         * a-cbdlli.ads, a-cbdlli.adb, a-cbhama.ads, a-cbhama.adb,
9100         * a-cbhase.ads, a-cbhase.adb, a-cborma.ads, a-cborma.adb,
9101         * a-cborse.ads, a-cborse.adb, a-cobove.ads a-cobove.adb: Add Control
9102         machinery to detect tampering on bounded vectors.
9104 2014-07-16  Robert Dewar  <dewar@adacore.com>
9106         * gnat_rm.texi: Document that leading/trailing asterisks are
9107         now implied for the pattern match string for pragma Warnings
9108         and Warning_As_Error.
9109         * sem_prag.adb (Acquire_Warning_Match_String): New procedure.
9110         (Analyze_Pragma, case Warning_As_Error): Call
9111         Acquire_Warning_Match_String.
9112         (Analyze_Pragma, case Warnings): Call Acquire_Warning_Match_String.
9114 2014-07-16  Bob Duff  <duff@adacore.com>
9116         * gnat_ugn.texi: Document need for project file
9117         for --incremental switch for gnat2xml.
9119 2014-07-16  Robert Dewar  <dewar@adacore.com>
9121         * gnat_rm.texi: Fix example of non-packable components in packed
9122         records section.
9124 2014-07-16  Robert Dewar  <dewar@adacore.com>
9126         * s-tpoben.adb, s-tasren.adb, s-interr.adb, s-interr-hwint.adb,
9127         s-shasto.adb, s-interr-vms.adb, s-interr-sigaction.adb: Avoid use of
9128         upper case in exception messages.
9130 2014-07-16  Robert Dewar  <dewar@adacore.com>
9132         * snames.ads-tmpl, sem_attr.adb, exp_attr.adb: Same_Storage attribute
9133         is renamed Has_Same_Storage.
9134         * gnat_rm.texi: Document missing SPARK pragmas and attributes.
9135         * sem_prag.adb: Minor comment fix (use LOCAL_NAME in syntax
9136         descriptions).
9138 2014-07-16  Robert Dewar  <dewar@adacore.com>
9140         * exp_util.adb, sem_attr.adb, exp_ch4.adb, a-cohase.ads,
9141         a-coinho-shared.adb, a-coinho-shared.ads: Minor reformatting.
9143 2014-07-16  Robert Dewar  <dewar@adacore.com>
9145         * gnat_ugn.texi: Add note that integrated
9146         preprocessing cannot be applied to configuration pragma files.
9148 2014-07-16  Yannick Moy  <moy@adacore.com>
9150         * sem_attr.adb (Analyze_Attribute/cases Pred
9151         and Succ): Always enable range check on fixed-point types if
9152         not suppressed for the type.
9154 2014-07-16  Hristian Kirtchev  <kirtchev@adacore.com>
9156         * sem_util.adb (State_Has_Enabled_Property):
9157         Account for an external property denoted by an others choice.
9159 2014-07-16  Hristian Kirtchev  <kirtchev@adacore.com>
9161         * exp_ch4.ads, exp_ch4.adb (Find_Hook_Context): Relocated to Exp_Util.
9162         * exp_ch7.adb (Process_Declarations): There is no need to check
9163         that a transient object being hooked is controlled as it would
9164         not have been hooked in the first place.
9165         * exp_ch9.adb Remove with and use clause for Exp_Ch4.
9166         * exp_util.adb (Find_Hook_Context): Relocated from Exp_Ch4.
9167         (Is_Aliased): A renaming of a transient controlled object is
9168         not considered aliasing when it occurs within an expression
9169         with actions.
9170         (Requires_Cleanup_Actions): There is no need to
9171         check that a transient object being hooked is controlled as it
9172         would not have been hooked in the first place.
9173         * exp_util.ads (Find_Hook_Context): Relocated from Exp_Ch4.
9175 2014-07-16  Hristian Kirtchev  <kirtchev@adacore.com>
9177         * sem_ch13.adb (Insert_After_SPARK_Mode): Moved to
9178         the outer level of routine Analyze_Aspect_Specifications. Ensure
9179         that the corresponding pragmas of aspects Initial_Condition and
9180         Initializes are inserted after pragma SPARK_Mode.
9182 2014-07-16  Ed Schonberg  <schonberg@adacore.com>
9184         * sem_attr.adb (Analyze_Attribute, case 'Update): Handle
9185         properly a choice list with more than one choice, where each
9186         is an aggregate denoting a sequence of array indices for a
9187         multidimentional array. For SPARK use.
9189 2014-07-16  Vadim Godunko  <godunko@adacore.com>
9191         * a-coinho-shared.adb (Adjust): Create
9192         copy of internal shared object and element when source container
9193         is locked.
9194         (Copy): Likewise.
9195         (Query_Element): Likewise.
9196         (Update_Element): Likewise.
9197         (Constant_Reference): Likewise. Raise Constraint_Error on attempt
9198         to get reference for empty holder.
9199         (Reference): Likewise.
9201 2014-07-16  Thomas Quinot  <quinot@adacore.com>
9203         * exp_ch4.adb (Find_Hook_Context): New subprogram, extracted
9204         from Process_Transient_Oject.
9205         * exp_ch4.ads: Ditto.
9206         * exp_ch9.adb (Build_Class_Wide_Master): Insert the _master
9207         declaration as an action on the topmost enclosing expression,
9208         not on a possibly conditional subexpreession.
9210 2014-07-16  Vadim Godunko  <godunko@adacore.com>
9212         * a-coinho.adb, a-coinho-shared.adb, a-coinho.ads, a-coinho-shared.ads:
9213         Fix parameter mode of Update_Element.
9215 2014-07-16  Robert Dewar  <dewar@adacore.com>
9217         * a-coinho.adb, a-coinho-shared.adb, a-coinho-shared.ads: Minor
9218         reformatting.
9220 2014-07-16  Ed Schonberg  <schonberg@adacore.com>
9222         * a-cohase.ads: Type Iterator must be controlled, so that the
9223         tampering bit is properly set through an iteration.
9224         * a-cohase.adb: Add Finalize operation for type Iterator.
9226 2014-07-16  Ed Schonberg  <schonberg@adacore.com>
9228         * a-coinho-shared.adb, a-coinho-shared.ads: Proper structures for
9229         tampering checks.
9231 2014-07-16  Ed Schonberg  <schonberg@adacore.com>
9233         * a-coinho-shared.adb: Fix spurious accessibility check.
9235 2014-06-15  Jan Hubicka  <hubicka@ucw.cz>
9237         * gcc-interface/utils.c (process_attributes): Use set_decl_tls_model.
9239 2014-06-14  Bernd Edlinger  <bernd.edlinger@hotmail.de>
9241         PR ada/61505
9242         * gnat_rm.texi: Fix errors with makeinfo 5.1.
9244 2014-06-14  Arnaud Charlet  <charlet@adacore.com>
9246         PR ada/61505
9247         * gnat_rm.texi: Attempt to fix error with makeinfo 5.1.
9249 2014-06-13  Yannick Moy  <moy@adacore.com>
9251         * exp_attr.adb: Fix typo in comment.
9252         * gnat1drv.adb (Adjust_Global_Switches): Force float overflow
9253         checking in GNATprove_Mode.
9255 2014-06-13  Ed Schonberg  <schonberg@adacore.com>
9257         * a-coinho-shared.adb, a-coinho-shared.ads: Update shared version.
9259 2014-06-13  Robert Dewar  <dewar@adacore.com>
9261         * sem_ch3.adb, sem_ch9.adb, a-coinho.adb, a-coinho.ads: Minor
9262         reformatting.
9264 2014-06-13  Hristian Kirtchev  <kirtchev@adacore.com>
9266         * sem_prag.adb (Analyze_Pragma): Add local
9267         variable Missing_Parentheses. Emit an error when a state
9268         declaration with options appears without parentheses. Add a
9269         guard to prevent a bogus error when a state declaration may be
9270         interpreted as an option if a previous declaration with options
9271         was not parenthesized.
9273 2014-06-13  Robert Dewar  <dewar@adacore.com>
9275         * checks.adb: Validate_Alignment_Check_Warnings: New procedure
9276         (Apply_Address_Clause_Check): Make Aligment_Warnings table entry.
9277         * checks.ads (Alignment_Warnings_Record): New type.
9278         (Alignment_Warnings): New table
9279         (Validate_Alignment_Check_Warnings): New procedure.
9280         * errout.adb (Delete_Warning_And_Continuations): New procedure
9281         (Error_Msg_Internal): Set Warning_Msg (Delete_Warning): Handle
9282         Warnings_Treated_As_Errors (Finalize): Minor reformatting
9283         * errout.ads (Warning_Msg): New variable
9284         (Delete_Warning_And_Continuations): New procedure
9285         * erroutc.adb (Delete_Msg): Handle Warnings_Treated_As_Errors count.
9286         * gnat1drv.adb (Post_Compilation_Validation_Checks): New procedure.
9288 2014-06-13  Ed Schonberg  <schonberg@adacore.com>
9290         * a-coinho.adb, a-coinho.ads: Add Reference machinery.
9292 2014-06-13  Hristian Kirtchev  <kirtchev@adacore.com>
9294         * errout.adb (SPARK_Msg_N): New routine.
9295         (SPARK_Msg_NE): New routine.
9296         * errout.ads Add a section on SPARK-related error routines.
9297         (SPARK_Msg_N): New routine.
9298         (SPARK_Msg_NE): New routine.
9299         * sem_ch13.adb (Analyze_Aspect_Specifications): Ensure that
9300         pragma Abstract_State is always inserted after SPARK_Mode.
9301         (Insert_After_SPARK_Mode): New routine.
9302         * sem_prag.adb (Analyze_Abstract_State,
9303         Analyze_Constituent, Analyze_External_Property,
9304         Analyze_External_Property_In_Decl_Part, Analyze_Global_Item,
9305         Analyze_Global_List, Analyze_Initialization_Item,
9306         Analyze_Initialization_Item_With_Inputs, Analyze_Input_Item,
9307         Analyze_Input_List, Analyze_Input_Output, Analyze_Part_Of,
9308         Analyze_Pragma, Analyze_Refined_Depends_In_Decl_Part,
9309         Analyze_Refined_Global_In_Decl_Part,
9310         Analyze_Refined_State_In_Decl_Part, Analyze_Refinement_Clause,
9311         Check_Aspect_Specification_Order, Check_Constituent_Usage,
9312         Check_Declaration_Order, Check_Dependency_Clause,
9313         Check_Duplicate_Mode, Check_Duplicate_Option,
9314         Check_Duplicate_Property, Check_External_Properties,
9315         Check_External_Property, Check_Function_Return,
9316         Check_Matching_Constituent, Check_Matching_State,
9317         Check_Mode_Restriction_In_Enclosing_Context,
9318         Check_Mode_Restriction_In_Function, Check_Refined_Global_Item,
9319         Check_State_And_Constituent_Use, Create_Or_Modify_Clause,
9320         Has_Extra_Parentheses, Inconsistent_Mode_Error,
9321         Match_Error, Propagate_Part_Of, Report_Extra_Clauses,
9322         Report_Extra_Constituents_In_List, Report_Extra_Inputs,
9323         Report_Unrefined_States, Report_Unused_Constituents,
9324         Report_Unused_States, Role_Error, Usage_Error):
9325         Convert Error_Msg_XXX calls to SPARK_Msg_XXX calls
9326         to report semantic errors only when SPARK_Mode is on.
9327         (Analyze_Depends_In_Decl_Part): Do not check the syntax of
9328         pragma Depends explicitly, this is now done by the analysis.
9329         (Analyze_Global_In_Decl_List): Do not check the syntax of
9330         pragma Global explicitly, this is now done by the analysis.
9331         (Analyze_Initializes_In_Decl_Part): Do not check the syntax of
9332         pragma Initializes explicitly, this is now done by the analysis.
9333         (Analyze_Part_Of): Do not check the syntax of the encapsulating
9334         state, this is now done by the analysis.
9335         (Analyze_Pragma): Do
9336         not check the syntax of a state declaration, this is now done
9337         by the analysis.
9338         (Analyze_Refined_Depends_In_Decl_Part): Do not
9339         check the syntax of pragma Refined_Depends explicitly, this is now
9340         done by the analysis.
9341         (Analyze_Refined_Global_In_Decl_Part): Do
9342         not check the syntax of pragma Refined_Global explicitly, this is
9343         now done by the analysis.
9344         (Analyze_Refined_State_In_Decl_Part):
9345         Do not check the syntax of pragma Refined_State explicitly, this
9346         is now done by the analysis.
9347         (Check_Dependence_List_Syntax): Removed.
9348         (Check_Global_List_Syntax): Removed.
9349         (Check_Initialization_List_Syntax): Removed.
9350         (Check_Item_Syntax): Removed.
9351         (Check_Missing_Part_Of): Do not consider items from an instance.
9352         (Check_Refinement_List_Syntax): Removed.
9353         (Check_State_Declaration_Syntax): Removed.
9354         (Collect_Global_List): Do not raise Program_Error when the input is
9355         malformed.
9356         (Process_Global_List): Do not raise Program_Error when the input
9357         is malformed.
9358         * sem_ch13.adb: Minor reformatting.
9360 2014-06-13  Ed Schonberg  <schonberg@adacore.com>
9362         * sem_ch3.adb (Find_Type_Name): Diagnose a private type completion
9363         that is an interface definition with an interface list.
9364         (Process_Full_View): Move error message on missmatched interfaces
9365         between views to the declaration of full view, for clarity.
9366         * sem_ch9.adb (Check_Interfaces): Move error message to full view,
9367         for clarity.
9369 2014-06-13  Robert Dewar  <dewar@adacore.com>
9371         * exp_attr.adb (Expand_N_Attribute_Reference, case Pred/Succ): Change
9372         reason to Overflow.
9374 2014-06-13  Robert Dewar  <dewar@adacore.com>
9376         * makeutl.adb: Minor reformatting.
9378 2014-06-13  Gail Schenker  <schenker@adacore.com>
9380         * debug.adb, sem_eval.adb (Why_Not_Static): Remove temporary code and
9381         associated flag (d.z), no longer needed.
9383 2014-06-13  Ed Schonberg  <schonberg@adacore.com>
9385         * sem_ch13.adb (Analyze_Aspect_Specifications): For Import and
9386         Export aspects, do not check whether a corresponding Convention
9387         aspect has been specified. Convention is optional in Ada2012,
9388         and defaults to Convention_Ada.
9390 2014-06-13  Eric Botcazou  <ebotcazou@adacore.com>
9392         * checks.adb (Apply_Address_Clause_Check): Only issue the new
9393         warning if the propagation warning is issued.
9395 2014-06-13  Thomas Quinot  <quinot@adacore.com>
9397         * exp_ch4.adb: Minor reformatting.
9399 2014-06-13  Robert Dewar  <dewar@adacore.com>
9401         * exp_attr.adb (Expand_N_Attribute_Reference, case Pred):
9402         Handle float range check case (Expand_N_Attribute_Reference,
9403         case Succ): Handle float range check case.
9404         * sem_attr.adb (Analyze_Attribute, case Pred/Succ): Handle float
9405         range check case.
9407 2014-06-13  Vincent Celier  <celier@adacore.com>
9409         * makeutl.ads (Compute_Builder_Switches): Change name of
9410         parameter Root_Environment to Env.
9411         * prj-conf.adb (Check_Switches): Call Locate_Runtime with the
9412         Env parameter of procedure Get_Or_Create_Configuration_File.
9413         (Locate_Runtime): Call Find_Rts_In_Path with the Project_Path
9414         of new parameter Env.
9415         * prj-conf.ads (Locate_Runtime): New parameter Env of type
9416         Prj.Tree.Environment.
9418 2014-06-13  Robert Dewar  <dewar@adacore.com>
9420         * gnat_rm.texi: Minor comment clarification for Check_Float_Overflow.
9422 2014-06-13  Robert Dewar  <dewar@adacore.com>
9424         * exp_attr.adb, exp_ch9.adb, lib-writ.adb, g-comlin.adb: Minor
9425         reformatting.
9426         * sem_attr.adb: Minor code reformatting and simplification.
9427         * checks.adb: Fix minor typo.
9429 2014-06-13  Emmanuel Briot  <briot@adacore.com>
9431         * g-comlin.adb (Get_Argument): fix expansion
9432         of command line arguments (e.g. "*.adb") when using a custom
9433         parser. The parser was not passed to the recursive call, and
9434         thus we were trying to do the expansion on the default command
9435         line parser.
9437 2014-06-13  Thomas Quinot  <quinot@adacore.com>
9439         * exp_ch9.adb: Minor reformatting.
9441 2014-06-13  Ed Schonberg  <schonberg@adacore.com>
9443         * exp_attr.adb (Expand_N_Attribute_Reference, case 'Old):
9444         To determine whether the attribute should be expanded, examine
9445         whether the enclosing postcondition pragma is to be checked,
9446         rather than using the internal flag Assertions_Enabled.
9448 2014-06-13  Ben Brosgol  <brosgol@adacore.com>
9450         * gnat_rm.texi: Minor fixes.
9451         * gnat_ugn.texi: Added a missing "@itemize".
9453 2014-06-13  Robert Dewar  <dewar@adacore.com>
9455         * debug.adb: Remove -gnatd.1 flag documentation.
9456         * layout.adb (Layout_Type): Remove special handling of size
9457         for anonymous access type.
9458         * sem_ch3.adb (Replace_Type): Remove special handling of size
9459         for anonymous access type.
9461 2014-06-13  Robert Dewar  <dewar@adacore.com>
9463         * debug.adb: Document debug flag -gnatd.1.
9464         * layout.adb (Layout_Type): Size change for anonymous access
9465         types under -gnatd.1.
9466         * sem_ch3.adb (Replace_Type): Size change for anonymous access
9467         types under -gnatd.1.
9469 2014-06-13  Robert Dewar  <dewar@adacore.com>
9471         * layout.adb (Layout_Type): Anonymous access types designating
9472         unconstrained arrays are always thin pointers.
9473         * sem_ch3.adb (Replace_Type): Anonymous access types designating
9474         unconstrained arrays are always thin pointers.
9476 2014-06-13  Ed Schonberg  <schonberg@adacore.com>
9478         * sem_attr.adb (Analyze_Attribute): Use Check_Parameterless_Call
9479         to resolve the prefix of an attribute that is an entity name
9480         and may be a parameterless call.  Minor code reorganization.
9482 2014-06-13  Robert Dewar  <dewar@adacore.com>
9484         * lib.ads, lib.adb, lib-writ.adb, lib-load.adb (Is_Compiler_Unit):
9485         Removed.
9486         * opt.ads (Compiler_Unit): New flag.
9487         * par-ch5.adb (Test_Statement_Required): Call Check_Compiler_Unit
9488         for null statement sequence (not allowed in compiler unit).
9489         * par-prag.adb (Prag): Handle Compiler_Unit[_Warning] during
9490         parsing.
9491         * restrict.ads, restrict.adb (Check_Compiler_Unit): New version and new
9492         calling sequence.
9493         * sem_ch11.adb, sem_ch3.adb, sem_ch4.adb: New calling sequence for
9494         Check_Compiler_Unit.
9495         * sem_ch6.adb (Analyze_Extended_Return_Statement): Call
9496         Check_Compiler_Unit (this construct is not allowed in compiler
9497         units).
9498         * sem_prag.adb (Analyze_Pragma, case Compiler_Unit[_Warning]):
9499         Set Opt.Compiler_Unit.
9501 2014-06-13  Geert Bosch  <bosch@adacore.com>
9503         * gnat_rm.texi, s-tasinf-solaris.ads, sem_prag.adb, gnat_ugn.texi,
9504         s-tasinf-mingw.ads, s-tasinf.ads, s-tasinf-linux.ads,
9505         s-tasinf-vxworks.ads: Make Task_Info pragma and package obsolescent.
9507 2014-06-13  Robert Dewar  <dewar@adacore.com>
9509         * s-tasini.adb, s-tarest.adb, s-taprob.adb: Minor reformatting.
9511 2014-06-13  Hristian Kirtchev  <kirtchev@adacore.com>
9513         * freeze.adb (Freeze_Entity): Remove the check concerning volatile
9514         types in SPARK as it is poorly placed and poorly formulated. The
9515         check was flagging ALL volatile entities as illegal in SPARK.
9516         * sem_prag.adb (Process_Atomic_Shared_Volatile): Flag volatile
9517         types as illegal in SPARK.
9519 2014-06-13  Robert Dewar  <dewar@adacore.com>
9521         * sem_cat.adb: Minor reformatting.
9523 2014-06-13  Yannick Moy  <moy@adacore.com>
9525         * sem_prag.adb (Analyze_Pragma/Post_Class): Fix typo.
9527 2014-06-13  Arnaud Charlet  <charlet@adacore.com>
9529         * gnat_rm.texi: Add detail on SPARK_05 restriction.
9531 2014-06-13  Bob Duff  <duff@adacore.com>
9533         * s-solita.adb (Get_Sec_Stack_Addr, Init_Tasking_Soft_Links):
9534         Add assertions requiring the secondary stack to be initialized.
9535         * s-solita.ads (Init_Tasking_Soft_Links): Comment.
9536         * s-taprob.adb, s-tarest.adb, s-tasini.adb (elab code): Make sure the
9537         secondary stack is initialized before calling Init_Tasking_Soft_Links,
9538         by adding pragmas Elaborate_Body.
9540 2014-06-13  Thomas Quinot  <quinot@adacore.com>
9542         * sem_ch13.adb (Analyze_Stream_TSS_Definition): Remove temporary
9543         kludge disabling new legality check.
9545 2014-06-13  Hristian Kirtchev  <kirtchev@adacore.com>
9547         * freeze.adb (Freeze_Record_Type): Remove checks related to SPARK
9548         volatile types.
9549         (Freeze_Type): Volatile types are now illegal in SPARK.
9551 2014-06-13  Robert Dewar  <dewar@adacore.com>
9553         * aspects.ads, aspects.adb: Add aspect Thread_Local_Storage.
9554         * gnat_rm.texi: Document aspect Thread_Local_Storage.
9556 2014-06-13  Ed Schonberg  <schonberg@adacore.com>
9558         * sem_cat.adb (Validate_Static_Object_Name): A constant whose
9559         value is a temporary that renames an aggregate is legal in a
9560         preelaborated unit. Illegalities, if any will be detected in
9561         the aggregate components.
9563 2014-06-13  Ed Schonberg  <schonberg@adacore.com>
9565         * einfo.ads: Minor reformatting an comment expansion.
9567 2014-06-13  Robert Dewar  <dewar@adacore.com>
9569         * back_end.ads, back_end.adb: Make_Id, Make_SC, Set_RND are moved to
9570         Tbuild.
9571         * tbuild.ads, tbuild.adb: Make_Id, Make_SC, Set_RND are moved here from
9572         Back_End.
9573         * gnat1drv.adb: Make_Id, Make_SC, Set_RND are moved to Tbuild
9574         * sem_warn.adb: Minor reformatting.
9576 2014-06-13  Doug Rupp  <rupp@adacore.com>
9578         * adaint.c (__gnat_open_new_temp) [VMS]: Open binary
9579         files with rfm=udf.
9581 2014-06-13  Yannick Moy  <moy@adacore.com>
9583         * sem_warn.adb (Check_Unset_References): Take
9584         case of Refined_Post into account in Within_Postcondition check.
9586 2014-06-13  Hristian Kirtchev  <kirtchev@adacore.com>
9588         * freeze.adb (Freeze_Record_Type): Volatile types are not allowed in
9589         SPARK.
9591 2014-06-13  Yannick Moy  <moy@adacore.com>
9593         * sem_ch13.adb (Analyze_Aspect_Specifications/Aspect_Import,
9594         Aspect_Export): Consider that variables may be set outside the program.
9596 2014-06-13  Robert Dewar  <dewar@adacore.com>
9598         * back_end.adb (Make_Id): New function.
9599         (Make_SC): New function.
9600         (Set_RND): New procedure.
9601         * back_end.ads (Make_Id): New function.
9602         (Make_SC): New function.
9603         (Set_RND): New procedure.
9604         * einfo.ads: Minor comment updates.
9605         * frontend.adb: Move Atree.Initialize call to Gnat1drv.
9606         * gnat1drv.adb (Gnat1drv): New calling sequence for
9607         Get_Target_Parameters.
9608         (Gnat1drv): Move Atree.Initialize here from Frontend.
9609         * targparm.adb (Get_Target_Parameters): New calling
9610         sequence (Get_Target_Parameters): Handle pragma Restriction
9611         (No_Dependence,..)
9612         * targparm.ads (Get_Target_Parameters): New calling sequence.
9614 2014-06-13  Gary Dismukes  <dismukes@adacore.com>
9616         * sem_prag.adb (Process_Import_Or_Interface): Exit the homonym
9617         loop if the pragma does not come from source, so that an implicit
9618         pragma Import only applies to the first declaration, avoiding
9619         possible conflicts with earlier explicit and implicit declarations
9620         due to multiple Provide_Shift_Operators pragmas.
9621         (Set_Imported): Remove previous fix that bypassed pragma duplication
9622         error.
9623         * gnat_rm.texi: Change 'equivalent' to 'similar' in description
9624         of Provide_Shift_Operators.
9626 2014-06-12  Jan Hubicka  <hubicka@ucw.cz>
9628         * gcc-interface/utils.c (process_attributes) <ATTR_LINK_SECTION>: Pass
9629         string pointer directly to set_decl_section_name.
9631 2014-06-11  Robert Dewar  <dewar@adacore.com>
9633         * sem_ch13.adb: Minor reformatting.
9635 2014-06-11  Hristian Kirtchev  <kirtchev@adacore.com>
9637         * sem_prag.adb (Check_Clause_Syntax): Add new
9638         local variable Outputs. Account for the case where multiple
9639         output items appear as an aggregate.
9641 2014-06-11  Robert Dewar  <dewar@adacore.com>
9643         * sem_warn.adb (Output_Obsolescent_Entity_Warnings): Tag warning
9644         with ?j? not ??.
9646 2014-06-11  Ed Schonberg  <schonberg@adacore.com>
9648         * einfo.ads: Minor reformatting.
9650 2014-06-11  Hristian Kirtchev  <kirtchev@adacore.com>
9652         * a-cbdlli.adb, a-cdlili.adb, a-cidlli.adb, a-crdlli.adb (Insert): Add
9653         new variable First_Node. Update the position after all insertions have
9654         taken place to First_Node.
9656 2014-06-11  Robert Dewar  <dewar@adacore.com>
9658         * debug.adb: Remove debug flag -gnatd.1, no longer needed.
9659         * layout.adb (Layout_Type): Remove test of -gnatd.1.
9661 2014-06-11  Robert Dewar  <dewar@adacore.com>
9663         * sem_ch13.adb: Minor reformatting.
9665 2014-06-11  Hristian Kirtchev  <kirtchev@adacore.com>
9667         * sem_prag.adb (Check_Clause_Syntax): Add new
9668         local variable Outputs. Account for the case where multiple
9669         output items appear as an aggregate.
9671 2014-06-11  Robert Dewar  <dewar@adacore.com>
9673         * sem_warn.adb (Output_Obsolescent_Entity_Warnings): Tag warning
9674         with ?j? not ??.
9676 2014-06-11  Ed Schonberg  <schonberg@adacore.com>
9678         * einfo.ads: Minor reformatting.
9680 2014-06-11  Hristian Kirtchev  <kirtchev@adacore.com>
9682         * a-cbdlli.adb, a-cdlili.adb, a-cidlli.adb, a-crdlli.adb (Insert): Add
9683         new variable First_Node. Update the position after all insertions have
9684         taken place to First_Node.
9686 2014-06-11  Robert Dewar  <dewar@adacore.com>
9688         * debug.adb: Remove debug flag -gnatd.1, no longer needed.
9689         * layout.adb (Layout_Type): Remove test of -gnatd.1.
9691 2014-06-11  Thomas Quinot  <quinot@adacore.com>
9693         * freeze.ads: Minor reformatting.
9694         * checks.adb (Determine_Range): Do not attempt to determine
9695         the range of a deferred constant whose full view has not been
9696         seen yet.
9697         * sem_res.adb (Resolve): Remove undesirable guard against
9698         resolving expressions from expression functions.
9700 2014-06-11  Robert Dewar  <dewar@adacore.com>
9702         * debug.adb (Debug_Flag_Dot_1): Set to enable fix for anonymous
9703         access types.
9704         * layout.adb (Layout_Type): Make anonymous access types for
9705         subprogram formal types and return types always thin. For now
9706         only enabled if -gnatd.1 set.
9708 2014-06-11  Ed Schonberg  <schonberg@adacore.com>
9710         * sem_ch13.adb (Analyze_Stream_TSS_Definition): Apply legality
9711         rule for stream attributes of interface types (RM 13.13.2 (38/3)):
9712         subprogram must be a null procedure.
9714 2014-06-11  Hristian Kirtchev  <kirtchev@adacore.com>
9716         * sem_prag.adb (Analyze_Input_Item): Allow formal
9717         parameters to appear as input_items in an initialization_list
9718         of pragma Initializes. Encapsulation now applies to states and
9719         variables only (as it should). Add RM references to key errors.
9720         * sem_prag.adb (Set_Imported): Suppress errors
9721         about preceding Imports when the pragma does not come from source,
9722         which can happen through use of pragma Provide_Shift_Operators.
9724 2014-06-11  Thomas Quinot  <quinot@adacore.com>
9726         * sem_ch3.adb: Minor reformatting.
9727         * einfo.ads (Full_View): Minor comment update.
9729 2014-06-11  Robert Dewar  <dewar@adacore.com>
9731         * einfo.adb (Is_Independent): New flag.
9732         * einfo.ads (Is_Independent): New flag.
9733         (Has_Independent_Components): Clean up and fix comments.
9734         * sem_prag.adb (Fix_Error): Deal with changing argument
9735         [of] to entity [for].
9736         (Analyze_Pragma, case Independent): Set Is_Independent flag
9737         (Analyze_Pragma, case Independent_Components): Set Is_Independent flag
9738         in all components of specified record.
9740 2014-06-11  Thomas Quinot  <quinot@adacore.com>
9742         * sem_ch12.adb (Analyze_Formal_Decimal_Fixed_Point_Type):
9743         Set proper Etype on bounds of dummy type created for analysis
9744         of the generic.
9746 2014-06-11  Robert Dewar  <dewar@adacore.com>
9748         * debug.adb: Minor comment fix (add missing section of dot
9749         numeric flags).
9751 2014-06-11  Robert Dewar  <dewar@adacore.com>
9753         * gnat_rm.texi, switch-c.adb, sem_prag.adb, a-tgdico.ads, par-prag.adb,
9754         opt.ads, a-finali.ads, snames.ads-tmpl: Remove all traces of
9755         pragma/aspects Pure_05 Pure_12 Preelaborate_05.
9756         * errout.adb (Output_Messages): Avoid duplicate output for
9757         library level instance.
9758         * sem_elab.adb (Is_Call_Of_Generic_Formal): Moved to outer level
9759         (Check_Elab_Call): Add call to Is_Call_Of_Generic_Formal
9760         * exp_ch4.adb (Expand_N_Op_Expon): New interface for Exp_Modular.
9761         * s-expmod.ads, s-expmod.adb (Exp_Modular): Change interface to
9762         accomodate largest modulus value.
9763         * gnat_ugn.texi: Minor updates.
9765 2014-06-11  Ed Schonberg  <schonberg@adacore.com>
9767         * sem_ch12.adb (Instantiate_Package_Body): Do not attempt to
9768         load body of generic package or its parent, if body is optional
9769         and the unit does not require a body.
9771 2014-06-11  Robert Dewar  <dewar@adacore.com>
9773         * gnat_rm.texi: Document System.Unsigned_Types.
9774         * impunit.adb: System.Unsigned_Types (s-unstyp.ads) is user accessible.
9775         * s-unstyp.ads: Update comments (this is now user available unit).
9777 2014-06-11  Robert Dewar  <dewar@adacore.com>
9779         * make.adb, sem_res.adb: Minor reformatting.
9781 2014-06-11  Thomas Quinot  <quinot@adacore.com>
9783         * a-astaco.ads, a-tags.ads, s-excdeb.ads, a-tgdico.ads, a-stmaco.ads,
9784         a-except-2005.ads, s-except.ads, a-taside.ads, a-dynpri.ads,
9785         a-chahan.ads, a-sytaco.ads, s-stalib.ads, a-strmap.ads: Change pragmas
9786         Preelaborate_05 to just Preelaborate in runtime units, and similarly
9787         change Pure_05 to just Pure.
9789 2014-06-11  Ed Schonberg  <schonberg@adacore.com>
9791         * sem_ch6.adb (Analyze_Subprogram_Body_Contract): Do not attempt
9792         analysis if error has been posted on subprogram body.
9794 2014-06-11  Ed Schonberg  <schonberg@adacore.com>
9796         * sem_ch13.adb (Analyze_Stream_TSS_Definition): Apply legality
9797         rule given in RM 13.1 (8/1) for operational attributes to stream
9798         attributes: the attribute must apply to a first subtype. Fixes
9799         missing errors in ACATS test bdd2004.
9801 2014-06-11  Robert Dewar  <dewar@adacore.com>
9803         * exp_ch3.adb (Build_Record_Init_Proc): Don't build for variant
9804         record type if restriction No_Implicit_Conditionals is active.
9805         (Expand_N_Object_Declaration): Don't allow default initialization
9806         for variant record type if restriction No_Implicit_Condition is active.
9807         (Build_Variant_Record_Equality): Don't build for variant
9808         record type if restriction No_Implicit_Conditionals is active.
9809         * exp_ch4.adb (Expand_N_Op_Eq): Error if variant records with
9810         No_Implicit_Conditionals.
9811         * sem_aux.ads, sem_aux.adb (Has_Variant_Part): New function.
9813 2014-06-11  Ramon Fernandez  <fernandez@adacore.com>
9815         * i-cstrin.ads: Update comments.
9817 2014-06-11  Ed Schonberg  <schonberg@adacore.com>
9819         * sem_res.adb (Resolve_Selected_Component): Handle properly a
9820         selected component whose prefix is overloaded, when none of the
9821         interpretations matches the expected type.
9823 2014-06-11  Bob Duff  <duff@adacore.com>
9825         * make.adb (Wait_For_Available_Slot): Give a more
9826         informative error message; if the ALI file is not found, print
9827         the full path of what it's looking for.
9829 2014-06-11  Sergey Rybin  <rybin@adacore.com frybin>
9831         * gnat_ugn.texi, vms_data.ads: add description of gnatstub -W<par>
9832         option to specify the result file encoding.
9834 2014-06-11  Robert Dewar  <dewar@adacore.com>
9836         * errout.ads, sem_ch12.adb: Minor reformatting.
9837         * debug.adb, erroutc.adb: Remove -gnatd.q debug switch.
9838         * lib-xref.adb: Minor reformatting.
9839         * restrict.adb: Minor code reorganization (put routines in
9840         alpha order).
9842 2014-06-11  Yannick Moy  <moy@adacore.com>
9844         * einfo.ads: Minor typo in comment
9846 2014-06-11  Ed Schonberg  <schonberg@adacore.com>
9848         * sinfo.ads, sinfo.adb: New attribute Uninitialized_Variable, for
9849         formal private types and private type extensions, to indicate
9850         variable in a generic unit whose uninitialized use suggest that
9851         actual type should be fully initialized.
9852         Needs_Initialized_Actual:  removed, functionaity replaced by
9853         the above.
9854         * lib-xref.adb (Generate_Reference): Generate a reference for
9855         variables of a formal type when the unit is not the main unit,
9856         to enable appropriate warnings in an instance.
9857         * sem_ch12.adb (Check_Ininialized_Type): Improve warning on use
9858         of variable in a generic unit that suggests that actual type
9859         should be full initialized.
9860         * sem_warn.adb; (May_Need_Initialized_Actual): Make into procedure
9861         and do not emot warning, which now only appears in an instance.
9863 2014-06-11  Eric Botcazou  <ebotcazou@adacore.com>
9865         * gnat_ugn.texi: Fix minor typo.
9867 2014-06-11  Hristian Kirtchev  <kirtchev@adacore.com>
9869         * sem_ch3.adb Add with and use clause for Sem_Ch10.
9870         (Analyze_Declarations): Code reformatting. Analyze the contract
9871         of a subprogram body stub at the end of the declarative region.
9872         * sem_ch6.adb (Analyze_Subprogram_Body_Contract): Spec_Id is
9873         now a variable. Do not process the body if its contract is not
9874         available. Account for subprogram body stubs when extracting
9875         the corresponding spec.
9876         * sem_ch6.ads (Analyze_Subprogram_Contract): Update the comment
9877         on usage.
9878         * sem_ch10.ads, sem_ch10.adb (Analyze_Subprogram_Body_Stub_Contract):
9879         New routine.
9880         * sem_prag.adb (Analyze_Depends_In_Decl_Part):
9881         Account for subprogram body stubs when extracting the
9882         corresponding spec.
9883         (Analyze_Global_In_Decl_List):
9884         Account for subprogram body stubs when extracting the
9885         corresponding spec.
9886         (Analyze_Refined_Depends_In_Decl_Part):
9887         Use Find_Related_Subprogram_Or_Body to retrieve the declaration
9888         of the related body. Spec_Is now a variable. Account for
9889         subprogram body stubs when extracting the corresponding spec.
9890         (Analyze_Refined_Global_In_Decl_Part): Use
9891         Find_Related_Subprogram_Or_Body to retrieve the declaration
9892         of the related body. Spec_Is now a variable. Account for
9893         subprogram body stubs when extracting the corresponding spec.
9894         (Collect_Subprogram_Inputs_Output): Account for subprogram body
9895         stubs when extracting the corresponding spec.
9897 2014-06-11  Vincent Celier  <celier@adacore.com>
9899         * gnatcmd.adb (Process_Link): Do not invoke gnatlink with
9900         -lgnarl or -lgnat.
9902 2014-06-11  Robert Dewar  <dewar@adacore.com>
9904         * debug.adb: Add debug flag -gnatd.q.
9905         * erroutc.adb (Prescan_Message): Bomb if untagged warning with
9906         -gnatd.q set.
9907         * styleg.adb (Check_Xtra_Parens): Message should be a style
9908         message.
9909         * sem_aggr.adb, sem_ch3.adb, exp_ch9.adb, checks.adb, sem_prag.adb,
9910         par-endh.adb, eval_fat.adb, freeze.adb, sem_util.adb, sem_attr.adb,
9911         sem_elab.adb, sem_ch6.adb, sem_warn.adb, sem_cat.adb,
9912         sem_ch13.adb, lib-xref.adb: Add remaining warning tags.
9914 2014-06-11  Ben Brosgol  <brosgol@adacore.com>
9916         * gnat_rm.texi: Revised chapter on Implementation Defined
9917         Characteristics.
9919 2014-06-11  Geert Bosch  <bosch@adacore.com>
9921         * s-exctab.adb: avoid race conditions in exception registration.
9923 2014-06-11  Robert Dewar  <dewar@adacore.com>
9925         * errout.adb (Warn_Insertion): New function.
9926         (Error_Msg): Use Warn_Insertion and Prescan_Message.
9927         (Error_Msg_Internal): Set Info field of error object.
9928         (Error_Msg_NEL): Use Prescan_Message.
9929         (Set_Msg_Text): Don't store info: at start of message.
9930         (Skip_Msg_Insertion_Warning): New name for Set_Msg_Insertion_Warning.
9931         (Skip_Msg_Insertion_Warning): Now just skips warning insertion.
9932         * errout.ads: Document new ?$? and >$> insertion sequences
9933         Document use of "(style)" and "info: "
9934         * erroutc.adb (dmsg): Print several missing fields
9935         (Get_Warning_Tag): Handle -gnatel case (?$?)  (Output_Msg_Text):
9936         Deal with new tagging of info messages
9937         * erroutc.ads: Is_Info_Msg: New global (Error_Msg_Object):
9938         Add field Info (Prescan_Message): New procedure, this procedure
9939         replaces the old Test_Style_Warning_Serious_Unconditional_Msg
9940         * errutil.adb, exp_util.adb, par-ch7.adb, sem_ch13.adb, sem_ch7.adb,
9941         sem_elab.adb: Follow new rules for info message (info belongs
9942         only at the start of a message, and only in the first message,
9943         not in any of the continuations).
9944         * gnat_ugn.texi: Document full set of warning tags.
9946 2014-06-11  Gary Dismukes  <dismukes@adacore.com>
9948         * sem_util.adb: Minor typo fix.
9950 2014-06-11  Ed Schonberg  <schonberg@adacore.com>
9952         * sem_warn.adb (Check_References): Do not emit spurious warnings
9953         on uninitialzed variable of a formal private type if variable
9954         is not read.
9956 2014-06-09  Jan Hubicka  <hubicka@ucw.cz>
9958         * gcc-interface/utils.c (process_attributes) <ATTR_LINK_SECTION>: Use
9959         set_decl_section_name accessor.
9961 2014-05-22  Thomas Schwinge  <thomas@codesourcery.com>
9963         * gcc-interface/utils.c (DEF_FUNCTION_TYPE_0, DEF_FUNCTION_TYPE_6)
9964         (DEF_FUNCTION_TYPE_7, DEF_FUNCTION_TYPE_8)
9965         (DEF_FUNCTION_TYPE_VAR_5): Cosmetic fixes.
9967 2014-05-21  Robert Dewar  <dewar@adacore.com>
9969         * layout.adb: Minor reformatting.
9970         * sem_prag.adb (Analyze_Pragma, case Inspection_Point): Call
9971         dummy procedure ip.
9973 2014-05-21  Robert Dewar  <dewar@adacore.com>
9975         * restrict.ads (Implementation_Restriction): Add entry for
9976         No_Fixed_IO.
9977         * rtsfind.ads: Add entries for Fixed_IO and Decimal_IO in
9978         Ada.[Wide_[Wide_]Text_IO.
9979         * s-rident.ads (Restriction_Id): Add entry for No_Fixed_IO.
9980         * sem_attr.adb (Analyze_Attribute): Disallow fixed point types
9981         for Img, Image, Value, Wide_Image, Wide_Value, Wide_Wide_Image,
9982         Wide_Wide_Value if restriction No_Fixed_IO is set.
9983         * sem_util.adb (Set_Entity_Checks): Check restriction No_Fixed_IO.
9985 2014-05-21  Robert Dewar  <dewar@adacore.com>
9987         * gnatcmd.adb: Minor error msg changes (no upper case letter
9988         at start).
9989         * sem_ch12.adb, sem_ch5.adb, sem_res.adb, sem_util.adb: Minor
9990         reformatting.
9992 2014-05-21  Robert Dewar  <dewar@adacore.com>
9994         * debug.adb: Debug flag -gnatd.G inhibits static elab tracing
9995         via generic formals.
9996         * sem_elab.adb (Is_Call_Of_Generic_Formal): Return False if
9997         -gnatd.G is set.
9999 2014-05-21  Thomas Quinot  <quinot@adacore.com>
10001         * exp_pakd.adb (Revert_Storage_Order): Renamed from Byte_Swap to
10002         more accurately describe that this subprogram needs to come into
10003         play also in cases where no byte swapping is involved, because
10004         it also takes care of some required shifts (left-justification
10005         of values).
10007 2014-05-21  Thomas Quinot  <quinot@adacore.com>
10009         * freeze.adb (Check_Component_Storage_Order): Indicate whether
10010         a Scalar_Storage_Order attribute definition is present for the
10011         component's type.
10012         (Freeze_Record_Type): Suppress junk warnings
10013         about purportedly junk Bit_Order / Scalar_Storage_Order attribute
10014         definitions.
10016 2014-05-21  Robert Dewar  <dewar@adacore.com>
10018         * sem_ch8.adb (Analyze_Subprogram_Renaming): Put back call
10019         to Kill_Elaboration_Checks.
10021 2014-05-21  Gary Dismukes  <dismukes@adacore.com>
10023         * layout.adb (Assoc_Add): Suppress the optimization of the (E
10024         - C1) + C2 case, when the expression type is unsigned and C1 <
10025         C2, to avoid creating a negative literal when folding.
10027 2014-05-21  Hristian Kirtchev  <kirtchev@adacore.com>
10029         * freeze.adb (Freeze_Record_Type): Update the use of
10030         Is_SPARK_Volatile.
10031         * sem_ch3.adb (Analyze_Object_Contract): Update the use of
10032         Is_SPARK_Volatile.
10033         (Process_Discriminants): Update the use of Is_SPARK_Volatile.
10034         * sem_ch5.adb (Analyze_Iterator_Specification): Update the use
10035         of Is_SPARK_Volatile.
10036         (Analyze_Loop_Parameter_Specification):
10037         Update the use of Is_SPARK_Volatile.
10038         * sem_ch6.adb (Process_Formals): Catch an illegal use of an IN
10039         formal parameter when its type is volatile.
10040         * sem_prag.adb (Analyze_Global_Item): Update the use of
10041         Is_SPARK_Volatile.
10042         * sem_res.adb (Resolve_Entity_Name): Correct the guard which
10043         determines whether an entity is a volatile source SPARK object.
10044         * sem_util.adb (Has_Enabled_Property): Accout for external
10045         properties being set on objects other than abstract states
10046         and variables. An example would be a formal parameter.
10047         (Is_SPARK_Volatile): New routine.
10048         (Is_SPARK_Volatile_Object):
10049         Remove the entity-specific tests. Call routine Is_SPARK_Volatile
10050         when checking entities and/or types.
10051         * sem_util.ads (Is_SPARK_Volatile): New routine.
10053 2014-05-21  Robert Dewar  <dewar@adacore.com>
10055         * sem_warn.adb: Minor fix to warning messages (use ?? instead
10056         of ?).
10058 2014-05-21  Vincent Celier  <celier@adacore.com>
10060         * gnatcmd.adb (GNATCmd): For platforms other than VMS, recognize
10061         switch --version and --help.
10063 2014-05-21  Robert Dewar  <dewar@adacore.com>
10065         * sem_elab.adb (Is_Call_Of_Generic_Formal): New function.
10067 2014-05-21  Ed Schonberg  <schonberg@adacore.com>
10069         * sem_ch5.adb (Analyze_Iterator_Specification): Set type of
10070         iterator variable when the domain of iteration is a formal
10071         container and this is an element iterator.
10073 2014-05-21  Bob Duff  <duff@adacore.com>
10075         * sem_ch12.adb: Minor reformatting.
10077 2014-05-21  Robert Dewar  <dewar@adacore.com>
10079         * sinfo.ads, sem_ch12.adb, sem_warn.adb: Minor reformatting.
10081 2014-05-21  Robert Dewar  <dewar@adacore.com>
10083         * sem_elab.adb: Minor reformatting.
10084         * s-taprop.ads: Minor comment fix.
10085         * sem_ch8.adb (Analyze_Subprogram_Renaming): Remove call to
10086         Kill_Elaboration_Checks.
10087         * errout.adb, erroutc.adb: Minor reformatting.
10089 2014-05-21  Thomas Quinot  <quinot@adacore.com>
10091         * exp_pakd.adb (Byte_Swap): Handle the case of a sub-byte
10092         component. No byte swapping occurs, but this procedure also takes
10093         care of appropriately justifying the argument.
10095 2014-05-21  Hristian Kirtchev  <kirtchev@adacore.com>
10097         * sem_ch6.adb: sem_ch6.adb (Analyze_Aspects_On_Body_Or_Stub):
10098         New routine.
10099         (Analyze_Subprogram_Body_Helper): Move the
10100         analysis of aspect specifications and the processing of the
10101         subprogram body contract after inlining has taken place.
10102         (Diagnose_Misplaced_Aspect_Specifications): Removed.
10104 2014-05-21  Javier Miranda  <miranda@adacore.com>
10106         * sem_ch3.adb (Build_Derived_Record_Type): Revert previous change.
10108 2014-05-21  Robert Dewar  <dewar@adacore.com>
10110         * sem_eval.ads, sem_eval.adb (Why_Not_Static): Messages are not
10111         continuations any more.
10113 2014-05-21  Ed Schonberg  <schonberg@adacore.com>
10115         * sinfo.ads, sinfo.adb: New flag Needs_Initialized_Actual,
10116         present in formal_Private_Definitions and on private extension
10117         declarations of a formal derived type. Set when the use of the
10118         formal type in a generic suggests that the actual should be a
10119         fully initialized type.
10120         * sem_warn.adb (May_Need_Initialized_Actual): new subprogram
10121         to indicate that an entity of a generic type has default
10122         initialization, and that the corresponing actual type in any
10123         subsequent instantiation should be fully initialized.
10124         * sem_ch12.adb (Check_Initialized_Type): new subprogram,
10125         to emit a warning if the actual for a generic type on which
10126         Needs_Initialized_Actual is set is not a fully initialized type.
10128 2014-05-21  Robert Dewar  <dewar@adacore.com>
10130         * sem_elab.adb, prj-dect.adb: Minor reformatting.
10132 2014-05-21  Robert Dewar  <dewar@adacore.com>
10134         * erroutc.ads: Minor comment addition.
10136 2014-05-21  Robert Dewar  <dewar@adacore.com>
10138         * errout.ads: Add documentation for use of >*> tag.
10139         * restrict.adb: Make sure we use >*> tag for restriction warnings.
10141 2014-05-21  Gary Dismukes  <dismukes@adacore.com>
10143         * debug.adb: Add case of illegal overriding_indicator for a
10144         protected subprogram body to description of -gnatd.E switch.
10145         * sem_ch6.adb (Verify_Overriding_Indicator): Issue error message
10146         for cases of giving overriding_indicators on protected subprogram
10147         bodies, but change this to a warning if -gnatd.E is enabled. No
10148         longer give a style warning about missing indicators on protected
10149         subprogram bodies.
10151 2014-05-21  Robert Dewar  <dewar@adacore.com>
10153         * prj.ads, sem_ch12.adb, prj.adb, exp_pakd.adb,
10154         sem_elab.ads: Minor reformatting.
10155         * erroutc.adb, erroutc.ads (Warning_Specifically_Suppressed): Make Tag
10156         parameter optional.
10158 2014-05-21  Pascal Obry  <obry@adacore.com>
10160         * prj-dect.adb: Allow package Install in aggregate project.
10162 2014-05-21  Robert Dewar  <dewar@adacore.com>
10164         * sem_ch13.adb (Analyze_Aspect_Specifications):
10165         Insert_Delayed_Pragma is now used for the case of Attach_Handler.
10166         * sem_prag.adb: Minor comment improvements.
10168 2014-05-21  Ed Schonberg  <schonberg@adacore.com>
10170         * sem_ch12.adb (Install_Body): When checking whether freezing of
10171         instantiation must be delayed, verify that the common enclosing
10172         subprogram to generic and instance is in fact an overloadable
10173         entity.
10175 2014-05-21  Vincent Celier  <celier@adacore.com>
10177         * makeutl.adb (Mains.Complete_Mains.Do_Complete): Look for all
10178         mains with the same name and fail if there is more than one.
10179         * prj.ads, prj.adb (Find_All_Sources): New function
10181 2014-05-21  Robert Dewar  <dewar@adacore.com>
10183         * sem_ch13.adb: Minor reformatting.
10184         * lib-xref-spark_specific.adb, sem_util.adb: Minor reformatting.
10185         * sem_prag.adb: Minor error message improvement.
10187 2014-05-21  Yannick Moy  <moy@adacore.com>
10189         * lib-xref-spark_specific.adb, lib-xref.ads, lib-xref.adb
10190         (Enclosing_Subprogram_Or_Package): Only return a library-level
10191         package.
10193 2014-05-21  Javier Miranda  <miranda@adacore.com>
10195         * sem_ch3.adb (Build_Derived_Record_Type): Initialize Parent_Base
10196         to the full view of the parent type when processing a derived type
10197         which is the full view of a private type not defined in a generic
10198         unit which is derived from a private type with discriminants
10199         whose full view is a non-tagged record type.
10201 2014-05-21  Javier Miranda  <miranda@adacore.com>
10203         * exp_ch4.adb (Expand_Allocator_Expression.Apply_Accessibility_Check):
10204         Complete previous patch.
10206 2014-05-21  Thomas Quinot  <quinot@adacore.com>
10208         PR ada/9535
10209         * g-socket.adb (Read and Write for Datagram_Socket_Stream_Type):
10210         Provide a behaviour more consistent with underlying datagram
10211         socket: do not attempt to loop over Send_Socket/Receive_Socket
10212         iterating along the buffer.
10214 2014-05-21  Hristian Kirtchev  <kirtchev@adacore.com>
10216         * freeze.adb (Freeze_Record_Type): Ensure that a discriminated
10217         or a tagged type is not labelled as volatile. Ensure that a
10218         non-volatile type has no volatile components.
10219         * sem_ch3.adb (Analyze_Object_Contract): Add local constant
10220         Obj_Typ. Code reformatting.  Ensure that a discriminated or
10221         tagged object is not labelled as volatile.
10222         * sem_prag.adb (Process_Atomic_Shared_Volatile): Ensure that
10223         pragma Volatile applies to a full type declaration or an object
10224         declaration when SPARK mode is on.
10226 2014-05-21  Sergey Rybin  <rybin@adacore.com frybin>
10228         * gnat_ugn.texi: For ASIS tools, reword the paragraph about
10229         providing options needed for compiling the argument source for
10230         the situation when a project file can be used as a tool parameter.
10232 2014-05-21  Gary Dismukes  <dismukes@adacore.com>
10234         * gnat_rm.texi: Minor typo fix.
10236 2014-05-21  Robert Dewar  <dewar@adacore.com>
10238         * stand.adb (Tree_Read): Read missing entities.
10239         (Tree_Write): Write missing entities.
10241 2014-05-21  Ben Brosgol  <brosgol@adacore.com>
10243         * gnat_ugn.texi: Wordsmithing edits to Coupling Metrics Control
10244         section in gnatmetric chapter.
10246 2014-05-21  Robert Dewar  <dewar@adacore.com>
10248         * exp_ch6.adb (Expand_Actuals): Spec moved here, since not used
10249         outside Exp_Ch6 (Expand_Actuals): Deal with proper insertion of
10250         post-call copy write back (see detailed comment in code).
10251         * exp_ch6.ads (Expand_Actuals): Moved to body, not used outside
10252         Exp_Ch6.
10253         * tbuild.ads: Minor reformatting.
10255 2014-05-21  Robert Dewar  <dewar@adacore.com>
10257         * stand.ads: Add warning about adding new entities and
10258         Tree_Read/Tree_Write.
10260 2014-05-21  Robert Dewar  <dewar@adacore.com>
10262         * sem_util.adb (Set_Entity_With_Checks): Don't complain about
10263         references to restricted entities within the units in which they
10264         are declared.
10266 2014-05-21  Robert Dewar  <dewar@adacore.com>
10268         * gnat1drv.adb (Check_Bad_Body): Use Source_File_Is_Body to
10269         simplify the needed test, and also deal with failure to catch
10270         situations with non-standard names.
10271         * sinput-l.ads, sinput-l.adb (Source_File_Is_No_Body): New function
10272         (Source_File_Is_Subunit): Removed, no longer used.
10274 2014-05-21  Javier Miranda  <miranda@adacore.com>
10276         * exp_ch4.adb
10277         (Expand_Allocator_Expression.Apply_Accessibility_Check): for a
10278         renaming of an access to interface object there is no need to
10279         generate extra code to reference the tag.
10281 2014-05-21  Robert Dewar  <dewar@adacore.com>
10283         * errout.adb, erroutc.adb, erroutc.ads: Allow warning tag in pragma
10284         Warnings (Off, string).
10286 2014-05-21  Robert Dewar  <dewar@adacore.com>
10288         * osint.adb: Fix three error messages to say invalid instead
10289         of erroneous.
10290         * par-ch4.adb, exp_aggr.adb, sem_attr.adb, sem_aux.adb, sem_ch3.adb,
10291         sem_ch5.adb, sem_ch6.adb, sem_ch7.adb, sem_dim.adb, sem_res.adb,
10292         sem_util.adb, sem_util.ads: Fix incorrect use of erroneous in comments.
10294 2014-05-21  Ed Schonberg  <schonberg@adacore.com>
10296         * freeze.adb, sem_ch13.adb, sem_ch13.ads, sem_ch9.adb,
10297         sem_ch9.ads: Move discriminant manipulation routines for analysis of
10298         aspect specifications from sem_ch9 to sem_ch13, where they belong.
10300 2014-05-21  Robert Dewar  <dewar@adacore.com>
10302         * gnat_ugn.texi: Clearly document -gnatw.g (GNAT warnings).
10303         Clearly document -gnatyg (GNAT style switches).
10304         * usage.adb: Add line line for -gnatw.g (GNAT warnings) More
10305         detail for line for -gnatyg (GNAT style switches) -gnatw.d/D is
10306         available for VMS after all.
10307         * warnsw.adb: Reorganize to eliminate duplicated code
10308         (Restore_Warnings): Add a couple of missing entries
10309         (Save_Warnings): Add a couple of missing entries.
10310         * warnsw.ads: Add missing entries to Warning_Record (not clear
10311         what the impact is).
10313 2014-05-21  Robert Dewar  <dewar@adacore.com>
10315         * errout.adb (Set_Msg_Insertion_Warning): Handle ?*? (restriction
10316         warning) case.
10317         * errout.ads: Document ?*? (restriction warning) insertion.
10318         * erroutc.adb (Get_Warning_Tag): Deal with ?*? (restriction
10319         warning) case.
10320         * erroutc.ads: Document use of * for restriction warning tag.
10321         * restrict.adb (Restriction_Msg): Tag with ?*? instead of ??.
10323 2014-05-21  Ed Schonberg  <schonberg@adacore.com>
10325         * sem_ch9.adb (Push_Scope_And_Install_Discriminants): Do not
10326         make discriminants immediately visible when analyzing an aspect
10327         of a subtype declaration.
10328         (Uninstall_Discriminants): Do not apply to the entity in a
10329         subtype declaration.
10331 2014-05-21  Ed Schonberg  <schonberg@adacore.com>
10333         * sem_util.adb: Code clean up.
10335 2014-05-21  Eric Botcazou  <ebotcazou@adacore.com>
10337         * gnat_ugn.texi: Document -Werror.
10339 2014-05-21  Bob Duff  <duff@adacore.com>
10341         * sem_util.adb (Is_Dependent_Component_Of_Mutable_Object):
10342         This was returning False if the Object is a constant view. Fix
10343         it to return True in that case, because it might be a view of
10344         a variable.
10345         (Has_Discriminant_Dependent_Constraint): Fix latent
10346         bug; this function was crashing when passed a discriminant.
10348 2014-05-21  Robert Dewar  <dewar@adacore.com>
10350         * gnat_ugn.texi: Remove misplaced section that is now obsolete.
10351         * s-arit64.adb: Minor code reorganization.
10352         * sem_prag.adb: Minor comment fix (remove erroneous use of the
10353         term erroneous).
10355 2014-05-21  Robert Dewar  <dewar@adacore.com>
10357         * g-table.adb, g-dyntab.adb (Reallocate): Fix possible overflow in
10358         computing new table size.
10360 2014-05-21  Robert Dewar  <dewar@adacore.com>
10362         * einfo.ads: Minor reformatting.
10363         * ceinfo.adb: Deal with slight format change of einfo.ads.
10365 2014-05-21  Ed Schonberg  <schonberg@adacore.com>
10367         * sem_prag.adb (Analyze_Part_Of): Further work on the proper
10368         implementation of the SPARK 2014 rule concerning private child
10369         units (LRM 7.2.6).
10371 2014-05-21  Vincent Celier  <celier@adacore.com>
10373         * makeusg.adb: Add switch -d to usage.
10375 2014-05-21  Ed Schonberg  <schonberg@adacore.com>
10377         * sem_util.adb (Find_Actual): If an actual that is the prefix
10378         of an enclosing prefixed call has been rewritten, use Nkind
10379         and Sloc to identify the corresponding formal, when handling
10380         deferred references.
10382 2014-05-21  Robert Dewar  <dewar@adacore.com>
10384         * debug.adb: Document -gnatd.z switch.
10385         * sem_eval.adb (Why_Non_Static): Test -gnatd.z switch.
10387 2014-05-21  Robert Dewar  <dewar@adacore.com>
10389         * einfo.ads (Can_Never_Be_Null): Minor comment update.
10390         * sem_prag.adb (Check_Arg_Is_Task_Dispatching_Policy): Minor
10391         error message change.
10392         * s-arit64.adb ("abs"): New function. Use expression functions
10393         for the simple conversions and arithmetic.
10395 2014-05-18  Eric Botcazou  <ebotcazou@adacore.com>
10397         * gcc-interface/trans.c (Subprogram_Body_to_gnu): Rework comment and
10398         set function_start_locus.
10400 2014-05-18  Eric Botcazou  <ebotcazou@adacore.com>
10402         * utils.c (gnat_write_global_declarations): Adjust the flags put on
10403         dummy_global.
10405 2014-05-18  Eric Botcazou  <ebotcazou@adacore.com>
10407         * gcc-interface/decl.c (change_qualified_type): New static function.
10408         (gnat_to_gnu_entity): Use it throughout to add qualifiers on types.
10409         <E_Array_Type>: Set TYPE_VOLATILE on the array type directly.
10410         <E_Array_Subtype>: Likewise.
10411         Do not set flags on an UNCONSTRAINED_ARRAY_TYPE directly.
10412         (gnat_to_gnu_component_type): Likewise.
10413         (gnat_to_gnu_param): Likewise.
10415 2014-05-18  Eric Botcazou  <ebotcazou@adacore.com>
10417         * fe.h (Set_Present_Expr): Move around.
10418         (End_Location): New macro.
10419         * gcc-interface/trans.c (Case_Statement_to_gnu): Use End_Location.
10421 2014-05-18  Eric Botcazou  <ebotcazou@adacore.com>
10423         * gcc-interface/decl.c (gnat_to_gnu_entity): Use Underlying_Type in
10424         lieu of more verbose construct.
10425         * gcc-interface/trans.c (Call_to_gnu): Likewise.
10426         (gnat_to_gnu): Likewise.  Remove obsolete code.
10428 2014-05-18  Eric Botcazou  <ebotcazou@adacore.com>
10430         * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Array_Subtype>: Do not
10431         consider that regular packed arrays can never be superflat.
10433 2014-05-17  Trevor Saunders  <tsaunders@mozilla.com>
10435         * gcc-interface/ada-tree.h: Remove usage of variable_size gty
10436         annotation.
10437         * gcc-interface/decl.c (annotate_value): Adjust.
10438         * gcc-interface/trans.c (Attribute_to_gnu): Likewise.
10439         (push_range_check_info): Likewise.
10440         (Loop_Statement_to_gnu): Likewise.
10441         (Subprogram_Body_to_gnu): Likewise.
10442         (Compilation_Unit_to_gnu): Likewise.
10443         (start_stmt_group): Likewise.
10444         * gcc-interface/utils.c (init_gnat_utils): Likewise.
10445         (gnat_pushlevel): Likewise.
10446         (maybe_pad_type): Likewise.
10448 2014-05-14  Eric Botcazou  <ebotcazou@adacore.com>
10450         * seh_init.c: Fix copyright year.
10452 2014-05-14  Bernd Edlinger  <bernd.edlinger@hotmail.de>
10454         * seh_init.c (__gnat_map_SEH): Compile also when __CYGWIN__ and __SEH__
10455         are defined.  Move include windows.h before system.h.
10456         * s-oscons-tmplt.c (DTR_CONTROL_ENABLE, RTS_CONTROL_ENABLE): Compile
10457         also when __CYGWIN__ is defined.  Include windef.h before winbase.h.
10459 2014-05-14  Richard Sandiford  <r.sandiford@uk.ibm.com>
10461         * gcc-interface/decl.c (gnat_to_gnu_entity): Convert integer_one_node
10462         to the appropriate type.
10463         * gcc-interface/trans.c (gnat_to_gnu): Likewise.
10464         (pos_to_constructor): Likewise.
10466 2014-05-13  Eric Botcazou  <ebotcazou@adacore.com>
10468         * gcc-interface/decl.c (annotate_value): Fix thinko in latest change.
10470 2014-05-06  Kenneth Zadeck  <zadeck@naturalbridge.com>
10471             Mike Stump  <mikestump@comcast.net>
10472             Richard Sandiford  <rdsandiford@googlemail.com>
10474         * gcc-interface/cuintp.c (UI_From_gnu): Use wide-int interfaces.
10475         * gcc-interface/decl.c (gnat_to_gnu_entity): Use TYPE_SIGN.
10476         (annotate_value): Use wide-int interfaces.
10477         * gcc-interface/utils.c (get_nonnull_operand): Use tree_fits_uhwi_p.
10479 2014-04-28  Richard Henderson  <rth@redhat.com>
10481         * gcc-interface/Makefile.in: Support aarch64-linux.
10483 2014-04-28  Eric Botcazou  <ebotcazou@adacore.com>
10485         * exp_dbug.ads (Get_External_Name): Add 'False' default to Has_Suffix,
10486         add 'Suffix' parameter and adjust comment.
10487         (Get_External_Name_With_Suffix): Delete.
10488         * exp_dbug.adb (Get_External_Name_With_Suffix): Merge into...
10489         (Get_External_Name): ...here.  Add 'False' default to Has_Suffix, add
10490         'Suffix' parameter.
10491         (Get_Encoded_Name): Remove 2nd argument in call to Get_External_Name.
10492         Call Get_External_Name instead of Get_External_Name_With_Suffix.
10493         (Get_Secondary_DT_External_Name): Likewise.
10494         * exp_cg.adb (Write_Call_Info): Likewise.
10495         * exp_disp.adb (Export_DT): Likewise.
10496         (Import_DT): Likewise.
10497         * comperr.ads (Compiler_Abort): Remove Code parameter and add From_GCC
10498         parameter with False default.
10499         * comperr.adb (Compiler_Abort): Likewise.  Adjust accordingly.
10500         * types.h (Fat_Pointer): Rename into...
10501         (String_Pointer): ...this.  Add comment on interfacing rules.
10502         * fe.h (Compiler_Abort): Adjust for above renaming.
10503         (Error_Msg_N): Likewise.
10504         (Error_Msg_NE): Likewise.
10505         (Get_External_Name): Likewise.  Add third parameter.
10506         (Get_External_Name_With_Suffix): Delete.
10507         * gcc-interface/decl.c (STDCALL_PREFIX): Define.
10508         (create_concat_name): Adjust call to Get_External_Name, remove call to
10509         Get_External_Name_With_Suffix, use STDCALL_PREFIX, adjust for renaming.
10510         * gcc-interface/trans.c (post_error): Likewise.
10511         (post_error_ne): Likewise.
10512         * gcc-interface/misc.c (internal_error_function): Likewise.
10514 2014-04-28  Richard Biener  <rguenther@suse.de>
10516         PR middle-end/60092
10517         * gcc-interface/utils.c: Define flag_isoc11.
10519 2014-04-26  Eric Botcazou  <ebotcazou@adacore.com>
10521         * gnatvsn.ads (Library_Version): Bump to 4.10.
10523 2014-04-23  Eric Botcazou  <ebotcazou@adacore.com>
10525         Revert
10526         2014-04-22  Richard Henderson  <rth@redhat.com>
10528         * gcc-interface/Makefile.in: Support aarch64-linux.
10530         2014-04-22  Eric Botcazou  <ebotcazou@adacore.com>
10532         * fe.h (Compiler_Abort): Replace Fat_Pointer with String_Pointer.
10533         (Error_Msg_N): Likewise.
10534         (Error_Msg_NE): Likewise.
10535         (Get_External_Name_With_Suffix): Likewise.
10536         * types.h (Fat_Pointer): Delete.
10537         (String_Pointer): New type.
10538         (DECLARE_STRING_POINTER): New macro.
10539         * gcc-interface/decl.c (create_concat_name): Adjust.
10540         * gcc-interface/trans.c (post_error): Likewise.
10541         (post_error_ne): Likewise.
10542         * gcc-interface/misc.c (internal_error_function): Likewise.
10544 2014-04-22  Richard Henderson  <rth@redhat.com>
10546         * gcc-interface/Makefile.in: Support aarch64-linux.
10548         * init.c [__linux__] (HAVE_GNAT_ALTERNATE_STACK): New define.
10549         (__gnat_alternate_stack): Enable for all linux except ia64.
10551 2014-04-22  Eric Botcazou  <ebotcazou@adacore.com>
10553         * fe.h (Compiler_Abort): Replace Fat_Pointer with String_Pointer.
10554         (Error_Msg_N): Likewise.
10555         (Error_Msg_NE): Likewise.
10556         (Get_External_Name_With_Suffix): Likewise.
10557         * types.h (Fat_Pointer): Delete.
10558         (String_Pointer): New type.
10559         (DECLARE_STRING_POINTER): New macro.
10560         * gcc-interface/decl.c (create_concat_name): Adjust.
10561         * gcc-interface/trans.c (post_error): Likewise.
10562         (post_error_ne): Likewise.
10563         * gcc-interface/misc.c (internal_error_function): Likewise.
10565 2014-04-15  Eric Botcazou  <ebotcazou@adacore.com>
10566             Pierre-Marie de Rodat  <derodat@adacore.com>
10568         * gcc-interface/decl.c (gnat_to_gnu_entity) <object>: Create a mere
10569         scalar constant instead of a reference for renaming of scalar literal.
10570         Do not create a new object for constant renaming except for a function
10571         call.  Make sure a VAR_DECL is created for the renaming pointer.
10572         * gcc-interface/trans.c (constant_decl_with_initializer_p): New.
10573         (fold_constant_decl_in_expr): New function.
10574         (Identifier_to_gnu): Use constant_decl_with_initializer_p.
10575         For a constant renaming, try to fold a constant DECL in the result.
10576         (lvalue_required_p) <N_Object_Renaming_Declaration>: Always return 1.
10577         (Identifier_to_gnu): Reference the renamed object of constant renaming
10578         pointers directly.
10579         * gcc-interface/utils.c (invalidate_global_renaming_pointers): Do not
10580         invalidate constant renaming pointers.
10582 2014-04-15  Eric Botcazou  <ebotcazou@adacore.com>
10584         * gcc-interface/utils.c (type_for_vector_element_p): New predicate.
10585         (build_vector_type_for_size): New function.
10586         (build_vector_type_for_array): Likewise.
10587         (unchecked_convert): Build an intermediate vector type to convert
10588         from a generic array type to a vector type.
10589         (handle_vector_size_attribute): Reimplement.
10590         (handle_vector_type_attribute): Likewise.
10592 2014-04-15  Eric Botcazou  <ebotcazou@adacore.com>
10594         * gcc-interface/decl.c (prepend_one_attribute_pragma): Call
10595         Is_OK_Static_Expression in lieu of Is_Static_Expression to
10596         detect valid arguments.
10598 2014-04-15  Eric Botcazou  <ebotcazou@adacore.com>
10600         * gcc-interface/trans.c (gnat_gimplify_stmt): Propagate loop hints.
10602 2014-04-14  Paolo Carlini  <paolo.carlini@oracle.com>
10604         * gcc-interface/decl.c (gnat_to_gnu_entity): Use TYPE_IDENTIFIER.
10605         (components_to_record): Likewise.
10606         * gcc-interface/utils.c (make_aligning_type): Likewise.
10607         (maybe_pad_type): Likewise.
10608         (finish_record_type): Likewise.
10609         (rest_of_record_type_compilation): Likewise.
10611 2014-04-14  Eric Botcazou  <ebotcazou@adacore.com>
10613         * snames.ads-tmpl (Name_Ivdep): New pragma-related name.
10614         * sem_prag.adb (Analyze_Pragma) <Pragma_Loop_Optimize>: Add support
10615         for Ivdep hint.
10616         * gnat_rm.texi (Implementation Defined Pragmas): Document new Ivdep
10617         hint for Loop_Optimize.
10618         * gnat_ugn.texi (Vectorization of loops): Mention new Ivdep hint.
10619         * gcc-interface/trans.c (Pragma_to_gnu) <Pragma_Loop_Optimize>: Deal
10620         with new Ivdep hint.
10621         * gcc-interface/ada-tree.h (LOOP_STMT_IVDEP): New macro.
10622         * gcc-interface/trans.c (Pragma_to_gnu) <Pragma_Loop_Optimize>: Deal
10623         with new Ivdep hint.
10624         (gnat_gimplify_stmt) <LOOP_STMT>: Propagate loop hints.
10626 2014-04-14  Eric Botcazou  <ebotcazou@adacore.com>
10627             Robert Dewar  <dewar@adacore.com>
10629         * opt.ads (Suppress_Back_Annotation): Remove as unused.
10630         * fe.h (Back_Annotate_Rep_Info): Likewise.
10631         (Global_Discard_Names): Likewise.
10632         (List_Representation_Info): Declare.
10633         * types.h (Uint_Minus_1): Likewise.
10634         * repinfo.ads: Document back-annotation change.
10635         * gcc-interface/gigi.h (init_gnat_decl): Declare.
10636         (destroy_gnat_decl): Likewise.
10637         * gcc-interface/decl.c (annotate_value): Do not create the cache of
10638         annotated values here but...
10639         <CALL_EXPR>: Only inline the call if -gnatR3 is specified or we are
10640         in ASIS mode.
10641         (init_gnat_decl): ...here instead.  New function.
10642         (destroy_gnat_decl): Likewise.
10643         * gcc-interface/trans.c (gigi): Call {init|destroy}_gnat_decl.
10644         * gcc-interface/utils.c (init_gnat_utils): Minor reformatting.
10646 2014-04-14  Eric Botcazou  <ebotcazou@adacore.com>
10648         * gcc-interface/decl.c (create_field_decl_from): Finalize non-constant
10649         offset for the field, if any.
10651 2014-04-09  Eric Botcazou  <ebotcazou@adacore.com>
10652             Svante Signell  <svante.signell@gmail.com>
10654         PR ada/54040
10655         PR ada/59346
10656         * s-osinte-x32.adb: New file.
10657         * s-linux.ads (Time): New section.
10658         * s-linux-alpha.ads (Time): Likewise.
10659         * s-linux-android.ads (Time: Likewise.
10660         * s-linux-hppa.ads (Time): Likewise.
10661         * s-linux-mipsel.ads (Time): Likewise.
10662         * s-linux-sparc.ads (Time): Likewise.
10663         * s-linux-x32.ads (Time): Likewise.
10664         * s-osprim-x32.ads (timespec): Adjust.
10665         (Clock): Likewise.
10666         (To_Timespec): Likewise.
10667         * s-osinte-linux.ads (Time): Define local subtypes for those defined
10668         in System.Linux.
10669         * s-taprop-linux.adb (Monotonic_Clock): Do not define timeval.
10670         * s-osinte-hpux.ads (timespec): Revert POSIX breakage.
10671         * s-osinte-kfreebsd-gnu.ads (timespec): Likewise.
10672         * s-osinte-solaris-posix.ads (timespec): Likewise.
10673         * s-osinte-posix.adb (To_Timespec): Likewise.
10674         * gcc-interface/Makefile.in (x32/Linux): Use s-osinte-x32.adb.
10676 2014-04-08  Eric Botcazou  <ebotcazou@adacore.com>
10678         PR ada/60411
10679         * gcc-interface/Makefile.in (arm% linux-android): Switch to EHABI.
10680         * s-linux-android.ads: New file.
10681         * s-intman-android.adb: Likewise.
10682         * s-osinte-android.ads: Adjust.
10683         * sigtramp-armdroid.c: Likewise.
10684         * sigtramp.h: Add Android support.
10686 2014-04-07  Eric Botcazou  <ebotcazou@adacore.com>
10688         * gcc-interface/Makefile.in (alpha-vms): Add missing line.
10690 2014-03-30  Eric Botcazou  <ebotcazou@adacore.com>
10692         PR ada/60703
10693         * system-linux-alpha.ads: Adjust for Ada 2005.
10694         * system-linux-mips.ads: Likewise.
10695         * system-linux-mips64el.ads: Likewise.
10696         * system-linux-mipsel.ads: Likewise.
10697         * system-linux-s390.ads: Likewise.
10698         * system-linux-s390x.ads: Likewise.
10699         * system-linux-sparc.ads: Likewise.
10700         * system-linux-sparcv9.ads: Likewise.
10701         * system-rtems.ads: Likewise.
10702         * system-vxworks-arm.ads: Likewise.
10704 2014-03-16  Andreas Schwab  <schwab@linux-m68k.org>
10706         PR ada/39172
10707         * gcc-interface/Makefile.in (target_cpu_default): Revert
10708         2013-10-11 change.
10710 2014-03-13  Eric Botcazou  <ebotcazou@adacore.com>
10712         PR ada/51483
10713         * cstand.adb (Register_Float_Type): Add 'precision' parameter and use
10714         it to set the RM size.  Use directly 'size' for the Esize.
10715         (Create_Back_End_Float_Types): Adjust call to above.
10716         * get_targ.ads (Register_Type_Proc): Add 'precision' parameter.
10717         * set_targ.ads (FPT_Mode_Entry): Add 'precision' component.
10718         (Write_Target_Dependent_Values): Adjust comment.
10719         * set_targ.adb (Register_Float_Type): Add 'precision' parameter and
10720         deal with it.
10721         (Write_Target_Dependent_Values): Write the precision in lieu of size.
10722         (Initialization): Read the precision in lieu of size and compute the
10723         size from the precision and the alignment.
10724         * gcc-interface/gigi.h (enumerate_modes): Add integer parameter.
10725         * gcc-interface/misc.c (enumerate_modes): Likewise.  Do not register
10726         types for vector modes, pass the size in addition to the precision.
10728 2014-03-10  Eric Botcazou  <ebotcazou@adacore.com>
10730         * gcc-interface/Make-lang.in (ADA_DEPFILES): Fix typo.
10732 2014-03-07  Doug Rupp  <rupp@adacore.com>
10734         PR ada/60411
10735         * system-linux-armel.ads (Backend_Overflow_Checks): Set to True.
10736         (Support_64_Bit_Divides): Removed, no longer used.
10737         (ZCX_By_Default): Enabled.
10739 2014-02-25  Doug Rupp  <rupp@adacore.com>
10741         * gcc-interface/Makefile.in (arm-linux):
10742         (EH_MECHANISM): Use ARM unwinder (-arm)
10743         (LIBGNAT_TARGET_PAIRS: Override defaults with a-exexpr-gcc.adb and
10744         s-excmac-arm.ads.
10745         (EXTRA_LIBGNAT_OBJS): Add raise-gcc.o
10746         (EXTRA_GNATRTL_NONTASKING_OBJS): Add g-cppexc.o s-excmac.o.
10747         (arm-wrs-vxworks): Add EH_MECHANISM=-gcc for kernel mode.
10748         (EXTRA_LIBGNAT_OBJS): Add sigtramp-armvxw.o
10749         Add dependencies for sigtramp-armvxw.o.
10751 2014-02-25  Eric Botcazou  <ebotcazou@adacore.com>
10753         * gcc-interface/trans.c (Pragma_to_gnu): Deal with Warning_As_Error.
10755 2014-02-25  Robert Dewar  <dewar@adacore.com>
10757         * rtsfind.adb (Is_RTE): Protect against entity with no scope
10758         field (previously this call blew up on the Standard entity).
10759         * sem_attr.adb (Analyze_Attribute, case Access): Remove
10760         test for No_Abort_Statements, this is now handled in
10761         Set_Entity_With_Checks.
10762         * exp_ch6.adb, sem_ch10.adb, sem_ch4.adb, sem_ch8.adb, sem_res.adb:
10763         Change name Set_Entity_With_Style_Check => Set_Entity_With_Checks.
10764         * sem_util.ads, sem_util.adb: Change name Set_Entity_With_Style_Check =>
10765         Set_Entity_With_Checks.
10766         (Set_Entity_With_Checks): Add checks for No_Dynamic_Attachment,
10767         Add checks for No_Abort_Statements.
10769 2014-02-25  Robert Dewar  <dewar@adacore.com>
10771         * exp_ch9.adb (Expand_Entry_Barrier): Add comment that call to
10772         Check_Restriction is OK.
10774 2014-02-25  Ed Schonberg  <schonberg@adacore.com>
10776         * sem_ch3.adb (Process_Full_View): Better error message when
10777         the full view of  a private type without discriminants is an
10778         unconstrained type.
10779         * sem_ch7.adb (Uninstall_Declarations): Ditto.
10781 2014-02-25  Eric Botcazou  <ebotcazou@adacore.com>
10783         * sigtramp-armvxw.c: Also restore r0.
10785 2014-02-25  Robert Dewar  <dewar@adacore.com>
10787         * errout.adb (Error_Msg_Internal): Warning_Msg_Char set
10788         unconditionally (Set_Msg_Insertion_Warning): Warning_Msg_Char
10789         set unconditionally.
10790         * erroutc.adb (Get_Warning_Tag): Does not give a leading space
10791         any more (Output_Msg_Text): Rewritten with new convention on
10792         output of warnings that are treated as errors.
10793         * erroutc.ads (Error_Msg_Object): Warn_Chr is always set even
10794         if Warn is False.
10795         * gnat_rm.texi: Updates to documentation on pragma
10796         Warning_As_Error.
10797         * warnsw.adb (Set_Dot_Warning_Switch): -gnatw.e should not
10798         set Warning_Doc_Switch.
10799         * lib-writ.ads: Add documentation note on ALI file generation
10800         for C.
10801         * exp_ch6.adb (Expand_Call): Remove check for No_Abort_Statements
10802         (belongs in Sem).
10803         * sem_attr.adb (Resolve_Attribute, case Access):
10804         Abort_Task'Access violates the No_Abort_Statements restriction.
10805         * sem_res.adb (Resolve_Call): Check restriction
10806         No_Abort_Statements for call to Abort_Task or a renaming of it.
10808 2014-02-25  Robert Dewar  <dewar@adacore.com>
10810         * sem_ch3.adb (Array_Type_Declaration): Check for case of using
10811         type name as index.
10812         * lib.ads: Minor reformatting.
10813         * einfo.ads: Minor reformatting.
10815 2014-02-25  Doug Rupp  <rupp@adacore.com>
10817         * sem_mech.adb (Set_Mechanisms): For convention Fortran on VMS
10818         use Short_Descriptor(S) as the argument passing mechanism.
10820 2014-02-25  Eric Botcazou  <ebotcazou@adacore.com>
10822         * sigtramp-ppcvxw.c (CFI_COMMON_REGS): Also include r0.
10824 2014-02-25  Robert Dewar  <dewar@adacore.com>
10826         * atree.ads (Warnings_Treated_As_Errors): New variable.
10827         * errout.adb (Error_Msg_Internal): Set Warn_Err flag in
10828         error object (Initialize): Initialize Warnings_As_Errors_Count
10829         (Write_Error_Summary): Include count of warnings treated as errors.
10830         * erroutc.adb (Warning_Treated_As_Error): New function.
10831         (Matches): Function moved to outer level of package.
10832         * erroutc.ads (Error_Msg_Object): Add Warn_Err flag.
10833         (Warning_Treated_As_Error): New function.
10834         * gnat_rm.texi: Document pragma Treat_Warning_As_Error.
10835         * opt.adb: Add handling of Warnings_As_Errors_Count[_Config].
10836         * opt.ads (Config_Switches_Type): Add entry for
10837         Warnings_As_Errors_Count.
10838         (Warnings_As_Errors_Count): New variable.
10839         (Warnings_As_Errors): New array.
10840         * par-prag.adb: Add dummy entry for Warning_As_Error.
10841         * sem_prag.adb (Analyze_Pragma): Implement new pragma
10842         Warning_As_Error.
10843         * snames.ads-tmpl: Add entries for Warning_As_Error pragma.
10845 2014-02-25  Eric Botcazou  <ebotcazou@adacore.com>
10847         * sigtramp.h: Fix minor inaccuracy.
10849 2014-02-25  Ben Brosgol  <brosgol@adacore.com>
10851         * gnat_ugn.texi: Added description of kill command.
10853 2014-02-25  Robert Dewar  <dewar@adacore.com>
10855         * gnat_rm.texi (Address_Clauses): Add a section discussing the
10856         problem of address clauses causing unexpected initialization,
10857         including the effect of Initialize_Scalars.
10859 2014-02-25  Robert Dewar  <dewar@adacore.com>
10861         * errout.adb: Various changes for better msgs for anonmous access
10862         subprogram types.
10863         * erroutc.ads, erroutc.adb (Buffer_Ends_With): Version with character
10864         argument.
10865         (Buffer_Remove): Version with character argument.
10866         * sem_attr.adb (Resolve_Attribute, case Access): Better handling
10867         of mismatching conventions for access-to-subprogram case.
10868         * sem_prag.adb (Set_Convention_From_Pragma): Deal with anonymous
10869         access types in record.
10870         * sem_util.ads, sem_util.adb (Set_Convention): Handle anonymous access
10871         types, including in records.
10873 2014-02-25  Doug Rupp  <rupp@adacore.com>
10875         * sigtramp-ppcvxw.c, sigtramp.h, sigtramp-armvxw.c: Comment
10876         enhancements and corrections.
10878 2014-02-25  Robert Dewar  <dewar@adacore.com>
10880         * gnat_rm.texi: New section "Conventions and Anonymous Access Types"
10882 2014-02-25  Robert Dewar  <dewar@adacore.com>
10884         * gnat_rm.texi: First set of documentation additions for
10885         predefined RM units.
10886         * checks.adb: Minor reformatting.
10887         * sem_elab.adb (Check_Task_Activation): Minor fix to error
10888         message.
10889         * sem_util.adb: Minor reformatting.
10891 2014-02-25  Arnaud Charlet  <charlet@adacore.com>
10893         * usage.adb (Usage): Add help on -gnateC.
10894         * switch-c.adb (Scan_Front_End_Switches): Add handling of -gnateC.
10895         * opt.ads (Generate_CodePeer_Messages): New flag.
10896         * gnat_ugn.texi: Document new switch -gnateC.
10898 2014-02-25  Ben Brosgol  <brosgol@adacore.com>
10900         * gnat_rm.texi: Corrected minor typos in Implementation Defined
10901         Aspects.
10902         * opt.ads: Minor reformatting.
10904 2014-02-25  Robert Dewar  <dewar@adacore.com>
10906         * binde.adb: Change messages to mention -gnatel instead of -gnatwl.
10907         * gnat_ugn.texi: Update documentation of -gnatwl Add documentation
10908         of -gnatel/-gnateL.
10909         * opt.ads (Warn_Info_Messages): New flag.
10910         * sem_elab.adb: Use Elab_Warnings, Elab_Info_Messages to control
10911         messages.
10912         * sem_prag.adb: Use Elab_Warnings, Elab_Info_Messages to control
10913         messages.
10914         * switch-m.ad, switch-c.adb: Recognize new -gnatel/EL switches.
10915         * usage.adb: Add documentation of -gnatel/-gnateL Update
10916         documentation of -gnatwl/-gnatwL.
10917         * warnsw.adb: New handling of Elab_Warnings, Elab_Info_Messages
10918         * warnsw.ads (Elab_Info_Messages): New field in Warning_Record
10920 2014-02-25  Robert Dewar  <dewar@adacore.com>
10922         * einfo.ads, einfo.adb (Has_Shift_Operator): New flag.
10923         * gnat_rm.texi: Document pragma Provide_Shift_Operators.
10924         * interfac.ads: Minor code reorganization (add pragma
10925         Compiler_Unit_Warning).
10926         * par-prag.adb: Add dummy entry for Provide_Shift_Operators.
10927         * sem_ch3.adb (Build_Derived_Numeric_Type): Copy
10928         Has_Shift_Operator flag.
10929         * sem_intr.adb (Check_Intrinsic_Subprogram): Make sure
10930         Check_Shift is always called (Check_Shift): Set Has_Shift_Operator.
10931         * sem_prag.adb: Implement pragma Provide_Shift_Operators.
10932         * snames.ads-tmpl: Add entries for pragma Provide_Shift_Operators
10933         Add entry for Name_Amount.
10934         * checks.adb (Selected_Range_Checks): When checking for a null
10935         range, make sure we use the base type, and not the subtype for
10936         deciding a range is null.
10937         * sem_ch5.adb (Analyze_Loop_Parameter_Specification): Check
10938         for suspicious loop bound which is outside the range of the
10939         loop subtype.
10940         * gnat_ugn.texi: Add documentation section "Determining the
10941         Chosen Elaboration Order"
10942         * sem_ch13.adb (UC_Entry): Add field Act_Unit
10943         (Validate_Unchecked_Conversion): Store Act_Unit
10944         (Validate_Unchecked_Conversions): Test Warnings_Off in Act_Unit
10945         * treepr.adb: Minor reformatting.
10947 2014-02-25  Arnaud Charlet  <charlet@adacore.com>
10949         * usage.adb: Minor: fix typo.
10951 2014-02-25  Robert Dewar  <dewar@adacore.com>
10953         * lib.ads, s-bitops.adb, s-bitops.ads, s-conca5.adb, gnat_rm.texi,
10954         s-conca5.ads, s-conca7.adb, s-conca7.ads, s-crc32.adb, s-crc32.ads,
10955         s-conca9.adb, s-conca9.ads, g-dyntab.adb, s-crtl.ads, g-dyntab.ads,
10956         s-excdeb.adb, s-addope.adb, s-addope.ads, s-carun8.adb, s-carun8.ads,
10957         g-htable.adb, g-htable.ads, g-hesora.adb, g-hesora.ads, s-conca2.adb,
10958         s-conca2.ads, a-comlin.adb, a-chlat1.ads, a-comlin.ads, errout.ads,
10959         a-except.adb, s-conca4.adb, a-except.ads, s-conca4.ads, s-conca6.adb,
10960         s-conca6.ads, g-spchge.adb, g-spchge.ads, g-u3spch.adb, g-u3spch.ads,
10961         a-strhas.ads, restrict.adb, aspects.adb, aspects.ads, s-conca8.adb,
10962         s-conca8.ads, back_end.adb, par-prag.adb, g-byorma.adb, g-byorma.ads,
10963         a-elchha.adb, a-elchha.ads, g-speche.adb, g-speche.ads, s-casuti.adb,
10964         s-assert.adb, s-casuti.ads, s-assert.ads, a-clrefi.adb, a-clrefi.ads,
10965         s-conca3.adb, s-conca3.ads, a-ioexce.ads: Implement pragma
10966         Compiler_Unit_Warning, change Compiler_Unit everywhere to
10967         Compiler_Unit_Warning.
10969 2014-02-25  Sergey Rybin  <rybin@adacore.com frybin>
10971         * sem_prag.adb (Analyze_Depends_In_Decl_Part): Do not normalize
10972         in ASIS mode aggregates that are used as aspect definitions.
10974 2014-02-25  Robert Dewar  <dewar@adacore.com>
10976         * exp_ch7.adb, sem_util.adb, sem_util.ads, exp_ch6.adb: Minor
10977         reformatting.
10979 2014-02-25  Ed Schonberg  <schonberg@adacore.com>
10981         * freeze.adb (Freeze_Entity): If the return type of a function
10982         is a limited view, and the non-limited view has not been seen yet,
10983         defer freezing to some later point.
10985 2014-02-25  Robert Dewar  <dewar@adacore.com>
10987         * sem_ch3.adb: Minor reformatting.
10989 2014-02-25  Robert Dewar  <dewar@adacore.com>
10991         * s-excdeb.ads, s-except.ads, s-exctab.adb, s-exctab.ads, s-finmas.ads,
10992         s-htable.adb, s-htable.ads, s-imenne.adb, s-imenne.ads, s-imgenu.adb,
10993         s-imgenu.ads, s-mastop.adb, s-mastop.ads, s-memory-vms_64.adb,
10994         s-memory-vms_64.ads, s-memory.adb, s-memory.ads, s-os_lib.adb,
10995         s-os_lib.ads, s-parame.adb, s-parame.ads, s-purexc.ads, s-restri.adb,
10996         s-restri.ads, s-rident.ads, s-secsta.adb, s-secsta.ads, s-soflin.adb,
10997         s-soflin.ads, s-sopco3.adb, s-sopco3.ads, s-sopco4.adb, s-sopco4.ads,
10998         s-sopco5.adb, s-sopco5.ads, s-spsufi.ads, s-stache.adb, s-stache.ads,
10999         s-stalib.adb, s-stalib.ads, s-stoele.adb, s-stoele.ads, s-strcom.adb,
11000         s-strcom.ads, s-strhas.adb, s-string.adb, s-string.ads, s-strops.adb,
11001         s-strops.ads, s-ststop.adb, s-ststop.ads, s-traceb.adb, s-traceb.ads,
11002         s-traent.adb, s-traent.ads, s-unstyp.ads, s-utf_32.adb, s-utf_32.ads,
11003         s-wchcnv.adb, s-wchcnv.ads, s-wchcon.adb, s-wchcon.ads, s-wchjis.adb,
11004         s-wchjis.ads, sem_ch11.adb, sem_ch4.adb, sem_ch5.adb, sem_prag.adb,
11005         snames.ads-tmpl: Change Compiler_Unit everywhere to
11006         Compiler_Unit_Warning.
11008 2014-02-25  Hristian Kirtchev  <kirtchev@adacore.com>
11010         * exp_ch6.adb (Add_Or_Save_Precondition): New routine.
11011         (Collect_Body_Postconditions_In_Decls): New routine.
11012         (Collect_Body_Postconditions_Of_Kind): Factor out code. Handle
11013         postcondition aspects or pragmas that appear on a subprogram
11014         body stub.
11015         (Collect_Spec_Preconditions): Factor out code. Handle
11016         precondition aspects or pragmas that appear on a subprogram
11017         body stub.
11018         * sem_ch6.adb (Analyze_Subprogram_Body_Helper): The analysis of
11019         aspects that apply to a subprogram body stub is no longer delayed,
11020         the aspects are analyzed on the spot.
11021         (SPARK_Aspect_Error):
11022         Aspects that apply to a subprogram declaration cannot appear in
11023         a subunit.
11024         * sem_ch10.adb Remove with and use clause for Sem_Ch13.
11025         (Analyze_Proper_Body): Add local variable Comp_Unit. Unum
11026         is now a local variable. Code cleanup. Analysis related to
11027         the aspects of a subprogram body stub is now carried out by
11028         Analyze_Subprogram_Body_Helper. Do not propagate the aspects
11029         and/or pragmas of a subprogram body stub to the proper body
11030         as this is no longer needed. Do not analyze the aspects of a
11031         subprogram stub when the corresponding source unit is missing.
11032         (Analyze_Protected_Body_Stub): Flag the illegal use of aspects
11033         on a stub.
11034         (Analyze_Task_Body_Stub): Flag the illegal use of
11035         aspects on a stub.
11036         (Optional_Subunit): Add local variable Unum.
11037         * sem_ch13.adb (Insert_Delayed_Pragma): Do not analyze a generated
11038         pragma when it applies to a subprogram body stub.
11039         * sem_prag.adb (Analyze_Pragma): Pragmas Contract_Cases,
11040         Depends and Global can now apply to a subprogram body stub as
11041         long as it acts as its own spec.
11042         (Analyze_Refined_Pragma):
11043         Code reformatting. Refinement pragmas cannot apply to a subunit.
11045 2014-02-25  Hristian Kirtchev  <kirtchev@adacore.com>
11047         * einfo.ads Update the usage of flag
11048         Uses_Sec_Stack. Uses_Sec_Stack now applies to E_Loop entities.
11049         * exp_ch5.adb (Expand_Iterator_Loop): The temporary for a cursor
11050         now starts with the letter 'C'. This makes reading expanded
11051         code easier.
11052         * exp_ch7.adb (Establish_Transient_Scope): Add local variable
11053         Iter_Loop. Signal that an Ada 2012 iterator loop requires
11054         secondary stack management when creating a transient scope for
11055         an element reference.
11056         * exp_util.adb (Process_Statements_For_Controlled_Objects):
11057         When wrapping the statements of a loop, pass the E_Loop entity
11058         to the wrapping machinery.
11059         (Wrap_Statements_In_Block): Add
11060         formal parameter Scop along with comment on usage. Add local
11061         variables Block_Id, Block_Nod and Iter_Loop. Mark the generated
11062         block as requiring secondary stack management when the block is
11063         created inside an Ada 2012 iterator loop. This ensures that any
11064         reference objects are reclaimed on each iteration of the loop.
11065         * sem_ch5.adb (Analyze_Loop_Statement): Mark the generated block
11066         tasked with the handling of container iterators as requiring
11067         secondary stack management. This ensures that iterators are
11068         reclaimed when the loop terminates or is exited in any fashion.
11069         * sem_util.adb (Add_Block_Identifier): New routine.
11070         (Find_Enclosing_Iterator_Loop): New routine.
11071         * sem_util.ads (Add_Block_Identifier): New routine.
11072         (Find_Enclosing_Iterator_Loop): New routine.
11074 2014-02-25  Robert Dewar  <dewar@adacore.com>
11076         * sinfo.ads: Minor reformatting.
11078 2014-02-25  Tristan Gingold  <gingold@adacore.com>
11080         * s-expllu.ads, s-expuns.ads, s-expmod.ads: Minor comment fix.
11082 2014-02-25  Pascal Obry  <obry@adacore.com>
11084         * sinput-l.adb, osint.adb, osint.ads: Add Prep_Suffix to factorize code.
11086 2014-02-25  Tristan Gingold  <gingold@adacore.com>
11088         * sem_ch10.adb: Minor comment fix.
11090 2014-02-25  Bob Duff  <duff@adacore.com>
11092         * s-tasdeb.adb: Misc cleanup of this package,
11093         including printing addresses in hexadecimal.
11094         (Write): Fix minor bug when taking 'Address of an empty string.
11096 2014-02-25  Ed Schonberg  <schonberg@adacore.com>
11098         * sem_prag.adb (Analyze_Part_Of): Reject state refinement in a
11099         public child unit when it does not refer to the abstract state
11100         of a public ancestor.
11102 2014-02-25  Yannick Moy  <moy@adacore.com>
11104         * sem_prag.adb (Analyze_Pragma/Pragma_Validity_Checks): Ignore pragma
11105         Validity_Checks in GNATprove and CodePeer modes.
11107 2014-02-25  Pascal Obry  <obry@adacore.com>
11109         * prj-attr.adb, projects.texi, snames.ads-tmpl: Add package Install's
11110         Artifacts attribute.
11112 2014-02-25  Yannick Moy  <moy@adacore.com>
11114         * sem_prag.adb: Minor reformatting to get consistent messages.
11116 2014-02-25  Robert Dewar  <dewar@adacore.com>
11118         * checks.adb: Minor reformatting.
11119         * sinfo.ads (Do_Range_Check): Document that this flag is never
11120         passed to the back end.
11122 2014-02-25  Yannick Moy  <moy@adacore.com>
11124         * sem_ch3.adb, sem_ch5.adb, sem_ch9.adb, sem_prag.adb, sem_attr.adb,
11125         sem_ch6.adb: Remove useless references to SPARK RM in error messages.
11127 2014-02-25  Hristian Kirtchev  <kirtchev@adacore.com>
11129         * sem_res.adb (Appears_In_Check): New routine.
11130         (Resolve_Entity_Name): Remove local variables Prev and
11131         Usage_OK. Par is now a constant. Remove the parent chain traversal
11132         as the placement of a volatile object with enabled property
11133         Async_Writers and/or Effective_Reads must appear immediately
11134         within a legal construct.
11136 2014-02-25  Hristian Kirtchev  <kirtchev@adacore.com>
11138         * checks.adb (Apply_Selected_Range_Checks):
11139         Alphabetize local constants and variables. Add comments.
11140         Always insert a range check that requires runtime evaluation into
11141         the tree.
11143 2014-02-25  Robert Dewar  <dewar@adacore.com>
11145         * sem_attr.adb, sem_ch6.adb, par-ch3.adb: Minor reformatting.
11147 2014-02-25  Bob Duff  <duff@adacore.com>
11149         * s-tassta.adb (Finalize_Global_Tasks): Limit the number of loop
11150         iterations while waiting for independent tasks to terminate;
11151         if an independent task does not terminate, we do not want to
11152         hang here. In that case, the thread will be terminated when the
11153         process exits.
11154         * s-taprop-linux.adb (Abort_Task): Fix Assert to allow for ESRCH.
11156 2014-02-25  Ed Schonberg  <schonberg@adacore.com>
11158         * sem_prag.adb (Check_SPARK_Aspect_For_ASIS): New subprogram,
11159         used to perform pre-analysis of the expression for SPARK
11160         aspects that have a non-standard syntax, such as GLobal and
11161         Initializes. The procedure applies to the original expression
11162         in an aspect specification, prior to the analysis of the
11163         corresponding pragma, in order to provide semantic information
11164         for ASIS navigation purposes.
11165         (Analyze_Global_In_Decl_List, Analyze_Initializes_In_Decl_Part):
11166         Call new subprogram.
11168 2014-02-25  Yannick Moy  <moy@adacore.com>
11170         * sem_prag.adb: Remove obsolete reference to SPARK RM in error message.
11172 2014-02-25  Doug Rupp  <rupp@adacore.com>
11174         * init.c (HAVE_GNAT_ADJUST_CONTEXT_FOR_RAISE): Enable for ARM.
11175         (__gnat_adjust_context_for_raise): Bump the PC by 2.
11177 2014-02-25  Ed Schonberg  <schonberg@adacore.com>
11179         * par-ch3.adb (P_Basic_Declarative_Items): In the case of a
11180         misplaced IS, add a statement sequence to improper body only if
11181         one has not been parsed already.
11183 2014-02-25  Ed Schonberg  <schonberg@adacore.com>
11185         * sem_attr.adb (Analyze_Attribute, case 'Update): Check for
11186         mismatch when multidimensional array is updated with a single
11187         index.
11189 2014-02-25  Yannick Moy  <moy@adacore.com>
11191         * sem_ch3.adb, sem_ch5.adb, sem_prag.adb, sem_attr.adb, errout.ads,
11192         sem_ch6.adb: Mark most references to SPARK RM in error messages
11193         for removal.
11195 2014-02-24  Ed Schonberg  <schonberg@adacore.com>
11197         * par-ch3.adb (P_Basic_Declarative_Items): If an improper body
11198         appears in a list of basic declarations, complete the tree with
11199         an empty statement list, to prevent cascaded errors and crashes
11200         if semantic analysis is attempted.
11202 2014-02-24  Thomas Quinot  <quinot@adacore.com>
11204         * g-sercom-mingw.adb (Open): Fix incorrect test for error return
11205         value.
11206         * erroutc.adb: Minor reformatting.
11208 2014-02-24  Hristian Kirtchev  <kirtchev@adacore.com>
11210         * sem_prag.adb (Check_Clause_Syntax): Account
11211         for a solitary input item in a dependency list.
11213 2014-02-24  Yannick Moy  <moy@adacore.com>
11215         * gnat1drv.adb (Adjust_Global_Switches): Do not
11216         use validity checks at all in GNATprove_Mode.
11218 2014-02-24  Robert Dewar  <dewar@adacore.com>
11220         * g-sercom-mingw.adb, g-sercom-linux.adb, sem_prag.adb, freeze.adb,
11221         atree.adb, atree.ads: Minor reformatting.
11223 2014-02-24  Hristian Kirtchev  <kirtchev@adacore.com>
11225         * sem_ch6.adb (Analyze_Subprogram_Body_Contract): Do not enforce
11226         global and dependence refinement when SPARK_Mode is off.
11227         * sem_ch7.adb (Analyze_Package_Body_Contract): Do not enforce
11228         state refinement when SPARK_Mode is off.
11229         * sem_ch13.adb (Analyze_Aspect_Specifications): Add local
11230         variable Decl. Insert the generated pragma for Refined_State
11231         after a potential pragma SPARK_Mode.
11232         * sem_prag.adb (Analyze_Depends_In_Decl_Part): Add local
11233         constant Deps. Remove local variable Expr. Check the syntax
11234         of pragma Depends when SPARK_Mode is off. Factor out the
11235         processing for extra parenthesis around individual clauses.
11236         (Analyze_Global_In_Decl_List): Items is now a constant. Check
11237         the syntax of pragma Global when SPARK_Mode is off.
11238         (Analyze_Initializes_In_Decl_Part): Check the syntax of pragma
11239         Initializes when SPARK_Mode is off.
11240         (Analyze_Part_Of): Check
11241         the syntax of the encapsulating state when SPARK_Mode is off.
11242         (Analyze_Pragma): Check the syntax of pragma Abstract_State when
11243         SPARK_Mode is off. Move the declaration order check with respect
11244         to pragma Initializes to the end of the processing. Do not verify
11245         the declaration order for pragma Initial_Condition when SPARK_Mode
11246         is off. Do not complain about a useless package refinement when
11247         SPARK_Mode is off.
11248         (Analyze_Refined_Depends_In_Decl_Part): Refs
11249         is now a constant. Check the syntax of pragma Refined_Depends
11250         when SPARK_Mode is off.
11251         (Analyze_Refined_Global_In_Decl_Part):
11252         Check the syntax of pragma Refined_Global when SPARK_Mode is off.
11253         (Analyze_Refined_State_In_Decl_Part): Check the syntax of pragma
11254         Refined_State when SPARK_Mode is off.
11255         (Check_Dependence_List_Syntax): New routine.
11256         (Check_Global_List_Syntax): New routine.
11257         (Check_Initialization_List_Syntax): New routine.
11258         (Check_Item_Syntax): New routine.
11259         (Check_State_Declaration_Syntax): New routine.
11260         (Check_Refinement_List_Syntax): New routine.
11261         (Has_Extra_Parentheses): Moved to the top level of Sem_Prag.
11263 2014-02-24  Robert Dewar  <dewar@adacore.com>
11265         * a-tags.adb, s-os_lib.adb: Minor reformatting.
11267 2014-02-24  Thomas Quinot  <quinot@adacore.com>
11269         * g-sercom-mingw.adb, g-sercom-linux.adb (Raise_Error): Include
11270         strerror message, not just numeric errno value.
11272 2014-02-24  Doug Rupp  <rupp@adacore.com>
11274         * raise-gcc.c (exception_class_eq): Make endian neutral.
11276 2014-02-24  Ed Schonberg  <schonberg@adacore.com>
11278         * atree.ads, atree,adb (Copy_Separate_Tree): Remove Syntax_Only
11279         flag, and reset Etype and Analyzed attributes unconditionally
11280         when copying a tree that may be partly analyzed.
11281         * freeze.adb: Change calls to Copy_Separate_Tree accordingly.
11282         * sem_ch6.adb (Check_Inline_Pragma): If the Inline pragma appears
11283         within a subprogram body and applies to it, remove it from the
11284         body before making a copy of it, to prevent spurious errors when
11285         analyzing the copied body.
11287 2014-02-24  Thomas Quinot  <quinot@adacore.com>
11289         * s-os_lib.adb (Errno_Message): Do not depend on Integer'Image.
11290         * s-oscons-tmplt.c: On VxWorks, include adaint.h only after
11291         vxWorks.h has been included.  Also ensure that file attributes
11292         related definitions are output even in cases where socket support
11293         is not enabled.
11294         * a-tags.adb: Code clean up.
11295         * Make-generated.in (OSCONS_CPP, OSCONS_EXTRACT): Use -iquote
11296         instead of -I to add the main ada source directory to the header
11297         search path, in order to avoid conflict between our own "types.h"
11298         and VxWork's <types.h>.
11300 2014-02-24  Robert Dewar  <dewar@adacore.com>
11302         * atree.ads, atree.adb (Copy_Separate_Tree): Add Syntax_Only parameter.
11303         * debug.adb: Remove documentation of -gnatd.X, no longer used.
11304         * freeze.adb (Wrap_Imported_Subprogram): Fixed and activated.
11306 2014-02-24  Bob Duff  <duff@adacore.com>
11308         * gnat_ugn.texi: Improve documentation of gnatpp.
11310 2014-02-24  Thomas Quinot  <quinot@adacore.com>
11312         * g-stheme.adb, g-socthi-vms.adb, g-socthi-vms.ads,
11313         g-socthi-vxworks.adb, g-socthi-vxworks.ads, g-stseme.adb,
11314         g-socthi-mingw.adb, g-socthi-mingw.ads, g-socthi.adb,
11315         g-socthi.ads, g-socket.adb (Host_Error_Message): Return a string, not
11316         a chars_ptr, because on Windows this is a renaming of
11317         Socket_Error_Message.
11319 2014-02-24  Robert Dewar  <dewar@adacore.com>
11321         * a-direct.adb, sem_ch5.adb, a-cfdlli.adb, a-cfhase.adb, a-tags.adb,
11322         s-filatt.ads, a-cforma.adb, sem_ch6.adb, g-socthi-mingw.adb,
11323         a-cfhama.adb, a-cforse.adb, a-cofove.adb: Minor reformatting and code
11324         reorganization.
11326 2014-02-24  Thomas Quinot  <quinot@adacore.com>
11328         * Make-generated.in (OSCONS_CPP, OSCONS_EXTRACT): Make sure
11329         that the source directory containing s-oscons-tmplt.c is on the
11330         include path, so that all internal header files are available.
11332 2014-02-24  Ed Schonberg  <schonberg@adacore.com>
11334         * sem_ch5.adb (Analyze_Loop_Parameter_Specification): If the
11335         domain of iteration is an attribute reference 'Old, this is an
11336         Ada 2012 iterator and the loop must be rewritten as such.
11338 2014-02-24  Thomas Quinot  <quinot@adacore.com>
11340         * s-fileio.adb (Errno_Message): Remove, use shared version from
11341         s-os_lib instead.
11342         * s-crtrun.ads, Makefile.rtl: Remove now unused unit.
11343         * g-stseme (Socket_Error_Message): Reimplement in terms of new
11344         s-os_lib function.
11345         * g-socthi.ads, g-socthi.adb: Change profile of
11346         Socket_Error_Message to return String to allow the above.
11347         * g-socket.adb, g-socthi-mingw.adb, g-socthi-mingw.ads,
11348         * g-socthi-vms.adb, g-socthi-vms.ads, g-socthi-vxworks.adb,
11349         * g-socthi-vxworks.ads: Update to account for the above profile
11350         change.
11351         * a-tags.adb: Use strlen builtin binding provided by s-crtl.
11352         * s-crtl.ads (strncpy): New procedure.
11353         * s-os_lib.adb (Copy_Attributes): Import just once (strncpy):
11354         Use import from s-crtl.
11355         * a-envvar.adb, osint.adb: Use imports of C runtime functions
11356         from s-crtl instead of re-importing locally.
11358 2014-02-24  Hristian Kirtchev  <kirtchev@adacore.com>
11360         * sem_prag.adb (Analyze_Global_Item): Emit the
11361         variable related checks concerning volatile objects only when
11362         SPARK_Mode is on.
11364 2014-02-24  Robert Dewar  <dewar@adacore.com>
11366         * sem_ch5.adb (Analyze_Iterator_Specification): use
11367         Error_Msg_Ada_2012_Feature.
11369 2014-02-24  Jose Ruiz  <ruiz@adacore.com>
11371         * s-rident.ads (Profile_Info): For Ravenscar, the restrictions
11372         No_Local_Timing_Events and No_Specific_Termination_Handlers
11373         must be set, according to the Ravenscar profile definition
11374         in D.13(6/3).
11376 2014-02-24  Ed Schonberg  <schonberg@adacore.com>
11378         * sem_ch6.adb (Analyze_Expression_Function): If this is a
11379         completion, freeze return type and its designated type if needed.
11381 2014-02-24  Thomas Quinot  <quinot@adacore.com>
11383         * sem_ch13.adb (Analyze_Attribute_Definition_Clause, case
11384         'Address): When moving initialization statements to a freeze
11385         entity, keep them under a single node (i.e. do not unwrap
11386         expressions with actions), and set the Initialization_Statements
11387         attribute again so that processing of a later pragma Import can
11388         still remove them.
11390 2014-02-24  Claire Dross  <dross@adacore.com>
11392         * a-cfdlli.adb, a-cfdlli.ads, a-cfhama.adb, a-cfhama.ads,
11393         a-cfhase.adb, a-cfhase.ads, a-cforma.adb, a-cforma.ads,
11394         a-cforse.adb, a-cforse.ads, a-cofove.adb, a-cofove.ads: Rename
11395         Left/Right to First_To_Previous/Current_To_Last.
11397 2014-02-24  Thomas Quinot  <quinot@adacore.com>
11399         * adaint.h (struct file_attributes): New component "error"
11400         (__gnat_error_attributes): Accessor for the above.
11401         * adaint.c (__gnat_error_attributes): New subprogram
11402         (__gnat_stat): Fix returned value (expect errno value)
11403         (__gnat_stat_to_attr): Add management of error component (set to
11404         stat errno value, except for missing files where it is set to 0,
11405         and exists is set to 0).
11406         * osint.ads (File_Attributes_Size): Update per change above,
11407         also clarify documentation.
11408         * s-filatt.ads: New file, binding to file attributes related
11409         functions.
11410         * Makefile.rtl (s-filatt): New runtime unit.
11411         * s-crtl.ads (strlen): Expose binding to GCC builtin (falls back
11412         to library function if not available on target).
11413         * s-os_lib.ads, s-os_lib.adb (Errno_Message): New subprogram.
11414         * s-oscons-tmplt.c (SIZEOF_struct_file_attributes,
11415         SIZEOF_struct_dirent_alloc): New constants.
11416         * Make-generated.in (s-oscons.ads): Now requires adaint.h.
11417         * a-direct.adb (Fetch_Next_Entry): Fix incorrect buffer sizes.
11418         Perform appropriate error checking if stat fails (do not just
11419         ignore existing files if stat fails)
11420         * gcc-interface/Make-lang.in (GNAT_ADA_OBJS, GNATBIND_OBJS): Update
11421         dependencies.
11423 2014-02-24  Hristian Kirtchev  <kirtchev@adacore.com>
11425         * sem_prag.adb (Analyze_Global_Item): Move the check concerning
11426         the use of volatile objects as global items in a function to
11427         the variable related checks section.
11428         * sem_util.adb (Async_Readers_Enabled): Directly call
11429         Has_Enabled_Property.
11430         (Async_Writers_Enabled): Directly call Has_Enabled_Property.
11431         (Effective_Reads_Enabled): Directly call Has_Enabled_Property.
11432         (Effective_Writes_Enabled): Directly call Has_Enabled_Property.
11433         (Has_Enabled_Property): Rename formal parameter State_Id to Item_Id.
11434         Update the comment on usage. State_Has_Enabled_Property how handles
11435         the original logic of the routine. Add processing for variables.
11436         (State_Has_Enabled_Property): New routine.
11437         (Variable_Has_Enabled_Property): New routine.
11439 2014-02-24  Robert Dewar  <dewar@adacore.com>
11441         * sinfo.ads, sem_ch12.adb, sem_res.adb, sem_ch4.adb, par-ch12.adb:
11442         Minor reformatting.
11443         * atree.ads, atree.adb (Node35): New function.
11444         (Set_Node35): New procedure.
11445         * debug.adb: Define new debug flag -gnatd.X.
11446         * einfo.ads, einfo.adb (Import_Pragma): New field.
11447         * freeze.adb (Wrap_Imported_Procedure): New procedure (not
11448         really active yet, has to be activated with -gnatd.X.
11449         * sem_prag.adb (Set_Imported): Set new Import_Pragma
11450         field (Set_Imported): Don't set Is_Public (see
11451         Freeze.Wrap_Imported_Subprogram)
11452         * par-ch3.adb (P_Component_List): Handle unexpected null component.
11454 2014-02-24  Yannick Moy  <moy@adacore.com>
11456         * sem_ch3.adb: Correct reference to SPARK RM in error messages.
11457         * gnat_rm.texi: Correct documentation of attribute Update.
11459 2014-02-24  Ed Schonberg  <schonberg@adacore.com>
11461         * sem_ch5.adb (Analyze_Iterator_Specification): Reject container
11462         iterator in older versions of Ada.
11464 2014-02-24  Gary Dismukes  <dismukes@adacore.com>
11466         * sem_ch5.adb, sem_aux.ads, sem_ch12.adb, gnat_ugn.texi, par.adb,
11467         par-ch12.adb: Change spelling 'parametrization' to 'parameterization'.
11469 2014-02-24  Ed Schonberg  <schonberg@adacore.com>
11471         * sinfo.ads, sinfo.adb: New attribute Generalized_Indexing, for
11472         indexed_components that are instances of Ada 2012 container
11473         indexing operations. Analysis and resolution of such nodes
11474         is performed on the attribute, and the original source is
11475         preserved for ASIS operations. If expansion is enabled, the
11476         indexed component is replaced by the value of this attribute,
11477         which is in a call to an Indexing aspect, in most case wrapped
11478         in a dereference operation.
11479         * sem_ch4.adb (Analyze_Indexed_Component): Create
11480         Generalized_Indexing attribute when appropriate.
11481         (Analyze_Call): If prefix is not overloadable and has an indexing
11482         aspect, transform into an indexed component so it can be analyzed
11483         as a potential container indexing.
11484         (Analyze_Expression): If node is an indexed component with a
11485         Generalized_ Indexing, do not re-analyze.
11486         * sem_res.adb (Resolve_Generalized_Indexing): Complete resolution
11487         of an indexed_component that has been transformed into a container
11488         indexing operation.
11489         (Resolve_Indexed_Component): Call the above when required.
11490         (Resolve): Do not insert an explicit dereference operation on
11491         an indexed_component whose type has an implicit dereference:
11492         the operation is inserted when resolving the related
11493         Generalized_Indexing.
11495 2014-02-24  Olivier Ramonat  <ramonat@adacore.com>
11497         * gnat_rm.texi, gnat_ugn.texi: Replace Ada Compiler by Ada Development
11498         Environment.
11500 2014-02-24  Hristian Kirtchev  <kirtchev@adacore.com>
11502         * sem_prag.adb (Check_Constituent_Usage): Remove leading spaces in
11503         error messages.
11504         (Inconsistent_Mode_Error): Remove leading spaces in error messages.
11505         Merge the expected and available mode errors.
11506         (Report_Unused_Constituents): Remove leading spaces in error messages.
11507         (Report_Unused_States): Remove leading spaces in error messages.
11509 2014-02-24  Thomas Quinot  <quinot@adacore.com>
11511         * par_sco.adb (Traverse_One): Refine categorization of statement
11512         SCOs.
11514 2014-02-24  Robert Dewar  <dewar@adacore.com>
11516         * aspects.ads, aspects.adb: Remove aspects Ada_2005 and Ada_2012,
11517         Pure_05, Pure_12 and Preelaborate_05.
11518         * gnat_rm.texi: Update accordingly.
11519         * sem_prag.adb: Document one argument form of Ada_05/Ada_2005
11520         pragmas Document one argument form of Ada_12/Ada_2012 pragmas
11521         Recognize one argument form of these pragmas only in GNAT mode
11522         (-gnatg).
11524 2014-02-24  Ed Schonberg  <schonberg@adacore.com>
11526         * s-dimmks.ads: Replace symbol for temperature, previously the
11527         Greek letter Theta, by the ASCII @ sign.
11528         * s-diflio.ads: ditto.
11530 2014-02-24  Robert Dewar  <dewar@adacore.com>
11532         * exp_ch4.adb: Minor code reorganization (use OR for boolean
11533         variables).
11534         * sem_ch3.adb, sem_prag.adb, freeze.adb: Minor reformatting.
11536 2014-02-24  Ben Brosgol  <brosgol@adacore.com>
11538         * gnat_ugn.texi, projects.texi: Added the necessary conditionalization
11539         so that references to gnatmem and ASIS tools do not appear in the FSF
11540         edition of the GNAT User's Guide.
11542 2014-02-24  Yannick Moy  <moy@adacore.com>
11544         * freeze.adb (Freeze_Entity): Do not issue warning
11545         for pre/post being ignored on imported subprogram in GNATprove
11546         mode.
11548 2014-02-24  Robert Dewar  <dewar@adacore.com>
11550         * exp_ch5.adb, sem_ch5.adb, sem_type.adb, sem_res.adb, sem_attr.adb,
11551         stand.ads, sem_eval.adb: Minor reformatting.
11553 2014-02-24  Yannick Moy  <moy@adacore.com>
11555         * sem_prag.adb: Minor rewording in error message.
11557 2014-02-24  Johannes Kanig  <kanig@adacore.com>
11559         * exp_util.adb (Expand_Subtype_From_Expr): Do not expand subtypes in
11560         GNATprove_mode, gnat2why doesn't need nor use these types.
11562 2014-02-24  Gary Dismukes  <dismukes@adacore.com>
11564         * exp_ch4.adb (Expand_N_Op_Expon): On the AAMP
11565         target, in the case of signed integer exponentiation that uses a
11566         run-time routine, always select the Exp_* versions, since overflow
11567         checking is automatically done by AAMP arithmetic instructions.
11569 2014-02-24  Hristian Kirtchev  <kirtchev@adacore.com>
11571         * sem_ch13.adb (Analyze_Aspect_Specifications):
11572         When the related context is a package instace, insert pragma
11573         Abstract_State after all internally-generated renamings related
11574         to the instance "header".
11576 2014-02-24  Ed Schonberg  <schonberg@adacore.com>
11578         * sem_ch3.adb (Analyze_Declarations): Analyze Contract of abstract
11579         subprograms.
11580         * sem_disp.adb (Check_Dispatching_Context): A non-dispatching
11581         call to an abstract subprogram is legal if it appears in a
11582         pre/postcondition of another abstract operation.
11584 2014-02-24  Sergey Rybin  <rybin@adacore.com frybin>
11586         * gnat_ugn.texi: Misc updates.
11588 2014-02-24  Hristian Kirtchev  <kirtchev@adacore.com>
11590         * exp_prag.adb (Expand_Old): Set the type of the generated temporary.
11592 2014-02-24  Gary Dismukes  <dismukes@adacore.com>
11594         * layout.adb (Layout_Variant_Record): Instantiate
11595         Generic_Check_Choices and call Check_Choices before calling
11596         Build_Discr_Checking_Funcs, since we need Others_Discrete_Choices
11597         set to prevent generating incorrect discriminant-checking
11598         functions for 'others' variants (functions that unconditionally
11599         return True rather than accounting for the values covered by the
11600         'others' choice).
11601         * sem_eval.ads (Subtypes_Statically_Compatible): Add formal
11602         Formal_Derived_Matching.
11603         (Subtypes_Statically_Match): Add formal Formal_Derived_Matching.
11604         * sem_eval.adb (Subtypes_Statically_Compatible): Pass new
11605         Formal_Derived_Matching formal to Subtypes_Statically_Match.
11606         (Subtypes_Statically_Match): Suppress the Object_Size matching
11607         test in the case where Formal_Derived_Matching is True.
11608         * sem_ch12.adb (Validate_Derived_Type_Instance): Pass
11609         True for Formal_Derived_Matching_Formal on the call to
11610         Subtypes_Statically_Compatible.
11612 2014-02-23  Eric Botcazou  <ebotcazou@adacore.com>
11614         * gcc-interface/Make-lang.in (ADA_TOOLS_FLAGS_TO_PASS): Robustify.
11616 2014-02-23  Eric Botcazou  <ebotcazou@adacore.com>
11618         * gcc-interface/utils2.c (build_simple_component_ref): Fix formatting.
11619         Look through a conversion between original and packable version to get
11620         the base object.
11621         (build_component_ref): Rework comment and fix formatting.
11623 2014-02-20  Sergey Rybin  <rybin@adacore.com frybin>
11625         * gnat_ugn.texi, vms_data.ads (gnatelim): Add description of
11626         project-specific options.
11628 2014-02-20  Ed Schonberg  <schonberg@adacore.com>
11630         * a-cbdlli.adb (Insert): When capacity exceeded, raise Capacity_Error,
11631         not Constraint_Error.
11632         * a-cbmutr.adb (Append_Child, Insert_Child, Prepend_Child): Ditto.
11633         * sem_ch5.adb: Code clean up.
11635 2014-02-20  Hristian Kirtchev  <kirtchev@adacore.com>
11637         * sem_prag.adb (Usage_Error): Remove local
11638         constant Typ. Remove the specialized diagnostics for unconstrained
11639         or tagged items as those are not part of the explicit input set
11640         of the related subprogram and should not be flagged.
11642 2014-02-20  Ed Schonberg  <schonberg@adacore.com>
11644         * sem_attr.adb: Add guard to preserve all errors.
11646 2014-02-20  Vincent Celier  <celier@adacore.com>
11648         * switch-m.adb (Normalize_Compiler_Switches): Take into account
11649         switches that are recorded in ALI files: -gnateA, -gnateE,
11650         -gnateF, -gnateinn, -gnateu, -gnateV and -gnateY.
11652 2014-02-20  Ed Schonberg  <schonberg@adacore.com>
11654         * sem_ch5.adb (Analyze_Iterator_Specification): Check legality
11655         of an element iterator form over a formal container with an
11656         Iterable aspect.
11657         * exp_ch5.adb (Build_Formal_Container_Iteration): Utility
11658         to create declaration and loop statements for both forms of
11659         container iterators.
11660         (Expand_Formal_Container_Element_Iterator): New procedure
11661         to handle loops of the form  "for E of C" when C is a formal
11662         container.
11663         (Expand_Formal_Container_Iterator): Code cleanup.
11665 2014-02-20  Hristian Kirtchev  <kirtchev@adacore.com>
11667         * sem_prag.adb (Add_Item_To_Name_Buffer): New routine.
11668         (Analyze_Contract_Case): Remove the use of
11669         "may". Replace "aspect Contract_Cases" to avoid categorization
11670         of aspect vs pragma.
11671         (Analyze_External_Property_In_Decl_Part): Remove the use of "formal".
11672         (Analyze_Global_Item): Remove
11673         the use of "formal", specify the subprogram.  Split the
11674         error message about a state with visible refinement into
11675         two. Remove the use of "global" from "volatile global item".
11676         (Analyze_Initialization_Item): Ensure that the SPARK RM reference
11677         is on one line.
11678         (Analyze_Input_Output): Update the call to
11679         Check_Mode. Specify the duplicated item. Reword the error
11680         message concerning an input of a null output list. Use "\"
11681         for error message continuation.
11682         (Analyze_Part_Of): Remove
11683         the use of "may". Use "\" for error message continuation.
11684         (Analyze_Refined_Depends_In_Decl_Part): Update the error
11685         message concerning a useless refinement to match the format
11686         of Refined_Global.
11687         (Analyze_Refined_Global_In_Decl_Part): Reword the error message
11688         concerning a useless refinement.
11689         (Analyze_Refinement_Clause): Use "\" for error message continuation.
11690         (Check_Constituent_Usage): Use "\" for error message continuation.
11691         (Check_Dependency_Clause): Use "\" for error message continuation.
11692         (Check_Matching_Constituent): Use "\" for error message continuation.
11693         (Check_Missing_Part_Of): Use "\" for error message continuation.
11694         (Check_Mode): Renamed to
11695         Check_Role. Update the comment on usage. Redo the error reporting
11696         to use Role_Error.
11697         (Check_Mode_Restriction_In_Enclosing_Context): Use "\" for error
11698         message continuation.
11699         (Find_Mode): Renamed to Find_Role. Update the parameter profile along
11700         with comment on usage. Update all occurrences of Is_Input and Is_Output.
11701         (Inconsistent_Mode_Error): Use "\" for error message continuation.
11702         (Input_Match): Use "\" for error message continuation.
11703         (Role_Error): New routine.
11704         (Set_Convention_From_Pragma): Use "\" for error message continuation.
11705         (Usage_Error): Add local variable Error_Msg. Build specialized error
11706         message showcasing the offending item kind. Redo the diagnostics for
11707         unconstrained types.
11709 2014-02-20  Ed Schonberg  <schonberg@adacore.com>
11711         * exp_util.adb (Is_Iterated_Container): Use high-level primitives
11712         to determine whether a type is a container type, rather than
11713         examining only its type declaration, so that subtypes and derived
11714         types are handled properly.
11716 2014-02-20  Sergey Rybin  <rybin@adacore.com frybin>
11718         * gnat_ugn.texi: gnatmetric: add description of project-specific
11719         options.
11721 2014-02-20  Ed Schonberg  <schonberg@adacore.com>
11723         * sem_attr.adb (Analyze_Attribute, case 'Update): Verify that
11724         all choices in an association for a record type have the same
11725         type, as is done for record aggregates.
11727 2014-02-20  Robert Dewar  <dewar@adacore.com>
11729         * a-cborma.adb, a-cbhama.adb, a-cbdlli.adb, a-cbmutr.adb: Use pragma
11730         Unmodified rather than Warnings (Off). Make comments
11731         uniform in the four affected units.
11733 2014-02-20  Robert Dewar  <dewar@adacore.com>
11735         * sem_ch13.adb (Analyze_Attribute_Definition_Clause, case
11736         Object_Size): For non-scalar types allow any value that is a
11737         multiple of 8.
11738         * gnat_rm.texi: Document Object_Size for composites more clearly.
11740 2014-02-20  Yannick Moy  <moy@adacore.com>
11742         * sem_util.ads, sem_util.adb (Default_Initialization): Remove function.
11744 2014-02-20  Ed Schonberg  <schonberg@adacore.com>
11746         * stand.ads: Raise_Type: new predefined entity, used as the type
11747         of a Raise_Expression prior to resolution.
11748         * cstand.adb: Build entity for Raise_Type.
11749         * sem_ch11.adb (Analyze_Raise_Expression): use Raise_Type as the
11750         initial type of the node.
11751         * sem_type.adb (Covers): Raise_Type is compatible with all
11752         other types.
11753         * sem_res.adb (Resolve): Remove special handling of Any_Type on
11754         Raise_Expression nodes.
11755         (Resolve_Raise_Expression): Signal ambiguity if the type of the
11756         context is still Raise_Type.
11758 2014-02-20  Robert Dewar  <dewar@adacore.com>
11760         * sem_ch12.adb (Validate_Access_Type_Instance): Add message if
11761         mismatching predicates.
11762         * sem_ch6.adb (Check_Conformance): Give better messages on
11763         predicate mismatch.
11764         * sem_eval.adb (Predicates_Match): Move to spec.
11765         * sem_eval.ads (Predicates_Match): Moved here from body.
11767 2014-02-20  Ed Schonberg  <schonberg@adacore.com>
11769         * a-cbmutr.adb: Use default value in Insert_Child.
11771 2014-02-20  Vincent Celier  <celier@adacore.com>
11773         * gnatcmd.adb, make.adb, prj-makr.adb, clean.adb: Call
11774         Stringt.Initialize in all project aware tools.
11776 2014-02-20  Doug Rupp  <rupp@adacore.com>
11778         * gnat_ugn.texi: Document gnatbind -X option.
11779         * vms_data.ads: Minor warnings documentation reformatting.
11781 2014-02-20  Ed Schonberg  <schonberg@adacore.com>
11783         * exp_ch3.adb (Expand_Freeze_Array_Type): Only create invariant
11784         procedure for a base type.
11786 2014-02-20  Robert Dewar  <dewar@adacore.com>
11788         * sem_ch4.adb (Analyze_Case_Expression): Get type from first
11789         expression with type info.
11790         * sem_ch13.adb: Minor reformatting.
11791         * sem_eval.adb (Subtypes_Statically_Match): Make sure we return
11792         False if predicates do not match on the two types.
11794 2014-02-20  Arnaud Charlet  <charlet@adacore.com>
11796         * sem_prag.adb (Analyze_Pragma [pragma Attach_Handler]):
11797         In Relaxed_RM_Semantics mode, allow any static integer value,
11798         for compatibility with other compilers.
11800 2014-02-20  Vincent Celier  <celier@adacore.com>
11802         * errutil.adb (Initialize): Properly initialize entry in table
11803         Warnings when warnings are suppressed.
11805 2014-02-20  Robert Dewar  <dewar@adacore.com>
11807         * s-os_lib.ads: Add warning about non-portability of Rename_File.
11808         * sem_util.ads, sem_util.adb (Is_Junk_Name): New function.
11809         * sem_warn.adb: Use Is_Junk_Name to suppress some warnings.
11810         * gnat_ugn.texi: Document no warnings on junk variable names.
11811         * layout.adb: Minor code reorganization (use Ekind_In).
11812         * stringt.adb: Move initialization of Null_String_Id to Initialize
11813         routine.
11815 2014-02-20  Ed Schonberg  <schonberg@adacore.com>
11817         * sem_ch13.adb: Initialize optional Element_Id.
11819 2014-02-20  Robert Dewar  <dewar@adacore.com>
11821         * s-os_lib.ads (Rename_File): Minor commment addition.
11823 2014-02-20  Thomas Quinot  <quinot@adacore.com>
11825         * einfo.ads: Minor reformatting.
11827 2014-02-20  Hristian Kirtchev  <kirtchev@adacore.com>
11829         * aspects.adb (Exchange_Aspects): New routine.
11830         * aspects.ads (Exchange_Aspects): New routine.
11831         * atree.adb (Rewrite): Do not check whether the save node has
11832         aspects as it never will, instead check the node about to be clobbered.
11833         * einfo.adb (Write_Field25_Name): Abstract_States can appear in
11834         entities of generic packages.
11835         * sem_ch6.adb (Analyze_Expression_Function): Fix the parent
11836         pointer of an aspect specification list after rewriting takes place.
11837         * sem_ch7.adb (Analyze_Package_Body_Helper): Swap the aspect
11838         specifications of the generic template and the copy used for analysis.
11839         * sem_ch12.adb (Analyze_Generic_Package_Declaration): Swap
11840         the aspect specifications of the generic template and the
11841         copy used for analysis.
11842         (Analyze_Package_Instantiation): Propagate the aspect specifications
11843         from the generic template to the instantiation.
11844         (Build_Instance_Compilation_Unit_Nodes): Propagate the aspect
11845         specifications from the generic template to the instantiation.
11846         * sem_ch13.adb (Analyze_Aspect_Specifications): Handle aspects
11847         Abstract_State, Initializes and Initial_Condition when they
11848         apply to a package instantiation.
11850 2014-02-20  Robert Dewar  <dewar@adacore.com>
11852         * stringt.adb: Add call to Initialize in package initialization.
11854 2014-02-20  Robert Dewar  <dewar@adacore.com>
11856         * a-crbtgk.adb, a-cihama.adb, a-coinve.adb, a-ciorse.adb, a-crbtgo.adb,
11857         a-cidlli.adb, a-cimutr.adb, a-cihase.adb, a-cohama.adb, a-coorse.adb,
11858         a-chtgke.adb, a-chtgop.adb, a-comutr.adb, a-ciorma.adb, a-cobove.adb,
11859         a-convec.adb, a-cohase.adb, a-chtgbk.adb, a-chtgbo.adb: Minor
11860         reformatting.
11862 2014-02-20  Bob Duff  <duff@adacore.com>
11864         * s-os_lib.ads: Minor: Remove incorrect comment.
11866 2014-02-20  Robert Dewar  <dewar@adacore.com>
11868         * sem_elab.adb (Check_Elab_Assign): Clearer warning message.
11870 2014-02-20  Ed Schonberg  <schonberg@adacore.com>
11872         * a-cborma.adb (Assign): When creating a node without a specified
11873         element, insert an uninitialized element in the map, because
11874         the instance may provide an element type with a default
11875         initialization, e.g a scalar with a Default_Value aspect.
11876         * a-cbhama.adb (Assign_Key): Remove useless Allocate procedure.
11877         (Insert): In the version without explicit element, provide an
11878         uninitialized element, as above.
11879         * a-cbdlli.adb (Append): In the version without explicit element,
11880         provide an uninitalized element, as above.
11881         (Allocate): Remove unused version.
11883 2014-02-20  Robert Dewar  <dewar@adacore.com>
11885         * sem_elab.adb: Minor code reorganization (use Nkind_In).
11886         * stringt.adb: Remove temporary pragma Warnings (Off).
11887         * stringt.ads: Add pragma Elaborate_Body to ensure initialization
11888         of Null_String_Id.
11890 2014-02-20  Matthew Heaney  <heaney@adacore.com>
11892         * a-chtgbk.adb (Replace): Use correct offset when calculating bucket
11893         index.
11895 2014-02-20  Ed Schonberg  <schonberg@adacore.com>
11897         * sem_ch5.adb (Analyze_Iterator_Specification): Initialize
11898         properly the cursor type for subsequent volatile testing in SPARK
11899         mode, when domain is a formal container with an Iterabe aspect.
11901 2014-02-20  Robert Dewar  <dewar@adacore.com>
11903         * errout.adb (Set_Warnings_Mode_Off): Add Reason argument.
11904         (Set_Specific_Warning_Off): Add Reason argument.
11905         * errout.ads (Set_Warnings_Mode_Off): Add Reason argument.
11906         (Set_Specific_Warning_Off): Add Reason argument.
11907         * erroutc.adb (Warnings_Entry): Add Reason field
11908         (Specific_Warning_Entry): Add Reason field.
11909         (Warnings_Suppressed): return String_Id for Reason.
11910         (Warning_Specifically_Suppressed): return String_Id for Reason.
11911         * erroutc.ads (Warnings_Entry): Add Reason field.
11912         (Specific_Warning_Entry): Add Reason field.
11913         (Set_Specific_Warning_Off): Add Reason argument.
11914         (Set_Warnings_Mode_Off): Add Reason argument.
11915         (Warnings_Suppressed): return String_Id for Reason.
11916         (Warning_Specifically_Suppressed): return String_Id for Reason.
11917         * errutil.adb (Warnings_Suppressed): returns String_Id for Reason
11918         (Warning_Specifically_Suppressed): returns String_Id for Reason
11919         * gnat_rm.texi: Document that Warning parameter is string literal
11920         or a concatenation of string literals.
11921         * par-prag.adb: New handling for Reason argument.
11922         * sem_prag.adb (Analyze_Pragma, case Warning): New handling
11923         for Reason argument.
11924         * sem_util.ads, sem_util.adb (Get_Reason_String): New procedure.
11925         * sem_warn.ads (Warnings_Off_Entry): Add reason field.
11926         * stringt.adb: Set Null_String_Id.
11927         * stringt.ads (Null_String_Id): New constant.
11929 2014-02-20  Robert Dewar  <dewar@adacore.com>
11931         * einfo.ads: Minor comment addition: Etype of package is
11932         Standard_Void_Type.
11933         * checks.adb, exp_aggr.adb, exp_atag.adb, exp_attr.adb, exp_ch13.adb,
11934         exp_ch2.adb, exp_ch3.adb, exp_ch4.adb, exp_ch5.adb, exp_ch6.adb,
11935         exp_ch7.adb, exp_ch9.adb, exp_dbug.adb, exp_disp.adb, exp_imgv.adb,
11936         exp_intr.adb, exp_prag.adb, exp_sel.adb, exp_strm.adb, exp_util.adb,
11937         freeze.adb, rtsfind.adb, sem_aggr.adb, sem_attr.adb, sem_ch10.adb,
11938         sem_ch12.adb, sem_ch13.adb, sem_ch3.adb, sem_ch4.adb, sem_ch5.adb,
11939         sem_ch6.adb, sem_ch8.adb, sem_dim.adb, sem_prag.adb, sem_res.adb,
11940         sem_util.adb, tbuild.adb, tbuild.ads: Remove New_Reference_To.
11941         Replace all calls with calls to New_Occurrence_Of.
11943 2014-02-20  Robert Dewar  <dewar@adacore.com>
11945         * par-util.adb (Ignore, case of right paren): Make this a
11946         serious error.
11948 2014-02-19  Robert Dewar  <dewar@adacore.com>
11950         * sem_ch5.adb, sem_prag.adb, sem_attr.adb: Minor reformatting.
11951         * debug.adb: Remove -gnatd.X switch, no longer used.
11952         * styleg.adb (Check_Then): Remove check of -gnatd.X, check is
11953         now always made.
11955 2014-02-19  Bob Duff  <duff@adacore.com>
11957         * g-socket.ads: Minor: Correct some comments.
11959 2014-02-19  Ed Schonberg  <schonberg@adacore.com>
11961         * sem_ch5.adb: Inhibit iterator rewriting in ASIS mode.
11963 2014-02-19  Arnaud Charlet  <charlet@adacore.com>
11965         * sem_ch13.adb (Analyze_Aspect_Specifications): Do not generate
11966         an error on out of range priorities if Relaxed_RM_Semantics.
11967         * sem_prag.adb (Analyze_Pragma): Ditto.
11969 2014-02-19  Bob Duff  <duff@adacore.com>
11971         * sem_attr.adb (Resolve_Attribute): Detect the case of F'Access
11972         where F denotes the renaming of an enumeration literal, and
11973         issue a specialized error message.
11975 2014-02-19  Matthew Heaney  <heaney@adacore.com>
11977         * a-chtgop.ads (Checked_Index): New operation.
11978         (Next): Changed mode of hash table.
11979         * a-chtgop.adb (Adjust, Delete_Node_Sans_Free): Detect tampering
11980         (Generic_Read, Reserve_Capacity): Ditto.
11981         (Generic_Equal): Detect tampering.
11982         (Next): Changed mode of hash table, detect tampering.
11983         * a-chtgke.ads (Checked_Index, Checked_Equivalent_Keys): New
11984         operation.
11985         (Find): Changed mode of hash table.
11986         * a-chtgke.adb (Checked_Equivalent_Keys): New operation
11987         (Delete_Key_Sans_Free, Generic_Conditional_Insert): Detect
11988         tampering.
11989         (Find): Changed mode of hash table, check for tampering.
11990         (Generic_Replace_Element): Check for tampering.
11991         * a-chtgbk.ads (Checked_Index, Checked_Equivalent_Keys): New operation.
11992         * a-chtgbk.adb (Checked_Index, Checked_Equivalent_Keys): New
11993         operation (Delete_Key_Sans_Free, Generic_Conditional_Insert):
11994         Detect tampering.
11995         (Find, Generic_Replace_Element): Check for tampering.
11996         * a-chtgbo.ads (Checked_Index): New operation.
11997         * a-chtgbo.adb (Checked_Index): New operation
11998         (Delete_Node_Sans_Free, Generic_Equal): Detect tampering.
11999         (Generic_Read, Next): Ditto.
12000         * a-cohase.adb, a-cihase.adb (Is_In): Changed mode of hash
12001         table (Difference, Intersection): Use variable view of
12002         source, detect tampering (Find, Is_Subset, Overlap): Use
12003         variable view of container (Symmetric_Difference, Union):
12004         Detect tampering (Vet): Use Checked_Index to detect tampering
12005         (Constant_Reference, Element, Find): Use variable view of
12006         container.
12007         (Update_Element_Preserving_Key): Detect tampering.
12008         * a-cbhase.adb (Difference, Find, Is_In): Use variable view
12009         of container.
12010         (Is_Subset): Ditto.
12011         (Equivalent_Sets, Overlap): Use Node's Next component.
12012         (Vet): Use Checked_Index to detect tampering.
12013         (Constant_Reference, Element, Find): Use variable view of container.
12014         (Update_Element_Preserving_Key): Detect tampering.
12015         * a-cohama.adb, a-cihama.adb, a-cbhama.adb (Constant_Reference,
12016         Element, Find): Use variable view of container.
12017         (Reference): Rename hash table component.
12018         (Vet): Use Checked_Index to detect tampering.
12020 2014-02-19  Arnaud Charlet  <charlet@adacore.com>
12022         * adabkend.adb (Scan_Compiler_Arguments): Add missing handling
12023         of -nostdinc.
12025 2014-02-19  Thomas Quinot  <quinot@adacore.com>
12027         * tbuild.adb (New_Occurrence_Of, New_Rerefence_To): Guard
12028         against calls without Def_Id.
12030 2014-02-19  Claire Dross  <dross@adacore.com>
12032         * a-cfdlli.ads, a-cfhase.ads, a-cforma.ads, a-cfhama.ads, a-cforse.ads,
12033         a-cofove.ads: Add global annotations to subprograms.
12035 2014-02-19  Hristian Kirtchev  <kirtchev@adacore.com>
12037         * sem_prag.adb (Analyze_Initial_Condition_In_Decl_Part): Remove
12038         constants Errors, Pack_Id and Pack_Init. Remove variable Vars.
12039         Initial_Condition no longer requires the presence of pragma
12040         Initialized. Do not try to diagnose whether all variables mentioned in
12041         pragma Initializes also appear in Initial_Condition.
12042         (Collect_Variables): Removed.
12043         (Match_Variable): Removed.
12044         (Match_Variables): Removed.
12045         (Report_Unused_Variables): Removed.
12047 2014-02-19  Thomas Quinot  <quinot@adacore.com>
12049         * gnat_rm.texi (pragma Stream_Convert): Minor rewording.
12051 2014-02-19  Robert Dewar  <dewar@adacore.com>
12053         * sem_util.adb, sem_util.ads, prj-conf.adb, s-os_lib.adb: Minor
12054         reformatting.
12056 2014-02-19  Vincent Celier  <celier@adacore.com>
12058         * prj-part.adb (Parse_Single_Project): Use the fully resolved
12059         project path, with all symbolic links resolved, to check if the
12060         same project is imported with a different unresolved path.
12061         * prj-tree.ads (Project_Name_And_Node): Component Canonical_Path
12062         changed to Resolved_Path to reflect that all symbolic links
12063         are resolved.
12065 2014-02-19  Ed Schonberg  <schonberg@adacore.com>
12067         * sem_util.ads, sem_util.adb (Get_Cursor_Type): Moved to sem_util
12068         from sem_ch13, for use elsewhere.
12069         * sem_ch13.adb (Get_Cursor_Type): Moved to sem_util.
12070         * sem_ch5.adb (Analyze_Iterator_Specification): Set properly the
12071         cursor type on the loop variable when the iteration is over o
12072         formal container.
12074 2014-02-19  Vincent Celier  <celier@adacore.com>
12076         * prj-conf.adb (Add_Default_GNAT_Naming_Scheme): Add declaration
12077         for an empty Target (Check_Target): Never fail when an empty
12078         target is declared in the configuration project.
12080 2014-02-19  Ed Schonberg  <schonberg@adacore.com>
12082         * sem_prag.adb (Check_Arg_Is_Local_Name): Argument is local if
12083         the pragma comes fron a predicate aspect and the context is a
12084         record declaration within the scope that declares the type.
12086 2014-02-19  Robert Dewar  <dewar@adacore.com>
12088         * gnat_rm.texi: Minor clarifications.
12089         * expander.adb, sem_aggr.adb: Add comments.
12091 2014-02-19  Ed Schonberg  <schonberg@adacore.com>
12093         * sem_prag.adb (Check_Arg_Is_Local_Name): For an aspect that
12094         applies to a subprogram body, the name is the current scope,
12095         rather than being declared in the current scope.
12096         (Analyze_Pragma, case No_Return): Handle properly a No_Return
12097         aspect applied to a subprogram body.
12099 2014-02-19  Ed Schonberg  <schonberg@adacore.com>
12101         * sem_ch13.adb (Resolve_Iterable_Operation): Improve resolution
12102         of overloaded subprograms, and fix bug in handling of primitive
12103         operation Element.
12105 2014-02-19  Pascal Obry  <obry@adacore.com>
12107         * s-os_lib.adb: Minor reformatting.
12109 2014-02-19  Yannick Moy  <moy@adacore.com>
12111         * expander.adb (Expand): Do nothing inside generics.
12112         * sem_aggr.adb (Aggregate_Constraint_Checks): Do nothing inside
12113         generics.
12115 2014-02-19  Yannick Moy  <moy@adacore.com>
12117         * exp_ch2.adb: Remove useless 'with' of unit Uintp.
12119 2014-02-19  Robert Dewar  <dewar@adacore.com>
12121         * sem_ch3.adb, style.adb, sem_prag.adb, sem_ch13.adb: Minor reformatting
12122         * a-sequio.adb: Remove useless pragma Extensions_Allowed (no
12123         longer needed).
12125 2014-02-19  Claire Dross  <dross@adacore.com>
12127         * a-cfdlli.ads, a-cfhase.ads, a-cforma.ads, a-cfhama.ads,
12128         a-cforse.ads, a-cofove.ads: Add Iterable aspect to formal containers.
12130 2014-02-19  Hristian Kirtchev  <kirtchev@adacore.com>
12132         * sem_ch3.adb (Analyze_Declarations): Analyze
12133         a package contract at the end of the private declarations (if
12134         applicable), otherwise analyze it and the end of the visible
12135         declarations.
12137 2014-02-19  Ed Schonberg  <schonberg@adacore.com>
12139         * style.adb (Missing_Overriding): If subprogram is an
12140         instantiation, place warning on the instance node itself,
12141         without mention of the original generic. Do not emit message
12142         if explicit Ada version is older than the introduction of the
12143         overriding indicator.
12145 2014-02-19  Yannick Moy  <moy@adacore.com>
12147         * gnat_rm.texi: Doc clarifications.
12149 2014-02-19  Yannick Moy  <moy@adacore.com>
12151         * exp_util.adb (Remove_Side_Effects): Do not remove side-effects
12152         inside a generic.
12154 2014-02-19  Ed Schonberg  <schonberg@adacore.com>
12156         * sem_ch13.adb (Get_Cursor_Type): Obtain cursor type from
12157         specified First primitive, rather than by name.
12158         (Validate_Iterable_Aspect, Resolve_Iterable_Operation): Use it,
12159         and extend error checking for missing primitives and incorrect
12160         signatures.
12162 2014-02-19  Ed Schonberg  <schonberg@adacore.com>
12164         * sem_ch3.adb (Check_Pragma_Implemented): Detect additional
12165         errors when a Synchronization aspect on an overriding protected
12166         operation does not match the given aspect on the overridden
12167         operation of an ancestor interface.
12169 2014-02-19  Hristian Kirtchev  <kirtchev@adacore.com>
12171         * sem_prag.adb (Check_Loop_Pragma_Grouping): New routine.
12172         (Check_Loop_Pragma_Placement): Update
12173         comment on usage. Remove local variables Orig_Stmt and
12174         Within_Same_Sequence. Check that the current Loop_Invariant or
12175         Loop_Variant pragma is grouped together with other such pragmas.
12176         (Is_Loop_Pragma): New routine.
12177         (Prev_In_Loop): Removed.
12179 2014-02-19  Robert Dewar  <dewar@adacore.com>
12181         * par-ch6.adb (P_Return): For extended return, end column lines
12182         up with RETURN.
12183         * par.adb: Minor documentation clarification.
12185 2014-02-19  Yannick Moy  <moy@adacore.com>
12187         * sem_prag.adb (Check_Loop_Pragma_Placement): Add check
12188         that Loop_Invariant and Loop_Variant appear consecutively.
12189         * gnat_rm.texi Update documentation of Loop_Invariant and
12190         Loop_Variant pragmas.
12192 2014-02-19  Robert Dewar  <dewar@adacore.com>
12194         * debug.adb: Document -gnatd.X.
12195         * par-ch5.adb (P_If_Statement): Always check THEN, even if not
12196         first token
12197         (Check_Then_Column): Ditto.
12198         * styleg.adb (Check_Then): Allow THEN on line after IF.
12199         (Check_Then): Check THEN placement under control of -gnatd.X
12200         * styleg.ads (Check_Then): Now called even if THEN is not first
12201         token on line.
12202         * stylesw.ads (Style_Check_If_Then_Layout): Document new
12203         relaxed rules.
12204         * gnat_ugn.texi: For -gnatyi, THEN can now be on line after IF.
12206 2014-02-19  Robert Dewar  <dewar@adacore.com>
12208         * a-cfhama.adb, a-cfhase.adb, a-cforse.adb, a-cofove.adb, a-ngcefu.adb,
12209         a-teioed.adb, a-wtedit.adb, a-ztedit.adb, exp_ch5.adb, inline.adb,
12210         prj-pp.adb, prj-tree.adb, sem_ch12.adb, sem_ch8.adb,
12211         vms_conv.adb: Fix bad layout of IF statements
12213 2014-02-19  Robert Dewar  <dewar@adacore.com>
12215         * exp_util.adb (Side_Effect_Free): Scalar if expressions can be SEF.
12217 2014-02-19  Robert Dewar  <dewar@adacore.com>
12219         * exp_util.adb: Update comments.
12221 2014-02-19  Doug Rupp  <rupp@adacore.com>
12223         * bindgen.adb (Gen_Adainit) [VMS] New global Float_Format.
12224         * init.c (__gl_float_format): [VMS] New global.
12225         (__gnat_set_features): Call FP_CONTROL to set FPSR for the float
12226         representation in effect.
12228 2014-02-19  Hristian Kirtchev  <kirtchev@adacore.com>
12230         * exp_ch6.adb Add with and use clause for Exp_Prag.
12231         (Expand_Contract_Cases): Relocated to Exp_Prag.
12232         * exp_ch6.ads (Expand_Contract_Cases): Relocated to Exp_Prag.
12233         * exp_prag.adb Add with and use clauses for Checks and Validsw.
12234         (Expand_Contract_Cases): Relocated from Exp_Ch6. Update the
12235         structure of the expanded code to showcase the evaluation of
12236         attribute 'Old prefixes. Add local variable Old_Evals. Expand
12237         any attribute 'Old references found within a consequence. Add
12238         circuitry to evaluate the prefixes of attribute 'Old that
12239         belong to a selected consequence.
12240         (Expand_Old_In_Consequence): New routine.
12241         * exp_prag.ads (Expand_Contract_Cases): Relocated from Exp_Ch6.
12242         * sem_attr.adb (Check_Use_In_Contract_Cases): Warn that a
12243         potentially unevaluated prefix is always evaluated.
12245 2014-02-19  Robert Dewar  <dewar@adacore.com>
12247         * exp_attr.adb (Expand_Min_Max_Attribute): Use Insert_Declaration
12248         (Expand_Min_Max_Attribute): Use Matching_Standard_Type.
12249         * exp_ch4.adb (Expand_N_Expression_With_Actions): Remove special
12250         handling for the case of Modify_Tree_For_C, this approach did
12251         not work.
12252         * exp_util.adb (Matching_Standard_Type): New function
12253         (Side_Effect_Free): New top level functions (from
12254         Remove_Side_Effects).
12255         * exp_util.ads (Side_Effect_Free): New top level functions
12256         (moved from body).
12257         * sinfo.ads: Minor comment updates.
12259 2014-02-19  Ed Schonberg  <schonberg@adacore.com>
12261         * exp_ch6.adb (Expand_Simple_Function_Return): If return
12262         type is unconstrained and uses the secondary stack, mark the
12263         enclosing function accordingly, to ensure that the value is not
12264         prematurely removed.
12266 2014-02-19  Hristian Kirtchev  <kirtchev@adacore.com>
12268         * par.adb Alphabetize the routines in Par.Sync.
12269         (Resync_Past_Malformed_Aspect): New routine.
12270         * par-ch13.adb (Get_Aspect_Specifications): Alphabetize local
12271         variables. Code and comment reformatting. Detect missing
12272         parentheses on aspects [Refined_]Global and [Refined_]Depends
12273         with a non-null definition.
12274         * par-sync.adb: Alphabetize all routines in this separate unit.
12275         (Resync_Past_Malformed_Aspect): New routine.
12277 2014-02-19  Robert Dewar  <dewar@adacore.com>
12279         * sem_eval.ads, sem_eval.adb (Subtypes_Statically_Match): Return False
12280         if Esize values do not match.
12282 2014-02-19  Yannick Moy  <moy@adacore.com>
12284         * sinfo.ads: Minor comment update.
12286 2014-02-19  Hristian Kirtchev  <kirtchev@adacore.com>
12288         * atree.ads: Minor reformatting (change Entity_Info to Einfo).
12290 2014-02-19  Thomas Quinot  <quinot@adacore.com>
12292         * exp_ch7.adb (Find_Node_To_Be_Wrapped): An assignment statement
12293         that has the No_Ctrl_Actions flag is a suitable node to be
12294         wrapped if the assigned expression has no finalization actions.
12295         * sem_eval.adb (Eval_Entity_Name): For a compile time known
12296         boolean value, mark the corresponding condition SCO as constant.
12298 2014-02-19  Robert Dewar  <dewar@adacore.com>
12300         * exp_util.adb: Minor reformatting.
12301         * exp_util.ads (Matching_Standard_Type): New function.
12302         * exp_ch7.adb: Minor reformatting.
12304 2014-02-19  Ed Schonberg  <schonberg@adacore.com>
12306         * sem_ch13.adb (Get_Cursor_Type): Use scope of iterable type
12307         to find declaration for Cursor, to handle properly the case of
12308         a discriminated iterable type.
12310 2014-02-19  Vincent Celier  <celier@adacore.com>
12312         * gnatcmd.adb (GNATCmd): Always replace the object dirs of
12313         imported library projects with the library ALI dirs, when setting
12314         the object paths.
12315         * prj-env.ads (Ada_Objects_Path): Correct comments about
12316         argument Including_Libraries.
12318 2014-02-19  Gary Dismukes  <dismukes@adacore.com>
12320         * gnat_rm.texi: Minor spelling fixes.
12322 2014-02-19  Doug Rupp  <rupp@adacore.com>
12324         * init.c: Remove unneeded code.
12325         * fe.h (Float_Format): New macro
12326         * gcc-interface/trans.c (gigi): On VMS, set vms_float_format.
12328 2014-02-19  Hristian Kirtchev  <kirtchev@adacore.com>
12330         * sem_prag.adb (Check_Refined_Global_Item):
12331         A state or variable acts as a constituent only it is part of an
12332         encapsulating state and the state has visible refinement.
12334 2014-02-19  Ed Schonberg  <schonberg@adacore.com>
12336         * sem_ch6.adb (Analyze_Subprogram_Contract): Do not warn on a
12337         postcondition for a function when the expression does not mention
12338         'Result but the function has in-out parameters.
12340 2014-02-19  Robert Dewar  <dewar@adacore.com>
12342         * gnat_rm.texi: Add documentation on Value_Size forcing biased
12343         representation.
12345 2014-02-19  Hristian Kirtchev  <kirtchev@adacore.com>
12347         * lib-xref.ads Remove the small table of letter and symbol usage as we
12348         already have one.
12350 2014-02-19  Hristian Kirtchev  <kirtchev@adacore.com>
12352         * sem_ch6.adb (Analyze_Subprogram_Body_Helper): Emit specific error
12353         messages depending on the offending misplaced aspect specifications.
12354         (Diagnose_Misplaced_Aspect_Specifications): New routine.
12356 2014-02-19  Ed Schonberg  <schonberg@adacore.com>
12358         * sem_ch13.adb (Get_Cursor): Utility to retrieve cursor type
12359         for iterable aspect primitives.
12360         (Resolve_Iterable_Operation): Use expected signature of iterable
12361         aspect to resolve primitive when overloading is present.
12362         (Validate_Iterable_Aspect, Analyze_Aspects_At_Freeze_Point): use it.
12363         (Check_Signature): Removed.
12365 2014-02-19  Yannick Moy  <moy@adacore.com>
12367         * sem_ch10.adb (Analyze_Proper_Body): Issue error on missing
12368         subunit in GNATprove_Mode.
12369         * sinfo.ads (GNATprove_Mode): Document error issued in GNATprove_Mode.
12371 2014-02-19  Hristian Kirtchev  <kirtchev@adacore.com>
12373         * lib-xref.ads Alphabetize the contents of table
12374         Xref_Entity_Letters. Add an entry in table Xref_Entity_Letters
12375         for E_Abstract_State. List all letters and symbols in use.
12376         * sem_prag.adb (Analyze_Abstract_State): Update all calls
12377         to Create_Abstract_State to reflect the new signature.
12378         (Create_Abstract_State): Change subprogram profile and update
12379         the comment on usage. Use the proper location of the state
12380         declaration when creating a new abstract state entity. Do not
12381         generate an external name, but simply reuse the name coming from
12382         the state declaration.
12384 2014-02-19  Robert Dewar  <dewar@adacore.com>
12386         * exp_ch4.adb (Expand_N_Expression_With_Actions): Make sure
12387         declarations get properly inserted in Modify_Tree_For_C mode.
12388         * sinfo.ads: Minor comment addition.
12390 2014-02-19  Robert Dewar  <dewar@adacore.com>
12392         * par-ch9.adb, exp_ch5.adb, sem_ch5.adb, exp_attr.adb, sem_util.adb,
12393         sem_util.ads, sem_ch13.adb, sem_ch13.ads: Minor reformatting.
12395 2014-02-19  Ed Schonberg  <schonberg@adacore.com>
12397         * style.adb (Missing_Overriding): Warning does not apply in
12398         language versions prior to Ada 2005.
12399         * snames.ads-tmpl: Add Name_Iterable and Attribute_Iterable.
12400         * sem_attr.adb: Add Attribute_Iterable where needed.
12401         * exp_attr.adb: ditto.
12402         * exp_ch5.adb (Expand_Formal_Container_Loop): New procedure to
12403         handle loops and quantified expressions over types that have an
12404         iterable aspect.  Called from Expand_Iterator_Loop.
12405         * sem_ch5.adb (Analyze_Iterator_Specification): Recognize types
12406         with Iterable aspect.
12407         * sem_ch13.adb (Validate_Iterable_Aspect): Verify that the
12408         subprograms specified in the Iterable aspect have the proper
12409         signature involving container and cursor.
12410         (Check_Aspect_At_Freeze_Point): Analyze value of iterable aspect.
12411         * sem_ch13.ads (Validate_Iterable_Aspect): New subprogram.
12412         * sem_util.ads, sem_util.adb (Get_Iterable_Type_Primitive):
12413         New procedure to retrieve one of the primitives First, Last,
12414         or Has_Element, from the value of the iterable aspect of a
12415         formal container.
12416         (Is_Container_Element): Predicate to recognize expressions
12417         that denote an element of one of the predefined containers,
12418         for possible optimization.  This subprogram is not currently
12419         used, pending ARG discussions on the legality of the proposed
12420         optimization. Worth preserving for eventual use.
12421         (Is_Iterator): Recognize formal container types.
12422         * aspects.ads, aspects.adb: Add Aspect_Iterable where needed.
12424 2014-02-19  Robert Dewar  <dewar@adacore.com>
12426         * exp_attr.adb (Expand_Min_Max_Attribute): New procedure
12427         (Expand_N_Attribute_Reference): Use this procedure for Min and Max.
12428         * exp_ch4.adb (Expand_N_Expression_With_Actions): Remove object
12429         declarations from list of actions.
12430         * output.ads, output.adb (Delete_Last_Char): New procedure.
12431         * sinfo.ads: Document handling of Mod and expression with actions
12432         in Modify_Tree_For_C mode.
12434 2014-02-19  Ed Schonberg  <schonberg@adacore.com>
12436         * par-ch9.adb (P_Task): Add a null statement to produce a
12437         well-formed task body when due to a previous syntax error the
12438         statement list is empty.
12440 2014-02-19  Hristian Kirtchev  <kirtchev@adacore.com>
12442         * sem_prag.adb (Check_Dependency_Clause): Account
12443         for the case where a state with a non-null refinement matches a
12444         null output list. Comment reformatting.
12445         (Inputs_Match): Copy a solitary input to avoid an assertion failure
12446         when trying to match the same input in multiple clauses.
12448 2014-02-19  Gary Dismukes  <dismukes@adacore.com>
12450         * sem_attr.adb: Minor typo fix.
12452 2014-02-18  Robert Dewar  <dewar@adacore.com>
12454         * cstand.adb (Build_Signed_Integer_Type): Minor change of formal
12455         from Int to Nat (Build_Unsigned_Integer_Type): New procedure
12456         (Create_Standard): Create new unsigned types.
12457         * exp_ch4.adb (Expand_N_Op_Mod): Expand mod in Modify_Tree_For_C
12458         mode (Expand_N_Reference): Removed, problematic and not needed
12459         for now.
12460         * exp_ch4.ads (Expand_N_Reference): Removed, problematic and
12461         not needed for now.
12462         * exp_util.ads, exp_util.adb (Power_Of_Two): New function.
12463         * expander.adb: Remove call to Expand_N_Reference (problematic,
12464         and not needed now).
12465         * sem_aux.ads, sem_aux.adb (Corresponding_Unsigned_Type): New function.
12466         * stand.adb: Read and write unsigned type entities.
12467         * stand.ads: Add new unsigned types.
12469 2014-02-18  Hristian Kirtchev  <kirtchev@adacore.com>
12471         * sem_ch4.adb (Analyze_Call): Do not mark a function call
12472         as being inside an assertion expression as the flag is now removed.
12473         (Check_Ghost_Subprogram_Call): Do not query the
12474         In_Assertion_Expression flag as it is now removed, instead use
12475         a predicate function.
12476         * sem_elab.adb (Check_Internal_Call_Continue): Do not query the
12477         In_Assertion_Expression flag as it is now removed, instead use
12478         a predicate function.
12479         * sem_prag.ads: Add new table Assertion_Expression_Pragma.
12480         * sem_util.adb Add with and use clause for Sem_Prag.
12481         (In_Assertion_Expression_Pragma): New routine.
12482         * sem_util.ads (In_Assertion_Expression_Pragma): New routine.
12483         * sinfo.adb (In_Assertion_Expression): Removed.
12484         (Set_In_Assertion_Expression): Removed.
12485         * sinfo.ads Remove flag In_Assertion_Expression along with its
12486         use in nodes.
12487         (In_Assertion_Expression): Removed along with
12488         pragma Inline.  (Set_In_Assertion_Expression): Removed along
12489         with pragma Inline.
12491 2014-02-18  Sergey Rybin  <rybin@adacore.com frybin>
12493         * gnat_ugn.texi: gnatpp section: add note that '-j' cannot be
12494         used together with '-r', '-rf' or '-rnb' options.
12496 2014-02-18  Hristian Kirtchev  <kirtchev@adacore.com>
12498         * sem_attr.adb (Analyze_Attribute): Comment
12499         and code reformatting. Use separate routines to check the
12500         legality of attribute 'Old in certain pragmas. Verify
12501         the use of 'Old, 'Result and locally declared entities
12502         within the prefix of 'Old.
12503         (Check_References_In_Prefix): New routine.
12504         (Check_Use_In_Contract_Cases): New routine.
12505         (Check_Use_In_Test_Case): New routine.
12507 2014-02-18  Vincent Celier  <celier@adacore.com>
12509         * sem_aux.adb (Is_By_Reference_Type): For each components of
12510         a record type, check also if the component is volatile as it
12511         may have an aspect that makes it volatile. If it is, then the
12512         record type is a by reference type.
12514 2014-02-18  Robert Dewar  <dewar@adacore.com>
12516         * exp_attr.adb: Minor reformatting.
12517         * exp_ch4.ads, exp_ch4.adb (Expand_N_Reference): New procedure.
12518         * exp_util.adb (Remove_Side_Effects): Add conditional expressions
12519         as another case where we don't generate N_Reference nodes for
12520         primitive types.
12521         * expander.adb (Expand): Add call to Expand_N_Reference.
12523 2014-02-06  Hristian Kirtchev  <kirtchev@adacore.com>
12525         * sem_prag.adb (Analyze_Refined_Pragma): Remove
12526         local variable Pack_Spec. Refinement pragmas may now apply to
12527         bodies of both visible and private subprograms.
12529 2014-02-06  Robert Dewar  <dewar@adacore.com>
12531         * exp_attr.adb (Expand_Loop_Entry_Attribute):
12532         Minor change (Attr => N) (Expand_Pred_Succ): New name
12533         Expand_Pred_Succ_Attribute (Expand_N_Attribute_Reference, case
12534         Max): Expand into if expression if Modify_Tree_For_C mode.
12535         (Expand_N_Attribute_Reference, case Min): ditto
12536         * sinfo.ads: Modify_Tree_For_C takes care of expanding Min and
12537         Max attributes.
12539 2014-02-06  Ed Schonberg  <schonberg@adacore.com>
12541         * sem_ch3.adb (Analyze_Object_Declaration): Do not generate
12542         predicate check if this is an internal declaration with
12543         No_Initialization set, as for an expanded aggregate component.
12545 2014-02-06  Doug Rupp  <rupp@adacore.com>
12547         * init.c (__gnat_default_resignal_p) [VMS]: Test for and resignal
12548         conditions with severity of "SUCCESS" or "INFORMATIONAL".
12550 2014-02-06  Yannick Moy  <moy@adacore.com>
12552         * sem_prag.adb (Analyze_Pragma): Analyze pragma
12553         Debug rewritten node before rewriting it as a null statement in
12554         GNATprove mode.
12556 2014-02-06  Robert Dewar  <dewar@adacore.com>
12558         * sem_attr.adb (Min_Max): New procedure.
12559         (Max_Alignment_For_Allocation_Max_Size_In_Storage_Elements): New
12560         procedure.
12562 2014-02-06  Sergey Rybin  <rybin@adacore.com frybin>
12564         * gnat_ugn.texi, vms_data.ads: Add documentation of '-t' option for
12565         gnatmetric/gnatpp.
12567 2014-02-06  Hristian Kirtchev  <kirtchev@adacore.com>
12569         * sem_prag.adb (Analyze_Abstract_State): Update
12570         all calls to Create_Abstract_State to pass the proper state
12571         "declaration".
12572         (Create_Abstract_State): Add new formal parameter
12573         State_Decl along with comment on usage. Establish a link between
12574         the abstract state entity and the state declaration.
12576 2014-02-06  Robert Dewar  <dewar@adacore.com>
12578         * sem_attr.adb (Analyze_Attribute, case Max): Check for improper
12579         comparison of unordered enumeration type.
12580         (Analyze_Attribute, case Max): Check for improper comparison of
12581         unordered enumeration type.
12582         * sem_res.adb (Bad_Unordered_Enumeration_Reference): Moved to
12583         sem_util.adb.
12584         * sem_util.ads, sem_util.adb (Bad_Unordered_Enumeration_Reference):
12585         Moved here from Sem_Res.
12587 2014-02-06  Robert Dewar  <dewar@adacore.com>
12589         * sem_ch3.adb, sem_prag.adb, sem_res.adb, lib-xref.adb: Minor
12590         reformatting.
12592 2014-02-06  Hristian Kirtchev  <kirtchev@adacore.com>
12594         * sem_ch6.adb (Process_Formals): Error message reformatting.
12596 2014-02-06  Hristian Kirtchev  <kirtchev@adacore.com>
12598         * sem_ch3.adb (Handle_Late_Controlled_Primitive): Add local
12599         variable Spec. Do not inherit the null indicator from the
12600         subprogram body when generating the spec.
12602 2014-02-06  Robert Dewar  <dewar@adacore.com>
12604         * casing.adb (Determine_Casing): Consider SPARK_Mode to be
12605         mixed case.
12607 2014-02-06  Ed Schonberg  <schonberg@adacore.com>
12609         * exp_ch6.adb (Is_Build_In_Place_Function): Predicate is false
12610         when the function has a foreign convention, but not if only the
12611         limited return type has such a convention.
12613 2014-02-06  Hristian Kirtchev  <kirtchev@adacore.com>
12615         * sem_ch3.adb (Handle_Late_Controlled_Primitive): Remove local
12616         variable Spec. Comment reformatting. Use Copy_Separate_Tree
12617         rather than New_Copy_Tree when building the corresponding
12618         subprogram declaration.
12620 2014-02-06  Hristian Kirtchev  <kirtchev@adacore.com>
12622         * sem_prag.adb (Analyze_Global_Item): Remove
12623         the mode-related checks on abstract states with enabled external
12624         properties.
12625         (Property_Error): Removed.
12627 2014-02-06  Javier Miranda  <miranda@adacore.com>
12629         * lib-xref.adb (Generate_Reference): When
12630         generating the reference to the first private entity take care
12631         of handling swapped entities.
12633 2014-02-06  Sergey Rybin  <rybin@adacore.com frybin>
12635         * gnat_ugn.texi, vms_data.ads: Add documentation of -j option for
12636         gnatmetric.
12638 2014-02-06  Robert Dewar  <dewar@adacore.com>
12640         * exp_ch4.adb (Expand_N_Shift_Left): Handle shift counts greater
12641         than the word size when operating in Modify_Tree_For_C mode.
12642         * sinfo.ads: Add documentation section on Modify_Tree_For_C mode.
12644 2014-02-06  Robert Dewar  <dewar@adacore.com>
12646         * erroutc.adb (Warning_Specifically_Suppressed.Matches):
12647         compare is case insensitive.
12648         * gnat_rm.texi: Document that string compare for Warnings Off
12649         is now case insensitive.
12651 2014-02-06  Eric Botcazou  <ebotcazou@adacore.com>
12653         * gnat_rm.texi: Small wording tweak.
12655 2014-02-06  Pascal Obry  <obry@adacore.com>
12657         * prj-attr.adb, projects.texi, snames.ads-tmpl: Add Included_Patterns
12658         and Included_Artifact_Patterns attribute definitions.
12660 2014-02-06  Yannick Moy  <moy@adacore.com>
12662         * sem_ch6.adb (Analyze_Subprogram_Body_Helper): Set
12663         SPARK_Mode pragma component for all subprograms, including stubs.
12665 2014-02-06  Hristian Kirtchev  <kirtchev@adacore.com>
12667         * sem_ch10.adb (Analyze_Package_Body_Stub): Maintain
12668         the configuration options of the enclosing context in a
12669         stack-like fasion.
12670         (Analyze_Subprogram_Body_Stub): Maintain the
12671         configuration options of the enclosing context in a stack-like
12672         fashion.
12674 2014-02-06  Robert Dewar  <dewar@adacore.com>
12676         * debug.adb: -gnatd.u sets Modify_Tree_For C
12677         * exp_ch4.adb (Expand_N_Op_Rotate_Left): Expand out
12678         if Modify_Tree_For_C (Expand_N_Op_Rotate_Right): ditto.
12679         (Expand_N_Op_Arithmetic_Right_Shift): ditto.
12680         * exp_intr.adb (Expand_Shift): Call expander so we do
12681         Modify_Tree_For_C expansions.
12682         * gnat1drv.adb (Adjust_Global_Switches): Set Modify_Tree_For_C
12683         if -gnatd.u set.
12685 2014-02-06  Fedor Rybin  <frybin@adacore.com>
12687         * prj-proc.ads (Tree_Loaded_Callback): new type Callback used
12688         after the phase 1 of the processing of each aggregated project
12689         to get access to project trees of aggregated projects.
12690         (Process_Project_Tree_Phase_1): new parameter On_New_Tree_Loaded
12691         If specified, On_New_Tree_Loaded is called after each aggregated
12692         project has been processed succesfully.
12693         (Process): new parameter On_New_Tree_Loaded.
12694         * prj-proc.adb (Process_Aggregated_Projects): On_New_Tree_Loaded
12695         callback added after processing of each aggregated project.
12696         (Recursive_Process): new parameter On_New_Tree_Loaded.
12697         (Process): new parameter On_New_Tree_Loaded.
12698         (Process_Project_Tree_Phase_1): new parameter On_New_Tree_Loaded.
12699         * prj-conf.ads (Parse_Project_And_Apply_Config): new parameter
12700         On_New_Tree_Loaded.
12701         * prj-conf.adb (Parse_Project_And_Apply_Config): new parameter
12702         On_New_Tree_Loaded.
12704 2014-02-06  Bob Duff  <duff@adacore.com>
12706         * gnat_ugn.texi: Implement --insert-blank-lines and
12707         --preserve-blank-lines switches.
12709 2014-02-06  Sergey Rybin  <rybin@adacore.com frybin>
12711         * gnat_ugn.texi, vms_data.ads: Add documentation of -j option for
12712         gnatelim.
12714 2014-02-06  Eric Botcazou  <ebotcazou@adacore.com>
12716         * gnat_rm.texi (Pragma Optimize_Alignment): Document the effect
12717         of the pragma on individual objects.
12719 2014-02-06  Hristian Kirtchev  <kirtchev@adacore.com>
12721         * einfo.adb Node29 is now used as BIP_Initialization_Call.
12722         (BIP_Initialization_Call): New routine.
12723         (Set_BIP_Initialization_Call): New routine.
12724         (Write_Field29_Name): Add an entry for constants and variables.
12725         * einfo.ads Add new attribute BIP_Initialization_Call and update
12726         its usage in nodes.
12727         (BIP_Initialization_Call): New routine along with pragma Inline.
12728         (Set_BIP_Initialization_Call): New routine along with pragma Inline.
12729         * exp_ch6.adb (Make_Build_In_Place_Call_In_Object_Declaration):
12730         Add local declaration Res_Decl. Capture the build-in-place
12731         initialization call when the related object declaration has
12732         created a transient block.
12733         * exp_ch7.adb (Process_Transient_Objects): Add local variable
12734         Fin_Insrt. Recognize a scenario where an object declaration acts
12735         as a transient context and is initialized by a build-in-place
12736         function call.
12738 2014-02-06  Pascal Obry  <obry@adacore.com>
12740         * prj-util.adb (For_Interface_Sources): Fix handling of required
12741         bodies for aggregate libs.
12743 2014-02-06  Robert Dewar  <dewar@adacore.com>
12745         * nlists.ads: Minor comment clarifications.
12747 2014-02-06  Robert Dewar  <dewar@adacore.com>
12749         * gnat1drv.adb (Adjust_Global_Switches): Set Modify_Tree_For_C
12750         if gnatd.V set.
12751         * opt.ads (Modify_Tree_For_C): New flag.
12752         * output.ads, output.adb (Last_Char): New function.
12754 2014-02-06  Pascal Obry  <obry@adacore.com>
12756         * projects.texi, prj-env.adb (Initialize_Default_Project_Path): Add
12757         share/gpr for cross-builds.
12759 2014-02-06  Robert Dewar  <dewar@adacore.com>
12761         * exp_util.ads, checks.adb, sem_prag.adb, prj-util.adb, sem_ch13.adb:
12762         Minor reformatting and code clean ups.
12764 2014-02-06  Pascal Obry  <obry@adacore.com>
12766         * prj-util.adb (For_Interface_Sources): Skip non compilable languages.
12767         * prj.ads: Minor typo fix in comment.
12769 2014-02-06  Hristian Kirtchev  <kirtchev@adacore.com>
12771         * sem_prag.adb (Analyze_Depends_In_Decl_Part): Add
12772         local variable Expr. Flag clauses with extra parenthesis as this
12773         is not allowed by the syntax of the pragma. Code reformatting.
12775 2014-02-06  Hristian Kirtchev  <kirtchev@adacore.com>
12777         * exp_attr.adb (Expand_N_Attribute_Reference): Alphabetize
12778         variables. Rename variabme Tnn to Temp. Do not create a temporary
12779         if assertions are disabled. Find enclosing routine _Postconditions
12780         and insert the temporary that captures the value of the prefix
12781         before the routine.
12782         * exp_ch6.adb (Build_Postconditions_Procedure):
12783         Insert the generated _Postconditions routine
12784         before the first source declaration of the related
12785         subprogram.
12786         (Insert_After_Last_Declaration): Removed.
12787         (Insert_Before_First_Source_Declaration): New routine.
12789 2014-02-06  Ed Schonberg  <schonberg@adacore.com>
12791         * exp_util.adb, exp_util.ads (Within_Internal_Subprogram):
12792         Utility to determine whether current expansion is for the body
12793         of a predefined primitive operation.
12794         (Make_Predicate_Check): Use Within_Internal_Subpgram
12795         * checks.adb (Apply_Predicate_Check): Use
12796         Within_Internal_Subprogram
12797         * sem_ch13.adb (Freeze_Entity_Checks): Ditto.
12799 2014-02-06  Pascal Obry  <obry@adacore.com>
12801         * prj.ads, prj-util.adb: Minor reformatting.
12803 2014-02-06  Ed Schonberg  <schonberg@adacore.com>
12805         * exp_ch6.adb (Expand_Subprogram_Contract, Append_Enabled_Item):
12806         Take into account the Split_PPC flag to ensure that conjuncts
12807         in a composite postcondition aspect are tested in source order.
12809 2014-02-06  Hristian Kirtchev  <kirtchev@adacore.com>
12811         * sem_ch6.adb (Analyze_Generic_Subprogram_Body): Flag illegal
12812         use of SPARK_Mode.
12813         * sem_ch12.adb (Analyze_Generic_Subprogram_Declaration): Flag
12814         illegal use of SPARK_Mode.
12815         (Instantiate_Subprogram_Body): Flag illegal use of SPARK_Mode.
12816         * sem_prag.adb (Analyze_Pragma): Code reformatting.
12817         * sem_util.adb Add with and use clause for Aspects.
12818         (Check_SPARK_Mode_In_Generic): New routine.
12819         * sem_util.ads (Check_SPARK_Mode_In_Generic): New routine.
12821 2014-02-06  Thomas Quinot  <quinot@adacore.com>
12823         * a-calend.adb (Formatting_Operations.Split): Ensure that
12824         Time_Error is raised for invalid time values.
12826 2014-02-06  Arnaud Charlet  <charlet@adacore.com>
12828         * sem_prag.adb (Analyze_Pragma): Rewrite as a null statement
12829         in GNATprove_Mode.
12831 2014-02-06  Robert Dewar  <dewar@adacore.com>
12833         * einfo.ads, einfo.adb (Is_Discriminant_Check_Function): New flag.
12834         * exp_ch3.adb (Build_Dcheck_Function): Set
12835         Is_Discriminant_Check_Function.
12837 2014-02-06  Hristian Kirtchev  <kirtchev@adacore.com>
12839         * exp_ch7.adb (Is_Subprogram_Call): Inspect
12840         the original tree in certain cases where a construct has been
12841         factored out and replaced by a reference to a temporary.
12843 2014-02-06  Ed Schonberg  <schonberg@adacore.com>
12845         * sem_ch3.adb (Process_Full_View): Fix typo in the order of
12846         parameters when propagating predicate function to full view.
12847         (Find_Type_Of_Object): Freeze base type of object type to catch
12848         premature use of discriminated private type without a full view.
12850 2014-02-06  Robert Dewar  <dewar@adacore.com>
12852         * sprint.adb: Minor reformatting.
12854 2014-02-06  Hristian Kirtchev  <kirtchev@adacore.com>
12856         * exp_ch4.adb (Process_Transient_Object): Add local variable
12857         Temp_Ins. When the transient object is initialized by an
12858         aggregate, the hook must capture the object after the last
12859         component assignment takes place.
12860         * exp_ch7.adb (Detect_Subprogram_Call): Expose the subprogram to
12861         routine Is_Subprogram_Call.
12862         (Is_Subprogram_Call): Inspect an
12863         aggregate that has been heavily expanded for subprogram calls.
12864         (Process_Transient_Objects): Add local variables Expr, Ptr_Id
12865         and Temp_Ins.  Remove the nested declare block and adjust the
12866         indentation. When the transient object is initialized by an
12867         aggregate, the hook must capture the object after the last
12868         component assignment takes place.
12870 2014-02-06  Hristian Kirtchev  <kirtchev@adacore.com>
12872         * sem_prag.adb (Analyze_Global_Item): Detect illegal uses of
12873         external states with enabled properties that do not match the
12874         global mode.
12875         (Property_Error): New routine.
12876         * sem_res.adb (Property_Error): New routine.
12877         (Resolve_Actuals): Detect illegal uses of external variables with
12878         enabled properties in procedure calls that do not match the mode of
12879         the corresponding formal parameter.
12881 2014-02-06  Hristian Kirtchev  <kirtchev@adacore.com>
12883         * sem_util.adb (Has_Enabled_Property): Rename
12884         formal parameter Prop_Nam to Property. Update the comment on usage
12885         and all occurrences in the body. Add local variable Prop_Nam. When
12886         inspecting a property with an expression, the property name
12887         appears as the first choice of the component association.
12889 2014-02-04  Robert Dewar  <dewar@adacore.com>
12891         * exp_ch5.adb, einfo.ads, freeze.adb, sem_ch8.adb: Minor reformatting.
12893 2014-02-04  Gary Dismukes  <dismukes@adacore.com>
12895         * sem_aggr.adb: Change "runtime" to "run time" in warning message,
12896         for consistency with other messages.
12898 2014-02-04  Ed Schonberg  <schonberg@adacore.com>
12900         * exp_ch5.adb  (Expand_Iterator_Loop):  For a container element
12901         iterator, indicate that the element is a constant if the container
12902         type does not have a variable indexing aspect.
12903         * sem_ch8.adb (Analyze_Object_Renaming): If the entity is already
12904         marked as constant, do not reset its Ekind, to ensure that
12905         container elements in an element loop are not modified if the
12906         container (e.g. a hashed set) only has a constant indexing aspect.
12908 2014-02-04  Arnaud Charlet  <charlet@adacore.com>
12910         * g-souinf.ads: Subprograms in this unit are actually not pure.
12911         * freeze.adb (Freeze_Subprogram): Do not reset Is_Pure for Intrinsics.
12912         * einfo.ads (Is_Pure): Update doc to match implementation.
12914 2014-02-04  Gary Dismukes  <dismukes@adacore.com>
12916         * exp_ch13.adb: Minor spelling fix.
12918 2014-02-04  Robert Dewar  <dewar@adacore.com>
12920         * opt.ads: Minor comment update.
12922 2014-02-04  Robert Dewar  <dewar@adacore.com>
12924         * exp_ch4.adb (Expand_N_Expression_With_Actions): Use Rewrite
12925         instead of Replace.
12927 2014-02-04  Ed Schonberg  <schonberg@adacore.com>
12929         * sem_aggr.adb (Resolve_Array_Aggregate): Suppress warnings
12930         on null expressions if component type is non-null, when the
12931         corresponding association covers an empty range of index values.
12933 2014-02-04  Robert Dewar  <dewar@adacore.com>
12935         * sinfo.ads: Further comments on N_Expression_With_Actions node.
12937 2014-02-04  Hristian Kirtchev  <kirtchev@adacore.com>
12939         * sem_prag.adb (Analyze_Refined_Depends_In_Decl_Part): Remove global
12940         variables Out_Items and Ref_Global. Remove local constant
12941         Body_Id along with dummy variables D1, D2, D3, D4, D5, D6, D7
12942         and D8. Remove the useless collection of global items as this
12943         was a leftover from an earlier version of the routine. Move
12944         several routines out to avoid deep nesting and indentation.
12945         (Inputs_Match): Add formal parameter Dep_Clause. Rename formal
12946         parameter Do_Checks to Post_Errors. Update the comment on usage.
12947         (Is_Matching_Input): Renamed to Input_Match. Add formal parameters
12948         Ref_Inputs and Do_Checks. Rename formal parameter Do_Checks
12949         to Post_Errors. Update the comment on usage. Account for the
12950         case where a self referential state may have a null input_list.
12951         (Is_Self_Referential): New routine.
12953 2014-02-04  Ed Schonberg  <schonberg@adacore.com>
12955         * sem_ch13.adb (Analyze_Attribute_Definition_Clause): If the
12956         entity renames an expression, as in the case of an object of
12957         an unconstrained type initialized by a function call, defer the
12958         rewriting of the expression to the expander.
12959         * exp_ch13.adb (Expand_N_Attribute_Definition_Clause, case
12960         'Alignment): If the entity renames an expression, introduce
12961         temporary to capture value, and rewrite original declaration to
12962         use temporary.
12964 2014-02-04  Gary Dismukes  <dismukes@adacore.com>
12966         * g-comlin.adb: Minor typo fix.
12968 2014-02-04  Ed Schonberg  <schonberg@adacore.com>
12970         * freeze.adb (Freeze_All): Types derived from a formal
12971         access_to_classwide type do not have a finalization master.
12973 2014-02-04  Robert Dewar  <dewar@adacore.com>
12975         * sprint.adb: Minor reformatting.
12977 2014-02-04  Robert Dewar  <dewar@adacore.com>
12979         * exp_ch4.adb (Expand_N_Expression_With_Actions): Eliminate
12980         cases where Actions is a null list.
12981         * sinfo.ads (N_Expression_With_Actions): Actions can be
12982         temporarily empty during semantic analysis, but must be non-empty
12983         in the final expanded tree.
12985 2014-01-31  Robert Dewar  <dewar@adacore.com>
12987         * exp_ch9.adb: Minor reformatting.
12989 2014-01-31  Emmanuel Briot  <briot@adacore.com>
12991         * g-comlin.adb (Set_Command_Line): Take the switches
12992         configuration from the Command_Line_Config.
12994 2014-01-31  Hristian Kirtchev  <kirtchev@adacore.com>
12996         * sem_prag.adb (Analyze_Refinement_Clause): Guard against a malformed
12997         refinement clause.
12999 2014-01-31  Vincent Celier  <celier@adacore.com>
13001         * projects.texi: Add more documentation about others used as an
13002         index in indexed attributes.
13004 2014-01-31  Robert Dewar  <dewar@adacore.com>
13006         * gnat_ugn.texi: Minor update.
13007         * gnat_rm.texi: Add example to Restriction_Warnings documentation.
13008         * exp_util.adb: Minor reformatting.
13010 2014-01-31  Ed Schonberg  <schonberg@adacore.com>
13012         * exp_ch9.adb (Expand_Entry_Barrier): Warn if the barrier
13013         depends on data that is not private to the protected object,
13014         and potentially modifiable in unsynchronized fashion.
13016 2014-01-31  Yannick Moy  <moy@adacore.com>
13018         * erroutc.adb (Validate_Specific_Warnings): Remove special case for
13019         GNATprove_Mode.
13021 2014-01-31  Robert Dewar  <dewar@adacore.com>
13023         * prj-attr.ads (First_Attribute_Of): Returns Empty_Attribute
13024         for Unknown_Package.
13025         * sem_ch6.adb, sem_attr.adb: Minor comment addition.
13027 2014-01-31  Hristian Kirtchev  <kirtchev@adacore.com>
13029         * exp_util.adb (Build_Allocate_Deallocate_Proc): Rewrite
13030         the logic that generates a runtime check to determine the
13031         controlled status of the object about to be allocated or
13032         deallocated. Class-wide types now always use a runtime check
13033         even if they appear as generic actuals.
13034         (Find_Object): Detect
13035         a special case that involves interface class-wide types because
13036         the object appears as a complex expression.
13038 2014-01-31  Ed Schonberg  <schonberg@adacore.com>
13040         * sem_ch6.adb (Process_Formals): In Ada2012 mode, place
13041         subprogram with an incomplete untagged formals on the list of
13042         private dependents, to verify that the type is properly completed
13043         in the private part.
13044         * sem_attr.adb: Code clean up.
13046 2014-01-31  Robert Dewar  <dewar@adacore.com>
13048         * exp_ch6.adb: Minor reformatting.
13050 2014-01-31  Vincent Celier  <celier@adacore.com>
13052         * prj-attr.adb (First_Attribute_Of): Return Unknown_Attribute
13053         when Pkg is unknown.
13055 2014-01-31  Hristian Kirtchev  <kirtchev@adacore.com>
13057         * sem_res.adb (Resolve_Entity_Name): Comment
13058         reformatting. Allow volatile objects in various generated checks.
13060 2014-01-31  Ed Schonberg  <schonberg@adacore.com>
13062         * sem_attr.adb (Analyze_Attribute, case 'Update): For a record
13063         component association, set the etype of the identifier, for
13064         SPARK use.
13066 2014-01-31  Ed Schonberg  <schonberg@adacore.com>
13068         * exp_ch6.adb (Has_Visibility_Of_Subprogram): If type is not
13069         declared in a package, not checks can apply to the subprogram.
13071 2014-01-31  Robert Dewar  <dewar@adacore.com>
13073         * erroutc.adb (Validate_Specific_Warnings): Warnings are
13074         controlled -gnatw.W.
13075         * gnat_ugn.texi: Document new warnings controlled by -gnatw.w.
13076         * opt.ads (Warn_On_Warnings_Off): Now controls more cases.
13078 2014-01-31  Arnaud Charlet  <charlet@adacore.com>
13080         * exp_disp.adb: Update comments.
13082 2014-01-31  Yannick Moy  <moy@adacore.com>
13084         * sem_ch12.adb (Analyze_Generic_Subprogram_Declaration,
13085         Save_Global_References): Guard access to expression in aspect.
13087 2014-01-31  Yannick Moy  <moy@adacore.com>
13089         * sem_prag.adb (Analyze_Pragma/Pragma_SPARK_Mode):
13090         Issue an error when the pragma is applied to a generic unit,
13091         a generic declaration, or inside a generic.
13093 2014-01-31  Yannick Moy  <moy@adacore.com>
13095         * sem_ch8.adb (Analyze_Subprogram_Renaming): Set SPARK_Mode on renaming
13096         entity.
13098 2014-01-31  Robert Dewar  <dewar@adacore.com>
13100         * exp_ch9.adb, s-tassta.adb, s-tposen.adb, s-tposen.ads: Minor
13101         reformatting.
13103 2014-01-31  Tristan Gingold  <gingold@adacore.com>
13105         * exp_disp.adb: Add a historic note.
13107 2014-01-31  Robert Dewar  <dewar@adacore.com>
13109         * sem_warn.adb (Warn_On_Useless_Assignments): Add call to
13110         Process_Deferred_References.
13112 2014-01-31  Yannick Moy  <moy@adacore.com>
13114         * erroutc.adb (Validate_Specific_Warnings): Do not issue a message for
13115         ineffective pragma Warnings(Off) in GNATprove_Mode.
13117 2014-01-31  Bob Duff  <duff@adacore.com>
13119         * s-taskin.ads: Minor comment fix.
13120         * s-tassta.adb (Abort_Dependents): Don't abort all dependents;
13121         just direct dependents. If this is actually an abort, each task
13122         will take care of aborting its dependents, so all dependents will
13123         get aborted, as before. However, when this is called the second
13124         time from Vulnerable_Complete_Master "for convenience" (i.e. to
13125         kill off tasks waiting at terminate alternatives), aborting
13126         indirect dependents is wrong, because it causes some unrelated
13127         tasks to get aborted.
13129 2014-01-31  Robert Dewar  <dewar@adacore.com>
13131         * sem_ch4.adb: Minor reformatting.
13133 2014-01-31  Robert Dewar  <dewar@adacore.com>
13135         * exp_ch2.adb: New calling sequence for Is_LHS.
13136         * frontend.adb: Add call to Process_Deferred_References.
13137         * lib-xref.ads, lib-xref.adb (Process_Deferred_References): New.
13138         (Deferred_References): New table.
13139         * sem_ch8.adb (Find_Direct_Name): Make deferred reference table
13140         entries.
13141         (Find_Expanded_Name): Ditto.
13142         * sem_res.adb: New calling sequence for Is_LHS.
13143         * sem_util.ads, sem_util.adb (Is_LHS): New calling sequence.
13144         * sem_warn.adb: Call Process_Deferred_References before issuing
13145         warnings.
13147 2014-01-31  Tristan Gingold  <gingold@adacore.com>
13149         * exp_util.adb (Corresponding_Runtime_Package): Restrict the
13150         use of System_Tasking_Protected_Objects_Single_Entry.
13151         * exp_ch9.adb (Build_Simple_Entry_Call): Remove Mode parameter
13152         of Protected_Single_Entry_Call.
13153         (Expand_N_Timed_Entry_Call): Remove single_entry case.
13154         * exp_disp.adb (Make_Disp_Asynchronous_Select_Body): Remove
13155         single_entry case.
13156         (Make_Disp_Timed_Select_Body): Likewise.
13157         * rtsfind.ads (RE_Timed_Protected_Single_Entry_Call): Remove.
13158         * s-tposen.adb (Send_Program_Error, PO_Do_Or_Queue): Remove
13159         Self_Id parameter.
13160         (Wakeup_Entry_Caller): Remove Self_ID and New_State parameters.
13161         (Wait_For_Completion_With_Timeout): Remove.
13162         (Protected_Single_Entry_Call): Remove Mode parameter
13163         (always Simple_Call).
13164         (Service_Entry): Remove Self_Id constant (not used anymore).
13165         (Timed_Protected_Single_Entry_Call): Remove.
13166         * s-tposen.ads (Timed_Protected_Single_Entry_Call): Remove.
13167         (Protected_Single_Entry_Call): Remove Mode parameter.
13169 2014-01-29  Hristian Kirtchev  <kirtchev@adacore.com>
13171         * einfo.adb (Get_Pragma): Handle the retrieval of pragma Refined_Post.
13172         * einfo.ads (Get_Pragma): Update the comment on special pragmas
13173         handled by this routine.
13174         * sem_prag.adb (Analyze_Pragma): Add a legal pragma Refined_Post
13175         to the contract of the related subprogram body.
13176         * sem_util.adb (Add_Contract_Item): Handle the insertion of
13177         pragma Refined_Post into the contract of a subprogram body.
13178         * sinfo.ads Update the documentation of node N_Contract.
13179         * sem_res.adb (Resolve_Entity_Name): Add a guard
13180         to detect abstract states and variables only when checking the
13181         SPARK 2014 rules concerning volatile object placement.
13183 2014-01-29  Ed Schonberg  <schonberg@adacore.com>
13185         * sem_ch4.adb (Find_Equality_Types, Try_One_Interp): within an instance,
13186         null is compatible with any access type.
13188 2014-01-29  Hristian Kirtchev  <kirtchev@adacore.com>
13190         * sem_util.adb (Find_Placement_In_State_Space): Assume that the default
13191         placement is not in a package.
13193 2014-01-29  Hristian Kirtchev  <kirtchev@adacore.com>
13195         * sem_util.adb (Has_Enabled_Property): Compare the character field of
13196         the sole property.
13198 2014-01-29  Robert Dewar  <dewar@adacore.com>
13200         * sem_intr.adb, a-ztexio.ads, sinfo.ads, sem_res.adb, gnatlink.adb,
13201         vms_conv.adb, a-except.ads, a-except-2005.ads, a-teioed.adb,
13202         sem_warn.ads, treepr.ads, erroutc.ads, a-excach.adb: Minor reformatting.
13204 2014-01-29  Robert Dewar  <dewar@adacore.com>
13206         * sem_util.ads, sem_util.adb (In_Pragma_Expression): New function.
13207         * sem_warn.adb (Check_References): Suppress warnings if inside
13208         Initial_Condition pragma.
13210 2014-01-29  Hristian Kirtchev  <kirtchev@adacore.com>
13212         * sem_prag.adb (Check_Missing_Part_Of): List all values of
13213         State_Space_Kind for readability reasons. Do not emit an error on
13214         a private item when the enclosing package lacks aspect/pragma
13215         Abstract_State. Do not emit an error on a private package
13216         instantiation when the corresponding generic template lacks
13217         visible state.
13218         (Has_Visible_State): New routine.
13219         * sem_util.adb (Find_Placement_In_State_Space): The visible
13220         declarations of any kind of child units in general act as proper
13221         placement location.
13223 2014-01-29  Robert Dewar  <dewar@adacore.com>
13225         * a-except-2005.adb, a-except.adb, a-excpol-abort.adb, a-exstat.adb,
13226         ali.adb, a-numaux.ads, a-numaux-darwin.ads, a-numaux-libc-x86.ads,
13227         a-numaux-vms.ads, a-numaux-vxworks.ads, a-numaux-x86.ads, aspects.ads,
13228         a-taside.adb, a-teioed.adb, a-textio.adb, a-textio.ads, atree.adb,
13229         atree.ads, a-witeio.adb, a-witeio.ads, a-wtedit.adb, a-ztedit.adb,
13230         a-ztexio.adb, bcheck.adb, binde.adb, checks.adb, comperr.adb,
13231         cstand.adb, debug_a.adb, einfo.ads, errout.adb, erroutc.adb,
13232         eval_fat.adb, exp_aggr.adb, exp_attr.adb, exp_ch11.adb, exp_ch3.adb,
13233         exp_ch4.adb, exp_ch5.adb, exp_ch6.adb, exp_ch9.adb, exp_dbug.adb,
13234         exp_disp.adb, exp_fixd.adb, exp_imgv.adb, exp_intr.adb, exp_util.adb,
13235         freeze.adb, frontend.adb, g-comlin.ads, g-mbdira.adb, gnat1drv.adb,
13236         gprep.adb, g-spipat.adb, i-cpp.ads, i-vxwork.ads, i-vxwork-x86.ads,
13237         krunch.ads, layout.adb, lib-load.adb, lib-writ.adb, lib-writ.ads,
13238         live.adb, namet.ads, osint.adb, osint-c.adb, output.ads, par.adb,
13239         par-ch10.adb, par-ch13.adb, par-ch3.adb, par-ch4.adb, par-ch5.adb,
13240         par-ch6.adb, par-ch9.adb, par-endh.adb, par-labl.adb, par-prag.adb,
13241         par-sync.adb, par-tchk.adb, par-util.adb, prj.adb, repinfo.adb,
13242         rtsfind.adb, s-arit64.adb, s-asthan-vms-alpha.adb,
13243         s-asthan-vms-ia64.adb, s-bignum.adb, scans.adb, scng.adb, s-dimmks.ads,
13244         sem_aggr.adb, sem_attr.adb, sem_aux.adb, sem_cat.adb, sem_ch10.adb,
13245         sem_ch12.adb, sem_ch13.adb, sem_ch13.ads, sem_ch3.adb, sem_ch4.adb,
13246         sem_ch5.adb, sem_ch6.adb, sem_ch8.adb, sem_disp.adb, sem_elab.adb,
13247         sem_elim.adb, sem_eval.adb, sem_intr.adb, sem_prag.adb, sem_res.adb,
13248         sem_type.adb, sem_util.adb, sem_warn.adb, set_targ.adb, s-fatgen.adb,
13249         s-fatgen.ads, s-fileio.adb, s-imgcha.adb, s-imgrea.adb, sinfo.ads,
13250         sinput-c.adb, snames.ads-tmpl, s-os_lib.adb, sprint.adb,
13251         s-regpat.adb, s-secsta.adb, s-stalib.ads,
13252         s-stchop.adb, s-stoele.ads, stand.ads, s-taprop-solaris.adb,
13253         s-tasdeb-vms.adb, s-tasini.adb, s-tassta.adb, s-valdec.adb,
13254         s-valuti.adb, s-wchjis.adb, s-wchwts.adb, system.ads, system-vms_64.ads,
13255         system-vms-ia64.ads, treepr.adb, types.ads, uintp.adb, uname.adb,
13256         urealp.adb, usage.adb, vxaddr2line.adb: Minor reformatting.
13258 2014-01-29  Robert Dewar  <dewar@adacore.com>
13260         * expander.adb: Minor reformatting.
13262 2014-01-29  Javier Miranda  <miranda@adacore.com>
13264         * exp_ch3.adb (Predefined_Primitive_Bodies): Adding documentation to
13265         previous patch.
13267 2014-01-29  Javier Miranda  <miranda@adacore.com>
13269         * exp_ch3.adb (Predefined_Primitive_Bodies): Complete the code
13270         that checks if an interface types defines the predefined "="
13271         function because the compiler was erroneously not generating the
13272         predefined "=" primitive as soon as the name of some interface
13273         primitive is "=" (formals were not checked).
13275 2014-01-29  Ed Schonberg  <schonberg@adacore.com>
13277         * expander.adb (Expander): In GNATprove mode, do not process
13278         transient scopes: they are in general not created in this mode,
13279         and an attempt to examine them will lead to constraint errors when
13280         processing configuration pragmas that have analyzable expressions.
13282 2014-01-29  Vincent Celier  <celier@adacore.com>
13284         * clean.adb (Gnatclean): Fail if main project is an aggregate
13285         project or if there is an aggregate library project in the
13286         project tree.
13287         * gnatcmd.adb: Fail if the main project is an aggregate project
13288         or if there is an aggegate library project in the project tree.
13289         * make.adb (Initialize): : Fail if main project is an aggregate
13290         project or if there is an aggregate library project in the
13291         project tree.
13292         * makeutl.ads (Aggregate_Libraries_In): New Boolean function.
13293         * prj-makr.adb (Initialize): Fail if the main project is an
13294         aggregate project or an aggregate library project.
13296 2014-01-29  Vincent Celier  <celier@adacore.com>
13298         * prj-part.adb (Check_Import_Aggregate): New procedure
13299         to check if an imported project is an aggregate project.
13300         (Parse_Single_Project): Call Check_Import_Aggregate
13301         * projects.texi: Document that aggregate projects cannot be
13302         extended or imported.
13304 2014-01-29  Robert Dewar  <dewar@adacore.com>
13306         * exp_ch9.adb, sem_ch7.ads, s-regexp.adb, sem_ch13.adb: Minor
13307         reformatting and code clean up.
13308         * gnat_ugn.texi: Add documentation section on Atomic Variables
13309         and Optimization.
13311 2014-01-29  Hristian Kirtchev  <kirtchev@adacore.com>
13313         * einfo.adb Flag264 is now unused.
13314         (Has_Body_References): Removed.
13315         (Set_Has_Body_References): Removed.
13316         (Write_Entity_Flags): Remove the output for flag Has_Body_References.
13317         * einfo.ads Update the comment on usage of attribute
13318         Body_References. Remove attribute Has_Body_References and its
13319         usage in nodes.
13320         (Has_Body_References): Removed along with pragma Inline.
13321         (Set_Has_Body_References): Removed along with pragma Inline.
13322         * sem_prag.adb (Analyze_Global_Item): Move the call to
13323         Record_Possible_Body_Reference in the state related checks
13324         section. Add a comment intended function.
13325         (Analyze_Input_Output): Move the call to Record_Possible_Body_Reference
13326         in the state related checks section. Add a comment intended function.
13327         (Analyze_Refinement_Clause): Cleanup the illegal body reference
13328         reporting. Add a comment on timing of error reporting.
13329         (Record_Possible_Body_Reference): Reimplement the routine.
13331 2014-01-29  Vincent Celier  <celier@adacore.com>
13333         * makeutl.adb (Mains.Find_File_Add_Extension): Only look for specs for
13334         unit-based languages.
13335         (Mains.Complete_Mains.Do_Complete): Use the source file project
13336         tree when calling Find_File_Add_Extension. Use the correct
13337         project name when reporting an error.
13339 2014-01-29  Hristian Kirtchev  <kirtchev@adacore.com>
13341         * aspects.adb Add an entry for aspect Part_Of in table
13342         Canonical_Aspect.
13343         * aspects.ads Add an entry for aspect Part_Of in tables Aspect_Id,
13344         Aspect_Argument, Aspect_Names and Aspect_Delay.
13345         * atree.h Define Elist9.
13346         * atree.adb (Elist9): New routine.
13347         (Set_Elist9): New routine.
13348         * atree.ads (Elist9): New routine.
13349         (Set_Elist9): New routine.
13350         * einfo.adb Add Part_Of_Constituents and Encapsulating_State to
13351         the list of node usage.  Remove Refined_State from the list of
13352         node usage.
13353         (Encapsulating_State): New routine.
13354         (Get_Pragma):
13355         Handle pragma Part_Of; (Part_Of_Constituents): New routine.
13356         (Refined_State): Removed.
13357         (Set_Encapsulating_State): New routine.
13358         (Set_Part_Of_Constituents): New routine.
13359         (Set_Refined_State): Removed.
13360         (Write_Field9_Name): Add an entry
13361         for Part_Of_Constituents (Write_Field10_Name): Add an entry for
13362         Encapsulating_State. Remove the entry for Refined_State.
13363         * einfo.ads Add new attributes Encapsulating_State
13364         and Part_Of_Constituents alond with their usage in
13365         entities. Remove attribute Refined_State along with its
13366         usage in entities.
13367         (Encapsulating_State): New routine and
13368         pragma Inline.  (Get_Pragma): Update the comment on usage.
13369         (Part_Of_Constituents): New routine and pragma Inline.
13370         (Refined_State): Removed along with pragma Inline.
13371         (Set_Encapsulating_State): New routine and pragma Inline.
13372         (Set_Part_Of_Constituents): New routine and pragma Inline.
13373         (Set_Refined_State): Removed along with pragma Inline.
13374         * par-prag.adb Pragma Part_Of does not need any special processing
13375         by the parser.
13376         * sem_ch3.adb (Analyze_Declarations): Remove local variables
13377         Body_Id and Prag. Call separate routines to analyze the
13378         contract of a package [body].
13379         (Analyze_Object_Contract):
13380         Update the comment on usage. Remove local variables
13381         Items and Nam. Use Get_Pragma rather than traversing the
13382         classification list.  Verify whether the lack of indicator
13383         Part_Of agrees with the placement of the variable in state space.
13384         (Analyze_Object_Declaration): Initialize the encapsulating state
13385         of a variable.  (Requires_State_Refinement): Moved to sem_util.
13386         * sem_ch7.adb (Analyze_Package_Body_Contract): New routine.
13387         (Analyze_Package_Contract): New routine.
13388         * sem_ch7.ads (Analyze_Package_Body_Contract): New routine.
13389         (Analyze_Package_Contract): New routine.
13390         * sem_ch10.adb (Decorate_State): Initialize the encapsulating
13391         state and Part_Of constituents.
13392         * sem_ch13.adb (Analyze_Aspect_Specifications):
13393         Add processing for aspect Part_Of. Update all
13394         calls to Decorate_Delayed_Aspect_And_Pragma.
13395         (Check_Aspect_At_Freeze_Point): Aspect Part_Of does
13396         not need any special processing at freeze time.
13397         (Decorate_Delayed_Aspect_And_Pragma): Renamed to
13398         Decorate_Aspect_And_Pragma.  Add formal parameter Delayed and
13399         update the associated comment.
13400         * sem_prag.adb Add an entry for pragma Part_Of in table Sig_Flags.
13401         (Analyze_Abstract_State): Add new global variable State_Id. Remove
13402         local constants Errors and Loc. Remove local variables Is_Null
13403         and State_Nam. Create the entity of the abstract state on the
13404         spot, before all remaining checks are performed. Verify that a
13405         missing Part_Of option agrees with the placement of the abstract
13406         state within the state space.
13407         (Analyze_Depends_In_Decl_Part):
13408         Add new global variables Constits_Seen and States_Seen. Check
13409         that a state and a corresponding constituent do not appear
13410         in pragma [Refined_]Depends.
13411         (Analyze_Global_In_Decl_Part):
13412         Add new global variables Constits_Seen and States_Seen. Check
13413         that a state and a corresponding constituent do not appear
13414         in pragma [Refined_]Global.
13415         (Analyze_Global_Item):
13416         Remove the now obsolete code that deals with Part_Of.
13417         Add the entity of the global item to the list of processed
13418         items.  (Analyze_Initializes_In_Decl_Part): Add new global
13419         variables Constits_Seen and States_Seen. Check that a state
13420         and a corresponding constituent do not appear in pragma
13421         Initializes.
13422         (Analyze_Initialization_Item): Add the entity
13423         of the initialization item to the list of processed items.
13424         (Analyze_Input_Item): Add the entity of the initialization
13425         item to the list of processed items.
13426         (Analyze_Input_Output):
13427         Remove the now obsolete code that deals with Part_Of.  Add the
13428         entity of the input/output to the list of processed items.
13429         (Analyze_Part_Of): New routine.
13430         (Analyze_Part_Of_Option): Remove
13431         local constant Par_State. Add local constant Encaps and local
13432         variables Encaps_Id and Legal. Use Analyze_Part of to analyze
13433         the option. Turn the related state into a Part_Of constituent
13434         if the option is legal.
13435         (Analyze_Pragma): Add processing
13436         for pragma Part_Of.
13437         (Analyze_Refined_State_In_Decl_Part):
13438         Remove global constants Pack_Body and Spec_Id. Remove
13439         global variables Abstr_States and Hidden_States. Add new
13440         global variables Available_States, Body_Id, Body_States and
13441         Spec_Id. Add new local constant Body_Decl. Reimplement the
13442         logic that extracts the states available for refinement from
13443         the related package and the body hidden states of the said
13444         package.
13445         (Analyze_Refinement_Clause): Add local variable Part_Of_Constits.
13446         (Check_Applicable_Policy): Alphabetize body.
13447         (Check_Dependency_Clause): Replace Refined_State
13448         with Encapsulating_State.
13449         (Check_Matching_Constituent):
13450         Reimplement the logic that determines whether an item is a valid
13451         / invalid constituent of the current refined state. Return when
13452         a construct does not denote a valid abstract state. Extract the
13453         list of Part_Of constituents for further analysis. Check that all
13454         Part_Of constituents of a state have been used in its refinement.
13455         (Check_Matching_State): Update the comment on usage. Operate
13456         on the list of available states.
13457         (Check_Missing_Part_Of): New routine.
13458         (Check_Refined_Global_Item): Replace Refined_State
13459         with Encapsulating_State.
13460         (Check_State_And_Constituent_Use): New routine.
13461         (Create_Abstract_State): New routine.
13462         (Is_Matching_Input): Replace Refined_State with Encapsulating_State.
13463         (Is_Part_Of): Removed.
13464         (Collect_Body_States): New routine.
13465         (Collect_Constituent): Replace Refined_State with Encapsulating_State.
13466         (Collect_Hidden_States): Removed.
13467         (Report_Unrefined_States): Change the profile of the procedure along
13468         with the comment on usage.
13469         (Report_Unused_Constituents): New routine.
13470         (Report_Unused_Hidden_States): Removed.
13471         (Report_Unused_States): New routine.
13472         * sem_prag.ads (Check_Missing_Part_Of): New routine.
13473         * sem_util.adb (Add_Contract_Item): Pragma Part_Of can now
13474         appear in the classification pragmas of a package instantiation
13475         or a variable.
13476         (Find_Placement_In_State_Space): New routine.
13477         (Is_Child): Removed.
13478         (Is_Child_Or_Sibling): Remove formal
13479         parameter Private_Child. Remove the private child checks.
13480         (Requires_State_Refinement): Moved from sem_ch3.
13481         * sem_util.ads Add new type State_Space_Kind along with
13482         comment on its usage and values.
13483         (Add_Contract_Item): Update the comment on usage.
13484         (Find_Body_Discriminal): Alphabetize spec.
13485         (Find_Placement_In_State_Space): New routine.
13486         (Is_Child_Or_Sibling): Remove formal parameter Private_Child
13487         and update the comment on usage.
13488         (Requires_State_Refinement): Moved from sem_ch3.
13489         * sinfo.ads: Update the documentation of N_Contract.
13490         * snames.ads-tmpl The predefined name for Part_Of is now used
13491         to denote a pragma. Add Pragma_Id for Part_Of.
13493 2014-01-29  Emmanuel Briot  <briot@adacore.com>
13495         * s-regexp.adb (Create_Secondary_Table): Automatically grow the state
13496         machine as needed.
13497         (Dump): New subprogram.
13499 2014-01-29  Tristan Gingold  <gingold@adacore.com>
13501         * exp_ch9.adb (Expand_N_Protected_Type_Declaration): Add
13502         Expand_Entry_Declaration to factorize code.
13504 2014-01-29  Ed Schonberg  <schonberg@adacore.com>
13506         * checks.adb: minor clarification.
13507         * sem_ch7.adb (Declare_Inherited_Private_Subprograms): Limit
13508         search for primitive operations to the entities that immediately
13509         follow the type declaration.
13511 2014-01-29  Tristan Gingold  <gingold@adacore.com>
13513         * exp_ch9.adb (Build_Protected_Entry): Do not call
13514         Complete_Entry_Body anymore.
13515         * rtsfind.ads (RE_Complete_Single_Entry_Body): Remove.
13516         * s-tposen.ads, s-tposen.adb (Complete_Single_Entry_Body): Remove.
13518 2014-01-29  Pierre-Marie Derodat  <derodat@adacore.com>
13520         * s-os_lib.adb, s-os_lib.ads (Normalize_Pathname): Return an empty
13521         string when the Name input bigger than allowed. Adapt the function
13522         specification.
13524 2014-01-29  Ed Schonberg  <schonberg@adacore.com>
13526         * checks.adb (Install_Null_Excluding_Check): Do not emit warning
13527         if expression is within a case_expression of if_expression.
13529 2014-01-29  Robert Dewar  <dewar@adacore.com>
13531         * exp_ch9.adb, inline.ads: Minor reformatting.
13533 2014-01-29  Tristan Gingold  <gingold@adacore.com>
13535         * exp_ch9.adb (Is_Exception_Safe): Return true if no exceptions.
13537 2014-01-29  Yannick Moy  <moy@adacore.com>
13539         * inline.ads (Pending_Body_Info): Add SPARK_Mode and
13540         SPARK_Mode_Pragma components to be able to analyze generic
13541         instance.
13542         * sem_ch12.adb (Analyze_Package_Instantiation,
13543         Inline_Instance_Body, Need_Subprogram_Instance_Body,
13544         Load_Parent_Of_Generic): Pass in SPARK_Mode from instantiation
13545         for future analysis of the instance.
13546         (Instantiate_Package_Body,
13547         Instantiate_Subprogram_Body, Set_Instance_Inv): Set SPARK_Mode
13548         from instantiation to analyze the instance.
13550 2014-01-29  Robert Dewar  <dewar@adacore.com>
13552         * sem_ch7.adb, sem_prag.adb, sem_ch4.adb, sem_ch6.adb: Minor code
13553         reorganization.
13555 2014-01-29  Yannick Moy  <moy@adacore.com>
13557         * gnat_rm.texi: Update description of SPARK_Mode pragma.
13559 2014-01-29  Tristan Gingold  <gingold@adacore.com>
13561         * exp_ch9.adb (Expand_N_Protected_Body): Remove Num_Entries.
13563 2014-01-29  Thomas Quinot  <quinot@adacore.com>
13565         * sem_ch4.adb (Find_Component_In_Instance): Update comment.
13567 2014-01-29  Ed Schonberg  <schonberg@adacore.com>
13569         * exp_util.adb (Build_Task_Image_Prefix): Indicate that the
13570         resulting string is an internal entity. and thus requires no
13571         initialization. This is relevant when Initialize_ Scalars is
13572         enabled, because the resultant spurious initialization may lead to
13573         secondary stack anomalies that produce a mangled name for a task.
13575 2014-01-29  Yannick Moy  <moy@adacore.com>
13577         * sem_ch6.adb (Analyze_Subprogram_Body_Helper): SPARK_Mode
13578         not inherited from spec anymore. Check consistency
13579         rules after processing of declarations.
13580         * sem_ch7.adb (Analyze_Package_Body_Helper): SPARK_Mode not inherited
13581         from spec anymore. Check consistency rules after processing of
13582         declarations.
13583         (Analyze_Package_Declaration): Set SPARK_Mode only for non-generic
13584         packages.
13585         * sem_prag.adb (Analyze_Pragma/Pragma_SPARK_Mode): Implement new
13586         consistency rules.
13588 2014-01-27  Robert Dewar  <dewar@adacore.com>
13590         * sem_res.adb (Resolve_Comparison_Op): Add type name/location
13591         to unordered msg.
13592         (Resolve_Range): Add type name/location to unordered msg.
13594 2014-01-27  Claire Dross  <dross@adacore.com>
13596         * a-cofove.adb/s (Copy): Add precondition so that Copy (Source,
13597         Capacity) is only called with Capacity >= Length (Source) and
13598         Capacity in Capacity_Range.
13599         * a-cfdlli.adb/s, a-cfhase.adb/s, a-cfhama.adb/s, a-cforse.adb/s,
13600         a-cforma.adb/s (Copy): Add precondition so that Copy (Source, Capacity)
13601         is only called with Capacity >= Source.Capacity. Raise Capacity_Error
13602         in the code is this is not the case.
13604 2014-01-27  Thomas Quinot  <quinot@adacore.com>
13606         * sem_ch4.adb (Analyze_Selected_Component): Fix handling of
13607         selected component in an instance where the component of the
13608         actual is not visibile at instantiation.
13610 2014-01-27  Ed Schonberg  <schonberg@adacore.com>
13612         * sem_ch6.adb: sem_ch6.adb (Set_Actual_Subtypes): If the type
13613         has a dynamic predicate, generate freeze node for Actual_Subtype
13614         at once, because the declaration of the corresponding predicate
13615         function will make reference to it.
13617 2014-01-27  Tristan Gingold  <gingold@adacore.com>
13619         * exp_ch7.adb, exp_ch9.adb: Adjust comments.
13621 2014-01-27  Robert Dewar  <dewar@adacore.com>
13623         * exp_ch4.adb (Expand_N_Op_Expon): Remove unsigned type test
13624         for 2**X optimization.
13626 2014-01-27  Ed Schonberg  <schonberg@adacore.com>
13628         * a-suenst.adb: strings.utf_encoding.strings (Decode): Check
13629         explicitly whether value is in range of Character, because the
13630         library is typically compiled with range checks disabled, and
13631         we cannot rely on the implicit check on the argument of 'Val.
13633 2014-01-27  Vincent Celier  <celier@adacore.com>
13635         * a-ciorma.adb, a-cihama.adb (Assign): Copy the Source to the Target,
13636         not the Target to itself.
13638 2014-01-27  Robert Dewar  <dewar@adacore.com>
13640         * vms_conv.ads, ali.adb, sem_ch6.ads, opt.ads, vms_cmds.ads: Minor
13641         changes to avoid incorrect use of unordered enum types.
13643 2014-01-27  Thomas Quinot  <quinot@adacore.com>
13645         * sem_ch4.adb: Minor reformatting.
13647 2014-01-27  Robert Dewar  <dewar@adacore.com>
13649         * scn.adb (Check_End_Of_Line): Removed.
13650         (Error_Long_Line): Removed.
13651         (Determine_License): Use versions of above routines from Scanner.
13652         * scng.adb (Check_End_Of_Line): Moved to spec.
13653         (Error_Long_Line): Removed, no longer used.
13654         * scng.ads (Check_End_Of_Line): Moved here from body.
13656 2014-01-27  Tristan Gingold  <gingold@adacore.com>
13658         * exp_ch7.adb (Build_Cleanup_Statements): Call
13659         Build_Protected_Subprogram_Call_Cleanup to insert the cleanup
13660         for protected body.
13661         * exp_ch9.adb (Build_Protected_Subprogram_Body): Likewise.
13662          Remove Service_Name variable.
13663         (Build_Protected_SUbprogam_Call_Cleanup): New procedure that
13664         factorize code from the above subprograms.
13665         * exp_ch9.ads (Build_Protected_Subprogram_Call_Cleanup): New procedure.
13667 2014-01-27  Hristian Kirtchev  <kirtchev@adacore.com>
13669         * einfo.adb (Has_Option): Reimplemented.
13670         * sem_prag.adb (Analyze_Refinement_Clause): Add global
13671         variables AR_Constit, AW_Constit, ER_Constit, EW_Constit,
13672         External_Constit_Seen and State. Add local variables Body_Ref,
13673         Body_Ref_Elmt and Extra_State. Reimplement part of the logic to
13674         avoid a cumbersome while pool. Verify the legality of an external
13675         state and relevant properties.
13676         (Check_External_Property): New routine.
13677         (Check_Matching_State): Remove parameter profile
13678         and update comment on usage.
13679         (Collect_Constituent): Store the
13680         relevant external property of a constituent.
13681         * sem_util.adb (Async_Readers_Enabled): Update the call to
13682         Has_Enabled_Property.
13683         (Async_Writers_Enabled): Update the call to Has_Enabled_Property.
13684         (Effective_Reads_Enabled): Update the call to Has_Enabled_Property.
13685         (Effective_Writes_Enabled): Update the call to Has_Enabled_Property.
13686         (Has_Enabled_Property): Rename formal parameter Extern to State_Id.
13687         Update comment on usage. Reimplement the logic to recognize the various
13688         formats of properties.
13690 2014-01-27  Ed Schonberg  <schonberg@adacore.com>
13692         * par-ch5.adb: Minor reformatting.
13694 2014-01-27  Tristan Gingold  <gingold@adacore.com>
13696         * s-tposen.ads: Harmonize style and comments.
13698 2014-01-27  Vincent Celier  <celier@adacore.com>
13700         * projects.texi: Document that shared library projects, by
13701         default, cannot import projects that are not shared library
13702         projects.
13704 2014-01-27  Robert Dewar  <dewar@adacore.com>
13706         * sem_ch8.adb (Find_Selected_Component): Use Replace instead
13707         of Rewrite.
13709 2014-01-27  Ed Schonberg  <schonberg@adacore.com>
13711         * a-suenco.adb, a-suenst.adb (Decode): Raise encoding error if
13712         any other exception is raised.
13713         (Convert): If both Input_Scheme and Output_Scheme are UTF_8 it is
13714         still necessary to perform a conversion in order to remove overlong
13715         encodings.
13717 2014-01-27  Robert Dewar  <dewar@adacore.com>
13719         * exp_smem.adb: Minor reformatting.
13721 2014-01-27  Thomas Quinot  <quinot@adacore.com>
13723         * a-calfor.ads: Fix incorrect reference to operator "-" in comment.
13725 2014-01-27  Ed Schonberg  <schonberg@adacore.com>
13727         * sem_res.adb (Make_Call_Into_Operator): In ASIS mode, relocate
13728         nodes for operands to the original node for the call, to preserve
13729         Original_Node pointers within the resolved operands, given that
13730         they may have been rewritten as well. Previous approach copied
13731         the operands into a new tree and lost those pointers.
13733 2014-01-27  Claire Dross  <dross@adacore.com>
13736         * a-cofove.adb, a-cofove.ads: Add Strict_Equal function to the API.
13738 2014-01-27  Ed Schonberg  <schonberg@adacore.com>
13740         * sem_util.adb (Check_Internal_Protected_Use): A call through
13741         an anonymous access parameter of the current protected function
13742         is not a potential modification of the current object.
13744 2014-01-27  Ed Schonberg  <schonberg@adacore.com>
13746         * a-cobove.adb (Reserve_Capacity): Procedure raises
13747         Capacity_Error, not Constraint_Error, when request cannot be
13748         satisfied.
13750 2014-01-27  Vincent Celier  <celier@adacore.com>
13752         * a-coorma.adb, a-cohama.adb (Assign): Copy the Source to the Target,
13753         not the Target to itself.
13755 2014-01-27  Ed Schonberg  <schonberg@adacore.com>
13757         * exp_ch4.adb (Expand_Concatenate): If the target of the
13758         concatenation is a library-level entity, always use the off-line
13759         version of concatenation, regardless of optimization level. This
13760         is space-efficient, and prevents linking problems when some
13761         units are compiled with different optimization levels.
13763 2014-01-27  Ed Schonberg  <schonberg@adacore.com>
13765         * sem_ch5.adb: Code clean up.
13767 2014-01-27  Ed Schonberg  <schonberg@adacore.com>
13769         * par-ch5.adb (P_Iterator_Specification): Improve error recovery
13770         when an array or container iterator includes a subtype indication,
13771         which is only legal in an element iterator.
13773 2014-01-27  Thomas Quinot  <quinot@adacore.com>
13775         * exp_ch7.adb: Minor reformatting.
13777 2014-01-27  Robert Dewar  <dewar@adacore.com>
13779         * opt.adb (SPARK_Mode): Default for library units is None rather
13780         than Off.
13781         * opt.ads: Remove AUTO from SPARK_Mode_Type SPARK_Mode_Type is
13782         no longer ordered.
13783         * sem_prag.adb (Analyze_Pragma, case SPARK_Mode): Remove AUTO
13784         possibility.
13785         * snames.ads-tmpl (Name_Auto): Removed, no longer used.
13787 2014-01-27  Robert Dewar  <dewar@adacore.com>
13789         * par-ch5.adb (P_Sequence_Of_Statements): Make entry in
13790         Suspicious_Labels table if we have identifier; followed by loop
13791         or block.
13792         * par-endh.adb (Evaluate_End_Entry): Search Suspicious_Labels table.
13793         * par.adb (Suspicious_Labels): New table.
13795 2014-01-27  Robert Dewar  <dewar@adacore.com>
13797         * exp_aggr.adb (Check_Bounds): Reason is range check, not
13798         length check.
13800 2014-01-27  Yannick Moy  <moy@adacore.com>
13802         * get_spark_xrefs.adb (Get_SPARK_Xrefs): Accept new type 'c' for
13803         reference.
13804         * lib-xref-spark_specific.adb (Is_Global_Constant): Remove useless
13805         function now.
13806         (Add_SPARK_Xrefs): Include references to constants.
13807         * spark_xrefs.ads Document new character 'c' for references to
13808         constants.
13810 2014-01-27  Thomas Quinot  <quinot@adacore.com>
13812         * exp_smem.adb (Add_Write_After): For a function call, insert write as
13813         an after action in a transient scope.
13815 2014-01-27  Thomas Quinot  <quinot@adacore.com>
13817         * exp_smem.adb (Expand_Shared_Passive_Variable): For a reference
13818         to a shared variable as an OUT formal in a call to an init proc,
13819         the 'Read call must be emitted after, not before, the call.
13821 2014-01-27  Robert Dewar  <dewar@adacore.com>
13823         * gnat_rm.texi: Remove mention of AUTO mode for SPARK_Mode pragma.
13825 2014-01-27  Robert Dewar  <dewar@adacore.com>
13827         * a-wichha.adb (Character_Set_Version): Change to output proper
13828         value.
13830 2014-01-27  Hristian Kirtchev  <kirtchev@adacore.com>
13832         * einfo.adb (Is_Input_Only_State): Removed.
13833         (Is_Non_Volatile_State): Removed.
13834         (Is_Output_State): Removed.
13835         * einfo.ads (Is_Input_Only_State): Remove attribute and
13836         subprogram. Update related entity.
13837         (Is_Non_Volatile_State):
13838         Remove attribute and subprogram. Update related entity.
13839         (Is_Output_State): Removed attribute and subprogram. Update
13840         related entity.
13841         * exp_ch6.adb (Expand_Subprogram_Contract): Update comment on
13842         generated code.
13843         * sem_ch3.adb (Analyze_Declarations): Analyze the contract of
13844         an object, not just variables.
13845         (Analyze_Object_Contract): New routine.
13846         (Analyze_Variable_Contract): Removed.
13847         (Process_Discriminants): Detect an illegal use of volatile
13848         discriminant in SPARK mode.
13849         * sem_ch5.adb (Analyze_Iterator_Specification):
13850         Detect an illegal use of volatile loop variable.
13851         (Analyze_Loop_Parameter_Specification): Detect an illegal use
13852         of volatile loop variable.
13853         * sem_ch6.adb (Process_Formals): Update the volatile object
13854         detection. Detect an illegal formal of mode IN OUT or OUT in
13855         SPARK mode. Enhance the error messages with references.
13856         * sem_ch12.adb (Instantiate_Object): Update the volatile object
13857         detection. Enhance the error messages with references.
13858         * sem_prag.adb (Analyze_Abstract_State): Enhance the error
13859         messages with references.
13860         (Analyze_Contract_Case): Enhance the error messages with references.
13861         (Analyze_External_Property): Call Check_Duplicate_Property to process
13862         an external property.
13863         (Analyze_External_Property_In_Decl_Part): New routine.
13864         (Analyze_External_State_In_Decl_Part): Removed.
13865         (Analyze_Global_Item): Detect an illegal
13866         use of a volatile constant. Detect an illegal use
13867         of a variable with enabled Effective_Reads. Enhance
13868         the error messages with references. Remove obsolete
13869         checks concerning Input_Only and Output_Only states.
13870         (Analyze_Initialization_Item): Enhance the error messages
13871         with references.
13872         (Analyze_Initializes_In_Decl_Part): Do not
13873         collect the states and variables when the initialization list
13874         is null.
13875         (Analyze_Input_Item): Enhance the error messages with references.
13876         (Analyze_Input_Output): Enhance the error messages with references.
13877         (Analyze_Pragma): Enhance the error messages with references.
13878         (Analyze_Refinement_Clause): Code reformatting.
13879         (Analyze_Refined_Depends_In_Decl_Part):
13880         Rename global variable Global to Reg_Global and update all
13881         occurrences. Add local variables D7 and D8. Update the error
13882         messages with references. Update the call to Collect_Global_Items.
13883         (Analyze_Refined_Global_In_Decl_Part): Add local variables
13884         Has_Proof_In_State, Proof_In_Constits and Proof_In_Items. Update
13885         the call to Collect_Global_Items.  Account for a Proof_In state
13886         in null / useless refinement checks. Verify the coverage of
13887         Proof_In states.
13888         (Check_Dependency_Clause): Remove local variable
13889         Out_Constits. Remove the retrieval and removal of constituents
13890         for an Output_Only state. Remove the reporting of unused
13891         Output_Only state constituents.
13892         (Check_Duplicate_Mode): Enhance
13893         the error message with a reference.
13894         (Check_Duplicate_Property): New routine.
13895         (Check_Duplicate_Option): Enhance the error message with a reference.
13896         (Check_External_Properties): Enhance the error message with a reference.
13897         (Check_Function_Return): Enhance the error message with a reference.
13898         (Check_In_Out_States): Update
13899         comment on usage. Add a specialized error message for Proof_In
13900         constituents. Enhance the error message with a reference.
13901         (Check_Input_States): Update comment on usage. Account for
13902         possible Proof_In constituents. Enhance the error message
13903         with a areference.
13904         (Check_Matching_Constituent): Enhance the error message with a
13905         reference.
13906         (Check_Matching_State): Enchance the error message with a reference.
13907         (Check_Mode): Add local variable From_Global. Update the call to
13908         Find_Mode.  Emit more precise error messages concerning extra items
13909         (Check_Mode_Restriction_In_Enclosing_Context): Consider
13910         pragma Refined_Global.  Enhance the error message with a
13911         reference.
13912         (Check_Mode_Restriction_In_Function): Enhance the error message with
13913         a reference.
13914         (Check_Output_States): Update comment on usage. Add local variable
13915         Posted.  Account for possible Proof_In constituents. Produce a detailed
13916         list of missing constituents.
13917         (Check_Proof_In_States): New routine.
13918         (Check_Refined_Global_Item): Handle Proof_In
13919         constituents. Enchance the error message with a reference.
13920         (Collect_Global_Items): Add formal parameters Proof_In_Items
13921         and Has_Proof_In_State. Update the comment on usage. Account
13922         for Proof_In items.
13923         (Create_Or_Modify_Clause): Enchance
13924         the error message with a reference.
13925         (Find_Mode): Add
13926         formal parameter From_Global. Update the comment on usage.
13927         Detect when the mode is governed by pragma [Refined_]Global.
13928         (Output_Constituents): Removed.
13929         (Report_Extra_Constituents):
13930         Report extra Proof_In constituents.
13931         (Report_Unused_Constituents): Removed.
13932         (Usage_Error): Code reformatting. Enhance the error
13933         messages with reference.
13934         * sem_prag.ads (Analyze_External_Property_In_Decl_Part): New routine.
13935         (Analyze_External_State_In_Decl_Part): Removed.
13936         * sem_res.adb (Resolve_Actuals): Update the volatile object
13937         detection. Enhance the error message with a reference.
13938         (Resolve_Entity_Name): Update the volatile object
13939         detection. Enhance the error message with a reference.
13940         * sem_util.adb (Is_Refined_State): Add a guard to avoid a crash.
13941         (Is_SPARK_Volatile_Object): New routine.
13942         (Has_Volatile_Component): New routine.
13943         * sem_util.ads (Is_Delegate): Alphabetized.
13944         (Is_SPARK_Volatile_Object): New routine.
13945         (Has_Volatile_Component): New routine.
13946         * snames.ads-tmpl: Remove names Name_Input_Only and Name_Output_Only.
13948 2014-01-27  Ed Schonberg  <schonberg@adacore.com>
13950         * sem_attr.adb: Resolve fully prefix of 'Update.
13952 2014-01-27  Ben Brosgol  <brosgol@adacore.com>
13954         * gnat_rm.texi: Minor clarifications.
13956 2014-01-27  Robert Dewar  <dewar@adacore.com>
13958         * sem_elab.adb (Check_Internal_Call_Continue): Avoid complaining
13959         about call that is generated as part of an Initial_Condition
13960         check.
13961         * sem_prag.adb: Minor spelling correction.
13963 2014-01-27  Robert Dewar  <dewar@adacore.com>
13965         * sem_prag.adb (Set_Convention_From_Pragma): Check that
13966         convention Ghost can only apply to functions.
13967         * einfo.ads, einfo.adb (Is_Ghost_Subprogram): Add clarifying comment.
13969 2014-01-27  Robert Dewar  <dewar@adacore.com>
13971         * gnat_ugn.texi: Add Short_Enums to documentation of
13972         -gnatet/-gnateT.
13974 2014-01-27  Robert Dewar  <dewar@adacore.com>
13976         * sem_prag.adb (Analyze_Input_Item): Correct check for input
13977         item in same package.
13978         * sem_util.ads, sem_util.adb (Within_Scope): New function.
13980 2014-01-26  Arnaud Charlet  <charlet@adacore.com>
13982         * a-intnam-lynxos.ads, mlib-tgt-specific-lynxos.adb,
13983         s-osinte-lynxos-3.adb, s-osinte-lynxos-3.ads, s-osinte-lynxos.adb,
13984         s-osinte-lynxos.ads, s-taprop-lynxos.adb, s-tpopsp-lynxos.adb,
13985         system-lynxos-ppc.ads, system-lynxos-x86.ads: Removed, no longer
13986         maintained.
13988 2014-01-25  Eric Botcazou  <ebotcazou@adacore.com>
13990         * gcc-interface/Makefile.in: Fix oversight.
13992 2014-01-25  Eric Botcazou  <ebotcazou@adacore.com>
13994         * gcc-interface/utils.c (convert_to_fat_pointer): Un-obfuscate the
13995         conversion from a thin pointer with a shifted value.
13996         * gcc-interface/utils2.c (gnat_build_constructor): Propagate the
13997         read-only flag from the values onto the result.
13998         (gnat_invariant_expr): Accept read-only CONSTRUCTORs.
14000 2014-01-25  Tristan Gingold  <gingold@adacore.com>
14002         * gcc-interface/decl.c (gnat_to_gnu_entity): Always build a variable
14003         for E_Variable with a pragma Linker_Section.
14005 2014-01-25  Robert Dewar  <dewar@adacore.com>
14007         * gcc-interface/decl.c (gnat_to_gnu_param): Make sure an Out parameter
14008         with Default_Value aspect is passed in by copy.
14010 2014-01-24  Eric Botcazou  <ebotcazou@adacore.com>
14012         * set_targ.adb: Set Short_Enums.
14013         * gcc-interface/lang.opt (fshort-enums): New option.
14014         * gcc-interface/misc.c (gnat_handle_option): Handle it.
14015         (gnat_post_options): Do not modify the global settings.
14017 2014-01-24  Robert Dewar  <dewar@adacore.com>
14019         * g-rannum.ads, g-rannum.adb (Random_Ordinary_Fixed): New generic
14020         function.
14021         (Random_Decimal_Fixed): New generic function.
14022         * s-rannum.ads: Minor comment clarifications.
14024 2014-01-24  Robert Dewar  <dewar@adacore.com>
14026         * back_end.adb: Remove Short_Enums handling (handled in
14027         Ttypes/Get_Targ now) Minor added comments.
14028         * freeze.adb: Change name Short_Enums_On_Target to
14029         Target_Short_Enums.
14030         * get_targ.ads, get_targ.adb (Get_Short_Enums): New function.
14031         * opt.ads: Minor comment updates.
14032         * sem_ch13.adb: Change name Short_Enums_On_Target to
14033         Target_Short_Enums.
14034         * set_targ.adb: Set Short_Enums from gcc back end.
14035         * set_targ.ads (Short_Enums): New variable.
14036         * targparm.ads, targparm.adb: Remove Short_Enums entries (handled in
14037         Ttypes/Get_Targ now).
14038         * ttypes.ads (Target_Short_Enums): New constant boolean switch
14040 2014-01-24  Pascal Obry  <obry@adacore.com>
14042         * g-sercom-mingw.adb: Fix serial port name for port number > 10.
14044 2014-01-24  Gary Dismukes  <dismukes@adacore.com>
14046         * exp_disp.adb (Expand_Dispatching_Call): Call Unqualify on Param when
14047         comparing it with Ctrl_Arg, since Ctrl_Arg may have had qualification
14048         stripped off.
14050 2014-01-24  Robert Dewar  <dewar@adacore.com>
14052         * sinfo.ads, make.adb, prj-env.adb: Minor reformatting.
14054 2014-01-24  Vincent Celier  <celier@adacore.com>
14056         * prj.adb (Add_Aggregated_Project): Do not add a project in
14057         the list if it is already there.
14059 2014-01-24  Yannick Moy  <moy@adacore.com>
14061         * lib-xref-spark_specific.adb (Enclosing_Subprogram_Or_Package):
14062         Correct the search for a subrogram declaration to which a pragma is
14063         attached.
14065 2014-01-24  Bob Duff  <duff@adacore.com>
14067         * gnat_ugn.texi: Document --decimal-grouping and
14068         --based-grouping switches in gnatpp.
14070 2014-01-24  Ed Schonberg  <schonberg@adacore.com>
14072         * sinfo.ads: Documentation update.
14074 2014-01-24  Ed Schonberg  <schonberg@adacore.com>
14076         * sem_ch3.adb (Constant_Redeclaration): New declaration is
14077         illegal if previous one has an initial expression that is an
14078         aggregate expanded into assignments.
14080 2014-01-24  Ed Schonberg  <schonberg@adacore.com>
14082         * sem_ch5.adb (Analyze_Loop_Parameter_Specification): Small
14083         code reorganization to remove spurious warning on a loop with
14084         an array element iterator that has a null range.
14086 2014-01-24  Vincent Celier  <celier@adacore.com>
14088         * make.adb (Binding_Phase): When setting the Ada paths, use
14089         the library ALI dir, not the object dir in libraries.
14091 2014-01-24  Yannick Moy  <moy@adacore.com>
14093         * sinfo.ads: Add documentation of check flag fields.
14095 2014-01-24  Ed Schonberg  <schonberg@adacore.com>
14097         * sem_res.adb (Resolve_Actuals): If an actual is a view
14098         conversion of a discriminated object, and the formal type is
14099         discriminated and constrained, apply a discriminant check to
14100         the object itself.
14102 2014-01-24  Robert Dewar  <dewar@adacore.com>
14104         * prj.adb, prj-env.adb, back_end.adb: Add comment, minor code clean ups.
14106 2014-01-24  Ed Schonberg  <schonberg@adacore.com>
14108         * sem_ch3.adb (Analyze_Declarations): At the end of an
14109         appropriate declarative part, call Freeze_All from the first
14110         declaration in the scope, not from the first unfrozen one. This
14111         is necessary to apply visibility checks to entities with delayed
14112         aspects. Otherwise, in the presence of instantiations and cleanups
14113         that they may generate, the delayed aspects may be analyzed too
14114         late and produce spurious visibility errors.
14115         * sem_attr.adb: Place etype on range.
14116         * sem_ch6.adb: Documentation expression functions.
14118 2014-01-24  Robert Dewar  <dewar@adacore.com>
14120         * exp_ch7.adb: Minor change of Indices to Indexes (preferred
14121         terminology in compiler).
14123 2014-01-24  Robert Dewar  <dewar@adacore.com>
14125         * scans.ads: Remove Tok_Raise from Sterm, Eterm, After_SM
14126         categories, now that Ada 95 supports raise expressions.
14128 2014-01-24  Robert Dewar  <dewar@adacore.com>
14130         * freeze.adb (Freeze_Enumeration_Type): Use new target parameter
14131         Short_Enums_On_Target.
14132         * sem_ch13.adb (Set_Enum_Esize): Take Short_Enums_On_Target
14133         into account.
14134         * targparm.ads, targparm.adb: Add new target parameter Short_Enums.
14136 2014-01-24  Ed Schonberg  <schonberg@adacore.com>
14138         * sem_ch5.adb (Analyze_Iterator_Specification): If subtype
14139         indication is given explicity, check that it matches the array
14140         component type or the container element type of the domain
14141         of iteration.
14143 2014-01-24  Tristan Gingold  <gingold@adacore.com>
14145         * back_end.adb (Scan_Compiler_Arguments): Set Short_Enums_On_Target.
14146         * gcc-interface/misc.c (flag_short_enums): Declare.
14147         (gnat_post_options): Set it.
14149 2014-01-24  Vincent Celier  <celier@adacore.com>
14151         * prj-env.adb (Ada_Objects_Path): Use Ada_Objects_Path_No_Libs
14152         to cache the result when Including_Libraries is False.
14153         * prj-env.ads (Ada_Objects_Path): Update documentation
14154         * prj.adb (Free (Project_Id)): Also free Ada_Objects_Path_No_Libs
14155         (Get_Object_Directory): Return the Library_Ali_Dir only when
14156         when Including_Libraries is True.
14157         * prj.ads (Get_Object_Directory): Fix and complete documentation
14158         (Project_Data): New component Ada_Objects_Path_No_Libs
14160 2014-01-24  Robert Dewar  <dewar@adacore.com>
14162         * checks.adb (Expr_Known_Valid): Result of fpt operator never
14163         considered valid.
14165 2014-01-24  Eric Botcazou  <ebotcazou@adacore.com>
14167         * back_end.adb: Minor fix in comment.
14169 2014-01-24  Javier Miranda  <miranda@adacore.com>
14171         * sem_ch3.adb (Check_Abstract_Overriding): Code reestructuration
14172         required to report the error in case of task types.
14174 2014-01-24  Ed Schonberg  <schonberg@adacore.com>
14176         * sem_attr.adb: Additional index checking.
14178 2014-01-24  Ed Schonberg  <schonberg@adacore.com>
14180         * sem_attr.adb (Analyze_Attribute, case 'Update): Analyze
14181         expressions in each component association, and for records note
14182         the entity in each association choice, for subsequent resolution.
14183         (Resolve_Attribute, case 'Update): Complete resolution of
14184         expressions in each component association.
14186 2014-01-24  Robert Dewar  <dewar@adacore.com>
14188         * sem.adb (Sem): Avoid premature reference to Current_Sem_Unit
14189         (this was causing Is_Main_Unit_Or_Main_Unit_Spec to be set wrong,
14190         leading to wrong handling of SPARK_Mode for library units).
14192 2014-01-24  Robert Dewar  <dewar@adacore.com>
14194         * sem_ch6.adb (Analyze_Subprogram_Body_Helper): Set SPARK_Mode
14195         on generic instances (do not consider them to be internally
14196         generated)
14198 2014-01-24  Doug Rupp  <rupp@adacore.com>
14200         * s-osinte-android.ads (pthread_sigmask): Import sigprocmask
14201         vice pthread_sigmask.
14203 2014-01-24  Vincent Celier  <celier@adacore.com>
14205         * prj.adb (Debug_Output (Str, Str2)): Output if verbosity is
14206         not default.
14208 2014-01-24  Vincent Celier  <celier@adacore.com>
14210         * prj-ext.adb (Add): Do not output anything when Silent is True,
14211         whatever the verbosity. When Source is From_External_Attribute,
14212         set the corresponding environment variable if it is not already set.
14213         * prj-ext.ads (Add): New Boolean parameter Silent, defaulted
14214         to False
14215         * prj-proc.adb (Process_Expression_For_Associative_Array):
14216         For attribute External, call Prj.Ext.Add with Silent set to
14217         True for the child environment, to avoid useless output in non
14218         default verbosity.
14220 2014-01-24  Ed Schonberg  <schonberg@adacore.com>
14222         * sem_res.adb (Set_Slice_Subtype): Handle properly a discrete
14223         range given by a subtype indication, and force evaluation of
14224         the bounds, as for a simple range.
14225         * exp_util.adb (Evaluate_Slice_Bounds): Utility to force evaluation
14226         of bounds of slice for various kinds of discrete ranges.
14227         (Evaluate_Name, Evaluate_Subtype_From_Expr): use
14228         Evaluate_Slice_Bounds.
14230 2014-01-24  Bob Duff  <duff@adacore.com>
14232         * s-taskin.ads (Activator): Make this Atomic, because
14233         Activation_Is_Complete reads it, and that can be called
14234         from any task. Previously, this component was only
14235         modified by the activator before activation, and by
14236         Self after activation.
14237         * a-taside.ads, a-taside.adb (Environment_Task,
14238         Activation_Is_Complete): Implement these missing functions.
14240 2014-01-24  Doug Rupp  <rupp@adacore.com>
14242         * init.c: Add a handler section for Android.
14244 2014-01-24  Arnaud Charlet  <charlet@adacore.com>
14246         * i-cexten.ads (Unsigned_33..64, Unsigned_33..64): New types.
14248 2014-01-24  Ed Schonberg  <schonberg@adacore.com>
14250         * sem_ch4.adb (Operator_Check): If one operand is a
14251         Raise_Expression, set its type to that of the other operand.
14252         * sem_res.adb (Resolve_Raise_Expression): new procedure.
14253         (Resolve_Actuals): For an actual that is a Raise_Expression,
14254         set the type to that of the formal.
14255         * sem_type.adb (Find_Unique_Type): If one of the operands is a
14256         Raise_Expression, return type of the other operand.
14258 2014-01-24  Ed Schonberg  <schonberg@adacore.com>
14260         * sem_aggr.adb (Resolve_Record_Aggregate): If a scalar
14261         component of the record has a type with a default aspect, and
14262         the corresponding aggregate component is initiaized with a box,
14263         use the default value in the rewritten aggregate.
14265 2014-01-24  Tristan Gingold  <gingold@adacore.com>
14267         * s-interr.ads, s-interr.adb, s-interr-hwint.adb, s-interr-vms.adb,
14268         s-interr-sigaction.adb,
14269         s-interr-dummy.adb (Install_Restricted_Handlers): Add Prio parameter.
14270         * exp_ch9.adb (Make_Initialize_Protection): Add Prio parameter
14271         to the call to Install_Restricted_Handlers.
14273 2014-01-24  Emmanuel Briot  <briot@adacore.com>
14275         * prj-nmsc.adb (Check_File): Add protection when the source is
14276         not fully initialized.
14278 2014-01-24  Ed Schonberg  <schonberg@adacore.com>
14280         * sem_util.adb (Is_Post_State): In a postcondition, a selected
14281         component that denotes an implicit dereference is a reference
14282         to the post state of the subprogram.
14284 2014-01-24  Robert Dewar  <dewar@adacore.com>
14286         * sem_ch6.adb (Analyze_Subprogram_Body_Helper): SPARK_Mode OFF
14287         for generated subprograms.
14288         (Analyze_Subprogram_Specification): Ditto.
14290 2014-01-24  Vincent Celier  <celier@adacore.com>
14292         * prj-dect.adb (Check_Attribute_Allowed): Detect more forbidden
14293         attributes in package Builder of aggregate and aggregate library
14294         projects.
14295         * prj-nmsc.adb (Process_Naming_Scheme.Check.Check_Aggregate):
14296         Remove procedure (Process_Naming_Scheme.Check.Check_Aggregated):
14297         Remove parameters.  Change error message from "... externally
14298         build library ..." to "... externally built project ...".
14299         (Process_Naming_Scheme.Check): Do not do any check in aggregate
14300         project, as attribute Library_Dir and Library_Name have already
14301         been detected as forbidden.
14303 2014-01-24  Vincent Celier  <celier@adacore.com>
14305         * prj-env.adb (Find_Project): If cached project path is not in
14306         project directory, look in current directory first and use cached
14307         project path only if project is not found in project directory.
14309 2014-01-24  Robert Dewar  <dewar@adacore.com>
14311         * sem_util.adb, lib-xref.adb: Correct false positive warnings.
14313 2014-01-24  Vincent Celier  <celier@adacore.com>
14315         * projects.texi: Document that aggregate projects are only
14316         supported by gprbuild, but not by gnatmake.  Document that the
14317         only attribute Switches in package Binder of aggregate projects
14318         will be ignored if its index is not others.  Document that
14319         attribute Global_Config_File is allowed in package Binder of
14320         aggregate projects.
14322 2014-01-24  Robert Dewar  <dewar@adacore.com>
14324         * sem_prag.adb: Minor code reorganization.
14325         * sem_util.adb: Minor fix of potential latent bug in Is_LHS.
14327 2014-01-24  Pascal Obry  <obry@adacore.com>
14329         * prj-attr.adb, projects.texi, snames.ads-tmpl: Add Excluded_Patterns
14330         attribute definition.
14332 2014-01-24  Vincent Celier  <celier@adacore.com>
14334         * makeutl.adb (Queue.Insert_No_Roots): In gprbuild, do not put
14335         in the Queue the same source (same path, same multi-source index)
14336         from the same project file, to avoid compiling several times
14337         the same source.
14339 2014-01-24  Eric Botcazou  <ebotcazou@adacore.com>
14341         * einfo.ads (First_Rep_Item): Remove obsolete stuff.
14342         (Has_Gigi_Rep_Item): Likewise.
14343         * sem_prag.adb (Analyze_Pragma) <Pragma_Linker_Section>: Do not set
14344         Has_Gigi_Rep_Item for objects.
14345         * gcc-interface/decl.c (prepend_one_attribute_to): Rename into...
14346         (prepend_one_attribute): ...this.
14347         (prepend_one_attribute_pragma): New function extracted from...
14348         (prepend_attributes): ...here.  Swap the parameters for consistency.
14349         (gnat_to_gnu_entity): Adjust calls to prepend_one_attribute_to and to
14350         prepend_attributes.
14351         <object>: Deal with a pragma Linker_Section on a constant
14352         or variable.  <E_Function>: Deal with a pragma Linker_Section
14353         on a subprogram.
14354         (get_minimal_subprog_decl): Adjust calls to prepend_one_attribute_to.
14356 2014-01-24  Vincent Celier  <celier@adacore.com>
14358         * opt.ads: Minor comment update.
14360 2014-01-24  Robert Dewar  <dewar@adacore.com>
14362         * sem_prag.adb (Analyze_Input_Output): Add missing error check
14363         for junk operand.
14364         * sem_util.adb (Is_Refined_State): Add defense against junk
14365         tree from error.
14367 2014-01-24  Pascal Obry  <obry@adacore.com>
14369         * projects.texi: Removes Build_Slaves attribute documentation.
14371 2014-01-23  Robert Dewar  <dewar@adacore.com>
14373         * opt.adb (Register_Opt_Config_Switches): Save SPARK_Mode_Pragma
14374         setting.
14376 2014-01-23  Ed Schonberg  <schonberg@adacore.com>
14378         * sem_util.adb (Is_Potentially_Unevaluated): Predicate only
14379         applies to expressions that come from source.
14380         * sem_attr.adb (Analyze_Attribute, case 'Old): Improve error
14381         message.
14382         (Analyze_Attribute, case 'Loop_Entry): Apply SPARK 2014 legality
14383         rule regarding potentially unevaluated expressions, to prefix
14384         of attribute.
14386 2014-01-23  Ed Schonberg  <schonberg@adacore.com>
14388         * exp_util.adb (Make_Invqriant_Call): If type of expression is
14389         a private extension, get invariant from base type.
14391 2014-01-23  Robert Dewar  <dewar@adacore.com>
14393         * sem_util.adb, sem_attr.adb: Minor reformatting.
14395 2014-01-23  Robert Dewar  <dewar@adacore.com>
14397         * opt.adb (Save_Opt_Config_Switches): Save SPARK_Mode_Pragma
14398         (Restore_Opt_Config_Switches): Restore SPARK_Mode_Pragma.
14399         * sem.adb (Semantics): Remove save/restore of
14400         SPARK_Mode[_Pragma]. Not needed since already done in
14401         Save/Restore_Opt_Config_Switches.
14403 2014-01-23  Robert Dewar  <dewar@adacore.com>
14405         * gnat_rm.texi, einfo.adb, einfo.ads, sem_prag.adb, gnat_ugn.texi,
14406         freeze.adb, repinfo.adb, aspects.adb, aspects.ads, sem_ch13.adb:
14407         Linker_Section enhancements.
14409 2014-01-23  Tristan Gingold  <gingold@adacore.com>
14411         * gnat_rm.texi: Minor editing.
14413 2014-01-23  Robert Dewar  <dewar@adacore.com>
14415         * opt.adb (Set_Opt_Config_Switches): Reset SPARK mode for
14416         with'ed internal units.
14417         * sem.adb (Semantics): Save and restore SPARK_Mode[_Pragma].
14419 2014-01-23  Javier Miranda  <miranda@adacore.com>
14421         * lib-xref.adb (Generate_Reference): As part of processing the
14422         "end-of-spec" reference generate an extra reference to the first
14423         private entity of the package.
14424         * xr_tabls.adb (Add_Reference): No action needed for the extra
14425         'E' reference associated; similar to the processing of the
14426         'e' reference.
14428 2014-01-23  Bob Duff  <duff@adacore.com>
14430         * gnat_ugn.texi: Change "--&pp off" to "--!pp off".
14432 2014-01-23  Ed Schonberg  <schonberg@adacore.com>
14434         * sem_util.ads, sem_util.adb (Is_Potentially_Unevaluated): new
14435         predicate to implement rule given in 6.1.1 (20/3).
14436         * sem_attr.adb (Analyze_Attribute, case 'Old): Reject prefix of
14437         'Old in a postcondition, if it is potentially unevaluated and
14438         it is not an entity name.
14440 2014-01-23  Bob Duff  <duff@adacore.com>
14442         * gnat_ugn.texi: Document the new "--&pp off" feature of gnatpp.
14444 2014-01-23  Robert Dewar  <dewar@adacore.com>
14446         * gnatlink.adb (Gnatlink): Fix problem of generating bad name
14447         msg on VMS.
14449 2014-01-23  Bob Duff  <duff@adacore.com>
14451         * g-dynhta.ads: Minor comment fix.
14453 2014-01-23  Yannick Moy  <moy@adacore.com>
14455         * sem_ch6.adb (Analyze_Subprogram_Body_Helper): Inherit SPARK_Mode
14456         from spec on body only when not already inherited on spec. Set
14457         SPARK_Mode from context on body without previous spec.  *
14458         * sem_prag.adb (Analyze_Pragma): Check placement of pragma on
14459         library-level entities.  Correct retrieval of entity from
14460         declaration, for cases where the declaration is not a unit.
14461         * sem_ch12.adb (Instantiate_Object): Avoid
14462         calling Is_Volatile_Object on an empty node.
14464 2014-01-23  Robert Dewar  <dewar@adacore.com>
14466         * gnatlink.adb (Gnatlink): Check for suspicious executable file
14467         names on windows.
14469 2014-01-23  Robert Dewar  <dewar@adacore.com>
14471         * a-ngelfu.ads: Remove bad uses of AND which should be AND THEN.
14472         * sem_res.adb (Check_No_Direct_Boolean_Operators): Don't give
14473         style errors in instances.
14474         * g-dynhta.ads (Static_HTable): Comment updates.
14476 2014-01-23  Vincent Celier  <celier@adacore.com>
14478         * prj-conf.adb (Get_Or_Create_Configuration_File): Do not attempt
14479         to find a configuration project file when Config_File_Name is
14480         No_Configuration_File.
14481         * prj-conf.ads (No_Configuration_File): New constant String.
14482         * prj-pars.adb (Parse): Call Get_Or_Create_Configuration_File
14483         with Config_File_Name set to No_Configuration_File, so that
14484         no existing configuration project file will be used, and the
14485         configuration project will be only created in memory when
14486         Add_Default_GNAT_Naming_Scheme is called.
14487         * projects.texi: Minor reformatting.
14489 2014-01-23  Vincent Celier  <celier@adacore.com>
14491         * prj-conf.adb (Get_Or_Create_Configuration_File): Never parse
14492         a config project file if On_Load_Config is not null.
14493         * prj-pars.adb: Minor comment changes.
14495 2014-01-23  Ed Schonberg  <schonberg@adacore.com>
14497         * lib-xref.adb (Output_References): Output progenitors of
14498         synchronized tagged types, for source navigation.
14500 2014-01-23  Robert Dewar  <dewar@adacore.com>
14502         * exp_util.adb, sinfo.adb, sinfo.ads, sem.adb, sem_res.adb,
14503         expander.adb, exp_ch11.adb, exp_ch11.ads, sem_ch11.adb, sem_ch11.ads,
14504         sprint.adb, sprint.ads: Remove unused node N_Subprogram_Info.
14506 2014-01-23  Emmanuel Briot  <briot@adacore.com>
14508         * prj-conf.adb (Get_Or_Create_Configuration_File): call
14509         On_Load_Config later.
14511 2014-01-23  Hristian Kirtchev  <kirtchev@adacore.com>
14513         * sem_ch3.adb (Analyze_Declarations): Do not
14514         generate the spec of the late primitive in ASIS mode. Add two
14515         comments to explain the special cases when the expansion is
14516         not performed.
14518 2014-01-23  Robert Dewar  <dewar@adacore.com>
14520         * sem_util.adb (Note_Possible_Modification): Fix error of
14521         misbehaving for implicit dereference cases in -gnatc mode.
14523 2014-01-23  Emmanuel Briot  <briot@adacore.com>
14525         * prj-pars.adb: Minor reformatting.
14527 2014-01-22  Ed Schonberg  <schonberg@adacore.com>
14529         * sem_ch6.adb (Analyze_Subprogram_Body_Helper): A subprogram
14530         body generated for an expression function within a protected body
14531         needs a set of renaming declarations if the expression function
14532         comes from source.
14534 2014-01-22  Ed Schonberg  <schonberg@adacore.com>
14536         * lib-xref.adb (Get_Type_Reference): In semantics-only mode,
14537         list interface progenitor of a tagged concurrent type, for better
14538         source navigation.
14540 2014-01-22  Robert Dewar  <dewar@adacore.com>
14542         * lib.adb (In_Extended_Main_Code_Unit): Return False for
14543         Standard_Location.
14544         (In_Extended_Main_Source_Unit): Return False for Standard_Location.
14545         * lib.ads (In_Extended_Main_Code_Unit): Add documentation on
14546         treatment of Slocs No_Location and Standard_Location.
14547         * restrict.adb (Check_Restriction_No_Dependence): Explicitly
14548         check for entity with Standard_Location Sloc, rather than relying
14549         on Lib routines to do that.
14550         * sem_res.adb (Resolve_Call): Implement SPARK_05 restriction
14551         that a call cannot occur before a later occuring body within
14552         the same unit.
14554 2014-01-22  Thomas Quinot  <quinot@adacore.com>
14556         * rtsfind.adb: Update comment.
14558 2014-01-22  Hristian Kirtchev  <kirtchev@adacore.com>
14560         * sem_aux.ads, sem_aux.adb (Is_Body): New routine.
14561         * sem_ch3.adb (Analyze_Declarations): Add local variable
14562         Body_Seen. Generate the spec of a late controlled
14563         primitive body that is about to freeze its related type.
14564         (Handle_Late_Controlled_Primitive): New routine.
14566 2014-01-22  Robert Dewar  <dewar@adacore.com>
14568         * a-stream.adb: Minor reformatting.
14570 2014-01-22  Ed Schonberg  <schonberg@adacore.com>
14572         * sem_ch8.adb (From_Actual_Package): Introduce a recursive
14573         sub-procedure Declared_In_Actual to handle properly the visibility
14574         of actuals in actual packages, that are themselves actuals to a
14575         actual package of the current instance. This mimics properly the
14576         visibility of formals of formal packages declared with a box,
14577         within the corresponding generic unit.
14579 2014-01-22  Robert Dewar  <dewar@adacore.com>
14581         * checks.adb: Do not assume that a volatile variable is valid.
14583 2014-01-22  Thomas Quinot  <quinot@adacore.com>
14585         * g-catiio.ads (Image, Value): Clarify that these functions
14586         operate in the local time zone.  Minor documentation update.
14588 2014-01-22  Thomas Quinot  <quinot@adacore.com>
14590         * csets.adb, csets.ads, opt.ads: Minor documentation fixes.
14592 2014-01-22  Robert Dewar  <dewar@adacore.com>
14594         * sem_aux.adb, sem_aux.ads, sem_ch3.adb (Has_Unconstrained_Elements):
14595         Moved to sem_aux.adb.
14597 2014-01-22  Robert Dewar  <dewar@adacore.com>
14599         * vms_data.ads: Minor reformatting.
14601 2014-01-22  Robert Dewar  <dewar@adacore.com>
14603         * debug.adb: Document messages affected by -gnatd.E including
14604         the new ones that relate to late definition of equality.
14605         * sem_ch6.adb (Check_Untagged_Equality): In Ada 2012 mode, if
14606         debug flag -gnatd.E is set, then generate warnings rather than
14607         errors.
14608         (Check_Untagged_Equality): In earlier versions of Ada,
14609         generate warnings if Warn_On_Ada_2012_Incompatibility flag is set.
14611 2014-01-22  Robert Dewar  <dewar@adacore.com>
14613         * sem_prag.adb (Usage_Error): Output additional messages for
14614         unconstrained OUT parameters lacking an input dependency.
14616 2014-01-22  Robert Dewar  <dewar@adacore.com>
14618         * sem_ch4.adb: Minor reformatting.
14620 2014-01-22  Robert Dewar  <dewar@adacore.com>
14622         * restrict.ads: Minor reformatting.
14623         * sem_res.adb (Resolve_Call): Check for SPARK_05 restriction that
14624         forbids a call from within a subprogram to the same subprogram.
14626 2014-01-22  Thomas Quinot  <quinot@adacore.com>
14628         * a-stream.ads (Read_SEA, Write_SEA): New subprograms, optimized
14629         stream attributes for Stream_Element_Array.
14630         * a-stream.adb (Read_SEA, Write_SEA): Bodies for the above.
14631         * rtsfind.adb (Check_CRT): Do not reject a reference to an entity
14632         defined in the current scope.
14634 2014-01-22  Robert Dewar  <dewar@adacore.com>
14636         * debug.adb, exp_ch4.adb, erroutc.adb: Minor reformatting.
14638 2014-01-22  Thomas Quinot  <quinot@adacore.com>
14640         * sem_ch7.adb, sem_ch8.adb, exp_ch3.adb: Minor reformatting.
14642 2014-01-22  Thomas Quinot  <quinot@adacore.com>
14644         * sem_ch3.adb (Analyze_Object_Declaration): For a constant
14645         declaration initialized with a function call, whose type
14646         has variable size, need to remove side effects so that the
14647         initialization expression becomes a dereference of a temporary
14648         reference to the function result.
14650 2014-01-22  Yannick Moy  <moy@adacore.com>
14652         * errout.adb (Initialize): Remove trick to add dummy entry
14653         in Warnings table.
14654         * erroutc.adb (Set_Warnings_Mode_Off,
14655         Set_Warnings_Mode_On): Do nothing if warnings are suppressed by
14656         command line switch.
14657         * opt.ads (Warning_Mode): Document behavior
14658         wrt pragma Warnings, in normal mode and in GNATprove_Mode.
14660 2014-01-22  Robert Dewar  <dewar@adacore.com>
14662         * sem_ch3.adb, errout.adb, erroutc.adb: Minor reformatting.
14664 2014-01-22  Robert Dewar  <dewar@adacore.com>
14666         * sem_ch13.adb (Check_Pool_Size_Clash): New procedure
14667         (Analyze_Attribute_Definition_Clause, case Storage_Pool): call
14668         Check_Pool_Size_Clash (Analyze_Attribute_Definition_Clause,
14669         case Storage_Size): call Check_Pool_Size_Clash.
14671 2014-01-22  Robert Dewar  <dewar@adacore.com>
14673         * sem_ch3.adb, exp_util.adb, sem_dim.adb, sem_elab.adb, sem_ch8.adb,
14674         sem_eval.ads: Minor reformatting.
14676 2014-01-22  Thomas Quinot  <quinot@adacore.com>
14678         * sem_eval.adb (Compile_Time_Known_Bounds): Return False for
14679         Any_Composite to prevent cascaded errors.
14681 2014-01-22  Yannick Moy  <moy@adacore.com>
14683         * errout.adb (Initialize): Do not insert special entry in Warnings
14684         table in GNATprove_Mode.
14685         * erroutc.adb (Set_Warnings_Mode_On): Add info in Warnings table in
14686         GNATprove_Mode.
14687         * gnat1drv.adb (Adjust_Global_Switches): Do not suppress frontend
14688         warnings anymore.
14690 2014-01-22  Robert Dewar  <dewar@adacore.com>
14692         * sem_prag.adb (Analyze_Initializes_In_Decl_Part): Handle null
14693         initializes case.
14695 2014-01-22  Robert Dewar  <dewar@adacore.com>
14697         * snames.ads-tmpl: Update header.
14699 2014-01-22  Thomas Quinot  <quinot@adacore.com>
14701         * exp_util.adb (Insert_Actions): When inserting actions on a
14702         short circuit operator that has already been analyzed, do not park
14703         actions in node; instead introduce an N_Expression_With_Actions
14704         and insert actions immediately.
14705         Add guard for unexpected case of climbing up through statement
14706         in Actions list of an N_Expression_With_Actions.
14707         * sem_elab.adb (Insert_Elab_Check): Remove complex
14708         specialized circuitry for the case where the context is already
14709         analyzed, as it is not needed and introduces irregularities in
14710         finalization. Instead rely on the above change to Insert_Actions
14711         to ensure that late insertion on short circuit operators works
14712         as expected.
14714 2014-01-22  Ed Schonberg  <schonberg@adacore.com>
14716         * sem_ch4.adb (Operator_Check): Improve error message when an
14717         operand of concatenation is an access type.
14719 2014-01-22  Thomas Quinot  <quinot@adacore.com>
14721         * sem_dim.adb (Analyze_Dimension_Identifier): Add guard against
14722         cascaded error.
14724 2014-01-22  Ed Schonberg  <schonberg@adacore.com>
14726         * sem_ch8.adb (Find_Selected_Component): Handle properly the case
14727         of an expanded name in a proper body, whose prefix is a package
14728         in the context of the proper body, when there is a homonym of
14729         the package declared in the parent unit.
14731 2014-01-22  Robert Dewar  <dewar@adacore.com>
14733         * sem_warn.adb (Check_Use_Clause): Don't give no entities used
14734         msg if errors found.
14735         (Check_One_Unit): Same change.
14737 2014-01-22  Robert Dewar  <dewar@adacore.com>
14739         * ug_words: Add missing/wrong entries for VMS warning switches.
14740         * sem_prag.adb (Check_Duplicate_Pragma): Avoid flagging parent type.
14742 2014-01-22  Jerome Guitton  <guitton@adacore.com>
14744         * mlib-tgt-specific-vxworks.adb (Get_Target_Suffix): Replace xscale by
14745         arm.
14747 2014-01-22  Robert Dewar  <dewar@adacore.com>
14749         * gnat_rm.texi, gnat_ugn.texi: Document passive task optimization
14751 2014-01-22  Eric Botcazou  <ebotcazou@adacore.com>
14753         * gcc-interface/Makefile.in: Minor fixes.
14755 2014-01-21  Robert Dewar  <dewar@adacore.com>
14757         * par-ch4.adb (P_If_Expression): Rewritten to improve error recovery.
14758         * par-ch5.adb (P_Condition): New version with expression prescanned.
14759         * par.adb (P_Condition): New version with expression prescanned.
14761 2014-01-21  Robert Dewar  <dewar@adacore.com>
14763         * gnat_rm.texi: Document that Allow_Integer_Address is ignored
14764         if Address is not a private type.
14765         * sem_prag.adb (Analyze_Pragma, case Allow_Integer_Address):
14766         Ignore pragma if System.Address is not a private type.
14768 2014-01-21  Arnaud Charlet  <charlet@adacore.com>
14770         * namet.ads (Name_Len): Initialize to 0 to avoid accessing an
14771         uninitialized value.
14773 2014-01-21  Thomas Quinot  <quinot@adacore.com>
14775         * gnat_rm.texi (Scalar_Storage_Order): Update documentation.
14777 2014-01-21  Ed Schonberg  <schonberg@adacore.com>
14779         * sem_ch12.adb (Set_Instance_Env): In Ada 2012 mode, preserve
14780         the value of Assertions_Enabled flag when compiling an instance of
14781         an internal unit. This facilitates the use of pre/postconditions
14782         in generic internal units, such as the new elementary function
14783         libraries.
14785 2014-01-21  Robert Dewar  <dewar@adacore.com>
14787         * exp_aggr.adb: Minor reformatting.
14788         * sem_attr.adb: Minor reformatting.
14789         * sem_res.adb: Minor comment addition.
14790         * einfo.adb: Minor comment updates.
14791         * freeze.adb: Minor reformatting and code reorganization.
14793 2014-01-21  Ed Schonberg  <schonberg@adacore.com>
14795         * par-ch4.adb (P_If_Expression): Handle more gracefully an
14796         elsif clause that does not have an else part.
14798 2014-01-21  Robert Dewar  <dewar@adacore.com>
14800         * checks.adb, sem_util.ads, sem_ch4.adb: Minor reformatting.
14801         * gcc-interface/Makefile.in: clean up target pairs.
14803 2014-01-21  Pascal Obry  <obry@adacore.com>
14805         * projects.texi: Minor typo fix.
14807 2014-01-21  Thomas Quinot  <quinot@adacore.com>
14809         * freeze.adb (Check_Component_Storage_Order): If a record type
14810         has an explicit Scalar_Storage_Order attribute definition clause,
14811         reject any component that itself is of a composite type and does
14812         not have one.
14814 2014-01-21  Ed Schonberg  <schonberg@adacore.com>
14816         * sem_ch10.adb (Generate_Parent_Reference): Make public so it
14817         can be used to generate proper cross-reference information for
14818         the parent units of proper bodies.
14820 2014-01-21  Thomas Quinot  <quinot@adacore.com>
14822         * exp_pakd.adb (Expand_Packed_Element_Set,
14823         Expand_Packed_Element_Reference): No byte swapping required in
14824         the front-end for the case of a reverse storage order array,
14825         as this is now handled uniformly in the back-end.  However we
14826         still need to swap back an extracted element if it is itself a
14827         nested composite with reverse storage order.
14829 2014-01-21  Hristian Kirtchev  <kirtchev@adacore.com>
14831         * sem_prag.adb (Analyze_External_Property): Add processing for "others".
14832         (Analyze_Pragma): Update the grammar of pragma Abstract_State to
14833         include "others".
14835 2014-01-21  Arnaud Charlet  <charlet@adacore.com>
14837         * gnat_ugn.texi: Minor updates.
14839 2014-01-21  Thomas Quinot  <quinot@adacore.com>
14841         * exp_pakd.adb: Update comment, minor reformatting.
14843 2014-01-21  Hristian Kirtchev  <kirtchev@adacore.com>
14845         * sem_ch3.adb (Analyze_Variable_Contract): Trigger the volatile
14846         object check when SPARK_Mode is on.
14847         * sem_ch6.adb (Process_Formals): Trigger the volatile object
14848         check when SPARK_Mode is on.
14849         * sem_ch12.adb (Instantiate_Object): Trigger the volatile object
14850         check when SPARK_Mode is on.
14851         * sem_ch13.adb (Analyze_Aspect_Specifications): Insert the
14852         corresponding pragma of aspect SPARK_Mode in the visible
14853         declarations of a package declaration.
14854         * sem_prag.adb (Analyze_Pragma): Trigger the volatile object
14855         check when SPARK_Mode is on.
14856         * sem_res.adb (Resolve_Actuals): Trigger the volatile object
14857         check when SPARK_Mode is on.
14858         (Resolve_Entity_Name): Trigger
14859         the volatile object check when SPARK_Mode is on.
14861 2014-01-21  Robert Dewar  <dewar@adacore.com>
14863         * sem_ch3.adb, sem_prag.adb, sem_prag.ads, sem_ch12.adb, sem_res.adb,
14864         sem_ch6.adb, a-except-2005.adb: Minor reformatting.
14866 2014-01-21  Ed Schonberg  <schonberg@adacore.com>
14868         * exp_ch3.adb (Expand_N_Object_Declaration): When a class-wide
14869         object is declared, it is rewritten as a renaming of an dynamic
14870         expression that wraps the initial value.  The renaming declaration
14871         is first given an internal name, to prevent collisions with the
14872         entity already declared, and then the name is modified to reflect
14873         the original one. the modification of the name must preserve
14874         the source location of the original, to prevent spurious errors
14875         when compiling with style checks if the declaration involves
14876         more than one entity.
14878 2014-01-21  Hristian Kirtchev  <kirtchev@adacore.com>
14880         * aspects.adb Add entries for Async_Readers, Async_Writers,
14881         Effective_Reads and Effective_Writes in table Canonical_Aspect.
14882         * aspects.ads Add entries for Async_Readers, Async_Writers,
14883         Effective_Reads and Effective_Writes in tables Aspect_Id,
14884         Aspect_Names, Aspect_Delay and Implementation_Defined_Aspect.
14885         * atree.adb (Ekind_In): New version with 8 parameters.
14886         (Node34): New routine.
14887         (Set_Node34): New routine.
14888         * atree.ads (Ekind_In): New version with 8 parameters.
14889         (Node34): New routine.
14890         (Set_Node34): New routine.
14891         * einfo.adb Contract is now Node34.
14892         (Contract): Update the assertion and node usage.
14893         (Get_Pragma): Include pragmas Async_Readers, Async_Writers,
14894         Effective_Reads and Effective_Writes.
14895         (Set_Contract): Update the assertion and node usage.
14896         (Write_Field24_Name): Remove the output for a contract.
14897         (Write_Field34_Name): Add output for a contract.
14898         * einfo.ads Contract is now Node34. Update the comment on
14899         attribute usage and related node structures.
14900         (Get_Pragma): Update the comment on usage.
14901         * par-prag.adb (Prag): Pragmas Async_Readers, Async_Writers,
14902         Effective_Reads and Effective_Writes do not require special
14903         processing by the parser.
14904         * sem_ch3.adb (Analyze_Variable_Contract): New routine.
14905         (Analyze_Declarations): Analyze the contract of a variable at
14906         the end of the declarative region.
14907         (Analyze_Object_Declaration): Create a contract for a variable.
14908         * sem_ch6.adb (Analyze_Subprogram_Contract): Update the retrieval
14909         of classification pragmas.
14910         (Process_Formals): Detect an illegal
14911         use of a volatile object as a formal in a function.
14912         * sem_ch12.adb (Instantiate_Object): Detect an illegal use of
14913         a volatile object as an actual in generic instantiation.
14914         * sem_prag.adb Add entries for Async_Readers, Async_Writers,
14915         Effective_Reads and Effective_Writes in table Sig_Flags.
14916         (Analyze_External_State_In_Decl_Part): New routine.
14917         (Analyze_Global_Item): Detect an illegal use of a volatile object
14918         as a global item of a function.
14919         (Analyze_Pragma): Reimplement
14920         pragma Abstract_State. Add support for pragmas Async_Readers,
14921         Async_Writers, Effective_Reads and Effective_Writes.
14922         (Check_External_Properties): New routine.
14923         * sem_prag.ads (Analyze_External_State_In_Decl_Part): New routine.
14924         (Check_External_Properties): New routine.
14925         * sem_res.adb (Resolve_Actuals): Detect an illegal use of a
14926         volatile object as an actual in a call.
14927         (Resolve_Entity_Name):
14928         Add local variables Par, Prev and Usage_OK. Detect illegal
14929         contexts of volatile objects.
14930         * sem_util.adb (Add_Contract_Item): Add support for
14931         pragmas associated with the contract of a variable.
14932         (Async_Readers_Enabled): New routine.
14933         (Async_Writers_Enabled): New routine.
14934         (Effective_Reads_Enabled): New routine.
14935         (Effective_Writes_Enabled): New routine.
14936         (Has_Enabled_Property):
14937         New routine.
14938         (Is_Unchecked_Conversion_Instance): New routine.
14939         (Is_Volatile_Object): Add support for entities that may denote
14940         a volatile object.
14941         * sem_util.ads (Add_Contract_Item): Update the
14942         comment on usage.
14943         (Async_Readers_Enabled): New routine.
14944         (Async_Writers_Enabled): New routine.
14945         (Effective_Reads_Enabled): New routine.
14946         (Effective_Writes_Enabled): New routine.
14947         (Is_Unchecked_Conversion_Instance): New routine.
14948         * sinfo.ads Update the comment on the structure of N_Contract.
14949         * snames.ads-tmpl Add predefined names for Async_Readers,
14950         Async_Writers, Effective_Reads and Effective_Writes. Add
14951         pragma ids for Async_Readers, Async_Writers, Effective_Reads
14952         and Effective_Writes.
14954 2014-01-21  Robert Dewar  <dewar@adacore.com>
14956         * exp_ch4.adb (Eval_Op_Expon): Use CRT_Safe_Compile_Time_Known_Value
14957         * sem_eval.adb (Compile_Time_Known_Value): Remove special
14958         handling of CRT mode (CRT_Safe_Compile_Time_Known_Value): New
14959         function (Eval_Op_Expon): Add CRT_Safe in call to Test_Foldable
14960         (Test_Foldable): Add CRT_Safe parameter
14961         * sem_eval.ads (Compile_Time_Known_Value): Remove special
14962         handling of CRT mode.
14963         (CRT_Safe_Compile_Time_Known_Value): New function.
14965 2014-01-21  Robert Dewar  <dewar@adacore.com>
14967         * sem_prag.adb (Analyze_Pragma, case SPARK_Mode): Fix problem
14968         with pragma or aspect that applies to package spec or subprogram
14969         spec.
14971 2014-01-21  Robert Dewar  <dewar@adacore.com>
14973         * exp_aggr.adb: Minor reformatting.
14975 2014-01-21  Johannes Kanig  <kanig@adacore.com>
14977         * gnat1drv.adb (Gnat1drv) remove obsolete reference to -gnatd.H.
14979 2014-01-21  Bob Duff  <duff@adacore.com>
14981         * gnat_ugn.texi: Document the "checks" attribute in gnat2xml.
14983 2014-01-21  Steve Baird  <baird@adacore.com>
14985         * gnat_rm.texi: Improve description of SPARK_Mode pragma.
14987 2014-01-21  Vincent Celier  <celier@adacore.com>
14989         * prj-part.adb (Parse_Single_Project): Accept to extend a project
14990         if it has only be imported by an project being extended. When a
14991         project that has only been imported by a project being extended
14992         is imported by another project that is not being extended,
14993         reset the previous indication, so that it will be an error if
14994         this project is extended later.
14995         * prj-tree.adb (Create_Project): Include component From_Extended
14996         in table Projects_HT
14997         * prj-tree.ads (Project_Name_And_Node): New Boolean component
14998         From_Extended
15000 2014-01-21  Robert Dewar  <dewar@adacore.com>
15002         * atree.ads, atree.adb: Add Node33 and Set_Node33.
15003         * einfo.ads, einfo.adb (SPARK_Pragma): New field (SPARK_Aux_Pragma):
15004         New field (SPARK_Pragma_Inherited): New flag
15005         (SPARK_Aux_Pragma_Inherited): New flag (SPARK_Mode_Pragmas):
15006         Removed.
15007         * lib.ads, lib.adb: Remove SPARK_Mode_Pragma, no longer used.
15008         * opt.ads (SPARK_Mode_Pragma): New global variable.
15009         * sem.ads: Add Save_SPARK_Mode_Pragma field to Scope_Stack_Entry.
15010         * sem_ch3.adb: Use new SPARK_Mode data structures.
15011         * sem_ch6.adb: Set SPARK_Mode fields in subprogram specs and bodies.
15012         * sem_ch7.adb: Set SPARK_Mode fields in package spec and body entities.
15013         * sem_ch8.adb (Push_Scope): Save SPARK_Mode_Pragma.
15014         (Pop_Scope): Restore SPARK_Mode_Pragma.
15015         * sem_prag.adb (Analyze_Pragma, case SPARK_Mode): Rewrite for
15016         new data structures.
15018 2014-01-21  Arnaud Charlet  <charlet@adacore.com>
15020         * back_end.adb: Undo previous change, not needed. Minor reformatting.
15022 2014-01-21  Thomas Quinot  <quinot@adacore.com>
15024         * exp_ch5.adb: Fix comment.
15025         * switch-c.adb: Minor comment update.
15026         * exp_ch3.adb: Minor reformatting.
15028 2014-01-21  Arnaud Charlet  <charlet@adacore.com>
15030         * back_end.adb (Scan_Compiler_Arguments): Do not store object
15031         filename in gnatprove mode.
15033 2014-01-21  Thomas Quinot  <quinot@adacore.com>
15035         * sinfo.ads (No_Ctrl_Actions): Clarify documentation (flag also
15036         suppresses usage of primitive _assign for tagged types).
15037         * exp_aggr.adb (Build_Array_Aggr_Code.Gen_Assign): Set
15038         No_Ctrl_Actions for a tagged type that does not require
15039         finalization, as we want to disable usage of _assign (which
15040         may cause undesirable discriminant checks on an uninitialized,
15041         invalid target).
15043 2014-01-21  Ed Schonberg  <schonberg@adacore.com>
15045         * sem_prag.adb: Reject invariant'class on completion.
15047 2014-01-21  Javier Miranda  <miranda@adacore.com>
15049         * exp_ch3.adb (Build_Init_Procedure): For
15050         derivations of interfaces, do not move the the initialization
15051         of the _parent field since such assignment is not generated.
15053 2014-01-21  Ed Schonberg  <schonberg@adacore.com>
15055         * sem_res.adb (Rewrite_Renamed_Operator): Do not replace entity
15056         with the operator it renames if we are within an expression of
15057         a pre/postcondition, because the expression will be reanalyzed
15058         at a later point, and the analysis of the renaming may affect
15059         the visibility of the operator when in an instance.
15061 2014-01-21  Robert Dewar  <dewar@adacore.com>
15063         * sinfo.ads, sinfo.adb: Change Do_Discriminant_Check to use new Flag1.
15064         Add this flag to type conversion nodes and assignment nodes.
15065         * treepr.adb: Deal properly with Flag 1,2,3.
15066         * treeprs.adt: Minor comment update.
15068 2014-01-21  Robert Dewar  <dewar@adacore.com>
15070         * sem_eval.adb (Compile_Time_Known_Value): Add Ignore_CRT
15071         parameter.
15072         * sem_eval.ads (Compile_Time_Known_Value): Add Ignore_CRT
15073         parameter, completely rewrite spec.
15075 2014-01-21  Ed Schonberg  <schonberg@adacore.com>
15077         * sem_ch10.adb (Install_Withed_Unit): If the unit is a subprogram
15078         instance that is inlined, it may have been rewritten as a wrapper
15079         package. In that case the unit that must be made visible is the
15080         related instance of the package.
15082 2014-01-21  Arnaud Charlet  <charlet@adacore.com>
15084         * exp_ch9.adb (Expand_N_Selective_Accept.Add_Accept): Refine
15085         previous change in codepeer mode.
15087 2014-01-21  Arnaud Charlet  <charlet@adacore.com>
15089         * exp_ch9.adb (Expand_N_Selective_Accept.Add_Accept): Always add
15090         call to Abort_Undefer, as expected by the runtime.
15091         * s-tasren.adb (Local_Complete_Rendezvous): Replace
15092         Defer_Abort_Nestable by Defer_Abort, since we do not expect abort to be
15093         deferred at this point. Update comments.
15095 2014-01-21  Thomas Quinot  <quinot@adacore.com>
15097         * exp_ch4.adb, exp_ch5.adb, checks.adb: Minor reformatting.
15099 2014-01-21  Arnaud Charlet  <charlet@adacore.com>
15101         * switch-c.adb, usage.adb, gnat_ugn.texi: Mark -gnates as internal,
15102         remove from doc.
15104 2014-01-21  Robert Dewar  <dewar@adacore.com>
15106         * switch-c.adb, usage.adb, atree.adb, atree.ads: Minor reformatting.
15108 2014-01-21  Thomas Quinot  <quinot@adacore.com>
15110         * atree.adb, atree.ads (Num_Extension_Nodes): Switch to Node_Id, since
15111         this is value is used in Node_Id arithmetic operations.
15112         (Copy_Node, Exchange_Entities): Use loops indexed by Num_Extension_Nodes
15113         instead of hard-coded unrolled code.
15115 2014-01-21  Yannick Moy  <moy@adacore.com>
15117         * gnat1drv.adb: Minor code cleanup, removing useless code.
15119 2014-01-21  Arnaud Charlet  <charlet@adacore.com>
15121         * opt.ads (SPARK_Switches_File_Name): New.
15122         * switch-c.adb (Scan_Front_End_Switches): Add handling of -gnates=xxx *
15123         * usage.adb (Usage): Document -gnates, in gnatprove mode only.
15124         * gnat_ugn.texi: Document -gnates.
15126 2014-01-21  Yannick Moy  <moy@adacore.com>
15128         * errout.adb (Special_Msg_Delete): Update comment. Remove
15129         special case for GNATprove which should not ignore mismatch
15130         in sizes for representation clauses.
15131         * sem_prag.adb (Analyze_Pragma): Remove special case for GNATprove
15132         which should not ignore pragma Pack.
15134 2014-01-21  Ed Schonberg  <schonberg@adacore.com>
15136         * sem_ch4.adb: Code clean up.
15138 2014-01-21  Steve Baird  <baird@adacore.com>
15140         * gnat_rm.texi: Improve GNAT RM description of SPARK_Mode pragma.
15142 2014-01-21  Robert Dewar  <dewar@adacore.com>
15144         * gcc-interface/gigi.h: Get Flags array address.
15145         * gcc-interface/trans.c: Acquire Flags array address.
15146         * atree.adb: Add support for Flags array and Flag0,1,2,3.
15147         * atree.ads: Add support for Flags array and Flag0,1,2,3.
15148         * atree.h: Add support for Flags array and Flag0,1,2,3.
15149         * back_end.adb: Pass Flags array address to gigi.
15151 2014-01-21  Ed Schonberg  <schonberg@adacore.com>
15153         * sem_ch8.adb (Attribute_Renaming): Transfer original attribute
15154         reference to generated body so that legality checks on stream
15155         attributes are properly applied. If type is tagged and already
15156         frozen, insert generated body at the point of the renaming
15157         declaration.
15159 2014-01-21  Ed Schonberg  <schonberg@adacore.com>
15161         * sem_ch12.adb: Code clean up.
15162         * sem_ch8.adb: Minor reformatting
15164 2014-01-20  Robert Dewar  <dewar@adacore.com>
15166         * checks.adb: Check SPARK_Mode instead of GNATProve_Mode for
15167         converting warnings on inevitable exceptions to errors.
15168         * exp_ch4.adb: Check SPARK_Mode instead of GNATProve_Mode for
15169         converting warnings on inevitable exceptions to errors.
15170         * opt.adb (SPARK_Mode_Config): Handled like other config flags
15171         * opt.ads (SPARK_Mode_Type): Moved here from types (renamed from
15172         SPARK_Mode_Id) (SPARK_Mode_Type): Add pragma Ordered, remove
15173         SPARK_ from names (SPARK_Mode): New flag (SPARK_Mode_Config):
15174         New flag (Config_Switches_Type): Add SPARK_Mode field
15175         * sem.adb: Minor code reorganization (remove unnecessary with)
15176         * sem.ads (Scope_Stack_Entry): Add Save_SPARK_Mode field
15177         * sem_aggr.adb: Check SPARK_Mode instead of GNATProve_Mode for
15178         converting warnings on inevitable exceptions to errors.
15179         * sem_attr.adb: Check SPARK_Mode instead of GNATProve_Mode for
15180         converting warnings on inevitable exceptions to errors.
15181         * sem_ch3.adb: Check SPARK_Mode instead of GNATProve_Mode for
15182         converting warnings on inevitable exceptions to errors.
15183         * sem_ch4.adb: Check SPARK_Mode instead of GNATProve_Mode for
15184         converting warnings on inevitable exceptions to errors.
15185         * sem_ch6.adb (Analyze_Subprogram_Body_Helper): Reset SPARK_Mode
15186         from spec if needed
15187         * sem_ch7.adb (Analyze_Package_Body_Helper): Reset SPARK_Mode
15188         from spec if needed
15189         * sem_ch8.adb (Push_Scope): Save SPARK_Mode (Pop_Scope):
15190         Restore SPARK_Mode
15191         * sem_elab.adb: Check SPARK_Mode instead of GNATProve_Mode for
15192         converting warnings on inevitable exceptions to errors.
15193         * sem_prag.adb (Get_SPARK_Mode_From_Pragma): New function
15194         (Get_SPARK_Mode_Id): Removed (Get_SPARK_Mode_Type): New name
15195         of Get_SPARK_Mode_Id
15196         * sem_prag.ads (Get_SPARK_Mode_From_Pragma): New function
15197         * sem_res.adb: Check SPARK_Mode instead of GNATProve_Mode for
15198         converting warnings on inevitable exceptions to errors.
15199         * sem_util.adb: Check SPARK_Mode instead of GNATProve_Mode for
15200         converting warnings on inevitable exceptions to errors.
15201         * types.ads (SPARK_Mode_Id): Moved to opt.ads and renamed
15202         SPARK_Mode_Type
15204 2014-01-20  Ed Schonberg  <schonberg@adacore.com>
15206         * sem_ch13.adb: Add semantic information to rewritten type
15207         reference.
15209 2014-01-20  Ed Schonberg  <schonberg@adacore.com>
15211         * exp_ch5.adb (Expand_N_Assignment_Statement): If both sides
15212         are of a type with unknown discriminants, convert both to the
15213         underlying view of the type, so that the proper constraint check
15214         can be applied to the right-hand side.
15216 2014-01-20  Robert Dewar  <dewar@adacore.com>
15218         * atree.adb (Copy_Node): Fix failure to copy last component
15219         (Exchange_Entities): Fix failure to exchange last entity
15221 2014-01-20  Ed Schonberg  <schonberg@adacore.com>
15223         * sem_ch12.adb: Code clean up.
15225 2014-01-20  Robert Dewar  <dewar@adacore.com>
15227         * gnat_rm.texi, sem_ch4.adb: Minor reformatting.
15229 2014-01-20  Ed Schonberg  <schonberg@adacore.com>
15231         * sem_ch4.adb (Analyze_Quantified_Expression): If after
15232         pre-analysis  the loop parameter specification has been
15233         rewritten as a iterator specification, propagate the change to
15234         the quantified expression, for ASIS navigtion needs.
15236 2014-01-20  Vincent Celier  <celier@adacore.com>
15238         * par-ch10.adb: Minor error message change: escape [ and ].
15240 2014-01-20  Robert Dewar  <dewar@adacore.com>
15242         * checks.adb: Make warnings on exceptions into errors in GNATprove mode.
15243         * errout.adb: Implement [ and ] insertion characters.
15244         * errout.ads: Document new [ and ] insertion characters.
15245         * sem_ch12.adb, restrict.adb, frontend.adb, exp_ch7.adb: Minor
15246         addition of ??? comment.
15247         * lib-xref.adb, exp_util.adb, gnat1drv.adb: Minor reformatting
15248         * exp_ch4.adb, sem_ch3.adb, sem_ch4.adb, sem_ch6.adb, sem_elab.adb,
15249         sem_eval.adb, sem_res.adb, sem_util.adb, sem_attr.adb, sem_aggr.adb:
15250         Make warnings on exceptions into errors in GNATprove mode.
15251         * sem_dim.adb: Minor reformatting throughout Quote [ and ]
15252         in error messages.
15254 2014-01-20  Ed Schonberg  <schonberg@adacore.com>
15256         * sem_ch13.adb: Code clean up.
15258 2014-01-20  Robert Dewar  <dewar@adacore.com>
15260         * errout.ads, errout.adb: Implement >? >x? >X? sequences in error
15261         messages.
15262         * sem_ch6.adb (Check_Statement_Sequence): Missing return is an
15263         error in GNATprove mode.
15265 2014-01-20  Ed Schonberg  <schonberg@adacore.com>
15267         * par-ch4.adb (Is_Parameterless_Attribute): The Ada2012 attribute
15268         reference 'Old takes no parameters, and thus can appear as a
15269         prefix of a slice.
15271 2014-01-20  Eric Botcazou  <ebotcazou@adacore.com>
15273         * exp_aggr.adb: Fix minor typos.
15275 2014-01-20  Ed Schonberg  <schonberg@adacore.com>
15277         * sem_attr.adb (Analyze_Attribute, case 'Constrained): In an
15278         instance the attribute is legal, and its value is determined
15279         statically if the type has no discriminants. This choice is
15280         more useful than rechecking the legality rule in the instance,
15281         is consistent with older usage, and is also consistent with all
15282         existing tests.
15284 2014-01-20  Arnaud Charlet  <charlet@adacore.com>
15286         * sem_cat.adb (Validate_Static_Object_Name): Change error into
15287         warning in Relaxed_Semantic_Mode.
15289 2014-01-20  Ed Schonberg  <schonberg@adacore.com>
15291         * sem_attr.adb: Code and comments cleanup.
15293 2014-01-20  Yannick Moy  <moy@adacore.com>
15295         * debug.adb Free debug flags -gnatd.D, -gnatd.G and -gnatd.V *
15296         * errout.adb (Compilation_Errors): Remove special handling in
15297         GNATprove mode.
15298         * gnat1drv.adb (Adjust_Global_Switches): Remove handling of the
15299         removed debug flags.
15300         * gnat_rm.texi: Initial documentation for Abstract_State, Depends,
15301         Global, Initial_Condition, Initializes and Refined_State pragmas and
15302         aspects.
15303         * opt.ads (Frame_Condition_Mode, Formal_Extensions,
15304         SPARK_Strict_Mode): Remove global flags.
15305         * sem_ch3.adb (Analyze_Object_Declaration): Check of no hidden state
15306         always performed now, on packages declaring a null state.
15307         (Signed_Integer_Type_Declaration): Remove ill-designed attempt
15308         at providing pedantic mode for bounds of integer types.
15309         * sem_ch4.adb (Analyze_Quantified_Expression): Warning on suspicious
15310         "some" quantified expression now issued under control of -gnatw.t,
15311         like the other warning on unused bound variable.
15312         * sem_prag.adb (Check_Precondition_Postcondition): Remove useless test
15313         on removed flag.
15314         (Analyze_Pragma): Remove tests for SPARK 2014
15315         pragmas, not officially allowed by GNAT.
15317 2014-01-20  Hristian Kirtchev  <kirtchev@adacore.com>
15319         * sem_prag.adb (Analyze_Pragma): Ensure that
15320         the sole argument of pragmas Abstract_State, Contract_Cases,
15321         Depends, Global and Initializes in in aggregate form.
15322         (Analyze_Refined_Pragma): Ensure that the sole argument of
15323         pragmas Refined_Depends, Refined_Global and Refined_State is in
15324         aggregate form.
15325         (Ensure_Aggregate_Form): New routine.
15327 2014-01-20  Doug Rupp  <rupp@adacore.com>
15329         * sem_attr.adb (Analyze_Attribute): case
15330         Attribute_Constrained => treat all prefixes as legal for Declib
15331         compatibility.
15333 2014-01-20  Hristian Kirtchev  <kirtchev@adacore.com>
15335         * sem_prag.adb (Check_Mode): Reimplement the routine.
15336         (Find_Mode): New routine.
15338 2014-01-20  Robert Dewar  <dewar@adacore.com>
15340         * sem_ch4.adb (Operator_Check): Handle additional
15341         Allow_Integer_Address cases.
15343 2014-01-20  Robert Dewar  <dewar@adacore.com>
15345         * gnat_rm.texi (Allow_Integer_Address): Remove note about not
15346         allowed if address is non-private, no longer true.
15347         * sem_prag.adb (Analyze_Pragma, case Allow_Integer_Address):
15348         Remove check for address being private, causes difficulty when
15349         pragma used in gnat.adc file and is not needed, since we guard
15350         this in Address_Integer_Convert_OK.
15351         * exp_ch7.adb: Minor reformatting.
15352         * sem_ch4.adb: Handle operator operands in Allow_Integer_Address mode.
15354 2014-01-20  Robert Dewar  <dewar@adacore.com>
15356         * checks.adb (Apply_Range_Check): Remove gnatprove special
15357         casing of exponentiation.
15358         * sem_res.adb (Resolve_Op_Expon): Apply range check to right
15359         operand for integer case to check range against Natural.
15361 2014-01-20  Robert Dewar  <dewar@adacore.com>
15363         * s-tataat.adb: Minor reformatting.
15365 2014-01-20  Robert Dewar  <dewar@adacore.com>
15367         * einfo.adb (Is_Descendent_Of_Address): Now applies to all
15368         entities, and also fix documentation to remove mention of visible
15369         integer type, since this is not what the implementation does.
15370         * einfo.ads (Is_Descendent_Of_Address): Now applies to all
15371         entities, and also fix documentation to remove mention of visible
15372         integer type, since this is not what the implementation does.
15373         * gnat_rm.texi: Minor clarification of Allow_Integer_Address
15374         function.
15375         * sem_ch4.adb (Analyze_One_Call): Handle Allow_Integer_Address
15376         case for parameter type check.
15377         * sem_res.adb (Resolve): Use new function
15378         Address_Integer_Convert_OK.
15379         * sem_type.adb: Minor code reorganization (use Ekind_In) Minor
15380         reformatting throughout.
15381         * sem_util.adb (Address_Integer_Convert_OK): New function.
15382         * sem_util.ads: Minor reformatting (put specs in alpha order)
15383         (Address_Integer_Convert_OK): New function.
15385 2014-01-20  Thomas Quinot  <quinot@adacore.com>
15387         * exp_ch7.adb (Wrap_Transient_Expression):
15388         Insertion extra conditional expression only if
15389         Opt.Suppress_Control_Flow_Optimizations is set.
15391 2014-01-20  Arnaud Charlet  <charlet@adacore.com>
15393         * s-tataat.adb (Initialize_Attributes): Abort might already be
15394         deferred in Create_Task.
15396 2014-01-20  Hristian Kirtchev  <kirtchev@adacore.com>
15398         * checks.adb (Apply_Scalar_Range_Check): Flag
15399         the exponent as requiring a range check when the expression is
15400         an exponentiation.
15402 2014-01-20  Fedor Rybin  <frybin@adacore.com>
15404         * gnat_ugn.texi: Documenting --passed-tests option for gnattest.
15406 2014-01-20  Hristian Kirtchev  <kirtchev@adacore.com>
15408         * sem_util.adb (Default_Initialization): New routine.
15409         * sem_util.ads: Add new type Default_Initialization_Kind.
15410         (Default_Initialization): New routine.
15412 2014-01-20  Hristian Kirtchev  <kirtchev@adacore.com>
15414         * sem_prag.adb (Check_Mode): Correct all error
15415         message logic dealing with in/in out parameters that may appear
15416         as inputs or have a self reference.
15418 2014-01-20  Robert Dewar  <dewar@adacore.com>
15420         * exp_ch9.adb, checks.adb, exp_intr.adb: Minor reformatting.
15421         * sem_res.adb (Resolve): Fix error causing infinite loop for
15422         integer used as address. Allow addresses as integers.
15424 2014-01-20  Arnaud Charlet  <charlet@adacore.com>
15426         * s-osinte-linux.ads (struct_sigaction): Fix rep clause.
15428 2014-01-20  Bob Duff  <duff@adacore.com>
15430         * par-ch8.adb (P_Use_Type_Clause): Detect syntax
15431         error when "use all" is not followed by "type".
15433 2014-01-20  Bob Duff  <duff@adacore.com>
15435         * exp_intr.adb (Expand_Unc_Deallocation): Remove warning on abort
15436         followed by free.
15438 2014-01-20  Ed Schonberg  <schonberg@adacore.com>
15440         * checks.adb (Apply_Address_Clause_Check): If there is an
15441         alignment check on the expression in an address clause, and there
15442         is no local exception propagation, add an additional explanatory
15443         message to clarify the cause of previous warning.
15445 2014-01-20  Robert Dewar  <dewar@adacore.com>
15447         * exp_ch7.adb: Minor reformatting.
15448         * opt.ads: Minor comment updates.
15449         * sem.adb: Minor name change Is_Main_Unit =>
15450         Is_Main_Unit_Or_Main_Unit_Spec.
15451         * sem_ch6.adb: Minor reformatting and code reorganization.
15453 2014-01-20  Bob Duff  <duff@adacore.com>
15455         * gnat_ugn.texi: Update gnatpp switches.
15457 2014-01-20  Thomas Quinot  <quinot@adacore.com>
15459         * exp_ch9.adb: Minor comment edit.
15461 2014-01-20  Robert Dewar  <dewar@adacore.com>
15463         * gnat_rm.texi: Document that Allow_Integer_Address is permitted
15464         only if System.Address is a private type.
15465         * opt.ads (Allow_Integer_Address): No longer set by -gnates.
15466         * sem_prag.adb (Analyze_Pragma, case Allow_Integer_Address):
15467         Allowed only if type System.Address is private, since otherwise
15468         it makes no sense.
15469         * sem_res.adb: Fix failure to properly Analyze unchecked
15470         conversions that were introduced by Allow_Integer_Address.
15471         * switch-c.adb: Remove -gnates switch.
15472         * usage.adb: Remove -gnates switch.
15473         * gnat_ugn.texi: Remove documentation of -gnates flag.
15475 2014-01-20  Ed Schonberg  <schonberg@adacore.com>
15477         * sem_ch6.adb (Analyze_Expression_Function): Pre-analyze and
15478         resolve expression to perform proper name capture.
15480 2014-01-20  Ed Schonberg  <schonberg@adacore.com>
15482         * sem.adb (Semantics): When saving/restoring configuration
15483         switches, the spec of a pre- defined unit that is the main unit
15484         must be treated as a predefined unit as well.
15486 2014-01-20  Thomas Quinot  <quinot@adacore.com>
15488         * exp_ch7.adb (Wrap_Transient_Expression): For a Boolean
15489         expression, insert an extra conditional expression when saving
15490         the value of the expression, for the benefit of control flow
15491         graph based coverage analysis.
15492         * exp_ch3.adb: Minor reformatting.
15494 2014-01-20  Robert Dewar  <dewar@adacore.com>
15496         * gnat1drv.adb: Set Allow_Integer_Address in relaxed semantics mode.
15497         * gnat_rm.texi: Document pragma Allow_Integer_Address.
15498         * gnat_ugn.texi: Document pragma Allow_Integer_Address, -gnates.
15499         * opt.ads: New flag Allow_Integer_Address.
15500         * par-prag.adb: Dummy entry for pragma Allow_Integer_Address.
15501         * sem_ch5.adb: Minor reformatting.
15502         * sem_prag.adb: Implement pragma Allow_Integer_Address.
15503         * sem_res.adb (Resolve): Allow integer address value if
15504         switch set.
15505         * sem_util.adb: Minor reformatting.
15506         * snames.ads-tmpl: Add entry for pragma Allow_Integer_Address.
15507         * switch-c.adb: Recognize flag -gnates.
15508         * usage.adb: Document flag -gnates.
15510 2014-01-20  Thomas Quinot  <quinot@adacore.com>
15512         * s-tadeca.adb: Fix minor typos in comment.
15514 2014-01-20  Pascal Obry  <obry@adacore.com>
15516         * s-win32.ads (FreeLibrary): New import.
15518 2014-01-20  Robert Dewar  <dewar@adacore.com>
15520         * sem_res.adb, sem_cat.adb: Minor reformatting.
15521         * sem_ch11.adb (Analyze_Raise_Statement): Only give warning about
15522         assigning to OUT parameters for the current subprogram scope.
15523         * exp_ch4.adb: Minor reformatting.
15525 2014-01-20  Ed Schonberg  <schonberg@adacore.com>
15527         * exp_ch4.adb (Process_Transient_Object,
15528         Find_Enclosing_Contexts): If the top-level if-expression that
15529         generated the transient object is an actual in a call, the proper
15530         Hook_Context is a construct enclosing the call.
15531         * einfo.ads: Indicate that Related_Expression is used to link a
15532         loop variable to the container expression over which the loop
15533         takes place.
15534         (Analyze_Iterator_Specification): Set the Related_Expression of
15535         the loop variable in a container element iterator.
15536         (Note_Possible_Modification): If the variable is the loop
15537         variable in a container element iterator, indicate that the
15538         enclosing container is also modified.
15540 2014-01-20  Hristian Kirtchev  <kirtchev@adacore.com>
15542         * aspects.adb (Move_Or_Merge_Aspects): Reimplemented.
15544 2014-01-20  Robert Dewar  <dewar@adacore.com>
15546         * s-taasde.ads, gnat_ugn.texi, s-tadeca.adb, sem_res.adb, s-tadeca.ads:
15547         Minor reformatting and code clean up.
15549 2014-01-20  Arnaud Charlet  <charlet@adacore.com>
15551         * sem_cat.adb (Validate_Object_Declaration): Relax semantics
15552         of objects of private type if Relaxed_RM_Semantics.
15554 2014-01-20  Claire Dross  <dross@adacore.com>
15556         * a-cofove.ads (Vector): Capacity discriminant
15557         should be in range of the index.
15559 2014-01-20  Thomas Quinot  <quinot@adacore.com>
15561         * a-caldel.ads(To_Duration), s-taasde.ads(Time_Enqueue):
15562         Clarify specs s-tadeca.adb(Enqueue_Calendar): Compensate for
15563         possible difference between epoch of Ada.Calendar clock and Ada
15564         real-time/tasking clock.
15565         * s-taprop-posix.adb: Minor comment fix.
15567 2014-01-20  Doug Rupp  <rupp@adacore.com>
15569         * sysdep.c [vxworks]: Remove Vxworks version noise for RTP.
15571 2014-01-20  Hristian Kirtchev  <kirtchev@adacore.com>
15573         * exp_attr.adb (Expand_N_Attribute_Reference): Generate validity
15574         checks on the prefix of attribute 'Old.
15575         * sem_ch3.adb (Process_Range_Expr_In_Decl): Suppress the
15576         generation of validity checks on a range that belongs to the
15577         iteration scheme of a quantified expression.
15578         * sem_ch5.adb (One_Bound): Suppress the generation of validity
15579         checks on a bound that belongs to the iteration scheme of a
15580         quantified expression, generate the check in all other cases.
15582 2014-01-20  Bob Duff  <duff@adacore.com>
15584         * gnat_ugn.texi: Enable --pp-new by default. Minor reorganization.
15586 2014-01-20  Ed Schonberg  <schonberg@adacore.com>
15588         * sem_res.adb (Resolve): When compiling a predefined unit, ignore
15589         interpretations that do not come from other predefined units,
15590         to prevent spurious ambiguities in the presence of user-defined
15591         operators in the context of (an instance of) a predefined unit.
15593 2014-01-20  Robert Dewar  <dewar@adacore.com>
15595         * gnat_rm.texi: Document that Loop_Variant is included in
15596         Statement_Assertions.
15597         * sem_prag.adb (Check_Kind): Add Loop_Variant to
15598         Statement_Assertions (Check_Applicable_Policy): Add Loop_Variant
15599         to Statement_Assertions.
15601 2014-01-20  Doug Rupp  <rupp@adacore.com>
15603         * sysdep.c (__gnat_is_file_not_found_error) [vxworks6]: Add case
15604         for errno ENOENT from RTP on NFS mounted file system.
15606 2014-01-20  Ed Schonberg  <schonberg@adacore.com>
15608         * sem_util.adb (Check_Function_Writable_Actuals): 1) Do not
15609         examine code that does not come from source. The check does not
15610         apply to code generated for constraint checks, and such code may
15611         generate spurious error messages when compiled with expansion
15612         disabled (as in a generic unit) because side effects may not
15613         have been removed.
15614         2) Make error messages more explicit: indicate the component
15615         of the  construct whose value is indeterminate because of a
15616         call to a function with in-out parameter in another component,
15617         when there is no mandated order of execution between the two
15618         components (actuals, aggregate components, alternatives).
15620 2014-01-20  Robert Dewar  <dewar@adacore.com>
15622         * gnat_rm.texi: Minor cleanup.
15624 2014-01-20  Hristian Kirtchev  <kirtchev@adacore.com>
15626         * sem_attr.adb (Analyze_Attribute): Attributes 'Old and 'Result
15627         can now apply to a refined postcondition.
15628         * sem_ch6.adb (Analyze_Subprogram_Contract): Remove local
15629         variable Result_Seen. Add variables Case_Prag, Post_Prag,
15630         Seen_In_Case and Seen_In_Post. Update the mechanism that detects
15631         whether postconditions and/or constract-cases mention attribute
15632         'Result and introduce a post-state when applied to functions.
15633         (Check_Result_And_Post_State): Removed.
15634         * sem_prag.adb (Analyze_Pragma): Add local variable
15635         Result_Seen. Verify that the expression of pragma Refined_Post
15636         mentions attribute 'Result and introduces a post-state.
15637         * sem_util.ads, sem_util.adb (Check_Result_And_Post_State): New routine.
15639 2014-01-20  Hristian Kirtchev  <kirtchev@adacore.com>
15641         * exp_ch7.adb (Is_Subprogram_Call): New routine.
15642         (Process_Transient_Objects): Make variable Must_Hook global with
15643         respect to all locally declared subprograms. Search the context
15644         for at least one subprogram call.
15645         (Requires_Hooking): Removed.
15647 2014-01-20  Claire Dross  <dross@adacore.com>
15649         * a-cfdlli.ads a-cfhama.ads a-cfhase.ads a-cforma.ads
15650         * a-cforse.ads a-cofove.ads: Add pragma Annotate (GNATprove,
15651         External_Axiomatization);
15653 2014-01-20  Robert Dewar  <dewar@adacore.com>
15655         * sem_attr.adb (Analyze_Attribute, case Loop_Entry): Allow
15656         Loop_Entry in Assert, Assert_And_Cut, and Assume pragmas.
15657         * sem_prag.adb (Analyze_Pragma, case Assert[_And_Cut], Assume):
15658         Allow Loop_Entry to be used in these pragmas if they appear in
15659         an appropriate context.
15660         (Placement_Error): Specialize error
15661         message for pragma Assert[_And_Cut] or pragma Assume containing
15662         Loop_Entry attribute.
15663         * a-exexpr-gcc.adb, sinput.adb: Minor reformatting.
15664         * s-excmac-arm.ads, s-except.ads, s-excmac-gcc.ads: Minor reformatting
15665         and code clean ups.
15667 2014-01-20  Robert Dewar  <dewar@adacore.com>
15669         * gnat1drv.adb: Minor comment update.
15671 2014-01-20  Tristan Gingold  <gingold@adacore.com>
15673         * raise-gcc.c (PERSONALITY_FUNCTION/arm): Remove unused
15674         variables, comment out unused code.
15675         * a-exexpr-gcc.adb: Move declarations to s-excmac-gcc.ads
15676         * s-excmac-gcc.ads: New file, extracted from a-exexpr-gcc.adb
15677         * s-excmac-arm.ads: New file.
15679 2014-01-20  Hristian Kirtchev  <kirtchev@adacore.com>
15681         * exp_ch4.adb (Expand_N_Slice): Remove constant D and variables
15682         Drange and Index_Typ. Remove the circuitry which creates a
15683         range check to compare the index type of the array against the
15684         discrete_range.
15685         * sem_res.adb (Resolve_Slice): Add local variable Dexpr. Update
15686         the circuitry which creates a range check to handle a
15687         discrete_range denoted by a subtype indication.
15689 2014-01-20  Pierre-Marie Derodat  <derodat@adacore.com>
15691         * sinput.adb, sinput.ads (Sloc_Range): Traverse the tree of original
15692         nodes to get the original sloc range.
15694 2014-01-20  Hristian Kirtchev  <kirtchev@adacore.com>
15696         * sem_prag.adb (Analyze_Pragma): Use Defining_Entity to obtain the
15697         entity of a [library level] package.
15699 2014-01-20  Tristan Gingold  <gingold@adacore.com>
15701         * raise-gcc.c (exception_class_eq): New function.
15702         (is_handled_by): Use it to compare exception classes.
15703         (PERSONALITY_STORAGE): Define.  (continue_unwind): New function to
15704         be called to return URC_CONTINUE_UNWIND.
15705         (personality_body): New function, extracted from PERSONALITY_ROUTINE.
15706         (PERSONALITY_ROUTINE): Add an implementation for the ARM unwinder.
15708 2014-01-20  Robert Dewar  <dewar@adacore.com>
15710         * opt.ads: Minor comment update.
15712 2014-01-20  Hristian Kirtchev  <kirtchev@adacore.com>
15714         * exp_ch4.adb (Expand_N_Slice): Relocate some variables and
15715         constants to the "Local variables" area. Add new constant D. Add
15716         new variables Drange and Index_Typ.  Rename Pfx to Rep and Ptp
15717         to Pref_Typ and update all occurrences. Add circuitry to extract
15718         the discrete_range and the index type and build a range check.
15720 2014-01-20  Arnaud Charlet  <charlet@adacore.com>
15722         * gnat1drv.adb (Adjust_Global_Switches): Enable
15723         Treat_Categorization_Errors_As_Warnings when Relaxed_RM_Semantics
15724         is set.
15726 2014-01-20  Thomas Quinot  <quinot@adacore.com>
15728         * sem_ch5.adb, sem_ch4.adb: Minor reformatting.
15730 2014-01-20  Hristian Kirtchev  <kirtchev@adacore.com>
15732         * sem_ch13.adb (Analyze_Aspect_Specifications):
15733         When aspect SPARK_Mode appears on a package body, insert the
15734         generated pragma at the top of the body declarations.
15736 2014-01-20  Robert Dewar  <dewar@adacore.com>
15738         * sem_aggr.adb, exp_prag.adb, sem_aux.adb, sinfo.ads, sem_ch10.adb,
15739         checks.adb, sem_prag.adb, sem_ch12.adb, freeze.adb, g-arrspl.adb,
15740         expander.adb, gnat1drv.adb, exp_ch4.adb, sem_ch6.adb,
15741         sem_ch8.adb, exp_dist.adb: Minor reformatting.
15743 2014-01-20  Yannick Moy  <moy@adacore.com>
15745         * gnat1drv.adb (Gnat1drv): Call Write_ALI with Object=True in GNATprove
15746         mode.
15748 2014-01-20  Pascal Obry  <obry@adacore.com>
15750         * g-arrspl.ads (Slice_Set): New definition (will use a copy on
15751         write scheme).
15752         * g-arrspl.adb: Adapt all routine to this new implementation.
15753         (Set): Copy the Slice_Set definition before reusing it.
15755 2014-01-20  Arnaud Charlet  <charlet@adacore.com>
15757         * sem_prag.adb (Process_Import_Or_Interface): In
15758         Relaxed_RM_Semantics, support old Ada 83 style of pragma Import.
15759         (Analyze_Pragma): Ditto for pragma Export.
15760         * exp_prag.adb (Expand_Pragma_Import_Or_Interface): Handle old pragma
15761         Import style.
15763 2014-01-20  Hristian Kirtchev  <kirtchev@adacore.com>
15765         * einfo.ads: E_Abstract_State is now part of the entities that
15766         can be overloaded. Update type Overloadable_Kind to reflect the
15767         inclusion of abstract states.
15768         * sem_ch6.adb (New_Overloaded_Entity): A function can now
15769         overload an abstract state.
15770         * sem_prag.adb (Analyze_Constituent): Handle the overloading
15771         of states by functions. Use Entity_Of to obtain the entity of
15772         a constituent.  (Analyze_Global_Item): Handle the overloading of
15773         states by functions.
15774         (Analyze_Initialization_Item): Handle the
15775         overloading of states by functions.  Use Entity_Of to obtain the
15776         entity of an item.
15777         (Analyze_Input_Item): Handle the overloading
15778         of states by functions. Use Entity_Of to obtain the entity of an item.
15779         (Analyze_Input_Output): Handle the overloading of states by functions.
15780         (Analyze_Refinement_Clause): Handle the overloading
15781         of states by functions.  Use Entity_Of to obtain the entity of an item.
15782         (Appears_In): Use Entity_Of to obtain the entity of an element.
15783         (Check_Usage): Use Entity_Of to obtain the entity of
15784         an item. Add a guard to prevent a crash due to a previous error.
15785         (Resolve_State): New routine.
15787 2014-01-20  Yannick Moy  <moy@adacore.com>
15789         * spark_xrefs.ads, debug.adb, gnat1drv.adb, errout.adb, errout.ads,
15790         opt.ads: Minor comments updates.
15792 2014-01-20  Hristian Kirtchev  <kirtchev@adacore.com>
15794         * einfo.adb (Non_Limited_View): Applies to abstract states.
15795         (Set_From_Limited_With): Applies to abstract states.
15796         (Set_Non_Limited_View): Applies to abstract states.
15797         (Write_Field17): Output the non-limited view of an abstract state.
15798         * einfo.ads: Update the comment on usage and occurrences in
15799         nodes for attributes From_Limited_With and Non_Limited_View.
15800         * sem_aux.adb (Available_View): This routine can now handle
15801         abstract states.
15802         * sem_aux.ads (Available_View): This routine can now handle
15803         abstract states. Update the comment on usage.
15804         * sem_ch8.adb (Find_Expanded_Name): Handle abstract views
15805         of states and variables.
15806         (In_Pragmas_Depends_Or_Global): New routine.
15807         * sem_ch10.adb (Build_Limited_Views): Implement
15808         abstract (limited) views of variables and states.
15809         (Build_Shadow_Entity): This routine is now a procedure. Add
15810         formal parameter Shadow. Update the comment on usage. Add
15811         context-specific decoration for states and variables.
15812         (Decorate_State): New routine.  (Decorate_Variable): New routine.
15813         (Find_And_Process_States): New routine.
15814         (Process_Declarations): Renamed to Process_Declarations_And_States.
15815         (Process_Declarations_And_States): Add formal parameters
15816         Pack and Create_Abstract_Views. Update the comment on usage.
15817         (Process_States): New routine.
15818         * sem_prag.adb (Check_Dependency_Clause): Handle abstract
15819         views of states and variables. Match the abstract view of a state
15820         against its corresponding non-abstract view.
15821         (Is_Matching_Input):
15822         Handle abstract views of states and variables. Match the abstract
15823         view of a state against its corresponding non-abstract view.
15824         (Process_Global_Item): Handle abstract views of states and
15825         variables.
15827 2014-01-20  Bob Duff  <duff@adacore.com>
15829         * sem_ch10.adb (Expand_With_Clause): Don't
15830         recurse on the prefix if the current with-ed name refers to a
15831         package that renames its own parent, eg "package P.Q renames P;".
15833 2014-01-20  Yannick Moy  <moy@adacore.com>
15835         * exp_spark.adb (Expand_SPARK_Call): Remove procedure.
15836         * opt.adb, opt.ads (Full_Expander_Active): Remove function.
15837         * checks.adb, exp_ch6.adb, exp_ch9.adb, exp_disp.adb, sem_aggr.adb,
15838         * sem_ch10.adb, sem_ch5.adb, sem_ch6.adb, sem_ch8.adb, sem_ch9.adb,
15839         * sem_disp.adb, sem_res.adb Replace Full_Expander_Active by
15840         Expander_Active.
15842 2014-01-20  Yannick Moy  <moy@adacore.com>
15844         * sinfo.ads Update documentation of GNATprove mode.
15846 2014-01-20  Yannick Moy  <moy@adacore.com>
15848         * adabkend.adb, ali-util.adb, errout.adb, exp_ch7.adb,
15849         * exp_dbug.adb, freeze.adb, lib-xref.adb, restrict.adb,
15850         * sem_attr.adb, sem_ch4.adb, sem_ch5.adb, sem_ch6.adb, sem_ch8.adb,
15851         * sem_prag.adb, sem_res.adb, sem_util.adb Rename SPARK_Mode into
15852         GNATprove_Mode.
15853         * sem_ch13.adb: Remove blank.
15854         * exp_spark.adb, exp_spark.ads (Expand_SPARK_Call): Only replace
15855         subprograms by alias for renamings, not for inherited primitive
15856         operations.
15857         * exp_util.adb (Expand_Subtype_From_Expr): Apply the expansion
15858         in GNATprove mode.
15859         (Remove_Side_Effects): Apply the removal in
15860         GNATprove mode, for the full analysis of expressions.
15861         * expander.adb (Expand): Call the light SPARK expansion in GNATprove
15862         mode.
15863         (Expander_Mode_Restore, Expander_Mode_Save_And_Set): Ignore
15864         save/restore actions for Expander_Active flag in GNATprove mode,
15865         similar to what is done in ASIS mode.
15866         * frontend.adb (Frontend): Generic bodies are instantiated in
15867         GNATprove mode.
15868         * gnat1drv.adb (Adjust_Global_Switches): Set operating
15869         mode to Check_Semantics in GNATprove mode, although a light
15870         expansion is still performed.
15871         (Gnat1drv): Set Back_End_Mode to
15872         Declarations_Only in GNATprove mode, and later on special case
15873         the GNATprove mode to continue analysis anyway.
15874         * lib-writ.adb (Write_ALI): Always generate ALI files in
15875         GNATprove mode.
15876         * opt.adb, opt.ads (Full_Expander_Active): Make it equivalent to
15877         Expander_Active.
15878         (SPARK_Mode): Renamed as GNATprove_Mode.
15879         * sem_aggr.adb (Aggregate_Constraint_Checks): Add checks in the
15880         tree in GNATprove_Mode.
15881         * sem_ch12.adb (Analyze_Package_Instantiation): Always instantiate
15882         body in GNATprove mode.
15883         (Need_Subprogram_Instance_Body): Always instantiate body in GNATprove
15884         mode.
15885         * sem_ch3.adb (Constrain_Index, Process_Range_Expr_In_Decl):
15886         Make sure side effects are removed in GNATprove mode.
15888 2014-01-20  Eric Botcazou  <ebotcazou@adacore.com>
15890         * gcc-interface/decl.c (gnat_to_gnu_entity) <object>: Robustify tests
15891         for aliased objects with an unconstrained nominal subtype.
15892         * gcc-interface/trans.c (Call_to_gnu): Likewise.
15893         (gnat_to_gnu) <case N_Op_Not>: Robustify test for private type.
15894         <case N_Op_Minus>: Remove useless code.
15895         (Exception_Handler_to_gnu_zcx): Minor tweaks.
15897 2014-01-20  Eric Botcazou  <ebotcazou@adacore.com>
15899         * gcc-interface/decl.c (gnat_to_gnu_entity) <case E_Record_Subtype>:
15900         Tidy up.  For a subtype with discriminants and variant part, if a
15901         variant is statically selected and the fields all have a constant
15902         position, put them in order of increasing position.  Likewise if
15903         no variant part but representation clause is present.
15904         * gcc-interface/utils.c (make_packable_type): Robustify.
15905         (maybe_pad_type): Use local variable and tidy up condition.  If no
15906         alignment is specified, use the original one.
15907         (create_type_stub_decl): Minor tweak.
15908         (convert) <case VECTOR_CST>: Fix typo.
15909         <case CONSTRUCTOR>: Deal with padding types around the same type.
15910         Do not punt on missing fields.
15911         (unchecked_convert): Call finish_record_type to lay out the special
15912         record types made for conversions from/to problematic integer types.
15913         Bump the alignment of CONSTRUCTORs before converting them to a more
15914         aligned type.
15916 2014-01-20  Eric Botcazou  <ebotcazou@adacore.com>
15918         * gcc-interface/decl.c (gnat_to_gnu_entity) <case E_Component>: Remove
15919         obsolete code for type_annotate_only mode, simplify code and slightly
15920         improve wording of comments.
15922 2014-01-12  Eric Botcazou  <ebotcazou@adacore.com>
15924         PR ada/59772
15925         * gcc-interface/cuintp.c (build_cst_from_int): Use 32-bit integer type
15926         as intermediate type.
15927         (UI_To_gnu): Likewise.
15929 2014-01-03  Eric Botcazou  <ebotcazou@adacore.com>
15931         * gnatvsn.ads (Current_Year): Bump to 2014.
15933 2014-01-02  Tobias Burnus  <burnus@net-b.de>
15935         * gnat_ugn.texi: Bump @copying's copyright year.
15937 Copyright (C) 2014 Free Software Foundation, Inc.
15939 Copying and distribution of this file, with or without modification,
15940 are permitted in any medium without royalty provided the copyright
15941 notice and this notice are preserved.