1 2014-10-17 Ed Schonberg <schonberg@adacore.com>
3 * sem_ch13.adb (Add_Invariants): For a class-wide type invariant,
4 preserve semantic information on the invariant expression
5 (typically a function call) because it may be inherited by a
6 type extension in a different unit, and it cannot be resolved
7 by visibility elsewhere because it may refer to local entities.
9 2014-10-17 Robert Dewar <dewar@adacore.com>
11 * gnat_rm.texi: Document that string literal can be used for
12 pragma Warnings when operating in Ada 83 mode.
14 2014-10-17 Ed Schonberg <schonberg@adacore.com>
16 * freeze.adb (Find_Aggregate_Component_Desig_Type): New
17 subsidiary function to Freeze_ Expression, used to determine
18 whether an aggregate for an array of access types also freezes the
19 designated type, when some aggregate components are allocators.
21 2014-10-17 Ed Schonberg <schonberg@adacore.com>
23 * a-strsea.adb (Find_Token): AI05-031 indicates that the
24 procedure must raise Index_Error when Source is not empty and
25 the From parameter is not within the range of the Source string.
27 2014-10-17 Robert Dewar <dewar@adacore.com>
29 * sem_prag.adb (Is_Static_String_Expression): Allow string
30 literal in Ada 83 mode.
32 2014-10-17 Vincent Celier <celier@adacore.com>
34 * prj-conf.adb (Get_Config_Switches): In CodePeer mode, do
35 not take into account any compiler command from package IDE.
37 2014-10-17 Ed Schonberg <schonberg@adacore.com>
39 * sem_ch12.adb (Build_Function_Wrapper): The formals of the
40 wrapper must have the same identifiers as those of the formal
41 subprogram, because calls within the generic may use named
44 2014-10-17 Robert Dewar <dewar@adacore.com>
46 * sem_ch3.adb, a-strsea.adb: Minor reformatting.
47 * par-ch6.adb (P_Subprogram): Fix bad handling of null procedures.
49 2014-10-17 Ed Schonberg <schonberg@adacore.com>
51 * sem_ch3.adb (Build_Derived_Enumeration_Type): Propagate aspect
52 specfications from original type declaration to declaration of
53 implicit base, because original node is rewritten as a subtype
54 declaration on which type aspects do not belong.
56 2014-10-17 Hristian Kirtchev <kirtchev@adacore.com>
58 * sem_ch3.adb (Propagate_Default_Init_Cond_Attributes): A derived type
59 inherits the attributes related to pragma Default_Initial_Condition
62 2014-10-17 Ed Schonberg <schonberg@adacore.com>
64 * a-strsea.adb (Index - versions with a From parameter):
65 According to AI05-056, the Index functions with a From parameter
66 return 0 if the source is an empty string.
68 2014-10-17 Hristian Kirtchev <kirtchev@adacore.com>
70 * sem_prag.adb (Analyze_Refined_Depends_In_Decl_Part): Disable
71 the consistency checks in ASIS mode.
73 2014-10-17 Arnaud Charlet <charlet@adacore.com>
75 * s-expmod.ads: Minor typo fix.
77 2014-10-17 Robert Dewar <dewar@adacore.com>
79 * sem_util.adb: Minor reformatting.
81 2014-10-17 Ed Schonberg <schonberg@adacore.com>
83 * sem_ch12.adb (Build_Function_Wrapper): Build wrappers for
84 actuals that are defaulted subprograms of the formal subprogram
87 2014-10-17 Robert Dewar <dewar@adacore.com>
89 * exp_ch4.adb (Expand_N_Op_Eq): Make sure we deal with the
90 implementation base type.
91 * sinfo.ads: Add a note for N_Op_Eq and N_Op_Ne that record
92 operands are always expanded out into component comparisons.
94 2014-10-17 Robert Dewar <dewar@adacore.com>
96 * s-vallli.adb: Minor comment correction.
97 * s-valuti.ads: Minor comment reformatting.
99 2014-10-17 Robert Dewar <dewar@adacore.com>
101 * gnat_rm.texi: Document System.Atomic_Counters.
102 * impunit.adb: Add System.Atomic_Counters (s-atocou.ads) to the
103 list of user- accessible units added as children of System.
104 * s-atocou.ads: Update comment.
106 2014-10-17 Arnaud Charlet <charlet@adacore.com>
108 * s-expmod.ads: Add comments.
110 2014-10-17 Hristian Kirtchev <kirtchev@adacore.com>
112 * sem_ch3.adb (Build_Derived_Record_Type): Remove the propagation
113 of all attributes related to pragma Default_Initial_Condition.
114 (Build_Derived_Type): Propagation of all attributes related
115 to pragma Default_Initial_Condition.
116 (Process_Full_View): Account for the case where the full view derives
117 from another private type and propagate the attributes related
118 to pragma Default_Initial_Condition to the private view.
119 (Propagate_Default_Init_Cond_Attributes): New routine.
120 * sem_util.adb: Alphabetize various routines.
121 (Build_Default_Init_Cond_Call): Use an unchecked type conversion
122 when calling the default initial condition procedure of a private type.
123 (Build_Default_Init_Cond_Procedure_Declaration): Prevent
124 the generation of multiple default initial condition procedures.
126 2014-10-17 Robert Dewar <dewar@adacore.com>
128 * prj-conf.adb: Revert previous change.
130 2014-10-17 Robert Dewar <dewar@adacore.com>
132 * lib-writ.ads, s-valdec.ads: Minor reformatting.
134 2014-10-17 Ed Schonberg <schonberg@adacore.com>
136 * sem_ch12.adb: Additional work on function wrappers.
138 2014-10-17 Eric Botcazou <ebotcazou@adacore.com>
140 * exp_util.adb (Possible_Bit_Aligned_Component): Also recurse
141 on the renamed object of renamings.
143 2014-10-17 Vincent Celier <celier@adacore.com>
145 * prj-conf.adb (Parse_Project_And_Apply_Config): In CodePeer
146 mode, always use the native target.
148 2014-10-16 Andrew MacLeod <amacleod@redhat.com>
150 * gcc-interface/misc.c: Adjust include files.
152 2014-10-13 Eric Botcazou <ebotcazou@adacore.com>
153 Alan Modra <amodra@gmail.com>
156 * uintp.adb (Vector_To_Uint): Move from here to...
157 * uintp.ads (UI_Vector): Make public.
158 (Vector_To_Uint): ...here.
160 2014-10-10 Robert Dewar <dewar@adacore.com>
162 * freeze.adb, sem_attr.adb: Minor reformatting.
164 2014-10-10 Johannes Kanig <kanig@adacore.com>
166 * a-cfdlli.ads, a-cfhama.ads, a-cfhase.ads, a-cforma.ads,
167 a-cforse.ads, a-cofove.ads: add "Default_Initial_Condition"
170 2014-10-10 Vincent Celier <celier@adacore.com>
172 * prj-conf.adb (Do_Autoconf): In Codepeer mode, do not try to get
173 any configuration switches from the project file.
175 2014-10-10 Ed Schonberg <schonberg@adacore.com>
177 * sem_ch12.adb (Build_Wrapper): Renamed as Build_Operator_Wrapper.
178 (Build_Function_Wrapper): New function, to construct a wrapper
179 function for actuals that are functions with an arbitrary
180 number of parameters. Used in GNATProve mode to simplify proof
181 propagation in instantiations.
183 2014-10-10 Robert Dewar <dewar@adacore.com>
185 * freeze.adb, gnat1drv.adb, sem_ch13.adb: Minor reformatting and
188 2014-10-10 Hristian Kirtchev <kirtchev@adacore.com>
190 * sem_res.adb (Is_OK_Volatile_Context): Allow
191 a volatile object reference to appear as the expression of a
194 2014-10-10 Ed Schonberg <schonberg@adacore.com>
196 * sem_ch13.adb (Analyze_Aspect_Specifications, Library_Unit_Aspects):
197 Aspect specification is legal on a local instantiation of a
198 library-level generic unit.
200 2014-10-10 Gary Dismukes <dismukes@adacore.com>
202 * gnat1drv.adb (Adjust_Global_Switches): Set Front_End_Inlining
203 if inlining has been enabled via -gnatn and the target is not GCC.
205 2014-10-10 Ed Schonberg <schonberg@adacore.com>
207 * freeze.adb (Freeze_Entity): Freezing a subprogram does
208 not always freeze its profile. In particular, an attribute
209 reference that takes the access type does not freeze the types
212 2014-10-10 Robert Dewar <dewar@adacore.com>
214 * errout.adb (Adjust_Name_Case): New procedure.
215 (Set_Msg_Node): Use Adjust_Name_Case.
216 * errout.ads (Adjust_Name_Case): New procedure.
217 * exp_intr.adb (Add_Source_Info): Minor code reorganization
219 (Write_Entity_Name): Use Errout.Adjust_Name_Case.
220 * sem_prag.adb (Is_Non_Significant_Pragma_Reference): Review
221 and fix up entries in Sig_Flags, and correct logical errors in
223 * sprint.adb (Sprint_Node_Actual): Properly print string for
226 2014-10-10 Ed Schonberg <schonberg@adacore.com>
228 * sem_ch3.adb (Analyze_Object_Declaration): For an object of an
229 anonymous array type with delayed aspects, defer freezing of
230 type until object itself is frozen.
231 * freeze.adb (Freeze_Entity): When freezing an object of an
232 anonymous array type with delayed aspects, remove freeze node of
233 object after freezing type, to prevent out-of-order elaboration
234 in the back-end. The initialization call for the object has
235 already been constructed when expanding the object declaration.
237 2014-10-10 Robert Dewar <dewar@adacore.com>
239 * exp_intr.adb (Write_Entity_Name): Moved to outer level
240 (Write_Entity_Name): Properly handle operator names
241 (Expand_Source_Info): New procedure.
242 * exp_intr.ads (Add_Source_Info): New procedure.
244 2014-10-10 Robert Dewar <dewar@adacore.com>
246 * butil.ads: Minor reformatting.
247 * sem_ch5.adb: Code clean up.
249 2014-10-10 Robert Dewar <dewar@adacore.com>
251 * exp_ch11.adb (Expand_N_Raise_Statement): Handle
252 Prefix_Exception_Messages.
253 * opt.adb: Handle new flags Prefix_Exception_Message[_Config].
254 * opt.ads: New flags Prefix_Exception_Message[_Config].
255 * par-prag.adb: New dummy entry for pragma Prefix_Exception_Messages.
256 * snames.ads-tmpl: Add entries for new pragma Prefix_Exception_Messages.
257 * sem_prag.adb: Implement new pragma Prefix_Exception_Messages
258 * gnat_rm.texi: Document pragma Prefix_Exception_Messages.
260 2014-10-10 Gary Dismukes <dismukes@adacore.com>
262 * sinfo.ads, gnat_ugn.texi, a-except.adb, a-except-2005.adb,
263 raise-gcc.c Spelling changes (prolog => prologue, epilog => epilogue).
265 2014-10-10 Ed Schonberg <schonberg@adacore.com>
267 * sem_ch5.adb (Is_Wrapped_In_Block): Handle properly blocks that
268 contain pragmas generated for loop invariants and type predicates.
269 Clarify use of this subprogram.
271 2014-10-10 Yannick Moy <moy@adacore.com>
273 * sem_prag.adb (Analyze_Global_Item): Accept formal objects in Global
275 * errout.adb, errout.ads (SPARK_Msg_NE): Issue error unless
278 2014-10-10 Vadim Godunko <godunko@adacore.com>
280 * a-stwima.adb (To_Sequence): Compute size of result array.
282 2014-10-10 Javier Miranda <miranda@adacore.com>
284 * gnat_ugn.texi (Interfacing with C++ at the Class Level): Update the
285 sources of the example to avoid a warning when the Ada files are
286 automatically generated by the binding generator.
288 2014-10-10 Ed Schonberg <schonberg@adacore.com>
290 * sem_attr.adb (Resolve_Attribute, case 'Update): Set
291 Do_Range_Check on the expression of a record component
292 association when needed, as is done for array components, when
293 the corresponding type is a scalar type.
295 2014-10-10 Gary Dismukes <dismukes@adacore.com>
297 * a-coinho-shared.adb: Minor typo fix.
298 * prj-env.ads: Minor reformatting.
300 2014-10-10 Hristian Kirtchev <kirtchev@adacore.com>
302 * sem_res.adb (Resolve_String_Literal): Do not
303 generate a string literal subtype for the default expression of
304 a formal parameter in GNATprove mode.
306 2014-10-10 Yannick Moy <moy@adacore.com>
308 * errout.adb (SPARK_Msg_N): Issue error unless SPARK_Mode is Off.
310 2014-10-10 Ed Schonberg <schonberg@adacore.com>
312 * exp_ch5.adb (Expand_Formal_Container_Element_Loop): Analyze
313 declaration for loop parameter before rest of loop, and set
314 entity kind to prevent assignments to it in the user code.
315 * sem_ch3.adb (Analyze_Object_Contract): No contracts apply to the
316 loop parameter in an element iteration over o formal container.
318 2014-10-10 Robert Dewar <dewar@adacore.com>
320 * gnat_ugn.texi: Document use of user-level routines to handle
321 e.g. col major arrays.
323 2014-10-10 Doug Rupp <rupp@adacore.com>
325 * s-osinte-android.adb: Fix misspelling.
326 * gsocket.h: Tweak the Android quirks.
328 2014-10-10 Robert Dewar <dewar@adacore.com>
330 * errout.ads (SPARK_Msg_N): Fix spec to match change in body.
332 2014-10-10 Robert Dewar <dewar@adacore.com>
334 * sem_ch13.adb: Minor code reorganization.
336 2014-10-10 Pat Rogers <rogers@adacore.com>
338 * gnat_rm.texi: Text now indicates pragma No_Run_Time is not
341 2014-10-10 Vadim Godunko <godunko@adacore.com>
343 * a-coinho-shared.adb: Add minor comment.
344 * a-stzmap.adb (To_Sequence): Compute size of result array.
346 2014-10-10 Javier Miranda <miranda@adacore.com>
348 * exp_ch3.adb (Build_Init_Procedure): Complete the condition of an
349 if-stmt to match its current documentation.
351 2014-10-10 Robert Dewar <dewar@adacore.com>
353 * sem_ch7.adb, einfo.adb, einfo.ads, sem_prag.adb, sem_ch12.adb,
354 freeze.adb, sem_util.adb, sem_res.adb, exp_ch6.adb, exp_ch13.adb,
355 sem_ch6.adb, sem_cat.adb, sem_disp.adb
356 (Is_Subprogram_Or_Generic_Subprogram): New primitive. Use this primitive
357 throughout where appropriate.
359 2014-10-10 Bob Duff <duff@adacore.com>
361 * a-coinho-shared.ads: Minor reformatting.
362 * s-traceb.adb: Minor clean up.
364 2014-10-10 Robert Dewar <dewar@adacore.com>
366 * ali.adb (Scan_ALI): Read and process new GP flag on ALI P line.
367 * ali.ads (GNATprove_Mode): New component in ALI table.
368 (GNATprove_Mode_Specified): New global.
369 * gnatbind.adb (Gnatbind): Give fatal error if any file compiled
371 * lib-writ.ads, lib-writ.adb (GP): New flag on P line for
374 2014-10-10 Javier Miranda <miranda@adacore.com>
376 * exp_ch3.adb (Build_Init_Procedure): Adding assertion.
377 (Build_Init_Statement): Ensure that statements
378 associated with the parent components are located at the beginning
379 of the returned list of statements.
381 2014-10-10 Ed Schonberg <schonberg@adacore.com>
383 * sem_ch13.adb (Inherit_Aspects_At_Freeze_Node): If the full
384 view of a private type T that has a type invariant is a scalar
385 or constrained array type, the base type created for the full
386 view has the same type invariant.
388 2014-10-10 Robert Dewar <dewar@adacore.com>
390 * exp_util.ads, sem_ch12.adb, exp_util.adb, i-fortra.ads: Minor code
393 2014-09-22 Eric Botcazou <ebotcazou@adacore.com>
395 * gcc-interface/decl.c (gnat_to_gnu_entity): Adjust comment.
396 * gcc-interface/utils.c (gnat_write_global_declarations): Fix typo.
398 2014-09-15 Jakub Jelinek <jakub@redhat.com>
400 * gcc-interface/Make-lang.in (check_acats_numbers0,
401 check_acats_numbers1, check_acats_numbers2, check_acats_numbers3,
402 check_acats_numbers4, check_acats_numbers5, check_acats_numbers6,
403 check_acats_numbers, check_acats_subdirs): New variables.
404 (check_acats_targets): Use $(check_acats_subdirs).
405 (check-acats, check-acats%): Rewritten so that for parallelized
406 testing each job runs all the chapters files, with
407 GCC_RUNTEST_PARALLELIZE_DIR set in environment. Prepare the support
408 directory sequentially and share it.
409 (check-acats-subtargets): Always print just check-acats.
411 2014-08-25 Martin Liska <mliska@suse.cz>
413 * gcc-interface/utils.c (rest_of_subprog_body_compilation): Adjust to
414 new cgraph interface.
415 (gnat_write_global_declarations): Likewise.
417 2014-08-13 Sylvestre Ledru <sylvestre@debian.org>
419 * 9drpc.adb: Fix a typo
420 * s-interr.ads: Likewise
421 * s-taskin.ads: Likewise
422 * s-traces.ads: Likewise
425 2014-08-12 Joel Sherrill <joel.sherrill@oarcorp.com>
427 * socket.c: For RTEMS, use correct prototype of gethostbyname_r().
428 * gsocket.h Add include of <unistd.h> on RTEMS.
430 2014-08-11 Joel Sherrill <joel.sherrill@oarcorp.com>
432 * s-osinte-rtems.adb: Correct formatting of line in license block.
434 2014-08-04 Claire Dross <dross@adacore.com>
436 * exp_util.adb (Get_First_Parent_With_Ext_Axioms_For_Entity):
437 For an instance, look at the scope before the generic parent.
439 2014-08-04 Yannick Moy <moy@adacore.com>
441 * lib-writ.ads: Update comments.
442 * sem_disp.ads, sem_disp.adb (Inherited_Subprograms): Add
443 parameters to filter inherited subprograms.
445 2014-08-04 Robert Dewar <dewar@adacore.com>
447 * gnat_rm.texi: Add section on use of address clause for memory
450 2014-08-04 Ed Schonberg <schonberg@adacore.com>
452 * sem_ch3.adb (Analyze_Subtype_Declaration): A subtype, in
453 particular the subtype created for a generic actual, inherits
454 invariant information from the base type.
456 2014-08-04 Robert Dewar <dewar@adacore.com>
458 * aspects.ads, aspects.adb: Add entries for aspect Obsolescent.
459 * gnat_rm.texi: Add documentation for aspect Obsolescent.
460 * sem_ch13.adb (Analyze_Aspect_Specifications): Implement aspect
462 (Check_Aspect_At_Freeze_Point): Add dummy entry for pragma Obsolescent.
463 * s-osprim-mingw.adb: Minor reformatting.
464 * sem_res.adb (Is_Atomic_Ref_With_Address): New function
465 (Resolve_Indexed_Component): Rework warnings for non-atomic access
466 (Resolve_Selected_Component): Add warnings for non-atomic access.
468 2014-08-04 Doug Rupp <rupp@adacore.com>
470 * g-calend.adb (timeval_to_duration, duration_to_timeval): Change sec
472 * g-calend.ads (timeval): Bump up size to accomodate sec type.
473 * s-taprop-linux.adb (timeval_to_duration): Change sec formal to
475 * s-osprim-posix.adb (timeval): Bump up size to accomodate
477 (timeval_to_duration): Change sec formal to Long_Long_Integer
478 * s-osinte-darwin.adb (timeval): Bump up
479 size to accomodate new sec type.
480 (timeval_to_duration): Change sec formal to long_long
481 * s-osinte-android.adb: Likewise.
482 * cal.c (__gnat_timeal_to_duration, __gnat_duration_to_timeval): Change
483 sec formal from long to long long.
485 2014-08-04 Robert Dewar <dewar@adacore.com>
487 * sem_res.adb (Resolve_Qualified_Expression): Make sure
488 Do_Range_Check flag gets set.
490 2014-08-04 Robert Dewar <dewar@adacore.com>
492 * einfo.ads, einfo.adb (Is_Standard_String_Type): New function.
493 * exp_ch3.adb (Build_Array_Init_Proc): Use
494 Is_Standard_String_Type.
495 (Expand_Freeze_Array_Type): ditto.
496 (Get_Simple_Init_Val): ditto.
497 (Needs_Simple_Initialization): ditto.
498 * sem_eval.adb (Eval_String_Literal): Use Is_Standard_String_Type.
499 * sem_warn.adb (Is_Suspicious_Type): Use Is_Standard_String_Type.
501 2014-08-04 Pascal Obry <obry@adacore.com>
503 * adaint.c (__gnat_try_lock): Use _tcscpy and _tcscat instead of
504 _stprintf which insert garbage into the wfull_path buffer.
506 2014-08-04 Arnaud Charlet <charlet@adacore.com>
508 * cal.c: Remove old VMS/nucleus code. Remove obsolete vxworks
510 * fe.h: Minor reformatting.
512 2014-08-04 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
514 * cstreams.c: (_LARGEFILE_SOURCE): Guard definition.
516 2014-08-04 Robert Dewar <dewar@adacore.com>
518 * par-ch13.adb (Get_Aspect_Specifications): Improve error
519 recovery, fixing a -gnatQ bomb.
521 2014-08-04 Yannick Moy <moy@adacore.com>
523 * sem_ch3.adb (Analyze_Object_Declaration): In GNATprove mode,
524 do not generate two Itypes with the same name for an array
526 * sinfo.ads: Expand doc on GNATprove mode.
528 2014-08-04 Hristian Kirtchev <kirtchev@adacore.com>
530 * exp_ch3.adb (Expand_Freeze_Record_Type): Set the finalization
531 master and storage pool attributes on the root type of an
532 anonymous access type.
533 * exp_ch4.adb (Expand_N_Allocator): Set the finalization master
534 and storage pool attributes on the root type of an anonymous
537 2014-08-04 Arnaud Charlet <charlet@adacore.com>
539 * exp_ch3.adb: Minor reformatting.
540 * tb-alvms.c, tb-alvxw.c, tb-ivms.c: Removed.
541 * tracebak.c: Remove use of above files.
542 * gcc-interface/Makefile.in: Update dependencies.
544 2014-08-04 Pierre-Marie Derodat <derodat@adacore.com>
546 * gcc-interface/utils.c (gnat_set_type_context): Also set the
547 context for parallel types' TYPE_STUB_DECL. Do not change
548 anything if the context is already set for them.
549 (gnat_pushdecl): Update the comment for calls to
550 gnat_set_type_context to mention parallel types.
551 (add_parallel_type): When adding a context-less parallel type to
552 a type that has a context, propagate the context from the latter
554 (process_deferred_decl_context): Call gnat_set_type_context
555 rather than manually setting the type context.
556 (build_unc_object_type): Call gnat_set_type_context on the
559 2014-08-04 Ed Schonberg <schonberg@adacore.com>
561 * exp_ch5.adb (Expand_N_Case_Statement): If a choice is a
562 subtype indication and the case statement has only two choices,
563 replace subtype indication with its range, because the resulting
564 membership test cannot have a subtype indication as an operand.
566 2014-08-04 Arnaud Charlet <charlet@adacore.com>
568 * exp_ch3.adb: Update comments, minor reformatting.
570 2014-08-04 Hristian Kirtchev <kirtchev@adacore.com>
572 * sem_ch3.adb (Analyze_Declarations): Explain why the bodies of
573 the default initial condition procedures are build here.
574 * sem_util.adb (Build_Default_Init_Cond_Procedure): Wrap the
575 analyzed argument of pragma Default_Initial_Condition in some
576 dummy code as GNATprove mode disables assertions, but still
577 needs to see the argument.
579 2014-08-04 Robert Dewar <dewar@adacore.com>
581 * exp_ch6.adb, sem_util.adb: Minor reformatting.
583 2014-08-04 Olivier Hainque <hainque@adacore.com>
585 * a-comutr.ads: Set Root_Node_Type'Alignment to
586 Standard'Maximum_Alignment, so that it is at least as large as
587 the max default for Tree_Node_Type'Alignment.
589 2014-08-04 Hristian Kirtchev <kirtchev@adacore.com>
591 * exp_ch3.adb (Freeze_Type): Remove the generation and inheritance
592 of the default initial condition procedure [body].
593 * sem_ch3.adb (Analyze_Declarations): Create the bodies of
594 all default initial condition procedures at the end of private
595 declaration analysis.
596 * sem_util.adb (Build_Default_Init_Cond_Procedure_Bodies): New
598 (Build_Default_Init_Cond_Procedure_Body): Merged in the
599 processing of routine Build_Default_Init_Cond_Procedure_Bodies.
600 * sem_util.ads (Build_Default_Init_Cond_Procedure_Bodies):
602 (Build_Default_Init_Cond_Procedure_Body): Removed.
604 2014-08-04 Ed Schonberg <schonberg@adacore.com>
606 * sem_elab.adb (Check_Elab_Call): Do not check a call to a
608 * exp_ch6.adb (Expand_Call): Clarify handling of inserted
611 2014-08-04 Hristian Kirtchev <kirtchev@adacore.com>
613 * sem_prag.adb (Analyze_Pragma): Ensure that an
614 internally generated spec for a stand alone body is recognized
615 as a proper context for pragma SPARK_Mode.
617 2014-08-04 Robert Dewar <dewar@adacore.com>
619 * erroutc.adb (Delete_Msg): Do not decrement Warnings_Treated_As_Errors.
621 2014-08-04 Arnaud Charlet <charlet@adacore.com>
623 * adabkend.adb (Scan_Back_End_Switches): Ignore extra -o
624 when -gnatO has already been specified, for compatibility
626 (Scan_Compiler_Args): Do not call Set_Output_Object_File_Name in
628 * g-expect.ads: Fix typo.
630 2014-08-04 Thomas Quinot <quinot@adacore.com>
632 * exp_ch4.adb (Insert_Dereference_Action): the actual Size
633 must account for the bounds template if the designated type is
634 an unconstrained array.
636 2014-08-04 Hristian Kirtchev <kirtchev@adacore.com>
638 * a-cfhama.adb, a-cfhase.adb, a-cforma.adb, a-cforse.adb Add
639 SPARK_Mode in the body.
640 * sem_ch7.adb (Analyze_Package_Body_Helper): Restore the original
641 way to verify the consistency of SPARK_Mode between a spec and
643 * sem_ch12.adb (Analyze_Package_Instantiation): Remove the call
644 to Set_Ignore_Pragma_SPARK_Mode. Set flag Ignore_Pragma_SPARK_Mode
646 (Analyze_Subprogram_Instantiation): Remove the call to
647 Set_Ignore_Pragma_SPARK_Mode. Set flag Ignore_Pragma_SPARK_Mode
649 * sem_prag.adb (Analyze_Pragma): Remove local variable
650 Inst_Id. SPARK_Mode can no longer be applied to a package or
651 subprogram instantiation.
652 * sem_util.adb, sem_util.ads (Set_Ignore_Pragma_SPARK_Mode):
655 2014-08-04 Robert Dewar <dewar@adacore.com>
657 * sem_prag.adb, osint.adb, osint.ads: Minor reformatting.
659 2014-08-04 Yannick Moy <moy@adacore.com>
661 * sem_ch3.adb (Derive_Type_Declaration,
662 Process_Discriminants): Remove SPARK-specific legality checks.
664 2014-08-04 Thomas Quinot <quinot@adacore.com>
666 * g-sechas.ads, g-sechas.adb (HMAC_Initial_Context): New subprogram.
667 * gnat_rm.texi (GNAT.MD5/SHA1/SHA224/SHA256/SHA512): Document support
670 2014-08-04 Hristian Kirtchev <kirtchev@adacore.com>
672 * sem_ch7.adb (Analyze_Package_Body_Helper): When verifying the
673 compatibility of SPARK_Mode between a spec and a body, use the
674 SPARK_Mode of the public part.
675 * sem_ch12.adb (Analyze_Generic_Subprogram_Declaration): Use
676 the already available routine to exchange the aspects between
677 the template and its copy. Analyze the aspects of copy to
678 ensure that the corresponding pragmas perform their semantic
679 effects. The partial analysis of aspects is no longer needed.
680 (Analyze_Package_Instantiation): Save and restore the SPARK_Mode
682 (Analyze_Subprogram_Instantiation): Save and restore the SPARK_Mode of
684 * sem_prag.adb (Analyze_Pragma): Do not bypass a subprogram
685 instantiation which does not come from source.
687 2014-08-04 Hristian Kirtchev <kirtchev@adacore.com>
689 * a-cfhama.ads, a-cfhase.ads, a-cforma.ads, a-cforse.ads Add
690 SPARK_Mode pragmas to the public and private part of the unit.
691 * sem_ch3.adb (Derive_Type_Declaration): Ensure that a derived
692 type cannot have discriminants if the parent type already has
694 (Process_Discriminants): Ensure that the type of a discriminant is
696 * sem_ch6.adb (Analyze_Subprogram_Body_Helper): The check on
697 SPARK_Mode compatibility between a spec and a body can now be
698 safely performed while processing a generic.
699 * sem_ch7.adb (Analyze_Package_Body_Helper): The check on
700 SPARK_Mode compatibility between a spec and a body can now be
701 safely performed while processing a generic.
702 * sem_prag.adb (Analyze_Pragma): Pragma SPARK_Mode can now be
703 safely analyzed when processing a generic.
705 2014-08-04 Nicolas Roche <roche@adacore.com>
707 * g-dirope.adb: Minor reformating.
709 2014-08-04 Robert Dewar <dewar@adacore.com>
711 * sem_ch6.adb: Minor reformatting.
713 2014-08-04 Ed Schonberg <schonberg@adacore.com>
715 * sem_prag.adb (Analyze_Pragma, case Assert and related pragmas):
716 Before normalizing these pragmas into a pragma Check, preanalyze
717 the optional Message argument, (which is subsequently copied)
718 so that it has the proper semantic information for ASIS use.
719 * sem_case.adb: Initialize flag earlier.
720 * osint.adb, osint.ads (Find_File): Add parameter Full_Name, used when
721 the full source path of a configuration file is requested.
722 (Read_Source_File): Use Full_Name parameter..
724 2014-08-04 Hristian Kirtchev <kirtchev@adacore.com>
726 * opt.ads Alphabetize various global flags. New flag
727 Ignore_Pragma_SPARK_Mode along with a comment on usage.
728 * sem_ch6.adb (Analyze_Generic_Subprogram_Body):
729 Pragma SPARK_Mode is now allowed in generic units.
730 (Analyze_Subprogram_Body_Helper): Do not verify the compatibility
731 between the SPARK_Mode of a spec and that of a body when inside
733 * sem_ch7.adb (Analyze_Package_Body_Helper): Do not verify the
734 compatibility between the SPARK_Mode of a spec and that of a
735 body when inside a generic.
736 * sem_ch12.adb (Analyze_Generic_Subprogram_Declaration):
737 Pragma SPARK_Mode is now allowed in generic units.
738 (Analyze_Package_Instantiation): Save and restore the value of
739 flag Ignore_ Pragma_SPARK_Mode in a stack-like fasion. Set
740 the governing SPARK_Mode before analyzing the instance.
741 (Analyze_Subprogram_Instantiation): Save and restore the value
742 of flag Ignore_ Pragma_SPARK_Mode in a stack-like fasion. Set
743 the governing SPARK_Mode before analyzing the instance.
744 * sem_ch13.adb (Analyze_Aspect_Specifications): Emulate the
745 placement of a source pragma when inserting the generated pragma
746 for aspect SPARK_Mode.
747 * sem_prag.adb (Analyze_Pragma): Reimplement the handling of
748 pragma SPARK_Mode to allow for generics and their respective
750 * sem_util.ads, sem_util.adb (Check_SPARK_Mode_In_Generic): Removed.
751 (Set_Ignore_Pragma_SPARK_Mode): New routine.
753 2014-08-04 Eric Botcazou <ebotcazou@adacore.com>
755 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Component>: Deal with
756 renaming discriminants in tagged types first.
757 * gcc-interface/trans.c (gnat_to_gnu) <N_Selected_Component>: Test
758 the underlying type of the prefix.
759 (Pragma_to_gnu, case Pragma_Warning): Ignore Reason => "..."
760 (process_freeze_entity): Reset the nodes of all the view of a type,
763 2014-08-04 Doug Rupp <rupp@adacore.com>
764 Olivier Hainque <hainque@adacore.com>
766 * gcc-interface/Makefile.in (x86 VxWorks): Add filter-out for vxworks7
767 and remove incorrect EH_MECHANISM macros.
768 Add sigtramp.h to EXTRA_LIBGNAT_SRCS when we add sigtramp-vxworks.o to
771 2014-08-04 Robert Dewar <dewar@adacore.com>
773 * exp_attr.adb (Expand_N_Attribute_Reference): Make sure prefix
774 of constructed 'Valid attribute in -gnatVa mode does not appear
776 * sem_attr.adb (Analyze_Access_Attribute): Don't set
777 Never_Set_In_Source for non-source reference.
778 * sem_util.adb: Minor reformatting.
779 * sem_warn.adb (Check_References): Don't check Address_Taken,
780 not necessary, see comment.
782 2014-08-04 Robert Dewar <dewar@adacore.com>
784 * sem_util.adb, sem_case.adb: Minor reformatting.
786 2014-08-04 Ed Schonberg <schonberg@adacore.com>
788 * exp_ch9.adb (Extract_Entry): If the synchronized object is a
789 limited view, replace with non-limited view, which is available
790 at the point of an entry call.
792 2014-08-04 Ed Schonberg <schonberg@adacore.com>
794 * exp_ch6.adb (Expand_Call): If the call is to a function in
795 a run-time unit that is marked Inline_Always, we must suppress
796 debugging information on it, so that the code that is eventually
797 inlined will not affect debugging of the user program.
799 2014-08-04 Robert Dewar <dewar@adacore.com>
801 * inline.adb, einfo.ads, s-tassta.adb, s-tarest.adb: Minor comment
804 2014-08-04 Ed Schonberg <schonberg@adacore.com>
806 * sem_prag.adb (Process_Import_Or_Interface): Handle properly
807 an aspect Import that specifies a False value.
809 2014-08-04 Robert Dewar <dewar@adacore.com>
811 * gnat_rm.texi: Add section on aspect Invariant'Class.
813 2014-08-04 Ed Schonberg <schonberg@adacore.com>
815 * sem_case.adb (Check_Choice_Set): New flag Predicate_Error,
816 for better control of cascaded error messages when some choice
817 in a case statement over a predicated type violates the given
820 2014-08-04 Hristian Kirtchev <kirtchev@adacore.com>
822 * sem_ch3.adb (Build_Derived_Type): Modify the
823 inheritance of the rep chain to ensure that a non-tagged type's
824 items are not clobbered during the inheritance.
826 2014-08-04 Robert Dewar <dewar@adacore.com>
828 * sem_ch3.adb, einfo.ads: Minor reformatting.
830 2014-08-04 Yannick Moy <moy@adacore.com>
832 * inline.adb (Can_Be_Inlined_In_GNATprove_Mode): Fix
833 detection of subprograms that cannot be inlined in GNATprove mode.
835 2014-08-04 Ed Schonberg <schonberg@adacore.com>
837 * einfo.adb: Add guard to Returns_Limited_View.
839 2014-08-04 Jose Ruiz <ruiz@adacore.com>
841 * s-tassta.adb, s-tarest.adb (Task_Wrapper): Force maximum alignment of
842 the secondary stack to respect the alignments of the returned objects.
844 2014-08-04 Ed Schonberg <schonberg@adacore.com>
846 * einfo.ads, einfo.adb (Returns_Limited_View): New flag defined
847 on function entities whose return type is a limited view.
848 * freeze.adb (Freeze_Entity): Use Returns_Limited_View to determine
849 where to place the freeze node for a function that returns the
850 limited view of a type, when the function is called and frozen
853 2014-08-04 Eric Botcazou <ebotcazou@adacore.com>
855 * sem_ch3.adb (Build_Derived_Private_Type): Minor code
858 2014-08-04 Robert Dewar <dewar@adacore.com>
860 * gnat_ugn.texi: Clarify documentation on assertions.
862 2014-08-04 Ed Schonberg <schonberg@adacore.com>
864 * sem_aggr.adb (Resolve_Record_Aggregate, Get_Value): Warn
865 if a component association has a box initialization when the
866 component type has no default initialization, either through an
867 initial value, an aspect, or an implicit initialization procedure.
869 2014-08-04 Ed Schonberg <schonberg@adacore.com>
871 * freeze.adb: Code clean up.
873 2014-08-04 Thomas Quinot <quinot@adacore.com>
875 * sem_ch5.adb: Minor reformatting.
877 2014-08-04 Ed Schonberg <schonberg@adacore.com>
879 * freeze.adb (Late_Freeze_Subprogram): Following AI05-151,
880 a function can return a limited view of a type declared
881 elsewhere. In that case the function cannot be frozen at the end
882 of its enclosing package. If its first use is in a different unit,
883 it cannot be frozen there, but if the call is legal the full view
884 of the return type is available and the subprogram can now be
885 frozen. However the freeze node cannot be inserted at the point
886 of call, but rather must go in the package holding the function,
887 so that the backend can process it in the proper context.
889 2014-08-04 Robert Dewar <dewar@adacore.com>
891 * exp_ch5.adb, sem_ch5.adb, einfo.ads: Minor reformatting.
893 2014-08-04 Arnaud Charlet <charlet@adacore.com>
895 * sem_ch4.adb (Operator_Check): Refine previous change.
897 2014-08-04 Arnaud Charlet <charlet@adacore.com>
899 * sem_scil.ads: Improve comments.
900 * sem_ch4.adb (Analyze_Equality_Op): Add support for
901 Allow_Integer_Address (equality between Address and Integer).
903 2014-08-04 Yannick Moy <moy@adacore.com>
905 * a-cfhama.adb, a-cforse.adb: Minor fixes to avoid using prefix
906 notation on untagged objects.
907 * sem.ads: Update comment.
908 * inline.adb (Can_Be_Inlined_In_GNATprove_Mode): Do
909 not inline subprograms declared in the visible part of a package.
911 2014-08-04 Ed Schonberg <schonberg@adacore.com>
913 * exp_ch5.adb: minor reformatting.
914 * einfo.ads, einfo.adb (Is_Processed_Transient): Applies to loop
917 2014-08-04 Thomas Quinot <quinot@adacore.com>
919 * s-fatgen.adb: Minor reformatting.
921 2014-08-04 Arnaud Charlet <charlet@adacore.com>
923 * exp_util.adb (Is_Possibly_Unaligned_Object): Always return
926 2014-08-04 Ed Schonberg <schonberg@adacore.com>
928 * sem_ch5.adb (Analyze_Loop_Statement): Set properly the kind of
929 the loop parameter for element iterators over containers and
930 arrays, so that improper uses of it are detected in the loop
931 body when expansion is disabled.
932 * exp_ch5.adb (Expand_Iterator_Loop): The entity kind of the
933 generated cursor is that of the analyzed loop parameter.
935 2014-08-04 Hristian Kirtchev <kirtchev@adacore.com>
937 * exp_ch3.adb (Build_CPP_Init_Procedure): Remove
938 Flag_Decl. Do not analyze the declaration of the flag as it is
939 not part of the tree yet, instead add it to the freeze actions
942 2014-08-04 Robert Dewar <dewar@adacore.com>
944 * checks.adb (Apply_Scalar_Range_Check): Make sure we handle
945 case of OUT and IN OUT parameter correctly (where Source_Typ is
946 set), we were missing one case where a check must be applied.
948 2014-08-04 Hristian Kirtchev <kirtchev@adacore.com>
950 * sem_ch8.adb (Build_Class_Wide_Wrapper): Update the comment on
951 the generated code. Instead of hiding the renaming and using the
952 wrapper as the proper association, have the subprogram renaming
954 (Build_Spec): The entity of the wrapper is
955 now derived from the entity of the related primitive.
957 2014-08-04 Emmanuel Briot <briot@adacore.com>
959 * s-regpat.adb: s-regpat.adb (Parse): fix incorrect link when
960 using non-capturing groups.
962 2014-08-04 Ed Schonberg <schonberg@adacore.com>
964 * inline.adb (Build_Body_To_Inline): Remove Unmodified and
965 related pragmas before copying the original body, to prevent
966 spurious errors when the pragmas apply to formals that will not
967 appear in the inlined body.
969 2014-08-04 Robert Dewar <dewar@adacore.com>
971 * exp_prag.adb, sem_ch7.adb, einfo.adb, sem_prag.adb, sem_util.adb,
972 exp_ch3.adb: Minor reformatting.
974 2014-08-04 Robert Dewar <dewar@adacore.com>
976 * prj-strt.adb, prj-strt.ads, sem_attr.adb: Minor reformatting.
978 2014-08-04 Hristian Kirtchev <kirtchev@adacore.com>
980 * aspects.adb Add an entry in table Canonical_Aspect for
981 Default_Initial_Condition.
982 * aspects.ads Add an entry in tables Aspect_Id, Aspect_Argument,
983 Aspect_Names and Aspect_Delay for Default_Initial_Condition.
984 * einfo.adb Flag3 is now Has_Default_Init_Cond. Flag132
985 is now Is_Default_Init_Cond_ Procedure. Flag133 is now
986 Has_Inherited_Default_Init_Cond.
987 (Default_Init_Cond_Procedure): New routine.
988 (Has_Default_Init_Cond): New routine.
989 (Has_Inherited_Default_Init_Cond): New routine.
990 (Is_Default_Init_Cond_Procedure): New routine.
991 (Set_Default_Init_Cond_Procedure): New routine.
992 (Set_Has_Default_Init_Cond): New routine.
993 (Set_Has_Inherited_Default_Init_Cond): New routine.
994 (Set_Is_Default_Init_Cond_Procedure): New routine.
995 (Write_Entity_Flags): Output all the new flags.
996 * einfo.ads New attributes Default_Init_Cond_Procedure,
997 Has_Inherited_Default_Init_Cond and Is_Default_Init_Cond_Procedure
998 along with usage in nodes.
999 (Default_Init_Cond_Procedure): New routine.
1000 (Has_Default_Init_Cond): New routine and pragma Inline.
1001 (Has_Inherited_Default_Init_Cond): New routine and
1003 (Is_Default_Init_Cond_Procedure): New routine and
1005 (Set_Default_Init_Cond_Procedure): New routine.
1006 (Set_Has_Default_Init_Cond): New routine and pragma Inline.
1007 (Set_Has_Inherited_Default_Init_Cond): New routine and pragma Inline.
1008 (Set_Is_Default_Init_Cond_Procedure): New routine and pragma Inline.
1009 * exp_ch3.adb (Expand_N_Object_Declaration): New constant
1010 Next_N. Generate a call to the default initial condition procedure
1011 if the object's type is subject to the pragma. (Freeze_Type):
1012 Generate the body of the default initial condition procedure or
1013 inherit the spec from a parent type.
1014 * exp_ch7.adb Add with and use clause for Exp_Prag.
1015 (Expand_Pragma_Initial_Condition): Removed.
1016 * exp_prag.ads, exp_prag.adb (Expand_Pragma_Initial_Condition): New
1018 * par-prag.adb (Prag): Pragma Default_Initial_Condition does
1019 not need special treatment by the parser.
1020 * sem_ch3.adb (Build_Derived_Record_Type): Propagate the
1021 attributes related to pragma Default_Initial_Condition to the
1023 (Process_Full_View): Propagate the attributes
1024 related to pragma Default_Initial_Condition to the full view.
1025 * sem_ch7.adb (Analyze_Package_Specification): Build the
1026 declaration of the default initial condition procedure for all
1027 types that qualify or inherit the one from the parent type.
1028 * sem_ch13.adb (Analyze_Aspect_Specifications):
1029 Add processing for aspect Default_Initial_Condition.
1030 (Check_Aspect_At_Freeze_Point): Aspect
1031 Default_Initial_Condition does not require delayed analysis.
1032 (Replace_Type_References_Generic): Moved to spec.
1033 * sem_ch13.ads (Replace_Type_References_Generic): Moved from body.
1034 * sem_prag.adb Add an entry in table Sif_Glags for
1035 Default_Initial_Condition.
1036 (Analyze_Pragma): Pragma
1037 Default_Initial_Condition is now part of assertion
1038 policy. Add processing for pragma Default_Initial_Condition.
1039 (Is_Valid_Assertion_Kind): Pragma Default_Initial_Condition is
1040 now recognized as a proper assertion policy.
1041 * sem_util.ads, sem_util.adb (Build_Default_Init_Cond_Call): New
1043 (Build_Default_Init_Cond_Procedure_Body): New routine.
1044 (Build_Default_Init_Cond_Procedure_Declaration): New routine.
1045 (Inherit_Default_Init_Cond_Procedure): New routine.
1046 * snames.ads-tmpl Add new predefined name and pragma id for
1047 Default_Initial_Condition.
1049 2014-08-04 Vincent Celier <celier@adacore.com>
1051 * prj-dect.adb (Parse_Case_Construction): It is no longer
1052 an error if the variable for a case construction is not
1053 typed, only if the variable value is not a single string. Call
1054 Parse_Choice_List and End_Case_Construction with the new parameter
1055 to indicate that the variable is typed.
1056 * prj-strt.adb (End_Case_Construction): Only check the labels
1057 if the variable is typed. If the variable is not typed,
1058 issue a warning when there is no "when others" allternative.
1059 (Parse_Choice_List): Manage the labels only if the variable
1061 * prj-strt.ads (End_Case_Construction): New Boolean parameter
1063 (Parse_Choice_List): Ditto.
1065 2014-08-04 Ed Schonberg <schonberg@adacore.com>
1067 * sem_ch5.adb: Additional fix to Check_Predicate_Use.
1069 2014-08-04 Vincent Celier <celier@adacore.com>
1071 * projects.texi: Update documentation of case constructions with
1072 variables that are not typed.
1074 2014-08-04 Ed Schonberg <schonberg@adacore.com>
1076 * sem_ch8.adb (Build_Class_Wide_Wrapper): If the operator carries
1077 an Eliminated pragma, indicate that the wrapper is also to be
1078 eliminated, to prevent spurious errors when using gnatelim on
1079 programs that include box-initialization of equality operators
1080 (consequence of AI05-071)..
1082 2014-08-04 Robert Dewar <dewar@adacore.com>
1084 * checks.adb (Activate_Overflow_Check): Handle floating-point
1086 * checks.ads (Activate_Overflow_Check): Clarify handling of
1087 floating-point cases.
1088 * exp_util.adb (Check_Float_Op_Overflow): Reset Do_Overflow_Check
1089 flag if we generate an explicit overflow check (for
1090 Check_Float_Overflow mode).
1092 2014-08-04 Robert Dewar <dewar@adacore.com>
1094 * prj-proc.adb, prj-part.adb, prj-strt.adb, prj.adb, prj.ads,
1095 prj-attr.adb, prj-attr.ads: Minor reformatting.
1097 2014-08-04 Yannick Moy <moy@adacore.com>
1099 * expander.adb (Expand): Always perform special
1100 expansion in GNATprove mode, even when doing pre-analysis.
1102 2014-08-04 Thomas Quinot <quinot@adacore.com>
1104 * repinfo.adb (List_Scalar_Storage_Order): List bit order if
1105 not default. Also list bit order if SSO is specified. Do not
1106 assume that bit order is always equal to scalar storage order.
1108 2014-08-04 Thomas Quinot <quinot@adacore.com>
1110 * freeze.adb (Set_SSO_From_Default): Do not set scalar storage
1111 order to reverse SSO for a type that has an explicit native
1114 2014-08-04 Doug Rupp <rupp@adacore.com>
1116 * cal.c: Macro check for VxWorks7.
1117 * init.c (getpid): Likewise.
1118 * mkdir.c (__gnat_mkdir): Likewise.
1119 * sysdep.c (__gnat_is_file_not_found_error): Likewise.
1121 2014-08-04 Gary Dismukes <dismukes@adacore.com>
1123 * exp_ch3.adb (Expand_N_Object_Declaration): Inhibit generation
1124 of an invariant check in the case where No_Initialization is set,
1125 since the object is uninitialized.
1127 2014-08-04 Thomas Quinot <quinot@adacore.com>
1129 * snames.ads-tmpl (Default_Scalar_Storage_Order): Now an attribute
1130 name, in addition to a pragma name.
1131 * snames.adb-tmpl (Get_Pragma_Id, Is_Configuration_Pragma_Name,
1132 Is_Pragma_Name): Adjust accordingly.
1133 * sem_attr.ads, sem_attr.adb, exp_attr.adb
1134 (Attribute_Default_Scalar_Storage_Order): Add handling of new
1136 * gnat_rm.texi: Document the above.
1138 2014-08-04 Arnaud Charlet <charlet@adacore.com>
1140 * exp_util.adb (Check_Float_Op_Overflow): No-op in codepeer
1141 mode for now, to revert to previous behavior.
1142 * checks.adb: Revert previous change, no longer needed.
1144 2014-08-04 Robert Dewar <dewar@adacore.com>
1146 * gnat1drv.adb (Adjust_Global_Switches): Don't set
1147 Check_Float_Overflow if Machine_Oveflows_On_Target is True.
1148 * sem_prag.adb (Analyze_Pragma, case Check_Float_Overflow): Don't
1149 set Check_Float_Overflow if Machine_Oveflows_On_Target is True.
1150 * switch-c.adb (Scan_Front_End_Switches): Don't set
1151 Check_Float_Overflow if Machine_Oveflows_On_Target is True.
1153 2014-08-04 Vincent Celier <celier@adacore.com>
1155 * prj-attr.adb: Add new default indications for
1156 attributes Object_Dir, Exec_Dir, Source_Dirs and Target.
1157 (Attribute_Default_Of): New function (Initialize): Set the
1158 default for those attributes that have one specified.
1159 * prj-attr.ads (Attribute_Data): New component Default.
1160 * prj-proc.adb (Expression): Take into account the new defaults
1161 for attributes Object_Dir, Exec_Dir and Source_Dirs.
1162 * prj-strt.adb (Attribute_Reference): Set the default for
1164 * prj-tree.ads, prj-tree.adb (Default_Of): New function.
1165 (Set_Default_Of): New procedure.
1166 * prj.adb (The_Dot_String): New global Name_Id variable,
1167 initialized in procedure Initialize.
1168 (Dot_String): New function
1169 (Initialize): Initialize The_Dot_String.
1170 (Reset): Create the string list Shared.Dot_String_List.
1171 * prj.ads (Attribute_Default_Value): New enumeration type.
1172 (Project_Qualifier): Change enumeration value Dry to Abstract_Project.
1173 (Dot_String): New function.
1174 (Shared_Project_Tree_Data): New string list component Dot_String_List.
1175 * projects.texi: Document new defaults for attribute Object_Dir,
1176 Exec_Dir and Source_Dirs.
1178 2014-08-04 Robert Dewar <dewar@adacore.com>
1180 * sem_ch12.adb: Minor reformatting.
1182 2014-08-04 Arnaud Charlet <charlet@adacore.com>
1184 * exp_util.adb, checks.adb (Check_Float_Op_Overflow): Add special
1185 expansion in CodePeer_Mode.
1186 (Selected_Range_Checks): Add handling of overflow checks in
1189 2014-08-04 Robert Dewar <dewar@adacore.com>
1191 * exp_attr.adb (Expand_N_Attribute_Reference, case Pred):
1192 Remove special test for Float'First, no longer required.
1193 (Expand_N_Attribute_Reference, case Succ): Remove special test
1194 for Float'First, no longer required.
1195 * s-fatgen.adb (Pred): return infinity unchanged.
1198 2014-08-04 Claire Dross <dross@adacore.com>
1200 * sem_ch12.adb (Analyze_Associations): Defaults should only be
1201 used if there is no explicit match.
1202 * exp_util.adb (Get_First_Parent_With_Ext_Axioms_For_Entity):
1203 Also check for pragma external_axiomatization on generic units.
1205 2014-08-04 Robert Dewar <dewar@adacore.com>
1207 * checks.adb (Activate_Overflow_Check): Remove
1208 Check_Float_Overflow processing.
1209 (Apply_Scalar_Range_Check): Ditto.
1210 (Generate_Range_Check): Ditto.
1211 * exp_ch4.adb (Expand_N_Op_Add): Add call to
1212 Check_Float_Op_Overflow.
1213 (Expand_N_Op_Divide): ditto.
1214 (Expand_N_Op_Multiply): ditto.
1215 (Expand_N_Op_Subtract): ditto.
1216 * exp_util.ads, exp_util.adb (Check_Float_Op_Overflow): New procedure.
1217 * sem_attr.adb (Analyze_Attribute, case Pred): Make sure
1218 Do_Range_Check is set for floating-point case in -gnatc or
1220 (Analyze_Attribute, case Succ): Make sure
1221 Do_Range_Check is set for floating-point case in -gnatc or
1223 * sem_res.adb (Resolve_Type_Conversion): Make sure Do_Range_Check
1224 flag is set for real to integer conversion in GNATprove or
1227 2014-08-04 Gary Dismukes <dismukes@adacore.com>
1229 * sem_ch13.adb (Analyze_Aspect_Specifications): Resolve
1230 the expression of an Import or Export aspect as type Boolean
1231 and require it to be static. Add ??? comment. Also, set the
1232 Is_Exported flag when appropriate.
1234 2014-08-04 Robert Dewar <dewar@adacore.com>
1236 * exp_ch4.adb: Minor reformatting.
1237 * exp_attr.adb: Minor reformatting.
1239 2014-08-04 Thomas Quinot <quinot@adacore.com>
1241 * s-fatgen.ads, s-fatgen.adb (S, P): New visible type declarations
1242 (Unaligned_Valid): Remove now unused subprogram.
1243 * exp_attr.adb (Expand_N_Attribute_Reference, case
1244 Attribute_Valid): If the prefix is in reverse SSO or potentially
1245 unaligned, copy it using a byte copy operation to a temporary
1247 * einfo.adb: Minor comment fix.
1249 2014-08-04 Hristian Kirtchev <kirtchev@adacore.com>
1251 * freeze.adb (Freeze_Entity): Do not freeze formal subprograms.
1253 2014-08-04 Robert Dewar <dewar@adacore.com>
1255 * s-imgrea.adb (Image_Floating_Point): Don't add space before +Inf.
1256 * s-fatgen.adb (Pred): Handle Float'First.
1257 (Succ): Handle Float'Last.
1259 2014-08-04 Ed Schonberg <schonberg@adacore.com>
1261 * sem_util.adb (Is_Potentially_Unevaluated): If the original
1262 node of a parent node in the tree is a short-circuit operation,
1263 the node is potentially unevaluated.
1265 2014-08-04 Robert Dewar <dewar@adacore.com>
1267 * sem_res.adb (Resolve_Type_Conversion): Set Do_Range_Check on
1268 conversion from a real type to an integer type.
1270 2014-08-04 Yannick Moy <moy@adacore.com>
1272 * sem_aggr.adb, sem_ch3.adb, sem_ch5.adb, sem_ch7.adb, sem_ch9.adb,
1273 sem_ch12.adb, sem_util.adb, sem_util.ads, sem_res.adb, sem_attr.adb,
1274 exp_ch6.adb, sem_ch4.adb, restrict.adb, restrict.ads, sem_ch6.adb,
1275 sem_ch8.adb, sem_ch11.adb: Update some subprogram names to refer to
1276 SPARK_05 instead of SPARK.
1278 2014-08-04 Robert Dewar <dewar@adacore.com>
1280 * sem.ads: Minor reformatting.
1281 * sem_ch13.adb (Analyze_Aspect_External_Or_Link_Name): Minor
1283 (Analyze_Aspect_Specifications, case Convention): Put External_Name
1284 before Link_Name when constructing pragma.
1286 2014-08-04 Yannick Moy <moy@adacore.com>
1288 * sem.adb, sem.ads (In_Default_Expr): Global flag that is set
1289 to True during analysis of a default component expression.
1290 (Semantics): Save and restore In_Default_Expr around analysis.
1291 * sem_ch3.adb, sem_ch3.ads (Analyze_Component_Declaration):
1292 Call new wrapper Preanalyze_Default_Expression.
1293 (Preanalyze_Default_Expression): New wrapper on
1294 Preanalyze_Spec_Expression which sets and restores In_Default_Expr.
1295 * sem_res.adb (Resolve_Call): Mark calls inside default
1296 expressions as not inlined in GNATprove mode.
1298 2014-08-04 Robert Dewar <dewar@adacore.com>
1300 * exp_ch4.adb: Minor reformatting.
1302 2014-08-04 Olivier Hainque <hainque@adacore.com>
1304 * link.c: remove const on __gnat_objlist_file_supported for AIX
1306 2014-08-04 Robert Dewar <dewar@adacore.com>
1308 * sem_util.ads: Minor addition of comment.
1310 2014-08-04 Vincent Celier <celier@adacore.com>
1312 * prj-dect.adb (Check_Package_Allowed): Allow package IDE in
1313 all projects, including aggregate and aggregate library projects.
1315 2014-08-04 Yannick Moy <moy@adacore.com>
1317 * back_end.adb (Call_Back_End): Do not call gigi in GNATprove mode.
1319 2014-08-04 Robert Dewar <dewar@adacore.com>
1321 * sem_eval.adb (Test_In_Range): Always in range for
1322 Is_Known_Valid target type, where input type has smaller or
1323 equal size and does not have biased rep.
1325 2014-08-04 Ed Schonberg <schonberg@adacore.com>
1327 * sem_attr.adb (Eval_Attribute): Constrained is not treated as
1328 a static attribute, and the Static flag must not be set on it
1329 during resolution. It may be constant-folded during expansion,
1330 but if expansion is disabled it is not a static expression.
1332 2014-08-04 Hristian Kirtchev <kirtchev@adacore.com>
1334 * sem_ch8.adb (Build_Class_Wide_Wrapper): Mark the primitive as
1335 referenced once resolution has taken place.
1337 2014-08-04 Gary Dismukes <dismukes@adacore.com>
1339 * exp_ch4.adb (Expand_N_Type_Conversion): Don't
1340 compare access levels in the case where the target type is the
1341 anonymous type of an access discriminant, since the level of
1342 such types is defined based on context. Add comment.
1344 2014-08-04 Hristian Kirtchev <kirtchev@adacore.com>
1346 * sem_ch8.adb (Build_Class_Wide_Wrapper): Handle various special
1347 cases related to equality. Remove the special processing
1348 for dispatching abstract subprograms as it is not needed.
1349 (Interpretation_Error): Add a specialized error message for
1350 predefined operators.
1351 (Is_Intrinsic_Equality): New routine.
1352 (Is_Suitable_Candidate): New routine.
1354 2014-08-04 Gary Dismukes <dismukes@adacore.com>
1356 * checks.adb: Minor comment reformatting.
1358 2014-08-04 Ed Schonberg <schonberg@adacore.com>
1360 * restrict.adb (Check_Restriction): For checked max_parameter
1361 restrictions reset Violated flag, so that subsequent violations
1362 are properly detected.
1364 2014-08-04 Robert Dewar <dewar@adacore.com>
1366 * sem_ch3.adb (Check_Initialization): Fix bad test of GNATprove
1368 (Process_Discriminants): Fix bad test of GNATprove mode
1370 2014-08-04 Hristian Kirtchev <kirtchev@adacore.com>
1372 * sem_ch12.adb (Instantiate_Formal_Subprogram):
1373 Move variable to their own section. Propagate the source
1374 location of a formal parameter to the corresponding formal of
1375 the subprogram renaming declaration. Code reformatting.
1377 2014-08-04 Arnaud Charlet <charlet@adacore.com>
1379 * g-trasym-vms-ia64.adb, g-trasym-vms-alpha.adb: Removed.
1381 2014-08-04 Ed Schonberg <schonberg@adacore.com>
1383 * exp_aggr.adb (Expand_Array_Aggregate): Do not attempt expansion
1384 if error already detected. We may reach this point in spite of
1385 previous errors when compiling with -gnatq, to force all possible
1386 errors (this is the usual ACATS mode).
1388 2014-08-04 Gary Dismukes <dismukes@adacore.com>
1390 * checks.adb (Generate_Range_Check): For the case of converting
1391 a base type with a larger range to a smaller target subtype, only
1392 use unchecked conversions of bounds in the range check followed
1393 by conversion in the case where both types are discrete. In other
1394 cases, convert to the target base type and save in a temporary
1395 followed by the range check.
1396 (Convert_And_Check_Range): New procedure factoring code to save
1397 conversion to a temporary followed by a range check (called two
1398 places in Generate_Range_Check).
1399 * exp_ch4.adb (Expand_N_Type_Conversion): Relax previous
1400 check-in, to generate range checks for conversions between
1401 any floating-point types rather than limiting it to matching
1404 2014-08-02 Trevor Saunders <tsaunders@mozilla.com>
1406 * gcc-interface/trans.c: Use hash_set instead of pointer_set.
1408 2014-08-01 Ed Schonberg <schonberg@adacore.com>
1410 * restrict.adb (Update_Restrictions): For restrictions with a
1411 maximum parameter (e.g. number of protected entries in Ravenscar)
1412 do not compute the maximum of the violation over several objects,
1413 because the restriction is per-object.
1414 (Check_Restriction): After possible message, reset the value
1415 of of a checked max_parameter restriction to zero, to prevent
1417 * sem_ch3.adb (Build_Derived_Private_Type): Use base of parent
1418 (sub)type to determine whether derived type should be on the
1419 list of private dependents of a type whose full view may become
1420 visible subsequently.
1422 2014-08-01 Olivier Hainque <hainque@adacore.com>
1424 * gcc-interface/Make-lang.in (ADA_TOOLS_FLAGS_TO_PASS, native): use
1425 $(CXX) instead of ../../xg++ to feed CXX.
1426 (CXX_LFLAGS): Remove. Now unused as the proper flags
1427 are expected to be included in the CXX variable.
1429 2014-08-01 Pierre-Marie Derodat <derodat@adacore.com>
1431 * gcc-interface/decl.c (elaborate_expression_1): Return the new
1432 variable when debug info is needed and the expression is not
1433 constant. Tag as external only new variables that are global.
1434 (gnat_to_gnu_entity): Call it after the GNU declaration is saved.
1435 * gcc-interface/trans.c (Attribute_to_gnu): Do not cache
1436 attributes for IN array parameters when their actual subtype
1438 (Compilation_Unit_to_gnu): Call it to process all remaining nodes.
1439 * gcc-interface/gigi.h (process_deferred_decl_context): New.
1440 * gcc-interface/utils.c (gnat_write_global_declarations): Do not
1441 emit debug info for ignored global declarations.
1442 (struct deferred_decl_context_node,
1443 add_deferred_decl_context, add_deferred_type_context,
1444 compute_deferred_decl_context, defer_or_set_type_context,
1445 deferred_decl_context_queue, get_debug_scope,
1446 get_global_context, process_deferred_decl_context): New.
1447 (gnat_pushdecl): Re-implement the DECL_CONTEXT and TYPE_CONTEXT
1448 computation machinery to rely on the GNAT Scope attribute.
1450 2014-08-01 Eric Botcazou <ebotcazou@adacore.com>
1452 * gcc-interface/utils2.c (build_simple_component_ref): Add guard.
1454 2014-08-01 Robert Dewar <dewar@adacore.com>
1456 * sem_ch8.adb, opt.ads Minor comment updates.
1458 2014-08-01 Hristian Kirtchev <kirtchev@adacore.com>
1460 * exp_intr.adb (Expand_Unc_Deallocation): Request a renaming
1461 from the side effects removal machinery.
1462 * exp_util.adb (Duplicate_Subexpr): Add formal parameter
1463 Renaming_Req. Update the nested call to Remove_Side_Effects.
1464 (Duplicate_Subexpr_No_Checks): Add formal parameter
1465 Renaming_Req. Update the nested call to Remove_Side_Effects.
1466 (Duplicate_Subexpr_Move_Checks): Add formal parameter
1467 Renaming_Req. Update the nested call to Remove_Side_Effects.
1468 (Remove_Side_Effects): Add formal parameter Renaming_Req. Generate
1469 an object renaming declaration when the caller requests it.
1470 * exp_util.ads (Duplicate_Subexpr): Add formal
1471 parameter Renaming_Req. Update comment on usage.
1472 (Duplicate_Subexpr_No_Checks): Add formal parameter Renaming_Req.
1473 (Duplicate_Subexpr_Move_Checks): Add formal parameter
1476 2014-08-01 Bob Duff <duff@adacore.com>
1478 * gnat_ugn.texi: Minor updates.
1480 2014-08-01 Robert Dewar <dewar@adacore.com>
1482 * atree.adb: Minor reformatting.
1484 2014-08-01 Ed Schonberg <schonberg@adacore.com>
1486 * exp_aggr.adb (Init_Hidden_Discriminants): If some ancestor is a
1487 private extension, get stored constraint, if any, from full view.
1489 2014-08-01 Robert Dewar <dewar@adacore.com>
1491 * opt.ads (No_Elab_Code_All_Pragma): New global variable.
1492 * sem_ch10.adb (Check_No_Elab_Code_All): New procedure
1493 (Analyze_Compilation_Unit): Call Check_No_Elab_Code_All
1494 (Analyze_Subunit_Context): Call Check_No_Elab_Code_All.
1495 * sem_prag.adb (Analyze_Pragma, case No_Elaboration_Code_All):
1496 Remove code for checking with's, now in sem_ch10.adb, set
1497 Opt.No_Elab_Code_All_Pragma.
1499 2014-08-01 Eric Botcazou <ebotcazou@adacore.com>
1501 * sem_ch3.adb (Copy_And_Build): Copy the declaration for
1502 access types as well and adjust the subtype mark if there are
1505 2014-08-01 Robert Dewar <dewar@adacore.com>
1507 * sem_eval.adb (Test_In_Range): Return Unknown if error posted.
1509 2014-08-01 Robert Dewar <dewar@adacore.com>
1511 * sem_ch3.adb, einfo.ads, exp_ch4.adb: Code clean ups.
1513 2014-08-01 Eric Botcazou <ebotcazou@adacore.com>
1515 * einfo.ads (Has_Private_Ancestor): Remove obsolete usage.
1516 * exp_ch4.adb (Expand_Composite_Equality): Add conversion
1517 of the actuals in the case of untagged record types too.
1518 * sem_ch3.adb (Build_Full_Derivation): New procedure to create the
1519 full derivation of a derived private type, extracted from...
1520 (Copy_And_Build): In the case of record types and most
1521 enumeration types, copy the original declaration. Build the
1522 full derivation according to the approach extracted from...
1523 (Build_Derived_Private_Type): ...here. Call Build_Full_Derivation
1524 to create the full derivation in all existing cases and also
1525 create it in the no-discriminants/discriminants case instead of
1526 deriving directly from the full view.
1527 (Is_Visible_Component): Remove obsolete code.
1528 * sem_aggr.adb (Resolve_Record_Aggregate): Likewise.
1530 2014-08-01 Arnaud Charlet <charlet@adacore.com>
1532 * fe.h (GNAT_Mode): New.
1533 * gcc-interface/decl.c (gnat_to_gnu_entity): Do not error out on
1534 reverse SSO in GNAT mode.
1536 2014-08-01 Thomas Quinot <quinot@adacore.com>
1538 * freeze.adb: Minor reformatting.
1540 2014-08-01 Thomas Quinot <quinot@adacore.com>
1542 * exp_ch3.adb (Default_Initialize_Object): Do not generate
1543 default initialization for an imported object.
1545 2014-08-01 Olivier Hainque <hainque@adacore.com>
1547 * seh_init.c (__gnat_map_SEH): Cast argument of IsBadCodePtr
1548 to the expected FARPROC type instead of void *.
1549 * adaint.c (f2t): Expect __time64_t * as second argument, in line with
1550 other datastructures.
1551 (__gnat_file_time_name_attr): Adjust accordingly.
1552 (__gnat_check_OWNER_ACL): Declare pSD as PSECURITY_DESCRIPTOR,
1554 (__gnat_check_OWNER_ACL): Declare AccessMode
1555 parameter as ACCESS_MODE instead of DWORD, in line with callers
1557 (__gnat_set_executable): Add ATTRIBUTE_UNUSED on mode,
1558 unused on win32. Correct cast of "args" on call to spawnvp.
1559 (add_handle): Cast realloc calls into their destination types.
1560 (win32_wait): Remove declaration and initialization of unused variable.
1561 (__gnat_locate_exec_on_path): Cast alloca calls
1562 into their destination types.
1563 * initialize.c (append_arg, __gnat_initialize): Cast xmalloc calls into
1564 their destination types.
1566 2014-08-01 Gary Dismukes <dismukes@adacore.com>
1568 * exp_ch4.adb (Expand_N_Type_Conversion): Expand
1569 range checks for conversions between floating-point subtypes
1570 when the target and source types are the same.
1572 2014-08-01 Robert Dewar <dewar@adacore.com>
1574 * exp_aggr.adb: Minor reformatting.
1576 2014-08-01 Eric Botcazou <ebotcazou@adacore.com>
1578 * sem_ch13.adb (Check_Indexing_Functions): Initialize
1581 2014-08-01 Arnaud Charlet <charlet@adacore.com>
1583 * gnat1drv.adb (Gnat1drv): In gnatprove mode, we now write the
1584 ALI file before we call the backend (so that gnat2why can append
1587 2014-08-01 Thomas Quinot <quinot@adacore.com>
1589 * exp_pakd.adb (Expand_Bit_Packed_Element_Set,
1590 Expand_Packed_Element_Reference): Pass additional Rev_SSO
1591 parameter indicating whether the packed array type has reverse
1592 scalar storage order to the s-pack* Set/Get routines.
1593 * s-pack*.ad* (Get, Set, GetU, SetU): New formal Rev_SSO
1594 indicating reverse scalar storage order.
1596 2014-08-01 Robert Dewar <dewar@adacore.com>
1598 * sem_ch3.adb (Check_Initialization): Set Do_Range_Check
1599 for initial component value in -gnatc or GNATprove mode.
1600 (Process_Discriminants): Same fix for default discriminant values.
1601 * sem_eval.adb (Test_In_Range): Improve accuracy of results by
1604 2014-08-01 Robert Dewar <dewar@adacore.com>
1606 * sinfo.ads: Minor comment clarification.
1608 2014-08-01 Hristian Kirtchev <kirtchev@adacore.com>
1610 * sem_ch13.adb (Analyze_Aspect_Specifications): Code
1611 reformatting. Store the generated pragma Import in the related
1612 subprogram as routine Wrap_Imported_Subprogram will need it later.
1613 * sem_prag.adb (Is_Unconstrained_Or_Tagged_Item): An item of
1614 a private type with discriminants is considered to fall in the
1615 category of unconstrained or tagged items.
1617 2014-08-01 Arnaud charlet <charlet@adacore.com>
1619 * s-os_lib.adb (Open_Append): New functions to open a file for
1620 appending. This binds to the already existing (but not used)
1622 * osint.ads, osint.adb (Open_File_To_Append_And_Check): New procedure
1623 to open a file for appending.
1624 * osint-c.ads, osint-c.adb (Open_Output_Library_Info): New procedure
1625 to open the ALI file for appending.
1627 2014-08-01 Robert Dewar <dewar@adacore.com>
1629 * sem_ch8.adb: Minor reformatting.
1631 2014-08-01 Yannick Moy <moy@adacore.com>
1633 * sem_ch13.adb (Insert_Pragma): Add special case for precondition
1634 pragmas from aspects, which need to be inserted in proper order.
1636 2014-08-01 Ed Schonberg <schonberg@adacore.com>
1638 * exp_aggr.adb (Expand_Record_Aggregate, Init_Hidden_Discriminants):
1639 Handle properly a type extension that constrains a discriminated
1640 derived type that renames other discriminants of an ancestor.
1642 2014-08-01 Thomas Quinot <quinot@adacore.com>
1644 * s-pack06.adb, s-pack10.adb, s-pack03.ads, s-pack12.adb, s-pack14.ads,
1645 s-pack25.adb: Fix minor inconsistencies and typos.
1647 2014-08-01 Hristian Kirtchev <kirtchev@adacore.com>
1649 * sem_ch8.adb (Analyze_Subprogram_Renaming): Alphabetize
1650 globals and move certain variables to the "local
1651 variable" section. Call Build_Class_Wide_Wrapper when
1652 renaming a default actual subprogram with a class-wide actual.
1653 (Build_Class_Wide_Wrapper): New routine.
1654 (Check_Class_Wide_Actual): Removed.
1655 (Find_Renamed_Entity): Code reformatting.
1656 (Has_Class_Wide_Actual): Alphabetize. Change the
1657 logic of the predicate as the renamed name may not necessarely
1658 denote the correct subprogram.
1660 2014-08-01 Eric Botcazou <ebotcazou@adacore.com>
1662 * sem_ch7.adb: Fix minor oversight in condition.
1664 2014-08-01 Bob Duff <duff@adacore.com>
1666 * projects.texi: Minor documentation improvements.
1668 2014-08-01 Robert Dewar <dewar@adacore.com>
1670 * aspects.ads, aspects.adb: Add aspect No_Elaboration_Code_All.
1671 * gnat_rm.texi: Document No_Elaboration_Code_All pragma and aspect.
1672 * lib-load.adb: Initialize No_Elab_Code_All field.
1673 * lib-writ.adb: Initialize No_Elab_Code_All.
1674 * lib.ads, lib.adb: New field No_Elab_Code_All.
1675 * par-prag.adb: Add dummy entry for pragma No_Elaboration_Code_All.
1676 * restrict.ads, restrict.adb: Restriction No_Elaboration_Code_All no
1678 * sem_ch10.adb (Analyze_Context): Processing for
1679 No_Elaboration_Code_All removed.
1680 (Generate_Parent_References): Moved to Sem_Util.
1681 * sem_prag.adb: Add processing for pragma No_Elaboration_Code_All.
1682 * sem_util.ads, sem_util.adb (Get_Parent_Entity): Moved here from
1684 * snames.ads-tmpl: Add entry for pragma No_Elaboration_Code_All.
1685 * targparm.adb: Minor comment updates Add comments on ignoring
1686 pragma No_Elaboration_Code_All.
1688 2014-08-01 Nicolas Roche <roche@adacore.com>
1690 * adaint.c (__gnat_set_close_on_exec): Ensure that
1691 we can unset "close_on_exec" flag.
1693 2014-08-01 Ed Schonberg <schonberg@adacore.com>
1695 * exp_ch9.adb (Build_Wrapper_Spec, Replicate_Formals): When building
1696 the parameter specs of the wrapper program for a primitive operation
1697 of a synchronized type that implements an interface, copy the
1698 null_exclusion indicator as well.
1700 2014-08-01 Robert Dewar <dewar@adacore.com>
1702 * sem_eval.ads: Minor reformatting.
1704 2014-08-01 Eric Botcazou <ebotcazou@adacore.com>
1706 * exp_ch3.adb (Build_Initialization_Call): Call Underlying_Type
1707 to go down the chain of private derivations.
1708 * freeze.adb (Freeze_Entity): Fix typo in comment.
1710 2014-08-01 Ed Schonberg <schonberg@adacore.com>
1712 * sem_ch3.adb (Access_Type_Declaration): If designated type is
1713 a limited view, create a master entity (as is already done for
1714 class-wide types) in case the full view designates a type that
1716 * sem_ch8.adb (Find_Selected_Component): If prefix is a dereference
1717 and the designated type is a limited view, use the non-limited
1720 2014-08-01 Eric Botcazou <ebotcazou@adacore.com>
1722 * gcc-interface/ada-tree.h (DECL_BY_DESCRIPTOR_P): Delete.
1723 (DECL_FUNCTION_STUB): Likewise.
1724 (SET_DECL_FUNCTION_STUB): Likewise.
1725 (DECL_PARM_ALT_TYPE): Likewise.
1726 (SET_DECL_PARM_ALT_TYPE): Likewise.
1727 (TYPE_VAX_FLOATING_POINT_P): Delete.
1728 (TYPE_DIGITS_VALUE): Likewise.
1729 (SET_TYPE_DIGITS_VALUE): Likewise.
1730 * gcc-interface/gigi.h (standard_datatypes): Remove ADT_malloc32_decl.
1731 (malloc32_decl): Delete.
1732 (build_vms_descriptor): Likewise.
1733 (build_vms_descriptor32): Likewise.
1734 (fill_vms_descriptor): Likewise.
1735 (convert_vms_descriptor): Likewise.
1736 (TARGET_ABI_OPEN_VMS): Likewise.
1737 (TARGET_MALLOC64): Likewise.
1738 * gcc-interface/decl.c (add_parallel_type_for_packed_array): New.
1739 (gnat_to_gnu_entity): Call it to add the original type as a parallel
1740 type to the implementation type of a packed array type.
1741 <E_Procedure>: Remove now obsolete kludge.
1742 <E_Exception>: Delete obsolete comment.
1743 <object>: Small tweak.
1744 <E_Subprogram_Type>: Remove support for stub subprograms, as well as
1745 for the descriptor passing mechanism.
1746 (gnat_to_gnu_param): Likewise.
1747 * gcc-interface/misc.c (gnat_init_gcc_fp): Remove special case.
1748 (gnat_print_type): Adjust.
1749 * gcc-interface/trans.c (gigi): Remove obsolete initializations.
1750 (vms_builtin_establish_handler_decl): Delete.
1751 (gnat_vms_condition_handler_decl): Likewise.
1752 (establish_gnat_vms_condition_handler): Likewise.
1753 (build_function_stub): Likewise.
1754 (Subprogram_Body_to_gnu): Do not call above functions.
1755 (Call_to_gnu): Remove support for the descriptor passing mechanism.
1756 * gcc-interface/utils.c (make_descriptor_field): Delete.
1757 (build_vms_descriptor32): Likewise.
1758 (build_vms_descriptor): Likewise.
1759 (fill_vms_descriptor): Likewise.
1760 (convert_vms_descriptor64): Likewise.
1761 (convert_vms_descriptor32): Likewise.
1762 (convert_vms_descriptor): Likewise.
1763 * gcc-interface/utils.c (unchecked_convert): Likewise.
1764 * gcc-interface/utils2.c (maybe_wrap_malloc): Remove obsolete stuff.
1766 2014-08-01 Eric Botcazou <ebotcazou@adacore.com>
1768 * gcc-interface/trans.c (gigi): Use gnat_to_gnu_type for the exception
1769 type and get_unpadded_type for the longest FP type.
1770 (Attribute_to_gnu) <Machine>: Compare the precision of the types.
1771 (convert_with_check): Adjust formatting and remove FIXME.
1773 2014-08-01 Eric Botcazou <ebotcazou@adacore.com>
1775 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Signed_Integer_Subtype>:
1776 Do not convert the RM bounds to the base type.
1777 (E_Floating_Point_Subtype): Likewise.
1778 (E_Array_Subtype): Convert the bounds to the base type.
1779 * gcc-interface/trans.c (get_type_length): New function.
1780 (Attribute_to_gnu) <Range_Length>: Call it.
1782 (Loop_Statement_to_gnu): Convert the bounds to the base type.
1783 (gnat_to_gnu) <N_In>: Likewise.
1784 * gcc-interface/utils.c (make_type_from_size): Do not convert the RM
1785 bounds to the base type.
1786 (create_range_type): Likewise.
1787 (convert): Convert the bounds to the base type for biased types.
1788 * gcc-interface/utils2.c (compare_arrays): Convert the bounds to the
1791 2014-08-01 Eric Botcazou <ebotcazou@adacore.com>
1793 * gcc-interface/trans.c (gnat_to_gnu) <N_Selected_Component>: Remove
1794 incorrect implicit type derivation.
1795 * gcc-interface/utils.c (max_size) <tcc_reference>: Convert the bounds
1798 2014-08-01 Hristian Kirtchev <kirtchev@adacore.com>
1800 * sem_attr.adb (Analyze_Attribute): Preanalyze and resolve the
1801 prefix of attribute Loop_Entry.
1802 * sem_prag.adb (Analyze_Pragma): Verify the placement of pragma
1803 Loop_Variant with respect to an enclosing loop (if any).
1804 (Contains_Loop_Entry): Update the parameter profile and all
1805 calls to this routine.
1806 * sem_res.adb (Resolve_Call): Code reformatting. Do not ask
1807 for the corresponding body before determining the nature of the
1808 ultimate alias's declarative node.
1810 2014-08-01 Robert Dewar <dewar@adacore.com>
1812 * gnat1drv.adb, sem_ch4.adb: Minor reformatting.
1814 2014-08-01 Robert Dewar <dewar@adacore.com>
1816 * sem_eval.adb (Rewrite_In_Raise_CE): Don't try to reuse inner
1817 constraint error node since it is a list member.
1819 2014-08-01 Robert Dewar <dewar@adacore.com>
1821 * sem_warn.adb: Minor reformatting.
1823 2014-08-01 Eric Botcazou <ebotcazou@adacore.com>
1825 * einfo.adb (Underlying_Type): Return the underlying full view
1826 of a private type if present.
1827 * freeze.adb (Freeze_Entity):
1828 Build a single freeze node for partial, full and underlying full
1830 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Private_Type>: Add a
1831 missing guard before the access to the Underlying_Full_View.
1832 * gcc-interface/trans.c (process_freeze_entity): Deal with underlying
1833 full view if present.
1834 * gcc-interface/utils.c (make_dummy_type): Avoid superfluous work.
1836 2014-08-01 Ed Schonberg <schonberg@adacore.com>
1838 * sem_res.adb (Resolve_Entry_Call): When an entry has
1839 preconditions, the entry call is wrapped in a procedure call
1840 that incorporates the precondition checks. To prevent a double
1841 expansion, with possible duplication of extra formals, that
1842 procedure call must only be pre-analyzed and resolved. Expansion
1843 takes place upon return to the caller Resolve_Call.
1845 2014-08-01 Hristian Kirtchev <kirtchev@adacore.com>
1847 * sem_res.adb (Resolve_Call): Do not perform
1848 GNATprove-specific inlining while within a generic.
1850 2014-08-01 Ed Schonberg <schonberg@adacore.com>
1852 * sem_ch4.adb (Analyze_Case_Expression): Handle properly a
1853 case expression with incompatible alternatives, when the first
1854 alternative is overloaded.
1856 2014-08-01 Ed Schonberg <schonberg@adacore.com>
1858 * sem_res.adb (Check_Parameterless_Call): Use Relocate_Node
1859 to create the name of the parameterless call, rather than
1860 New_Copy, to preserve the tree structure when the name is a
1861 complex expression, e.g. a selected component that denotes a
1862 protected operation, whose prefix is itself a selected component.
1864 2014-08-01 Ed Schonberg <schonberg@adacore.com>
1866 * sem_ch6.adb (Analyze_Subprogram_Body_Helper): Use
1867 Unit_Declaration_Node to retrieve body when inlining, to handle
1868 properly subprogram child units.
1870 2014-08-01 Robert Dewar <dewar@adacore.com>
1872 * sem_attr.adb: Minor reformatting.
1874 2014-08-01 Vincent Celier <celier@adacore.com>
1876 * debug.adb: Minor documentation addition for -dn switch.
1878 2014-08-01 Robert Dewar <dewar@adacore.com>
1880 * sem_aggr.adb, exp_ch9.adb, sem_prag.adb, sem_util.adb,
1881 sem_attr.adb, sem_eval.ads, sem_cat.adb, sem_ch13.adb: Improve
1882 documentation of Is_Static_Expression vs Is_OK_Static_Expression.
1883 In several places, use the Is_OK version as suggested by the spec.
1885 2014-08-01 Vincent Celier <celier@adacore.com>
1887 * gnatcmd.adb: Revert last change which was not correct.
1889 2014-08-01 Hristian Kirtchev <kirtchev@adacore.com>
1891 * freeze.adb (Find_Constant): Ensure that the constant being
1892 inspected is still an object declaration (i.e. not a renaming).
1894 2014-08-01 Ed Schonberg <schonberg@adacore.com>
1896 * sem_ch5.adb (Analyze_Loop_Parameter_Specification): a)
1897 An attribute_reference to Loop_Entry denotes an iterator
1898 specification: its prefix is an object, as is the case for 'Old.
1899 b) If the domain of iteration is an expression whose type has
1900 the Iterable aspect defined, this is an iterator specification.
1902 2014-08-01 Robert Dewar <dewar@adacore.com>
1904 * gnatcmd.adb: Minor reformatting.
1906 2014-08-01 Robert Dewar <dewar@adacore.com>
1908 * atree.ads (Info_Messages): New counter.
1909 * err_vars.ads: Minor comment update.
1910 * errout.adb (Delete_Warning_And_Continuations): Deal
1911 with new Info_Messages counter.
1912 (Error_Msg_Internal): ditto.
1913 (Delete_Warning): ditto.
1914 (Initialize): ditto.
1915 (Write_Error_Summary): ditto.
1916 (Output_Messages): ditto.
1917 (To_Be_Removed): ditto.
1918 * erroutc.adb (Delete_Msg): Deal with Info_Messages counter.
1919 (Compilation_Errors): ditto.
1920 * errutil.adb (Error_Msg): Deal with Info_Messages counter.
1922 (Initialize): ditto.
1923 * sem_prag.adb (Analyze_Pragma): Minor comment addition.
1924 * gnat_ugn.texi: Document that -gnatwe does not affect info
1927 2014-08-01 Robert Dewar <dewar@adacore.com>
1929 * debug.adb: Document debug switch -gnatd.Z.
1930 * sem.adb (Semantics): Force expansion on in no or configurable
1933 2014-08-01 Ed Schonberg <schonberg@adacore.com>
1935 * sem_ch5.adb (Analyze_Loop_Parameter_Specification): An
1936 unchecked conversion denotes an iterator specification. Such a
1937 conversion will be inserted in the context of an inlined call
1938 when needed, and its argument is always an object.
1940 2014-08-01 Robert Dewar <dewar@adacore.com>
1942 * make.adb, makeutl.ads: Minor reformatting.
1943 * debug.adb, opt.ads: Clarify documentation of Front_End_Inlining and
1946 2014-08-01 Tristan Gingold <gingold@adacore.com>
1948 * gnatcmd.adb (GNATCmd): Set AAMP_On_Target using command name.
1950 2014-08-01 Javier Miranda <miranda@adacore.com>
1952 * gnat1drv.adb (Adjust_Global_Switches): Reverse meaning of
1954 * debug.adb: Updating documentation.
1955 * exp_ch6.adb (Expand_Call): Remove assertion.
1957 2014-08-01 Robert Dewar <dewar@adacore.com>
1959 * sem_aggr.adb, sem_ch3.adb, sem_ch5.adb, sem_util.adb,
1960 sem_res.adb: Minor reformatting.
1962 2014-08-01 Vincent Celier <celier@adacore.com>
1964 * make.adb (Initialize): Set Keep_Temporary_Files to True when
1966 * makeusg.adb: Add line for new switch --keep-temp-files.
1967 * makeutl.ads (Keep_Temp_Files_Option): New constant String.
1968 * opt.ads (Keep_Temporary_Files): Document that it is also used
1969 by gnatmake and gprbuild.
1970 * switch-m.adb: Recognize new switch --keep-temp-files.
1972 2014-08-01 Tristan Gingold <gingold@adacore.com>
1974 * sem_ch9.adb (Analyze_Task_Type_Declaration): Move code from ...
1975 * exp_ch9.adb (Make_Task_Create_Call): ... here.
1977 2014-08-01 Vincent Celier <celier@adacore.com>
1979 * gnat1drv.adb: Do not try to get the target parameters when
1980 invoked with -gnats.
1982 2014-08-01 Hristian Kirtchev <kirtchev@adacore.com>
1984 * exp_ch7.adb (Find_Last_Init): Nothing to do for an object
1985 declaration subject to No_Initialization.
1987 2014-08-01 Ed Schonberg <schonberg@adacore.com>
1989 * sem_aggr.adb (Resolve_Array_Aggregate): Reject choice that
1990 is a subtype with dynamic predicates, or a non-static subtype
1992 * sem_ch3.adb (Analyze_Number_Declaration): Reject qualified
1993 expression if subtype has a dynamic predicate.
1994 (Constrain_Index): Reject subtype indication if subtype mark
1996 (Inerit_Predicate_Flags): Inherit Has_Predicates as well.
1997 (Make_Index): If index is a subtype indication, itype inhereits
1998 predicate flags for subsequent testing.
1999 * sem_ch5.adb (Analyze_Loop_Parameter_Specification): New
2000 procedure Check_Predicate_Use, to reject illegal uses of domains
2001 of iteration that have dynamic predicates.
2002 * sem_res.adb (Resolve_Slice): Reject slices given by a subtype
2003 indication to which a predicate applies.
2004 * sem_util.adb (Bad_Predicated_Subtype_Use): Add guard to
2005 prevent cascaded errors when subtype is invalid.
2007 2014-08-01 Robert Dewar <dewar@adacore.com>
2009 * sem_ch10.adb: Minor reformatting.
2011 2014-08-01 Ed Schonberg <schonberg@adacore.com>
2013 * sem_ch6.adb (Same_Generic_Actual): Make function symmetric,
2014 because either type may be a subtype of the other.
2016 2014-08-01 Vincent Celier <celier@adacore.com>
2018 * makeusg.adb: Add documentation for debug switch -dn.
2020 2014-08-01 Ed Schonberg <schonberg@adacore.com>
2022 * sem_dim.adb (Process_Minus, Process_Divide): Label dimension
2023 expression with standard operator and type, for pretty-printing
2024 use, when in ASIS_Mode. When generating code dimensional analysis
2025 is not involved and dimension expressions are handled statically,
2026 and other operators are resolved in the usual way.
2028 2014-08-01 Ed Schonberg <schonberg@adacore.com>
2030 * sem_ch3.adb (Build_Derived_Record_Type): Remove setting of
2031 Parent_Subtype in ASIS mode, leads to several failures.
2032 * sem_ch4.adb (Analyze_Selected_Component): In an instance,
2033 if the prefix is a type extension, check whether component is
2034 declared in the parent type, possibly in a parent unit. Needed
2035 in ASIS mode when Parent_Subtype is not set.
2037 2014-08-01 Robert Dewar <dewar@adacore.com>
2039 * sem_prag.adb: Minor reformatting.
2040 * s-regpat.adb: Minor reformatting.
2041 * sem_ch3.adb (Analyze_Object_Declaration): Do not set
2042 Treat_As_Volatile on constants.
2044 2014-08-01 Tristan Gingold <gingold@adacore.com>
2046 * exp_ch9.adb (Make_Task_Create_Call): Improve error message.
2048 2014-08-01 Ed Schonberg <schonberg@adacore.com>
2050 * sem_ch10.adb (Analyze_Compilation_Unit): Do not place a
2051 warning on a with_clause created for the renaming of a parent
2052 unit in an explicit with_clause.
2054 2014-08-01 Ed Schonberg <schonberg@adacore.com>
2056 * sem_ch13.adb (Analyze_Aspect_Specifications, case Aspect_Import):
2057 Set Is_Imported flag at once, to simplify subsequent legality
2058 checks. Reject the aspect on an object whose declaration has an
2059 explicit initial value.
2060 * sem_prag.adb (Process_Import_Or_Interface): Use original node
2061 to check legality of an initial value for an imported entity.
2062 Set Is_Imported flag in case of error to prevent cascaded errors.
2063 Do not set the Is_Imported flag if the pragma comes from an
2064 aspect, because it is already done when analyzing the aspect.
2066 2014-08-01 Emmanuel Briot <briot@adacore.com>
2068 * g-regpat.adb (Parse): Add support for non-capturing parenthesis.
2070 2014-08-01 Robert Dewar <dewar@adacore.com>
2072 * sem_ch7.adb, einfo.adb, einfo.ads, sem_ch13.adb: Minor change of
2075 2014-08-01 Hristian Kirtchev <kirtchev@adacore.com>
2077 * sem_ch3.adb (Analyze_Object_Contract): Enable the volatility
2078 checks when the related variable comes from source.
2079 * sem_res.adb (Resolve_Actuals): Enable the volatility checks
2080 when the related actual parameter comes from source. Update comment.
2081 * freeze.adb (Freeze_Record_Type): Do not freeze the designated
2082 type of an array of pointers when the designated type is
2083 class-wide and its root type is the record being currently frozen.
2085 2014-08-01 Ed Schonberg <schonberg@adacore.com>
2087 * sem_ch5.adb (Analyze_Iterator_Specification): Preserve Ekind
2088 of renaming declaration created for domain of iteration.
2089 * sem_aggr.adb (Resolve_Array_Aggregate): Better placement
2090 for error messages on aggregates whose index subtypes have
2091 predicates. The new placement avoids posting messages on previous
2092 subtype declarations rather than on the aggregate itself.
2093 * sem_disp.adb (Is_Inherited_Public_Operation): New predicate for
2094 Add_Dispatching_Operation, to handle properly the overriding of
2095 the predefined operations on controlled types, when the partial
2096 view of a type is not visibly controlled.
2098 2014-08-01 Ben Brosgol <brosgol@adacore.com>
2100 * gnat_ugn.texi: Add tutorial on portable fixed-point types as an
2103 2014-08-01 Hristian Kirtchev <kirtchev@adacore.com>
2105 * einfo.adb (Is_Hidden_Non_Overridden_Subprogram): Remove the
2106 assertion check as the attribute is defined for all entities.
2107 (Set_Is_Hidden_Non_Overridden_Subprogram): Remove the assertion
2108 check as the attribute is defined for all entities.
2109 * einfo.ads Update the documentation of attribute
2110 Is_Hidden_Non_Overridden_Subprogram.
2111 * sem_ch7.adb (Install_Package_Entity): No need to check the
2112 entity kind of the Id.
2113 * sem_ch13.adb (Hide_Matching_Homograph): Update the comment on
2114 usage. Ensure that the homographs are of the same entity kind
2115 and not fully conformant.
2116 (Hide_Non_Overridden_Subprograms): Update the comment on usage.
2118 2014-08-01 Robert Dewar <dewar@adacore.com>
2120 * inline.adb: Minor code reorganization.
2121 * sem_ch12.adb, s-tasdeb.ads: Minor reformatting.
2123 2014-08-01 Robert Dewar <dewar@adacore.com>
2125 * inline.adb, s-os_lib.ads: Minor reformatting.
2127 2014-08-01 Arnaud Charlet <charlet@adacore.com>
2129 * s-tasdeb.ads, s-tasdeb.adb (Master_Hook, Master_Completed_Hook): New.
2130 * s-tassta.adb (Task_Wrapper, Vulnerable_Complete_Master): Call new
2133 2014-08-01 Yannick Moy <moy@adacore.com>
2135 * inline.adb (Cannot_Inline): Issue info message instead of
2136 warning for subprograms not inlined in GNATprove mode.
2137 * sem_res.adb (Resolve_Call): Take body into account for deciding
2138 whether subprogram can be inlined in GNATprove mode or not.
2140 2014-08-01 Claire Dross <dross@adacore.com>
2142 * exp_util.ads (Get_First_Parent_With_Ext_Axioms_For_Entity): Renaming
2143 of Get_First_Parent_With_External_Axiomatization_For_Entity for
2145 * sem_ch12.adb (Analyze_Associations): Only call Build_Wrapper
2146 for parameters of packages with external axiomatization.
2148 2014-08-01 Robert Dewar <dewar@adacore.com>
2150 * sem_res.adb: Minor comment addition.
2152 2014-08-01 Arnaud Charlet <charlet@adacore.com>
2154 * s-crtl.ads, i-cstrea.ads, adaint.c, adaint.h, osint.adb,
2155 s-fileio.adb (__gnat_fopen, __gnat_freopen): Remove vms_form parameter,
2157 * s-os_lib.ads: Minor reformatting.
2159 2014-08-01 Arnaud Charlet <charlet@adacore.com>
2161 * exp_attr.adb (Is_Inline_Floating_Point_Attribute): Restore more
2162 completely previous code since only GCC back-ends are prepared
2163 to handle e.g. 'Machine attribute.
2164 * targparm.adb, targparm.ads: Remove remaining refs and
2165 handling of OpenVMS_On_Target, VAX_Float_On_Target and
2166 RTX_RTSS_Kernel_Module_On_Target.
2167 * hostparm.ads (OpenVMS, Max_Debug_Name_Length): Removed,
2170 2014-08-01 Robert Dewar <dewar@adacore.com>
2172 * exp_dist.adb, exp_attr.adb: Minor reformatting.
2173 * sem_ch3.adb, mlib-tgt-specific-hpux.adb, a-direct.ads,
2174 a-synbar-posix.adb, exp_ch9.adb, sem_ch10.adb, sem_prag.adb,
2175 sem_ch12.adb, sem.ads, sem_res.adb, s-exctra.adb, s-soflin.ads,
2176 g-alveop.ads, sem_ch8.adb, vxaddr2line.adb, sem_cat.ads: Remove
2177 improper use of shall.
2179 2014-08-01 Robert Dewar <dewar@adacore.com>
2181 * sem_aggr.adb, exp_atag.adb, layout.adb, nlists.adb, nlists.ads,
2182 exp_attr.adb, exp_ch9.adb, par-ch12.adb, exp_aggr.adb,
2183 exp_ch3.adb: Minor reformatting & code reorganization.
2185 2014-08-01 Robert Dewar <dewar@adacore.com>
2187 * gnat_rm.texi: Remove VMS specific rules for pragma Ident.
2188 * Makefile.rtl, adaint.c, gnat_rm.texi, s-asthan.adb, s-asthan.ads,
2189 s-filofl.ads, s-fishfl.ads, s-fvadfl.ads, s-fvaffl.ads, s-fvagfl.ads,
2190 s-po32gl.adb, s-po32gl.ads, s-vaflop.adb, s-vaflop.ads, s-vmexta.adb,
2191 s-vmexta.ads, sem_vfpt.adb, sem_vfpt.ads, socket.c: Remove VMS specific
2193 * gcc-interface/decl.c, gcc-interface/Makefile.in,
2194 gcc-interface/Make-lang.in: Ditto. Also remove refs to rTX.
2196 2014-08-01 Pascal Obry <obry@adacore.com>
2198 * s-os_lib.ads: Rename File_Size to Large_File_Size.
2200 2014-08-01 Robert Dewar <dewar@adacore.com>
2202 * a-numaux-vxworks.ads, a-numaux-x86.adb, a-numaux-x86.ads,
2203 a-numaux-darwin.adb, a-numaux-darwin.ads, a-numaux.ads,
2204 a-numaux-libc-x86.ads: Fix bad package header comments.
2205 * elists.ads, elists.adb (Append_New_Elmt): New procedure.
2206 * gnat_rm.texi, a-calend.adb, gnatcmd.adb, einfo.adb, einfo.ads,
2207 checks.adb, sem_prag.adb, sem_prag.ads, rtsfind.ads, freeze.adb,
2208 sem_util.adb, sem_attr.adb, exp_dbug.adb, exp_dbug.ads, gnat1drv.adb,
2209 targparm.adb, targparm.ads, exp_ch6.adb, switch-b.adb, s-shasto.ads,
2210 stand.ads, s-auxdec.ads, opt.adb, opt.ads, mlib-tgt.ads, s-fatgen.adb,
2211 s-fatgen.ads, system.ads, snames.ads-tmpl, s-stalib.ads,
2212 s-os_lib.adb: Remove VMS-specific code.
2214 2014-08-01 Arnaud Charlet <charlet@adacore.com>
2216 * exp_attr.adb (Is_Inline_Floating_Point_Attribute): Revert to
2217 previous state in CodePeer_Mode.
2219 2014-08-01 Robert Dewar <dewar@adacore.com>
2221 * hostparm.ads: Put back definition of OpenVMS as False to aid
2222 the transition process.
2223 * sem_ch7.adb: Minor reformatting.
2224 * prj-env.adb: Minor code fix.
2225 * gnat_rm.texi: Complete previous change.
2226 * sem_ch3.adb: Minor reformatting.
2227 * sem_ch6.adb: Minor reformatting.
2228 * sem_elab.adb: Minor reformatting.
2229 * exp_strm.adb: Complete previous change.
2231 2014-08-01 Vincent Celier <celier@adacore.com>
2233 * sem_warn.adb (Warn_On_Unreferenced_Entity): Do not issue a
2234 warning when a constant is unreferenced and its type has pragma
2235 Unreferenced_Objects.
2237 2014-08-01 Hristian Kirtchev <kirtchev@adacore.com>
2239 * einfo.adb: Flag2 is now known as
2240 Is_Hidden_Non_Overridden_Subprogram.
2241 (Is_Hidden_Non_Overridden_Subprogram): New routine.
2242 (Set_Is_Hidden_Non_Overridden_Subprogram): New routine.
2243 (Write_Entity_Fields): Output Flag2.
2244 * einfo.ads: New attribute Is_Hidden_Non_Overridden_Subprogram
2245 along with occurrences in entities.
2246 (Is_Hidden_Non_Overridden_Subprogram): New routine and pragma Inline.
2247 (Set_Is_Hidden_Non_Overridden_Subprogram): New routine
2249 * sem_ch7.adb (Install_Package_Entity): Do not enter implicitly
2250 declared non-overriden homographs into visibility.
2251 * sem_ch13.adb (Freeze_Entity_Checks): Hide all
2252 implicitly declared non-overriden homographs.
2253 (Hide_Non_Overridden_Subprograms): New routine.
2255 2014-08-01 Robert Dewar <dewar@adacore.com>
2257 * snames.ads-tmpl, s-os_lib.adb, s-os_lib.ads, s-fileio.adb: Remove
2259 * prj-conf.adb: Minor reformatting.
2260 * xr_tabls.adb (Read_File): Restore code which was enabled on
2261 non VMS platforms before.
2262 * prj-env.adb (Initialize_Default_Project_Path): Ditto.
2263 * sem_ch5.adb: Minor reformatting.
2264 * lib-writ.adb, lib-writ.ads, bindgen.adb, sem_vfpt.adb,
2265 sem_vfpt.ads, ali.adb, ali.ads, opt.ads, bcheck.adb, exp_strm.adb:
2266 Remove VMS-specific code.
2268 2014-08-01 Vincent Celier <celier@adacore.com>
2270 * make.adb (Await_Compile): Remove loop that was only needed
2273 2014-08-01 Robert Dewar <dewar@adacore.com>
2275 * a-calcon.ads, a-direct.adb, a-dirval-mingw.adb, a-dirval.adb,
2276 a-dirval.ads, a-except-2005.adb, a-excpol-abort.adb,
2277 a-numaux-darwin.ads, a-numaux.ads, bindgen.adb, bindusg.adb,
2278 einfo.adb, einfo.ads, err_vars.ads, errout.ads, errutil.adb,
2279 exp_ch3.adb, exp_ch4.adb, exp_ch7.adb, exp_ch7.ads, fname-uf.adb,
2280 fname.adb, fname.ads, freeze.adb, g-debpoo.adb, g-dirope.ads,
2281 g-excact.ads, g-expect.ads, g-socket.adb, g-socket.ads, g-sothco.ads,
2282 g-traceb.ads, gnat_rm.texi, gnatlink.adb, gnatls.adb, i-cstrea.adb,
2283 krunch.adb, krunch.ads, layout.adb, lib-util.adb, make.adb,
2284 mlib.adb, osint-b.adb, osint-b.ads, osint-c.adb, osint.adb,
2285 osint.ads, output.ads, par.adb, prj-conf.adb, prj-env.adb,
2286 prj-makr.adb, prj-nmsc.adb, prj.adb, prj.ads, repinfo.adb, rtsfind.adb,
2287 rtsfind.ads, s-excmac-gcc.ads, s-fatgen.adb, s-mastop.ads,
2288 s-parame-ae653.ads, s-parame-hpux.ads, s-parame-vxworks.ads,
2289 s-parame.ads, s-soflin.ads, s-stoele.adb, s-tasini.adb,
2290 s-taspri-dummy.ads, s-taspri-hpux-dce.ads, s-taspri-mingw.ads,
2291 s-taspri-posix-noaltstack.ads, s-taspri-posix.ads,
2292 s-taspri-solaris.ads, s-taspri-vxworks.ads, s-trasym.ads,
2293 sem_ch12.adb, sem_ch4.adb, sem_eval.adb, sem_intr.adb, sem_mech.adb,
2294 sem_mech.ads, sem_prag.adb, sem_res.adb, sem_util.adb, sem_util.ads,
2295 sinfo.adb, sinfo.ads, sinput-c.adb, symbols.ads, targparm.adb,
2296 treepr.adb, types.ads, xr_tabls.adb, xr_tabls.ads: Remove VMS
2297 specific code and comments.
2299 2014-08-01 Ed Schonberg <schonberg@adacore.com>
2301 * sem_ch5.adb (Analyze_Iterator_Specification): New procedure
2302 Check_Reverse_Iteration, to verify the legality of the Reverse
2303 indicator on various container types, and to detect illegal
2304 reverse iterations on containers that only supoort forward
2307 2014-08-01 Vincent Celier <celier@adacore.com>
2309 * gnatcmd.adb: Remove the VMS specific stuff. Integrate in
2310 procedure GNATCmd the relevant declarations from packages VMS_Cmds
2312 * gnatcmd.ads: Update comments to remove any trace of VMS
2314 2014-08-01 Ed Schonberg <schonberg@adacore.com>
2316 * sem_ch12.adb: sem_ch12.adb (Build_Wrapper): Capture entity for
2317 defaulted actual that is an operator, before building wrapper
2318 for it in GNATprove mode. Restrict construction of wrapper to
2319 actuals that are operators.
2321 2014-08-01 Vincent Celier <celier@adacore.com>
2323 * vms_conv.adb, vms_conv.ads, vms_data.ads, vms_cmds.ads: Remove VMS
2324 specific packages no longer needed.
2326 2014-08-01 Pascal Obry <obry@adacore.com>
2328 * s-os_lib.ads (System.CRTL): Move with clause to body.
2329 (File_Size): New type.
2330 (File_Length64): Use it.
2331 (File_Length): Restore previous spec returning a Long_Integer.
2332 * s-os_lib.adb (System.CRTL): Move with clause here.
2334 2014-08-01 Vincent Celier <celier@adacore.com>
2336 * mlib-prj.adb: Update comments to remove any mention of VMS.
2338 2014-08-01 Arnaud Charlet <charlet@adacore.com>
2340 * ug_words, xgnatugn.adb, gcc-interface/Make-lang.in: Remove
2341 xgnatugn.adb and ug_words.
2343 2014-08-01 Eric Botcazou <ebotcazou@adacore.com>
2345 * exp_attr.adb (Expand_N_Attribute_Reference): Check whether
2346 expansion can be avoid for Machine, Model and Rounding.
2347 (Is_Inline_Floating_Point_Attribute): Return true for Machine
2348 & Model, as well as Rounding if wrapped in a conversion to an
2350 * sem_res.adb (Simplify_Type_Conversion): Deal with Rounding as well.
2351 * gcc-interface/gigi.h (fp_arith_may_widen): Declare.
2352 * gcc-interface/utils.c (fp_arith_may_widen): New global variable.
2353 * gcc-interface/misc.c (enumerate_modes): Compute it.
2354 * gcc-interface/trans.c (FP_ARITH_MAY_WIDEN): Delete.
2355 (lvalue_required_for_attribute_p): Deal with Descriptor_Size,
2357 (Attribute_to_gnu) <Attr_Model>: New case.
2358 <Attr_Machine>): Likewise.
2359 (convert_with_check): Test
2360 fp_arith_may_widen variable.
2362 2014-08-01 Pascal Obry <obry@adacore.com>
2364 * adaint.h (GNAT_FOPEN): New definition for Windows.
2365 (GNAT_OPEN): Likewise.
2366 (GNAT_STAT): Likewise.
2367 (GNAT_FSTAT): Likewise.
2368 (GNAT_LSTAT): Likewise.
2369 (GNAT_STRUCT_STAT): Likewise.
2370 * adaint.c (__gnat_stat): Fix computation of file size for
2373 2014-08-01 Vincent Celier <celier@adacore.com>
2375 * Makefile.rtl: Minor comment update.
2377 2014-08-01 Vincent Celier <celier@adacore.com>
2379 * Make-generated.in: Remove dependencies for vms-help.
2381 2014-08-01 Gary Dismukes <dismukes@adacore.com>
2383 * makeutl.ads, opt.ads: Minor grammar fixes.
2384 * makeutl.adb: Minor code reorganization.
2386 2014-08-01 Arnaud Charlet <charlet@adacore.com>
2388 * gcc-interface/Makefile.in, gcc-interface/Make-lang.in,
2389 gnatsym.adb: Remove gnatsym (VMS only tool).
2391 2014-08-01 Ben Brosgol <brosgol@adacore.com>
2393 * gnat_ugn.texi, projects.texi, xgnatugn.adb: Removed all VMS
2394 conditionalization from gnat_ugn.texi and projects.texi, and updated
2395 (considerably simplified) xgnatugn.adb, to be removed soon.
2397 2014-08-01 Vincent Celier <celier@adacore.com>
2399 * debug.adb: Remove doc for gnatmake/gprbuild switch -ds.
2400 * make.adb (List_Bad_Compilations): Use Opt.No_Exit_Message
2401 instead of Debug.Debug_Flag_S.
2402 * makeutl.adb (Finish_Program, Fail_Program): Use Opt flag
2403 No_Exit_Message instead of Debug.Debug_Flag_S to suppress exit
2405 * makeutl.ads (No_Exit_Message_Option): New constant string
2406 for switch --no-exit-message.
2407 * opt.ads (No_Exit_Message): New Boolean flag, defaulted to False.
2408 * switch-m.adb (Scan_Make_Switches): Recognize new switch
2411 2014-08-01 Arnaud Charlet <charlet@adacore.com>
2413 * exp_vfpt.adb, exp_vfpt.ads: Removed, no longer used.
2414 * gcc-interface/Make-lang.in: Remove exp_vfpt.o
2416 2014-08-01 Javier Miranda <miranda@adacore.com>
2418 * inline.ads (Inlined_Calls, Backend_Calls,
2419 Backend_Inlined_Subps, Backend_Not_Inlined_Subps): Declarations
2420 moved to inline.adb (Cannot_Inline): Update documentation.
2421 (Check_And_Build_Body_To_Inline): Renamed.
2422 (List_Inlining_Info): Subprogram moved here from package exp_ch6.
2423 * inline.adb (Check_Inlining_Restrictions): New local variable.
2424 (Inlined_Calls, Backend_Calls, Backend_Inlined_Subps,
2425 Backend_Not_Inlined_Subps): Declarations moved here
2426 from inline.ads (Number_Of_Statements): Removed.
2427 (Remove_Pragmas): Avoid duplicated version of this subprogram.
2428 (Build_Body_To_Inline): Code cleanup.
2429 (Build_Body_To_Inline.Has_Excluded_Statament): Removed.
2430 (Check_And_Build_Body_To_Inline): Renamed. Code cleanup.
2431 (Check_Body_To_Inline): Removed.
2432 (Generate_Body_To_Inline): Renamed as Generate_Subprogram_Body.
2433 (Has_Excluded_Declaration): No action if not
2434 Check_Inlining_Restrictions.
2435 (Has_Excluded_Statement): No action if not Check_Inlining_Restrictions.
2436 (Initialize): Initialize the lists of inlined calls and subprograms.
2437 (List_Inlining_Info): Subprogram moved here from package exp_ch6.
2438 * sem_ch6.adb (Analyze_Subprogram_Body_Helper): Update call
2439 to Check_And_Build_Body_To_Inline since it has been renamed as
2440 Check_And_Split_Unconstrained_Function
2441 * exp_ch6.ad[sb] (List_Inlining_Info): Subprogram moved to
2443 * gnat1drv.adb Update call to Inline.List_Inlining_Info.
2445 2014-08-01 Vincent Celier <celier@adacore.com>
2447 * debug.adb: Add documentation for new debug switch -ds.
2448 * make.adb (List_Bad_Compilations): Do not issue any message
2449 when switch -ds is specified.
2450 * makeutl.adb (Fail_Program): Do not issue any message when
2452 (Finish_Program): Ditto.
2454 2014-08-01 Robert Dewar <dewar@adacore.com>
2456 * s-exnint.adb, s-exnint.ads, s-wwdwch.ads, s-carsi8.ads,
2457 s-casi32.ads, indepsw.adb, a-timoau.ads, s-explli.adb, s-explli.ads,
2458 s-casi16.ads, s-powtab.ads, g-wistsp.ads, a-ztmoau.adb,
2459 indepsw-gnu.adb, s-imgllb.ads, types.adb, gnat.ads, s-proinf.adb,
2460 indepsw-aix.adb, s-caun64.ads, s-imgllw.ads, s-traces-default.adb,
2461 s-vxwork-x86.ads, s-expllu.adb, s-exnlli.adb, s-exnlli.ads,
2462 s-traces.adb, widechar.ads, stand.adb, s-expint.adb,
2463 s-tratas-default.adb, s-expint.ads, s-geveop.ads, s-caun32.ads,
2464 s-expuns.adb, s-mantis.adb, s-mantis.ads, s-caun16.ads, s-tasinf.adb,
2465 s-memcop.ads, s-dsaser.ads, s-imgbiu.ads, a-szmzco.ads, g-strspl.ads,
2466 s-casi64.ads, g-zstspl.ads, indepsw-mingw.adb, tree_io.adb,
2467 s-boarop.ads, uname.ads, s-fore.adb, s-fore.ads, g-timsta.adb,
2468 g-timsta.ads, s-assert.adb, s-vector.ads, s-tratas.adb,
2469 s-tratas.ads: Minor fix to copyright notices.
2471 2014-08-01 Eric Botcazou <ebotcazou@adacore.com>
2473 * sinfo.ads: Remove long obsolete comment.
2474 2014-08-01 Ed Schonberg <schonberg@adacore.com>
2476 * sem_util.adb: Add guard to setting of No_Predicate_On_Actual.
2477 * sem_ch3.adb: Minor reformatting.
2479 2014-08-01 Pascal Obry <obry@adacore.com>
2481 * cstreams.c: Only enable large file support on know supported
2482 platforms. Add missing defines/includes.
2484 2014-08-01 Ed Schonberg <schonberg@adacore.com>
2486 * einfo.ads, einfo.adb New flags No_Predicate_On_Actual and
2487 No_Dynamic_Predicate_On_Actual, to enforce the generic contract
2488 on generic units that contain constructs that forbid subtypes
2490 * sem_ch3.adb (Analyze_Subtype_Declaration, Process_Subtype):
2491 Inherit flags indicating the presence of predicates in subtype
2492 declarations with and without constraints.
2493 (Inherit_Predicate_Flags): Utility for the above.
2494 * sem_util.adb (Bad_Predicated_Subtype_Use): In a generic context,
2495 indicate that the actual cannot have predicates, and preserve
2496 warning. In an instance, report error if actual has predicates
2497 and the construct appears in a package declaration.
2498 * sem_ch12.adb (Diagnose_Predicated_Actual): Report error
2499 for an actual with predicates, if the corresponding formal
2500 carries No_Predicate_On_Actual or (in the case of a loop)
2501 No_Dynamic_Predicate_On_Actual.
2502 * sem_ch13.adb (Build_Predicate_Functions); Do not build a
2503 Static_Predicate function if the type is non-static (in the
2504 presence of previous errors),
2505 * sem_ch5.adb (Analyze_Loop_Parameter_Specification): Set flag
2506 No_Dynamic_Predicate_On_Actual in a generic context, to enforce
2507 generic contract on actuals that cannot have predicates.
2509 2014-08-01 Pascal Obry <obry@adacore.com>
2511 * a-direct.adb (C_Size): Returns an int64.
2512 * osint.adb (System.CRTL): New with clause.
2513 (File_Length.Internal): Returns an int64.
2514 * s-os_lib.ads (File_Length): Returns an int64.
2516 2014-08-01 Robert Dewar <dewar@adacore.com>
2518 * gnatchop.adb, gnatcmd.adb, make.adb, mlib-prj.adb, bindgen.adb,
2519 mlib.ads, butil.adb, clean.adb, binde.adb, gnatls.adb, gnatname.adb,
2520 osint.adb, krunch.adb: Minor reformatting.
2522 2014-08-01 Robert Dewar <dewar@adacore.com>
2524 * inline.adb, inline.ads, fe.h, einfo.adb, einfo.ads, sem_util.adb,
2525 sem_util.ads, exp_ch4.adb, exp_ch11.adb, exp_ch6.adb, cstand.adb,
2526 sem_mech.adb, sem_ch6.adb, sem_ch8.adb, sem_ch11.adb, snames.ads-tmpl:
2527 Remove VMS-specific code.
2528 * gcc-interface/decl.c, gcc-interface/trans.c: Ditto.
2530 2014-08-01 Arnaud Charlet <charlet@adacore.com>
2532 * binde.adb, bindgen.adb, butil.adb, clean.adb, gnatbind.adb,
2533 gnatchop.adb, gnatcmd.adb, gnatls.adb, gnatname.adb, krunch.adb,
2534 make.adb, makeutl.adb, memtrack.adb, mlib-prj.adb, mlib.adb,
2535 mlib.ads, tempdir.adb: Remove VMS handling.
2537 2014-08-01 Pascal Obry <obry@adacore.com>
2539 * adaint.h, adaint.c (__gnat_file_length): Returns an __int64.
2540 (__gnat_named_file_length): Likewise.
2541 (__gnat_file_length_attr): Likewise.
2542 * a-direct.adb (C_Size): Use size_t as returned type.
2543 * osint.adb (File_Length): Adjust spec for Internal routine
2545 * s-os_lib.adb (File_Length): Now returns a CRTL.size_t.
2546 (System.CRTL): With claused moved to spec.
2547 * s-os_lib.ads (System.CRTL): With clause moved to here.
2549 2014-08-01 Pascal Obry <obry@adacore.com>
2551 * adaint.h, adaint.c (__gnat_open): Added.
2552 * s-crtl.ads (open): Import __gnat_open for large file support.
2554 2014-08-01 Robert Dewar <dewar@adacore.com>
2556 * sem_case.adb (Dup_Choice): Improve message for integer constants.
2558 2014-08-01 Arnaud Charlet <charlet@adacore.com>
2560 * gnatlink.adb: Remove special handling of VMS, RTX and JVM.
2562 2014-08-01 Pascal Obry <obry@adacore.com>
2564 * adaint.h (GNAT_OPEN): Defines as open64 where supported.
2565 * adaint.c (GNAT_OPEN): Uses new macro where needed.
2567 2014-07-31 Eric Botcazou <ebotcazou@adacore.com>
2569 * gcc-interface/utils.c (lookup_and_insert_pad_type): New function
2571 (maybe_pad_type): ...here. Call it to canonicalize the pad type.
2572 * gcc-interface/gigi.h: Update comment.
2574 2014-07-31 Javier Miranda <miranda@adacore.com>
2576 * debug.adb Remove documentation of -gnatd.k (no longer needed).
2577 * sem_ch6.adb (Analyze_Subprogram_Body_Helper): Code cleanup.
2578 * inline.ads (Backend_Inlined_Subps): New
2579 Elist. (Backend_Not_Inlined_Subps): New Elist.
2580 (Has_Excluded_Declaration): Declaration previously located in
2581 * inline.adb (Has_Excluded_Statement): Declaration previously
2582 located in inline.adb
2583 * inline.adb (Has_Single_Return): Moved out of
2584 Build_Body_To_Inline to avoid having duplicated code.
2585 (Number_Of_Statements): New subprogram.
2586 (Register_Backend_Inlined_Subprogram): New subprogram.
2587 (Register_Backend_Not_Inlined_Subprogram): New subprogram.
2588 (Add_Inlined_Subprogram): Register backend inlined subprograms and
2589 also register subprograms that cannot be inlined by the backend.
2590 (Has_Excluded_Declaration): Moved out of Build_Body_To_Inline
2591 to avoid having duplicated code. Replace occurrences of
2592 Debug_Flag_Dot_K by Back_End_Inlining.
2593 * sem_res.adb (Resolve_Call): Code cleanup.
2594 * exp_ch6.adb (Expand_Call): Complete previous patch. Replace
2595 occurrence of Debug_Flag_Dot_K by Back_End_Inlining.
2596 (List_Inlining_Info): Add listing of subprograms passed to the
2597 backend and listing of subprograms that cannot be inlined by
2599 * sem_ch12.adb, sem_ch3.adb Replace occurrences of
2600 Debug_Flag_Dot_K by Back_End_Inlining.
2602 2014-07-31 Robert Dewar <dewar@adacore.com>
2604 * nlists.ads: Minor code fix (remove unwise Inline for
2607 2014-07-31 Arnaud Charlet <charlet@adacore.com>
2609 * einfo.adb: Remove VMS specific code.
2610 * exp_attr.adb: Remove VAX specific code.
2611 * set_targ.adb: Remove handling of VAX_Float.
2612 * sem_vfpt.adb: Remove references to Vax_Native.
2613 * sem_attr.adb (Is_VAX_Float): Remove ref to VAX_Native.
2615 2014-07-31 Robert Dewar <dewar@adacore.com>
2617 * sem_ch4.adb: Minor reformatting.
2619 2014-07-31 Arnaud Charlet <charlet@adacore.com>
2621 * gcc-interface/trans.c, gcc-interface/misc.c: Remove references
2622 to VMS. Misc clean ups.
2623 * gcc-interface/Makefile.in (gnatlib-shared-vms): Remove.
2625 2014-07-31 Robert Dewar <dewar@adacore.com>
2627 * cstand.adb, einfo.adb, einfo.ads, errout.adb, exp_attr.adb,
2628 exp_prag.adb, frontend.adb, interfac.ads,
2629 par-prag.adb, s-auxdec.ads, s-filofl.ads, s-fishfl.ads, s-fvadfl.ads,
2630 s-fvaffl.ads, s-fvagfl.ads, s-vaflop.ads, sem_attr.adb, sem_attr.ads,
2631 sem_ch13.adb, sem_ch3.adb, sem_ch8.adb, sem_prag.adb, snames.adb-tmpl,
2632 snames.ads-tmpl: Remove obsolete VMS-specific code.
2634 2014-07-31 Robert Dewar <dewar@adacore.com>
2636 * sem_ch3.adb, sem_ch13.adb: Minor reformatting.
2638 2014-07-31 Arnaud Charlet <charlet@adacore.com>
2640 * a-intnam-linux.ads: Minor: update obsolete comments.
2641 * s-taasde.adb: Minor: fix comment header.
2643 2014-07-31 Arnaud Charlet <charlet@adacore.com>
2645 * s-auxdec-vms-ia64.adb, s-parame-vms-alpha.ads, s-asthan-vms-alpha.adb,
2646 s-tpopde-vms.adb, s-mastop-vms.adb, s-tpopde-vms.ads, s-taprop-vms.adb,
2647 mlib-tgt-vms_common.adb, mlib-tgt-vms_common.ads, s-inmaop-vms.adb,
2648 g-enblsp-vms-alpha.adb, s-ransee-vms.adb, s-osprim-vms.adb,
2649 s-osprim-vms.ads, g-socthi-vms.adb, g-socthi-vms.ads, system-vms_64.ads,
2650 s-osinte-vms.adb, s-osinte-vms.ads, g-eacodu-vms.adb,
2651 s-vaflop-vms-alpha.adb, s-parame-vms-ia64.ads, a-dirval-vms.adb,
2652 a-caldel-vms.adb, mlib-tgt-specific-vms-alpha.adb, s-tasdeb-vms.adb,
2653 symbols-vms.adb, a-intnam-vms.ads, g-expect-vms.adb,
2654 symbols-processing-vms-alpha.adb, mlib-tgt-specific-vms-ia64.adb,
2655 s-traent-vms.adb, s-traent-vms.ads, i-cstrea-vms.adb, a-numaux-vms.ads,
2656 symbols-processing-vms-ia64.adb, s-interr-vms.adb, s-memory-vms_64.adb,
2657 s-memory-vms_64.ads, g-enblsp-vms-ia64.adb, s-taspri-vms.ads,
2658 s-auxdec-vms_64.ads, s-intman-vms.adb, s-intman-vms.ads,
2659 s-tpopsp-vms.adb, s-asthan-vms-ia64.adb, a-calend-vms.adb,
2660 a-calend-vms.ads, system-vms-ia64.ads, s-auxdec-vms-alpha.adb: Removed.
2661 * namet.h (Is_Non_Ada_Error): Remove.
2663 2014-07-31 Robert Dewar <dewar@adacore.com>
2665 * exp_util.adb, lib-writ.adb, sem_ch12.adb, s-direio.adb: Minor
2668 2014-07-31 Hristian Kirtchev <kirtchev@adacore.com>
2670 * exp_attr.adb (Expand_Loop_Entry_Attribute): Update the comment
2671 which demonstrates the expansion of while loops subject to
2672 attribute 'Loop_Entry. The condition of a while loop along with
2673 related condition actions is now wrapped in a function. Instead
2674 of repeating the condition, the expansion now calls the function.
2676 2014-07-31 Ed Schonberg <schonberg@adacore.com>
2678 * sem_case.adb (Check_Against_Predicate): Correct off-by-one
2679 error when reporting of missing values in a case statement for
2680 a type with a static predicate.
2681 (Check_Choices): Reject a choice given by a subtype to which a
2682 Dynamic_Predicate applies.
2683 * sem_ch3.adb (Analyze_Subtype_Declaration): Inherit
2684 Has_Dynamic_Predicate_Aspect flag from parent.
2686 2014-07-31 Ed Schonberg <schonberg@adacore.com>
2688 * sem_ch13.adb (Analyze_Aspect_Specifications): A predicate
2689 cannot apply to a subtype of an incomplete type.
2690 (Is_Static_Choice): Treat an Others_Clause as static. The
2691 staticness of the expression and of the range are checked
2694 2014-07-31 Pascal Obry <obry@adacore.com>
2696 * adaint.h (__gnat_ftell64): Added.
2697 (__gnat_fseek64): Added.
2699 * cstreams.c (__int64): Removed.
2701 2014-07-31 Pascal Obry <obry@adacore.com>
2703 * a-stream.ads (Stream_Element_Offset): Now a signed 64bit type.
2704 * i-cstrea.ads, s-crtl.ads (fseek64): Offset is always a 64bit value.
2705 (ftell64): Always returns a 64bit value.
2706 * cstreams.c (int64): New definition.
2707 (_FILE_OFFSET_BITS): Set to 64 to enable 64bit offset support.
2708 (__gnat_ftell64): Always returns a 64bit value. The implemenation now
2709 uses ftello() on UNIX.
2710 (__gnat_fseek64): Offset is always a 64bit value. The
2711 implementation now uses fseeko() on UNIX.
2712 * a-ststio.adb, s-direio.adb (Set_Position): Simplify code,
2713 always use fseek64 to set the offset.
2714 (Size): Simplify code, always use fseek64/ftell64.
2715 * s-direio.ads (Count): Now an int64.
2716 * g-socket.ads (Vector_Element): Adjust definition for Length
2717 to be a size_t. This matches the C definition and avoid using
2718 a 64bit integer on 32bit platforms now that Count is always 64bit.
2719 * g-socthi-mingw.adb (Ada.Streams): Removed as not used anymore.
2720 (C_Recvmsg): Change some conversion to account for change in
2722 (C_Sendmsg): Likewise.
2724 2014-07-31 Robert Dewar <dewar@adacore.com>
2726 * cstand.adb (Create_Standard): Remove handling of -gnatdm flag.
2727 * debug.adb: Remove documentation of -gnatdm flag.
2728 * gnat1drv.adb (Adjust_Global_Switches): Remove handling of
2731 2014-07-31 Arnaud Charlet <charlet@adacore.com>
2733 * lib-writ.adb (Write_Unit_Information): Fix case where U =
2736 2014-07-31 Claire Dross <dross@adacore.com>
2738 * exp_util.adb, exp_util.ads
2739 (Get_First_Parent_With_External_Axiomatization_For_Entity):
2740 New routine to find the first parent of an entity with
2741 a pragma Annotate (GNATprove, External_Axiomatization).
2742 (Has_Annotate_Pragma_For_External_Axiomatization): New function
2743 to check if a package has a pragma Annotate (GNATprove,
2744 External_Axiomatization).
2745 * einfo.ads, einfo.adb (Is_Generic_Actual_Subprogram): New
2746 flag on the entity for the declaration created for a formal
2747 subprogram in an instance. This is a renaming declaration,
2748 or in GNATprove_Mode the declaration of an expression function
2749 that captures the axiomatization of the actual.
2750 * sem_ch6.adb (Analyze_Expression_Function): For a
2751 Generic_Actual_Subprogram, place body immediately after the
2752 declaration because it may be used in a subsequent declaration
2754 * sem_ch12.adb (Build_Wrapper): Add code to handle instances where
2755 the actual is a function, not an operator. Handle functions with
2756 one and two parameters and binary and unary operators.
2758 2014-07-31 Pascal Obry <obry@adacore.com>
2760 * cstreams.c (__gnat_is_regular_file_fd): Removed.
2761 * adaint.c (__gnat_is_regular_file_fd): Added.
2763 2014-07-31 Robert Dewar <dewar@adacore.com>
2765 * exp_strm.adb: Minor reformatting.
2767 2014-07-31 Ed Schonberg <schonberg@adacore.com>
2769 * sem_ch12.adb (Build_Wrapper): New procedure, subsidiary to
2770 Analyze_Associations, to create a wrapper around operators that
2771 are actuals to formal subprograms. This is done in GNATProve
2772 mode in order to propagate the contracts of the operators to
2773 the body of the instance.
2775 2014-07-31 Ed Schonberg <schonberg@adacore.com>
2777 * sem_attr.adb (Analyze_Attribute, case 'Old): The reference is
2778 legal if within an aspect specification for a generic subprogram.
2780 2014-07-31 Javier Miranda <miranda@adacore.com>
2782 * gnat1drv.adb (Back_End_Inlining): Set to false if
2783 Suppress_All_Inlining is set.
2784 * debug.adb: Adding documentation for -gnatd.z.
2785 * inline.adb (Add_Inlined_Body): Extend the -gnatn2
2786 processing to -gnatn1 for calls to Inline_Always routines.
2787 (Add_Inlined_Subprogram): Remove previous patch.
2789 2014-07-31 Ed Schonberg <schonberg@adacore.com>
2791 * sem_ch13.adb (Check_One_Function): Apply properly the static
2792 semantic rules for indexing aspects and the functions they denote.
2794 2014-07-31 Javier Miranda <miranda@adacore.com>
2796 * debug.adb: Complete documentation of -gnatd.z.
2798 2014-07-31 Bob Duff <duff@adacore.com>
2800 * gnat_ugn.texi: Minor doc fixes.
2802 2014-07-31 Robert Dewar <dewar@adacore.com>
2804 * sem_aggr.adb (Resolve_Array_Aggregate): Fix posting of missing
2807 2014-07-31 Tristan Gingold <gingold@adacore.com>
2809 * s-unstyp.ads (Packed_Byte): Make this type universal aliasing.
2810 (Packed_Bytes1): Make component aliased.
2812 2014-07-31 Robert Dewar <dewar@adacore.com>
2814 * s-unstyp.ads, s-fileio.adb: Minor reformatting.
2816 2014-07-31 Robert Dewar <dewar@adacore.com>
2818 * inline.adb, gnat1drv.adb, exp_ch6.adb, s-fileio.adb: Minor
2821 2014-07-31 Eric Botcazou <ebotcazou@adacore.com>
2823 * gcc-interface/utils2.c ((build_binary_op): Don't set TREE_THIS_NOTRAP
2824 on array references here, now done more selectively in trans.c.
2826 2014-07-31 Doug Rupp <rupp@adacore.com>
2828 * gcc-interface/misc.c (gnat_init_gcc_fp(): Set flag_errno_math to 0.
2830 2014-07-31 Hristian Kirtchev <kirtchev@adacore.com>
2832 * sem_util.adb (Is_Effectively_Volatile): New routine.
2834 2014-07-31 Fedor Rybin <frybin@adacore.com>
2836 * gnat_ugn.texi: Document --test-duration option for gnattest.
2838 2014-07-31 Javier Miranda <miranda@adacore.com>
2839 Eric Botcazou <ebotcazou@adacore.com>
2841 * opt.ads (Back_End_Inlining): New variable which controls
2842 activation of inlining by back-end expansion.
2843 * gnat1drv.adb (Adjust_Global_Switches): Initialize Back_End_Inlining
2844 * sem_ch6.adb (Analyze_Subprogram_Body_Helper): Do not build
2845 the body to be inlined by the frontend if Back_End_Inlining
2847 * exp_ch6.adb (Register_Backend_Call): Moved to inline.adb.
2848 (Expand_Call): If backend inlining is enabled let the backend to
2849 handle inlined subprograms.
2850 * inline.ads (Register_Backend_Call): Moved here from exp_ch6
2851 * inline.adb (Register_Backend_Call): Moved here from exp_ch6.
2852 (Add_Inlined_Subprogram): Add subprograms when Back_End_Inlining is set.
2853 (Must_Inline): Do not return Inline_Call if Back_End_Inlining is
2855 * debug.adb Document -gnatd.z
2856 * fe.h Import Back_End_Inlining variable.
2857 * gcc-interface/utils.c (create_subprog_decl): If Back_End_Inlining is
2858 enabled then declare attribute "always inline"
2859 * gcc-interface/decl.c, gcc-interface/trans.c,
2860 gcc-interface/gigi.h: Add handling of Inline_Always pragma.
2862 2014-07-31 Robert Dewar <dewar@adacore.com>
2864 * a-ngelfu.ads: Minor comment fix.
2866 2014-07-31 Hristian Kirtchev <kirtchev@adacore.com>
2868 * freeze.adb (Freeze_Record_Type): Replace all calls to
2869 Is_SPARK_Volatile with Is_Effectively_Volatile and update
2871 * sem_ch3.adb (Analyze_Object_Contract, Process_Discriminants):
2872 Replace all calls to Is_SPARK_Volatile with
2873 Is_Effectively_Volatile and update related comments.
2874 * sem_ch5.adb (Analyze_Iterator_Specification,
2875 Analyze_Loop_Parameter_Specification): Replace all calls to
2876 Is_SPARK_Volatile with Is_Effectively_Volatile and update
2878 * sem_ch6.adb (Process_Formals): Replace all calls to
2879 Is_SPARK_Volatile with Is_Effectively_Volatile and update
2881 * sem_ch12.adb (Instantiate_Object): Replace the call to
2882 Is_SPARK_Volatile_Object with Is_Effectively_Volatile_Object
2883 and update related comment.
2884 * sem_prag.adb (Analyze_External_Property_In_Decl_Part,
2885 Analyze_Global_Item): Replace all calls to Is_SPARK_Volatile
2886 with Is_Effectively_Volatile and update related comments.
2887 * sem_res.adb (Resolve_Actuals, Resolve_Entity_Name): Replace
2888 all calls to Is_SPARK_Volatile with Is_Effectively_Volatile and
2889 update related comments.
2890 * sem_util.adb (Has_Enabled_Property,
2891 Variable_Has_Enabled_Property): Replace all calls
2892 to Is_SPARK_Volatile with Is_Effectively_Volatile and
2893 update related comments.
2894 (Is_Effectively_Volatile): New routine.
2895 (Is_Effectively_Volatile_Object): New routine.
2896 (Is_SPARK_Volatile): Removed.
2897 (Is_SPARK_Volatile_Object): Removed.
2898 * sem_util.ads (Is_Effectively_Volatile): New routine.
2899 (Is_Effectively_Volatile_Object): New routine.
2900 (Is_SPARK_Volatile): Removed.
2901 (Is_SPARK_Volatile_Object): Removed.
2903 2014-07-31 Pascal Obry <obry@adacore.com>
2905 * s-fileio.adb (Open): Make sure a shared file gets inserted into
2906 the global list atomically. This ensures that the file descriptor
2907 won't be freed because another tasks is closing the file.
2909 2014-07-31 Robert Dewar <dewar@adacore.com>
2911 * sem_ch3.adb (Process_Range_Expr_In_Decl): Add comments on
2912 generation of _FIRST and _LAST variables even in GNATprove_Mode.
2913 * gnat_ugn.texi: Minor editing.
2914 * sem_prag.adb (Ensure_Aggregate_Form): Make sure generated
2915 aggregate is marked Comes_From_Source if argument is CFS.
2917 2014-07-31 Pascal Obry <obry@adacore.com>
2919 * s-fileio.adb: Remove obsolete comment.
2921 2014-07-31 Vincent Celier <celier@adacore.com>
2923 * a-strbou.ads ("=" (Bounded_String, Bounded_String): Add
2924 overriding keyword before function to avoid error when compiler
2925 is called with -gnatyO (check overriding indicators).
2927 2014-07-31 Tucker Taft <taft@adacore.com>
2929 * gnat_ugn.texi: Add a paragraph pointing the reader
2930 to the "plugins" example.
2932 2014-07-31 Hristian Kirtchev <kirtchev@adacore.com>
2934 * freeze.adb (Freeze_Expression): Document the
2935 purpose of the parent chain traversal.
2937 2014-07-31 Robert Dewar <dewar@adacore.com>
2939 * checks.ads, checks.adb (Activate_Overflow_Check): Do not set flag for
2940 unconstrained fpt ops.
2942 2014-07-31 Pascal Obry <obry@adacore.com>
2944 * s-fileio.adb (Open): Make sure a shared file gets inserted into
2945 the global list atomically. This ensures that the file descriptor
2946 won't be freed because another tasks is closing the file.
2948 2014-07-31 Vincent Celier <celier@adacore.com>
2950 * projects.texi: Minor spelling error fix.
2952 2014-07-31 Robert Dewar <dewar@adacore.com>
2954 * gnat_rm.texi: Document No_Elaboration_Code_All restriction.
2955 * lib-writ.adb, lib-load.adb: Initialize No_Elab_Code field in unit
2957 * lib.ads, lib.adb (No_Elab_Code): New field in unit information.
2958 * restrict.adb (Process_Restriction_Synonyms): Add handling
2959 of No_Elaboration_Code_All.
2960 * restrict.ads (Process_Restriction_Synonyms): Now handles
2961 No_Elaboration_Code_All.
2962 * sem_ch10.adb (Analyze_Context): Enforce transitive with for
2963 No_Elaboration_Code_All.
2964 * sem_prag.adb (Process_Restrictions_Or_Restriction_Warnings):
2965 Handle setting of No_Elab_Code in unit information. Handle
2966 No_Elaboration_Code_All.
2967 * snames.ads-tmpl (Name_No_Elaboration_Code): New name for
2969 (Name_No_Elaboration_Code_All): New name for pragma processing.
2971 2014-07-31 Eric Botcazou <ebotcazou@adacore.com>
2973 * exp_aggr.adb (Aggr_Assignment_OK_For_Backend): Reject array
2974 types with a null range and use the Esize of the component
2975 instead of its RM_Size to identify appropriate values.
2977 2014-07-31 Hristian Kirtchev <kirtchev@adacore.com>
2979 * freeze.adb Add with and use clause for Aspects.
2980 (Freeze_Expression): Emit an error when a volatile constant lacks
2981 Boolean aspect Import.
2982 (Has_Boolean_Aspect_Import): New routine.
2984 2014-07-31 Gary Dismukes <dismukes@adacore.com>
2986 * exp_util.adb: Minor reformatting.
2988 2014-07-31 Vincent Celier <celier@adacore.com>
2990 * errutil.adb (Error_Msg): Make sure that all components of
2991 the error message object are initialized.
2993 2014-07-31 Ed Schonberg <schonberg@adacore.com>
2995 * sem_ch4.adb (Try_Container_Indexing): If the container type is
2996 class-wide, use specific type to locate iteration primitives.
2997 * sem_ch13.adb (Check_Indexing_Functions): Add legality checks for
2998 rules in RM 4.1.6 (Illegal_Indexing): New diagnostic procedure.
2999 Minor error message reformating.
3000 * exp_ch5.adb (Expand_Iterator_Loop): Handle properly Iterator
3001 aspect for a derived type.
3003 2014-07-31 Robert Dewar <dewar@adacore.com>
3005 * debug.adb: Document debug flag d.X.
3007 2014-07-31 Ed Schonberg <schonberg@adacore.com>
3009 * sem_util.ads (Find_Specific_Type): Moved here from exp_disp.adb.
3010 * sem_util.adb (Find_Specific_Type): If type is untagged private,
3011 retrieve full view so that primitive operations can be located.
3012 * exp_disp.adb Move Find_Specific_Type to sem_util.
3013 * exp_ch4.adb (Expand_N_Op_Eq): If operands are class-wide, use
3014 Find_Specific_Type to locate primitive equality.
3015 * exp_util.adb (Make_CW_Equivalent_Type): A class_wide equivalent
3016 type does not require initialization.
3017 * exp_attr.adb (Compile_Stream_Body_In_Scope): Within an instance
3018 body all visibility is established, and the enclosing package
3019 declarations must not be installed.
3021 2014-07-31 Yannick Moy <moy@adacore.com>
3023 * sem_parg.adb, sem_prag.ads (Collect_Subprogram_Inputs_Outputs):
3024 Make subprogram public.
3026 2014-07-31 Ed Schonberg <schonberg@adacore.com>
3028 * exp_ch9.adb (Expand_N_Protected_Type_Declaration): New
3029 predicate Discriminated_Size, to distinguish between private
3030 components that depend on discriminants from those whose size
3031 depends on some other non-static expression.
3033 2014-07-31 Nicolas Setton <setton@adacore.com>
3035 * g-exptty.adb (Close): Fix binding to Waitpid: use the
3038 2014-07-31 Ed Schonberg <schonberg@adacore.com>
3040 * sem_ch3.adb (Make_Index): Reject properly the use of 'Length
3041 in a discrete range, when 'range was probably intended.
3043 2014-07-31 Robert Dewar <dewar@adacore.com>
3045 * sem_warn.adb, sem_warn.ads (Has_Junk_Name): Moved from body to spec.
3047 2014-07-31 Robert Dewar <dewar@adacore.com>
3049 * frontend.adb: Minor reformatting.
3050 * sem.adb: Minor reformatting.
3051 * sem_ch6.adb (Analyze_Null_Procedure): Set proper sloc for
3052 identifiers on rewrite.
3053 * par.adb: Minor comment updates.
3054 * a-ngelfu.adb (Cos): Minor simplification.
3055 * par-ch13.adb (Get_Aspect_Specifications): Improve messages
3056 and recovery for bad aspect.
3057 * exp_ch3.adb: Code clean up.
3058 * sem_util.ads: Minor comment correction.
3059 * sem_ch13.adb (Check_Array_Type): Properly handle large types.
3060 * sem_ch3.adb: Code clean up.
3061 * binderr.ads: Minor comment correction.
3063 2014-07-31 Ed Schonberg <schonberg@adacore.com>
3065 * exp_disp.adb (Expand_Interface_Conversion): A call whose
3066 prefix is a static conversion to an interface type that is not
3067 class-wide is not dispatching.
3069 2014-07-31 Robert Dewar <dewar@adacore.com>
3071 * inline.adb, s-traceb.adb, s-traceb-hpux.adb, memtrack.adb,
3072 s-traceb-mastop.adb: Minor reformatting.
3074 2014-07-31 Ed Schonberg <schonberg@adacore.com>
3076 * exp_ch3.adb (Expand_Record_Extension): In ASIS_Mode perform
3077 expansion, to handle properly visibility of selected components
3080 2014-07-31 Robert Dewar <dewar@adacore.com>
3082 * par-ch13.adb (Get_Aspect_Specifications): Set Inside_Depends.
3083 * par-ch2.adb (P_Pragma): Set Inside_Depends.
3084 * par-ch4.adb (P_Simple_Expression): Pass Inside_Depends to
3085 Check_Unary_Plus_Or_Minus.
3086 * scans.ads (Inside_Depends): New flag.
3087 * scng.adb (Scan): Pass Inside_Depends to Check_Arrow.
3088 * style.ads: Add Inside_Depends parameter to Check_Arrow Add
3089 Inside_Depends parameter to Check_Unary_Plus_Or_Minus.
3090 * styleg.adb (Check_Arrow): Handle Inside_Depends case.
3091 (Check_Unary_Plus_Or_Minus): Handle Inside_Depends case.
3092 * styleg.ads: Add Inside_Depends parameter to Check_Arrow Add.
3093 Inside_Depends parameter to Check_Unary_Plus_Or_Minus.
3095 2014-07-31 Javier Miranda <miranda@adacore.com>
3097 * s-vaflop.adb Move the body of function T_To_G before
3098 T_To_D. Required for frontend inlining.
3099 * inline.adb (Has_Excluded_Contract): New subprogram used to
3100 check if a subprogram inlined by the frontend has contracts
3101 which cannot be inlined.
3103 2014-07-31 Bob Duff <duff@adacore.com>
3105 * s-traceb.adb, s-traceb-hpux.adb, s-traceb-mastop.adb:
3106 (Call_Chain): Add 1 to number of frames to skip, to account for
3107 the fact that there's one more frame on the stack.
3108 * gcc-interface/Makefile.in (s-traceb.o): Adjust rules.
3110 2014-07-31 Robert Dewar <dewar@adacore.com>
3112 * checks.adb (Enable_Overflow_Check): More precise setting of
3113 Do_Overflow_Check flag for division.
3115 2014-07-31 Eric Botcazou <ebotcazou@adacore.com>
3117 * exp_aggr.adb (Aggr_Assignment_OK_For_Backend): Reject packed
3118 array types with implementation type.
3120 2014-07-31 Hristian Kirtchev <kirtchev@adacore.com>
3122 * sem_ch10.adb (Process_State): Remove local variable Name. Add
3123 local variable Decl. Partially declare an abstract state by
3124 generating an entity and storing it in the state declaration.
3125 * sem_prag.adb (Create_Abstract_State): Fully declare a
3126 semi-declared abstract state.
3128 2014-07-31 Robert Dewar <dewar@adacore.com>
3130 * prj-nmsc.adb: Minor reformatting.
3132 2014-07-31 Bob Duff <duff@adacore.com>
3134 * s-tasdeb.adb (System.Tasking.Debug): Remove
3135 all usage of the secondary stack from this package.
3137 2014-07-31 Hristian Kirtchev <kirtchev@adacore.com>
3139 * freeze.adb (Freeze_Expression): Update the loop in charge
3140 of finding a proper insertion place for freeze nodes to handle
3141 N_Expression_With_Actions nodes.
3143 2014-07-31 Robert Dewar <dewar@adacore.com>
3145 * sem_util.adb, a-ngelfu.ads, prj-nmsc.adb, prj-conf.adb: Minor
3148 2014-07-31 Pascal Obry <obry@adacore.com>
3150 * prj-nmsc.adb: Minor reformatting.
3152 2014-07-31 Ed Schonberg <schonberg@adacore.com>
3154 * sem_util.adb (Has_Preelaborable_Initialization): Check that
3155 type is tagged before checking whether a user-defined Initialize
3156 procedure is present.
3158 2014-07-31 Gary Dismukes <dismukes@adacore.com>
3160 * a-ngelfu.ads (Sqrt): Augment postcondition.
3162 2014-07-31 Pascal Obry <obry@adacore.com>
3164 * prj-nmsc.adb (Check_Library_Attributes): An aggegate library
3165 directory and ALI directory must be different than all object
3166 and library directories of aggregated projects.
3168 2014-07-31 Vincent Celier <celier@adacore.com>
3170 * prj-pars.adb, prj-conf.ads, prj-conf.adb (Locate_Runtime): Move spec
3171 to package body, as it is not called from outside. Remove argument
3172 Project_Tree, no longer used. When runtime cannot be found,
3173 call Raise_Invalid_Config instead of failing the program.
3175 2014-07-31 Robert Dewar <dewar@adacore.com>
3177 * bindgen.adb (Gen_Output_File_Ada): Generate pragma Suppress
3179 * gnatlink.adb (Process_Args): Remove generation of -gnato0,
3182 2014-07-31 Robert Dewar <dewar@adacore.com>
3184 * gnat_ugn.texi: Document new switch -gnato0.
3185 * sem_ch3.ads: Minor reformatting.
3186 * gnatlink.adb (Process_Args): Compile bind file with -gnato0
3187 (we do not want overflow checks when incrementing elaboration
3189 * einfo.ads: Minor reformatting.
3191 2014-07-31 Robert Dewar <dewar@adacore.com>
3193 * exp_ch5.adb, freeze.adb, exp_ch3.adb: Minor comment correction.
3194 * s-arit64.adb: Minor reformatting.
3196 2014-07-31 Robert Dewar <dewar@adacore.com>
3198 * gnat1drv.adb (Adjust_Global_Switches): Default for overflow
3199 checking is enabled except in GNAT_Mode.
3200 * switch-c.adb (Scan_Front_End_Switches): Implement -gnato0
3201 (suppress overflow checks).
3203 2014-07-31 Ed Schonberg <schonberg@adacore.com>
3205 * exp_ch3.adb (Expand_Freeze_Record_Type): Do not build an
3206 invariant procedure for an internally generated subtype that is
3207 created for an object of a class-wide type.
3209 2014-07-31 Vincent Celier <celier@adacore.com>
3211 * prj-nmsc.adb, errutil.adb: Make code similar to Errout.
3213 2014-07-31 Gary Dismukes <dismukes@adacore.com>
3215 * gnat_rm.texi, sem_aux.ads, einfo.ads, sem_util.ads, sem_ch6.adb,
3216 exp_disp.adb: Minor reformatting.
3218 2014-07-31 Robert Dewar <dewar@adacore.com>
3220 * exp_ch5.adb, sem_ch3.adb, exp_ch7.adb, exp_util.adb, exp_ch9.adb,
3221 sem_ch7.adb, checks.adb, s-exctra.adb, exp_ch6.adb, exp_disp.adb,
3222 exp_dist.adb, sem_ch13.adb, exp_strm.adb, exp_ch3.adb: Minor
3225 2014-07-31 Robert Dewar <dewar@adacore.com>
3227 * sem_ch13.adb: Minor reformatting.
3229 2014-07-31 Ed Schonberg <schonberg@adacore.com>
3231 * exp_ch3.adb (Build_Invariant_Checks): If the enclosing record
3232 is an unchecked_union, warn that invariants will not be checked
3233 on components that have them.
3235 2014-07-31 Robert Dewar <dewar@adacore.com>
3237 * freeze.adb (Freeze_Entity): Check for error of
3238 Type_Invariant'Class applied to a untagged type.
3239 * sem_ch6.adb (Analyze_Null_Procedure): Unconditionally rewrite
3240 as null body, so that we perform error checks even if expansion
3243 2014-07-31 Ed Schonberg <schonberg@adacore.com>
3245 * sem_ch13.adb (Build_Invariant_Procedure): If body of procedure
3246 is already present, nothing to do.
3247 * exp_ch3.adb (Build_Component_Invariant_Call): For an access
3248 component, check whether the access type has an invariant before
3249 checking the designated type.
3250 (Build_Record_Invariant_Proc): Change suffix of generated
3251 name to prevent ambiguity when record type has invariants
3252 in addition to those of components, and two subprograms are
3253 constructed. Consistent with handling of array types.
3254 (Insert_Component_Invariant_Checks): Build invariant procedure
3255 body when one has not been created yet, in the case of composite
3256 types that are completions and whose full declarations carry
3259 2014-07-30 Thomas Quinot <quinot@adacore.com>
3261 * gnat_rm.texi: Minor doc fixes.
3263 2014-07-30 Robert Dewar <dewar@adacore.com>
3265 * a-rbtgbo.adb, sem_ch13.adb: Minor reformatting.
3267 2014-07-30 Vincent Celier <celier@adacore.com>
3269 * errutil.adb (Set_Msg_Text): Process tilde ('~'): no processing
3271 * prj-nmsc.adb (Locate_Directory): Use a tilde ('~') in the
3272 message to report that a directory cannot be created, to avoid
3273 processing of the directory path that may contains special
3274 insertion characters.
3276 2014-07-30 Ed Schonberg <schonberg@adacore.com>
3278 * a-crdlli.ads: Place declaration of Empty_List after full type
3279 declaration for Curosr, to prevent freezing error.
3281 2014-07-30 Robert Dewar <dewar@adacore.com>
3283 * get_targ.adb: Minor code reorganization.
3284 * prj-proc.adb, prj-proc.ads, get_targ.ads, sem_ch6.adb: Minor
3287 2014-07-30 Ed Schonberg <schonberg@adacore.com>
3289 * a-cbhase.adb: a-cbhase.adb (Insert): Raise Constraint_Error,
3290 not Program_Error, when attempting to remove an element not in
3291 the set. This is the given semantics for all set containers.
3293 2014-07-30 Ed Schonberg <schonberg@adacore.com>
3295 * a-rbtgbo.adb (Delete_Node_Sans_Free): If
3296 element is not present in tree return rather than violating
3297 an assertion. Constraint_Error will be raised in the caller if
3298 element is not in the container.
3300 2014-07-30 Arnaud Charlet <charlet@adacore.com>
3302 * set_targ.adb (Read_Target_Dependent_Values): New subprogram.
3303 (elab body): Add provision for default target config file.
3304 * get_targ.ads, get_targ.adb (Get_Back_End_Config_File): New subprogram.
3306 2014-07-30 Ed Schonberg <schonberg@adacore.com>
3308 * a-cbhase.adb (Delete): Raise Constraint_Error, not Program_Error,
3309 when attempting to remove an element not in the set. This is
3310 the given semantics for all set containers.
3311 * a-cborse.adb (Delete): Attempt removal first, to check for
3312 tampering, before checking whether this is an attempt to
3313 delete a non-existing element, and in fthe latter case raise
3316 2014-07-30 Vincent Celier <celier@adacore.com>
3318 * prj-proc.adb (Recursive_Process): Do not create a new
3319 Project_Id if the project is already in the list of projects of
3322 2014-07-30 Ed Schonberg <schonberg@adacore.com>
3324 * sem_ch6.adb (Analyze_Function_Return): Reject a return expression
3325 whose type is an incomplete formal type.
3326 (Analyze_Return_Type): Reject a return type that is an untagged
3327 imcomplete formal type.
3328 (Process_Formals): Reject a formal parameter whose type is an
3329 untagged formal incomplete type.
3330 * sem_res.adb (Resolve_Actuals): Reject an actual whose type is
3331 an untagged formal incomplete type.
3333 2014-07-30 Robert Dewar <dewar@adacore.com>
3335 * gnat_ugn.texi: Minor spelling correction.
3336 * makeutl.adb: Minor code reorganization.
3337 * exp_ch4.adb, exp_aggr.adb, exp_ch3.adb: Minor reformatting.
3339 2014-07-30 Robert Dewar <dewar@adacore.com>
3341 * einfo.ads (Has_Unchecked_Union): Document that this is used
3342 to check for illegal Valid_Scalars attribute references.
3343 * exp_attr.adb (Build_Record_VS_Func): New function
3344 (Expand_N_Attribute_Reference, case Valid_Scalars): Call this
3346 * gnat_rm.texi: Document 'Valid_Scalars cannot be applied to
3347 Unchecked_Union Add note on 'Valid_Scalars generating a lot
3349 * sem_attr.adb (Analyze_Attribute, case Valid_Scalars): Give
3350 error on attempt to apply Valid_Scalars to Unchecked_Union type.
3352 2014-07-30 Steve Baird <baird@adacore.com>
3354 * exp_ch4.adb (Expand_N_Indexed_Component): Disable optimized handling
3355 of A(I..J)(K) in CodePeer_Mode.
3357 2014-07-30 Ben Brosgol <brosgol@adacore.com>
3359 * gnat_ugn.texi: Fix typo.
3361 2014-07-30 Thomas Quinot <quinot@adacore.com>
3363 * lib-writ.ads: document format change.
3365 2014-07-30 Pascal Obry <obry@adacore.com>
3367 * prj-util.adb (For_Interface_Sources): Do not
3368 include sources from withed externally built projects.
3370 2014-07-30 Robert Dewar <dewar@adacore.com>
3372 * lib.adb: Minor reformatting.
3373 * prj-util.adb: Minor reformatting.
3375 2014-07-30 Ed Schonberg <schonberg@adacore.com>
3377 * exp_aggr.adb (Build_Record_Aggr_Code): For an array component
3378 that depends on discriminants, and which is given by an others
3379 clause, create an explicit subtype with the discriminant values
3380 of the enclosing aggregate, because the backend cannot otherwise
3381 retrieve the actual bounds of the array.
3383 2014-07-30 Fedor Rybin <frybin@adacore.com>
3385 * gnat_ugn.texi: Improve gnattest documentation.
3387 2014-07-30 Pascal Obry <obry@adacore.com>
3389 * makeutl.adb (Insert_Project_Sources): Properly handle sources
3390 that are aggregated. We want to include sources not only part
3391 of libraries but also if part of an aggregated project from an
3393 * prj.adb (For_Project_And_Aggregated_Context): Properly check
3394 state of root project.
3396 2014-07-30 Thomas Quinot <quinot@adacore.com>
3398 * lib-load.ads: Minor reformatting.
3399 * sinfo.ads (Library_Unit): Update comment.
3400 * lib.ads (Notes): Simplify. The Unit component in Notes_Entry
3401 is redundant. Instead used the pragma Node_Id directly as the
3404 2014-07-30 Thomas Quinot <quinot@adacore.com>
3406 * lib.adb (Store_Note): Store only notes that do not come from
3407 an instance, and that are in the extended main source unit.
3408 * lib-writ (Write_Unit_Information): Annotations from subunits
3409 must be emitted along with those for the main unit, and they
3410 must carry a specific file name.
3411 * ali.ads (Notes_Record): Use a File_Name_Type instead of a
3412 Unit_Id for the source file containing the pragma, as in the
3413 case of annotations from subunits we might not have a readily
3415 * ali.adb (Scan_ALI): Account for above change in data structure.
3417 2014-07-30 Vincent Celier <celier@adacore.com>
3419 * makeutl.adb (Insert_Project_Sources): When the library project
3420 is an aggregate Stand-Alone Library, insert in the queue the
3421 Ada interface units, with Closure set to True;
3423 2014-07-30 Eric Botcazou <ebotcazou@adacore.com>
3425 * sem_util.adb: Fix minor typo.
3426 * makeutl.adb: Minor reformatting.
3428 2014-07-30 Robert Dewar <dewar@adacore.com>
3430 * exp_ch7.adb, checks.adb, makeutl.adb, makeutl.ads: Minor reformatting.
3432 2014-07-30 Yannick Moy <moy@adacore.com>
3434 * checks.ads: Fix typo in comment.
3436 2014-07-30 Pierre-Marie Derodat <derodat@adacore.com>
3438 * sem_util.adb (Set_Debug_Info_Needed): For scalar types, recurse on
3439 entities that materialize range bounds, if any.
3441 2014-07-30 Vincent Celier <celier@adacore.com>
3443 * projects.texi: Minor spelling fix.
3445 2014-07-30 Hristian Kirtchev <kirtchev@adacore.com>
3447 * checks.adb (Make_Bignum_Block): Use the new secondary stack
3448 build routines to manage the mark.
3449 * exp_ch7.adb (Create_Finalizer, Expand_Cleanup_Actions):
3450 Use the new secodary stack build routines to manage the mark.
3451 (Insert_Actions_In_Scope_Around): Add new formal parameter
3452 Manage_SS along with comment on its usage. Code and comment
3453 reformatting. Mark and release the secondary stack when the
3454 context warrants it.
3455 (Make_Transient_Block): Update the call
3456 to Insert_Actions_In_Scope_Around to account for parameter Manage_SS.
3457 (Wrap_Transient_Declaration): Remove local variable
3458 Uses_SS. Ensure that the secondary stack is marked and released
3459 when the related object declaration appears in a library level
3460 package or package body. Code and comment reformatting.
3461 * exp_util.ads, exp_util.adb (Build_SS_Mark_Call): New routine.
3462 (Build_SS_Release_Call): New routine.
3464 2014-07-30 Steve Baird <baird@adacore.com>
3466 * exp_attr.adb: Revert previous change, not needed after all.
3468 2014-07-30 Vincent Celier <celier@adacore.com>
3470 * makeutl.adb (Queue.Insert_Project_Sources): Insert with
3471 Closure => True for interfaces of Stand-Alone Libraries.
3472 * makeutl.ads (Source_Info (Format => Gprbuild)): Add new
3473 Boolean component Closure, defaulted to False.
3475 2014-07-30 Yannick Moy <moy@adacore.com>
3477 * sem_res.adb: Fix typo in error message.
3479 2014-07-30 Robert Dewar <dewar@adacore.com>
3481 * sem_ch3.adb (Process_Range_Expr_In_Decl): Use _FIRST/_LAST
3482 as name suffixes rather than L/H for subtype bounds.
3483 * tbuild.ads: Minor comment improvements and fixes
3484 (Make_External_Name): Document that suffix can start with an
3487 2014-07-30 Bob Duff <duff@adacore.com>
3489 * gnat_ugn.texi: Document --rep-clauses switch.
3491 2014-07-30 Ed Schonberg <schonberg@adacore.com>
3493 * sem_ch13.adb (Analyze_Aspect_Specifications): Default_Value and
3494 Default_Component_Value can only be specified for scalar type or
3495 arrays of scalar types respectively. This legality check must
3496 be performed at the point the aspect is analyzed, in order to
3497 reject aspect specifications that apply to a partial view.
3499 2014-07-30 Thomas Quinot <quinot@adacore.com>
3501 * freeze.adb: Minor reformatting.
3503 2014-07-30 Robert Dewar <dewar@adacore.com>
3505 * exp_attr.adb (Expand_Attribute, case First/Last): Don't expand in
3508 2014-07-30 Ed Schonberg <schonberg@adacore.com>
3510 * freeze.adb (Check_Expression_Function): At the freeze point
3511 of an expression function, verify that the expression in the
3512 function does not contain references to any deferred constants
3513 that have no completion yet.
3514 (Freeze_Expression, Freeze_Before): call
3515 Check_Expression_Function.
3516 * a-ciorse.ads: Add Reference_Control_Type to detect tampering.
3517 * a-ciorse.adb: Add Adjust and Finalize routines for
3518 Reference_Control_Type. Use it in the construction of Reference
3519 and Constant_Reference values.
3521 2014-07-30 Robert Dewar <dewar@adacore.com>
3523 * exp_aggr.adb: Update comments.
3524 * a-chtgbo.adb, a-chtgbo.ads, a-cbhase.adb, a-cbhase.ads: Minor
3527 2014-07-30 Robert Dewar <dewar@adacore.com>
3529 * cstand.adb (New_Standard_Entity): New version takes name
3530 string to call Make_Name.
3531 (Create_Standard): Use this routine to set name before setting other
3534 2014-07-30 Robert Dewar <dewar@adacore.com>
3536 * exp_attr.adb (Expand_Attribute, case First): Rewrite simple
3538 (Expand_Attribute, case Last): Ditto.
3539 * exp_ch3.adb (Constrain_Index): New calling sequence for
3540 Process_Range_Expr_In_Decl.
3541 (Expand_N_Object_Declaration): Avoid setting Is_Known_Valid in one
3543 * sem_ch3.adb (Constrain_Index): New calling sequence for
3544 Process_Range_Expr_In_Decl.
3545 (Set_Scalar_Range_For_Subtype): ditto.
3546 (Process_Range_Expr_In_Decl): Create constants to hold bounds for
3548 * sem_ch3.ads (Process_Range_Expr_In_Decl): Add Subtyp parameter.
3549 * sem_eval.adb (Compile_Time_Compare): Make sure we use base
3550 types if we are not assuming no invalid values.
3552 2014-07-30 Robert Dewar <dewar@adacore.com>
3554 * clean.adb: Minor reformatting.
3555 * opt.ads: Minor fix to incorrect comment.
3557 2014-07-30 Ed Schonberg <schonberg@adacore.com>
3559 * a-chtgbo.ads, a-chtgbo.adb (Delete_Node_At_Index): New
3560 subprogram, used by bounded hashed sets, to delete a node at
3561 a given index, whose element may have been improperly updated
3562 through a Reference_Preserving key.
3563 * a-cbhase.ads: Add Reference_Control_Type to package Generic_Keys.
3564 * a-cbhase.adb: Add Adjust and Finalize routines for
3565 Reference_Control_Type.
3566 (Delete, Insert): Raise Program_Error, not Constraint_Error,
3567 when operation is illegal.
3568 (Reference_Preserving_Key): Build aggregate for Reference_Control_Type
3569 * a-cmbutr.ads: Add Reference_Control_Type to detect tampering. Add
3570 private with_clause for Ada.Finalization.
3571 * a-cbmutr.adb: Add Adjust and Finalize routines for
3572 Reference_Control_Type. Use it in the construction of Reference
3573 and Constant_Reference values.
3575 2014-07-30 Robert Dewar <dewar@adacore.com>
3577 * sem_ch3.adb, sem_ch3.ads: Minor code reorganization.
3579 2014-07-30 Pascal Obry <obry@adacore.com>
3581 * clean.adb (Clean_Project): Properly check for directory
3582 existence before trying to enter it.
3584 2014-07-30 Robert Dewar <dewar@adacore.com>
3586 * sem_ch3.ads, prj.ads, prj-nmsc.adb: Minor reformatting.
3588 2014-07-30 Robert Dewar <dewar@adacore.com>
3590 * par-ch5.adb (P_Sequence_Of_Statements): Properly handle
3591 missing semicolon after name.
3593 2014-07-30 Pascal Obry <obry@adacore.com>
3595 * prj.ads (Gprinstall_Flags): New constant.
3596 * prj-nmsc.adb (Check_Library_Attributes): Do not fails for
3597 missing library dir if Directories_Must_Exist_In_Projects
3600 2014-07-30 Bob Duff <duff@adacore.com>
3602 * a-except-2005.adb, a-except.adb: Remove obsolete comments.
3603 * s-traceb.ads: Updagte comments.
3605 2014-07-30 Robert Dewar <dewar@adacore.com>
3607 * checks.adb, a-cihase.adb, a-cihase.ads, a-chtgop.adb, a-chtgop.ads,
3608 a-except.adb, a-except-2005.adb, a-cborse.adb, a-cborse.ads,
3609 a-exexda.adb, a-elchha.adb, exp_aggr.adb, a-cohase.adb: Minor
3612 2014-07-30 Ed Schonberg <schonberg@adacore.com>
3614 * a-chtgop.ads, a-chtgop.adb (Delete_Node_At_Index): New
3615 subprogram, used by all versions of hashed sets, to delete a node
3616 whose element has been improperly updated through a Reference_
3618 * a-cohase.adb: Remove Delete_Node, use new common procedure
3619 Delete_Node_At_Index.
3620 * a-cihase.ads: Add Reference_Control_Type to package Generic_Keys.
3621 * a-cihase.adb: Add Adjust and Finalize routines for
3622 Reference_Control_Type.
3623 (Reference_Preserving_Key): Build aggregate for
3624 Reference_Control_Type
3626 2014-07-30 Yannick Moy <moy@adacore.com>
3628 * checks.adb, checks.ads (Determine_Range_R): New procedure to
3629 determine the possible range of a floating-point expression.
3631 2014-07-30 Ed Schonberg <schonberg@adacore.com>
3633 * a-cborse.ads: Add Reference_Control_Type to package Generic_Keys.
3634 * a-cborse.adb: Add Adjust and Finalize routines for
3635 Reference_Control_Type.
3636 (Reference_Preserving_Key): Build aggregate for
3637 Reference_Control_Type.
3638 (Delete): Check for tampering, and raise Program_Error (not
3639 Constraint_Error) when attempting to delete an element not in
3643 2014-07-30 Bob Duff <duff@adacore.com>
3645 * a-elchha.adb, a-except-2005.adb, a-except.adb, a-exexda.adb,
3646 * a-exextr.adb, a-exstat.adb, exp_intr.ads, s-tassta.adb:
3647 Exception_Information is used to produce useful debugging
3648 information for the programmer. However, it was also used to
3649 implement the stream attributes for type Exception_Occurrence. The
3650 latter requires a stable and portable interface, which meant
3651 that we couldn't include a symbolic traceback. A separate set of
3652 routines was used to provide symbolic tracebacks under program
3653 control (i.e. not automatically). The goal of this ticket is
3654 to provide such automatic tracebacks, so the change here is to
3655 split the two functionalities: Exception_Information gives the
3656 maximally useful information for debugging (i.e. it now includes
3657 a symbolic traceback when a decorator is set, and it can be
3658 improved freely in the future without disturbing streaming).
3659 Untailored_Exception_Information always uses hexadecimal addresses
3660 in the traceback, has a stable and portable output, and is now
3663 2014-07-30 Eric Botcazou <ebotcazou@adacore.com>
3665 * exp_aggr.adb (Expand_Array_Aggregate): Add missing test
3666 on the target of the assignment to find out whether it
3667 can be directly done by the back-end.
3668 * exp_util.adb (Is_Possibly_Unaligned_Slice): Remove obscure test.
3670 2014-07-30 Robert Dewar <dewar@adacore.com>
3672 * inline.adb, a-coorse.adb, a-coorse.ads, a-cohase.adb, a-cohase.ads,
3673 a-tasatt.adb: Minor reformatting.
3675 2014-07-30 Robert Dewar <dewar@adacore.com>
3677 * exp_ch4.adb: Minor reformatting.
3679 2014-07-30 Ed Schonberg <schonberg@adacore.com>
3681 * a-coorse.adb, a-coorse.ads (Generic_Keys): Add a
3682 Reference_Control_Type to generic package, to keep additional
3683 information for Reference_Types that manipulate keys. Add Adjust and
3684 Finalize procedures for this type.
3685 (Finalize): When finalizing a reference_preserving_key, verify
3686 that the key of the new value is equivalent to the key of the
3687 original element, raise Program_Error otherwise.
3688 (Insert): Detect tampering.
3689 (Reference_Preserving_Key): Build proper Reference_Control_Type,
3690 and update Busy and Lock bits to detect tampering.
3691 * a-cohase.ads: Keep with-clause private.
3693 2014-07-30 Hristian Kirtchev <kirtchev@adacore.com>
3695 * exp_ch4.adb (Expand_N_Op_Eq): Emit a warning when the operands
3696 of an equality are of an Unchecked_Union type and lack inferable
3699 2014-07-30 Bob Duff <duff@adacore.com>
3701 * g-exctra.adb, g-exctra.ads, s-exctra.adb, s-exctra.ads, Makefile.rtl,
3702 g-trasym.adb, g-trasym.ads, s-trasym.adb, s-trasym.ads: Move
3703 GNAT.Traceback.Symbolic and GNAT.Exception_Traces into the System
3704 hierarchy (System.Traceback.Symbolic and System.Exception_Traces), so
3705 we can call them from the runtimes. Leave renamings in place under GNAT.
3707 2014-07-30 Yannick Moy <moy@adacore.com>
3709 * inline.adb (Check_And_Build_Body_To_Inline): Include code for
3710 inlining in GNATprove mode.
3712 2014-07-30 Ed Schonberg <schonberg@adacore.com>
3714 * a-cohase.adb, a-cohase.ads (Generic_Keys): Add a
3715 Reference_Control_Type to generic package, to keep additional
3716 information for Reference_Types that manipulate keys. Add Adjust and
3717 Finalize procedures for this type.
3718 (Delete_Node): New procedure called when finalizing a
3719 Reference_Control_Type, to remove a node whose element has been
3720 improperly updated through a Reference.
3721 (Insert): Detect tampering.
3722 (Reference_Preserving_Key): Build proper Reference_Control_Type,
3723 and update Busy and Lock bits to detect tampering.
3725 2014-07-30 Bob Duff <duff@adacore.com>
3727 * exp_intr.ads: Minor comment fix.
3729 2014-07-30 Gary Dismukes <dismukes@adacore.com>
3731 * exp_prag.adb, a-tags.ads: Minor typo fixes.
3733 2014-07-30 Bob Duff <duff@adacore.com>
3735 * a-excach.adb, a-excach-cert.adb, a-except-2005.ads,
3736 a-except.ads, g-traceb.adb, memtrack.adb,
3737 s-traceb.adb, s-traceb.ads, s-traceb-hpux.adb, s-traceb-mastop.adb:
3738 Cleanup: Make the three versions of System.Traceback.Call_Chain
3739 have the same interface. Use an array for the Traceback parameter
3740 instead of an Address. This will enable reduction in code
3743 2014-07-30 Pat Rogers <rogers@adacore.com>
3745 * gnat_ugn.texi: Corrected minor textual error in description
3748 2014-07-30 Bob Duff <duff@adacore.com>
3750 * Makefile.rtl: Sort file names.
3752 2014-07-30 Arnaud Charlet <charlet@adacore.com>
3754 * a-tasatt.adb: Complete previous change: kill spurious warning
3755 on e.g. sparc, and make sure we only use the fast path when the
3756 alignment is compatible.
3758 2014-07-30 Yannick Moy <moy@adacore.com>
3760 * sem_ch6.adb (Analyze_Subprogram_Body_Helper): Mark new Spec_Id as
3763 2014-07-30 Yannick Moy <moy@adacore.com>
3765 * inline.adb (Build_Body_To_Inline): Issue more precise messages
3766 for declarations that prevent inlining.
3767 (Cannot_Inline): Change usual start of message to refer to contextual
3768 analysis in GNATprove mode.
3769 * sem_res.adb (Resolve_Call): Change usual start of message to
3770 refer to contextual analysis in GNATprove mode, when inlining
3773 2014-07-30 Robert Dewar <dewar@adacore.com>
3775 * sem_res.adb, sem_ch6.adb: Minor code reorganization.
3776 * inline.adb: Minor reformatting.
3778 2014-07-30 Javier Miranda <miranda@adacore.com>
3780 * a-tags.ads: Add comments.
3782 2014-07-30 Pat Rogers <rogers@adacore.com>
3784 * gnat_rm.texi: Minor word error.
3786 2014-07-30 Ed Schonberg <schonberg@adacore.com>
3788 * exp_prag.adb (Expand_Old): Insert declarationss of temporaries
3789 created to capture the value of the prefix of 'Old at the
3790 beginning of the current declarative part, to prevent data flow
3791 anomalies in the postcondition procedure that will follow.
3793 2014-07-30 Yannick Moy <moy@adacore.com>
3795 * debug.adb: Retire debug flag -gnatdQ.
3796 * inline.adb (Can_Be_Inlined_In_GNATprove_Mode): Check SPARK_Mode
3797 on decl, not on body. Ignore predicate functions.
3798 * sem_ch6.adb (Analyze_Subprogram_Body_Helper): Remove use of
3799 debug flag -gnatdQ. Correctly analyze SPARK_Mode on decl and
3800 body when generating a decl for a body on which SPARK_Mode aspect
3802 * sem_prag.adb (Analyze_Pragma|SPARK_Mode): Reorder tests for
3803 attaching pragma to entity, to account for declaration not coming
3805 * sem_res.adb (Resolve_Call): Issue warning and flag subprogram
3806 as not always inlined in GNATprove mode, when called in an
3809 2014-07-30 Vincent Celier <celier@adacore.com>
3811 * debug.adb: Minor comment update.
3813 2014-07-30 Robert Dewar <dewar@adacore.com>
3815 * s-tasuti.adb, s-tassta.adb: Minor reformatting.
3816 * sprint.adb (Sprint_Node): Handle N_Contract case.
3817 * exp_prag.adb: Minor reformatting.
3818 * freeze.adb (Freeze_Entity): Check useless postcondition for
3819 No_Return subprogram.
3820 * sem_prag.adb: Minor reformatting.
3822 2014-07-30 Javier Miranda <miranda@adacore.com>
3824 * a-tags.ads: Complete comments about performance.
3826 2014-07-30 Fedor Rybin <frybin@adacore.com>
3828 * gnat_ugn.texi: Adding description for --exit-status option to
3829 gnattest section. Fixing index entry of --passed-tests option
3830 in gnattest section.
3832 2014-07-30 Javier Miranda <miranda@adacore.com>
3834 * Makefile.rtl, gnat_rm.texi, i-cpp.adb, i-cpp.ads, impunit.adb,
3835 rtsfind.ads: Remove references to package Interfaces.CPP since this
3836 package is no longer needed.
3838 2014-07-30 Bob Duff <duff@adacore.com>
3840 * s-taasde.adb (Timer_Queue): Don't use a
3841 build-in-place function call to initialize the Timer_Queue.
3842 * s-traent.adb, s-traent.ads, s-traent-vms.adb, s-traent-vms.ads:
3843 Turn off polling in these units, because otherwise we get
3844 elaboration circularities with Ada.Exceptions when the -gnatP
3846 * s-tassta.adb (Create_Task): Make sure independent tasks
3847 are created with Parent = Environment_Task. This was not true,
3848 for example, in s-interr.adb, when Interrupt_Manager does "new
3849 Server_Task"; the Server_Task had Parent = Interrupt_Manager,
3850 which is wrong because the master is determined by the access
3851 type, which is at library level.
3852 * s-tasuti.adb (Make_Independent): Avoid setting Parent; it is
3853 now set correctly by Create_Task.
3854 (Make_Passive): Remove the workaround for the race condition in
3856 * frontend.adb (Frontend): Revert to previous method of detecting
3857 temporary configuration pragma files, recognizing such files by
3858 ".tmp" in the name. This is more general than detecting pragmas
3859 Source_File_Name_Project, because it allows any tool to use
3860 this naming convention, no matter the content of the file.
3861 * gnat_ugn.texi: Document this naming convention.
3863 2014-07-30 Robert Dewar <dewar@adacore.com>
3865 * exp_ch7.adb, s-tataat.adb, s-tataat.ads, s-parame-vms-alpha.ads,
3866 inline.adb, s-parame-hpux.ads, exp_smem.adb, s-tasini.adb,
3867 s-tasini.ads, s-parame-vms-ia64.ads, s-parame.ads, s-taskin.ads,
3868 s-parame-vxworks.ads, a-tasatt.adb, a-tasatt.ads: Minor reformatting.
3869 * a-suenco.adb (Convert): Handle overlong encodings in UTF8-UTF8
3872 2014-07-30 Ed Schonberg <schonberg@adacore.com>
3874 * sem_ch5.adb: Improve error recovery.
3875 * inline.adb (Build_Body_To_Inline): Set Full_Analysis to false
3876 before analyzing the body, so that in GNATprove mode there is
3877 no light expansion. Whatever expansion is required by SPARK will
3878 be performed when analysing the inlined code.
3880 2014-07-30 Bob Duff <duff@adacore.com>
3882 * s-tataat.adb, s-tataat.ads, a-tasatt.adb: Minor comment fixes.
3884 2014-07-30 Ed Schonberg <schonberg@adacore.com>
3886 * sem_ch5.adb (Analyze_Loop_Statement): If loop has a label,
3887 verify that it is not hidden by an inner implicit declaration.
3889 2014-07-30 Thomas Quinot <quinot@adacore.com>
3891 * sem.ads (Scope_Table_Entry): New component Locked_Shared_Objects.
3892 * sem_ch8.adb (Push_Scope): Initialize Locked_Shared_Objects.
3893 * exp_smem.adb (Add_Shared_Var_Lock_Procs): Handle the case where
3894 the call returns an unconstrained type: in this case there is
3895 already a transient scope, and we should not establish a new one.
3896 * exp_ch7.adb (Insert_Actions_In_Scope_Around): New formal Clean. If
3897 True, also insert cleanup actions in the tree.
3898 (Wrap_Transient_Declaration): Call Insert_Actions_In_Scope_Around
3899 with Clean set True.
3901 2014-07-30 Arnaud Charlet <charlet@adacore.com>
3903 * s-taskin.ads (Direct_Index, Direct_Index_Range,
3904 Direct_Attribute_Element, Direct_Attribute_Array,
3905 Direct_Index_Vector, Direct_Attributes, Is_Defined,
3906 Indirect_Attributes): Removed. (Atomic_Address,
3907 Attribute_Array, Attributes): New.
3908 * s-tasini.ads, s-tasini.adb (Proc_T, Initialize_Attributes,
3909 Finalize_Attributes_Link, Initialize_Attributes_Link): Removed.
3910 (Finalize_Attributes): Reimplement.
3911 * s-tassta.adb (Create_Task): Remove call to
3912 Initialize_Attributes_Link (Free_Task, Vulnerable_Free_Task):
3913 Replace Finalize_Attributes_Link by Finalize_Attributes.
3914 * a-tasatt.ads, a-tasatt.adb, s-tataat.ads, s-tataat.adb:
3915 Reimplement from scratch, using a simpler and more efficient
3917 * s-tporft.adb (Register_Foreign_Thread): Remove now obsolete comment.
3918 * s-parame.ads, s-parame-hpux.ads,
3919 * s-parame-vms-alpha.ads, s-parame-vms-ia64.ads,
3920 * s-parame-vxworks.ads (Max_Attribute_Count): New, replace
3921 Default_Attribute_Count.
3923 2014-07-30 Olivier Hainque <hainque@adacore.com>
3925 * vxworks-ppc-link.spec: New file. Extra link
3926 instructions for ppc-vxworks.
3927 * vxworks-crtbe-link.spec: Likewise, for ZCX related support.
3928 * system-vxworks-ppc.ads: Adjust linker options to use spec files.
3929 * system-vxworks-arm.ads: Likewise.
3930 * gcc-interface/Makefile.in: Enable .spec files.
3932 2014-07-30 Ed Schonberg <schonberg@adacore.com>
3934 * sem_aggr.adb: Minor comment reformatting.
3936 2014-07-30 Robert Dewar <dewar@adacore.com>
3938 * sem_util.ads, sem_util.adb (Is_Junk_Name): Removed.
3939 * sem_warn.adb (Has_Junk_Name): New function
3940 (Check_References): Use Has_Junk_Name to delete junk warnings
3941 (Check_Unset_Reference): ditto.
3942 (Warn_On_Unreferenced_Entity): ditto.
3943 (Warn_On_Useless_Assignment): ditto.
3945 2014-07-30 Ed Schonberg <schonberg@adacore.com>
3947 * checks.adb (Insert_Valid_Check): Do not check for the packed
3948 array type of a prefix that is an access type.
3950 2014-07-30 Ed Schonberg <schonberg@adacore.com>
3952 * sem_attr.adb (Eval_Attribute): Evaluate the GNAT attribute
3953 Unconstrained_Array even if prefix is not frozen yet, as can
3954 occur with a private subtype used as a generic actual.
3956 2014-07-30 Gary Dismukes <dismukes@adacore.com>
3958 * sem_attr.adb: Minor reformatting.
3960 2014-07-30 Pat Rogers <rogers@adacore.com>
3962 * gnat_rm.texi: Corrected minor wording error in description
3963 of No_Exception_Registration.
3965 2014-07-30 Yannick Moy <moy@adacore.com>
3967 * einfo.ads, einfo.adb: New flag Is_Inlined_Always for use in GNATprove
3968 mode. Realphabetize two subprograms.
3969 * inline.adb (Cannot_Inline): Use Is_Inlined_Always in GNATprove mode.
3970 (Can_Be_Inlined_In_GNATprove_Mode): Adapt to possible Empty Body_Id.
3971 (Check_And_Build_Body_To_Inline): Use Is_Inlined_Always in GNATprove
3973 (Expand_Inline_Call): Use Is_Inlined_Always in GNATprove mode.
3974 * sem_ch6.adb (Analyze_Subprogram_Body_Helper): Do not use
3975 Is_Inline in GNATprove mode.
3976 (Analyze_Subprogram_Specification):
3977 Set Is_Inlined_Always at subprogram entity creation.
3978 * sem_res.adb (Resolve_Call): Do not deal with inlining during
3979 pre-analysis. Issue warning on call to possibly inlined
3980 subprogram when body not seen.
3982 2014-07-30 Yannick Moy <moy@adacore.com>
3984 * lib-xref.adb (Generate_Reference): Add special
3985 case for compiler-generated formals in GNATprove mode.
3987 2014-07-30 Yannick Moy <moy@adacore.com>
3989 * sem_ch6.adb: Add comments.
3991 2014-07-30 Thomas Quinot <quinot@adacore.com>
3993 * s-os_lib.ads (GM_Time_Of): Clarify documentation.
3995 2014-07-30 Robert Dewar <dewar@adacore.com>
3997 * sem_aggr.adb, sem_res.adb: Minor reformatting.
3999 2014-07-30 Thomas Quinot <quinot@adacore.com>
4001 * sem_ch13.adb (Analyze_Attribute_Definition_Clause, case
4002 Bit_Order): Set Reverse_Bit_Order on the base type of the
4003 specified first subtype.
4005 2014-07-30 Ed Schonberg <schonberg@adacore.com>
4007 * inline.adb (Expand_Inlined_Call): Use a renaming declaration
4008 to capture the value of actuals of a limited type rather than
4009 an object declaration, to prevent spurious errors when analyzing
4012 2014-07-30 Ed Schonberg <schonberg@adacore.com>
4014 * sem_ch4.adb (Analyze_Type_Conversion): Treat an inlined body
4015 as an instance, and inhibit semantic checks on already analyzed
4016 code to prevent spurious errors.
4018 2014-07-30 Arnaud Charlet <charlet@adacore.com>
4020 * a-exctra.ads ("="): New function, to restore compatibility.
4022 2014-07-30 Pascal Obry <obry@adacore.com>
4024 * adaint.c (__gnat_to_os_time): Set isdst to -1 for the mktime
4025 routine to use the OS dst setting.
4027 2014-07-30 Pat Rogers <rogers@adacore.com>
4029 * gnat_ugn.texi: Minor correction to description of -gnatw.K.
4031 2014-07-30 Ed Schonberg <schonberg@adacore.com>
4033 * sem_util.adb (Wrong_Type): Disable some checks equally within
4034 instances and within inlined bodies, to suppress spurious type
4035 errors on already analyzed code.
4036 * sem_aggr.adb (Check_Expr_OK_In_Limited_Aggregate): Expression
4037 is legal in an inlined body, juts as it is in an instance body.
4039 2014-07-30 Ed Schonberg <schonberg@adacore.com>
4041 * sem_res.adb (Resolve_Unchecked_Conversion): Within an inlined
4042 body the operand of an unchecked conversion may be a literal, in
4043 which case its type is the target type of the conversion. This
4044 is in contrast to conversions in other contexts, where the
4045 operand cannot be a literal and must be resolvable independent
4048 2014-07-30 Pierre-Marie Derodat <derodat@adacore.com>
4050 * gcc-interface/decl.c (gnat_to_gnu_entity) <object>: Create a
4051 mere scalar constant instead of a reference for a renaming of
4053 * gcc-interface/utils.c (renaming_from_generic_instantiation_p): New.
4054 * gcc-interface/gigi.h (renaming_from_generic_instantiation_p): New.
4056 2014-07-30 Robert Dewar <dewar@adacore.com>
4058 * s-tasuti.adb, s-tasuti.ads, einfo.ads, sem_prag.adb, s-taasde.adb,
4059 g-socthi-vms.adb, s-taprop-mingw.adb, s-interr.adb, s-interr-hwint.adb,
4060 g-decstr.adb, s-tasdeb-vms.adb, g-expect-vms.adb, makeutl.adb,
4061 s-interr-vms.adb, g-socthi.adb, exp_aggr.adb, s-tasdeb.adb,
4062 g-awk.adb, gnatls.adb, s-taspri-posix.ads, g-catiio.adb,
4063 s-interr-sigaction.adb, s-os_lib.adb, s-fileio.adb: Minor reformatting
4064 & code reorganization.
4066 2014-07-30 Bob Duff <duff@adacore.com>
4068 * s-tassta.adb, sem_util.ads: Minor reformatting.
4070 2014-07-30 Yannick Moy <moy@adacore.com>
4072 * inline.adb (Build_Body_To_Inline): Detect when
4073 subprogram has multiple returns, or not a single last return
4074 statement, in GNATprove mode.
4075 (Cannot_Inline): Simplify logic to handle case of GNATprove
4078 2014-07-30 Ed Schonberg <schonberg@adacore.com>
4080 * sem_ch6.adb: Stubs are not subject to inlining.
4082 2014-07-30 Bob Duff <duff@adacore.com>
4084 * s-tasuti.ads, s-tasuti.adb (Make_Independent): Change this
4085 from a procedure to a function, so that it can more easily be
4086 called before the "begin" of a task.
4087 * s-taasde.ads (Delay_Block): Make this type immutably limited,
4088 so we can use a build-in-place function call to initialize
4089 Timer_Queue in the body.
4090 * a-rttiev.adb, s-asthan-vms-alpha.adb, s-asthan-vms-ia64.adb,
4091 * s-interr.adb, s-interr-hwint.adb, s-interr-sigaction.adb,
4092 * s-interr-vms.adb, s-taasde.adb: Each independent task now calls
4093 Make_Independent before reaching its "begin", to avoid race
4094 conditions. This causes the activating task to wait until after
4095 Make_Independent is complete before proceeding. In addition,
4096 we initialize data structures used by independent tasks before
4097 activating those tasks, to avoid possible use of uninitialized data.
4098 * s-interr.ads, s-intman.ads, s-taspri-posix.ads, s-tasdeb.ads:
4099 Minor comment fixes.
4101 2014-07-30 Bob Duff <duff@adacore.com>
4103 * a-exctra.ads, s-traent-vms.ads, s-traent.ads (Tracebacks_Array): Move
4104 the declaration of Tracebacks_Array from Ada.Exceptions.Traceback to
4105 System.Traceback_Entries (s-traent.ads and s-traent-vms.ads). Add
4106 subtypes renaming Tracebacks_Array in Ada.Exceptions.Traceback.
4107 * g-debpoo.adb: Refer to Tracebacks_Array in its new home.
4109 2014-07-30 Arnaud Charlet <charlet@adacore.com>
4111 * a-tasatt.adb: Remove old comments.
4113 2014-07-30 Yannick Moy <moy@adacore.com>
4115 * einfo.ads (Is_Inlined): Document new use in GNATprove mode.
4116 * inline.adb (Can_Be_Inlined_In_GNATprove_Mode): Add comments
4117 to explain rationale for inlining or not in GNATprove mode.
4118 (Expand_Inlined_Call): In GNATprove mode, set Is_Inlined flag
4119 to False when inlining is not possible.
4120 * sem_ch6.adb (Analyze_Subprogram_Body_Helper): Set Is_Inlined
4121 flag to indicate that subprogram is fully inlined. To be reversed
4122 if inlining problem is found.
4123 * sem_res.adb (Resolve_Call): Set Is_Inlined flag to False when
4124 call in potentially unevaluated context.
4126 2014-07-30 Jose Ruiz <ruiz@adacore.com>
4128 * s-tarest.adb, s-tarest.ads: Fix comments.
4130 2014-07-30 Robert Dewar <dewar@adacore.com>
4132 * exp_attr.adb, checks.adb, sem_util.adb, sem_util.ads, sem_attr.adb:
4133 Change No_Scalar_Parts predicate to Scalar_Part_Present and
4134 invert sense of test. This avoids the "not No_xxx" situation
4135 which is always ugly.
4137 2014-07-30 Ed Schonberg <schonberg@adacore.com>
4139 * inline.adb (Expand_Inlined_Call): When generating code for
4140 an internal subprogram the expansion uses the location of the
4141 call, so that gdb can skip over it. In GNATprove mode we want to
4142 preserve slocs of original subprogram when expanding an inlined
4143 call, to obtain better warnings, even though subprogram appears
4144 not to come from source if it is the inlining of a subprogram
4145 body without a previous spec.
4147 2014-07-30 Eric Botcazou <ebotcazou@adacore.com>
4149 * exp_aggr.adb (Aggr_Assignment_OK_For_Backend): Reject array
4150 types with atomic components.
4152 2014-07-30 Thomas Quinot <quinot@adacore.com>
4154 * Make-generated.in: Remove now unnecessary targets after s-oscons
4157 2014-07-30 Yannick Moy <moy@adacore.com>
4159 * sem_res.adb (Resolve_Call): Use ultimate alias
4160 of callee when available.
4162 2014-07-30 Ed Schonberg <schonberg@adacore.com>
4164 * sem_ch6.adb (Analyze_Expression_Function): To check whether
4165 an expression function is a completion, use the specification of
4166 the previous declaration, not its entity, which may be internally
4167 generated in an inlined context.
4169 2014-07-30 Doug Rupp <rupp@adacore.com>
4171 * adaint.c (__gnat_tmp_name) [__ANDROID__]: Default to putting
4172 temp files in /cache directory unless overridden by TMPDIR.
4174 2014-07-30 Jose Ruiz <ruiz@adacore.com>
4176 * s-tassta.adb, s-tarest.adb (Initialize, Create_Task,
4177 Create_Restricted_Task): Remove redundant check. Number_Of_CPUs returns
4178 type CPU, so it can never be greater than CPU_Range'Last.
4180 2014-07-30 Bob Duff <duff@adacore.com>
4182 * s-taskin.ads: Minor comment fix.
4184 2014-07-30 Thomas Quinot <quinot@adacore.com>
4186 * g-socket.adb: Remove now useless WITH, USE, and USE TYPE
4189 2014-07-30 Yannick Moy <moy@adacore.com>
4191 * debug.adb: Free debug flag dQ used for frontend inlining in
4193 * sem_ch6.adb (Analyze_Subprogram_Body_Helper): Remove test of
4196 2014-07-30 Thomas Quinot <quinot@adacore.com>
4198 * Make-generated.in: Remove generation of s-oscons.ads, only
4199 generate the xoscons utility, in runtime-agnostic rules.
4200 * gcc-interface/Makefile.in: Clean up rules. Remove VMS parts,
4201 no longer supported.
4203 2014-07-30 Bob Duff <duff@adacore.com>
4205 * exp_ch6.adb (Add_Task_Actuals_To_Build_In_Place_Call): New
4206 parameter Chain to be used in the allocator case.
4207 (Make_Build_In_Place_Call_In_Allocator): If the allocated object
4208 has tasks, wrap the code in a block that will activate them,
4209 including the usual finalization code to kill them off in case
4210 of exception or abort.
4212 2014-07-30 Robert Dewar <dewar@adacore.com>
4214 * treepr.adb, treepr.ads; Reorganize documentation for new pp routines
4215 Remove renamings (don't work for gdb).
4216 (par): New synonym for p (avoid gdb ambiguities).
4217 * inline.adb, sem_ch6.adb, sem_ch13.adb: Minor reformatting.
4219 2014-07-30 Bob Duff <duff@adacore.com>
4221 * exp_ch9.ads, sem_prag.adb, exp_ch4.adb, sem_ch13.adb: Minor comment
4223 * treepr.ads, treepr.adb (ppp): Make this debugging routine
4224 accept any type covered by Union_Id.
4226 2014-07-30 Robert Dewar <dewar@adacore.com>
4228 * sem_ch4.adb (Analyze_If_Expression): Resolve condition before
4230 * sem_eval.adb (Out_Of_Range): Check for statically unevaluated
4233 2014-07-30 Robert Dewar <dewar@adacore.com>
4235 * sem_ch13.adb (Analyze_Aspect, predicate cases): Diagnose use
4236 of predicate aspect on entity other than a type.
4238 2014-07-30 Ed Schonberg <schonberg@adacore.com>
4240 * sem_ch6.adb (Body_Has_Contract): New predicate to determine
4241 when a subprogram body without a previous spec cannot be inlined
4242 in GNATprove mode, because it includes aspects or pragmas that
4243 generate a SPARK contract clause.
4244 * inline.adb (Can_Be_Inlined_In_GNATprove_Mode): A subprogram
4245 instance cannot be inlined.
4247 2014-07-30 Robert Dewar <dewar@adacore.com>
4249 * debug.adb: Document that d7 suppresses compilation time output.
4250 * errout.adb (Write_Header): Include compilation time in
4252 * exp_intr.adb (Expand_Intrinsic_Call): Add
4253 Compilation_Date/Compilation_Time (Expand_Source_Info): Expand
4254 Compilation_Date/Compilation_Time.
4255 * g-souinf.ads (Compilation_Date): New function
4256 (Compilation_Time): New function.
4257 * gnat1drv.adb (Gnat1drv): Set Opt.Compilation_Time.
4258 * gnat_rm.texi (Compilation_Date): New function
4259 (Compilation_Time): New function.
4260 * opt.ads (Compilation_Time): New variable.
4261 * s-os_lib.ads, s-os_lib.adb (Current_Time_String): New function.
4262 * sem_intr.adb (Compilation_Date): New function.
4263 (Compilation_Time): New function.
4264 * snames.ads-tmpl (Name_Compilation_Date): New entry.
4265 (Name_Compilation_Time): New entry.
4267 2014-07-30 Yannick Moy <moy@adacore.com>
4269 * inline.adb: Add comment.
4271 2014-07-30 Ed Schonberg <schonberg@adacore.com>
4273 * par-ch4.adb (Is_Parameterless_Attribute): 'Result is a
4274 parameterless attribute, and a postondition can mention an
4275 indexed component or a slice whose prefix is an attribute
4278 2014-07-30 Robert Dewar <dewar@adacore.com>
4280 * sprint.adb (Sprint_Node_Actual, case Object_Declaration):
4281 Avoid bomb when printing package Standard.
4283 2014-07-30 Ed Schonberg <schonberg@adacore.com>
4285 * sem_elab.adb (Check_Internal_Call_Continue): If an elaboration
4286 entity is created at this point, ensure that the name of the
4287 flag is unique, because the subprogram may be overloaded and
4288 other homonyms may also have elaboration flags created on the fly.
4290 2014-07-30 Hristian Kirtchev <kirtchev@adacore.com>
4292 * sem_attr.adb (Analyze_Array_Component_Update): New routine.
4293 (Analyze_Attribute): Major cleanup of attribute
4294 'Update. The logic is now split into two distinct routines
4295 depending on the type of the prefix. The use of <> is now illegal
4296 in attribute 'Update.
4297 (Analyze_Record_Component_Update): New routine.
4298 (Check_Component_Reference): Removed.
4299 (Resolve_Attribute): Remove the return statement and ??? comment
4300 following the processing for attribute 'Update. As a result,
4301 the attribute now freezes its prefix.
4303 2014-07-30 Javier Miranda <miranda@adacore.com>
4305 * exp_ch4.adb (Apply_Accessibility_Check): Do
4306 not call Base_Address() in VM targets.
4308 2014-07-30 Yannick Moy <moy@adacore.com>
4310 * gnat1drv.adb (Adjust_Global_Switches): Set
4311 Ineffective_Inline_Warnings to True in GNATprove mode.
4312 * inline.adb (Cannot_Inline): Prepare new semantics for GNATprove
4314 * opt.ads (Ineffective_Inline_Warnings): Add comment that
4315 describes use in GNATprove mode.
4316 * sem_prag.adb (Analyze_Pragma|SPARK_Mode): Ignore
4317 pragma when applied to the special body created for inlining.
4319 2014-07-30 Robert Dewar <dewar@adacore.com>
4321 * inline.adb, exp_ch4.adb, sinput.adb, sem_ch6.adb, sem_ch13.adb:
4324 2014-07-30 Hristian Kirtchev <kirtchev@adacore.com>
4326 * aspects.ads Add a comment explaining why SPARK 2014 aspects are
4327 not delayed. Update the delay status of most SPARK 2014 aspects.
4328 * sem_ch13.adb (Analyze_Aspect_Specifications): Update all calls
4329 to Decorate_Aspect_And_Pragma and Insert_Delayed_Pragma to refert
4330 to Decorate and Insert_Pragma. Add various comments concerning
4331 the delay status of several SPARK 2014 aspects. The insertion
4332 of Refined_State now uses routine Insert_After_SPARK_Mode.
4333 (Decorate): New routine.
4334 (Decorate_Aspect_And_Pragma): Removed.
4335 (Insert_Delayed_Pragma): Removed.
4336 (Insert_Pragma): New routine.
4338 2014-07-30 Ed Schonberg <schonberg@adacore.com>
4340 * inline.adb (Expand_Inlined_Call): In GNATprove mode, emit
4341 only a warning, not an error on an attempt to inline a recursive
4344 2014-07-30 Robert Dewar <dewar@adacore.com>
4346 * g-forstr.adb: Minor code reorganization (use J rather than I
4347 as a variable name).
4348 * gnat_rm.texi, sem_prag.adb, sem_util.adb, sem_ch13.adb,
4349 g-forstr.ads: Minor reformatting.
4351 2014-07-30 Eric Botcazou <ebotcazou@adacore.com>
4353 * sprint.adb (Set_Debug_Sloc): Also reset the end location if
4354 we are debugging the generated code.
4356 2014-07-30 Yannick Moy <moy@adacore.com>
4358 * sinput.ads, sinput.adb (Comes_From_Inlined_Body): New function that
4359 returns True for source pointer for an inlined body.
4361 2014-07-30 Javier Miranda <miranda@adacore.com>
4363 * exp_ch4.adb (Apply_Accessibility_Check): Add
4364 missing calls to Base_Address().
4366 2014-07-30 Ed Schonberg <schonberg@adacore.com>
4368 * sem_ch6.adb (Hanalyze_Subprogram_Body_Helper): In GNATprove
4369 mode, subprogram bodies without a previous declaration are also
4370 candidates for front-end inlining.
4372 2014-07-30 Hristian Kirtchev <kirtchev@adacore.com>
4374 * aspects.ads Aspects Async_Readers, Async_Writers,
4375 Effective_Reads and Effective_Writes do not need to be delayed.
4376 * sem_ch13.adb (Analyze_Aspect_Specifications): Propagate the
4377 optional Boolean expression when generating the corresponding
4378 pragma for an external property aspect.
4379 * sem_prag.adb (Analyze_External_Property_In_Decl_Part): Remove
4380 local constant Obj. Add local constant Obj_Id. Reimplement the
4381 check which ensures that the related variable is in fact volatile.
4382 (Analyze_Pragma): Reimplement the analysis of external property pragmas.
4383 * sem_util.adb (Is_Enabled): New routine.
4384 (Variable_Has_Enabled_Property): Reimplement the detection of
4385 an enabled external property.
4387 2014-07-30 Sergey Rybin <rybin@adacore.com frybin>
4389 * gnat_ugn.texi, vms_data.ads: gnatstub: describe generating subunits
4392 2014-07-30 Pascal Obry <obry@adacore.com>
4394 * g-forstr.adb, g-forstr.ads: New.
4395 * gnat_rm.texi, impunit.adb Makefile.rtl: Add new unit
4396 GNAT.Formatted_String.
4398 2014-07-30 Eric Botcazou <ebotcazou@adacore.com>
4400 * exp_aggr.adb (Aggr_Assignment_OK_For_Backend): New predicate.
4401 (Expand_Array_Aggregate): Also enable in-place expansion for
4402 code generated by the compiler. For an object declaration,
4403 set the kind of the object in addition to its type. If an
4404 in-place assignment is to be generated and it can be directly
4405 done by the back-end, do not expand the aggregate.
4406 * fe.h (Is_Others_Aggregate): Declare.
4407 * gcc-interface/trans.c
4408 (gnat_to_gnu) <N_Assignment_Statement>: Add support for an
4409 aggregate with a single Others choice on the RHS by means of
4410 __builtin_memset. Tidy up.
4412 2014-07-30 Ed Schonberg <schonberg@adacore.com>
4414 * gnat_rm.texi: minor reformatting.
4416 2014-07-30 Yannick Moy <moy@adacore.com>
4418 * sem_ch6.adb (Analyze_Subprogram_Helper_Body): Remove body to inline
4421 2014-07-30 Robert Dewar <dewar@adacore.com>
4423 * gnat_rm.texi: Document additional implementation-defined use
4426 2014-07-30 Robert Dewar <dewar@adacore.com>
4428 * prj-proc.adb, prj-strt.adb: Update comments.
4430 2014-07-30 Gary Dismukes <dismukes@adacore.com>
4432 * sinfo.ads, einfo.ads, checks.ads: Minor typo fix and reformatting.
4434 2014-07-30 Vincent Celier <celier@adacore.com>
4436 * prj-proc.adb (Imported_Or_Extended_Project_From): New Boolean
4437 parameter No_Extending, defaulted to False. When No_Extending
4438 is True, do not look for an extending project.
4439 (Expression): For a variable reference that is not for the current
4440 project, get its Id calling Imported_Or_Extended_Project_From
4441 with No_Extending set to True.
4442 * prj-strt.adb (Parse_Variable_Reference): If a referenced
4443 variable is not found in the current project, check if it is
4444 defined in one of the projects it extends.
4446 2014-07-30 Robert Dewar <dewar@adacore.com>
4448 * sem_util.adb (Predicate_Tests_On_Arguments): Omit tests for
4449 some additional cases of internally generated routines.
4451 2014-07-30 Ed Schonberg <schonberg@adacore.com>
4453 * sem_ch10.adb (Analyze_Proper_Body): When compiling for ASIS,
4454 if the compilation unit is a subunit, extend optional processing
4455 to all subunits of the current one. This allows gnatstub to
4456 supress generation of spurious bodies.
4458 2014-07-30 Hristian Kirtchev <kirtchev@adacore.com>
4460 * a-cbmutr.adb (Insert_Child): Use local variable First to keep
4461 track of the initial element's index within the tree.
4463 2014-07-29 Hristian Kirtchev <kirtchev@adacore.com>
4465 * a-cbmutr.adb (Allocate_Node): Remove the two parameter version.
4466 (Insert_Child): Add local variable First. Capture the index of the
4467 first node being created to ensure correct cursor construction
4468 later on. Use the three parameter version of Allocate_Node
4469 when creating multiple children as this method allows aspect
4470 Default_Value to take effect (if applicable).
4472 2014-07-29 Eric Botcazou <ebotcazou@adacore.com>
4474 * exp_aggr.adb (Safe_Slice_Assignment): Remove.
4475 (Expand_Array_Aggregate): For a safe slice assignment, just set
4476 the target and use the common code path.
4478 2014-07-29 Robert Dewar <dewar@adacore.com>
4480 * sem_util.adb, sem_util.ads, sem_res.adb, exp_ch6.adb: Invert
4481 predicate No_Predicate_Test_On_Arguments, new name is
4482 Predicate_Tests_On_Arguments (with the opposite sense).
4484 2014-07-29 Hristian Kirtchev <kirtchev@adacore.com>
4486 * sem_attr.adb (Resolve_Attribute): Clean up the code for
4487 attribute 'Access. Do not generate an elaboration flag for a
4488 stand alone expression function. The expression of an expression
4489 function is now frozen when the expression function appears as
4490 the prefix of attribute 'Access.
4491 * sem_ch6.adb (Analyze_Expression_Function): Remove local
4492 variable New_Decl and update all references to it after the
4493 rewriting has taken place. Establish the linkages between the
4494 generated spec and body.
4496 2014-07-29 Robert Dewar <dewar@adacore.com>
4498 * sem_prag.adb (ip, rv): Prevent from being optimized away.
4499 * gnatls.adb (gnatls): Set E_Fatal exit status if ali file not found.
4500 * s-imgllb.adb, s-imgllw.adb, s-imgwiu.adb, s-imgbiu.adb: Minor
4503 2014-07-29 Vincent Celier <celier@adacore.com>
4505 * prj-pp.adb: Minor comment update.
4506 * frontend.adb: If a target dependency info file has been read
4507 through switch -gnateT= add it to the dependencies of the source
4510 2014-07-29 Robert Dewar <dewar@adacore.com>
4512 * sem_ch3.adb, prj.adb: Minor reformatting.
4514 2014-07-29 Vincent Celier <celier@adacore.com>
4516 * prj-pp.adb (Pretty_Print.Output_Project_File): New
4517 procedure to output project file names between quotes without
4518 concatenation, even if the line is too long.
4519 (Pretty_Print): Use Output_Project_File for project being extended and
4522 2014-07-29 Vincent Celier <celier@adacore.com>
4524 * gnat_ugn.texi: Document that configuration pragmas files are
4525 added to the dependencies, unless they contain only pragmas
4526 Source_File_Name_Project.
4528 2014-07-29 Robert Dewar <dewar@adacore.com>
4530 * frontend.adb: Minor reformatting.
4532 2014-07-29 Robert Dewar <dewar@adacore.com>
4534 * exp_ch6.adb (Add_Call_By_Copy_Code): Minor reformatting
4535 (Expand_Actuals): Make sure predicate checks are properly applied
4536 for the case of OUT or IN OUT parameters.
4537 * sem_res.adb: Minor reformatting (Resolve_Actuals): Skip
4538 predicate tests on arguments for Finalize
4539 * sem_util.adb (No_Predicate_Test_On_Arguments): Returns True
4540 if predicate tests on subprogram arguments should be skipped.
4541 * sem_util.ads (No_Predicate_Test_On_Arguments): New function
4543 2014-07-29 Ed Schonberg <schonberg@adacore.com>
4545 * sem_ch3.adb (Analyze_Object_Declaration): If there is an address
4546 clause for the object and the expression is an aggregate, defer
4547 resolution and expansion of the aggregate until the freeze point
4549 * sem_aggr.adb (Resolve_Aggregate): An others_clause is legal if
4550 the parent node is an N_Reference generated during expansion.
4552 2014-07-29 Vincent Celier <celier@adacore.com>
4554 * prj.adb (Add_To_Buffer): Effectively double the size of the buffer.
4556 2014-07-29 Robert Dewar <dewar@adacore.com>
4558 * frontend.adb, inline.adb, sem_util.adb, sem_res.adb,
4559 prepcomp.ads: Minor reformatting and code clean up.
4560 * exp_ch6.adb (Expand_Actuals): Generate predicate test
4561 unconditionally for case of OUT or IN OUT actual (before this
4562 was generated only for certain subcases, which is wrong, the
4563 test is always needed).
4565 2014-07-29 Ed Schonberg <schonberg@adacore.com>
4567 * sem_ch3.adb: Move Has_Defaulted_Discriminants to sem_util.
4568 * sem_ch4.adb (Analyze_Allocator): Defer resolution of expression
4569 until context type is available.
4570 * sem_res.adb (Resolve_Allocator): In the case of a qualified
4571 expression, complete resolution of expression.
4572 (Check_Aliased_Parameter): New procedure within Resolve_Actuals,
4573 to apply Ada2012 checks on aliased formals, as well as
4574 accesibility checks when the context of the call is an allocator
4575 or a qualified expression.
4576 * sem_util.ads, sem_util.adb (Has_Defaulted_Discriminants):
4577 Moved here from sem_ch3.
4578 (Object_Access_Level): Handle properly aliased formals and
4580 * exp_ch6.adb (Expand_Call): Remove check on aliased parameters,
4581 now properly performed in sem_res (Resolve_Actuals,
4582 Check_Aliased_Parameter).
4584 2014-07-29 Yannick Moy <moy@adacore.com>
4586 * debug.adb Enable GNATprove inlining under debug flag -gnatdQ for now.
4587 * inline.ads, inline.adb (Can_Be_Inlined_In_GNATprove_Mode): New
4588 function to decide when a subprogram can be inlined in GNATprove mode.
4589 (Check_And_Build_Body_To_Inline): Include GNATprove_Mode as a
4590 condition for possible inlining.
4591 * sem_ch10.adb (Analyze_Compilation_Unit): Remove special case
4592 for Inline_Always in GNATprove mode.
4593 * sem_ch6.adb (Analyze_Subprogram_Body_Helper): Build inlined
4594 body for subprograms in GNATprove mode, under debug flag -gnatdQ.
4595 * sem_prag.adb Minor change in comments.
4596 * sem_res.adb (Resolve_Call): Only perform GNATprove inlining
4597 inside subprograms marked as SPARK_Mode On.
4598 * sinfo.ads: Minor typo fix.
4600 2014-07-29 Vincent Celier <celier@adacore.com>
4602 * frontend.adb: Add dependency on gnat.adc when taken into account
4603 and on non-temporary configuration pragmas files specified in
4605 * prepcomp.ads, prepcomp.adb (Add_Dependency): New procedure to add
4606 dependencies on configuration pragmas files.
4608 2014-07-29 Pat Rogers <rogers@adacore.com>
4610 * gnat_ugn.texi: Minor clarification to the explanation for the
4613 2014-07-29 Robert Dewar <dewar@adacore.com>
4615 * types.ads (Mechanism_Type): Change range back to -18 .. Int'Last with
4616 documentation that explains the need for this extended range
4617 (use by C_Pass_By_Copy).
4619 2014-07-29 Robert Dewar <dewar@adacore.com>
4621 * gnat_rm.texi, sem_prag.adb: Minor reformatting.
4623 2014-07-29 Sergey Rybin <rybin@adacore.com frybin>
4625 * gnat_ugn.texi: gnatmetric: clarify documentation for cyclomatic
4628 2014-07-29 Thomas Quinot <quinot@adacore.com>
4631 * s-oscons-tmplt.c: For Linux, define _BSD_SOURCE in order for
4632 CRTSCTS to be visible.
4634 2014-07-29 Bob Duff <duff@adacore.com>
4636 * g-trasym.adb, g-trasym.ads: Code cleanup.
4638 2014-07-29 Doug Rupp <rupp@adacore.com>
4640 * sigtramp-vxworks.c: Minor reformatting.
4642 2014-07-29 Ed Schonberg <schonberg@adacore.com>
4644 * gnat_rm.texi: No doc needed for Ada2012 aspect
4645 Implicit_dereference.
4647 2014-07-29 Robert Dewar <dewar@adacore.com>
4649 * sem_attr.adb (Attribute_12): New array
4650 (Analyze_Attribute): Check impl-defined Ada 2012 attributes.
4651 (Check_Ada_2012_Attribute): Removed.
4653 2014-07-29 Doug Rupp <rupp@adacore.com>
4655 * init.c (vxworks6): Call sigtramp for RTP (as well as DKM) for ARM,
4657 * sigtramp-vxworks.c: New file.
4658 * sigtramp-armvxw.c, sigtramp-ppcvxw.c: removed files.
4660 2014-07-29 Ed Schonberg <schonberg@adacore.com>
4662 * lib-xref.adb (Output_Refs, Check_Type_Reference): For a
4663 derived array type, add information about component type, which
4664 was previously missing in ali file.
4665 * gnat_rm.texi: Add documentation for Atomic_Always_Lock_Free.
4667 2014-07-29 Thomas Quinot <quinot@adacore.com>
4669 * sem_ch3.adb (Constrain_Corresponding_Record): For the case
4670 of the subtype created for a record component, do not mark
4671 the subtype as frozen. For one thing, this is anomalous (in
4672 particular, the base type might not itself be frozen yet);
4673 furthermore, proper freezing of the subtype must happen in any
4674 case. So, we just mark the subtype as requiring delayed freezing
4675 (and we'll actually freeze it when generating the init_proc of
4676 the enclosing record).
4677 Also change the name of the constrained record subtype (append a
4678 'C' so that it is clearly different from the unconstrained record
4679 type, "related_idV") to make debugging easier.
4680 (Process_Full_View): When creating a full subtype for a pending
4681 private subtype, re-establish the scope of the private subtype
4682 so that we get proper visibility on outer discriminants.
4683 * exp_ch3.adb (Build_Init_Statements): Freeze any component
4684 subtype that is not frozen yet.
4686 2014-07-29 Vincent Celier <celier@adacore.com>
4688 * prj-proc.adb (Recursive_Process): Always initialize the
4689 environment when the project is an aggregate project, even when
4690 it is not the root tree.
4691 2014-07-29 Robert Dewar <dewar@adacore.com>
4693 * exp_ch5.adb, exp_ch9.adb: Minor comment additions.
4694 * gnat_rm.texi: Complete list of implementation aspects.
4695 * aspects.ads: Minor comment clarification.
4697 2014-07-29 Ed Schonberg <schonberg@adacore.com>
4699 * exp_ch5.adb (Expand_N_Assignment_Statement): If the target type
4700 is a null-excluding access type, do not generate a constraint
4701 check if Suppress_Assignment_Checks is set on assignment node.
4702 * exp_ch9.adb (Build_Simple_Entry_Call): If actual is an out
4703 parameter of a null-excluding access type, there is access check
4704 on entry, so set Suppress_Assignment_Checks on generated statement
4705 that assigns actual to parameter block.
4706 * sinfo.ads: Document additional use of Suppress_Assignment_Checks.
4708 2014-07-29 Robert Dewar <dewar@adacore.com>
4710 * gnat_rm.texi: Change theta to @ in documentation of aspect
4713 2014-07-29 Robert Dewar <dewar@adacore.com>
4715 * sem_attr.adb (Uneval_Old_Msg): Flags Uneval_Old_Accept/Warn
4717 * sem_ch13.adb (Analyze_Aspect_Specifications): Remove setting
4719 * sem_prag.adb (Analyze_Pragma): Set Uneval_Old_* flags
4720 * sinfo.ads, sinfo.adb: Move Uneval_Old_Accept/Warn to N_Pragma node.
4722 2014-07-29 Javier Miranda <miranda@adacore.com>
4724 * types.ads Update documentation on how to add new reason codes
4726 (RT_Exception_Code): Keep values ordered by their
4727 reason code. Required by the .NET backend.
4728 (RT_CE_Exceptions): Subtype declaration removed.
4729 (RT_PE_Exceptions): Subtype declaration removed.
4730 (RT_SE_Exceptions): Subtype declaration removed.
4731 (Kind): New mapping table of RT_Exception_Codes.
4732 * exp_ch11.adb (Get_RT_Exception_Entity): Updated to use the
4734 * tbuild.adb (Make_Raise_Storage_Error): Updated to use the new
4735 mapping table. (Make_Raise_Program_Error): Updated to use the
4737 (Make_Raise_Storage_Error): Updated to use the new mapping table.
4738 * a-except.adb Keep Rcheck_CE_xxx entities ordered according to
4741 2014-07-29 Thomas Quinot <quinot@adacore.com>
4743 * gnat_rm.texi: Document internal attributes used for PolyORB/DSA
4744 distributed stubs generation.
4745 * exp_ch3.adb: Minor reformatting.
4747 2014-07-29 Yannick Moy <moy@adacore.com>
4749 * sinfo.ads: Document constraint between frontend and GNATprove.
4751 2014-07-29 Robert Dewar <dewar@adacore.com>
4753 * a-except.adb: Minor comment clarification.
4755 2014-07-29 Robert Dewar <dewar@adacore.com>
4757 * gnat_rm.texi: Complete list of implementation attributes.
4758 * snames.ads-tmpl: Clean up list of impl-defined attributes.
4760 2014-07-29 Hristian Kirtchev <kirtchev@adacore.com>
4762 * freeze.adb (Freeze_Record_Type): Perform various
4763 volatility-related checks.
4765 2014-07-29 Robert Dewar <dewar@adacore.com>
4767 * sem_ch3.adb, sem_eval.adb: Minor reformatting.
4769 2014-07-29 Ed Schonberg <schonberg@adacore.com>
4771 * sem_attr.adb: sem_attr.adb (Access_Attribute): Handle properly
4772 the case where the attribute reference appears in a nested scope
4773 from that of the subprogram prefix.
4774 * sem_attr.adb: Minor reformatting.
4776 2014-07-29 Robert Dewar <dewar@adacore.com>
4778 * gnat_ugn.texi: Clarify documentation of Initialize_Scalar
4779 initialization options.
4781 2014-07-29 Robert Dewar <dewar@adacore.com>
4783 * sinfo.ads: Minor comment addition.
4785 2014-07-29 Bob Duff <duff@adacore.com>
4787 * sem_eval.adb, sem_ch13.adb: Minor reformatting.
4789 2014-07-29 Doug Rupp <rupp@adacore.com>
4791 * init.c: Complete previous change.
4793 2014-07-29 Robert Dewar <dewar@adacore.com>
4795 * exp_ch4.adb (Expand_N_If_Expression): Deal with unconstrained
4798 2014-07-29 Ed Schonberg <schonberg@adacore.com>
4800 * sem_attr.adb (Access_Attribute): If the prefix is a subprogram
4801 and the completion will appear in the same declarative part,
4802 create elaboration flag.
4803 * exp_util.adb (Set_Elaboration_Flag): If the subprogram body
4804 is a completion of a declaration in the same declarative part,
4805 and the subprogram has had its address taken, add elaboration
4806 check inside the subprogram body, to detect elaboration errors
4807 that may occur through indirect calls.
4809 2014-07-29 Doug Rupp <rupp@adacore.com>
4811 * sigtramp-armvxw.c: Enhance to handle RTP trampolining.
4812 * init.c: Remove guard on sigtramp for ARM VxWorks RTP.
4814 2014-07-29 Vincent Celier <celier@adacore.com>
4816 * switch-c.adb (Scan_Front_End_Switches): Do not fail when two
4817 runtime directorie specified with two switches --RTS= designate
4818 the same directory, even when there are no literarily the same.
4820 2014-07-29 Robert Dewar <dewar@adacore.com>
4822 * gnat_ugn.texi: Minor documentation clarification.
4823 * switch-c.adb: Minor reformatting.
4825 2014-07-29 Robert Dewar <dewar@adacore.com>
4827 * sem_prag.adb (Analyze_Pragma, case Allow_Integer_Address):
4828 Fix incorrect RTE call which caused bomb if pragma was in
4829 configuration pragma file.
4831 2014-07-29 Jerome Lambourg <lambourg@adacore.com>
4833 * expect.c (__gnat_expect_poll): Fix typo in previous change.
4834 * g-expect.adb: Update comments.
4836 2014-07-29 Arnaud Charlet <charlet@adacore.com>
4838 * s-parame-hpux.ads, s-parame-vms-ia64.ads, s-parame.ads
4839 (Default_Attribute_Count): Bump to 16 on native platforms.
4841 2014-07-29 Ed Schonberg <schonberg@adacore.com>
4843 * sem_res.adb: Add guard to front-end inlining for SPARK.
4845 2014-07-29 Robert Dewar <dewar@adacore.com>
4847 * sem_ch10.adb, debug.adb, sem_prag.adb, sem_res.adb, sem_ch6.adb:
4850 2014-07-29 Ed Schonberg <schonberg@adacore.com>
4852 * sem_ch6.adb (Analyze_Subprogram_Body_Helper): Build body to
4853 inline in GNATprove mode when subprogran is marked Inline_Always.
4854 * sem_res.adb (Resolve_Call): Expand call in place in GNATProve
4855 mode if body to inline is available.
4856 * sem_prag.adb (Analyze_Pragma, case Inline_Always): Make pragma
4857 effective in GNATprove mode.
4858 * sem_ch10.adb (Analyze_Compilation_Unit): Call
4859 Check_Package_Body_For_Inlining in GNATprove mode, so that body
4860 containing subprograms with Inline_Always can be available before
4863 2014-07-29 Ed Schonberg <schonberg@adacore.com>
4865 * inline.ads, inline.adb, sem_ch10.adb: Rename Check_Body_For_Inlining
4866 to Check_Package_Body_For_Inlining, to prevent confusion with other
4867 inlining subprograms.
4869 2014-07-29 Robert Dewar <dewar@adacore.com>
4871 * opt.ads: Minor comment update.
4872 * sem_attr.adb (Uneval_Old_Msg): Deal with case of aspect, where
4873 we want setting of Uneval_Old at time of encountering the aspect.
4874 * sem_ch13.adb (Analyze_Aspect_Specifications): Capture setting
4876 * sinfo.adb (Uneval_Old_Accept): New function (Uneval_Old_Warn):
4877 New function (Set_Uneval_Old_Accept): New procedure.
4878 (Set_Uneval_Old_Warn): New procedure.
4879 * sinfo.ads: Uneval_Old_Accept: New flag Uneval_Old_Warn: New flag.
4881 2014-07-29 Robert Dewar <dewar@adacore.com>
4883 * sinfo.ads, inline.adb, inline.ads, sem_ch6.adb: Minor reformatting.
4884 * snames.ads-tmpl: Minor reformatting.
4885 * xsnamest.adb (XSnamesT): Remove special casing of Name_Error
4886 to give <Error>. Not clear why this was there, but the compiler
4887 sources do not reference Name_Error, and this interfered with
4888 the circuits for pragma Unevaluated_Use_Of_Old.
4890 2014-07-29 Hristian Kirtchev <kirtchev@adacore.com>
4892 * sem_prag.adb (Process_Atomic_Shared_Volatile): Allow volatile
4893 types in SPARK 2014 (again).
4894 * sem_res.adb (Is_OK_Volatile_Context): New routine.
4895 (Resolve_Entity_Name): Ensure that a volatile object with
4896 enabled properties Async_Writers or Effectire_Reads appears in
4897 a non-interfering context.
4899 2014-07-29 Ed Schonberg <schonberg@adacore.com>
4901 * sem_ch6.adb: Move Build_Body_To_Inline,
4902 Check_And_Buid_Body_To_Inline, and Cannot_Inline to package Inline.
4903 * exp_ch6.adb: Mode Expand_Inlined_Body to package Inline.
4904 * inline.ads, inline.adb: Package now contains subprograms that
4905 implement front-end inlining. No functional changes, no test
4908 2014-07-29 Robert Dewar <dewar@adacore.com>
4910 * exp_dbug.adb, g-expect.adb, sem_elab.adb: Minor typo fix.
4912 2014-07-29 Ed Schonberg <schonberg@adacore.com>
4914 * sem_ch6.adb (Analyze_Return_Type): Reject a return type that
4915 is a limited view when the context is a package body, because
4916 there is no subsequent place at which the non-limited view may
4918 (Process_Formals): Ditto.
4919 * sinfo.ads, par-ch3.adb: Minor reformatting.
4921 2014-07-29 Jerome Lambourg <lambourg@adacore.com>
4923 * expect.c (__gnat_expect_poll): New parameter dead_process
4924 used to return the dead process among the array of file
4925 descriptors. The Windows, VMS and HPUX implementations now
4926 properly report the dead process via this parameter. Other unixes
4928 * g-expect.adb (Poll): Adapt to the C profile.
4929 (Expect_Internal): Use the new parameter to properly close the
4930 File Descriptor. This then can be properly reported by the
4931 function First_Dead_Process as is expected.
4933 2014-07-29 Robert Dewar <dewar@adacore.com>
4935 * gnat_ugn.texi: Minor clarification of -gnatQ switch.
4937 2014-07-29 Robert Dewar <dewar@adacore.com>
4939 * einfo.adb (Derived_Type_Link): New function
4940 (Set_Derived_Type_Link): New procedure.
4941 (Write_Field31_Name): Output Derived_Type_Link.
4942 * einfo.ads: New field Derived_Type_Link.
4943 * exp_ch6.adb (Expand_Call): Warn if change of representation
4945 * sem_ch13.adb: Minor addition of ??? comment.
4946 (Rep_Item_Too_Late): Warn on case that is legal but could cause an
4947 expensive implicit conversion.
4948 * sem_ch3.adb (Build_Derived_Type): Set Derived_Type_Link if needed.
4950 2014-07-29 Hristian Kirtchev <kirtchev@adacore.com>
4952 * exp_ch3.adb (Build_Init_Procedure): Renamed Local_DF_Id
4953 to DF_Id. Add new local variable DF_Call. Do not perform any
4954 elaboration-related checks on the call to the partial finalization
4955 routine within an init proc to avoid generating bogus elaboration
4956 warnings on expansion-related code.
4957 * sem_elab.adb (Check_A_Call): Move constant Access_Case to
4958 the top level of the routine. Ensure that Output_Calls takes
4959 into account flags -gnatel and -gnatwl when emitting warnings
4961 (Check_Internal_Call_Continue): Update the call to Output_Calls.
4962 (Elab_Warning): Moved to the top level of routine Check_A_Call.
4963 (Emit): New routines.
4964 (Output_Calls): Add new formal parameter Check_Elab_Flag along with a
4965 comment on usage. Output all warnings or info messages only when the
4966 caller context demands it and the proper elaboration flag is set.
4968 2014-07-29 Yannick Moy <moy@adacore.com>
4970 * sem_attr.adb (Analyze_Attribute/Attribute_Old):
4971 Check rule about Old appearing in potentially unevaluated
4972 expression everywhere, not only in Post.
4974 2014-07-29 Arnaud Charlet <charlet@adacore.com>
4976 * sem_prag.adb: Update comment.
4977 * a-except.adb, a-except-2005.adb: Minor editing.
4979 2014-07-29 Pierre-Marie Derodat <derodat@adacore.com>
4981 * exp_dbug.adb (Debug_Renaming_Declaration):
4982 Do not create renaming entities for renamings of non-packed
4983 objects and for exceptions.
4985 2014-07-29 Robert Dewar <dewar@adacore.com>
4987 * sem_ch3.adb, sinfo.ads, types.ads, sem_prag.adb, a-except-2005.adb,
4988 sem_ch6.adb, par-ch3.adb: Minor reformatting.
4990 2014-07-29 Ed Schonberg <schonberg@adacore.com>
4992 * sem_ch6.adb (Check_Return_Subtype_Indication): Reject a return
4993 subtype indication in an extended return statement when the
4994 return value is an ancestor of the return type of the function,
4995 and that return type is a null record extension.
4997 2014-07-29 Thomas Quinot <quinot@adacore.com>
4999 * sem_ch13.adb (Rep_Item_Too_Late): Specialize/clarify error
5000 message produced for the case of a type-related representation
5001 item that is made illegal by 13.10(1).
5002 * gnat_rm.texi (Scalar_Storage_Order): Minor change in
5005 2014-07-29 Robert Dewar <dewar@adacore.com>
5007 * gnat_ugn.texi: Add section on Wide_Wide_Character encodings.
5008 * erroutc.adb (Output_Error_Msgs): Take wide characters into
5009 account in computing position of error flags.
5010 * sinput.adb (Get_Column_Number): Take wide characters into
5013 2014-07-29 Ed Schonberg <schonberg@adacore.com>
5015 * par-ch3.adb (P_Access_Type_Definition): The subtype indication
5016 in an access type definition can carry a null_exclusion indicator.
5017 * sem_ch3.adb (Access_Type_Declaration): If the subtype indication
5018 carries a null_exclusion indicator, verify that the subtype
5019 indication denotes an access type, and create a null-excluding
5021 * sinfo.ads, sinfo.adb: New attribute Null_Excluding_Subtype,
5022 defined on N_Access_To_Object_Definition to indicate that the
5023 subtype indication carries a null_exclusion indicator.
5025 2014-07-29 Hristian Kirtchev <kirtchev@adacore.com>
5027 * exp_ch6.adb (Add_Extra_Actual): Do not construct
5028 the extra actual by name, generate a reference instead.
5030 2014-07-29 Arnaud Charlet <charlet@adacore.com>
5032 * sem_prag.adb (Analyze_Pragma): Do not crash analyzing
5033 Allow_Integer_Address if already set.
5034 * a-except-2005.adb (Rcheck_PE_Stream_Operation_Not_Allowed):
5035 Fix order, for consistency with Rmsg_xx declarations.
5037 2014-07-29 Ed Schonberg <schonberg@adacore.com>
5039 * sem_ch4.adb (Complete_Object_Operation): If the type of the
5040 candidate subprogram is a limited view, use non-limited view
5043 2014-07-29 Robert Dewar <dewar@adacore.com>
5045 * sem_ch13.adb: Minor change in RM reference.
5046 * sem_mech.ads: Minor reformatting.
5047 * einfo.ads: Minor comment fix.
5048 * types.ads: Minor correction to range given for Mechanism_Type.
5049 * exp_ch6.adb (Add_Invariant_And_Predicate_Checks): Do not
5050 check predicate on way out for OUT or IN OUT parameters.
5051 * par-ch3.adb (P_Constraint_Opt): Handle missing RANGE keyword
5052 better (P_Range_Constraint): Corresponding fix.
5053 * checks.ads: Minor comment clarification.
5055 2014-07-29 Gary Dismukes <dismukes@adacore.com>
5057 * sem_ch8.adb (Analyze_Object_Renaming): Set the Is_Volatile
5058 and Treat_As_Volatile flags based on whether the renamed object
5059 is a volatile object.
5061 2014-07-29 Olivier Hainque <hainque@adacore.com>
5064 (Default_Alignment): Rename as Storage_Alignment. This is not
5065 a "default" that can be overriden. Augment comment to clarify
5066 intent and document why we need to manage alignment padding.
5067 (Header_Offset): Set to Header'Object_Size instead of 'Size
5068 rounded up to Storage_Alignment. Storage_Alignment on the
5069 allocation header is not required by our internals so was
5070 overkill. 'Object_Size is enough to ensure proper alignment
5071 of the header address when substracted from a storage address
5072 aligned on Storage_Alignment.
5073 (Minimum_Allocation): Rename as Extra_Allocation, conveying that
5074 this is always added on top of the incoming allocation requests.
5075 (Align): New function, to perform alignment rounding operations.
5076 (Allocate): Add comments on the Storage_Address computation
5077 scheme and adjust so that the alignment padding applies to that
5078 (Storage_Address) only.
5080 2014-07-29 Robert Dewar <dewar@adacore.com>
5082 * exp_ch3.adb (Default_Initialize_Object): Remove incorrect
5083 pragma Unreferenced.
5084 * cstand.adb (Create_Standard): Use E_Array_Type for standard
5085 string types. Make sure index of Any_String/Any_Array is in a list.
5086 * errout.adb: Minor reformatting.
5088 2014-07-29 Robert Dewar <dewar@adacore.com>
5090 * gnat_ugn.texi: Clean up and correct documentation of warnings.
5091 * usage.adb: Minor corrections to make sure warnings are properly
5093 * warnsw.adb (Set_Warning_Switch): Remove redundant return statement.
5094 (WA_Warnings): Add Warn_On_Suspicious_Modulus_Value.
5096 2014-07-29 Ed Schonberg <schonberg@adacore.com>
5098 * exp_ch3.adb (Expand_N_Object_Declaration): The dummy block
5099 created to match internal sequence numbers between compilations
5100 with/without abort must have its type properly set.
5102 2014-07-29 Robert Dewar <dewar@adacore.com>
5104 * ali.adb (Initialize_ALI): Initialize SSO_Default_Specified
5105 (Scan_ALI): Set SSO_Default in ALIs_Record (Scan_ALI): Set
5106 SSO_Default_Specified.
5107 * ali.ads (ALIs_Record): Add field SSO_Default
5108 (SSO_Default_Specified): New global switch.
5109 * bcheck.adb (Check_Consistent_SSO_Default): New procedure
5110 (Check_Configuration_Consistency): Call this procedure
5111 * einfo.adb (SSO_Set_High_By_Default): New
5112 function (SSO_Set_Low_By_Default): New function
5113 (Set_SSO_Set_High_By_Default): New procedure
5114 (Set_SSO_Set_Low_By_Default): New procedure (Write_Entity_Flags):
5116 * einfo.ads (SSO_Set_Low_By_Default): New flag
5117 (SSO_Set_High_By_Default): New flag
5118 * freeze.adb (Set_SSO_From_Default): New procedure
5119 (Freeze_Array_Type): Call Set_SSO_From_Default
5120 (Freeze_Record_Type): Call Set_SSO_From_Default
5121 * gnat_rm.texi: Document pragma Default_Scalar_Storage_Order
5122 * lib-writ.adb (Write_ALI): Set OL/OH in P line as needed
5123 * lib-writ.ads: Add OL/OH parameters to P line
5124 * opt.adb: Set Default_SSO, Default_SSO_Config as appropriate
5125 * opt.ads (Default_SSO): New global switch (Default_SSO_Config):
5127 * repinfo.adb (List_Scalar_Storage_Order): List SSO when it is
5128 set by default using pragma Default_Scalar_Storage_Order.
5129 * sem.ads (Scope_Stack_Entry): Add component Save_Default_SSO
5130 * sem_ch13.adb (Inherit_Delayed_Rep_Aspects):
5131 Clear SSO defaults when explicit SSO is inherited.
5132 (Analyze_Attribute_Definition_Clause): Clear SSO defaults when
5133 explicit SSO is specified.
5134 (Inherit_Aspects_At_Freeze_Point):
5135 Clear SSO default when inheriting SSO.
5136 * sem_ch3.adb (Set_Default_SSO): New procedure
5137 (Analyze_Private_Extension_Declaration): Set defualt SSO
5138 (Array_Type_Declaration): ditto (Build_Derived_Array_Type): ditto
5139 (Build_Derived_Private_Type): ditto (Build_Derived_Record_Type):
5140 ditto (Build_Derived_Type): ditto (Make_Class_Wide_Type): ditto
5141 (Record_Type_Declaration): ditto
5142 * sem_ch8.adb (Pop_Scope): Restore Default_SSO (Push_Scope):
5144 * sem_prag.adb (Analyze_Pragma, case
5145 Default_Scalar_Storage_Order): Set Default_SSO
5147 2014-07-29 Ed Schonberg <schonberg@adacore.com>
5149 * sem_ch6.adb (Valid_Operator_Definition): Verify that
5150 all parameter have mode IN. This check must be done here for
5151 subprogram instantiations that have operator names, because their
5152 analysis does not follow the same path as that for subprogram
5155 2014-07-29 Robert Dewar <dewar@adacore.com>
5157 * freeze.adb (Freeze_Entity, Concurrent_Type case): Add a guard
5158 to make sure that the Etype of a component of the corresponding
5159 record type is present before trying to freeze it.
5160 * sem_ch5.adb: Minor reformatting.
5162 2014-07-29 Robert Dewar <dewar@adacore.com>
5164 * exp_attr.adb, types.ads, types.h, exp_ch11.adb, a-except.adb,
5165 a-except-2005.adb: Add new reason code PE_Stream_Operation_Not_Allowed,
5166 and then use it when a stream operation is used from a library generic
5167 when the restriction (No_Streams) is active.
5169 2014-07-29 Thomas Quinot <quinot@adacore.com>
5171 * projects.texi: Fix minor typo.
5173 2014-07-29 Yannick Moy <moy@adacore.com>
5175 * sem_attr.adb (Analyze_Attribute): Fix generation of warning.
5177 2014-07-29 Arnaud Charlet <charlet@adacore.com>
5179 * sem_ch5.adb (Check_Unreachable_Code): Do not remove code in
5182 2014-07-29 Hristian Kirtchev <kirtchev@adacore.com>
5184 * exp_ch7.adb (Find_Last_Init): Add local variable
5185 Deep_Init_Found. Check the statement immediately following the
5186 declaration if [Deep_]Initialization was not found.
5188 2014-07-29 Hristian Kirtchev <kirtchev@adacore.com>
5190 * exp_util.adb (Is_Aliased): It appears that
5191 'reference-d and renamed objects still play some role in Boolean
5192 expression with actions and cannot be finalized immediately.
5194 2014-07-29 Ed Schonberg <schonberg@adacore.com>
5196 * exp_dbug.adb (Qualify_Needed): For debugging purposes,
5197 Loop names are not part of the full qualification of entity names.
5199 2014-07-29 Robert Dewar <dewar@adacore.com>
5201 * einfo.adb (Has_Protected): Test base type.
5202 * sem_ch4.adb (Analyze_Allocator): Reorganize code to make sure
5203 that we always properly check No_Protected_Type_Allocators.
5205 2014-07-29 Ed Schonberg <schonberg@adacore.com>
5207 * sem_util.ads, sem_util.adb (Defining_Entity): Now applies to
5208 loop declarations as well.
5209 * exp_ch5.adb (Expand_Loop_Statement): Apply Qualify_Entity_Names
5210 to an iterator loop, because it may contain local renaming
5211 declarations that require debugging information.
5213 2014-07-29 Robert Dewar <dewar@adacore.com>
5215 * sem_util.ads, exp_util.adb, sem_attr.adb: Minor reformatting.
5217 2014-07-29 Robert Dewar <dewar@adacore.com>
5219 * einfo.ads, einfo.adb (Static_Real_Or_String_Predicate): New function
5220 (Set_Static_Real_Or_String_Predicate): New procedure
5221 * sem_ch13.adb (Build_Predicate_Functions): Accomodate static
5222 string predicates (Is_Predicate_Static): Handle static string
5224 * sem_eval.adb (Real_Or_String_Static_Predicate_Matches):
5225 New procedure (Check_Expression_Against_Static_Predicate):
5226 Deal with static string predicates, now fully implemented
5227 (Eval_Relational_Op): Allow string equality/inequality as static
5228 if not comes from source.
5230 2014-07-29 Robert Dewar <dewar@adacore.com>
5232 * sem_aggr.adb, exp_ch5.adb, sem_ch5.adb, exp_util.adb, einfo.adb,
5233 einfo.ads, sem_util.adb, sem_attr.adb, sem_case.adb, sem_eval.adb,
5234 sem_eval.ads, sem_ch13.adb: General cleanup of static predicate
5235 handling. Change name of Discrete_Predicate to
5236 Discrete_Static_Predicate, and replace testing of the presence of this
5237 field by testing the flag Has_Static_Expression.
5239 2014-07-29 Robert Dewar <dewar@adacore.com>
5241 * gnat_rm.texi: Document pragma Unevaluated_Use_Of_Old.
5242 * opt.adb: Handle Uneval_Old.
5243 * opt.ads (Uneval_Old, Uneval_Old_Config): New variables.
5244 * par-prag.adb: Add dummy entry for pragma Unevaluated_Use_Of_Old.
5245 * sem.ads (Save_Uneval_Old): New field in Scope_Stack_Entry.
5246 * sem_attr.adb (Uneval_Old_Msg): New procedure.
5247 * sem_ch8.adb (Push_Scope): Save Uneval_Old.
5248 (Pop_Scope): Restore Uneval_Old.
5249 * sem_prag.adb (Analyze_Pragma, case Unevaluated_Use_Of_Old):
5251 * snames.ads-tmpl: Add entries for pragma Unevaluated_Use_Of_Old
5252 Add entries for Name_Warn, Name_Allow.
5254 2014-07-29 Robert Dewar <dewar@adacore.com>
5256 * sem_aggr.adb (Resolve_Array_Aggregate): Change Is_Static_Range
5257 to Is_OK_Static_Range.
5258 * sem_attr.adb (Eval_Attribute): Make sure we properly flag
5259 static attributes (Eval_Attribute, case Size): Handle size of
5260 zero properly (Eval_Attribute, case Value_Size): Handle size of
5262 * sem_ch13.adb: Minor reformatting.
5263 * sem_ch3.adb (Process_Range_Expr_In_Decl): Change
5264 Is_Static_Range to Is_OK_Static_Range.
5265 * sem_eval.adb (Eval_Case_Expression): Total rewrite, was
5266 wrong in several ways (Is_Static_Range): Moved here from spec
5267 (Is_Static_Subtype): Moved here from spec Change some incorrect
5268 Is_Static_Subtype calls to Is_OK_Static_Subtype.
5269 * sem_eval.ads: Add comments to section on
5270 Is_Static_Expression/Raises_Constraint_Error (Is_OK_Static_Range):
5271 Add clarifying comments (Is_Static_Range): Moved to body
5272 (Is_Statically_Unevaluated): New function.
5273 * sem_util.ads, sem_util.adb (Is_Preelaborable_Expression): Change
5274 Is_Static_Range to Is_OK_Static_Range.
5275 * sinfo.ads: Additional commments for Is_Static_Expression noting
5276 that clients should almost always use Is_OK_Static_Expression
5277 instead. Many other changes throughout front end units to obey
5279 * tbuild.ads, tbuild.adb (New_Occurrence_Of): Set Is_Static_Expression
5280 for enumeration literal.
5281 * exp_ch5.adb, sem_intr.adb, sem_ch5.adb, exp_attr.adb, exp_ch9.adb,
5282 lib-writ.adb, sem_ch9.adb, einfo.ads, checks.adb, checks.ads,
5283 sem_prag.adb, sem_ch12.adb, freeze.adb, sem_res.adb, exp_ch4.adb,
5284 exp_ch6.adb, sem_ch4.adb, sem_ch6.adb, exp_aggr.adb, sem_cat.adb:
5285 Replace all occurrences of Is_Static_Expression by
5286 Is_OK_Static_Expression.
5288 2014-07-29 Hristian Kirtchev <kirtchev@adacore.com>
5290 * exp_ch4.adb (Process_Transient_Object): Remove constant
5291 In_Cond_Expr, use its initialization expression in place.
5292 * exp_ch7.adb (Process_Declarations): There is no need to check
5293 that a transient object being hooked is controlled as it would
5294 not have been hooked in the first place.
5295 * exp_util.adb (Is_Aliased): 'Reference-d or renamed transient
5296 objects are not considered aliased when the related context is
5297 a Boolean expression_with_actions.
5298 (Requires_Cleanup_Actions): There is no need to check that a transient
5299 object being hooked is controlled as it would not have been hooked in
5302 2014-07-29 Robert Dewar <dewar@adacore.com>
5304 * errout.adb: Minor reformatting.
5306 2014-07-29 Hristian Kirtchev <kirtchev@adacore.com>
5308 * exp_ch3.adb (Default_Initialize_Object): Add new variables
5309 Abrt_Blk and Dummy. Generate a dummy temporary when aborts are
5310 not allowed to ensure the symmetrical generation of symbols.
5311 * exp_ch7.adb (Build_Object_Declarations): Remove variables A_Expr
5312 and E_Decl. Add new variables Decl and Dummy. Generate a dummy
5313 temporary when aborts are not allowed to ensure symmertrical
5314 generation of symbols.
5315 * exp_intr.adb (Expand_Unc_Deallocation): Add new variable
5316 Dummy. Generate a dummy temporary when aborts are not allowed
5317 to ensure symmertrical generation of symbols.
5319 2014-07-29 Ed Schonberg <schonberg@adacore.com>
5321 * exp_dbug.adb (Debug_Renaming_Declaration): For an object
5322 renaming, indicate that the renamed entity itself needs debug
5323 information. This is necessary if that entity is a temporary,
5324 e.g. part of the expansion of an explicit dereference in an
5327 2014-07-29 Thomas Quinot <quinot@adacore.com>
5329 * errout.adb (Set_Error_Posted): When propagating flag to
5330 an enclosing named association, also propagate to the parent
5331 of that node, so that named and positional associations are
5332 treated consistently.
5334 2014-07-29 Ed Schonberg <schonberg@adacore.com>
5336 * sem_attr.adb (Resolve_Attribute, case 'Update): Set
5337 Do_Range_Check properly on array component expressions that
5338 have a scalar type. In GNATprove mode, only checks on scalar
5339 components must be marked by the front-end.
5341 2014-07-29 Ed Schonberg <schonberg@adacore.com>
5343 * sem_res.adb (Resolve_Type_Conversion): If the type of the
5344 expression is a limited view, use the non-limited view when
5347 2014-07-29 Hristian Kirtchev <kirtchev@adacore.com>
5349 * exp_ch4.adb (Expand_N_Case_Expression): Mark the generated
5350 case statement as coming from a conditional expression.
5351 (Expand_N_If_Expression): Mark the generated if statement as
5352 coming from a conditional expression.
5353 * exp_ch5.adb (Expand_N_Case_Statement): Do not process controlled
5354 objects found in case statement alternatives when the case
5355 statement is actually a case expression.
5356 (Expand_N_If_Statement):
5357 Do not process controlled objects found in an if statement when
5358 the if statement is actually an if expression.
5359 * sinfo.adb (From_Conditional_Expression): New routine.
5360 (Set_From_Conditional_Expression): New routine.
5361 * sinfo.ads Add new semantic flag From_Conditional_Expression and
5362 update related nodes.
5363 (From_Conditional_Expression): New routine along with pragma Inline.
5364 (Set_From_Conditional_Expression): New routine along with pragma Inline.
5366 2014-07-29 Hristian Kirtchev <kirtchev@adacore.com>
5368 * exp_ch7.adb (Build_BIP_Cleanup_Stmts): Remove
5369 formal parameter Obj_Id and update the comment on usage. Renamed
5370 Obj_Typ to Func_Typ and update all occurrences.
5371 (Find_Last_Init): Remove formal parameter Decl and update the comment
5373 Remove local constants Obj_Id and Obj_Typ. Remove local variables
5374 Init_Typ and Is_Conc. Remove the extraction of the initialization type.
5375 (Find_Last_Init_In_Block): Remove formal parameter
5376 Init_Typ and update the comment on usage.
5377 (Is_Init_Call): Remove formal parameter Init_Typ and update the comment
5378 on usage. Check whether the procedure call is an initialization
5379 procedure of either the object type or the initialization type.
5380 (Is_Init_Proc_Of): New routine.
5381 (Process_Object_Declaration): Obj_Id and Obj_Typ are now global to this
5382 routine. Add new variable Init_Typ. Add circuitry to extract the object
5383 type as well as the initialization type.
5385 2014-07-29 Robert Dewar <dewar@adacore.com>
5387 * sem_case.adb: Minor reformatting.
5388 * sem_aux.ads: Minor reformatting.
5390 2014-07-29 Ed Schonberg <schonberg@adacore.com>
5392 * sinfo.adb (Set_Else_Actions, Set_Then_Actions): Set parent
5393 pointer on these fields, even though they are semantic, because
5394 subsequent analysis and expansion of action nades may require
5395 exploring the tree, for example to locate a node to be wrapped
5396 when a function with controlled result is called.
5398 2014-07-29 Claire Dross <dross@adacore.com>
5400 * sem_aux.adb (Get_Binary_Nkind): Use case on
5401 Name_Id instead of an intermediate string.
5402 (Get_Unary_Nkind): Use case on Name_Id instead of an intermediate
5405 2014-07-29 Sergey Rybin <rybin@adacore.com frybin>
5407 * gnat_ugn.texi (gnatelim, gnatstub, gnatmetric): Add note
5408 about processing sources with preprocessor directives.
5410 2014-07-24 Martin Liska <mliska@suse.cz>
5412 * gcc-interface/trans.c (finalize_nrv): Adjust function call.
5413 * gcc-interface/utils.c (rest_of_subprog_body_compilation): Likewise.
5414 (gnat_write_global_declarations): Likewise.
5416 2014-07-19 David Wohlferd <dw@LimeGreenSocks.com>
5418 * gnat_rm.texi: Clean up for makeinfo 5.2.
5420 2014-07-19 David Wohlferd <dw@LimeGreenSocks.com>
5422 * gnat_rm.texi (Machine Code Insertions): Clean up.
5424 2014-07-18 Robert Dewar <dewar@adacore.com>
5426 * exp_ch7.adb: Minor reformatting.
5428 2014-07-18 Claire Dross <dross@adacore.com>
5430 * sem_aux.ads (Get_Binary_Nkind): New function that returns
5431 the Node_Kind value of an entity defining a binary operator.
5432 (Get_Unary_Nkind): New function that returns the Node_Kind value
5433 of an entity defining a unary operator.
5435 2014-07-18 Pascal Obry <obry@adacore.com>
5437 * sysdep.c: comment update.
5438 * adaint.c (__gnat_fputwc): Use wchar_t on a limited set of
5439 platforms where it is known to be supported.
5441 2014-07-18 Thomas Quinot <quinot@adacore.com>
5443 * sem_dist.adb (Process_Remote_AST_Declaration): Need
5444 to set Fat_Type's Ekind in order to be able to use its
5445 Corresponding_Remote_Type attribute.
5447 2014-07-18 Hristian Kirtchev <kirtchev@adacore.com>
5449 * einfo.adb Last_Aggregate_Assignment is now Node 30.
5450 (Last_Aggregate_Assignment): Include
5451 constants in the assertion. Update the underlying node.
5452 (Set_Last_Aggregate_Assignment): Include constants in the
5453 assertion. Update the underlying node. (Write_Field11_Name):
5454 Remove the entry for Last_Aggregate_Assignment.
5455 (Write_Field30_Name): Add an entry for Last_Aggregate_Assignment.
5456 * einfo.ads Update the node designation and usage of attribute
5457 Last_Aggregate_Assignment.
5458 * exp_aggr.adb (Expand_Array_Aggregate): Store the last
5459 assignment statement used to initialize a controlled object.
5460 (Late_Expansion): Store the last assignment statement used to
5461 initialize a controlled record or an array of controlled objects.
5462 * exp_ch3.adb (Expand_N_Object_Declaration): Default
5463 initialization of objects is now performed in a separate routine.
5464 (Default_Initialize_Object): New routine.
5465 * exp_ch7.adb (Build_BIP_Cleanup_Stmts): Add formal parameter
5466 Obj_Id. Update the comment on usage.
5467 (Find_Last_Init): Remove formal parameter Typ. Update comment on usage.
5468 Reimplement the logic. (Find_Last_Init_In_Block): New routine.
5469 (Is_Init_Call): Add formal parameter Init_Typ. Update the
5470 comment on usage. Account for the type init proc when trying
5471 to determine whether a statement is an initialization call.
5472 (Make_Adjust_Call): Rename formal parameter For_Parent to
5473 Skip_Self. Update all occurrences of For_Parent. Account for
5474 non-tagged types. Update the call to Make_Call.
5475 (Make_Call): Rename formal parameter For_Parent to Skip_Self. Update
5476 comment on usage. Update all occurrences of For_Parent.
5477 (Make_Final_Call): Rename formal parameter For_Parent to
5478 Skip_Self. Update all occurrences of For_Parent. Account
5479 for non-tagged types. Update the call to Make_Call.
5480 (Process_Object_Declaration): Most variables and constants are
5481 now local to the routine.
5482 * exp_ch7.ads (Make_Adjust_Call): Rename formal parameter
5483 For_Parent to Skip_Self. Update the comment on usage.
5484 (Make_Final_Call): Rename formal parameter For_Parent to
5485 Skip_Self. Update the comment on usage.
5487 2014-07-18 Ed Schonberg <schonberg@adacore.com>
5489 * sem_ch9.adb (Analyze_Requeue): The entry being referenced
5490 can be a procedure that is implemented by entry, and have a
5491 formal that is a synchronized interface. It does not have to
5492 be declared as a protected operation.
5494 2014-07-18 Robert Dewar <dewar@adacore.com>
5496 * gnat_rm.texi: Remove mention of obsolete attributes
5497 Max[_Interrupt]_Priority, which have never been implemented
5498 (or at the very least were removed long ago if they ever were
5499 implemented. Add documentation of Max[_Interrupt]_Priority
5500 constants in package System.
5501 * ttypes.ads: Document actual handling of package System,
5502 rather than a historical fantasy version. Remove mention of
5503 non-existent attributes Max[_Interrupt]_Priority.
5505 2014-07-18 Pascal Obry <obry@adacore.com>
5507 * a-witeio.adb (Put): No 16-bit character output when text
5508 translation is disabled.
5509 * i-cstrea.ads: Code clean up.
5511 2014-07-18 Robert Dewar <dewar@adacore.com>
5513 * gnat_rm.texi: Document that Wchar_T_Size and Word_Size are
5516 2014-07-18 Arnaud Charlet <charlet@adacore.com>
5518 * a-witeio.adb, initialize.c: Update comments. Minor clean ups.
5520 2014-07-18 Pascal Obry <obry@adacore.com>
5522 * adaint.c: Do not include wchar.h on VxWorks.
5523 * mingw32.h: Remove obsolete definition.
5525 2014-07-18 Pascal Obry <obry@adacore.com>
5527 * a-textio.adb, a-witeio.adb, a-ztexio.adb: Use C_Streams Default_Text.
5528 * i-cstrea.ads (Content_Encoding): Moved here, add convention C.
5529 * s-ficobl.ads (Content_Encoding): Moved to C_Streams.
5530 * s-fileio.adb (Open): Adjust to use Content_Encoding from C_Streams.
5532 2014-07-18 Pascal Obry <obry@adacore.com>
5534 * a-textio.adb: Rename Is_Text_File to Text_Encoding.
5535 * a-ztexio.adb: Likewise.
5536 * a-witeio.adb: Likewise.
5537 (Open): Pass file's translation mode to set_text_mode.
5538 * s-ficobl.ads (Content_Encoding): New type.
5539 (Text_Content_Encoding): New subtype.
5540 (AFCB): Rename Is_Text_File to Text_Encoding.
5541 * s-fileio.adb (Open): Handles new text_translation
5542 values. Remove Is_Text_File which is equivalent to Text_Encoding
5543 in Text_Content_Encoding.
5544 * adaint.h (__gnat_set_mode): New routine.
5545 * sysdep.c (__gnat_set_wide_text_mode): Removed.
5546 (__gnat_set_mode): New routine.
5548 2014-07-18 Arnaud Charlet <charlet@adacore.com>
5550 * gcc-interface/decl.c, gcc-interface/trans.c,
5551 gcc-interface/utils.c (Is_Packed_Array_Type): Renamed
5552 Is_Packed_Array_Impl_Type.
5554 2014-07-18 Gary Dismukes <dismukes@adacore.com>
5556 * sem_util.adb: Minor typo correction.
5558 2014-07-18 Ben Brosgol <brosgol@adacore.com>
5560 * gnat_rm.texi: Complete previous change.
5562 2014-07-18 Pascal Obry <obry@adacore.com>
5564 * s-fileio.adb: Minor style fix.
5566 2014-07-18 Ed Schonberg <schonberg@adacore.com>
5568 * sem_ch13.adb (Analyze_Aspect_Specifications): Detect improper
5569 specification of stream attributes for subtypes that are not
5570 first subtypes, to prevent malformed rep_item chains in the case
5571 of such illegal specifications for discriminated private subtypes.
5572 (Check_Overloaded_Name): Verify that the name is an entity name
5573 before other checks.
5575 2014-07-18 Pascal Obry <obry@adacore.com>
5577 * adaint.c (__gnat_fputwc) Do not disable on cross-build.
5579 2014-07-18 Robert Dewar <dewar@adacore.com>
5581 * sem_prag.adb, sem_attr.adb,
5582 sem_aggr.adb, sinfo.ads, sem_eval.ads: Minor reformatting.
5584 2014-07-18 Pascal Obry <obry@adacore.com>
5586 * sysdep.c (__gnat_wide_text_translation_required): Removed from here.
5587 * initialize.c (__gnat_wide_text_translation_required): Defined here.
5589 2014-07-18 Pascal Obry <obry@adacore.com>
5591 * adaint.c (__gnat_fputwc): New routine.
5592 * s-crtl.ads (fputwc): Now imported as __gnat_fputwc.
5594 2014-07-18 Hristian Kirtchev <kirtchev@adacore.com>
5596 * einfo.adb: Flag 270 is now used as Stores_Attribute_Old_Prefix.
5597 (Set_Stores_Attribute_Old_Prefix): New routine.
5598 (Stores_Attribute_Old_Prefix): New routine.
5599 (Write_Entity_Flags):
5600 Output flag Stores_Attribute_Old_Prefix.
5601 * einfo.ads Add new flag Stores_Attribute_Old_Prefix along with
5603 (Set_Stores_Attribute_Old_Prefix): New routine
5604 along with pragma Inline.
5605 (Stores_Attribute_Old_Prefix): New
5606 routine along with pragma Inline.
5607 * exp_attr.adb (Expand_N_Attribute_Reference): Mark the generated
5608 constant which captures the result of attribute 'Old's prefix.
5609 * sem_util.adb (In_Assertion_Expression_Pragma): Recognize a
5610 relocated expression which acted as a prefix of attribute 'Old.
5612 2014-07-18 Bob Duff <duff@adacore.com>
5614 * s-spsufi.adb (Finalize_And_Deallocate): Set Subpool.Owner to
5615 null before dispatching to Deallocate_Subpool.
5616 * s-stposu.ads (Default_Subpool_For_Pool): Change mode of
5617 parameter of Default_Subpool_For_Pool to 'in out'.
5618 * s-stposu.adb (Set_Pool_Of_Subpool): Use raise expression. Add
5619 a message to the raise.
5620 * sem_util.adb: Minor reformatting.
5622 2014-07-18 Robert Dewar <dewar@adacore.com>
5624 * sem_util.adb (Check_Expression_Against_Static_Predicate):
5625 Mark expression as non-static if it fails static predicate check,
5626 and issue additional warning.
5628 2014-07-18 Pascal Obry <obry@adacore.com>
5630 * a-witeio.adb (Put): Control translation based on
5631 wide_text_translation_required.
5632 * adaint.c (CurrentCCSEncoding): New variable.
5633 * initialize.c (__gnat_initialize): On Windows initialize
5634 CurrentCCSEncoding based on values in GNAT_CCS_ENCODING
5635 environment variable.
5636 * mingw32.h (CurrentCCSEncoding): New external.
5637 (__gnat_wide_text_translation_required): Likewise.
5638 * sysdep.c (wide_text_translation_required): New variable.
5639 (__gnat_set_wide_text_mode): Set mode based on CurrentCCSEncoding.
5641 2014-07-18 Hristian Kirtchev <kirtchev@adacore.com>
5643 * sem_prag.adb (Analyze_Refined_Depends_In_Decl_Part): Remove global
5644 variable Refined_States. Add global variable Matched_Items.
5645 (Check_Dependency_Clause): Account for dependency
5646 clauses utilizing states with visible null refinements.
5647 (Is_Null_Refined_State): New routine.
5648 (Match_Items): Record each successfully matched item of pragma Depends.
5649 (Record_Item): New routine.
5651 2014-07-18 Ed Schonberg <schonberg@adacore.com>
5653 * sem_attr.adb (Analyze_Attribute, case 'Update): Set
5654 Do_Range_Check flag on a dynamic index expression used in a
5655 component association in the argument of Update.
5657 2014-07-18 Gary Dismukes <dismukes@adacore.com>
5659 * einfo.ads, sem_eval.ads, sem_ch13.adb: Minor reformatting.
5661 2014-07-18 Hristian Kirtchev <kirtchev@adacore.com>
5663 * exp_ch6.adb (Expand_Simple_Function_Return): Redo the marking
5664 of enclosing blocks, loops and the enclosing function using a
5665 parent-based traversal.
5666 * exp_util.adb (Wrap_Statements_In_Block): Suppress the secondary
5667 stack reclamation if the iterator loop contains a return statement
5668 that uses the stack.
5669 * sem_ch5.adb (Analyze_Loop_Statement): There is no need to
5670 patch up the scope stack as the secondary stack management now
5671 takes into account the enclosing function of the iterator loop.
5673 2014-07-18 Robert Dewar <dewar@adacore.com>
5675 * sem_ch3.adb, g-memdum.ads, i-cstrea.ads: Minor reformatting.
5677 2014-07-18 Robert Dewar <dewar@adacore.com>
5679 * einfo.adb (Has_Static_Predicate): New function.
5680 (Set_Has_Static_Predicate): New procedure.
5681 * einfo.ads (Has_Static_Predicate): New flag.
5682 * sem_ch13.adb (Is_Predicate_Static): New function
5683 (Build_Predicate_Functions): Use Is_Predicate_Static to reorganize
5684 (Add_Call): Minor change in Sloc of generated expression
5685 (Add_Predicates): Remove setting of Static_Pred, no longer used.
5686 * sem_ch4.adb (Has_Static_Predicate): Removed this function,
5687 replace by use of the entity flag Has_Static_Predicate_Aspect.
5688 * sem_eval.adb (Eval_Static_Predicate_Check): Check real case
5689 and issue warning that predicate is not checked for now.
5690 * sem_eval.ads (Eval_Static_Predicate_Check): Fix comments in
5692 * sem_util.adb (Check_Expression_Against_Static_Predicate):
5693 Carry out check for any case where there is a static predicate,
5694 and output appropriate message.
5695 * sinfo.ads: Minor comment corrections.
5697 2014-07-18 Ed Schonberg <schonberg@adacore.com>
5699 * exp_ch3.adb (Expand_Freeze_Record_Type): If the type is derived
5700 from an untagged private type whose full view is tagged, the type
5701 is marked tagged for layout reasons, but it has no dispatch table,
5702 so Set_All_DT_Position must not be called.
5703 * exp_ch13.adb: If the freeze node is for a type internal to a
5704 record declaration, as is the case for a class-wide subtype
5705 of a parent component, the relevant scope is the scope of the
5708 2014-07-18 Thomas Quinot <quinot@adacore.com>
5710 * g-memdum.adb, g-memdum.ads: Code clean ups.
5712 2014-07-18 Hristian Kirtchev <kirtchev@adacore.com>
5714 * sem_prag.adb (Check_Dependency_Clause):
5715 Update the comment on usage. Reimplement the mechanism which
5716 attempts to match a single clause of Depends against one or
5717 more clauses of Refined_Depends.
5718 (Input_Match): Removed.
5719 (Inputs_Match): Removed.
5720 (Is_Self_Referential): Removed.
5721 (Normalize_Clause): Update the call to Split_Multiple_Outputs.
5722 (Normalize_Outputs): Rename variable Split to New_Claue and update
5723 all its occurrences.
5724 (Report_Extra_Clauses): Update the comment on usage.
5725 (Split_Multiple_Outputs): Renamed to Normalize_Outputs.
5727 2014-07-18 Gary Dismukes <dismukes@adacore.com>
5729 * i-cstrea.ads: Minor reformatting.
5731 2014-07-18 Hristian Kirtchev <kirtchev@adacore.com>
5733 * exp_util.adb (Wrap_Statements_In_Block): Propagate both
5734 secondary stack-related flags to the generated block.
5735 * sem_ch5.adb (Analyze_Loop_Statement): Update the scope chain
5736 once the loop is relocated in a block.
5738 2014-07-18 Robert Dewar <dewar@adacore.com>
5740 * repinfo.ads: Add documentation on handling of back annotation
5743 2014-07-18 Ed Schonberg <schonberg@adacore.com>
5745 * sinfo.ads, sinfo.adb (Incomplete_View): New semantic attribute
5746 of full type declaration, denotes previous declaration for
5747 incomplete view of the type.
5748 * sem_ch3.adb (Analyze_Full_Type_Declaration): Set Incomplete_View
5749 of declaration if one is present.
5750 (Replace_Type): When constructing the signature of an inherited
5751 operation, handle properly the case where the operation has a
5752 formal whose type is an incomplete view.
5753 * sem_util.adb (Collect_Primitive_Operations): Handle properly
5754 the case of an operation declared after an incomplete declaration
5755 for a type T and before the full declaration of T.
5757 2014-07-18 Pascal Obry <obry@adacore.com>
5759 * i-cstrea.ads: Add documentation for set_wide_text_mode.
5761 2014-07-18 Robert Dewar <dewar@adacore.com>
5763 * a-witeio.adb: Minor code reorganization.
5764 * i-cstrea.ads: Add comment.
5766 2014-07-18 Thomas Quinot <quinot@adacore.com>
5768 * s-oscons-tmplt.c (NAME_MAX): Minor cleaup and comment
5771 2014-07-18 Robert Dewar <dewar@adacore.com>
5773 * g-memdum.adb, g-memdum.ads, exp_strm.adb: Minor reformatting.
5775 2014-07-18 Pascal Obry <obry@adacore.com>
5777 * s-crtl.ads, i-cstrea.ads (fputwc): New routine.
5778 * a-witeio.adb (Put): On platforms where there is translation
5779 done by the OS output the raw text.
5780 (New_Line): Use Put above to properly handle the LM wide characters.
5782 2014-07-18 Thomas Quinot <quinot@adacore.com>
5784 * g-memdum.adb, g-memdum.ads (Dump): New parameter Prefix, defaulted
5785 to Absolute_Address.
5787 2014-07-18 Eric Botcazou <ebotcazou@adacore.com>
5789 * opt.ads (Suppress_Back_Annotation): Remove as unused.
5790 * fe.h (Back_Annotate_Rep_Info): Likewise.
5791 (Global_Discard_Names): Likewise.
5793 2014-07-18 Robert Dewar <dewar@adacore.com>
5795 * sem_ch13.adb (Is_Type_Ref): Check that type name is not
5798 2014-07-18 Vincent Celier <celier@adacore.com>
5800 * s-osinte-vms.ads: Fix style errors.
5802 2014-07-18 Thomas Quinot <quinot@adacore.com>
5804 * s-oscons-tmplt.c (_POSIX_SOURCE): Define in order to get
5805 NAME_MAX and PATH_MAX.
5807 2014-07-18 Bob Duff <duff@adacore.com>
5809 * exp_strm.adb (Build_Record_Or_Elementary_Input_Function,
5810 Build_Record_Or_Elementary_Output_Procedure): For Input and
5811 Output attributes, do not read/write the discriminants if they
5812 have default values; that will be done by Read/Write.
5814 2014-07-18 Robert Dewar <dewar@adacore.com>
5816 * sem_aggr.adb, exp_ch5.adb, sem_ch3.adb, layout.adb, sem_type.adb,
5817 exp_util.adb, exp_attr.adb, einfo.adb, einfo.ads, exp_pakd.adb,
5818 checks.adb, exp_pakd.ads, freeze.adb, sem_util.adb, exp_dbug.adb,
5819 exp_dbug.ads, exp_ch4.adb, sem_ch8.adb, exp_aggr.adb, sem_eval.adb,
5820 sem_ch13.adb: Change name Packed_Array_Type to Packed_Array_Impl_Type.
5822 2014-07-18 Robert Dewar <dewar@adacore.com>
5824 * lib-writ.adb, makeutl.adb, ali.ads: Minor reformatting.
5826 2014-07-18 Vincent Celier <celier@adacore.com>
5828 * lib-writ.ads: Update documentation about the D lines.
5830 2014-07-18 Ed Schonberg <schonberg@adacore.com>
5832 * sem_ch13.adb (Replace_Type_References_Generic): Use type entity
5833 as a parameter, rather than its Chars field, in order to locate
5834 freeze node of type. If the predicate or invariant has references
5835 to types other than the one to which the contract applies, these
5836 types must be frozen, and the corresponding predicate functions
5837 created, before that freeze node.
5839 2014-07-18 Robert Dewar <dewar@adacore.com>
5841 * freeze.adb, einfo.ads, einfo.adb: Minor code reorganization.
5842 * par_sco.adb: Minor reformatting.
5844 2014-07-18 Gary Dismukes <dismukes@adacore.com>
5846 * exp_ch4.adb (Real_Range_Check): Turn off
5847 the Do_Range_Check flag on the conversion's current Expression
5848 argument rather than on the originally captured Operand node,
5849 as Expression may reflect a rewriting (as in conversions to a
5852 2014-07-18 Vincent Celier <celier@adacore.com>
5854 * ali.adb (Scan_ALI): Set Sdep_Record.Unit_Name, when the unit
5856 * ali.ads (Sdep_Record): New component Unit_Name.
5857 * lib-writ.adb (Write_ALI): Write the unit name in D lines.
5858 * makeutl.adb (Check_Source_Info_In_ALI): Return False if a
5859 dependent unit is in a project and the source file name is not
5862 2014-07-18 Bob Duff <duff@adacore.com>
5864 * s-addima.ads: Minor: add comment.
5866 2014-07-18 Thomas Quinot <quinot@adacore.com>
5868 * freeze.adb (Check_Component_Storage_Order): Fix enforcement
5869 of nesting rules for composites with different SSOs.
5871 2014-07-18 Thomas Quinot <quinot@adacore.com>
5873 * par_sco.adb (Is_Logical_Operator): An If_Expression is not
5874 a proper logical operator.
5875 (Has_Decision): An If_Expression indicates the presence of a decision
5876 although it is not a logical operator.
5878 2014-07-18 Robert Dewar <dewar@adacore.com>
5880 * gnat_ugn.texi: Remove note that -gnatR not allowed with -gnatc.
5881 * switch-c.adb: Remove prohibition of -gnatR and -gnatc together.
5883 2014-07-18 Eric Botcazou <ebotcazou@adacore.com>
5885 * sem_ch13.adb (Kill_Rep_Clause): Clear Comes_From_Source flag
5886 on the null statement.
5888 2014-07-18 Thomas Quinot <quinot@adacore.com>
5890 * adaint.c: Minor comment rewording.
5891 * socket.c: Define macros _REENTRANT and _THREAD_SAFE so that
5892 use of errno in this file is thread safe.
5894 2014-07-18 Arnaud Charlet <charlet@adacore.com>
5896 * gnat_ugn.texi: Doc clarification.
5897 * sem_ch13.adb (Kill_Rep_Clause): Use Replace not Rewrite.
5898 * sem_ch13.ads: Minor comment update.
5900 2014-07-18 Robert Dewar <dewar@adacore.com>
5902 * repinfo.ads: Minor comment fix.
5904 2014-07-18 Robert Dewar <dewar@adacore.com>
5906 * par-prag.adb: Add dummy entry for Default_Scalar_Storage_Order.
5907 * sem_prag.adb: Add dummy implementation of
5908 Default_Scalar_Storage_Order.
5909 * snames.ads-tmpl: Add dummy entry for
5910 Default_Scalar_Storage_Order pragma.
5912 2014-07-18 Robert Dewar <dewar@adacore.com>
5914 * opt.adb (Tree_Read): Read Address_Is_Private,
5915 Ignore_Rep_Clauses, Ignore_Style_Check_Pragmas, Multiple_Unit_Index.
5916 (Tree_Write): Corresponding writes
5917 * opt.ads: Minor comment reformatting and fixes.
5918 * tree_io.ads: Increment ASIS_Version_Number.
5920 2014-07-18 Robert Dewar <dewar@adacore.com>
5922 * sem_attr.adb, s-os_lib.ads, prj-tree.adb: Minor reformatting.
5923 * types.h: Fix typo.
5925 2014-07-18 Robert Dewar <dewar@adacore.com>
5927 * freeze.adb (Check_Address_Clause): Use Kill_Rep_Clause (no
5929 * gnat_ugn.texi: Document that -gnatI removes rep clauses from
5931 * sem_ch13.adb (Kill_Rep_Clause): New procedure
5932 (Analyze_Attribute_Definition_Clause): Use
5933 Kill_Rep_Clause. This is just a cleanup, no functional effect.
5934 (Analyze_Enumeration_Representation_Clause):
5935 Use Kill_Rep_Clause. This means that enum rep
5936 clauses are now properly removed from -gnatct trees.
5937 (Analyze_Record_Representation_Clause): Same change.
5938 * sem_ch13.ads (Kill_Rep_Clause): New procedure.
5940 2014-07-18 Pascal Obry <obry@adacore.com>
5942 * s-os_lib.ads, s-os_lib.adb (GM_Time_Of): New routine to create an
5943 OS_Time from time parts.
5944 * adaint.h, adaint.c (__gnat_to_os_time): New routine.
5946 2014-07-18 Ed Schonberg <schonberg@adacore.com>
5948 * sem_ch4.adb (Try_Container_Indexing): Refine previous patch for
5949 indexing over containers that are derived types: check whether
5950 signature of found operation has the correct first parameter
5951 before retrieving directly a primitive operation.
5953 2014-07-18 Ed Schonberg <schonberg@adacore.com>
5955 * sem_attr.adb (Analyze_Attribute, case 'Update): Set
5956 Do_Range_Check flag on dynamic bounds of a range used in a
5957 component association in the argument of Update.
5959 2014-07-18 Thomas Quinot <quinot@adacore.com>
5961 * adaint.c: #define _REENTRANT and _THREAD_SAFE in order for
5962 accesses to errno(3) to be thread safe.
5964 2014-07-18 Vincent Celier <celier@adacore.com>
5966 * prj-tree.adb (Imported_Or_Extended_Project_Of): For each non
5967 limited imported project that is an extending project, return
5968 a project being extended if it has the expected name.
5970 2014-07-18 Pascal Obry <obry@adacore.com>
5972 * s-os_lib.ads, s-os_lib.adb (Set_File_Last_Modify_Time_Stamp): New
5973 routine to set the last modification time stamp for the given file.
5974 * gnatchop.adb (File_Time_Stamp): Removed.
5976 Set_File_Last_Modify_Time_Stamp instead of ad-hoc implementation.
5978 2014-07-18 Ed Schonberg <schonberg@adacore.com>
5980 * sem_aggr.adb (Aggregate_Constraint_Checks): Moved to sem_util.
5981 * sem_util.ads, sem_util.adb (Aggregate_Constraint_Checks):
5982 Moved here, so it can be shared with the resolution of 'Update,
5983 whose argument shares some features with aggregates.
5984 * sem_attr.adb (Resolve_Attribute, case 'Update): Apply
5985 Aggregate_Constraint_Checks with the expression of each
5986 association, so that the Do_Range_Check flag is set when needed.
5988 2014-07-18 Ed Schonberg <schonberg@adacore.com>
5990 * sem_ch4.adb (Try_Container_Indexing): If the container
5991 type is a derived type, the value of the inherited aspect is
5992 the Reference operation declared for the parent type. However,
5993 Reference is also a primitive operation of the new type, and
5994 the inherited operation has a different signature. We retrieve
5995 the right one from the list of primitive operations of the
5998 2014-07-18 Vincent Celier <celier@adacore.com>
6000 * debug.adb: Update comment.
6002 2014-07-18 Hristian Kirtchev <kirtchev@adacore.com>
6004 * exp_util.adb (Needs_Finalization): There is no reason why a
6005 C type should not benefit from finalization actions.
6007 2014-07-18 Thomas Quinot <quinot@adacore.com>
6009 * s-oscons-tmplt.c (NAME_MAX): Fix definition for Solaris
6010 (FILENAME_MAX): Remove unneeded definition.
6012 2014-07-18 Robert Dewar <dewar@adacore.com>
6014 * exp_attr.adb, debug.adb: Update comments.
6016 2014-07-18 Vincent Celier <celier@adacore.com>
6018 * par-ch4.adb (Simple_Expression): Add missing style check
6019 for binary adding operators.
6020 (Term): Add missing style check for multiplying operators.
6022 2014-07-18 Robert Dewar <dewar@adacore.com>
6024 * impunit.adb: Minor comment correction.
6025 * widechar.adb, s-wchcon.ads: Minor comment corrections.
6027 2014-07-18 Robert Dewar <dewar@adacore.com>
6029 * sem_ch13.adb (Build_Discrete_Static_Predicate): New name
6030 for Build_Static_Predicate (Build_Predicate_Functions):
6031 Don't try to build discrete predicate for real type.
6032 (Build_Predicate_Functions): Report attempt to use
6033 Static_Predicate function on real type as unimplemented.
6034 * sem_util.adb (Check_Expression_Against_Static_Predicate):
6035 Add guard to prevent blow up on predicate for real type.
6037 2014-07-18 Ed Schonberg <schonberg@adacore.com>
6039 * einfo.adb (Set_Static_Predicate): Simplify assertion to handle
6040 properly static predicate on enumeration types and modular types
6043 2014-07-18 Pierre-Marie Derodat <derodat@adacore.com>
6045 * scos.ads (SCO_Unit_Table_Entry): Add a field to keep track of
6046 the corresponding source file index.
6047 * get_scos.ads (Get_SCOs): Add a default value for it.
6048 * par_sco.adb (SCO_Record): Fill the corresponding value.
6051 2014-07-18 Vincent Celier <celier@adacore.com>
6053 * a-strunb-shared.adb, s-auxdec.ads, s-rannum.adb, atree.ads,
6054 urealp.adb, vms_data.ads, lib.ads, s-auxdec-vms_64.ads: Minor
6056 * gnat_ugn.texi: Add documentation for new gnatmem switch -t.
6058 2014-07-18 Thomas Quinot <quinot@adacore.com>
6060 * g-sercom.ads (Set): document possible data loss.
6062 2014-07-18 Ed Schonberg <schonberg@adacore.com>
6064 * exp_attr.adb (Expand_N_Attribute_Reference, cases Input,
6065 Output, Read, Write): If the restriction No_Streams is active,
6066 replace each occurrence of a stream attribute by an explicit
6069 2014-07-18 Robert Dewar <dewar@adacore.com>
6071 * par_sco.adb, a-reatim.ads, exp_attr.adb, sem_util.adb: Minor
6074 2014-07-18 Robert Dewar <dewar@adacore.com>
6076 * einfo.ads, einfo.adb (Has_Out_Or_In_Out_Parameter): New flag and
6078 (Set_Has_Out_Or_In_Out_Parameter): New procedure.
6079 * sem_ch6.adb (Set_Formal_Mode): Set Has_Out_Or_In_Out_Parameter flag.
6080 * sem_res.adb (Resolve_Call): Error if call of Ada 2012 function
6081 with OUT or IN OUT from earlier Ada mode (e.g. Ada 2005)
6083 2014-07-18 Robert Dewar <dewar@adacore.com>
6085 * bcheck.adb (Check_Consistent_Restrictions):
6086 Remove obsolete code checking for violation of
6087 No_Standard_Allocators_After_Elaboration (main program)
6088 * bindgen.adb (Gen_Adainit): Handle
6089 No_Standard_Allocators_After_Elaboration
6090 (Gen_Output_File_Ada): ditto.
6091 * exp_ch4.adb (Expand_N_Allocator): Handle
6092 No_Standard_Allocators_After_Elaboration.
6093 * Makefile.rtl: Add entry for s-elaall
6094 * rtsfind.ads: Add entry for Check_Standard_Allocator.
6095 * s-elaall.ads, s-elaall.adb: New files.
6096 * sem_ch4.adb (Analyze_Allocator): Handle
6097 No_Standard_Allocators_After_Elaboration.
6099 2014-07-18 Robert Dewar <dewar@adacore.com>
6101 * lib.adb, lib.ads, lib-writ.adb, lib-writ.ads, ali.adb,
6102 ali.ads, lib-load.adb: Remove Lib.Has_Allocator and all uses.
6103 Remove AB parameter from ali files and all uses.
6104 Remove Allocator_In_Body and all uses.
6106 2014-07-18 Robert Dewar <dewar@adacore.com>
6108 * g-expect-vms.adb: Add comment.
6110 2014-07-18 Thomas Quinot <quinot@adacore.com>
6112 * par_sco.adb (Is_Logical_Operation): return True for
6115 2014-07-18 Ed Schonberg <schonberg@adacore.com>
6117 * sem_attr.adb (Resolve_Attribute, case 'Update): Do full
6118 analysis and resolution of each choice in the associations within
6119 the argument of Update, because they may be variable names.
6121 2014-07-18 Hristian Kirtchev <kirtchev@adacore.com>
6123 * exp_attr.adb (Expand_Loop_Entry_Attribute): Insert any condition
6124 actions before the generated if statement.
6126 2014-07-18 Hristian Kirtchev <kirtchev@adacore.com>
6128 * gnat_ugn.texi Enhance the documentation of
6129 switches -gnateA and -gnateV.
6131 2014-07-18 Ed Schonberg <schonberg@adacore.com>
6133 * sem_util.adb (Build_Default_Subtype): Add missing condition
6134 so that code matches description: use the full view of the base
6135 only if the base is private and the subtype is not.
6137 2014-07-17 Gary Dismukes <dismukes@adacore.com>
6139 * exp_disp.adb: Minor reformatting.
6140 * exp_disp.adb: Minor code reorganization.
6142 2014-07-17 Thomas Quinot <quinot@adacore.com>
6144 * gnat_rm.texi, freeze.adb (Check_Component_Storage_Order): Do not
6145 require an explicit SSO attribute definition clause on a composite type
6146 just because one of its components has one.
6148 2014-07-17 Robert Dewar <dewar@adacore.com>
6150 * sem_attr.adb (Analyze_Attribute, case Loop_Entry): Rewrite
6151 attribute out of existence if the enclosing pragma is ignored.
6152 * sem_util.adb: Minor reformatting.
6154 2014-07-17 Ed Schonberg <schonberg@adacore.com>
6156 * exp_aggr.adb (Expand_Array_Aggregate): Handle properly an
6157 array aggregate expanded into assignments when it appears as a
6158 local declaration in an inlined body.
6160 2014-07-17 Doug Rupp <rupp@adacore.com>
6162 * init.c [__ANDROID__]: Modify for ZCX.
6163 * exp_aggr.adb: Minor reformatting
6164 * sigtramp-armvxw.c, sigtramp-ppcvxw.c: Update comments.
6166 2014-07-17 Robert Dewar <dewar@adacore.com>
6168 * a-strunb-shared.ads, a-stwiun-shared.ads, a-stzunb-shared.ads,
6169 exp_ch7.adb, g-pehage.ads, g-socket.ads, gnat_ugn.texi, gnat_ugx.texi,
6170 scng.adb: Remove incorrect usage "allow to" and "allows to".
6172 2014-07-17 Robert Dewar <dewar@adacore.com>
6174 * exp_dist.adb: Minor reformatting.
6176 2014-07-17 Bob Duff <duff@adacore.com>
6178 * gnat_ugn.texi: Improve documentation of Unrestricted_Access.
6180 2014-07-17 Robert Dewar <dewar@adacore.com>
6182 * sem_ch13.adb (Build_Invariant_Procedure): Add variable Nam
6183 (Add_Invariants): Set Nam to Name_Type_Invariant if from aspect.
6185 2014-07-17 Thomas Quinot <quinot@adacore.com>
6187 * exp_pakd.adb (Create_Packed_Array_Type.Install_PAT): For a
6188 non-bit-packed array, propagate Reverse_Storage_Order to the
6191 2014-07-17 Javier Miranda <miranda@adacore.com>
6193 * exp_disp.adb: Fix comment.
6194 * exp_pakd.adb: Minor reformatting.
6196 2014-07-17 Robert Dewar <dewar@adacore.com>
6198 * bindgen.adb (Gen_Elab_Calls): Skip reference to elab
6199 entity if none exists (Gen_Elab_Calls): Complain if clash with
6200 No_Multiple_Elaboration.
6201 * s-rident.ads, restrict.ads: Add restriction No_Multiple_Elaboration.
6202 * sem_util.adb (Build_Elaboration_Entity): Skip building entity
6204 * gnat_rm.texi: Document restriction No_Multiple_Elaboration.
6205 * sem_ch4.adb: Minor comment updates.
6207 2014-07-17 Ed Schonberg <schonberg@adacore.com>
6209 * exp_ch9.adb (Buid_Protected_Subprogram_Call): Preserve type
6210 of function call for later use when shared passive objects
6213 2014-07-17 Hristian Kirtchev <kirtchev@adacore.com>
6215 * par-ch13.adb (Get_Aspect_Specifications):
6216 Catch a case where the argument of SPARK aspect Refined_State
6217 is not properly parenthesized.
6219 2014-07-17 Hristian Kirtchev <kirtchev@adacore.com>
6221 * exp_ch6.adb (Expand_Ctrl_Function_Call): Do not extend
6222 the lifetime of a reference to an Ada 2012 container element.
6223 (Is_Element_Reference): New routine.
6225 2014-07-17 Robert Dewar <dewar@adacore.com>
6227 * ali.ads: Minor comment fix.
6228 * lib-writ.adb: Minor reformatting.
6230 2014-07-17 Ed Schonberg <schonberg@adacore.com>
6232 * sem_ch10.adb (Analyze_Proper_Body): When analyzing a subunit
6233 in ASIS mode, load another subunit only if it a subunit of the
6234 current one, not a sibling that has been reached through the
6235 analysis of an ancestor. This allows the construction of the
6236 ASIS tree for the subunit even when sibling subunits have errors.
6238 2014-07-17 Hristian Kirtchev <kirtchev@adacore.com>
6240 * sem_ch3.adb (Analyze_Declarations): Remove the guard which
6241 prevents the analysis of various contracts when the associated
6242 construct is erroneous.
6243 * sem_util.adb (Save_SPARK_Mode_And_Set): Do not query the
6244 SPARK_Pragma of an illegal or a partially decorated construct.
6246 2014-07-17 Robert Dewar <dewar@adacore.com>
6248 * s-imguns.ads: Minor reformatting.
6250 2014-07-17 Hristian Kirtchev <kirtchev@adacore.com>
6252 * exp_ch7.adb (Build_Finalization_Master): Move all local
6253 variables to the proper code section. When looking for an existing
6254 finalization master, inspect the ultimate ancestor type of the
6256 * sem_util.ads, sem_util.adb (Root_Type_Of_Full_View): New routine.
6258 2014-07-17 Robert Dewar <dewar@adacore.com>
6260 * aspects.ads, aspects.adb: Add entries for aspect Annotate.
6261 * gnat_rm.texi: Document Entity argument for pragma Annotate and
6263 * sem_ch13.adb (Analyze_Aspect_Specification): Add processing
6264 for Annotate aspect.
6265 * sem_prag.adb (Analyze_Pragma, case Annotate): Allow optional
6266 Entity argument at end.
6267 * sinfo.ads (N_Aspect_Specification): Add note on Annotate aspect.
6269 2014-07-17 Tristan Gingold <gingold@adacore.com>
6271 * s-imguns.ads: Fix minor typo.
6273 2014-07-17 Thomas Quinot <quinot@adacore.com>
6275 * sprint.adb: Minor reformatting.
6277 2014-07-17 Robert Dewar <dewar@adacore.com>
6279 * sprint.adb (Write_Itype): Print proper header for string
6282 2014-07-17 Steve Baird <baird@adacore.com>
6284 * sinfo.ads, sem_scil.ads: Improve comments, minor reformatting.
6286 2014-07-17 Vincent Celier <celier@adacore.com>
6288 * gnatbind.adb: Change in message "try ... for more information".
6290 2014-07-17 Robert Dewar <dewar@adacore.com>
6292 * sprint.adb: Code clean up.
6294 2014-07-17 Hristian Kirtchev <kirtchev@adacore.com>
6296 * exp_ch7.adb (Find_Last_Init): Relocate local variables to
6297 the relevant code section. Add new local constant Obj_Id. When
6298 a limited controlled object is initialized by a function call,
6299 the build-in-place object access function call acts as the last
6300 initialization statement.
6301 * exp_util.adb (Is_Object_Access_BIP_Func_Call): New routine.
6302 (Is_Secondary_Stack_BIP_Func_Call): Code reformatting.
6303 * exp_util.ads (Is_Object_Access_BIP_Func_Call): New routine.
6305 2014-07-17 Ed Schonberg <schonberg@adacore.com>
6307 * sem_ch8.adb (Analyze_Generic_Renaming): For generic subprograms,
6308 propagate intrinsic flag to renamed entity, to allow e.g. renaming
6309 of Unchecked_Conversion.
6310 * sem_ch3.adb (Analyze_Declarations): Do not analyze contracts
6311 if the declaration has errors.
6313 2014-07-17 Ed Schonberg <schonberg@adacore.com>
6315 * a-rbtgbk.adb: a-rbtgbk.adb (Generic_Insert_Post): Check whether
6316 container is busy before checking whether capacity allows for
6317 a further insertion. Insertion in a busy container that is full
6318 raises Program_Error rather than Capacity_Error. Previous to that
6319 patch which exception was raised varied among container types.
6321 2014-07-17 Robert Dewar <dewar@adacore.com>
6323 * g-comlin.ads, g-comlin.adb: Minor clean up.
6325 2014-07-17 Bob Duff <duff@adacore.com>
6327 * gnat_ugn.texi: Update gnatpp doc.
6329 2014-07-17 Robert Dewar <dewar@adacore.com>
6331 * gnat_rm.texi: Document new restriction No_Long_Long_Integers.
6332 * exp_ch4.adb (Make_Array_Comparison_Op): Add note that we
6333 could do this by actually expanding a real generic.
6334 * a-tags.ads: Add comments about performance.
6335 * sprint.adb (Sprint_Node_Actual, case N_Object_Declaration):
6336 Print Etype of defining identifier, rather than the object
6337 definition. More information.
6339 2014-07-17 Thomas Quinot <quinot@adacore.com>
6341 * exp_dist.adb: Minor documentation clarification.
6343 2014-07-17 Hristian Kirtchev <kirtchev@adacore.com>
6345 * exp_util.adb (Is_Aliased): Revert previous change.
6347 2014-07-17 Vincent Celier <celier@adacore.com>
6349 * g-comlin.adb (Try_Help): New procedure.
6350 (Getopt): Use new procedure Try_Help.
6351 * g-comlin.ads (Try_Help): New procedure.
6353 2014-07-17 Bob Duff <duff@adacore.com>
6355 * gnat_ugn.texi: Minor update.
6357 2014-07-17 Robert Dewar <dewar@adacore.com>
6359 * gnat_rm.texi: Improve documentation of Unrestricted_Access.
6360 * sinfo.ads: Document restriction on aggregates (must expand to
6361 assignments if one or more assignments needs expansion, e.g. for
6363 * sem_ch13.adb: All warning messages regarding bit order should
6365 * gnat_ugn.texi: Minor correction of missing @ on @code
6367 2014-07-17 Robert Dewar <dewar@adacore.com>
6369 * restrict.ads (Implementation_Restriction): Add No_Long_Long_Integer.
6370 * s-rident.ads (Partition_Boolean_Restrictions): Add
6371 No_Long_Long_Integer.
6372 * sem_ch3.adb (Modular_Type_Declaration): Size must be <=
6373 Long_Integer'Size if restriction No_Long_Long_Integer is active.
6374 (Signed_Integer_Type_Declaration): Do not allow Long_Long_Integer
6375 as the implicit base type for a signed integer type declaration
6376 if restriction No_Long_Long_Integer is active.
6377 * sem_util.ads, sem_util.adb (Set_Entity_With_Checks): Include check for
6378 No_Long_Long_Integer.
6380 2014-07-17 Robert Dewar <dewar@adacore.com>
6382 * sem_ch3.adb, a-ztexio.ads, exp_imgv.adb, casing.adb, casing.ads,
6383 einfo.ads, checks.adb, sem_ch12.adb, a-textio.ads, freeze.adb,
6384 repinfo.adb, exp_ch6.adb, sem_ch4.adb, a-witeio.ads, sem_ch8.adb,
6385 sem_warn.adb, exp_aggr.adb, exp_dist.adb, par-tchk.adb, s-fatgen.adb,
6386 treepr.adb, lib-xref.adb: Remove the word kludge from ada sources.
6388 2014-07-17 Robert Dewar <dewar@adacore.com>
6390 * debug.adb: Remove -gnatdQ.
6391 * exp_disp.adb: Remove -gnatdQ.
6392 * a-ztenio.ads, a-wtinio.ads, a-wtmoio.ads, a-ztcoau.ads, a-tiinio.ads,
6393 a-wtfiio.ads, a-timoio.ads, sem_ch12.adb, a-tifiio.ads, a-ztinio.ads,
6394 rtsfind.adb, rtsfind.ads, a-ztmoio.ads, a-wtdeio.ads, a-ztfiio.ads,
6395 a-tideio.ads, a-wtflio.ads, a-ztdeio.ads, sem_ch8.adb, a-tiflio.ads,
6396 sprint.adb, a-ztflio.ads, snames.ads-tmpl, a-wtenio.ads,
6397 a-tienio.ads: Rename Text_IO_Kludge to Text_IO_Special_Unit.
6399 2014-07-17 Robert Dewar <dewar@adacore.com>
6401 * back_end.adb: Minor reformatting and comment additions.
6402 * checks.ads, checks.adb (Duplicated_Tag_Checks_Suppressed): New
6404 * exp_disp.adb (Make_DT): Use Duplicated_Tag_Checks_Suppressed.
6405 (Make_VM_TSD): Use Duplicated_Tag_Checks_Suppressed.
6406 * gnat_rm.texi: Document new check Duplicated_Tag_Checks_Suppressed.
6407 * gnat_ugn.texi: Additional documentation for Duplicated_Tag_Check.
6408 * snames.ads-tmpl (Duplicated_Tag_Checks_Suppressed): New check.
6409 * types.ads (Duplicated_Tag_Checks_Suppressed): New check.
6411 2014-07-17 Robert Dewar <dewar@adacore.com>
6413 * gnat_rm.texi: Minor comment updates.
6415 2014-07-17 Ed Schonberg <schonberg@adacore.com>
6417 * sem_util.adb (Make_Explicit_Dereference): If the expression
6418 being dereferenced is a generalized indexing, reset the overloaded
6419 flag on the generalized indexing call, consistent with the
6420 resetting of the flag on the original indexed component.
6422 2014-07-17 Robert Dewar <dewar@adacore.com>
6424 * gnat_ugn.texi: Document advise not to mix -gnatV? and
6427 2014-07-17 Robert Dewar <dewar@adacore.com>
6429 * checks.adb (Insert_Valid_Check): Don't insist on a name
6430 for the prefix when we make calls to Force_Evaluation and
6431 Duplicate_Subexpr_No_Checks.
6432 * exp_util.adb (Is_Volatile_Reference): Handle all cases properly
6433 (Remove_Side_Effects): Handle all volatile references right
6434 (Side_Effect_Free): Volatile reference is never side effect free
6435 * sinfo.ads (N_Attribute_Reference): Add comments explaining
6436 that in the tree, the prefix can be a general expression.
6438 2014-07-17 Hristian Kirtchev <kirtchev@adacore.com>
6440 * sem_ch6.adb (Analyze_Subprogram_Body_Contract,
6441 Analyze_Subprogram_Contract): Add comments on SPARK_Mode save/restore.
6442 * sem_ch7.adb (Analyze_Package_Body_Contract,
6443 Analyze_Package_Contract): Add comments on SPARK_Mode save/restore.
6445 2014-07-17 Robert Dewar <dewar@adacore.com>
6447 * exp_ch7.ads, exp_util.ads: Document Insert_Action_After,
6448 Store_After_Actions_In_Scope.
6450 2014-07-17 Robert Dewar <dewar@adacore.com>
6452 * sem_aux.ads: Minor comment addition.
6454 2014-07-17 Ed Schonberg <schonberg@adacore.com>
6456 * sem_res.adb (Make_Call_Into_Operator): If the call is already
6457 a rewriting of an operator node, there are no actuals to be
6458 propagated from original node to rewritten node when in ASIS mode.
6460 2014-07-17 Hristian Kirtchev <kirtchev@adacore.com>
6462 * sem_ch6.adb (Analyze_Subprogram_Body_Contract,
6463 Analyze_Subprogram_Contract): Add new local variable Mode. Save
6464 and restore the SPARK mode of the related construct in a
6466 * sem_ch7.adb (Analyze_Package_Body_Contract,
6467 Analyze_Package_Contract): Add new local variable Mode. Save and
6468 restore the SPARK mode of the related construct in a stack-like fashion.
6469 * sem_util.adb Remove with and use clause for Opt.
6470 (Restore_SPARK_Mode): New routine.
6471 (Save_SPARK_Mode_And_Set): New routine.
6472 * sem_util.ads Add with and use clause for Opt.
6473 (Restore_SPARK_Mode): New routine.
6474 (Save_SPARK_Mode_And_Set): New routine.
6476 2014-07-17 Hristian Kirtchev <kirtchev@adacore.com>
6478 * exp_util.adb (Is_Aliased): Transient objects
6479 within an expression with actions cannot be considered aliased.
6481 2014-07-17 Thomas Quinot <quinot@adacore.com>
6483 * sem.ads (Scope_Stack_Entry): Reorganize storage of action lists;
6484 introduce a new list (cleanup actions) for each (transient) scope.
6485 * sinfo.ads, sinfo.adb (Cleanup_Actions): New attribute for
6487 * exp_ch7.ads (Store_Cleanup_Actions_In_Scope): New subprogram.
6488 * exp_ch7.adb (Store_Actions_In_Scope): New subprogram, common
6489 processing for Store_xxx_Actions_In_Scope.
6490 (Build_Cleanup_Statements): Allow for a list of additional
6491 cleanup statements to be passed by the caller.
6492 (Expand_Cleanup_Actions): Take custom cleanup actions associated
6493 with an N_Block_Statement into account.
6494 (Insert_Actions_In_Scope_Around): Account for Scope_Stack_Entry
6495 reorganization (refactoring only, no behaviour change).
6496 (Make_Transient_Block): Add assertion to ensure that the current
6497 scope is indeed a block (namely, the entity for the transient
6498 block being constructed syntactically, which has already been
6499 established as a scope). If cleanup actions are present in the
6500 transient scope, transfer them now to the transient block.
6501 * exp_ch6.adb (Expand_Protected_Subprogram_Call): Freeze the
6502 called function while it is still present as the name in a call
6503 in the tree. This may not be the case later on if the call is
6504 rewritten into a transient block.
6505 * exp_smem.adb (Add_Shared_Var_Lock_Procs): The post-actions
6506 inserted after calling a protected operation on a shared passive
6507 protected must be performed in a block finalizer, not just
6508 inserted in the tree, so that they are executed even in case of
6509 a normal (RETURN) or abnormal (exception) transfer of control
6510 outside of the current scope.
6511 * exp_smem.ads (Add_Shared_Var_Lock_Procs): Update documentation
6512 * sem_ch8.adb, expander.adb, exp_ch11.adb: Adjust for
6513 Scope_Stack_Entry reorganization.
6515 2014-07-17 Thomas Quinot <quinot@adacore.com>
6517 * exp_disp.adb (Make_DT, Make_VM_TSD): Do not omit Check_TSD
6518 call for types that do not have an explicit attribute definition
6519 clause for External_Tag, as their default tag may clash with an
6520 explicit tag defined for some other type.
6522 2014-07-17 Hristian Kirtchev <kirtchev@adacore.com>
6524 * exp_util.adb (Is_Controlled_Function_Call): Recognize a
6525 controlled function call with multiple actual parameters that
6526 appears in Object.Operation form.
6528 2014-07-17 Thomas Quinot <quinot@adacore.com>
6530 * einfo.ads, einfo.adb (Has_External_Tag_Rep_Clause): Remove
6532 * sem_ch13.adb (Analyze_Attribute_Definition_Clause, case
6533 External_Tag): No need to set entity flag.
6534 * sem_aux.ads, sem_aux.adb (Has_External_Tag_Rep_Clause):
6535 Reimplement correctly in terms of Has_Rep_Item.
6537 2014-07-17 Thomas Quinot <quinot@adacore.com>
6539 * exp_ch7.adb (Establish_Transient_Scope.Find_Node_To_Be_Wrapped):
6540 Start examining the tree at the node passed to
6541 Establish_Transient_Scope (not its parent).
6542 * exp_ch6.adb (Make_Build_In_Place_Call_In_Object_Declaration):
6543 The access type for the variable storing the reference to
6544 the call must be declared and frozen prior to establishing a
6546 * exp_ch9.adb: Minor reformatting.
6548 2014-07-17 Pascal Obry <obry@adacore.com>
6550 * s-os_lib.ads: Minor comment update.
6552 2014-07-17 Tristan Gingold <gingold@adacore.com>
6554 * sysdep.c: Add ATTRIBUTE_UNUSED to avoid warnings. Fix some
6556 * socket.c: Remove #warning to avoid warning.
6557 * expect.c: Indent some preprocessor directives to clarify
6558 nested if. Do not use wait.h on PikeOS. Add ATTRIBUTE_UNUSED
6560 * env.c: Fix indentation. Port to PikeOS.
6561 * gsocket.h: Port to PikeOS. Remove #warning.
6562 * terminals.c: Port to PikeOS. Fix indentation of the stubs.
6563 Add ATTRIBUTE_UNUSED to stubs arguments. Fix return statement
6564 of stubbed __gnat_setup_parent_communication.
6565 * adaint.c: Port to PikeOS. Reindent some preprocessor
6566 directives to clarify nested if. Fix indentation. Add missing
6569 2014-07-17 Robert Dewar <dewar@adacore.com>
6571 * sem_attr.adb: Minor reformatting.
6573 2014-07-17 Robert Dewar <dewar@adacore.com>
6575 * exp_ch7.adb, exp_ch7.ads, sinfo.ads: Minor reformatting.
6577 2014-07-17 Ed Schonberg <schonberg@adacore.com>
6579 * sem_case.adb (Check_Choice_Set): If the case expression is the
6580 expression in a predicate, do not recheck coverage against itself,
6581 to prevent spurious errors.
6582 * sem_ch13.adb (Check_Aspect_At_End_Of_Declarations): Indicate that
6583 expression comes from an aspect specification, to prevent spurious
6584 errors when expression is a case expression in a predicate.
6586 2014-07-17 Pascal Obry <obry@adacore.com>
6588 * adaint.c, adaint.h (__gnat_set_executable): Add mode parameter.
6589 * s-os_lib.ads, s-os_lib.adb (Set_Executable): Add Mode parameter.
6591 2014-07-17 Vincent Celier <celier@adacore.com>
6593 * gnatchop.adb, make.adb, gnatbind.adb, clean.adb, gprep.adb,
6594 gnatxref.adb, gnatls.adb, gnatfind.adb, gnatname.adb: Do not output
6595 the usage for an erroneous invocation of a gnat tool.
6597 2014-07-16 Vincent Celier <celier@adacore.com>
6599 * gnatls.adb: Get the target parameters only if -nostdinc was
6602 2014-07-16 Ed Schonberg <schonberg@adacore.com>
6604 * checks.adb (Insert_Valid_Check): If the expression is a packed
6605 component of a modular type of the right size the data is always
6606 valid. This os particularly useful if the component is part of
6607 a volatile variable.
6609 2014-07-16 Robert Dewar <dewar@adacore.com>
6611 * gnat_rm.texi, sinfo.ads, freeze.adb, exp_aggr.adb: Minor reformatting
6613 2014-07-16 Thomas Quinot <quinot@adacore.com>
6615 * exp_ch7.ads: Minor documentation fix.
6617 2014-07-16 Ed Schonberg <schonberg@adacore.com>
6619 * sem_ch3.adb (Find_Type_Name): Diagnose properly
6620 a private extension completion that is an interface definition
6621 with an interface list.
6623 2014-07-16 Arnaud Charlet <charlet@adacore.com>
6625 * gnatls.adb (Gnatls): Code clean ups.
6627 2014-07-16 Thomas Quinot <quinot@adacore.com>
6629 * sinfo.ads, sinfo.adb (N_Compound_Statement): New node kind.
6630 * sem.adb (Analyze): Handle N_Compound_Statement.
6631 * sprint.adb (Sprint_Node_Actual): Ditto.
6632 * sem_ch5.ads, sem_ch5.adb (Analyze_Compound_Statement): New
6633 procedure to handle N_Compound_Statement.
6634 * exp_aggr.adb (Collect_Initialization_Statements):
6635 Use a proper compound statement node, instead of a bogus
6636 expression-with-actions with a NULL statement as its expression,
6637 to wrap collected initialization statements.
6638 * freeze.ads, freeze.adb
6639 (Explode_Initialization_Compound_Statement): New public procedure,
6640 lifted from Freeze_Entity.
6641 (Freeze_Entity): When freezing
6642 an object with captured initialization statements and without
6643 delayed freezing, explode compount statement.
6644 * sem_ch4.adb (Analyze_Expression_With_Actions): Remove special
6645 case that used to handle bogus EWAs with NULL statement as
6647 * exp_ch13.adb (Expand_N_Freeze_Entity): For an object with
6648 delayed freezing and captured initialization statements, explode
6651 2014-07-16 Gary Dismukes <dismukes@adacore.com>
6653 * g-rewdat.adb, g-rewdat.ads: Minor reformatting.
6655 2014-07-16 Doug Rupp <rupp@adacore.com>
6657 * s-interr-hwint.adb: Casing error on parameter.
6659 2014-07-16 Pascal Obry <obry@adacore.com>
6661 * Makefile.rtl: Add g-rewdat.o dependencies in
6662 GNATRTL_NONTASKING_OBJS.
6664 2014-07-16 Ed Schonberg <schonberg@adacore.com>
6666 * sem_case.adb: Code clean up.
6668 2014-07-16 Vincent Celier <celier@adacore.com>
6670 * make.adb: Do not read gnat.adc when gnatmake is invoked
6673 2014-07-16 Pascal Obry <obry@adacore.com>
6675 * gnat_rm.texi, impunit.adb, g-rewdat.adb, g-rewdat.ads: Initial
6676 implementation of GNAT.Rewrite_Data.
6678 2014-07-16 Vincent Celier <celier@adacore.com>
6680 * gnatls.adb (Normalize): New function.
6681 (Gnatls): Get the target parameters. On targets other than VMS,
6682 normalize the path names in the source search path, the object search
6683 path and the project search path.
6685 2014-07-16 Ed Schonberg <schonberg@adacore.com>
6687 * sem_case.adb: Avoid self-checking of case expressions in
6690 2014-07-16 Robert Dewar <dewar@adacore.com>
6692 * gnat_rm.texi: Document effect of Suppress_Initialization on tags and
6695 2014-07-16 Eric Botcazou <ebotcazou@adacore.com>
6697 * switch-b.adb (Scan_Binder_Switches): Add missing guard.
6699 2014-07-16 Ben Brosgol <brosgol@adacore.com>
6701 * gnat_ugn.texi: Fix typo.
6703 2014-07-16 Ed Schonberg <schonberg@adacore.com>
6705 * exp_ch4.adb (Expand_N_Case_Expression): Do not expand case
6706 expression if it is the specification of a subtype predicate:
6707 it will be expanded when the return statement is analyzed, or
6708 when a static predicate is transformed into a static expression
6709 for evaluation by the front-end.
6710 * sem_ch13.adb (Get_RList): If the expression for a static
6711 predicate is a case expression, extract the alternatives of the
6712 branches with a True value to create the required statically
6713 evaluable expression.
6715 2014-07-16 Thomas Quinot <quinot@adacore.com>
6717 * exp_prag.adb (Expand_Pragma_Check): Use the location of the
6718 expression, not the location of the aspect, for all generated
6719 code, so that in particular the call to raise_assert_failure
6720 gets the sloc of the associated condition.
6722 (Expand_Subprogram_Contract.Build_Postconditions_Procedure):
6723 Set an explicit End_Label on the handled sequence of statements
6724 for the _Postconditions procedure so that the implicit return
6725 statement does not erroneously get associated with code generated
6726 for the last condition in postconditions.
6728 2014-07-16 Thomas Quinot <quinot@adacore.com>
6730 * ug_words: Fix name of VMS synonym for -gnatw.z (SIZE_ALIGNMENT,
6731 not SIZE_ALIGN) and -gnatw.Z (NOSIZE_ALIGNMENT, not NOSIZE_ALIGN).
6732 * vms_data.ads: Add missing spaces in VMS synonyms for -gnatw.z /
6735 2014-07-16 Robert Dewar <dewar@adacore.com>
6737 * sem_ch3.adb, sem_prag.adb, sem_util.adb, sem_res.adb, sem_ch13.adb:
6738 Minor code reorganization (use Is_Access_Type, not in Access_Kind).
6739 * exp_ch3.adb: Minor code reorganization, use Is_Access_Type,
6741 * par-ch4.adb (At_Start_Of_Attribute): New function
6742 (P_Simple_Expression): Better msg for bad attribute prefix.
6743 * scans.ads: Minor reformatting.
6745 2014-07-16 Ed Schonberg <schonberg@adacore.com>
6747 * sem_attr.adb (Resolve_Attribute, case 'Update): If choice is a
6748 static constant, check that in belongs to the corresponding index
6749 subtype, to produce the proer warning when expansion is disabled.
6751 2014-07-16 Robert Dewar <dewar@adacore.com>
6753 * freeze.adb (Freeze_Entity): Warn on incompatible size/alignment.
6754 * gnat_ugn.texi: Document -gnatw.z and -gnatw.Z.
6755 * ug_words: VMS synonyms (WARNINGS=[NO]SIZE_ALIGN) for -gnatw.z/-gnatw.Z
6756 * usage.adb: Add lines for -gnatw.z/-gnatw.Z.
6757 * vms_data.ads: VMS synonyms (WARNINGS=[NO]SIZE_ALIGN) for
6759 * warnsw.adb: Set Warn_On_Size_Alignment appropriately.
6760 * warnsw.ads (Warn_On_Size_Alignment): New flag Minor
6763 2014-07-16 Hristian Kirtchev <kirtchev@adacore.com>
6765 * exp_ch7.adb (Process_Declarations): Reinstate the check on
6766 a hook object to ensure that the related transient declaration
6768 * exp_util.adb (Is_Aliased): Do not consider expresison with
6769 actions as a special context.
6770 (Requires_Cleanup_Actions): Reinstate the check on a hook object to
6771 ensure that the related transient declaration is finalizable.
6773 2014-07-16 Robert Dewar <dewar@adacore.com>
6775 * checks.ads, checks.adb (Allocation_Checks_Suppressed): New function.
6776 * snames.ads-tmpl: Add Allocation_Check to list of check names.
6777 * types.ads: Add Allocation_Check to list of check names.
6779 2014-07-16 Thomas Quinot <quinot@adacore.com>
6781 * sem_util.adb (Enter_Name): replace bogus test for presence of
6782 Corresponding_Remote_Type with correct test on Ekind.
6783 * sem_res.adb (Valid_Conversion): ditto; also clarify validity
6784 of calls to Corresponding_ Remote_Type (documentation fix).
6786 2014-07-16 Robert Dewar <dewar@adacore.com>
6788 * gnat_rm.texi: Document illegal case of Unrestricted_Access.
6789 * sem_attr.adb (Analyze_Access_Attribute): Set_Non_Aliased_Prefix
6791 (Resolve_Attribute, case Access): Flag illegal Unrestricted_Access use.
6792 * sinfo.ads, sinfo.adb (Non_Aliased_Prefix): New flag.
6794 2014-07-16 Robert Dewar <dewar@adacore.com>
6796 * gnat_ugn.texi: Document binder switch -Ra.
6797 * gnatbind.adb (List_Closure_Display): Implement -Ra switch
6799 * opt.ads (List_Closure_All): New switch.
6800 * switch-b.adb (Scan_Binder_Switches): Recognize -Ra to set
6803 2014-07-16 Ben Brosgol <brosgol@adacore.com>
6805 * gnat_rm.texi: Minor edits, to make case consistent in names
6806 of types and fields.
6808 2014-07-16 Robert Dewar <dewar@adacore.com>
6810 * gnat_rm.texi: Document erroneous mixing of thin pointers and
6812 * gnat_ugn.texi: Add note on size of access types about thin
6813 pointers and the use of attribute Unrestricted_Access.
6815 2014-07-16 Ed Schonberg <schonberg@adacore.com>
6817 * a-cbdlli.ads, a-cbdlli.adb, a-cbhama.ads, a-cbhama.adb,
6818 * a-cbhase.ads, a-cbhase.adb, a-cborma.ads, a-cborma.adb,
6819 * a-cborse.ads, a-cborse.adb, a-cobove.ads a-cobove.adb: Add Control
6820 machinery to detect tampering on bounded vectors.
6822 2014-07-16 Robert Dewar <dewar@adacore.com>
6824 * gnat_rm.texi: Document that leading/trailing asterisks are
6825 now implied for the pattern match string for pragma Warnings
6826 and Warning_As_Error.
6827 * sem_prag.adb (Acquire_Warning_Match_String): New procedure.
6828 (Analyze_Pragma, case Warning_As_Error): Call
6829 Acquire_Warning_Match_String.
6830 (Analyze_Pragma, case Warnings): Call Acquire_Warning_Match_String.
6832 2014-07-16 Bob Duff <duff@adacore.com>
6834 * gnat_ugn.texi: Document need for project file
6835 for --incremental switch for gnat2xml.
6837 2014-07-16 Robert Dewar <dewar@adacore.com>
6839 * gnat_rm.texi: Fix example of non-packable components in packed
6842 2014-07-16 Robert Dewar <dewar@adacore.com>
6844 * s-tpoben.adb, s-tasren.adb, s-interr.adb, s-interr-hwint.adb,
6845 s-shasto.adb, s-interr-vms.adb, s-interr-sigaction.adb: Avoid use of
6846 upper case in exception messages.
6848 2014-07-16 Robert Dewar <dewar@adacore.com>
6850 * snames.ads-tmpl, sem_attr.adb, exp_attr.adb: Same_Storage attribute
6851 is renamed Has_Same_Storage.
6852 * gnat_rm.texi: Document missing SPARK pragmas and attributes.
6853 * sem_prag.adb: Minor comment fix (use LOCAL_NAME in syntax
6856 2014-07-16 Robert Dewar <dewar@adacore.com>
6858 * exp_util.adb, sem_attr.adb, exp_ch4.adb, a-cohase.ads,
6859 a-coinho-shared.adb, a-coinho-shared.ads: Minor reformatting.
6861 2014-07-16 Robert Dewar <dewar@adacore.com>
6863 * gnat_ugn.texi: Add note that integrated
6864 preprocessing cannot be applied to configuration pragma files.
6866 2014-07-16 Yannick Moy <moy@adacore.com>
6868 * sem_attr.adb (Analyze_Attribute/cases Pred
6869 and Succ): Always enable range check on fixed-point types if
6870 not suppressed for the type.
6872 2014-07-16 Hristian Kirtchev <kirtchev@adacore.com>
6874 * sem_util.adb (State_Has_Enabled_Property):
6875 Account for an external property denoted by an others choice.
6877 2014-07-16 Hristian Kirtchev <kirtchev@adacore.com>
6879 * exp_ch4.ads, exp_ch4.adb (Find_Hook_Context): Relocated to Exp_Util.
6880 * exp_ch7.adb (Process_Declarations): There is no need to check
6881 that a transient object being hooked is controlled as it would
6882 not have been hooked in the first place.
6883 * exp_ch9.adb Remove with and use clause for Exp_Ch4.
6884 * exp_util.adb (Find_Hook_Context): Relocated from Exp_Ch4.
6885 (Is_Aliased): A renaming of a transient controlled object is
6886 not considered aliasing when it occurs within an expression
6888 (Requires_Cleanup_Actions): There is no need to
6889 check that a transient object being hooked is controlled as it
6890 would not have been hooked in the first place.
6891 * exp_util.ads (Find_Hook_Context): Relocated from Exp_Ch4.
6893 2014-07-16 Hristian Kirtchev <kirtchev@adacore.com>
6895 * sem_ch13.adb (Insert_After_SPARK_Mode): Moved to
6896 the outer level of routine Analyze_Aspect_Specifications. Ensure
6897 that the corresponding pragmas of aspects Initial_Condition and
6898 Initializes are inserted after pragma SPARK_Mode.
6900 2014-07-16 Ed Schonberg <schonberg@adacore.com>
6902 * sem_attr.adb (Analyze_Attribute, case 'Update): Handle
6903 properly a choice list with more than one choice, where each
6904 is an aggregate denoting a sequence of array indices for a
6905 multidimentional array. For SPARK use.
6907 2014-07-16 Vadim Godunko <godunko@adacore.com>
6909 * a-coinho-shared.adb (Adjust): Create
6910 copy of internal shared object and element when source container
6913 (Query_Element): Likewise.
6914 (Update_Element): Likewise.
6915 (Constant_Reference): Likewise. Raise Constraint_Error on attempt
6916 to get reference for empty holder.
6917 (Reference): Likewise.
6919 2014-07-16 Thomas Quinot <quinot@adacore.com>
6921 * exp_ch4.adb (Find_Hook_Context): New subprogram, extracted
6922 from Process_Transient_Oject.
6923 * exp_ch4.ads: Ditto.
6924 * exp_ch9.adb (Build_Class_Wide_Master): Insert the _master
6925 declaration as an action on the topmost enclosing expression,
6926 not on a possibly conditional subexpreession.
6928 2014-07-16 Vadim Godunko <godunko@adacore.com>
6930 * a-coinho.adb, a-coinho-shared.adb, a-coinho.ads, a-coinho-shared.ads:
6931 Fix parameter mode of Update_Element.
6933 2014-07-16 Robert Dewar <dewar@adacore.com>
6935 * a-coinho.adb, a-coinho-shared.adb, a-coinho-shared.ads: Minor
6938 2014-07-16 Ed Schonberg <schonberg@adacore.com>
6940 * a-cohase.ads: Type Iterator must be controlled, so that the
6941 tampering bit is properly set through an iteration.
6942 * a-cohase.adb: Add Finalize operation for type Iterator.
6944 2014-07-16 Ed Schonberg <schonberg@adacore.com>
6946 * a-coinho-shared.adb, a-coinho-shared.ads: Proper structures for
6949 2014-07-16 Ed Schonberg <schonberg@adacore.com>
6951 * a-coinho-shared.adb: Fix spurious accessibility check.
6953 2014-06-15 Jan Hubicka <hubicka@ucw.cz>
6955 * gcc-interface/utils.c (process_attributes): Use set_decl_tls_model.
6957 2014-06-14 Bernd Edlinger <bernd.edlinger@hotmail.de>
6960 * gnat_rm.texi: Fix errors with makeinfo 5.1.
6962 2014-06-14 Arnaud Charlet <charlet@adacore.com>
6965 * gnat_rm.texi: Attempt to fix error with makeinfo 5.1.
6967 2014-06-13 Yannick Moy <moy@adacore.com>
6969 * exp_attr.adb: Fix typo in comment.
6970 * gnat1drv.adb (Adjust_Global_Switches): Force float overflow
6971 checking in GNATprove_Mode.
6973 2014-06-13 Ed Schonberg <schonberg@adacore.com>
6975 * a-coinho-shared.adb, a-coinho-shared.ads: Update shared version.
6977 2014-06-13 Robert Dewar <dewar@adacore.com>
6979 * sem_ch3.adb, sem_ch9.adb, a-coinho.adb, a-coinho.ads: Minor
6982 2014-06-13 Hristian Kirtchev <kirtchev@adacore.com>
6984 * sem_prag.adb (Analyze_Pragma): Add local
6985 variable Missing_Parentheses. Emit an error when a state
6986 declaration with options appears without parentheses. Add a
6987 guard to prevent a bogus error when a state declaration may be
6988 interpreted as an option if a previous declaration with options
6989 was not parenthesized.
6991 2014-06-13 Robert Dewar <dewar@adacore.com>
6993 * checks.adb: Validate_Alignment_Check_Warnings: New procedure
6994 (Apply_Address_Clause_Check): Make Aligment_Warnings table entry.
6995 * checks.ads (Alignment_Warnings_Record): New type.
6996 (Alignment_Warnings): New table
6997 (Validate_Alignment_Check_Warnings): New procedure.
6998 * errout.adb (Delete_Warning_And_Continuations): New procedure
6999 (Error_Msg_Internal): Set Warning_Msg (Delete_Warning): Handle
7000 Warnings_Treated_As_Errors (Finalize): Minor reformatting
7001 * errout.ads (Warning_Msg): New variable
7002 (Delete_Warning_And_Continuations): New procedure
7003 * erroutc.adb (Delete_Msg): Handle Warnings_Treated_As_Errors count.
7004 * gnat1drv.adb (Post_Compilation_Validation_Checks): New procedure.
7006 2014-06-13 Ed Schonberg <schonberg@adacore.com>
7008 * a-coinho.adb, a-coinho.ads: Add Reference machinery.
7010 2014-06-13 Hristian Kirtchev <kirtchev@adacore.com>
7012 * errout.adb (SPARK_Msg_N): New routine.
7013 (SPARK_Msg_NE): New routine.
7014 * errout.ads Add a section on SPARK-related error routines.
7015 (SPARK_Msg_N): New routine.
7016 (SPARK_Msg_NE): New routine.
7017 * sem_ch13.adb (Analyze_Aspect_Specifications): Ensure that
7018 pragma Abstract_State is always inserted after SPARK_Mode.
7019 (Insert_After_SPARK_Mode): New routine.
7020 * sem_prag.adb (Analyze_Abstract_State,
7021 Analyze_Constituent, Analyze_External_Property,
7022 Analyze_External_Property_In_Decl_Part, Analyze_Global_Item,
7023 Analyze_Global_List, Analyze_Initialization_Item,
7024 Analyze_Initialization_Item_With_Inputs, Analyze_Input_Item,
7025 Analyze_Input_List, Analyze_Input_Output, Analyze_Part_Of,
7026 Analyze_Pragma, Analyze_Refined_Depends_In_Decl_Part,
7027 Analyze_Refined_Global_In_Decl_Part,
7028 Analyze_Refined_State_In_Decl_Part, Analyze_Refinement_Clause,
7029 Check_Aspect_Specification_Order, Check_Constituent_Usage,
7030 Check_Declaration_Order, Check_Dependency_Clause,
7031 Check_Duplicate_Mode, Check_Duplicate_Option,
7032 Check_Duplicate_Property, Check_External_Properties,
7033 Check_External_Property, Check_Function_Return,
7034 Check_Matching_Constituent, Check_Matching_State,
7035 Check_Mode_Restriction_In_Enclosing_Context,
7036 Check_Mode_Restriction_In_Function, Check_Refined_Global_Item,
7037 Check_State_And_Constituent_Use, Create_Or_Modify_Clause,
7038 Has_Extra_Parentheses, Inconsistent_Mode_Error,
7039 Match_Error, Propagate_Part_Of, Report_Extra_Clauses,
7040 Report_Extra_Constituents_In_List, Report_Extra_Inputs,
7041 Report_Unrefined_States, Report_Unused_Constituents,
7042 Report_Unused_States, Role_Error, Usage_Error):
7043 Convert Error_Msg_XXX calls to SPARK_Msg_XXX calls
7044 to report semantic errors only when SPARK_Mode is on.
7045 (Analyze_Depends_In_Decl_Part): Do not check the syntax of
7046 pragma Depends explicitly, this is now done by the analysis.
7047 (Analyze_Global_In_Decl_List): Do not check the syntax of
7048 pragma Global explicitly, this is now done by the analysis.
7049 (Analyze_Initializes_In_Decl_Part): Do not check the syntax of
7050 pragma Initializes explicitly, this is now done by the analysis.
7051 (Analyze_Part_Of): Do not check the syntax of the encapsulating
7052 state, this is now done by the analysis.
7053 (Analyze_Pragma): Do
7054 not check the syntax of a state declaration, this is now done
7056 (Analyze_Refined_Depends_In_Decl_Part): Do not
7057 check the syntax of pragma Refined_Depends explicitly, this is now
7058 done by the analysis.
7059 (Analyze_Refined_Global_In_Decl_Part): Do
7060 not check the syntax of pragma Refined_Global explicitly, this is
7061 now done by the analysis.
7062 (Analyze_Refined_State_In_Decl_Part):
7063 Do not check the syntax of pragma Refined_State explicitly, this
7064 is now done by the analysis.
7065 (Check_Dependence_List_Syntax): Removed.
7066 (Check_Global_List_Syntax): Removed.
7067 (Check_Initialization_List_Syntax): Removed.
7068 (Check_Item_Syntax): Removed.
7069 (Check_Missing_Part_Of): Do not consider items from an instance.
7070 (Check_Refinement_List_Syntax): Removed.
7071 (Check_State_Declaration_Syntax): Removed.
7072 (Collect_Global_List): Do not raise Program_Error when the input is
7074 (Process_Global_List): Do not raise Program_Error when the input
7076 * sem_ch13.adb: Minor reformatting.
7078 2014-06-13 Ed Schonberg <schonberg@adacore.com>
7080 * sem_ch3.adb (Find_Type_Name): Diagnose a private type completion
7081 that is an interface definition with an interface list.
7082 (Process_Full_View): Move error message on missmatched interfaces
7083 between views to the declaration of full view, for clarity.
7084 * sem_ch9.adb (Check_Interfaces): Move error message to full view,
7087 2014-06-13 Robert Dewar <dewar@adacore.com>
7089 * exp_attr.adb (Expand_N_Attribute_Reference, case Pred/Succ): Change
7092 2014-06-13 Robert Dewar <dewar@adacore.com>
7094 * makeutl.adb: Minor reformatting.
7096 2014-06-13 Gail Schenker <schenker@adacore.com>
7098 * debug.adb, sem_eval.adb (Why_Not_Static): Remove temporary code and
7099 associated flag (d.z), no longer needed.
7101 2014-06-13 Ed Schonberg <schonberg@adacore.com>
7103 * sem_ch13.adb (Analyze_Aspect_Specifications): For Import and
7104 Export aspects, do not check whether a corresponding Convention
7105 aspect has been specified. Convention is optional in Ada2012,
7106 and defaults to Convention_Ada.
7108 2014-06-13 Eric Botcazou <ebotcazou@adacore.com>
7110 * checks.adb (Apply_Address_Clause_Check): Only issue the new
7111 warning if the propagation warning is issued.
7113 2014-06-13 Thomas Quinot <quinot@adacore.com>
7115 * exp_ch4.adb: Minor reformatting.
7117 2014-06-13 Robert Dewar <dewar@adacore.com>
7119 * exp_attr.adb (Expand_N_Attribute_Reference, case Pred):
7120 Handle float range check case (Expand_N_Attribute_Reference,
7121 case Succ): Handle float range check case.
7122 * sem_attr.adb (Analyze_Attribute, case Pred/Succ): Handle float
7125 2014-06-13 Vincent Celier <celier@adacore.com>
7127 * makeutl.ads (Compute_Builder_Switches): Change name of
7128 parameter Root_Environment to Env.
7129 * prj-conf.adb (Check_Switches): Call Locate_Runtime with the
7130 Env parameter of procedure Get_Or_Create_Configuration_File.
7131 (Locate_Runtime): Call Find_Rts_In_Path with the Project_Path
7132 of new parameter Env.
7133 * prj-conf.ads (Locate_Runtime): New parameter Env of type
7134 Prj.Tree.Environment.
7136 2014-06-13 Robert Dewar <dewar@adacore.com>
7138 * gnat_rm.texi: Minor comment clarification for Check_Float_Overflow.
7140 2014-06-13 Robert Dewar <dewar@adacore.com>
7142 * exp_attr.adb, exp_ch9.adb, lib-writ.adb, g-comlin.adb: Minor
7144 * sem_attr.adb: Minor code reformatting and simplification.
7145 * checks.adb: Fix minor typo.
7147 2014-06-13 Emmanuel Briot <briot@adacore.com>
7149 * g-comlin.adb (Get_Argument): fix expansion
7150 of command line arguments (e.g. "*.adb") when using a custom
7151 parser. The parser was not passed to the recursive call, and
7152 thus we were trying to do the expansion on the default command
7155 2014-06-13 Thomas Quinot <quinot@adacore.com>
7157 * exp_ch9.adb: Minor reformatting.
7159 2014-06-13 Ed Schonberg <schonberg@adacore.com>
7161 * exp_attr.adb (Expand_N_Attribute_Reference, case 'Old):
7162 To determine whether the attribute should be expanded, examine
7163 whether the enclosing postcondition pragma is to be checked,
7164 rather than using the internal flag Assertions_Enabled.
7166 2014-06-13 Ben Brosgol <brosgol@adacore.com>
7168 * gnat_rm.texi: Minor fixes.
7169 * gnat_ugn.texi: Added a missing "@itemize".
7171 2014-06-13 Robert Dewar <dewar@adacore.com>
7173 * debug.adb: Remove -gnatd.1 flag documentation.
7174 * layout.adb (Layout_Type): Remove special handling of size
7175 for anonymous access type.
7176 * sem_ch3.adb (Replace_Type): Remove special handling of size
7177 for anonymous access type.
7179 2014-06-13 Robert Dewar <dewar@adacore.com>
7181 * debug.adb: Document debug flag -gnatd.1.
7182 * layout.adb (Layout_Type): Size change for anonymous access
7183 types under -gnatd.1.
7184 * sem_ch3.adb (Replace_Type): Size change for anonymous access
7185 types under -gnatd.1.
7187 2014-06-13 Robert Dewar <dewar@adacore.com>
7189 * layout.adb (Layout_Type): Anonymous access types designating
7190 unconstrained arrays are always thin pointers.
7191 * sem_ch3.adb (Replace_Type): Anonymous access types designating
7192 unconstrained arrays are always thin pointers.
7194 2014-06-13 Ed Schonberg <schonberg@adacore.com>
7196 * sem_attr.adb (Analyze_Attribute): Use Check_Parameterless_Call
7197 to resolve the prefix of an attribute that is an entity name
7198 and may be a parameterless call. Minor code reorganization.
7200 2014-06-13 Robert Dewar <dewar@adacore.com>
7202 * lib.ads, lib.adb, lib-writ.adb, lib-load.adb (Is_Compiler_Unit):
7204 * opt.ads (Compiler_Unit): New flag.
7205 * par-ch5.adb (Test_Statement_Required): Call Check_Compiler_Unit
7206 for null statement sequence (not allowed in compiler unit).
7207 * par-prag.adb (Prag): Handle Compiler_Unit[_Warning] during
7209 * restrict.ads, restrict.adb (Check_Compiler_Unit): New version and new
7211 * sem_ch11.adb, sem_ch3.adb, sem_ch4.adb: New calling sequence for
7212 Check_Compiler_Unit.
7213 * sem_ch6.adb (Analyze_Extended_Return_Statement): Call
7214 Check_Compiler_Unit (this construct is not allowed in compiler
7216 * sem_prag.adb (Analyze_Pragma, case Compiler_Unit[_Warning]):
7217 Set Opt.Compiler_Unit.
7219 2014-06-13 Geert Bosch <bosch@adacore.com>
7221 * gnat_rm.texi, s-tasinf-solaris.ads, sem_prag.adb, gnat_ugn.texi,
7222 s-tasinf-mingw.ads, s-tasinf.ads, s-tasinf-linux.ads,
7223 s-tasinf-vxworks.ads: Make Task_Info pragma and package obsolescent.
7225 2014-06-13 Robert Dewar <dewar@adacore.com>
7227 * s-tasini.adb, s-tarest.adb, s-taprob.adb: Minor reformatting.
7229 2014-06-13 Hristian Kirtchev <kirtchev@adacore.com>
7231 * freeze.adb (Freeze_Entity): Remove the check concerning volatile
7232 types in SPARK as it is poorly placed and poorly formulated. The
7233 check was flagging ALL volatile entities as illegal in SPARK.
7234 * sem_prag.adb (Process_Atomic_Shared_Volatile): Flag volatile
7235 types as illegal in SPARK.
7237 2014-06-13 Robert Dewar <dewar@adacore.com>
7239 * sem_cat.adb: Minor reformatting.
7241 2014-06-13 Yannick Moy <moy@adacore.com>
7243 * sem_prag.adb (Analyze_Pragma/Post_Class): Fix typo.
7245 2014-06-13 Arnaud Charlet <charlet@adacore.com>
7247 * gnat_rm.texi: Add detail on SPARK_05 restriction.
7249 2014-06-13 Bob Duff <duff@adacore.com>
7251 * s-solita.adb (Get_Sec_Stack_Addr, Init_Tasking_Soft_Links):
7252 Add assertions requiring the secondary stack to be initialized.
7253 * s-solita.ads (Init_Tasking_Soft_Links): Comment.
7254 * s-taprob.adb, s-tarest.adb, s-tasini.adb (elab code): Make sure the
7255 secondary stack is initialized before calling Init_Tasking_Soft_Links,
7256 by adding pragmas Elaborate_Body.
7258 2014-06-13 Thomas Quinot <quinot@adacore.com>
7260 * sem_ch13.adb (Analyze_Stream_TSS_Definition): Remove temporary
7261 kludge disabling new legality check.
7263 2014-06-13 Hristian Kirtchev <kirtchev@adacore.com>
7265 * freeze.adb (Freeze_Record_Type): Remove checks related to SPARK
7267 (Freeze_Type): Volatile types are now illegal in SPARK.
7269 2014-06-13 Robert Dewar <dewar@adacore.com>
7271 * aspects.ads, aspects.adb: Add aspect Thread_Local_Storage.
7272 * gnat_rm.texi: Document aspect Thread_Local_Storage.
7274 2014-06-13 Ed Schonberg <schonberg@adacore.com>
7276 * sem_cat.adb (Validate_Static_Object_Name): A constant whose
7277 value is a temporary that renames an aggregate is legal in a
7278 preelaborated unit. Illegalities, if any will be detected in
7279 the aggregate components.
7281 2014-06-13 Ed Schonberg <schonberg@adacore.com>
7283 * einfo.ads: Minor reformatting an comment expansion.
7285 2014-06-13 Robert Dewar <dewar@adacore.com>
7287 * back_end.ads, back_end.adb: Make_Id, Make_SC, Set_RND are moved to
7289 * tbuild.ads, tbuild.adb: Make_Id, Make_SC, Set_RND are moved here from
7291 * gnat1drv.adb: Make_Id, Make_SC, Set_RND are moved to Tbuild
7292 * sem_warn.adb: Minor reformatting.
7294 2014-06-13 Doug Rupp <rupp@adacore.com>
7296 * adaint.c (__gnat_open_new_temp) [VMS]: Open binary
7299 2014-06-13 Yannick Moy <moy@adacore.com>
7301 * sem_warn.adb (Check_Unset_References): Take
7302 case of Refined_Post into account in Within_Postcondition check.
7304 2014-06-13 Hristian Kirtchev <kirtchev@adacore.com>
7306 * freeze.adb (Freeze_Record_Type): Volatile types are not allowed in
7309 2014-06-13 Yannick Moy <moy@adacore.com>
7311 * sem_ch13.adb (Analyze_Aspect_Specifications/Aspect_Import,
7312 Aspect_Export): Consider that variables may be set outside the program.
7314 2014-06-13 Robert Dewar <dewar@adacore.com>
7316 * back_end.adb (Make_Id): New function.
7317 (Make_SC): New function.
7318 (Set_RND): New procedure.
7319 * back_end.ads (Make_Id): New function.
7320 (Make_SC): New function.
7321 (Set_RND): New procedure.
7322 * einfo.ads: Minor comment updates.
7323 * frontend.adb: Move Atree.Initialize call to Gnat1drv.
7324 * gnat1drv.adb (Gnat1drv): New calling sequence for
7325 Get_Target_Parameters.
7326 (Gnat1drv): Move Atree.Initialize here from Frontend.
7327 * targparm.adb (Get_Target_Parameters): New calling
7328 sequence (Get_Target_Parameters): Handle pragma Restriction
7330 * targparm.ads (Get_Target_Parameters): New calling sequence.
7332 2014-06-13 Gary Dismukes <dismukes@adacore.com>
7334 * sem_prag.adb (Process_Import_Or_Interface): Exit the homonym
7335 loop if the pragma does not come from source, so that an implicit
7336 pragma Import only applies to the first declaration, avoiding
7337 possible conflicts with earlier explicit and implicit declarations
7338 due to multiple Provide_Shift_Operators pragmas.
7339 (Set_Imported): Remove previous fix that bypassed pragma duplication
7341 * gnat_rm.texi: Change 'equivalent' to 'similar' in description
7342 of Provide_Shift_Operators.
7344 2014-06-12 Jan Hubicka <hubicka@ucw.cz>
7346 * gcc-interface/utils.c (process_attributes) <ATTR_LINK_SECTION>: Pass
7347 string pointer directly to set_decl_section_name.
7349 2014-06-11 Robert Dewar <dewar@adacore.com>
7351 * sem_ch13.adb: Minor reformatting.
7353 2014-06-11 Hristian Kirtchev <kirtchev@adacore.com>
7355 * sem_prag.adb (Check_Clause_Syntax): Add new
7356 local variable Outputs. Account for the case where multiple
7357 output items appear as an aggregate.
7359 2014-06-11 Robert Dewar <dewar@adacore.com>
7361 * sem_warn.adb (Output_Obsolescent_Entity_Warnings): Tag warning
7364 2014-06-11 Ed Schonberg <schonberg@adacore.com>
7366 * einfo.ads: Minor reformatting.
7368 2014-06-11 Hristian Kirtchev <kirtchev@adacore.com>
7370 * a-cbdlli.adb, a-cdlili.adb, a-cidlli.adb, a-crdlli.adb (Insert): Add
7371 new variable First_Node. Update the position after all insertions have
7372 taken place to First_Node.
7374 2014-06-11 Robert Dewar <dewar@adacore.com>
7376 * debug.adb: Remove debug flag -gnatd.1, no longer needed.
7377 * layout.adb (Layout_Type): Remove test of -gnatd.1.
7379 2014-06-11 Robert Dewar <dewar@adacore.com>
7381 * sem_ch13.adb: Minor reformatting.
7383 2014-06-11 Hristian Kirtchev <kirtchev@adacore.com>
7385 * sem_prag.adb (Check_Clause_Syntax): Add new
7386 local variable Outputs. Account for the case where multiple
7387 output items appear as an aggregate.
7389 2014-06-11 Robert Dewar <dewar@adacore.com>
7391 * sem_warn.adb (Output_Obsolescent_Entity_Warnings): Tag warning
7394 2014-06-11 Ed Schonberg <schonberg@adacore.com>
7396 * einfo.ads: Minor reformatting.
7398 2014-06-11 Hristian Kirtchev <kirtchev@adacore.com>
7400 * a-cbdlli.adb, a-cdlili.adb, a-cidlli.adb, a-crdlli.adb (Insert): Add
7401 new variable First_Node. Update the position after all insertions have
7402 taken place to First_Node.
7404 2014-06-11 Robert Dewar <dewar@adacore.com>
7406 * debug.adb: Remove debug flag -gnatd.1, no longer needed.
7407 * layout.adb (Layout_Type): Remove test of -gnatd.1.
7409 2014-06-11 Thomas Quinot <quinot@adacore.com>
7411 * freeze.ads: Minor reformatting.
7412 * checks.adb (Determine_Range): Do not attempt to determine
7413 the range of a deferred constant whose full view has not been
7415 * sem_res.adb (Resolve): Remove undesirable guard against
7416 resolving expressions from expression functions.
7418 2014-06-11 Robert Dewar <dewar@adacore.com>
7420 * debug.adb (Debug_Flag_Dot_1): Set to enable fix for anonymous
7422 * layout.adb (Layout_Type): Make anonymous access types for
7423 subprogram formal types and return types always thin. For now
7424 only enabled if -gnatd.1 set.
7426 2014-06-11 Ed Schonberg <schonberg@adacore.com>
7428 * sem_ch13.adb (Analyze_Stream_TSS_Definition): Apply legality
7429 rule for stream attributes of interface types (RM 13.13.2 (38/3)):
7430 subprogram must be a null procedure.
7432 2014-06-11 Hristian Kirtchev <kirtchev@adacore.com>
7434 * sem_prag.adb (Analyze_Input_Item): Allow formal
7435 parameters to appear as input_items in an initialization_list
7436 of pragma Initializes. Encapsulation now applies to states and
7437 variables only (as it should). Add RM references to key errors.
7438 * sem_prag.adb (Set_Imported): Suppress errors
7439 about preceding Imports when the pragma does not come from source,
7440 which can happen through use of pragma Provide_Shift_Operators.
7442 2014-06-11 Thomas Quinot <quinot@adacore.com>
7444 * sem_ch3.adb: Minor reformatting.
7445 * einfo.ads (Full_View): Minor comment update.
7447 2014-06-11 Robert Dewar <dewar@adacore.com>
7449 * einfo.adb (Is_Independent): New flag.
7450 * einfo.ads (Is_Independent): New flag.
7451 (Has_Independent_Components): Clean up and fix comments.
7452 * sem_prag.adb (Fix_Error): Deal with changing argument
7453 [of] to entity [for].
7454 (Analyze_Pragma, case Independent): Set Is_Independent flag
7455 (Analyze_Pragma, case Independent_Components): Set Is_Independent flag
7456 in all components of specified record.
7458 2014-06-11 Thomas Quinot <quinot@adacore.com>
7460 * sem_ch12.adb (Analyze_Formal_Decimal_Fixed_Point_Type):
7461 Set proper Etype on bounds of dummy type created for analysis
7464 2014-06-11 Robert Dewar <dewar@adacore.com>
7466 * debug.adb: Minor comment fix (add missing section of dot
7469 2014-06-11 Robert Dewar <dewar@adacore.com>
7471 * gnat_rm.texi, switch-c.adb, sem_prag.adb, a-tgdico.ads, par-prag.adb,
7472 opt.ads, a-finali.ads, snames.ads-tmpl: Remove all traces of
7473 pragma/aspects Pure_05 Pure_12 Preelaborate_05.
7474 * errout.adb (Output_Messages): Avoid duplicate output for
7475 library level instance.
7476 * sem_elab.adb (Is_Call_Of_Generic_Formal): Moved to outer level
7477 (Check_Elab_Call): Add call to Is_Call_Of_Generic_Formal
7478 * exp_ch4.adb (Expand_N_Op_Expon): New interface for Exp_Modular.
7479 * s-expmod.ads, s-expmod.adb (Exp_Modular): Change interface to
7480 accomodate largest modulus value.
7481 * gnat_ugn.texi: Minor updates.
7483 2014-06-11 Ed Schonberg <schonberg@adacore.com>
7485 * sem_ch12.adb (Instantiate_Package_Body): Do not attempt to
7486 load body of generic package or its parent, if body is optional
7487 and the unit does not require a body.
7489 2014-06-11 Robert Dewar <dewar@adacore.com>
7491 * gnat_rm.texi: Document System.Unsigned_Types.
7492 * impunit.adb: System.Unsigned_Types (s-unstyp.ads) is user accessible.
7493 * s-unstyp.ads: Update comments (this is now user available unit).
7495 2014-06-11 Robert Dewar <dewar@adacore.com>
7497 * make.adb, sem_res.adb: Minor reformatting.
7499 2014-06-11 Thomas Quinot <quinot@adacore.com>
7501 * a-astaco.ads, a-tags.ads, s-excdeb.ads, a-tgdico.ads, a-stmaco.ads,
7502 a-except-2005.ads, s-except.ads, a-taside.ads, a-dynpri.ads,
7503 a-chahan.ads, a-sytaco.ads, s-stalib.ads, a-strmap.ads: Change pragmas
7504 Preelaborate_05 to just Preelaborate in runtime units, and similarly
7505 change Pure_05 to just Pure.
7507 2014-06-11 Ed Schonberg <schonberg@adacore.com>
7509 * sem_ch6.adb (Analyze_Subprogram_Body_Contract): Do not attempt
7510 analysis if error has been posted on subprogram body.
7512 2014-06-11 Ed Schonberg <schonberg@adacore.com>
7514 * sem_ch13.adb (Analyze_Stream_TSS_Definition): Apply legality
7515 rule given in RM 13.1 (8/1) for operational attributes to stream
7516 attributes: the attribute must apply to a first subtype. Fixes
7517 missing errors in ACATS test bdd2004.
7519 2014-06-11 Robert Dewar <dewar@adacore.com>
7521 * exp_ch3.adb (Build_Record_Init_Proc): Don't build for variant
7522 record type if restriction No_Implicit_Conditionals is active.
7523 (Expand_N_Object_Declaration): Don't allow default initialization
7524 for variant record type if restriction No_Implicit_Condition is active.
7525 (Build_Variant_Record_Equality): Don't build for variant
7526 record type if restriction No_Implicit_Conditionals is active.
7527 * exp_ch4.adb (Expand_N_Op_Eq): Error if variant records with
7528 No_Implicit_Conditionals.
7529 * sem_aux.ads, sem_aux.adb (Has_Variant_Part): New function.
7531 2014-06-11 Ramon Fernandez <fernandez@adacore.com>
7533 * i-cstrin.ads: Update comments.
7535 2014-06-11 Ed Schonberg <schonberg@adacore.com>
7537 * sem_res.adb (Resolve_Selected_Component): Handle properly a
7538 selected component whose prefix is overloaded, when none of the
7539 interpretations matches the expected type.
7541 2014-06-11 Bob Duff <duff@adacore.com>
7543 * make.adb (Wait_For_Available_Slot): Give a more
7544 informative error message; if the ALI file is not found, print
7545 the full path of what it's looking for.
7547 2014-06-11 Sergey Rybin <rybin@adacore.com frybin>
7549 * gnat_ugn.texi, vms_data.ads: add description of gnatstub -W<par>
7550 option to specify the result file encoding.
7552 2014-06-11 Robert Dewar <dewar@adacore.com>
7554 * errout.ads, sem_ch12.adb: Minor reformatting.
7555 * debug.adb, erroutc.adb: Remove -gnatd.q debug switch.
7556 * lib-xref.adb: Minor reformatting.
7557 * restrict.adb: Minor code reorganization (put routines in
7560 2014-06-11 Yannick Moy <moy@adacore.com>
7562 * einfo.ads: Minor typo in comment
7564 2014-06-11 Ed Schonberg <schonberg@adacore.com>
7566 * sinfo.ads, sinfo.adb: New attribute Uninitialized_Variable, for
7567 formal private types and private type extensions, to indicate
7568 variable in a generic unit whose uninitialized use suggest that
7569 actual type should be fully initialized.
7570 Needs_Initialized_Actual: removed, functionaity replaced by
7572 * lib-xref.adb (Generate_Reference): Generate a reference for
7573 variables of a formal type when the unit is not the main unit,
7574 to enable appropriate warnings in an instance.
7575 * sem_ch12.adb (Check_Ininialized_Type): Improve warning on use
7576 of variable in a generic unit that suggests that actual type
7577 should be full initialized.
7578 * sem_warn.adb; (May_Need_Initialized_Actual): Make into procedure
7579 and do not emot warning, which now only appears in an instance.
7581 2014-06-11 Eric Botcazou <ebotcazou@adacore.com>
7583 * gnat_ugn.texi: Fix minor typo.
7585 2014-06-11 Hristian Kirtchev <kirtchev@adacore.com>
7587 * sem_ch3.adb Add with and use clause for Sem_Ch10.
7588 (Analyze_Declarations): Code reformatting. Analyze the contract
7589 of a subprogram body stub at the end of the declarative region.
7590 * sem_ch6.adb (Analyze_Subprogram_Body_Contract): Spec_Id is
7591 now a variable. Do not process the body if its contract is not
7592 available. Account for subprogram body stubs when extracting
7593 the corresponding spec.
7594 * sem_ch6.ads (Analyze_Subprogram_Contract): Update the comment
7596 * sem_ch10.ads, sem_ch10.adb (Analyze_Subprogram_Body_Stub_Contract):
7598 * sem_prag.adb (Analyze_Depends_In_Decl_Part):
7599 Account for subprogram body stubs when extracting the
7601 (Analyze_Global_In_Decl_List):
7602 Account for subprogram body stubs when extracting the
7604 (Analyze_Refined_Depends_In_Decl_Part):
7605 Use Find_Related_Subprogram_Or_Body to retrieve the declaration
7606 of the related body. Spec_Is now a variable. Account for
7607 subprogram body stubs when extracting the corresponding spec.
7608 (Analyze_Refined_Global_In_Decl_Part): Use
7609 Find_Related_Subprogram_Or_Body to retrieve the declaration
7610 of the related body. Spec_Is now a variable. Account for
7611 subprogram body stubs when extracting the corresponding spec.
7612 (Collect_Subprogram_Inputs_Output): Account for subprogram body
7613 stubs when extracting the corresponding spec.
7615 2014-06-11 Vincent Celier <celier@adacore.com>
7617 * gnatcmd.adb (Process_Link): Do not invoke gnatlink with
7620 2014-06-11 Robert Dewar <dewar@adacore.com>
7622 * debug.adb: Add debug flag -gnatd.q.
7623 * erroutc.adb (Prescan_Message): Bomb if untagged warning with
7625 * styleg.adb (Check_Xtra_Parens): Message should be a style
7627 * sem_aggr.adb, sem_ch3.adb, exp_ch9.adb, checks.adb, sem_prag.adb,
7628 par-endh.adb, eval_fat.adb, freeze.adb, sem_util.adb, sem_attr.adb,
7629 sem_elab.adb, sem_ch6.adb, sem_warn.adb, sem_cat.adb,
7630 sem_ch13.adb, lib-xref.adb: Add remaining warning tags.
7632 2014-06-11 Ben Brosgol <brosgol@adacore.com>
7634 * gnat_rm.texi: Revised chapter on Implementation Defined
7637 2014-06-11 Geert Bosch <bosch@adacore.com>
7639 * s-exctab.adb: avoid race conditions in exception registration.
7641 2014-06-11 Robert Dewar <dewar@adacore.com>
7643 * errout.adb (Warn_Insertion): New function.
7644 (Error_Msg): Use Warn_Insertion and Prescan_Message.
7645 (Error_Msg_Internal): Set Info field of error object.
7646 (Error_Msg_NEL): Use Prescan_Message.
7647 (Set_Msg_Text): Don't store info: at start of message.
7648 (Skip_Msg_Insertion_Warning): New name for Set_Msg_Insertion_Warning.
7649 (Skip_Msg_Insertion_Warning): Now just skips warning insertion.
7650 * errout.ads: Document new ?$? and >$> insertion sequences
7651 Document use of "(style)" and "info: "
7652 * erroutc.adb (dmsg): Print several missing fields
7653 (Get_Warning_Tag): Handle -gnatel case (?$?) (Output_Msg_Text):
7654 Deal with new tagging of info messages
7655 * erroutc.ads: Is_Info_Msg: New global (Error_Msg_Object):
7656 Add field Info (Prescan_Message): New procedure, this procedure
7657 replaces the old Test_Style_Warning_Serious_Unconditional_Msg
7658 * errutil.adb, exp_util.adb, par-ch7.adb, sem_ch13.adb, sem_ch7.adb,
7659 sem_elab.adb: Follow new rules for info message (info belongs
7660 only at the start of a message, and only in the first message,
7661 not in any of the continuations).
7662 * gnat_ugn.texi: Document full set of warning tags.
7664 2014-06-11 Gary Dismukes <dismukes@adacore.com>
7666 * sem_util.adb: Minor typo fix.
7668 2014-06-11 Ed Schonberg <schonberg@adacore.com>
7670 * sem_warn.adb (Check_References): Do not emit spurious warnings
7671 on uninitialzed variable of a formal private type if variable
7674 2014-06-09 Jan Hubicka <hubicka@ucw.cz>
7676 * gcc-interface/utils.c (process_attributes) <ATTR_LINK_SECTION>: Use
7677 set_decl_section_name accessor.
7679 2014-05-22 Thomas Schwinge <thomas@codesourcery.com>
7681 * gcc-interface/utils.c (DEF_FUNCTION_TYPE_0, DEF_FUNCTION_TYPE_6)
7682 (DEF_FUNCTION_TYPE_7, DEF_FUNCTION_TYPE_8)
7683 (DEF_FUNCTION_TYPE_VAR_5): Cosmetic fixes.
7685 2014-05-21 Robert Dewar <dewar@adacore.com>
7687 * layout.adb: Minor reformatting.
7688 * sem_prag.adb (Analyze_Pragma, case Inspection_Point): Call
7691 2014-05-21 Robert Dewar <dewar@adacore.com>
7693 * restrict.ads (Implementation_Restriction): Add entry for
7695 * rtsfind.ads: Add entries for Fixed_IO and Decimal_IO in
7696 Ada.[Wide_[Wide_]Text_IO.
7697 * s-rident.ads (Restriction_Id): Add entry for No_Fixed_IO.
7698 * sem_attr.adb (Analyze_Attribute): Disallow fixed point types
7699 for Img, Image, Value, Wide_Image, Wide_Value, Wide_Wide_Image,
7700 Wide_Wide_Value if restriction No_Fixed_IO is set.
7701 * sem_util.adb (Set_Entity_Checks): Check restriction No_Fixed_IO.
7703 2014-05-21 Robert Dewar <dewar@adacore.com>
7705 * gnatcmd.adb: Minor error msg changes (no upper case letter
7707 * sem_ch12.adb, sem_ch5.adb, sem_res.adb, sem_util.adb: Minor
7710 2014-05-21 Robert Dewar <dewar@adacore.com>
7712 * debug.adb: Debug flag -gnatd.G inhibits static elab tracing
7713 via generic formals.
7714 * sem_elab.adb (Is_Call_Of_Generic_Formal): Return False if
7717 2014-05-21 Thomas Quinot <quinot@adacore.com>
7719 * exp_pakd.adb (Revert_Storage_Order): Renamed from Byte_Swap to
7720 more accurately describe that this subprogram needs to come into
7721 play also in cases where no byte swapping is involved, because
7722 it also takes care of some required shifts (left-justification
7725 2014-05-21 Thomas Quinot <quinot@adacore.com>
7727 * freeze.adb (Check_Component_Storage_Order): Indicate whether
7728 a Scalar_Storage_Order attribute definition is present for the
7730 (Freeze_Record_Type): Suppress junk warnings
7731 about purportedly junk Bit_Order / Scalar_Storage_Order attribute
7734 2014-05-21 Robert Dewar <dewar@adacore.com>
7736 * sem_ch8.adb (Analyze_Subprogram_Renaming): Put back call
7737 to Kill_Elaboration_Checks.
7739 2014-05-21 Gary Dismukes <dismukes@adacore.com>
7741 * layout.adb (Assoc_Add): Suppress the optimization of the (E
7742 - C1) + C2 case, when the expression type is unsigned and C1 <
7743 C2, to avoid creating a negative literal when folding.
7745 2014-05-21 Hristian Kirtchev <kirtchev@adacore.com>
7747 * freeze.adb (Freeze_Record_Type): Update the use of
7749 * sem_ch3.adb (Analyze_Object_Contract): Update the use of
7751 (Process_Discriminants): Update the use of Is_SPARK_Volatile.
7752 * sem_ch5.adb (Analyze_Iterator_Specification): Update the use
7753 of Is_SPARK_Volatile.
7754 (Analyze_Loop_Parameter_Specification):
7755 Update the use of Is_SPARK_Volatile.
7756 * sem_ch6.adb (Process_Formals): Catch an illegal use of an IN
7757 formal parameter when its type is volatile.
7758 * sem_prag.adb (Analyze_Global_Item): Update the use of
7760 * sem_res.adb (Resolve_Entity_Name): Correct the guard which
7761 determines whether an entity is a volatile source SPARK object.
7762 * sem_util.adb (Has_Enabled_Property): Accout for external
7763 properties being set on objects other than abstract states
7764 and variables. An example would be a formal parameter.
7765 (Is_SPARK_Volatile): New routine.
7766 (Is_SPARK_Volatile_Object):
7767 Remove the entity-specific tests. Call routine Is_SPARK_Volatile
7768 when checking entities and/or types.
7769 * sem_util.ads (Is_SPARK_Volatile): New routine.
7771 2014-05-21 Robert Dewar <dewar@adacore.com>
7773 * sem_warn.adb: Minor fix to warning messages (use ?? instead
7776 2014-05-21 Vincent Celier <celier@adacore.com>
7778 * gnatcmd.adb (GNATCmd): For platforms other than VMS, recognize
7779 switch --version and --help.
7781 2014-05-21 Robert Dewar <dewar@adacore.com>
7783 * sem_elab.adb (Is_Call_Of_Generic_Formal): New function.
7785 2014-05-21 Ed Schonberg <schonberg@adacore.com>
7787 * sem_ch5.adb (Analyze_Iterator_Specification): Set type of
7788 iterator variable when the domain of iteration is a formal
7789 container and this is an element iterator.
7791 2014-05-21 Bob Duff <duff@adacore.com>
7793 * sem_ch12.adb: Minor reformatting.
7795 2014-05-21 Robert Dewar <dewar@adacore.com>
7797 * sinfo.ads, sem_ch12.adb, sem_warn.adb: Minor reformatting.
7799 2014-05-21 Robert Dewar <dewar@adacore.com>
7801 * sem_elab.adb: Minor reformatting.
7802 * s-taprop.ads: Minor comment fix.
7803 * sem_ch8.adb (Analyze_Subprogram_Renaming): Remove call to
7804 Kill_Elaboration_Checks.
7805 * errout.adb, erroutc.adb: Minor reformatting.
7807 2014-05-21 Thomas Quinot <quinot@adacore.com>
7809 * exp_pakd.adb (Byte_Swap): Handle the case of a sub-byte
7810 component. No byte swapping occurs, but this procedure also takes
7811 care of appropriately justifying the argument.
7813 2014-05-21 Hristian Kirtchev <kirtchev@adacore.com>
7815 * sem_ch6.adb: sem_ch6.adb (Analyze_Aspects_On_Body_Or_Stub):
7817 (Analyze_Subprogram_Body_Helper): Move the
7818 analysis of aspect specifications and the processing of the
7819 subprogram body contract after inlining has taken place.
7820 (Diagnose_Misplaced_Aspect_Specifications): Removed.
7822 2014-05-21 Javier Miranda <miranda@adacore.com>
7824 * sem_ch3.adb (Build_Derived_Record_Type): Revert previous change.
7826 2014-05-21 Robert Dewar <dewar@adacore.com>
7828 * sem_eval.ads, sem_eval.adb (Why_Not_Static): Messages are not
7829 continuations any more.
7831 2014-05-21 Ed Schonberg <schonberg@adacore.com>
7833 * sinfo.ads, sinfo.adb: New flag Needs_Initialized_Actual,
7834 present in formal_Private_Definitions and on private extension
7835 declarations of a formal derived type. Set when the use of the
7836 formal type in a generic suggests that the actual should be a
7837 fully initialized type.
7838 * sem_warn.adb (May_Need_Initialized_Actual): new subprogram
7839 to indicate that an entity of a generic type has default
7840 initialization, and that the corresponing actual type in any
7841 subsequent instantiation should be fully initialized.
7842 * sem_ch12.adb (Check_Initialized_Type): new subprogram,
7843 to emit a warning if the actual for a generic type on which
7844 Needs_Initialized_Actual is set is not a fully initialized type.
7846 2014-05-21 Robert Dewar <dewar@adacore.com>
7848 * sem_elab.adb, prj-dect.adb: Minor reformatting.
7850 2014-05-21 Robert Dewar <dewar@adacore.com>
7852 * erroutc.ads: Minor comment addition.
7854 2014-05-21 Robert Dewar <dewar@adacore.com>
7856 * errout.ads: Add documentation for use of >*> tag.
7857 * restrict.adb: Make sure we use >*> tag for restriction warnings.
7859 2014-05-21 Gary Dismukes <dismukes@adacore.com>
7861 * debug.adb: Add case of illegal overriding_indicator for a
7862 protected subprogram body to description of -gnatd.E switch.
7863 * sem_ch6.adb (Verify_Overriding_Indicator): Issue error message
7864 for cases of giving overriding_indicators on protected subprogram
7865 bodies, but change this to a warning if -gnatd.E is enabled. No
7866 longer give a style warning about missing indicators on protected
7869 2014-05-21 Robert Dewar <dewar@adacore.com>
7871 * prj.ads, sem_ch12.adb, prj.adb, exp_pakd.adb,
7872 sem_elab.ads: Minor reformatting.
7873 * erroutc.adb, erroutc.ads (Warning_Specifically_Suppressed): Make Tag
7876 2014-05-21 Pascal Obry <obry@adacore.com>
7878 * prj-dect.adb: Allow package Install in aggregate project.
7880 2014-05-21 Robert Dewar <dewar@adacore.com>
7882 * sem_ch13.adb (Analyze_Aspect_Specifications):
7883 Insert_Delayed_Pragma is now used for the case of Attach_Handler.
7884 * sem_prag.adb: Minor comment improvements.
7886 2014-05-21 Ed Schonberg <schonberg@adacore.com>
7888 * sem_ch12.adb (Install_Body): When checking whether freezing of
7889 instantiation must be delayed, verify that the common enclosing
7890 subprogram to generic and instance is in fact an overloadable
7893 2014-05-21 Vincent Celier <celier@adacore.com>
7895 * makeutl.adb (Mains.Complete_Mains.Do_Complete): Look for all
7896 mains with the same name and fail if there is more than one.
7897 * prj.ads, prj.adb (Find_All_Sources): New function
7899 2014-05-21 Robert Dewar <dewar@adacore.com>
7901 * sem_ch13.adb: Minor reformatting.
7902 * lib-xref-spark_specific.adb, sem_util.adb: Minor reformatting.
7903 * sem_prag.adb: Minor error message improvement.
7905 2014-05-21 Yannick Moy <moy@adacore.com>
7907 * lib-xref-spark_specific.adb, lib-xref.ads, lib-xref.adb
7908 (Enclosing_Subprogram_Or_Package): Only return a library-level
7911 2014-05-21 Javier Miranda <miranda@adacore.com>
7913 * sem_ch3.adb (Build_Derived_Record_Type): Initialize Parent_Base
7914 to the full view of the parent type when processing a derived type
7915 which is the full view of a private type not defined in a generic
7916 unit which is derived from a private type with discriminants
7917 whose full view is a non-tagged record type.
7919 2014-05-21 Javier Miranda <miranda@adacore.com>
7921 * exp_ch4.adb (Expand_Allocator_Expression.Apply_Accessibility_Check):
7922 Complete previous patch.
7924 2014-05-21 Thomas Quinot <quinot@adacore.com>
7927 * g-socket.adb (Read and Write for Datagram_Socket_Stream_Type):
7928 Provide a behaviour more consistent with underlying datagram
7929 socket: do not attempt to loop over Send_Socket/Receive_Socket
7930 iterating along the buffer.
7932 2014-05-21 Hristian Kirtchev <kirtchev@adacore.com>
7934 * freeze.adb (Freeze_Record_Type): Ensure that a discriminated
7935 or a tagged type is not labelled as volatile. Ensure that a
7936 non-volatile type has no volatile components.
7937 * sem_ch3.adb (Analyze_Object_Contract): Add local constant
7938 Obj_Typ. Code reformatting. Ensure that a discriminated or
7939 tagged object is not labelled as volatile.
7940 * sem_prag.adb (Process_Atomic_Shared_Volatile): Ensure that
7941 pragma Volatile applies to a full type declaration or an object
7942 declaration when SPARK mode is on.
7944 2014-05-21 Sergey Rybin <rybin@adacore.com frybin>
7946 * gnat_ugn.texi: For ASIS tools, reword the paragraph about
7947 providing options needed for compiling the argument source for
7948 the situation when a project file can be used as a tool parameter.
7950 2014-05-21 Gary Dismukes <dismukes@adacore.com>
7952 * gnat_rm.texi: Minor typo fix.
7954 2014-05-21 Robert Dewar <dewar@adacore.com>
7956 * stand.adb (Tree_Read): Read missing entities.
7957 (Tree_Write): Write missing entities.
7959 2014-05-21 Ben Brosgol <brosgol@adacore.com>
7961 * gnat_ugn.texi: Wordsmithing edits to Coupling Metrics Control
7962 section in gnatmetric chapter.
7964 2014-05-21 Robert Dewar <dewar@adacore.com>
7966 * exp_ch6.adb (Expand_Actuals): Spec moved here, since not used
7967 outside Exp_Ch6 (Expand_Actuals): Deal with proper insertion of
7968 post-call copy write back (see detailed comment in code).
7969 * exp_ch6.ads (Expand_Actuals): Moved to body, not used outside
7971 * tbuild.ads: Minor reformatting.
7973 2014-05-21 Robert Dewar <dewar@adacore.com>
7975 * stand.ads: Add warning about adding new entities and
7976 Tree_Read/Tree_Write.
7978 2014-05-21 Robert Dewar <dewar@adacore.com>
7980 * sem_util.adb (Set_Entity_With_Checks): Don't complain about
7981 references to restricted entities within the units in which they
7984 2014-05-21 Robert Dewar <dewar@adacore.com>
7986 * gnat1drv.adb (Check_Bad_Body): Use Source_File_Is_Body to
7987 simplify the needed test, and also deal with failure to catch
7988 situations with non-standard names.
7989 * sinput-l.ads, sinput-l.adb (Source_File_Is_No_Body): New function
7990 (Source_File_Is_Subunit): Removed, no longer used.
7992 2014-05-21 Javier Miranda <miranda@adacore.com>
7995 (Expand_Allocator_Expression.Apply_Accessibility_Check): for a
7996 renaming of an access to interface object there is no need to
7997 generate extra code to reference the tag.
7999 2014-05-21 Robert Dewar <dewar@adacore.com>
8001 * errout.adb, erroutc.adb, erroutc.ads: Allow warning tag in pragma
8002 Warnings (Off, string).
8004 2014-05-21 Robert Dewar <dewar@adacore.com>
8006 * osint.adb: Fix three error messages to say invalid instead
8008 * par-ch4.adb, exp_aggr.adb, sem_attr.adb, sem_aux.adb, sem_ch3.adb,
8009 sem_ch5.adb, sem_ch6.adb, sem_ch7.adb, sem_dim.adb, sem_res.adb,
8010 sem_util.adb, sem_util.ads: Fix incorrect use of erroneous in comments.
8012 2014-05-21 Ed Schonberg <schonberg@adacore.com>
8014 * freeze.adb, sem_ch13.adb, sem_ch13.ads, sem_ch9.adb,
8015 sem_ch9.ads: Move discriminant manipulation routines for analysis of
8016 aspect specifications from sem_ch9 to sem_ch13, where they belong.
8018 2014-05-21 Robert Dewar <dewar@adacore.com>
8020 * gnat_ugn.texi: Clearly document -gnatw.g (GNAT warnings).
8021 Clearly document -gnatyg (GNAT style switches).
8022 * usage.adb: Add line line for -gnatw.g (GNAT warnings) More
8023 detail for line for -gnatyg (GNAT style switches) -gnatw.d/D is
8024 available for VMS after all.
8025 * warnsw.adb: Reorganize to eliminate duplicated code
8026 (Restore_Warnings): Add a couple of missing entries
8027 (Save_Warnings): Add a couple of missing entries.
8028 * warnsw.ads: Add missing entries to Warning_Record (not clear
8029 what the impact is).
8031 2014-05-21 Robert Dewar <dewar@adacore.com>
8033 * errout.adb (Set_Msg_Insertion_Warning): Handle ?*? (restriction
8035 * errout.ads: Document ?*? (restriction warning) insertion.
8036 * erroutc.adb (Get_Warning_Tag): Deal with ?*? (restriction
8038 * erroutc.ads: Document use of * for restriction warning tag.
8039 * restrict.adb (Restriction_Msg): Tag with ?*? instead of ??.
8041 2014-05-21 Ed Schonberg <schonberg@adacore.com>
8043 * sem_ch9.adb (Push_Scope_And_Install_Discriminants): Do not
8044 make discriminants immediately visible when analyzing an aspect
8045 of a subtype declaration.
8046 (Uninstall_Discriminants): Do not apply to the entity in a
8047 subtype declaration.
8049 2014-05-21 Ed Schonberg <schonberg@adacore.com>
8051 * sem_util.adb: Code clean up.
8053 2014-05-21 Eric Botcazou <ebotcazou@adacore.com>
8055 * gnat_ugn.texi: Document -Werror.
8057 2014-05-21 Bob Duff <duff@adacore.com>
8059 * sem_util.adb (Is_Dependent_Component_Of_Mutable_Object):
8060 This was returning False if the Object is a constant view. Fix
8061 it to return True in that case, because it might be a view of
8063 (Has_Discriminant_Dependent_Constraint): Fix latent
8064 bug; this function was crashing when passed a discriminant.
8066 2014-05-21 Robert Dewar <dewar@adacore.com>
8068 * gnat_ugn.texi: Remove misplaced section that is now obsolete.
8069 * s-arit64.adb: Minor code reorganization.
8070 * sem_prag.adb: Minor comment fix (remove erroneous use of the
8073 2014-05-21 Robert Dewar <dewar@adacore.com>
8075 * g-table.adb, g-dyntab.adb (Reallocate): Fix possible overflow in
8076 computing new table size.
8078 2014-05-21 Robert Dewar <dewar@adacore.com>
8080 * einfo.ads: Minor reformatting.
8081 * ceinfo.adb: Deal with slight format change of einfo.ads.
8083 2014-05-21 Ed Schonberg <schonberg@adacore.com>
8085 * sem_prag.adb (Analyze_Part_Of): Further work on the proper
8086 implementation of the SPARK 2014 rule concerning private child
8089 2014-05-21 Vincent Celier <celier@adacore.com>
8091 * makeusg.adb: Add switch -d to usage.
8093 2014-05-21 Ed Schonberg <schonberg@adacore.com>
8095 * sem_util.adb (Find_Actual): If an actual that is the prefix
8096 of an enclosing prefixed call has been rewritten, use Nkind
8097 and Sloc to identify the corresponding formal, when handling
8098 deferred references.
8100 2014-05-21 Robert Dewar <dewar@adacore.com>
8102 * debug.adb: Document -gnatd.z switch.
8103 * sem_eval.adb (Why_Non_Static): Test -gnatd.z switch.
8105 2014-05-21 Robert Dewar <dewar@adacore.com>
8107 * einfo.ads (Can_Never_Be_Null): Minor comment update.
8108 * sem_prag.adb (Check_Arg_Is_Task_Dispatching_Policy): Minor
8109 error message change.
8110 * s-arit64.adb ("abs"): New function. Use expression functions
8111 for the simple conversions and arithmetic.
8113 2014-05-18 Eric Botcazou <ebotcazou@adacore.com>
8115 * gcc-interface/trans.c (Subprogram_Body_to_gnu): Rework comment and
8116 set function_start_locus.
8118 2014-05-18 Eric Botcazou <ebotcazou@adacore.com>
8120 * utils.c (gnat_write_global_declarations): Adjust the flags put on
8123 2014-05-18 Eric Botcazou <ebotcazou@adacore.com>
8125 * gcc-interface/decl.c (change_qualified_type): New static function.
8126 (gnat_to_gnu_entity): Use it throughout to add qualifiers on types.
8127 <E_Array_Type>: Set TYPE_VOLATILE on the array type directly.
8128 <E_Array_Subtype>: Likewise.
8129 Do not set flags on an UNCONSTRAINED_ARRAY_TYPE directly.
8130 (gnat_to_gnu_component_type): Likewise.
8131 (gnat_to_gnu_param): Likewise.
8133 2014-05-18 Eric Botcazou <ebotcazou@adacore.com>
8135 * fe.h (Set_Present_Expr): Move around.
8136 (End_Location): New macro.
8137 * gcc-interface/trans.c (Case_Statement_to_gnu): Use End_Location.
8139 2014-05-18 Eric Botcazou <ebotcazou@adacore.com>
8141 * gcc-interface/decl.c (gnat_to_gnu_entity): Use Underlying_Type in
8142 lieu of more verbose construct.
8143 * gcc-interface/trans.c (Call_to_gnu): Likewise.
8144 (gnat_to_gnu): Likewise. Remove obsolete code.
8146 2014-05-18 Eric Botcazou <ebotcazou@adacore.com>
8148 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Array_Subtype>: Do not
8149 consider that regular packed arrays can never be superflat.
8151 2014-05-17 Trevor Saunders <tsaunders@mozilla.com>
8153 * gcc-interface/ada-tree.h: Remove usage of variable_size gty
8155 * gcc-interface/decl.c (annotate_value): Adjust.
8156 * gcc-interface/trans.c (Attribute_to_gnu): Likewise.
8157 (push_range_check_info): Likewise.
8158 (Loop_Statement_to_gnu): Likewise.
8159 (Subprogram_Body_to_gnu): Likewise.
8160 (Compilation_Unit_to_gnu): Likewise.
8161 (start_stmt_group): Likewise.
8162 * gcc-interface/utils.c (init_gnat_utils): Likewise.
8163 (gnat_pushlevel): Likewise.
8164 (maybe_pad_type): Likewise.
8166 2014-05-14 Eric Botcazou <ebotcazou@adacore.com>
8168 * seh_init.c: Fix copyright year.
8170 2014-05-14 Bernd Edlinger <bernd.edlinger@hotmail.de>
8172 * seh_init.c (__gnat_map_SEH): Compile also when __CYGWIN__ and __SEH__
8173 are defined. Move include windows.h before system.h.
8174 * s-oscons-tmplt.c (DTR_CONTROL_ENABLE, RTS_CONTROL_ENABLE): Compile
8175 also when __CYGWIN__ is defined. Include windef.h before winbase.h.
8177 2014-05-14 Richard Sandiford <r.sandiford@uk.ibm.com>
8179 * gcc-interface/decl.c (gnat_to_gnu_entity): Convert integer_one_node
8180 to the appropriate type.
8181 * gcc-interface/trans.c (gnat_to_gnu): Likewise.
8182 (pos_to_constructor): Likewise.
8184 2014-05-13 Eric Botcazou <ebotcazou@adacore.com>
8186 * gcc-interface/decl.c (annotate_value): Fix thinko in latest change.
8188 2014-05-06 Kenneth Zadeck <zadeck@naturalbridge.com>
8189 Mike Stump <mikestump@comcast.net>
8190 Richard Sandiford <rdsandiford@googlemail.com>
8192 * gcc-interface/cuintp.c (UI_From_gnu): Use wide-int interfaces.
8193 * gcc-interface/decl.c (gnat_to_gnu_entity): Use TYPE_SIGN.
8194 (annotate_value): Use wide-int interfaces.
8195 * gcc-interface/utils.c (get_nonnull_operand): Use tree_fits_uhwi_p.
8197 2014-04-28 Richard Henderson <rth@redhat.com>
8199 * gcc-interface/Makefile.in: Support aarch64-linux.
8201 2014-04-28 Eric Botcazou <ebotcazou@adacore.com>
8203 * exp_dbug.ads (Get_External_Name): Add 'False' default to Has_Suffix,
8204 add 'Suffix' parameter and adjust comment.
8205 (Get_External_Name_With_Suffix): Delete.
8206 * exp_dbug.adb (Get_External_Name_With_Suffix): Merge into...
8207 (Get_External_Name): ...here. Add 'False' default to Has_Suffix, add
8209 (Get_Encoded_Name): Remove 2nd argument in call to Get_External_Name.
8210 Call Get_External_Name instead of Get_External_Name_With_Suffix.
8211 (Get_Secondary_DT_External_Name): Likewise.
8212 * exp_cg.adb (Write_Call_Info): Likewise.
8213 * exp_disp.adb (Export_DT): Likewise.
8214 (Import_DT): Likewise.
8215 * comperr.ads (Compiler_Abort): Remove Code parameter and add From_GCC
8216 parameter with False default.
8217 * comperr.adb (Compiler_Abort): Likewise. Adjust accordingly.
8218 * types.h (Fat_Pointer): Rename into...
8219 (String_Pointer): ...this. Add comment on interfacing rules.
8220 * fe.h (Compiler_Abort): Adjust for above renaming.
8221 (Error_Msg_N): Likewise.
8222 (Error_Msg_NE): Likewise.
8223 (Get_External_Name): Likewise. Add third parameter.
8224 (Get_External_Name_With_Suffix): Delete.
8225 * gcc-interface/decl.c (STDCALL_PREFIX): Define.
8226 (create_concat_name): Adjust call to Get_External_Name, remove call to
8227 Get_External_Name_With_Suffix, use STDCALL_PREFIX, adjust for renaming.
8228 * gcc-interface/trans.c (post_error): Likewise.
8229 (post_error_ne): Likewise.
8230 * gcc-interface/misc.c (internal_error_function): Likewise.
8232 2014-04-28 Richard Biener <rguenther@suse.de>
8235 * gcc-interface/utils.c: Define flag_isoc11.
8237 2014-04-26 Eric Botcazou <ebotcazou@adacore.com>
8239 * gnatvsn.ads (Library_Version): Bump to 4.10.
8241 2014-04-23 Eric Botcazou <ebotcazou@adacore.com>
8244 2014-04-22 Richard Henderson <rth@redhat.com>
8246 * gcc-interface/Makefile.in: Support aarch64-linux.
8248 2014-04-22 Eric Botcazou <ebotcazou@adacore.com>
8250 * fe.h (Compiler_Abort): Replace Fat_Pointer with String_Pointer.
8251 (Error_Msg_N): Likewise.
8252 (Error_Msg_NE): Likewise.
8253 (Get_External_Name_With_Suffix): Likewise.
8254 * types.h (Fat_Pointer): Delete.
8255 (String_Pointer): New type.
8256 (DECLARE_STRING_POINTER): New macro.
8257 * gcc-interface/decl.c (create_concat_name): Adjust.
8258 * gcc-interface/trans.c (post_error): Likewise.
8259 (post_error_ne): Likewise.
8260 * gcc-interface/misc.c (internal_error_function): Likewise.
8262 2014-04-22 Richard Henderson <rth@redhat.com>
8264 * gcc-interface/Makefile.in: Support aarch64-linux.
8266 * init.c [__linux__] (HAVE_GNAT_ALTERNATE_STACK): New define.
8267 (__gnat_alternate_stack): Enable for all linux except ia64.
8269 2014-04-22 Eric Botcazou <ebotcazou@adacore.com>
8271 * fe.h (Compiler_Abort): Replace Fat_Pointer with String_Pointer.
8272 (Error_Msg_N): Likewise.
8273 (Error_Msg_NE): Likewise.
8274 (Get_External_Name_With_Suffix): Likewise.
8275 * types.h (Fat_Pointer): Delete.
8276 (String_Pointer): New type.
8277 (DECLARE_STRING_POINTER): New macro.
8278 * gcc-interface/decl.c (create_concat_name): Adjust.
8279 * gcc-interface/trans.c (post_error): Likewise.
8280 (post_error_ne): Likewise.
8281 * gcc-interface/misc.c (internal_error_function): Likewise.
8283 2014-04-15 Eric Botcazou <ebotcazou@adacore.com>
8284 Pierre-Marie de Rodat <derodat@adacore.com>
8286 * gcc-interface/decl.c (gnat_to_gnu_entity) <object>: Create a mere
8287 scalar constant instead of a reference for renaming of scalar literal.
8288 Do not create a new object for constant renaming except for a function
8289 call. Make sure a VAR_DECL is created for the renaming pointer.
8290 * gcc-interface/trans.c (constant_decl_with_initializer_p): New.
8291 (fold_constant_decl_in_expr): New function.
8292 (Identifier_to_gnu): Use constant_decl_with_initializer_p.
8293 For a constant renaming, try to fold a constant DECL in the result.
8294 (lvalue_required_p) <N_Object_Renaming_Declaration>: Always return 1.
8295 (Identifier_to_gnu): Reference the renamed object of constant renaming
8297 * gcc-interface/utils.c (invalidate_global_renaming_pointers): Do not
8298 invalidate constant renaming pointers.
8300 2014-04-15 Eric Botcazou <ebotcazou@adacore.com>
8302 * gcc-interface/utils.c (type_for_vector_element_p): New predicate.
8303 (build_vector_type_for_size): New function.
8304 (build_vector_type_for_array): Likewise.
8305 (unchecked_convert): Build an intermediate vector type to convert
8306 from a generic array type to a vector type.
8307 (handle_vector_size_attribute): Reimplement.
8308 (handle_vector_type_attribute): Likewise.
8310 2014-04-15 Eric Botcazou <ebotcazou@adacore.com>
8312 * gcc-interface/decl.c (prepend_one_attribute_pragma): Call
8313 Is_OK_Static_Expression in lieu of Is_Static_Expression to
8314 detect valid arguments.
8316 2014-04-15 Eric Botcazou <ebotcazou@adacore.com>
8318 * gcc-interface/trans.c (gnat_gimplify_stmt): Propagate loop hints.
8320 2014-04-14 Paolo Carlini <paolo.carlini@oracle.com>
8322 * gcc-interface/decl.c (gnat_to_gnu_entity): Use TYPE_IDENTIFIER.
8323 (components_to_record): Likewise.
8324 * gcc-interface/utils.c (make_aligning_type): Likewise.
8325 (maybe_pad_type): Likewise.
8326 (finish_record_type): Likewise.
8327 (rest_of_record_type_compilation): Likewise.
8329 2014-04-14 Eric Botcazou <ebotcazou@adacore.com>
8331 * snames.ads-tmpl (Name_Ivdep): New pragma-related name.
8332 * sem_prag.adb (Analyze_Pragma) <Pragma_Loop_Optimize>: Add support
8334 * gnat_rm.texi (Implementation Defined Pragmas): Document new Ivdep
8335 hint for Loop_Optimize.
8336 * gnat_ugn.texi (Vectorization of loops): Mention new Ivdep hint.
8337 * gcc-interface/trans.c (Pragma_to_gnu) <Pragma_Loop_Optimize>: Deal
8338 with new Ivdep hint.
8339 * gcc-interface/ada-tree.h (LOOP_STMT_IVDEP): New macro.
8340 * gcc-interface/trans.c (Pragma_to_gnu) <Pragma_Loop_Optimize>: Deal
8341 with new Ivdep hint.
8342 (gnat_gimplify_stmt) <LOOP_STMT>: Propagate loop hints.
8344 2014-04-14 Eric Botcazou <ebotcazou@adacore.com>
8345 Robert Dewar <dewar@adacore.com>
8347 * opt.ads (Suppress_Back_Annotation): Remove as unused.
8348 * fe.h (Back_Annotate_Rep_Info): Likewise.
8349 (Global_Discard_Names): Likewise.
8350 (List_Representation_Info): Declare.
8351 * types.h (Uint_Minus_1): Likewise.
8352 * repinfo.ads: Document back-annotation change.
8353 * gcc-interface/gigi.h (init_gnat_decl): Declare.
8354 (destroy_gnat_decl): Likewise.
8355 * gcc-interface/decl.c (annotate_value): Do not create the cache of
8356 annotated values here but...
8357 <CALL_EXPR>: Only inline the call if -gnatR3 is specified or we are
8359 (init_gnat_decl): ...here instead. New function.
8360 (destroy_gnat_decl): Likewise.
8361 * gcc-interface/trans.c (gigi): Call {init|destroy}_gnat_decl.
8362 * gcc-interface/utils.c (init_gnat_utils): Minor reformatting.
8364 2014-04-14 Eric Botcazou <ebotcazou@adacore.com>
8366 * gcc-interface/decl.c (create_field_decl_from): Finalize non-constant
8367 offset for the field, if any.
8369 2014-04-09 Eric Botcazou <ebotcazou@adacore.com>
8370 Svante Signell <svante.signell@gmail.com>
8374 * s-osinte-x32.adb: New file.
8375 * s-linux.ads (Time): New section.
8376 * s-linux-alpha.ads (Time): Likewise.
8377 * s-linux-android.ads (Time: Likewise.
8378 * s-linux-hppa.ads (Time): Likewise.
8379 * s-linux-mipsel.ads (Time): Likewise.
8380 * s-linux-sparc.ads (Time): Likewise.
8381 * s-linux-x32.ads (Time): Likewise.
8382 * s-osprim-x32.ads (timespec): Adjust.
8384 (To_Timespec): Likewise.
8385 * s-osinte-linux.ads (Time): Define local subtypes for those defined
8387 * s-taprop-linux.adb (Monotonic_Clock): Do not define timeval.
8388 * s-osinte-hpux.ads (timespec): Revert POSIX breakage.
8389 * s-osinte-kfreebsd-gnu.ads (timespec): Likewise.
8390 * s-osinte-solaris-posix.ads (timespec): Likewise.
8391 * s-osinte-posix.adb (To_Timespec): Likewise.
8392 * gcc-interface/Makefile.in (x32/Linux): Use s-osinte-x32.adb.
8394 2014-04-08 Eric Botcazou <ebotcazou@adacore.com>
8397 * gcc-interface/Makefile.in (arm% linux-android): Switch to EHABI.
8398 * s-linux-android.ads: New file.
8399 * s-intman-android.adb: Likewise.
8400 * s-osinte-android.ads: Adjust.
8401 * sigtramp-armdroid.c: Likewise.
8402 * sigtramp.h: Add Android support.
8404 2014-04-07 Eric Botcazou <ebotcazou@adacore.com>
8406 * gcc-interface/Makefile.in (alpha-vms): Add missing line.
8408 2014-03-30 Eric Botcazou <ebotcazou@adacore.com>
8411 * system-linux-alpha.ads: Adjust for Ada 2005.
8412 * system-linux-mips.ads: Likewise.
8413 * system-linux-mips64el.ads: Likewise.
8414 * system-linux-mipsel.ads: Likewise.
8415 * system-linux-s390.ads: Likewise.
8416 * system-linux-s390x.ads: Likewise.
8417 * system-linux-sparc.ads: Likewise.
8418 * system-linux-sparcv9.ads: Likewise.
8419 * system-rtems.ads: Likewise.
8420 * system-vxworks-arm.ads: Likewise.
8422 2014-03-16 Andreas Schwab <schwab@linux-m68k.org>
8425 * gcc-interface/Makefile.in (target_cpu_default): Revert
8428 2014-03-13 Eric Botcazou <ebotcazou@adacore.com>
8431 * cstand.adb (Register_Float_Type): Add 'precision' parameter and use
8432 it to set the RM size. Use directly 'size' for the Esize.
8433 (Create_Back_End_Float_Types): Adjust call to above.
8434 * get_targ.ads (Register_Type_Proc): Add 'precision' parameter.
8435 * set_targ.ads (FPT_Mode_Entry): Add 'precision' component.
8436 (Write_Target_Dependent_Values): Adjust comment.
8437 * set_targ.adb (Register_Float_Type): Add 'precision' parameter and
8439 (Write_Target_Dependent_Values): Write the precision in lieu of size.
8440 (Initialization): Read the precision in lieu of size and compute the
8441 size from the precision and the alignment.
8442 * gcc-interface/gigi.h (enumerate_modes): Add integer parameter.
8443 * gcc-interface/misc.c (enumerate_modes): Likewise. Do not register
8444 types for vector modes, pass the size in addition to the precision.
8446 2014-03-10 Eric Botcazou <ebotcazou@adacore.com>
8448 * gcc-interface/Make-lang.in (ADA_DEPFILES): Fix typo.
8450 2014-03-07 Doug Rupp <rupp@adacore.com>
8453 * system-linux-armel.ads (Backend_Overflow_Checks): Set to True.
8454 (Support_64_Bit_Divides): Removed, no longer used.
8455 (ZCX_By_Default): Enabled.
8457 2014-02-25 Doug Rupp <rupp@adacore.com>
8459 * gcc-interface/Makefile.in (arm-linux):
8460 (EH_MECHANISM): Use ARM unwinder (-arm)
8461 (LIBGNAT_TARGET_PAIRS: Override defaults with a-exexpr-gcc.adb and
8463 (EXTRA_LIBGNAT_OBJS): Add raise-gcc.o
8464 (EXTRA_GNATRTL_NONTASKING_OBJS): Add g-cppexc.o s-excmac.o.
8465 (arm-wrs-vxworks): Add EH_MECHANISM=-gcc for kernel mode.
8466 (EXTRA_LIBGNAT_OBJS): Add sigtramp-armvxw.o
8467 Add dependencies for sigtramp-armvxw.o.
8469 2014-02-25 Eric Botcazou <ebotcazou@adacore.com>
8471 * gcc-interface/trans.c (Pragma_to_gnu): Deal with Warning_As_Error.
8473 2014-02-25 Robert Dewar <dewar@adacore.com>
8475 * rtsfind.adb (Is_RTE): Protect against entity with no scope
8476 field (previously this call blew up on the Standard entity).
8477 * sem_attr.adb (Analyze_Attribute, case Access): Remove
8478 test for No_Abort_Statements, this is now handled in
8479 Set_Entity_With_Checks.
8480 * exp_ch6.adb, sem_ch10.adb, sem_ch4.adb, sem_ch8.adb, sem_res.adb:
8481 Change name Set_Entity_With_Style_Check => Set_Entity_With_Checks.
8482 * sem_util.ads, sem_util.adb: Change name Set_Entity_With_Style_Check =>
8483 Set_Entity_With_Checks.
8484 (Set_Entity_With_Checks): Add checks for No_Dynamic_Attachment,
8485 Add checks for No_Abort_Statements.
8487 2014-02-25 Robert Dewar <dewar@adacore.com>
8489 * exp_ch9.adb (Expand_Entry_Barrier): Add comment that call to
8490 Check_Restriction is OK.
8492 2014-02-25 Ed Schonberg <schonberg@adacore.com>
8494 * sem_ch3.adb (Process_Full_View): Better error message when
8495 the full view of a private type without discriminants is an
8497 * sem_ch7.adb (Uninstall_Declarations): Ditto.
8499 2014-02-25 Eric Botcazou <ebotcazou@adacore.com>
8501 * sigtramp-armvxw.c: Also restore r0.
8503 2014-02-25 Robert Dewar <dewar@adacore.com>
8505 * errout.adb (Error_Msg_Internal): Warning_Msg_Char set
8506 unconditionally (Set_Msg_Insertion_Warning): Warning_Msg_Char
8507 set unconditionally.
8508 * erroutc.adb (Get_Warning_Tag): Does not give a leading space
8509 any more (Output_Msg_Text): Rewritten with new convention on
8510 output of warnings that are treated as errors.
8511 * erroutc.ads (Error_Msg_Object): Warn_Chr is always set even
8513 * gnat_rm.texi: Updates to documentation on pragma
8515 * warnsw.adb (Set_Dot_Warning_Switch): -gnatw.e should not
8516 set Warning_Doc_Switch.
8517 * lib-writ.ads: Add documentation note on ALI file generation
8519 * exp_ch6.adb (Expand_Call): Remove check for No_Abort_Statements
8521 * sem_attr.adb (Resolve_Attribute, case Access):
8522 Abort_Task'Access violates the No_Abort_Statements restriction.
8523 * sem_res.adb (Resolve_Call): Check restriction
8524 No_Abort_Statements for call to Abort_Task or a renaming of it.
8526 2014-02-25 Robert Dewar <dewar@adacore.com>
8528 * sem_ch3.adb (Array_Type_Declaration): Check for case of using
8530 * lib.ads: Minor reformatting.
8531 * einfo.ads: Minor reformatting.
8533 2014-02-25 Doug Rupp <rupp@adacore.com>
8535 * sem_mech.adb (Set_Mechanisms): For convention Fortran on VMS
8536 use Short_Descriptor(S) as the argument passing mechanism.
8538 2014-02-25 Eric Botcazou <ebotcazou@adacore.com>
8540 * sigtramp-ppcvxw.c (CFI_COMMON_REGS): Also include r0.
8542 2014-02-25 Robert Dewar <dewar@adacore.com>
8544 * atree.ads (Warnings_Treated_As_Errors): New variable.
8545 * errout.adb (Error_Msg_Internal): Set Warn_Err flag in
8546 error object (Initialize): Initialize Warnings_As_Errors_Count
8547 (Write_Error_Summary): Include count of warnings treated as errors.
8548 * erroutc.adb (Warning_Treated_As_Error): New function.
8549 (Matches): Function moved to outer level of package.
8550 * erroutc.ads (Error_Msg_Object): Add Warn_Err flag.
8551 (Warning_Treated_As_Error): New function.
8552 * gnat_rm.texi: Document pragma Treat_Warning_As_Error.
8553 * opt.adb: Add handling of Warnings_As_Errors_Count[_Config].
8554 * opt.ads (Config_Switches_Type): Add entry for
8555 Warnings_As_Errors_Count.
8556 (Warnings_As_Errors_Count): New variable.
8557 (Warnings_As_Errors): New array.
8558 * par-prag.adb: Add dummy entry for Warning_As_Error.
8559 * sem_prag.adb (Analyze_Pragma): Implement new pragma
8561 * snames.ads-tmpl: Add entries for Warning_As_Error pragma.
8563 2014-02-25 Eric Botcazou <ebotcazou@adacore.com>
8565 * sigtramp.h: Fix minor inaccuracy.
8567 2014-02-25 Ben Brosgol <brosgol@adacore.com>
8569 * gnat_ugn.texi: Added description of kill command.
8571 2014-02-25 Robert Dewar <dewar@adacore.com>
8573 * gnat_rm.texi (Address_Clauses): Add a section discussing the
8574 problem of address clauses causing unexpected initialization,
8575 including the effect of Initialize_Scalars.
8577 2014-02-25 Robert Dewar <dewar@adacore.com>
8579 * errout.adb: Various changes for better msgs for anonmous access
8581 * erroutc.ads, erroutc.adb (Buffer_Ends_With): Version with character
8583 (Buffer_Remove): Version with character argument.
8584 * sem_attr.adb (Resolve_Attribute, case Access): Better handling
8585 of mismatching conventions for access-to-subprogram case.
8586 * sem_prag.adb (Set_Convention_From_Pragma): Deal with anonymous
8587 access types in record.
8588 * sem_util.ads, sem_util.adb (Set_Convention): Handle anonymous access
8589 types, including in records.
8591 2014-02-25 Doug Rupp <rupp@adacore.com>
8593 * sigtramp-ppcvxw.c, sigtramp.h, sigtramp-armvxw.c: Comment
8594 enhancements and corrections.
8596 2014-02-25 Robert Dewar <dewar@adacore.com>
8598 * gnat_rm.texi: New section "Conventions and Anonymous Access Types"
8600 2014-02-25 Robert Dewar <dewar@adacore.com>
8602 * gnat_rm.texi: First set of documentation additions for
8603 predefined RM units.
8604 * checks.adb: Minor reformatting.
8605 * sem_elab.adb (Check_Task_Activation): Minor fix to error
8607 * sem_util.adb: Minor reformatting.
8609 2014-02-25 Arnaud Charlet <charlet@adacore.com>
8611 * usage.adb (Usage): Add help on -gnateC.
8612 * switch-c.adb (Scan_Front_End_Switches): Add handling of -gnateC.
8613 * opt.ads (Generate_CodePeer_Messages): New flag.
8614 * gnat_ugn.texi: Document new switch -gnateC.
8616 2014-02-25 Ben Brosgol <brosgol@adacore.com>
8618 * gnat_rm.texi: Corrected minor typos in Implementation Defined
8620 * opt.ads: Minor reformatting.
8622 2014-02-25 Robert Dewar <dewar@adacore.com>
8624 * binde.adb: Change messages to mention -gnatel instead of -gnatwl.
8625 * gnat_ugn.texi: Update documentation of -gnatwl Add documentation
8627 * opt.ads (Warn_Info_Messages): New flag.
8628 * sem_elab.adb: Use Elab_Warnings, Elab_Info_Messages to control
8630 * sem_prag.adb: Use Elab_Warnings, Elab_Info_Messages to control
8632 * switch-m.ad, switch-c.adb: Recognize new -gnatel/EL switches.
8633 * usage.adb: Add documentation of -gnatel/-gnateL Update
8634 documentation of -gnatwl/-gnatwL.
8635 * warnsw.adb: New handling of Elab_Warnings, Elab_Info_Messages
8636 * warnsw.ads (Elab_Info_Messages): New field in Warning_Record
8638 2014-02-25 Robert Dewar <dewar@adacore.com>
8640 * einfo.ads, einfo.adb (Has_Shift_Operator): New flag.
8641 * gnat_rm.texi: Document pragma Provide_Shift_Operators.
8642 * interfac.ads: Minor code reorganization (add pragma
8643 Compiler_Unit_Warning).
8644 * par-prag.adb: Add dummy entry for Provide_Shift_Operators.
8645 * sem_ch3.adb (Build_Derived_Numeric_Type): Copy
8646 Has_Shift_Operator flag.
8647 * sem_intr.adb (Check_Intrinsic_Subprogram): Make sure
8648 Check_Shift is always called (Check_Shift): Set Has_Shift_Operator.
8649 * sem_prag.adb: Implement pragma Provide_Shift_Operators.
8650 * snames.ads-tmpl: Add entries for pragma Provide_Shift_Operators
8651 Add entry for Name_Amount.
8652 * checks.adb (Selected_Range_Checks): When checking for a null
8653 range, make sure we use the base type, and not the subtype for
8654 deciding a range is null.
8655 * sem_ch5.adb (Analyze_Loop_Parameter_Specification): Check
8656 for suspicious loop bound which is outside the range of the
8658 * gnat_ugn.texi: Add documentation section "Determining the
8659 Chosen Elaboration Order"
8660 * sem_ch13.adb (UC_Entry): Add field Act_Unit
8661 (Validate_Unchecked_Conversion): Store Act_Unit
8662 (Validate_Unchecked_Conversions): Test Warnings_Off in Act_Unit
8663 * treepr.adb: Minor reformatting.
8665 2014-02-25 Arnaud Charlet <charlet@adacore.com>
8667 * usage.adb: Minor: fix typo.
8669 2014-02-25 Robert Dewar <dewar@adacore.com>
8671 * lib.ads, s-bitops.adb, s-bitops.ads, s-conca5.adb, gnat_rm.texi,
8672 s-conca5.ads, s-conca7.adb, s-conca7.ads, s-crc32.adb, s-crc32.ads,
8673 s-conca9.adb, s-conca9.ads, g-dyntab.adb, s-crtl.ads, g-dyntab.ads,
8674 s-excdeb.adb, s-addope.adb, s-addope.ads, s-carun8.adb, s-carun8.ads,
8675 g-htable.adb, g-htable.ads, g-hesora.adb, g-hesora.ads, s-conca2.adb,
8676 s-conca2.ads, a-comlin.adb, a-chlat1.ads, a-comlin.ads, errout.ads,
8677 a-except.adb, s-conca4.adb, a-except.ads, s-conca4.ads, s-conca6.adb,
8678 s-conca6.ads, g-spchge.adb, g-spchge.ads, g-u3spch.adb, g-u3spch.ads,
8679 a-strhas.ads, restrict.adb, aspects.adb, aspects.ads, s-conca8.adb,
8680 s-conca8.ads, back_end.adb, par-prag.adb, g-byorma.adb, g-byorma.ads,
8681 a-elchha.adb, a-elchha.ads, g-speche.adb, g-speche.ads, s-casuti.adb,
8682 s-assert.adb, s-casuti.ads, s-assert.ads, a-clrefi.adb, a-clrefi.ads,
8683 s-conca3.adb, s-conca3.ads, a-ioexce.ads: Implement pragma
8684 Compiler_Unit_Warning, change Compiler_Unit everywhere to
8685 Compiler_Unit_Warning.
8687 2014-02-25 Sergey Rybin <rybin@adacore.com frybin>
8689 * sem_prag.adb (Analyze_Depends_In_Decl_Part): Do not normalize
8690 in ASIS mode aggregates that are used as aspect definitions.
8692 2014-02-25 Robert Dewar <dewar@adacore.com>
8694 * exp_ch7.adb, sem_util.adb, sem_util.ads, exp_ch6.adb: Minor
8697 2014-02-25 Ed Schonberg <schonberg@adacore.com>
8699 * freeze.adb (Freeze_Entity): If the return type of a function
8700 is a limited view, and the non-limited view has not been seen yet,
8701 defer freezing to some later point.
8703 2014-02-25 Robert Dewar <dewar@adacore.com>
8705 * sem_ch3.adb: Minor reformatting.
8707 2014-02-25 Robert Dewar <dewar@adacore.com>
8709 * s-excdeb.ads, s-except.ads, s-exctab.adb, s-exctab.ads, s-finmas.ads,
8710 s-htable.adb, s-htable.ads, s-imenne.adb, s-imenne.ads, s-imgenu.adb,
8711 s-imgenu.ads, s-mastop.adb, s-mastop.ads, s-memory-vms_64.adb,
8712 s-memory-vms_64.ads, s-memory.adb, s-memory.ads, s-os_lib.adb,
8713 s-os_lib.ads, s-parame.adb, s-parame.ads, s-purexc.ads, s-restri.adb,
8714 s-restri.ads, s-rident.ads, s-secsta.adb, s-secsta.ads, s-soflin.adb,
8715 s-soflin.ads, s-sopco3.adb, s-sopco3.ads, s-sopco4.adb, s-sopco4.ads,
8716 s-sopco5.adb, s-sopco5.ads, s-spsufi.ads, s-stache.adb, s-stache.ads,
8717 s-stalib.adb, s-stalib.ads, s-stoele.adb, s-stoele.ads, s-strcom.adb,
8718 s-strcom.ads, s-strhas.adb, s-string.adb, s-string.ads, s-strops.adb,
8719 s-strops.ads, s-ststop.adb, s-ststop.ads, s-traceb.adb, s-traceb.ads,
8720 s-traent.adb, s-traent.ads, s-unstyp.ads, s-utf_32.adb, s-utf_32.ads,
8721 s-wchcnv.adb, s-wchcnv.ads, s-wchcon.adb, s-wchcon.ads, s-wchjis.adb,
8722 s-wchjis.ads, sem_ch11.adb, sem_ch4.adb, sem_ch5.adb, sem_prag.adb,
8723 snames.ads-tmpl: Change Compiler_Unit everywhere to
8724 Compiler_Unit_Warning.
8726 2014-02-25 Hristian Kirtchev <kirtchev@adacore.com>
8728 * exp_ch6.adb (Add_Or_Save_Precondition): New routine.
8729 (Collect_Body_Postconditions_In_Decls): New routine.
8730 (Collect_Body_Postconditions_Of_Kind): Factor out code. Handle
8731 postcondition aspects or pragmas that appear on a subprogram
8733 (Collect_Spec_Preconditions): Factor out code. Handle
8734 precondition aspects or pragmas that appear on a subprogram
8736 * sem_ch6.adb (Analyze_Subprogram_Body_Helper): The analysis of
8737 aspects that apply to a subprogram body stub is no longer delayed,
8738 the aspects are analyzed on the spot.
8739 (SPARK_Aspect_Error):
8740 Aspects that apply to a subprogram declaration cannot appear in
8742 * sem_ch10.adb Remove with and use clause for Sem_Ch13.
8743 (Analyze_Proper_Body): Add local variable Comp_Unit. Unum
8744 is now a local variable. Code cleanup. Analysis related to
8745 the aspects of a subprogram body stub is now carried out by
8746 Analyze_Subprogram_Body_Helper. Do not propagate the aspects
8747 and/or pragmas of a subprogram body stub to the proper body
8748 as this is no longer needed. Do not analyze the aspects of a
8749 subprogram stub when the corresponding source unit is missing.
8750 (Analyze_Protected_Body_Stub): Flag the illegal use of aspects
8752 (Analyze_Task_Body_Stub): Flag the illegal use of
8754 (Optional_Subunit): Add local variable Unum.
8755 * sem_ch13.adb (Insert_Delayed_Pragma): Do not analyze a generated
8756 pragma when it applies to a subprogram body stub.
8757 * sem_prag.adb (Analyze_Pragma): Pragmas Contract_Cases,
8758 Depends and Global can now apply to a subprogram body stub as
8759 long as it acts as its own spec.
8760 (Analyze_Refined_Pragma):
8761 Code reformatting. Refinement pragmas cannot apply to a subunit.
8763 2014-02-25 Hristian Kirtchev <kirtchev@adacore.com>
8765 * einfo.ads Update the usage of flag
8766 Uses_Sec_Stack. Uses_Sec_Stack now applies to E_Loop entities.
8767 * exp_ch5.adb (Expand_Iterator_Loop): The temporary for a cursor
8768 now starts with the letter 'C'. This makes reading expanded
8770 * exp_ch7.adb (Establish_Transient_Scope): Add local variable
8771 Iter_Loop. Signal that an Ada 2012 iterator loop requires
8772 secondary stack management when creating a transient scope for
8773 an element reference.
8774 * exp_util.adb (Process_Statements_For_Controlled_Objects):
8775 When wrapping the statements of a loop, pass the E_Loop entity
8776 to the wrapping machinery.
8777 (Wrap_Statements_In_Block): Add
8778 formal parameter Scop along with comment on usage. Add local
8779 variables Block_Id, Block_Nod and Iter_Loop. Mark the generated
8780 block as requiring secondary stack management when the block is
8781 created inside an Ada 2012 iterator loop. This ensures that any
8782 reference objects are reclaimed on each iteration of the loop.
8783 * sem_ch5.adb (Analyze_Loop_Statement): Mark the generated block
8784 tasked with the handling of container iterators as requiring
8785 secondary stack management. This ensures that iterators are
8786 reclaimed when the loop terminates or is exited in any fashion.
8787 * sem_util.adb (Add_Block_Identifier): New routine.
8788 (Find_Enclosing_Iterator_Loop): New routine.
8789 * sem_util.ads (Add_Block_Identifier): New routine.
8790 (Find_Enclosing_Iterator_Loop): New routine.
8792 2014-02-25 Robert Dewar <dewar@adacore.com>
8794 * sinfo.ads: Minor reformatting.
8796 2014-02-25 Tristan Gingold <gingold@adacore.com>
8798 * s-expllu.ads, s-expuns.ads, s-expmod.ads: Minor comment fix.
8800 2014-02-25 Pascal Obry <obry@adacore.com>
8802 * sinput-l.adb, osint.adb, osint.ads: Add Prep_Suffix to factorize code.
8804 2014-02-25 Tristan Gingold <gingold@adacore.com>
8806 * sem_ch10.adb: Minor comment fix.
8808 2014-02-25 Bob Duff <duff@adacore.com>
8810 * s-tasdeb.adb: Misc cleanup of this package,
8811 including printing addresses in hexadecimal.
8812 (Write): Fix minor bug when taking 'Address of an empty string.
8814 2014-02-25 Ed Schonberg <schonberg@adacore.com>
8816 * sem_prag.adb (Analyze_Part_Of): Reject state refinement in a
8817 public child unit when it does not refer to the abstract state
8818 of a public ancestor.
8820 2014-02-25 Yannick Moy <moy@adacore.com>
8822 * sem_prag.adb (Analyze_Pragma/Pragma_Validity_Checks): Ignore pragma
8823 Validity_Checks in GNATprove and CodePeer modes.
8825 2014-02-25 Pascal Obry <obry@adacore.com>
8827 * prj-attr.adb, projects.texi, snames.ads-tmpl: Add package Install's
8828 Artifacts attribute.
8830 2014-02-25 Yannick Moy <moy@adacore.com>
8832 * sem_prag.adb: Minor reformatting to get consistent messages.
8834 2014-02-25 Robert Dewar <dewar@adacore.com>
8836 * checks.adb: Minor reformatting.
8837 * sinfo.ads (Do_Range_Check): Document that this flag is never
8838 passed to the back end.
8840 2014-02-25 Yannick Moy <moy@adacore.com>
8842 * sem_ch3.adb, sem_ch5.adb, sem_ch9.adb, sem_prag.adb, sem_attr.adb,
8843 sem_ch6.adb: Remove useless references to SPARK RM in error messages.
8845 2014-02-25 Hristian Kirtchev <kirtchev@adacore.com>
8847 * sem_res.adb (Appears_In_Check): New routine.
8848 (Resolve_Entity_Name): Remove local variables Prev and
8849 Usage_OK. Par is now a constant. Remove the parent chain traversal
8850 as the placement of a volatile object with enabled property
8851 Async_Writers and/or Effective_Reads must appear immediately
8852 within a legal construct.
8854 2014-02-25 Hristian Kirtchev <kirtchev@adacore.com>
8856 * checks.adb (Apply_Selected_Range_Checks):
8857 Alphabetize local constants and variables. Add comments.
8858 Always insert a range check that requires runtime evaluation into
8861 2014-02-25 Robert Dewar <dewar@adacore.com>
8863 * sem_attr.adb, sem_ch6.adb, par-ch3.adb: Minor reformatting.
8865 2014-02-25 Bob Duff <duff@adacore.com>
8867 * s-tassta.adb (Finalize_Global_Tasks): Limit the number of loop
8868 iterations while waiting for independent tasks to terminate;
8869 if an independent task does not terminate, we do not want to
8870 hang here. In that case, the thread will be terminated when the
8872 * s-taprop-linux.adb (Abort_Task): Fix Assert to allow for ESRCH.
8874 2014-02-25 Ed Schonberg <schonberg@adacore.com>
8876 * sem_prag.adb (Check_SPARK_Aspect_For_ASIS): New subprogram,
8877 used to perform pre-analysis of the expression for SPARK
8878 aspects that have a non-standard syntax, such as GLobal and
8879 Initializes. The procedure applies to the original expression
8880 in an aspect specification, prior to the analysis of the
8881 corresponding pragma, in order to provide semantic information
8882 for ASIS navigation purposes.
8883 (Analyze_Global_In_Decl_List, Analyze_Initializes_In_Decl_Part):
8884 Call new subprogram.
8886 2014-02-25 Yannick Moy <moy@adacore.com>
8888 * sem_prag.adb: Remove obsolete reference to SPARK RM in error message.
8890 2014-02-25 Doug Rupp <rupp@adacore.com>
8892 * init.c (HAVE_GNAT_ADJUST_CONTEXT_FOR_RAISE): Enable for ARM.
8893 (__gnat_adjust_context_for_raise): Bump the PC by 2.
8895 2014-02-25 Ed Schonberg <schonberg@adacore.com>
8897 * par-ch3.adb (P_Basic_Declarative_Items): In the case of a
8898 misplaced IS, add a statement sequence to improper body only if
8899 one has not been parsed already.
8901 2014-02-25 Ed Schonberg <schonberg@adacore.com>
8903 * sem_attr.adb (Analyze_Attribute, case 'Update): Check for
8904 mismatch when multidimensional array is updated with a single
8907 2014-02-25 Yannick Moy <moy@adacore.com>
8909 * sem_ch3.adb, sem_ch5.adb, sem_prag.adb, sem_attr.adb, errout.ads,
8910 sem_ch6.adb: Mark most references to SPARK RM in error messages
8913 2014-02-24 Ed Schonberg <schonberg@adacore.com>
8915 * par-ch3.adb (P_Basic_Declarative_Items): If an improper body
8916 appears in a list of basic declarations, complete the tree with
8917 an empty statement list, to prevent cascaded errors and crashes
8918 if semantic analysis is attempted.
8920 2014-02-24 Thomas Quinot <quinot@adacore.com>
8922 * g-sercom-mingw.adb (Open): Fix incorrect test for error return
8924 * erroutc.adb: Minor reformatting.
8926 2014-02-24 Hristian Kirtchev <kirtchev@adacore.com>
8928 * sem_prag.adb (Check_Clause_Syntax): Account
8929 for a solitary input item in a dependency list.
8931 2014-02-24 Yannick Moy <moy@adacore.com>
8933 * gnat1drv.adb (Adjust_Global_Switches): Do not
8934 use validity checks at all in GNATprove_Mode.
8936 2014-02-24 Robert Dewar <dewar@adacore.com>
8938 * g-sercom-mingw.adb, g-sercom-linux.adb, sem_prag.adb, freeze.adb,
8939 atree.adb, atree.ads: Minor reformatting.
8941 2014-02-24 Hristian Kirtchev <kirtchev@adacore.com>
8943 * sem_ch6.adb (Analyze_Subprogram_Body_Contract): Do not enforce
8944 global and dependence refinement when SPARK_Mode is off.
8945 * sem_ch7.adb (Analyze_Package_Body_Contract): Do not enforce
8946 state refinement when SPARK_Mode is off.
8947 * sem_ch13.adb (Analyze_Aspect_Specifications): Add local
8948 variable Decl. Insert the generated pragma for Refined_State
8949 after a potential pragma SPARK_Mode.
8950 * sem_prag.adb (Analyze_Depends_In_Decl_Part): Add local
8951 constant Deps. Remove local variable Expr. Check the syntax
8952 of pragma Depends when SPARK_Mode is off. Factor out the
8953 processing for extra parenthesis around individual clauses.
8954 (Analyze_Global_In_Decl_List): Items is now a constant. Check
8955 the syntax of pragma Global when SPARK_Mode is off.
8956 (Analyze_Initializes_In_Decl_Part): Check the syntax of pragma
8957 Initializes when SPARK_Mode is off.
8958 (Analyze_Part_Of): Check
8959 the syntax of the encapsulating state when SPARK_Mode is off.
8960 (Analyze_Pragma): Check the syntax of pragma Abstract_State when
8961 SPARK_Mode is off. Move the declaration order check with respect
8962 to pragma Initializes to the end of the processing. Do not verify
8963 the declaration order for pragma Initial_Condition when SPARK_Mode
8964 is off. Do not complain about a useless package refinement when
8966 (Analyze_Refined_Depends_In_Decl_Part): Refs
8967 is now a constant. Check the syntax of pragma Refined_Depends
8968 when SPARK_Mode is off.
8969 (Analyze_Refined_Global_In_Decl_Part):
8970 Check the syntax of pragma Refined_Global when SPARK_Mode is off.
8971 (Analyze_Refined_State_In_Decl_Part): Check the syntax of pragma
8972 Refined_State when SPARK_Mode is off.
8973 (Check_Dependence_List_Syntax): New routine.
8974 (Check_Global_List_Syntax): New routine.
8975 (Check_Initialization_List_Syntax): New routine.
8976 (Check_Item_Syntax): New routine.
8977 (Check_State_Declaration_Syntax): New routine.
8978 (Check_Refinement_List_Syntax): New routine.
8979 (Has_Extra_Parentheses): Moved to the top level of Sem_Prag.
8981 2014-02-24 Robert Dewar <dewar@adacore.com>
8983 * a-tags.adb, s-os_lib.adb: Minor reformatting.
8985 2014-02-24 Thomas Quinot <quinot@adacore.com>
8987 * g-sercom-mingw.adb, g-sercom-linux.adb (Raise_Error): Include
8988 strerror message, not just numeric errno value.
8990 2014-02-24 Doug Rupp <rupp@adacore.com>
8992 * raise-gcc.c (exception_class_eq): Make endian neutral.
8994 2014-02-24 Ed Schonberg <schonberg@adacore.com>
8996 * atree.ads, atree,adb (Copy_Separate_Tree): Remove Syntax_Only
8997 flag, and reset Etype and Analyzed attributes unconditionally
8998 when copying a tree that may be partly analyzed.
8999 * freeze.adb: Change calls to Copy_Separate_Tree accordingly.
9000 * sem_ch6.adb (Check_Inline_Pragma): If the Inline pragma appears
9001 within a subprogram body and applies to it, remove it from the
9002 body before making a copy of it, to prevent spurious errors when
9003 analyzing the copied body.
9005 2014-02-24 Thomas Quinot <quinot@adacore.com>
9007 * s-os_lib.adb (Errno_Message): Do not depend on Integer'Image.
9008 * s-oscons-tmplt.c: On VxWorks, include adaint.h only after
9009 vxWorks.h has been included. Also ensure that file attributes
9010 related definitions are output even in cases where socket support
9012 * a-tags.adb: Code clean up.
9013 * Make-generated.in (OSCONS_CPP, OSCONS_EXTRACT): Use -iquote
9014 instead of -I to add the main ada source directory to the header
9015 search path, in order to avoid conflict between our own "types.h"
9016 and VxWork's <types.h>.
9018 2014-02-24 Robert Dewar <dewar@adacore.com>
9020 * atree.ads, atree.adb (Copy_Separate_Tree): Add Syntax_Only parameter.
9021 * debug.adb: Remove documentation of -gnatd.X, no longer used.
9022 * freeze.adb (Wrap_Imported_Subprogram): Fixed and activated.
9024 2014-02-24 Bob Duff <duff@adacore.com>
9026 * gnat_ugn.texi: Improve documentation of gnatpp.
9028 2014-02-24 Thomas Quinot <quinot@adacore.com>
9030 * g-stheme.adb, g-socthi-vms.adb, g-socthi-vms.ads,
9031 g-socthi-vxworks.adb, g-socthi-vxworks.ads, g-stseme.adb,
9032 g-socthi-mingw.adb, g-socthi-mingw.ads, g-socthi.adb,
9033 g-socthi.ads, g-socket.adb (Host_Error_Message): Return a string, not
9034 a chars_ptr, because on Windows this is a renaming of
9035 Socket_Error_Message.
9037 2014-02-24 Robert Dewar <dewar@adacore.com>
9039 * a-direct.adb, sem_ch5.adb, a-cfdlli.adb, a-cfhase.adb, a-tags.adb,
9040 s-filatt.ads, a-cforma.adb, sem_ch6.adb, g-socthi-mingw.adb,
9041 a-cfhama.adb, a-cforse.adb, a-cofove.adb: Minor reformatting and code
9044 2014-02-24 Thomas Quinot <quinot@adacore.com>
9046 * Make-generated.in (OSCONS_CPP, OSCONS_EXTRACT): Make sure
9047 that the source directory containing s-oscons-tmplt.c is on the
9048 include path, so that all internal header files are available.
9050 2014-02-24 Ed Schonberg <schonberg@adacore.com>
9052 * sem_ch5.adb (Analyze_Loop_Parameter_Specification): If the
9053 domain of iteration is an attribute reference 'Old, this is an
9054 Ada 2012 iterator and the loop must be rewritten as such.
9056 2014-02-24 Thomas Quinot <quinot@adacore.com>
9058 * s-fileio.adb (Errno_Message): Remove, use shared version from
9060 * s-crtrun.ads, Makefile.rtl: Remove now unused unit.
9061 * g-stseme (Socket_Error_Message): Reimplement in terms of new
9063 * g-socthi.ads, g-socthi.adb: Change profile of
9064 Socket_Error_Message to return String to allow the above.
9065 * g-socket.adb, g-socthi-mingw.adb, g-socthi-mingw.ads,
9066 * g-socthi-vms.adb, g-socthi-vms.ads, g-socthi-vxworks.adb,
9067 * g-socthi-vxworks.ads: Update to account for the above profile
9069 * a-tags.adb: Use strlen builtin binding provided by s-crtl.
9070 * s-crtl.ads (strncpy): New procedure.
9071 * s-os_lib.adb (Copy_Attributes): Import just once (strncpy):
9072 Use import from s-crtl.
9073 * a-envvar.adb, osint.adb: Use imports of C runtime functions
9074 from s-crtl instead of re-importing locally.
9076 2014-02-24 Hristian Kirtchev <kirtchev@adacore.com>
9078 * sem_prag.adb (Analyze_Global_Item): Emit the
9079 variable related checks concerning volatile objects only when
9082 2014-02-24 Robert Dewar <dewar@adacore.com>
9084 * sem_ch5.adb (Analyze_Iterator_Specification): use
9085 Error_Msg_Ada_2012_Feature.
9087 2014-02-24 Jose Ruiz <ruiz@adacore.com>
9089 * s-rident.ads (Profile_Info): For Ravenscar, the restrictions
9090 No_Local_Timing_Events and No_Specific_Termination_Handlers
9091 must be set, according to the Ravenscar profile definition
9094 2014-02-24 Ed Schonberg <schonberg@adacore.com>
9096 * sem_ch6.adb (Analyze_Expression_Function): If this is a
9097 completion, freeze return type and its designated type if needed.
9099 2014-02-24 Thomas Quinot <quinot@adacore.com>
9101 * sem_ch13.adb (Analyze_Attribute_Definition_Clause, case
9102 'Address): When moving initialization statements to a freeze
9103 entity, keep them under a single node (i.e. do not unwrap
9104 expressions with actions), and set the Initialization_Statements
9105 attribute again so that processing of a later pragma Import can
9108 2014-02-24 Claire Dross <dross@adacore.com>
9110 * a-cfdlli.adb, a-cfdlli.ads, a-cfhama.adb, a-cfhama.ads,
9111 a-cfhase.adb, a-cfhase.ads, a-cforma.adb, a-cforma.ads,
9112 a-cforse.adb, a-cforse.ads, a-cofove.adb, a-cofove.ads: Rename
9113 Left/Right to First_To_Previous/Current_To_Last.
9115 2014-02-24 Thomas Quinot <quinot@adacore.com>
9117 * adaint.h (struct file_attributes): New component "error"
9118 (__gnat_error_attributes): Accessor for the above.
9119 * adaint.c (__gnat_error_attributes): New subprogram
9120 (__gnat_stat): Fix returned value (expect errno value)
9121 (__gnat_stat_to_attr): Add management of error component (set to
9122 stat errno value, except for missing files where it is set to 0,
9123 and exists is set to 0).
9124 * osint.ads (File_Attributes_Size): Update per change above,
9125 also clarify documentation.
9126 * s-filatt.ads: New file, binding to file attributes related
9128 * Makefile.rtl (s-filatt): New runtime unit.
9129 * s-crtl.ads (strlen): Expose binding to GCC builtin (falls back
9130 to library function if not available on target).
9131 * s-os_lib.ads, s-os_lib.adb (Errno_Message): New subprogram.
9132 * s-oscons-tmplt.c (SIZEOF_struct_file_attributes,
9133 SIZEOF_struct_dirent_alloc): New constants.
9134 * Make-generated.in (s-oscons.ads): Now requires adaint.h.
9135 * a-direct.adb (Fetch_Next_Entry): Fix incorrect buffer sizes.
9136 Perform appropriate error checking if stat fails (do not just
9137 ignore existing files if stat fails)
9138 * gcc-interface/Make-lang.in (GNAT_ADA_OBJS, GNATBIND_OBJS): Update
9141 2014-02-24 Hristian Kirtchev <kirtchev@adacore.com>
9143 * sem_prag.adb (Analyze_Global_Item): Move the check concerning
9144 the use of volatile objects as global items in a function to
9145 the variable related checks section.
9146 * sem_util.adb (Async_Readers_Enabled): Directly call
9147 Has_Enabled_Property.
9148 (Async_Writers_Enabled): Directly call Has_Enabled_Property.
9149 (Effective_Reads_Enabled): Directly call Has_Enabled_Property.
9150 (Effective_Writes_Enabled): Directly call Has_Enabled_Property.
9151 (Has_Enabled_Property): Rename formal parameter State_Id to Item_Id.
9152 Update the comment on usage. State_Has_Enabled_Property how handles
9153 the original logic of the routine. Add processing for variables.
9154 (State_Has_Enabled_Property): New routine.
9155 (Variable_Has_Enabled_Property): New routine.
9157 2014-02-24 Robert Dewar <dewar@adacore.com>
9159 * sinfo.ads, sem_ch12.adb, sem_res.adb, sem_ch4.adb, par-ch12.adb:
9161 * atree.ads, atree.adb (Node35): New function.
9162 (Set_Node35): New procedure.
9163 * debug.adb: Define new debug flag -gnatd.X.
9164 * einfo.ads, einfo.adb (Import_Pragma): New field.
9165 * freeze.adb (Wrap_Imported_Procedure): New procedure (not
9166 really active yet, has to be activated with -gnatd.X.
9167 * sem_prag.adb (Set_Imported): Set new Import_Pragma
9168 field (Set_Imported): Don't set Is_Public (see
9169 Freeze.Wrap_Imported_Subprogram)
9170 * par-ch3.adb (P_Component_List): Handle unexpected null component.
9172 2014-02-24 Yannick Moy <moy@adacore.com>
9174 * sem_ch3.adb: Correct reference to SPARK RM in error messages.
9175 * gnat_rm.texi: Correct documentation of attribute Update.
9177 2014-02-24 Ed Schonberg <schonberg@adacore.com>
9179 * sem_ch5.adb (Analyze_Iterator_Specification): Reject container
9180 iterator in older versions of Ada.
9182 2014-02-24 Gary Dismukes <dismukes@adacore.com>
9184 * sem_ch5.adb, sem_aux.ads, sem_ch12.adb, gnat_ugn.texi, par.adb,
9185 par-ch12.adb: Change spelling 'parametrization' to 'parameterization'.
9187 2014-02-24 Ed Schonberg <schonberg@adacore.com>
9189 * sinfo.ads, sinfo.adb: New attribute Generalized_Indexing, for
9190 indexed_components that are instances of Ada 2012 container
9191 indexing operations. Analysis and resolution of such nodes
9192 is performed on the attribute, and the original source is
9193 preserved for ASIS operations. If expansion is enabled, the
9194 indexed component is replaced by the value of this attribute,
9195 which is in a call to an Indexing aspect, in most case wrapped
9196 in a dereference operation.
9197 * sem_ch4.adb (Analyze_Indexed_Component): Create
9198 Generalized_Indexing attribute when appropriate.
9199 (Analyze_Call): If prefix is not overloadable and has an indexing
9200 aspect, transform into an indexed component so it can be analyzed
9201 as a potential container indexing.
9202 (Analyze_Expression): If node is an indexed component with a
9203 Generalized_ Indexing, do not re-analyze.
9204 * sem_res.adb (Resolve_Generalized_Indexing): Complete resolution
9205 of an indexed_component that has been transformed into a container
9207 (Resolve_Indexed_Component): Call the above when required.
9208 (Resolve): Do not insert an explicit dereference operation on
9209 an indexed_component whose type has an implicit dereference:
9210 the operation is inserted when resolving the related
9211 Generalized_Indexing.
9213 2014-02-24 Olivier Ramonat <ramonat@adacore.com>
9215 * gnat_rm.texi, gnat_ugn.texi: Replace Ada Compiler by Ada Development
9218 2014-02-24 Hristian Kirtchev <kirtchev@adacore.com>
9220 * sem_prag.adb (Check_Constituent_Usage): Remove leading spaces in
9222 (Inconsistent_Mode_Error): Remove leading spaces in error messages.
9223 Merge the expected and available mode errors.
9224 (Report_Unused_Constituents): Remove leading spaces in error messages.
9225 (Report_Unused_States): Remove leading spaces in error messages.
9227 2014-02-24 Thomas Quinot <quinot@adacore.com>
9229 * par_sco.adb (Traverse_One): Refine categorization of statement
9232 2014-02-24 Robert Dewar <dewar@adacore.com>
9234 * aspects.ads, aspects.adb: Remove aspects Ada_2005 and Ada_2012,
9235 Pure_05, Pure_12 and Preelaborate_05.
9236 * gnat_rm.texi: Update accordingly.
9237 * sem_prag.adb: Document one argument form of Ada_05/Ada_2005
9238 pragmas Document one argument form of Ada_12/Ada_2012 pragmas
9239 Recognize one argument form of these pragmas only in GNAT mode
9242 2014-02-24 Ed Schonberg <schonberg@adacore.com>
9244 * s-dimmks.ads: Replace symbol for temperature, previously the
9245 Greek letter Theta, by the ASCII @ sign.
9246 * s-diflio.ads: ditto.
9248 2014-02-24 Robert Dewar <dewar@adacore.com>
9250 * exp_ch4.adb: Minor code reorganization (use OR for boolean
9252 * sem_ch3.adb, sem_prag.adb, freeze.adb: Minor reformatting.
9254 2014-02-24 Ben Brosgol <brosgol@adacore.com>
9256 * gnat_ugn.texi, projects.texi: Added the necessary conditionalization
9257 so that references to gnatmem and ASIS tools do not appear in the FSF
9258 edition of the GNAT User's Guide.
9260 2014-02-24 Yannick Moy <moy@adacore.com>
9262 * freeze.adb (Freeze_Entity): Do not issue warning
9263 for pre/post being ignored on imported subprogram in GNATprove
9266 2014-02-24 Robert Dewar <dewar@adacore.com>
9268 * exp_ch5.adb, sem_ch5.adb, sem_type.adb, sem_res.adb, sem_attr.adb,
9269 stand.ads, sem_eval.adb: Minor reformatting.
9271 2014-02-24 Yannick Moy <moy@adacore.com>
9273 * sem_prag.adb: Minor rewording in error message.
9275 2014-02-24 Johannes Kanig <kanig@adacore.com>
9277 * exp_util.adb (Expand_Subtype_From_Expr): Do not expand subtypes in
9278 GNATprove_mode, gnat2why doesn't need nor use these types.
9280 2014-02-24 Gary Dismukes <dismukes@adacore.com>
9282 * exp_ch4.adb (Expand_N_Op_Expon): On the AAMP
9283 target, in the case of signed integer exponentiation that uses a
9284 run-time routine, always select the Exp_* versions, since overflow
9285 checking is automatically done by AAMP arithmetic instructions.
9287 2014-02-24 Hristian Kirtchev <kirtchev@adacore.com>
9289 * sem_ch13.adb (Analyze_Aspect_Specifications):
9290 When the related context is a package instace, insert pragma
9291 Abstract_State after all internally-generated renamings related
9292 to the instance "header".
9294 2014-02-24 Ed Schonberg <schonberg@adacore.com>
9296 * sem_ch3.adb (Analyze_Declarations): Analyze Contract of abstract
9298 * sem_disp.adb (Check_Dispatching_Context): A non-dispatching
9299 call to an abstract subprogram is legal if it appears in a
9300 pre/postcondition of another abstract operation.
9302 2014-02-24 Sergey Rybin <rybin@adacore.com frybin>
9304 * gnat_ugn.texi: Misc updates.
9306 2014-02-24 Hristian Kirtchev <kirtchev@adacore.com>
9308 * exp_prag.adb (Expand_Old): Set the type of the generated temporary.
9310 2014-02-24 Gary Dismukes <dismukes@adacore.com>
9312 * layout.adb (Layout_Variant_Record): Instantiate
9313 Generic_Check_Choices and call Check_Choices before calling
9314 Build_Discr_Checking_Funcs, since we need Others_Discrete_Choices
9315 set to prevent generating incorrect discriminant-checking
9316 functions for 'others' variants (functions that unconditionally
9317 return True rather than accounting for the values covered by the
9319 * sem_eval.ads (Subtypes_Statically_Compatible): Add formal
9320 Formal_Derived_Matching.
9321 (Subtypes_Statically_Match): Add formal Formal_Derived_Matching.
9322 * sem_eval.adb (Subtypes_Statically_Compatible): Pass new
9323 Formal_Derived_Matching formal to Subtypes_Statically_Match.
9324 (Subtypes_Statically_Match): Suppress the Object_Size matching
9325 test in the case where Formal_Derived_Matching is True.
9326 * sem_ch12.adb (Validate_Derived_Type_Instance): Pass
9327 True for Formal_Derived_Matching_Formal on the call to
9328 Subtypes_Statically_Compatible.
9330 2014-02-23 Eric Botcazou <ebotcazou@adacore.com>
9332 * gcc-interface/Make-lang.in (ADA_TOOLS_FLAGS_TO_PASS): Robustify.
9334 2014-02-23 Eric Botcazou <ebotcazou@adacore.com>
9336 * gcc-interface/utils2.c (build_simple_component_ref): Fix formatting.
9337 Look through a conversion between original and packable version to get
9339 (build_component_ref): Rework comment and fix formatting.
9341 2014-02-20 Sergey Rybin <rybin@adacore.com frybin>
9343 * gnat_ugn.texi, vms_data.ads (gnatelim): Add description of
9344 project-specific options.
9346 2014-02-20 Ed Schonberg <schonberg@adacore.com>
9348 * a-cbdlli.adb (Insert): When capacity exceeded, raise Capacity_Error,
9349 not Constraint_Error.
9350 * a-cbmutr.adb (Append_Child, Insert_Child, Prepend_Child): Ditto.
9351 * sem_ch5.adb: Code clean up.
9353 2014-02-20 Hristian Kirtchev <kirtchev@adacore.com>
9355 * sem_prag.adb (Usage_Error): Remove local
9356 constant Typ. Remove the specialized diagnostics for unconstrained
9357 or tagged items as those are not part of the explicit input set
9358 of the related subprogram and should not be flagged.
9360 2014-02-20 Ed Schonberg <schonberg@adacore.com>
9362 * sem_attr.adb: Add guard to preserve all errors.
9364 2014-02-20 Vincent Celier <celier@adacore.com>
9366 * switch-m.adb (Normalize_Compiler_Switches): Take into account
9367 switches that are recorded in ALI files: -gnateA, -gnateE,
9368 -gnateF, -gnateinn, -gnateu, -gnateV and -gnateY.
9370 2014-02-20 Ed Schonberg <schonberg@adacore.com>
9372 * sem_ch5.adb (Analyze_Iterator_Specification): Check legality
9373 of an element iterator form over a formal container with an
9375 * exp_ch5.adb (Build_Formal_Container_Iteration): Utility
9376 to create declaration and loop statements for both forms of
9377 container iterators.
9378 (Expand_Formal_Container_Element_Iterator): New procedure
9379 to handle loops of the form "for E of C" when C is a formal
9381 (Expand_Formal_Container_Iterator): Code cleanup.
9383 2014-02-20 Hristian Kirtchev <kirtchev@adacore.com>
9385 * sem_prag.adb (Add_Item_To_Name_Buffer): New routine.
9386 (Analyze_Contract_Case): Remove the use of
9387 "may". Replace "aspect Contract_Cases" to avoid categorization
9388 of aspect vs pragma.
9389 (Analyze_External_Property_In_Decl_Part): Remove the use of "formal".
9390 (Analyze_Global_Item): Remove
9391 the use of "formal", specify the subprogram. Split the
9392 error message about a state with visible refinement into
9393 two. Remove the use of "global" from "volatile global item".
9394 (Analyze_Initialization_Item): Ensure that the SPARK RM reference
9396 (Analyze_Input_Output): Update the call to
9397 Check_Mode. Specify the duplicated item. Reword the error
9398 message concerning an input of a null output list. Use "\"
9399 for error message continuation.
9400 (Analyze_Part_Of): Remove
9401 the use of "may". Use "\" for error message continuation.
9402 (Analyze_Refined_Depends_In_Decl_Part): Update the error
9403 message concerning a useless refinement to match the format
9405 (Analyze_Refined_Global_In_Decl_Part): Reword the error message
9406 concerning a useless refinement.
9407 (Analyze_Refinement_Clause): Use "\" for error message continuation.
9408 (Check_Constituent_Usage): Use "\" for error message continuation.
9409 (Check_Dependency_Clause): Use "\" for error message continuation.
9410 (Check_Matching_Constituent): Use "\" for error message continuation.
9411 (Check_Missing_Part_Of): Use "\" for error message continuation.
9412 (Check_Mode): Renamed to
9413 Check_Role. Update the comment on usage. Redo the error reporting
9415 (Check_Mode_Restriction_In_Enclosing_Context): Use "\" for error
9416 message continuation.
9417 (Find_Mode): Renamed to Find_Role. Update the parameter profile along
9418 with comment on usage. Update all occurrences of Is_Input and Is_Output.
9419 (Inconsistent_Mode_Error): Use "\" for error message continuation.
9420 (Input_Match): Use "\" for error message continuation.
9421 (Role_Error): New routine.
9422 (Set_Convention_From_Pragma): Use "\" for error message continuation.
9423 (Usage_Error): Add local variable Error_Msg. Build specialized error
9424 message showcasing the offending item kind. Redo the diagnostics for
9425 unconstrained types.
9427 2014-02-20 Ed Schonberg <schonberg@adacore.com>
9429 * exp_util.adb (Is_Iterated_Container): Use high-level primitives
9430 to determine whether a type is a container type, rather than
9431 examining only its type declaration, so that subtypes and derived
9432 types are handled properly.
9434 2014-02-20 Sergey Rybin <rybin@adacore.com frybin>
9436 * gnat_ugn.texi: gnatmetric: add description of project-specific
9439 2014-02-20 Ed Schonberg <schonberg@adacore.com>
9441 * sem_attr.adb (Analyze_Attribute, case 'Update): Verify that
9442 all choices in an association for a record type have the same
9443 type, as is done for record aggregates.
9445 2014-02-20 Robert Dewar <dewar@adacore.com>
9447 * a-cborma.adb, a-cbhama.adb, a-cbdlli.adb, a-cbmutr.adb: Use pragma
9448 Unmodified rather than Warnings (Off). Make comments
9449 uniform in the four affected units.
9451 2014-02-20 Robert Dewar <dewar@adacore.com>
9453 * sem_ch13.adb (Analyze_Attribute_Definition_Clause, case
9454 Object_Size): For non-scalar types allow any value that is a
9456 * gnat_rm.texi: Document Object_Size for composites more clearly.
9458 2014-02-20 Yannick Moy <moy@adacore.com>
9460 * sem_util.ads, sem_util.adb (Default_Initialization): Remove function.
9462 2014-02-20 Ed Schonberg <schonberg@adacore.com>
9464 * stand.ads: Raise_Type: new predefined entity, used as the type
9465 of a Raise_Expression prior to resolution.
9466 * cstand.adb: Build entity for Raise_Type.
9467 * sem_ch11.adb (Analyze_Raise_Expression): use Raise_Type as the
9468 initial type of the node.
9469 * sem_type.adb (Covers): Raise_Type is compatible with all
9471 * sem_res.adb (Resolve): Remove special handling of Any_Type on
9472 Raise_Expression nodes.
9473 (Resolve_Raise_Expression): Signal ambiguity if the type of the
9474 context is still Raise_Type.
9476 2014-02-20 Robert Dewar <dewar@adacore.com>
9478 * sem_ch12.adb (Validate_Access_Type_Instance): Add message if
9479 mismatching predicates.
9480 * sem_ch6.adb (Check_Conformance): Give better messages on
9482 * sem_eval.adb (Predicates_Match): Move to spec.
9483 * sem_eval.ads (Predicates_Match): Moved here from body.
9485 2014-02-20 Ed Schonberg <schonberg@adacore.com>
9487 * a-cbmutr.adb: Use default value in Insert_Child.
9489 2014-02-20 Vincent Celier <celier@adacore.com>
9491 * gnatcmd.adb, make.adb, prj-makr.adb, clean.adb: Call
9492 Stringt.Initialize in all project aware tools.
9494 2014-02-20 Doug Rupp <rupp@adacore.com>
9496 * gnat_ugn.texi: Document gnatbind -X option.
9497 * vms_data.ads: Minor warnings documentation reformatting.
9499 2014-02-20 Ed Schonberg <schonberg@adacore.com>
9501 * exp_ch3.adb (Expand_Freeze_Array_Type): Only create invariant
9502 procedure for a base type.
9504 2014-02-20 Robert Dewar <dewar@adacore.com>
9506 * sem_ch4.adb (Analyze_Case_Expression): Get type from first
9507 expression with type info.
9508 * sem_ch13.adb: Minor reformatting.
9509 * sem_eval.adb (Subtypes_Statically_Match): Make sure we return
9510 False if predicates do not match on the two types.
9512 2014-02-20 Arnaud Charlet <charlet@adacore.com>
9514 * sem_prag.adb (Analyze_Pragma [pragma Attach_Handler]):
9515 In Relaxed_RM_Semantics mode, allow any static integer value,
9516 for compatibility with other compilers.
9518 2014-02-20 Vincent Celier <celier@adacore.com>
9520 * errutil.adb (Initialize): Properly initialize entry in table
9521 Warnings when warnings are suppressed.
9523 2014-02-20 Robert Dewar <dewar@adacore.com>
9525 * s-os_lib.ads: Add warning about non-portability of Rename_File.
9526 * sem_util.ads, sem_util.adb (Is_Junk_Name): New function.
9527 * sem_warn.adb: Use Is_Junk_Name to suppress some warnings.
9528 * gnat_ugn.texi: Document no warnings on junk variable names.
9529 * layout.adb: Minor code reorganization (use Ekind_In).
9530 * stringt.adb: Move initialization of Null_String_Id to Initialize
9533 2014-02-20 Ed Schonberg <schonberg@adacore.com>
9535 * sem_ch13.adb: Initialize optional Element_Id.
9537 2014-02-20 Robert Dewar <dewar@adacore.com>
9539 * s-os_lib.ads (Rename_File): Minor commment addition.
9541 2014-02-20 Thomas Quinot <quinot@adacore.com>
9543 * einfo.ads: Minor reformatting.
9545 2014-02-20 Hristian Kirtchev <kirtchev@adacore.com>
9547 * aspects.adb (Exchange_Aspects): New routine.
9548 * aspects.ads (Exchange_Aspects): New routine.
9549 * atree.adb (Rewrite): Do not check whether the save node has
9550 aspects as it never will, instead check the node about to be clobbered.
9551 * einfo.adb (Write_Field25_Name): Abstract_States can appear in
9552 entities of generic packages.
9553 * sem_ch6.adb (Analyze_Expression_Function): Fix the parent
9554 pointer of an aspect specification list after rewriting takes place.
9555 * sem_ch7.adb (Analyze_Package_Body_Helper): Swap the aspect
9556 specifications of the generic template and the copy used for analysis.
9557 * sem_ch12.adb (Analyze_Generic_Package_Declaration): Swap
9558 the aspect specifications of the generic template and the
9559 copy used for analysis.
9560 (Analyze_Package_Instantiation): Propagate the aspect specifications
9561 from the generic template to the instantiation.
9562 (Build_Instance_Compilation_Unit_Nodes): Propagate the aspect
9563 specifications from the generic template to the instantiation.
9564 * sem_ch13.adb (Analyze_Aspect_Specifications): Handle aspects
9565 Abstract_State, Initializes and Initial_Condition when they
9566 apply to a package instantiation.
9568 2014-02-20 Robert Dewar <dewar@adacore.com>
9570 * stringt.adb: Add call to Initialize in package initialization.
9572 2014-02-20 Robert Dewar <dewar@adacore.com>
9574 * a-crbtgk.adb, a-cihama.adb, a-coinve.adb, a-ciorse.adb, a-crbtgo.adb,
9575 a-cidlli.adb, a-cimutr.adb, a-cihase.adb, a-cohama.adb, a-coorse.adb,
9576 a-chtgke.adb, a-chtgop.adb, a-comutr.adb, a-ciorma.adb, a-cobove.adb,
9577 a-convec.adb, a-cohase.adb, a-chtgbk.adb, a-chtgbo.adb: Minor
9580 2014-02-20 Bob Duff <duff@adacore.com>
9582 * s-os_lib.ads: Minor: Remove incorrect comment.
9584 2014-02-20 Robert Dewar <dewar@adacore.com>
9586 * sem_elab.adb (Check_Elab_Assign): Clearer warning message.
9588 2014-02-20 Ed Schonberg <schonberg@adacore.com>
9590 * a-cborma.adb (Assign): When creating a node without a specified
9591 element, insert an uninitialized element in the map, because
9592 the instance may provide an element type with a default
9593 initialization, e.g a scalar with a Default_Value aspect.
9594 * a-cbhama.adb (Assign_Key): Remove useless Allocate procedure.
9595 (Insert): In the version without explicit element, provide an
9596 uninitialized element, as above.
9597 * a-cbdlli.adb (Append): In the version without explicit element,
9598 provide an uninitalized element, as above.
9599 (Allocate): Remove unused version.
9601 2014-02-20 Robert Dewar <dewar@adacore.com>
9603 * sem_elab.adb: Minor code reorganization (use Nkind_In).
9604 * stringt.adb: Remove temporary pragma Warnings (Off).
9605 * stringt.ads: Add pragma Elaborate_Body to ensure initialization
9608 2014-02-20 Matthew Heaney <heaney@adacore.com>
9610 * a-chtgbk.adb (Replace): Use correct offset when calculating bucket
9613 2014-02-20 Ed Schonberg <schonberg@adacore.com>
9615 * sem_ch5.adb (Analyze_Iterator_Specification): Initialize
9616 properly the cursor type for subsequent volatile testing in SPARK
9617 mode, when domain is a formal container with an Iterabe aspect.
9619 2014-02-20 Robert Dewar <dewar@adacore.com>
9621 * errout.adb (Set_Warnings_Mode_Off): Add Reason argument.
9622 (Set_Specific_Warning_Off): Add Reason argument.
9623 * errout.ads (Set_Warnings_Mode_Off): Add Reason argument.
9624 (Set_Specific_Warning_Off): Add Reason argument.
9625 * erroutc.adb (Warnings_Entry): Add Reason field
9626 (Specific_Warning_Entry): Add Reason field.
9627 (Warnings_Suppressed): return String_Id for Reason.
9628 (Warning_Specifically_Suppressed): return String_Id for Reason.
9629 * erroutc.ads (Warnings_Entry): Add Reason field.
9630 (Specific_Warning_Entry): Add Reason field.
9631 (Set_Specific_Warning_Off): Add Reason argument.
9632 (Set_Warnings_Mode_Off): Add Reason argument.
9633 (Warnings_Suppressed): return String_Id for Reason.
9634 (Warning_Specifically_Suppressed): return String_Id for Reason.
9635 * errutil.adb (Warnings_Suppressed): returns String_Id for Reason
9636 (Warning_Specifically_Suppressed): returns String_Id for Reason
9637 * gnat_rm.texi: Document that Warning parameter is string literal
9638 or a concatenation of string literals.
9639 * par-prag.adb: New handling for Reason argument.
9640 * sem_prag.adb (Analyze_Pragma, case Warning): New handling
9641 for Reason argument.
9642 * sem_util.ads, sem_util.adb (Get_Reason_String): New procedure.
9643 * sem_warn.ads (Warnings_Off_Entry): Add reason field.
9644 * stringt.adb: Set Null_String_Id.
9645 * stringt.ads (Null_String_Id): New constant.
9647 2014-02-20 Robert Dewar <dewar@adacore.com>
9649 * einfo.ads: Minor comment addition: Etype of package is
9651 * checks.adb, exp_aggr.adb, exp_atag.adb, exp_attr.adb, exp_ch13.adb,
9652 exp_ch2.adb, exp_ch3.adb, exp_ch4.adb, exp_ch5.adb, exp_ch6.adb,
9653 exp_ch7.adb, exp_ch9.adb, exp_dbug.adb, exp_disp.adb, exp_imgv.adb,
9654 exp_intr.adb, exp_prag.adb, exp_sel.adb, exp_strm.adb, exp_util.adb,
9655 freeze.adb, rtsfind.adb, sem_aggr.adb, sem_attr.adb, sem_ch10.adb,
9656 sem_ch12.adb, sem_ch13.adb, sem_ch3.adb, sem_ch4.adb, sem_ch5.adb,
9657 sem_ch6.adb, sem_ch8.adb, sem_dim.adb, sem_prag.adb, sem_res.adb,
9658 sem_util.adb, tbuild.adb, tbuild.ads: Remove New_Reference_To.
9659 Replace all calls with calls to New_Occurrence_Of.
9661 2014-02-20 Robert Dewar <dewar@adacore.com>
9663 * par-util.adb (Ignore, case of right paren): Make this a
9666 2014-02-19 Robert Dewar <dewar@adacore.com>
9668 * sem_ch5.adb, sem_prag.adb, sem_attr.adb: Minor reformatting.
9669 * debug.adb: Remove -gnatd.X switch, no longer used.
9670 * styleg.adb (Check_Then): Remove check of -gnatd.X, check is
9673 2014-02-19 Bob Duff <duff@adacore.com>
9675 * g-socket.ads: Minor: Correct some comments.
9677 2014-02-19 Ed Schonberg <schonberg@adacore.com>
9679 * sem_ch5.adb: Inhibit iterator rewriting in ASIS mode.
9681 2014-02-19 Arnaud Charlet <charlet@adacore.com>
9683 * sem_ch13.adb (Analyze_Aspect_Specifications): Do not generate
9684 an error on out of range priorities if Relaxed_RM_Semantics.
9685 * sem_prag.adb (Analyze_Pragma): Ditto.
9687 2014-02-19 Bob Duff <duff@adacore.com>
9689 * sem_attr.adb (Resolve_Attribute): Detect the case of F'Access
9690 where F denotes the renaming of an enumeration literal, and
9691 issue a specialized error message.
9693 2014-02-19 Matthew Heaney <heaney@adacore.com>
9695 * a-chtgop.ads (Checked_Index): New operation.
9696 (Next): Changed mode of hash table.
9697 * a-chtgop.adb (Adjust, Delete_Node_Sans_Free): Detect tampering
9698 (Generic_Read, Reserve_Capacity): Ditto.
9699 (Generic_Equal): Detect tampering.
9700 (Next): Changed mode of hash table, detect tampering.
9701 * a-chtgke.ads (Checked_Index, Checked_Equivalent_Keys): New
9703 (Find): Changed mode of hash table.
9704 * a-chtgke.adb (Checked_Equivalent_Keys): New operation
9705 (Delete_Key_Sans_Free, Generic_Conditional_Insert): Detect
9707 (Find): Changed mode of hash table, check for tampering.
9708 (Generic_Replace_Element): Check for tampering.
9709 * a-chtgbk.ads (Checked_Index, Checked_Equivalent_Keys): New operation.
9710 * a-chtgbk.adb (Checked_Index, Checked_Equivalent_Keys): New
9711 operation (Delete_Key_Sans_Free, Generic_Conditional_Insert):
9713 (Find, Generic_Replace_Element): Check for tampering.
9714 * a-chtgbo.ads (Checked_Index): New operation.
9715 * a-chtgbo.adb (Checked_Index): New operation
9716 (Delete_Node_Sans_Free, Generic_Equal): Detect tampering.
9717 (Generic_Read, Next): Ditto.
9718 * a-cohase.adb, a-cihase.adb (Is_In): Changed mode of hash
9719 table (Difference, Intersection): Use variable view of
9720 source, detect tampering (Find, Is_Subset, Overlap): Use
9721 variable view of container (Symmetric_Difference, Union):
9722 Detect tampering (Vet): Use Checked_Index to detect tampering
9723 (Constant_Reference, Element, Find): Use variable view of
9725 (Update_Element_Preserving_Key): Detect tampering.
9726 * a-cbhase.adb (Difference, Find, Is_In): Use variable view
9729 (Equivalent_Sets, Overlap): Use Node's Next component.
9730 (Vet): Use Checked_Index to detect tampering.
9731 (Constant_Reference, Element, Find): Use variable view of container.
9732 (Update_Element_Preserving_Key): Detect tampering.
9733 * a-cohama.adb, a-cihama.adb, a-cbhama.adb (Constant_Reference,
9734 Element, Find): Use variable view of container.
9735 (Reference): Rename hash table component.
9736 (Vet): Use Checked_Index to detect tampering.
9738 2014-02-19 Arnaud Charlet <charlet@adacore.com>
9740 * adabkend.adb (Scan_Compiler_Arguments): Add missing handling
9743 2014-02-19 Thomas Quinot <quinot@adacore.com>
9745 * tbuild.adb (New_Occurrence_Of, New_Rerefence_To): Guard
9746 against calls without Def_Id.
9748 2014-02-19 Claire Dross <dross@adacore.com>
9750 * a-cfdlli.ads, a-cfhase.ads, a-cforma.ads, a-cfhama.ads, a-cforse.ads,
9751 a-cofove.ads: Add global annotations to subprograms.
9753 2014-02-19 Hristian Kirtchev <kirtchev@adacore.com>
9755 * sem_prag.adb (Analyze_Initial_Condition_In_Decl_Part): Remove
9756 constants Errors, Pack_Id and Pack_Init. Remove variable Vars.
9757 Initial_Condition no longer requires the presence of pragma
9758 Initialized. Do not try to diagnose whether all variables mentioned in
9759 pragma Initializes also appear in Initial_Condition.
9760 (Collect_Variables): Removed.
9761 (Match_Variable): Removed.
9762 (Match_Variables): Removed.
9763 (Report_Unused_Variables): Removed.
9765 2014-02-19 Thomas Quinot <quinot@adacore.com>
9767 * gnat_rm.texi (pragma Stream_Convert): Minor rewording.
9769 2014-02-19 Robert Dewar <dewar@adacore.com>
9771 * sem_util.adb, sem_util.ads, prj-conf.adb, s-os_lib.adb: Minor
9774 2014-02-19 Vincent Celier <celier@adacore.com>
9776 * prj-part.adb (Parse_Single_Project): Use the fully resolved
9777 project path, with all symbolic links resolved, to check if the
9778 same project is imported with a different unresolved path.
9779 * prj-tree.ads (Project_Name_And_Node): Component Canonical_Path
9780 changed to Resolved_Path to reflect that all symbolic links
9783 2014-02-19 Ed Schonberg <schonberg@adacore.com>
9785 * sem_util.ads, sem_util.adb (Get_Cursor_Type): Moved to sem_util
9786 from sem_ch13, for use elsewhere.
9787 * sem_ch13.adb (Get_Cursor_Type): Moved to sem_util.
9788 * sem_ch5.adb (Analyze_Iterator_Specification): Set properly the
9789 cursor type on the loop variable when the iteration is over o
9792 2014-02-19 Vincent Celier <celier@adacore.com>
9794 * prj-conf.adb (Add_Default_GNAT_Naming_Scheme): Add declaration
9795 for an empty Target (Check_Target): Never fail when an empty
9796 target is declared in the configuration project.
9798 2014-02-19 Ed Schonberg <schonberg@adacore.com>
9800 * sem_prag.adb (Check_Arg_Is_Local_Name): Argument is local if
9801 the pragma comes fron a predicate aspect and the context is a
9802 record declaration within the scope that declares the type.
9804 2014-02-19 Robert Dewar <dewar@adacore.com>
9806 * gnat_rm.texi: Minor clarifications.
9807 * expander.adb, sem_aggr.adb: Add comments.
9809 2014-02-19 Ed Schonberg <schonberg@adacore.com>
9811 * sem_prag.adb (Check_Arg_Is_Local_Name): For an aspect that
9812 applies to a subprogram body, the name is the current scope,
9813 rather than being declared in the current scope.
9814 (Analyze_Pragma, case No_Return): Handle properly a No_Return
9815 aspect applied to a subprogram body.
9817 2014-02-19 Ed Schonberg <schonberg@adacore.com>
9819 * sem_ch13.adb (Resolve_Iterable_Operation): Improve resolution
9820 of overloaded subprograms, and fix bug in handling of primitive
9823 2014-02-19 Pascal Obry <obry@adacore.com>
9825 * s-os_lib.adb: Minor reformatting.
9827 2014-02-19 Yannick Moy <moy@adacore.com>
9829 * expander.adb (Expand): Do nothing inside generics.
9830 * sem_aggr.adb (Aggregate_Constraint_Checks): Do nothing inside
9833 2014-02-19 Yannick Moy <moy@adacore.com>
9835 * exp_ch2.adb: Remove useless 'with' of unit Uintp.
9837 2014-02-19 Robert Dewar <dewar@adacore.com>
9839 * sem_ch3.adb, style.adb, sem_prag.adb, sem_ch13.adb: Minor reformatting
9840 * a-sequio.adb: Remove useless pragma Extensions_Allowed (no
9843 2014-02-19 Claire Dross <dross@adacore.com>
9845 * a-cfdlli.ads, a-cfhase.ads, a-cforma.ads, a-cfhama.ads,
9846 a-cforse.ads, a-cofove.ads: Add Iterable aspect to formal containers.
9848 2014-02-19 Hristian Kirtchev <kirtchev@adacore.com>
9850 * sem_ch3.adb (Analyze_Declarations): Analyze
9851 a package contract at the end of the private declarations (if
9852 applicable), otherwise analyze it and the end of the visible
9855 2014-02-19 Ed Schonberg <schonberg@adacore.com>
9857 * style.adb (Missing_Overriding): If subprogram is an
9858 instantiation, place warning on the instance node itself,
9859 without mention of the original generic. Do not emit message
9860 if explicit Ada version is older than the introduction of the
9861 overriding indicator.
9863 2014-02-19 Yannick Moy <moy@adacore.com>
9865 * gnat_rm.texi: Doc clarifications.
9867 2014-02-19 Yannick Moy <moy@adacore.com>
9869 * exp_util.adb (Remove_Side_Effects): Do not remove side-effects
9872 2014-02-19 Ed Schonberg <schonberg@adacore.com>
9874 * sem_ch13.adb (Get_Cursor_Type): Obtain cursor type from
9875 specified First primitive, rather than by name.
9876 (Validate_Iterable_Aspect, Resolve_Iterable_Operation): Use it,
9877 and extend error checking for missing primitives and incorrect
9880 2014-02-19 Ed Schonberg <schonberg@adacore.com>
9882 * sem_ch3.adb (Check_Pragma_Implemented): Detect additional
9883 errors when a Synchronization aspect on an overriding protected
9884 operation does not match the given aspect on the overridden
9885 operation of an ancestor interface.
9887 2014-02-19 Hristian Kirtchev <kirtchev@adacore.com>
9889 * sem_prag.adb (Check_Loop_Pragma_Grouping): New routine.
9890 (Check_Loop_Pragma_Placement): Update
9891 comment on usage. Remove local variables Orig_Stmt and
9892 Within_Same_Sequence. Check that the current Loop_Invariant or
9893 Loop_Variant pragma is grouped together with other such pragmas.
9894 (Is_Loop_Pragma): New routine.
9895 (Prev_In_Loop): Removed.
9897 2014-02-19 Robert Dewar <dewar@adacore.com>
9899 * par-ch6.adb (P_Return): For extended return, end column lines
9901 * par.adb: Minor documentation clarification.
9903 2014-02-19 Yannick Moy <moy@adacore.com>
9905 * sem_prag.adb (Check_Loop_Pragma_Placement): Add check
9906 that Loop_Invariant and Loop_Variant appear consecutively.
9907 * gnat_rm.texi Update documentation of Loop_Invariant and
9908 Loop_Variant pragmas.
9910 2014-02-19 Robert Dewar <dewar@adacore.com>
9912 * debug.adb: Document -gnatd.X.
9913 * par-ch5.adb (P_If_Statement): Always check THEN, even if not
9915 (Check_Then_Column): Ditto.
9916 * styleg.adb (Check_Then): Allow THEN on line after IF.
9917 (Check_Then): Check THEN placement under control of -gnatd.X
9918 * styleg.ads (Check_Then): Now called even if THEN is not first
9920 * stylesw.ads (Style_Check_If_Then_Layout): Document new
9922 * gnat_ugn.texi: For -gnatyi, THEN can now be on line after IF.
9924 2014-02-19 Robert Dewar <dewar@adacore.com>
9926 * a-cfhama.adb, a-cfhase.adb, a-cforse.adb, a-cofove.adb, a-ngcefu.adb,
9927 a-teioed.adb, a-wtedit.adb, a-ztedit.adb, exp_ch5.adb, inline.adb,
9928 prj-pp.adb, prj-tree.adb, sem_ch12.adb, sem_ch8.adb,
9929 vms_conv.adb: Fix bad layout of IF statements
9931 2014-02-19 Robert Dewar <dewar@adacore.com>
9933 * exp_util.adb (Side_Effect_Free): Scalar if expressions can be SEF.
9935 2014-02-19 Robert Dewar <dewar@adacore.com>
9937 * exp_util.adb: Update comments.
9939 2014-02-19 Doug Rupp <rupp@adacore.com>
9941 * bindgen.adb (Gen_Adainit) [VMS] New global Float_Format.
9942 * init.c (__gl_float_format): [VMS] New global.
9943 (__gnat_set_features): Call FP_CONTROL to set FPSR for the float
9944 representation in effect.
9946 2014-02-19 Hristian Kirtchev <kirtchev@adacore.com>
9948 * exp_ch6.adb Add with and use clause for Exp_Prag.
9949 (Expand_Contract_Cases): Relocated to Exp_Prag.
9950 * exp_ch6.ads (Expand_Contract_Cases): Relocated to Exp_Prag.
9951 * exp_prag.adb Add with and use clauses for Checks and Validsw.
9952 (Expand_Contract_Cases): Relocated from Exp_Ch6. Update the
9953 structure of the expanded code to showcase the evaluation of
9954 attribute 'Old prefixes. Add local variable Old_Evals. Expand
9955 any attribute 'Old references found within a consequence. Add
9956 circuitry to evaluate the prefixes of attribute 'Old that
9957 belong to a selected consequence.
9958 (Expand_Old_In_Consequence): New routine.
9959 * exp_prag.ads (Expand_Contract_Cases): Relocated from Exp_Ch6.
9960 * sem_attr.adb (Check_Use_In_Contract_Cases): Warn that a
9961 potentially unevaluated prefix is always evaluated.
9963 2014-02-19 Robert Dewar <dewar@adacore.com>
9965 * exp_attr.adb (Expand_Min_Max_Attribute): Use Insert_Declaration
9966 (Expand_Min_Max_Attribute): Use Matching_Standard_Type.
9967 * exp_ch4.adb (Expand_N_Expression_With_Actions): Remove special
9968 handling for the case of Modify_Tree_For_C, this approach did
9970 * exp_util.adb (Matching_Standard_Type): New function
9971 (Side_Effect_Free): New top level functions (from
9972 Remove_Side_Effects).
9973 * exp_util.ads (Side_Effect_Free): New top level functions
9975 * sinfo.ads: Minor comment updates.
9977 2014-02-19 Ed Schonberg <schonberg@adacore.com>
9979 * exp_ch6.adb (Expand_Simple_Function_Return): If return
9980 type is unconstrained and uses the secondary stack, mark the
9981 enclosing function accordingly, to ensure that the value is not
9982 prematurely removed.
9984 2014-02-19 Hristian Kirtchev <kirtchev@adacore.com>
9986 * par.adb Alphabetize the routines in Par.Sync.
9987 (Resync_Past_Malformed_Aspect): New routine.
9988 * par-ch13.adb (Get_Aspect_Specifications): Alphabetize local
9989 variables. Code and comment reformatting. Detect missing
9990 parentheses on aspects [Refined_]Global and [Refined_]Depends
9991 with a non-null definition.
9992 * par-sync.adb: Alphabetize all routines in this separate unit.
9993 (Resync_Past_Malformed_Aspect): New routine.
9995 2014-02-19 Robert Dewar <dewar@adacore.com>
9997 * sem_eval.ads, sem_eval.adb (Subtypes_Statically_Match): Return False
9998 if Esize values do not match.
10000 2014-02-19 Yannick Moy <moy@adacore.com>
10002 * sinfo.ads: Minor comment update.
10004 2014-02-19 Hristian Kirtchev <kirtchev@adacore.com>
10006 * atree.ads: Minor reformatting (change Entity_Info to Einfo).
10008 2014-02-19 Thomas Quinot <quinot@adacore.com>
10010 * exp_ch7.adb (Find_Node_To_Be_Wrapped): An assignment statement
10011 that has the No_Ctrl_Actions flag is a suitable node to be
10012 wrapped if the assigned expression has no finalization actions.
10013 * sem_eval.adb (Eval_Entity_Name): For a compile time known
10014 boolean value, mark the corresponding condition SCO as constant.
10016 2014-02-19 Robert Dewar <dewar@adacore.com>
10018 * exp_util.adb: Minor reformatting.
10019 * exp_util.ads (Matching_Standard_Type): New function.
10020 * exp_ch7.adb: Minor reformatting.
10022 2014-02-19 Ed Schonberg <schonberg@adacore.com>
10024 * sem_ch13.adb (Get_Cursor_Type): Use scope of iterable type
10025 to find declaration for Cursor, to handle properly the case of
10026 a discriminated iterable type.
10028 2014-02-19 Vincent Celier <celier@adacore.com>
10030 * gnatcmd.adb (GNATCmd): Always replace the object dirs of
10031 imported library projects with the library ALI dirs, when setting
10033 * prj-env.ads (Ada_Objects_Path): Correct comments about
10034 argument Including_Libraries.
10036 2014-02-19 Gary Dismukes <dismukes@adacore.com>
10038 * gnat_rm.texi: Minor spelling fixes.
10040 2014-02-19 Doug Rupp <rupp@adacore.com>
10042 * init.c: Remove unneeded code.
10043 * fe.h (Float_Format): New macro
10044 * gcc-interface/trans.c (gigi): On VMS, set vms_float_format.
10046 2014-02-19 Hristian Kirtchev <kirtchev@adacore.com>
10048 * sem_prag.adb (Check_Refined_Global_Item):
10049 A state or variable acts as a constituent only it is part of an
10050 encapsulating state and the state has visible refinement.
10052 2014-02-19 Ed Schonberg <schonberg@adacore.com>
10054 * sem_ch6.adb (Analyze_Subprogram_Contract): Do not warn on a
10055 postcondition for a function when the expression does not mention
10056 'Result but the function has in-out parameters.
10058 2014-02-19 Robert Dewar <dewar@adacore.com>
10060 * gnat_rm.texi: Add documentation on Value_Size forcing biased
10063 2014-02-19 Hristian Kirtchev <kirtchev@adacore.com>
10065 * lib-xref.ads Remove the small table of letter and symbol usage as we
10068 2014-02-19 Hristian Kirtchev <kirtchev@adacore.com>
10070 * sem_ch6.adb (Analyze_Subprogram_Body_Helper): Emit specific error
10071 messages depending on the offending misplaced aspect specifications.
10072 (Diagnose_Misplaced_Aspect_Specifications): New routine.
10074 2014-02-19 Ed Schonberg <schonberg@adacore.com>
10076 * sem_ch13.adb (Get_Cursor): Utility to retrieve cursor type
10077 for iterable aspect primitives.
10078 (Resolve_Iterable_Operation): Use expected signature of iterable
10079 aspect to resolve primitive when overloading is present.
10080 (Validate_Iterable_Aspect, Analyze_Aspects_At_Freeze_Point): use it.
10081 (Check_Signature): Removed.
10083 2014-02-19 Yannick Moy <moy@adacore.com>
10085 * sem_ch10.adb (Analyze_Proper_Body): Issue error on missing
10086 subunit in GNATprove_Mode.
10087 * sinfo.ads (GNATprove_Mode): Document error issued in GNATprove_Mode.
10089 2014-02-19 Hristian Kirtchev <kirtchev@adacore.com>
10091 * lib-xref.ads Alphabetize the contents of table
10092 Xref_Entity_Letters. Add an entry in table Xref_Entity_Letters
10093 for E_Abstract_State. List all letters and symbols in use.
10094 * sem_prag.adb (Analyze_Abstract_State): Update all calls
10095 to Create_Abstract_State to reflect the new signature.
10096 (Create_Abstract_State): Change subprogram profile and update
10097 the comment on usage. Use the proper location of the state
10098 declaration when creating a new abstract state entity. Do not
10099 generate an external name, but simply reuse the name coming from
10100 the state declaration.
10102 2014-02-19 Robert Dewar <dewar@adacore.com>
10104 * exp_ch4.adb (Expand_N_Expression_With_Actions): Make sure
10105 declarations get properly inserted in Modify_Tree_For_C mode.
10106 * sinfo.ads: Minor comment addition.
10108 2014-02-19 Robert Dewar <dewar@adacore.com>
10110 * par-ch9.adb, exp_ch5.adb, sem_ch5.adb, exp_attr.adb, sem_util.adb,
10111 sem_util.ads, sem_ch13.adb, sem_ch13.ads: Minor reformatting.
10113 2014-02-19 Ed Schonberg <schonberg@adacore.com>
10115 * style.adb (Missing_Overriding): Warning does not apply in
10116 language versions prior to Ada 2005.
10117 * snames.ads-tmpl: Add Name_Iterable and Attribute_Iterable.
10118 * sem_attr.adb: Add Attribute_Iterable where needed.
10119 * exp_attr.adb: ditto.
10120 * exp_ch5.adb (Expand_Formal_Container_Loop): New procedure to
10121 handle loops and quantified expressions over types that have an
10122 iterable aspect. Called from Expand_Iterator_Loop.
10123 * sem_ch5.adb (Analyze_Iterator_Specification): Recognize types
10124 with Iterable aspect.
10125 * sem_ch13.adb (Validate_Iterable_Aspect): Verify that the
10126 subprograms specified in the Iterable aspect have the proper
10127 signature involving container and cursor.
10128 (Check_Aspect_At_Freeze_Point): Analyze value of iterable aspect.
10129 * sem_ch13.ads (Validate_Iterable_Aspect): New subprogram.
10130 * sem_util.ads, sem_util.adb (Get_Iterable_Type_Primitive):
10131 New procedure to retrieve one of the primitives First, Last,
10132 or Has_Element, from the value of the iterable aspect of a
10134 (Is_Container_Element): Predicate to recognize expressions
10135 that denote an element of one of the predefined containers,
10136 for possible optimization. This subprogram is not currently
10137 used, pending ARG discussions on the legality of the proposed
10138 optimization. Worth preserving for eventual use.
10139 (Is_Iterator): Recognize formal container types.
10140 * aspects.ads, aspects.adb: Add Aspect_Iterable where needed.
10142 2014-02-19 Robert Dewar <dewar@adacore.com>
10144 * exp_attr.adb (Expand_Min_Max_Attribute): New procedure
10145 (Expand_N_Attribute_Reference): Use this procedure for Min and Max.
10146 * exp_ch4.adb (Expand_N_Expression_With_Actions): Remove object
10147 declarations from list of actions.
10148 * output.ads, output.adb (Delete_Last_Char): New procedure.
10149 * sinfo.ads: Document handling of Mod and expression with actions
10150 in Modify_Tree_For_C mode.
10152 2014-02-19 Ed Schonberg <schonberg@adacore.com>
10154 * par-ch9.adb (P_Task): Add a null statement to produce a
10155 well-formed task body when due to a previous syntax error the
10156 statement list is empty.
10158 2014-02-19 Hristian Kirtchev <kirtchev@adacore.com>
10160 * sem_prag.adb (Check_Dependency_Clause): Account
10161 for the case where a state with a non-null refinement matches a
10162 null output list. Comment reformatting.
10163 (Inputs_Match): Copy a solitary input to avoid an assertion failure
10164 when trying to match the same input in multiple clauses.
10166 2014-02-19 Gary Dismukes <dismukes@adacore.com>
10168 * sem_attr.adb: Minor typo fix.
10170 2014-02-18 Robert Dewar <dewar@adacore.com>
10172 * cstand.adb (Build_Signed_Integer_Type): Minor change of formal
10173 from Int to Nat (Build_Unsigned_Integer_Type): New procedure
10174 (Create_Standard): Create new unsigned types.
10175 * exp_ch4.adb (Expand_N_Op_Mod): Expand mod in Modify_Tree_For_C
10176 mode (Expand_N_Reference): Removed, problematic and not needed
10178 * exp_ch4.ads (Expand_N_Reference): Removed, problematic and
10179 not needed for now.
10180 * exp_util.ads, exp_util.adb (Power_Of_Two): New function.
10181 * expander.adb: Remove call to Expand_N_Reference (problematic,
10182 and not needed now).
10183 * sem_aux.ads, sem_aux.adb (Corresponding_Unsigned_Type): New function.
10184 * stand.adb: Read and write unsigned type entities.
10185 * stand.ads: Add new unsigned types.
10187 2014-02-18 Hristian Kirtchev <kirtchev@adacore.com>
10189 * sem_ch4.adb (Analyze_Call): Do not mark a function call
10190 as being inside an assertion expression as the flag is now removed.
10191 (Check_Ghost_Subprogram_Call): Do not query the
10192 In_Assertion_Expression flag as it is now removed, instead use
10193 a predicate function.
10194 * sem_elab.adb (Check_Internal_Call_Continue): Do not query the
10195 In_Assertion_Expression flag as it is now removed, instead use
10196 a predicate function.
10197 * sem_prag.ads: Add new table Assertion_Expression_Pragma.
10198 * sem_util.adb Add with and use clause for Sem_Prag.
10199 (In_Assertion_Expression_Pragma): New routine.
10200 * sem_util.ads (In_Assertion_Expression_Pragma): New routine.
10201 * sinfo.adb (In_Assertion_Expression): Removed.
10202 (Set_In_Assertion_Expression): Removed.
10203 * sinfo.ads Remove flag In_Assertion_Expression along with its
10205 (In_Assertion_Expression): Removed along with
10206 pragma Inline. (Set_In_Assertion_Expression): Removed along
10207 with pragma Inline.
10209 2014-02-18 Sergey Rybin <rybin@adacore.com frybin>
10211 * gnat_ugn.texi: gnatpp section: add note that '-j' cannot be
10212 used together with '-r', '-rf' or '-rnb' options.
10214 2014-02-18 Hristian Kirtchev <kirtchev@adacore.com>
10216 * sem_attr.adb (Analyze_Attribute): Comment
10217 and code reformatting. Use separate routines to check the
10218 legality of attribute 'Old in certain pragmas. Verify
10219 the use of 'Old, 'Result and locally declared entities
10220 within the prefix of 'Old.
10221 (Check_References_In_Prefix): New routine.
10222 (Check_Use_In_Contract_Cases): New routine.
10223 (Check_Use_In_Test_Case): New routine.
10225 2014-02-18 Vincent Celier <celier@adacore.com>
10227 * sem_aux.adb (Is_By_Reference_Type): For each components of
10228 a record type, check also if the component is volatile as it
10229 may have an aspect that makes it volatile. If it is, then the
10230 record type is a by reference type.
10232 2014-02-18 Robert Dewar <dewar@adacore.com>
10234 * exp_attr.adb: Minor reformatting.
10235 * exp_ch4.ads, exp_ch4.adb (Expand_N_Reference): New procedure.
10236 * exp_util.adb (Remove_Side_Effects): Add conditional expressions
10237 as another case where we don't generate N_Reference nodes for
10239 * expander.adb (Expand): Add call to Expand_N_Reference.
10241 2014-02-06 Hristian Kirtchev <kirtchev@adacore.com>
10243 * sem_prag.adb (Analyze_Refined_Pragma): Remove
10244 local variable Pack_Spec. Refinement pragmas may now apply to
10245 bodies of both visible and private subprograms.
10247 2014-02-06 Robert Dewar <dewar@adacore.com>
10249 * exp_attr.adb (Expand_Loop_Entry_Attribute):
10250 Minor change (Attr => N) (Expand_Pred_Succ): New name
10251 Expand_Pred_Succ_Attribute (Expand_N_Attribute_Reference, case
10252 Max): Expand into if expression if Modify_Tree_For_C mode.
10253 (Expand_N_Attribute_Reference, case Min): ditto
10254 * sinfo.ads: Modify_Tree_For_C takes care of expanding Min and
10257 2014-02-06 Ed Schonberg <schonberg@adacore.com>
10259 * sem_ch3.adb (Analyze_Object_Declaration): Do not generate
10260 predicate check if this is an internal declaration with
10261 No_Initialization set, as for an expanded aggregate component.
10263 2014-02-06 Doug Rupp <rupp@adacore.com>
10265 * init.c (__gnat_default_resignal_p) [VMS]: Test for and resignal
10266 conditions with severity of "SUCCESS" or "INFORMATIONAL".
10268 2014-02-06 Yannick Moy <moy@adacore.com>
10270 * sem_prag.adb (Analyze_Pragma): Analyze pragma
10271 Debug rewritten node before rewriting it as a null statement in
10274 2014-02-06 Robert Dewar <dewar@adacore.com>
10276 * sem_attr.adb (Min_Max): New procedure.
10277 (Max_Alignment_For_Allocation_Max_Size_In_Storage_Elements): New
10280 2014-02-06 Sergey Rybin <rybin@adacore.com frybin>
10282 * gnat_ugn.texi, vms_data.ads: Add documentation of '-t' option for
10285 2014-02-06 Hristian Kirtchev <kirtchev@adacore.com>
10287 * sem_prag.adb (Analyze_Abstract_State): Update
10288 all calls to Create_Abstract_State to pass the proper state
10290 (Create_Abstract_State): Add new formal parameter
10291 State_Decl along with comment on usage. Establish a link between
10292 the abstract state entity and the state declaration.
10294 2014-02-06 Robert Dewar <dewar@adacore.com>
10296 * sem_attr.adb (Analyze_Attribute, case Max): Check for improper
10297 comparison of unordered enumeration type.
10298 (Analyze_Attribute, case Max): Check for improper comparison of
10299 unordered enumeration type.
10300 * sem_res.adb (Bad_Unordered_Enumeration_Reference): Moved to
10302 * sem_util.ads, sem_util.adb (Bad_Unordered_Enumeration_Reference):
10303 Moved here from Sem_Res.
10305 2014-02-06 Robert Dewar <dewar@adacore.com>
10307 * sem_ch3.adb, sem_prag.adb, sem_res.adb, lib-xref.adb: Minor
10310 2014-02-06 Hristian Kirtchev <kirtchev@adacore.com>
10312 * sem_ch6.adb (Process_Formals): Error message reformatting.
10314 2014-02-06 Hristian Kirtchev <kirtchev@adacore.com>
10316 * sem_ch3.adb (Handle_Late_Controlled_Primitive): Add local
10317 variable Spec. Do not inherit the null indicator from the
10318 subprogram body when generating the spec.
10320 2014-02-06 Robert Dewar <dewar@adacore.com>
10322 * casing.adb (Determine_Casing): Consider SPARK_Mode to be
10325 2014-02-06 Ed Schonberg <schonberg@adacore.com>
10327 * exp_ch6.adb (Is_Build_In_Place_Function): Predicate is false
10328 when the function has a foreign convention, but not if only the
10329 limited return type has such a convention.
10331 2014-02-06 Hristian Kirtchev <kirtchev@adacore.com>
10333 * sem_ch3.adb (Handle_Late_Controlled_Primitive): Remove local
10334 variable Spec. Comment reformatting. Use Copy_Separate_Tree
10335 rather than New_Copy_Tree when building the corresponding
10336 subprogram declaration.
10338 2014-02-06 Hristian Kirtchev <kirtchev@adacore.com>
10340 * sem_prag.adb (Analyze_Global_Item): Remove
10341 the mode-related checks on abstract states with enabled external
10343 (Property_Error): Removed.
10345 2014-02-06 Javier Miranda <miranda@adacore.com>
10347 * lib-xref.adb (Generate_Reference): When
10348 generating the reference to the first private entity take care
10349 of handling swapped entities.
10351 2014-02-06 Sergey Rybin <rybin@adacore.com frybin>
10353 * gnat_ugn.texi, vms_data.ads: Add documentation of -j option for
10356 2014-02-06 Robert Dewar <dewar@adacore.com>
10358 * exp_ch4.adb (Expand_N_Shift_Left): Handle shift counts greater
10359 than the word size when operating in Modify_Tree_For_C mode.
10360 * sinfo.ads: Add documentation section on Modify_Tree_For_C mode.
10362 2014-02-06 Robert Dewar <dewar@adacore.com>
10364 * erroutc.adb (Warning_Specifically_Suppressed.Matches):
10365 compare is case insensitive.
10366 * gnat_rm.texi: Document that string compare for Warnings Off
10367 is now case insensitive.
10369 2014-02-06 Eric Botcazou <ebotcazou@adacore.com>
10371 * gnat_rm.texi: Small wording tweak.
10373 2014-02-06 Pascal Obry <obry@adacore.com>
10375 * prj-attr.adb, projects.texi, snames.ads-tmpl: Add Included_Patterns
10376 and Included_Artifact_Patterns attribute definitions.
10378 2014-02-06 Yannick Moy <moy@adacore.com>
10380 * sem_ch6.adb (Analyze_Subprogram_Body_Helper): Set
10381 SPARK_Mode pragma component for all subprograms, including stubs.
10383 2014-02-06 Hristian Kirtchev <kirtchev@adacore.com>
10385 * sem_ch10.adb (Analyze_Package_Body_Stub): Maintain
10386 the configuration options of the enclosing context in a
10388 (Analyze_Subprogram_Body_Stub): Maintain the
10389 configuration options of the enclosing context in a stack-like
10392 2014-02-06 Robert Dewar <dewar@adacore.com>
10394 * debug.adb: -gnatd.u sets Modify_Tree_For C
10395 * exp_ch4.adb (Expand_N_Op_Rotate_Left): Expand out
10396 if Modify_Tree_For_C (Expand_N_Op_Rotate_Right): ditto.
10397 (Expand_N_Op_Arithmetic_Right_Shift): ditto.
10398 * exp_intr.adb (Expand_Shift): Call expander so we do
10399 Modify_Tree_For_C expansions.
10400 * gnat1drv.adb (Adjust_Global_Switches): Set Modify_Tree_For_C
10403 2014-02-06 Fedor Rybin <frybin@adacore.com>
10405 * prj-proc.ads (Tree_Loaded_Callback): new type Callback used
10406 after the phase 1 of the processing of each aggregated project
10407 to get access to project trees of aggregated projects.
10408 (Process_Project_Tree_Phase_1): new parameter On_New_Tree_Loaded
10409 If specified, On_New_Tree_Loaded is called after each aggregated
10410 project has been processed succesfully.
10411 (Process): new parameter On_New_Tree_Loaded.
10412 * prj-proc.adb (Process_Aggregated_Projects): On_New_Tree_Loaded
10413 callback added after processing of each aggregated project.
10414 (Recursive_Process): new parameter On_New_Tree_Loaded.
10415 (Process): new parameter On_New_Tree_Loaded.
10416 (Process_Project_Tree_Phase_1): new parameter On_New_Tree_Loaded.
10417 * prj-conf.ads (Parse_Project_And_Apply_Config): new parameter
10418 On_New_Tree_Loaded.
10419 * prj-conf.adb (Parse_Project_And_Apply_Config): new parameter
10420 On_New_Tree_Loaded.
10422 2014-02-06 Bob Duff <duff@adacore.com>
10424 * gnat_ugn.texi: Implement --insert-blank-lines and
10425 --preserve-blank-lines switches.
10427 2014-02-06 Sergey Rybin <rybin@adacore.com frybin>
10429 * gnat_ugn.texi, vms_data.ads: Add documentation of -j option for
10432 2014-02-06 Eric Botcazou <ebotcazou@adacore.com>
10434 * gnat_rm.texi (Pragma Optimize_Alignment): Document the effect
10435 of the pragma on individual objects.
10437 2014-02-06 Hristian Kirtchev <kirtchev@adacore.com>
10439 * einfo.adb Node29 is now used as BIP_Initialization_Call.
10440 (BIP_Initialization_Call): New routine.
10441 (Set_BIP_Initialization_Call): New routine.
10442 (Write_Field29_Name): Add an entry for constants and variables.
10443 * einfo.ads Add new attribute BIP_Initialization_Call and update
10444 its usage in nodes.
10445 (BIP_Initialization_Call): New routine along with pragma Inline.
10446 (Set_BIP_Initialization_Call): New routine along with pragma Inline.
10447 * exp_ch6.adb (Make_Build_In_Place_Call_In_Object_Declaration):
10448 Add local declaration Res_Decl. Capture the build-in-place
10449 initialization call when the related object declaration has
10450 created a transient block.
10451 * exp_ch7.adb (Process_Transient_Objects): Add local variable
10452 Fin_Insrt. Recognize a scenario where an object declaration acts
10453 as a transient context and is initialized by a build-in-place
10456 2014-02-06 Pascal Obry <obry@adacore.com>
10458 * prj-util.adb (For_Interface_Sources): Fix handling of required
10459 bodies for aggregate libs.
10461 2014-02-06 Robert Dewar <dewar@adacore.com>
10463 * nlists.ads: Minor comment clarifications.
10465 2014-02-06 Robert Dewar <dewar@adacore.com>
10467 * gnat1drv.adb (Adjust_Global_Switches): Set Modify_Tree_For_C
10469 * opt.ads (Modify_Tree_For_C): New flag.
10470 * output.ads, output.adb (Last_Char): New function.
10472 2014-02-06 Pascal Obry <obry@adacore.com>
10474 * projects.texi, prj-env.adb (Initialize_Default_Project_Path): Add
10475 share/gpr for cross-builds.
10477 2014-02-06 Robert Dewar <dewar@adacore.com>
10479 * exp_util.ads, checks.adb, sem_prag.adb, prj-util.adb, sem_ch13.adb:
10480 Minor reformatting and code clean ups.
10482 2014-02-06 Pascal Obry <obry@adacore.com>
10484 * prj-util.adb (For_Interface_Sources): Skip non compilable languages.
10485 * prj.ads: Minor typo fix in comment.
10487 2014-02-06 Hristian Kirtchev <kirtchev@adacore.com>
10489 * sem_prag.adb (Analyze_Depends_In_Decl_Part): Add
10490 local variable Expr. Flag clauses with extra parenthesis as this
10491 is not allowed by the syntax of the pragma. Code reformatting.
10493 2014-02-06 Hristian Kirtchev <kirtchev@adacore.com>
10495 * exp_attr.adb (Expand_N_Attribute_Reference): Alphabetize
10496 variables. Rename variabme Tnn to Temp. Do not create a temporary
10497 if assertions are disabled. Find enclosing routine _Postconditions
10498 and insert the temporary that captures the value of the prefix
10499 before the routine.
10500 * exp_ch6.adb (Build_Postconditions_Procedure):
10501 Insert the generated _Postconditions routine
10502 before the first source declaration of the related
10504 (Insert_After_Last_Declaration): Removed.
10505 (Insert_Before_First_Source_Declaration): New routine.
10507 2014-02-06 Ed Schonberg <schonberg@adacore.com>
10509 * exp_util.adb, exp_util.ads (Within_Internal_Subprogram):
10510 Utility to determine whether current expansion is for the body
10511 of a predefined primitive operation.
10512 (Make_Predicate_Check): Use Within_Internal_Subpgram
10513 * checks.adb (Apply_Predicate_Check): Use
10514 Within_Internal_Subprogram
10515 * sem_ch13.adb (Freeze_Entity_Checks): Ditto.
10517 2014-02-06 Pascal Obry <obry@adacore.com>
10519 * prj.ads, prj-util.adb: Minor reformatting.
10521 2014-02-06 Ed Schonberg <schonberg@adacore.com>
10523 * exp_ch6.adb (Expand_Subprogram_Contract, Append_Enabled_Item):
10524 Take into account the Split_PPC flag to ensure that conjuncts
10525 in a composite postcondition aspect are tested in source order.
10527 2014-02-06 Hristian Kirtchev <kirtchev@adacore.com>
10529 * sem_ch6.adb (Analyze_Generic_Subprogram_Body): Flag illegal
10531 * sem_ch12.adb (Analyze_Generic_Subprogram_Declaration): Flag
10532 illegal use of SPARK_Mode.
10533 (Instantiate_Subprogram_Body): Flag illegal use of SPARK_Mode.
10534 * sem_prag.adb (Analyze_Pragma): Code reformatting.
10535 * sem_util.adb Add with and use clause for Aspects.
10536 (Check_SPARK_Mode_In_Generic): New routine.
10537 * sem_util.ads (Check_SPARK_Mode_In_Generic): New routine.
10539 2014-02-06 Thomas Quinot <quinot@adacore.com>
10541 * a-calend.adb (Formatting_Operations.Split): Ensure that
10542 Time_Error is raised for invalid time values.
10544 2014-02-06 Arnaud Charlet <charlet@adacore.com>
10546 * sem_prag.adb (Analyze_Pragma): Rewrite as a null statement
10549 2014-02-06 Robert Dewar <dewar@adacore.com>
10551 * einfo.ads, einfo.adb (Is_Discriminant_Check_Function): New flag.
10552 * exp_ch3.adb (Build_Dcheck_Function): Set
10553 Is_Discriminant_Check_Function.
10555 2014-02-06 Hristian Kirtchev <kirtchev@adacore.com>
10557 * exp_ch7.adb (Is_Subprogram_Call): Inspect
10558 the original tree in certain cases where a construct has been
10559 factored out and replaced by a reference to a temporary.
10561 2014-02-06 Ed Schonberg <schonberg@adacore.com>
10563 * sem_ch3.adb (Process_Full_View): Fix typo in the order of
10564 parameters when propagating predicate function to full view.
10565 (Find_Type_Of_Object): Freeze base type of object type to catch
10566 premature use of discriminated private type without a full view.
10568 2014-02-06 Robert Dewar <dewar@adacore.com>
10570 * sprint.adb: Minor reformatting.
10572 2014-02-06 Hristian Kirtchev <kirtchev@adacore.com>
10574 * exp_ch4.adb (Process_Transient_Object): Add local variable
10575 Temp_Ins. When the transient object is initialized by an
10576 aggregate, the hook must capture the object after the last
10577 component assignment takes place.
10578 * exp_ch7.adb (Detect_Subprogram_Call): Expose the subprogram to
10579 routine Is_Subprogram_Call.
10580 (Is_Subprogram_Call): Inspect an
10581 aggregate that has been heavily expanded for subprogram calls.
10582 (Process_Transient_Objects): Add local variables Expr, Ptr_Id
10583 and Temp_Ins. Remove the nested declare block and adjust the
10584 indentation. When the transient object is initialized by an
10585 aggregate, the hook must capture the object after the last
10586 component assignment takes place.
10588 2014-02-06 Hristian Kirtchev <kirtchev@adacore.com>
10590 * sem_prag.adb (Analyze_Global_Item): Detect illegal uses of
10591 external states with enabled properties that do not match the
10593 (Property_Error): New routine.
10594 * sem_res.adb (Property_Error): New routine.
10595 (Resolve_Actuals): Detect illegal uses of external variables with
10596 enabled properties in procedure calls that do not match the mode of
10597 the corresponding formal parameter.
10599 2014-02-06 Hristian Kirtchev <kirtchev@adacore.com>
10601 * sem_util.adb (Has_Enabled_Property): Rename
10602 formal parameter Prop_Nam to Property. Update the comment on usage
10603 and all occurrences in the body. Add local variable Prop_Nam. When
10604 inspecting a property with an expression, the property name
10605 appears as the first choice of the component association.
10607 2014-02-04 Robert Dewar <dewar@adacore.com>
10609 * exp_ch5.adb, einfo.ads, freeze.adb, sem_ch8.adb: Minor reformatting.
10611 2014-02-04 Gary Dismukes <dismukes@adacore.com>
10613 * sem_aggr.adb: Change "runtime" to "run time" in warning message,
10614 for consistency with other messages.
10616 2014-02-04 Ed Schonberg <schonberg@adacore.com>
10618 * exp_ch5.adb (Expand_Iterator_Loop): For a container element
10619 iterator, indicate that the element is a constant if the container
10620 type does not have a variable indexing aspect.
10621 * sem_ch8.adb (Analyze_Object_Renaming): If the entity is already
10622 marked as constant, do not reset its Ekind, to ensure that
10623 container elements in an element loop are not modified if the
10624 container (e.g. a hashed set) only has a constant indexing aspect.
10626 2014-02-04 Arnaud Charlet <charlet@adacore.com>
10628 * g-souinf.ads: Subprograms in this unit are actually not pure.
10629 * freeze.adb (Freeze_Subprogram): Do not reset Is_Pure for Intrinsics.
10630 * einfo.ads (Is_Pure): Update doc to match implementation.
10632 2014-02-04 Gary Dismukes <dismukes@adacore.com>
10634 * exp_ch13.adb: Minor spelling fix.
10636 2014-02-04 Robert Dewar <dewar@adacore.com>
10638 * opt.ads: Minor comment update.
10640 2014-02-04 Robert Dewar <dewar@adacore.com>
10642 * exp_ch4.adb (Expand_N_Expression_With_Actions): Use Rewrite
10643 instead of Replace.
10645 2014-02-04 Ed Schonberg <schonberg@adacore.com>
10647 * sem_aggr.adb (Resolve_Array_Aggregate): Suppress warnings
10648 on null expressions if component type is non-null, when the
10649 corresponding association covers an empty range of index values.
10651 2014-02-04 Robert Dewar <dewar@adacore.com>
10653 * sinfo.ads: Further comments on N_Expression_With_Actions node.
10655 2014-02-04 Hristian Kirtchev <kirtchev@adacore.com>
10657 * sem_prag.adb (Analyze_Refined_Depends_In_Decl_Part): Remove global
10658 variables Out_Items and Ref_Global. Remove local constant
10659 Body_Id along with dummy variables D1, D2, D3, D4, D5, D6, D7
10660 and D8. Remove the useless collection of global items as this
10661 was a leftover from an earlier version of the routine. Move
10662 several routines out to avoid deep nesting and indentation.
10663 (Inputs_Match): Add formal parameter Dep_Clause. Rename formal
10664 parameter Do_Checks to Post_Errors. Update the comment on usage.
10665 (Is_Matching_Input): Renamed to Input_Match. Add formal parameters
10666 Ref_Inputs and Do_Checks. Rename formal parameter Do_Checks
10667 to Post_Errors. Update the comment on usage. Account for the
10668 case where a self referential state may have a null input_list.
10669 (Is_Self_Referential): New routine.
10671 2014-02-04 Ed Schonberg <schonberg@adacore.com>
10673 * sem_ch13.adb (Analyze_Attribute_Definition_Clause): If the
10674 entity renames an expression, as in the case of an object of
10675 an unconstrained type initialized by a function call, defer the
10676 rewriting of the expression to the expander.
10677 * exp_ch13.adb (Expand_N_Attribute_Definition_Clause, case
10678 'Alignment): If the entity renames an expression, introduce
10679 temporary to capture value, and rewrite original declaration to
10682 2014-02-04 Gary Dismukes <dismukes@adacore.com>
10684 * g-comlin.adb: Minor typo fix.
10686 2014-02-04 Ed Schonberg <schonberg@adacore.com>
10688 * freeze.adb (Freeze_All): Types derived from a formal
10689 access_to_classwide type do not have a finalization master.
10691 2014-02-04 Robert Dewar <dewar@adacore.com>
10693 * sprint.adb: Minor reformatting.
10695 2014-02-04 Robert Dewar <dewar@adacore.com>
10697 * exp_ch4.adb (Expand_N_Expression_With_Actions): Eliminate
10698 cases where Actions is a null list.
10699 * sinfo.ads (N_Expression_With_Actions): Actions can be
10700 temporarily empty during semantic analysis, but must be non-empty
10701 in the final expanded tree.
10703 2014-01-31 Robert Dewar <dewar@adacore.com>
10705 * exp_ch9.adb: Minor reformatting.
10707 2014-01-31 Emmanuel Briot <briot@adacore.com>
10709 * g-comlin.adb (Set_Command_Line): Take the switches
10710 configuration from the Command_Line_Config.
10712 2014-01-31 Hristian Kirtchev <kirtchev@adacore.com>
10714 * sem_prag.adb (Analyze_Refinement_Clause): Guard against a malformed
10717 2014-01-31 Vincent Celier <celier@adacore.com>
10719 * projects.texi: Add more documentation about others used as an
10720 index in indexed attributes.
10722 2014-01-31 Robert Dewar <dewar@adacore.com>
10724 * gnat_ugn.texi: Minor update.
10725 * gnat_rm.texi: Add example to Restriction_Warnings documentation.
10726 * exp_util.adb: Minor reformatting.
10728 2014-01-31 Ed Schonberg <schonberg@adacore.com>
10730 * exp_ch9.adb (Expand_Entry_Barrier): Warn if the barrier
10731 depends on data that is not private to the protected object,
10732 and potentially modifiable in unsynchronized fashion.
10734 2014-01-31 Yannick Moy <moy@adacore.com>
10736 * erroutc.adb (Validate_Specific_Warnings): Remove special case for
10739 2014-01-31 Robert Dewar <dewar@adacore.com>
10741 * prj-attr.ads (First_Attribute_Of): Returns Empty_Attribute
10742 for Unknown_Package.
10743 * sem_ch6.adb, sem_attr.adb: Minor comment addition.
10745 2014-01-31 Hristian Kirtchev <kirtchev@adacore.com>
10747 * exp_util.adb (Build_Allocate_Deallocate_Proc): Rewrite
10748 the logic that generates a runtime check to determine the
10749 controlled status of the object about to be allocated or
10750 deallocated. Class-wide types now always use a runtime check
10751 even if they appear as generic actuals.
10752 (Find_Object): Detect
10753 a special case that involves interface class-wide types because
10754 the object appears as a complex expression.
10756 2014-01-31 Ed Schonberg <schonberg@adacore.com>
10758 * sem_ch6.adb (Process_Formals): In Ada2012 mode, place
10759 subprogram with an incomplete untagged formals on the list of
10760 private dependents, to verify that the type is properly completed
10761 in the private part.
10762 * sem_attr.adb: Code clean up.
10764 2014-01-31 Robert Dewar <dewar@adacore.com>
10766 * exp_ch6.adb: Minor reformatting.
10768 2014-01-31 Vincent Celier <celier@adacore.com>
10770 * prj-attr.adb (First_Attribute_Of): Return Unknown_Attribute
10771 when Pkg is unknown.
10773 2014-01-31 Hristian Kirtchev <kirtchev@adacore.com>
10775 * sem_res.adb (Resolve_Entity_Name): Comment
10776 reformatting. Allow volatile objects in various generated checks.
10778 2014-01-31 Ed Schonberg <schonberg@adacore.com>
10780 * sem_attr.adb (Analyze_Attribute, case 'Update): For a record
10781 component association, set the etype of the identifier, for
10784 2014-01-31 Ed Schonberg <schonberg@adacore.com>
10786 * exp_ch6.adb (Has_Visibility_Of_Subprogram): If type is not
10787 declared in a package, not checks can apply to the subprogram.
10789 2014-01-31 Robert Dewar <dewar@adacore.com>
10791 * erroutc.adb (Validate_Specific_Warnings): Warnings are
10792 controlled -gnatw.W.
10793 * gnat_ugn.texi: Document new warnings controlled by -gnatw.w.
10794 * opt.ads (Warn_On_Warnings_Off): Now controls more cases.
10796 2014-01-31 Arnaud Charlet <charlet@adacore.com>
10798 * exp_disp.adb: Update comments.
10800 2014-01-31 Yannick Moy <moy@adacore.com>
10802 * sem_ch12.adb (Analyze_Generic_Subprogram_Declaration,
10803 Save_Global_References): Guard access to expression in aspect.
10805 2014-01-31 Yannick Moy <moy@adacore.com>
10807 * sem_prag.adb (Analyze_Pragma/Pragma_SPARK_Mode):
10808 Issue an error when the pragma is applied to a generic unit,
10809 a generic declaration, or inside a generic.
10811 2014-01-31 Yannick Moy <moy@adacore.com>
10813 * sem_ch8.adb (Analyze_Subprogram_Renaming): Set SPARK_Mode on renaming
10816 2014-01-31 Robert Dewar <dewar@adacore.com>
10818 * exp_ch9.adb, s-tassta.adb, s-tposen.adb, s-tposen.ads: Minor
10821 2014-01-31 Tristan Gingold <gingold@adacore.com>
10823 * exp_disp.adb: Add a historic note.
10825 2014-01-31 Robert Dewar <dewar@adacore.com>
10827 * sem_warn.adb (Warn_On_Useless_Assignments): Add call to
10828 Process_Deferred_References.
10830 2014-01-31 Yannick Moy <moy@adacore.com>
10832 * erroutc.adb (Validate_Specific_Warnings): Do not issue a message for
10833 ineffective pragma Warnings(Off) in GNATprove_Mode.
10835 2014-01-31 Bob Duff <duff@adacore.com>
10837 * s-taskin.ads: Minor comment fix.
10838 * s-tassta.adb (Abort_Dependents): Don't abort all dependents;
10839 just direct dependents. If this is actually an abort, each task
10840 will take care of aborting its dependents, so all dependents will
10841 get aborted, as before. However, when this is called the second
10842 time from Vulnerable_Complete_Master "for convenience" (i.e. to
10843 kill off tasks waiting at terminate alternatives), aborting
10844 indirect dependents is wrong, because it causes some unrelated
10845 tasks to get aborted.
10847 2014-01-31 Robert Dewar <dewar@adacore.com>
10849 * sem_ch4.adb: Minor reformatting.
10851 2014-01-31 Robert Dewar <dewar@adacore.com>
10853 * exp_ch2.adb: New calling sequence for Is_LHS.
10854 * frontend.adb: Add call to Process_Deferred_References.
10855 * lib-xref.ads, lib-xref.adb (Process_Deferred_References): New.
10856 (Deferred_References): New table.
10857 * sem_ch8.adb (Find_Direct_Name): Make deferred reference table
10859 (Find_Expanded_Name): Ditto.
10860 * sem_res.adb: New calling sequence for Is_LHS.
10861 * sem_util.ads, sem_util.adb (Is_LHS): New calling sequence.
10862 * sem_warn.adb: Call Process_Deferred_References before issuing
10865 2014-01-31 Tristan Gingold <gingold@adacore.com>
10867 * exp_util.adb (Corresponding_Runtime_Package): Restrict the
10868 use of System_Tasking_Protected_Objects_Single_Entry.
10869 * exp_ch9.adb (Build_Simple_Entry_Call): Remove Mode parameter
10870 of Protected_Single_Entry_Call.
10871 (Expand_N_Timed_Entry_Call): Remove single_entry case.
10872 * exp_disp.adb (Make_Disp_Asynchronous_Select_Body): Remove
10874 (Make_Disp_Timed_Select_Body): Likewise.
10875 * rtsfind.ads (RE_Timed_Protected_Single_Entry_Call): Remove.
10876 * s-tposen.adb (Send_Program_Error, PO_Do_Or_Queue): Remove
10878 (Wakeup_Entry_Caller): Remove Self_ID and New_State parameters.
10879 (Wait_For_Completion_With_Timeout): Remove.
10880 (Protected_Single_Entry_Call): Remove Mode parameter
10881 (always Simple_Call).
10882 (Service_Entry): Remove Self_Id constant (not used anymore).
10883 (Timed_Protected_Single_Entry_Call): Remove.
10884 * s-tposen.ads (Timed_Protected_Single_Entry_Call): Remove.
10885 (Protected_Single_Entry_Call): Remove Mode parameter.
10887 2014-01-29 Hristian Kirtchev <kirtchev@adacore.com>
10889 * einfo.adb (Get_Pragma): Handle the retrieval of pragma Refined_Post.
10890 * einfo.ads (Get_Pragma): Update the comment on special pragmas
10891 handled by this routine.
10892 * sem_prag.adb (Analyze_Pragma): Add a legal pragma Refined_Post
10893 to the contract of the related subprogram body.
10894 * sem_util.adb (Add_Contract_Item): Handle the insertion of
10895 pragma Refined_Post into the contract of a subprogram body.
10896 * sinfo.ads Update the documentation of node N_Contract.
10897 * sem_res.adb (Resolve_Entity_Name): Add a guard
10898 to detect abstract states and variables only when checking the
10899 SPARK 2014 rules concerning volatile object placement.
10901 2014-01-29 Ed Schonberg <schonberg@adacore.com>
10903 * sem_ch4.adb (Find_Equality_Types, Try_One_Interp): within an instance,
10904 null is compatible with any access type.
10906 2014-01-29 Hristian Kirtchev <kirtchev@adacore.com>
10908 * sem_util.adb (Find_Placement_In_State_Space): Assume that the default
10909 placement is not in a package.
10911 2014-01-29 Hristian Kirtchev <kirtchev@adacore.com>
10913 * sem_util.adb (Has_Enabled_Property): Compare the character field of
10916 2014-01-29 Robert Dewar <dewar@adacore.com>
10918 * sem_intr.adb, a-ztexio.ads, sinfo.ads, sem_res.adb, gnatlink.adb,
10919 vms_conv.adb, a-except.ads, a-except-2005.ads, a-teioed.adb,
10920 sem_warn.ads, treepr.ads, erroutc.ads, a-excach.adb: Minor reformatting.
10922 2014-01-29 Robert Dewar <dewar@adacore.com>
10924 * sem_util.ads, sem_util.adb (In_Pragma_Expression): New function.
10925 * sem_warn.adb (Check_References): Suppress warnings if inside
10926 Initial_Condition pragma.
10928 2014-01-29 Hristian Kirtchev <kirtchev@adacore.com>
10930 * sem_prag.adb (Check_Missing_Part_Of): List all values of
10931 State_Space_Kind for readability reasons. Do not emit an error on
10932 a private item when the enclosing package lacks aspect/pragma
10933 Abstract_State. Do not emit an error on a private package
10934 instantiation when the corresponding generic template lacks
10936 (Has_Visible_State): New routine.
10937 * sem_util.adb (Find_Placement_In_State_Space): The visible
10938 declarations of any kind of child units in general act as proper
10939 placement location.
10941 2014-01-29 Robert Dewar <dewar@adacore.com>
10943 * a-except-2005.adb, a-except.adb, a-excpol-abort.adb, a-exstat.adb,
10944 ali.adb, a-numaux.ads, a-numaux-darwin.ads, a-numaux-libc-x86.ads,
10945 a-numaux-vms.ads, a-numaux-vxworks.ads, a-numaux-x86.ads, aspects.ads,
10946 a-taside.adb, a-teioed.adb, a-textio.adb, a-textio.ads, atree.adb,
10947 atree.ads, a-witeio.adb, a-witeio.ads, a-wtedit.adb, a-ztedit.adb,
10948 a-ztexio.adb, bcheck.adb, binde.adb, checks.adb, comperr.adb,
10949 cstand.adb, debug_a.adb, einfo.ads, errout.adb, erroutc.adb,
10950 eval_fat.adb, exp_aggr.adb, exp_attr.adb, exp_ch11.adb, exp_ch3.adb,
10951 exp_ch4.adb, exp_ch5.adb, exp_ch6.adb, exp_ch9.adb, exp_dbug.adb,
10952 exp_disp.adb, exp_fixd.adb, exp_imgv.adb, exp_intr.adb, exp_util.adb,
10953 freeze.adb, frontend.adb, g-comlin.ads, g-mbdira.adb, gnat1drv.adb,
10954 gprep.adb, g-spipat.adb, i-cpp.ads, i-vxwork.ads, i-vxwork-x86.ads,
10955 krunch.ads, layout.adb, lib-load.adb, lib-writ.adb, lib-writ.ads,
10956 live.adb, namet.ads, osint.adb, osint-c.adb, output.ads, par.adb,
10957 par-ch10.adb, par-ch13.adb, par-ch3.adb, par-ch4.adb, par-ch5.adb,
10958 par-ch6.adb, par-ch9.adb, par-endh.adb, par-labl.adb, par-prag.adb,
10959 par-sync.adb, par-tchk.adb, par-util.adb, prj.adb, repinfo.adb,
10960 rtsfind.adb, s-arit64.adb, s-asthan-vms-alpha.adb,
10961 s-asthan-vms-ia64.adb, s-bignum.adb, scans.adb, scng.adb, s-dimmks.ads,
10962 sem_aggr.adb, sem_attr.adb, sem_aux.adb, sem_cat.adb, sem_ch10.adb,
10963 sem_ch12.adb, sem_ch13.adb, sem_ch13.ads, sem_ch3.adb, sem_ch4.adb,
10964 sem_ch5.adb, sem_ch6.adb, sem_ch8.adb, sem_disp.adb, sem_elab.adb,
10965 sem_elim.adb, sem_eval.adb, sem_intr.adb, sem_prag.adb, sem_res.adb,
10966 sem_type.adb, sem_util.adb, sem_warn.adb, set_targ.adb, s-fatgen.adb,
10967 s-fatgen.ads, s-fileio.adb, s-imgcha.adb, s-imgrea.adb, sinfo.ads,
10968 sinput-c.adb, snames.ads-tmpl, s-os_lib.adb, sprint.adb,
10969 s-regpat.adb, s-secsta.adb, s-stalib.ads,
10970 s-stchop.adb, s-stoele.ads, stand.ads, s-taprop-solaris.adb,
10971 s-tasdeb-vms.adb, s-tasini.adb, s-tassta.adb, s-valdec.adb,
10972 s-valuti.adb, s-wchjis.adb, s-wchwts.adb, system.ads, system-vms_64.ads,
10973 system-vms-ia64.ads, treepr.adb, types.ads, uintp.adb, uname.adb,
10974 urealp.adb, usage.adb, vxaddr2line.adb: Minor reformatting.
10976 2014-01-29 Robert Dewar <dewar@adacore.com>
10978 * expander.adb: Minor reformatting.
10980 2014-01-29 Javier Miranda <miranda@adacore.com>
10982 * exp_ch3.adb (Predefined_Primitive_Bodies): Adding documentation to
10985 2014-01-29 Javier Miranda <miranda@adacore.com>
10987 * exp_ch3.adb (Predefined_Primitive_Bodies): Complete the code
10988 that checks if an interface types defines the predefined "="
10989 function because the compiler was erroneously not generating the
10990 predefined "=" primitive as soon as the name of some interface
10991 primitive is "=" (formals were not checked).
10993 2014-01-29 Ed Schonberg <schonberg@adacore.com>
10995 * expander.adb (Expander): In GNATprove mode, do not process
10996 transient scopes: they are in general not created in this mode,
10997 and an attempt to examine them will lead to constraint errors when
10998 processing configuration pragmas that have analyzable expressions.
11000 2014-01-29 Vincent Celier <celier@adacore.com>
11002 * clean.adb (Gnatclean): Fail if main project is an aggregate
11003 project or if there is an aggregate library project in the
11005 * gnatcmd.adb: Fail if the main project is an aggregate project
11006 or if there is an aggegate library project in the project tree.
11007 * make.adb (Initialize): : Fail if main project is an aggregate
11008 project or if there is an aggregate library project in the
11010 * makeutl.ads (Aggregate_Libraries_In): New Boolean function.
11011 * prj-makr.adb (Initialize): Fail if the main project is an
11012 aggregate project or an aggregate library project.
11014 2014-01-29 Vincent Celier <celier@adacore.com>
11016 * prj-part.adb (Check_Import_Aggregate): New procedure
11017 to check if an imported project is an aggregate project.
11018 (Parse_Single_Project): Call Check_Import_Aggregate
11019 * projects.texi: Document that aggregate projects cannot be
11020 extended or imported.
11022 2014-01-29 Robert Dewar <dewar@adacore.com>
11024 * exp_ch9.adb, sem_ch7.ads, s-regexp.adb, sem_ch13.adb: Minor
11025 reformatting and code clean up.
11026 * gnat_ugn.texi: Add documentation section on Atomic Variables
11029 2014-01-29 Hristian Kirtchev <kirtchev@adacore.com>
11031 * einfo.adb Flag264 is now unused.
11032 (Has_Body_References): Removed.
11033 (Set_Has_Body_References): Removed.
11034 (Write_Entity_Flags): Remove the output for flag Has_Body_References.
11035 * einfo.ads Update the comment on usage of attribute
11036 Body_References. Remove attribute Has_Body_References and its
11038 (Has_Body_References): Removed along with pragma Inline.
11039 (Set_Has_Body_References): Removed along with pragma Inline.
11040 * sem_prag.adb (Analyze_Global_Item): Move the call to
11041 Record_Possible_Body_Reference in the state related checks
11042 section. Add a comment intended function.
11043 (Analyze_Input_Output): Move the call to Record_Possible_Body_Reference
11044 in the state related checks section. Add a comment intended function.
11045 (Analyze_Refinement_Clause): Cleanup the illegal body reference
11046 reporting. Add a comment on timing of error reporting.
11047 (Record_Possible_Body_Reference): Reimplement the routine.
11049 2014-01-29 Vincent Celier <celier@adacore.com>
11051 * makeutl.adb (Mains.Find_File_Add_Extension): Only look for specs for
11052 unit-based languages.
11053 (Mains.Complete_Mains.Do_Complete): Use the source file project
11054 tree when calling Find_File_Add_Extension. Use the correct
11055 project name when reporting an error.
11057 2014-01-29 Hristian Kirtchev <kirtchev@adacore.com>
11059 * aspects.adb Add an entry for aspect Part_Of in table
11061 * aspects.ads Add an entry for aspect Part_Of in tables Aspect_Id,
11062 Aspect_Argument, Aspect_Names and Aspect_Delay.
11063 * atree.h Define Elist9.
11064 * atree.adb (Elist9): New routine.
11065 (Set_Elist9): New routine.
11066 * atree.ads (Elist9): New routine.
11067 (Set_Elist9): New routine.
11068 * einfo.adb Add Part_Of_Constituents and Encapsulating_State to
11069 the list of node usage. Remove Refined_State from the list of
11071 (Encapsulating_State): New routine.
11073 Handle pragma Part_Of; (Part_Of_Constituents): New routine.
11074 (Refined_State): Removed.
11075 (Set_Encapsulating_State): New routine.
11076 (Set_Part_Of_Constituents): New routine.
11077 (Set_Refined_State): Removed.
11078 (Write_Field9_Name): Add an entry
11079 for Part_Of_Constituents (Write_Field10_Name): Add an entry for
11080 Encapsulating_State. Remove the entry for Refined_State.
11081 * einfo.ads Add new attributes Encapsulating_State
11082 and Part_Of_Constituents alond with their usage in
11083 entities. Remove attribute Refined_State along with its
11085 (Encapsulating_State): New routine and
11086 pragma Inline. (Get_Pragma): Update the comment on usage.
11087 (Part_Of_Constituents): New routine and pragma Inline.
11088 (Refined_State): Removed along with pragma Inline.
11089 (Set_Encapsulating_State): New routine and pragma Inline.
11090 (Set_Part_Of_Constituents): New routine and pragma Inline.
11091 (Set_Refined_State): Removed along with pragma Inline.
11092 * par-prag.adb Pragma Part_Of does not need any special processing
11094 * sem_ch3.adb (Analyze_Declarations): Remove local variables
11095 Body_Id and Prag. Call separate routines to analyze the
11096 contract of a package [body].
11097 (Analyze_Object_Contract):
11098 Update the comment on usage. Remove local variables
11099 Items and Nam. Use Get_Pragma rather than traversing the
11100 classification list. Verify whether the lack of indicator
11101 Part_Of agrees with the placement of the variable in state space.
11102 (Analyze_Object_Declaration): Initialize the encapsulating state
11103 of a variable. (Requires_State_Refinement): Moved to sem_util.
11104 * sem_ch7.adb (Analyze_Package_Body_Contract): New routine.
11105 (Analyze_Package_Contract): New routine.
11106 * sem_ch7.ads (Analyze_Package_Body_Contract): New routine.
11107 (Analyze_Package_Contract): New routine.
11108 * sem_ch10.adb (Decorate_State): Initialize the encapsulating
11109 state and Part_Of constituents.
11110 * sem_ch13.adb (Analyze_Aspect_Specifications):
11111 Add processing for aspect Part_Of. Update all
11112 calls to Decorate_Delayed_Aspect_And_Pragma.
11113 (Check_Aspect_At_Freeze_Point): Aspect Part_Of does
11114 not need any special processing at freeze time.
11115 (Decorate_Delayed_Aspect_And_Pragma): Renamed to
11116 Decorate_Aspect_And_Pragma. Add formal parameter Delayed and
11117 update the associated comment.
11118 * sem_prag.adb Add an entry for pragma Part_Of in table Sig_Flags.
11119 (Analyze_Abstract_State): Add new global variable State_Id. Remove
11120 local constants Errors and Loc. Remove local variables Is_Null
11121 and State_Nam. Create the entity of the abstract state on the
11122 spot, before all remaining checks are performed. Verify that a
11123 missing Part_Of option agrees with the placement of the abstract
11124 state within the state space.
11125 (Analyze_Depends_In_Decl_Part):
11126 Add new global variables Constits_Seen and States_Seen. Check
11127 that a state and a corresponding constituent do not appear
11128 in pragma [Refined_]Depends.
11129 (Analyze_Global_In_Decl_Part):
11130 Add new global variables Constits_Seen and States_Seen. Check
11131 that a state and a corresponding constituent do not appear
11132 in pragma [Refined_]Global.
11133 (Analyze_Global_Item):
11134 Remove the now obsolete code that deals with Part_Of.
11135 Add the entity of the global item to the list of processed
11136 items. (Analyze_Initializes_In_Decl_Part): Add new global
11137 variables Constits_Seen and States_Seen. Check that a state
11138 and a corresponding constituent do not appear in pragma
11140 (Analyze_Initialization_Item): Add the entity
11141 of the initialization item to the list of processed items.
11142 (Analyze_Input_Item): Add the entity of the initialization
11143 item to the list of processed items.
11144 (Analyze_Input_Output):
11145 Remove the now obsolete code that deals with Part_Of. Add the
11146 entity of the input/output to the list of processed items.
11147 (Analyze_Part_Of): New routine.
11148 (Analyze_Part_Of_Option): Remove
11149 local constant Par_State. Add local constant Encaps and local
11150 variables Encaps_Id and Legal. Use Analyze_Part of to analyze
11151 the option. Turn the related state into a Part_Of constituent
11152 if the option is legal.
11153 (Analyze_Pragma): Add processing
11154 for pragma Part_Of.
11155 (Analyze_Refined_State_In_Decl_Part):
11156 Remove global constants Pack_Body and Spec_Id. Remove
11157 global variables Abstr_States and Hidden_States. Add new
11158 global variables Available_States, Body_Id, Body_States and
11159 Spec_Id. Add new local constant Body_Decl. Reimplement the
11160 logic that extracts the states available for refinement from
11161 the related package and the body hidden states of the said
11163 (Analyze_Refinement_Clause): Add local variable Part_Of_Constits.
11164 (Check_Applicable_Policy): Alphabetize body.
11165 (Check_Dependency_Clause): Replace Refined_State
11166 with Encapsulating_State.
11167 (Check_Matching_Constituent):
11168 Reimplement the logic that determines whether an item is a valid
11169 / invalid constituent of the current refined state. Return when
11170 a construct does not denote a valid abstract state. Extract the
11171 list of Part_Of constituents for further analysis. Check that all
11172 Part_Of constituents of a state have been used in its refinement.
11173 (Check_Matching_State): Update the comment on usage. Operate
11174 on the list of available states.
11175 (Check_Missing_Part_Of): New routine.
11176 (Check_Refined_Global_Item): Replace Refined_State
11177 with Encapsulating_State.
11178 (Check_State_And_Constituent_Use): New routine.
11179 (Create_Abstract_State): New routine.
11180 (Is_Matching_Input): Replace Refined_State with Encapsulating_State.
11181 (Is_Part_Of): Removed.
11182 (Collect_Body_States): New routine.
11183 (Collect_Constituent): Replace Refined_State with Encapsulating_State.
11184 (Collect_Hidden_States): Removed.
11185 (Report_Unrefined_States): Change the profile of the procedure along
11186 with the comment on usage.
11187 (Report_Unused_Constituents): New routine.
11188 (Report_Unused_Hidden_States): Removed.
11189 (Report_Unused_States): New routine.
11190 * sem_prag.ads (Check_Missing_Part_Of): New routine.
11191 * sem_util.adb (Add_Contract_Item): Pragma Part_Of can now
11192 appear in the classification pragmas of a package instantiation
11194 (Find_Placement_In_State_Space): New routine.
11195 (Is_Child): Removed.
11196 (Is_Child_Or_Sibling): Remove formal
11197 parameter Private_Child. Remove the private child checks.
11198 (Requires_State_Refinement): Moved from sem_ch3.
11199 * sem_util.ads Add new type State_Space_Kind along with
11200 comment on its usage and values.
11201 (Add_Contract_Item): Update the comment on usage.
11202 (Find_Body_Discriminal): Alphabetize spec.
11203 (Find_Placement_In_State_Space): New routine.
11204 (Is_Child_Or_Sibling): Remove formal parameter Private_Child
11205 and update the comment on usage.
11206 (Requires_State_Refinement): Moved from sem_ch3.
11207 * sinfo.ads: Update the documentation of N_Contract.
11208 * snames.ads-tmpl The predefined name for Part_Of is now used
11209 to denote a pragma. Add Pragma_Id for Part_Of.
11211 2014-01-29 Emmanuel Briot <briot@adacore.com>
11213 * s-regexp.adb (Create_Secondary_Table): Automatically grow the state
11215 (Dump): New subprogram.
11217 2014-01-29 Tristan Gingold <gingold@adacore.com>
11219 * exp_ch9.adb (Expand_N_Protected_Type_Declaration): Add
11220 Expand_Entry_Declaration to factorize code.
11222 2014-01-29 Ed Schonberg <schonberg@adacore.com>
11224 * checks.adb: minor clarification.
11225 * sem_ch7.adb (Declare_Inherited_Private_Subprograms): Limit
11226 search for primitive operations to the entities that immediately
11227 follow the type declaration.
11229 2014-01-29 Tristan Gingold <gingold@adacore.com>
11231 * exp_ch9.adb (Build_Protected_Entry): Do not call
11232 Complete_Entry_Body anymore.
11233 * rtsfind.ads (RE_Complete_Single_Entry_Body): Remove.
11234 * s-tposen.ads, s-tposen.adb (Complete_Single_Entry_Body): Remove.
11236 2014-01-29 Pierre-Marie Derodat <derodat@adacore.com>
11238 * s-os_lib.adb, s-os_lib.ads (Normalize_Pathname): Return an empty
11239 string when the Name input bigger than allowed. Adapt the function
11242 2014-01-29 Ed Schonberg <schonberg@adacore.com>
11244 * checks.adb (Install_Null_Excluding_Check): Do not emit warning
11245 if expression is within a case_expression of if_expression.
11247 2014-01-29 Robert Dewar <dewar@adacore.com>
11249 * exp_ch9.adb, inline.ads: Minor reformatting.
11251 2014-01-29 Tristan Gingold <gingold@adacore.com>
11253 * exp_ch9.adb (Is_Exception_Safe): Return true if no exceptions.
11255 2014-01-29 Yannick Moy <moy@adacore.com>
11257 * inline.ads (Pending_Body_Info): Add SPARK_Mode and
11258 SPARK_Mode_Pragma components to be able to analyze generic
11260 * sem_ch12.adb (Analyze_Package_Instantiation,
11261 Inline_Instance_Body, Need_Subprogram_Instance_Body,
11262 Load_Parent_Of_Generic): Pass in SPARK_Mode from instantiation
11263 for future analysis of the instance.
11264 (Instantiate_Package_Body,
11265 Instantiate_Subprogram_Body, Set_Instance_Inv): Set SPARK_Mode
11266 from instantiation to analyze the instance.
11268 2014-01-29 Robert Dewar <dewar@adacore.com>
11270 * sem_ch7.adb, sem_prag.adb, sem_ch4.adb, sem_ch6.adb: Minor code
11273 2014-01-29 Yannick Moy <moy@adacore.com>
11275 * gnat_rm.texi: Update description of SPARK_Mode pragma.
11277 2014-01-29 Tristan Gingold <gingold@adacore.com>
11279 * exp_ch9.adb (Expand_N_Protected_Body): Remove Num_Entries.
11281 2014-01-29 Thomas Quinot <quinot@adacore.com>
11283 * sem_ch4.adb (Find_Component_In_Instance): Update comment.
11285 2014-01-29 Ed Schonberg <schonberg@adacore.com>
11287 * exp_util.adb (Build_Task_Image_Prefix): Indicate that the
11288 resulting string is an internal entity. and thus requires no
11289 initialization. This is relevant when Initialize_ Scalars is
11290 enabled, because the resultant spurious initialization may lead to
11291 secondary stack anomalies that produce a mangled name for a task.
11293 2014-01-29 Yannick Moy <moy@adacore.com>
11295 * sem_ch6.adb (Analyze_Subprogram_Body_Helper): SPARK_Mode
11296 not inherited from spec anymore. Check consistency
11297 rules after processing of declarations.
11298 * sem_ch7.adb (Analyze_Package_Body_Helper): SPARK_Mode not inherited
11299 from spec anymore. Check consistency rules after processing of
11301 (Analyze_Package_Declaration): Set SPARK_Mode only for non-generic
11303 * sem_prag.adb (Analyze_Pragma/Pragma_SPARK_Mode): Implement new
11306 2014-01-27 Robert Dewar <dewar@adacore.com>
11308 * sem_res.adb (Resolve_Comparison_Op): Add type name/location
11310 (Resolve_Range): Add type name/location to unordered msg.
11312 2014-01-27 Claire Dross <dross@adacore.com>
11314 * a-cofove.adb/s (Copy): Add precondition so that Copy (Source,
11315 Capacity) is only called with Capacity >= Length (Source) and
11316 Capacity in Capacity_Range.
11317 * a-cfdlli.adb/s, a-cfhase.adb/s, a-cfhama.adb/s, a-cforse.adb/s,
11318 a-cforma.adb/s (Copy): Add precondition so that Copy (Source, Capacity)
11319 is only called with Capacity >= Source.Capacity. Raise Capacity_Error
11320 in the code is this is not the case.
11322 2014-01-27 Thomas Quinot <quinot@adacore.com>
11324 * sem_ch4.adb (Analyze_Selected_Component): Fix handling of
11325 selected component in an instance where the component of the
11326 actual is not visibile at instantiation.
11328 2014-01-27 Ed Schonberg <schonberg@adacore.com>
11330 * sem_ch6.adb: sem_ch6.adb (Set_Actual_Subtypes): If the type
11331 has a dynamic predicate, generate freeze node for Actual_Subtype
11332 at once, because the declaration of the corresponding predicate
11333 function will make reference to it.
11335 2014-01-27 Tristan Gingold <gingold@adacore.com>
11337 * exp_ch7.adb, exp_ch9.adb: Adjust comments.
11339 2014-01-27 Robert Dewar <dewar@adacore.com>
11341 * exp_ch4.adb (Expand_N_Op_Expon): Remove unsigned type test
11342 for 2**X optimization.
11344 2014-01-27 Ed Schonberg <schonberg@adacore.com>
11346 * a-suenst.adb: strings.utf_encoding.strings (Decode): Check
11347 explicitly whether value is in range of Character, because the
11348 library is typically compiled with range checks disabled, and
11349 we cannot rely on the implicit check on the argument of 'Val.
11351 2014-01-27 Vincent Celier <celier@adacore.com>
11353 * a-ciorma.adb, a-cihama.adb (Assign): Copy the Source to the Target,
11354 not the Target to itself.
11356 2014-01-27 Robert Dewar <dewar@adacore.com>
11358 * vms_conv.ads, ali.adb, sem_ch6.ads, opt.ads, vms_cmds.ads: Minor
11359 changes to avoid incorrect use of unordered enum types.
11361 2014-01-27 Thomas Quinot <quinot@adacore.com>
11363 * sem_ch4.adb: Minor reformatting.
11365 2014-01-27 Robert Dewar <dewar@adacore.com>
11367 * scn.adb (Check_End_Of_Line): Removed.
11368 (Error_Long_Line): Removed.
11369 (Determine_License): Use versions of above routines from Scanner.
11370 * scng.adb (Check_End_Of_Line): Moved to spec.
11371 (Error_Long_Line): Removed, no longer used.
11372 * scng.ads (Check_End_Of_Line): Moved here from body.
11374 2014-01-27 Tristan Gingold <gingold@adacore.com>
11376 * exp_ch7.adb (Build_Cleanup_Statements): Call
11377 Build_Protected_Subprogram_Call_Cleanup to insert the cleanup
11378 for protected body.
11379 * exp_ch9.adb (Build_Protected_Subprogram_Body): Likewise.
11380 Remove Service_Name variable.
11381 (Build_Protected_SUbprogam_Call_Cleanup): New procedure that
11382 factorize code from the above subprograms.
11383 * exp_ch9.ads (Build_Protected_Subprogram_Call_Cleanup): New procedure.
11385 2014-01-27 Hristian Kirtchev <kirtchev@adacore.com>
11387 * einfo.adb (Has_Option): Reimplemented.
11388 * sem_prag.adb (Analyze_Refinement_Clause): Add global
11389 variables AR_Constit, AW_Constit, ER_Constit, EW_Constit,
11390 External_Constit_Seen and State. Add local variables Body_Ref,
11391 Body_Ref_Elmt and Extra_State. Reimplement part of the logic to
11392 avoid a cumbersome while pool. Verify the legality of an external
11393 state and relevant properties.
11394 (Check_External_Property): New routine.
11395 (Check_Matching_State): Remove parameter profile
11396 and update comment on usage.
11397 (Collect_Constituent): Store the
11398 relevant external property of a constituent.
11399 * sem_util.adb (Async_Readers_Enabled): Update the call to
11400 Has_Enabled_Property.
11401 (Async_Writers_Enabled): Update the call to Has_Enabled_Property.
11402 (Effective_Reads_Enabled): Update the call to Has_Enabled_Property.
11403 (Effective_Writes_Enabled): Update the call to Has_Enabled_Property.
11404 (Has_Enabled_Property): Rename formal parameter Extern to State_Id.
11405 Update comment on usage. Reimplement the logic to recognize the various
11406 formats of properties.
11408 2014-01-27 Ed Schonberg <schonberg@adacore.com>
11410 * par-ch5.adb: Minor reformatting.
11412 2014-01-27 Tristan Gingold <gingold@adacore.com>
11414 * s-tposen.ads: Harmonize style and comments.
11416 2014-01-27 Vincent Celier <celier@adacore.com>
11418 * projects.texi: Document that shared library projects, by
11419 default, cannot import projects that are not shared library
11422 2014-01-27 Robert Dewar <dewar@adacore.com>
11424 * sem_ch8.adb (Find_Selected_Component): Use Replace instead
11427 2014-01-27 Ed Schonberg <schonberg@adacore.com>
11429 * a-suenco.adb, a-suenst.adb (Decode): Raise encoding error if
11430 any other exception is raised.
11431 (Convert): If both Input_Scheme and Output_Scheme are UTF_8 it is
11432 still necessary to perform a conversion in order to remove overlong
11435 2014-01-27 Robert Dewar <dewar@adacore.com>
11437 * exp_smem.adb: Minor reformatting.
11439 2014-01-27 Thomas Quinot <quinot@adacore.com>
11441 * a-calfor.ads: Fix incorrect reference to operator "-" in comment.
11443 2014-01-27 Ed Schonberg <schonberg@adacore.com>
11445 * sem_res.adb (Make_Call_Into_Operator): In ASIS mode, relocate
11446 nodes for operands to the original node for the call, to preserve
11447 Original_Node pointers within the resolved operands, given that
11448 they may have been rewritten as well. Previous approach copied
11449 the operands into a new tree and lost those pointers.
11451 2014-01-27 Claire Dross <dross@adacore.com>
11454 * a-cofove.adb, a-cofove.ads: Add Strict_Equal function to the API.
11456 2014-01-27 Ed Schonberg <schonberg@adacore.com>
11458 * sem_util.adb (Check_Internal_Protected_Use): A call through
11459 an anonymous access parameter of the current protected function
11460 is not a potential modification of the current object.
11462 2014-01-27 Ed Schonberg <schonberg@adacore.com>
11464 * a-cobove.adb (Reserve_Capacity): Procedure raises
11465 Capacity_Error, not Constraint_Error, when request cannot be
11468 2014-01-27 Vincent Celier <celier@adacore.com>
11470 * a-coorma.adb, a-cohama.adb (Assign): Copy the Source to the Target,
11471 not the Target to itself.
11473 2014-01-27 Ed Schonberg <schonberg@adacore.com>
11475 * exp_ch4.adb (Expand_Concatenate): If the target of the
11476 concatenation is a library-level entity, always use the off-line
11477 version of concatenation, regardless of optimization level. This
11478 is space-efficient, and prevents linking problems when some
11479 units are compiled with different optimization levels.
11481 2014-01-27 Ed Schonberg <schonberg@adacore.com>
11483 * sem_ch5.adb: Code clean up.
11485 2014-01-27 Ed Schonberg <schonberg@adacore.com>
11487 * par-ch5.adb (P_Iterator_Specification): Improve error recovery
11488 when an array or container iterator includes a subtype indication,
11489 which is only legal in an element iterator.
11491 2014-01-27 Thomas Quinot <quinot@adacore.com>
11493 * exp_ch7.adb: Minor reformatting.
11495 2014-01-27 Robert Dewar <dewar@adacore.com>
11497 * opt.adb (SPARK_Mode): Default for library units is None rather
11499 * opt.ads: Remove AUTO from SPARK_Mode_Type SPARK_Mode_Type is
11501 * sem_prag.adb (Analyze_Pragma, case SPARK_Mode): Remove AUTO
11503 * snames.ads-tmpl (Name_Auto): Removed, no longer used.
11505 2014-01-27 Robert Dewar <dewar@adacore.com>
11507 * par-ch5.adb (P_Sequence_Of_Statements): Make entry in
11508 Suspicious_Labels table if we have identifier; followed by loop
11510 * par-endh.adb (Evaluate_End_Entry): Search Suspicious_Labels table.
11511 * par.adb (Suspicious_Labels): New table.
11513 2014-01-27 Robert Dewar <dewar@adacore.com>
11515 * exp_aggr.adb (Check_Bounds): Reason is range check, not
11518 2014-01-27 Yannick Moy <moy@adacore.com>
11520 * get_spark_xrefs.adb (Get_SPARK_Xrefs): Accept new type 'c' for
11522 * lib-xref-spark_specific.adb (Is_Global_Constant): Remove useless
11524 (Add_SPARK_Xrefs): Include references to constants.
11525 * spark_xrefs.ads Document new character 'c' for references to
11528 2014-01-27 Thomas Quinot <quinot@adacore.com>
11530 * exp_smem.adb (Add_Write_After): For a function call, insert write as
11531 an after action in a transient scope.
11533 2014-01-27 Thomas Quinot <quinot@adacore.com>
11535 * exp_smem.adb (Expand_Shared_Passive_Variable): For a reference
11536 to a shared variable as an OUT formal in a call to an init proc,
11537 the 'Read call must be emitted after, not before, the call.
11539 2014-01-27 Robert Dewar <dewar@adacore.com>
11541 * gnat_rm.texi: Remove mention of AUTO mode for SPARK_Mode pragma.
11543 2014-01-27 Robert Dewar <dewar@adacore.com>
11545 * a-wichha.adb (Character_Set_Version): Change to output proper
11548 2014-01-27 Hristian Kirtchev <kirtchev@adacore.com>
11550 * einfo.adb (Is_Input_Only_State): Removed.
11551 (Is_Non_Volatile_State): Removed.
11552 (Is_Output_State): Removed.
11553 * einfo.ads (Is_Input_Only_State): Remove attribute and
11554 subprogram. Update related entity.
11555 (Is_Non_Volatile_State):
11556 Remove attribute and subprogram. Update related entity.
11557 (Is_Output_State): Removed attribute and subprogram. Update
11559 * exp_ch6.adb (Expand_Subprogram_Contract): Update comment on
11561 * sem_ch3.adb (Analyze_Declarations): Analyze the contract of
11562 an object, not just variables.
11563 (Analyze_Object_Contract): New routine.
11564 (Analyze_Variable_Contract): Removed.
11565 (Process_Discriminants): Detect an illegal use of volatile
11566 discriminant in SPARK mode.
11567 * sem_ch5.adb (Analyze_Iterator_Specification):
11568 Detect an illegal use of volatile loop variable.
11569 (Analyze_Loop_Parameter_Specification): Detect an illegal use
11570 of volatile loop variable.
11571 * sem_ch6.adb (Process_Formals): Update the volatile object
11572 detection. Detect an illegal formal of mode IN OUT or OUT in
11573 SPARK mode. Enhance the error messages with references.
11574 * sem_ch12.adb (Instantiate_Object): Update the volatile object
11575 detection. Enhance the error messages with references.
11576 * sem_prag.adb (Analyze_Abstract_State): Enhance the error
11577 messages with references.
11578 (Analyze_Contract_Case): Enhance the error messages with references.
11579 (Analyze_External_Property): Call Check_Duplicate_Property to process
11580 an external property.
11581 (Analyze_External_Property_In_Decl_Part): New routine.
11582 (Analyze_External_State_In_Decl_Part): Removed.
11583 (Analyze_Global_Item): Detect an illegal
11584 use of a volatile constant. Detect an illegal use
11585 of a variable with enabled Effective_Reads. Enhance
11586 the error messages with references. Remove obsolete
11587 checks concerning Input_Only and Output_Only states.
11588 (Analyze_Initialization_Item): Enhance the error messages
11590 (Analyze_Initializes_In_Decl_Part): Do not
11591 collect the states and variables when the initialization list
11593 (Analyze_Input_Item): Enhance the error messages with references.
11594 (Analyze_Input_Output): Enhance the error messages with references.
11595 (Analyze_Pragma): Enhance the error messages with references.
11596 (Analyze_Refinement_Clause): Code reformatting.
11597 (Analyze_Refined_Depends_In_Decl_Part):
11598 Rename global variable Global to Reg_Global and update all
11599 occurrences. Add local variables D7 and D8. Update the error
11600 messages with references. Update the call to Collect_Global_Items.
11601 (Analyze_Refined_Global_In_Decl_Part): Add local variables
11602 Has_Proof_In_State, Proof_In_Constits and Proof_In_Items. Update
11603 the call to Collect_Global_Items. Account for a Proof_In state
11604 in null / useless refinement checks. Verify the coverage of
11606 (Check_Dependency_Clause): Remove local variable
11607 Out_Constits. Remove the retrieval and removal of constituents
11608 for an Output_Only state. Remove the reporting of unused
11609 Output_Only state constituents.
11610 (Check_Duplicate_Mode): Enhance
11611 the error message with a reference.
11612 (Check_Duplicate_Property): New routine.
11613 (Check_Duplicate_Option): Enhance the error message with a reference.
11614 (Check_External_Properties): Enhance the error message with a reference.
11615 (Check_Function_Return): Enhance the error message with a reference.
11616 (Check_In_Out_States): Update
11617 comment on usage. Add a specialized error message for Proof_In
11618 constituents. Enhance the error message with a reference.
11619 (Check_Input_States): Update comment on usage. Account for
11620 possible Proof_In constituents. Enhance the error message
11622 (Check_Matching_Constituent): Enhance the error message with a
11624 (Check_Matching_State): Enchance the error message with a reference.
11625 (Check_Mode): Add local variable From_Global. Update the call to
11626 Find_Mode. Emit more precise error messages concerning extra items
11627 (Check_Mode_Restriction_In_Enclosing_Context): Consider
11628 pragma Refined_Global. Enhance the error message with a
11630 (Check_Mode_Restriction_In_Function): Enhance the error message with
11632 (Check_Output_States): Update comment on usage. Add local variable
11633 Posted. Account for possible Proof_In constituents. Produce a detailed
11634 list of missing constituents.
11635 (Check_Proof_In_States): New routine.
11636 (Check_Refined_Global_Item): Handle Proof_In
11637 constituents. Enchance the error message with a reference.
11638 (Collect_Global_Items): Add formal parameters Proof_In_Items
11639 and Has_Proof_In_State. Update the comment on usage. Account
11640 for Proof_In items.
11641 (Create_Or_Modify_Clause): Enchance
11642 the error message with a reference.
11644 formal parameter From_Global. Update the comment on usage.
11645 Detect when the mode is governed by pragma [Refined_]Global.
11646 (Output_Constituents): Removed.
11647 (Report_Extra_Constituents):
11648 Report extra Proof_In constituents.
11649 (Report_Unused_Constituents): Removed.
11650 (Usage_Error): Code reformatting. Enhance the error
11651 messages with reference.
11652 * sem_prag.ads (Analyze_External_Property_In_Decl_Part): New routine.
11653 (Analyze_External_State_In_Decl_Part): Removed.
11654 * sem_res.adb (Resolve_Actuals): Update the volatile object
11655 detection. Enhance the error message with a reference.
11656 (Resolve_Entity_Name): Update the volatile object
11657 detection. Enhance the error message with a reference.
11658 * sem_util.adb (Is_Refined_State): Add a guard to avoid a crash.
11659 (Is_SPARK_Volatile_Object): New routine.
11660 (Has_Volatile_Component): New routine.
11661 * sem_util.ads (Is_Delegate): Alphabetized.
11662 (Is_SPARK_Volatile_Object): New routine.
11663 (Has_Volatile_Component): New routine.
11664 * snames.ads-tmpl: Remove names Name_Input_Only and Name_Output_Only.
11666 2014-01-27 Ed Schonberg <schonberg@adacore.com>
11668 * sem_attr.adb: Resolve fully prefix of 'Update.
11670 2014-01-27 Ben Brosgol <brosgol@adacore.com>
11672 * gnat_rm.texi: Minor clarifications.
11674 2014-01-27 Robert Dewar <dewar@adacore.com>
11676 * sem_elab.adb (Check_Internal_Call_Continue): Avoid complaining
11677 about call that is generated as part of an Initial_Condition
11679 * sem_prag.adb: Minor spelling correction.
11681 2014-01-27 Robert Dewar <dewar@adacore.com>
11683 * sem_prag.adb (Set_Convention_From_Pragma): Check that
11684 convention Ghost can only apply to functions.
11685 * einfo.ads, einfo.adb (Is_Ghost_Subprogram): Add clarifying comment.
11687 2014-01-27 Robert Dewar <dewar@adacore.com>
11689 * gnat_ugn.texi: Add Short_Enums to documentation of
11692 2014-01-27 Robert Dewar <dewar@adacore.com>
11694 * sem_prag.adb (Analyze_Input_Item): Correct check for input
11695 item in same package.
11696 * sem_util.ads, sem_util.adb (Within_Scope): New function.
11698 2014-01-26 Arnaud Charlet <charlet@adacore.com>
11700 * a-intnam-lynxos.ads, mlib-tgt-specific-lynxos.adb,
11701 s-osinte-lynxos-3.adb, s-osinte-lynxos-3.ads, s-osinte-lynxos.adb,
11702 s-osinte-lynxos.ads, s-taprop-lynxos.adb, s-tpopsp-lynxos.adb,
11703 system-lynxos-ppc.ads, system-lynxos-x86.ads: Removed, no longer
11706 2014-01-25 Eric Botcazou <ebotcazou@adacore.com>
11708 * gcc-interface/Makefile.in: Fix oversight.
11710 2014-01-25 Eric Botcazou <ebotcazou@adacore.com>
11712 * gcc-interface/utils.c (convert_to_fat_pointer): Un-obfuscate the
11713 conversion from a thin pointer with a shifted value.
11714 * gcc-interface/utils2.c (gnat_build_constructor): Propagate the
11715 read-only flag from the values onto the result.
11716 (gnat_invariant_expr): Accept read-only CONSTRUCTORs.
11718 2014-01-25 Tristan Gingold <gingold@adacore.com>
11720 * gcc-interface/decl.c (gnat_to_gnu_entity): Always build a variable
11721 for E_Variable with a pragma Linker_Section.
11723 2014-01-25 Robert Dewar <dewar@adacore.com>
11725 * gcc-interface/decl.c (gnat_to_gnu_param): Make sure an Out parameter
11726 with Default_Value aspect is passed in by copy.
11728 2014-01-24 Eric Botcazou <ebotcazou@adacore.com>
11730 * set_targ.adb: Set Short_Enums.
11731 * gcc-interface/lang.opt (fshort-enums): New option.
11732 * gcc-interface/misc.c (gnat_handle_option): Handle it.
11733 (gnat_post_options): Do not modify the global settings.
11735 2014-01-24 Robert Dewar <dewar@adacore.com>
11737 * g-rannum.ads, g-rannum.adb (Random_Ordinary_Fixed): New generic
11739 (Random_Decimal_Fixed): New generic function.
11740 * s-rannum.ads: Minor comment clarifications.
11742 2014-01-24 Robert Dewar <dewar@adacore.com>
11744 * back_end.adb: Remove Short_Enums handling (handled in
11745 Ttypes/Get_Targ now) Minor added comments.
11746 * freeze.adb: Change name Short_Enums_On_Target to
11747 Target_Short_Enums.
11748 * get_targ.ads, get_targ.adb (Get_Short_Enums): New function.
11749 * opt.ads: Minor comment updates.
11750 * sem_ch13.adb: Change name Short_Enums_On_Target to
11751 Target_Short_Enums.
11752 * set_targ.adb: Set Short_Enums from gcc back end.
11753 * set_targ.ads (Short_Enums): New variable.
11754 * targparm.ads, targparm.adb: Remove Short_Enums entries (handled in
11755 Ttypes/Get_Targ now).
11756 * ttypes.ads (Target_Short_Enums): New constant boolean switch
11758 2014-01-24 Pascal Obry <obry@adacore.com>
11760 * g-sercom-mingw.adb: Fix serial port name for port number > 10.
11762 2014-01-24 Gary Dismukes <dismukes@adacore.com>
11764 * exp_disp.adb (Expand_Dispatching_Call): Call Unqualify on Param when
11765 comparing it with Ctrl_Arg, since Ctrl_Arg may have had qualification
11768 2014-01-24 Robert Dewar <dewar@adacore.com>
11770 * sinfo.ads, make.adb, prj-env.adb: Minor reformatting.
11772 2014-01-24 Vincent Celier <celier@adacore.com>
11774 * prj.adb (Add_Aggregated_Project): Do not add a project in
11775 the list if it is already there.
11777 2014-01-24 Yannick Moy <moy@adacore.com>
11779 * lib-xref-spark_specific.adb (Enclosing_Subprogram_Or_Package):
11780 Correct the search for a subrogram declaration to which a pragma is
11783 2014-01-24 Bob Duff <duff@adacore.com>
11785 * gnat_ugn.texi: Document --decimal-grouping and
11786 --based-grouping switches in gnatpp.
11788 2014-01-24 Ed Schonberg <schonberg@adacore.com>
11790 * sinfo.ads: Documentation update.
11792 2014-01-24 Ed Schonberg <schonberg@adacore.com>
11794 * sem_ch3.adb (Constant_Redeclaration): New declaration is
11795 illegal if previous one has an initial expression that is an
11796 aggregate expanded into assignments.
11798 2014-01-24 Ed Schonberg <schonberg@adacore.com>
11800 * sem_ch5.adb (Analyze_Loop_Parameter_Specification): Small
11801 code reorganization to remove spurious warning on a loop with
11802 an array element iterator that has a null range.
11804 2014-01-24 Vincent Celier <celier@adacore.com>
11806 * make.adb (Binding_Phase): When setting the Ada paths, use
11807 the library ALI dir, not the object dir in libraries.
11809 2014-01-24 Yannick Moy <moy@adacore.com>
11811 * sinfo.ads: Add documentation of check flag fields.
11813 2014-01-24 Ed Schonberg <schonberg@adacore.com>
11815 * sem_res.adb (Resolve_Actuals): If an actual is a view
11816 conversion of a discriminated object, and the formal type is
11817 discriminated and constrained, apply a discriminant check to
11820 2014-01-24 Robert Dewar <dewar@adacore.com>
11822 * prj.adb, prj-env.adb, back_end.adb: Add comment, minor code clean ups.
11824 2014-01-24 Ed Schonberg <schonberg@adacore.com>
11826 * sem_ch3.adb (Analyze_Declarations): At the end of an
11827 appropriate declarative part, call Freeze_All from the first
11828 declaration in the scope, not from the first unfrozen one. This
11829 is necessary to apply visibility checks to entities with delayed
11830 aspects. Otherwise, in the presence of instantiations and cleanups
11831 that they may generate, the delayed aspects may be analyzed too
11832 late and produce spurious visibility errors.
11833 * sem_attr.adb: Place etype on range.
11834 * sem_ch6.adb: Documentation expression functions.
11836 2014-01-24 Robert Dewar <dewar@adacore.com>
11838 * exp_ch7.adb: Minor change of Indices to Indexes (preferred
11839 terminology in compiler).
11841 2014-01-24 Robert Dewar <dewar@adacore.com>
11843 * scans.ads: Remove Tok_Raise from Sterm, Eterm, After_SM
11844 categories, now that Ada 95 supports raise expressions.
11846 2014-01-24 Robert Dewar <dewar@adacore.com>
11848 * freeze.adb (Freeze_Enumeration_Type): Use new target parameter
11849 Short_Enums_On_Target.
11850 * sem_ch13.adb (Set_Enum_Esize): Take Short_Enums_On_Target
11852 * targparm.ads, targparm.adb: Add new target parameter Short_Enums.
11854 2014-01-24 Ed Schonberg <schonberg@adacore.com>
11856 * sem_ch5.adb (Analyze_Iterator_Specification): If subtype
11857 indication is given explicity, check that it matches the array
11858 component type or the container element type of the domain
11861 2014-01-24 Tristan Gingold <gingold@adacore.com>
11863 * back_end.adb (Scan_Compiler_Arguments): Set Short_Enums_On_Target.
11864 * gcc-interface/misc.c (flag_short_enums): Declare.
11865 (gnat_post_options): Set it.
11867 2014-01-24 Vincent Celier <celier@adacore.com>
11869 * prj-env.adb (Ada_Objects_Path): Use Ada_Objects_Path_No_Libs
11870 to cache the result when Including_Libraries is False.
11871 * prj-env.ads (Ada_Objects_Path): Update documentation
11872 * prj.adb (Free (Project_Id)): Also free Ada_Objects_Path_No_Libs
11873 (Get_Object_Directory): Return the Library_Ali_Dir only when
11874 when Including_Libraries is True.
11875 * prj.ads (Get_Object_Directory): Fix and complete documentation
11876 (Project_Data): New component Ada_Objects_Path_No_Libs
11878 2014-01-24 Robert Dewar <dewar@adacore.com>
11880 * checks.adb (Expr_Known_Valid): Result of fpt operator never
11883 2014-01-24 Eric Botcazou <ebotcazou@adacore.com>
11885 * back_end.adb: Minor fix in comment.
11887 2014-01-24 Javier Miranda <miranda@adacore.com>
11889 * sem_ch3.adb (Check_Abstract_Overriding): Code reestructuration
11890 required to report the error in case of task types.
11892 2014-01-24 Ed Schonberg <schonberg@adacore.com>
11894 * sem_attr.adb: Additional index checking.
11896 2014-01-24 Ed Schonberg <schonberg@adacore.com>
11898 * sem_attr.adb (Analyze_Attribute, case 'Update): Analyze
11899 expressions in each component association, and for records note
11900 the entity in each association choice, for subsequent resolution.
11901 (Resolve_Attribute, case 'Update): Complete resolution of
11902 expressions in each component association.
11904 2014-01-24 Robert Dewar <dewar@adacore.com>
11906 * sem.adb (Sem): Avoid premature reference to Current_Sem_Unit
11907 (this was causing Is_Main_Unit_Or_Main_Unit_Spec to be set wrong,
11908 leading to wrong handling of SPARK_Mode for library units).
11910 2014-01-24 Robert Dewar <dewar@adacore.com>
11912 * sem_ch6.adb (Analyze_Subprogram_Body_Helper): Set SPARK_Mode
11913 on generic instances (do not consider them to be internally
11916 2014-01-24 Doug Rupp <rupp@adacore.com>
11918 * s-osinte-android.ads (pthread_sigmask): Import sigprocmask
11919 vice pthread_sigmask.
11921 2014-01-24 Vincent Celier <celier@adacore.com>
11923 * prj.adb (Debug_Output (Str, Str2)): Output if verbosity is
11926 2014-01-24 Vincent Celier <celier@adacore.com>
11928 * prj-ext.adb (Add): Do not output anything when Silent is True,
11929 whatever the verbosity. When Source is From_External_Attribute,
11930 set the corresponding environment variable if it is not already set.
11931 * prj-ext.ads (Add): New Boolean parameter Silent, defaulted
11933 * prj-proc.adb (Process_Expression_For_Associative_Array):
11934 For attribute External, call Prj.Ext.Add with Silent set to
11935 True for the child environment, to avoid useless output in non
11938 2014-01-24 Ed Schonberg <schonberg@adacore.com>
11940 * sem_res.adb (Set_Slice_Subtype): Handle properly a discrete
11941 range given by a subtype indication, and force evaluation of
11942 the bounds, as for a simple range.
11943 * exp_util.adb (Evaluate_Slice_Bounds): Utility to force evaluation
11944 of bounds of slice for various kinds of discrete ranges.
11945 (Evaluate_Name, Evaluate_Subtype_From_Expr): use
11946 Evaluate_Slice_Bounds.
11948 2014-01-24 Bob Duff <duff@adacore.com>
11950 * s-taskin.ads (Activator): Make this Atomic, because
11951 Activation_Is_Complete reads it, and that can be called
11952 from any task. Previously, this component was only
11953 modified by the activator before activation, and by
11954 Self after activation.
11955 * a-taside.ads, a-taside.adb (Environment_Task,
11956 Activation_Is_Complete): Implement these missing functions.
11958 2014-01-24 Doug Rupp <rupp@adacore.com>
11960 * init.c: Add a handler section for Android.
11962 2014-01-24 Arnaud Charlet <charlet@adacore.com>
11964 * i-cexten.ads (Unsigned_33..64, Unsigned_33..64): New types.
11966 2014-01-24 Ed Schonberg <schonberg@adacore.com>
11968 * sem_ch4.adb (Operator_Check): If one operand is a
11969 Raise_Expression, set its type to that of the other operand.
11970 * sem_res.adb (Resolve_Raise_Expression): new procedure.
11971 (Resolve_Actuals): For an actual that is a Raise_Expression,
11972 set the type to that of the formal.
11973 * sem_type.adb (Find_Unique_Type): If one of the operands is a
11974 Raise_Expression, return type of the other operand.
11976 2014-01-24 Ed Schonberg <schonberg@adacore.com>
11978 * sem_aggr.adb (Resolve_Record_Aggregate): If a scalar
11979 component of the record has a type with a default aspect, and
11980 the corresponding aggregate component is initiaized with a box,
11981 use the default value in the rewritten aggregate.
11983 2014-01-24 Tristan Gingold <gingold@adacore.com>
11985 * s-interr.ads, s-interr.adb, s-interr-hwint.adb, s-interr-vms.adb,
11986 s-interr-sigaction.adb,
11987 s-interr-dummy.adb (Install_Restricted_Handlers): Add Prio parameter.
11988 * exp_ch9.adb (Make_Initialize_Protection): Add Prio parameter
11989 to the call to Install_Restricted_Handlers.
11991 2014-01-24 Emmanuel Briot <briot@adacore.com>
11993 * prj-nmsc.adb (Check_File): Add protection when the source is
11994 not fully initialized.
11996 2014-01-24 Ed Schonberg <schonberg@adacore.com>
11998 * sem_util.adb (Is_Post_State): In a postcondition, a selected
11999 component that denotes an implicit dereference is a reference
12000 to the post state of the subprogram.
12002 2014-01-24 Robert Dewar <dewar@adacore.com>
12004 * sem_ch6.adb (Analyze_Subprogram_Body_Helper): SPARK_Mode OFF
12005 for generated subprograms.
12006 (Analyze_Subprogram_Specification): Ditto.
12008 2014-01-24 Vincent Celier <celier@adacore.com>
12010 * prj-dect.adb (Check_Attribute_Allowed): Detect more forbidden
12011 attributes in package Builder of aggregate and aggregate library
12013 * prj-nmsc.adb (Process_Naming_Scheme.Check.Check_Aggregate):
12014 Remove procedure (Process_Naming_Scheme.Check.Check_Aggregated):
12015 Remove parameters. Change error message from "... externally
12016 build library ..." to "... externally built project ...".
12017 (Process_Naming_Scheme.Check): Do not do any check in aggregate
12018 project, as attribute Library_Dir and Library_Name have already
12019 been detected as forbidden.
12021 2014-01-24 Vincent Celier <celier@adacore.com>
12023 * prj-env.adb (Find_Project): If cached project path is not in
12024 project directory, look in current directory first and use cached
12025 project path only if project is not found in project directory.
12027 2014-01-24 Robert Dewar <dewar@adacore.com>
12029 * sem_util.adb, lib-xref.adb: Correct false positive warnings.
12031 2014-01-24 Vincent Celier <celier@adacore.com>
12033 * projects.texi: Document that aggregate projects are only
12034 supported by gprbuild, but not by gnatmake. Document that the
12035 only attribute Switches in package Binder of aggregate projects
12036 will be ignored if its index is not others. Document that
12037 attribute Global_Config_File is allowed in package Binder of
12038 aggregate projects.
12040 2014-01-24 Robert Dewar <dewar@adacore.com>
12042 * sem_prag.adb: Minor code reorganization.
12043 * sem_util.adb: Minor fix of potential latent bug in Is_LHS.
12045 2014-01-24 Pascal Obry <obry@adacore.com>
12047 * prj-attr.adb, projects.texi, snames.ads-tmpl: Add Excluded_Patterns
12048 attribute definition.
12050 2014-01-24 Vincent Celier <celier@adacore.com>
12052 * makeutl.adb (Queue.Insert_No_Roots): In gprbuild, do not put
12053 in the Queue the same source (same path, same multi-source index)
12054 from the same project file, to avoid compiling several times
12057 2014-01-24 Eric Botcazou <ebotcazou@adacore.com>
12059 * einfo.ads (First_Rep_Item): Remove obsolete stuff.
12060 (Has_Gigi_Rep_Item): Likewise.
12061 * sem_prag.adb (Analyze_Pragma) <Pragma_Linker_Section>: Do not set
12062 Has_Gigi_Rep_Item for objects.
12063 * gcc-interface/decl.c (prepend_one_attribute_to): Rename into...
12064 (prepend_one_attribute): ...this.
12065 (prepend_one_attribute_pragma): New function extracted from...
12066 (prepend_attributes): ...here. Swap the parameters for consistency.
12067 (gnat_to_gnu_entity): Adjust calls to prepend_one_attribute_to and to
12068 prepend_attributes.
12069 <object>: Deal with a pragma Linker_Section on a constant
12070 or variable. <E_Function>: Deal with a pragma Linker_Section
12072 (get_minimal_subprog_decl): Adjust calls to prepend_one_attribute_to.
12074 2014-01-24 Vincent Celier <celier@adacore.com>
12076 * opt.ads: Minor comment update.
12078 2014-01-24 Robert Dewar <dewar@adacore.com>
12080 * sem_prag.adb (Analyze_Input_Output): Add missing error check
12082 * sem_util.adb (Is_Refined_State): Add defense against junk
12085 2014-01-24 Pascal Obry <obry@adacore.com>
12087 * projects.texi: Removes Build_Slaves attribute documentation.
12089 2014-01-23 Robert Dewar <dewar@adacore.com>
12091 * opt.adb (Register_Opt_Config_Switches): Save SPARK_Mode_Pragma
12094 2014-01-23 Ed Schonberg <schonberg@adacore.com>
12096 * sem_util.adb (Is_Potentially_Unevaluated): Predicate only
12097 applies to expressions that come from source.
12098 * sem_attr.adb (Analyze_Attribute, case 'Old): Improve error
12100 (Analyze_Attribute, case 'Loop_Entry): Apply SPARK 2014 legality
12101 rule regarding potentially unevaluated expressions, to prefix
12104 2014-01-23 Ed Schonberg <schonberg@adacore.com>
12106 * exp_util.adb (Make_Invqriant_Call): If type of expression is
12107 a private extension, get invariant from base type.
12109 2014-01-23 Robert Dewar <dewar@adacore.com>
12111 * sem_util.adb, sem_attr.adb: Minor reformatting.
12113 2014-01-23 Robert Dewar <dewar@adacore.com>
12115 * opt.adb (Save_Opt_Config_Switches): Save SPARK_Mode_Pragma
12116 (Restore_Opt_Config_Switches): Restore SPARK_Mode_Pragma.
12117 * sem.adb (Semantics): Remove save/restore of
12118 SPARK_Mode[_Pragma]. Not needed since already done in
12119 Save/Restore_Opt_Config_Switches.
12121 2014-01-23 Robert Dewar <dewar@adacore.com>
12123 * gnat_rm.texi, einfo.adb, einfo.ads, sem_prag.adb, gnat_ugn.texi,
12124 freeze.adb, repinfo.adb, aspects.adb, aspects.ads, sem_ch13.adb:
12125 Linker_Section enhancements.
12127 2014-01-23 Tristan Gingold <gingold@adacore.com>
12129 * gnat_rm.texi: Minor editing.
12131 2014-01-23 Robert Dewar <dewar@adacore.com>
12133 * opt.adb (Set_Opt_Config_Switches): Reset SPARK mode for
12134 with'ed internal units.
12135 * sem.adb (Semantics): Save and restore SPARK_Mode[_Pragma].
12137 2014-01-23 Javier Miranda <miranda@adacore.com>
12139 * lib-xref.adb (Generate_Reference): As part of processing the
12140 "end-of-spec" reference generate an extra reference to the first
12141 private entity of the package.
12142 * xr_tabls.adb (Add_Reference): No action needed for the extra
12143 'E' reference associated; similar to the processing of the
12146 2014-01-23 Bob Duff <duff@adacore.com>
12148 * gnat_ugn.texi: Change "--&pp off" to "--!pp off".
12150 2014-01-23 Ed Schonberg <schonberg@adacore.com>
12152 * sem_util.ads, sem_util.adb (Is_Potentially_Unevaluated): new
12153 predicate to implement rule given in 6.1.1 (20/3).
12154 * sem_attr.adb (Analyze_Attribute, case 'Old): Reject prefix of
12155 'Old in a postcondition, if it is potentially unevaluated and
12156 it is not an entity name.
12158 2014-01-23 Bob Duff <duff@adacore.com>
12160 * gnat_ugn.texi: Document the new "--&pp off" feature of gnatpp.
12162 2014-01-23 Robert Dewar <dewar@adacore.com>
12164 * gnatlink.adb (Gnatlink): Fix problem of generating bad name
12167 2014-01-23 Bob Duff <duff@adacore.com>
12169 * g-dynhta.ads: Minor comment fix.
12171 2014-01-23 Yannick Moy <moy@adacore.com>
12173 * sem_ch6.adb (Analyze_Subprogram_Body_Helper): Inherit SPARK_Mode
12174 from spec on body only when not already inherited on spec. Set
12175 SPARK_Mode from context on body without previous spec. *
12176 * sem_prag.adb (Analyze_Pragma): Check placement of pragma on
12177 library-level entities. Correct retrieval of entity from
12178 declaration, for cases where the declaration is not a unit.
12179 * sem_ch12.adb (Instantiate_Object): Avoid
12180 calling Is_Volatile_Object on an empty node.
12182 2014-01-23 Robert Dewar <dewar@adacore.com>
12184 * gnatlink.adb (Gnatlink): Check for suspicious executable file
12187 2014-01-23 Robert Dewar <dewar@adacore.com>
12189 * a-ngelfu.ads: Remove bad uses of AND which should be AND THEN.
12190 * sem_res.adb (Check_No_Direct_Boolean_Operators): Don't give
12191 style errors in instances.
12192 * g-dynhta.ads (Static_HTable): Comment updates.
12194 2014-01-23 Vincent Celier <celier@adacore.com>
12196 * prj-conf.adb (Get_Or_Create_Configuration_File): Do not attempt
12197 to find a configuration project file when Config_File_Name is
12198 No_Configuration_File.
12199 * prj-conf.ads (No_Configuration_File): New constant String.
12200 * prj-pars.adb (Parse): Call Get_Or_Create_Configuration_File
12201 with Config_File_Name set to No_Configuration_File, so that
12202 no existing configuration project file will be used, and the
12203 configuration project will be only created in memory when
12204 Add_Default_GNAT_Naming_Scheme is called.
12205 * projects.texi: Minor reformatting.
12207 2014-01-23 Vincent Celier <celier@adacore.com>
12209 * prj-conf.adb (Get_Or_Create_Configuration_File): Never parse
12210 a config project file if On_Load_Config is not null.
12211 * prj-pars.adb: Minor comment changes.
12213 2014-01-23 Ed Schonberg <schonberg@adacore.com>
12215 * lib-xref.adb (Output_References): Output progenitors of
12216 synchronized tagged types, for source navigation.
12218 2014-01-23 Robert Dewar <dewar@adacore.com>
12220 * exp_util.adb, sinfo.adb, sinfo.ads, sem.adb, sem_res.adb,
12221 expander.adb, exp_ch11.adb, exp_ch11.ads, sem_ch11.adb, sem_ch11.ads,
12222 sprint.adb, sprint.ads: Remove unused node N_Subprogram_Info.
12224 2014-01-23 Emmanuel Briot <briot@adacore.com>
12226 * prj-conf.adb (Get_Or_Create_Configuration_File): call
12227 On_Load_Config later.
12229 2014-01-23 Hristian Kirtchev <kirtchev@adacore.com>
12231 * sem_ch3.adb (Analyze_Declarations): Do not
12232 generate the spec of the late primitive in ASIS mode. Add two
12233 comments to explain the special cases when the expansion is
12236 2014-01-23 Robert Dewar <dewar@adacore.com>
12238 * sem_util.adb (Note_Possible_Modification): Fix error of
12239 misbehaving for implicit dereference cases in -gnatc mode.
12241 2014-01-23 Emmanuel Briot <briot@adacore.com>
12243 * prj-pars.adb: Minor reformatting.
12245 2014-01-22 Ed Schonberg <schonberg@adacore.com>
12247 * sem_ch6.adb (Analyze_Subprogram_Body_Helper): A subprogram
12248 body generated for an expression function within a protected body
12249 needs a set of renaming declarations if the expression function
12252 2014-01-22 Ed Schonberg <schonberg@adacore.com>
12254 * lib-xref.adb (Get_Type_Reference): In semantics-only mode,
12255 list interface progenitor of a tagged concurrent type, for better
12258 2014-01-22 Robert Dewar <dewar@adacore.com>
12260 * lib.adb (In_Extended_Main_Code_Unit): Return False for
12262 (In_Extended_Main_Source_Unit): Return False for Standard_Location.
12263 * lib.ads (In_Extended_Main_Code_Unit): Add documentation on
12264 treatment of Slocs No_Location and Standard_Location.
12265 * restrict.adb (Check_Restriction_No_Dependence): Explicitly
12266 check for entity with Standard_Location Sloc, rather than relying
12267 on Lib routines to do that.
12268 * sem_res.adb (Resolve_Call): Implement SPARK_05 restriction
12269 that a call cannot occur before a later occuring body within
12272 2014-01-22 Thomas Quinot <quinot@adacore.com>
12274 * rtsfind.adb: Update comment.
12276 2014-01-22 Hristian Kirtchev <kirtchev@adacore.com>
12278 * sem_aux.ads, sem_aux.adb (Is_Body): New routine.
12279 * sem_ch3.adb (Analyze_Declarations): Add local variable
12280 Body_Seen. Generate the spec of a late controlled
12281 primitive body that is about to freeze its related type.
12282 (Handle_Late_Controlled_Primitive): New routine.
12284 2014-01-22 Robert Dewar <dewar@adacore.com>
12286 * a-stream.adb: Minor reformatting.
12288 2014-01-22 Ed Schonberg <schonberg@adacore.com>
12290 * sem_ch8.adb (From_Actual_Package): Introduce a recursive
12291 sub-procedure Declared_In_Actual to handle properly the visibility
12292 of actuals in actual packages, that are themselves actuals to a
12293 actual package of the current instance. This mimics properly the
12294 visibility of formals of formal packages declared with a box,
12295 within the corresponding generic unit.
12297 2014-01-22 Robert Dewar <dewar@adacore.com>
12299 * checks.adb: Do not assume that a volatile variable is valid.
12301 2014-01-22 Thomas Quinot <quinot@adacore.com>
12303 * g-catiio.ads (Image, Value): Clarify that these functions
12304 operate in the local time zone. Minor documentation update.
12306 2014-01-22 Thomas Quinot <quinot@adacore.com>
12308 * csets.adb, csets.ads, opt.ads: Minor documentation fixes.
12310 2014-01-22 Robert Dewar <dewar@adacore.com>
12312 * sem_aux.adb, sem_aux.ads, sem_ch3.adb (Has_Unconstrained_Elements):
12313 Moved to sem_aux.adb.
12315 2014-01-22 Robert Dewar <dewar@adacore.com>
12317 * vms_data.ads: Minor reformatting.
12319 2014-01-22 Robert Dewar <dewar@adacore.com>
12321 * debug.adb: Document messages affected by -gnatd.E including
12322 the new ones that relate to late definition of equality.
12323 * sem_ch6.adb (Check_Untagged_Equality): In Ada 2012 mode, if
12324 debug flag -gnatd.E is set, then generate warnings rather than
12326 (Check_Untagged_Equality): In earlier versions of Ada,
12327 generate warnings if Warn_On_Ada_2012_Incompatibility flag is set.
12329 2014-01-22 Robert Dewar <dewar@adacore.com>
12331 * sem_prag.adb (Usage_Error): Output additional messages for
12332 unconstrained OUT parameters lacking an input dependency.
12334 2014-01-22 Robert Dewar <dewar@adacore.com>
12336 * sem_ch4.adb: Minor reformatting.
12338 2014-01-22 Robert Dewar <dewar@adacore.com>
12340 * restrict.ads: Minor reformatting.
12341 * sem_res.adb (Resolve_Call): Check for SPARK_05 restriction that
12342 forbids a call from within a subprogram to the same subprogram.
12344 2014-01-22 Thomas Quinot <quinot@adacore.com>
12346 * a-stream.ads (Read_SEA, Write_SEA): New subprograms, optimized
12347 stream attributes for Stream_Element_Array.
12348 * a-stream.adb (Read_SEA, Write_SEA): Bodies for the above.
12349 * rtsfind.adb (Check_CRT): Do not reject a reference to an entity
12350 defined in the current scope.
12352 2014-01-22 Robert Dewar <dewar@adacore.com>
12354 * debug.adb, exp_ch4.adb, erroutc.adb: Minor reformatting.
12356 2014-01-22 Thomas Quinot <quinot@adacore.com>
12358 * sem_ch7.adb, sem_ch8.adb, exp_ch3.adb: Minor reformatting.
12360 2014-01-22 Thomas Quinot <quinot@adacore.com>
12362 * sem_ch3.adb (Analyze_Object_Declaration): For a constant
12363 declaration initialized with a function call, whose type
12364 has variable size, need to remove side effects so that the
12365 initialization expression becomes a dereference of a temporary
12366 reference to the function result.
12368 2014-01-22 Yannick Moy <moy@adacore.com>
12370 * errout.adb (Initialize): Remove trick to add dummy entry
12372 * erroutc.adb (Set_Warnings_Mode_Off,
12373 Set_Warnings_Mode_On): Do nothing if warnings are suppressed by
12374 command line switch.
12375 * opt.ads (Warning_Mode): Document behavior
12376 wrt pragma Warnings, in normal mode and in GNATprove_Mode.
12378 2014-01-22 Robert Dewar <dewar@adacore.com>
12380 * sem_ch3.adb, errout.adb, erroutc.adb: Minor reformatting.
12382 2014-01-22 Robert Dewar <dewar@adacore.com>
12384 * sem_ch13.adb (Check_Pool_Size_Clash): New procedure
12385 (Analyze_Attribute_Definition_Clause, case Storage_Pool): call
12386 Check_Pool_Size_Clash (Analyze_Attribute_Definition_Clause,
12387 case Storage_Size): call Check_Pool_Size_Clash.
12389 2014-01-22 Robert Dewar <dewar@adacore.com>
12391 * sem_ch3.adb, exp_util.adb, sem_dim.adb, sem_elab.adb, sem_ch8.adb,
12392 sem_eval.ads: Minor reformatting.
12394 2014-01-22 Thomas Quinot <quinot@adacore.com>
12396 * sem_eval.adb (Compile_Time_Known_Bounds): Return False for
12397 Any_Composite to prevent cascaded errors.
12399 2014-01-22 Yannick Moy <moy@adacore.com>
12401 * errout.adb (Initialize): Do not insert special entry in Warnings
12402 table in GNATprove_Mode.
12403 * erroutc.adb (Set_Warnings_Mode_On): Add info in Warnings table in
12405 * gnat1drv.adb (Adjust_Global_Switches): Do not suppress frontend
12408 2014-01-22 Robert Dewar <dewar@adacore.com>
12410 * sem_prag.adb (Analyze_Initializes_In_Decl_Part): Handle null
12413 2014-01-22 Robert Dewar <dewar@adacore.com>
12415 * snames.ads-tmpl: Update header.
12417 2014-01-22 Thomas Quinot <quinot@adacore.com>
12419 * exp_util.adb (Insert_Actions): When inserting actions on a
12420 short circuit operator that has already been analyzed, do not park
12421 actions in node; instead introduce an N_Expression_With_Actions
12422 and insert actions immediately.
12423 Add guard for unexpected case of climbing up through statement
12424 in Actions list of an N_Expression_With_Actions.
12425 * sem_elab.adb (Insert_Elab_Check): Remove complex
12426 specialized circuitry for the case where the context is already
12427 analyzed, as it is not needed and introduces irregularities in
12428 finalization. Instead rely on the above change to Insert_Actions
12429 to ensure that late insertion on short circuit operators works
12432 2014-01-22 Ed Schonberg <schonberg@adacore.com>
12434 * sem_ch4.adb (Operator_Check): Improve error message when an
12435 operand of concatenation is an access type.
12437 2014-01-22 Thomas Quinot <quinot@adacore.com>
12439 * sem_dim.adb (Analyze_Dimension_Identifier): Add guard against
12442 2014-01-22 Ed Schonberg <schonberg@adacore.com>
12444 * sem_ch8.adb (Find_Selected_Component): Handle properly the case
12445 of an expanded name in a proper body, whose prefix is a package
12446 in the context of the proper body, when there is a homonym of
12447 the package declared in the parent unit.
12449 2014-01-22 Robert Dewar <dewar@adacore.com>
12451 * sem_warn.adb (Check_Use_Clause): Don't give no entities used
12452 msg if errors found.
12453 (Check_One_Unit): Same change.
12455 2014-01-22 Robert Dewar <dewar@adacore.com>
12457 * ug_words: Add missing/wrong entries for VMS warning switches.
12458 * sem_prag.adb (Check_Duplicate_Pragma): Avoid flagging parent type.
12460 2014-01-22 Jerome Guitton <guitton@adacore.com>
12462 * mlib-tgt-specific-vxworks.adb (Get_Target_Suffix): Replace xscale by
12465 2014-01-22 Robert Dewar <dewar@adacore.com>
12467 * gnat_rm.texi, gnat_ugn.texi: Document passive task optimization
12469 2014-01-22 Eric Botcazou <ebotcazou@adacore.com>
12471 * gcc-interface/Makefile.in: Minor fixes.
12473 2014-01-21 Robert Dewar <dewar@adacore.com>
12475 * par-ch4.adb (P_If_Expression): Rewritten to improve error recovery.
12476 * par-ch5.adb (P_Condition): New version with expression prescanned.
12477 * par.adb (P_Condition): New version with expression prescanned.
12479 2014-01-21 Robert Dewar <dewar@adacore.com>
12481 * gnat_rm.texi: Document that Allow_Integer_Address is ignored
12482 if Address is not a private type.
12483 * sem_prag.adb (Analyze_Pragma, case Allow_Integer_Address):
12484 Ignore pragma if System.Address is not a private type.
12486 2014-01-21 Arnaud Charlet <charlet@adacore.com>
12488 * namet.ads (Name_Len): Initialize to 0 to avoid accessing an
12489 uninitialized value.
12491 2014-01-21 Thomas Quinot <quinot@adacore.com>
12493 * gnat_rm.texi (Scalar_Storage_Order): Update documentation.
12495 2014-01-21 Ed Schonberg <schonberg@adacore.com>
12497 * sem_ch12.adb (Set_Instance_Env): In Ada 2012 mode, preserve
12498 the value of Assertions_Enabled flag when compiling an instance of
12499 an internal unit. This facilitates the use of pre/postconditions
12500 in generic internal units, such as the new elementary function
12503 2014-01-21 Robert Dewar <dewar@adacore.com>
12505 * exp_aggr.adb: Minor reformatting.
12506 * sem_attr.adb: Minor reformatting.
12507 * sem_res.adb: Minor comment addition.
12508 * einfo.adb: Minor comment updates.
12509 * freeze.adb: Minor reformatting and code reorganization.
12511 2014-01-21 Ed Schonberg <schonberg@adacore.com>
12513 * par-ch4.adb (P_If_Expression): Handle more gracefully an
12514 elsif clause that does not have an else part.
12516 2014-01-21 Robert Dewar <dewar@adacore.com>
12518 * checks.adb, sem_util.ads, sem_ch4.adb: Minor reformatting.
12519 * gcc-interface/Makefile.in: clean up target pairs.
12521 2014-01-21 Pascal Obry <obry@adacore.com>
12523 * projects.texi: Minor typo fix.
12525 2014-01-21 Thomas Quinot <quinot@adacore.com>
12527 * freeze.adb (Check_Component_Storage_Order): If a record type
12528 has an explicit Scalar_Storage_Order attribute definition clause,
12529 reject any component that itself is of a composite type and does
12532 2014-01-21 Ed Schonberg <schonberg@adacore.com>
12534 * sem_ch10.adb (Generate_Parent_Reference): Make public so it
12535 can be used to generate proper cross-reference information for
12536 the parent units of proper bodies.
12538 2014-01-21 Thomas Quinot <quinot@adacore.com>
12540 * exp_pakd.adb (Expand_Packed_Element_Set,
12541 Expand_Packed_Element_Reference): No byte swapping required in
12542 the front-end for the case of a reverse storage order array,
12543 as this is now handled uniformly in the back-end. However we
12544 still need to swap back an extracted element if it is itself a
12545 nested composite with reverse storage order.
12547 2014-01-21 Hristian Kirtchev <kirtchev@adacore.com>
12549 * sem_prag.adb (Analyze_External_Property): Add processing for "others".
12550 (Analyze_Pragma): Update the grammar of pragma Abstract_State to
12553 2014-01-21 Arnaud Charlet <charlet@adacore.com>
12555 * gnat_ugn.texi: Minor updates.
12557 2014-01-21 Thomas Quinot <quinot@adacore.com>
12559 * exp_pakd.adb: Update comment, minor reformatting.
12561 2014-01-21 Hristian Kirtchev <kirtchev@adacore.com>
12563 * sem_ch3.adb (Analyze_Variable_Contract): Trigger the volatile
12564 object check when SPARK_Mode is on.
12565 * sem_ch6.adb (Process_Formals): Trigger the volatile object
12566 check when SPARK_Mode is on.
12567 * sem_ch12.adb (Instantiate_Object): Trigger the volatile object
12568 check when SPARK_Mode is on.
12569 * sem_ch13.adb (Analyze_Aspect_Specifications): Insert the
12570 corresponding pragma of aspect SPARK_Mode in the visible
12571 declarations of a package declaration.
12572 * sem_prag.adb (Analyze_Pragma): Trigger the volatile object
12573 check when SPARK_Mode is on.
12574 * sem_res.adb (Resolve_Actuals): Trigger the volatile object
12575 check when SPARK_Mode is on.
12576 (Resolve_Entity_Name): Trigger
12577 the volatile object check when SPARK_Mode is on.
12579 2014-01-21 Robert Dewar <dewar@adacore.com>
12581 * sem_ch3.adb, sem_prag.adb, sem_prag.ads, sem_ch12.adb, sem_res.adb,
12582 sem_ch6.adb, a-except-2005.adb: Minor reformatting.
12584 2014-01-21 Ed Schonberg <schonberg@adacore.com>
12586 * exp_ch3.adb (Expand_N_Object_Declaration): When a class-wide
12587 object is declared, it is rewritten as a renaming of an dynamic
12588 expression that wraps the initial value. The renaming declaration
12589 is first given an internal name, to prevent collisions with the
12590 entity already declared, and then the name is modified to reflect
12591 the original one. the modification of the name must preserve
12592 the source location of the original, to prevent spurious errors
12593 when compiling with style checks if the declaration involves
12594 more than one entity.
12596 2014-01-21 Hristian Kirtchev <kirtchev@adacore.com>
12598 * aspects.adb Add entries for Async_Readers, Async_Writers,
12599 Effective_Reads and Effective_Writes in table Canonical_Aspect.
12600 * aspects.ads Add entries for Async_Readers, Async_Writers,
12601 Effective_Reads and Effective_Writes in tables Aspect_Id,
12602 Aspect_Names, Aspect_Delay and Implementation_Defined_Aspect.
12603 * atree.adb (Ekind_In): New version with 8 parameters.
12604 (Node34): New routine.
12605 (Set_Node34): New routine.
12606 * atree.ads (Ekind_In): New version with 8 parameters.
12607 (Node34): New routine.
12608 (Set_Node34): New routine.
12609 * einfo.adb Contract is now Node34.
12610 (Contract): Update the assertion and node usage.
12611 (Get_Pragma): Include pragmas Async_Readers, Async_Writers,
12612 Effective_Reads and Effective_Writes.
12613 (Set_Contract): Update the assertion and node usage.
12614 (Write_Field24_Name): Remove the output for a contract.
12615 (Write_Field34_Name): Add output for a contract.
12616 * einfo.ads Contract is now Node34. Update the comment on
12617 attribute usage and related node structures.
12618 (Get_Pragma): Update the comment on usage.
12619 * par-prag.adb (Prag): Pragmas Async_Readers, Async_Writers,
12620 Effective_Reads and Effective_Writes do not require special
12621 processing by the parser.
12622 * sem_ch3.adb (Analyze_Variable_Contract): New routine.
12623 (Analyze_Declarations): Analyze the contract of a variable at
12624 the end of the declarative region.
12625 (Analyze_Object_Declaration): Create a contract for a variable.
12626 * sem_ch6.adb (Analyze_Subprogram_Contract): Update the retrieval
12627 of classification pragmas.
12628 (Process_Formals): Detect an illegal
12629 use of a volatile object as a formal in a function.
12630 * sem_ch12.adb (Instantiate_Object): Detect an illegal use of
12631 a volatile object as an actual in generic instantiation.
12632 * sem_prag.adb Add entries for Async_Readers, Async_Writers,
12633 Effective_Reads and Effective_Writes in table Sig_Flags.
12634 (Analyze_External_State_In_Decl_Part): New routine.
12635 (Analyze_Global_Item): Detect an illegal use of a volatile object
12636 as a global item of a function.
12637 (Analyze_Pragma): Reimplement
12638 pragma Abstract_State. Add support for pragmas Async_Readers,
12639 Async_Writers, Effective_Reads and Effective_Writes.
12640 (Check_External_Properties): New routine.
12641 * sem_prag.ads (Analyze_External_State_In_Decl_Part): New routine.
12642 (Check_External_Properties): New routine.
12643 * sem_res.adb (Resolve_Actuals): Detect an illegal use of a
12644 volatile object as an actual in a call.
12645 (Resolve_Entity_Name):
12646 Add local variables Par, Prev and Usage_OK. Detect illegal
12647 contexts of volatile objects.
12648 * sem_util.adb (Add_Contract_Item): Add support for
12649 pragmas associated with the contract of a variable.
12650 (Async_Readers_Enabled): New routine.
12651 (Async_Writers_Enabled): New routine.
12652 (Effective_Reads_Enabled): New routine.
12653 (Effective_Writes_Enabled): New routine.
12654 (Has_Enabled_Property):
12656 (Is_Unchecked_Conversion_Instance): New routine.
12657 (Is_Volatile_Object): Add support for entities that may denote
12659 * sem_util.ads (Add_Contract_Item): Update the
12661 (Async_Readers_Enabled): New routine.
12662 (Async_Writers_Enabled): New routine.
12663 (Effective_Reads_Enabled): New routine.
12664 (Effective_Writes_Enabled): New routine.
12665 (Is_Unchecked_Conversion_Instance): New routine.
12666 * sinfo.ads Update the comment on the structure of N_Contract.
12667 * snames.ads-tmpl Add predefined names for Async_Readers,
12668 Async_Writers, Effective_Reads and Effective_Writes. Add
12669 pragma ids for Async_Readers, Async_Writers, Effective_Reads
12670 and Effective_Writes.
12672 2014-01-21 Robert Dewar <dewar@adacore.com>
12674 * exp_ch4.adb (Eval_Op_Expon): Use CRT_Safe_Compile_Time_Known_Value
12675 * sem_eval.adb (Compile_Time_Known_Value): Remove special
12676 handling of CRT mode (CRT_Safe_Compile_Time_Known_Value): New
12677 function (Eval_Op_Expon): Add CRT_Safe in call to Test_Foldable
12678 (Test_Foldable): Add CRT_Safe parameter
12679 * sem_eval.ads (Compile_Time_Known_Value): Remove special
12680 handling of CRT mode.
12681 (CRT_Safe_Compile_Time_Known_Value): New function.
12683 2014-01-21 Robert Dewar <dewar@adacore.com>
12685 * sem_prag.adb (Analyze_Pragma, case SPARK_Mode): Fix problem
12686 with pragma or aspect that applies to package spec or subprogram
12689 2014-01-21 Robert Dewar <dewar@adacore.com>
12691 * exp_aggr.adb: Minor reformatting.
12693 2014-01-21 Johannes Kanig <kanig@adacore.com>
12695 * gnat1drv.adb (Gnat1drv) remove obsolete reference to -gnatd.H.
12697 2014-01-21 Bob Duff <duff@adacore.com>
12699 * gnat_ugn.texi: Document the "checks" attribute in gnat2xml.
12701 2014-01-21 Steve Baird <baird@adacore.com>
12703 * gnat_rm.texi: Improve description of SPARK_Mode pragma.
12705 2014-01-21 Vincent Celier <celier@adacore.com>
12707 * prj-part.adb (Parse_Single_Project): Accept to extend a project
12708 if it has only be imported by an project being extended. When a
12709 project that has only been imported by a project being extended
12710 is imported by another project that is not being extended,
12711 reset the previous indication, so that it will be an error if
12712 this project is extended later.
12713 * prj-tree.adb (Create_Project): Include component From_Extended
12714 in table Projects_HT
12715 * prj-tree.ads (Project_Name_And_Node): New Boolean component
12718 2014-01-21 Robert Dewar <dewar@adacore.com>
12720 * atree.ads, atree.adb: Add Node33 and Set_Node33.
12721 * einfo.ads, einfo.adb (SPARK_Pragma): New field (SPARK_Aux_Pragma):
12722 New field (SPARK_Pragma_Inherited): New flag
12723 (SPARK_Aux_Pragma_Inherited): New flag (SPARK_Mode_Pragmas):
12725 * lib.ads, lib.adb: Remove SPARK_Mode_Pragma, no longer used.
12726 * opt.ads (SPARK_Mode_Pragma): New global variable.
12727 * sem.ads: Add Save_SPARK_Mode_Pragma field to Scope_Stack_Entry.
12728 * sem_ch3.adb: Use new SPARK_Mode data structures.
12729 * sem_ch6.adb: Set SPARK_Mode fields in subprogram specs and bodies.
12730 * sem_ch7.adb: Set SPARK_Mode fields in package spec and body entities.
12731 * sem_ch8.adb (Push_Scope): Save SPARK_Mode_Pragma.
12732 (Pop_Scope): Restore SPARK_Mode_Pragma.
12733 * sem_prag.adb (Analyze_Pragma, case SPARK_Mode): Rewrite for
12734 new data structures.
12736 2014-01-21 Arnaud Charlet <charlet@adacore.com>
12738 * back_end.adb: Undo previous change, not needed. Minor reformatting.
12740 2014-01-21 Thomas Quinot <quinot@adacore.com>
12742 * exp_ch5.adb: Fix comment.
12743 * switch-c.adb: Minor comment update.
12744 * exp_ch3.adb: Minor reformatting.
12746 2014-01-21 Arnaud Charlet <charlet@adacore.com>
12748 * back_end.adb (Scan_Compiler_Arguments): Do not store object
12749 filename in gnatprove mode.
12751 2014-01-21 Thomas Quinot <quinot@adacore.com>
12753 * sinfo.ads (No_Ctrl_Actions): Clarify documentation (flag also
12754 suppresses usage of primitive _assign for tagged types).
12755 * exp_aggr.adb (Build_Array_Aggr_Code.Gen_Assign): Set
12756 No_Ctrl_Actions for a tagged type that does not require
12757 finalization, as we want to disable usage of _assign (which
12758 may cause undesirable discriminant checks on an uninitialized,
12761 2014-01-21 Ed Schonberg <schonberg@adacore.com>
12763 * sem_prag.adb: Reject invariant'class on completion.
12765 2014-01-21 Javier Miranda <miranda@adacore.com>
12767 * exp_ch3.adb (Build_Init_Procedure): For
12768 derivations of interfaces, do not move the the initialization
12769 of the _parent field since such assignment is not generated.
12771 2014-01-21 Ed Schonberg <schonberg@adacore.com>
12773 * sem_res.adb (Rewrite_Renamed_Operator): Do not replace entity
12774 with the operator it renames if we are within an expression of
12775 a pre/postcondition, because the expression will be reanalyzed
12776 at a later point, and the analysis of the renaming may affect
12777 the visibility of the operator when in an instance.
12779 2014-01-21 Robert Dewar <dewar@adacore.com>
12781 * sinfo.ads, sinfo.adb: Change Do_Discriminant_Check to use new Flag1.
12782 Add this flag to type conversion nodes and assignment nodes.
12783 * treepr.adb: Deal properly with Flag 1,2,3.
12784 * treeprs.adt: Minor comment update.
12786 2014-01-21 Robert Dewar <dewar@adacore.com>
12788 * sem_eval.adb (Compile_Time_Known_Value): Add Ignore_CRT
12790 * sem_eval.ads (Compile_Time_Known_Value): Add Ignore_CRT
12791 parameter, completely rewrite spec.
12793 2014-01-21 Ed Schonberg <schonberg@adacore.com>
12795 * sem_ch10.adb (Install_Withed_Unit): If the unit is a subprogram
12796 instance that is inlined, it may have been rewritten as a wrapper
12797 package. In that case the unit that must be made visible is the
12798 related instance of the package.
12800 2014-01-21 Arnaud Charlet <charlet@adacore.com>
12802 * exp_ch9.adb (Expand_N_Selective_Accept.Add_Accept): Refine
12803 previous change in codepeer mode.
12805 2014-01-21 Arnaud Charlet <charlet@adacore.com>
12807 * exp_ch9.adb (Expand_N_Selective_Accept.Add_Accept): Always add
12808 call to Abort_Undefer, as expected by the runtime.
12809 * s-tasren.adb (Local_Complete_Rendezvous): Replace
12810 Defer_Abort_Nestable by Defer_Abort, since we do not expect abort to be
12811 deferred at this point. Update comments.
12813 2014-01-21 Thomas Quinot <quinot@adacore.com>
12815 * exp_ch4.adb, exp_ch5.adb, checks.adb: Minor reformatting.
12817 2014-01-21 Arnaud Charlet <charlet@adacore.com>
12819 * switch-c.adb, usage.adb, gnat_ugn.texi: Mark -gnates as internal,
12822 2014-01-21 Robert Dewar <dewar@adacore.com>
12824 * switch-c.adb, usage.adb, atree.adb, atree.ads: Minor reformatting.
12826 2014-01-21 Thomas Quinot <quinot@adacore.com>
12828 * atree.adb, atree.ads (Num_Extension_Nodes): Switch to Node_Id, since
12829 this is value is used in Node_Id arithmetic operations.
12830 (Copy_Node, Exchange_Entities): Use loops indexed by Num_Extension_Nodes
12831 instead of hard-coded unrolled code.
12833 2014-01-21 Yannick Moy <moy@adacore.com>
12835 * gnat1drv.adb: Minor code cleanup, removing useless code.
12837 2014-01-21 Arnaud Charlet <charlet@adacore.com>
12839 * opt.ads (SPARK_Switches_File_Name): New.
12840 * switch-c.adb (Scan_Front_End_Switches): Add handling of -gnates=xxx *
12841 * usage.adb (Usage): Document -gnates, in gnatprove mode only.
12842 * gnat_ugn.texi: Document -gnates.
12844 2014-01-21 Yannick Moy <moy@adacore.com>
12846 * errout.adb (Special_Msg_Delete): Update comment. Remove
12847 special case for GNATprove which should not ignore mismatch
12848 in sizes for representation clauses.
12849 * sem_prag.adb (Analyze_Pragma): Remove special case for GNATprove
12850 which should not ignore pragma Pack.
12852 2014-01-21 Ed Schonberg <schonberg@adacore.com>
12854 * sem_ch4.adb: Code clean up.
12856 2014-01-21 Steve Baird <baird@adacore.com>
12858 * gnat_rm.texi: Improve GNAT RM description of SPARK_Mode pragma.
12860 2014-01-21 Robert Dewar <dewar@adacore.com>
12862 * gcc-interface/gigi.h: Get Flags array address.
12863 * gcc-interface/trans.c: Acquire Flags array address.
12864 * atree.adb: Add support for Flags array and Flag0,1,2,3.
12865 * atree.ads: Add support for Flags array and Flag0,1,2,3.
12866 * atree.h: Add support for Flags array and Flag0,1,2,3.
12867 * back_end.adb: Pass Flags array address to gigi.
12869 2014-01-21 Ed Schonberg <schonberg@adacore.com>
12871 * sem_ch8.adb (Attribute_Renaming): Transfer original attribute
12872 reference to generated body so that legality checks on stream
12873 attributes are properly applied. If type is tagged and already
12874 frozen, insert generated body at the point of the renaming
12877 2014-01-21 Ed Schonberg <schonberg@adacore.com>
12879 * sem_ch12.adb: Code clean up.
12880 * sem_ch8.adb: Minor reformatting
12882 2014-01-20 Robert Dewar <dewar@adacore.com>
12884 * checks.adb: Check SPARK_Mode instead of GNATProve_Mode for
12885 converting warnings on inevitable exceptions to errors.
12886 * exp_ch4.adb: Check SPARK_Mode instead of GNATProve_Mode for
12887 converting warnings on inevitable exceptions to errors.
12888 * opt.adb (SPARK_Mode_Config): Handled like other config flags
12889 * opt.ads (SPARK_Mode_Type): Moved here from types (renamed from
12890 SPARK_Mode_Id) (SPARK_Mode_Type): Add pragma Ordered, remove
12891 SPARK_ from names (SPARK_Mode): New flag (SPARK_Mode_Config):
12892 New flag (Config_Switches_Type): Add SPARK_Mode field
12893 * sem.adb: Minor code reorganization (remove unnecessary with)
12894 * sem.ads (Scope_Stack_Entry): Add Save_SPARK_Mode field
12895 * sem_aggr.adb: Check SPARK_Mode instead of GNATProve_Mode for
12896 converting warnings on inevitable exceptions to errors.
12897 * sem_attr.adb: Check SPARK_Mode instead of GNATProve_Mode for
12898 converting warnings on inevitable exceptions to errors.
12899 * sem_ch3.adb: Check SPARK_Mode instead of GNATProve_Mode for
12900 converting warnings on inevitable exceptions to errors.
12901 * sem_ch4.adb: Check SPARK_Mode instead of GNATProve_Mode for
12902 converting warnings on inevitable exceptions to errors.
12903 * sem_ch6.adb (Analyze_Subprogram_Body_Helper): Reset SPARK_Mode
12904 from spec if needed
12905 * sem_ch7.adb (Analyze_Package_Body_Helper): Reset SPARK_Mode
12906 from spec if needed
12907 * sem_ch8.adb (Push_Scope): Save SPARK_Mode (Pop_Scope):
12909 * sem_elab.adb: Check SPARK_Mode instead of GNATProve_Mode for
12910 converting warnings on inevitable exceptions to errors.
12911 * sem_prag.adb (Get_SPARK_Mode_From_Pragma): New function
12912 (Get_SPARK_Mode_Id): Removed (Get_SPARK_Mode_Type): New name
12913 of Get_SPARK_Mode_Id
12914 * sem_prag.ads (Get_SPARK_Mode_From_Pragma): New function
12915 * sem_res.adb: Check SPARK_Mode instead of GNATProve_Mode for
12916 converting warnings on inevitable exceptions to errors.
12917 * sem_util.adb: Check SPARK_Mode instead of GNATProve_Mode for
12918 converting warnings on inevitable exceptions to errors.
12919 * types.ads (SPARK_Mode_Id): Moved to opt.ads and renamed
12922 2014-01-20 Ed Schonberg <schonberg@adacore.com>
12924 * sem_ch13.adb: Add semantic information to rewritten type
12927 2014-01-20 Ed Schonberg <schonberg@adacore.com>
12929 * exp_ch5.adb (Expand_N_Assignment_Statement): If both sides
12930 are of a type with unknown discriminants, convert both to the
12931 underlying view of the type, so that the proper constraint check
12932 can be applied to the right-hand side.
12934 2014-01-20 Robert Dewar <dewar@adacore.com>
12936 * atree.adb (Copy_Node): Fix failure to copy last component
12937 (Exchange_Entities): Fix failure to exchange last entity
12939 2014-01-20 Ed Schonberg <schonberg@adacore.com>
12941 * sem_ch12.adb: Code clean up.
12943 2014-01-20 Robert Dewar <dewar@adacore.com>
12945 * gnat_rm.texi, sem_ch4.adb: Minor reformatting.
12947 2014-01-20 Ed Schonberg <schonberg@adacore.com>
12949 * sem_ch4.adb (Analyze_Quantified_Expression): If after
12950 pre-analysis the loop parameter specification has been
12951 rewritten as a iterator specification, propagate the change to
12952 the quantified expression, for ASIS navigtion needs.
12954 2014-01-20 Vincent Celier <celier@adacore.com>
12956 * par-ch10.adb: Minor error message change: escape [ and ].
12958 2014-01-20 Robert Dewar <dewar@adacore.com>
12960 * checks.adb: Make warnings on exceptions into errors in GNATprove mode.
12961 * errout.adb: Implement [ and ] insertion characters.
12962 * errout.ads: Document new [ and ] insertion characters.
12963 * sem_ch12.adb, restrict.adb, frontend.adb, exp_ch7.adb: Minor
12964 addition of ??? comment.
12965 * lib-xref.adb, exp_util.adb, gnat1drv.adb: Minor reformatting
12966 * exp_ch4.adb, sem_ch3.adb, sem_ch4.adb, sem_ch6.adb, sem_elab.adb,
12967 sem_eval.adb, sem_res.adb, sem_util.adb, sem_attr.adb, sem_aggr.adb:
12968 Make warnings on exceptions into errors in GNATprove mode.
12969 * sem_dim.adb: Minor reformatting throughout Quote [ and ]
12972 2014-01-20 Ed Schonberg <schonberg@adacore.com>
12974 * sem_ch13.adb: Code clean up.
12976 2014-01-20 Robert Dewar <dewar@adacore.com>
12978 * errout.ads, errout.adb: Implement >? >x? >X? sequences in error
12980 * sem_ch6.adb (Check_Statement_Sequence): Missing return is an
12981 error in GNATprove mode.
12983 2014-01-20 Ed Schonberg <schonberg@adacore.com>
12985 * par-ch4.adb (Is_Parameterless_Attribute): The Ada2012 attribute
12986 reference 'Old takes no parameters, and thus can appear as a
12989 2014-01-20 Eric Botcazou <ebotcazou@adacore.com>
12991 * exp_aggr.adb: Fix minor typos.
12993 2014-01-20 Ed Schonberg <schonberg@adacore.com>
12995 * sem_attr.adb (Analyze_Attribute, case 'Constrained): In an
12996 instance the attribute is legal, and its value is determined
12997 statically if the type has no discriminants. This choice is
12998 more useful than rechecking the legality rule in the instance,
12999 is consistent with older usage, and is also consistent with all
13002 2014-01-20 Arnaud Charlet <charlet@adacore.com>
13004 * sem_cat.adb (Validate_Static_Object_Name): Change error into
13005 warning in Relaxed_Semantic_Mode.
13007 2014-01-20 Ed Schonberg <schonberg@adacore.com>
13009 * sem_attr.adb: Code and comments cleanup.
13011 2014-01-20 Yannick Moy <moy@adacore.com>
13013 * debug.adb Free debug flags -gnatd.D, -gnatd.G and -gnatd.V *
13014 * errout.adb (Compilation_Errors): Remove special handling in
13016 * gnat1drv.adb (Adjust_Global_Switches): Remove handling of the
13017 removed debug flags.
13018 * gnat_rm.texi: Initial documentation for Abstract_State, Depends,
13019 Global, Initial_Condition, Initializes and Refined_State pragmas and
13021 * opt.ads (Frame_Condition_Mode, Formal_Extensions,
13022 SPARK_Strict_Mode): Remove global flags.
13023 * sem_ch3.adb (Analyze_Object_Declaration): Check of no hidden state
13024 always performed now, on packages declaring a null state.
13025 (Signed_Integer_Type_Declaration): Remove ill-designed attempt
13026 at providing pedantic mode for bounds of integer types.
13027 * sem_ch4.adb (Analyze_Quantified_Expression): Warning on suspicious
13028 "some" quantified expression now issued under control of -gnatw.t,
13029 like the other warning on unused bound variable.
13030 * sem_prag.adb (Check_Precondition_Postcondition): Remove useless test
13032 (Analyze_Pragma): Remove tests for SPARK 2014
13033 pragmas, not officially allowed by GNAT.
13035 2014-01-20 Hristian Kirtchev <kirtchev@adacore.com>
13037 * sem_prag.adb (Analyze_Pragma): Ensure that
13038 the sole argument of pragmas Abstract_State, Contract_Cases,
13039 Depends, Global and Initializes in in aggregate form.
13040 (Analyze_Refined_Pragma): Ensure that the sole argument of
13041 pragmas Refined_Depends, Refined_Global and Refined_State is in
13043 (Ensure_Aggregate_Form): New routine.
13045 2014-01-20 Doug Rupp <rupp@adacore.com>
13047 * sem_attr.adb (Analyze_Attribute): case
13048 Attribute_Constrained => treat all prefixes as legal for Declib
13051 2014-01-20 Hristian Kirtchev <kirtchev@adacore.com>
13053 * sem_prag.adb (Check_Mode): Reimplement the routine.
13054 (Find_Mode): New routine.
13056 2014-01-20 Robert Dewar <dewar@adacore.com>
13058 * sem_ch4.adb (Operator_Check): Handle additional
13059 Allow_Integer_Address cases.
13061 2014-01-20 Robert Dewar <dewar@adacore.com>
13063 * gnat_rm.texi (Allow_Integer_Address): Remove note about not
13064 allowed if address is non-private, no longer true.
13065 * sem_prag.adb (Analyze_Pragma, case Allow_Integer_Address):
13066 Remove check for address being private, causes difficulty when
13067 pragma used in gnat.adc file and is not needed, since we guard
13068 this in Address_Integer_Convert_OK.
13069 * exp_ch7.adb: Minor reformatting.
13070 * sem_ch4.adb: Handle operator operands in Allow_Integer_Address mode.
13072 2014-01-20 Robert Dewar <dewar@adacore.com>
13074 * checks.adb (Apply_Range_Check): Remove gnatprove special
13075 casing of exponentiation.
13076 * sem_res.adb (Resolve_Op_Expon): Apply range check to right
13077 operand for integer case to check range against Natural.
13079 2014-01-20 Robert Dewar <dewar@adacore.com>
13081 * s-tataat.adb: Minor reformatting.
13083 2014-01-20 Robert Dewar <dewar@adacore.com>
13085 * einfo.adb (Is_Descendent_Of_Address): Now applies to all
13086 entities, and also fix documentation to remove mention of visible
13087 integer type, since this is not what the implementation does.
13088 * einfo.ads (Is_Descendent_Of_Address): Now applies to all
13089 entities, and also fix documentation to remove mention of visible
13090 integer type, since this is not what the implementation does.
13091 * gnat_rm.texi: Minor clarification of Allow_Integer_Address
13093 * sem_ch4.adb (Analyze_One_Call): Handle Allow_Integer_Address
13094 case for parameter type check.
13095 * sem_res.adb (Resolve): Use new function
13096 Address_Integer_Convert_OK.
13097 * sem_type.adb: Minor code reorganization (use Ekind_In) Minor
13098 reformatting throughout.
13099 * sem_util.adb (Address_Integer_Convert_OK): New function.
13100 * sem_util.ads: Minor reformatting (put specs in alpha order)
13101 (Address_Integer_Convert_OK): New function.
13103 2014-01-20 Thomas Quinot <quinot@adacore.com>
13105 * exp_ch7.adb (Wrap_Transient_Expression):
13106 Insertion extra conditional expression only if
13107 Opt.Suppress_Control_Flow_Optimizations is set.
13109 2014-01-20 Arnaud Charlet <charlet@adacore.com>
13111 * s-tataat.adb (Initialize_Attributes): Abort might already be
13112 deferred in Create_Task.
13114 2014-01-20 Hristian Kirtchev <kirtchev@adacore.com>
13116 * checks.adb (Apply_Scalar_Range_Check): Flag
13117 the exponent as requiring a range check when the expression is
13120 2014-01-20 Fedor Rybin <frybin@adacore.com>
13122 * gnat_ugn.texi: Documenting --passed-tests option for gnattest.
13124 2014-01-20 Hristian Kirtchev <kirtchev@adacore.com>
13126 * sem_util.adb (Default_Initialization): New routine.
13127 * sem_util.ads: Add new type Default_Initialization_Kind.
13128 (Default_Initialization): New routine.
13130 2014-01-20 Hristian Kirtchev <kirtchev@adacore.com>
13132 * sem_prag.adb (Check_Mode): Correct all error
13133 message logic dealing with in/in out parameters that may appear
13134 as inputs or have a self reference.
13136 2014-01-20 Robert Dewar <dewar@adacore.com>
13138 * exp_ch9.adb, checks.adb, exp_intr.adb: Minor reformatting.
13139 * sem_res.adb (Resolve): Fix error causing infinite loop for
13140 integer used as address. Allow addresses as integers.
13142 2014-01-20 Arnaud Charlet <charlet@adacore.com>
13144 * s-osinte-linux.ads (struct_sigaction): Fix rep clause.
13146 2014-01-20 Bob Duff <duff@adacore.com>
13148 * par-ch8.adb (P_Use_Type_Clause): Detect syntax
13149 error when "use all" is not followed by "type".
13151 2014-01-20 Bob Duff <duff@adacore.com>
13153 * exp_intr.adb (Expand_Unc_Deallocation): Remove warning on abort
13156 2014-01-20 Ed Schonberg <schonberg@adacore.com>
13158 * checks.adb (Apply_Address_Clause_Check): If there is an
13159 alignment check on the expression in an address clause, and there
13160 is no local exception propagation, add an additional explanatory
13161 message to clarify the cause of previous warning.
13163 2014-01-20 Robert Dewar <dewar@adacore.com>
13165 * exp_ch7.adb: Minor reformatting.
13166 * opt.ads: Minor comment updates.
13167 * sem.adb: Minor name change Is_Main_Unit =>
13168 Is_Main_Unit_Or_Main_Unit_Spec.
13169 * sem_ch6.adb: Minor reformatting and code reorganization.
13171 2014-01-20 Bob Duff <duff@adacore.com>
13173 * gnat_ugn.texi: Update gnatpp switches.
13175 2014-01-20 Thomas Quinot <quinot@adacore.com>
13177 * exp_ch9.adb: Minor comment edit.
13179 2014-01-20 Robert Dewar <dewar@adacore.com>
13181 * gnat_rm.texi: Document that Allow_Integer_Address is permitted
13182 only if System.Address is a private type.
13183 * opt.ads (Allow_Integer_Address): No longer set by -gnates.
13184 * sem_prag.adb (Analyze_Pragma, case Allow_Integer_Address):
13185 Allowed only if type System.Address is private, since otherwise
13187 * sem_res.adb: Fix failure to properly Analyze unchecked
13188 conversions that were introduced by Allow_Integer_Address.
13189 * switch-c.adb: Remove -gnates switch.
13190 * usage.adb: Remove -gnates switch.
13191 * gnat_ugn.texi: Remove documentation of -gnates flag.
13193 2014-01-20 Ed Schonberg <schonberg@adacore.com>
13195 * sem_ch6.adb (Analyze_Expression_Function): Pre-analyze and
13196 resolve expression to perform proper name capture.
13198 2014-01-20 Ed Schonberg <schonberg@adacore.com>
13200 * sem.adb (Semantics): When saving/restoring configuration
13201 switches, the spec of a pre- defined unit that is the main unit
13202 must be treated as a predefined unit as well.
13204 2014-01-20 Thomas Quinot <quinot@adacore.com>
13206 * exp_ch7.adb (Wrap_Transient_Expression): For a Boolean
13207 expression, insert an extra conditional expression when saving
13208 the value of the expression, for the benefit of control flow
13209 graph based coverage analysis.
13210 * exp_ch3.adb: Minor reformatting.
13212 2014-01-20 Robert Dewar <dewar@adacore.com>
13214 * gnat1drv.adb: Set Allow_Integer_Address in relaxed semantics mode.
13215 * gnat_rm.texi: Document pragma Allow_Integer_Address.
13216 * gnat_ugn.texi: Document pragma Allow_Integer_Address, -gnates.
13217 * opt.ads: New flag Allow_Integer_Address.
13218 * par-prag.adb: Dummy entry for pragma Allow_Integer_Address.
13219 * sem_ch5.adb: Minor reformatting.
13220 * sem_prag.adb: Implement pragma Allow_Integer_Address.
13221 * sem_res.adb (Resolve): Allow integer address value if
13223 * sem_util.adb: Minor reformatting.
13224 * snames.ads-tmpl: Add entry for pragma Allow_Integer_Address.
13225 * switch-c.adb: Recognize flag -gnates.
13226 * usage.adb: Document flag -gnates.
13228 2014-01-20 Thomas Quinot <quinot@adacore.com>
13230 * s-tadeca.adb: Fix minor typos in comment.
13232 2014-01-20 Pascal Obry <obry@adacore.com>
13234 * s-win32.ads (FreeLibrary): New import.
13236 2014-01-20 Robert Dewar <dewar@adacore.com>
13238 * sem_res.adb, sem_cat.adb: Minor reformatting.
13239 * sem_ch11.adb (Analyze_Raise_Statement): Only give warning about
13240 assigning to OUT parameters for the current subprogram scope.
13241 * exp_ch4.adb: Minor reformatting.
13243 2014-01-20 Ed Schonberg <schonberg@adacore.com>
13245 * exp_ch4.adb (Process_Transient_Object,
13246 Find_Enclosing_Contexts): If the top-level if-expression that
13247 generated the transient object is an actual in a call, the proper
13248 Hook_Context is a construct enclosing the call.
13249 * einfo.ads: Indicate that Related_Expression is used to link a
13250 loop variable to the container expression over which the loop
13252 (Analyze_Iterator_Specification): Set the Related_Expression of
13253 the loop variable in a container element iterator.
13254 (Note_Possible_Modification): If the variable is the loop
13255 variable in a container element iterator, indicate that the
13256 enclosing container is also modified.
13258 2014-01-20 Hristian Kirtchev <kirtchev@adacore.com>
13260 * aspects.adb (Move_Or_Merge_Aspects): Reimplemented.
13262 2014-01-20 Robert Dewar <dewar@adacore.com>
13264 * s-taasde.ads, gnat_ugn.texi, s-tadeca.adb, sem_res.adb, s-tadeca.ads:
13265 Minor reformatting and code clean up.
13267 2014-01-20 Arnaud Charlet <charlet@adacore.com>
13269 * sem_cat.adb (Validate_Object_Declaration): Relax semantics
13270 of objects of private type if Relaxed_RM_Semantics.
13272 2014-01-20 Claire Dross <dross@adacore.com>
13274 * a-cofove.ads (Vector): Capacity discriminant
13275 should be in range of the index.
13277 2014-01-20 Thomas Quinot <quinot@adacore.com>
13279 * a-caldel.ads(To_Duration), s-taasde.ads(Time_Enqueue):
13280 Clarify specs s-tadeca.adb(Enqueue_Calendar): Compensate for
13281 possible difference between epoch of Ada.Calendar clock and Ada
13282 real-time/tasking clock.
13283 * s-taprop-posix.adb: Minor comment fix.
13285 2014-01-20 Doug Rupp <rupp@adacore.com>
13287 * sysdep.c [vxworks]: Remove Vxworks version noise for RTP.
13289 2014-01-20 Hristian Kirtchev <kirtchev@adacore.com>
13291 * exp_attr.adb (Expand_N_Attribute_Reference): Generate validity
13292 checks on the prefix of attribute 'Old.
13293 * sem_ch3.adb (Process_Range_Expr_In_Decl): Suppress the
13294 generation of validity checks on a range that belongs to the
13295 iteration scheme of a quantified expression.
13296 * sem_ch5.adb (One_Bound): Suppress the generation of validity
13297 checks on a bound that belongs to the iteration scheme of a
13298 quantified expression, generate the check in all other cases.
13300 2014-01-20 Bob Duff <duff@adacore.com>
13302 * gnat_ugn.texi: Enable --pp-new by default. Minor reorganization.
13304 2014-01-20 Ed Schonberg <schonberg@adacore.com>
13306 * sem_res.adb (Resolve): When compiling a predefined unit, ignore
13307 interpretations that do not come from other predefined units,
13308 to prevent spurious ambiguities in the presence of user-defined
13309 operators in the context of (an instance of) a predefined unit.
13311 2014-01-20 Robert Dewar <dewar@adacore.com>
13313 * gnat_rm.texi: Document that Loop_Variant is included in
13314 Statement_Assertions.
13315 * sem_prag.adb (Check_Kind): Add Loop_Variant to
13316 Statement_Assertions (Check_Applicable_Policy): Add Loop_Variant
13317 to Statement_Assertions.
13319 2014-01-20 Doug Rupp <rupp@adacore.com>
13321 * sysdep.c (__gnat_is_file_not_found_error) [vxworks6]: Add case
13322 for errno ENOENT from RTP on NFS mounted file system.
13324 2014-01-20 Ed Schonberg <schonberg@adacore.com>
13326 * sem_util.adb (Check_Function_Writable_Actuals): 1) Do not
13327 examine code that does not come from source. The check does not
13328 apply to code generated for constraint checks, and such code may
13329 generate spurious error messages when compiled with expansion
13330 disabled (as in a generic unit) because side effects may not
13332 2) Make error messages more explicit: indicate the component
13333 of the construct whose value is indeterminate because of a
13334 call to a function with in-out parameter in another component,
13335 when there is no mandated order of execution between the two
13336 components (actuals, aggregate components, alternatives).
13338 2014-01-20 Robert Dewar <dewar@adacore.com>
13340 * gnat_rm.texi: Minor cleanup.
13342 2014-01-20 Hristian Kirtchev <kirtchev@adacore.com>
13344 * sem_attr.adb (Analyze_Attribute): Attributes 'Old and 'Result
13345 can now apply to a refined postcondition.
13346 * sem_ch6.adb (Analyze_Subprogram_Contract): Remove local
13347 variable Result_Seen. Add variables Case_Prag, Post_Prag,
13348 Seen_In_Case and Seen_In_Post. Update the mechanism that detects
13349 whether postconditions and/or constract-cases mention attribute
13350 'Result and introduce a post-state when applied to functions.
13351 (Check_Result_And_Post_State): Removed.
13352 * sem_prag.adb (Analyze_Pragma): Add local variable
13353 Result_Seen. Verify that the expression of pragma Refined_Post
13354 mentions attribute 'Result and introduces a post-state.
13355 * sem_util.ads, sem_util.adb (Check_Result_And_Post_State): New routine.
13357 2014-01-20 Hristian Kirtchev <kirtchev@adacore.com>
13359 * exp_ch7.adb (Is_Subprogram_Call): New routine.
13360 (Process_Transient_Objects): Make variable Must_Hook global with
13361 respect to all locally declared subprograms. Search the context
13362 for at least one subprogram call.
13363 (Requires_Hooking): Removed.
13365 2014-01-20 Claire Dross <dross@adacore.com>
13367 * a-cfdlli.ads a-cfhama.ads a-cfhase.ads a-cforma.ads
13368 * a-cforse.ads a-cofove.ads: Add pragma Annotate (GNATprove,
13369 External_Axiomatization);
13371 2014-01-20 Robert Dewar <dewar@adacore.com>
13373 * sem_attr.adb (Analyze_Attribute, case Loop_Entry): Allow
13374 Loop_Entry in Assert, Assert_And_Cut, and Assume pragmas.
13375 * sem_prag.adb (Analyze_Pragma, case Assert[_And_Cut], Assume):
13376 Allow Loop_Entry to be used in these pragmas if they appear in
13377 an appropriate context.
13378 (Placement_Error): Specialize error
13379 message for pragma Assert[_And_Cut] or pragma Assume containing
13380 Loop_Entry attribute.
13381 * a-exexpr-gcc.adb, sinput.adb: Minor reformatting.
13382 * s-excmac-arm.ads, s-except.ads, s-excmac-gcc.ads: Minor reformatting
13383 and code clean ups.
13385 2014-01-20 Robert Dewar <dewar@adacore.com>
13387 * gnat1drv.adb: Minor comment update.
13389 2014-01-20 Tristan Gingold <gingold@adacore.com>
13391 * raise-gcc.c (PERSONALITY_FUNCTION/arm): Remove unused
13392 variables, comment out unused code.
13393 * a-exexpr-gcc.adb: Move declarations to s-excmac-gcc.ads
13394 * s-excmac-gcc.ads: New file, extracted from a-exexpr-gcc.adb
13395 * s-excmac-arm.ads: New file.
13397 2014-01-20 Hristian Kirtchev <kirtchev@adacore.com>
13399 * exp_ch4.adb (Expand_N_Slice): Remove constant D and variables
13400 Drange and Index_Typ. Remove the circuitry which creates a
13401 range check to compare the index type of the array against the
13403 * sem_res.adb (Resolve_Slice): Add local variable Dexpr. Update
13404 the circuitry which creates a range check to handle a
13405 discrete_range denoted by a subtype indication.
13407 2014-01-20 Pierre-Marie Derodat <derodat@adacore.com>
13409 * sinput.adb, sinput.ads (Sloc_Range): Traverse the tree of original
13410 nodes to get the original sloc range.
13412 2014-01-20 Hristian Kirtchev <kirtchev@adacore.com>
13414 * sem_prag.adb (Analyze_Pragma): Use Defining_Entity to obtain the
13415 entity of a [library level] package.
13417 2014-01-20 Tristan Gingold <gingold@adacore.com>
13419 * raise-gcc.c (exception_class_eq): New function.
13420 (is_handled_by): Use it to compare exception classes.
13421 (PERSONALITY_STORAGE): Define. (continue_unwind): New function to
13422 be called to return URC_CONTINUE_UNWIND.
13423 (personality_body): New function, extracted from PERSONALITY_ROUTINE.
13424 (PERSONALITY_ROUTINE): Add an implementation for the ARM unwinder.
13426 2014-01-20 Robert Dewar <dewar@adacore.com>
13428 * opt.ads: Minor comment update.
13430 2014-01-20 Hristian Kirtchev <kirtchev@adacore.com>
13432 * exp_ch4.adb (Expand_N_Slice): Relocate some variables and
13433 constants to the "Local variables" area. Add new constant D. Add
13434 new variables Drange and Index_Typ. Rename Pfx to Rep and Ptp
13435 to Pref_Typ and update all occurrences. Add circuitry to extract
13436 the discrete_range and the index type and build a range check.
13438 2014-01-20 Arnaud Charlet <charlet@adacore.com>
13440 * gnat1drv.adb (Adjust_Global_Switches): Enable
13441 Treat_Categorization_Errors_As_Warnings when Relaxed_RM_Semantics
13444 2014-01-20 Thomas Quinot <quinot@adacore.com>
13446 * sem_ch5.adb, sem_ch4.adb: Minor reformatting.
13448 2014-01-20 Hristian Kirtchev <kirtchev@adacore.com>
13450 * sem_ch13.adb (Analyze_Aspect_Specifications):
13451 When aspect SPARK_Mode appears on a package body, insert the
13452 generated pragma at the top of the body declarations.
13454 2014-01-20 Robert Dewar <dewar@adacore.com>
13456 * sem_aggr.adb, exp_prag.adb, sem_aux.adb, sinfo.ads, sem_ch10.adb,
13457 checks.adb, sem_prag.adb, sem_ch12.adb, freeze.adb, g-arrspl.adb,
13458 expander.adb, gnat1drv.adb, exp_ch4.adb, sem_ch6.adb,
13459 sem_ch8.adb, exp_dist.adb: Minor reformatting.
13461 2014-01-20 Yannick Moy <moy@adacore.com>
13463 * gnat1drv.adb (Gnat1drv): Call Write_ALI with Object=True in GNATprove
13466 2014-01-20 Pascal Obry <obry@adacore.com>
13468 * g-arrspl.ads (Slice_Set): New definition (will use a copy on
13470 * g-arrspl.adb: Adapt all routine to this new implementation.
13471 (Set): Copy the Slice_Set definition before reusing it.
13473 2014-01-20 Arnaud Charlet <charlet@adacore.com>
13475 * sem_prag.adb (Process_Import_Or_Interface): In
13476 Relaxed_RM_Semantics, support old Ada 83 style of pragma Import.
13477 (Analyze_Pragma): Ditto for pragma Export.
13478 * exp_prag.adb (Expand_Pragma_Import_Or_Interface): Handle old pragma
13481 2014-01-20 Hristian Kirtchev <kirtchev@adacore.com>
13483 * einfo.ads: E_Abstract_State is now part of the entities that
13484 can be overloaded. Update type Overloadable_Kind to reflect the
13485 inclusion of abstract states.
13486 * sem_ch6.adb (New_Overloaded_Entity): A function can now
13487 overload an abstract state.
13488 * sem_prag.adb (Analyze_Constituent): Handle the overloading
13489 of states by functions. Use Entity_Of to obtain the entity of
13490 a constituent. (Analyze_Global_Item): Handle the overloading of
13491 states by functions.
13492 (Analyze_Initialization_Item): Handle the
13493 overloading of states by functions. Use Entity_Of to obtain the
13495 (Analyze_Input_Item): Handle the overloading
13496 of states by functions. Use Entity_Of to obtain the entity of an item.
13497 (Analyze_Input_Output): Handle the overloading of states by functions.
13498 (Analyze_Refinement_Clause): Handle the overloading
13499 of states by functions. Use Entity_Of to obtain the entity of an item.
13500 (Appears_In): Use Entity_Of to obtain the entity of an element.
13501 (Check_Usage): Use Entity_Of to obtain the entity of
13502 an item. Add a guard to prevent a crash due to a previous error.
13503 (Resolve_State): New routine.
13505 2014-01-20 Yannick Moy <moy@adacore.com>
13507 * spark_xrefs.ads, debug.adb, gnat1drv.adb, errout.adb, errout.ads,
13508 opt.ads: Minor comments updates.
13510 2014-01-20 Hristian Kirtchev <kirtchev@adacore.com>
13512 * einfo.adb (Non_Limited_View): Applies to abstract states.
13513 (Set_From_Limited_With): Applies to abstract states.
13514 (Set_Non_Limited_View): Applies to abstract states.
13515 (Write_Field17): Output the non-limited view of an abstract state.
13516 * einfo.ads: Update the comment on usage and occurrences in
13517 nodes for attributes From_Limited_With and Non_Limited_View.
13518 * sem_aux.adb (Available_View): This routine can now handle
13520 * sem_aux.ads (Available_View): This routine can now handle
13521 abstract states. Update the comment on usage.
13522 * sem_ch8.adb (Find_Expanded_Name): Handle abstract views
13523 of states and variables.
13524 (In_Pragmas_Depends_Or_Global): New routine.
13525 * sem_ch10.adb (Build_Limited_Views): Implement
13526 abstract (limited) views of variables and states.
13527 (Build_Shadow_Entity): This routine is now a procedure. Add
13528 formal parameter Shadow. Update the comment on usage. Add
13529 context-specific decoration for states and variables.
13530 (Decorate_State): New routine. (Decorate_Variable): New routine.
13531 (Find_And_Process_States): New routine.
13532 (Process_Declarations): Renamed to Process_Declarations_And_States.
13533 (Process_Declarations_And_States): Add formal parameters
13534 Pack and Create_Abstract_Views. Update the comment on usage.
13535 (Process_States): New routine.
13536 * sem_prag.adb (Check_Dependency_Clause): Handle abstract
13537 views of states and variables. Match the abstract view of a state
13538 against its corresponding non-abstract view.
13539 (Is_Matching_Input):
13540 Handle abstract views of states and variables. Match the abstract
13541 view of a state against its corresponding non-abstract view.
13542 (Process_Global_Item): Handle abstract views of states and
13545 2014-01-20 Bob Duff <duff@adacore.com>
13547 * sem_ch10.adb (Expand_With_Clause): Don't
13548 recurse on the prefix if the current with-ed name refers to a
13549 package that renames its own parent, eg "package P.Q renames P;".
13551 2014-01-20 Yannick Moy <moy@adacore.com>
13553 * exp_spark.adb (Expand_SPARK_Call): Remove procedure.
13554 * opt.adb, opt.ads (Full_Expander_Active): Remove function.
13555 * checks.adb, exp_ch6.adb, exp_ch9.adb, exp_disp.adb, sem_aggr.adb,
13556 * sem_ch10.adb, sem_ch5.adb, sem_ch6.adb, sem_ch8.adb, sem_ch9.adb,
13557 * sem_disp.adb, sem_res.adb Replace Full_Expander_Active by
13560 2014-01-20 Yannick Moy <moy@adacore.com>
13562 * sinfo.ads Update documentation of GNATprove mode.
13564 2014-01-20 Yannick Moy <moy@adacore.com>
13566 * adabkend.adb, ali-util.adb, errout.adb, exp_ch7.adb,
13567 * exp_dbug.adb, freeze.adb, lib-xref.adb, restrict.adb,
13568 * sem_attr.adb, sem_ch4.adb, sem_ch5.adb, sem_ch6.adb, sem_ch8.adb,
13569 * sem_prag.adb, sem_res.adb, sem_util.adb Rename SPARK_Mode into
13571 * sem_ch13.adb: Remove blank.
13572 * exp_spark.adb, exp_spark.ads (Expand_SPARK_Call): Only replace
13573 subprograms by alias for renamings, not for inherited primitive
13575 * exp_util.adb (Expand_Subtype_From_Expr): Apply the expansion
13577 (Remove_Side_Effects): Apply the removal in
13578 GNATprove mode, for the full analysis of expressions.
13579 * expander.adb (Expand): Call the light SPARK expansion in GNATprove
13581 (Expander_Mode_Restore, Expander_Mode_Save_And_Set): Ignore
13582 save/restore actions for Expander_Active flag in GNATprove mode,
13583 similar to what is done in ASIS mode.
13584 * frontend.adb (Frontend): Generic bodies are instantiated in
13586 * gnat1drv.adb (Adjust_Global_Switches): Set operating
13587 mode to Check_Semantics in GNATprove mode, although a light
13588 expansion is still performed.
13589 (Gnat1drv): Set Back_End_Mode to
13590 Declarations_Only in GNATprove mode, and later on special case
13591 the GNATprove mode to continue analysis anyway.
13592 * lib-writ.adb (Write_ALI): Always generate ALI files in
13594 * opt.adb, opt.ads (Full_Expander_Active): Make it equivalent to
13596 (SPARK_Mode): Renamed as GNATprove_Mode.
13597 * sem_aggr.adb (Aggregate_Constraint_Checks): Add checks in the
13598 tree in GNATprove_Mode.
13599 * sem_ch12.adb (Analyze_Package_Instantiation): Always instantiate
13600 body in GNATprove mode.
13601 (Need_Subprogram_Instance_Body): Always instantiate body in GNATprove
13603 * sem_ch3.adb (Constrain_Index, Process_Range_Expr_In_Decl):
13604 Make sure side effects are removed in GNATprove mode.
13606 2014-01-20 Eric Botcazou <ebotcazou@adacore.com>
13608 * gcc-interface/decl.c (gnat_to_gnu_entity) <object>: Robustify tests
13609 for aliased objects with an unconstrained nominal subtype.
13610 * gcc-interface/trans.c (Call_to_gnu): Likewise.
13611 (gnat_to_gnu) <case N_Op_Not>: Robustify test for private type.
13612 <case N_Op_Minus>: Remove useless code.
13613 (Exception_Handler_to_gnu_zcx): Minor tweaks.
13615 2014-01-20 Eric Botcazou <ebotcazou@adacore.com>
13617 * gcc-interface/decl.c (gnat_to_gnu_entity) <case E_Record_Subtype>:
13618 Tidy up. For a subtype with discriminants and variant part, if a
13619 variant is statically selected and the fields all have a constant
13620 position, put them in order of increasing position. Likewise if
13621 no variant part but representation clause is present.
13622 * gcc-interface/utils.c (make_packable_type): Robustify.
13623 (maybe_pad_type): Use local variable and tidy up condition. If no
13624 alignment is specified, use the original one.
13625 (create_type_stub_decl): Minor tweak.
13626 (convert) <case VECTOR_CST>: Fix typo.
13627 <case CONSTRUCTOR>: Deal with padding types around the same type.
13628 Do not punt on missing fields.
13629 (unchecked_convert): Call finish_record_type to lay out the special
13630 record types made for conversions from/to problematic integer types.
13631 Bump the alignment of CONSTRUCTORs before converting them to a more
13634 2014-01-20 Eric Botcazou <ebotcazou@adacore.com>
13636 * gcc-interface/decl.c (gnat_to_gnu_entity) <case E_Component>: Remove
13637 obsolete code for type_annotate_only mode, simplify code and slightly
13638 improve wording of comments.
13640 2014-01-12 Eric Botcazou <ebotcazou@adacore.com>
13643 * gcc-interface/cuintp.c (build_cst_from_int): Use 32-bit integer type
13644 as intermediate type.
13645 (UI_To_gnu): Likewise.
13647 2014-01-03 Eric Botcazou <ebotcazou@adacore.com>
13649 * gnatvsn.ads (Current_Year): Bump to 2014.
13651 2014-01-02 Tobias Burnus <burnus@net-b.de>
13653 * gnat_ugn.texi: Bump @copying's copyright year.
13655 Copyright (C) 2014 Free Software Foundation, Inc.
13657 Copying and distribution of this file, with or without modification,
13658 are permitted in any medium without royalty provided the copyright
13659 notice and this notice are preserved.