1 2014-10-10 Robert Dewar <dewar@adacore.com>
3 * errout.adb (Adjust_Name_Case): New procedure.
4 (Set_Msg_Node): Use Adjust_Name_Case.
5 * errout.ads (Adjust_Name_Case): New procedure.
6 * exp_intr.adb (Add_Source_Info): Minor code reorganization
8 (Write_Entity_Name): Use Errout.Adjust_Name_Case.
9 * sem_prag.adb (Is_Non_Significant_Pragma_Reference): Review
10 and fix up entries in Sig_Flags, and correct logical errors in
12 * sprint.adb (Sprint_Node_Actual): Properly print string for
15 2014-10-10 Ed Schonberg <schonberg@adacore.com>
17 * sem_ch3.adb (Analyze_Object_Declaration): For an object of an
18 anonymous array type with delayed aspects, defer freezing of
19 type until object itself is frozen.
20 * freeze.adb (Freeze_Entity): When freezing an object of an
21 anonymous array type with delayed aspects, remove freeze node of
22 object after freezing type, to prevent out-of-order elaboration
23 in the back-end. The initialization call for the object has
24 already been constructed when expanding the object declaration.
26 2014-10-10 Robert Dewar <dewar@adacore.com>
28 * exp_intr.adb (Write_Entity_Name): Moved to outer level
29 (Write_Entity_Name): Properly handle operator names
30 (Expand_Source_Info): New procedure.
31 * exp_intr.ads (Add_Source_Info): New procedure.
33 2014-10-10 Robert Dewar <dewar@adacore.com>
35 * butil.ads: Minor reformatting.
36 * sem_ch5.adb: Code clean up.
38 2014-10-10 Robert Dewar <dewar@adacore.com>
40 * exp_ch11.adb (Expand_N_Raise_Statement): Handle
41 Prefix_Exception_Messages.
42 * opt.adb: Handle new flags Prefix_Exception_Message[_Config].
43 * opt.ads: New flags Prefix_Exception_Message[_Config].
44 * par-prag.adb: New dummy entry for pragma Prefix_Exception_Messages.
45 * snames.ads-tmpl: Add entries for new pragma Prefix_Exception_Messages.
46 * sem_prag.adb: Implement new pragma Prefix_Exception_Messages
47 * gnat_rm.texi: Document pragma Prefix_Exception_Messages.
49 2014-10-10 Gary Dismukes <dismukes@adacore.com>
51 * sinfo.ads, gnat_ugn.texi, a-except.adb, a-except-2005.adb,
52 raise-gcc.c Spelling changes (prolog => prologue, epilog => epilogue).
54 2014-10-10 Ed Schonberg <schonberg@adacore.com>
56 * sem_ch5.adb (Is_Wrapped_In_Block): Handle properly blocks that
57 contain pragmas generated for loop invariants and type predicates.
58 Clarify use of this subprogram.
60 2014-10-10 Yannick Moy <moy@adacore.com>
62 * sem_prag.adb (Analyze_Global_Item): Accept formal objects in Global
64 * errout.adb, errout.ads (SPARK_Msg_NE): Issue error unless
67 2014-10-10 Vadim Godunko <godunko@adacore.com>
69 * a-stwima.adb (To_Sequence): Compute size of result array.
71 2014-10-10 Javier Miranda <miranda@adacore.com>
73 * gnat_ugn.texi (Interfacing with C++ at the Class Level): Update the
74 sources of the example to avoid a warning when the Ada files are
75 automatically generated by the binding generator.
77 2014-10-10 Ed Schonberg <schonberg@adacore.com>
79 * sem_attr.adb (Resolve_Attribute, case 'Update): Set
80 Do_Range_Check on the expression of a record component
81 association when needed, as is done for array components, when
82 the corresponding type is a scalar type.
84 2014-10-10 Gary Dismukes <dismukes@adacore.com>
86 * a-coinho-shared.adb: Minor typo fix.
87 * prj-env.ads: Minor reformatting.
89 2014-10-10 Hristian Kirtchev <kirtchev@adacore.com>
91 * sem_res.adb (Resolve_String_Literal): Do not
92 generate a string literal subtype for the default expression of
93 a formal parameter in GNATprove mode.
95 2014-10-10 Yannick Moy <moy@adacore.com>
97 * errout.adb (SPARK_Msg_N): Issue error unless SPARK_Mode is Off.
99 2014-10-10 Ed Schonberg <schonberg@adacore.com>
101 * exp_ch5.adb (Expand_Formal_Container_Element_Loop): Analyze
102 declaration for loop parameter before rest of loop, and set
103 entity kind to prevent assignments to it in the user code.
104 * sem_ch3.adb (Analyze_Object_Contract): No contracts apply to the
105 loop parameter in an element iteration over o formal container.
107 2014-10-10 Robert Dewar <dewar@adacore.com>
109 * gnat_ugn.texi: Document use of user-level routines to handle
110 e.g. col major arrays.
112 2014-10-10 Doug Rupp <rupp@adacore.com>
114 * s-osinte-android.adb: Fix misspelling.
115 * gsocket.h: Tweak the Android quirks.
117 2014-10-10 Robert Dewar <dewar@adacore.com>
119 * errout.ads (SPARK_Msg_N): Fix spec to match change in body.
121 2014-10-10 Robert Dewar <dewar@adacore.com>
123 * sem_ch13.adb: Minor code reorganization.
125 2014-10-10 Pat Rogers <rogers@adacore.com>
127 * gnat_rm.texi: Text now indicates pragma No_Run_Time is not
130 2014-10-10 Vadim Godunko <godunko@adacore.com>
132 * a-coinho-shared.adb: Add minor comment.
133 * a-stzmap.adb (To_Sequence): Compute size of result array.
135 2014-10-10 Javier Miranda <miranda@adacore.com>
137 * exp_ch3.adb (Build_Init_Procedure): Complete the condition of an
138 if-stmt to match its current documentation.
140 2014-10-10 Robert Dewar <dewar@adacore.com>
142 * sem_ch7.adb, einfo.adb, einfo.ads, sem_prag.adb, sem_ch12.adb,
143 freeze.adb, sem_util.adb, sem_res.adb, exp_ch6.adb, exp_ch13.adb,
144 sem_ch6.adb, sem_cat.adb, sem_disp.adb
145 (Is_Subprogram_Or_Generic_Subprogram): New primitive. Use this primitive
146 throughout where appropriate.
148 2014-10-10 Bob Duff <duff@adacore.com>
150 * a-coinho-shared.ads: Minor reformatting.
151 * s-traceb.adb: Minor clean up.
153 2014-10-10 Robert Dewar <dewar@adacore.com>
155 * ali.adb (Scan_ALI): Read and process new GP flag on ALI P line.
156 * ali.ads (GNATprove_Mode): New component in ALI table.
157 (GNATprove_Mode_Specified): New global.
158 * gnatbind.adb (Gnatbind): Give fatal error if any file compiled
160 * lib-writ.ads, lib-writ.adb (GP): New flag on P line for
163 2014-10-10 Javier Miranda <miranda@adacore.com>
165 * exp_ch3.adb (Build_Init_Procedure): Adding assertion.
166 (Build_Init_Statement): Ensure that statements
167 associated with the parent components are located at the beginning
168 of the returned list of statements.
170 2014-10-10 Ed Schonberg <schonberg@adacore.com>
172 * sem_ch13.adb (Inherit_Aspects_At_Freeze_Node): If the full
173 view of a private type T that has a type invariant is a scalar
174 or constrained array type, the base type created for the full
175 view has the same type invariant.
177 2014-10-10 Robert Dewar <dewar@adacore.com>
179 * exp_util.ads, sem_ch12.adb, exp_util.adb, i-fortra.ads: Minor code
182 2014-09-22 Eric Botcazou <ebotcazou@adacore.com>
184 * gcc-interface/decl.c (gnat_to_gnu_entity): Adjust comment.
185 * gcc-interface/utils.c (gnat_write_global_declarations): Fix typo.
187 2014-09-15 Jakub Jelinek <jakub@redhat.com>
189 * gcc-interface/Make-lang.in (check_acats_numbers0,
190 check_acats_numbers1, check_acats_numbers2, check_acats_numbers3,
191 check_acats_numbers4, check_acats_numbers5, check_acats_numbers6,
192 check_acats_numbers, check_acats_subdirs): New variables.
193 (check_acats_targets): Use $(check_acats_subdirs).
194 (check-acats, check-acats%): Rewritten so that for parallelized
195 testing each job runs all the chapters files, with
196 GCC_RUNTEST_PARALLELIZE_DIR set in environment. Prepare the support
197 directory sequentially and share it.
198 (check-acats-subtargets): Always print just check-acats.
200 2014-08-25 Martin Liska <mliska@suse.cz>
202 * gcc-interface/utils.c (rest_of_subprog_body_compilation): Adjust to
203 new cgraph interface.
204 (gnat_write_global_declarations): Likewise.
206 2014-08-13 Sylvestre Ledru <sylvestre@debian.org>
208 * 9drpc.adb: Fix a typo
209 * s-interr.ads: Likewise
210 * s-taskin.ads: Likewise
211 * s-traces.ads: Likewise
214 2014-08-12 Joel Sherrill <joel.sherrill@oarcorp.com>
216 * socket.c: For RTEMS, use correct prototype of gethostbyname_r().
217 * gsocket.h Add include of <unistd.h> on RTEMS.
219 2014-08-11 Joel Sherrill <joel.sherrill@oarcorp.com>
221 * s-osinte-rtems.adb: Correct formatting of line in license block.
223 2014-08-04 Claire Dross <dross@adacore.com>
225 * exp_util.adb (Get_First_Parent_With_Ext_Axioms_For_Entity):
226 For an instance, look at the scope before the generic parent.
228 2014-08-04 Yannick Moy <moy@adacore.com>
230 * lib-writ.ads: Update comments.
231 * sem_disp.ads, sem_disp.adb (Inherited_Subprograms): Add
232 parameters to filter inherited subprograms.
234 2014-08-04 Robert Dewar <dewar@adacore.com>
236 * gnat_rm.texi: Add section on use of address clause for memory
239 2014-08-04 Ed Schonberg <schonberg@adacore.com>
241 * sem_ch3.adb (Analyze_Subtype_Declaration): A subtype, in
242 particular the subtype created for a generic actual, inherits
243 invariant information from the base type.
245 2014-08-04 Robert Dewar <dewar@adacore.com>
247 * aspects.ads, aspects.adb: Add entries for aspect Obsolescent.
248 * gnat_rm.texi: Add documentation for aspect Obsolescent.
249 * sem_ch13.adb (Analyze_Aspect_Specifications): Implement aspect
251 (Check_Aspect_At_Freeze_Point): Add dummy entry for pragma Obsolescent.
252 * s-osprim-mingw.adb: Minor reformatting.
253 * sem_res.adb (Is_Atomic_Ref_With_Address): New function
254 (Resolve_Indexed_Component): Rework warnings for non-atomic access
255 (Resolve_Selected_Component): Add warnings for non-atomic access.
257 2014-08-04 Doug Rupp <rupp@adacore.com>
259 * g-calend.adb (timeval_to_duration, duration_to_timeval): Change sec
261 * g-calend.ads (timeval): Bump up size to accomodate sec type.
262 * s-taprop-linux.adb (timeval_to_duration): Change sec formal to
264 * s-osprim-posix.adb (timeval): Bump up size to accomodate
266 (timeval_to_duration): Change sec formal to Long_Long_Integer
267 * s-osinte-darwin.adb (timeval): Bump up
268 size to accomodate new sec type.
269 (timeval_to_duration): Change sec formal to long_long
270 * s-osinte-android.adb: Likewise.
271 * cal.c (__gnat_timeal_to_duration, __gnat_duration_to_timeval): Change
272 sec formal from long to long long.
274 2014-08-04 Robert Dewar <dewar@adacore.com>
276 * sem_res.adb (Resolve_Qualified_Expression): Make sure
277 Do_Range_Check flag gets set.
279 2014-08-04 Robert Dewar <dewar@adacore.com>
281 * einfo.ads, einfo.adb (Is_Standard_String_Type): New function.
282 * exp_ch3.adb (Build_Array_Init_Proc): Use
283 Is_Standard_String_Type.
284 (Expand_Freeze_Array_Type): ditto.
285 (Get_Simple_Init_Val): ditto.
286 (Needs_Simple_Initialization): ditto.
287 * sem_eval.adb (Eval_String_Literal): Use Is_Standard_String_Type.
288 * sem_warn.adb (Is_Suspicious_Type): Use Is_Standard_String_Type.
290 2014-08-04 Pascal Obry <obry@adacore.com>
292 * adaint.c (__gnat_try_lock): Use _tcscpy and _tcscat instead of
293 _stprintf which insert garbage into the wfull_path buffer.
295 2014-08-04 Arnaud Charlet <charlet@adacore.com>
297 * cal.c: Remove old VMS/nucleus code. Remove obsolete vxworks
299 * fe.h: Minor reformatting.
301 2014-08-04 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
303 * cstreams.c: (_LARGEFILE_SOURCE): Guard definition.
305 2014-08-04 Robert Dewar <dewar@adacore.com>
307 * par-ch13.adb (Get_Aspect_Specifications): Improve error
308 recovery, fixing a -gnatQ bomb.
310 2014-08-04 Yannick Moy <moy@adacore.com>
312 * sem_ch3.adb (Analyze_Object_Declaration): In GNATprove mode,
313 do not generate two Itypes with the same name for an array
315 * sinfo.ads: Expand doc on GNATprove mode.
317 2014-08-04 Hristian Kirtchev <kirtchev@adacore.com>
319 * exp_ch3.adb (Expand_Freeze_Record_Type): Set the finalization
320 master and storage pool attributes on the root type of an
321 anonymous access type.
322 * exp_ch4.adb (Expand_N_Allocator): Set the finalization master
323 and storage pool attributes on the root type of an anonymous
326 2014-08-04 Arnaud Charlet <charlet@adacore.com>
328 * exp_ch3.adb: Minor reformatting.
329 * tb-alvms.c, tb-alvxw.c, tb-ivms.c: Removed.
330 * tracebak.c: Remove use of above files.
331 * gcc-interface/Makefile.in: Update dependencies.
333 2014-08-04 Pierre-Marie Derodat <derodat@adacore.com>
335 * gcc-interface/utils.c (gnat_set_type_context): Also set the
336 context for parallel types' TYPE_STUB_DECL. Do not change
337 anything if the context is already set for them.
338 (gnat_pushdecl): Update the comment for calls to
339 gnat_set_type_context to mention parallel types.
340 (add_parallel_type): When adding a context-less parallel type to
341 a type that has a context, propagate the context from the latter
343 (process_deferred_decl_context): Call gnat_set_type_context
344 rather than manually setting the type context.
345 (build_unc_object_type): Call gnat_set_type_context on the
348 2014-08-04 Ed Schonberg <schonberg@adacore.com>
350 * exp_ch5.adb (Expand_N_Case_Statement): If a choice is a
351 subtype indication and the case statement has only two choices,
352 replace subtype indication with its range, because the resulting
353 membership test cannot have a subtype indication as an operand.
355 2014-08-04 Arnaud Charlet <charlet@adacore.com>
357 * exp_ch3.adb: Update comments, minor reformatting.
359 2014-08-04 Hristian Kirtchev <kirtchev@adacore.com>
361 * sem_ch3.adb (Analyze_Declarations): Explain why the bodies of
362 the default initial condition procedures are build here.
363 * sem_util.adb (Build_Default_Init_Cond_Procedure): Wrap the
364 analyzed argument of pragma Default_Initial_Condition in some
365 dummy code as GNATprove mode disables assertions, but still
366 needs to see the argument.
368 2014-08-04 Robert Dewar <dewar@adacore.com>
370 * exp_ch6.adb, sem_util.adb: Minor reformatting.
372 2014-08-04 Olivier Hainque <hainque@adacore.com>
374 * a-comutr.ads: Set Root_Node_Type'Alignment to
375 Standard'Maximum_Alignment, so that it is at least as large as
376 the max default for Tree_Node_Type'Alignment.
378 2014-08-04 Hristian Kirtchev <kirtchev@adacore.com>
380 * exp_ch3.adb (Freeze_Type): Remove the generation and inheritance
381 of the default initial condition procedure [body].
382 * sem_ch3.adb (Analyze_Declarations): Create the bodies of
383 all default initial condition procedures at the end of private
384 declaration analysis.
385 * sem_util.adb (Build_Default_Init_Cond_Procedure_Bodies): New
387 (Build_Default_Init_Cond_Procedure_Body): Merged in the
388 processing of routine Build_Default_Init_Cond_Procedure_Bodies.
389 * sem_util.ads (Build_Default_Init_Cond_Procedure_Bodies):
391 (Build_Default_Init_Cond_Procedure_Body): Removed.
393 2014-08-04 Ed Schonberg <schonberg@adacore.com>
395 * sem_elab.adb (Check_Elab_Call): Do not check a call to a
397 * exp_ch6.adb (Expand_Call): Clarify handling of inserted
400 2014-08-04 Hristian Kirtchev <kirtchev@adacore.com>
402 * sem_prag.adb (Analyze_Pragma): Ensure that an
403 internally generated spec for a stand alone body is recognized
404 as a proper context for pragma SPARK_Mode.
406 2014-08-04 Robert Dewar <dewar@adacore.com>
408 * erroutc.adb (Delete_Msg): Do not decrement Warnings_Treated_As_Errors.
410 2014-08-04 Arnaud Charlet <charlet@adacore.com>
412 * adabkend.adb (Scan_Back_End_Switches): Ignore extra -o
413 when -gnatO has already been specified, for compatibility
415 (Scan_Compiler_Args): Do not call Set_Output_Object_File_Name in
417 * g-expect.ads: Fix typo.
419 2014-08-04 Thomas Quinot <quinot@adacore.com>
421 * exp_ch4.adb (Insert_Dereference_Action): the actual Size
422 must account for the bounds template if the designated type is
423 an unconstrained array.
425 2014-08-04 Hristian Kirtchev <kirtchev@adacore.com>
427 * a-cfhama.adb, a-cfhase.adb, a-cforma.adb, a-cforse.adb Add
428 SPARK_Mode in the body.
429 * sem_ch7.adb (Analyze_Package_Body_Helper): Restore the original
430 way to verify the consistency of SPARK_Mode between a spec and
432 * sem_ch12.adb (Analyze_Package_Instantiation): Remove the call
433 to Set_Ignore_Pragma_SPARK_Mode. Set flag Ignore_Pragma_SPARK_Mode
435 (Analyze_Subprogram_Instantiation): Remove the call to
436 Set_Ignore_Pragma_SPARK_Mode. Set flag Ignore_Pragma_SPARK_Mode
438 * sem_prag.adb (Analyze_Pragma): Remove local variable
439 Inst_Id. SPARK_Mode can no longer be applied to a package or
440 subprogram instantiation.
441 * sem_util.adb, sem_util.ads (Set_Ignore_Pragma_SPARK_Mode):
444 2014-08-04 Robert Dewar <dewar@adacore.com>
446 * sem_prag.adb, osint.adb, osint.ads: Minor reformatting.
448 2014-08-04 Yannick Moy <moy@adacore.com>
450 * sem_ch3.adb (Derive_Type_Declaration,
451 Process_Discriminants): Remove SPARK-specific legality checks.
453 2014-08-04 Thomas Quinot <quinot@adacore.com>
455 * g-sechas.ads, g-sechas.adb (HMAC_Initial_Context): New subprogram.
456 * gnat_rm.texi (GNAT.MD5/SHA1/SHA224/SHA256/SHA512): Document support
459 2014-08-04 Hristian Kirtchev <kirtchev@adacore.com>
461 * sem_ch7.adb (Analyze_Package_Body_Helper): When verifying the
462 compatibility of SPARK_Mode between a spec and a body, use the
463 SPARK_Mode of the public part.
464 * sem_ch12.adb (Analyze_Generic_Subprogram_Declaration): Use
465 the already available routine to exchange the aspects between
466 the template and its copy. Analyze the aspects of copy to
467 ensure that the corresponding pragmas perform their semantic
468 effects. The partial analysis of aspects is no longer needed.
469 (Analyze_Package_Instantiation): Save and restore the SPARK_Mode
471 (Analyze_Subprogram_Instantiation): Save and restore the SPARK_Mode of
473 * sem_prag.adb (Analyze_Pragma): Do not bypass a subprogram
474 instantiation which does not come from source.
476 2014-08-04 Hristian Kirtchev <kirtchev@adacore.com>
478 * a-cfhama.ads, a-cfhase.ads, a-cforma.ads, a-cforse.ads Add
479 SPARK_Mode pragmas to the public and private part of the unit.
480 * sem_ch3.adb (Derive_Type_Declaration): Ensure that a derived
481 type cannot have discriminants if the parent type already has
483 (Process_Discriminants): Ensure that the type of a discriminant is
485 * sem_ch6.adb (Analyze_Subprogram_Body_Helper): The check on
486 SPARK_Mode compatibility between a spec and a body can now be
487 safely performed while processing a generic.
488 * sem_ch7.adb (Analyze_Package_Body_Helper): The check on
489 SPARK_Mode compatibility between a spec and a body can now be
490 safely performed while processing a generic.
491 * sem_prag.adb (Analyze_Pragma): Pragma SPARK_Mode can now be
492 safely analyzed when processing a generic.
494 2014-08-04 Nicolas Roche <roche@adacore.com>
496 * g-dirope.adb: Minor reformating.
498 2014-08-04 Robert Dewar <dewar@adacore.com>
500 * sem_ch6.adb: Minor reformatting.
502 2014-08-04 Ed Schonberg <schonberg@adacore.com>
504 * sem_prag.adb (Analyze_Pragma, case Assert and related pragmas):
505 Before normalizing these pragmas into a pragma Check, preanalyze
506 the optional Message argument, (which is subsequently copied)
507 so that it has the proper semantic information for ASIS use.
508 * sem_case.adb: Initialize flag earlier.
509 * osint.adb, osint.ads (Find_File): Add parameter Full_Name, used when
510 the full source path of a configuration file is requested.
511 (Read_Source_File): Use Full_Name parameter..
513 2014-08-04 Hristian Kirtchev <kirtchev@adacore.com>
515 * opt.ads Alphabetize various global flags. New flag
516 Ignore_Pragma_SPARK_Mode along with a comment on usage.
517 * sem_ch6.adb (Analyze_Generic_Subprogram_Body):
518 Pragma SPARK_Mode is now allowed in generic units.
519 (Analyze_Subprogram_Body_Helper): Do not verify the compatibility
520 between the SPARK_Mode of a spec and that of a body when inside
522 * sem_ch7.adb (Analyze_Package_Body_Helper): Do not verify the
523 compatibility between the SPARK_Mode of a spec and that of a
524 body when inside a generic.
525 * sem_ch12.adb (Analyze_Generic_Subprogram_Declaration):
526 Pragma SPARK_Mode is now allowed in generic units.
527 (Analyze_Package_Instantiation): Save and restore the value of
528 flag Ignore_ Pragma_SPARK_Mode in a stack-like fasion. Set
529 the governing SPARK_Mode before analyzing the instance.
530 (Analyze_Subprogram_Instantiation): Save and restore the value
531 of flag Ignore_ Pragma_SPARK_Mode in a stack-like fasion. Set
532 the governing SPARK_Mode before analyzing the instance.
533 * sem_ch13.adb (Analyze_Aspect_Specifications): Emulate the
534 placement of a source pragma when inserting the generated pragma
535 for aspect SPARK_Mode.
536 * sem_prag.adb (Analyze_Pragma): Reimplement the handling of
537 pragma SPARK_Mode to allow for generics and their respective
539 * sem_util.ads, sem_util.adb (Check_SPARK_Mode_In_Generic): Removed.
540 (Set_Ignore_Pragma_SPARK_Mode): New routine.
542 2014-08-04 Eric Botcazou <ebotcazou@adacore.com>
544 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Component>: Deal with
545 renaming discriminants in tagged types first.
546 * gcc-interface/trans.c (gnat_to_gnu) <N_Selected_Component>: Test
547 the underlying type of the prefix.
548 (Pragma_to_gnu, case Pragma_Warning): Ignore Reason => "..."
549 (process_freeze_entity): Reset the nodes of all the view of a type,
552 2014-08-04 Doug Rupp <rupp@adacore.com>
553 Olivier Hainque <hainque@adacore.com>
555 * gcc-interface/Makefile.in (x86 VxWorks): Add filter-out for vxworks7
556 and remove incorrect EH_MECHANISM macros.
557 Add sigtramp.h to EXTRA_LIBGNAT_SRCS when we add sigtramp-vxworks.o to
560 2014-08-04 Robert Dewar <dewar@adacore.com>
562 * exp_attr.adb (Expand_N_Attribute_Reference): Make sure prefix
563 of constructed 'Valid attribute in -gnatVa mode does not appear
565 * sem_attr.adb (Analyze_Access_Attribute): Don't set
566 Never_Set_In_Source for non-source reference.
567 * sem_util.adb: Minor reformatting.
568 * sem_warn.adb (Check_References): Don't check Address_Taken,
569 not necessary, see comment.
571 2014-08-04 Robert Dewar <dewar@adacore.com>
573 * sem_util.adb, sem_case.adb: Minor reformatting.
575 2014-08-04 Ed Schonberg <schonberg@adacore.com>
577 * exp_ch9.adb (Extract_Entry): If the synchronized object is a
578 limited view, replace with non-limited view, which is available
579 at the point of an entry call.
581 2014-08-04 Ed Schonberg <schonberg@adacore.com>
583 * exp_ch6.adb (Expand_Call): If the call is to a function in
584 a run-time unit that is marked Inline_Always, we must suppress
585 debugging information on it, so that the code that is eventually
586 inlined will not affect debugging of the user program.
588 2014-08-04 Robert Dewar <dewar@adacore.com>
590 * inline.adb, einfo.ads, s-tassta.adb, s-tarest.adb: Minor comment
593 2014-08-04 Ed Schonberg <schonberg@adacore.com>
595 * sem_prag.adb (Process_Import_Or_Interface): Handle properly
596 an aspect Import that specifies a False value.
598 2014-08-04 Robert Dewar <dewar@adacore.com>
600 * gnat_rm.texi: Add section on aspect Invariant'Class.
602 2014-08-04 Ed Schonberg <schonberg@adacore.com>
604 * sem_case.adb (Check_Choice_Set): New flag Predicate_Error,
605 for better control of cascaded error messages when some choice
606 in a case statement over a predicated type violates the given
609 2014-08-04 Hristian Kirtchev <kirtchev@adacore.com>
611 * sem_ch3.adb (Build_Derived_Type): Modify the
612 inheritance of the rep chain to ensure that a non-tagged type's
613 items are not clobbered during the inheritance.
615 2014-08-04 Robert Dewar <dewar@adacore.com>
617 * sem_ch3.adb, einfo.ads: Minor reformatting.
619 2014-08-04 Yannick Moy <moy@adacore.com>
621 * inline.adb (Can_Be_Inlined_In_GNATprove_Mode): Fix
622 detection of subprograms that cannot be inlined in GNATprove mode.
624 2014-08-04 Ed Schonberg <schonberg@adacore.com>
626 * einfo.adb: Add guard to Returns_Limited_View.
628 2014-08-04 Jose Ruiz <ruiz@adacore.com>
630 * s-tassta.adb, s-tarest.adb (Task_Wrapper): Force maximum alignment of
631 the secondary stack to respect the alignments of the returned objects.
633 2014-08-04 Ed Schonberg <schonberg@adacore.com>
635 * einfo.ads, einfo.adb (Returns_Limited_View): New flag defined
636 on function entities whose return type is a limited view.
637 * freeze.adb (Freeze_Entity): Use Returns_Limited_View to determine
638 where to place the freeze node for a function that returns the
639 limited view of a type, when the function is called and frozen
642 2014-08-04 Eric Botcazou <ebotcazou@adacore.com>
644 * sem_ch3.adb (Build_Derived_Private_Type): Minor code
647 2014-08-04 Robert Dewar <dewar@adacore.com>
649 * gnat_ugn.texi: Clarify documentation on assertions.
651 2014-08-04 Ed Schonberg <schonberg@adacore.com>
653 * sem_aggr.adb (Resolve_Record_Aggregate, Get_Value): Warn
654 if a component association has a box initialization when the
655 component type has no default initialization, either through an
656 initial value, an aspect, or an implicit initialization procedure.
658 2014-08-04 Ed Schonberg <schonberg@adacore.com>
660 * freeze.adb: Code clean up.
662 2014-08-04 Thomas Quinot <quinot@adacore.com>
664 * sem_ch5.adb: Minor reformatting.
666 2014-08-04 Ed Schonberg <schonberg@adacore.com>
668 * freeze.adb (Late_Freeze_Subprogram): Following AI05-151,
669 a function can return a limited view of a type declared
670 elsewhere. In that case the function cannot be frozen at the end
671 of its enclosing package. If its first use is in a different unit,
672 it cannot be frozen there, but if the call is legal the full view
673 of the return type is available and the subprogram can now be
674 frozen. However the freeze node cannot be inserted at the point
675 of call, but rather must go in the package holding the function,
676 so that the backend can process it in the proper context.
678 2014-08-04 Robert Dewar <dewar@adacore.com>
680 * exp_ch5.adb, sem_ch5.adb, einfo.ads: Minor reformatting.
682 2014-08-04 Arnaud Charlet <charlet@adacore.com>
684 * sem_ch4.adb (Operator_Check): Refine previous change.
686 2014-08-04 Arnaud Charlet <charlet@adacore.com>
688 * sem_scil.ads: Improve comments.
689 * sem_ch4.adb (Analyze_Equality_Op): Add support for
690 Allow_Integer_Address (equality between Address and Integer).
692 2014-08-04 Yannick Moy <moy@adacore.com>
694 * a-cfhama.adb, a-cforse.adb: Minor fixes to avoid using prefix
695 notation on untagged objects.
696 * sem.ads: Update comment.
697 * inline.adb (Can_Be_Inlined_In_GNATprove_Mode): Do
698 not inline subprograms declared in the visible part of a package.
700 2014-08-04 Ed Schonberg <schonberg@adacore.com>
702 * exp_ch5.adb: minor reformatting.
703 * einfo.ads, einfo.adb (Is_Processed_Transient): Applies to loop
706 2014-08-04 Thomas Quinot <quinot@adacore.com>
708 * s-fatgen.adb: Minor reformatting.
710 2014-08-04 Arnaud Charlet <charlet@adacore.com>
712 * exp_util.adb (Is_Possibly_Unaligned_Object): Always return
715 2014-08-04 Ed Schonberg <schonberg@adacore.com>
717 * sem_ch5.adb (Analyze_Loop_Statement): Set properly the kind of
718 the loop parameter for element iterators over containers and
719 arrays, so that improper uses of it are detected in the loop
720 body when expansion is disabled.
721 * exp_ch5.adb (Expand_Iterator_Loop): The entity kind of the
722 generated cursor is that of the analyzed loop parameter.
724 2014-08-04 Hristian Kirtchev <kirtchev@adacore.com>
726 * exp_ch3.adb (Build_CPP_Init_Procedure): Remove
727 Flag_Decl. Do not analyze the declaration of the flag as it is
728 not part of the tree yet, instead add it to the freeze actions
731 2014-08-04 Robert Dewar <dewar@adacore.com>
733 * checks.adb (Apply_Scalar_Range_Check): Make sure we handle
734 case of OUT and IN OUT parameter correctly (where Source_Typ is
735 set), we were missing one case where a check must be applied.
737 2014-08-04 Hristian Kirtchev <kirtchev@adacore.com>
739 * sem_ch8.adb (Build_Class_Wide_Wrapper): Update the comment on
740 the generated code. Instead of hiding the renaming and using the
741 wrapper as the proper association, have the subprogram renaming
743 (Build_Spec): The entity of the wrapper is
744 now derived from the entity of the related primitive.
746 2014-08-04 Emmanuel Briot <briot@adacore.com>
748 * s-regpat.adb: s-regpat.adb (Parse): fix incorrect link when
749 using non-capturing groups.
751 2014-08-04 Ed Schonberg <schonberg@adacore.com>
753 * inline.adb (Build_Body_To_Inline): Remove Unmodified and
754 related pragmas before copying the original body, to prevent
755 spurious errors when the pragmas apply to formals that will not
756 appear in the inlined body.
758 2014-08-04 Robert Dewar <dewar@adacore.com>
760 * exp_prag.adb, sem_ch7.adb, einfo.adb, sem_prag.adb, sem_util.adb,
761 exp_ch3.adb: Minor reformatting.
763 2014-08-04 Robert Dewar <dewar@adacore.com>
765 * prj-strt.adb, prj-strt.ads, sem_attr.adb: Minor reformatting.
767 2014-08-04 Hristian Kirtchev <kirtchev@adacore.com>
769 * aspects.adb Add an entry in table Canonical_Aspect for
770 Default_Initial_Condition.
771 * aspects.ads Add an entry in tables Aspect_Id, Aspect_Argument,
772 Aspect_Names and Aspect_Delay for Default_Initial_Condition.
773 * einfo.adb Flag3 is now Has_Default_Init_Cond. Flag132
774 is now Is_Default_Init_Cond_ Procedure. Flag133 is now
775 Has_Inherited_Default_Init_Cond.
776 (Default_Init_Cond_Procedure): New routine.
777 (Has_Default_Init_Cond): New routine.
778 (Has_Inherited_Default_Init_Cond): New routine.
779 (Is_Default_Init_Cond_Procedure): New routine.
780 (Set_Default_Init_Cond_Procedure): New routine.
781 (Set_Has_Default_Init_Cond): New routine.
782 (Set_Has_Inherited_Default_Init_Cond): New routine.
783 (Set_Is_Default_Init_Cond_Procedure): New routine.
784 (Write_Entity_Flags): Output all the new flags.
785 * einfo.ads New attributes Default_Init_Cond_Procedure,
786 Has_Inherited_Default_Init_Cond and Is_Default_Init_Cond_Procedure
787 along with usage in nodes.
788 (Default_Init_Cond_Procedure): New routine.
789 (Has_Default_Init_Cond): New routine and pragma Inline.
790 (Has_Inherited_Default_Init_Cond): New routine and
792 (Is_Default_Init_Cond_Procedure): New routine and
794 (Set_Default_Init_Cond_Procedure): New routine.
795 (Set_Has_Default_Init_Cond): New routine and pragma Inline.
796 (Set_Has_Inherited_Default_Init_Cond): New routine and pragma Inline.
797 (Set_Is_Default_Init_Cond_Procedure): New routine and pragma Inline.
798 * exp_ch3.adb (Expand_N_Object_Declaration): New constant
799 Next_N. Generate a call to the default initial condition procedure
800 if the object's type is subject to the pragma. (Freeze_Type):
801 Generate the body of the default initial condition procedure or
802 inherit the spec from a parent type.
803 * exp_ch7.adb Add with and use clause for Exp_Prag.
804 (Expand_Pragma_Initial_Condition): Removed.
805 * exp_prag.ads, exp_prag.adb (Expand_Pragma_Initial_Condition): New
807 * par-prag.adb (Prag): Pragma Default_Initial_Condition does
808 not need special treatment by the parser.
809 * sem_ch3.adb (Build_Derived_Record_Type): Propagate the
810 attributes related to pragma Default_Initial_Condition to the
812 (Process_Full_View): Propagate the attributes
813 related to pragma Default_Initial_Condition to the full view.
814 * sem_ch7.adb (Analyze_Package_Specification): Build the
815 declaration of the default initial condition procedure for all
816 types that qualify or inherit the one from the parent type.
817 * sem_ch13.adb (Analyze_Aspect_Specifications):
818 Add processing for aspect Default_Initial_Condition.
819 (Check_Aspect_At_Freeze_Point): Aspect
820 Default_Initial_Condition does not require delayed analysis.
821 (Replace_Type_References_Generic): Moved to spec.
822 * sem_ch13.ads (Replace_Type_References_Generic): Moved from body.
823 * sem_prag.adb Add an entry in table Sif_Glags for
824 Default_Initial_Condition.
825 (Analyze_Pragma): Pragma
826 Default_Initial_Condition is now part of assertion
827 policy. Add processing for pragma Default_Initial_Condition.
828 (Is_Valid_Assertion_Kind): Pragma Default_Initial_Condition is
829 now recognized as a proper assertion policy.
830 * sem_util.ads, sem_util.adb (Build_Default_Init_Cond_Call): New
832 (Build_Default_Init_Cond_Procedure_Body): New routine.
833 (Build_Default_Init_Cond_Procedure_Declaration): New routine.
834 (Inherit_Default_Init_Cond_Procedure): New routine.
835 * snames.ads-tmpl Add new predefined name and pragma id for
836 Default_Initial_Condition.
838 2014-08-04 Vincent Celier <celier@adacore.com>
840 * prj-dect.adb (Parse_Case_Construction): It is no longer
841 an error if the variable for a case construction is not
842 typed, only if the variable value is not a single string. Call
843 Parse_Choice_List and End_Case_Construction with the new parameter
844 to indicate that the variable is typed.
845 * prj-strt.adb (End_Case_Construction): Only check the labels
846 if the variable is typed. If the variable is not typed,
847 issue a warning when there is no "when others" allternative.
848 (Parse_Choice_List): Manage the labels only if the variable
850 * prj-strt.ads (End_Case_Construction): New Boolean parameter
852 (Parse_Choice_List): Ditto.
854 2014-08-04 Ed Schonberg <schonberg@adacore.com>
856 * sem_ch5.adb: Additional fix to Check_Predicate_Use.
858 2014-08-04 Vincent Celier <celier@adacore.com>
860 * projects.texi: Update documentation of case constructions with
861 variables that are not typed.
863 2014-08-04 Ed Schonberg <schonberg@adacore.com>
865 * sem_ch8.adb (Build_Class_Wide_Wrapper): If the operator carries
866 an Eliminated pragma, indicate that the wrapper is also to be
867 eliminated, to prevent spurious errors when using gnatelim on
868 programs that include box-initialization of equality operators
869 (consequence of AI05-071)..
871 2014-08-04 Robert Dewar <dewar@adacore.com>
873 * checks.adb (Activate_Overflow_Check): Handle floating-point
875 * checks.ads (Activate_Overflow_Check): Clarify handling of
876 floating-point cases.
877 * exp_util.adb (Check_Float_Op_Overflow): Reset Do_Overflow_Check
878 flag if we generate an explicit overflow check (for
879 Check_Float_Overflow mode).
881 2014-08-04 Robert Dewar <dewar@adacore.com>
883 * prj-proc.adb, prj-part.adb, prj-strt.adb, prj.adb, prj.ads,
884 prj-attr.adb, prj-attr.ads: Minor reformatting.
886 2014-08-04 Yannick Moy <moy@adacore.com>
888 * expander.adb (Expand): Always perform special
889 expansion in GNATprove mode, even when doing pre-analysis.
891 2014-08-04 Thomas Quinot <quinot@adacore.com>
893 * repinfo.adb (List_Scalar_Storage_Order): List bit order if
894 not default. Also list bit order if SSO is specified. Do not
895 assume that bit order is always equal to scalar storage order.
897 2014-08-04 Thomas Quinot <quinot@adacore.com>
899 * freeze.adb (Set_SSO_From_Default): Do not set scalar storage
900 order to reverse SSO for a type that has an explicit native
903 2014-08-04 Doug Rupp <rupp@adacore.com>
905 * cal.c: Macro check for VxWorks7.
906 * init.c (getpid): Likewise.
907 * mkdir.c (__gnat_mkdir): Likewise.
908 * sysdep.c (__gnat_is_file_not_found_error): Likewise.
910 2014-08-04 Gary Dismukes <dismukes@adacore.com>
912 * exp_ch3.adb (Expand_N_Object_Declaration): Inhibit generation
913 of an invariant check in the case where No_Initialization is set,
914 since the object is uninitialized.
916 2014-08-04 Thomas Quinot <quinot@adacore.com>
918 * snames.ads-tmpl (Default_Scalar_Storage_Order): Now an attribute
919 name, in addition to a pragma name.
920 * snames.adb-tmpl (Get_Pragma_Id, Is_Configuration_Pragma_Name,
921 Is_Pragma_Name): Adjust accordingly.
922 * sem_attr.ads, sem_attr.adb, exp_attr.adb
923 (Attribute_Default_Scalar_Storage_Order): Add handling of new
925 * gnat_rm.texi: Document the above.
927 2014-08-04 Arnaud Charlet <charlet@adacore.com>
929 * exp_util.adb (Check_Float_Op_Overflow): No-op in codepeer
930 mode for now, to revert to previous behavior.
931 * checks.adb: Revert previous change, no longer needed.
933 2014-08-04 Robert Dewar <dewar@adacore.com>
935 * gnat1drv.adb (Adjust_Global_Switches): Don't set
936 Check_Float_Overflow if Machine_Oveflows_On_Target is True.
937 * sem_prag.adb (Analyze_Pragma, case Check_Float_Overflow): Don't
938 set Check_Float_Overflow if Machine_Oveflows_On_Target is True.
939 * switch-c.adb (Scan_Front_End_Switches): Don't set
940 Check_Float_Overflow if Machine_Oveflows_On_Target is True.
942 2014-08-04 Vincent Celier <celier@adacore.com>
944 * prj-attr.adb: Add new default indications for
945 attributes Object_Dir, Exec_Dir, Source_Dirs and Target.
946 (Attribute_Default_Of): New function (Initialize): Set the
947 default for those attributes that have one specified.
948 * prj-attr.ads (Attribute_Data): New component Default.
949 * prj-proc.adb (Expression): Take into account the new defaults
950 for attributes Object_Dir, Exec_Dir and Source_Dirs.
951 * prj-strt.adb (Attribute_Reference): Set the default for
953 * prj-tree.ads, prj-tree.adb (Default_Of): New function.
954 (Set_Default_Of): New procedure.
955 * prj.adb (The_Dot_String): New global Name_Id variable,
956 initialized in procedure Initialize.
957 (Dot_String): New function
958 (Initialize): Initialize The_Dot_String.
959 (Reset): Create the string list Shared.Dot_String_List.
960 * prj.ads (Attribute_Default_Value): New enumeration type.
961 (Project_Qualifier): Change enumeration value Dry to Abstract_Project.
962 (Dot_String): New function.
963 (Shared_Project_Tree_Data): New string list component Dot_String_List.
964 * projects.texi: Document new defaults for attribute Object_Dir,
965 Exec_Dir and Source_Dirs.
967 2014-08-04 Robert Dewar <dewar@adacore.com>
969 * sem_ch12.adb: Minor reformatting.
971 2014-08-04 Arnaud Charlet <charlet@adacore.com>
973 * exp_util.adb, checks.adb (Check_Float_Op_Overflow): Add special
974 expansion in CodePeer_Mode.
975 (Selected_Range_Checks): Add handling of overflow checks in
978 2014-08-04 Robert Dewar <dewar@adacore.com>
980 * exp_attr.adb (Expand_N_Attribute_Reference, case Pred):
981 Remove special test for Float'First, no longer required.
982 (Expand_N_Attribute_Reference, case Succ): Remove special test
983 for Float'First, no longer required.
984 * s-fatgen.adb (Pred): return infinity unchanged.
987 2014-08-04 Claire Dross <dross@adacore.com>
989 * sem_ch12.adb (Analyze_Associations): Defaults should only be
990 used if there is no explicit match.
991 * exp_util.adb (Get_First_Parent_With_Ext_Axioms_For_Entity):
992 Also check for pragma external_axiomatization on generic units.
994 2014-08-04 Robert Dewar <dewar@adacore.com>
996 * checks.adb (Activate_Overflow_Check): Remove
997 Check_Float_Overflow processing.
998 (Apply_Scalar_Range_Check): Ditto.
999 (Generate_Range_Check): Ditto.
1000 * exp_ch4.adb (Expand_N_Op_Add): Add call to
1001 Check_Float_Op_Overflow.
1002 (Expand_N_Op_Divide): ditto.
1003 (Expand_N_Op_Multiply): ditto.
1004 (Expand_N_Op_Subtract): ditto.
1005 * exp_util.ads, exp_util.adb (Check_Float_Op_Overflow): New procedure.
1006 * sem_attr.adb (Analyze_Attribute, case Pred): Make sure
1007 Do_Range_Check is set for floating-point case in -gnatc or
1009 (Analyze_Attribute, case Succ): Make sure
1010 Do_Range_Check is set for floating-point case in -gnatc or
1012 * sem_res.adb (Resolve_Type_Conversion): Make sure Do_Range_Check
1013 flag is set for real to integer conversion in GNATprove or
1016 2014-08-04 Gary Dismukes <dismukes@adacore.com>
1018 * sem_ch13.adb (Analyze_Aspect_Specifications): Resolve
1019 the expression of an Import or Export aspect as type Boolean
1020 and require it to be static. Add ??? comment. Also, set the
1021 Is_Exported flag when appropriate.
1023 2014-08-04 Robert Dewar <dewar@adacore.com>
1025 * exp_ch4.adb: Minor reformatting.
1026 * exp_attr.adb: Minor reformatting.
1028 2014-08-04 Thomas Quinot <quinot@adacore.com>
1030 * s-fatgen.ads, s-fatgen.adb (S, P): New visible type declarations
1031 (Unaligned_Valid): Remove now unused subprogram.
1032 * exp_attr.adb (Expand_N_Attribute_Reference, case
1033 Attribute_Valid): If the prefix is in reverse SSO or potentially
1034 unaligned, copy it using a byte copy operation to a temporary
1036 * einfo.adb: Minor comment fix.
1038 2014-08-04 Hristian Kirtchev <kirtchev@adacore.com>
1040 * freeze.adb (Freeze_Entity): Do not freeze formal subprograms.
1042 2014-08-04 Robert Dewar <dewar@adacore.com>
1044 * s-imgrea.adb (Image_Floating_Point): Don't add space before +Inf.
1045 * s-fatgen.adb (Pred): Handle Float'First.
1046 (Succ): Handle Float'Last.
1048 2014-08-04 Ed Schonberg <schonberg@adacore.com>
1050 * sem_util.adb (Is_Potentially_Unevaluated): If the original
1051 node of a parent node in the tree is a short-circuit operation,
1052 the node is potentially unevaluated.
1054 2014-08-04 Robert Dewar <dewar@adacore.com>
1056 * sem_res.adb (Resolve_Type_Conversion): Set Do_Range_Check on
1057 conversion from a real type to an integer type.
1059 2014-08-04 Yannick Moy <moy@adacore.com>
1061 * sem_aggr.adb, sem_ch3.adb, sem_ch5.adb, sem_ch7.adb, sem_ch9.adb,
1062 sem_ch12.adb, sem_util.adb, sem_util.ads, sem_res.adb, sem_attr.adb,
1063 exp_ch6.adb, sem_ch4.adb, restrict.adb, restrict.ads, sem_ch6.adb,
1064 sem_ch8.adb, sem_ch11.adb: Update some subprogram names to refer to
1065 SPARK_05 instead of SPARK.
1067 2014-08-04 Robert Dewar <dewar@adacore.com>
1069 * sem.ads: Minor reformatting.
1070 * sem_ch13.adb (Analyze_Aspect_External_Or_Link_Name): Minor
1072 (Analyze_Aspect_Specifications, case Convention): Put External_Name
1073 before Link_Name when constructing pragma.
1075 2014-08-04 Yannick Moy <moy@adacore.com>
1077 * sem.adb, sem.ads (In_Default_Expr): Global flag that is set
1078 to True during analysis of a default component expression.
1079 (Semantics): Save and restore In_Default_Expr around analysis.
1080 * sem_ch3.adb, sem_ch3.ads (Analyze_Component_Declaration):
1081 Call new wrapper Preanalyze_Default_Expression.
1082 (Preanalyze_Default_Expression): New wrapper on
1083 Preanalyze_Spec_Expression which sets and restores In_Default_Expr.
1084 * sem_res.adb (Resolve_Call): Mark calls inside default
1085 expressions as not inlined in GNATprove mode.
1087 2014-08-04 Robert Dewar <dewar@adacore.com>
1089 * exp_ch4.adb: Minor reformatting.
1091 2014-08-04 Olivier Hainque <hainque@adacore.com>
1093 * link.c: remove const on __gnat_objlist_file_supported for AIX
1095 2014-08-04 Robert Dewar <dewar@adacore.com>
1097 * sem_util.ads: Minor addition of comment.
1099 2014-08-04 Vincent Celier <celier@adacore.com>
1101 * prj-dect.adb (Check_Package_Allowed): Allow package IDE in
1102 all projects, including aggregate and aggregate library projects.
1104 2014-08-04 Yannick Moy <moy@adacore.com>
1106 * back_end.adb (Call_Back_End): Do not call gigi in GNATprove mode.
1108 2014-08-04 Robert Dewar <dewar@adacore.com>
1110 * sem_eval.adb (Test_In_Range): Always in range for
1111 Is_Known_Valid target type, where input type has smaller or
1112 equal size and does not have biased rep.
1114 2014-08-04 Ed Schonberg <schonberg@adacore.com>
1116 * sem_attr.adb (Eval_Attribute): Constrained is not treated as
1117 a static attribute, and the Static flag must not be set on it
1118 during resolution. It may be constant-folded during expansion,
1119 but if expansion is disabled it is not a static expression.
1121 2014-08-04 Hristian Kirtchev <kirtchev@adacore.com>
1123 * sem_ch8.adb (Build_Class_Wide_Wrapper): Mark the primitive as
1124 referenced once resolution has taken place.
1126 2014-08-04 Gary Dismukes <dismukes@adacore.com>
1128 * exp_ch4.adb (Expand_N_Type_Conversion): Don't
1129 compare access levels in the case where the target type is the
1130 anonymous type of an access discriminant, since the level of
1131 such types is defined based on context. Add comment.
1133 2014-08-04 Hristian Kirtchev <kirtchev@adacore.com>
1135 * sem_ch8.adb (Build_Class_Wide_Wrapper): Handle various special
1136 cases related to equality. Remove the special processing
1137 for dispatching abstract subprograms as it is not needed.
1138 (Interpretation_Error): Add a specialized error message for
1139 predefined operators.
1140 (Is_Intrinsic_Equality): New routine.
1141 (Is_Suitable_Candidate): New routine.
1143 2014-08-04 Gary Dismukes <dismukes@adacore.com>
1145 * checks.adb: Minor comment reformatting.
1147 2014-08-04 Ed Schonberg <schonberg@adacore.com>
1149 * restrict.adb (Check_Restriction): For checked max_parameter
1150 restrictions reset Violated flag, so that subsequent violations
1151 are properly detected.
1153 2014-08-04 Robert Dewar <dewar@adacore.com>
1155 * sem_ch3.adb (Check_Initialization): Fix bad test of GNATprove
1157 (Process_Discriminants): Fix bad test of GNATprove mode
1159 2014-08-04 Hristian Kirtchev <kirtchev@adacore.com>
1161 * sem_ch12.adb (Instantiate_Formal_Subprogram):
1162 Move variable to their own section. Propagate the source
1163 location of a formal parameter to the corresponding formal of
1164 the subprogram renaming declaration. Code reformatting.
1166 2014-08-04 Arnaud Charlet <charlet@adacore.com>
1168 * g-trasym-vms-ia64.adb, g-trasym-vms-alpha.adb: Removed.
1170 2014-08-04 Ed Schonberg <schonberg@adacore.com>
1172 * exp_aggr.adb (Expand_Array_Aggregate): Do not attempt expansion
1173 if error already detected. We may reach this point in spite of
1174 previous errors when compiling with -gnatq, to force all possible
1175 errors (this is the usual ACATS mode).
1177 2014-08-04 Gary Dismukes <dismukes@adacore.com>
1179 * checks.adb (Generate_Range_Check): For the case of converting
1180 a base type with a larger range to a smaller target subtype, only
1181 use unchecked conversions of bounds in the range check followed
1182 by conversion in the case where both types are discrete. In other
1183 cases, convert to the target base type and save in a temporary
1184 followed by the range check.
1185 (Convert_And_Check_Range): New procedure factoring code to save
1186 conversion to a temporary followed by a range check (called two
1187 places in Generate_Range_Check).
1188 * exp_ch4.adb (Expand_N_Type_Conversion): Relax previous
1189 check-in, to generate range checks for conversions between
1190 any floating-point types rather than limiting it to matching
1193 2014-08-02 Trevor Saunders <tsaunders@mozilla.com>
1195 * gcc-interface/trans.c: Use hash_set instead of pointer_set.
1197 2014-08-01 Ed Schonberg <schonberg@adacore.com>
1199 * restrict.adb (Update_Restrictions): For restrictions with a
1200 maximum parameter (e.g. number of protected entries in Ravenscar)
1201 do not compute the maximum of the violation over several objects,
1202 because the restriction is per-object.
1203 (Check_Restriction): After possible message, reset the value
1204 of of a checked max_parameter restriction to zero, to prevent
1206 * sem_ch3.adb (Build_Derived_Private_Type): Use base of parent
1207 (sub)type to determine whether derived type should be on the
1208 list of private dependents of a type whose full view may become
1209 visible subsequently.
1211 2014-08-01 Olivier Hainque <hainque@adacore.com>
1213 * gcc-interface/Make-lang.in (ADA_TOOLS_FLAGS_TO_PASS, native): use
1214 $(CXX) instead of ../../xg++ to feed CXX.
1215 (CXX_LFLAGS): Remove. Now unused as the proper flags
1216 are expected to be included in the CXX variable.
1218 2014-08-01 Pierre-Marie Derodat <derodat@adacore.com>
1220 * gcc-interface/decl.c (elaborate_expression_1): Return the new
1221 variable when debug info is needed and the expression is not
1222 constant. Tag as external only new variables that are global.
1223 (gnat_to_gnu_entity): Call it after the GNU declaration is saved.
1224 * gcc-interface/trans.c (Attribute_to_gnu): Do not cache
1225 attributes for IN array parameters when their actual subtype
1227 (Compilation_Unit_to_gnu): Call it to process all remaining nodes.
1228 * gcc-interface/gigi.h (process_deferred_decl_context): New.
1229 * gcc-interface/utils.c (gnat_write_global_declarations): Do not
1230 emit debug info for ignored global declarations.
1231 (struct deferred_decl_context_node,
1232 add_deferred_decl_context, add_deferred_type_context,
1233 compute_deferred_decl_context, defer_or_set_type_context,
1234 deferred_decl_context_queue, get_debug_scope,
1235 get_global_context, process_deferred_decl_context): New.
1236 (gnat_pushdecl): Re-implement the DECL_CONTEXT and TYPE_CONTEXT
1237 computation machinery to rely on the GNAT Scope attribute.
1239 2014-08-01 Eric Botcazou <ebotcazou@adacore.com>
1241 * gcc-interface/utils2.c (build_simple_component_ref): Add guard.
1243 2014-08-01 Robert Dewar <dewar@adacore.com>
1245 * sem_ch8.adb, opt.ads Minor comment updates.
1247 2014-08-01 Hristian Kirtchev <kirtchev@adacore.com>
1249 * exp_intr.adb (Expand_Unc_Deallocation): Request a renaming
1250 from the side effects removal machinery.
1251 * exp_util.adb (Duplicate_Subexpr): Add formal parameter
1252 Renaming_Req. Update the nested call to Remove_Side_Effects.
1253 (Duplicate_Subexpr_No_Checks): Add formal parameter
1254 Renaming_Req. Update the nested call to Remove_Side_Effects.
1255 (Duplicate_Subexpr_Move_Checks): Add formal parameter
1256 Renaming_Req. Update the nested call to Remove_Side_Effects.
1257 (Remove_Side_Effects): Add formal parameter Renaming_Req. Generate
1258 an object renaming declaration when the caller requests it.
1259 * exp_util.ads (Duplicate_Subexpr): Add formal
1260 parameter Renaming_Req. Update comment on usage.
1261 (Duplicate_Subexpr_No_Checks): Add formal parameter Renaming_Req.
1262 (Duplicate_Subexpr_Move_Checks): Add formal parameter
1265 2014-08-01 Bob Duff <duff@adacore.com>
1267 * gnat_ugn.texi: Minor updates.
1269 2014-08-01 Robert Dewar <dewar@adacore.com>
1271 * atree.adb: Minor reformatting.
1273 2014-08-01 Ed Schonberg <schonberg@adacore.com>
1275 * exp_aggr.adb (Init_Hidden_Discriminants): If some ancestor is a
1276 private extension, get stored constraint, if any, from full view.
1278 2014-08-01 Robert Dewar <dewar@adacore.com>
1280 * opt.ads (No_Elab_Code_All_Pragma): New global variable.
1281 * sem_ch10.adb (Check_No_Elab_Code_All): New procedure
1282 (Analyze_Compilation_Unit): Call Check_No_Elab_Code_All
1283 (Analyze_Subunit_Context): Call Check_No_Elab_Code_All.
1284 * sem_prag.adb (Analyze_Pragma, case No_Elaboration_Code_All):
1285 Remove code for checking with's, now in sem_ch10.adb, set
1286 Opt.No_Elab_Code_All_Pragma.
1288 2014-08-01 Eric Botcazou <ebotcazou@adacore.com>
1290 * sem_ch3.adb (Copy_And_Build): Copy the declaration for
1291 access types as well and adjust the subtype mark if there are
1294 2014-08-01 Robert Dewar <dewar@adacore.com>
1296 * sem_eval.adb (Test_In_Range): Return Unknown if error posted.
1298 2014-08-01 Robert Dewar <dewar@adacore.com>
1300 * sem_ch3.adb, einfo.ads, exp_ch4.adb: Code clean ups.
1302 2014-08-01 Eric Botcazou <ebotcazou@adacore.com>
1304 * einfo.ads (Has_Private_Ancestor): Remove obsolete usage.
1305 * exp_ch4.adb (Expand_Composite_Equality): Add conversion
1306 of the actuals in the case of untagged record types too.
1307 * sem_ch3.adb (Build_Full_Derivation): New procedure to create the
1308 full derivation of a derived private type, extracted from...
1309 (Copy_And_Build): In the case of record types and most
1310 enumeration types, copy the original declaration. Build the
1311 full derivation according to the approach extracted from...
1312 (Build_Derived_Private_Type): ...here. Call Build_Full_Derivation
1313 to create the full derivation in all existing cases and also
1314 create it in the no-discriminants/discriminants case instead of
1315 deriving directly from the full view.
1316 (Is_Visible_Component): Remove obsolete code.
1317 * sem_aggr.adb (Resolve_Record_Aggregate): Likewise.
1319 2014-08-01 Arnaud Charlet <charlet@adacore.com>
1321 * fe.h (GNAT_Mode): New.
1322 * gcc-interface/decl.c (gnat_to_gnu_entity): Do not error out on
1323 reverse SSO in GNAT mode.
1325 2014-08-01 Thomas Quinot <quinot@adacore.com>
1327 * freeze.adb: Minor reformatting.
1329 2014-08-01 Thomas Quinot <quinot@adacore.com>
1331 * exp_ch3.adb (Default_Initialize_Object): Do not generate
1332 default initialization for an imported object.
1334 2014-08-01 Olivier Hainque <hainque@adacore.com>
1336 * seh_init.c (__gnat_map_SEH): Cast argument of IsBadCodePtr
1337 to the expected FARPROC type instead of void *.
1338 * adaint.c (f2t): Expect __time64_t * as second argument, in line with
1339 other datastructures.
1340 (__gnat_file_time_name_attr): Adjust accordingly.
1341 (__gnat_check_OWNER_ACL): Declare pSD as PSECURITY_DESCRIPTOR,
1343 (__gnat_check_OWNER_ACL): Declare AccessMode
1344 parameter as ACCESS_MODE instead of DWORD, in line with callers
1346 (__gnat_set_executable): Add ATTRIBUTE_UNUSED on mode,
1347 unused on win32. Correct cast of "args" on call to spawnvp.
1348 (add_handle): Cast realloc calls into their destination types.
1349 (win32_wait): Remove declaration and initialization of unused variable.
1350 (__gnat_locate_exec_on_path): Cast alloca calls
1351 into their destination types.
1352 * initialize.c (append_arg, __gnat_initialize): Cast xmalloc calls into
1353 their destination types.
1355 2014-08-01 Gary Dismukes <dismukes@adacore.com>
1357 * exp_ch4.adb (Expand_N_Type_Conversion): Expand
1358 range checks for conversions between floating-point subtypes
1359 when the target and source types are the same.
1361 2014-08-01 Robert Dewar <dewar@adacore.com>
1363 * exp_aggr.adb: Minor reformatting.
1365 2014-08-01 Eric Botcazou <ebotcazou@adacore.com>
1367 * sem_ch13.adb (Check_Indexing_Functions): Initialize
1370 2014-08-01 Arnaud Charlet <charlet@adacore.com>
1372 * gnat1drv.adb (Gnat1drv): In gnatprove mode, we now write the
1373 ALI file before we call the backend (so that gnat2why can append
1376 2014-08-01 Thomas Quinot <quinot@adacore.com>
1378 * exp_pakd.adb (Expand_Bit_Packed_Element_Set,
1379 Expand_Packed_Element_Reference): Pass additional Rev_SSO
1380 parameter indicating whether the packed array type has reverse
1381 scalar storage order to the s-pack* Set/Get routines.
1382 * s-pack*.ad* (Get, Set, GetU, SetU): New formal Rev_SSO
1383 indicating reverse scalar storage order.
1385 2014-08-01 Robert Dewar <dewar@adacore.com>
1387 * sem_ch3.adb (Check_Initialization): Set Do_Range_Check
1388 for initial component value in -gnatc or GNATprove mode.
1389 (Process_Discriminants): Same fix for default discriminant values.
1390 * sem_eval.adb (Test_In_Range): Improve accuracy of results by
1393 2014-08-01 Robert Dewar <dewar@adacore.com>
1395 * sinfo.ads: Minor comment clarification.
1397 2014-08-01 Hristian Kirtchev <kirtchev@adacore.com>
1399 * sem_ch13.adb (Analyze_Aspect_Specifications): Code
1400 reformatting. Store the generated pragma Import in the related
1401 subprogram as routine Wrap_Imported_Subprogram will need it later.
1402 * sem_prag.adb (Is_Unconstrained_Or_Tagged_Item): An item of
1403 a private type with discriminants is considered to fall in the
1404 category of unconstrained or tagged items.
1406 2014-08-01 Arnaud charlet <charlet@adacore.com>
1408 * s-os_lib.adb (Open_Append): New functions to open a file for
1409 appending. This binds to the already existing (but not used)
1411 * osint.ads, osint.adb (Open_File_To_Append_And_Check): New procedure
1412 to open a file for appending.
1413 * osint-c.ads, osint-c.adb (Open_Output_Library_Info): New procedure
1414 to open the ALI file for appending.
1416 2014-08-01 Robert Dewar <dewar@adacore.com>
1418 * sem_ch8.adb: Minor reformatting.
1420 2014-08-01 Yannick Moy <moy@adacore.com>
1422 * sem_ch13.adb (Insert_Pragma): Add special case for precondition
1423 pragmas from aspects, which need to be inserted in proper order.
1425 2014-08-01 Ed Schonberg <schonberg@adacore.com>
1427 * exp_aggr.adb (Expand_Record_Aggregate, Init_Hidden_Discriminants):
1428 Handle properly a type extension that constrains a discriminated
1429 derived type that renames other discriminants of an ancestor.
1431 2014-08-01 Thomas Quinot <quinot@adacore.com>
1433 * s-pack06.adb, s-pack10.adb, s-pack03.ads, s-pack12.adb, s-pack14.ads,
1434 s-pack25.adb: Fix minor inconsistencies and typos.
1436 2014-08-01 Hristian Kirtchev <kirtchev@adacore.com>
1438 * sem_ch8.adb (Analyze_Subprogram_Renaming): Alphabetize
1439 globals and move certain variables to the "local
1440 variable" section. Call Build_Class_Wide_Wrapper when
1441 renaming a default actual subprogram with a class-wide actual.
1442 (Build_Class_Wide_Wrapper): New routine.
1443 (Check_Class_Wide_Actual): Removed.
1444 (Find_Renamed_Entity): Code reformatting.
1445 (Has_Class_Wide_Actual): Alphabetize. Change the
1446 logic of the predicate as the renamed name may not necessarely
1447 denote the correct subprogram.
1449 2014-08-01 Eric Botcazou <ebotcazou@adacore.com>
1451 * sem_ch7.adb: Fix minor oversight in condition.
1453 2014-08-01 Bob Duff <duff@adacore.com>
1455 * projects.texi: Minor documentation improvements.
1457 2014-08-01 Robert Dewar <dewar@adacore.com>
1459 * aspects.ads, aspects.adb: Add aspect No_Elaboration_Code_All.
1460 * gnat_rm.texi: Document No_Elaboration_Code_All pragma and aspect.
1461 * lib-load.adb: Initialize No_Elab_Code_All field.
1462 * lib-writ.adb: Initialize No_Elab_Code_All.
1463 * lib.ads, lib.adb: New field No_Elab_Code_All.
1464 * par-prag.adb: Add dummy entry for pragma No_Elaboration_Code_All.
1465 * restrict.ads, restrict.adb: Restriction No_Elaboration_Code_All no
1467 * sem_ch10.adb (Analyze_Context): Processing for
1468 No_Elaboration_Code_All removed.
1469 (Generate_Parent_References): Moved to Sem_Util.
1470 * sem_prag.adb: Add processing for pragma No_Elaboration_Code_All.
1471 * sem_util.ads, sem_util.adb (Get_Parent_Entity): Moved here from
1473 * snames.ads-tmpl: Add entry for pragma No_Elaboration_Code_All.
1474 * targparm.adb: Minor comment updates Add comments on ignoring
1475 pragma No_Elaboration_Code_All.
1477 2014-08-01 Nicolas Roche <roche@adacore.com>
1479 * adaint.c (__gnat_set_close_on_exec): Ensure that
1480 we can unset "close_on_exec" flag.
1482 2014-08-01 Ed Schonberg <schonberg@adacore.com>
1484 * exp_ch9.adb (Build_Wrapper_Spec, Replicate_Formals): When building
1485 the parameter specs of the wrapper program for a primitive operation
1486 of a synchronized type that implements an interface, copy the
1487 null_exclusion indicator as well.
1489 2014-08-01 Robert Dewar <dewar@adacore.com>
1491 * sem_eval.ads: Minor reformatting.
1493 2014-08-01 Eric Botcazou <ebotcazou@adacore.com>
1495 * exp_ch3.adb (Build_Initialization_Call): Call Underlying_Type
1496 to go down the chain of private derivations.
1497 * freeze.adb (Freeze_Entity): Fix typo in comment.
1499 2014-08-01 Ed Schonberg <schonberg@adacore.com>
1501 * sem_ch3.adb (Access_Type_Declaration): If designated type is
1502 a limited view, create a master entity (as is already done for
1503 class-wide types) in case the full view designates a type that
1505 * sem_ch8.adb (Find_Selected_Component): If prefix is a dereference
1506 and the designated type is a limited view, use the non-limited
1509 2014-08-01 Eric Botcazou <ebotcazou@adacore.com>
1511 * gcc-interface/ada-tree.h (DECL_BY_DESCRIPTOR_P): Delete.
1512 (DECL_FUNCTION_STUB): Likewise.
1513 (SET_DECL_FUNCTION_STUB): Likewise.
1514 (DECL_PARM_ALT_TYPE): Likewise.
1515 (SET_DECL_PARM_ALT_TYPE): Likewise.
1516 (TYPE_VAX_FLOATING_POINT_P): Delete.
1517 (TYPE_DIGITS_VALUE): Likewise.
1518 (SET_TYPE_DIGITS_VALUE): Likewise.
1519 * gcc-interface/gigi.h (standard_datatypes): Remove ADT_malloc32_decl.
1520 (malloc32_decl): Delete.
1521 (build_vms_descriptor): Likewise.
1522 (build_vms_descriptor32): Likewise.
1523 (fill_vms_descriptor): Likewise.
1524 (convert_vms_descriptor): Likewise.
1525 (TARGET_ABI_OPEN_VMS): Likewise.
1526 (TARGET_MALLOC64): Likewise.
1527 * gcc-interface/decl.c (add_parallel_type_for_packed_array): New.
1528 (gnat_to_gnu_entity): Call it to add the original type as a parallel
1529 type to the implementation type of a packed array type.
1530 <E_Procedure>: Remove now obsolete kludge.
1531 <E_Exception>: Delete obsolete comment.
1532 <object>: Small tweak.
1533 <E_Subprogram_Type>: Remove support for stub subprograms, as well as
1534 for the descriptor passing mechanism.
1535 (gnat_to_gnu_param): Likewise.
1536 * gcc-interface/misc.c (gnat_init_gcc_fp): Remove special case.
1537 (gnat_print_type): Adjust.
1538 * gcc-interface/trans.c (gigi): Remove obsolete initializations.
1539 (vms_builtin_establish_handler_decl): Delete.
1540 (gnat_vms_condition_handler_decl): Likewise.
1541 (establish_gnat_vms_condition_handler): Likewise.
1542 (build_function_stub): Likewise.
1543 (Subprogram_Body_to_gnu): Do not call above functions.
1544 (Call_to_gnu): Remove support for the descriptor passing mechanism.
1545 * gcc-interface/utils.c (make_descriptor_field): Delete.
1546 (build_vms_descriptor32): Likewise.
1547 (build_vms_descriptor): Likewise.
1548 (fill_vms_descriptor): Likewise.
1549 (convert_vms_descriptor64): Likewise.
1550 (convert_vms_descriptor32): Likewise.
1551 (convert_vms_descriptor): Likewise.
1552 * gcc-interface/utils.c (unchecked_convert): Likewise.
1553 * gcc-interface/utils2.c (maybe_wrap_malloc): Remove obsolete stuff.
1555 2014-08-01 Eric Botcazou <ebotcazou@adacore.com>
1557 * gcc-interface/trans.c (gigi): Use gnat_to_gnu_type for the exception
1558 type and get_unpadded_type for the longest FP type.
1559 (Attribute_to_gnu) <Machine>: Compare the precision of the types.
1560 (convert_with_check): Adjust formatting and remove FIXME.
1562 2014-08-01 Eric Botcazou <ebotcazou@adacore.com>
1564 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Signed_Integer_Subtype>:
1565 Do not convert the RM bounds to the base type.
1566 (E_Floating_Point_Subtype): Likewise.
1567 (E_Array_Subtype): Convert the bounds to the base type.
1568 * gcc-interface/trans.c (get_type_length): New function.
1569 (Attribute_to_gnu) <Range_Length>: Call it.
1571 (Loop_Statement_to_gnu): Convert the bounds to the base type.
1572 (gnat_to_gnu) <N_In>: Likewise.
1573 * gcc-interface/utils.c (make_type_from_size): Do not convert the RM
1574 bounds to the base type.
1575 (create_range_type): Likewise.
1576 (convert): Convert the bounds to the base type for biased types.
1577 * gcc-interface/utils2.c (compare_arrays): Convert the bounds to the
1580 2014-08-01 Eric Botcazou <ebotcazou@adacore.com>
1582 * gcc-interface/trans.c (gnat_to_gnu) <N_Selected_Component>: Remove
1583 incorrect implicit type derivation.
1584 * gcc-interface/utils.c (max_size) <tcc_reference>: Convert the bounds
1587 2014-08-01 Hristian Kirtchev <kirtchev@adacore.com>
1589 * sem_attr.adb (Analyze_Attribute): Preanalyze and resolve the
1590 prefix of attribute Loop_Entry.
1591 * sem_prag.adb (Analyze_Pragma): Verify the placement of pragma
1592 Loop_Variant with respect to an enclosing loop (if any).
1593 (Contains_Loop_Entry): Update the parameter profile and all
1594 calls to this routine.
1595 * sem_res.adb (Resolve_Call): Code reformatting. Do not ask
1596 for the corresponding body before determining the nature of the
1597 ultimate alias's declarative node.
1599 2014-08-01 Robert Dewar <dewar@adacore.com>
1601 * gnat1drv.adb, sem_ch4.adb: Minor reformatting.
1603 2014-08-01 Robert Dewar <dewar@adacore.com>
1605 * sem_eval.adb (Rewrite_In_Raise_CE): Don't try to reuse inner
1606 constraint error node since it is a list member.
1608 2014-08-01 Robert Dewar <dewar@adacore.com>
1610 * sem_warn.adb: Minor reformatting.
1612 2014-08-01 Eric Botcazou <ebotcazou@adacore.com>
1614 * einfo.adb (Underlying_Type): Return the underlying full view
1615 of a private type if present.
1616 * freeze.adb (Freeze_Entity):
1617 Build a single freeze node for partial, full and underlying full
1619 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Private_Type>: Add a
1620 missing guard before the access to the Underlying_Full_View.
1621 * gcc-interface/trans.c (process_freeze_entity): Deal with underlying
1622 full view if present.
1623 * gcc-interface/utils.c (make_dummy_type): Avoid superfluous work.
1625 2014-08-01 Ed Schonberg <schonberg@adacore.com>
1627 * sem_res.adb (Resolve_Entry_Call): When an entry has
1628 preconditions, the entry call is wrapped in a procedure call
1629 that incorporates the precondition checks. To prevent a double
1630 expansion, with possible duplication of extra formals, that
1631 procedure call must only be pre-analyzed and resolved. Expansion
1632 takes place upon return to the caller Resolve_Call.
1634 2014-08-01 Hristian Kirtchev <kirtchev@adacore.com>
1636 * sem_res.adb (Resolve_Call): Do not perform
1637 GNATprove-specific inlining while within a generic.
1639 2014-08-01 Ed Schonberg <schonberg@adacore.com>
1641 * sem_ch4.adb (Analyze_Case_Expression): Handle properly a
1642 case expression with incompatible alternatives, when the first
1643 alternative is overloaded.
1645 2014-08-01 Ed Schonberg <schonberg@adacore.com>
1647 * sem_res.adb (Check_Parameterless_Call): Use Relocate_Node
1648 to create the name of the parameterless call, rather than
1649 New_Copy, to preserve the tree structure when the name is a
1650 complex expression, e.g. a selected component that denotes a
1651 protected operation, whose prefix is itself a selected component.
1653 2014-08-01 Ed Schonberg <schonberg@adacore.com>
1655 * sem_ch6.adb (Analyze_Subprogram_Body_Helper): Use
1656 Unit_Declaration_Node to retrieve body when inlining, to handle
1657 properly subprogram child units.
1659 2014-08-01 Robert Dewar <dewar@adacore.com>
1661 * sem_attr.adb: Minor reformatting.
1663 2014-08-01 Vincent Celier <celier@adacore.com>
1665 * debug.adb: Minor documentation addition for -dn switch.
1667 2014-08-01 Robert Dewar <dewar@adacore.com>
1669 * sem_aggr.adb, exp_ch9.adb, sem_prag.adb, sem_util.adb,
1670 sem_attr.adb, sem_eval.ads, sem_cat.adb, sem_ch13.adb: Improve
1671 documentation of Is_Static_Expression vs Is_OK_Static_Expression.
1672 In several places, use the Is_OK version as suggested by the spec.
1674 2014-08-01 Vincent Celier <celier@adacore.com>
1676 * gnatcmd.adb: Revert last change which was not correct.
1678 2014-08-01 Hristian Kirtchev <kirtchev@adacore.com>
1680 * freeze.adb (Find_Constant): Ensure that the constant being
1681 inspected is still an object declaration (i.e. not a renaming).
1683 2014-08-01 Ed Schonberg <schonberg@adacore.com>
1685 * sem_ch5.adb (Analyze_Loop_Parameter_Specification): a)
1686 An attribute_reference to Loop_Entry denotes an iterator
1687 specification: its prefix is an object, as is the case for 'Old.
1688 b) If the domain of iteration is an expression whose type has
1689 the Iterable aspect defined, this is an iterator specification.
1691 2014-08-01 Robert Dewar <dewar@adacore.com>
1693 * gnatcmd.adb: Minor reformatting.
1695 2014-08-01 Robert Dewar <dewar@adacore.com>
1697 * atree.ads (Info_Messages): New counter.
1698 * err_vars.ads: Minor comment update.
1699 * errout.adb (Delete_Warning_And_Continuations): Deal
1700 with new Info_Messages counter.
1701 (Error_Msg_Internal): ditto.
1702 (Delete_Warning): ditto.
1703 (Initialize): ditto.
1704 (Write_Error_Summary): ditto.
1705 (Output_Messages): ditto.
1706 (To_Be_Removed): ditto.
1707 * erroutc.adb (Delete_Msg): Deal with Info_Messages counter.
1708 (Compilation_Errors): ditto.
1709 * errutil.adb (Error_Msg): Deal with Info_Messages counter.
1711 (Initialize): ditto.
1712 * sem_prag.adb (Analyze_Pragma): Minor comment addition.
1713 * gnat_ugn.texi: Document that -gnatwe does not affect info
1716 2014-08-01 Robert Dewar <dewar@adacore.com>
1718 * debug.adb: Document debug switch -gnatd.Z.
1719 * sem.adb (Semantics): Force expansion on in no or configurable
1722 2014-08-01 Ed Schonberg <schonberg@adacore.com>
1724 * sem_ch5.adb (Analyze_Loop_Parameter_Specification): An
1725 unchecked conversion denotes an iterator specification. Such a
1726 conversion will be inserted in the context of an inlined call
1727 when needed, and its argument is always an object.
1729 2014-08-01 Robert Dewar <dewar@adacore.com>
1731 * make.adb, makeutl.ads: Minor reformatting.
1732 * debug.adb, opt.ads: Clarify documentation of Front_End_Inlining and
1735 2014-08-01 Tristan Gingold <gingold@adacore.com>
1737 * gnatcmd.adb (GNATCmd): Set AAMP_On_Target using command name.
1739 2014-08-01 Javier Miranda <miranda@adacore.com>
1741 * gnat1drv.adb (Adjust_Global_Switches): Reverse meaning of
1743 * debug.adb: Updating documentation.
1744 * exp_ch6.adb (Expand_Call): Remove assertion.
1746 2014-08-01 Robert Dewar <dewar@adacore.com>
1748 * sem_aggr.adb, sem_ch3.adb, sem_ch5.adb, sem_util.adb,
1749 sem_res.adb: Minor reformatting.
1751 2014-08-01 Vincent Celier <celier@adacore.com>
1753 * make.adb (Initialize): Set Keep_Temporary_Files to True when
1755 * makeusg.adb: Add line for new switch --keep-temp-files.
1756 * makeutl.ads (Keep_Temp_Files_Option): New constant String.
1757 * opt.ads (Keep_Temporary_Files): Document that it is also used
1758 by gnatmake and gprbuild.
1759 * switch-m.adb: Recognize new switch --keep-temp-files.
1761 2014-08-01 Tristan Gingold <gingold@adacore.com>
1763 * sem_ch9.adb (Analyze_Task_Type_Declaration): Move code from ...
1764 * exp_ch9.adb (Make_Task_Create_Call): ... here.
1766 2014-08-01 Vincent Celier <celier@adacore.com>
1768 * gnat1drv.adb: Do not try to get the target parameters when
1769 invoked with -gnats.
1771 2014-08-01 Hristian Kirtchev <kirtchev@adacore.com>
1773 * exp_ch7.adb (Find_Last_Init): Nothing to do for an object
1774 declaration subject to No_Initialization.
1776 2014-08-01 Ed Schonberg <schonberg@adacore.com>
1778 * sem_aggr.adb (Resolve_Array_Aggregate): Reject choice that
1779 is a subtype with dynamic predicates, or a non-static subtype
1781 * sem_ch3.adb (Analyze_Number_Declaration): Reject qualified
1782 expression if subtype has a dynamic predicate.
1783 (Constrain_Index): Reject subtype indication if subtype mark
1785 (Inerit_Predicate_Flags): Inherit Has_Predicates as well.
1786 (Make_Index): If index is a subtype indication, itype inhereits
1787 predicate flags for subsequent testing.
1788 * sem_ch5.adb (Analyze_Loop_Parameter_Specification): New
1789 procedure Check_Predicate_Use, to reject illegal uses of domains
1790 of iteration that have dynamic predicates.
1791 * sem_res.adb (Resolve_Slice): Reject slices given by a subtype
1792 indication to which a predicate applies.
1793 * sem_util.adb (Bad_Predicated_Subtype_Use): Add guard to
1794 prevent cascaded errors when subtype is invalid.
1796 2014-08-01 Robert Dewar <dewar@adacore.com>
1798 * sem_ch10.adb: Minor reformatting.
1800 2014-08-01 Ed Schonberg <schonberg@adacore.com>
1802 * sem_ch6.adb (Same_Generic_Actual): Make function symmetric,
1803 because either type may be a subtype of the other.
1805 2014-08-01 Vincent Celier <celier@adacore.com>
1807 * makeusg.adb: Add documentation for debug switch -dn.
1809 2014-08-01 Ed Schonberg <schonberg@adacore.com>
1811 * sem_dim.adb (Process_Minus, Process_Divide): Label dimension
1812 expression with standard operator and type, for pretty-printing
1813 use, when in ASIS_Mode. When generating code dimensional analysis
1814 is not involved and dimension expressions are handled statically,
1815 and other operators are resolved in the usual way.
1817 2014-08-01 Ed Schonberg <schonberg@adacore.com>
1819 * sem_ch3.adb (Build_Derived_Record_Type): Remove setting of
1820 Parent_Subtype in ASIS mode, leads to several failures.
1821 * sem_ch4.adb (Analyze_Selected_Component): In an instance,
1822 if the prefix is a type extension, check whether component is
1823 declared in the parent type, possibly in a parent unit. Needed
1824 in ASIS mode when Parent_Subtype is not set.
1826 2014-08-01 Robert Dewar <dewar@adacore.com>
1828 * sem_prag.adb: Minor reformatting.
1829 * s-regpat.adb: Minor reformatting.
1830 * sem_ch3.adb (Analyze_Object_Declaration): Do not set
1831 Treat_As_Volatile on constants.
1833 2014-08-01 Tristan Gingold <gingold@adacore.com>
1835 * exp_ch9.adb (Make_Task_Create_Call): Improve error message.
1837 2014-08-01 Ed Schonberg <schonberg@adacore.com>
1839 * sem_ch10.adb (Analyze_Compilation_Unit): Do not place a
1840 warning on a with_clause created for the renaming of a parent
1841 unit in an explicit with_clause.
1843 2014-08-01 Ed Schonberg <schonberg@adacore.com>
1845 * sem_ch13.adb (Analyze_Aspect_Specifications, case Aspect_Import):
1846 Set Is_Imported flag at once, to simplify subsequent legality
1847 checks. Reject the aspect on an object whose declaration has an
1848 explicit initial value.
1849 * sem_prag.adb (Process_Import_Or_Interface): Use original node
1850 to check legality of an initial value for an imported entity.
1851 Set Is_Imported flag in case of error to prevent cascaded errors.
1852 Do not set the Is_Imported flag if the pragma comes from an
1853 aspect, because it is already done when analyzing the aspect.
1855 2014-08-01 Emmanuel Briot <briot@adacore.com>
1857 * g-regpat.adb (Parse): Add support for non-capturing parenthesis.
1859 2014-08-01 Robert Dewar <dewar@adacore.com>
1861 * sem_ch7.adb, einfo.adb, einfo.ads, sem_ch13.adb: Minor change of
1864 2014-08-01 Hristian Kirtchev <kirtchev@adacore.com>
1866 * sem_ch3.adb (Analyze_Object_Contract): Enable the volatility
1867 checks when the related variable comes from source.
1868 * sem_res.adb (Resolve_Actuals): Enable the volatility checks
1869 when the related actual parameter comes from source. Update comment.
1870 * freeze.adb (Freeze_Record_Type): Do not freeze the designated
1871 type of an array of pointers when the designated type is
1872 class-wide and its root type is the record being currently frozen.
1874 2014-08-01 Ed Schonberg <schonberg@adacore.com>
1876 * sem_ch5.adb (Analyze_Iterator_Specification): Preserve Ekind
1877 of renaming declaration created for domain of iteration.
1878 * sem_aggr.adb (Resolve_Array_Aggregate): Better placement
1879 for error messages on aggregates whose index subtypes have
1880 predicates. The new placement avoids posting messages on previous
1881 subtype declarations rather than on the aggregate itself.
1882 * sem_disp.adb (Is_Inherited_Public_Operation): New predicate for
1883 Add_Dispatching_Operation, to handle properly the overriding of
1884 the predefined operations on controlled types, when the partial
1885 view of a type is not visibly controlled.
1887 2014-08-01 Ben Brosgol <brosgol@adacore.com>
1889 * gnat_ugn.texi: Add tutorial on portable fixed-point types as an
1892 2014-08-01 Hristian Kirtchev <kirtchev@adacore.com>
1894 * einfo.adb (Is_Hidden_Non_Overridden_Subprogram): Remove the
1895 assertion check as the attribute is defined for all entities.
1896 (Set_Is_Hidden_Non_Overridden_Subprogram): Remove the assertion
1897 check as the attribute is defined for all entities.
1898 * einfo.ads Update the documentation of attribute
1899 Is_Hidden_Non_Overridden_Subprogram.
1900 * sem_ch7.adb (Install_Package_Entity): No need to check the
1901 entity kind of the Id.
1902 * sem_ch13.adb (Hide_Matching_Homograph): Update the comment on
1903 usage. Ensure that the homographs are of the same entity kind
1904 and not fully conformant.
1905 (Hide_Non_Overridden_Subprograms): Update the comment on usage.
1907 2014-08-01 Robert Dewar <dewar@adacore.com>
1909 * inline.adb: Minor code reorganization.
1910 * sem_ch12.adb, s-tasdeb.ads: Minor reformatting.
1912 2014-08-01 Robert Dewar <dewar@adacore.com>
1914 * inline.adb, s-os_lib.ads: Minor reformatting.
1916 2014-08-01 Arnaud Charlet <charlet@adacore.com>
1918 * s-tasdeb.ads, s-tasdeb.adb (Master_Hook, Master_Completed_Hook): New.
1919 * s-tassta.adb (Task_Wrapper, Vulnerable_Complete_Master): Call new
1922 2014-08-01 Yannick Moy <moy@adacore.com>
1924 * inline.adb (Cannot_Inline): Issue info message instead of
1925 warning for subprograms not inlined in GNATprove mode.
1926 * sem_res.adb (Resolve_Call): Take body into account for deciding
1927 whether subprogram can be inlined in GNATprove mode or not.
1929 2014-08-01 Claire Dross <dross@adacore.com>
1931 * exp_util.ads (Get_First_Parent_With_Ext_Axioms_For_Entity): Renaming
1932 of Get_First_Parent_With_External_Axiomatization_For_Entity for
1934 * sem_ch12.adb (Analyze_Associations): Only call Build_Wrapper
1935 for parameters of packages with external axiomatization.
1937 2014-08-01 Robert Dewar <dewar@adacore.com>
1939 * sem_res.adb: Minor comment addition.
1941 2014-08-01 Arnaud Charlet <charlet@adacore.com>
1943 * s-crtl.ads, i-cstrea.ads, adaint.c, adaint.h, osint.adb,
1944 s-fileio.adb (__gnat_fopen, __gnat_freopen): Remove vms_form parameter,
1946 * s-os_lib.ads: Minor reformatting.
1948 2014-08-01 Arnaud Charlet <charlet@adacore.com>
1950 * exp_attr.adb (Is_Inline_Floating_Point_Attribute): Restore more
1951 completely previous code since only GCC back-ends are prepared
1952 to handle e.g. 'Machine attribute.
1953 * targparm.adb, targparm.ads: Remove remaining refs and
1954 handling of OpenVMS_On_Target, VAX_Float_On_Target and
1955 RTX_RTSS_Kernel_Module_On_Target.
1956 * hostparm.ads (OpenVMS, Max_Debug_Name_Length): Removed,
1959 2014-08-01 Robert Dewar <dewar@adacore.com>
1961 * exp_dist.adb, exp_attr.adb: Minor reformatting.
1962 * sem_ch3.adb, mlib-tgt-specific-hpux.adb, a-direct.ads,
1963 a-synbar-posix.adb, exp_ch9.adb, sem_ch10.adb, sem_prag.adb,
1964 sem_ch12.adb, sem.ads, sem_res.adb, s-exctra.adb, s-soflin.ads,
1965 g-alveop.ads, sem_ch8.adb, vxaddr2line.adb, sem_cat.ads: Remove
1966 improper use of shall.
1968 2014-08-01 Robert Dewar <dewar@adacore.com>
1970 * sem_aggr.adb, exp_atag.adb, layout.adb, nlists.adb, nlists.ads,
1971 exp_attr.adb, exp_ch9.adb, par-ch12.adb, exp_aggr.adb,
1972 exp_ch3.adb: Minor reformatting & code reorganization.
1974 2014-08-01 Robert Dewar <dewar@adacore.com>
1976 * gnat_rm.texi: Remove VMS specific rules for pragma Ident.
1977 * Makefile.rtl, adaint.c, gnat_rm.texi, s-asthan.adb, s-asthan.ads,
1978 s-filofl.ads, s-fishfl.ads, s-fvadfl.ads, s-fvaffl.ads, s-fvagfl.ads,
1979 s-po32gl.adb, s-po32gl.ads, s-vaflop.adb, s-vaflop.ads, s-vmexta.adb,
1980 s-vmexta.ads, sem_vfpt.adb, sem_vfpt.ads, socket.c: Remove VMS specific
1982 * gcc-interface/decl.c, gcc-interface/Makefile.in,
1983 gcc-interface/Make-lang.in: Ditto. Also remove refs to rTX.
1985 2014-08-01 Pascal Obry <obry@adacore.com>
1987 * s-os_lib.ads: Rename File_Size to Large_File_Size.
1989 2014-08-01 Robert Dewar <dewar@adacore.com>
1991 * a-numaux-vxworks.ads, a-numaux-x86.adb, a-numaux-x86.ads,
1992 a-numaux-darwin.adb, a-numaux-darwin.ads, a-numaux.ads,
1993 a-numaux-libc-x86.ads: Fix bad package header comments.
1994 * elists.ads, elists.adb (Append_New_Elmt): New procedure.
1995 * gnat_rm.texi, a-calend.adb, gnatcmd.adb, einfo.adb, einfo.ads,
1996 checks.adb, sem_prag.adb, sem_prag.ads, rtsfind.ads, freeze.adb,
1997 sem_util.adb, sem_attr.adb, exp_dbug.adb, exp_dbug.ads, gnat1drv.adb,
1998 targparm.adb, targparm.ads, exp_ch6.adb, switch-b.adb, s-shasto.ads,
1999 stand.ads, s-auxdec.ads, opt.adb, opt.ads, mlib-tgt.ads, s-fatgen.adb,
2000 s-fatgen.ads, system.ads, snames.ads-tmpl, s-stalib.ads,
2001 s-os_lib.adb: Remove VMS-specific code.
2003 2014-08-01 Arnaud Charlet <charlet@adacore.com>
2005 * exp_attr.adb (Is_Inline_Floating_Point_Attribute): Revert to
2006 previous state in CodePeer_Mode.
2008 2014-08-01 Robert Dewar <dewar@adacore.com>
2010 * hostparm.ads: Put back definition of OpenVMS as False to aid
2011 the transition process.
2012 * sem_ch7.adb: Minor reformatting.
2013 * prj-env.adb: Minor code fix.
2014 * gnat_rm.texi: Complete previous change.
2015 * sem_ch3.adb: Minor reformatting.
2016 * sem_ch6.adb: Minor reformatting.
2017 * sem_elab.adb: Minor reformatting.
2018 * exp_strm.adb: Complete previous change.
2020 2014-08-01 Vincent Celier <celier@adacore.com>
2022 * sem_warn.adb (Warn_On_Unreferenced_Entity): Do not issue a
2023 warning when a constant is unreferenced and its type has pragma
2024 Unreferenced_Objects.
2026 2014-08-01 Hristian Kirtchev <kirtchev@adacore.com>
2028 * einfo.adb: Flag2 is now known as
2029 Is_Hidden_Non_Overridden_Subprogram.
2030 (Is_Hidden_Non_Overridden_Subprogram): New routine.
2031 (Set_Is_Hidden_Non_Overridden_Subprogram): New routine.
2032 (Write_Entity_Fields): Output Flag2.
2033 * einfo.ads: New attribute Is_Hidden_Non_Overridden_Subprogram
2034 along with occurrences in entities.
2035 (Is_Hidden_Non_Overridden_Subprogram): New routine and pragma Inline.
2036 (Set_Is_Hidden_Non_Overridden_Subprogram): New routine
2038 * sem_ch7.adb (Install_Package_Entity): Do not enter implicitly
2039 declared non-overriden homographs into visibility.
2040 * sem_ch13.adb (Freeze_Entity_Checks): Hide all
2041 implicitly declared non-overriden homographs.
2042 (Hide_Non_Overridden_Subprograms): New routine.
2044 2014-08-01 Robert Dewar <dewar@adacore.com>
2046 * snames.ads-tmpl, s-os_lib.adb, s-os_lib.ads, s-fileio.adb: Remove
2048 * prj-conf.adb: Minor reformatting.
2049 * xr_tabls.adb (Read_File): Restore code which was enabled on
2050 non VMS platforms before.
2051 * prj-env.adb (Initialize_Default_Project_Path): Ditto.
2052 * sem_ch5.adb: Minor reformatting.
2053 * lib-writ.adb, lib-writ.ads, bindgen.adb, sem_vfpt.adb,
2054 sem_vfpt.ads, ali.adb, ali.ads, opt.ads, bcheck.adb, exp_strm.adb:
2055 Remove VMS-specific code.
2057 2014-08-01 Vincent Celier <celier@adacore.com>
2059 * make.adb (Await_Compile): Remove loop that was only needed
2062 2014-08-01 Robert Dewar <dewar@adacore.com>
2064 * a-calcon.ads, a-direct.adb, a-dirval-mingw.adb, a-dirval.adb,
2065 a-dirval.ads, a-except-2005.adb, a-excpol-abort.adb,
2066 a-numaux-darwin.ads, a-numaux.ads, bindgen.adb, bindusg.adb,
2067 einfo.adb, einfo.ads, err_vars.ads, errout.ads, errutil.adb,
2068 exp_ch3.adb, exp_ch4.adb, exp_ch7.adb, exp_ch7.ads, fname-uf.adb,
2069 fname.adb, fname.ads, freeze.adb, g-debpoo.adb, g-dirope.ads,
2070 g-excact.ads, g-expect.ads, g-socket.adb, g-socket.ads, g-sothco.ads,
2071 g-traceb.ads, gnat_rm.texi, gnatlink.adb, gnatls.adb, i-cstrea.adb,
2072 krunch.adb, krunch.ads, layout.adb, lib-util.adb, make.adb,
2073 mlib.adb, osint-b.adb, osint-b.ads, osint-c.adb, osint.adb,
2074 osint.ads, output.ads, par.adb, prj-conf.adb, prj-env.adb,
2075 prj-makr.adb, prj-nmsc.adb, prj.adb, prj.ads, repinfo.adb, rtsfind.adb,
2076 rtsfind.ads, s-excmac-gcc.ads, s-fatgen.adb, s-mastop.ads,
2077 s-parame-ae653.ads, s-parame-hpux.ads, s-parame-vxworks.ads,
2078 s-parame.ads, s-soflin.ads, s-stoele.adb, s-tasini.adb,
2079 s-taspri-dummy.ads, s-taspri-hpux-dce.ads, s-taspri-mingw.ads,
2080 s-taspri-posix-noaltstack.ads, s-taspri-posix.ads,
2081 s-taspri-solaris.ads, s-taspri-vxworks.ads, s-trasym.ads,
2082 sem_ch12.adb, sem_ch4.adb, sem_eval.adb, sem_intr.adb, sem_mech.adb,
2083 sem_mech.ads, sem_prag.adb, sem_res.adb, sem_util.adb, sem_util.ads,
2084 sinfo.adb, sinfo.ads, sinput-c.adb, symbols.ads, targparm.adb,
2085 treepr.adb, types.ads, xr_tabls.adb, xr_tabls.ads: Remove VMS
2086 specific code and comments.
2088 2014-08-01 Ed Schonberg <schonberg@adacore.com>
2090 * sem_ch5.adb (Analyze_Iterator_Specification): New procedure
2091 Check_Reverse_Iteration, to verify the legality of the Reverse
2092 indicator on various container types, and to detect illegal
2093 reverse iterations on containers that only supoort forward
2096 2014-08-01 Vincent Celier <celier@adacore.com>
2098 * gnatcmd.adb: Remove the VMS specific stuff. Integrate in
2099 procedure GNATCmd the relevant declarations from packages VMS_Cmds
2101 * gnatcmd.ads: Update comments to remove any trace of VMS
2103 2014-08-01 Ed Schonberg <schonberg@adacore.com>
2105 * sem_ch12.adb: sem_ch12.adb (Build_Wrapper): Capture entity for
2106 defaulted actual that is an operator, before building wrapper
2107 for it in GNATprove mode. Restrict construction of wrapper to
2108 actuals that are operators.
2110 2014-08-01 Vincent Celier <celier@adacore.com>
2112 * vms_conv.adb, vms_conv.ads, vms_data.ads, vms_cmds.ads: Remove VMS
2113 specific packages no longer needed.
2115 2014-08-01 Pascal Obry <obry@adacore.com>
2117 * s-os_lib.ads (System.CRTL): Move with clause to body.
2118 (File_Size): New type.
2119 (File_Length64): Use it.
2120 (File_Length): Restore previous spec returning a Long_Integer.
2121 * s-os_lib.adb (System.CRTL): Move with clause here.
2123 2014-08-01 Vincent Celier <celier@adacore.com>
2125 * mlib-prj.adb: Update comments to remove any mention of VMS.
2127 2014-08-01 Arnaud Charlet <charlet@adacore.com>
2129 * ug_words, xgnatugn.adb, gcc-interface/Make-lang.in: Remove
2130 xgnatugn.adb and ug_words.
2132 2014-08-01 Eric Botcazou <ebotcazou@adacore.com>
2134 * exp_attr.adb (Expand_N_Attribute_Reference): Check whether
2135 expansion can be avoid for Machine, Model and Rounding.
2136 (Is_Inline_Floating_Point_Attribute): Return true for Machine
2137 & Model, as well as Rounding if wrapped in a conversion to an
2139 * sem_res.adb (Simplify_Type_Conversion): Deal with Rounding as well.
2140 * gcc-interface/gigi.h (fp_arith_may_widen): Declare.
2141 * gcc-interface/utils.c (fp_arith_may_widen): New global variable.
2142 * gcc-interface/misc.c (enumerate_modes): Compute it.
2143 * gcc-interface/trans.c (FP_ARITH_MAY_WIDEN): Delete.
2144 (lvalue_required_for_attribute_p): Deal with Descriptor_Size,
2146 (Attribute_to_gnu) <Attr_Model>: New case.
2147 <Attr_Machine>): Likewise.
2148 (convert_with_check): Test
2149 fp_arith_may_widen variable.
2151 2014-08-01 Pascal Obry <obry@adacore.com>
2153 * adaint.h (GNAT_FOPEN): New definition for Windows.
2154 (GNAT_OPEN): Likewise.
2155 (GNAT_STAT): Likewise.
2156 (GNAT_FSTAT): Likewise.
2157 (GNAT_LSTAT): Likewise.
2158 (GNAT_STRUCT_STAT): Likewise.
2159 * adaint.c (__gnat_stat): Fix computation of file size for
2162 2014-08-01 Vincent Celier <celier@adacore.com>
2164 * Makefile.rtl: Minor comment update.
2166 2014-08-01 Vincent Celier <celier@adacore.com>
2168 * Make-generated.in: Remove dependencies for vms-help.
2170 2014-08-01 Gary Dismukes <dismukes@adacore.com>
2172 * makeutl.ads, opt.ads: Minor grammar fixes.
2173 * makeutl.adb: Minor code reorganization.
2175 2014-08-01 Arnaud Charlet <charlet@adacore.com>
2177 * gcc-interface/Makefile.in, gcc-interface/Make-lang.in,
2178 gnatsym.adb: Remove gnatsym (VMS only tool).
2180 2014-08-01 Ben Brosgol <brosgol@adacore.com>
2182 * gnat_ugn.texi, projects.texi, xgnatugn.adb: Removed all VMS
2183 conditionalization from gnat_ugn.texi and projects.texi, and updated
2184 (considerably simplified) xgnatugn.adb, to be removed soon.
2186 2014-08-01 Vincent Celier <celier@adacore.com>
2188 * debug.adb: Remove doc for gnatmake/gprbuild switch -ds.
2189 * make.adb (List_Bad_Compilations): Use Opt.No_Exit_Message
2190 instead of Debug.Debug_Flag_S.
2191 * makeutl.adb (Finish_Program, Fail_Program): Use Opt flag
2192 No_Exit_Message instead of Debug.Debug_Flag_S to suppress exit
2194 * makeutl.ads (No_Exit_Message_Option): New constant string
2195 for switch --no-exit-message.
2196 * opt.ads (No_Exit_Message): New Boolean flag, defaulted to False.
2197 * switch-m.adb (Scan_Make_Switches): Recognize new switch
2200 2014-08-01 Arnaud Charlet <charlet@adacore.com>
2202 * exp_vfpt.adb, exp_vfpt.ads: Removed, no longer used.
2203 * gcc-interface/Make-lang.in: Remove exp_vfpt.o
2205 2014-08-01 Javier Miranda <miranda@adacore.com>
2207 * inline.ads (Inlined_Calls, Backend_Calls,
2208 Backend_Inlined_Subps, Backend_Not_Inlined_Subps): Declarations
2209 moved to inline.adb (Cannot_Inline): Update documentation.
2210 (Check_And_Build_Body_To_Inline): Renamed.
2211 (List_Inlining_Info): Subprogram moved here from package exp_ch6.
2212 * inline.adb (Check_Inlining_Restrictions): New local variable.
2213 (Inlined_Calls, Backend_Calls, Backend_Inlined_Subps,
2214 Backend_Not_Inlined_Subps): Declarations moved here
2215 from inline.ads (Number_Of_Statements): Removed.
2216 (Remove_Pragmas): Avoid duplicated version of this subprogram.
2217 (Build_Body_To_Inline): Code cleanup.
2218 (Build_Body_To_Inline.Has_Excluded_Statament): Removed.
2219 (Check_And_Build_Body_To_Inline): Renamed. Code cleanup.
2220 (Check_Body_To_Inline): Removed.
2221 (Generate_Body_To_Inline): Renamed as Generate_Subprogram_Body.
2222 (Has_Excluded_Declaration): No action if not
2223 Check_Inlining_Restrictions.
2224 (Has_Excluded_Statement): No action if not Check_Inlining_Restrictions.
2225 (Initialize): Initialize the lists of inlined calls and subprograms.
2226 (List_Inlining_Info): Subprogram moved here from package exp_ch6.
2227 * sem_ch6.adb (Analyze_Subprogram_Body_Helper): Update call
2228 to Check_And_Build_Body_To_Inline since it has been renamed as
2229 Check_And_Split_Unconstrained_Function
2230 * exp_ch6.ad[sb] (List_Inlining_Info): Subprogram moved to
2232 * gnat1drv.adb Update call to Inline.List_Inlining_Info.
2234 2014-08-01 Vincent Celier <celier@adacore.com>
2236 * debug.adb: Add documentation for new debug switch -ds.
2237 * make.adb (List_Bad_Compilations): Do not issue any message
2238 when switch -ds is specified.
2239 * makeutl.adb (Fail_Program): Do not issue any message when
2241 (Finish_Program): Ditto.
2243 2014-08-01 Robert Dewar <dewar@adacore.com>
2245 * s-exnint.adb, s-exnint.ads, s-wwdwch.ads, s-carsi8.ads,
2246 s-casi32.ads, indepsw.adb, a-timoau.ads, s-explli.adb, s-explli.ads,
2247 s-casi16.ads, s-powtab.ads, g-wistsp.ads, a-ztmoau.adb,
2248 indepsw-gnu.adb, s-imgllb.ads, types.adb, gnat.ads, s-proinf.adb,
2249 indepsw-aix.adb, s-caun64.ads, s-imgllw.ads, s-traces-default.adb,
2250 s-vxwork-x86.ads, s-expllu.adb, s-exnlli.adb, s-exnlli.ads,
2251 s-traces.adb, widechar.ads, stand.adb, s-expint.adb,
2252 s-tratas-default.adb, s-expint.ads, s-geveop.ads, s-caun32.ads,
2253 s-expuns.adb, s-mantis.adb, s-mantis.ads, s-caun16.ads, s-tasinf.adb,
2254 s-memcop.ads, s-dsaser.ads, s-imgbiu.ads, a-szmzco.ads, g-strspl.ads,
2255 s-casi64.ads, g-zstspl.ads, indepsw-mingw.adb, tree_io.adb,
2256 s-boarop.ads, uname.ads, s-fore.adb, s-fore.ads, g-timsta.adb,
2257 g-timsta.ads, s-assert.adb, s-vector.ads, s-tratas.adb,
2258 s-tratas.ads: Minor fix to copyright notices.
2260 2014-08-01 Eric Botcazou <ebotcazou@adacore.com>
2262 * sinfo.ads: Remove long obsolete comment.
2263 2014-08-01 Ed Schonberg <schonberg@adacore.com>
2265 * sem_util.adb: Add guard to setting of No_Predicate_On_Actual.
2266 * sem_ch3.adb: Minor reformatting.
2268 2014-08-01 Pascal Obry <obry@adacore.com>
2270 * cstreams.c: Only enable large file support on know supported
2271 platforms. Add missing defines/includes.
2273 2014-08-01 Ed Schonberg <schonberg@adacore.com>
2275 * einfo.ads, einfo.adb New flags No_Predicate_On_Actual and
2276 No_Dynamic_Predicate_On_Actual, to enforce the generic contract
2277 on generic units that contain constructs that forbid subtypes
2279 * sem_ch3.adb (Analyze_Subtype_Declaration, Process_Subtype):
2280 Inherit flags indicating the presence of predicates in subtype
2281 declarations with and without constraints.
2282 (Inherit_Predicate_Flags): Utility for the above.
2283 * sem_util.adb (Bad_Predicated_Subtype_Use): In a generic context,
2284 indicate that the actual cannot have predicates, and preserve
2285 warning. In an instance, report error if actual has predicates
2286 and the construct appears in a package declaration.
2287 * sem_ch12.adb (Diagnose_Predicated_Actual): Report error
2288 for an actual with predicates, if the corresponding formal
2289 carries No_Predicate_On_Actual or (in the case of a loop)
2290 No_Dynamic_Predicate_On_Actual.
2291 * sem_ch13.adb (Build_Predicate_Functions); Do not build a
2292 Static_Predicate function if the type is non-static (in the
2293 presence of previous errors),
2294 * sem_ch5.adb (Analyze_Loop_Parameter_Specification): Set flag
2295 No_Dynamic_Predicate_On_Actual in a generic context, to enforce
2296 generic contract on actuals that cannot have predicates.
2298 2014-08-01 Pascal Obry <obry@adacore.com>
2300 * a-direct.adb (C_Size): Returns an int64.
2301 * osint.adb (System.CRTL): New with clause.
2302 (File_Length.Internal): Returns an int64.
2303 * s-os_lib.ads (File_Length): Returns an int64.
2305 2014-08-01 Robert Dewar <dewar@adacore.com>
2307 * gnatchop.adb, gnatcmd.adb, make.adb, mlib-prj.adb, bindgen.adb,
2308 mlib.ads, butil.adb, clean.adb, binde.adb, gnatls.adb, gnatname.adb,
2309 osint.adb, krunch.adb: Minor reformatting.
2311 2014-08-01 Robert Dewar <dewar@adacore.com>
2313 * inline.adb, inline.ads, fe.h, einfo.adb, einfo.ads, sem_util.adb,
2314 sem_util.ads, exp_ch4.adb, exp_ch11.adb, exp_ch6.adb, cstand.adb,
2315 sem_mech.adb, sem_ch6.adb, sem_ch8.adb, sem_ch11.adb, snames.ads-tmpl:
2316 Remove VMS-specific code.
2317 * gcc-interface/decl.c, gcc-interface/trans.c: Ditto.
2319 2014-08-01 Arnaud Charlet <charlet@adacore.com>
2321 * binde.adb, bindgen.adb, butil.adb, clean.adb, gnatbind.adb,
2322 gnatchop.adb, gnatcmd.adb, gnatls.adb, gnatname.adb, krunch.adb,
2323 make.adb, makeutl.adb, memtrack.adb, mlib-prj.adb, mlib.adb,
2324 mlib.ads, tempdir.adb: Remove VMS handling.
2326 2014-08-01 Pascal Obry <obry@adacore.com>
2328 * adaint.h, adaint.c (__gnat_file_length): Returns an __int64.
2329 (__gnat_named_file_length): Likewise.
2330 (__gnat_file_length_attr): Likewise.
2331 * a-direct.adb (C_Size): Use size_t as returned type.
2332 * osint.adb (File_Length): Adjust spec for Internal routine
2334 * s-os_lib.adb (File_Length): Now returns a CRTL.size_t.
2335 (System.CRTL): With claused moved to spec.
2336 * s-os_lib.ads (System.CRTL): With clause moved to here.
2338 2014-08-01 Pascal Obry <obry@adacore.com>
2340 * adaint.h, adaint.c (__gnat_open): Added.
2341 * s-crtl.ads (open): Import __gnat_open for large file support.
2343 2014-08-01 Robert Dewar <dewar@adacore.com>
2345 * sem_case.adb (Dup_Choice): Improve message for integer constants.
2347 2014-08-01 Arnaud Charlet <charlet@adacore.com>
2349 * gnatlink.adb: Remove special handling of VMS, RTX and JVM.
2351 2014-08-01 Pascal Obry <obry@adacore.com>
2353 * adaint.h (GNAT_OPEN): Defines as open64 where supported.
2354 * adaint.c (GNAT_OPEN): Uses new macro where needed.
2356 2014-07-31 Eric Botcazou <ebotcazou@adacore.com>
2358 * gcc-interface/utils.c (lookup_and_insert_pad_type): New function
2360 (maybe_pad_type): ...here. Call it to canonicalize the pad type.
2361 * gcc-interface/gigi.h: Update comment.
2363 2014-07-31 Javier Miranda <miranda@adacore.com>
2365 * debug.adb Remove documentation of -gnatd.k (no longer needed).
2366 * sem_ch6.adb (Analyze_Subprogram_Body_Helper): Code cleanup.
2367 * inline.ads (Backend_Inlined_Subps): New
2368 Elist. (Backend_Not_Inlined_Subps): New Elist.
2369 (Has_Excluded_Declaration): Declaration previously located in
2370 * inline.adb (Has_Excluded_Statement): Declaration previously
2371 located in inline.adb
2372 * inline.adb (Has_Single_Return): Moved out of
2373 Build_Body_To_Inline to avoid having duplicated code.
2374 (Number_Of_Statements): New subprogram.
2375 (Register_Backend_Inlined_Subprogram): New subprogram.
2376 (Register_Backend_Not_Inlined_Subprogram): New subprogram.
2377 (Add_Inlined_Subprogram): Register backend inlined subprograms and
2378 also register subprograms that cannot be inlined by the backend.
2379 (Has_Excluded_Declaration): Moved out of Build_Body_To_Inline
2380 to avoid having duplicated code. Replace occurrences of
2381 Debug_Flag_Dot_K by Back_End_Inlining.
2382 * sem_res.adb (Resolve_Call): Code cleanup.
2383 * exp_ch6.adb (Expand_Call): Complete previous patch. Replace
2384 occurrence of Debug_Flag_Dot_K by Back_End_Inlining.
2385 (List_Inlining_Info): Add listing of subprograms passed to the
2386 backend and listing of subprograms that cannot be inlined by
2388 * sem_ch12.adb, sem_ch3.adb Replace occurrences of
2389 Debug_Flag_Dot_K by Back_End_Inlining.
2391 2014-07-31 Robert Dewar <dewar@adacore.com>
2393 * nlists.ads: Minor code fix (remove unwise Inline for
2396 2014-07-31 Arnaud Charlet <charlet@adacore.com>
2398 * einfo.adb: Remove VMS specific code.
2399 * exp_attr.adb: Remove VAX specific code.
2400 * set_targ.adb: Remove handling of VAX_Float.
2401 * sem_vfpt.adb: Remove references to Vax_Native.
2402 * sem_attr.adb (Is_VAX_Float): Remove ref to VAX_Native.
2404 2014-07-31 Robert Dewar <dewar@adacore.com>
2406 * sem_ch4.adb: Minor reformatting.
2408 2014-07-31 Arnaud Charlet <charlet@adacore.com>
2410 * gcc-interface/trans.c, gcc-interface/misc.c: Remove references
2411 to VMS. Misc clean ups.
2412 * gcc-interface/Makefile.in (gnatlib-shared-vms): Remove.
2414 2014-07-31 Robert Dewar <dewar@adacore.com>
2416 * cstand.adb, einfo.adb, einfo.ads, errout.adb, exp_attr.adb,
2417 exp_prag.adb, frontend.adb, interfac.ads,
2418 par-prag.adb, s-auxdec.ads, s-filofl.ads, s-fishfl.ads, s-fvadfl.ads,
2419 s-fvaffl.ads, s-fvagfl.ads, s-vaflop.ads, sem_attr.adb, sem_attr.ads,
2420 sem_ch13.adb, sem_ch3.adb, sem_ch8.adb, sem_prag.adb, snames.adb-tmpl,
2421 snames.ads-tmpl: Remove obsolete VMS-specific code.
2423 2014-07-31 Robert Dewar <dewar@adacore.com>
2425 * sem_ch3.adb, sem_ch13.adb: Minor reformatting.
2427 2014-07-31 Arnaud Charlet <charlet@adacore.com>
2429 * a-intnam-linux.ads: Minor: update obsolete comments.
2430 * s-taasde.adb: Minor: fix comment header.
2432 2014-07-31 Arnaud Charlet <charlet@adacore.com>
2434 * s-auxdec-vms-ia64.adb, s-parame-vms-alpha.ads, s-asthan-vms-alpha.adb,
2435 s-tpopde-vms.adb, s-mastop-vms.adb, s-tpopde-vms.ads, s-taprop-vms.adb,
2436 mlib-tgt-vms_common.adb, mlib-tgt-vms_common.ads, s-inmaop-vms.adb,
2437 g-enblsp-vms-alpha.adb, s-ransee-vms.adb, s-osprim-vms.adb,
2438 s-osprim-vms.ads, g-socthi-vms.adb, g-socthi-vms.ads, system-vms_64.ads,
2439 s-osinte-vms.adb, s-osinte-vms.ads, g-eacodu-vms.adb,
2440 s-vaflop-vms-alpha.adb, s-parame-vms-ia64.ads, a-dirval-vms.adb,
2441 a-caldel-vms.adb, mlib-tgt-specific-vms-alpha.adb, s-tasdeb-vms.adb,
2442 symbols-vms.adb, a-intnam-vms.ads, g-expect-vms.adb,
2443 symbols-processing-vms-alpha.adb, mlib-tgt-specific-vms-ia64.adb,
2444 s-traent-vms.adb, s-traent-vms.ads, i-cstrea-vms.adb, a-numaux-vms.ads,
2445 symbols-processing-vms-ia64.adb, s-interr-vms.adb, s-memory-vms_64.adb,
2446 s-memory-vms_64.ads, g-enblsp-vms-ia64.adb, s-taspri-vms.ads,
2447 s-auxdec-vms_64.ads, s-intman-vms.adb, s-intman-vms.ads,
2448 s-tpopsp-vms.adb, s-asthan-vms-ia64.adb, a-calend-vms.adb,
2449 a-calend-vms.ads, system-vms-ia64.ads, s-auxdec-vms-alpha.adb: Removed.
2450 * namet.h (Is_Non_Ada_Error): Remove.
2452 2014-07-31 Robert Dewar <dewar@adacore.com>
2454 * exp_util.adb, lib-writ.adb, sem_ch12.adb, s-direio.adb: Minor
2457 2014-07-31 Hristian Kirtchev <kirtchev@adacore.com>
2459 * exp_attr.adb (Expand_Loop_Entry_Attribute): Update the comment
2460 which demonstrates the expansion of while loops subject to
2461 attribute 'Loop_Entry. The condition of a while loop along with
2462 related condition actions is now wrapped in a function. Instead
2463 of repeating the condition, the expansion now calls the function.
2465 2014-07-31 Ed Schonberg <schonberg@adacore.com>
2467 * sem_case.adb (Check_Against_Predicate): Correct off-by-one
2468 error when reporting of missing values in a case statement for
2469 a type with a static predicate.
2470 (Check_Choices): Reject a choice given by a subtype to which a
2471 Dynamic_Predicate applies.
2472 * sem_ch3.adb (Analyze_Subtype_Declaration): Inherit
2473 Has_Dynamic_Predicate_Aspect flag from parent.
2475 2014-07-31 Ed Schonberg <schonberg@adacore.com>
2477 * sem_ch13.adb (Analyze_Aspect_Specifications): A predicate
2478 cannot apply to a subtype of an incomplete type.
2479 (Is_Static_Choice): Treat an Others_Clause as static. The
2480 staticness of the expression and of the range are checked
2483 2014-07-31 Pascal Obry <obry@adacore.com>
2485 * adaint.h (__gnat_ftell64): Added.
2486 (__gnat_fseek64): Added.
2488 * cstreams.c (__int64): Removed.
2490 2014-07-31 Pascal Obry <obry@adacore.com>
2492 * a-stream.ads (Stream_Element_Offset): Now a signed 64bit type.
2493 * i-cstrea.ads, s-crtl.ads (fseek64): Offset is always a 64bit value.
2494 (ftell64): Always returns a 64bit value.
2495 * cstreams.c (int64): New definition.
2496 (_FILE_OFFSET_BITS): Set to 64 to enable 64bit offset support.
2497 (__gnat_ftell64): Always returns a 64bit value. The implemenation now
2498 uses ftello() on UNIX.
2499 (__gnat_fseek64): Offset is always a 64bit value. The
2500 implementation now uses fseeko() on UNIX.
2501 * a-ststio.adb, s-direio.adb (Set_Position): Simplify code,
2502 always use fseek64 to set the offset.
2503 (Size): Simplify code, always use fseek64/ftell64.
2504 * s-direio.ads (Count): Now an int64.
2505 * g-socket.ads (Vector_Element): Adjust definition for Length
2506 to be a size_t. This matches the C definition and avoid using
2507 a 64bit integer on 32bit platforms now that Count is always 64bit.
2508 * g-socthi-mingw.adb (Ada.Streams): Removed as not used anymore.
2509 (C_Recvmsg): Change some conversion to account for change in
2511 (C_Sendmsg): Likewise.
2513 2014-07-31 Robert Dewar <dewar@adacore.com>
2515 * cstand.adb (Create_Standard): Remove handling of -gnatdm flag.
2516 * debug.adb: Remove documentation of -gnatdm flag.
2517 * gnat1drv.adb (Adjust_Global_Switches): Remove handling of
2520 2014-07-31 Arnaud Charlet <charlet@adacore.com>
2522 * lib-writ.adb (Write_Unit_Information): Fix case where U =
2525 2014-07-31 Claire Dross <dross@adacore.com>
2527 * exp_util.adb, exp_util.ads
2528 (Get_First_Parent_With_External_Axiomatization_For_Entity):
2529 New routine to find the first parent of an entity with
2530 a pragma Annotate (GNATprove, External_Axiomatization).
2531 (Has_Annotate_Pragma_For_External_Axiomatization): New function
2532 to check if a package has a pragma Annotate (GNATprove,
2533 External_Axiomatization).
2534 * einfo.ads, einfo.adb (Is_Generic_Actual_Subprogram): New
2535 flag on the entity for the declaration created for a formal
2536 subprogram in an instance. This is a renaming declaration,
2537 or in GNATprove_Mode the declaration of an expression function
2538 that captures the axiomatization of the actual.
2539 * sem_ch6.adb (Analyze_Expression_Function): For a
2540 Generic_Actual_Subprogram, place body immediately after the
2541 declaration because it may be used in a subsequent declaration
2543 * sem_ch12.adb (Build_Wrapper): Add code to handle instances where
2544 the actual is a function, not an operator. Handle functions with
2545 one and two parameters and binary and unary operators.
2547 2014-07-31 Pascal Obry <obry@adacore.com>
2549 * cstreams.c (__gnat_is_regular_file_fd): Removed.
2550 * adaint.c (__gnat_is_regular_file_fd): Added.
2552 2014-07-31 Robert Dewar <dewar@adacore.com>
2554 * exp_strm.adb: Minor reformatting.
2556 2014-07-31 Ed Schonberg <schonberg@adacore.com>
2558 * sem_ch12.adb (Build_Wrapper): New procedure, subsidiary to
2559 Analyze_Associations, to create a wrapper around operators that
2560 are actuals to formal subprograms. This is done in GNATProve
2561 mode in order to propagate the contracts of the operators to
2562 the body of the instance.
2564 2014-07-31 Ed Schonberg <schonberg@adacore.com>
2566 * sem_attr.adb (Analyze_Attribute, case 'Old): The reference is
2567 legal if within an aspect specification for a generic subprogram.
2569 2014-07-31 Javier Miranda <miranda@adacore.com>
2571 * gnat1drv.adb (Back_End_Inlining): Set to false if
2572 Suppress_All_Inlining is set.
2573 * debug.adb: Adding documentation for -gnatd.z.
2574 * inline.adb (Add_Inlined_Body): Extend the -gnatn2
2575 processing to -gnatn1 for calls to Inline_Always routines.
2576 (Add_Inlined_Subprogram): Remove previous patch.
2578 2014-07-31 Ed Schonberg <schonberg@adacore.com>
2580 * sem_ch13.adb (Check_One_Function): Apply properly the static
2581 semantic rules for indexing aspects and the functions they denote.
2583 2014-07-31 Javier Miranda <miranda@adacore.com>
2585 * debug.adb: Complete documentation of -gnatd.z.
2587 2014-07-31 Bob Duff <duff@adacore.com>
2589 * gnat_ugn.texi: Minor doc fixes.
2591 2014-07-31 Robert Dewar <dewar@adacore.com>
2593 * sem_aggr.adb (Resolve_Array_Aggregate): Fix posting of missing
2596 2014-07-31 Tristan Gingold <gingold@adacore.com>
2598 * s-unstyp.ads (Packed_Byte): Make this type universal aliasing.
2599 (Packed_Bytes1): Make component aliased.
2601 2014-07-31 Robert Dewar <dewar@adacore.com>
2603 * s-unstyp.ads, s-fileio.adb: Minor reformatting.
2605 2014-07-31 Robert Dewar <dewar@adacore.com>
2607 * inline.adb, gnat1drv.adb, exp_ch6.adb, s-fileio.adb: Minor
2610 2014-07-31 Eric Botcazou <ebotcazou@adacore.com>
2612 * gcc-interface/utils2.c ((build_binary_op): Don't set TREE_THIS_NOTRAP
2613 on array references here, now done more selectively in trans.c.
2615 2014-07-31 Doug Rupp <rupp@adacore.com>
2617 * gcc-interface/misc.c (gnat_init_gcc_fp(): Set flag_errno_math to 0.
2619 2014-07-31 Hristian Kirtchev <kirtchev@adacore.com>
2621 * sem_util.adb (Is_Effectively_Volatile): New routine.
2623 2014-07-31 Fedor Rybin <frybin@adacore.com>
2625 * gnat_ugn.texi: Document --test-duration option for gnattest.
2627 2014-07-31 Javier Miranda <miranda@adacore.com>
2628 Eric Botcazou <ebotcazou@adacore.com>
2630 * opt.ads (Back_End_Inlining): New variable which controls
2631 activation of inlining by back-end expansion.
2632 * gnat1drv.adb (Adjust_Global_Switches): Initialize Back_End_Inlining
2633 * sem_ch6.adb (Analyze_Subprogram_Body_Helper): Do not build
2634 the body to be inlined by the frontend if Back_End_Inlining
2636 * exp_ch6.adb (Register_Backend_Call): Moved to inline.adb.
2637 (Expand_Call): If backend inlining is enabled let the backend to
2638 handle inlined subprograms.
2639 * inline.ads (Register_Backend_Call): Moved here from exp_ch6
2640 * inline.adb (Register_Backend_Call): Moved here from exp_ch6.
2641 (Add_Inlined_Subprogram): Add subprograms when Back_End_Inlining is set.
2642 (Must_Inline): Do not return Inline_Call if Back_End_Inlining is
2644 * debug.adb Document -gnatd.z
2645 * fe.h Import Back_End_Inlining variable.
2646 * gcc-interface/utils.c (create_subprog_decl): If Back_End_Inlining is
2647 enabled then declare attribute "always inline"
2648 * gcc-interface/decl.c, gcc-interface/trans.c,
2649 gcc-interface/gigi.h: Add handling of Inline_Always pragma.
2651 2014-07-31 Robert Dewar <dewar@adacore.com>
2653 * a-ngelfu.ads: Minor comment fix.
2655 2014-07-31 Hristian Kirtchev <kirtchev@adacore.com>
2657 * freeze.adb (Freeze_Record_Type): Replace all calls to
2658 Is_SPARK_Volatile with Is_Effectively_Volatile and update
2660 * sem_ch3.adb (Analyze_Object_Contract, Process_Discriminants):
2661 Replace all calls to Is_SPARK_Volatile with
2662 Is_Effectively_Volatile and update related comments.
2663 * sem_ch5.adb (Analyze_Iterator_Specification,
2664 Analyze_Loop_Parameter_Specification): Replace all calls to
2665 Is_SPARK_Volatile with Is_Effectively_Volatile and update
2667 * sem_ch6.adb (Process_Formals): Replace all calls to
2668 Is_SPARK_Volatile with Is_Effectively_Volatile and update
2670 * sem_ch12.adb (Instantiate_Object): Replace the call to
2671 Is_SPARK_Volatile_Object with Is_Effectively_Volatile_Object
2672 and update related comment.
2673 * sem_prag.adb (Analyze_External_Property_In_Decl_Part,
2674 Analyze_Global_Item): Replace all calls to Is_SPARK_Volatile
2675 with Is_Effectively_Volatile and update related comments.
2676 * sem_res.adb (Resolve_Actuals, Resolve_Entity_Name): Replace
2677 all calls to Is_SPARK_Volatile with Is_Effectively_Volatile and
2678 update related comments.
2679 * sem_util.adb (Has_Enabled_Property,
2680 Variable_Has_Enabled_Property): Replace all calls
2681 to Is_SPARK_Volatile with Is_Effectively_Volatile and
2682 update related comments.
2683 (Is_Effectively_Volatile): New routine.
2684 (Is_Effectively_Volatile_Object): New routine.
2685 (Is_SPARK_Volatile): Removed.
2686 (Is_SPARK_Volatile_Object): Removed.
2687 * sem_util.ads (Is_Effectively_Volatile): New routine.
2688 (Is_Effectively_Volatile_Object): New routine.
2689 (Is_SPARK_Volatile): Removed.
2690 (Is_SPARK_Volatile_Object): Removed.
2692 2014-07-31 Pascal Obry <obry@adacore.com>
2694 * s-fileio.adb (Open): Make sure a shared file gets inserted into
2695 the global list atomically. This ensures that the file descriptor
2696 won't be freed because another tasks is closing the file.
2698 2014-07-31 Robert Dewar <dewar@adacore.com>
2700 * sem_ch3.adb (Process_Range_Expr_In_Decl): Add comments on
2701 generation of _FIRST and _LAST variables even in GNATprove_Mode.
2702 * gnat_ugn.texi: Minor editing.
2703 * sem_prag.adb (Ensure_Aggregate_Form): Make sure generated
2704 aggregate is marked Comes_From_Source if argument is CFS.
2706 2014-07-31 Pascal Obry <obry@adacore.com>
2708 * s-fileio.adb: Remove obsolete comment.
2710 2014-07-31 Vincent Celier <celier@adacore.com>
2712 * a-strbou.ads ("=" (Bounded_String, Bounded_String): Add
2713 overriding keyword before function to avoid error when compiler
2714 is called with -gnatyO (check overriding indicators).
2716 2014-07-31 Tucker Taft <taft@adacore.com>
2718 * gnat_ugn.texi: Add a paragraph pointing the reader
2719 to the "plugins" example.
2721 2014-07-31 Hristian Kirtchev <kirtchev@adacore.com>
2723 * freeze.adb (Freeze_Expression): Document the
2724 purpose of the parent chain traversal.
2726 2014-07-31 Robert Dewar <dewar@adacore.com>
2728 * checks.ads, checks.adb (Activate_Overflow_Check): Do not set flag for
2729 unconstrained fpt ops.
2731 2014-07-31 Pascal Obry <obry@adacore.com>
2733 * s-fileio.adb (Open): Make sure a shared file gets inserted into
2734 the global list atomically. This ensures that the file descriptor
2735 won't be freed because another tasks is closing the file.
2737 2014-07-31 Vincent Celier <celier@adacore.com>
2739 * projects.texi: Minor spelling error fix.
2741 2014-07-31 Robert Dewar <dewar@adacore.com>
2743 * gnat_rm.texi: Document No_Elaboration_Code_All restriction.
2744 * lib-writ.adb, lib-load.adb: Initialize No_Elab_Code field in unit
2746 * lib.ads, lib.adb (No_Elab_Code): New field in unit information.
2747 * restrict.adb (Process_Restriction_Synonyms): Add handling
2748 of No_Elaboration_Code_All.
2749 * restrict.ads (Process_Restriction_Synonyms): Now handles
2750 No_Elaboration_Code_All.
2751 * sem_ch10.adb (Analyze_Context): Enforce transitive with for
2752 No_Elaboration_Code_All.
2753 * sem_prag.adb (Process_Restrictions_Or_Restriction_Warnings):
2754 Handle setting of No_Elab_Code in unit information. Handle
2755 No_Elaboration_Code_All.
2756 * snames.ads-tmpl (Name_No_Elaboration_Code): New name for
2758 (Name_No_Elaboration_Code_All): New name for pragma processing.
2760 2014-07-31 Eric Botcazou <ebotcazou@adacore.com>
2762 * exp_aggr.adb (Aggr_Assignment_OK_For_Backend): Reject array
2763 types with a null range and use the Esize of the component
2764 instead of its RM_Size to identify appropriate values.
2766 2014-07-31 Hristian Kirtchev <kirtchev@adacore.com>
2768 * freeze.adb Add with and use clause for Aspects.
2769 (Freeze_Expression): Emit an error when a volatile constant lacks
2770 Boolean aspect Import.
2771 (Has_Boolean_Aspect_Import): New routine.
2773 2014-07-31 Gary Dismukes <dismukes@adacore.com>
2775 * exp_util.adb: Minor reformatting.
2777 2014-07-31 Vincent Celier <celier@adacore.com>
2779 * errutil.adb (Error_Msg): Make sure that all components of
2780 the error message object are initialized.
2782 2014-07-31 Ed Schonberg <schonberg@adacore.com>
2784 * sem_ch4.adb (Try_Container_Indexing): If the container type is
2785 class-wide, use specific type to locate iteration primitives.
2786 * sem_ch13.adb (Check_Indexing_Functions): Add legality checks for
2787 rules in RM 4.1.6 (Illegal_Indexing): New diagnostic procedure.
2788 Minor error message reformating.
2789 * exp_ch5.adb (Expand_Iterator_Loop): Handle properly Iterator
2790 aspect for a derived type.
2792 2014-07-31 Robert Dewar <dewar@adacore.com>
2794 * debug.adb: Document debug flag d.X.
2796 2014-07-31 Ed Schonberg <schonberg@adacore.com>
2798 * sem_util.ads (Find_Specific_Type): Moved here from exp_disp.adb.
2799 * sem_util.adb (Find_Specific_Type): If type is untagged private,
2800 retrieve full view so that primitive operations can be located.
2801 * exp_disp.adb Move Find_Specific_Type to sem_util.
2802 * exp_ch4.adb (Expand_N_Op_Eq): If operands are class-wide, use
2803 Find_Specific_Type to locate primitive equality.
2804 * exp_util.adb (Make_CW_Equivalent_Type): A class_wide equivalent
2805 type does not require initialization.
2806 * exp_attr.adb (Compile_Stream_Body_In_Scope): Within an instance
2807 body all visibility is established, and the enclosing package
2808 declarations must not be installed.
2810 2014-07-31 Yannick Moy <moy@adacore.com>
2812 * sem_parg.adb, sem_prag.ads (Collect_Subprogram_Inputs_Outputs):
2813 Make subprogram public.
2815 2014-07-31 Ed Schonberg <schonberg@adacore.com>
2817 * exp_ch9.adb (Expand_N_Protected_Type_Declaration): New
2818 predicate Discriminated_Size, to distinguish between private
2819 components that depend on discriminants from those whose size
2820 depends on some other non-static expression.
2822 2014-07-31 Nicolas Setton <setton@adacore.com>
2824 * g-exptty.adb (Close): Fix binding to Waitpid: use the
2827 2014-07-31 Ed Schonberg <schonberg@adacore.com>
2829 * sem_ch3.adb (Make_Index): Reject properly the use of 'Length
2830 in a discrete range, when 'range was probably intended.
2832 2014-07-31 Robert Dewar <dewar@adacore.com>
2834 * sem_warn.adb, sem_warn.ads (Has_Junk_Name): Moved from body to spec.
2836 2014-07-31 Robert Dewar <dewar@adacore.com>
2838 * frontend.adb: Minor reformatting.
2839 * sem.adb: Minor reformatting.
2840 * sem_ch6.adb (Analyze_Null_Procedure): Set proper sloc for
2841 identifiers on rewrite.
2842 * par.adb: Minor comment updates.
2843 * a-ngelfu.adb (Cos): Minor simplification.
2844 * par-ch13.adb (Get_Aspect_Specifications): Improve messages
2845 and recovery for bad aspect.
2846 * exp_ch3.adb: Code clean up.
2847 * sem_util.ads: Minor comment correction.
2848 * sem_ch13.adb (Check_Array_Type): Properly handle large types.
2849 * sem_ch3.adb: Code clean up.
2850 * binderr.ads: Minor comment correction.
2852 2014-07-31 Ed Schonberg <schonberg@adacore.com>
2854 * exp_disp.adb (Expand_Interface_Conversion): A call whose
2855 prefix is a static conversion to an interface type that is not
2856 class-wide is not dispatching.
2858 2014-07-31 Robert Dewar <dewar@adacore.com>
2860 * inline.adb, s-traceb.adb, s-traceb-hpux.adb, memtrack.adb,
2861 s-traceb-mastop.adb: Minor reformatting.
2863 2014-07-31 Ed Schonberg <schonberg@adacore.com>
2865 * exp_ch3.adb (Expand_Record_Extension): In ASIS_Mode perform
2866 expansion, to handle properly visibility of selected components
2869 2014-07-31 Robert Dewar <dewar@adacore.com>
2871 * par-ch13.adb (Get_Aspect_Specifications): Set Inside_Depends.
2872 * par-ch2.adb (P_Pragma): Set Inside_Depends.
2873 * par-ch4.adb (P_Simple_Expression): Pass Inside_Depends to
2874 Check_Unary_Plus_Or_Minus.
2875 * scans.ads (Inside_Depends): New flag.
2876 * scng.adb (Scan): Pass Inside_Depends to Check_Arrow.
2877 * style.ads: Add Inside_Depends parameter to Check_Arrow Add
2878 Inside_Depends parameter to Check_Unary_Plus_Or_Minus.
2879 * styleg.adb (Check_Arrow): Handle Inside_Depends case.
2880 (Check_Unary_Plus_Or_Minus): Handle Inside_Depends case.
2881 * styleg.ads: Add Inside_Depends parameter to Check_Arrow Add.
2882 Inside_Depends parameter to Check_Unary_Plus_Or_Minus.
2884 2014-07-31 Javier Miranda <miranda@adacore.com>
2886 * s-vaflop.adb Move the body of function T_To_G before
2887 T_To_D. Required for frontend inlining.
2888 * inline.adb (Has_Excluded_Contract): New subprogram used to
2889 check if a subprogram inlined by the frontend has contracts
2890 which cannot be inlined.
2892 2014-07-31 Bob Duff <duff@adacore.com>
2894 * s-traceb.adb, s-traceb-hpux.adb, s-traceb-mastop.adb:
2895 (Call_Chain): Add 1 to number of frames to skip, to account for
2896 the fact that there's one more frame on the stack.
2897 * gcc-interface/Makefile.in (s-traceb.o): Adjust rules.
2899 2014-07-31 Robert Dewar <dewar@adacore.com>
2901 * checks.adb (Enable_Overflow_Check): More precise setting of
2902 Do_Overflow_Check flag for division.
2904 2014-07-31 Eric Botcazou <ebotcazou@adacore.com>
2906 * exp_aggr.adb (Aggr_Assignment_OK_For_Backend): Reject packed
2907 array types with implementation type.
2909 2014-07-31 Hristian Kirtchev <kirtchev@adacore.com>
2911 * sem_ch10.adb (Process_State): Remove local variable Name. Add
2912 local variable Decl. Partially declare an abstract state by
2913 generating an entity and storing it in the state declaration.
2914 * sem_prag.adb (Create_Abstract_State): Fully declare a
2915 semi-declared abstract state.
2917 2014-07-31 Robert Dewar <dewar@adacore.com>
2919 * prj-nmsc.adb: Minor reformatting.
2921 2014-07-31 Bob Duff <duff@adacore.com>
2923 * s-tasdeb.adb (System.Tasking.Debug): Remove
2924 all usage of the secondary stack from this package.
2926 2014-07-31 Hristian Kirtchev <kirtchev@adacore.com>
2928 * freeze.adb (Freeze_Expression): Update the loop in charge
2929 of finding a proper insertion place for freeze nodes to handle
2930 N_Expression_With_Actions nodes.
2932 2014-07-31 Robert Dewar <dewar@adacore.com>
2934 * sem_util.adb, a-ngelfu.ads, prj-nmsc.adb, prj-conf.adb: Minor
2937 2014-07-31 Pascal Obry <obry@adacore.com>
2939 * prj-nmsc.adb: Minor reformatting.
2941 2014-07-31 Ed Schonberg <schonberg@adacore.com>
2943 * sem_util.adb (Has_Preelaborable_Initialization): Check that
2944 type is tagged before checking whether a user-defined Initialize
2945 procedure is present.
2947 2014-07-31 Gary Dismukes <dismukes@adacore.com>
2949 * a-ngelfu.ads (Sqrt): Augment postcondition.
2951 2014-07-31 Pascal Obry <obry@adacore.com>
2953 * prj-nmsc.adb (Check_Library_Attributes): An aggegate library
2954 directory and ALI directory must be different than all object
2955 and library directories of aggregated projects.
2957 2014-07-31 Vincent Celier <celier@adacore.com>
2959 * prj-pars.adb, prj-conf.ads, prj-conf.adb (Locate_Runtime): Move spec
2960 to package body, as it is not called from outside. Remove argument
2961 Project_Tree, no longer used. When runtime cannot be found,
2962 call Raise_Invalid_Config instead of failing the program.
2964 2014-07-31 Robert Dewar <dewar@adacore.com>
2966 * bindgen.adb (Gen_Output_File_Ada): Generate pragma Suppress
2968 * gnatlink.adb (Process_Args): Remove generation of -gnato0,
2971 2014-07-31 Robert Dewar <dewar@adacore.com>
2973 * gnat_ugn.texi: Document new switch -gnato0.
2974 * sem_ch3.ads: Minor reformatting.
2975 * gnatlink.adb (Process_Args): Compile bind file with -gnato0
2976 (we do not want overflow checks when incrementing elaboration
2978 * einfo.ads: Minor reformatting.
2980 2014-07-31 Robert Dewar <dewar@adacore.com>
2982 * exp_ch5.adb, freeze.adb, exp_ch3.adb: Minor comment correction.
2983 * s-arit64.adb: Minor reformatting.
2985 2014-07-31 Robert Dewar <dewar@adacore.com>
2987 * gnat1drv.adb (Adjust_Global_Switches): Default for overflow
2988 checking is enabled except in GNAT_Mode.
2989 * switch-c.adb (Scan_Front_End_Switches): Implement -gnato0
2990 (suppress overflow checks).
2992 2014-07-31 Ed Schonberg <schonberg@adacore.com>
2994 * exp_ch3.adb (Expand_Freeze_Record_Type): Do not build an
2995 invariant procedure for an internally generated subtype that is
2996 created for an object of a class-wide type.
2998 2014-07-31 Vincent Celier <celier@adacore.com>
3000 * prj-nmsc.adb, errutil.adb: Make code similar to Errout.
3002 2014-07-31 Gary Dismukes <dismukes@adacore.com>
3004 * gnat_rm.texi, sem_aux.ads, einfo.ads, sem_util.ads, sem_ch6.adb,
3005 exp_disp.adb: Minor reformatting.
3007 2014-07-31 Robert Dewar <dewar@adacore.com>
3009 * exp_ch5.adb, sem_ch3.adb, exp_ch7.adb, exp_util.adb, exp_ch9.adb,
3010 sem_ch7.adb, checks.adb, s-exctra.adb, exp_ch6.adb, exp_disp.adb,
3011 exp_dist.adb, sem_ch13.adb, exp_strm.adb, exp_ch3.adb: Minor
3014 2014-07-31 Robert Dewar <dewar@adacore.com>
3016 * sem_ch13.adb: Minor reformatting.
3018 2014-07-31 Ed Schonberg <schonberg@adacore.com>
3020 * exp_ch3.adb (Build_Invariant_Checks): If the enclosing record
3021 is an unchecked_union, warn that invariants will not be checked
3022 on components that have them.
3024 2014-07-31 Robert Dewar <dewar@adacore.com>
3026 * freeze.adb (Freeze_Entity): Check for error of
3027 Type_Invariant'Class applied to a untagged type.
3028 * sem_ch6.adb (Analyze_Null_Procedure): Unconditionally rewrite
3029 as null body, so that we perform error checks even if expansion
3032 2014-07-31 Ed Schonberg <schonberg@adacore.com>
3034 * sem_ch13.adb (Build_Invariant_Procedure): If body of procedure
3035 is already present, nothing to do.
3036 * exp_ch3.adb (Build_Component_Invariant_Call): For an access
3037 component, check whether the access type has an invariant before
3038 checking the designated type.
3039 (Build_Record_Invariant_Proc): Change suffix of generated
3040 name to prevent ambiguity when record type has invariants
3041 in addition to those of components, and two subprograms are
3042 constructed. Consistent with handling of array types.
3043 (Insert_Component_Invariant_Checks): Build invariant procedure
3044 body when one has not been created yet, in the case of composite
3045 types that are completions and whose full declarations carry
3048 2014-07-30 Thomas Quinot <quinot@adacore.com>
3050 * gnat_rm.texi: Minor doc fixes.
3052 2014-07-30 Robert Dewar <dewar@adacore.com>
3054 * a-rbtgbo.adb, sem_ch13.adb: Minor reformatting.
3056 2014-07-30 Vincent Celier <celier@adacore.com>
3058 * errutil.adb (Set_Msg_Text): Process tilde ('~'): no processing
3060 * prj-nmsc.adb (Locate_Directory): Use a tilde ('~') in the
3061 message to report that a directory cannot be created, to avoid
3062 processing of the directory path that may contains special
3063 insertion characters.
3065 2014-07-30 Ed Schonberg <schonberg@adacore.com>
3067 * a-crdlli.ads: Place declaration of Empty_List after full type
3068 declaration for Curosr, to prevent freezing error.
3070 2014-07-30 Robert Dewar <dewar@adacore.com>
3072 * get_targ.adb: Minor code reorganization.
3073 * prj-proc.adb, prj-proc.ads, get_targ.ads, sem_ch6.adb: Minor
3076 2014-07-30 Ed Schonberg <schonberg@adacore.com>
3078 * a-cbhase.adb: a-cbhase.adb (Insert): Raise Constraint_Error,
3079 not Program_Error, when attempting to remove an element not in
3080 the set. This is the given semantics for all set containers.
3082 2014-07-30 Ed Schonberg <schonberg@adacore.com>
3084 * a-rbtgbo.adb (Delete_Node_Sans_Free): If
3085 element is not present in tree return rather than violating
3086 an assertion. Constraint_Error will be raised in the caller if
3087 element is not in the container.
3089 2014-07-30 Arnaud Charlet <charlet@adacore.com>
3091 * set_targ.adb (Read_Target_Dependent_Values): New subprogram.
3092 (elab body): Add provision for default target config file.
3093 * get_targ.ads, get_targ.adb (Get_Back_End_Config_File): New subprogram.
3095 2014-07-30 Ed Schonberg <schonberg@adacore.com>
3097 * a-cbhase.adb (Delete): Raise Constraint_Error, not Program_Error,
3098 when attempting to remove an element not in the set. This is
3099 the given semantics for all set containers.
3100 * a-cborse.adb (Delete): Attempt removal first, to check for
3101 tampering, before checking whether this is an attempt to
3102 delete a non-existing element, and in fthe latter case raise
3105 2014-07-30 Vincent Celier <celier@adacore.com>
3107 * prj-proc.adb (Recursive_Process): Do not create a new
3108 Project_Id if the project is already in the list of projects of
3111 2014-07-30 Ed Schonberg <schonberg@adacore.com>
3113 * sem_ch6.adb (Analyze_Function_Return): Reject a return expression
3114 whose type is an incomplete formal type.
3115 (Analyze_Return_Type): Reject a return type that is an untagged
3116 imcomplete formal type.
3117 (Process_Formals): Reject a formal parameter whose type is an
3118 untagged formal incomplete type.
3119 * sem_res.adb (Resolve_Actuals): Reject an actual whose type is
3120 an untagged formal incomplete type.
3122 2014-07-30 Robert Dewar <dewar@adacore.com>
3124 * gnat_ugn.texi: Minor spelling correction.
3125 * makeutl.adb: Minor code reorganization.
3126 * exp_ch4.adb, exp_aggr.adb, exp_ch3.adb: Minor reformatting.
3128 2014-07-30 Robert Dewar <dewar@adacore.com>
3130 * einfo.ads (Has_Unchecked_Union): Document that this is used
3131 to check for illegal Valid_Scalars attribute references.
3132 * exp_attr.adb (Build_Record_VS_Func): New function
3133 (Expand_N_Attribute_Reference, case Valid_Scalars): Call this
3135 * gnat_rm.texi: Document 'Valid_Scalars cannot be applied to
3136 Unchecked_Union Add note on 'Valid_Scalars generating a lot
3138 * sem_attr.adb (Analyze_Attribute, case Valid_Scalars): Give
3139 error on attempt to apply Valid_Scalars to Unchecked_Union type.
3141 2014-07-30 Steve Baird <baird@adacore.com>
3143 * exp_ch4.adb (Expand_N_Indexed_Component): Disable optimized handling
3144 of A(I..J)(K) in CodePeer_Mode.
3146 2014-07-30 Ben Brosgol <brosgol@adacore.com>
3148 * gnat_ugn.texi: Fix typo.
3150 2014-07-30 Thomas Quinot <quinot@adacore.com>
3152 * lib-writ.ads: document format change.
3154 2014-07-30 Pascal Obry <obry@adacore.com>
3156 * prj-util.adb (For_Interface_Sources): Do not
3157 include sources from withed externally built projects.
3159 2014-07-30 Robert Dewar <dewar@adacore.com>
3161 * lib.adb: Minor reformatting.
3162 * prj-util.adb: Minor reformatting.
3164 2014-07-30 Ed Schonberg <schonberg@adacore.com>
3166 * exp_aggr.adb (Build_Record_Aggr_Code): For an array component
3167 that depends on discriminants, and which is given by an others
3168 clause, create an explicit subtype with the discriminant values
3169 of the enclosing aggregate, because the backend cannot otherwise
3170 retrieve the actual bounds of the array.
3172 2014-07-30 Fedor Rybin <frybin@adacore.com>
3174 * gnat_ugn.texi: Improve gnattest documentation.
3176 2014-07-30 Pascal Obry <obry@adacore.com>
3178 * makeutl.adb (Insert_Project_Sources): Properly handle sources
3179 that are aggregated. We want to include sources not only part
3180 of libraries but also if part of an aggregated project from an
3182 * prj.adb (For_Project_And_Aggregated_Context): Properly check
3183 state of root project.
3185 2014-07-30 Thomas Quinot <quinot@adacore.com>
3187 * lib-load.ads: Minor reformatting.
3188 * sinfo.ads (Library_Unit): Update comment.
3189 * lib.ads (Notes): Simplify. The Unit component in Notes_Entry
3190 is redundant. Instead used the pragma Node_Id directly as the
3193 2014-07-30 Thomas Quinot <quinot@adacore.com>
3195 * lib.adb (Store_Note): Store only notes that do not come from
3196 an instance, and that are in the extended main source unit.
3197 * lib-writ (Write_Unit_Information): Annotations from subunits
3198 must be emitted along with those for the main unit, and they
3199 must carry a specific file name.
3200 * ali.ads (Notes_Record): Use a File_Name_Type instead of a
3201 Unit_Id for the source file containing the pragma, as in the
3202 case of annotations from subunits we might not have a readily
3204 * ali.adb (Scan_ALI): Account for above change in data structure.
3206 2014-07-30 Vincent Celier <celier@adacore.com>
3208 * makeutl.adb (Insert_Project_Sources): When the library project
3209 is an aggregate Stand-Alone Library, insert in the queue the
3210 Ada interface units, with Closure set to True;
3212 2014-07-30 Eric Botcazou <ebotcazou@adacore.com>
3214 * sem_util.adb: Fix minor typo.
3215 * makeutl.adb: Minor reformatting.
3217 2014-07-30 Robert Dewar <dewar@adacore.com>
3219 * exp_ch7.adb, checks.adb, makeutl.adb, makeutl.ads: Minor reformatting.
3221 2014-07-30 Yannick Moy <moy@adacore.com>
3223 * checks.ads: Fix typo in comment.
3225 2014-07-30 Pierre-Marie Derodat <derodat@adacore.com>
3227 * sem_util.adb (Set_Debug_Info_Needed): For scalar types, recurse on
3228 entities that materialize range bounds, if any.
3230 2014-07-30 Vincent Celier <celier@adacore.com>
3232 * projects.texi: Minor spelling fix.
3234 2014-07-30 Hristian Kirtchev <kirtchev@adacore.com>
3236 * checks.adb (Make_Bignum_Block): Use the new secondary stack
3237 build routines to manage the mark.
3238 * exp_ch7.adb (Create_Finalizer, Expand_Cleanup_Actions):
3239 Use the new secodary stack build routines to manage the mark.
3240 (Insert_Actions_In_Scope_Around): Add new formal parameter
3241 Manage_SS along with comment on its usage. Code and comment
3242 reformatting. Mark and release the secondary stack when the
3243 context warrants it.
3244 (Make_Transient_Block): Update the call
3245 to Insert_Actions_In_Scope_Around to account for parameter Manage_SS.
3246 (Wrap_Transient_Declaration): Remove local variable
3247 Uses_SS. Ensure that the secondary stack is marked and released
3248 when the related object declaration appears in a library level
3249 package or package body. Code and comment reformatting.
3250 * exp_util.ads, exp_util.adb (Build_SS_Mark_Call): New routine.
3251 (Build_SS_Release_Call): New routine.
3253 2014-07-30 Steve Baird <baird@adacore.com>
3255 * exp_attr.adb: Revert previous change, not needed after all.
3257 2014-07-30 Vincent Celier <celier@adacore.com>
3259 * makeutl.adb (Queue.Insert_Project_Sources): Insert with
3260 Closure => True for interfaces of Stand-Alone Libraries.
3261 * makeutl.ads (Source_Info (Format => Gprbuild)): Add new
3262 Boolean component Closure, defaulted to False.
3264 2014-07-30 Yannick Moy <moy@adacore.com>
3266 * sem_res.adb: Fix typo in error message.
3268 2014-07-30 Robert Dewar <dewar@adacore.com>
3270 * sem_ch3.adb (Process_Range_Expr_In_Decl): Use _FIRST/_LAST
3271 as name suffixes rather than L/H for subtype bounds.
3272 * tbuild.ads: Minor comment improvements and fixes
3273 (Make_External_Name): Document that suffix can start with an
3276 2014-07-30 Bob Duff <duff@adacore.com>
3278 * gnat_ugn.texi: Document --rep-clauses switch.
3280 2014-07-30 Ed Schonberg <schonberg@adacore.com>
3282 * sem_ch13.adb (Analyze_Aspect_Specifications): Default_Value and
3283 Default_Component_Value can only be specified for scalar type or
3284 arrays of scalar types respectively. This legality check must
3285 be performed at the point the aspect is analyzed, in order to
3286 reject aspect specifications that apply to a partial view.
3288 2014-07-30 Thomas Quinot <quinot@adacore.com>
3290 * freeze.adb: Minor reformatting.
3292 2014-07-30 Robert Dewar <dewar@adacore.com>
3294 * exp_attr.adb (Expand_Attribute, case First/Last): Don't expand in
3297 2014-07-30 Ed Schonberg <schonberg@adacore.com>
3299 * freeze.adb (Check_Expression_Function): At the freeze point
3300 of an expression function, verify that the expression in the
3301 function does not contain references to any deferred constants
3302 that have no completion yet.
3303 (Freeze_Expression, Freeze_Before): call
3304 Check_Expression_Function.
3305 * a-ciorse.ads: Add Reference_Control_Type to detect tampering.
3306 * a-ciorse.adb: Add Adjust and Finalize routines for
3307 Reference_Control_Type. Use it in the construction of Reference
3308 and Constant_Reference values.
3310 2014-07-30 Robert Dewar <dewar@adacore.com>
3312 * exp_aggr.adb: Update comments.
3313 * a-chtgbo.adb, a-chtgbo.ads, a-cbhase.adb, a-cbhase.ads: Minor
3316 2014-07-30 Robert Dewar <dewar@adacore.com>
3318 * cstand.adb (New_Standard_Entity): New version takes name
3319 string to call Make_Name.
3320 (Create_Standard): Use this routine to set name before setting other
3323 2014-07-30 Robert Dewar <dewar@adacore.com>
3325 * exp_attr.adb (Expand_Attribute, case First): Rewrite simple
3327 (Expand_Attribute, case Last): Ditto.
3328 * exp_ch3.adb (Constrain_Index): New calling sequence for
3329 Process_Range_Expr_In_Decl.
3330 (Expand_N_Object_Declaration): Avoid setting Is_Known_Valid in one
3332 * sem_ch3.adb (Constrain_Index): New calling sequence for
3333 Process_Range_Expr_In_Decl.
3334 (Set_Scalar_Range_For_Subtype): ditto.
3335 (Process_Range_Expr_In_Decl): Create constants to hold bounds for
3337 * sem_ch3.ads (Process_Range_Expr_In_Decl): Add Subtyp parameter.
3338 * sem_eval.adb (Compile_Time_Compare): Make sure we use base
3339 types if we are not assuming no invalid values.
3341 2014-07-30 Robert Dewar <dewar@adacore.com>
3343 * clean.adb: Minor reformatting.
3344 * opt.ads: Minor fix to incorrect comment.
3346 2014-07-30 Ed Schonberg <schonberg@adacore.com>
3348 * a-chtgbo.ads, a-chtgbo.adb (Delete_Node_At_Index): New
3349 subprogram, used by bounded hashed sets, to delete a node at
3350 a given index, whose element may have been improperly updated
3351 through a Reference_Preserving key.
3352 * a-cbhase.ads: Add Reference_Control_Type to package Generic_Keys.
3353 * a-cbhase.adb: Add Adjust and Finalize routines for
3354 Reference_Control_Type.
3355 (Delete, Insert): Raise Program_Error, not Constraint_Error,
3356 when operation is illegal.
3357 (Reference_Preserving_Key): Build aggregate for Reference_Control_Type
3358 * a-cmbutr.ads: Add Reference_Control_Type to detect tampering. Add
3359 private with_clause for Ada.Finalization.
3360 * a-cbmutr.adb: Add Adjust and Finalize routines for
3361 Reference_Control_Type. Use it in the construction of Reference
3362 and Constant_Reference values.
3364 2014-07-30 Robert Dewar <dewar@adacore.com>
3366 * sem_ch3.adb, sem_ch3.ads: Minor code reorganization.
3368 2014-07-30 Pascal Obry <obry@adacore.com>
3370 * clean.adb (Clean_Project): Properly check for directory
3371 existence before trying to enter it.
3373 2014-07-30 Robert Dewar <dewar@adacore.com>
3375 * sem_ch3.ads, prj.ads, prj-nmsc.adb: Minor reformatting.
3377 2014-07-30 Robert Dewar <dewar@adacore.com>
3379 * par-ch5.adb (P_Sequence_Of_Statements): Properly handle
3380 missing semicolon after name.
3382 2014-07-30 Pascal Obry <obry@adacore.com>
3384 * prj.ads (Gprinstall_Flags): New constant.
3385 * prj-nmsc.adb (Check_Library_Attributes): Do not fails for
3386 missing library dir if Directories_Must_Exist_In_Projects
3389 2014-07-30 Bob Duff <duff@adacore.com>
3391 * a-except-2005.adb, a-except.adb: Remove obsolete comments.
3392 * s-traceb.ads: Updagte comments.
3394 2014-07-30 Robert Dewar <dewar@adacore.com>
3396 * checks.adb, a-cihase.adb, a-cihase.ads, a-chtgop.adb, a-chtgop.ads,
3397 a-except.adb, a-except-2005.adb, a-cborse.adb, a-cborse.ads,
3398 a-exexda.adb, a-elchha.adb, exp_aggr.adb, a-cohase.adb: Minor
3401 2014-07-30 Ed Schonberg <schonberg@adacore.com>
3403 * a-chtgop.ads, a-chtgop.adb (Delete_Node_At_Index): New
3404 subprogram, used by all versions of hashed sets, to delete a node
3405 whose element has been improperly updated through a Reference_
3407 * a-cohase.adb: Remove Delete_Node, use new common procedure
3408 Delete_Node_At_Index.
3409 * a-cihase.ads: Add Reference_Control_Type to package Generic_Keys.
3410 * a-cihase.adb: Add Adjust and Finalize routines for
3411 Reference_Control_Type.
3412 (Reference_Preserving_Key): Build aggregate for
3413 Reference_Control_Type
3415 2014-07-30 Yannick Moy <moy@adacore.com>
3417 * checks.adb, checks.ads (Determine_Range_R): New procedure to
3418 determine the possible range of a floating-point expression.
3420 2014-07-30 Ed Schonberg <schonberg@adacore.com>
3422 * a-cborse.ads: Add Reference_Control_Type to package Generic_Keys.
3423 * a-cborse.adb: Add Adjust and Finalize routines for
3424 Reference_Control_Type.
3425 (Reference_Preserving_Key): Build aggregate for
3426 Reference_Control_Type.
3427 (Delete): Check for tampering, and raise Program_Error (not
3428 Constraint_Error) when attempting to delete an element not in
3432 2014-07-30 Bob Duff <duff@adacore.com>
3434 * a-elchha.adb, a-except-2005.adb, a-except.adb, a-exexda.adb,
3435 * a-exextr.adb, a-exstat.adb, exp_intr.ads, s-tassta.adb:
3436 Exception_Information is used to produce useful debugging
3437 information for the programmer. However, it was also used to
3438 implement the stream attributes for type Exception_Occurrence. The
3439 latter requires a stable and portable interface, which meant
3440 that we couldn't include a symbolic traceback. A separate set of
3441 routines was used to provide symbolic tracebacks under program
3442 control (i.e. not automatically). The goal of this ticket is
3443 to provide such automatic tracebacks, so the change here is to
3444 split the two functionalities: Exception_Information gives the
3445 maximally useful information for debugging (i.e. it now includes
3446 a symbolic traceback when a decorator is set, and it can be
3447 improved freely in the future without disturbing streaming).
3448 Untailored_Exception_Information always uses hexadecimal addresses
3449 in the traceback, has a stable and portable output, and is now
3452 2014-07-30 Eric Botcazou <ebotcazou@adacore.com>
3454 * exp_aggr.adb (Expand_Array_Aggregate): Add missing test
3455 on the target of the assignment to find out whether it
3456 can be directly done by the back-end.
3457 * exp_util.adb (Is_Possibly_Unaligned_Slice): Remove obscure test.
3459 2014-07-30 Robert Dewar <dewar@adacore.com>
3461 * inline.adb, a-coorse.adb, a-coorse.ads, a-cohase.adb, a-cohase.ads,
3462 a-tasatt.adb: Minor reformatting.
3464 2014-07-30 Robert Dewar <dewar@adacore.com>
3466 * exp_ch4.adb: Minor reformatting.
3468 2014-07-30 Ed Schonberg <schonberg@adacore.com>
3470 * a-coorse.adb, a-coorse.ads (Generic_Keys): Add a
3471 Reference_Control_Type to generic package, to keep additional
3472 information for Reference_Types that manipulate keys. Add Adjust and
3473 Finalize procedures for this type.
3474 (Finalize): When finalizing a reference_preserving_key, verify
3475 that the key of the new value is equivalent to the key of the
3476 original element, raise Program_Error otherwise.
3477 (Insert): Detect tampering.
3478 (Reference_Preserving_Key): Build proper Reference_Control_Type,
3479 and update Busy and Lock bits to detect tampering.
3480 * a-cohase.ads: Keep with-clause private.
3482 2014-07-30 Hristian Kirtchev <kirtchev@adacore.com>
3484 * exp_ch4.adb (Expand_N_Op_Eq): Emit a warning when the operands
3485 of an equality are of an Unchecked_Union type and lack inferable
3488 2014-07-30 Bob Duff <duff@adacore.com>
3490 * g-exctra.adb, g-exctra.ads, s-exctra.adb, s-exctra.ads, Makefile.rtl,
3491 g-trasym.adb, g-trasym.ads, s-trasym.adb, s-trasym.ads: Move
3492 GNAT.Traceback.Symbolic and GNAT.Exception_Traces into the System
3493 hierarchy (System.Traceback.Symbolic and System.Exception_Traces), so
3494 we can call them from the runtimes. Leave renamings in place under GNAT.
3496 2014-07-30 Yannick Moy <moy@adacore.com>
3498 * inline.adb (Check_And_Build_Body_To_Inline): Include code for
3499 inlining in GNATprove mode.
3501 2014-07-30 Ed Schonberg <schonberg@adacore.com>
3503 * a-cohase.adb, a-cohase.ads (Generic_Keys): Add a
3504 Reference_Control_Type to generic package, to keep additional
3505 information for Reference_Types that manipulate keys. Add Adjust and
3506 Finalize procedures for this type.
3507 (Delete_Node): New procedure called when finalizing a
3508 Reference_Control_Type, to remove a node whose element has been
3509 improperly updated through a Reference.
3510 (Insert): Detect tampering.
3511 (Reference_Preserving_Key): Build proper Reference_Control_Type,
3512 and update Busy and Lock bits to detect tampering.
3514 2014-07-30 Bob Duff <duff@adacore.com>
3516 * exp_intr.ads: Minor comment fix.
3518 2014-07-30 Gary Dismukes <dismukes@adacore.com>
3520 * exp_prag.adb, a-tags.ads: Minor typo fixes.
3522 2014-07-30 Bob Duff <duff@adacore.com>
3524 * a-excach.adb, a-excach-cert.adb, a-except-2005.ads,
3525 a-except.ads, g-traceb.adb, memtrack.adb,
3526 s-traceb.adb, s-traceb.ads, s-traceb-hpux.adb, s-traceb-mastop.adb:
3527 Cleanup: Make the three versions of System.Traceback.Call_Chain
3528 have the same interface. Use an array for the Traceback parameter
3529 instead of an Address. This will enable reduction in code
3532 2014-07-30 Pat Rogers <rogers@adacore.com>
3534 * gnat_ugn.texi: Corrected minor textual error in description
3537 2014-07-30 Bob Duff <duff@adacore.com>
3539 * Makefile.rtl: Sort file names.
3541 2014-07-30 Arnaud Charlet <charlet@adacore.com>
3543 * a-tasatt.adb: Complete previous change: kill spurious warning
3544 on e.g. sparc, and make sure we only use the fast path when the
3545 alignment is compatible.
3547 2014-07-30 Yannick Moy <moy@adacore.com>
3549 * sem_ch6.adb (Analyze_Subprogram_Body_Helper): Mark new Spec_Id as
3552 2014-07-30 Yannick Moy <moy@adacore.com>
3554 * inline.adb (Build_Body_To_Inline): Issue more precise messages
3555 for declarations that prevent inlining.
3556 (Cannot_Inline): Change usual start of message to refer to contextual
3557 analysis in GNATprove mode.
3558 * sem_res.adb (Resolve_Call): Change usual start of message to
3559 refer to contextual analysis in GNATprove mode, when inlining
3562 2014-07-30 Robert Dewar <dewar@adacore.com>
3564 * sem_res.adb, sem_ch6.adb: Minor code reorganization.
3565 * inline.adb: Minor reformatting.
3567 2014-07-30 Javier Miranda <miranda@adacore.com>
3569 * a-tags.ads: Add comments.
3571 2014-07-30 Pat Rogers <rogers@adacore.com>
3573 * gnat_rm.texi: Minor word error.
3575 2014-07-30 Ed Schonberg <schonberg@adacore.com>
3577 * exp_prag.adb (Expand_Old): Insert declarationss of temporaries
3578 created to capture the value of the prefix of 'Old at the
3579 beginning of the current declarative part, to prevent data flow
3580 anomalies in the postcondition procedure that will follow.
3582 2014-07-30 Yannick Moy <moy@adacore.com>
3584 * debug.adb: Retire debug flag -gnatdQ.
3585 * inline.adb (Can_Be_Inlined_In_GNATprove_Mode): Check SPARK_Mode
3586 on decl, not on body. Ignore predicate functions.
3587 * sem_ch6.adb (Analyze_Subprogram_Body_Helper): Remove use of
3588 debug flag -gnatdQ. Correctly analyze SPARK_Mode on decl and
3589 body when generating a decl for a body on which SPARK_Mode aspect
3591 * sem_prag.adb (Analyze_Pragma|SPARK_Mode): Reorder tests for
3592 attaching pragma to entity, to account for declaration not coming
3594 * sem_res.adb (Resolve_Call): Issue warning and flag subprogram
3595 as not always inlined in GNATprove mode, when called in an
3598 2014-07-30 Vincent Celier <celier@adacore.com>
3600 * debug.adb: Minor comment update.
3602 2014-07-30 Robert Dewar <dewar@adacore.com>
3604 * s-tasuti.adb, s-tassta.adb: Minor reformatting.
3605 * sprint.adb (Sprint_Node): Handle N_Contract case.
3606 * exp_prag.adb: Minor reformatting.
3607 * freeze.adb (Freeze_Entity): Check useless postcondition for
3608 No_Return subprogram.
3609 * sem_prag.adb: Minor reformatting.
3611 2014-07-30 Javier Miranda <miranda@adacore.com>
3613 * a-tags.ads: Complete comments about performance.
3615 2014-07-30 Fedor Rybin <frybin@adacore.com>
3617 * gnat_ugn.texi: Adding description for --exit-status option to
3618 gnattest section. Fixing index entry of --passed-tests option
3619 in gnattest section.
3621 2014-07-30 Javier Miranda <miranda@adacore.com>
3623 * Makefile.rtl, gnat_rm.texi, i-cpp.adb, i-cpp.ads, impunit.adb,
3624 rtsfind.ads: Remove references to package Interfaces.CPP since this
3625 package is no longer needed.
3627 2014-07-30 Bob Duff <duff@adacore.com>
3629 * s-taasde.adb (Timer_Queue): Don't use a
3630 build-in-place function call to initialize the Timer_Queue.
3631 * s-traent.adb, s-traent.ads, s-traent-vms.adb, s-traent-vms.ads:
3632 Turn off polling in these units, because otherwise we get
3633 elaboration circularities with Ada.Exceptions when the -gnatP
3635 * s-tassta.adb (Create_Task): Make sure independent tasks
3636 are created with Parent = Environment_Task. This was not true,
3637 for example, in s-interr.adb, when Interrupt_Manager does "new
3638 Server_Task"; the Server_Task had Parent = Interrupt_Manager,
3639 which is wrong because the master is determined by the access
3640 type, which is at library level.
3641 * s-tasuti.adb (Make_Independent): Avoid setting Parent; it is
3642 now set correctly by Create_Task.
3643 (Make_Passive): Remove the workaround for the race condition in
3645 * frontend.adb (Frontend): Revert to previous method of detecting
3646 temporary configuration pragma files, recognizing such files by
3647 ".tmp" in the name. This is more general than detecting pragmas
3648 Source_File_Name_Project, because it allows any tool to use
3649 this naming convention, no matter the content of the file.
3650 * gnat_ugn.texi: Document this naming convention.
3652 2014-07-30 Robert Dewar <dewar@adacore.com>
3654 * exp_ch7.adb, s-tataat.adb, s-tataat.ads, s-parame-vms-alpha.ads,
3655 inline.adb, s-parame-hpux.ads, exp_smem.adb, s-tasini.adb,
3656 s-tasini.ads, s-parame-vms-ia64.ads, s-parame.ads, s-taskin.ads,
3657 s-parame-vxworks.ads, a-tasatt.adb, a-tasatt.ads: Minor reformatting.
3658 * a-suenco.adb (Convert): Handle overlong encodings in UTF8-UTF8
3661 2014-07-30 Ed Schonberg <schonberg@adacore.com>
3663 * sem_ch5.adb: Improve error recovery.
3664 * inline.adb (Build_Body_To_Inline): Set Full_Analysis to false
3665 before analyzing the body, so that in GNATprove mode there is
3666 no light expansion. Whatever expansion is required by SPARK will
3667 be performed when analysing the inlined code.
3669 2014-07-30 Bob Duff <duff@adacore.com>
3671 * s-tataat.adb, s-tataat.ads, a-tasatt.adb: Minor comment fixes.
3673 2014-07-30 Ed Schonberg <schonberg@adacore.com>
3675 * sem_ch5.adb (Analyze_Loop_Statement): If loop has a label,
3676 verify that it is not hidden by an inner implicit declaration.
3678 2014-07-30 Thomas Quinot <quinot@adacore.com>
3680 * sem.ads (Scope_Table_Entry): New component Locked_Shared_Objects.
3681 * sem_ch8.adb (Push_Scope): Initialize Locked_Shared_Objects.
3682 * exp_smem.adb (Add_Shared_Var_Lock_Procs): Handle the case where
3683 the call returns an unconstrained type: in this case there is
3684 already a transient scope, and we should not establish a new one.
3685 * exp_ch7.adb (Insert_Actions_In_Scope_Around): New formal Clean. If
3686 True, also insert cleanup actions in the tree.
3687 (Wrap_Transient_Declaration): Call Insert_Actions_In_Scope_Around
3688 with Clean set True.
3690 2014-07-30 Arnaud Charlet <charlet@adacore.com>
3692 * s-taskin.ads (Direct_Index, Direct_Index_Range,
3693 Direct_Attribute_Element, Direct_Attribute_Array,
3694 Direct_Index_Vector, Direct_Attributes, Is_Defined,
3695 Indirect_Attributes): Removed. (Atomic_Address,
3696 Attribute_Array, Attributes): New.
3697 * s-tasini.ads, s-tasini.adb (Proc_T, Initialize_Attributes,
3698 Finalize_Attributes_Link, Initialize_Attributes_Link): Removed.
3699 (Finalize_Attributes): Reimplement.
3700 * s-tassta.adb (Create_Task): Remove call to
3701 Initialize_Attributes_Link (Free_Task, Vulnerable_Free_Task):
3702 Replace Finalize_Attributes_Link by Finalize_Attributes.
3703 * a-tasatt.ads, a-tasatt.adb, s-tataat.ads, s-tataat.adb:
3704 Reimplement from scratch, using a simpler and more efficient
3706 * s-tporft.adb (Register_Foreign_Thread): Remove now obsolete comment.
3707 * s-parame.ads, s-parame-hpux.ads,
3708 * s-parame-vms-alpha.ads, s-parame-vms-ia64.ads,
3709 * s-parame-vxworks.ads (Max_Attribute_Count): New, replace
3710 Default_Attribute_Count.
3712 2014-07-30 Olivier Hainque <hainque@adacore.com>
3714 * vxworks-ppc-link.spec: New file. Extra link
3715 instructions for ppc-vxworks.
3716 * vxworks-crtbe-link.spec: Likewise, for ZCX related support.
3717 * system-vxworks-ppc.ads: Adjust linker options to use spec files.
3718 * system-vxworks-arm.ads: Likewise.
3719 * gcc-interface/Makefile.in: Enable .spec files.
3721 2014-07-30 Ed Schonberg <schonberg@adacore.com>
3723 * sem_aggr.adb: Minor comment reformatting.
3725 2014-07-30 Robert Dewar <dewar@adacore.com>
3727 * sem_util.ads, sem_util.adb (Is_Junk_Name): Removed.
3728 * sem_warn.adb (Has_Junk_Name): New function
3729 (Check_References): Use Has_Junk_Name to delete junk warnings
3730 (Check_Unset_Reference): ditto.
3731 (Warn_On_Unreferenced_Entity): ditto.
3732 (Warn_On_Useless_Assignment): ditto.
3734 2014-07-30 Ed Schonberg <schonberg@adacore.com>
3736 * checks.adb (Insert_Valid_Check): Do not check for the packed
3737 array type of a prefix that is an access type.
3739 2014-07-30 Ed Schonberg <schonberg@adacore.com>
3741 * sem_attr.adb (Eval_Attribute): Evaluate the GNAT attribute
3742 Unconstrained_Array even if prefix is not frozen yet, as can
3743 occur with a private subtype used as a generic actual.
3745 2014-07-30 Gary Dismukes <dismukes@adacore.com>
3747 * sem_attr.adb: Minor reformatting.
3749 2014-07-30 Pat Rogers <rogers@adacore.com>
3751 * gnat_rm.texi: Corrected minor wording error in description
3752 of No_Exception_Registration.
3754 2014-07-30 Yannick Moy <moy@adacore.com>
3756 * einfo.ads, einfo.adb: New flag Is_Inlined_Always for use in GNATprove
3757 mode. Realphabetize two subprograms.
3758 * inline.adb (Cannot_Inline): Use Is_Inlined_Always in GNATprove mode.
3759 (Can_Be_Inlined_In_GNATprove_Mode): Adapt to possible Empty Body_Id.
3760 (Check_And_Build_Body_To_Inline): Use Is_Inlined_Always in GNATprove
3762 (Expand_Inline_Call): Use Is_Inlined_Always in GNATprove mode.
3763 * sem_ch6.adb (Analyze_Subprogram_Body_Helper): Do not use
3764 Is_Inline in GNATprove mode.
3765 (Analyze_Subprogram_Specification):
3766 Set Is_Inlined_Always at subprogram entity creation.
3767 * sem_res.adb (Resolve_Call): Do not deal with inlining during
3768 pre-analysis. Issue warning on call to possibly inlined
3769 subprogram when body not seen.
3771 2014-07-30 Yannick Moy <moy@adacore.com>
3773 * lib-xref.adb (Generate_Reference): Add special
3774 case for compiler-generated formals in GNATprove mode.
3776 2014-07-30 Yannick Moy <moy@adacore.com>
3778 * sem_ch6.adb: Add comments.
3780 2014-07-30 Thomas Quinot <quinot@adacore.com>
3782 * s-os_lib.ads (GM_Time_Of): Clarify documentation.
3784 2014-07-30 Robert Dewar <dewar@adacore.com>
3786 * sem_aggr.adb, sem_res.adb: Minor reformatting.
3788 2014-07-30 Thomas Quinot <quinot@adacore.com>
3790 * sem_ch13.adb (Analyze_Attribute_Definition_Clause, case
3791 Bit_Order): Set Reverse_Bit_Order on the base type of the
3792 specified first subtype.
3794 2014-07-30 Ed Schonberg <schonberg@adacore.com>
3796 * inline.adb (Expand_Inlined_Call): Use a renaming declaration
3797 to capture the value of actuals of a limited type rather than
3798 an object declaration, to prevent spurious errors when analyzing
3801 2014-07-30 Ed Schonberg <schonberg@adacore.com>
3803 * sem_ch4.adb (Analyze_Type_Conversion): Treat an inlined body
3804 as an instance, and inhibit semantic checks on already analyzed
3805 code to prevent spurious errors.
3807 2014-07-30 Arnaud Charlet <charlet@adacore.com>
3809 * a-exctra.ads ("="): New function, to restore compatibility.
3811 2014-07-30 Pascal Obry <obry@adacore.com>
3813 * adaint.c (__gnat_to_os_time): Set isdst to -1 for the mktime
3814 routine to use the OS dst setting.
3816 2014-07-30 Pat Rogers <rogers@adacore.com>
3818 * gnat_ugn.texi: Minor correction to description of -gnatw.K.
3820 2014-07-30 Ed Schonberg <schonberg@adacore.com>
3822 * sem_util.adb (Wrong_Type): Disable some checks equally within
3823 instances and within inlined bodies, to suppress spurious type
3824 errors on already analyzed code.
3825 * sem_aggr.adb (Check_Expr_OK_In_Limited_Aggregate): Expression
3826 is legal in an inlined body, juts as it is in an instance body.
3828 2014-07-30 Ed Schonberg <schonberg@adacore.com>
3830 * sem_res.adb (Resolve_Unchecked_Conversion): Within an inlined
3831 body the operand of an unchecked conversion may be a literal, in
3832 which case its type is the target type of the conversion. This
3833 is in contrast to conversions in other contexts, where the
3834 operand cannot be a literal and must be resolvable independent
3837 2014-07-30 Pierre-Marie Derodat <derodat@adacore.com>
3839 * gcc-interface/decl.c (gnat_to_gnu_entity) <object>: Create a
3840 mere scalar constant instead of a reference for a renaming of
3842 * gcc-interface/utils.c (renaming_from_generic_instantiation_p): New.
3843 * gcc-interface/gigi.h (renaming_from_generic_instantiation_p): New.
3845 2014-07-30 Robert Dewar <dewar@adacore.com>
3847 * s-tasuti.adb, s-tasuti.ads, einfo.ads, sem_prag.adb, s-taasde.adb,
3848 g-socthi-vms.adb, s-taprop-mingw.adb, s-interr.adb, s-interr-hwint.adb,
3849 g-decstr.adb, s-tasdeb-vms.adb, g-expect-vms.adb, makeutl.adb,
3850 s-interr-vms.adb, g-socthi.adb, exp_aggr.adb, s-tasdeb.adb,
3851 g-awk.adb, gnatls.adb, s-taspri-posix.ads, g-catiio.adb,
3852 s-interr-sigaction.adb, s-os_lib.adb, s-fileio.adb: Minor reformatting
3853 & code reorganization.
3855 2014-07-30 Bob Duff <duff@adacore.com>
3857 * s-tassta.adb, sem_util.ads: Minor reformatting.
3859 2014-07-30 Yannick Moy <moy@adacore.com>
3861 * inline.adb (Build_Body_To_Inline): Detect when
3862 subprogram has multiple returns, or not a single last return
3863 statement, in GNATprove mode.
3864 (Cannot_Inline): Simplify logic to handle case of GNATprove
3867 2014-07-30 Ed Schonberg <schonberg@adacore.com>
3869 * sem_ch6.adb: Stubs are not subject to inlining.
3871 2014-07-30 Bob Duff <duff@adacore.com>
3873 * s-tasuti.ads, s-tasuti.adb (Make_Independent): Change this
3874 from a procedure to a function, so that it can more easily be
3875 called before the "begin" of a task.
3876 * s-taasde.ads (Delay_Block): Make this type immutably limited,
3877 so we can use a build-in-place function call to initialize
3878 Timer_Queue in the body.
3879 * a-rttiev.adb, s-asthan-vms-alpha.adb, s-asthan-vms-ia64.adb,
3880 * s-interr.adb, s-interr-hwint.adb, s-interr-sigaction.adb,
3881 * s-interr-vms.adb, s-taasde.adb: Each independent task now calls
3882 Make_Independent before reaching its "begin", to avoid race
3883 conditions. This causes the activating task to wait until after
3884 Make_Independent is complete before proceeding. In addition,
3885 we initialize data structures used by independent tasks before
3886 activating those tasks, to avoid possible use of uninitialized data.
3887 * s-interr.ads, s-intman.ads, s-taspri-posix.ads, s-tasdeb.ads:
3888 Minor comment fixes.
3890 2014-07-30 Bob Duff <duff@adacore.com>
3892 * a-exctra.ads, s-traent-vms.ads, s-traent.ads (Tracebacks_Array): Move
3893 the declaration of Tracebacks_Array from Ada.Exceptions.Traceback to
3894 System.Traceback_Entries (s-traent.ads and s-traent-vms.ads). Add
3895 subtypes renaming Tracebacks_Array in Ada.Exceptions.Traceback.
3896 * g-debpoo.adb: Refer to Tracebacks_Array in its new home.
3898 2014-07-30 Arnaud Charlet <charlet@adacore.com>
3900 * a-tasatt.adb: Remove old comments.
3902 2014-07-30 Yannick Moy <moy@adacore.com>
3904 * einfo.ads (Is_Inlined): Document new use in GNATprove mode.
3905 * inline.adb (Can_Be_Inlined_In_GNATprove_Mode): Add comments
3906 to explain rationale for inlining or not in GNATprove mode.
3907 (Expand_Inlined_Call): In GNATprove mode, set Is_Inlined flag
3908 to False when inlining is not possible.
3909 * sem_ch6.adb (Analyze_Subprogram_Body_Helper): Set Is_Inlined
3910 flag to indicate that subprogram is fully inlined. To be reversed
3911 if inlining problem is found.
3912 * sem_res.adb (Resolve_Call): Set Is_Inlined flag to False when
3913 call in potentially unevaluated context.
3915 2014-07-30 Jose Ruiz <ruiz@adacore.com>
3917 * s-tarest.adb, s-tarest.ads: Fix comments.
3919 2014-07-30 Robert Dewar <dewar@adacore.com>
3921 * exp_attr.adb, checks.adb, sem_util.adb, sem_util.ads, sem_attr.adb:
3922 Change No_Scalar_Parts predicate to Scalar_Part_Present and
3923 invert sense of test. This avoids the "not No_xxx" situation
3924 which is always ugly.
3926 2014-07-30 Ed Schonberg <schonberg@adacore.com>
3928 * inline.adb (Expand_Inlined_Call): When generating code for
3929 an internal subprogram the expansion uses the location of the
3930 call, so that gdb can skip over it. In GNATprove mode we want to
3931 preserve slocs of original subprogram when expanding an inlined
3932 call, to obtain better warnings, even though subprogram appears
3933 not to come from source if it is the inlining of a subprogram
3934 body without a previous spec.
3936 2014-07-30 Eric Botcazou <ebotcazou@adacore.com>
3938 * exp_aggr.adb (Aggr_Assignment_OK_For_Backend): Reject array
3939 types with atomic components.
3941 2014-07-30 Thomas Quinot <quinot@adacore.com>
3943 * Make-generated.in: Remove now unnecessary targets after s-oscons
3946 2014-07-30 Yannick Moy <moy@adacore.com>
3948 * sem_res.adb (Resolve_Call): Use ultimate alias
3949 of callee when available.
3951 2014-07-30 Ed Schonberg <schonberg@adacore.com>
3953 * sem_ch6.adb (Analyze_Expression_Function): To check whether
3954 an expression function is a completion, use the specification of
3955 the previous declaration, not its entity, which may be internally
3956 generated in an inlined context.
3958 2014-07-30 Doug Rupp <rupp@adacore.com>
3960 * adaint.c (__gnat_tmp_name) [__ANDROID__]: Default to putting
3961 temp files in /cache directory unless overridden by TMPDIR.
3963 2014-07-30 Jose Ruiz <ruiz@adacore.com>
3965 * s-tassta.adb, s-tarest.adb (Initialize, Create_Task,
3966 Create_Restricted_Task): Remove redundant check. Number_Of_CPUs returns
3967 type CPU, so it can never be greater than CPU_Range'Last.
3969 2014-07-30 Bob Duff <duff@adacore.com>
3971 * s-taskin.ads: Minor comment fix.
3973 2014-07-30 Thomas Quinot <quinot@adacore.com>
3975 * g-socket.adb: Remove now useless WITH, USE, and USE TYPE
3978 2014-07-30 Yannick Moy <moy@adacore.com>
3980 * debug.adb: Free debug flag dQ used for frontend inlining in
3982 * sem_ch6.adb (Analyze_Subprogram_Body_Helper): Remove test of
3985 2014-07-30 Thomas Quinot <quinot@adacore.com>
3987 * Make-generated.in: Remove generation of s-oscons.ads, only
3988 generate the xoscons utility, in runtime-agnostic rules.
3989 * gcc-interface/Makefile.in: Clean up rules. Remove VMS parts,
3990 no longer supported.
3992 2014-07-30 Bob Duff <duff@adacore.com>
3994 * exp_ch6.adb (Add_Task_Actuals_To_Build_In_Place_Call): New
3995 parameter Chain to be used in the allocator case.
3996 (Make_Build_In_Place_Call_In_Allocator): If the allocated object
3997 has tasks, wrap the code in a block that will activate them,
3998 including the usual finalization code to kill them off in case
3999 of exception or abort.
4001 2014-07-30 Robert Dewar <dewar@adacore.com>
4003 * treepr.adb, treepr.ads; Reorganize documentation for new pp routines
4004 Remove renamings (don't work for gdb).
4005 (par): New synonym for p (avoid gdb ambiguities).
4006 * inline.adb, sem_ch6.adb, sem_ch13.adb: Minor reformatting.
4008 2014-07-30 Bob Duff <duff@adacore.com>
4010 * exp_ch9.ads, sem_prag.adb, exp_ch4.adb, sem_ch13.adb: Minor comment
4012 * treepr.ads, treepr.adb (ppp): Make this debugging routine
4013 accept any type covered by Union_Id.
4015 2014-07-30 Robert Dewar <dewar@adacore.com>
4017 * sem_ch4.adb (Analyze_If_Expression): Resolve condition before
4019 * sem_eval.adb (Out_Of_Range): Check for statically unevaluated
4022 2014-07-30 Robert Dewar <dewar@adacore.com>
4024 * sem_ch13.adb (Analyze_Aspect, predicate cases): Diagnose use
4025 of predicate aspect on entity other than a type.
4027 2014-07-30 Ed Schonberg <schonberg@adacore.com>
4029 * sem_ch6.adb (Body_Has_Contract): New predicate to determine
4030 when a subprogram body without a previous spec cannot be inlined
4031 in GNATprove mode, because it includes aspects or pragmas that
4032 generate a SPARK contract clause.
4033 * inline.adb (Can_Be_Inlined_In_GNATprove_Mode): A subprogram
4034 instance cannot be inlined.
4036 2014-07-30 Robert Dewar <dewar@adacore.com>
4038 * debug.adb: Document that d7 suppresses compilation time output.
4039 * errout.adb (Write_Header): Include compilation time in
4041 * exp_intr.adb (Expand_Intrinsic_Call): Add
4042 Compilation_Date/Compilation_Time (Expand_Source_Info): Expand
4043 Compilation_Date/Compilation_Time.
4044 * g-souinf.ads (Compilation_Date): New function
4045 (Compilation_Time): New function.
4046 * gnat1drv.adb (Gnat1drv): Set Opt.Compilation_Time.
4047 * gnat_rm.texi (Compilation_Date): New function
4048 (Compilation_Time): New function.
4049 * opt.ads (Compilation_Time): New variable.
4050 * s-os_lib.ads, s-os_lib.adb (Current_Time_String): New function.
4051 * sem_intr.adb (Compilation_Date): New function.
4052 (Compilation_Time): New function.
4053 * snames.ads-tmpl (Name_Compilation_Date): New entry.
4054 (Name_Compilation_Time): New entry.
4056 2014-07-30 Yannick Moy <moy@adacore.com>
4058 * inline.adb: Add comment.
4060 2014-07-30 Ed Schonberg <schonberg@adacore.com>
4062 * par-ch4.adb (Is_Parameterless_Attribute): 'Result is a
4063 parameterless attribute, and a postondition can mention an
4064 indexed component or a slice whose prefix is an attribute
4067 2014-07-30 Robert Dewar <dewar@adacore.com>
4069 * sprint.adb (Sprint_Node_Actual, case Object_Declaration):
4070 Avoid bomb when printing package Standard.
4072 2014-07-30 Ed Schonberg <schonberg@adacore.com>
4074 * sem_elab.adb (Check_Internal_Call_Continue): If an elaboration
4075 entity is created at this point, ensure that the name of the
4076 flag is unique, because the subprogram may be overloaded and
4077 other homonyms may also have elaboration flags created on the fly.
4079 2014-07-30 Hristian Kirtchev <kirtchev@adacore.com>
4081 * sem_attr.adb (Analyze_Array_Component_Update): New routine.
4082 (Analyze_Attribute): Major cleanup of attribute
4083 'Update. The logic is now split into two distinct routines
4084 depending on the type of the prefix. The use of <> is now illegal
4085 in attribute 'Update.
4086 (Analyze_Record_Component_Update): New routine.
4087 (Check_Component_Reference): Removed.
4088 (Resolve_Attribute): Remove the return statement and ??? comment
4089 following the processing for attribute 'Update. As a result,
4090 the attribute now freezes its prefix.
4092 2014-07-30 Javier Miranda <miranda@adacore.com>
4094 * exp_ch4.adb (Apply_Accessibility_Check): Do
4095 not call Base_Address() in VM targets.
4097 2014-07-30 Yannick Moy <moy@adacore.com>
4099 * gnat1drv.adb (Adjust_Global_Switches): Set
4100 Ineffective_Inline_Warnings to True in GNATprove mode.
4101 * inline.adb (Cannot_Inline): Prepare new semantics for GNATprove
4103 * opt.ads (Ineffective_Inline_Warnings): Add comment that
4104 describes use in GNATprove mode.
4105 * sem_prag.adb (Analyze_Pragma|SPARK_Mode): Ignore
4106 pragma when applied to the special body created for inlining.
4108 2014-07-30 Robert Dewar <dewar@adacore.com>
4110 * inline.adb, exp_ch4.adb, sinput.adb, sem_ch6.adb, sem_ch13.adb:
4113 2014-07-30 Hristian Kirtchev <kirtchev@adacore.com>
4115 * aspects.ads Add a comment explaining why SPARK 2014 aspects are
4116 not delayed. Update the delay status of most SPARK 2014 aspects.
4117 * sem_ch13.adb (Analyze_Aspect_Specifications): Update all calls
4118 to Decorate_Aspect_And_Pragma and Insert_Delayed_Pragma to refert
4119 to Decorate and Insert_Pragma. Add various comments concerning
4120 the delay status of several SPARK 2014 aspects. The insertion
4121 of Refined_State now uses routine Insert_After_SPARK_Mode.
4122 (Decorate): New routine.
4123 (Decorate_Aspect_And_Pragma): Removed.
4124 (Insert_Delayed_Pragma): Removed.
4125 (Insert_Pragma): New routine.
4127 2014-07-30 Ed Schonberg <schonberg@adacore.com>
4129 * inline.adb (Expand_Inlined_Call): In GNATprove mode, emit
4130 only a warning, not an error on an attempt to inline a recursive
4133 2014-07-30 Robert Dewar <dewar@adacore.com>
4135 * g-forstr.adb: Minor code reorganization (use J rather than I
4136 as a variable name).
4137 * gnat_rm.texi, sem_prag.adb, sem_util.adb, sem_ch13.adb,
4138 g-forstr.ads: Minor reformatting.
4140 2014-07-30 Eric Botcazou <ebotcazou@adacore.com>
4142 * sprint.adb (Set_Debug_Sloc): Also reset the end location if
4143 we are debugging the generated code.
4145 2014-07-30 Yannick Moy <moy@adacore.com>
4147 * sinput.ads, sinput.adb (Comes_From_Inlined_Body): New function that
4148 returns True for source pointer for an inlined body.
4150 2014-07-30 Javier Miranda <miranda@adacore.com>
4152 * exp_ch4.adb (Apply_Accessibility_Check): Add
4153 missing calls to Base_Address().
4155 2014-07-30 Ed Schonberg <schonberg@adacore.com>
4157 * sem_ch6.adb (Hanalyze_Subprogram_Body_Helper): In GNATprove
4158 mode, subprogram bodies without a previous declaration are also
4159 candidates for front-end inlining.
4161 2014-07-30 Hristian Kirtchev <kirtchev@adacore.com>
4163 * aspects.ads Aspects Async_Readers, Async_Writers,
4164 Effective_Reads and Effective_Writes do not need to be delayed.
4165 * sem_ch13.adb (Analyze_Aspect_Specifications): Propagate the
4166 optional Boolean expression when generating the corresponding
4167 pragma for an external property aspect.
4168 * sem_prag.adb (Analyze_External_Property_In_Decl_Part): Remove
4169 local constant Obj. Add local constant Obj_Id. Reimplement the
4170 check which ensures that the related variable is in fact volatile.
4171 (Analyze_Pragma): Reimplement the analysis of external property pragmas.
4172 * sem_util.adb (Is_Enabled): New routine.
4173 (Variable_Has_Enabled_Property): Reimplement the detection of
4174 an enabled external property.
4176 2014-07-30 Sergey Rybin <rybin@adacore.com frybin>
4178 * gnat_ugn.texi, vms_data.ads: gnatstub: describe generating subunits
4181 2014-07-30 Pascal Obry <obry@adacore.com>
4183 * g-forstr.adb, g-forstr.ads: New.
4184 * gnat_rm.texi, impunit.adb Makefile.rtl: Add new unit
4185 GNAT.Formatted_String.
4187 2014-07-30 Eric Botcazou <ebotcazou@adacore.com>
4189 * exp_aggr.adb (Aggr_Assignment_OK_For_Backend): New predicate.
4190 (Expand_Array_Aggregate): Also enable in-place expansion for
4191 code generated by the compiler. For an object declaration,
4192 set the kind of the object in addition to its type. If an
4193 in-place assignment is to be generated and it can be directly
4194 done by the back-end, do not expand the aggregate.
4195 * fe.h (Is_Others_Aggregate): Declare.
4196 * gcc-interface/trans.c
4197 (gnat_to_gnu) <N_Assignment_Statement>: Add support for an
4198 aggregate with a single Others choice on the RHS by means of
4199 __builtin_memset. Tidy up.
4201 2014-07-30 Ed Schonberg <schonberg@adacore.com>
4203 * gnat_rm.texi: minor reformatting.
4205 2014-07-30 Yannick Moy <moy@adacore.com>
4207 * sem_ch6.adb (Analyze_Subprogram_Helper_Body): Remove body to inline
4210 2014-07-30 Robert Dewar <dewar@adacore.com>
4212 * gnat_rm.texi: Document additional implementation-defined use
4215 2014-07-30 Robert Dewar <dewar@adacore.com>
4217 * prj-proc.adb, prj-strt.adb: Update comments.
4219 2014-07-30 Gary Dismukes <dismukes@adacore.com>
4221 * sinfo.ads, einfo.ads, checks.ads: Minor typo fix and reformatting.
4223 2014-07-30 Vincent Celier <celier@adacore.com>
4225 * prj-proc.adb (Imported_Or_Extended_Project_From): New Boolean
4226 parameter No_Extending, defaulted to False. When No_Extending
4227 is True, do not look for an extending project.
4228 (Expression): For a variable reference that is not for the current
4229 project, get its Id calling Imported_Or_Extended_Project_From
4230 with No_Extending set to True.
4231 * prj-strt.adb (Parse_Variable_Reference): If a referenced
4232 variable is not found in the current project, check if it is
4233 defined in one of the projects it extends.
4235 2014-07-30 Robert Dewar <dewar@adacore.com>
4237 * sem_util.adb (Predicate_Tests_On_Arguments): Omit tests for
4238 some additional cases of internally generated routines.
4240 2014-07-30 Ed Schonberg <schonberg@adacore.com>
4242 * sem_ch10.adb (Analyze_Proper_Body): When compiling for ASIS,
4243 if the compilation unit is a subunit, extend optional processing
4244 to all subunits of the current one. This allows gnatstub to
4245 supress generation of spurious bodies.
4247 2014-07-30 Hristian Kirtchev <kirtchev@adacore.com>
4249 * a-cbmutr.adb (Insert_Child): Use local variable First to keep
4250 track of the initial element's index within the tree.
4252 2014-07-29 Hristian Kirtchev <kirtchev@adacore.com>
4254 * a-cbmutr.adb (Allocate_Node): Remove the two parameter version.
4255 (Insert_Child): Add local variable First. Capture the index of the
4256 first node being created to ensure correct cursor construction
4257 later on. Use the three parameter version of Allocate_Node
4258 when creating multiple children as this method allows aspect
4259 Default_Value to take effect (if applicable).
4261 2014-07-29 Eric Botcazou <ebotcazou@adacore.com>
4263 * exp_aggr.adb (Safe_Slice_Assignment): Remove.
4264 (Expand_Array_Aggregate): For a safe slice assignment, just set
4265 the target and use the common code path.
4267 2014-07-29 Robert Dewar <dewar@adacore.com>
4269 * sem_util.adb, sem_util.ads, sem_res.adb, exp_ch6.adb: Invert
4270 predicate No_Predicate_Test_On_Arguments, new name is
4271 Predicate_Tests_On_Arguments (with the opposite sense).
4273 2014-07-29 Hristian Kirtchev <kirtchev@adacore.com>
4275 * sem_attr.adb (Resolve_Attribute): Clean up the code for
4276 attribute 'Access. Do not generate an elaboration flag for a
4277 stand alone expression function. The expression of an expression
4278 function is now frozen when the expression function appears as
4279 the prefix of attribute 'Access.
4280 * sem_ch6.adb (Analyze_Expression_Function): Remove local
4281 variable New_Decl and update all references to it after the
4282 rewriting has taken place. Establish the linkages between the
4283 generated spec and body.
4285 2014-07-29 Robert Dewar <dewar@adacore.com>
4287 * sem_prag.adb (ip, rv): Prevent from being optimized away.
4288 * gnatls.adb (gnatls): Set E_Fatal exit status if ali file not found.
4289 * s-imgllb.adb, s-imgllw.adb, s-imgwiu.adb, s-imgbiu.adb: Minor
4292 2014-07-29 Vincent Celier <celier@adacore.com>
4294 * prj-pp.adb: Minor comment update.
4295 * frontend.adb: If a target dependency info file has been read
4296 through switch -gnateT= add it to the dependencies of the source
4299 2014-07-29 Robert Dewar <dewar@adacore.com>
4301 * sem_ch3.adb, prj.adb: Minor reformatting.
4303 2014-07-29 Vincent Celier <celier@adacore.com>
4305 * prj-pp.adb (Pretty_Print.Output_Project_File): New
4306 procedure to output project file names between quotes without
4307 concatenation, even if the line is too long.
4308 (Pretty_Print): Use Output_Project_File for project being extended and
4311 2014-07-29 Vincent Celier <celier@adacore.com>
4313 * gnat_ugn.texi: Document that configuration pragmas files are
4314 added to the dependencies, unless they contain only pragmas
4315 Source_File_Name_Project.
4317 2014-07-29 Robert Dewar <dewar@adacore.com>
4319 * frontend.adb: Minor reformatting.
4321 2014-07-29 Robert Dewar <dewar@adacore.com>
4323 * exp_ch6.adb (Add_Call_By_Copy_Code): Minor reformatting
4324 (Expand_Actuals): Make sure predicate checks are properly applied
4325 for the case of OUT or IN OUT parameters.
4326 * sem_res.adb: Minor reformatting (Resolve_Actuals): Skip
4327 predicate tests on arguments for Finalize
4328 * sem_util.adb (No_Predicate_Test_On_Arguments): Returns True
4329 if predicate tests on subprogram arguments should be skipped.
4330 * sem_util.ads (No_Predicate_Test_On_Arguments): New function
4332 2014-07-29 Ed Schonberg <schonberg@adacore.com>
4334 * sem_ch3.adb (Analyze_Object_Declaration): If there is an address
4335 clause for the object and the expression is an aggregate, defer
4336 resolution and expansion of the aggregate until the freeze point
4338 * sem_aggr.adb (Resolve_Aggregate): An others_clause is legal if
4339 the parent node is an N_Reference generated during expansion.
4341 2014-07-29 Vincent Celier <celier@adacore.com>
4343 * prj.adb (Add_To_Buffer): Effectively double the size of the buffer.
4345 2014-07-29 Robert Dewar <dewar@adacore.com>
4347 * frontend.adb, inline.adb, sem_util.adb, sem_res.adb,
4348 prepcomp.ads: Minor reformatting and code clean up.
4349 * exp_ch6.adb (Expand_Actuals): Generate predicate test
4350 unconditionally for case of OUT or IN OUT actual (before this
4351 was generated only for certain subcases, which is wrong, the
4352 test is always needed).
4354 2014-07-29 Ed Schonberg <schonberg@adacore.com>
4356 * sem_ch3.adb: Move Has_Defaulted_Discriminants to sem_util.
4357 * sem_ch4.adb (Analyze_Allocator): Defer resolution of expression
4358 until context type is available.
4359 * sem_res.adb (Resolve_Allocator): In the case of a qualified
4360 expression, complete resolution of expression.
4361 (Check_Aliased_Parameter): New procedure within Resolve_Actuals,
4362 to apply Ada2012 checks on aliased formals, as well as
4363 accesibility checks when the context of the call is an allocator
4364 or a qualified expression.
4365 * sem_util.ads, sem_util.adb (Has_Defaulted_Discriminants):
4366 Moved here from sem_ch3.
4367 (Object_Access_Level): Handle properly aliased formals and
4369 * exp_ch6.adb (Expand_Call): Remove check on aliased parameters,
4370 now properly performed in sem_res (Resolve_Actuals,
4371 Check_Aliased_Parameter).
4373 2014-07-29 Yannick Moy <moy@adacore.com>
4375 * debug.adb Enable GNATprove inlining under debug flag -gnatdQ for now.
4376 * inline.ads, inline.adb (Can_Be_Inlined_In_GNATprove_Mode): New
4377 function to decide when a subprogram can be inlined in GNATprove mode.
4378 (Check_And_Build_Body_To_Inline): Include GNATprove_Mode as a
4379 condition for possible inlining.
4380 * sem_ch10.adb (Analyze_Compilation_Unit): Remove special case
4381 for Inline_Always in GNATprove mode.
4382 * sem_ch6.adb (Analyze_Subprogram_Body_Helper): Build inlined
4383 body for subprograms in GNATprove mode, under debug flag -gnatdQ.
4384 * sem_prag.adb Minor change in comments.
4385 * sem_res.adb (Resolve_Call): Only perform GNATprove inlining
4386 inside subprograms marked as SPARK_Mode On.
4387 * sinfo.ads: Minor typo fix.
4389 2014-07-29 Vincent Celier <celier@adacore.com>
4391 * frontend.adb: Add dependency on gnat.adc when taken into account
4392 and on non-temporary configuration pragmas files specified in
4394 * prepcomp.ads, prepcomp.adb (Add_Dependency): New procedure to add
4395 dependencies on configuration pragmas files.
4397 2014-07-29 Pat Rogers <rogers@adacore.com>
4399 * gnat_ugn.texi: Minor clarification to the explanation for the
4402 2014-07-29 Robert Dewar <dewar@adacore.com>
4404 * types.ads (Mechanism_Type): Change range back to -18 .. Int'Last with
4405 documentation that explains the need for this extended range
4406 (use by C_Pass_By_Copy).
4408 2014-07-29 Robert Dewar <dewar@adacore.com>
4410 * gnat_rm.texi, sem_prag.adb: Minor reformatting.
4412 2014-07-29 Sergey Rybin <rybin@adacore.com frybin>
4414 * gnat_ugn.texi: gnatmetric: clarify documentation for cyclomatic
4417 2014-07-29 Thomas Quinot <quinot@adacore.com>
4420 * s-oscons-tmplt.c: For Linux, define _BSD_SOURCE in order for
4421 CRTSCTS to be visible.
4423 2014-07-29 Bob Duff <duff@adacore.com>
4425 * g-trasym.adb, g-trasym.ads: Code cleanup.
4427 2014-07-29 Doug Rupp <rupp@adacore.com>
4429 * sigtramp-vxworks.c: Minor reformatting.
4431 2014-07-29 Ed Schonberg <schonberg@adacore.com>
4433 * gnat_rm.texi: No doc needed for Ada2012 aspect
4434 Implicit_dereference.
4436 2014-07-29 Robert Dewar <dewar@adacore.com>
4438 * sem_attr.adb (Attribute_12): New array
4439 (Analyze_Attribute): Check impl-defined Ada 2012 attributes.
4440 (Check_Ada_2012_Attribute): Removed.
4442 2014-07-29 Doug Rupp <rupp@adacore.com>
4444 * init.c (vxworks6): Call sigtramp for RTP (as well as DKM) for ARM,
4446 * sigtramp-vxworks.c: New file.
4447 * sigtramp-armvxw.c, sigtramp-ppcvxw.c: removed files.
4449 2014-07-29 Ed Schonberg <schonberg@adacore.com>
4451 * lib-xref.adb (Output_Refs, Check_Type_Reference): For a
4452 derived array type, add information about component type, which
4453 was previously missing in ali file.
4454 * gnat_rm.texi: Add documentation for Atomic_Always_Lock_Free.
4456 2014-07-29 Thomas Quinot <quinot@adacore.com>
4458 * sem_ch3.adb (Constrain_Corresponding_Record): For the case
4459 of the subtype created for a record component, do not mark
4460 the subtype as frozen. For one thing, this is anomalous (in
4461 particular, the base type might not itself be frozen yet);
4462 furthermore, proper freezing of the subtype must happen in any
4463 case. So, we just mark the subtype as requiring delayed freezing
4464 (and we'll actually freeze it when generating the init_proc of
4465 the enclosing record).
4466 Also change the name of the constrained record subtype (append a
4467 'C' so that it is clearly different from the unconstrained record
4468 type, "related_idV") to make debugging easier.
4469 (Process_Full_View): When creating a full subtype for a pending
4470 private subtype, re-establish the scope of the private subtype
4471 so that we get proper visibility on outer discriminants.
4472 * exp_ch3.adb (Build_Init_Statements): Freeze any component
4473 subtype that is not frozen yet.
4475 2014-07-29 Vincent Celier <celier@adacore.com>
4477 * prj-proc.adb (Recursive_Process): Always initialize the
4478 environment when the project is an aggregate project, even when
4479 it is not the root tree.
4480 2014-07-29 Robert Dewar <dewar@adacore.com>
4482 * exp_ch5.adb, exp_ch9.adb: Minor comment additions.
4483 * gnat_rm.texi: Complete list of implementation aspects.
4484 * aspects.ads: Minor comment clarification.
4486 2014-07-29 Ed Schonberg <schonberg@adacore.com>
4488 * exp_ch5.adb (Expand_N_Assignment_Statement): If the target type
4489 is a null-excluding access type, do not generate a constraint
4490 check if Suppress_Assignment_Checks is set on assignment node.
4491 * exp_ch9.adb (Build_Simple_Entry_Call): If actual is an out
4492 parameter of a null-excluding access type, there is access check
4493 on entry, so set Suppress_Assignment_Checks on generated statement
4494 that assigns actual to parameter block.
4495 * sinfo.ads: Document additional use of Suppress_Assignment_Checks.
4497 2014-07-29 Robert Dewar <dewar@adacore.com>
4499 * gnat_rm.texi: Change theta to @ in documentation of aspect
4502 2014-07-29 Robert Dewar <dewar@adacore.com>
4504 * sem_attr.adb (Uneval_Old_Msg): Flags Uneval_Old_Accept/Warn
4506 * sem_ch13.adb (Analyze_Aspect_Specifications): Remove setting
4508 * sem_prag.adb (Analyze_Pragma): Set Uneval_Old_* flags
4509 * sinfo.ads, sinfo.adb: Move Uneval_Old_Accept/Warn to N_Pragma node.
4511 2014-07-29 Javier Miranda <miranda@adacore.com>
4513 * types.ads Update documentation on how to add new reason codes
4515 (RT_Exception_Code): Keep values ordered by their
4516 reason code. Required by the .NET backend.
4517 (RT_CE_Exceptions): Subtype declaration removed.
4518 (RT_PE_Exceptions): Subtype declaration removed.
4519 (RT_SE_Exceptions): Subtype declaration removed.
4520 (Kind): New mapping table of RT_Exception_Codes.
4521 * exp_ch11.adb (Get_RT_Exception_Entity): Updated to use the
4523 * tbuild.adb (Make_Raise_Storage_Error): Updated to use the new
4524 mapping table. (Make_Raise_Program_Error): Updated to use the
4526 (Make_Raise_Storage_Error): Updated to use the new mapping table.
4527 * a-except.adb Keep Rcheck_CE_xxx entities ordered according to
4530 2014-07-29 Thomas Quinot <quinot@adacore.com>
4532 * gnat_rm.texi: Document internal attributes used for PolyORB/DSA
4533 distributed stubs generation.
4534 * exp_ch3.adb: Minor reformatting.
4536 2014-07-29 Yannick Moy <moy@adacore.com>
4538 * sinfo.ads: Document constraint between frontend and GNATprove.
4540 2014-07-29 Robert Dewar <dewar@adacore.com>
4542 * a-except.adb: Minor comment clarification.
4544 2014-07-29 Robert Dewar <dewar@adacore.com>
4546 * gnat_rm.texi: Complete list of implementation attributes.
4547 * snames.ads-tmpl: Clean up list of impl-defined attributes.
4549 2014-07-29 Hristian Kirtchev <kirtchev@adacore.com>
4551 * freeze.adb (Freeze_Record_Type): Perform various
4552 volatility-related checks.
4554 2014-07-29 Robert Dewar <dewar@adacore.com>
4556 * sem_ch3.adb, sem_eval.adb: Minor reformatting.
4558 2014-07-29 Ed Schonberg <schonberg@adacore.com>
4560 * sem_attr.adb: sem_attr.adb (Access_Attribute): Handle properly
4561 the case where the attribute reference appears in a nested scope
4562 from that of the subprogram prefix.
4563 * sem_attr.adb: Minor reformatting.
4565 2014-07-29 Robert Dewar <dewar@adacore.com>
4567 * gnat_ugn.texi: Clarify documentation of Initialize_Scalar
4568 initialization options.
4570 2014-07-29 Robert Dewar <dewar@adacore.com>
4572 * sinfo.ads: Minor comment addition.
4574 2014-07-29 Bob Duff <duff@adacore.com>
4576 * sem_eval.adb, sem_ch13.adb: Minor reformatting.
4578 2014-07-29 Doug Rupp <rupp@adacore.com>
4580 * init.c: Complete previous change.
4582 2014-07-29 Robert Dewar <dewar@adacore.com>
4584 * exp_ch4.adb (Expand_N_If_Expression): Deal with unconstrained
4587 2014-07-29 Ed Schonberg <schonberg@adacore.com>
4589 * sem_attr.adb (Access_Attribute): If the prefix is a subprogram
4590 and the completion will appear in the same declarative part,
4591 create elaboration flag.
4592 * exp_util.adb (Set_Elaboration_Flag): If the subprogram body
4593 is a completion of a declaration in the same declarative part,
4594 and the subprogram has had its address taken, add elaboration
4595 check inside the subprogram body, to detect elaboration errors
4596 that may occur through indirect calls.
4598 2014-07-29 Doug Rupp <rupp@adacore.com>
4600 * sigtramp-armvxw.c: Enhance to handle RTP trampolining.
4601 * init.c: Remove guard on sigtramp for ARM VxWorks RTP.
4603 2014-07-29 Vincent Celier <celier@adacore.com>
4605 * switch-c.adb (Scan_Front_End_Switches): Do not fail when two
4606 runtime directorie specified with two switches --RTS= designate
4607 the same directory, even when there are no literarily the same.
4609 2014-07-29 Robert Dewar <dewar@adacore.com>
4611 * gnat_ugn.texi: Minor documentation clarification.
4612 * switch-c.adb: Minor reformatting.
4614 2014-07-29 Robert Dewar <dewar@adacore.com>
4616 * sem_prag.adb (Analyze_Pragma, case Allow_Integer_Address):
4617 Fix incorrect RTE call which caused bomb if pragma was in
4618 configuration pragma file.
4620 2014-07-29 Jerome Lambourg <lambourg@adacore.com>
4622 * expect.c (__gnat_expect_poll): Fix typo in previous change.
4623 * g-expect.adb: Update comments.
4625 2014-07-29 Arnaud Charlet <charlet@adacore.com>
4627 * s-parame-hpux.ads, s-parame-vms-ia64.ads, s-parame.ads
4628 (Default_Attribute_Count): Bump to 16 on native platforms.
4630 2014-07-29 Ed Schonberg <schonberg@adacore.com>
4632 * sem_res.adb: Add guard to front-end inlining for SPARK.
4634 2014-07-29 Robert Dewar <dewar@adacore.com>
4636 * sem_ch10.adb, debug.adb, sem_prag.adb, sem_res.adb, sem_ch6.adb:
4639 2014-07-29 Ed Schonberg <schonberg@adacore.com>
4641 * sem_ch6.adb (Analyze_Subprogram_Body_Helper): Build body to
4642 inline in GNATprove mode when subprogran is marked Inline_Always.
4643 * sem_res.adb (Resolve_Call): Expand call in place in GNATProve
4644 mode if body to inline is available.
4645 * sem_prag.adb (Analyze_Pragma, case Inline_Always): Make pragma
4646 effective in GNATprove mode.
4647 * sem_ch10.adb (Analyze_Compilation_Unit): Call
4648 Check_Package_Body_For_Inlining in GNATprove mode, so that body
4649 containing subprograms with Inline_Always can be available before
4652 2014-07-29 Ed Schonberg <schonberg@adacore.com>
4654 * inline.ads, inline.adb, sem_ch10.adb: Rename Check_Body_For_Inlining
4655 to Check_Package_Body_For_Inlining, to prevent confusion with other
4656 inlining subprograms.
4658 2014-07-29 Robert Dewar <dewar@adacore.com>
4660 * opt.ads: Minor comment update.
4661 * sem_attr.adb (Uneval_Old_Msg): Deal with case of aspect, where
4662 we want setting of Uneval_Old at time of encountering the aspect.
4663 * sem_ch13.adb (Analyze_Aspect_Specifications): Capture setting
4665 * sinfo.adb (Uneval_Old_Accept): New function (Uneval_Old_Warn):
4666 New function (Set_Uneval_Old_Accept): New procedure.
4667 (Set_Uneval_Old_Warn): New procedure.
4668 * sinfo.ads: Uneval_Old_Accept: New flag Uneval_Old_Warn: New flag.
4670 2014-07-29 Robert Dewar <dewar@adacore.com>
4672 * sinfo.ads, inline.adb, inline.ads, sem_ch6.adb: Minor reformatting.
4673 * snames.ads-tmpl: Minor reformatting.
4674 * xsnamest.adb (XSnamesT): Remove special casing of Name_Error
4675 to give <Error>. Not clear why this was there, but the compiler
4676 sources do not reference Name_Error, and this interfered with
4677 the circuits for pragma Unevaluated_Use_Of_Old.
4679 2014-07-29 Hristian Kirtchev <kirtchev@adacore.com>
4681 * sem_prag.adb (Process_Atomic_Shared_Volatile): Allow volatile
4682 types in SPARK 2014 (again).
4683 * sem_res.adb (Is_OK_Volatile_Context): New routine.
4684 (Resolve_Entity_Name): Ensure that a volatile object with
4685 enabled properties Async_Writers or Effectire_Reads appears in
4686 a non-interfering context.
4688 2014-07-29 Ed Schonberg <schonberg@adacore.com>
4690 * sem_ch6.adb: Move Build_Body_To_Inline,
4691 Check_And_Buid_Body_To_Inline, and Cannot_Inline to package Inline.
4692 * exp_ch6.adb: Mode Expand_Inlined_Body to package Inline.
4693 * inline.ads, inline.adb: Package now contains subprograms that
4694 implement front-end inlining. No functional changes, no test
4697 2014-07-29 Robert Dewar <dewar@adacore.com>
4699 * exp_dbug.adb, g-expect.adb, sem_elab.adb: Minor typo fix.
4701 2014-07-29 Ed Schonberg <schonberg@adacore.com>
4703 * sem_ch6.adb (Analyze_Return_Type): Reject a return type that
4704 is a limited view when the context is a package body, because
4705 there is no subsequent place at which the non-limited view may
4707 (Process_Formals): Ditto.
4708 * sinfo.ads, par-ch3.adb: Minor reformatting.
4710 2014-07-29 Jerome Lambourg <lambourg@adacore.com>
4712 * expect.c (__gnat_expect_poll): New parameter dead_process
4713 used to return the dead process among the array of file
4714 descriptors. The Windows, VMS and HPUX implementations now
4715 properly report the dead process via this parameter. Other unixes
4717 * g-expect.adb (Poll): Adapt to the C profile.
4718 (Expect_Internal): Use the new parameter to properly close the
4719 File Descriptor. This then can be properly reported by the
4720 function First_Dead_Process as is expected.
4722 2014-07-29 Robert Dewar <dewar@adacore.com>
4724 * gnat_ugn.texi: Minor clarification of -gnatQ switch.
4726 2014-07-29 Robert Dewar <dewar@adacore.com>
4728 * einfo.adb (Derived_Type_Link): New function
4729 (Set_Derived_Type_Link): New procedure.
4730 (Write_Field31_Name): Output Derived_Type_Link.
4731 * einfo.ads: New field Derived_Type_Link.
4732 * exp_ch6.adb (Expand_Call): Warn if change of representation
4734 * sem_ch13.adb: Minor addition of ??? comment.
4735 (Rep_Item_Too_Late): Warn on case that is legal but could cause an
4736 expensive implicit conversion.
4737 * sem_ch3.adb (Build_Derived_Type): Set Derived_Type_Link if needed.
4739 2014-07-29 Hristian Kirtchev <kirtchev@adacore.com>
4741 * exp_ch3.adb (Build_Init_Procedure): Renamed Local_DF_Id
4742 to DF_Id. Add new local variable DF_Call. Do not perform any
4743 elaboration-related checks on the call to the partial finalization
4744 routine within an init proc to avoid generating bogus elaboration
4745 warnings on expansion-related code.
4746 * sem_elab.adb (Check_A_Call): Move constant Access_Case to
4747 the top level of the routine. Ensure that Output_Calls takes
4748 into account flags -gnatel and -gnatwl when emitting warnings
4750 (Check_Internal_Call_Continue): Update the call to Output_Calls.
4751 (Elab_Warning): Moved to the top level of routine Check_A_Call.
4752 (Emit): New routines.
4753 (Output_Calls): Add new formal parameter Check_Elab_Flag along with a
4754 comment on usage. Output all warnings or info messages only when the
4755 caller context demands it and the proper elaboration flag is set.
4757 2014-07-29 Yannick Moy <moy@adacore.com>
4759 * sem_attr.adb (Analyze_Attribute/Attribute_Old):
4760 Check rule about Old appearing in potentially unevaluated
4761 expression everywhere, not only in Post.
4763 2014-07-29 Arnaud Charlet <charlet@adacore.com>
4765 * sem_prag.adb: Update comment.
4766 * a-except.adb, a-except-2005.adb: Minor editing.
4768 2014-07-29 Pierre-Marie Derodat <derodat@adacore.com>
4770 * exp_dbug.adb (Debug_Renaming_Declaration):
4771 Do not create renaming entities for renamings of non-packed
4772 objects and for exceptions.
4774 2014-07-29 Robert Dewar <dewar@adacore.com>
4776 * sem_ch3.adb, sinfo.ads, types.ads, sem_prag.adb, a-except-2005.adb,
4777 sem_ch6.adb, par-ch3.adb: Minor reformatting.
4779 2014-07-29 Ed Schonberg <schonberg@adacore.com>
4781 * sem_ch6.adb (Check_Return_Subtype_Indication): Reject a return
4782 subtype indication in an extended return statement when the
4783 return value is an ancestor of the return type of the function,
4784 and that return type is a null record extension.
4786 2014-07-29 Thomas Quinot <quinot@adacore.com>
4788 * sem_ch13.adb (Rep_Item_Too_Late): Specialize/clarify error
4789 message produced for the case of a type-related representation
4790 item that is made illegal by 13.10(1).
4791 * gnat_rm.texi (Scalar_Storage_Order): Minor change in
4794 2014-07-29 Robert Dewar <dewar@adacore.com>
4796 * gnat_ugn.texi: Add section on Wide_Wide_Character encodings.
4797 * erroutc.adb (Output_Error_Msgs): Take wide characters into
4798 account in computing position of error flags.
4799 * sinput.adb (Get_Column_Number): Take wide characters into
4802 2014-07-29 Ed Schonberg <schonberg@adacore.com>
4804 * par-ch3.adb (P_Access_Type_Definition): The subtype indication
4805 in an access type definition can carry a null_exclusion indicator.
4806 * sem_ch3.adb (Access_Type_Declaration): If the subtype indication
4807 carries a null_exclusion indicator, verify that the subtype
4808 indication denotes an access type, and create a null-excluding
4810 * sinfo.ads, sinfo.adb: New attribute Null_Excluding_Subtype,
4811 defined on N_Access_To_Object_Definition to indicate that the
4812 subtype indication carries a null_exclusion indicator.
4814 2014-07-29 Hristian Kirtchev <kirtchev@adacore.com>
4816 * exp_ch6.adb (Add_Extra_Actual): Do not construct
4817 the extra actual by name, generate a reference instead.
4819 2014-07-29 Arnaud Charlet <charlet@adacore.com>
4821 * sem_prag.adb (Analyze_Pragma): Do not crash analyzing
4822 Allow_Integer_Address if already set.
4823 * a-except-2005.adb (Rcheck_PE_Stream_Operation_Not_Allowed):
4824 Fix order, for consistency with Rmsg_xx declarations.
4826 2014-07-29 Ed Schonberg <schonberg@adacore.com>
4828 * sem_ch4.adb (Complete_Object_Operation): If the type of the
4829 candidate subprogram is a limited view, use non-limited view
4832 2014-07-29 Robert Dewar <dewar@adacore.com>
4834 * sem_ch13.adb: Minor change in RM reference.
4835 * sem_mech.ads: Minor reformatting.
4836 * einfo.ads: Minor comment fix.
4837 * types.ads: Minor correction to range given for Mechanism_Type.
4838 * exp_ch6.adb (Add_Invariant_And_Predicate_Checks): Do not
4839 check predicate on way out for OUT or IN OUT parameters.
4840 * par-ch3.adb (P_Constraint_Opt): Handle missing RANGE keyword
4841 better (P_Range_Constraint): Corresponding fix.
4842 * checks.ads: Minor comment clarification.
4844 2014-07-29 Gary Dismukes <dismukes@adacore.com>
4846 * sem_ch8.adb (Analyze_Object_Renaming): Set the Is_Volatile
4847 and Treat_As_Volatile flags based on whether the renamed object
4848 is a volatile object.
4850 2014-07-29 Olivier Hainque <hainque@adacore.com>
4853 (Default_Alignment): Rename as Storage_Alignment. This is not
4854 a "default" that can be overriden. Augment comment to clarify
4855 intent and document why we need to manage alignment padding.
4856 (Header_Offset): Set to Header'Object_Size instead of 'Size
4857 rounded up to Storage_Alignment. Storage_Alignment on the
4858 allocation header is not required by our internals so was
4859 overkill. 'Object_Size is enough to ensure proper alignment
4860 of the header address when substracted from a storage address
4861 aligned on Storage_Alignment.
4862 (Minimum_Allocation): Rename as Extra_Allocation, conveying that
4863 this is always added on top of the incoming allocation requests.
4864 (Align): New function, to perform alignment rounding operations.
4865 (Allocate): Add comments on the Storage_Address computation
4866 scheme and adjust so that the alignment padding applies to that
4867 (Storage_Address) only.
4869 2014-07-29 Robert Dewar <dewar@adacore.com>
4871 * exp_ch3.adb (Default_Initialize_Object): Remove incorrect
4872 pragma Unreferenced.
4873 * cstand.adb (Create_Standard): Use E_Array_Type for standard
4874 string types. Make sure index of Any_String/Any_Array is in a list.
4875 * errout.adb: Minor reformatting.
4877 2014-07-29 Robert Dewar <dewar@adacore.com>
4879 * gnat_ugn.texi: Clean up and correct documentation of warnings.
4880 * usage.adb: Minor corrections to make sure warnings are properly
4882 * warnsw.adb (Set_Warning_Switch): Remove redundant return statement.
4883 (WA_Warnings): Add Warn_On_Suspicious_Modulus_Value.
4885 2014-07-29 Ed Schonberg <schonberg@adacore.com>
4887 * exp_ch3.adb (Expand_N_Object_Declaration): The dummy block
4888 created to match internal sequence numbers between compilations
4889 with/without abort must have its type properly set.
4891 2014-07-29 Robert Dewar <dewar@adacore.com>
4893 * ali.adb (Initialize_ALI): Initialize SSO_Default_Specified
4894 (Scan_ALI): Set SSO_Default in ALIs_Record (Scan_ALI): Set
4895 SSO_Default_Specified.
4896 * ali.ads (ALIs_Record): Add field SSO_Default
4897 (SSO_Default_Specified): New global switch.
4898 * bcheck.adb (Check_Consistent_SSO_Default): New procedure
4899 (Check_Configuration_Consistency): Call this procedure
4900 * einfo.adb (SSO_Set_High_By_Default): New
4901 function (SSO_Set_Low_By_Default): New function
4902 (Set_SSO_Set_High_By_Default): New procedure
4903 (Set_SSO_Set_Low_By_Default): New procedure (Write_Entity_Flags):
4905 * einfo.ads (SSO_Set_Low_By_Default): New flag
4906 (SSO_Set_High_By_Default): New flag
4907 * freeze.adb (Set_SSO_From_Default): New procedure
4908 (Freeze_Array_Type): Call Set_SSO_From_Default
4909 (Freeze_Record_Type): Call Set_SSO_From_Default
4910 * gnat_rm.texi: Document pragma Default_Scalar_Storage_Order
4911 * lib-writ.adb (Write_ALI): Set OL/OH in P line as needed
4912 * lib-writ.ads: Add OL/OH parameters to P line
4913 * opt.adb: Set Default_SSO, Default_SSO_Config as appropriate
4914 * opt.ads (Default_SSO): New global switch (Default_SSO_Config):
4916 * repinfo.adb (List_Scalar_Storage_Order): List SSO when it is
4917 set by default using pragma Default_Scalar_Storage_Order.
4918 * sem.ads (Scope_Stack_Entry): Add component Save_Default_SSO
4919 * sem_ch13.adb (Inherit_Delayed_Rep_Aspects):
4920 Clear SSO defaults when explicit SSO is inherited.
4921 (Analyze_Attribute_Definition_Clause): Clear SSO defaults when
4922 explicit SSO is specified.
4923 (Inherit_Aspects_At_Freeze_Point):
4924 Clear SSO default when inheriting SSO.
4925 * sem_ch3.adb (Set_Default_SSO): New procedure
4926 (Analyze_Private_Extension_Declaration): Set defualt SSO
4927 (Array_Type_Declaration): ditto (Build_Derived_Array_Type): ditto
4928 (Build_Derived_Private_Type): ditto (Build_Derived_Record_Type):
4929 ditto (Build_Derived_Type): ditto (Make_Class_Wide_Type): ditto
4930 (Record_Type_Declaration): ditto
4931 * sem_ch8.adb (Pop_Scope): Restore Default_SSO (Push_Scope):
4933 * sem_prag.adb (Analyze_Pragma, case
4934 Default_Scalar_Storage_Order): Set Default_SSO
4936 2014-07-29 Ed Schonberg <schonberg@adacore.com>
4938 * sem_ch6.adb (Valid_Operator_Definition): Verify that
4939 all parameter have mode IN. This check must be done here for
4940 subprogram instantiations that have operator names, because their
4941 analysis does not follow the same path as that for subprogram
4944 2014-07-29 Robert Dewar <dewar@adacore.com>
4946 * freeze.adb (Freeze_Entity, Concurrent_Type case): Add a guard
4947 to make sure that the Etype of a component of the corresponding
4948 record type is present before trying to freeze it.
4949 * sem_ch5.adb: Minor reformatting.
4951 2014-07-29 Robert Dewar <dewar@adacore.com>
4953 * exp_attr.adb, types.ads, types.h, exp_ch11.adb, a-except.adb,
4954 a-except-2005.adb: Add new reason code PE_Stream_Operation_Not_Allowed,
4955 and then use it when a stream operation is used from a library generic
4956 when the restriction (No_Streams) is active.
4958 2014-07-29 Thomas Quinot <quinot@adacore.com>
4960 * projects.texi: Fix minor typo.
4962 2014-07-29 Yannick Moy <moy@adacore.com>
4964 * sem_attr.adb (Analyze_Attribute): Fix generation of warning.
4966 2014-07-29 Arnaud Charlet <charlet@adacore.com>
4968 * sem_ch5.adb (Check_Unreachable_Code): Do not remove code in
4971 2014-07-29 Hristian Kirtchev <kirtchev@adacore.com>
4973 * exp_ch7.adb (Find_Last_Init): Add local variable
4974 Deep_Init_Found. Check the statement immediately following the
4975 declaration if [Deep_]Initialization was not found.
4977 2014-07-29 Hristian Kirtchev <kirtchev@adacore.com>
4979 * exp_util.adb (Is_Aliased): It appears that
4980 'reference-d and renamed objects still play some role in Boolean
4981 expression with actions and cannot be finalized immediately.
4983 2014-07-29 Ed Schonberg <schonberg@adacore.com>
4985 * exp_dbug.adb (Qualify_Needed): For debugging purposes,
4986 Loop names are not part of the full qualification of entity names.
4988 2014-07-29 Robert Dewar <dewar@adacore.com>
4990 * einfo.adb (Has_Protected): Test base type.
4991 * sem_ch4.adb (Analyze_Allocator): Reorganize code to make sure
4992 that we always properly check No_Protected_Type_Allocators.
4994 2014-07-29 Ed Schonberg <schonberg@adacore.com>
4996 * sem_util.ads, sem_util.adb (Defining_Entity): Now applies to
4997 loop declarations as well.
4998 * exp_ch5.adb (Expand_Loop_Statement): Apply Qualify_Entity_Names
4999 to an iterator loop, because it may contain local renaming
5000 declarations that require debugging information.
5002 2014-07-29 Robert Dewar <dewar@adacore.com>
5004 * sem_util.ads, exp_util.adb, sem_attr.adb: Minor reformatting.
5006 2014-07-29 Robert Dewar <dewar@adacore.com>
5008 * einfo.ads, einfo.adb (Static_Real_Or_String_Predicate): New function
5009 (Set_Static_Real_Or_String_Predicate): New procedure
5010 * sem_ch13.adb (Build_Predicate_Functions): Accomodate static
5011 string predicates (Is_Predicate_Static): Handle static string
5013 * sem_eval.adb (Real_Or_String_Static_Predicate_Matches):
5014 New procedure (Check_Expression_Against_Static_Predicate):
5015 Deal with static string predicates, now fully implemented
5016 (Eval_Relational_Op): Allow string equality/inequality as static
5017 if not comes from source.
5019 2014-07-29 Robert Dewar <dewar@adacore.com>
5021 * sem_aggr.adb, exp_ch5.adb, sem_ch5.adb, exp_util.adb, einfo.adb,
5022 einfo.ads, sem_util.adb, sem_attr.adb, sem_case.adb, sem_eval.adb,
5023 sem_eval.ads, sem_ch13.adb: General cleanup of static predicate
5024 handling. Change name of Discrete_Predicate to
5025 Discrete_Static_Predicate, and replace testing of the presence of this
5026 field by testing the flag Has_Static_Expression.
5028 2014-07-29 Robert Dewar <dewar@adacore.com>
5030 * gnat_rm.texi: Document pragma Unevaluated_Use_Of_Old.
5031 * opt.adb: Handle Uneval_Old.
5032 * opt.ads (Uneval_Old, Uneval_Old_Config): New variables.
5033 * par-prag.adb: Add dummy entry for pragma Unevaluated_Use_Of_Old.
5034 * sem.ads (Save_Uneval_Old): New field in Scope_Stack_Entry.
5035 * sem_attr.adb (Uneval_Old_Msg): New procedure.
5036 * sem_ch8.adb (Push_Scope): Save Uneval_Old.
5037 (Pop_Scope): Restore Uneval_Old.
5038 * sem_prag.adb (Analyze_Pragma, case Unevaluated_Use_Of_Old):
5040 * snames.ads-tmpl: Add entries for pragma Unevaluated_Use_Of_Old
5041 Add entries for Name_Warn, Name_Allow.
5043 2014-07-29 Robert Dewar <dewar@adacore.com>
5045 * sem_aggr.adb (Resolve_Array_Aggregate): Change Is_Static_Range
5046 to Is_OK_Static_Range.
5047 * sem_attr.adb (Eval_Attribute): Make sure we properly flag
5048 static attributes (Eval_Attribute, case Size): Handle size of
5049 zero properly (Eval_Attribute, case Value_Size): Handle size of
5051 * sem_ch13.adb: Minor reformatting.
5052 * sem_ch3.adb (Process_Range_Expr_In_Decl): Change
5053 Is_Static_Range to Is_OK_Static_Range.
5054 * sem_eval.adb (Eval_Case_Expression): Total rewrite, was
5055 wrong in several ways (Is_Static_Range): Moved here from spec
5056 (Is_Static_Subtype): Moved here from spec Change some incorrect
5057 Is_Static_Subtype calls to Is_OK_Static_Subtype.
5058 * sem_eval.ads: Add comments to section on
5059 Is_Static_Expression/Raises_Constraint_Error (Is_OK_Static_Range):
5060 Add clarifying comments (Is_Static_Range): Moved to body
5061 (Is_Statically_Unevaluated): New function.
5062 * sem_util.ads, sem_util.adb (Is_Preelaborable_Expression): Change
5063 Is_Static_Range to Is_OK_Static_Range.
5064 * sinfo.ads: Additional commments for Is_Static_Expression noting
5065 that clients should almost always use Is_OK_Static_Expression
5066 instead. Many other changes throughout front end units to obey
5068 * tbuild.ads, tbuild.adb (New_Occurrence_Of): Set Is_Static_Expression
5069 for enumeration literal.
5070 * exp_ch5.adb, sem_intr.adb, sem_ch5.adb, exp_attr.adb, exp_ch9.adb,
5071 lib-writ.adb, sem_ch9.adb, einfo.ads, checks.adb, checks.ads,
5072 sem_prag.adb, sem_ch12.adb, freeze.adb, sem_res.adb, exp_ch4.adb,
5073 exp_ch6.adb, sem_ch4.adb, sem_ch6.adb, exp_aggr.adb, sem_cat.adb:
5074 Replace all occurrences of Is_Static_Expression by
5075 Is_OK_Static_Expression.
5077 2014-07-29 Hristian Kirtchev <kirtchev@adacore.com>
5079 * exp_ch4.adb (Process_Transient_Object): Remove constant
5080 In_Cond_Expr, use its initialization expression in place.
5081 * exp_ch7.adb (Process_Declarations): There is no need to check
5082 that a transient object being hooked is controlled as it would
5083 not have been hooked in the first place.
5084 * exp_util.adb (Is_Aliased): 'Reference-d or renamed transient
5085 objects are not considered aliased when the related context is
5086 a Boolean expression_with_actions.
5087 (Requires_Cleanup_Actions): There is no need to check that a transient
5088 object being hooked is controlled as it would not have been hooked in
5091 2014-07-29 Robert Dewar <dewar@adacore.com>
5093 * errout.adb: Minor reformatting.
5095 2014-07-29 Hristian Kirtchev <kirtchev@adacore.com>
5097 * exp_ch3.adb (Default_Initialize_Object): Add new variables
5098 Abrt_Blk and Dummy. Generate a dummy temporary when aborts are
5099 not allowed to ensure the symmetrical generation of symbols.
5100 * exp_ch7.adb (Build_Object_Declarations): Remove variables A_Expr
5101 and E_Decl. Add new variables Decl and Dummy. Generate a dummy
5102 temporary when aborts are not allowed to ensure symmertrical
5103 generation of symbols.
5104 * exp_intr.adb (Expand_Unc_Deallocation): Add new variable
5105 Dummy. Generate a dummy temporary when aborts are not allowed
5106 to ensure symmertrical generation of symbols.
5108 2014-07-29 Ed Schonberg <schonberg@adacore.com>
5110 * exp_dbug.adb (Debug_Renaming_Declaration): For an object
5111 renaming, indicate that the renamed entity itself needs debug
5112 information. This is necessary if that entity is a temporary,
5113 e.g. part of the expansion of an explicit dereference in an
5116 2014-07-29 Thomas Quinot <quinot@adacore.com>
5118 * errout.adb (Set_Error_Posted): When propagating flag to
5119 an enclosing named association, also propagate to the parent
5120 of that node, so that named and positional associations are
5121 treated consistently.
5123 2014-07-29 Ed Schonberg <schonberg@adacore.com>
5125 * sem_attr.adb (Resolve_Attribute, case 'Update): Set
5126 Do_Range_Check properly on array component expressions that
5127 have a scalar type. In GNATprove mode, only checks on scalar
5128 components must be marked by the front-end.
5130 2014-07-29 Ed Schonberg <schonberg@adacore.com>
5132 * sem_res.adb (Resolve_Type_Conversion): If the type of the
5133 expression is a limited view, use the non-limited view when
5136 2014-07-29 Hristian Kirtchev <kirtchev@adacore.com>
5138 * exp_ch4.adb (Expand_N_Case_Expression): Mark the generated
5139 case statement as coming from a conditional expression.
5140 (Expand_N_If_Expression): Mark the generated if statement as
5141 coming from a conditional expression.
5142 * exp_ch5.adb (Expand_N_Case_Statement): Do not process controlled
5143 objects found in case statement alternatives when the case
5144 statement is actually a case expression.
5145 (Expand_N_If_Statement):
5146 Do not process controlled objects found in an if statement when
5147 the if statement is actually an if expression.
5148 * sinfo.adb (From_Conditional_Expression): New routine.
5149 (Set_From_Conditional_Expression): New routine.
5150 * sinfo.ads Add new semantic flag From_Conditional_Expression and
5151 update related nodes.
5152 (From_Conditional_Expression): New routine along with pragma Inline.
5153 (Set_From_Conditional_Expression): New routine along with pragma Inline.
5155 2014-07-29 Hristian Kirtchev <kirtchev@adacore.com>
5157 * exp_ch7.adb (Build_BIP_Cleanup_Stmts): Remove
5158 formal parameter Obj_Id and update the comment on usage. Renamed
5159 Obj_Typ to Func_Typ and update all occurrences.
5160 (Find_Last_Init): Remove formal parameter Decl and update the comment
5162 Remove local constants Obj_Id and Obj_Typ. Remove local variables
5163 Init_Typ and Is_Conc. Remove the extraction of the initialization type.
5164 (Find_Last_Init_In_Block): Remove formal parameter
5165 Init_Typ and update the comment on usage.
5166 (Is_Init_Call): Remove formal parameter Init_Typ and update the comment
5167 on usage. Check whether the procedure call is an initialization
5168 procedure of either the object type or the initialization type.
5169 (Is_Init_Proc_Of): New routine.
5170 (Process_Object_Declaration): Obj_Id and Obj_Typ are now global to this
5171 routine. Add new variable Init_Typ. Add circuitry to extract the object
5172 type as well as the initialization type.
5174 2014-07-29 Robert Dewar <dewar@adacore.com>
5176 * sem_case.adb: Minor reformatting.
5177 * sem_aux.ads: Minor reformatting.
5179 2014-07-29 Ed Schonberg <schonberg@adacore.com>
5181 * sinfo.adb (Set_Else_Actions, Set_Then_Actions): Set parent
5182 pointer on these fields, even though they are semantic, because
5183 subsequent analysis and expansion of action nades may require
5184 exploring the tree, for example to locate a node to be wrapped
5185 when a function with controlled result is called.
5187 2014-07-29 Claire Dross <dross@adacore.com>
5189 * sem_aux.adb (Get_Binary_Nkind): Use case on
5190 Name_Id instead of an intermediate string.
5191 (Get_Unary_Nkind): Use case on Name_Id instead of an intermediate
5194 2014-07-29 Sergey Rybin <rybin@adacore.com frybin>
5196 * gnat_ugn.texi (gnatelim, gnatstub, gnatmetric): Add note
5197 about processing sources with preprocessor directives.
5199 2014-07-24 Martin Liska <mliska@suse.cz>
5201 * gcc-interface/trans.c (finalize_nrv): Adjust function call.
5202 * gcc-interface/utils.c (rest_of_subprog_body_compilation): Likewise.
5203 (gnat_write_global_declarations): Likewise.
5205 2014-07-19 David Wohlferd <dw@LimeGreenSocks.com>
5207 * gnat_rm.texi: Clean up for makeinfo 5.2.
5209 2014-07-19 David Wohlferd <dw@LimeGreenSocks.com>
5211 * gnat_rm.texi (Machine Code Insertions): Clean up.
5213 2014-07-18 Robert Dewar <dewar@adacore.com>
5215 * exp_ch7.adb: Minor reformatting.
5217 2014-07-18 Claire Dross <dross@adacore.com>
5219 * sem_aux.ads (Get_Binary_Nkind): New function that returns
5220 the Node_Kind value of an entity defining a binary operator.
5221 (Get_Unary_Nkind): New function that returns the Node_Kind value
5222 of an entity defining a unary operator.
5224 2014-07-18 Pascal Obry <obry@adacore.com>
5226 * sysdep.c: comment update.
5227 * adaint.c (__gnat_fputwc): Use wchar_t on a limited set of
5228 platforms where it is known to be supported.
5230 2014-07-18 Thomas Quinot <quinot@adacore.com>
5232 * sem_dist.adb (Process_Remote_AST_Declaration): Need
5233 to set Fat_Type's Ekind in order to be able to use its
5234 Corresponding_Remote_Type attribute.
5236 2014-07-18 Hristian Kirtchev <kirtchev@adacore.com>
5238 * einfo.adb Last_Aggregate_Assignment is now Node 30.
5239 (Last_Aggregate_Assignment): Include
5240 constants in the assertion. Update the underlying node.
5241 (Set_Last_Aggregate_Assignment): Include constants in the
5242 assertion. Update the underlying node. (Write_Field11_Name):
5243 Remove the entry for Last_Aggregate_Assignment.
5244 (Write_Field30_Name): Add an entry for Last_Aggregate_Assignment.
5245 * einfo.ads Update the node designation and usage of attribute
5246 Last_Aggregate_Assignment.
5247 * exp_aggr.adb (Expand_Array_Aggregate): Store the last
5248 assignment statement used to initialize a controlled object.
5249 (Late_Expansion): Store the last assignment statement used to
5250 initialize a controlled record or an array of controlled objects.
5251 * exp_ch3.adb (Expand_N_Object_Declaration): Default
5252 initialization of objects is now performed in a separate routine.
5253 (Default_Initialize_Object): New routine.
5254 * exp_ch7.adb (Build_BIP_Cleanup_Stmts): Add formal parameter
5255 Obj_Id. Update the comment on usage.
5256 (Find_Last_Init): Remove formal parameter Typ. Update comment on usage.
5257 Reimplement the logic. (Find_Last_Init_In_Block): New routine.
5258 (Is_Init_Call): Add formal parameter Init_Typ. Update the
5259 comment on usage. Account for the type init proc when trying
5260 to determine whether a statement is an initialization call.
5261 (Make_Adjust_Call): Rename formal parameter For_Parent to
5262 Skip_Self. Update all occurrences of For_Parent. Account for
5263 non-tagged types. Update the call to Make_Call.
5264 (Make_Call): Rename formal parameter For_Parent to Skip_Self. Update
5265 comment on usage. Update all occurrences of For_Parent.
5266 (Make_Final_Call): Rename formal parameter For_Parent to
5267 Skip_Self. Update all occurrences of For_Parent. Account
5268 for non-tagged types. Update the call to Make_Call.
5269 (Process_Object_Declaration): Most variables and constants are
5270 now local to the routine.
5271 * exp_ch7.ads (Make_Adjust_Call): Rename formal parameter
5272 For_Parent to Skip_Self. Update the comment on usage.
5273 (Make_Final_Call): Rename formal parameter For_Parent to
5274 Skip_Self. Update the comment on usage.
5276 2014-07-18 Ed Schonberg <schonberg@adacore.com>
5278 * sem_ch9.adb (Analyze_Requeue): The entry being referenced
5279 can be a procedure that is implemented by entry, and have a
5280 formal that is a synchronized interface. It does not have to
5281 be declared as a protected operation.
5283 2014-07-18 Robert Dewar <dewar@adacore.com>
5285 * gnat_rm.texi: Remove mention of obsolete attributes
5286 Max[_Interrupt]_Priority, which have never been implemented
5287 (or at the very least were removed long ago if they ever were
5288 implemented. Add documentation of Max[_Interrupt]_Priority
5289 constants in package System.
5290 * ttypes.ads: Document actual handling of package System,
5291 rather than a historical fantasy version. Remove mention of
5292 non-existent attributes Max[_Interrupt]_Priority.
5294 2014-07-18 Pascal Obry <obry@adacore.com>
5296 * a-witeio.adb (Put): No 16-bit character output when text
5297 translation is disabled.
5298 * i-cstrea.ads: Code clean up.
5300 2014-07-18 Robert Dewar <dewar@adacore.com>
5302 * gnat_rm.texi: Document that Wchar_T_Size and Word_Size are
5305 2014-07-18 Arnaud Charlet <charlet@adacore.com>
5307 * a-witeio.adb, initialize.c: Update comments. Minor clean ups.
5309 2014-07-18 Pascal Obry <obry@adacore.com>
5311 * adaint.c: Do not include wchar.h on VxWorks.
5312 * mingw32.h: Remove obsolete definition.
5314 2014-07-18 Pascal Obry <obry@adacore.com>
5316 * a-textio.adb, a-witeio.adb, a-ztexio.adb: Use C_Streams Default_Text.
5317 * i-cstrea.ads (Content_Encoding): Moved here, add convention C.
5318 * s-ficobl.ads (Content_Encoding): Moved to C_Streams.
5319 * s-fileio.adb (Open): Adjust to use Content_Encoding from C_Streams.
5321 2014-07-18 Pascal Obry <obry@adacore.com>
5323 * a-textio.adb: Rename Is_Text_File to Text_Encoding.
5324 * a-ztexio.adb: Likewise.
5325 * a-witeio.adb: Likewise.
5326 (Open): Pass file's translation mode to set_text_mode.
5327 * s-ficobl.ads (Content_Encoding): New type.
5328 (Text_Content_Encoding): New subtype.
5329 (AFCB): Rename Is_Text_File to Text_Encoding.
5330 * s-fileio.adb (Open): Handles new text_translation
5331 values. Remove Is_Text_File which is equivalent to Text_Encoding
5332 in Text_Content_Encoding.
5333 * adaint.h (__gnat_set_mode): New routine.
5334 * sysdep.c (__gnat_set_wide_text_mode): Removed.
5335 (__gnat_set_mode): New routine.
5337 2014-07-18 Arnaud Charlet <charlet@adacore.com>
5339 * gcc-interface/decl.c, gcc-interface/trans.c,
5340 gcc-interface/utils.c (Is_Packed_Array_Type): Renamed
5341 Is_Packed_Array_Impl_Type.
5343 2014-07-18 Gary Dismukes <dismukes@adacore.com>
5345 * sem_util.adb: Minor typo correction.
5347 2014-07-18 Ben Brosgol <brosgol@adacore.com>
5349 * gnat_rm.texi: Complete previous change.
5351 2014-07-18 Pascal Obry <obry@adacore.com>
5353 * s-fileio.adb: Minor style fix.
5355 2014-07-18 Ed Schonberg <schonberg@adacore.com>
5357 * sem_ch13.adb (Analyze_Aspect_Specifications): Detect improper
5358 specification of stream attributes for subtypes that are not
5359 first subtypes, to prevent malformed rep_item chains in the case
5360 of such illegal specifications for discriminated private subtypes.
5361 (Check_Overloaded_Name): Verify that the name is an entity name
5362 before other checks.
5364 2014-07-18 Pascal Obry <obry@adacore.com>
5366 * adaint.c (__gnat_fputwc) Do not disable on cross-build.
5368 2014-07-18 Robert Dewar <dewar@adacore.com>
5370 * sem_prag.adb, sem_attr.adb,
5371 sem_aggr.adb, sinfo.ads, sem_eval.ads: Minor reformatting.
5373 2014-07-18 Pascal Obry <obry@adacore.com>
5375 * sysdep.c (__gnat_wide_text_translation_required): Removed from here.
5376 * initialize.c (__gnat_wide_text_translation_required): Defined here.
5378 2014-07-18 Pascal Obry <obry@adacore.com>
5380 * adaint.c (__gnat_fputwc): New routine.
5381 * s-crtl.ads (fputwc): Now imported as __gnat_fputwc.
5383 2014-07-18 Hristian Kirtchev <kirtchev@adacore.com>
5385 * einfo.adb: Flag 270 is now used as Stores_Attribute_Old_Prefix.
5386 (Set_Stores_Attribute_Old_Prefix): New routine.
5387 (Stores_Attribute_Old_Prefix): New routine.
5388 (Write_Entity_Flags):
5389 Output flag Stores_Attribute_Old_Prefix.
5390 * einfo.ads Add new flag Stores_Attribute_Old_Prefix along with
5392 (Set_Stores_Attribute_Old_Prefix): New routine
5393 along with pragma Inline.
5394 (Stores_Attribute_Old_Prefix): New
5395 routine along with pragma Inline.
5396 * exp_attr.adb (Expand_N_Attribute_Reference): Mark the generated
5397 constant which captures the result of attribute 'Old's prefix.
5398 * sem_util.adb (In_Assertion_Expression_Pragma): Recognize a
5399 relocated expression which acted as a prefix of attribute 'Old.
5401 2014-07-18 Bob Duff <duff@adacore.com>
5403 * s-spsufi.adb (Finalize_And_Deallocate): Set Subpool.Owner to
5404 null before dispatching to Deallocate_Subpool.
5405 * s-stposu.ads (Default_Subpool_For_Pool): Change mode of
5406 parameter of Default_Subpool_For_Pool to 'in out'.
5407 * s-stposu.adb (Set_Pool_Of_Subpool): Use raise expression. Add
5408 a message to the raise.
5409 * sem_util.adb: Minor reformatting.
5411 2014-07-18 Robert Dewar <dewar@adacore.com>
5413 * sem_util.adb (Check_Expression_Against_Static_Predicate):
5414 Mark expression as non-static if it fails static predicate check,
5415 and issue additional warning.
5417 2014-07-18 Pascal Obry <obry@adacore.com>
5419 * a-witeio.adb (Put): Control translation based on
5420 wide_text_translation_required.
5421 * adaint.c (CurrentCCSEncoding): New variable.
5422 * initialize.c (__gnat_initialize): On Windows initialize
5423 CurrentCCSEncoding based on values in GNAT_CCS_ENCODING
5424 environment variable.
5425 * mingw32.h (CurrentCCSEncoding): New external.
5426 (__gnat_wide_text_translation_required): Likewise.
5427 * sysdep.c (wide_text_translation_required): New variable.
5428 (__gnat_set_wide_text_mode): Set mode based on CurrentCCSEncoding.
5430 2014-07-18 Hristian Kirtchev <kirtchev@adacore.com>
5432 * sem_prag.adb (Analyze_Refined_Depends_In_Decl_Part): Remove global
5433 variable Refined_States. Add global variable Matched_Items.
5434 (Check_Dependency_Clause): Account for dependency
5435 clauses utilizing states with visible null refinements.
5436 (Is_Null_Refined_State): New routine.
5437 (Match_Items): Record each successfully matched item of pragma Depends.
5438 (Record_Item): New routine.
5440 2014-07-18 Ed Schonberg <schonberg@adacore.com>
5442 * sem_attr.adb (Analyze_Attribute, case 'Update): Set
5443 Do_Range_Check flag on a dynamic index expression used in a
5444 component association in the argument of Update.
5446 2014-07-18 Gary Dismukes <dismukes@adacore.com>
5448 * einfo.ads, sem_eval.ads, sem_ch13.adb: Minor reformatting.
5450 2014-07-18 Hristian Kirtchev <kirtchev@adacore.com>
5452 * exp_ch6.adb (Expand_Simple_Function_Return): Redo the marking
5453 of enclosing blocks, loops and the enclosing function using a
5454 parent-based traversal.
5455 * exp_util.adb (Wrap_Statements_In_Block): Suppress the secondary
5456 stack reclamation if the iterator loop contains a return statement
5457 that uses the stack.
5458 * sem_ch5.adb (Analyze_Loop_Statement): There is no need to
5459 patch up the scope stack as the secondary stack management now
5460 takes into account the enclosing function of the iterator loop.
5462 2014-07-18 Robert Dewar <dewar@adacore.com>
5464 * sem_ch3.adb, g-memdum.ads, i-cstrea.ads: Minor reformatting.
5466 2014-07-18 Robert Dewar <dewar@adacore.com>
5468 * einfo.adb (Has_Static_Predicate): New function.
5469 (Set_Has_Static_Predicate): New procedure.
5470 * einfo.ads (Has_Static_Predicate): New flag.
5471 * sem_ch13.adb (Is_Predicate_Static): New function
5472 (Build_Predicate_Functions): Use Is_Predicate_Static to reorganize
5473 (Add_Call): Minor change in Sloc of generated expression
5474 (Add_Predicates): Remove setting of Static_Pred, no longer used.
5475 * sem_ch4.adb (Has_Static_Predicate): Removed this function,
5476 replace by use of the entity flag Has_Static_Predicate_Aspect.
5477 * sem_eval.adb (Eval_Static_Predicate_Check): Check real case
5478 and issue warning that predicate is not checked for now.
5479 * sem_eval.ads (Eval_Static_Predicate_Check): Fix comments in
5481 * sem_util.adb (Check_Expression_Against_Static_Predicate):
5482 Carry out check for any case where there is a static predicate,
5483 and output appropriate message.
5484 * sinfo.ads: Minor comment corrections.
5486 2014-07-18 Ed Schonberg <schonberg@adacore.com>
5488 * exp_ch3.adb (Expand_Freeze_Record_Type): If the type is derived
5489 from an untagged private type whose full view is tagged, the type
5490 is marked tagged for layout reasons, but it has no dispatch table,
5491 so Set_All_DT_Position must not be called.
5492 * exp_ch13.adb: If the freeze node is for a type internal to a
5493 record declaration, as is the case for a class-wide subtype
5494 of a parent component, the relevant scope is the scope of the
5497 2014-07-18 Thomas Quinot <quinot@adacore.com>
5499 * g-memdum.adb, g-memdum.ads: Code clean ups.
5501 2014-07-18 Hristian Kirtchev <kirtchev@adacore.com>
5503 * sem_prag.adb (Check_Dependency_Clause):
5504 Update the comment on usage. Reimplement the mechanism which
5505 attempts to match a single clause of Depends against one or
5506 more clauses of Refined_Depends.
5507 (Input_Match): Removed.
5508 (Inputs_Match): Removed.
5509 (Is_Self_Referential): Removed.
5510 (Normalize_Clause): Update the call to Split_Multiple_Outputs.
5511 (Normalize_Outputs): Rename variable Split to New_Claue and update
5512 all its occurrences.
5513 (Report_Extra_Clauses): Update the comment on usage.
5514 (Split_Multiple_Outputs): Renamed to Normalize_Outputs.
5516 2014-07-18 Gary Dismukes <dismukes@adacore.com>
5518 * i-cstrea.ads: Minor reformatting.
5520 2014-07-18 Hristian Kirtchev <kirtchev@adacore.com>
5522 * exp_util.adb (Wrap_Statements_In_Block): Propagate both
5523 secondary stack-related flags to the generated block.
5524 * sem_ch5.adb (Analyze_Loop_Statement): Update the scope chain
5525 once the loop is relocated in a block.
5527 2014-07-18 Robert Dewar <dewar@adacore.com>
5529 * repinfo.ads: Add documentation on handling of back annotation
5532 2014-07-18 Ed Schonberg <schonberg@adacore.com>
5534 * sinfo.ads, sinfo.adb (Incomplete_View): New semantic attribute
5535 of full type declaration, denotes previous declaration for
5536 incomplete view of the type.
5537 * sem_ch3.adb (Analyze_Full_Type_Declaration): Set Incomplete_View
5538 of declaration if one is present.
5539 (Replace_Type): When constructing the signature of an inherited
5540 operation, handle properly the case where the operation has a
5541 formal whose type is an incomplete view.
5542 * sem_util.adb (Collect_Primitive_Operations): Handle properly
5543 the case of an operation declared after an incomplete declaration
5544 for a type T and before the full declaration of T.
5546 2014-07-18 Pascal Obry <obry@adacore.com>
5548 * i-cstrea.ads: Add documentation for set_wide_text_mode.
5550 2014-07-18 Robert Dewar <dewar@adacore.com>
5552 * a-witeio.adb: Minor code reorganization.
5553 * i-cstrea.ads: Add comment.
5555 2014-07-18 Thomas Quinot <quinot@adacore.com>
5557 * s-oscons-tmplt.c (NAME_MAX): Minor cleaup and comment
5560 2014-07-18 Robert Dewar <dewar@adacore.com>
5562 * g-memdum.adb, g-memdum.ads, exp_strm.adb: Minor reformatting.
5564 2014-07-18 Pascal Obry <obry@adacore.com>
5566 * s-crtl.ads, i-cstrea.ads (fputwc): New routine.
5567 * a-witeio.adb (Put): On platforms where there is translation
5568 done by the OS output the raw text.
5569 (New_Line): Use Put above to properly handle the LM wide characters.
5571 2014-07-18 Thomas Quinot <quinot@adacore.com>
5573 * g-memdum.adb, g-memdum.ads (Dump): New parameter Prefix, defaulted
5574 to Absolute_Address.
5576 2014-07-18 Eric Botcazou <ebotcazou@adacore.com>
5578 * opt.ads (Suppress_Back_Annotation): Remove as unused.
5579 * fe.h (Back_Annotate_Rep_Info): Likewise.
5580 (Global_Discard_Names): Likewise.
5582 2014-07-18 Robert Dewar <dewar@adacore.com>
5584 * sem_ch13.adb (Is_Type_Ref): Check that type name is not
5587 2014-07-18 Vincent Celier <celier@adacore.com>
5589 * s-osinte-vms.ads: Fix style errors.
5591 2014-07-18 Thomas Quinot <quinot@adacore.com>
5593 * s-oscons-tmplt.c (_POSIX_SOURCE): Define in order to get
5594 NAME_MAX and PATH_MAX.
5596 2014-07-18 Bob Duff <duff@adacore.com>
5598 * exp_strm.adb (Build_Record_Or_Elementary_Input_Function,
5599 Build_Record_Or_Elementary_Output_Procedure): For Input and
5600 Output attributes, do not read/write the discriminants if they
5601 have default values; that will be done by Read/Write.
5603 2014-07-18 Robert Dewar <dewar@adacore.com>
5605 * sem_aggr.adb, exp_ch5.adb, sem_ch3.adb, layout.adb, sem_type.adb,
5606 exp_util.adb, exp_attr.adb, einfo.adb, einfo.ads, exp_pakd.adb,
5607 checks.adb, exp_pakd.ads, freeze.adb, sem_util.adb, exp_dbug.adb,
5608 exp_dbug.ads, exp_ch4.adb, sem_ch8.adb, exp_aggr.adb, sem_eval.adb,
5609 sem_ch13.adb: Change name Packed_Array_Type to Packed_Array_Impl_Type.
5611 2014-07-18 Robert Dewar <dewar@adacore.com>
5613 * lib-writ.adb, makeutl.adb, ali.ads: Minor reformatting.
5615 2014-07-18 Vincent Celier <celier@adacore.com>
5617 * lib-writ.ads: Update documentation about the D lines.
5619 2014-07-18 Ed Schonberg <schonberg@adacore.com>
5621 * sem_ch13.adb (Replace_Type_References_Generic): Use type entity
5622 as a parameter, rather than its Chars field, in order to locate
5623 freeze node of type. If the predicate or invariant has references
5624 to types other than the one to which the contract applies, these
5625 types must be frozen, and the corresponding predicate functions
5626 created, before that freeze node.
5628 2014-07-18 Robert Dewar <dewar@adacore.com>
5630 * freeze.adb, einfo.ads, einfo.adb: Minor code reorganization.
5631 * par_sco.adb: Minor reformatting.
5633 2014-07-18 Gary Dismukes <dismukes@adacore.com>
5635 * exp_ch4.adb (Real_Range_Check): Turn off
5636 the Do_Range_Check flag on the conversion's current Expression
5637 argument rather than on the originally captured Operand node,
5638 as Expression may reflect a rewriting (as in conversions to a
5641 2014-07-18 Vincent Celier <celier@adacore.com>
5643 * ali.adb (Scan_ALI): Set Sdep_Record.Unit_Name, when the unit
5645 * ali.ads (Sdep_Record): New component Unit_Name.
5646 * lib-writ.adb (Write_ALI): Write the unit name in D lines.
5647 * makeutl.adb (Check_Source_Info_In_ALI): Return False if a
5648 dependent unit is in a project and the source file name is not
5651 2014-07-18 Bob Duff <duff@adacore.com>
5653 * s-addima.ads: Minor: add comment.
5655 2014-07-18 Thomas Quinot <quinot@adacore.com>
5657 * freeze.adb (Check_Component_Storage_Order): Fix enforcement
5658 of nesting rules for composites with different SSOs.
5660 2014-07-18 Thomas Quinot <quinot@adacore.com>
5662 * par_sco.adb (Is_Logical_Operator): An If_Expression is not
5663 a proper logical operator.
5664 (Has_Decision): An If_Expression indicates the presence of a decision
5665 although it is not a logical operator.
5667 2014-07-18 Robert Dewar <dewar@adacore.com>
5669 * gnat_ugn.texi: Remove note that -gnatR not allowed with -gnatc.
5670 * switch-c.adb: Remove prohibition of -gnatR and -gnatc together.
5672 2014-07-18 Eric Botcazou <ebotcazou@adacore.com>
5674 * sem_ch13.adb (Kill_Rep_Clause): Clear Comes_From_Source flag
5675 on the null statement.
5677 2014-07-18 Thomas Quinot <quinot@adacore.com>
5679 * adaint.c: Minor comment rewording.
5680 * socket.c: Define macros _REENTRANT and _THREAD_SAFE so that
5681 use of errno in this file is thread safe.
5683 2014-07-18 Arnaud Charlet <charlet@adacore.com>
5685 * gnat_ugn.texi: Doc clarification.
5686 * sem_ch13.adb (Kill_Rep_Clause): Use Replace not Rewrite.
5687 * sem_ch13.ads: Minor comment update.
5689 2014-07-18 Robert Dewar <dewar@adacore.com>
5691 * repinfo.ads: Minor comment fix.
5693 2014-07-18 Robert Dewar <dewar@adacore.com>
5695 * par-prag.adb: Add dummy entry for Default_Scalar_Storage_Order.
5696 * sem_prag.adb: Add dummy implementation of
5697 Default_Scalar_Storage_Order.
5698 * snames.ads-tmpl: Add dummy entry for
5699 Default_Scalar_Storage_Order pragma.
5701 2014-07-18 Robert Dewar <dewar@adacore.com>
5703 * opt.adb (Tree_Read): Read Address_Is_Private,
5704 Ignore_Rep_Clauses, Ignore_Style_Check_Pragmas, Multiple_Unit_Index.
5705 (Tree_Write): Corresponding writes
5706 * opt.ads: Minor comment reformatting and fixes.
5707 * tree_io.ads: Increment ASIS_Version_Number.
5709 2014-07-18 Robert Dewar <dewar@adacore.com>
5711 * sem_attr.adb, s-os_lib.ads, prj-tree.adb: Minor reformatting.
5712 * types.h: Fix typo.
5714 2014-07-18 Robert Dewar <dewar@adacore.com>
5716 * freeze.adb (Check_Address_Clause): Use Kill_Rep_Clause (no
5718 * gnat_ugn.texi: Document that -gnatI removes rep clauses from
5720 * sem_ch13.adb (Kill_Rep_Clause): New procedure
5721 (Analyze_Attribute_Definition_Clause): Use
5722 Kill_Rep_Clause. This is just a cleanup, no functional effect.
5723 (Analyze_Enumeration_Representation_Clause):
5724 Use Kill_Rep_Clause. This means that enum rep
5725 clauses are now properly removed from -gnatct trees.
5726 (Analyze_Record_Representation_Clause): Same change.
5727 * sem_ch13.ads (Kill_Rep_Clause): New procedure.
5729 2014-07-18 Pascal Obry <obry@adacore.com>
5731 * s-os_lib.ads, s-os_lib.adb (GM_Time_Of): New routine to create an
5732 OS_Time from time parts.
5733 * adaint.h, adaint.c (__gnat_to_os_time): New routine.
5735 2014-07-18 Ed Schonberg <schonberg@adacore.com>
5737 * sem_ch4.adb (Try_Container_Indexing): Refine previous patch for
5738 indexing over containers that are derived types: check whether
5739 signature of found operation has the correct first parameter
5740 before retrieving directly a primitive operation.
5742 2014-07-18 Ed Schonberg <schonberg@adacore.com>
5744 * sem_attr.adb (Analyze_Attribute, case 'Update): Set
5745 Do_Range_Check flag on dynamic bounds of a range used in a
5746 component association in the argument of Update.
5748 2014-07-18 Thomas Quinot <quinot@adacore.com>
5750 * adaint.c: #define _REENTRANT and _THREAD_SAFE in order for
5751 accesses to errno(3) to be thread safe.
5753 2014-07-18 Vincent Celier <celier@adacore.com>
5755 * prj-tree.adb (Imported_Or_Extended_Project_Of): For each non
5756 limited imported project that is an extending project, return
5757 a project being extended if it has the expected name.
5759 2014-07-18 Pascal Obry <obry@adacore.com>
5761 * s-os_lib.ads, s-os_lib.adb (Set_File_Last_Modify_Time_Stamp): New
5762 routine to set the last modification time stamp for the given file.
5763 * gnatchop.adb (File_Time_Stamp): Removed.
5765 Set_File_Last_Modify_Time_Stamp instead of ad-hoc implementation.
5767 2014-07-18 Ed Schonberg <schonberg@adacore.com>
5769 * sem_aggr.adb (Aggregate_Constraint_Checks): Moved to sem_util.
5770 * sem_util.ads, sem_util.adb (Aggregate_Constraint_Checks):
5771 Moved here, so it can be shared with the resolution of 'Update,
5772 whose argument shares some features with aggregates.
5773 * sem_attr.adb (Resolve_Attribute, case 'Update): Apply
5774 Aggregate_Constraint_Checks with the expression of each
5775 association, so that the Do_Range_Check flag is set when needed.
5777 2014-07-18 Ed Schonberg <schonberg@adacore.com>
5779 * sem_ch4.adb (Try_Container_Indexing): If the container
5780 type is a derived type, the value of the inherited aspect is
5781 the Reference operation declared for the parent type. However,
5782 Reference is also a primitive operation of the new type, and
5783 the inherited operation has a different signature. We retrieve
5784 the right one from the list of primitive operations of the
5787 2014-07-18 Vincent Celier <celier@adacore.com>
5789 * debug.adb: Update comment.
5791 2014-07-18 Hristian Kirtchev <kirtchev@adacore.com>
5793 * exp_util.adb (Needs_Finalization): There is no reason why a
5794 C type should not benefit from finalization actions.
5796 2014-07-18 Thomas Quinot <quinot@adacore.com>
5798 * s-oscons-tmplt.c (NAME_MAX): Fix definition for Solaris
5799 (FILENAME_MAX): Remove unneeded definition.
5801 2014-07-18 Robert Dewar <dewar@adacore.com>
5803 * exp_attr.adb, debug.adb: Update comments.
5805 2014-07-18 Vincent Celier <celier@adacore.com>
5807 * par-ch4.adb (Simple_Expression): Add missing style check
5808 for binary adding operators.
5809 (Term): Add missing style check for multiplying operators.
5811 2014-07-18 Robert Dewar <dewar@adacore.com>
5813 * impunit.adb: Minor comment correction.
5814 * widechar.adb, s-wchcon.ads: Minor comment corrections.
5816 2014-07-18 Robert Dewar <dewar@adacore.com>
5818 * sem_ch13.adb (Build_Discrete_Static_Predicate): New name
5819 for Build_Static_Predicate (Build_Predicate_Functions):
5820 Don't try to build discrete predicate for real type.
5821 (Build_Predicate_Functions): Report attempt to use
5822 Static_Predicate function on real type as unimplemented.
5823 * sem_util.adb (Check_Expression_Against_Static_Predicate):
5824 Add guard to prevent blow up on predicate for real type.
5826 2014-07-18 Ed Schonberg <schonberg@adacore.com>
5828 * einfo.adb (Set_Static_Predicate): Simplify assertion to handle
5829 properly static predicate on enumeration types and modular types
5832 2014-07-18 Pierre-Marie Derodat <derodat@adacore.com>
5834 * scos.ads (SCO_Unit_Table_Entry): Add a field to keep track of
5835 the corresponding source file index.
5836 * get_scos.ads (Get_SCOs): Add a default value for it.
5837 * par_sco.adb (SCO_Record): Fill the corresponding value.
5840 2014-07-18 Vincent Celier <celier@adacore.com>
5842 * a-strunb-shared.adb, s-auxdec.ads, s-rannum.adb, atree.ads,
5843 urealp.adb, vms_data.ads, lib.ads, s-auxdec-vms_64.ads: Minor
5845 * gnat_ugn.texi: Add documentation for new gnatmem switch -t.
5847 2014-07-18 Thomas Quinot <quinot@adacore.com>
5849 * g-sercom.ads (Set): document possible data loss.
5851 2014-07-18 Ed Schonberg <schonberg@adacore.com>
5853 * exp_attr.adb (Expand_N_Attribute_Reference, cases Input,
5854 Output, Read, Write): If the restriction No_Streams is active,
5855 replace each occurrence of a stream attribute by an explicit
5858 2014-07-18 Robert Dewar <dewar@adacore.com>
5860 * par_sco.adb, a-reatim.ads, exp_attr.adb, sem_util.adb: Minor
5863 2014-07-18 Robert Dewar <dewar@adacore.com>
5865 * einfo.ads, einfo.adb (Has_Out_Or_In_Out_Parameter): New flag and
5867 (Set_Has_Out_Or_In_Out_Parameter): New procedure.
5868 * sem_ch6.adb (Set_Formal_Mode): Set Has_Out_Or_In_Out_Parameter flag.
5869 * sem_res.adb (Resolve_Call): Error if call of Ada 2012 function
5870 with OUT or IN OUT from earlier Ada mode (e.g. Ada 2005)
5872 2014-07-18 Robert Dewar <dewar@adacore.com>
5874 * bcheck.adb (Check_Consistent_Restrictions):
5875 Remove obsolete code checking for violation of
5876 No_Standard_Allocators_After_Elaboration (main program)
5877 * bindgen.adb (Gen_Adainit): Handle
5878 No_Standard_Allocators_After_Elaboration
5879 (Gen_Output_File_Ada): ditto.
5880 * exp_ch4.adb (Expand_N_Allocator): Handle
5881 No_Standard_Allocators_After_Elaboration.
5882 * Makefile.rtl: Add entry for s-elaall
5883 * rtsfind.ads: Add entry for Check_Standard_Allocator.
5884 * s-elaall.ads, s-elaall.adb: New files.
5885 * sem_ch4.adb (Analyze_Allocator): Handle
5886 No_Standard_Allocators_After_Elaboration.
5888 2014-07-18 Robert Dewar <dewar@adacore.com>
5890 * lib.adb, lib.ads, lib-writ.adb, lib-writ.ads, ali.adb,
5891 ali.ads, lib-load.adb: Remove Lib.Has_Allocator and all uses.
5892 Remove AB parameter from ali files and all uses.
5893 Remove Allocator_In_Body and all uses.
5895 2014-07-18 Robert Dewar <dewar@adacore.com>
5897 * g-expect-vms.adb: Add comment.
5899 2014-07-18 Thomas Quinot <quinot@adacore.com>
5901 * par_sco.adb (Is_Logical_Operation): return True for
5904 2014-07-18 Ed Schonberg <schonberg@adacore.com>
5906 * sem_attr.adb (Resolve_Attribute, case 'Update): Do full
5907 analysis and resolution of each choice in the associations within
5908 the argument of Update, because they may be variable names.
5910 2014-07-18 Hristian Kirtchev <kirtchev@adacore.com>
5912 * exp_attr.adb (Expand_Loop_Entry_Attribute): Insert any condition
5913 actions before the generated if statement.
5915 2014-07-18 Hristian Kirtchev <kirtchev@adacore.com>
5917 * gnat_ugn.texi Enhance the documentation of
5918 switches -gnateA and -gnateV.
5920 2014-07-18 Ed Schonberg <schonberg@adacore.com>
5922 * sem_util.adb (Build_Default_Subtype): Add missing condition
5923 so that code matches description: use the full view of the base
5924 only if the base is private and the subtype is not.
5926 2014-07-17 Gary Dismukes <dismukes@adacore.com>
5928 * exp_disp.adb: Minor reformatting.
5929 * exp_disp.adb: Minor code reorganization.
5931 2014-07-17 Thomas Quinot <quinot@adacore.com>
5933 * gnat_rm.texi, freeze.adb (Check_Component_Storage_Order): Do not
5934 require an explicit SSO attribute definition clause on a composite type
5935 just because one of its components has one.
5937 2014-07-17 Robert Dewar <dewar@adacore.com>
5939 * sem_attr.adb (Analyze_Attribute, case Loop_Entry): Rewrite
5940 attribute out of existence if the enclosing pragma is ignored.
5941 * sem_util.adb: Minor reformatting.
5943 2014-07-17 Ed Schonberg <schonberg@adacore.com>
5945 * exp_aggr.adb (Expand_Array_Aggregate): Handle properly an
5946 array aggregate expanded into assignments when it appears as a
5947 local declaration in an inlined body.
5949 2014-07-17 Doug Rupp <rupp@adacore.com>
5951 * init.c [__ANDROID__]: Modify for ZCX.
5952 * exp_aggr.adb: Minor reformatting
5953 * sigtramp-armvxw.c, sigtramp-ppcvxw.c: Update comments.
5955 2014-07-17 Robert Dewar <dewar@adacore.com>
5957 * a-strunb-shared.ads, a-stwiun-shared.ads, a-stzunb-shared.ads,
5958 exp_ch7.adb, g-pehage.ads, g-socket.ads, gnat_ugn.texi, gnat_ugx.texi,
5959 scng.adb: Remove incorrect usage "allow to" and "allows to".
5961 2014-07-17 Robert Dewar <dewar@adacore.com>
5963 * exp_dist.adb: Minor reformatting.
5965 2014-07-17 Bob Duff <duff@adacore.com>
5967 * gnat_ugn.texi: Improve documentation of Unrestricted_Access.
5969 2014-07-17 Robert Dewar <dewar@adacore.com>
5971 * sem_ch13.adb (Build_Invariant_Procedure): Add variable Nam
5972 (Add_Invariants): Set Nam to Name_Type_Invariant if from aspect.
5974 2014-07-17 Thomas Quinot <quinot@adacore.com>
5976 * exp_pakd.adb (Create_Packed_Array_Type.Install_PAT): For a
5977 non-bit-packed array, propagate Reverse_Storage_Order to the
5980 2014-07-17 Javier Miranda <miranda@adacore.com>
5982 * exp_disp.adb: Fix comment.
5983 * exp_pakd.adb: Minor reformatting.
5985 2014-07-17 Robert Dewar <dewar@adacore.com>
5987 * bindgen.adb (Gen_Elab_Calls): Skip reference to elab
5988 entity if none exists (Gen_Elab_Calls): Complain if clash with
5989 No_Multiple_Elaboration.
5990 * s-rident.ads, restrict.ads: Add restriction No_Multiple_Elaboration.
5991 * sem_util.adb (Build_Elaboration_Entity): Skip building entity
5993 * gnat_rm.texi: Document restriction No_Multiple_Elaboration.
5994 * sem_ch4.adb: Minor comment updates.
5996 2014-07-17 Ed Schonberg <schonberg@adacore.com>
5998 * exp_ch9.adb (Buid_Protected_Subprogram_Call): Preserve type
5999 of function call for later use when shared passive objects
6002 2014-07-17 Hristian Kirtchev <kirtchev@adacore.com>
6004 * par-ch13.adb (Get_Aspect_Specifications):
6005 Catch a case where the argument of SPARK aspect Refined_State
6006 is not properly parenthesized.
6008 2014-07-17 Hristian Kirtchev <kirtchev@adacore.com>
6010 * exp_ch6.adb (Expand_Ctrl_Function_Call): Do not extend
6011 the lifetime of a reference to an Ada 2012 container element.
6012 (Is_Element_Reference): New routine.
6014 2014-07-17 Robert Dewar <dewar@adacore.com>
6016 * ali.ads: Minor comment fix.
6017 * lib-writ.adb: Minor reformatting.
6019 2014-07-17 Ed Schonberg <schonberg@adacore.com>
6021 * sem_ch10.adb (Analyze_Proper_Body): When analyzing a subunit
6022 in ASIS mode, load another subunit only if it a subunit of the
6023 current one, not a sibling that has been reached through the
6024 analysis of an ancestor. This allows the construction of the
6025 ASIS tree for the subunit even when sibling subunits have errors.
6027 2014-07-17 Hristian Kirtchev <kirtchev@adacore.com>
6029 * sem_ch3.adb (Analyze_Declarations): Remove the guard which
6030 prevents the analysis of various contracts when the associated
6031 construct is erroneous.
6032 * sem_util.adb (Save_SPARK_Mode_And_Set): Do not query the
6033 SPARK_Pragma of an illegal or a partially decorated construct.
6035 2014-07-17 Robert Dewar <dewar@adacore.com>
6037 * s-imguns.ads: Minor reformatting.
6039 2014-07-17 Hristian Kirtchev <kirtchev@adacore.com>
6041 * exp_ch7.adb (Build_Finalization_Master): Move all local
6042 variables to the proper code section. When looking for an existing
6043 finalization master, inspect the ultimate ancestor type of the
6045 * sem_util.ads, sem_util.adb (Root_Type_Of_Full_View): New routine.
6047 2014-07-17 Robert Dewar <dewar@adacore.com>
6049 * aspects.ads, aspects.adb: Add entries for aspect Annotate.
6050 * gnat_rm.texi: Document Entity argument for pragma Annotate and
6052 * sem_ch13.adb (Analyze_Aspect_Specification): Add processing
6053 for Annotate aspect.
6054 * sem_prag.adb (Analyze_Pragma, case Annotate): Allow optional
6055 Entity argument at end.
6056 * sinfo.ads (N_Aspect_Specification): Add note on Annotate aspect.
6058 2014-07-17 Tristan Gingold <gingold@adacore.com>
6060 * s-imguns.ads: Fix minor typo.
6062 2014-07-17 Thomas Quinot <quinot@adacore.com>
6064 * sprint.adb: Minor reformatting.
6066 2014-07-17 Robert Dewar <dewar@adacore.com>
6068 * sprint.adb (Write_Itype): Print proper header for string
6071 2014-07-17 Steve Baird <baird@adacore.com>
6073 * sinfo.ads, sem_scil.ads: Improve comments, minor reformatting.
6075 2014-07-17 Vincent Celier <celier@adacore.com>
6077 * gnatbind.adb: Change in message "try ... for more information".
6079 2014-07-17 Robert Dewar <dewar@adacore.com>
6081 * sprint.adb: Code clean up.
6083 2014-07-17 Hristian Kirtchev <kirtchev@adacore.com>
6085 * exp_ch7.adb (Find_Last_Init): Relocate local variables to
6086 the relevant code section. Add new local constant Obj_Id. When
6087 a limited controlled object is initialized by a function call,
6088 the build-in-place object access function call acts as the last
6089 initialization statement.
6090 * exp_util.adb (Is_Object_Access_BIP_Func_Call): New routine.
6091 (Is_Secondary_Stack_BIP_Func_Call): Code reformatting.
6092 * exp_util.ads (Is_Object_Access_BIP_Func_Call): New routine.
6094 2014-07-17 Ed Schonberg <schonberg@adacore.com>
6096 * sem_ch8.adb (Analyze_Generic_Renaming): For generic subprograms,
6097 propagate intrinsic flag to renamed entity, to allow e.g. renaming
6098 of Unchecked_Conversion.
6099 * sem_ch3.adb (Analyze_Declarations): Do not analyze contracts
6100 if the declaration has errors.
6102 2014-07-17 Ed Schonberg <schonberg@adacore.com>
6104 * a-rbtgbk.adb: a-rbtgbk.adb (Generic_Insert_Post): Check whether
6105 container is busy before checking whether capacity allows for
6106 a further insertion. Insertion in a busy container that is full
6107 raises Program_Error rather than Capacity_Error. Previous to that
6108 patch which exception was raised varied among container types.
6110 2014-07-17 Robert Dewar <dewar@adacore.com>
6112 * g-comlin.ads, g-comlin.adb: Minor clean up.
6114 2014-07-17 Bob Duff <duff@adacore.com>
6116 * gnat_ugn.texi: Update gnatpp doc.
6118 2014-07-17 Robert Dewar <dewar@adacore.com>
6120 * gnat_rm.texi: Document new restriction No_Long_Long_Integers.
6121 * exp_ch4.adb (Make_Array_Comparison_Op): Add note that we
6122 could do this by actually expanding a real generic.
6123 * a-tags.ads: Add comments about performance.
6124 * sprint.adb (Sprint_Node_Actual, case N_Object_Declaration):
6125 Print Etype of defining identifier, rather than the object
6126 definition. More information.
6128 2014-07-17 Thomas Quinot <quinot@adacore.com>
6130 * exp_dist.adb: Minor documentation clarification.
6132 2014-07-17 Hristian Kirtchev <kirtchev@adacore.com>
6134 * exp_util.adb (Is_Aliased): Revert previous change.
6136 2014-07-17 Vincent Celier <celier@adacore.com>
6138 * g-comlin.adb (Try_Help): New procedure.
6139 (Getopt): Use new procedure Try_Help.
6140 * g-comlin.ads (Try_Help): New procedure.
6142 2014-07-17 Bob Duff <duff@adacore.com>
6144 * gnat_ugn.texi: Minor update.
6146 2014-07-17 Robert Dewar <dewar@adacore.com>
6148 * gnat_rm.texi: Improve documentation of Unrestricted_Access.
6149 * sinfo.ads: Document restriction on aggregates (must expand to
6150 assignments if one or more assignments needs expansion, e.g. for
6152 * sem_ch13.adb: All warning messages regarding bit order should
6154 * gnat_ugn.texi: Minor correction of missing @ on @code
6156 2014-07-17 Robert Dewar <dewar@adacore.com>
6158 * restrict.ads (Implementation_Restriction): Add No_Long_Long_Integer.
6159 * s-rident.ads (Partition_Boolean_Restrictions): Add
6160 No_Long_Long_Integer.
6161 * sem_ch3.adb (Modular_Type_Declaration): Size must be <=
6162 Long_Integer'Size if restriction No_Long_Long_Integer is active.
6163 (Signed_Integer_Type_Declaration): Do not allow Long_Long_Integer
6164 as the implicit base type for a signed integer type declaration
6165 if restriction No_Long_Long_Integer is active.
6166 * sem_util.ads, sem_util.adb (Set_Entity_With_Checks): Include check for
6167 No_Long_Long_Integer.
6169 2014-07-17 Robert Dewar <dewar@adacore.com>
6171 * sem_ch3.adb, a-ztexio.ads, exp_imgv.adb, casing.adb, casing.ads,
6172 einfo.ads, checks.adb, sem_ch12.adb, a-textio.ads, freeze.adb,
6173 repinfo.adb, exp_ch6.adb, sem_ch4.adb, a-witeio.ads, sem_ch8.adb,
6174 sem_warn.adb, exp_aggr.adb, exp_dist.adb, par-tchk.adb, s-fatgen.adb,
6175 treepr.adb, lib-xref.adb: Remove the word kludge from ada sources.
6177 2014-07-17 Robert Dewar <dewar@adacore.com>
6179 * debug.adb: Remove -gnatdQ.
6180 * exp_disp.adb: Remove -gnatdQ.
6181 * a-ztenio.ads, a-wtinio.ads, a-wtmoio.ads, a-ztcoau.ads, a-tiinio.ads,
6182 a-wtfiio.ads, a-timoio.ads, sem_ch12.adb, a-tifiio.ads, a-ztinio.ads,
6183 rtsfind.adb, rtsfind.ads, a-ztmoio.ads, a-wtdeio.ads, a-ztfiio.ads,
6184 a-tideio.ads, a-wtflio.ads, a-ztdeio.ads, sem_ch8.adb, a-tiflio.ads,
6185 sprint.adb, a-ztflio.ads, snames.ads-tmpl, a-wtenio.ads,
6186 a-tienio.ads: Rename Text_IO_Kludge to Text_IO_Special_Unit.
6188 2014-07-17 Robert Dewar <dewar@adacore.com>
6190 * back_end.adb: Minor reformatting and comment additions.
6191 * checks.ads, checks.adb (Duplicated_Tag_Checks_Suppressed): New
6193 * exp_disp.adb (Make_DT): Use Duplicated_Tag_Checks_Suppressed.
6194 (Make_VM_TSD): Use Duplicated_Tag_Checks_Suppressed.
6195 * gnat_rm.texi: Document new check Duplicated_Tag_Checks_Suppressed.
6196 * gnat_ugn.texi: Additional documentation for Duplicated_Tag_Check.
6197 * snames.ads-tmpl (Duplicated_Tag_Checks_Suppressed): New check.
6198 * types.ads (Duplicated_Tag_Checks_Suppressed): New check.
6200 2014-07-17 Robert Dewar <dewar@adacore.com>
6202 * gnat_rm.texi: Minor comment updates.
6204 2014-07-17 Ed Schonberg <schonberg@adacore.com>
6206 * sem_util.adb (Make_Explicit_Dereference): If the expression
6207 being dereferenced is a generalized indexing, reset the overloaded
6208 flag on the generalized indexing call, consistent with the
6209 resetting of the flag on the original indexed component.
6211 2014-07-17 Robert Dewar <dewar@adacore.com>
6213 * gnat_ugn.texi: Document advise not to mix -gnatV? and
6216 2014-07-17 Robert Dewar <dewar@adacore.com>
6218 * checks.adb (Insert_Valid_Check): Don't insist on a name
6219 for the prefix when we make calls to Force_Evaluation and
6220 Duplicate_Subexpr_No_Checks.
6221 * exp_util.adb (Is_Volatile_Reference): Handle all cases properly
6222 (Remove_Side_Effects): Handle all volatile references right
6223 (Side_Effect_Free): Volatile reference is never side effect free
6224 * sinfo.ads (N_Attribute_Reference): Add comments explaining
6225 that in the tree, the prefix can be a general expression.
6227 2014-07-17 Hristian Kirtchev <kirtchev@adacore.com>
6229 * sem_ch6.adb (Analyze_Subprogram_Body_Contract,
6230 Analyze_Subprogram_Contract): Add comments on SPARK_Mode save/restore.
6231 * sem_ch7.adb (Analyze_Package_Body_Contract,
6232 Analyze_Package_Contract): Add comments on SPARK_Mode save/restore.
6234 2014-07-17 Robert Dewar <dewar@adacore.com>
6236 * exp_ch7.ads, exp_util.ads: Document Insert_Action_After,
6237 Store_After_Actions_In_Scope.
6239 2014-07-17 Robert Dewar <dewar@adacore.com>
6241 * sem_aux.ads: Minor comment addition.
6243 2014-07-17 Ed Schonberg <schonberg@adacore.com>
6245 * sem_res.adb (Make_Call_Into_Operator): If the call is already
6246 a rewriting of an operator node, there are no actuals to be
6247 propagated from original node to rewritten node when in ASIS mode.
6249 2014-07-17 Hristian Kirtchev <kirtchev@adacore.com>
6251 * sem_ch6.adb (Analyze_Subprogram_Body_Contract,
6252 Analyze_Subprogram_Contract): Add new local variable Mode. Save
6253 and restore the SPARK mode of the related construct in a
6255 * sem_ch7.adb (Analyze_Package_Body_Contract,
6256 Analyze_Package_Contract): Add new local variable Mode. Save and
6257 restore the SPARK mode of the related construct in a stack-like fashion.
6258 * sem_util.adb Remove with and use clause for Opt.
6259 (Restore_SPARK_Mode): New routine.
6260 (Save_SPARK_Mode_And_Set): New routine.
6261 * sem_util.ads Add with and use clause for Opt.
6262 (Restore_SPARK_Mode): New routine.
6263 (Save_SPARK_Mode_And_Set): New routine.
6265 2014-07-17 Hristian Kirtchev <kirtchev@adacore.com>
6267 * exp_util.adb (Is_Aliased): Transient objects
6268 within an expression with actions cannot be considered aliased.
6270 2014-07-17 Thomas Quinot <quinot@adacore.com>
6272 * sem.ads (Scope_Stack_Entry): Reorganize storage of action lists;
6273 introduce a new list (cleanup actions) for each (transient) scope.
6274 * sinfo.ads, sinfo.adb (Cleanup_Actions): New attribute for
6276 * exp_ch7.ads (Store_Cleanup_Actions_In_Scope): New subprogram.
6277 * exp_ch7.adb (Store_Actions_In_Scope): New subprogram, common
6278 processing for Store_xxx_Actions_In_Scope.
6279 (Build_Cleanup_Statements): Allow for a list of additional
6280 cleanup statements to be passed by the caller.
6281 (Expand_Cleanup_Actions): Take custom cleanup actions associated
6282 with an N_Block_Statement into account.
6283 (Insert_Actions_In_Scope_Around): Account for Scope_Stack_Entry
6284 reorganization (refactoring only, no behaviour change).
6285 (Make_Transient_Block): Add assertion to ensure that the current
6286 scope is indeed a block (namely, the entity for the transient
6287 block being constructed syntactically, which has already been
6288 established as a scope). If cleanup actions are present in the
6289 transient scope, transfer them now to the transient block.
6290 * exp_ch6.adb (Expand_Protected_Subprogram_Call): Freeze the
6291 called function while it is still present as the name in a call
6292 in the tree. This may not be the case later on if the call is
6293 rewritten into a transient block.
6294 * exp_smem.adb (Add_Shared_Var_Lock_Procs): The post-actions
6295 inserted after calling a protected operation on a shared passive
6296 protected must be performed in a block finalizer, not just
6297 inserted in the tree, so that they are executed even in case of
6298 a normal (RETURN) or abnormal (exception) transfer of control
6299 outside of the current scope.
6300 * exp_smem.ads (Add_Shared_Var_Lock_Procs): Update documentation
6301 * sem_ch8.adb, expander.adb, exp_ch11.adb: Adjust for
6302 Scope_Stack_Entry reorganization.
6304 2014-07-17 Thomas Quinot <quinot@adacore.com>
6306 * exp_disp.adb (Make_DT, Make_VM_TSD): Do not omit Check_TSD
6307 call for types that do not have an explicit attribute definition
6308 clause for External_Tag, as their default tag may clash with an
6309 explicit tag defined for some other type.
6311 2014-07-17 Hristian Kirtchev <kirtchev@adacore.com>
6313 * exp_util.adb (Is_Controlled_Function_Call): Recognize a
6314 controlled function call with multiple actual parameters that
6315 appears in Object.Operation form.
6317 2014-07-17 Thomas Quinot <quinot@adacore.com>
6319 * einfo.ads, einfo.adb (Has_External_Tag_Rep_Clause): Remove
6321 * sem_ch13.adb (Analyze_Attribute_Definition_Clause, case
6322 External_Tag): No need to set entity flag.
6323 * sem_aux.ads, sem_aux.adb (Has_External_Tag_Rep_Clause):
6324 Reimplement correctly in terms of Has_Rep_Item.
6326 2014-07-17 Thomas Quinot <quinot@adacore.com>
6328 * exp_ch7.adb (Establish_Transient_Scope.Find_Node_To_Be_Wrapped):
6329 Start examining the tree at the node passed to
6330 Establish_Transient_Scope (not its parent).
6331 * exp_ch6.adb (Make_Build_In_Place_Call_In_Object_Declaration):
6332 The access type for the variable storing the reference to
6333 the call must be declared and frozen prior to establishing a
6335 * exp_ch9.adb: Minor reformatting.
6337 2014-07-17 Pascal Obry <obry@adacore.com>
6339 * s-os_lib.ads: Minor comment update.
6341 2014-07-17 Tristan Gingold <gingold@adacore.com>
6343 * sysdep.c: Add ATTRIBUTE_UNUSED to avoid warnings. Fix some
6345 * socket.c: Remove #warning to avoid warning.
6346 * expect.c: Indent some preprocessor directives to clarify
6347 nested if. Do not use wait.h on PikeOS. Add ATTRIBUTE_UNUSED
6349 * env.c: Fix indentation. Port to PikeOS.
6350 * gsocket.h: Port to PikeOS. Remove #warning.
6351 * terminals.c: Port to PikeOS. Fix indentation of the stubs.
6352 Add ATTRIBUTE_UNUSED to stubs arguments. Fix return statement
6353 of stubbed __gnat_setup_parent_communication.
6354 * adaint.c: Port to PikeOS. Reindent some preprocessor
6355 directives to clarify nested if. Fix indentation. Add missing
6358 2014-07-17 Robert Dewar <dewar@adacore.com>
6360 * sem_attr.adb: Minor reformatting.
6362 2014-07-17 Robert Dewar <dewar@adacore.com>
6364 * exp_ch7.adb, exp_ch7.ads, sinfo.ads: Minor reformatting.
6366 2014-07-17 Ed Schonberg <schonberg@adacore.com>
6368 * sem_case.adb (Check_Choice_Set): If the case expression is the
6369 expression in a predicate, do not recheck coverage against itself,
6370 to prevent spurious errors.
6371 * sem_ch13.adb (Check_Aspect_At_End_Of_Declarations): Indicate that
6372 expression comes from an aspect specification, to prevent spurious
6373 errors when expression is a case expression in a predicate.
6375 2014-07-17 Pascal Obry <obry@adacore.com>
6377 * adaint.c, adaint.h (__gnat_set_executable): Add mode parameter.
6378 * s-os_lib.ads, s-os_lib.adb (Set_Executable): Add Mode parameter.
6380 2014-07-17 Vincent Celier <celier@adacore.com>
6382 * gnatchop.adb, make.adb, gnatbind.adb, clean.adb, gprep.adb,
6383 gnatxref.adb, gnatls.adb, gnatfind.adb, gnatname.adb: Do not output
6384 the usage for an erroneous invocation of a gnat tool.
6386 2014-07-16 Vincent Celier <celier@adacore.com>
6388 * gnatls.adb: Get the target parameters only if -nostdinc was
6391 2014-07-16 Ed Schonberg <schonberg@adacore.com>
6393 * checks.adb (Insert_Valid_Check): If the expression is a packed
6394 component of a modular type of the right size the data is always
6395 valid. This os particularly useful if the component is part of
6396 a volatile variable.
6398 2014-07-16 Robert Dewar <dewar@adacore.com>
6400 * gnat_rm.texi, sinfo.ads, freeze.adb, exp_aggr.adb: Minor reformatting
6402 2014-07-16 Thomas Quinot <quinot@adacore.com>
6404 * exp_ch7.ads: Minor documentation fix.
6406 2014-07-16 Ed Schonberg <schonberg@adacore.com>
6408 * sem_ch3.adb (Find_Type_Name): Diagnose properly
6409 a private extension completion that is an interface definition
6410 with an interface list.
6412 2014-07-16 Arnaud Charlet <charlet@adacore.com>
6414 * gnatls.adb (Gnatls): Code clean ups.
6416 2014-07-16 Thomas Quinot <quinot@adacore.com>
6418 * sinfo.ads, sinfo.adb (N_Compound_Statement): New node kind.
6419 * sem.adb (Analyze): Handle N_Compound_Statement.
6420 * sprint.adb (Sprint_Node_Actual): Ditto.
6421 * sem_ch5.ads, sem_ch5.adb (Analyze_Compound_Statement): New
6422 procedure to handle N_Compound_Statement.
6423 * exp_aggr.adb (Collect_Initialization_Statements):
6424 Use a proper compound statement node, instead of a bogus
6425 expression-with-actions with a NULL statement as its expression,
6426 to wrap collected initialization statements.
6427 * freeze.ads, freeze.adb
6428 (Explode_Initialization_Compound_Statement): New public procedure,
6429 lifted from Freeze_Entity.
6430 (Freeze_Entity): When freezing
6431 an object with captured initialization statements and without
6432 delayed freezing, explode compount statement.
6433 * sem_ch4.adb (Analyze_Expression_With_Actions): Remove special
6434 case that used to handle bogus EWAs with NULL statement as
6436 * exp_ch13.adb (Expand_N_Freeze_Entity): For an object with
6437 delayed freezing and captured initialization statements, explode
6440 2014-07-16 Gary Dismukes <dismukes@adacore.com>
6442 * g-rewdat.adb, g-rewdat.ads: Minor reformatting.
6444 2014-07-16 Doug Rupp <rupp@adacore.com>
6446 * s-interr-hwint.adb: Casing error on parameter.
6448 2014-07-16 Pascal Obry <obry@adacore.com>
6450 * Makefile.rtl: Add g-rewdat.o dependencies in
6451 GNATRTL_NONTASKING_OBJS.
6453 2014-07-16 Ed Schonberg <schonberg@adacore.com>
6455 * sem_case.adb: Code clean up.
6457 2014-07-16 Vincent Celier <celier@adacore.com>
6459 * make.adb: Do not read gnat.adc when gnatmake is invoked
6462 2014-07-16 Pascal Obry <obry@adacore.com>
6464 * gnat_rm.texi, impunit.adb, g-rewdat.adb, g-rewdat.ads: Initial
6465 implementation of GNAT.Rewrite_Data.
6467 2014-07-16 Vincent Celier <celier@adacore.com>
6469 * gnatls.adb (Normalize): New function.
6470 (Gnatls): Get the target parameters. On targets other than VMS,
6471 normalize the path names in the source search path, the object search
6472 path and the project search path.
6474 2014-07-16 Ed Schonberg <schonberg@adacore.com>
6476 * sem_case.adb: Avoid self-checking of case expressions in
6479 2014-07-16 Robert Dewar <dewar@adacore.com>
6481 * gnat_rm.texi: Document effect of Suppress_Initialization on tags and
6484 2014-07-16 Eric Botcazou <ebotcazou@adacore.com>
6486 * switch-b.adb (Scan_Binder_Switches): Add missing guard.
6488 2014-07-16 Ben Brosgol <brosgol@adacore.com>
6490 * gnat_ugn.texi: Fix typo.
6492 2014-07-16 Ed Schonberg <schonberg@adacore.com>
6494 * exp_ch4.adb (Expand_N_Case_Expression): Do not expand case
6495 expression if it is the specification of a subtype predicate:
6496 it will be expanded when the return statement is analyzed, or
6497 when a static predicate is transformed into a static expression
6498 for evaluation by the front-end.
6499 * sem_ch13.adb (Get_RList): If the expression for a static
6500 predicate is a case expression, extract the alternatives of the
6501 branches with a True value to create the required statically
6502 evaluable expression.
6504 2014-07-16 Thomas Quinot <quinot@adacore.com>
6506 * exp_prag.adb (Expand_Pragma_Check): Use the location of the
6507 expression, not the location of the aspect, for all generated
6508 code, so that in particular the call to raise_assert_failure
6509 gets the sloc of the associated condition.
6511 (Expand_Subprogram_Contract.Build_Postconditions_Procedure):
6512 Set an explicit End_Label on the handled sequence of statements
6513 for the _Postconditions procedure so that the implicit return
6514 statement does not erroneously get associated with code generated
6515 for the last condition in postconditions.
6517 2014-07-16 Thomas Quinot <quinot@adacore.com>
6519 * ug_words: Fix name of VMS synonym for -gnatw.z (SIZE_ALIGNMENT,
6520 not SIZE_ALIGN) and -gnatw.Z (NOSIZE_ALIGNMENT, not NOSIZE_ALIGN).
6521 * vms_data.ads: Add missing spaces in VMS synonyms for -gnatw.z /
6524 2014-07-16 Robert Dewar <dewar@adacore.com>
6526 * sem_ch3.adb, sem_prag.adb, sem_util.adb, sem_res.adb, sem_ch13.adb:
6527 Minor code reorganization (use Is_Access_Type, not in Access_Kind).
6528 * exp_ch3.adb: Minor code reorganization, use Is_Access_Type,
6530 * par-ch4.adb (At_Start_Of_Attribute): New function
6531 (P_Simple_Expression): Better msg for bad attribute prefix.
6532 * scans.ads: Minor reformatting.
6534 2014-07-16 Ed Schonberg <schonberg@adacore.com>
6536 * sem_attr.adb (Resolve_Attribute, case 'Update): If choice is a
6537 static constant, check that in belongs to the corresponding index
6538 subtype, to produce the proer warning when expansion is disabled.
6540 2014-07-16 Robert Dewar <dewar@adacore.com>
6542 * freeze.adb (Freeze_Entity): Warn on incompatible size/alignment.
6543 * gnat_ugn.texi: Document -gnatw.z and -gnatw.Z.
6544 * ug_words: VMS synonyms (WARNINGS=[NO]SIZE_ALIGN) for -gnatw.z/-gnatw.Z
6545 * usage.adb: Add lines for -gnatw.z/-gnatw.Z.
6546 * vms_data.ads: VMS synonyms (WARNINGS=[NO]SIZE_ALIGN) for
6548 * warnsw.adb: Set Warn_On_Size_Alignment appropriately.
6549 * warnsw.ads (Warn_On_Size_Alignment): New flag Minor
6552 2014-07-16 Hristian Kirtchev <kirtchev@adacore.com>
6554 * exp_ch7.adb (Process_Declarations): Reinstate the check on
6555 a hook object to ensure that the related transient declaration
6557 * exp_util.adb (Is_Aliased): Do not consider expresison with
6558 actions as a special context.
6559 (Requires_Cleanup_Actions): Reinstate the check on a hook object to
6560 ensure that the related transient declaration is finalizable.
6562 2014-07-16 Robert Dewar <dewar@adacore.com>
6564 * checks.ads, checks.adb (Allocation_Checks_Suppressed): New function.
6565 * snames.ads-tmpl: Add Allocation_Check to list of check names.
6566 * types.ads: Add Allocation_Check to list of check names.
6568 2014-07-16 Thomas Quinot <quinot@adacore.com>
6570 * sem_util.adb (Enter_Name): replace bogus test for presence of
6571 Corresponding_Remote_Type with correct test on Ekind.
6572 * sem_res.adb (Valid_Conversion): ditto; also clarify validity
6573 of calls to Corresponding_ Remote_Type (documentation fix).
6575 2014-07-16 Robert Dewar <dewar@adacore.com>
6577 * gnat_rm.texi: Document illegal case of Unrestricted_Access.
6578 * sem_attr.adb (Analyze_Access_Attribute): Set_Non_Aliased_Prefix
6580 (Resolve_Attribute, case Access): Flag illegal Unrestricted_Access use.
6581 * sinfo.ads, sinfo.adb (Non_Aliased_Prefix): New flag.
6583 2014-07-16 Robert Dewar <dewar@adacore.com>
6585 * gnat_ugn.texi: Document binder switch -Ra.
6586 * gnatbind.adb (List_Closure_Display): Implement -Ra switch
6588 * opt.ads (List_Closure_All): New switch.
6589 * switch-b.adb (Scan_Binder_Switches): Recognize -Ra to set
6592 2014-07-16 Ben Brosgol <brosgol@adacore.com>
6594 * gnat_rm.texi: Minor edits, to make case consistent in names
6595 of types and fields.
6597 2014-07-16 Robert Dewar <dewar@adacore.com>
6599 * gnat_rm.texi: Document erroneous mixing of thin pointers and
6601 * gnat_ugn.texi: Add note on size of access types about thin
6602 pointers and the use of attribute Unrestricted_Access.
6604 2014-07-16 Ed Schonberg <schonberg@adacore.com>
6606 * a-cbdlli.ads, a-cbdlli.adb, a-cbhama.ads, a-cbhama.adb,
6607 * a-cbhase.ads, a-cbhase.adb, a-cborma.ads, a-cborma.adb,
6608 * a-cborse.ads, a-cborse.adb, a-cobove.ads a-cobove.adb: Add Control
6609 machinery to detect tampering on bounded vectors.
6611 2014-07-16 Robert Dewar <dewar@adacore.com>
6613 * gnat_rm.texi: Document that leading/trailing asterisks are
6614 now implied for the pattern match string for pragma Warnings
6615 and Warning_As_Error.
6616 * sem_prag.adb (Acquire_Warning_Match_String): New procedure.
6617 (Analyze_Pragma, case Warning_As_Error): Call
6618 Acquire_Warning_Match_String.
6619 (Analyze_Pragma, case Warnings): Call Acquire_Warning_Match_String.
6621 2014-07-16 Bob Duff <duff@adacore.com>
6623 * gnat_ugn.texi: Document need for project file
6624 for --incremental switch for gnat2xml.
6626 2014-07-16 Robert Dewar <dewar@adacore.com>
6628 * gnat_rm.texi: Fix example of non-packable components in packed
6631 2014-07-16 Robert Dewar <dewar@adacore.com>
6633 * s-tpoben.adb, s-tasren.adb, s-interr.adb, s-interr-hwint.adb,
6634 s-shasto.adb, s-interr-vms.adb, s-interr-sigaction.adb: Avoid use of
6635 upper case in exception messages.
6637 2014-07-16 Robert Dewar <dewar@adacore.com>
6639 * snames.ads-tmpl, sem_attr.adb, exp_attr.adb: Same_Storage attribute
6640 is renamed Has_Same_Storage.
6641 * gnat_rm.texi: Document missing SPARK pragmas and attributes.
6642 * sem_prag.adb: Minor comment fix (use LOCAL_NAME in syntax
6645 2014-07-16 Robert Dewar <dewar@adacore.com>
6647 * exp_util.adb, sem_attr.adb, exp_ch4.adb, a-cohase.ads,
6648 a-coinho-shared.adb, a-coinho-shared.ads: Minor reformatting.
6650 2014-07-16 Robert Dewar <dewar@adacore.com>
6652 * gnat_ugn.texi: Add note that integrated
6653 preprocessing cannot be applied to configuration pragma files.
6655 2014-07-16 Yannick Moy <moy@adacore.com>
6657 * sem_attr.adb (Analyze_Attribute/cases Pred
6658 and Succ): Always enable range check on fixed-point types if
6659 not suppressed for the type.
6661 2014-07-16 Hristian Kirtchev <kirtchev@adacore.com>
6663 * sem_util.adb (State_Has_Enabled_Property):
6664 Account for an external property denoted by an others choice.
6666 2014-07-16 Hristian Kirtchev <kirtchev@adacore.com>
6668 * exp_ch4.ads, exp_ch4.adb (Find_Hook_Context): Relocated to Exp_Util.
6669 * exp_ch7.adb (Process_Declarations): There is no need to check
6670 that a transient object being hooked is controlled as it would
6671 not have been hooked in the first place.
6672 * exp_ch9.adb Remove with and use clause for Exp_Ch4.
6673 * exp_util.adb (Find_Hook_Context): Relocated from Exp_Ch4.
6674 (Is_Aliased): A renaming of a transient controlled object is
6675 not considered aliasing when it occurs within an expression
6677 (Requires_Cleanup_Actions): There is no need to
6678 check that a transient object being hooked is controlled as it
6679 would not have been hooked in the first place.
6680 * exp_util.ads (Find_Hook_Context): Relocated from Exp_Ch4.
6682 2014-07-16 Hristian Kirtchev <kirtchev@adacore.com>
6684 * sem_ch13.adb (Insert_After_SPARK_Mode): Moved to
6685 the outer level of routine Analyze_Aspect_Specifications. Ensure
6686 that the corresponding pragmas of aspects Initial_Condition and
6687 Initializes are inserted after pragma SPARK_Mode.
6689 2014-07-16 Ed Schonberg <schonberg@adacore.com>
6691 * sem_attr.adb (Analyze_Attribute, case 'Update): Handle
6692 properly a choice list with more than one choice, where each
6693 is an aggregate denoting a sequence of array indices for a
6694 multidimentional array. For SPARK use.
6696 2014-07-16 Vadim Godunko <godunko@adacore.com>
6698 * a-coinho-shared.adb (Adjust): Create
6699 copy of internal shared object and element when source container
6702 (Query_Element): Likewise.
6703 (Update_Element): Likewise.
6704 (Constant_Reference): Likewise. Raise Constraint_Error on attempt
6705 to get reference for empty holder.
6706 (Reference): Likewise.
6708 2014-07-16 Thomas Quinot <quinot@adacore.com>
6710 * exp_ch4.adb (Find_Hook_Context): New subprogram, extracted
6711 from Process_Transient_Oject.
6712 * exp_ch4.ads: Ditto.
6713 * exp_ch9.adb (Build_Class_Wide_Master): Insert the _master
6714 declaration as an action on the topmost enclosing expression,
6715 not on a possibly conditional subexpreession.
6717 2014-07-16 Vadim Godunko <godunko@adacore.com>
6719 * a-coinho.adb, a-coinho-shared.adb, a-coinho.ads, a-coinho-shared.ads:
6720 Fix parameter mode of Update_Element.
6722 2014-07-16 Robert Dewar <dewar@adacore.com>
6724 * a-coinho.adb, a-coinho-shared.adb, a-coinho-shared.ads: Minor
6727 2014-07-16 Ed Schonberg <schonberg@adacore.com>
6729 * a-cohase.ads: Type Iterator must be controlled, so that the
6730 tampering bit is properly set through an iteration.
6731 * a-cohase.adb: Add Finalize operation for type Iterator.
6733 2014-07-16 Ed Schonberg <schonberg@adacore.com>
6735 * a-coinho-shared.adb, a-coinho-shared.ads: Proper structures for
6738 2014-07-16 Ed Schonberg <schonberg@adacore.com>
6740 * a-coinho-shared.adb: Fix spurious accessibility check.
6742 2014-06-15 Jan Hubicka <hubicka@ucw.cz>
6744 * gcc-interface/utils.c (process_attributes): Use set_decl_tls_model.
6746 2014-06-14 Bernd Edlinger <bernd.edlinger@hotmail.de>
6749 * gnat_rm.texi: Fix errors with makeinfo 5.1.
6751 2014-06-14 Arnaud Charlet <charlet@adacore.com>
6754 * gnat_rm.texi: Attempt to fix error with makeinfo 5.1.
6756 2014-06-13 Yannick Moy <moy@adacore.com>
6758 * exp_attr.adb: Fix typo in comment.
6759 * gnat1drv.adb (Adjust_Global_Switches): Force float overflow
6760 checking in GNATprove_Mode.
6762 2014-06-13 Ed Schonberg <schonberg@adacore.com>
6764 * a-coinho-shared.adb, a-coinho-shared.ads: Update shared version.
6766 2014-06-13 Robert Dewar <dewar@adacore.com>
6768 * sem_ch3.adb, sem_ch9.adb, a-coinho.adb, a-coinho.ads: Minor
6771 2014-06-13 Hristian Kirtchev <kirtchev@adacore.com>
6773 * sem_prag.adb (Analyze_Pragma): Add local
6774 variable Missing_Parentheses. Emit an error when a state
6775 declaration with options appears without parentheses. Add a
6776 guard to prevent a bogus error when a state declaration may be
6777 interpreted as an option if a previous declaration with options
6778 was not parenthesized.
6780 2014-06-13 Robert Dewar <dewar@adacore.com>
6782 * checks.adb: Validate_Alignment_Check_Warnings: New procedure
6783 (Apply_Address_Clause_Check): Make Aligment_Warnings table entry.
6784 * checks.ads (Alignment_Warnings_Record): New type.
6785 (Alignment_Warnings): New table
6786 (Validate_Alignment_Check_Warnings): New procedure.
6787 * errout.adb (Delete_Warning_And_Continuations): New procedure
6788 (Error_Msg_Internal): Set Warning_Msg (Delete_Warning): Handle
6789 Warnings_Treated_As_Errors (Finalize): Minor reformatting
6790 * errout.ads (Warning_Msg): New variable
6791 (Delete_Warning_And_Continuations): New procedure
6792 * erroutc.adb (Delete_Msg): Handle Warnings_Treated_As_Errors count.
6793 * gnat1drv.adb (Post_Compilation_Validation_Checks): New procedure.
6795 2014-06-13 Ed Schonberg <schonberg@adacore.com>
6797 * a-coinho.adb, a-coinho.ads: Add Reference machinery.
6799 2014-06-13 Hristian Kirtchev <kirtchev@adacore.com>
6801 * errout.adb (SPARK_Msg_N): New routine.
6802 (SPARK_Msg_NE): New routine.
6803 * errout.ads Add a section on SPARK-related error routines.
6804 (SPARK_Msg_N): New routine.
6805 (SPARK_Msg_NE): New routine.
6806 * sem_ch13.adb (Analyze_Aspect_Specifications): Ensure that
6807 pragma Abstract_State is always inserted after SPARK_Mode.
6808 (Insert_After_SPARK_Mode): New routine.
6809 * sem_prag.adb (Analyze_Abstract_State,
6810 Analyze_Constituent, Analyze_External_Property,
6811 Analyze_External_Property_In_Decl_Part, Analyze_Global_Item,
6812 Analyze_Global_List, Analyze_Initialization_Item,
6813 Analyze_Initialization_Item_With_Inputs, Analyze_Input_Item,
6814 Analyze_Input_List, Analyze_Input_Output, Analyze_Part_Of,
6815 Analyze_Pragma, Analyze_Refined_Depends_In_Decl_Part,
6816 Analyze_Refined_Global_In_Decl_Part,
6817 Analyze_Refined_State_In_Decl_Part, Analyze_Refinement_Clause,
6818 Check_Aspect_Specification_Order, Check_Constituent_Usage,
6819 Check_Declaration_Order, Check_Dependency_Clause,
6820 Check_Duplicate_Mode, Check_Duplicate_Option,
6821 Check_Duplicate_Property, Check_External_Properties,
6822 Check_External_Property, Check_Function_Return,
6823 Check_Matching_Constituent, Check_Matching_State,
6824 Check_Mode_Restriction_In_Enclosing_Context,
6825 Check_Mode_Restriction_In_Function, Check_Refined_Global_Item,
6826 Check_State_And_Constituent_Use, Create_Or_Modify_Clause,
6827 Has_Extra_Parentheses, Inconsistent_Mode_Error,
6828 Match_Error, Propagate_Part_Of, Report_Extra_Clauses,
6829 Report_Extra_Constituents_In_List, Report_Extra_Inputs,
6830 Report_Unrefined_States, Report_Unused_Constituents,
6831 Report_Unused_States, Role_Error, Usage_Error):
6832 Convert Error_Msg_XXX calls to SPARK_Msg_XXX calls
6833 to report semantic errors only when SPARK_Mode is on.
6834 (Analyze_Depends_In_Decl_Part): Do not check the syntax of
6835 pragma Depends explicitly, this is now done by the analysis.
6836 (Analyze_Global_In_Decl_List): Do not check the syntax of
6837 pragma Global explicitly, this is now done by the analysis.
6838 (Analyze_Initializes_In_Decl_Part): Do not check the syntax of
6839 pragma Initializes explicitly, this is now done by the analysis.
6840 (Analyze_Part_Of): Do not check the syntax of the encapsulating
6841 state, this is now done by the analysis.
6842 (Analyze_Pragma): Do
6843 not check the syntax of a state declaration, this is now done
6845 (Analyze_Refined_Depends_In_Decl_Part): Do not
6846 check the syntax of pragma Refined_Depends explicitly, this is now
6847 done by the analysis.
6848 (Analyze_Refined_Global_In_Decl_Part): Do
6849 not check the syntax of pragma Refined_Global explicitly, this is
6850 now done by the analysis.
6851 (Analyze_Refined_State_In_Decl_Part):
6852 Do not check the syntax of pragma Refined_State explicitly, this
6853 is now done by the analysis.
6854 (Check_Dependence_List_Syntax): Removed.
6855 (Check_Global_List_Syntax): Removed.
6856 (Check_Initialization_List_Syntax): Removed.
6857 (Check_Item_Syntax): Removed.
6858 (Check_Missing_Part_Of): Do not consider items from an instance.
6859 (Check_Refinement_List_Syntax): Removed.
6860 (Check_State_Declaration_Syntax): Removed.
6861 (Collect_Global_List): Do not raise Program_Error when the input is
6863 (Process_Global_List): Do not raise Program_Error when the input
6865 * sem_ch13.adb: Minor reformatting.
6867 2014-06-13 Ed Schonberg <schonberg@adacore.com>
6869 * sem_ch3.adb (Find_Type_Name): Diagnose a private type completion
6870 that is an interface definition with an interface list.
6871 (Process_Full_View): Move error message on missmatched interfaces
6872 between views to the declaration of full view, for clarity.
6873 * sem_ch9.adb (Check_Interfaces): Move error message to full view,
6876 2014-06-13 Robert Dewar <dewar@adacore.com>
6878 * exp_attr.adb (Expand_N_Attribute_Reference, case Pred/Succ): Change
6881 2014-06-13 Robert Dewar <dewar@adacore.com>
6883 * makeutl.adb: Minor reformatting.
6885 2014-06-13 Gail Schenker <schenker@adacore.com>
6887 * debug.adb, sem_eval.adb (Why_Not_Static): Remove temporary code and
6888 associated flag (d.z), no longer needed.
6890 2014-06-13 Ed Schonberg <schonberg@adacore.com>
6892 * sem_ch13.adb (Analyze_Aspect_Specifications): For Import and
6893 Export aspects, do not check whether a corresponding Convention
6894 aspect has been specified. Convention is optional in Ada2012,
6895 and defaults to Convention_Ada.
6897 2014-06-13 Eric Botcazou <ebotcazou@adacore.com>
6899 * checks.adb (Apply_Address_Clause_Check): Only issue the new
6900 warning if the propagation warning is issued.
6902 2014-06-13 Thomas Quinot <quinot@adacore.com>
6904 * exp_ch4.adb: Minor reformatting.
6906 2014-06-13 Robert Dewar <dewar@adacore.com>
6908 * exp_attr.adb (Expand_N_Attribute_Reference, case Pred):
6909 Handle float range check case (Expand_N_Attribute_Reference,
6910 case Succ): Handle float range check case.
6911 * sem_attr.adb (Analyze_Attribute, case Pred/Succ): Handle float
6914 2014-06-13 Vincent Celier <celier@adacore.com>
6916 * makeutl.ads (Compute_Builder_Switches): Change name of
6917 parameter Root_Environment to Env.
6918 * prj-conf.adb (Check_Switches): Call Locate_Runtime with the
6919 Env parameter of procedure Get_Or_Create_Configuration_File.
6920 (Locate_Runtime): Call Find_Rts_In_Path with the Project_Path
6921 of new parameter Env.
6922 * prj-conf.ads (Locate_Runtime): New parameter Env of type
6923 Prj.Tree.Environment.
6925 2014-06-13 Robert Dewar <dewar@adacore.com>
6927 * gnat_rm.texi: Minor comment clarification for Check_Float_Overflow.
6929 2014-06-13 Robert Dewar <dewar@adacore.com>
6931 * exp_attr.adb, exp_ch9.adb, lib-writ.adb, g-comlin.adb: Minor
6933 * sem_attr.adb: Minor code reformatting and simplification.
6934 * checks.adb: Fix minor typo.
6936 2014-06-13 Emmanuel Briot <briot@adacore.com>
6938 * g-comlin.adb (Get_Argument): fix expansion
6939 of command line arguments (e.g. "*.adb") when using a custom
6940 parser. The parser was not passed to the recursive call, and
6941 thus we were trying to do the expansion on the default command
6944 2014-06-13 Thomas Quinot <quinot@adacore.com>
6946 * exp_ch9.adb: Minor reformatting.
6948 2014-06-13 Ed Schonberg <schonberg@adacore.com>
6950 * exp_attr.adb (Expand_N_Attribute_Reference, case 'Old):
6951 To determine whether the attribute should be expanded, examine
6952 whether the enclosing postcondition pragma is to be checked,
6953 rather than using the internal flag Assertions_Enabled.
6955 2014-06-13 Ben Brosgol <brosgol@adacore.com>
6957 * gnat_rm.texi: Minor fixes.
6958 * gnat_ugn.texi: Added a missing "@itemize".
6960 2014-06-13 Robert Dewar <dewar@adacore.com>
6962 * debug.adb: Remove -gnatd.1 flag documentation.
6963 * layout.adb (Layout_Type): Remove special handling of size
6964 for anonymous access type.
6965 * sem_ch3.adb (Replace_Type): Remove special handling of size
6966 for anonymous access type.
6968 2014-06-13 Robert Dewar <dewar@adacore.com>
6970 * debug.adb: Document debug flag -gnatd.1.
6971 * layout.adb (Layout_Type): Size change for anonymous access
6972 types under -gnatd.1.
6973 * sem_ch3.adb (Replace_Type): Size change for anonymous access
6974 types under -gnatd.1.
6976 2014-06-13 Robert Dewar <dewar@adacore.com>
6978 * layout.adb (Layout_Type): Anonymous access types designating
6979 unconstrained arrays are always thin pointers.
6980 * sem_ch3.adb (Replace_Type): Anonymous access types designating
6981 unconstrained arrays are always thin pointers.
6983 2014-06-13 Ed Schonberg <schonberg@adacore.com>
6985 * sem_attr.adb (Analyze_Attribute): Use Check_Parameterless_Call
6986 to resolve the prefix of an attribute that is an entity name
6987 and may be a parameterless call. Minor code reorganization.
6989 2014-06-13 Robert Dewar <dewar@adacore.com>
6991 * lib.ads, lib.adb, lib-writ.adb, lib-load.adb (Is_Compiler_Unit):
6993 * opt.ads (Compiler_Unit): New flag.
6994 * par-ch5.adb (Test_Statement_Required): Call Check_Compiler_Unit
6995 for null statement sequence (not allowed in compiler unit).
6996 * par-prag.adb (Prag): Handle Compiler_Unit[_Warning] during
6998 * restrict.ads, restrict.adb (Check_Compiler_Unit): New version and new
7000 * sem_ch11.adb, sem_ch3.adb, sem_ch4.adb: New calling sequence for
7001 Check_Compiler_Unit.
7002 * sem_ch6.adb (Analyze_Extended_Return_Statement): Call
7003 Check_Compiler_Unit (this construct is not allowed in compiler
7005 * sem_prag.adb (Analyze_Pragma, case Compiler_Unit[_Warning]):
7006 Set Opt.Compiler_Unit.
7008 2014-06-13 Geert Bosch <bosch@adacore.com>
7010 * gnat_rm.texi, s-tasinf-solaris.ads, sem_prag.adb, gnat_ugn.texi,
7011 s-tasinf-mingw.ads, s-tasinf.ads, s-tasinf-linux.ads,
7012 s-tasinf-vxworks.ads: Make Task_Info pragma and package obsolescent.
7014 2014-06-13 Robert Dewar <dewar@adacore.com>
7016 * s-tasini.adb, s-tarest.adb, s-taprob.adb: Minor reformatting.
7018 2014-06-13 Hristian Kirtchev <kirtchev@adacore.com>
7020 * freeze.adb (Freeze_Entity): Remove the check concerning volatile
7021 types in SPARK as it is poorly placed and poorly formulated. The
7022 check was flagging ALL volatile entities as illegal in SPARK.
7023 * sem_prag.adb (Process_Atomic_Shared_Volatile): Flag volatile
7024 types as illegal in SPARK.
7026 2014-06-13 Robert Dewar <dewar@adacore.com>
7028 * sem_cat.adb: Minor reformatting.
7030 2014-06-13 Yannick Moy <moy@adacore.com>
7032 * sem_prag.adb (Analyze_Pragma/Post_Class): Fix typo.
7034 2014-06-13 Arnaud Charlet <charlet@adacore.com>
7036 * gnat_rm.texi: Add detail on SPARK_05 restriction.
7038 2014-06-13 Bob Duff <duff@adacore.com>
7040 * s-solita.adb (Get_Sec_Stack_Addr, Init_Tasking_Soft_Links):
7041 Add assertions requiring the secondary stack to be initialized.
7042 * s-solita.ads (Init_Tasking_Soft_Links): Comment.
7043 * s-taprob.adb, s-tarest.adb, s-tasini.adb (elab code): Make sure the
7044 secondary stack is initialized before calling Init_Tasking_Soft_Links,
7045 by adding pragmas Elaborate_Body.
7047 2014-06-13 Thomas Quinot <quinot@adacore.com>
7049 * sem_ch13.adb (Analyze_Stream_TSS_Definition): Remove temporary
7050 kludge disabling new legality check.
7052 2014-06-13 Hristian Kirtchev <kirtchev@adacore.com>
7054 * freeze.adb (Freeze_Record_Type): Remove checks related to SPARK
7056 (Freeze_Type): Volatile types are now illegal in SPARK.
7058 2014-06-13 Robert Dewar <dewar@adacore.com>
7060 * aspects.ads, aspects.adb: Add aspect Thread_Local_Storage.
7061 * gnat_rm.texi: Document aspect Thread_Local_Storage.
7063 2014-06-13 Ed Schonberg <schonberg@adacore.com>
7065 * sem_cat.adb (Validate_Static_Object_Name): A constant whose
7066 value is a temporary that renames an aggregate is legal in a
7067 preelaborated unit. Illegalities, if any will be detected in
7068 the aggregate components.
7070 2014-06-13 Ed Schonberg <schonberg@adacore.com>
7072 * einfo.ads: Minor reformatting an comment expansion.
7074 2014-06-13 Robert Dewar <dewar@adacore.com>
7076 * back_end.ads, back_end.adb: Make_Id, Make_SC, Set_RND are moved to
7078 * tbuild.ads, tbuild.adb: Make_Id, Make_SC, Set_RND are moved here from
7080 * gnat1drv.adb: Make_Id, Make_SC, Set_RND are moved to Tbuild
7081 * sem_warn.adb: Minor reformatting.
7083 2014-06-13 Doug Rupp <rupp@adacore.com>
7085 * adaint.c (__gnat_open_new_temp) [VMS]: Open binary
7088 2014-06-13 Yannick Moy <moy@adacore.com>
7090 * sem_warn.adb (Check_Unset_References): Take
7091 case of Refined_Post into account in Within_Postcondition check.
7093 2014-06-13 Hristian Kirtchev <kirtchev@adacore.com>
7095 * freeze.adb (Freeze_Record_Type): Volatile types are not allowed in
7098 2014-06-13 Yannick Moy <moy@adacore.com>
7100 * sem_ch13.adb (Analyze_Aspect_Specifications/Aspect_Import,
7101 Aspect_Export): Consider that variables may be set outside the program.
7103 2014-06-13 Robert Dewar <dewar@adacore.com>
7105 * back_end.adb (Make_Id): New function.
7106 (Make_SC): New function.
7107 (Set_RND): New procedure.
7108 * back_end.ads (Make_Id): New function.
7109 (Make_SC): New function.
7110 (Set_RND): New procedure.
7111 * einfo.ads: Minor comment updates.
7112 * frontend.adb: Move Atree.Initialize call to Gnat1drv.
7113 * gnat1drv.adb (Gnat1drv): New calling sequence for
7114 Get_Target_Parameters.
7115 (Gnat1drv): Move Atree.Initialize here from Frontend.
7116 * targparm.adb (Get_Target_Parameters): New calling
7117 sequence (Get_Target_Parameters): Handle pragma Restriction
7119 * targparm.ads (Get_Target_Parameters): New calling sequence.
7121 2014-06-13 Gary Dismukes <dismukes@adacore.com>
7123 * sem_prag.adb (Process_Import_Or_Interface): Exit the homonym
7124 loop if the pragma does not come from source, so that an implicit
7125 pragma Import only applies to the first declaration, avoiding
7126 possible conflicts with earlier explicit and implicit declarations
7127 due to multiple Provide_Shift_Operators pragmas.
7128 (Set_Imported): Remove previous fix that bypassed pragma duplication
7130 * gnat_rm.texi: Change 'equivalent' to 'similar' in description
7131 of Provide_Shift_Operators.
7133 2014-06-12 Jan Hubicka <hubicka@ucw.cz>
7135 * gcc-interface/utils.c (process_attributes) <ATTR_LINK_SECTION>: Pass
7136 string pointer directly to set_decl_section_name.
7138 2014-06-11 Robert Dewar <dewar@adacore.com>
7140 * sem_ch13.adb: Minor reformatting.
7142 2014-06-11 Hristian Kirtchev <kirtchev@adacore.com>
7144 * sem_prag.adb (Check_Clause_Syntax): Add new
7145 local variable Outputs. Account for the case where multiple
7146 output items appear as an aggregate.
7148 2014-06-11 Robert Dewar <dewar@adacore.com>
7150 * sem_warn.adb (Output_Obsolescent_Entity_Warnings): Tag warning
7153 2014-06-11 Ed Schonberg <schonberg@adacore.com>
7155 * einfo.ads: Minor reformatting.
7157 2014-06-11 Hristian Kirtchev <kirtchev@adacore.com>
7159 * a-cbdlli.adb, a-cdlili.adb, a-cidlli.adb, a-crdlli.adb (Insert): Add
7160 new variable First_Node. Update the position after all insertions have
7161 taken place to First_Node.
7163 2014-06-11 Robert Dewar <dewar@adacore.com>
7165 * debug.adb: Remove debug flag -gnatd.1, no longer needed.
7166 * layout.adb (Layout_Type): Remove test of -gnatd.1.
7168 2014-06-11 Robert Dewar <dewar@adacore.com>
7170 * sem_ch13.adb: Minor reformatting.
7172 2014-06-11 Hristian Kirtchev <kirtchev@adacore.com>
7174 * sem_prag.adb (Check_Clause_Syntax): Add new
7175 local variable Outputs. Account for the case where multiple
7176 output items appear as an aggregate.
7178 2014-06-11 Robert Dewar <dewar@adacore.com>
7180 * sem_warn.adb (Output_Obsolescent_Entity_Warnings): Tag warning
7183 2014-06-11 Ed Schonberg <schonberg@adacore.com>
7185 * einfo.ads: Minor reformatting.
7187 2014-06-11 Hristian Kirtchev <kirtchev@adacore.com>
7189 * a-cbdlli.adb, a-cdlili.adb, a-cidlli.adb, a-crdlli.adb (Insert): Add
7190 new variable First_Node. Update the position after all insertions have
7191 taken place to First_Node.
7193 2014-06-11 Robert Dewar <dewar@adacore.com>
7195 * debug.adb: Remove debug flag -gnatd.1, no longer needed.
7196 * layout.adb (Layout_Type): Remove test of -gnatd.1.
7198 2014-06-11 Thomas Quinot <quinot@adacore.com>
7200 * freeze.ads: Minor reformatting.
7201 * checks.adb (Determine_Range): Do not attempt to determine
7202 the range of a deferred constant whose full view has not been
7204 * sem_res.adb (Resolve): Remove undesirable guard against
7205 resolving expressions from expression functions.
7207 2014-06-11 Robert Dewar <dewar@adacore.com>
7209 * debug.adb (Debug_Flag_Dot_1): Set to enable fix for anonymous
7211 * layout.adb (Layout_Type): Make anonymous access types for
7212 subprogram formal types and return types always thin. For now
7213 only enabled if -gnatd.1 set.
7215 2014-06-11 Ed Schonberg <schonberg@adacore.com>
7217 * sem_ch13.adb (Analyze_Stream_TSS_Definition): Apply legality
7218 rule for stream attributes of interface types (RM 13.13.2 (38/3)):
7219 subprogram must be a null procedure.
7221 2014-06-11 Hristian Kirtchev <kirtchev@adacore.com>
7223 * sem_prag.adb (Analyze_Input_Item): Allow formal
7224 parameters to appear as input_items in an initialization_list
7225 of pragma Initializes. Encapsulation now applies to states and
7226 variables only (as it should). Add RM references to key errors.
7227 * sem_prag.adb (Set_Imported): Suppress errors
7228 about preceding Imports when the pragma does not come from source,
7229 which can happen through use of pragma Provide_Shift_Operators.
7231 2014-06-11 Thomas Quinot <quinot@adacore.com>
7233 * sem_ch3.adb: Minor reformatting.
7234 * einfo.ads (Full_View): Minor comment update.
7236 2014-06-11 Robert Dewar <dewar@adacore.com>
7238 * einfo.adb (Is_Independent): New flag.
7239 * einfo.ads (Is_Independent): New flag.
7240 (Has_Independent_Components): Clean up and fix comments.
7241 * sem_prag.adb (Fix_Error): Deal with changing argument
7242 [of] to entity [for].
7243 (Analyze_Pragma, case Independent): Set Is_Independent flag
7244 (Analyze_Pragma, case Independent_Components): Set Is_Independent flag
7245 in all components of specified record.
7247 2014-06-11 Thomas Quinot <quinot@adacore.com>
7249 * sem_ch12.adb (Analyze_Formal_Decimal_Fixed_Point_Type):
7250 Set proper Etype on bounds of dummy type created for analysis
7253 2014-06-11 Robert Dewar <dewar@adacore.com>
7255 * debug.adb: Minor comment fix (add missing section of dot
7258 2014-06-11 Robert Dewar <dewar@adacore.com>
7260 * gnat_rm.texi, switch-c.adb, sem_prag.adb, a-tgdico.ads, par-prag.adb,
7261 opt.ads, a-finali.ads, snames.ads-tmpl: Remove all traces of
7262 pragma/aspects Pure_05 Pure_12 Preelaborate_05.
7263 * errout.adb (Output_Messages): Avoid duplicate output for
7264 library level instance.
7265 * sem_elab.adb (Is_Call_Of_Generic_Formal): Moved to outer level
7266 (Check_Elab_Call): Add call to Is_Call_Of_Generic_Formal
7267 * exp_ch4.adb (Expand_N_Op_Expon): New interface for Exp_Modular.
7268 * s-expmod.ads, s-expmod.adb (Exp_Modular): Change interface to
7269 accomodate largest modulus value.
7270 * gnat_ugn.texi: Minor updates.
7272 2014-06-11 Ed Schonberg <schonberg@adacore.com>
7274 * sem_ch12.adb (Instantiate_Package_Body): Do not attempt to
7275 load body of generic package or its parent, if body is optional
7276 and the unit does not require a body.
7278 2014-06-11 Robert Dewar <dewar@adacore.com>
7280 * gnat_rm.texi: Document System.Unsigned_Types.
7281 * impunit.adb: System.Unsigned_Types (s-unstyp.ads) is user accessible.
7282 * s-unstyp.ads: Update comments (this is now user available unit).
7284 2014-06-11 Robert Dewar <dewar@adacore.com>
7286 * make.adb, sem_res.adb: Minor reformatting.
7288 2014-06-11 Thomas Quinot <quinot@adacore.com>
7290 * a-astaco.ads, a-tags.ads, s-excdeb.ads, a-tgdico.ads, a-stmaco.ads,
7291 a-except-2005.ads, s-except.ads, a-taside.ads, a-dynpri.ads,
7292 a-chahan.ads, a-sytaco.ads, s-stalib.ads, a-strmap.ads: Change pragmas
7293 Preelaborate_05 to just Preelaborate in runtime units, and similarly
7294 change Pure_05 to just Pure.
7296 2014-06-11 Ed Schonberg <schonberg@adacore.com>
7298 * sem_ch6.adb (Analyze_Subprogram_Body_Contract): Do not attempt
7299 analysis if error has been posted on subprogram body.
7301 2014-06-11 Ed Schonberg <schonberg@adacore.com>
7303 * sem_ch13.adb (Analyze_Stream_TSS_Definition): Apply legality
7304 rule given in RM 13.1 (8/1) for operational attributes to stream
7305 attributes: the attribute must apply to a first subtype. Fixes
7306 missing errors in ACATS test bdd2004.
7308 2014-06-11 Robert Dewar <dewar@adacore.com>
7310 * exp_ch3.adb (Build_Record_Init_Proc): Don't build for variant
7311 record type if restriction No_Implicit_Conditionals is active.
7312 (Expand_N_Object_Declaration): Don't allow default initialization
7313 for variant record type if restriction No_Implicit_Condition is active.
7314 (Build_Variant_Record_Equality): Don't build for variant
7315 record type if restriction No_Implicit_Conditionals is active.
7316 * exp_ch4.adb (Expand_N_Op_Eq): Error if variant records with
7317 No_Implicit_Conditionals.
7318 * sem_aux.ads, sem_aux.adb (Has_Variant_Part): New function.
7320 2014-06-11 Ramon Fernandez <fernandez@adacore.com>
7322 * i-cstrin.ads: Update comments.
7324 2014-06-11 Ed Schonberg <schonberg@adacore.com>
7326 * sem_res.adb (Resolve_Selected_Component): Handle properly a
7327 selected component whose prefix is overloaded, when none of the
7328 interpretations matches the expected type.
7330 2014-06-11 Bob Duff <duff@adacore.com>
7332 * make.adb (Wait_For_Available_Slot): Give a more
7333 informative error message; if the ALI file is not found, print
7334 the full path of what it's looking for.
7336 2014-06-11 Sergey Rybin <rybin@adacore.com frybin>
7338 * gnat_ugn.texi, vms_data.ads: add description of gnatstub -W<par>
7339 option to specify the result file encoding.
7341 2014-06-11 Robert Dewar <dewar@adacore.com>
7343 * errout.ads, sem_ch12.adb: Minor reformatting.
7344 * debug.adb, erroutc.adb: Remove -gnatd.q debug switch.
7345 * lib-xref.adb: Minor reformatting.
7346 * restrict.adb: Minor code reorganization (put routines in
7349 2014-06-11 Yannick Moy <moy@adacore.com>
7351 * einfo.ads: Minor typo in comment
7353 2014-06-11 Ed Schonberg <schonberg@adacore.com>
7355 * sinfo.ads, sinfo.adb: New attribute Uninitialized_Variable, for
7356 formal private types and private type extensions, to indicate
7357 variable in a generic unit whose uninitialized use suggest that
7358 actual type should be fully initialized.
7359 Needs_Initialized_Actual: removed, functionaity replaced by
7361 * lib-xref.adb (Generate_Reference): Generate a reference for
7362 variables of a formal type when the unit is not the main unit,
7363 to enable appropriate warnings in an instance.
7364 * sem_ch12.adb (Check_Ininialized_Type): Improve warning on use
7365 of variable in a generic unit that suggests that actual type
7366 should be full initialized.
7367 * sem_warn.adb; (May_Need_Initialized_Actual): Make into procedure
7368 and do not emot warning, which now only appears in an instance.
7370 2014-06-11 Eric Botcazou <ebotcazou@adacore.com>
7372 * gnat_ugn.texi: Fix minor typo.
7374 2014-06-11 Hristian Kirtchev <kirtchev@adacore.com>
7376 * sem_ch3.adb Add with and use clause for Sem_Ch10.
7377 (Analyze_Declarations): Code reformatting. Analyze the contract
7378 of a subprogram body stub at the end of the declarative region.
7379 * sem_ch6.adb (Analyze_Subprogram_Body_Contract): Spec_Id is
7380 now a variable. Do not process the body if its contract is not
7381 available. Account for subprogram body stubs when extracting
7382 the corresponding spec.
7383 * sem_ch6.ads (Analyze_Subprogram_Contract): Update the comment
7385 * sem_ch10.ads, sem_ch10.adb (Analyze_Subprogram_Body_Stub_Contract):
7387 * sem_prag.adb (Analyze_Depends_In_Decl_Part):
7388 Account for subprogram body stubs when extracting the
7390 (Analyze_Global_In_Decl_List):
7391 Account for subprogram body stubs when extracting the
7393 (Analyze_Refined_Depends_In_Decl_Part):
7394 Use Find_Related_Subprogram_Or_Body to retrieve the declaration
7395 of the related body. Spec_Is now a variable. Account for
7396 subprogram body stubs when extracting the corresponding spec.
7397 (Analyze_Refined_Global_In_Decl_Part): Use
7398 Find_Related_Subprogram_Or_Body to retrieve the declaration
7399 of the related body. Spec_Is now a variable. Account for
7400 subprogram body stubs when extracting the corresponding spec.
7401 (Collect_Subprogram_Inputs_Output): Account for subprogram body
7402 stubs when extracting the corresponding spec.
7404 2014-06-11 Vincent Celier <celier@adacore.com>
7406 * gnatcmd.adb (Process_Link): Do not invoke gnatlink with
7409 2014-06-11 Robert Dewar <dewar@adacore.com>
7411 * debug.adb: Add debug flag -gnatd.q.
7412 * erroutc.adb (Prescan_Message): Bomb if untagged warning with
7414 * styleg.adb (Check_Xtra_Parens): Message should be a style
7416 * sem_aggr.adb, sem_ch3.adb, exp_ch9.adb, checks.adb, sem_prag.adb,
7417 par-endh.adb, eval_fat.adb, freeze.adb, sem_util.adb, sem_attr.adb,
7418 sem_elab.adb, sem_ch6.adb, sem_warn.adb, sem_cat.adb,
7419 sem_ch13.adb, lib-xref.adb: Add remaining warning tags.
7421 2014-06-11 Ben Brosgol <brosgol@adacore.com>
7423 * gnat_rm.texi: Revised chapter on Implementation Defined
7426 2014-06-11 Geert Bosch <bosch@adacore.com>
7428 * s-exctab.adb: avoid race conditions in exception registration.
7430 2014-06-11 Robert Dewar <dewar@adacore.com>
7432 * errout.adb (Warn_Insertion): New function.
7433 (Error_Msg): Use Warn_Insertion and Prescan_Message.
7434 (Error_Msg_Internal): Set Info field of error object.
7435 (Error_Msg_NEL): Use Prescan_Message.
7436 (Set_Msg_Text): Don't store info: at start of message.
7437 (Skip_Msg_Insertion_Warning): New name for Set_Msg_Insertion_Warning.
7438 (Skip_Msg_Insertion_Warning): Now just skips warning insertion.
7439 * errout.ads: Document new ?$? and >$> insertion sequences
7440 Document use of "(style)" and "info: "
7441 * erroutc.adb (dmsg): Print several missing fields
7442 (Get_Warning_Tag): Handle -gnatel case (?$?) (Output_Msg_Text):
7443 Deal with new tagging of info messages
7444 * erroutc.ads: Is_Info_Msg: New global (Error_Msg_Object):
7445 Add field Info (Prescan_Message): New procedure, this procedure
7446 replaces the old Test_Style_Warning_Serious_Unconditional_Msg
7447 * errutil.adb, exp_util.adb, par-ch7.adb, sem_ch13.adb, sem_ch7.adb,
7448 sem_elab.adb: Follow new rules for info message (info belongs
7449 only at the start of a message, and only in the first message,
7450 not in any of the continuations).
7451 * gnat_ugn.texi: Document full set of warning tags.
7453 2014-06-11 Gary Dismukes <dismukes@adacore.com>
7455 * sem_util.adb: Minor typo fix.
7457 2014-06-11 Ed Schonberg <schonberg@adacore.com>
7459 * sem_warn.adb (Check_References): Do not emit spurious warnings
7460 on uninitialzed variable of a formal private type if variable
7463 2014-06-09 Jan Hubicka <hubicka@ucw.cz>
7465 * gcc-interface/utils.c (process_attributes) <ATTR_LINK_SECTION>: Use
7466 set_decl_section_name accessor.
7468 2014-05-22 Thomas Schwinge <thomas@codesourcery.com>
7470 * gcc-interface/utils.c (DEF_FUNCTION_TYPE_0, DEF_FUNCTION_TYPE_6)
7471 (DEF_FUNCTION_TYPE_7, DEF_FUNCTION_TYPE_8)
7472 (DEF_FUNCTION_TYPE_VAR_5): Cosmetic fixes.
7474 2014-05-21 Robert Dewar <dewar@adacore.com>
7476 * layout.adb: Minor reformatting.
7477 * sem_prag.adb (Analyze_Pragma, case Inspection_Point): Call
7480 2014-05-21 Robert Dewar <dewar@adacore.com>
7482 * restrict.ads (Implementation_Restriction): Add entry for
7484 * rtsfind.ads: Add entries for Fixed_IO and Decimal_IO in
7485 Ada.[Wide_[Wide_]Text_IO.
7486 * s-rident.ads (Restriction_Id): Add entry for No_Fixed_IO.
7487 * sem_attr.adb (Analyze_Attribute): Disallow fixed point types
7488 for Img, Image, Value, Wide_Image, Wide_Value, Wide_Wide_Image,
7489 Wide_Wide_Value if restriction No_Fixed_IO is set.
7490 * sem_util.adb (Set_Entity_Checks): Check restriction No_Fixed_IO.
7492 2014-05-21 Robert Dewar <dewar@adacore.com>
7494 * gnatcmd.adb: Minor error msg changes (no upper case letter
7496 * sem_ch12.adb, sem_ch5.adb, sem_res.adb, sem_util.adb: Minor
7499 2014-05-21 Robert Dewar <dewar@adacore.com>
7501 * debug.adb: Debug flag -gnatd.G inhibits static elab tracing
7502 via generic formals.
7503 * sem_elab.adb (Is_Call_Of_Generic_Formal): Return False if
7506 2014-05-21 Thomas Quinot <quinot@adacore.com>
7508 * exp_pakd.adb (Revert_Storage_Order): Renamed from Byte_Swap to
7509 more accurately describe that this subprogram needs to come into
7510 play also in cases where no byte swapping is involved, because
7511 it also takes care of some required shifts (left-justification
7514 2014-05-21 Thomas Quinot <quinot@adacore.com>
7516 * freeze.adb (Check_Component_Storage_Order): Indicate whether
7517 a Scalar_Storage_Order attribute definition is present for the
7519 (Freeze_Record_Type): Suppress junk warnings
7520 about purportedly junk Bit_Order / Scalar_Storage_Order attribute
7523 2014-05-21 Robert Dewar <dewar@adacore.com>
7525 * sem_ch8.adb (Analyze_Subprogram_Renaming): Put back call
7526 to Kill_Elaboration_Checks.
7528 2014-05-21 Gary Dismukes <dismukes@adacore.com>
7530 * layout.adb (Assoc_Add): Suppress the optimization of the (E
7531 - C1) + C2 case, when the expression type is unsigned and C1 <
7532 C2, to avoid creating a negative literal when folding.
7534 2014-05-21 Hristian Kirtchev <kirtchev@adacore.com>
7536 * freeze.adb (Freeze_Record_Type): Update the use of
7538 * sem_ch3.adb (Analyze_Object_Contract): Update the use of
7540 (Process_Discriminants): Update the use of Is_SPARK_Volatile.
7541 * sem_ch5.adb (Analyze_Iterator_Specification): Update the use
7542 of Is_SPARK_Volatile.
7543 (Analyze_Loop_Parameter_Specification):
7544 Update the use of Is_SPARK_Volatile.
7545 * sem_ch6.adb (Process_Formals): Catch an illegal use of an IN
7546 formal parameter when its type is volatile.
7547 * sem_prag.adb (Analyze_Global_Item): Update the use of
7549 * sem_res.adb (Resolve_Entity_Name): Correct the guard which
7550 determines whether an entity is a volatile source SPARK object.
7551 * sem_util.adb (Has_Enabled_Property): Accout for external
7552 properties being set on objects other than abstract states
7553 and variables. An example would be a formal parameter.
7554 (Is_SPARK_Volatile): New routine.
7555 (Is_SPARK_Volatile_Object):
7556 Remove the entity-specific tests. Call routine Is_SPARK_Volatile
7557 when checking entities and/or types.
7558 * sem_util.ads (Is_SPARK_Volatile): New routine.
7560 2014-05-21 Robert Dewar <dewar@adacore.com>
7562 * sem_warn.adb: Minor fix to warning messages (use ?? instead
7565 2014-05-21 Vincent Celier <celier@adacore.com>
7567 * gnatcmd.adb (GNATCmd): For platforms other than VMS, recognize
7568 switch --version and --help.
7570 2014-05-21 Robert Dewar <dewar@adacore.com>
7572 * sem_elab.adb (Is_Call_Of_Generic_Formal): New function.
7574 2014-05-21 Ed Schonberg <schonberg@adacore.com>
7576 * sem_ch5.adb (Analyze_Iterator_Specification): Set type of
7577 iterator variable when the domain of iteration is a formal
7578 container and this is an element iterator.
7580 2014-05-21 Bob Duff <duff@adacore.com>
7582 * sem_ch12.adb: Minor reformatting.
7584 2014-05-21 Robert Dewar <dewar@adacore.com>
7586 * sinfo.ads, sem_ch12.adb, sem_warn.adb: Minor reformatting.
7588 2014-05-21 Robert Dewar <dewar@adacore.com>
7590 * sem_elab.adb: Minor reformatting.
7591 * s-taprop.ads: Minor comment fix.
7592 * sem_ch8.adb (Analyze_Subprogram_Renaming): Remove call to
7593 Kill_Elaboration_Checks.
7594 * errout.adb, erroutc.adb: Minor reformatting.
7596 2014-05-21 Thomas Quinot <quinot@adacore.com>
7598 * exp_pakd.adb (Byte_Swap): Handle the case of a sub-byte
7599 component. No byte swapping occurs, but this procedure also takes
7600 care of appropriately justifying the argument.
7602 2014-05-21 Hristian Kirtchev <kirtchev@adacore.com>
7604 * sem_ch6.adb: sem_ch6.adb (Analyze_Aspects_On_Body_Or_Stub):
7606 (Analyze_Subprogram_Body_Helper): Move the
7607 analysis of aspect specifications and the processing of the
7608 subprogram body contract after inlining has taken place.
7609 (Diagnose_Misplaced_Aspect_Specifications): Removed.
7611 2014-05-21 Javier Miranda <miranda@adacore.com>
7613 * sem_ch3.adb (Build_Derived_Record_Type): Revert previous change.
7615 2014-05-21 Robert Dewar <dewar@adacore.com>
7617 * sem_eval.ads, sem_eval.adb (Why_Not_Static): Messages are not
7618 continuations any more.
7620 2014-05-21 Ed Schonberg <schonberg@adacore.com>
7622 * sinfo.ads, sinfo.adb: New flag Needs_Initialized_Actual,
7623 present in formal_Private_Definitions and on private extension
7624 declarations of a formal derived type. Set when the use of the
7625 formal type in a generic suggests that the actual should be a
7626 fully initialized type.
7627 * sem_warn.adb (May_Need_Initialized_Actual): new subprogram
7628 to indicate that an entity of a generic type has default
7629 initialization, and that the corresponing actual type in any
7630 subsequent instantiation should be fully initialized.
7631 * sem_ch12.adb (Check_Initialized_Type): new subprogram,
7632 to emit a warning if the actual for a generic type on which
7633 Needs_Initialized_Actual is set is not a fully initialized type.
7635 2014-05-21 Robert Dewar <dewar@adacore.com>
7637 * sem_elab.adb, prj-dect.adb: Minor reformatting.
7639 2014-05-21 Robert Dewar <dewar@adacore.com>
7641 * erroutc.ads: Minor comment addition.
7643 2014-05-21 Robert Dewar <dewar@adacore.com>
7645 * errout.ads: Add documentation for use of >*> tag.
7646 * restrict.adb: Make sure we use >*> tag for restriction warnings.
7648 2014-05-21 Gary Dismukes <dismukes@adacore.com>
7650 * debug.adb: Add case of illegal overriding_indicator for a
7651 protected subprogram body to description of -gnatd.E switch.
7652 * sem_ch6.adb (Verify_Overriding_Indicator): Issue error message
7653 for cases of giving overriding_indicators on protected subprogram
7654 bodies, but change this to a warning if -gnatd.E is enabled. No
7655 longer give a style warning about missing indicators on protected
7658 2014-05-21 Robert Dewar <dewar@adacore.com>
7660 * prj.ads, sem_ch12.adb, prj.adb, exp_pakd.adb,
7661 sem_elab.ads: Minor reformatting.
7662 * erroutc.adb, erroutc.ads (Warning_Specifically_Suppressed): Make Tag
7665 2014-05-21 Pascal Obry <obry@adacore.com>
7667 * prj-dect.adb: Allow package Install in aggregate project.
7669 2014-05-21 Robert Dewar <dewar@adacore.com>
7671 * sem_ch13.adb (Analyze_Aspect_Specifications):
7672 Insert_Delayed_Pragma is now used for the case of Attach_Handler.
7673 * sem_prag.adb: Minor comment improvements.
7675 2014-05-21 Ed Schonberg <schonberg@adacore.com>
7677 * sem_ch12.adb (Install_Body): When checking whether freezing of
7678 instantiation must be delayed, verify that the common enclosing
7679 subprogram to generic and instance is in fact an overloadable
7682 2014-05-21 Vincent Celier <celier@adacore.com>
7684 * makeutl.adb (Mains.Complete_Mains.Do_Complete): Look for all
7685 mains with the same name and fail if there is more than one.
7686 * prj.ads, prj.adb (Find_All_Sources): New function
7688 2014-05-21 Robert Dewar <dewar@adacore.com>
7690 * sem_ch13.adb: Minor reformatting.
7691 * lib-xref-spark_specific.adb, sem_util.adb: Minor reformatting.
7692 * sem_prag.adb: Minor error message improvement.
7694 2014-05-21 Yannick Moy <moy@adacore.com>
7696 * lib-xref-spark_specific.adb, lib-xref.ads, lib-xref.adb
7697 (Enclosing_Subprogram_Or_Package): Only return a library-level
7700 2014-05-21 Javier Miranda <miranda@adacore.com>
7702 * sem_ch3.adb (Build_Derived_Record_Type): Initialize Parent_Base
7703 to the full view of the parent type when processing a derived type
7704 which is the full view of a private type not defined in a generic
7705 unit which is derived from a private type with discriminants
7706 whose full view is a non-tagged record type.
7708 2014-05-21 Javier Miranda <miranda@adacore.com>
7710 * exp_ch4.adb (Expand_Allocator_Expression.Apply_Accessibility_Check):
7711 Complete previous patch.
7713 2014-05-21 Thomas Quinot <quinot@adacore.com>
7716 * g-socket.adb (Read and Write for Datagram_Socket_Stream_Type):
7717 Provide a behaviour more consistent with underlying datagram
7718 socket: do not attempt to loop over Send_Socket/Receive_Socket
7719 iterating along the buffer.
7721 2014-05-21 Hristian Kirtchev <kirtchev@adacore.com>
7723 * freeze.adb (Freeze_Record_Type): Ensure that a discriminated
7724 or a tagged type is not labelled as volatile. Ensure that a
7725 non-volatile type has no volatile components.
7726 * sem_ch3.adb (Analyze_Object_Contract): Add local constant
7727 Obj_Typ. Code reformatting. Ensure that a discriminated or
7728 tagged object is not labelled as volatile.
7729 * sem_prag.adb (Process_Atomic_Shared_Volatile): Ensure that
7730 pragma Volatile applies to a full type declaration or an object
7731 declaration when SPARK mode is on.
7733 2014-05-21 Sergey Rybin <rybin@adacore.com frybin>
7735 * gnat_ugn.texi: For ASIS tools, reword the paragraph about
7736 providing options needed for compiling the argument source for
7737 the situation when a project file can be used as a tool parameter.
7739 2014-05-21 Gary Dismukes <dismukes@adacore.com>
7741 * gnat_rm.texi: Minor typo fix.
7743 2014-05-21 Robert Dewar <dewar@adacore.com>
7745 * stand.adb (Tree_Read): Read missing entities.
7746 (Tree_Write): Write missing entities.
7748 2014-05-21 Ben Brosgol <brosgol@adacore.com>
7750 * gnat_ugn.texi: Wordsmithing edits to Coupling Metrics Control
7751 section in gnatmetric chapter.
7753 2014-05-21 Robert Dewar <dewar@adacore.com>
7755 * exp_ch6.adb (Expand_Actuals): Spec moved here, since not used
7756 outside Exp_Ch6 (Expand_Actuals): Deal with proper insertion of
7757 post-call copy write back (see detailed comment in code).
7758 * exp_ch6.ads (Expand_Actuals): Moved to body, not used outside
7760 * tbuild.ads: Minor reformatting.
7762 2014-05-21 Robert Dewar <dewar@adacore.com>
7764 * stand.ads: Add warning about adding new entities and
7765 Tree_Read/Tree_Write.
7767 2014-05-21 Robert Dewar <dewar@adacore.com>
7769 * sem_util.adb (Set_Entity_With_Checks): Don't complain about
7770 references to restricted entities within the units in which they
7773 2014-05-21 Robert Dewar <dewar@adacore.com>
7775 * gnat1drv.adb (Check_Bad_Body): Use Source_File_Is_Body to
7776 simplify the needed test, and also deal with failure to catch
7777 situations with non-standard names.
7778 * sinput-l.ads, sinput-l.adb (Source_File_Is_No_Body): New function
7779 (Source_File_Is_Subunit): Removed, no longer used.
7781 2014-05-21 Javier Miranda <miranda@adacore.com>
7784 (Expand_Allocator_Expression.Apply_Accessibility_Check): for a
7785 renaming of an access to interface object there is no need to
7786 generate extra code to reference the tag.
7788 2014-05-21 Robert Dewar <dewar@adacore.com>
7790 * errout.adb, erroutc.adb, erroutc.ads: Allow warning tag in pragma
7791 Warnings (Off, string).
7793 2014-05-21 Robert Dewar <dewar@adacore.com>
7795 * osint.adb: Fix three error messages to say invalid instead
7797 * par-ch4.adb, exp_aggr.adb, sem_attr.adb, sem_aux.adb, sem_ch3.adb,
7798 sem_ch5.adb, sem_ch6.adb, sem_ch7.adb, sem_dim.adb, sem_res.adb,
7799 sem_util.adb, sem_util.ads: Fix incorrect use of erroneous in comments.
7801 2014-05-21 Ed Schonberg <schonberg@adacore.com>
7803 * freeze.adb, sem_ch13.adb, sem_ch13.ads, sem_ch9.adb,
7804 sem_ch9.ads: Move discriminant manipulation routines for analysis of
7805 aspect specifications from sem_ch9 to sem_ch13, where they belong.
7807 2014-05-21 Robert Dewar <dewar@adacore.com>
7809 * gnat_ugn.texi: Clearly document -gnatw.g (GNAT warnings).
7810 Clearly document -gnatyg (GNAT style switches).
7811 * usage.adb: Add line line for -gnatw.g (GNAT warnings) More
7812 detail for line for -gnatyg (GNAT style switches) -gnatw.d/D is
7813 available for VMS after all.
7814 * warnsw.adb: Reorganize to eliminate duplicated code
7815 (Restore_Warnings): Add a couple of missing entries
7816 (Save_Warnings): Add a couple of missing entries.
7817 * warnsw.ads: Add missing entries to Warning_Record (not clear
7818 what the impact is).
7820 2014-05-21 Robert Dewar <dewar@adacore.com>
7822 * errout.adb (Set_Msg_Insertion_Warning): Handle ?*? (restriction
7824 * errout.ads: Document ?*? (restriction warning) insertion.
7825 * erroutc.adb (Get_Warning_Tag): Deal with ?*? (restriction
7827 * erroutc.ads: Document use of * for restriction warning tag.
7828 * restrict.adb (Restriction_Msg): Tag with ?*? instead of ??.
7830 2014-05-21 Ed Schonberg <schonberg@adacore.com>
7832 * sem_ch9.adb (Push_Scope_And_Install_Discriminants): Do not
7833 make discriminants immediately visible when analyzing an aspect
7834 of a subtype declaration.
7835 (Uninstall_Discriminants): Do not apply to the entity in a
7836 subtype declaration.
7838 2014-05-21 Ed Schonberg <schonberg@adacore.com>
7840 * sem_util.adb: Code clean up.
7842 2014-05-21 Eric Botcazou <ebotcazou@adacore.com>
7844 * gnat_ugn.texi: Document -Werror.
7846 2014-05-21 Bob Duff <duff@adacore.com>
7848 * sem_util.adb (Is_Dependent_Component_Of_Mutable_Object):
7849 This was returning False if the Object is a constant view. Fix
7850 it to return True in that case, because it might be a view of
7852 (Has_Discriminant_Dependent_Constraint): Fix latent
7853 bug; this function was crashing when passed a discriminant.
7855 2014-05-21 Robert Dewar <dewar@adacore.com>
7857 * gnat_ugn.texi: Remove misplaced section that is now obsolete.
7858 * s-arit64.adb: Minor code reorganization.
7859 * sem_prag.adb: Minor comment fix (remove erroneous use of the
7862 2014-05-21 Robert Dewar <dewar@adacore.com>
7864 * g-table.adb, g-dyntab.adb (Reallocate): Fix possible overflow in
7865 computing new table size.
7867 2014-05-21 Robert Dewar <dewar@adacore.com>
7869 * einfo.ads: Minor reformatting.
7870 * ceinfo.adb: Deal with slight format change of einfo.ads.
7872 2014-05-21 Ed Schonberg <schonberg@adacore.com>
7874 * sem_prag.adb (Analyze_Part_Of): Further work on the proper
7875 implementation of the SPARK 2014 rule concerning private child
7878 2014-05-21 Vincent Celier <celier@adacore.com>
7880 * makeusg.adb: Add switch -d to usage.
7882 2014-05-21 Ed Schonberg <schonberg@adacore.com>
7884 * sem_util.adb (Find_Actual): If an actual that is the prefix
7885 of an enclosing prefixed call has been rewritten, use Nkind
7886 and Sloc to identify the corresponding formal, when handling
7887 deferred references.
7889 2014-05-21 Robert Dewar <dewar@adacore.com>
7891 * debug.adb: Document -gnatd.z switch.
7892 * sem_eval.adb (Why_Non_Static): Test -gnatd.z switch.
7894 2014-05-21 Robert Dewar <dewar@adacore.com>
7896 * einfo.ads (Can_Never_Be_Null): Minor comment update.
7897 * sem_prag.adb (Check_Arg_Is_Task_Dispatching_Policy): Minor
7898 error message change.
7899 * s-arit64.adb ("abs"): New function. Use expression functions
7900 for the simple conversions and arithmetic.
7902 2014-05-18 Eric Botcazou <ebotcazou@adacore.com>
7904 * gcc-interface/trans.c (Subprogram_Body_to_gnu): Rework comment and
7905 set function_start_locus.
7907 2014-05-18 Eric Botcazou <ebotcazou@adacore.com>
7909 * utils.c (gnat_write_global_declarations): Adjust the flags put on
7912 2014-05-18 Eric Botcazou <ebotcazou@adacore.com>
7914 * gcc-interface/decl.c (change_qualified_type): New static function.
7915 (gnat_to_gnu_entity): Use it throughout to add qualifiers on types.
7916 <E_Array_Type>: Set TYPE_VOLATILE on the array type directly.
7917 <E_Array_Subtype>: Likewise.
7918 Do not set flags on an UNCONSTRAINED_ARRAY_TYPE directly.
7919 (gnat_to_gnu_component_type): Likewise.
7920 (gnat_to_gnu_param): Likewise.
7922 2014-05-18 Eric Botcazou <ebotcazou@adacore.com>
7924 * fe.h (Set_Present_Expr): Move around.
7925 (End_Location): New macro.
7926 * gcc-interface/trans.c (Case_Statement_to_gnu): Use End_Location.
7928 2014-05-18 Eric Botcazou <ebotcazou@adacore.com>
7930 * gcc-interface/decl.c (gnat_to_gnu_entity): Use Underlying_Type in
7931 lieu of more verbose construct.
7932 * gcc-interface/trans.c (Call_to_gnu): Likewise.
7933 (gnat_to_gnu): Likewise. Remove obsolete code.
7935 2014-05-18 Eric Botcazou <ebotcazou@adacore.com>
7937 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Array_Subtype>: Do not
7938 consider that regular packed arrays can never be superflat.
7940 2014-05-17 Trevor Saunders <tsaunders@mozilla.com>
7942 * gcc-interface/ada-tree.h: Remove usage of variable_size gty
7944 * gcc-interface/decl.c (annotate_value): Adjust.
7945 * gcc-interface/trans.c (Attribute_to_gnu): Likewise.
7946 (push_range_check_info): Likewise.
7947 (Loop_Statement_to_gnu): Likewise.
7948 (Subprogram_Body_to_gnu): Likewise.
7949 (Compilation_Unit_to_gnu): Likewise.
7950 (start_stmt_group): Likewise.
7951 * gcc-interface/utils.c (init_gnat_utils): Likewise.
7952 (gnat_pushlevel): Likewise.
7953 (maybe_pad_type): Likewise.
7955 2014-05-14 Eric Botcazou <ebotcazou@adacore.com>
7957 * seh_init.c: Fix copyright year.
7959 2014-05-14 Bernd Edlinger <bernd.edlinger@hotmail.de>
7961 * seh_init.c (__gnat_map_SEH): Compile also when __CYGWIN__ and __SEH__
7962 are defined. Move include windows.h before system.h.
7963 * s-oscons-tmplt.c (DTR_CONTROL_ENABLE, RTS_CONTROL_ENABLE): Compile
7964 also when __CYGWIN__ is defined. Include windef.h before winbase.h.
7966 2014-05-14 Richard Sandiford <r.sandiford@uk.ibm.com>
7968 * gcc-interface/decl.c (gnat_to_gnu_entity): Convert integer_one_node
7969 to the appropriate type.
7970 * gcc-interface/trans.c (gnat_to_gnu): Likewise.
7971 (pos_to_constructor): Likewise.
7973 2014-05-13 Eric Botcazou <ebotcazou@adacore.com>
7975 * gcc-interface/decl.c (annotate_value): Fix thinko in latest change.
7977 2014-05-06 Kenneth Zadeck <zadeck@naturalbridge.com>
7978 Mike Stump <mikestump@comcast.net>
7979 Richard Sandiford <rdsandiford@googlemail.com>
7981 * gcc-interface/cuintp.c (UI_From_gnu): Use wide-int interfaces.
7982 * gcc-interface/decl.c (gnat_to_gnu_entity): Use TYPE_SIGN.
7983 (annotate_value): Use wide-int interfaces.
7984 * gcc-interface/utils.c (get_nonnull_operand): Use tree_fits_uhwi_p.
7986 2014-04-28 Richard Henderson <rth@redhat.com>
7988 * gcc-interface/Makefile.in: Support aarch64-linux.
7990 2014-04-28 Eric Botcazou <ebotcazou@adacore.com>
7992 * exp_dbug.ads (Get_External_Name): Add 'False' default to Has_Suffix,
7993 add 'Suffix' parameter and adjust comment.
7994 (Get_External_Name_With_Suffix): Delete.
7995 * exp_dbug.adb (Get_External_Name_With_Suffix): Merge into...
7996 (Get_External_Name): ...here. Add 'False' default to Has_Suffix, add
7998 (Get_Encoded_Name): Remove 2nd argument in call to Get_External_Name.
7999 Call Get_External_Name instead of Get_External_Name_With_Suffix.
8000 (Get_Secondary_DT_External_Name): Likewise.
8001 * exp_cg.adb (Write_Call_Info): Likewise.
8002 * exp_disp.adb (Export_DT): Likewise.
8003 (Import_DT): Likewise.
8004 * comperr.ads (Compiler_Abort): Remove Code parameter and add From_GCC
8005 parameter with False default.
8006 * comperr.adb (Compiler_Abort): Likewise. Adjust accordingly.
8007 * types.h (Fat_Pointer): Rename into...
8008 (String_Pointer): ...this. Add comment on interfacing rules.
8009 * fe.h (Compiler_Abort): Adjust for above renaming.
8010 (Error_Msg_N): Likewise.
8011 (Error_Msg_NE): Likewise.
8012 (Get_External_Name): Likewise. Add third parameter.
8013 (Get_External_Name_With_Suffix): Delete.
8014 * gcc-interface/decl.c (STDCALL_PREFIX): Define.
8015 (create_concat_name): Adjust call to Get_External_Name, remove call to
8016 Get_External_Name_With_Suffix, use STDCALL_PREFIX, adjust for renaming.
8017 * gcc-interface/trans.c (post_error): Likewise.
8018 (post_error_ne): Likewise.
8019 * gcc-interface/misc.c (internal_error_function): Likewise.
8021 2014-04-28 Richard Biener <rguenther@suse.de>
8024 * gcc-interface/utils.c: Define flag_isoc11.
8026 2014-04-26 Eric Botcazou <ebotcazou@adacore.com>
8028 * gnatvsn.ads (Library_Version): Bump to 4.10.
8030 2014-04-23 Eric Botcazou <ebotcazou@adacore.com>
8033 2014-04-22 Richard Henderson <rth@redhat.com>
8035 * gcc-interface/Makefile.in: Support aarch64-linux.
8037 2014-04-22 Eric Botcazou <ebotcazou@adacore.com>
8039 * fe.h (Compiler_Abort): Replace Fat_Pointer with String_Pointer.
8040 (Error_Msg_N): Likewise.
8041 (Error_Msg_NE): Likewise.
8042 (Get_External_Name_With_Suffix): Likewise.
8043 * types.h (Fat_Pointer): Delete.
8044 (String_Pointer): New type.
8045 (DECLARE_STRING_POINTER): New macro.
8046 * gcc-interface/decl.c (create_concat_name): Adjust.
8047 * gcc-interface/trans.c (post_error): Likewise.
8048 (post_error_ne): Likewise.
8049 * gcc-interface/misc.c (internal_error_function): Likewise.
8051 2014-04-22 Richard Henderson <rth@redhat.com>
8053 * gcc-interface/Makefile.in: Support aarch64-linux.
8055 * init.c [__linux__] (HAVE_GNAT_ALTERNATE_STACK): New define.
8056 (__gnat_alternate_stack): Enable for all linux except ia64.
8058 2014-04-22 Eric Botcazou <ebotcazou@adacore.com>
8060 * fe.h (Compiler_Abort): Replace Fat_Pointer with String_Pointer.
8061 (Error_Msg_N): Likewise.
8062 (Error_Msg_NE): Likewise.
8063 (Get_External_Name_With_Suffix): Likewise.
8064 * types.h (Fat_Pointer): Delete.
8065 (String_Pointer): New type.
8066 (DECLARE_STRING_POINTER): New macro.
8067 * gcc-interface/decl.c (create_concat_name): Adjust.
8068 * gcc-interface/trans.c (post_error): Likewise.
8069 (post_error_ne): Likewise.
8070 * gcc-interface/misc.c (internal_error_function): Likewise.
8072 2014-04-15 Eric Botcazou <ebotcazou@adacore.com>
8073 Pierre-Marie de Rodat <derodat@adacore.com>
8075 * gcc-interface/decl.c (gnat_to_gnu_entity) <object>: Create a mere
8076 scalar constant instead of a reference for renaming of scalar literal.
8077 Do not create a new object for constant renaming except for a function
8078 call. Make sure a VAR_DECL is created for the renaming pointer.
8079 * gcc-interface/trans.c (constant_decl_with_initializer_p): New.
8080 (fold_constant_decl_in_expr): New function.
8081 (Identifier_to_gnu): Use constant_decl_with_initializer_p.
8082 For a constant renaming, try to fold a constant DECL in the result.
8083 (lvalue_required_p) <N_Object_Renaming_Declaration>: Always return 1.
8084 (Identifier_to_gnu): Reference the renamed object of constant renaming
8086 * gcc-interface/utils.c (invalidate_global_renaming_pointers): Do not
8087 invalidate constant renaming pointers.
8089 2014-04-15 Eric Botcazou <ebotcazou@adacore.com>
8091 * gcc-interface/utils.c (type_for_vector_element_p): New predicate.
8092 (build_vector_type_for_size): New function.
8093 (build_vector_type_for_array): Likewise.
8094 (unchecked_convert): Build an intermediate vector type to convert
8095 from a generic array type to a vector type.
8096 (handle_vector_size_attribute): Reimplement.
8097 (handle_vector_type_attribute): Likewise.
8099 2014-04-15 Eric Botcazou <ebotcazou@adacore.com>
8101 * gcc-interface/decl.c (prepend_one_attribute_pragma): Call
8102 Is_OK_Static_Expression in lieu of Is_Static_Expression to
8103 detect valid arguments.
8105 2014-04-15 Eric Botcazou <ebotcazou@adacore.com>
8107 * gcc-interface/trans.c (gnat_gimplify_stmt): Propagate loop hints.
8109 2014-04-14 Paolo Carlini <paolo.carlini@oracle.com>
8111 * gcc-interface/decl.c (gnat_to_gnu_entity): Use TYPE_IDENTIFIER.
8112 (components_to_record): Likewise.
8113 * gcc-interface/utils.c (make_aligning_type): Likewise.
8114 (maybe_pad_type): Likewise.
8115 (finish_record_type): Likewise.
8116 (rest_of_record_type_compilation): Likewise.
8118 2014-04-14 Eric Botcazou <ebotcazou@adacore.com>
8120 * snames.ads-tmpl (Name_Ivdep): New pragma-related name.
8121 * sem_prag.adb (Analyze_Pragma) <Pragma_Loop_Optimize>: Add support
8123 * gnat_rm.texi (Implementation Defined Pragmas): Document new Ivdep
8124 hint for Loop_Optimize.
8125 * gnat_ugn.texi (Vectorization of loops): Mention new Ivdep hint.
8126 * gcc-interface/trans.c (Pragma_to_gnu) <Pragma_Loop_Optimize>: Deal
8127 with new Ivdep hint.
8128 * gcc-interface/ada-tree.h (LOOP_STMT_IVDEP): New macro.
8129 * gcc-interface/trans.c (Pragma_to_gnu) <Pragma_Loop_Optimize>: Deal
8130 with new Ivdep hint.
8131 (gnat_gimplify_stmt) <LOOP_STMT>: Propagate loop hints.
8133 2014-04-14 Eric Botcazou <ebotcazou@adacore.com>
8134 Robert Dewar <dewar@adacore.com>
8136 * opt.ads (Suppress_Back_Annotation): Remove as unused.
8137 * fe.h (Back_Annotate_Rep_Info): Likewise.
8138 (Global_Discard_Names): Likewise.
8139 (List_Representation_Info): Declare.
8140 * types.h (Uint_Minus_1): Likewise.
8141 * repinfo.ads: Document back-annotation change.
8142 * gcc-interface/gigi.h (init_gnat_decl): Declare.
8143 (destroy_gnat_decl): Likewise.
8144 * gcc-interface/decl.c (annotate_value): Do not create the cache of
8145 annotated values here but...
8146 <CALL_EXPR>: Only inline the call if -gnatR3 is specified or we are
8148 (init_gnat_decl): ...here instead. New function.
8149 (destroy_gnat_decl): Likewise.
8150 * gcc-interface/trans.c (gigi): Call {init|destroy}_gnat_decl.
8151 * gcc-interface/utils.c (init_gnat_utils): Minor reformatting.
8153 2014-04-14 Eric Botcazou <ebotcazou@adacore.com>
8155 * gcc-interface/decl.c (create_field_decl_from): Finalize non-constant
8156 offset for the field, if any.
8158 2014-04-09 Eric Botcazou <ebotcazou@adacore.com>
8159 Svante Signell <svante.signell@gmail.com>
8163 * s-osinte-x32.adb: New file.
8164 * s-linux.ads (Time): New section.
8165 * s-linux-alpha.ads (Time): Likewise.
8166 * s-linux-android.ads (Time: Likewise.
8167 * s-linux-hppa.ads (Time): Likewise.
8168 * s-linux-mipsel.ads (Time): Likewise.
8169 * s-linux-sparc.ads (Time): Likewise.
8170 * s-linux-x32.ads (Time): Likewise.
8171 * s-osprim-x32.ads (timespec): Adjust.
8173 (To_Timespec): Likewise.
8174 * s-osinte-linux.ads (Time): Define local subtypes for those defined
8176 * s-taprop-linux.adb (Monotonic_Clock): Do not define timeval.
8177 * s-osinte-hpux.ads (timespec): Revert POSIX breakage.
8178 * s-osinte-kfreebsd-gnu.ads (timespec): Likewise.
8179 * s-osinte-solaris-posix.ads (timespec): Likewise.
8180 * s-osinte-posix.adb (To_Timespec): Likewise.
8181 * gcc-interface/Makefile.in (x32/Linux): Use s-osinte-x32.adb.
8183 2014-04-08 Eric Botcazou <ebotcazou@adacore.com>
8186 * gcc-interface/Makefile.in (arm% linux-android): Switch to EHABI.
8187 * s-linux-android.ads: New file.
8188 * s-intman-android.adb: Likewise.
8189 * s-osinte-android.ads: Adjust.
8190 * sigtramp-armdroid.c: Likewise.
8191 * sigtramp.h: Add Android support.
8193 2014-04-07 Eric Botcazou <ebotcazou@adacore.com>
8195 * gcc-interface/Makefile.in (alpha-vms): Add missing line.
8197 2014-03-30 Eric Botcazou <ebotcazou@adacore.com>
8200 * system-linux-alpha.ads: Adjust for Ada 2005.
8201 * system-linux-mips.ads: Likewise.
8202 * system-linux-mips64el.ads: Likewise.
8203 * system-linux-mipsel.ads: Likewise.
8204 * system-linux-s390.ads: Likewise.
8205 * system-linux-s390x.ads: Likewise.
8206 * system-linux-sparc.ads: Likewise.
8207 * system-linux-sparcv9.ads: Likewise.
8208 * system-rtems.ads: Likewise.
8209 * system-vxworks-arm.ads: Likewise.
8211 2014-03-16 Andreas Schwab <schwab@linux-m68k.org>
8214 * gcc-interface/Makefile.in (target_cpu_default): Revert
8217 2014-03-13 Eric Botcazou <ebotcazou@adacore.com>
8220 * cstand.adb (Register_Float_Type): Add 'precision' parameter and use
8221 it to set the RM size. Use directly 'size' for the Esize.
8222 (Create_Back_End_Float_Types): Adjust call to above.
8223 * get_targ.ads (Register_Type_Proc): Add 'precision' parameter.
8224 * set_targ.ads (FPT_Mode_Entry): Add 'precision' component.
8225 (Write_Target_Dependent_Values): Adjust comment.
8226 * set_targ.adb (Register_Float_Type): Add 'precision' parameter and
8228 (Write_Target_Dependent_Values): Write the precision in lieu of size.
8229 (Initialization): Read the precision in lieu of size and compute the
8230 size from the precision and the alignment.
8231 * gcc-interface/gigi.h (enumerate_modes): Add integer parameter.
8232 * gcc-interface/misc.c (enumerate_modes): Likewise. Do not register
8233 types for vector modes, pass the size in addition to the precision.
8235 2014-03-10 Eric Botcazou <ebotcazou@adacore.com>
8237 * gcc-interface/Make-lang.in (ADA_DEPFILES): Fix typo.
8239 2014-03-07 Doug Rupp <rupp@adacore.com>
8242 * system-linux-armel.ads (Backend_Overflow_Checks): Set to True.
8243 (Support_64_Bit_Divides): Removed, no longer used.
8244 (ZCX_By_Default): Enabled.
8246 2014-02-25 Doug Rupp <rupp@adacore.com>
8248 * gcc-interface/Makefile.in (arm-linux):
8249 (EH_MECHANISM): Use ARM unwinder (-arm)
8250 (LIBGNAT_TARGET_PAIRS: Override defaults with a-exexpr-gcc.adb and
8252 (EXTRA_LIBGNAT_OBJS): Add raise-gcc.o
8253 (EXTRA_GNATRTL_NONTASKING_OBJS): Add g-cppexc.o s-excmac.o.
8254 (arm-wrs-vxworks): Add EH_MECHANISM=-gcc for kernel mode.
8255 (EXTRA_LIBGNAT_OBJS): Add sigtramp-armvxw.o
8256 Add dependencies for sigtramp-armvxw.o.
8258 2014-02-25 Eric Botcazou <ebotcazou@adacore.com>
8260 * gcc-interface/trans.c (Pragma_to_gnu): Deal with Warning_As_Error.
8262 2014-02-25 Robert Dewar <dewar@adacore.com>
8264 * rtsfind.adb (Is_RTE): Protect against entity with no scope
8265 field (previously this call blew up on the Standard entity).
8266 * sem_attr.adb (Analyze_Attribute, case Access): Remove
8267 test for No_Abort_Statements, this is now handled in
8268 Set_Entity_With_Checks.
8269 * exp_ch6.adb, sem_ch10.adb, sem_ch4.adb, sem_ch8.adb, sem_res.adb:
8270 Change name Set_Entity_With_Style_Check => Set_Entity_With_Checks.
8271 * sem_util.ads, sem_util.adb: Change name Set_Entity_With_Style_Check =>
8272 Set_Entity_With_Checks.
8273 (Set_Entity_With_Checks): Add checks for No_Dynamic_Attachment,
8274 Add checks for No_Abort_Statements.
8276 2014-02-25 Robert Dewar <dewar@adacore.com>
8278 * exp_ch9.adb (Expand_Entry_Barrier): Add comment that call to
8279 Check_Restriction is OK.
8281 2014-02-25 Ed Schonberg <schonberg@adacore.com>
8283 * sem_ch3.adb (Process_Full_View): Better error message when
8284 the full view of a private type without discriminants is an
8286 * sem_ch7.adb (Uninstall_Declarations): Ditto.
8288 2014-02-25 Eric Botcazou <ebotcazou@adacore.com>
8290 * sigtramp-armvxw.c: Also restore r0.
8292 2014-02-25 Robert Dewar <dewar@adacore.com>
8294 * errout.adb (Error_Msg_Internal): Warning_Msg_Char set
8295 unconditionally (Set_Msg_Insertion_Warning): Warning_Msg_Char
8296 set unconditionally.
8297 * erroutc.adb (Get_Warning_Tag): Does not give a leading space
8298 any more (Output_Msg_Text): Rewritten with new convention on
8299 output of warnings that are treated as errors.
8300 * erroutc.ads (Error_Msg_Object): Warn_Chr is always set even
8302 * gnat_rm.texi: Updates to documentation on pragma
8304 * warnsw.adb (Set_Dot_Warning_Switch): -gnatw.e should not
8305 set Warning_Doc_Switch.
8306 * lib-writ.ads: Add documentation note on ALI file generation
8308 * exp_ch6.adb (Expand_Call): Remove check for No_Abort_Statements
8310 * sem_attr.adb (Resolve_Attribute, case Access):
8311 Abort_Task'Access violates the No_Abort_Statements restriction.
8312 * sem_res.adb (Resolve_Call): Check restriction
8313 No_Abort_Statements for call to Abort_Task or a renaming of it.
8315 2014-02-25 Robert Dewar <dewar@adacore.com>
8317 * sem_ch3.adb (Array_Type_Declaration): Check for case of using
8319 * lib.ads: Minor reformatting.
8320 * einfo.ads: Minor reformatting.
8322 2014-02-25 Doug Rupp <rupp@adacore.com>
8324 * sem_mech.adb (Set_Mechanisms): For convention Fortran on VMS
8325 use Short_Descriptor(S) as the argument passing mechanism.
8327 2014-02-25 Eric Botcazou <ebotcazou@adacore.com>
8329 * sigtramp-ppcvxw.c (CFI_COMMON_REGS): Also include r0.
8331 2014-02-25 Robert Dewar <dewar@adacore.com>
8333 * atree.ads (Warnings_Treated_As_Errors): New variable.
8334 * errout.adb (Error_Msg_Internal): Set Warn_Err flag in
8335 error object (Initialize): Initialize Warnings_As_Errors_Count
8336 (Write_Error_Summary): Include count of warnings treated as errors.
8337 * erroutc.adb (Warning_Treated_As_Error): New function.
8338 (Matches): Function moved to outer level of package.
8339 * erroutc.ads (Error_Msg_Object): Add Warn_Err flag.
8340 (Warning_Treated_As_Error): New function.
8341 * gnat_rm.texi: Document pragma Treat_Warning_As_Error.
8342 * opt.adb: Add handling of Warnings_As_Errors_Count[_Config].
8343 * opt.ads (Config_Switches_Type): Add entry for
8344 Warnings_As_Errors_Count.
8345 (Warnings_As_Errors_Count): New variable.
8346 (Warnings_As_Errors): New array.
8347 * par-prag.adb: Add dummy entry for Warning_As_Error.
8348 * sem_prag.adb (Analyze_Pragma): Implement new pragma
8350 * snames.ads-tmpl: Add entries for Warning_As_Error pragma.
8352 2014-02-25 Eric Botcazou <ebotcazou@adacore.com>
8354 * sigtramp.h: Fix minor inaccuracy.
8356 2014-02-25 Ben Brosgol <brosgol@adacore.com>
8358 * gnat_ugn.texi: Added description of kill command.
8360 2014-02-25 Robert Dewar <dewar@adacore.com>
8362 * gnat_rm.texi (Address_Clauses): Add a section discussing the
8363 problem of address clauses causing unexpected initialization,
8364 including the effect of Initialize_Scalars.
8366 2014-02-25 Robert Dewar <dewar@adacore.com>
8368 * errout.adb: Various changes for better msgs for anonmous access
8370 * erroutc.ads, erroutc.adb (Buffer_Ends_With): Version with character
8372 (Buffer_Remove): Version with character argument.
8373 * sem_attr.adb (Resolve_Attribute, case Access): Better handling
8374 of mismatching conventions for access-to-subprogram case.
8375 * sem_prag.adb (Set_Convention_From_Pragma): Deal with anonymous
8376 access types in record.
8377 * sem_util.ads, sem_util.adb (Set_Convention): Handle anonymous access
8378 types, including in records.
8380 2014-02-25 Doug Rupp <rupp@adacore.com>
8382 * sigtramp-ppcvxw.c, sigtramp.h, sigtramp-armvxw.c: Comment
8383 enhancements and corrections.
8385 2014-02-25 Robert Dewar <dewar@adacore.com>
8387 * gnat_rm.texi: New section "Conventions and Anonymous Access Types"
8389 2014-02-25 Robert Dewar <dewar@adacore.com>
8391 * gnat_rm.texi: First set of documentation additions for
8392 predefined RM units.
8393 * checks.adb: Minor reformatting.
8394 * sem_elab.adb (Check_Task_Activation): Minor fix to error
8396 * sem_util.adb: Minor reformatting.
8398 2014-02-25 Arnaud Charlet <charlet@adacore.com>
8400 * usage.adb (Usage): Add help on -gnateC.
8401 * switch-c.adb (Scan_Front_End_Switches): Add handling of -gnateC.
8402 * opt.ads (Generate_CodePeer_Messages): New flag.
8403 * gnat_ugn.texi: Document new switch -gnateC.
8405 2014-02-25 Ben Brosgol <brosgol@adacore.com>
8407 * gnat_rm.texi: Corrected minor typos in Implementation Defined
8409 * opt.ads: Minor reformatting.
8411 2014-02-25 Robert Dewar <dewar@adacore.com>
8413 * binde.adb: Change messages to mention -gnatel instead of -gnatwl.
8414 * gnat_ugn.texi: Update documentation of -gnatwl Add documentation
8416 * opt.ads (Warn_Info_Messages): New flag.
8417 * sem_elab.adb: Use Elab_Warnings, Elab_Info_Messages to control
8419 * sem_prag.adb: Use Elab_Warnings, Elab_Info_Messages to control
8421 * switch-m.ad, switch-c.adb: Recognize new -gnatel/EL switches.
8422 * usage.adb: Add documentation of -gnatel/-gnateL Update
8423 documentation of -gnatwl/-gnatwL.
8424 * warnsw.adb: New handling of Elab_Warnings, Elab_Info_Messages
8425 * warnsw.ads (Elab_Info_Messages): New field in Warning_Record
8427 2014-02-25 Robert Dewar <dewar@adacore.com>
8429 * einfo.ads, einfo.adb (Has_Shift_Operator): New flag.
8430 * gnat_rm.texi: Document pragma Provide_Shift_Operators.
8431 * interfac.ads: Minor code reorganization (add pragma
8432 Compiler_Unit_Warning).
8433 * par-prag.adb: Add dummy entry for Provide_Shift_Operators.
8434 * sem_ch3.adb (Build_Derived_Numeric_Type): Copy
8435 Has_Shift_Operator flag.
8436 * sem_intr.adb (Check_Intrinsic_Subprogram): Make sure
8437 Check_Shift is always called (Check_Shift): Set Has_Shift_Operator.
8438 * sem_prag.adb: Implement pragma Provide_Shift_Operators.
8439 * snames.ads-tmpl: Add entries for pragma Provide_Shift_Operators
8440 Add entry for Name_Amount.
8441 * checks.adb (Selected_Range_Checks): When checking for a null
8442 range, make sure we use the base type, and not the subtype for
8443 deciding a range is null.
8444 * sem_ch5.adb (Analyze_Loop_Parameter_Specification): Check
8445 for suspicious loop bound which is outside the range of the
8447 * gnat_ugn.texi: Add documentation section "Determining the
8448 Chosen Elaboration Order"
8449 * sem_ch13.adb (UC_Entry): Add field Act_Unit
8450 (Validate_Unchecked_Conversion): Store Act_Unit
8451 (Validate_Unchecked_Conversions): Test Warnings_Off in Act_Unit
8452 * treepr.adb: Minor reformatting.
8454 2014-02-25 Arnaud Charlet <charlet@adacore.com>
8456 * usage.adb: Minor: fix typo.
8458 2014-02-25 Robert Dewar <dewar@adacore.com>
8460 * lib.ads, s-bitops.adb, s-bitops.ads, s-conca5.adb, gnat_rm.texi,
8461 s-conca5.ads, s-conca7.adb, s-conca7.ads, s-crc32.adb, s-crc32.ads,
8462 s-conca9.adb, s-conca9.ads, g-dyntab.adb, s-crtl.ads, g-dyntab.ads,
8463 s-excdeb.adb, s-addope.adb, s-addope.ads, s-carun8.adb, s-carun8.ads,
8464 g-htable.adb, g-htable.ads, g-hesora.adb, g-hesora.ads, s-conca2.adb,
8465 s-conca2.ads, a-comlin.adb, a-chlat1.ads, a-comlin.ads, errout.ads,
8466 a-except.adb, s-conca4.adb, a-except.ads, s-conca4.ads, s-conca6.adb,
8467 s-conca6.ads, g-spchge.adb, g-spchge.ads, g-u3spch.adb, g-u3spch.ads,
8468 a-strhas.ads, restrict.adb, aspects.adb, aspects.ads, s-conca8.adb,
8469 s-conca8.ads, back_end.adb, par-prag.adb, g-byorma.adb, g-byorma.ads,
8470 a-elchha.adb, a-elchha.ads, g-speche.adb, g-speche.ads, s-casuti.adb,
8471 s-assert.adb, s-casuti.ads, s-assert.ads, a-clrefi.adb, a-clrefi.ads,
8472 s-conca3.adb, s-conca3.ads, a-ioexce.ads: Implement pragma
8473 Compiler_Unit_Warning, change Compiler_Unit everywhere to
8474 Compiler_Unit_Warning.
8476 2014-02-25 Sergey Rybin <rybin@adacore.com frybin>
8478 * sem_prag.adb (Analyze_Depends_In_Decl_Part): Do not normalize
8479 in ASIS mode aggregates that are used as aspect definitions.
8481 2014-02-25 Robert Dewar <dewar@adacore.com>
8483 * exp_ch7.adb, sem_util.adb, sem_util.ads, exp_ch6.adb: Minor
8486 2014-02-25 Ed Schonberg <schonberg@adacore.com>
8488 * freeze.adb (Freeze_Entity): If the return type of a function
8489 is a limited view, and the non-limited view has not been seen yet,
8490 defer freezing to some later point.
8492 2014-02-25 Robert Dewar <dewar@adacore.com>
8494 * sem_ch3.adb: Minor reformatting.
8496 2014-02-25 Robert Dewar <dewar@adacore.com>
8498 * s-excdeb.ads, s-except.ads, s-exctab.adb, s-exctab.ads, s-finmas.ads,
8499 s-htable.adb, s-htable.ads, s-imenne.adb, s-imenne.ads, s-imgenu.adb,
8500 s-imgenu.ads, s-mastop.adb, s-mastop.ads, s-memory-vms_64.adb,
8501 s-memory-vms_64.ads, s-memory.adb, s-memory.ads, s-os_lib.adb,
8502 s-os_lib.ads, s-parame.adb, s-parame.ads, s-purexc.ads, s-restri.adb,
8503 s-restri.ads, s-rident.ads, s-secsta.adb, s-secsta.ads, s-soflin.adb,
8504 s-soflin.ads, s-sopco3.adb, s-sopco3.ads, s-sopco4.adb, s-sopco4.ads,
8505 s-sopco5.adb, s-sopco5.ads, s-spsufi.ads, s-stache.adb, s-stache.ads,
8506 s-stalib.adb, s-stalib.ads, s-stoele.adb, s-stoele.ads, s-strcom.adb,
8507 s-strcom.ads, s-strhas.adb, s-string.adb, s-string.ads, s-strops.adb,
8508 s-strops.ads, s-ststop.adb, s-ststop.ads, s-traceb.adb, s-traceb.ads,
8509 s-traent.adb, s-traent.ads, s-unstyp.ads, s-utf_32.adb, s-utf_32.ads,
8510 s-wchcnv.adb, s-wchcnv.ads, s-wchcon.adb, s-wchcon.ads, s-wchjis.adb,
8511 s-wchjis.ads, sem_ch11.adb, sem_ch4.adb, sem_ch5.adb, sem_prag.adb,
8512 snames.ads-tmpl: Change Compiler_Unit everywhere to
8513 Compiler_Unit_Warning.
8515 2014-02-25 Hristian Kirtchev <kirtchev@adacore.com>
8517 * exp_ch6.adb (Add_Or_Save_Precondition): New routine.
8518 (Collect_Body_Postconditions_In_Decls): New routine.
8519 (Collect_Body_Postconditions_Of_Kind): Factor out code. Handle
8520 postcondition aspects or pragmas that appear on a subprogram
8522 (Collect_Spec_Preconditions): Factor out code. Handle
8523 precondition aspects or pragmas that appear on a subprogram
8525 * sem_ch6.adb (Analyze_Subprogram_Body_Helper): The analysis of
8526 aspects that apply to a subprogram body stub is no longer delayed,
8527 the aspects are analyzed on the spot.
8528 (SPARK_Aspect_Error):
8529 Aspects that apply to a subprogram declaration cannot appear in
8531 * sem_ch10.adb Remove with and use clause for Sem_Ch13.
8532 (Analyze_Proper_Body): Add local variable Comp_Unit. Unum
8533 is now a local variable. Code cleanup. Analysis related to
8534 the aspects of a subprogram body stub is now carried out by
8535 Analyze_Subprogram_Body_Helper. Do not propagate the aspects
8536 and/or pragmas of a subprogram body stub to the proper body
8537 as this is no longer needed. Do not analyze the aspects of a
8538 subprogram stub when the corresponding source unit is missing.
8539 (Analyze_Protected_Body_Stub): Flag the illegal use of aspects
8541 (Analyze_Task_Body_Stub): Flag the illegal use of
8543 (Optional_Subunit): Add local variable Unum.
8544 * sem_ch13.adb (Insert_Delayed_Pragma): Do not analyze a generated
8545 pragma when it applies to a subprogram body stub.
8546 * sem_prag.adb (Analyze_Pragma): Pragmas Contract_Cases,
8547 Depends and Global can now apply to a subprogram body stub as
8548 long as it acts as its own spec.
8549 (Analyze_Refined_Pragma):
8550 Code reformatting. Refinement pragmas cannot apply to a subunit.
8552 2014-02-25 Hristian Kirtchev <kirtchev@adacore.com>
8554 * einfo.ads Update the usage of flag
8555 Uses_Sec_Stack. Uses_Sec_Stack now applies to E_Loop entities.
8556 * exp_ch5.adb (Expand_Iterator_Loop): The temporary for a cursor
8557 now starts with the letter 'C'. This makes reading expanded
8559 * exp_ch7.adb (Establish_Transient_Scope): Add local variable
8560 Iter_Loop. Signal that an Ada 2012 iterator loop requires
8561 secondary stack management when creating a transient scope for
8562 an element reference.
8563 * exp_util.adb (Process_Statements_For_Controlled_Objects):
8564 When wrapping the statements of a loop, pass the E_Loop entity
8565 to the wrapping machinery.
8566 (Wrap_Statements_In_Block): Add
8567 formal parameter Scop along with comment on usage. Add local
8568 variables Block_Id, Block_Nod and Iter_Loop. Mark the generated
8569 block as requiring secondary stack management when the block is
8570 created inside an Ada 2012 iterator loop. This ensures that any
8571 reference objects are reclaimed on each iteration of the loop.
8572 * sem_ch5.adb (Analyze_Loop_Statement): Mark the generated block
8573 tasked with the handling of container iterators as requiring
8574 secondary stack management. This ensures that iterators are
8575 reclaimed when the loop terminates or is exited in any fashion.
8576 * sem_util.adb (Add_Block_Identifier): New routine.
8577 (Find_Enclosing_Iterator_Loop): New routine.
8578 * sem_util.ads (Add_Block_Identifier): New routine.
8579 (Find_Enclosing_Iterator_Loop): New routine.
8581 2014-02-25 Robert Dewar <dewar@adacore.com>
8583 * sinfo.ads: Minor reformatting.
8585 2014-02-25 Tristan Gingold <gingold@adacore.com>
8587 * s-expllu.ads, s-expuns.ads, s-expmod.ads: Minor comment fix.
8589 2014-02-25 Pascal Obry <obry@adacore.com>
8591 * sinput-l.adb, osint.adb, osint.ads: Add Prep_Suffix to factorize code.
8593 2014-02-25 Tristan Gingold <gingold@adacore.com>
8595 * sem_ch10.adb: Minor comment fix.
8597 2014-02-25 Bob Duff <duff@adacore.com>
8599 * s-tasdeb.adb: Misc cleanup of this package,
8600 including printing addresses in hexadecimal.
8601 (Write): Fix minor bug when taking 'Address of an empty string.
8603 2014-02-25 Ed Schonberg <schonberg@adacore.com>
8605 * sem_prag.adb (Analyze_Part_Of): Reject state refinement in a
8606 public child unit when it does not refer to the abstract state
8607 of a public ancestor.
8609 2014-02-25 Yannick Moy <moy@adacore.com>
8611 * sem_prag.adb (Analyze_Pragma/Pragma_Validity_Checks): Ignore pragma
8612 Validity_Checks in GNATprove and CodePeer modes.
8614 2014-02-25 Pascal Obry <obry@adacore.com>
8616 * prj-attr.adb, projects.texi, snames.ads-tmpl: Add package Install's
8617 Artifacts attribute.
8619 2014-02-25 Yannick Moy <moy@adacore.com>
8621 * sem_prag.adb: Minor reformatting to get consistent messages.
8623 2014-02-25 Robert Dewar <dewar@adacore.com>
8625 * checks.adb: Minor reformatting.
8626 * sinfo.ads (Do_Range_Check): Document that this flag is never
8627 passed to the back end.
8629 2014-02-25 Yannick Moy <moy@adacore.com>
8631 * sem_ch3.adb, sem_ch5.adb, sem_ch9.adb, sem_prag.adb, sem_attr.adb,
8632 sem_ch6.adb: Remove useless references to SPARK RM in error messages.
8634 2014-02-25 Hristian Kirtchev <kirtchev@adacore.com>
8636 * sem_res.adb (Appears_In_Check): New routine.
8637 (Resolve_Entity_Name): Remove local variables Prev and
8638 Usage_OK. Par is now a constant. Remove the parent chain traversal
8639 as the placement of a volatile object with enabled property
8640 Async_Writers and/or Effective_Reads must appear immediately
8641 within a legal construct.
8643 2014-02-25 Hristian Kirtchev <kirtchev@adacore.com>
8645 * checks.adb (Apply_Selected_Range_Checks):
8646 Alphabetize local constants and variables. Add comments.
8647 Always insert a range check that requires runtime evaluation into
8650 2014-02-25 Robert Dewar <dewar@adacore.com>
8652 * sem_attr.adb, sem_ch6.adb, par-ch3.adb: Minor reformatting.
8654 2014-02-25 Bob Duff <duff@adacore.com>
8656 * s-tassta.adb (Finalize_Global_Tasks): Limit the number of loop
8657 iterations while waiting for independent tasks to terminate;
8658 if an independent task does not terminate, we do not want to
8659 hang here. In that case, the thread will be terminated when the
8661 * s-taprop-linux.adb (Abort_Task): Fix Assert to allow for ESRCH.
8663 2014-02-25 Ed Schonberg <schonberg@adacore.com>
8665 * sem_prag.adb (Check_SPARK_Aspect_For_ASIS): New subprogram,
8666 used to perform pre-analysis of the expression for SPARK
8667 aspects that have a non-standard syntax, such as GLobal and
8668 Initializes. The procedure applies to the original expression
8669 in an aspect specification, prior to the analysis of the
8670 corresponding pragma, in order to provide semantic information
8671 for ASIS navigation purposes.
8672 (Analyze_Global_In_Decl_List, Analyze_Initializes_In_Decl_Part):
8673 Call new subprogram.
8675 2014-02-25 Yannick Moy <moy@adacore.com>
8677 * sem_prag.adb: Remove obsolete reference to SPARK RM in error message.
8679 2014-02-25 Doug Rupp <rupp@adacore.com>
8681 * init.c (HAVE_GNAT_ADJUST_CONTEXT_FOR_RAISE): Enable for ARM.
8682 (__gnat_adjust_context_for_raise): Bump the PC by 2.
8684 2014-02-25 Ed Schonberg <schonberg@adacore.com>
8686 * par-ch3.adb (P_Basic_Declarative_Items): In the case of a
8687 misplaced IS, add a statement sequence to improper body only if
8688 one has not been parsed already.
8690 2014-02-25 Ed Schonberg <schonberg@adacore.com>
8692 * sem_attr.adb (Analyze_Attribute, case 'Update): Check for
8693 mismatch when multidimensional array is updated with a single
8696 2014-02-25 Yannick Moy <moy@adacore.com>
8698 * sem_ch3.adb, sem_ch5.adb, sem_prag.adb, sem_attr.adb, errout.ads,
8699 sem_ch6.adb: Mark most references to SPARK RM in error messages
8702 2014-02-24 Ed Schonberg <schonberg@adacore.com>
8704 * par-ch3.adb (P_Basic_Declarative_Items): If an improper body
8705 appears in a list of basic declarations, complete the tree with
8706 an empty statement list, to prevent cascaded errors and crashes
8707 if semantic analysis is attempted.
8709 2014-02-24 Thomas Quinot <quinot@adacore.com>
8711 * g-sercom-mingw.adb (Open): Fix incorrect test for error return
8713 * erroutc.adb: Minor reformatting.
8715 2014-02-24 Hristian Kirtchev <kirtchev@adacore.com>
8717 * sem_prag.adb (Check_Clause_Syntax): Account
8718 for a solitary input item in a dependency list.
8720 2014-02-24 Yannick Moy <moy@adacore.com>
8722 * gnat1drv.adb (Adjust_Global_Switches): Do not
8723 use validity checks at all in GNATprove_Mode.
8725 2014-02-24 Robert Dewar <dewar@adacore.com>
8727 * g-sercom-mingw.adb, g-sercom-linux.adb, sem_prag.adb, freeze.adb,
8728 atree.adb, atree.ads: Minor reformatting.
8730 2014-02-24 Hristian Kirtchev <kirtchev@adacore.com>
8732 * sem_ch6.adb (Analyze_Subprogram_Body_Contract): Do not enforce
8733 global and dependence refinement when SPARK_Mode is off.
8734 * sem_ch7.adb (Analyze_Package_Body_Contract): Do not enforce
8735 state refinement when SPARK_Mode is off.
8736 * sem_ch13.adb (Analyze_Aspect_Specifications): Add local
8737 variable Decl. Insert the generated pragma for Refined_State
8738 after a potential pragma SPARK_Mode.
8739 * sem_prag.adb (Analyze_Depends_In_Decl_Part): Add local
8740 constant Deps. Remove local variable Expr. Check the syntax
8741 of pragma Depends when SPARK_Mode is off. Factor out the
8742 processing for extra parenthesis around individual clauses.
8743 (Analyze_Global_In_Decl_List): Items is now a constant. Check
8744 the syntax of pragma Global when SPARK_Mode is off.
8745 (Analyze_Initializes_In_Decl_Part): Check the syntax of pragma
8746 Initializes when SPARK_Mode is off.
8747 (Analyze_Part_Of): Check
8748 the syntax of the encapsulating state when SPARK_Mode is off.
8749 (Analyze_Pragma): Check the syntax of pragma Abstract_State when
8750 SPARK_Mode is off. Move the declaration order check with respect
8751 to pragma Initializes to the end of the processing. Do not verify
8752 the declaration order for pragma Initial_Condition when SPARK_Mode
8753 is off. Do not complain about a useless package refinement when
8755 (Analyze_Refined_Depends_In_Decl_Part): Refs
8756 is now a constant. Check the syntax of pragma Refined_Depends
8757 when SPARK_Mode is off.
8758 (Analyze_Refined_Global_In_Decl_Part):
8759 Check the syntax of pragma Refined_Global when SPARK_Mode is off.
8760 (Analyze_Refined_State_In_Decl_Part): Check the syntax of pragma
8761 Refined_State when SPARK_Mode is off.
8762 (Check_Dependence_List_Syntax): New routine.
8763 (Check_Global_List_Syntax): New routine.
8764 (Check_Initialization_List_Syntax): New routine.
8765 (Check_Item_Syntax): New routine.
8766 (Check_State_Declaration_Syntax): New routine.
8767 (Check_Refinement_List_Syntax): New routine.
8768 (Has_Extra_Parentheses): Moved to the top level of Sem_Prag.
8770 2014-02-24 Robert Dewar <dewar@adacore.com>
8772 * a-tags.adb, s-os_lib.adb: Minor reformatting.
8774 2014-02-24 Thomas Quinot <quinot@adacore.com>
8776 * g-sercom-mingw.adb, g-sercom-linux.adb (Raise_Error): Include
8777 strerror message, not just numeric errno value.
8779 2014-02-24 Doug Rupp <rupp@adacore.com>
8781 * raise-gcc.c (exception_class_eq): Make endian neutral.
8783 2014-02-24 Ed Schonberg <schonberg@adacore.com>
8785 * atree.ads, atree,adb (Copy_Separate_Tree): Remove Syntax_Only
8786 flag, and reset Etype and Analyzed attributes unconditionally
8787 when copying a tree that may be partly analyzed.
8788 * freeze.adb: Change calls to Copy_Separate_Tree accordingly.
8789 * sem_ch6.adb (Check_Inline_Pragma): If the Inline pragma appears
8790 within a subprogram body and applies to it, remove it from the
8791 body before making a copy of it, to prevent spurious errors when
8792 analyzing the copied body.
8794 2014-02-24 Thomas Quinot <quinot@adacore.com>
8796 * s-os_lib.adb (Errno_Message): Do not depend on Integer'Image.
8797 * s-oscons-tmplt.c: On VxWorks, include adaint.h only after
8798 vxWorks.h has been included. Also ensure that file attributes
8799 related definitions are output even in cases where socket support
8801 * a-tags.adb: Code clean up.
8802 * Make-generated.in (OSCONS_CPP, OSCONS_EXTRACT): Use -iquote
8803 instead of -I to add the main ada source directory to the header
8804 search path, in order to avoid conflict between our own "types.h"
8805 and VxWork's <types.h>.
8807 2014-02-24 Robert Dewar <dewar@adacore.com>
8809 * atree.ads, atree.adb (Copy_Separate_Tree): Add Syntax_Only parameter.
8810 * debug.adb: Remove documentation of -gnatd.X, no longer used.
8811 * freeze.adb (Wrap_Imported_Subprogram): Fixed and activated.
8813 2014-02-24 Bob Duff <duff@adacore.com>
8815 * gnat_ugn.texi: Improve documentation of gnatpp.
8817 2014-02-24 Thomas Quinot <quinot@adacore.com>
8819 * g-stheme.adb, g-socthi-vms.adb, g-socthi-vms.ads,
8820 g-socthi-vxworks.adb, g-socthi-vxworks.ads, g-stseme.adb,
8821 g-socthi-mingw.adb, g-socthi-mingw.ads, g-socthi.adb,
8822 g-socthi.ads, g-socket.adb (Host_Error_Message): Return a string, not
8823 a chars_ptr, because on Windows this is a renaming of
8824 Socket_Error_Message.
8826 2014-02-24 Robert Dewar <dewar@adacore.com>
8828 * a-direct.adb, sem_ch5.adb, a-cfdlli.adb, a-cfhase.adb, a-tags.adb,
8829 s-filatt.ads, a-cforma.adb, sem_ch6.adb, g-socthi-mingw.adb,
8830 a-cfhama.adb, a-cforse.adb, a-cofove.adb: Minor reformatting and code
8833 2014-02-24 Thomas Quinot <quinot@adacore.com>
8835 * Make-generated.in (OSCONS_CPP, OSCONS_EXTRACT): Make sure
8836 that the source directory containing s-oscons-tmplt.c is on the
8837 include path, so that all internal header files are available.
8839 2014-02-24 Ed Schonberg <schonberg@adacore.com>
8841 * sem_ch5.adb (Analyze_Loop_Parameter_Specification): If the
8842 domain of iteration is an attribute reference 'Old, this is an
8843 Ada 2012 iterator and the loop must be rewritten as such.
8845 2014-02-24 Thomas Quinot <quinot@adacore.com>
8847 * s-fileio.adb (Errno_Message): Remove, use shared version from
8849 * s-crtrun.ads, Makefile.rtl: Remove now unused unit.
8850 * g-stseme (Socket_Error_Message): Reimplement in terms of new
8852 * g-socthi.ads, g-socthi.adb: Change profile of
8853 Socket_Error_Message to return String to allow the above.
8854 * g-socket.adb, g-socthi-mingw.adb, g-socthi-mingw.ads,
8855 * g-socthi-vms.adb, g-socthi-vms.ads, g-socthi-vxworks.adb,
8856 * g-socthi-vxworks.ads: Update to account for the above profile
8858 * a-tags.adb: Use strlen builtin binding provided by s-crtl.
8859 * s-crtl.ads (strncpy): New procedure.
8860 * s-os_lib.adb (Copy_Attributes): Import just once (strncpy):
8861 Use import from s-crtl.
8862 * a-envvar.adb, osint.adb: Use imports of C runtime functions
8863 from s-crtl instead of re-importing locally.
8865 2014-02-24 Hristian Kirtchev <kirtchev@adacore.com>
8867 * sem_prag.adb (Analyze_Global_Item): Emit the
8868 variable related checks concerning volatile objects only when
8871 2014-02-24 Robert Dewar <dewar@adacore.com>
8873 * sem_ch5.adb (Analyze_Iterator_Specification): use
8874 Error_Msg_Ada_2012_Feature.
8876 2014-02-24 Jose Ruiz <ruiz@adacore.com>
8878 * s-rident.ads (Profile_Info): For Ravenscar, the restrictions
8879 No_Local_Timing_Events and No_Specific_Termination_Handlers
8880 must be set, according to the Ravenscar profile definition
8883 2014-02-24 Ed Schonberg <schonberg@adacore.com>
8885 * sem_ch6.adb (Analyze_Expression_Function): If this is a
8886 completion, freeze return type and its designated type if needed.
8888 2014-02-24 Thomas Quinot <quinot@adacore.com>
8890 * sem_ch13.adb (Analyze_Attribute_Definition_Clause, case
8891 'Address): When moving initialization statements to a freeze
8892 entity, keep them under a single node (i.e. do not unwrap
8893 expressions with actions), and set the Initialization_Statements
8894 attribute again so that processing of a later pragma Import can
8897 2014-02-24 Claire Dross <dross@adacore.com>
8899 * a-cfdlli.adb, a-cfdlli.ads, a-cfhama.adb, a-cfhama.ads,
8900 a-cfhase.adb, a-cfhase.ads, a-cforma.adb, a-cforma.ads,
8901 a-cforse.adb, a-cforse.ads, a-cofove.adb, a-cofove.ads: Rename
8902 Left/Right to First_To_Previous/Current_To_Last.
8904 2014-02-24 Thomas Quinot <quinot@adacore.com>
8906 * adaint.h (struct file_attributes): New component "error"
8907 (__gnat_error_attributes): Accessor for the above.
8908 * adaint.c (__gnat_error_attributes): New subprogram
8909 (__gnat_stat): Fix returned value (expect errno value)
8910 (__gnat_stat_to_attr): Add management of error component (set to
8911 stat errno value, except for missing files where it is set to 0,
8912 and exists is set to 0).
8913 * osint.ads (File_Attributes_Size): Update per change above,
8914 also clarify documentation.
8915 * s-filatt.ads: New file, binding to file attributes related
8917 * Makefile.rtl (s-filatt): New runtime unit.
8918 * s-crtl.ads (strlen): Expose binding to GCC builtin (falls back
8919 to library function if not available on target).
8920 * s-os_lib.ads, s-os_lib.adb (Errno_Message): New subprogram.
8921 * s-oscons-tmplt.c (SIZEOF_struct_file_attributes,
8922 SIZEOF_struct_dirent_alloc): New constants.
8923 * Make-generated.in (s-oscons.ads): Now requires adaint.h.
8924 * a-direct.adb (Fetch_Next_Entry): Fix incorrect buffer sizes.
8925 Perform appropriate error checking if stat fails (do not just
8926 ignore existing files if stat fails)
8927 * gcc-interface/Make-lang.in (GNAT_ADA_OBJS, GNATBIND_OBJS): Update
8930 2014-02-24 Hristian Kirtchev <kirtchev@adacore.com>
8932 * sem_prag.adb (Analyze_Global_Item): Move the check concerning
8933 the use of volatile objects as global items in a function to
8934 the variable related checks section.
8935 * sem_util.adb (Async_Readers_Enabled): Directly call
8936 Has_Enabled_Property.
8937 (Async_Writers_Enabled): Directly call Has_Enabled_Property.
8938 (Effective_Reads_Enabled): Directly call Has_Enabled_Property.
8939 (Effective_Writes_Enabled): Directly call Has_Enabled_Property.
8940 (Has_Enabled_Property): Rename formal parameter State_Id to Item_Id.
8941 Update the comment on usage. State_Has_Enabled_Property how handles
8942 the original logic of the routine. Add processing for variables.
8943 (State_Has_Enabled_Property): New routine.
8944 (Variable_Has_Enabled_Property): New routine.
8946 2014-02-24 Robert Dewar <dewar@adacore.com>
8948 * sinfo.ads, sem_ch12.adb, sem_res.adb, sem_ch4.adb, par-ch12.adb:
8950 * atree.ads, atree.adb (Node35): New function.
8951 (Set_Node35): New procedure.
8952 * debug.adb: Define new debug flag -gnatd.X.
8953 * einfo.ads, einfo.adb (Import_Pragma): New field.
8954 * freeze.adb (Wrap_Imported_Procedure): New procedure (not
8955 really active yet, has to be activated with -gnatd.X.
8956 * sem_prag.adb (Set_Imported): Set new Import_Pragma
8957 field (Set_Imported): Don't set Is_Public (see
8958 Freeze.Wrap_Imported_Subprogram)
8959 * par-ch3.adb (P_Component_List): Handle unexpected null component.
8961 2014-02-24 Yannick Moy <moy@adacore.com>
8963 * sem_ch3.adb: Correct reference to SPARK RM in error messages.
8964 * gnat_rm.texi: Correct documentation of attribute Update.
8966 2014-02-24 Ed Schonberg <schonberg@adacore.com>
8968 * sem_ch5.adb (Analyze_Iterator_Specification): Reject container
8969 iterator in older versions of Ada.
8971 2014-02-24 Gary Dismukes <dismukes@adacore.com>
8973 * sem_ch5.adb, sem_aux.ads, sem_ch12.adb, gnat_ugn.texi, par.adb,
8974 par-ch12.adb: Change spelling 'parametrization' to 'parameterization'.
8976 2014-02-24 Ed Schonberg <schonberg@adacore.com>
8978 * sinfo.ads, sinfo.adb: New attribute Generalized_Indexing, for
8979 indexed_components that are instances of Ada 2012 container
8980 indexing operations. Analysis and resolution of such nodes
8981 is performed on the attribute, and the original source is
8982 preserved for ASIS operations. If expansion is enabled, the
8983 indexed component is replaced by the value of this attribute,
8984 which is in a call to an Indexing aspect, in most case wrapped
8985 in a dereference operation.
8986 * sem_ch4.adb (Analyze_Indexed_Component): Create
8987 Generalized_Indexing attribute when appropriate.
8988 (Analyze_Call): If prefix is not overloadable and has an indexing
8989 aspect, transform into an indexed component so it can be analyzed
8990 as a potential container indexing.
8991 (Analyze_Expression): If node is an indexed component with a
8992 Generalized_ Indexing, do not re-analyze.
8993 * sem_res.adb (Resolve_Generalized_Indexing): Complete resolution
8994 of an indexed_component that has been transformed into a container
8996 (Resolve_Indexed_Component): Call the above when required.
8997 (Resolve): Do not insert an explicit dereference operation on
8998 an indexed_component whose type has an implicit dereference:
8999 the operation is inserted when resolving the related
9000 Generalized_Indexing.
9002 2014-02-24 Olivier Ramonat <ramonat@adacore.com>
9004 * gnat_rm.texi, gnat_ugn.texi: Replace Ada Compiler by Ada Development
9007 2014-02-24 Hristian Kirtchev <kirtchev@adacore.com>
9009 * sem_prag.adb (Check_Constituent_Usage): Remove leading spaces in
9011 (Inconsistent_Mode_Error): Remove leading spaces in error messages.
9012 Merge the expected and available mode errors.
9013 (Report_Unused_Constituents): Remove leading spaces in error messages.
9014 (Report_Unused_States): Remove leading spaces in error messages.
9016 2014-02-24 Thomas Quinot <quinot@adacore.com>
9018 * par_sco.adb (Traverse_One): Refine categorization of statement
9021 2014-02-24 Robert Dewar <dewar@adacore.com>
9023 * aspects.ads, aspects.adb: Remove aspects Ada_2005 and Ada_2012,
9024 Pure_05, Pure_12 and Preelaborate_05.
9025 * gnat_rm.texi: Update accordingly.
9026 * sem_prag.adb: Document one argument form of Ada_05/Ada_2005
9027 pragmas Document one argument form of Ada_12/Ada_2012 pragmas
9028 Recognize one argument form of these pragmas only in GNAT mode
9031 2014-02-24 Ed Schonberg <schonberg@adacore.com>
9033 * s-dimmks.ads: Replace symbol for temperature, previously the
9034 Greek letter Theta, by the ASCII @ sign.
9035 * s-diflio.ads: ditto.
9037 2014-02-24 Robert Dewar <dewar@adacore.com>
9039 * exp_ch4.adb: Minor code reorganization (use OR for boolean
9041 * sem_ch3.adb, sem_prag.adb, freeze.adb: Minor reformatting.
9043 2014-02-24 Ben Brosgol <brosgol@adacore.com>
9045 * gnat_ugn.texi, projects.texi: Added the necessary conditionalization
9046 so that references to gnatmem and ASIS tools do not appear in the FSF
9047 edition of the GNAT User's Guide.
9049 2014-02-24 Yannick Moy <moy@adacore.com>
9051 * freeze.adb (Freeze_Entity): Do not issue warning
9052 for pre/post being ignored on imported subprogram in GNATprove
9055 2014-02-24 Robert Dewar <dewar@adacore.com>
9057 * exp_ch5.adb, sem_ch5.adb, sem_type.adb, sem_res.adb, sem_attr.adb,
9058 stand.ads, sem_eval.adb: Minor reformatting.
9060 2014-02-24 Yannick Moy <moy@adacore.com>
9062 * sem_prag.adb: Minor rewording in error message.
9064 2014-02-24 Johannes Kanig <kanig@adacore.com>
9066 * exp_util.adb (Expand_Subtype_From_Expr): Do not expand subtypes in
9067 GNATprove_mode, gnat2why doesn't need nor use these types.
9069 2014-02-24 Gary Dismukes <dismukes@adacore.com>
9071 * exp_ch4.adb (Expand_N_Op_Expon): On the AAMP
9072 target, in the case of signed integer exponentiation that uses a
9073 run-time routine, always select the Exp_* versions, since overflow
9074 checking is automatically done by AAMP arithmetic instructions.
9076 2014-02-24 Hristian Kirtchev <kirtchev@adacore.com>
9078 * sem_ch13.adb (Analyze_Aspect_Specifications):
9079 When the related context is a package instace, insert pragma
9080 Abstract_State after all internally-generated renamings related
9081 to the instance "header".
9083 2014-02-24 Ed Schonberg <schonberg@adacore.com>
9085 * sem_ch3.adb (Analyze_Declarations): Analyze Contract of abstract
9087 * sem_disp.adb (Check_Dispatching_Context): A non-dispatching
9088 call to an abstract subprogram is legal if it appears in a
9089 pre/postcondition of another abstract operation.
9091 2014-02-24 Sergey Rybin <rybin@adacore.com frybin>
9093 * gnat_ugn.texi: Misc updates.
9095 2014-02-24 Hristian Kirtchev <kirtchev@adacore.com>
9097 * exp_prag.adb (Expand_Old): Set the type of the generated temporary.
9099 2014-02-24 Gary Dismukes <dismukes@adacore.com>
9101 * layout.adb (Layout_Variant_Record): Instantiate
9102 Generic_Check_Choices and call Check_Choices before calling
9103 Build_Discr_Checking_Funcs, since we need Others_Discrete_Choices
9104 set to prevent generating incorrect discriminant-checking
9105 functions for 'others' variants (functions that unconditionally
9106 return True rather than accounting for the values covered by the
9108 * sem_eval.ads (Subtypes_Statically_Compatible): Add formal
9109 Formal_Derived_Matching.
9110 (Subtypes_Statically_Match): Add formal Formal_Derived_Matching.
9111 * sem_eval.adb (Subtypes_Statically_Compatible): Pass new
9112 Formal_Derived_Matching formal to Subtypes_Statically_Match.
9113 (Subtypes_Statically_Match): Suppress the Object_Size matching
9114 test in the case where Formal_Derived_Matching is True.
9115 * sem_ch12.adb (Validate_Derived_Type_Instance): Pass
9116 True for Formal_Derived_Matching_Formal on the call to
9117 Subtypes_Statically_Compatible.
9119 2014-02-23 Eric Botcazou <ebotcazou@adacore.com>
9121 * gcc-interface/Make-lang.in (ADA_TOOLS_FLAGS_TO_PASS): Robustify.
9123 2014-02-23 Eric Botcazou <ebotcazou@adacore.com>
9125 * gcc-interface/utils2.c (build_simple_component_ref): Fix formatting.
9126 Look through a conversion between original and packable version to get
9128 (build_component_ref): Rework comment and fix formatting.
9130 2014-02-20 Sergey Rybin <rybin@adacore.com frybin>
9132 * gnat_ugn.texi, vms_data.ads (gnatelim): Add description of
9133 project-specific options.
9135 2014-02-20 Ed Schonberg <schonberg@adacore.com>
9137 * a-cbdlli.adb (Insert): When capacity exceeded, raise Capacity_Error,
9138 not Constraint_Error.
9139 * a-cbmutr.adb (Append_Child, Insert_Child, Prepend_Child): Ditto.
9140 * sem_ch5.adb: Code clean up.
9142 2014-02-20 Hristian Kirtchev <kirtchev@adacore.com>
9144 * sem_prag.adb (Usage_Error): Remove local
9145 constant Typ. Remove the specialized diagnostics for unconstrained
9146 or tagged items as those are not part of the explicit input set
9147 of the related subprogram and should not be flagged.
9149 2014-02-20 Ed Schonberg <schonberg@adacore.com>
9151 * sem_attr.adb: Add guard to preserve all errors.
9153 2014-02-20 Vincent Celier <celier@adacore.com>
9155 * switch-m.adb (Normalize_Compiler_Switches): Take into account
9156 switches that are recorded in ALI files: -gnateA, -gnateE,
9157 -gnateF, -gnateinn, -gnateu, -gnateV and -gnateY.
9159 2014-02-20 Ed Schonberg <schonberg@adacore.com>
9161 * sem_ch5.adb (Analyze_Iterator_Specification): Check legality
9162 of an element iterator form over a formal container with an
9164 * exp_ch5.adb (Build_Formal_Container_Iteration): Utility
9165 to create declaration and loop statements for both forms of
9166 container iterators.
9167 (Expand_Formal_Container_Element_Iterator): New procedure
9168 to handle loops of the form "for E of C" when C is a formal
9170 (Expand_Formal_Container_Iterator): Code cleanup.
9172 2014-02-20 Hristian Kirtchev <kirtchev@adacore.com>
9174 * sem_prag.adb (Add_Item_To_Name_Buffer): New routine.
9175 (Analyze_Contract_Case): Remove the use of
9176 "may". Replace "aspect Contract_Cases" to avoid categorization
9177 of aspect vs pragma.
9178 (Analyze_External_Property_In_Decl_Part): Remove the use of "formal".
9179 (Analyze_Global_Item): Remove
9180 the use of "formal", specify the subprogram. Split the
9181 error message about a state with visible refinement into
9182 two. Remove the use of "global" from "volatile global item".
9183 (Analyze_Initialization_Item): Ensure that the SPARK RM reference
9185 (Analyze_Input_Output): Update the call to
9186 Check_Mode. Specify the duplicated item. Reword the error
9187 message concerning an input of a null output list. Use "\"
9188 for error message continuation.
9189 (Analyze_Part_Of): Remove
9190 the use of "may". Use "\" for error message continuation.
9191 (Analyze_Refined_Depends_In_Decl_Part): Update the error
9192 message concerning a useless refinement to match the format
9194 (Analyze_Refined_Global_In_Decl_Part): Reword the error message
9195 concerning a useless refinement.
9196 (Analyze_Refinement_Clause): Use "\" for error message continuation.
9197 (Check_Constituent_Usage): Use "\" for error message continuation.
9198 (Check_Dependency_Clause): Use "\" for error message continuation.
9199 (Check_Matching_Constituent): Use "\" for error message continuation.
9200 (Check_Missing_Part_Of): Use "\" for error message continuation.
9201 (Check_Mode): Renamed to
9202 Check_Role. Update the comment on usage. Redo the error reporting
9204 (Check_Mode_Restriction_In_Enclosing_Context): Use "\" for error
9205 message continuation.
9206 (Find_Mode): Renamed to Find_Role. Update the parameter profile along
9207 with comment on usage. Update all occurrences of Is_Input and Is_Output.
9208 (Inconsistent_Mode_Error): Use "\" for error message continuation.
9209 (Input_Match): Use "\" for error message continuation.
9210 (Role_Error): New routine.
9211 (Set_Convention_From_Pragma): Use "\" for error message continuation.
9212 (Usage_Error): Add local variable Error_Msg. Build specialized error
9213 message showcasing the offending item kind. Redo the diagnostics for
9214 unconstrained types.
9216 2014-02-20 Ed Schonberg <schonberg@adacore.com>
9218 * exp_util.adb (Is_Iterated_Container): Use high-level primitives
9219 to determine whether a type is a container type, rather than
9220 examining only its type declaration, so that subtypes and derived
9221 types are handled properly.
9223 2014-02-20 Sergey Rybin <rybin@adacore.com frybin>
9225 * gnat_ugn.texi: gnatmetric: add description of project-specific
9228 2014-02-20 Ed Schonberg <schonberg@adacore.com>
9230 * sem_attr.adb (Analyze_Attribute, case 'Update): Verify that
9231 all choices in an association for a record type have the same
9232 type, as is done for record aggregates.
9234 2014-02-20 Robert Dewar <dewar@adacore.com>
9236 * a-cborma.adb, a-cbhama.adb, a-cbdlli.adb, a-cbmutr.adb: Use pragma
9237 Unmodified rather than Warnings (Off). Make comments
9238 uniform in the four affected units.
9240 2014-02-20 Robert Dewar <dewar@adacore.com>
9242 * sem_ch13.adb (Analyze_Attribute_Definition_Clause, case
9243 Object_Size): For non-scalar types allow any value that is a
9245 * gnat_rm.texi: Document Object_Size for composites more clearly.
9247 2014-02-20 Yannick Moy <moy@adacore.com>
9249 * sem_util.ads, sem_util.adb (Default_Initialization): Remove function.
9251 2014-02-20 Ed Schonberg <schonberg@adacore.com>
9253 * stand.ads: Raise_Type: new predefined entity, used as the type
9254 of a Raise_Expression prior to resolution.
9255 * cstand.adb: Build entity for Raise_Type.
9256 * sem_ch11.adb (Analyze_Raise_Expression): use Raise_Type as the
9257 initial type of the node.
9258 * sem_type.adb (Covers): Raise_Type is compatible with all
9260 * sem_res.adb (Resolve): Remove special handling of Any_Type on
9261 Raise_Expression nodes.
9262 (Resolve_Raise_Expression): Signal ambiguity if the type of the
9263 context is still Raise_Type.
9265 2014-02-20 Robert Dewar <dewar@adacore.com>
9267 * sem_ch12.adb (Validate_Access_Type_Instance): Add message if
9268 mismatching predicates.
9269 * sem_ch6.adb (Check_Conformance): Give better messages on
9271 * sem_eval.adb (Predicates_Match): Move to spec.
9272 * sem_eval.ads (Predicates_Match): Moved here from body.
9274 2014-02-20 Ed Schonberg <schonberg@adacore.com>
9276 * a-cbmutr.adb: Use default value in Insert_Child.
9278 2014-02-20 Vincent Celier <celier@adacore.com>
9280 * gnatcmd.adb, make.adb, prj-makr.adb, clean.adb: Call
9281 Stringt.Initialize in all project aware tools.
9283 2014-02-20 Doug Rupp <rupp@adacore.com>
9285 * gnat_ugn.texi: Document gnatbind -X option.
9286 * vms_data.ads: Minor warnings documentation reformatting.
9288 2014-02-20 Ed Schonberg <schonberg@adacore.com>
9290 * exp_ch3.adb (Expand_Freeze_Array_Type): Only create invariant
9291 procedure for a base type.
9293 2014-02-20 Robert Dewar <dewar@adacore.com>
9295 * sem_ch4.adb (Analyze_Case_Expression): Get type from first
9296 expression with type info.
9297 * sem_ch13.adb: Minor reformatting.
9298 * sem_eval.adb (Subtypes_Statically_Match): Make sure we return
9299 False if predicates do not match on the two types.
9301 2014-02-20 Arnaud Charlet <charlet@adacore.com>
9303 * sem_prag.adb (Analyze_Pragma [pragma Attach_Handler]):
9304 In Relaxed_RM_Semantics mode, allow any static integer value,
9305 for compatibility with other compilers.
9307 2014-02-20 Vincent Celier <celier@adacore.com>
9309 * errutil.adb (Initialize): Properly initialize entry in table
9310 Warnings when warnings are suppressed.
9312 2014-02-20 Robert Dewar <dewar@adacore.com>
9314 * s-os_lib.ads: Add warning about non-portability of Rename_File.
9315 * sem_util.ads, sem_util.adb (Is_Junk_Name): New function.
9316 * sem_warn.adb: Use Is_Junk_Name to suppress some warnings.
9317 * gnat_ugn.texi: Document no warnings on junk variable names.
9318 * layout.adb: Minor code reorganization (use Ekind_In).
9319 * stringt.adb: Move initialization of Null_String_Id to Initialize
9322 2014-02-20 Ed Schonberg <schonberg@adacore.com>
9324 * sem_ch13.adb: Initialize optional Element_Id.
9326 2014-02-20 Robert Dewar <dewar@adacore.com>
9328 * s-os_lib.ads (Rename_File): Minor commment addition.
9330 2014-02-20 Thomas Quinot <quinot@adacore.com>
9332 * einfo.ads: Minor reformatting.
9334 2014-02-20 Hristian Kirtchev <kirtchev@adacore.com>
9336 * aspects.adb (Exchange_Aspects): New routine.
9337 * aspects.ads (Exchange_Aspects): New routine.
9338 * atree.adb (Rewrite): Do not check whether the save node has
9339 aspects as it never will, instead check the node about to be clobbered.
9340 * einfo.adb (Write_Field25_Name): Abstract_States can appear in
9341 entities of generic packages.
9342 * sem_ch6.adb (Analyze_Expression_Function): Fix the parent
9343 pointer of an aspect specification list after rewriting takes place.
9344 * sem_ch7.adb (Analyze_Package_Body_Helper): Swap the aspect
9345 specifications of the generic template and the copy used for analysis.
9346 * sem_ch12.adb (Analyze_Generic_Package_Declaration): Swap
9347 the aspect specifications of the generic template and the
9348 copy used for analysis.
9349 (Analyze_Package_Instantiation): Propagate the aspect specifications
9350 from the generic template to the instantiation.
9351 (Build_Instance_Compilation_Unit_Nodes): Propagate the aspect
9352 specifications from the generic template to the instantiation.
9353 * sem_ch13.adb (Analyze_Aspect_Specifications): Handle aspects
9354 Abstract_State, Initializes and Initial_Condition when they
9355 apply to a package instantiation.
9357 2014-02-20 Robert Dewar <dewar@adacore.com>
9359 * stringt.adb: Add call to Initialize in package initialization.
9361 2014-02-20 Robert Dewar <dewar@adacore.com>
9363 * a-crbtgk.adb, a-cihama.adb, a-coinve.adb, a-ciorse.adb, a-crbtgo.adb,
9364 a-cidlli.adb, a-cimutr.adb, a-cihase.adb, a-cohama.adb, a-coorse.adb,
9365 a-chtgke.adb, a-chtgop.adb, a-comutr.adb, a-ciorma.adb, a-cobove.adb,
9366 a-convec.adb, a-cohase.adb, a-chtgbk.adb, a-chtgbo.adb: Minor
9369 2014-02-20 Bob Duff <duff@adacore.com>
9371 * s-os_lib.ads: Minor: Remove incorrect comment.
9373 2014-02-20 Robert Dewar <dewar@adacore.com>
9375 * sem_elab.adb (Check_Elab_Assign): Clearer warning message.
9377 2014-02-20 Ed Schonberg <schonberg@adacore.com>
9379 * a-cborma.adb (Assign): When creating a node without a specified
9380 element, insert an uninitialized element in the map, because
9381 the instance may provide an element type with a default
9382 initialization, e.g a scalar with a Default_Value aspect.
9383 * a-cbhama.adb (Assign_Key): Remove useless Allocate procedure.
9384 (Insert): In the version without explicit element, provide an
9385 uninitialized element, as above.
9386 * a-cbdlli.adb (Append): In the version without explicit element,
9387 provide an uninitalized element, as above.
9388 (Allocate): Remove unused version.
9390 2014-02-20 Robert Dewar <dewar@adacore.com>
9392 * sem_elab.adb: Minor code reorganization (use Nkind_In).
9393 * stringt.adb: Remove temporary pragma Warnings (Off).
9394 * stringt.ads: Add pragma Elaborate_Body to ensure initialization
9397 2014-02-20 Matthew Heaney <heaney@adacore.com>
9399 * a-chtgbk.adb (Replace): Use correct offset when calculating bucket
9402 2014-02-20 Ed Schonberg <schonberg@adacore.com>
9404 * sem_ch5.adb (Analyze_Iterator_Specification): Initialize
9405 properly the cursor type for subsequent volatile testing in SPARK
9406 mode, when domain is a formal container with an Iterabe aspect.
9408 2014-02-20 Robert Dewar <dewar@adacore.com>
9410 * errout.adb (Set_Warnings_Mode_Off): Add Reason argument.
9411 (Set_Specific_Warning_Off): Add Reason argument.
9412 * errout.ads (Set_Warnings_Mode_Off): Add Reason argument.
9413 (Set_Specific_Warning_Off): Add Reason argument.
9414 * erroutc.adb (Warnings_Entry): Add Reason field
9415 (Specific_Warning_Entry): Add Reason field.
9416 (Warnings_Suppressed): return String_Id for Reason.
9417 (Warning_Specifically_Suppressed): return String_Id for Reason.
9418 * erroutc.ads (Warnings_Entry): Add Reason field.
9419 (Specific_Warning_Entry): Add Reason field.
9420 (Set_Specific_Warning_Off): Add Reason argument.
9421 (Set_Warnings_Mode_Off): Add Reason argument.
9422 (Warnings_Suppressed): return String_Id for Reason.
9423 (Warning_Specifically_Suppressed): return String_Id for Reason.
9424 * errutil.adb (Warnings_Suppressed): returns String_Id for Reason
9425 (Warning_Specifically_Suppressed): returns String_Id for Reason
9426 * gnat_rm.texi: Document that Warning parameter is string literal
9427 or a concatenation of string literals.
9428 * par-prag.adb: New handling for Reason argument.
9429 * sem_prag.adb (Analyze_Pragma, case Warning): New handling
9430 for Reason argument.
9431 * sem_util.ads, sem_util.adb (Get_Reason_String): New procedure.
9432 * sem_warn.ads (Warnings_Off_Entry): Add reason field.
9433 * stringt.adb: Set Null_String_Id.
9434 * stringt.ads (Null_String_Id): New constant.
9436 2014-02-20 Robert Dewar <dewar@adacore.com>
9438 * einfo.ads: Minor comment addition: Etype of package is
9440 * checks.adb, exp_aggr.adb, exp_atag.adb, exp_attr.adb, exp_ch13.adb,
9441 exp_ch2.adb, exp_ch3.adb, exp_ch4.adb, exp_ch5.adb, exp_ch6.adb,
9442 exp_ch7.adb, exp_ch9.adb, exp_dbug.adb, exp_disp.adb, exp_imgv.adb,
9443 exp_intr.adb, exp_prag.adb, exp_sel.adb, exp_strm.adb, exp_util.adb,
9444 freeze.adb, rtsfind.adb, sem_aggr.adb, sem_attr.adb, sem_ch10.adb,
9445 sem_ch12.adb, sem_ch13.adb, sem_ch3.adb, sem_ch4.adb, sem_ch5.adb,
9446 sem_ch6.adb, sem_ch8.adb, sem_dim.adb, sem_prag.adb, sem_res.adb,
9447 sem_util.adb, tbuild.adb, tbuild.ads: Remove New_Reference_To.
9448 Replace all calls with calls to New_Occurrence_Of.
9450 2014-02-20 Robert Dewar <dewar@adacore.com>
9452 * par-util.adb (Ignore, case of right paren): Make this a
9455 2014-02-19 Robert Dewar <dewar@adacore.com>
9457 * sem_ch5.adb, sem_prag.adb, sem_attr.adb: Minor reformatting.
9458 * debug.adb: Remove -gnatd.X switch, no longer used.
9459 * styleg.adb (Check_Then): Remove check of -gnatd.X, check is
9462 2014-02-19 Bob Duff <duff@adacore.com>
9464 * g-socket.ads: Minor: Correct some comments.
9466 2014-02-19 Ed Schonberg <schonberg@adacore.com>
9468 * sem_ch5.adb: Inhibit iterator rewriting in ASIS mode.
9470 2014-02-19 Arnaud Charlet <charlet@adacore.com>
9472 * sem_ch13.adb (Analyze_Aspect_Specifications): Do not generate
9473 an error on out of range priorities if Relaxed_RM_Semantics.
9474 * sem_prag.adb (Analyze_Pragma): Ditto.
9476 2014-02-19 Bob Duff <duff@adacore.com>
9478 * sem_attr.adb (Resolve_Attribute): Detect the case of F'Access
9479 where F denotes the renaming of an enumeration literal, and
9480 issue a specialized error message.
9482 2014-02-19 Matthew Heaney <heaney@adacore.com>
9484 * a-chtgop.ads (Checked_Index): New operation.
9485 (Next): Changed mode of hash table.
9486 * a-chtgop.adb (Adjust, Delete_Node_Sans_Free): Detect tampering
9487 (Generic_Read, Reserve_Capacity): Ditto.
9488 (Generic_Equal): Detect tampering.
9489 (Next): Changed mode of hash table, detect tampering.
9490 * a-chtgke.ads (Checked_Index, Checked_Equivalent_Keys): New
9492 (Find): Changed mode of hash table.
9493 * a-chtgke.adb (Checked_Equivalent_Keys): New operation
9494 (Delete_Key_Sans_Free, Generic_Conditional_Insert): Detect
9496 (Find): Changed mode of hash table, check for tampering.
9497 (Generic_Replace_Element): Check for tampering.
9498 * a-chtgbk.ads (Checked_Index, Checked_Equivalent_Keys): New operation.
9499 * a-chtgbk.adb (Checked_Index, Checked_Equivalent_Keys): New
9500 operation (Delete_Key_Sans_Free, Generic_Conditional_Insert):
9502 (Find, Generic_Replace_Element): Check for tampering.
9503 * a-chtgbo.ads (Checked_Index): New operation.
9504 * a-chtgbo.adb (Checked_Index): New operation
9505 (Delete_Node_Sans_Free, Generic_Equal): Detect tampering.
9506 (Generic_Read, Next): Ditto.
9507 * a-cohase.adb, a-cihase.adb (Is_In): Changed mode of hash
9508 table (Difference, Intersection): Use variable view of
9509 source, detect tampering (Find, Is_Subset, Overlap): Use
9510 variable view of container (Symmetric_Difference, Union):
9511 Detect tampering (Vet): Use Checked_Index to detect tampering
9512 (Constant_Reference, Element, Find): Use variable view of
9514 (Update_Element_Preserving_Key): Detect tampering.
9515 * a-cbhase.adb (Difference, Find, Is_In): Use variable view
9518 (Equivalent_Sets, Overlap): Use Node's Next component.
9519 (Vet): Use Checked_Index to detect tampering.
9520 (Constant_Reference, Element, Find): Use variable view of container.
9521 (Update_Element_Preserving_Key): Detect tampering.
9522 * a-cohama.adb, a-cihama.adb, a-cbhama.adb (Constant_Reference,
9523 Element, Find): Use variable view of container.
9524 (Reference): Rename hash table component.
9525 (Vet): Use Checked_Index to detect tampering.
9527 2014-02-19 Arnaud Charlet <charlet@adacore.com>
9529 * adabkend.adb (Scan_Compiler_Arguments): Add missing handling
9532 2014-02-19 Thomas Quinot <quinot@adacore.com>
9534 * tbuild.adb (New_Occurrence_Of, New_Rerefence_To): Guard
9535 against calls without Def_Id.
9537 2014-02-19 Claire Dross <dross@adacore.com>
9539 * a-cfdlli.ads, a-cfhase.ads, a-cforma.ads, a-cfhama.ads, a-cforse.ads,
9540 a-cofove.ads: Add global annotations to subprograms.
9542 2014-02-19 Hristian Kirtchev <kirtchev@adacore.com>
9544 * sem_prag.adb (Analyze_Initial_Condition_In_Decl_Part): Remove
9545 constants Errors, Pack_Id and Pack_Init. Remove variable Vars.
9546 Initial_Condition no longer requires the presence of pragma
9547 Initialized. Do not try to diagnose whether all variables mentioned in
9548 pragma Initializes also appear in Initial_Condition.
9549 (Collect_Variables): Removed.
9550 (Match_Variable): Removed.
9551 (Match_Variables): Removed.
9552 (Report_Unused_Variables): Removed.
9554 2014-02-19 Thomas Quinot <quinot@adacore.com>
9556 * gnat_rm.texi (pragma Stream_Convert): Minor rewording.
9558 2014-02-19 Robert Dewar <dewar@adacore.com>
9560 * sem_util.adb, sem_util.ads, prj-conf.adb, s-os_lib.adb: Minor
9563 2014-02-19 Vincent Celier <celier@adacore.com>
9565 * prj-part.adb (Parse_Single_Project): Use the fully resolved
9566 project path, with all symbolic links resolved, to check if the
9567 same project is imported with a different unresolved path.
9568 * prj-tree.ads (Project_Name_And_Node): Component Canonical_Path
9569 changed to Resolved_Path to reflect that all symbolic links
9572 2014-02-19 Ed Schonberg <schonberg@adacore.com>
9574 * sem_util.ads, sem_util.adb (Get_Cursor_Type): Moved to sem_util
9575 from sem_ch13, for use elsewhere.
9576 * sem_ch13.adb (Get_Cursor_Type): Moved to sem_util.
9577 * sem_ch5.adb (Analyze_Iterator_Specification): Set properly the
9578 cursor type on the loop variable when the iteration is over o
9581 2014-02-19 Vincent Celier <celier@adacore.com>
9583 * prj-conf.adb (Add_Default_GNAT_Naming_Scheme): Add declaration
9584 for an empty Target (Check_Target): Never fail when an empty
9585 target is declared in the configuration project.
9587 2014-02-19 Ed Schonberg <schonberg@adacore.com>
9589 * sem_prag.adb (Check_Arg_Is_Local_Name): Argument is local if
9590 the pragma comes fron a predicate aspect and the context is a
9591 record declaration within the scope that declares the type.
9593 2014-02-19 Robert Dewar <dewar@adacore.com>
9595 * gnat_rm.texi: Minor clarifications.
9596 * expander.adb, sem_aggr.adb: Add comments.
9598 2014-02-19 Ed Schonberg <schonberg@adacore.com>
9600 * sem_prag.adb (Check_Arg_Is_Local_Name): For an aspect that
9601 applies to a subprogram body, the name is the current scope,
9602 rather than being declared in the current scope.
9603 (Analyze_Pragma, case No_Return): Handle properly a No_Return
9604 aspect applied to a subprogram body.
9606 2014-02-19 Ed Schonberg <schonberg@adacore.com>
9608 * sem_ch13.adb (Resolve_Iterable_Operation): Improve resolution
9609 of overloaded subprograms, and fix bug in handling of primitive
9612 2014-02-19 Pascal Obry <obry@adacore.com>
9614 * s-os_lib.adb: Minor reformatting.
9616 2014-02-19 Yannick Moy <moy@adacore.com>
9618 * expander.adb (Expand): Do nothing inside generics.
9619 * sem_aggr.adb (Aggregate_Constraint_Checks): Do nothing inside
9622 2014-02-19 Yannick Moy <moy@adacore.com>
9624 * exp_ch2.adb: Remove useless 'with' of unit Uintp.
9626 2014-02-19 Robert Dewar <dewar@adacore.com>
9628 * sem_ch3.adb, style.adb, sem_prag.adb, sem_ch13.adb: Minor reformatting
9629 * a-sequio.adb: Remove useless pragma Extensions_Allowed (no
9632 2014-02-19 Claire Dross <dross@adacore.com>
9634 * a-cfdlli.ads, a-cfhase.ads, a-cforma.ads, a-cfhama.ads,
9635 a-cforse.ads, a-cofove.ads: Add Iterable aspect to formal containers.
9637 2014-02-19 Hristian Kirtchev <kirtchev@adacore.com>
9639 * sem_ch3.adb (Analyze_Declarations): Analyze
9640 a package contract at the end of the private declarations (if
9641 applicable), otherwise analyze it and the end of the visible
9644 2014-02-19 Ed Schonberg <schonberg@adacore.com>
9646 * style.adb (Missing_Overriding): If subprogram is an
9647 instantiation, place warning on the instance node itself,
9648 without mention of the original generic. Do not emit message
9649 if explicit Ada version is older than the introduction of the
9650 overriding indicator.
9652 2014-02-19 Yannick Moy <moy@adacore.com>
9654 * gnat_rm.texi: Doc clarifications.
9656 2014-02-19 Yannick Moy <moy@adacore.com>
9658 * exp_util.adb (Remove_Side_Effects): Do not remove side-effects
9661 2014-02-19 Ed Schonberg <schonberg@adacore.com>
9663 * sem_ch13.adb (Get_Cursor_Type): Obtain cursor type from
9664 specified First primitive, rather than by name.
9665 (Validate_Iterable_Aspect, Resolve_Iterable_Operation): Use it,
9666 and extend error checking for missing primitives and incorrect
9669 2014-02-19 Ed Schonberg <schonberg@adacore.com>
9671 * sem_ch3.adb (Check_Pragma_Implemented): Detect additional
9672 errors when a Synchronization aspect on an overriding protected
9673 operation does not match the given aspect on the overridden
9674 operation of an ancestor interface.
9676 2014-02-19 Hristian Kirtchev <kirtchev@adacore.com>
9678 * sem_prag.adb (Check_Loop_Pragma_Grouping): New routine.
9679 (Check_Loop_Pragma_Placement): Update
9680 comment on usage. Remove local variables Orig_Stmt and
9681 Within_Same_Sequence. Check that the current Loop_Invariant or
9682 Loop_Variant pragma is grouped together with other such pragmas.
9683 (Is_Loop_Pragma): New routine.
9684 (Prev_In_Loop): Removed.
9686 2014-02-19 Robert Dewar <dewar@adacore.com>
9688 * par-ch6.adb (P_Return): For extended return, end column lines
9690 * par.adb: Minor documentation clarification.
9692 2014-02-19 Yannick Moy <moy@adacore.com>
9694 * sem_prag.adb (Check_Loop_Pragma_Placement): Add check
9695 that Loop_Invariant and Loop_Variant appear consecutively.
9696 * gnat_rm.texi Update documentation of Loop_Invariant and
9697 Loop_Variant pragmas.
9699 2014-02-19 Robert Dewar <dewar@adacore.com>
9701 * debug.adb: Document -gnatd.X.
9702 * par-ch5.adb (P_If_Statement): Always check THEN, even if not
9704 (Check_Then_Column): Ditto.
9705 * styleg.adb (Check_Then): Allow THEN on line after IF.
9706 (Check_Then): Check THEN placement under control of -gnatd.X
9707 * styleg.ads (Check_Then): Now called even if THEN is not first
9709 * stylesw.ads (Style_Check_If_Then_Layout): Document new
9711 * gnat_ugn.texi: For -gnatyi, THEN can now be on line after IF.
9713 2014-02-19 Robert Dewar <dewar@adacore.com>
9715 * a-cfhama.adb, a-cfhase.adb, a-cforse.adb, a-cofove.adb, a-ngcefu.adb,
9716 a-teioed.adb, a-wtedit.adb, a-ztedit.adb, exp_ch5.adb, inline.adb,
9717 prj-pp.adb, prj-tree.adb, sem_ch12.adb, sem_ch8.adb,
9718 vms_conv.adb: Fix bad layout of IF statements
9720 2014-02-19 Robert Dewar <dewar@adacore.com>
9722 * exp_util.adb (Side_Effect_Free): Scalar if expressions can be SEF.
9724 2014-02-19 Robert Dewar <dewar@adacore.com>
9726 * exp_util.adb: Update comments.
9728 2014-02-19 Doug Rupp <rupp@adacore.com>
9730 * bindgen.adb (Gen_Adainit) [VMS] New global Float_Format.
9731 * init.c (__gl_float_format): [VMS] New global.
9732 (__gnat_set_features): Call FP_CONTROL to set FPSR for the float
9733 representation in effect.
9735 2014-02-19 Hristian Kirtchev <kirtchev@adacore.com>
9737 * exp_ch6.adb Add with and use clause for Exp_Prag.
9738 (Expand_Contract_Cases): Relocated to Exp_Prag.
9739 * exp_ch6.ads (Expand_Contract_Cases): Relocated to Exp_Prag.
9740 * exp_prag.adb Add with and use clauses for Checks and Validsw.
9741 (Expand_Contract_Cases): Relocated from Exp_Ch6. Update the
9742 structure of the expanded code to showcase the evaluation of
9743 attribute 'Old prefixes. Add local variable Old_Evals. Expand
9744 any attribute 'Old references found within a consequence. Add
9745 circuitry to evaluate the prefixes of attribute 'Old that
9746 belong to a selected consequence.
9747 (Expand_Old_In_Consequence): New routine.
9748 * exp_prag.ads (Expand_Contract_Cases): Relocated from Exp_Ch6.
9749 * sem_attr.adb (Check_Use_In_Contract_Cases): Warn that a
9750 potentially unevaluated prefix is always evaluated.
9752 2014-02-19 Robert Dewar <dewar@adacore.com>
9754 * exp_attr.adb (Expand_Min_Max_Attribute): Use Insert_Declaration
9755 (Expand_Min_Max_Attribute): Use Matching_Standard_Type.
9756 * exp_ch4.adb (Expand_N_Expression_With_Actions): Remove special
9757 handling for the case of Modify_Tree_For_C, this approach did
9759 * exp_util.adb (Matching_Standard_Type): New function
9760 (Side_Effect_Free): New top level functions (from
9761 Remove_Side_Effects).
9762 * exp_util.ads (Side_Effect_Free): New top level functions
9764 * sinfo.ads: Minor comment updates.
9766 2014-02-19 Ed Schonberg <schonberg@adacore.com>
9768 * exp_ch6.adb (Expand_Simple_Function_Return): If return
9769 type is unconstrained and uses the secondary stack, mark the
9770 enclosing function accordingly, to ensure that the value is not
9771 prematurely removed.
9773 2014-02-19 Hristian Kirtchev <kirtchev@adacore.com>
9775 * par.adb Alphabetize the routines in Par.Sync.
9776 (Resync_Past_Malformed_Aspect): New routine.
9777 * par-ch13.adb (Get_Aspect_Specifications): Alphabetize local
9778 variables. Code and comment reformatting. Detect missing
9779 parentheses on aspects [Refined_]Global and [Refined_]Depends
9780 with a non-null definition.
9781 * par-sync.adb: Alphabetize all routines in this separate unit.
9782 (Resync_Past_Malformed_Aspect): New routine.
9784 2014-02-19 Robert Dewar <dewar@adacore.com>
9786 * sem_eval.ads, sem_eval.adb (Subtypes_Statically_Match): Return False
9787 if Esize values do not match.
9789 2014-02-19 Yannick Moy <moy@adacore.com>
9791 * sinfo.ads: Minor comment update.
9793 2014-02-19 Hristian Kirtchev <kirtchev@adacore.com>
9795 * atree.ads: Minor reformatting (change Entity_Info to Einfo).
9797 2014-02-19 Thomas Quinot <quinot@adacore.com>
9799 * exp_ch7.adb (Find_Node_To_Be_Wrapped): An assignment statement
9800 that has the No_Ctrl_Actions flag is a suitable node to be
9801 wrapped if the assigned expression has no finalization actions.
9802 * sem_eval.adb (Eval_Entity_Name): For a compile time known
9803 boolean value, mark the corresponding condition SCO as constant.
9805 2014-02-19 Robert Dewar <dewar@adacore.com>
9807 * exp_util.adb: Minor reformatting.
9808 * exp_util.ads (Matching_Standard_Type): New function.
9809 * exp_ch7.adb: Minor reformatting.
9811 2014-02-19 Ed Schonberg <schonberg@adacore.com>
9813 * sem_ch13.adb (Get_Cursor_Type): Use scope of iterable type
9814 to find declaration for Cursor, to handle properly the case of
9815 a discriminated iterable type.
9817 2014-02-19 Vincent Celier <celier@adacore.com>
9819 * gnatcmd.adb (GNATCmd): Always replace the object dirs of
9820 imported library projects with the library ALI dirs, when setting
9822 * prj-env.ads (Ada_Objects_Path): Correct comments about
9823 argument Including_Libraries.
9825 2014-02-19 Gary Dismukes <dismukes@adacore.com>
9827 * gnat_rm.texi: Minor spelling fixes.
9829 2014-02-19 Doug Rupp <rupp@adacore.com>
9831 * init.c: Remove unneeded code.
9832 * fe.h (Float_Format): New macro
9833 * gcc-interface/trans.c (gigi): On VMS, set vms_float_format.
9835 2014-02-19 Hristian Kirtchev <kirtchev@adacore.com>
9837 * sem_prag.adb (Check_Refined_Global_Item):
9838 A state or variable acts as a constituent only it is part of an
9839 encapsulating state and the state has visible refinement.
9841 2014-02-19 Ed Schonberg <schonberg@adacore.com>
9843 * sem_ch6.adb (Analyze_Subprogram_Contract): Do not warn on a
9844 postcondition for a function when the expression does not mention
9845 'Result but the function has in-out parameters.
9847 2014-02-19 Robert Dewar <dewar@adacore.com>
9849 * gnat_rm.texi: Add documentation on Value_Size forcing biased
9852 2014-02-19 Hristian Kirtchev <kirtchev@adacore.com>
9854 * lib-xref.ads Remove the small table of letter and symbol usage as we
9857 2014-02-19 Hristian Kirtchev <kirtchev@adacore.com>
9859 * sem_ch6.adb (Analyze_Subprogram_Body_Helper): Emit specific error
9860 messages depending on the offending misplaced aspect specifications.
9861 (Diagnose_Misplaced_Aspect_Specifications): New routine.
9863 2014-02-19 Ed Schonberg <schonberg@adacore.com>
9865 * sem_ch13.adb (Get_Cursor): Utility to retrieve cursor type
9866 for iterable aspect primitives.
9867 (Resolve_Iterable_Operation): Use expected signature of iterable
9868 aspect to resolve primitive when overloading is present.
9869 (Validate_Iterable_Aspect, Analyze_Aspects_At_Freeze_Point): use it.
9870 (Check_Signature): Removed.
9872 2014-02-19 Yannick Moy <moy@adacore.com>
9874 * sem_ch10.adb (Analyze_Proper_Body): Issue error on missing
9875 subunit in GNATprove_Mode.
9876 * sinfo.ads (GNATprove_Mode): Document error issued in GNATprove_Mode.
9878 2014-02-19 Hristian Kirtchev <kirtchev@adacore.com>
9880 * lib-xref.ads Alphabetize the contents of table
9881 Xref_Entity_Letters. Add an entry in table Xref_Entity_Letters
9882 for E_Abstract_State. List all letters and symbols in use.
9883 * sem_prag.adb (Analyze_Abstract_State): Update all calls
9884 to Create_Abstract_State to reflect the new signature.
9885 (Create_Abstract_State): Change subprogram profile and update
9886 the comment on usage. Use the proper location of the state
9887 declaration when creating a new abstract state entity. Do not
9888 generate an external name, but simply reuse the name coming from
9889 the state declaration.
9891 2014-02-19 Robert Dewar <dewar@adacore.com>
9893 * exp_ch4.adb (Expand_N_Expression_With_Actions): Make sure
9894 declarations get properly inserted in Modify_Tree_For_C mode.
9895 * sinfo.ads: Minor comment addition.
9897 2014-02-19 Robert Dewar <dewar@adacore.com>
9899 * par-ch9.adb, exp_ch5.adb, sem_ch5.adb, exp_attr.adb, sem_util.adb,
9900 sem_util.ads, sem_ch13.adb, sem_ch13.ads: Minor reformatting.
9902 2014-02-19 Ed Schonberg <schonberg@adacore.com>
9904 * style.adb (Missing_Overriding): Warning does not apply in
9905 language versions prior to Ada 2005.
9906 * snames.ads-tmpl: Add Name_Iterable and Attribute_Iterable.
9907 * sem_attr.adb: Add Attribute_Iterable where needed.
9908 * exp_attr.adb: ditto.
9909 * exp_ch5.adb (Expand_Formal_Container_Loop): New procedure to
9910 handle loops and quantified expressions over types that have an
9911 iterable aspect. Called from Expand_Iterator_Loop.
9912 * sem_ch5.adb (Analyze_Iterator_Specification): Recognize types
9913 with Iterable aspect.
9914 * sem_ch13.adb (Validate_Iterable_Aspect): Verify that the
9915 subprograms specified in the Iterable aspect have the proper
9916 signature involving container and cursor.
9917 (Check_Aspect_At_Freeze_Point): Analyze value of iterable aspect.
9918 * sem_ch13.ads (Validate_Iterable_Aspect): New subprogram.
9919 * sem_util.ads, sem_util.adb (Get_Iterable_Type_Primitive):
9920 New procedure to retrieve one of the primitives First, Last,
9921 or Has_Element, from the value of the iterable aspect of a
9923 (Is_Container_Element): Predicate to recognize expressions
9924 that denote an element of one of the predefined containers,
9925 for possible optimization. This subprogram is not currently
9926 used, pending ARG discussions on the legality of the proposed
9927 optimization. Worth preserving for eventual use.
9928 (Is_Iterator): Recognize formal container types.
9929 * aspects.ads, aspects.adb: Add Aspect_Iterable where needed.
9931 2014-02-19 Robert Dewar <dewar@adacore.com>
9933 * exp_attr.adb (Expand_Min_Max_Attribute): New procedure
9934 (Expand_N_Attribute_Reference): Use this procedure for Min and Max.
9935 * exp_ch4.adb (Expand_N_Expression_With_Actions): Remove object
9936 declarations from list of actions.
9937 * output.ads, output.adb (Delete_Last_Char): New procedure.
9938 * sinfo.ads: Document handling of Mod and expression with actions
9939 in Modify_Tree_For_C mode.
9941 2014-02-19 Ed Schonberg <schonberg@adacore.com>
9943 * par-ch9.adb (P_Task): Add a null statement to produce a
9944 well-formed task body when due to a previous syntax error the
9945 statement list is empty.
9947 2014-02-19 Hristian Kirtchev <kirtchev@adacore.com>
9949 * sem_prag.adb (Check_Dependency_Clause): Account
9950 for the case where a state with a non-null refinement matches a
9951 null output list. Comment reformatting.
9952 (Inputs_Match): Copy a solitary input to avoid an assertion failure
9953 when trying to match the same input in multiple clauses.
9955 2014-02-19 Gary Dismukes <dismukes@adacore.com>
9957 * sem_attr.adb: Minor typo fix.
9959 2014-02-18 Robert Dewar <dewar@adacore.com>
9961 * cstand.adb (Build_Signed_Integer_Type): Minor change of formal
9962 from Int to Nat (Build_Unsigned_Integer_Type): New procedure
9963 (Create_Standard): Create new unsigned types.
9964 * exp_ch4.adb (Expand_N_Op_Mod): Expand mod in Modify_Tree_For_C
9965 mode (Expand_N_Reference): Removed, problematic and not needed
9967 * exp_ch4.ads (Expand_N_Reference): Removed, problematic and
9969 * exp_util.ads, exp_util.adb (Power_Of_Two): New function.
9970 * expander.adb: Remove call to Expand_N_Reference (problematic,
9971 and not needed now).
9972 * sem_aux.ads, sem_aux.adb (Corresponding_Unsigned_Type): New function.
9973 * stand.adb: Read and write unsigned type entities.
9974 * stand.ads: Add new unsigned types.
9976 2014-02-18 Hristian Kirtchev <kirtchev@adacore.com>
9978 * sem_ch4.adb (Analyze_Call): Do not mark a function call
9979 as being inside an assertion expression as the flag is now removed.
9980 (Check_Ghost_Subprogram_Call): Do not query the
9981 In_Assertion_Expression flag as it is now removed, instead use
9982 a predicate function.
9983 * sem_elab.adb (Check_Internal_Call_Continue): Do not query the
9984 In_Assertion_Expression flag as it is now removed, instead use
9985 a predicate function.
9986 * sem_prag.ads: Add new table Assertion_Expression_Pragma.
9987 * sem_util.adb Add with and use clause for Sem_Prag.
9988 (In_Assertion_Expression_Pragma): New routine.
9989 * sem_util.ads (In_Assertion_Expression_Pragma): New routine.
9990 * sinfo.adb (In_Assertion_Expression): Removed.
9991 (Set_In_Assertion_Expression): Removed.
9992 * sinfo.ads Remove flag In_Assertion_Expression along with its
9994 (In_Assertion_Expression): Removed along with
9995 pragma Inline. (Set_In_Assertion_Expression): Removed along
9998 2014-02-18 Sergey Rybin <rybin@adacore.com frybin>
10000 * gnat_ugn.texi: gnatpp section: add note that '-j' cannot be
10001 used together with '-r', '-rf' or '-rnb' options.
10003 2014-02-18 Hristian Kirtchev <kirtchev@adacore.com>
10005 * sem_attr.adb (Analyze_Attribute): Comment
10006 and code reformatting. Use separate routines to check the
10007 legality of attribute 'Old in certain pragmas. Verify
10008 the use of 'Old, 'Result and locally declared entities
10009 within the prefix of 'Old.
10010 (Check_References_In_Prefix): New routine.
10011 (Check_Use_In_Contract_Cases): New routine.
10012 (Check_Use_In_Test_Case): New routine.
10014 2014-02-18 Vincent Celier <celier@adacore.com>
10016 * sem_aux.adb (Is_By_Reference_Type): For each components of
10017 a record type, check also if the component is volatile as it
10018 may have an aspect that makes it volatile. If it is, then the
10019 record type is a by reference type.
10021 2014-02-18 Robert Dewar <dewar@adacore.com>
10023 * exp_attr.adb: Minor reformatting.
10024 * exp_ch4.ads, exp_ch4.adb (Expand_N_Reference): New procedure.
10025 * exp_util.adb (Remove_Side_Effects): Add conditional expressions
10026 as another case where we don't generate N_Reference nodes for
10028 * expander.adb (Expand): Add call to Expand_N_Reference.
10030 2014-02-06 Hristian Kirtchev <kirtchev@adacore.com>
10032 * sem_prag.adb (Analyze_Refined_Pragma): Remove
10033 local variable Pack_Spec. Refinement pragmas may now apply to
10034 bodies of both visible and private subprograms.
10036 2014-02-06 Robert Dewar <dewar@adacore.com>
10038 * exp_attr.adb (Expand_Loop_Entry_Attribute):
10039 Minor change (Attr => N) (Expand_Pred_Succ): New name
10040 Expand_Pred_Succ_Attribute (Expand_N_Attribute_Reference, case
10041 Max): Expand into if expression if Modify_Tree_For_C mode.
10042 (Expand_N_Attribute_Reference, case Min): ditto
10043 * sinfo.ads: Modify_Tree_For_C takes care of expanding Min and
10046 2014-02-06 Ed Schonberg <schonberg@adacore.com>
10048 * sem_ch3.adb (Analyze_Object_Declaration): Do not generate
10049 predicate check if this is an internal declaration with
10050 No_Initialization set, as for an expanded aggregate component.
10052 2014-02-06 Doug Rupp <rupp@adacore.com>
10054 * init.c (__gnat_default_resignal_p) [VMS]: Test for and resignal
10055 conditions with severity of "SUCCESS" or "INFORMATIONAL".
10057 2014-02-06 Yannick Moy <moy@adacore.com>
10059 * sem_prag.adb (Analyze_Pragma): Analyze pragma
10060 Debug rewritten node before rewriting it as a null statement in
10063 2014-02-06 Robert Dewar <dewar@adacore.com>
10065 * sem_attr.adb (Min_Max): New procedure.
10066 (Max_Alignment_For_Allocation_Max_Size_In_Storage_Elements): New
10069 2014-02-06 Sergey Rybin <rybin@adacore.com frybin>
10071 * gnat_ugn.texi, vms_data.ads: Add documentation of '-t' option for
10074 2014-02-06 Hristian Kirtchev <kirtchev@adacore.com>
10076 * sem_prag.adb (Analyze_Abstract_State): Update
10077 all calls to Create_Abstract_State to pass the proper state
10079 (Create_Abstract_State): Add new formal parameter
10080 State_Decl along with comment on usage. Establish a link between
10081 the abstract state entity and the state declaration.
10083 2014-02-06 Robert Dewar <dewar@adacore.com>
10085 * sem_attr.adb (Analyze_Attribute, case Max): Check for improper
10086 comparison of unordered enumeration type.
10087 (Analyze_Attribute, case Max): Check for improper comparison of
10088 unordered enumeration type.
10089 * sem_res.adb (Bad_Unordered_Enumeration_Reference): Moved to
10091 * sem_util.ads, sem_util.adb (Bad_Unordered_Enumeration_Reference):
10092 Moved here from Sem_Res.
10094 2014-02-06 Robert Dewar <dewar@adacore.com>
10096 * sem_ch3.adb, sem_prag.adb, sem_res.adb, lib-xref.adb: Minor
10099 2014-02-06 Hristian Kirtchev <kirtchev@adacore.com>
10101 * sem_ch6.adb (Process_Formals): Error message reformatting.
10103 2014-02-06 Hristian Kirtchev <kirtchev@adacore.com>
10105 * sem_ch3.adb (Handle_Late_Controlled_Primitive): Add local
10106 variable Spec. Do not inherit the null indicator from the
10107 subprogram body when generating the spec.
10109 2014-02-06 Robert Dewar <dewar@adacore.com>
10111 * casing.adb (Determine_Casing): Consider SPARK_Mode to be
10114 2014-02-06 Ed Schonberg <schonberg@adacore.com>
10116 * exp_ch6.adb (Is_Build_In_Place_Function): Predicate is false
10117 when the function has a foreign convention, but not if only the
10118 limited return type has such a convention.
10120 2014-02-06 Hristian Kirtchev <kirtchev@adacore.com>
10122 * sem_ch3.adb (Handle_Late_Controlled_Primitive): Remove local
10123 variable Spec. Comment reformatting. Use Copy_Separate_Tree
10124 rather than New_Copy_Tree when building the corresponding
10125 subprogram declaration.
10127 2014-02-06 Hristian Kirtchev <kirtchev@adacore.com>
10129 * sem_prag.adb (Analyze_Global_Item): Remove
10130 the mode-related checks on abstract states with enabled external
10132 (Property_Error): Removed.
10134 2014-02-06 Javier Miranda <miranda@adacore.com>
10136 * lib-xref.adb (Generate_Reference): When
10137 generating the reference to the first private entity take care
10138 of handling swapped entities.
10140 2014-02-06 Sergey Rybin <rybin@adacore.com frybin>
10142 * gnat_ugn.texi, vms_data.ads: Add documentation of -j option for
10145 2014-02-06 Robert Dewar <dewar@adacore.com>
10147 * exp_ch4.adb (Expand_N_Shift_Left): Handle shift counts greater
10148 than the word size when operating in Modify_Tree_For_C mode.
10149 * sinfo.ads: Add documentation section on Modify_Tree_For_C mode.
10151 2014-02-06 Robert Dewar <dewar@adacore.com>
10153 * erroutc.adb (Warning_Specifically_Suppressed.Matches):
10154 compare is case insensitive.
10155 * gnat_rm.texi: Document that string compare for Warnings Off
10156 is now case insensitive.
10158 2014-02-06 Eric Botcazou <ebotcazou@adacore.com>
10160 * gnat_rm.texi: Small wording tweak.
10162 2014-02-06 Pascal Obry <obry@adacore.com>
10164 * prj-attr.adb, projects.texi, snames.ads-tmpl: Add Included_Patterns
10165 and Included_Artifact_Patterns attribute definitions.
10167 2014-02-06 Yannick Moy <moy@adacore.com>
10169 * sem_ch6.adb (Analyze_Subprogram_Body_Helper): Set
10170 SPARK_Mode pragma component for all subprograms, including stubs.
10172 2014-02-06 Hristian Kirtchev <kirtchev@adacore.com>
10174 * sem_ch10.adb (Analyze_Package_Body_Stub): Maintain
10175 the configuration options of the enclosing context in a
10177 (Analyze_Subprogram_Body_Stub): Maintain the
10178 configuration options of the enclosing context in a stack-like
10181 2014-02-06 Robert Dewar <dewar@adacore.com>
10183 * debug.adb: -gnatd.u sets Modify_Tree_For C
10184 * exp_ch4.adb (Expand_N_Op_Rotate_Left): Expand out
10185 if Modify_Tree_For_C (Expand_N_Op_Rotate_Right): ditto.
10186 (Expand_N_Op_Arithmetic_Right_Shift): ditto.
10187 * exp_intr.adb (Expand_Shift): Call expander so we do
10188 Modify_Tree_For_C expansions.
10189 * gnat1drv.adb (Adjust_Global_Switches): Set Modify_Tree_For_C
10192 2014-02-06 Fedor Rybin <frybin@adacore.com>
10194 * prj-proc.ads (Tree_Loaded_Callback): new type Callback used
10195 after the phase 1 of the processing of each aggregated project
10196 to get access to project trees of aggregated projects.
10197 (Process_Project_Tree_Phase_1): new parameter On_New_Tree_Loaded
10198 If specified, On_New_Tree_Loaded is called after each aggregated
10199 project has been processed succesfully.
10200 (Process): new parameter On_New_Tree_Loaded.
10201 * prj-proc.adb (Process_Aggregated_Projects): On_New_Tree_Loaded
10202 callback added after processing of each aggregated project.
10203 (Recursive_Process): new parameter On_New_Tree_Loaded.
10204 (Process): new parameter On_New_Tree_Loaded.
10205 (Process_Project_Tree_Phase_1): new parameter On_New_Tree_Loaded.
10206 * prj-conf.ads (Parse_Project_And_Apply_Config): new parameter
10207 On_New_Tree_Loaded.
10208 * prj-conf.adb (Parse_Project_And_Apply_Config): new parameter
10209 On_New_Tree_Loaded.
10211 2014-02-06 Bob Duff <duff@adacore.com>
10213 * gnat_ugn.texi: Implement --insert-blank-lines and
10214 --preserve-blank-lines switches.
10216 2014-02-06 Sergey Rybin <rybin@adacore.com frybin>
10218 * gnat_ugn.texi, vms_data.ads: Add documentation of -j option for
10221 2014-02-06 Eric Botcazou <ebotcazou@adacore.com>
10223 * gnat_rm.texi (Pragma Optimize_Alignment): Document the effect
10224 of the pragma on individual objects.
10226 2014-02-06 Hristian Kirtchev <kirtchev@adacore.com>
10228 * einfo.adb Node29 is now used as BIP_Initialization_Call.
10229 (BIP_Initialization_Call): New routine.
10230 (Set_BIP_Initialization_Call): New routine.
10231 (Write_Field29_Name): Add an entry for constants and variables.
10232 * einfo.ads Add new attribute BIP_Initialization_Call and update
10233 its usage in nodes.
10234 (BIP_Initialization_Call): New routine along with pragma Inline.
10235 (Set_BIP_Initialization_Call): New routine along with pragma Inline.
10236 * exp_ch6.adb (Make_Build_In_Place_Call_In_Object_Declaration):
10237 Add local declaration Res_Decl. Capture the build-in-place
10238 initialization call when the related object declaration has
10239 created a transient block.
10240 * exp_ch7.adb (Process_Transient_Objects): Add local variable
10241 Fin_Insrt. Recognize a scenario where an object declaration acts
10242 as a transient context and is initialized by a build-in-place
10245 2014-02-06 Pascal Obry <obry@adacore.com>
10247 * prj-util.adb (For_Interface_Sources): Fix handling of required
10248 bodies for aggregate libs.
10250 2014-02-06 Robert Dewar <dewar@adacore.com>
10252 * nlists.ads: Minor comment clarifications.
10254 2014-02-06 Robert Dewar <dewar@adacore.com>
10256 * gnat1drv.adb (Adjust_Global_Switches): Set Modify_Tree_For_C
10258 * opt.ads (Modify_Tree_For_C): New flag.
10259 * output.ads, output.adb (Last_Char): New function.
10261 2014-02-06 Pascal Obry <obry@adacore.com>
10263 * projects.texi, prj-env.adb (Initialize_Default_Project_Path): Add
10264 share/gpr for cross-builds.
10266 2014-02-06 Robert Dewar <dewar@adacore.com>
10268 * exp_util.ads, checks.adb, sem_prag.adb, prj-util.adb, sem_ch13.adb:
10269 Minor reformatting and code clean ups.
10271 2014-02-06 Pascal Obry <obry@adacore.com>
10273 * prj-util.adb (For_Interface_Sources): Skip non compilable languages.
10274 * prj.ads: Minor typo fix in comment.
10276 2014-02-06 Hristian Kirtchev <kirtchev@adacore.com>
10278 * sem_prag.adb (Analyze_Depends_In_Decl_Part): Add
10279 local variable Expr. Flag clauses with extra parenthesis as this
10280 is not allowed by the syntax of the pragma. Code reformatting.
10282 2014-02-06 Hristian Kirtchev <kirtchev@adacore.com>
10284 * exp_attr.adb (Expand_N_Attribute_Reference): Alphabetize
10285 variables. Rename variabme Tnn to Temp. Do not create a temporary
10286 if assertions are disabled. Find enclosing routine _Postconditions
10287 and insert the temporary that captures the value of the prefix
10288 before the routine.
10289 * exp_ch6.adb (Build_Postconditions_Procedure):
10290 Insert the generated _Postconditions routine
10291 before the first source declaration of the related
10293 (Insert_After_Last_Declaration): Removed.
10294 (Insert_Before_First_Source_Declaration): New routine.
10296 2014-02-06 Ed Schonberg <schonberg@adacore.com>
10298 * exp_util.adb, exp_util.ads (Within_Internal_Subprogram):
10299 Utility to determine whether current expansion is for the body
10300 of a predefined primitive operation.
10301 (Make_Predicate_Check): Use Within_Internal_Subpgram
10302 * checks.adb (Apply_Predicate_Check): Use
10303 Within_Internal_Subprogram
10304 * sem_ch13.adb (Freeze_Entity_Checks): Ditto.
10306 2014-02-06 Pascal Obry <obry@adacore.com>
10308 * prj.ads, prj-util.adb: Minor reformatting.
10310 2014-02-06 Ed Schonberg <schonberg@adacore.com>
10312 * exp_ch6.adb (Expand_Subprogram_Contract, Append_Enabled_Item):
10313 Take into account the Split_PPC flag to ensure that conjuncts
10314 in a composite postcondition aspect are tested in source order.
10316 2014-02-06 Hristian Kirtchev <kirtchev@adacore.com>
10318 * sem_ch6.adb (Analyze_Generic_Subprogram_Body): Flag illegal
10320 * sem_ch12.adb (Analyze_Generic_Subprogram_Declaration): Flag
10321 illegal use of SPARK_Mode.
10322 (Instantiate_Subprogram_Body): Flag illegal use of SPARK_Mode.
10323 * sem_prag.adb (Analyze_Pragma): Code reformatting.
10324 * sem_util.adb Add with and use clause for Aspects.
10325 (Check_SPARK_Mode_In_Generic): New routine.
10326 * sem_util.ads (Check_SPARK_Mode_In_Generic): New routine.
10328 2014-02-06 Thomas Quinot <quinot@adacore.com>
10330 * a-calend.adb (Formatting_Operations.Split): Ensure that
10331 Time_Error is raised for invalid time values.
10333 2014-02-06 Arnaud Charlet <charlet@adacore.com>
10335 * sem_prag.adb (Analyze_Pragma): Rewrite as a null statement
10338 2014-02-06 Robert Dewar <dewar@adacore.com>
10340 * einfo.ads, einfo.adb (Is_Discriminant_Check_Function): New flag.
10341 * exp_ch3.adb (Build_Dcheck_Function): Set
10342 Is_Discriminant_Check_Function.
10344 2014-02-06 Hristian Kirtchev <kirtchev@adacore.com>
10346 * exp_ch7.adb (Is_Subprogram_Call): Inspect
10347 the original tree in certain cases where a construct has been
10348 factored out and replaced by a reference to a temporary.
10350 2014-02-06 Ed Schonberg <schonberg@adacore.com>
10352 * sem_ch3.adb (Process_Full_View): Fix typo in the order of
10353 parameters when propagating predicate function to full view.
10354 (Find_Type_Of_Object): Freeze base type of object type to catch
10355 premature use of discriminated private type without a full view.
10357 2014-02-06 Robert Dewar <dewar@adacore.com>
10359 * sprint.adb: Minor reformatting.
10361 2014-02-06 Hristian Kirtchev <kirtchev@adacore.com>
10363 * exp_ch4.adb (Process_Transient_Object): Add local variable
10364 Temp_Ins. When the transient object is initialized by an
10365 aggregate, the hook must capture the object after the last
10366 component assignment takes place.
10367 * exp_ch7.adb (Detect_Subprogram_Call): Expose the subprogram to
10368 routine Is_Subprogram_Call.
10369 (Is_Subprogram_Call): Inspect an
10370 aggregate that has been heavily expanded for subprogram calls.
10371 (Process_Transient_Objects): Add local variables Expr, Ptr_Id
10372 and Temp_Ins. Remove the nested declare block and adjust the
10373 indentation. When the transient object is initialized by an
10374 aggregate, the hook must capture the object after the last
10375 component assignment takes place.
10377 2014-02-06 Hristian Kirtchev <kirtchev@adacore.com>
10379 * sem_prag.adb (Analyze_Global_Item): Detect illegal uses of
10380 external states with enabled properties that do not match the
10382 (Property_Error): New routine.
10383 * sem_res.adb (Property_Error): New routine.
10384 (Resolve_Actuals): Detect illegal uses of external variables with
10385 enabled properties in procedure calls that do not match the mode of
10386 the corresponding formal parameter.
10388 2014-02-06 Hristian Kirtchev <kirtchev@adacore.com>
10390 * sem_util.adb (Has_Enabled_Property): Rename
10391 formal parameter Prop_Nam to Property. Update the comment on usage
10392 and all occurrences in the body. Add local variable Prop_Nam. When
10393 inspecting a property with an expression, the property name
10394 appears as the first choice of the component association.
10396 2014-02-04 Robert Dewar <dewar@adacore.com>
10398 * exp_ch5.adb, einfo.ads, freeze.adb, sem_ch8.adb: Minor reformatting.
10400 2014-02-04 Gary Dismukes <dismukes@adacore.com>
10402 * sem_aggr.adb: Change "runtime" to "run time" in warning message,
10403 for consistency with other messages.
10405 2014-02-04 Ed Schonberg <schonberg@adacore.com>
10407 * exp_ch5.adb (Expand_Iterator_Loop): For a container element
10408 iterator, indicate that the element is a constant if the container
10409 type does not have a variable indexing aspect.
10410 * sem_ch8.adb (Analyze_Object_Renaming): If the entity is already
10411 marked as constant, do not reset its Ekind, to ensure that
10412 container elements in an element loop are not modified if the
10413 container (e.g. a hashed set) only has a constant indexing aspect.
10415 2014-02-04 Arnaud Charlet <charlet@adacore.com>
10417 * g-souinf.ads: Subprograms in this unit are actually not pure.
10418 * freeze.adb (Freeze_Subprogram): Do not reset Is_Pure for Intrinsics.
10419 * einfo.ads (Is_Pure): Update doc to match implementation.
10421 2014-02-04 Gary Dismukes <dismukes@adacore.com>
10423 * exp_ch13.adb: Minor spelling fix.
10425 2014-02-04 Robert Dewar <dewar@adacore.com>
10427 * opt.ads: Minor comment update.
10429 2014-02-04 Robert Dewar <dewar@adacore.com>
10431 * exp_ch4.adb (Expand_N_Expression_With_Actions): Use Rewrite
10432 instead of Replace.
10434 2014-02-04 Ed Schonberg <schonberg@adacore.com>
10436 * sem_aggr.adb (Resolve_Array_Aggregate): Suppress warnings
10437 on null expressions if component type is non-null, when the
10438 corresponding association covers an empty range of index values.
10440 2014-02-04 Robert Dewar <dewar@adacore.com>
10442 * sinfo.ads: Further comments on N_Expression_With_Actions node.
10444 2014-02-04 Hristian Kirtchev <kirtchev@adacore.com>
10446 * sem_prag.adb (Analyze_Refined_Depends_In_Decl_Part): Remove global
10447 variables Out_Items and Ref_Global. Remove local constant
10448 Body_Id along with dummy variables D1, D2, D3, D4, D5, D6, D7
10449 and D8. Remove the useless collection of global items as this
10450 was a leftover from an earlier version of the routine. Move
10451 several routines out to avoid deep nesting and indentation.
10452 (Inputs_Match): Add formal parameter Dep_Clause. Rename formal
10453 parameter Do_Checks to Post_Errors. Update the comment on usage.
10454 (Is_Matching_Input): Renamed to Input_Match. Add formal parameters
10455 Ref_Inputs and Do_Checks. Rename formal parameter Do_Checks
10456 to Post_Errors. Update the comment on usage. Account for the
10457 case where a self referential state may have a null input_list.
10458 (Is_Self_Referential): New routine.
10460 2014-02-04 Ed Schonberg <schonberg@adacore.com>
10462 * sem_ch13.adb (Analyze_Attribute_Definition_Clause): If the
10463 entity renames an expression, as in the case of an object of
10464 an unconstrained type initialized by a function call, defer the
10465 rewriting of the expression to the expander.
10466 * exp_ch13.adb (Expand_N_Attribute_Definition_Clause, case
10467 'Alignment): If the entity renames an expression, introduce
10468 temporary to capture value, and rewrite original declaration to
10471 2014-02-04 Gary Dismukes <dismukes@adacore.com>
10473 * g-comlin.adb: Minor typo fix.
10475 2014-02-04 Ed Schonberg <schonberg@adacore.com>
10477 * freeze.adb (Freeze_All): Types derived from a formal
10478 access_to_classwide type do not have a finalization master.
10480 2014-02-04 Robert Dewar <dewar@adacore.com>
10482 * sprint.adb: Minor reformatting.
10484 2014-02-04 Robert Dewar <dewar@adacore.com>
10486 * exp_ch4.adb (Expand_N_Expression_With_Actions): Eliminate
10487 cases where Actions is a null list.
10488 * sinfo.ads (N_Expression_With_Actions): Actions can be
10489 temporarily empty during semantic analysis, but must be non-empty
10490 in the final expanded tree.
10492 2014-01-31 Robert Dewar <dewar@adacore.com>
10494 * exp_ch9.adb: Minor reformatting.
10496 2014-01-31 Emmanuel Briot <briot@adacore.com>
10498 * g-comlin.adb (Set_Command_Line): Take the switches
10499 configuration from the Command_Line_Config.
10501 2014-01-31 Hristian Kirtchev <kirtchev@adacore.com>
10503 * sem_prag.adb (Analyze_Refinement_Clause): Guard against a malformed
10506 2014-01-31 Vincent Celier <celier@adacore.com>
10508 * projects.texi: Add more documentation about others used as an
10509 index in indexed attributes.
10511 2014-01-31 Robert Dewar <dewar@adacore.com>
10513 * gnat_ugn.texi: Minor update.
10514 * gnat_rm.texi: Add example to Restriction_Warnings documentation.
10515 * exp_util.adb: Minor reformatting.
10517 2014-01-31 Ed Schonberg <schonberg@adacore.com>
10519 * exp_ch9.adb (Expand_Entry_Barrier): Warn if the barrier
10520 depends on data that is not private to the protected object,
10521 and potentially modifiable in unsynchronized fashion.
10523 2014-01-31 Yannick Moy <moy@adacore.com>
10525 * erroutc.adb (Validate_Specific_Warnings): Remove special case for
10528 2014-01-31 Robert Dewar <dewar@adacore.com>
10530 * prj-attr.ads (First_Attribute_Of): Returns Empty_Attribute
10531 for Unknown_Package.
10532 * sem_ch6.adb, sem_attr.adb: Minor comment addition.
10534 2014-01-31 Hristian Kirtchev <kirtchev@adacore.com>
10536 * exp_util.adb (Build_Allocate_Deallocate_Proc): Rewrite
10537 the logic that generates a runtime check to determine the
10538 controlled status of the object about to be allocated or
10539 deallocated. Class-wide types now always use a runtime check
10540 even if they appear as generic actuals.
10541 (Find_Object): Detect
10542 a special case that involves interface class-wide types because
10543 the object appears as a complex expression.
10545 2014-01-31 Ed Schonberg <schonberg@adacore.com>
10547 * sem_ch6.adb (Process_Formals): In Ada2012 mode, place
10548 subprogram with an incomplete untagged formals on the list of
10549 private dependents, to verify that the type is properly completed
10550 in the private part.
10551 * sem_attr.adb: Code clean up.
10553 2014-01-31 Robert Dewar <dewar@adacore.com>
10555 * exp_ch6.adb: Minor reformatting.
10557 2014-01-31 Vincent Celier <celier@adacore.com>
10559 * prj-attr.adb (First_Attribute_Of): Return Unknown_Attribute
10560 when Pkg is unknown.
10562 2014-01-31 Hristian Kirtchev <kirtchev@adacore.com>
10564 * sem_res.adb (Resolve_Entity_Name): Comment
10565 reformatting. Allow volatile objects in various generated checks.
10567 2014-01-31 Ed Schonberg <schonberg@adacore.com>
10569 * sem_attr.adb (Analyze_Attribute, case 'Update): For a record
10570 component association, set the etype of the identifier, for
10573 2014-01-31 Ed Schonberg <schonberg@adacore.com>
10575 * exp_ch6.adb (Has_Visibility_Of_Subprogram): If type is not
10576 declared in a package, not checks can apply to the subprogram.
10578 2014-01-31 Robert Dewar <dewar@adacore.com>
10580 * erroutc.adb (Validate_Specific_Warnings): Warnings are
10581 controlled -gnatw.W.
10582 * gnat_ugn.texi: Document new warnings controlled by -gnatw.w.
10583 * opt.ads (Warn_On_Warnings_Off): Now controls more cases.
10585 2014-01-31 Arnaud Charlet <charlet@adacore.com>
10587 * exp_disp.adb: Update comments.
10589 2014-01-31 Yannick Moy <moy@adacore.com>
10591 * sem_ch12.adb (Analyze_Generic_Subprogram_Declaration,
10592 Save_Global_References): Guard access to expression in aspect.
10594 2014-01-31 Yannick Moy <moy@adacore.com>
10596 * sem_prag.adb (Analyze_Pragma/Pragma_SPARK_Mode):
10597 Issue an error when the pragma is applied to a generic unit,
10598 a generic declaration, or inside a generic.
10600 2014-01-31 Yannick Moy <moy@adacore.com>
10602 * sem_ch8.adb (Analyze_Subprogram_Renaming): Set SPARK_Mode on renaming
10605 2014-01-31 Robert Dewar <dewar@adacore.com>
10607 * exp_ch9.adb, s-tassta.adb, s-tposen.adb, s-tposen.ads: Minor
10610 2014-01-31 Tristan Gingold <gingold@adacore.com>
10612 * exp_disp.adb: Add a historic note.
10614 2014-01-31 Robert Dewar <dewar@adacore.com>
10616 * sem_warn.adb (Warn_On_Useless_Assignments): Add call to
10617 Process_Deferred_References.
10619 2014-01-31 Yannick Moy <moy@adacore.com>
10621 * erroutc.adb (Validate_Specific_Warnings): Do not issue a message for
10622 ineffective pragma Warnings(Off) in GNATprove_Mode.
10624 2014-01-31 Bob Duff <duff@adacore.com>
10626 * s-taskin.ads: Minor comment fix.
10627 * s-tassta.adb (Abort_Dependents): Don't abort all dependents;
10628 just direct dependents. If this is actually an abort, each task
10629 will take care of aborting its dependents, so all dependents will
10630 get aborted, as before. However, when this is called the second
10631 time from Vulnerable_Complete_Master "for convenience" (i.e. to
10632 kill off tasks waiting at terminate alternatives), aborting
10633 indirect dependents is wrong, because it causes some unrelated
10634 tasks to get aborted.
10636 2014-01-31 Robert Dewar <dewar@adacore.com>
10638 * sem_ch4.adb: Minor reformatting.
10640 2014-01-31 Robert Dewar <dewar@adacore.com>
10642 * exp_ch2.adb: New calling sequence for Is_LHS.
10643 * frontend.adb: Add call to Process_Deferred_References.
10644 * lib-xref.ads, lib-xref.adb (Process_Deferred_References): New.
10645 (Deferred_References): New table.
10646 * sem_ch8.adb (Find_Direct_Name): Make deferred reference table
10648 (Find_Expanded_Name): Ditto.
10649 * sem_res.adb: New calling sequence for Is_LHS.
10650 * sem_util.ads, sem_util.adb (Is_LHS): New calling sequence.
10651 * sem_warn.adb: Call Process_Deferred_References before issuing
10654 2014-01-31 Tristan Gingold <gingold@adacore.com>
10656 * exp_util.adb (Corresponding_Runtime_Package): Restrict the
10657 use of System_Tasking_Protected_Objects_Single_Entry.
10658 * exp_ch9.adb (Build_Simple_Entry_Call): Remove Mode parameter
10659 of Protected_Single_Entry_Call.
10660 (Expand_N_Timed_Entry_Call): Remove single_entry case.
10661 * exp_disp.adb (Make_Disp_Asynchronous_Select_Body): Remove
10663 (Make_Disp_Timed_Select_Body): Likewise.
10664 * rtsfind.ads (RE_Timed_Protected_Single_Entry_Call): Remove.
10665 * s-tposen.adb (Send_Program_Error, PO_Do_Or_Queue): Remove
10667 (Wakeup_Entry_Caller): Remove Self_ID and New_State parameters.
10668 (Wait_For_Completion_With_Timeout): Remove.
10669 (Protected_Single_Entry_Call): Remove Mode parameter
10670 (always Simple_Call).
10671 (Service_Entry): Remove Self_Id constant (not used anymore).
10672 (Timed_Protected_Single_Entry_Call): Remove.
10673 * s-tposen.ads (Timed_Protected_Single_Entry_Call): Remove.
10674 (Protected_Single_Entry_Call): Remove Mode parameter.
10676 2014-01-29 Hristian Kirtchev <kirtchev@adacore.com>
10678 * einfo.adb (Get_Pragma): Handle the retrieval of pragma Refined_Post.
10679 * einfo.ads (Get_Pragma): Update the comment on special pragmas
10680 handled by this routine.
10681 * sem_prag.adb (Analyze_Pragma): Add a legal pragma Refined_Post
10682 to the contract of the related subprogram body.
10683 * sem_util.adb (Add_Contract_Item): Handle the insertion of
10684 pragma Refined_Post into the contract of a subprogram body.
10685 * sinfo.ads Update the documentation of node N_Contract.
10686 * sem_res.adb (Resolve_Entity_Name): Add a guard
10687 to detect abstract states and variables only when checking the
10688 SPARK 2014 rules concerning volatile object placement.
10690 2014-01-29 Ed Schonberg <schonberg@adacore.com>
10692 * sem_ch4.adb (Find_Equality_Types, Try_One_Interp): within an instance,
10693 null is compatible with any access type.
10695 2014-01-29 Hristian Kirtchev <kirtchev@adacore.com>
10697 * sem_util.adb (Find_Placement_In_State_Space): Assume that the default
10698 placement is not in a package.
10700 2014-01-29 Hristian Kirtchev <kirtchev@adacore.com>
10702 * sem_util.adb (Has_Enabled_Property): Compare the character field of
10705 2014-01-29 Robert Dewar <dewar@adacore.com>
10707 * sem_intr.adb, a-ztexio.ads, sinfo.ads, sem_res.adb, gnatlink.adb,
10708 vms_conv.adb, a-except.ads, a-except-2005.ads, a-teioed.adb,
10709 sem_warn.ads, treepr.ads, erroutc.ads, a-excach.adb: Minor reformatting.
10711 2014-01-29 Robert Dewar <dewar@adacore.com>
10713 * sem_util.ads, sem_util.adb (In_Pragma_Expression): New function.
10714 * sem_warn.adb (Check_References): Suppress warnings if inside
10715 Initial_Condition pragma.
10717 2014-01-29 Hristian Kirtchev <kirtchev@adacore.com>
10719 * sem_prag.adb (Check_Missing_Part_Of): List all values of
10720 State_Space_Kind for readability reasons. Do not emit an error on
10721 a private item when the enclosing package lacks aspect/pragma
10722 Abstract_State. Do not emit an error on a private package
10723 instantiation when the corresponding generic template lacks
10725 (Has_Visible_State): New routine.
10726 * sem_util.adb (Find_Placement_In_State_Space): The visible
10727 declarations of any kind of child units in general act as proper
10728 placement location.
10730 2014-01-29 Robert Dewar <dewar@adacore.com>
10732 * a-except-2005.adb, a-except.adb, a-excpol-abort.adb, a-exstat.adb,
10733 ali.adb, a-numaux.ads, a-numaux-darwin.ads, a-numaux-libc-x86.ads,
10734 a-numaux-vms.ads, a-numaux-vxworks.ads, a-numaux-x86.ads, aspects.ads,
10735 a-taside.adb, a-teioed.adb, a-textio.adb, a-textio.ads, atree.adb,
10736 atree.ads, a-witeio.adb, a-witeio.ads, a-wtedit.adb, a-ztedit.adb,
10737 a-ztexio.adb, bcheck.adb, binde.adb, checks.adb, comperr.adb,
10738 cstand.adb, debug_a.adb, einfo.ads, errout.adb, erroutc.adb,
10739 eval_fat.adb, exp_aggr.adb, exp_attr.adb, exp_ch11.adb, exp_ch3.adb,
10740 exp_ch4.adb, exp_ch5.adb, exp_ch6.adb, exp_ch9.adb, exp_dbug.adb,
10741 exp_disp.adb, exp_fixd.adb, exp_imgv.adb, exp_intr.adb, exp_util.adb,
10742 freeze.adb, frontend.adb, g-comlin.ads, g-mbdira.adb, gnat1drv.adb,
10743 gprep.adb, g-spipat.adb, i-cpp.ads, i-vxwork.ads, i-vxwork-x86.ads,
10744 krunch.ads, layout.adb, lib-load.adb, lib-writ.adb, lib-writ.ads,
10745 live.adb, namet.ads, osint.adb, osint-c.adb, output.ads, par.adb,
10746 par-ch10.adb, par-ch13.adb, par-ch3.adb, par-ch4.adb, par-ch5.adb,
10747 par-ch6.adb, par-ch9.adb, par-endh.adb, par-labl.adb, par-prag.adb,
10748 par-sync.adb, par-tchk.adb, par-util.adb, prj.adb, repinfo.adb,
10749 rtsfind.adb, s-arit64.adb, s-asthan-vms-alpha.adb,
10750 s-asthan-vms-ia64.adb, s-bignum.adb, scans.adb, scng.adb, s-dimmks.ads,
10751 sem_aggr.adb, sem_attr.adb, sem_aux.adb, sem_cat.adb, sem_ch10.adb,
10752 sem_ch12.adb, sem_ch13.adb, sem_ch13.ads, sem_ch3.adb, sem_ch4.adb,
10753 sem_ch5.adb, sem_ch6.adb, sem_ch8.adb, sem_disp.adb, sem_elab.adb,
10754 sem_elim.adb, sem_eval.adb, sem_intr.adb, sem_prag.adb, sem_res.adb,
10755 sem_type.adb, sem_util.adb, sem_warn.adb, set_targ.adb, s-fatgen.adb,
10756 s-fatgen.ads, s-fileio.adb, s-imgcha.adb, s-imgrea.adb, sinfo.ads,
10757 sinput-c.adb, snames.ads-tmpl, s-os_lib.adb, sprint.adb,
10758 s-regpat.adb, s-secsta.adb, s-stalib.ads,
10759 s-stchop.adb, s-stoele.ads, stand.ads, s-taprop-solaris.adb,
10760 s-tasdeb-vms.adb, s-tasini.adb, s-tassta.adb, s-valdec.adb,
10761 s-valuti.adb, s-wchjis.adb, s-wchwts.adb, system.ads, system-vms_64.ads,
10762 system-vms-ia64.ads, treepr.adb, types.ads, uintp.adb, uname.adb,
10763 urealp.adb, usage.adb, vxaddr2line.adb: Minor reformatting.
10765 2014-01-29 Robert Dewar <dewar@adacore.com>
10767 * expander.adb: Minor reformatting.
10769 2014-01-29 Javier Miranda <miranda@adacore.com>
10771 * exp_ch3.adb (Predefined_Primitive_Bodies): Adding documentation to
10774 2014-01-29 Javier Miranda <miranda@adacore.com>
10776 * exp_ch3.adb (Predefined_Primitive_Bodies): Complete the code
10777 that checks if an interface types defines the predefined "="
10778 function because the compiler was erroneously not generating the
10779 predefined "=" primitive as soon as the name of some interface
10780 primitive is "=" (formals were not checked).
10782 2014-01-29 Ed Schonberg <schonberg@adacore.com>
10784 * expander.adb (Expander): In GNATprove mode, do not process
10785 transient scopes: they are in general not created in this mode,
10786 and an attempt to examine them will lead to constraint errors when
10787 processing configuration pragmas that have analyzable expressions.
10789 2014-01-29 Vincent Celier <celier@adacore.com>
10791 * clean.adb (Gnatclean): Fail if main project is an aggregate
10792 project or if there is an aggregate library project in the
10794 * gnatcmd.adb: Fail if the main project is an aggregate project
10795 or if there is an aggegate library project in the project tree.
10796 * make.adb (Initialize): : Fail if main project is an aggregate
10797 project or if there is an aggregate library project in the
10799 * makeutl.ads (Aggregate_Libraries_In): New Boolean function.
10800 * prj-makr.adb (Initialize): Fail if the main project is an
10801 aggregate project or an aggregate library project.
10803 2014-01-29 Vincent Celier <celier@adacore.com>
10805 * prj-part.adb (Check_Import_Aggregate): New procedure
10806 to check if an imported project is an aggregate project.
10807 (Parse_Single_Project): Call Check_Import_Aggregate
10808 * projects.texi: Document that aggregate projects cannot be
10809 extended or imported.
10811 2014-01-29 Robert Dewar <dewar@adacore.com>
10813 * exp_ch9.adb, sem_ch7.ads, s-regexp.adb, sem_ch13.adb: Minor
10814 reformatting and code clean up.
10815 * gnat_ugn.texi: Add documentation section on Atomic Variables
10818 2014-01-29 Hristian Kirtchev <kirtchev@adacore.com>
10820 * einfo.adb Flag264 is now unused.
10821 (Has_Body_References): Removed.
10822 (Set_Has_Body_References): Removed.
10823 (Write_Entity_Flags): Remove the output for flag Has_Body_References.
10824 * einfo.ads Update the comment on usage of attribute
10825 Body_References. Remove attribute Has_Body_References and its
10827 (Has_Body_References): Removed along with pragma Inline.
10828 (Set_Has_Body_References): Removed along with pragma Inline.
10829 * sem_prag.adb (Analyze_Global_Item): Move the call to
10830 Record_Possible_Body_Reference in the state related checks
10831 section. Add a comment intended function.
10832 (Analyze_Input_Output): Move the call to Record_Possible_Body_Reference
10833 in the state related checks section. Add a comment intended function.
10834 (Analyze_Refinement_Clause): Cleanup the illegal body reference
10835 reporting. Add a comment on timing of error reporting.
10836 (Record_Possible_Body_Reference): Reimplement the routine.
10838 2014-01-29 Vincent Celier <celier@adacore.com>
10840 * makeutl.adb (Mains.Find_File_Add_Extension): Only look for specs for
10841 unit-based languages.
10842 (Mains.Complete_Mains.Do_Complete): Use the source file project
10843 tree when calling Find_File_Add_Extension. Use the correct
10844 project name when reporting an error.
10846 2014-01-29 Hristian Kirtchev <kirtchev@adacore.com>
10848 * aspects.adb Add an entry for aspect Part_Of in table
10850 * aspects.ads Add an entry for aspect Part_Of in tables Aspect_Id,
10851 Aspect_Argument, Aspect_Names and Aspect_Delay.
10852 * atree.h Define Elist9.
10853 * atree.adb (Elist9): New routine.
10854 (Set_Elist9): New routine.
10855 * atree.ads (Elist9): New routine.
10856 (Set_Elist9): New routine.
10857 * einfo.adb Add Part_Of_Constituents and Encapsulating_State to
10858 the list of node usage. Remove Refined_State from the list of
10860 (Encapsulating_State): New routine.
10862 Handle pragma Part_Of; (Part_Of_Constituents): New routine.
10863 (Refined_State): Removed.
10864 (Set_Encapsulating_State): New routine.
10865 (Set_Part_Of_Constituents): New routine.
10866 (Set_Refined_State): Removed.
10867 (Write_Field9_Name): Add an entry
10868 for Part_Of_Constituents (Write_Field10_Name): Add an entry for
10869 Encapsulating_State. Remove the entry for Refined_State.
10870 * einfo.ads Add new attributes Encapsulating_State
10871 and Part_Of_Constituents alond with their usage in
10872 entities. Remove attribute Refined_State along with its
10874 (Encapsulating_State): New routine and
10875 pragma Inline. (Get_Pragma): Update the comment on usage.
10876 (Part_Of_Constituents): New routine and pragma Inline.
10877 (Refined_State): Removed along with pragma Inline.
10878 (Set_Encapsulating_State): New routine and pragma Inline.
10879 (Set_Part_Of_Constituents): New routine and pragma Inline.
10880 (Set_Refined_State): Removed along with pragma Inline.
10881 * par-prag.adb Pragma Part_Of does not need any special processing
10883 * sem_ch3.adb (Analyze_Declarations): Remove local variables
10884 Body_Id and Prag. Call separate routines to analyze the
10885 contract of a package [body].
10886 (Analyze_Object_Contract):
10887 Update the comment on usage. Remove local variables
10888 Items and Nam. Use Get_Pragma rather than traversing the
10889 classification list. Verify whether the lack of indicator
10890 Part_Of agrees with the placement of the variable in state space.
10891 (Analyze_Object_Declaration): Initialize the encapsulating state
10892 of a variable. (Requires_State_Refinement): Moved to sem_util.
10893 * sem_ch7.adb (Analyze_Package_Body_Contract): New routine.
10894 (Analyze_Package_Contract): New routine.
10895 * sem_ch7.ads (Analyze_Package_Body_Contract): New routine.
10896 (Analyze_Package_Contract): New routine.
10897 * sem_ch10.adb (Decorate_State): Initialize the encapsulating
10898 state and Part_Of constituents.
10899 * sem_ch13.adb (Analyze_Aspect_Specifications):
10900 Add processing for aspect Part_Of. Update all
10901 calls to Decorate_Delayed_Aspect_And_Pragma.
10902 (Check_Aspect_At_Freeze_Point): Aspect Part_Of does
10903 not need any special processing at freeze time.
10904 (Decorate_Delayed_Aspect_And_Pragma): Renamed to
10905 Decorate_Aspect_And_Pragma. Add formal parameter Delayed and
10906 update the associated comment.
10907 * sem_prag.adb Add an entry for pragma Part_Of in table Sig_Flags.
10908 (Analyze_Abstract_State): Add new global variable State_Id. Remove
10909 local constants Errors and Loc. Remove local variables Is_Null
10910 and State_Nam. Create the entity of the abstract state on the
10911 spot, before all remaining checks are performed. Verify that a
10912 missing Part_Of option agrees with the placement of the abstract
10913 state within the state space.
10914 (Analyze_Depends_In_Decl_Part):
10915 Add new global variables Constits_Seen and States_Seen. Check
10916 that a state and a corresponding constituent do not appear
10917 in pragma [Refined_]Depends.
10918 (Analyze_Global_In_Decl_Part):
10919 Add new global variables Constits_Seen and States_Seen. Check
10920 that a state and a corresponding constituent do not appear
10921 in pragma [Refined_]Global.
10922 (Analyze_Global_Item):
10923 Remove the now obsolete code that deals with Part_Of.
10924 Add the entity of the global item to the list of processed
10925 items. (Analyze_Initializes_In_Decl_Part): Add new global
10926 variables Constits_Seen and States_Seen. Check that a state
10927 and a corresponding constituent do not appear in pragma
10929 (Analyze_Initialization_Item): Add the entity
10930 of the initialization item to the list of processed items.
10931 (Analyze_Input_Item): Add the entity of the initialization
10932 item to the list of processed items.
10933 (Analyze_Input_Output):
10934 Remove the now obsolete code that deals with Part_Of. Add the
10935 entity of the input/output to the list of processed items.
10936 (Analyze_Part_Of): New routine.
10937 (Analyze_Part_Of_Option): Remove
10938 local constant Par_State. Add local constant Encaps and local
10939 variables Encaps_Id and Legal. Use Analyze_Part of to analyze
10940 the option. Turn the related state into a Part_Of constituent
10941 if the option is legal.
10942 (Analyze_Pragma): Add processing
10943 for pragma Part_Of.
10944 (Analyze_Refined_State_In_Decl_Part):
10945 Remove global constants Pack_Body and Spec_Id. Remove
10946 global variables Abstr_States and Hidden_States. Add new
10947 global variables Available_States, Body_Id, Body_States and
10948 Spec_Id. Add new local constant Body_Decl. Reimplement the
10949 logic that extracts the states available for refinement from
10950 the related package and the body hidden states of the said
10952 (Analyze_Refinement_Clause): Add local variable Part_Of_Constits.
10953 (Check_Applicable_Policy): Alphabetize body.
10954 (Check_Dependency_Clause): Replace Refined_State
10955 with Encapsulating_State.
10956 (Check_Matching_Constituent):
10957 Reimplement the logic that determines whether an item is a valid
10958 / invalid constituent of the current refined state. Return when
10959 a construct does not denote a valid abstract state. Extract the
10960 list of Part_Of constituents for further analysis. Check that all
10961 Part_Of constituents of a state have been used in its refinement.
10962 (Check_Matching_State): Update the comment on usage. Operate
10963 on the list of available states.
10964 (Check_Missing_Part_Of): New routine.
10965 (Check_Refined_Global_Item): Replace Refined_State
10966 with Encapsulating_State.
10967 (Check_State_And_Constituent_Use): New routine.
10968 (Create_Abstract_State): New routine.
10969 (Is_Matching_Input): Replace Refined_State with Encapsulating_State.
10970 (Is_Part_Of): Removed.
10971 (Collect_Body_States): New routine.
10972 (Collect_Constituent): Replace Refined_State with Encapsulating_State.
10973 (Collect_Hidden_States): Removed.
10974 (Report_Unrefined_States): Change the profile of the procedure along
10975 with the comment on usage.
10976 (Report_Unused_Constituents): New routine.
10977 (Report_Unused_Hidden_States): Removed.
10978 (Report_Unused_States): New routine.
10979 * sem_prag.ads (Check_Missing_Part_Of): New routine.
10980 * sem_util.adb (Add_Contract_Item): Pragma Part_Of can now
10981 appear in the classification pragmas of a package instantiation
10983 (Find_Placement_In_State_Space): New routine.
10984 (Is_Child): Removed.
10985 (Is_Child_Or_Sibling): Remove formal
10986 parameter Private_Child. Remove the private child checks.
10987 (Requires_State_Refinement): Moved from sem_ch3.
10988 * sem_util.ads Add new type State_Space_Kind along with
10989 comment on its usage and values.
10990 (Add_Contract_Item): Update the comment on usage.
10991 (Find_Body_Discriminal): Alphabetize spec.
10992 (Find_Placement_In_State_Space): New routine.
10993 (Is_Child_Or_Sibling): Remove formal parameter Private_Child
10994 and update the comment on usage.
10995 (Requires_State_Refinement): Moved from sem_ch3.
10996 * sinfo.ads: Update the documentation of N_Contract.
10997 * snames.ads-tmpl The predefined name for Part_Of is now used
10998 to denote a pragma. Add Pragma_Id for Part_Of.
11000 2014-01-29 Emmanuel Briot <briot@adacore.com>
11002 * s-regexp.adb (Create_Secondary_Table): Automatically grow the state
11004 (Dump): New subprogram.
11006 2014-01-29 Tristan Gingold <gingold@adacore.com>
11008 * exp_ch9.adb (Expand_N_Protected_Type_Declaration): Add
11009 Expand_Entry_Declaration to factorize code.
11011 2014-01-29 Ed Schonberg <schonberg@adacore.com>
11013 * checks.adb: minor clarification.
11014 * sem_ch7.adb (Declare_Inherited_Private_Subprograms): Limit
11015 search for primitive operations to the entities that immediately
11016 follow the type declaration.
11018 2014-01-29 Tristan Gingold <gingold@adacore.com>
11020 * exp_ch9.adb (Build_Protected_Entry): Do not call
11021 Complete_Entry_Body anymore.
11022 * rtsfind.ads (RE_Complete_Single_Entry_Body): Remove.
11023 * s-tposen.ads, s-tposen.adb (Complete_Single_Entry_Body): Remove.
11025 2014-01-29 Pierre-Marie Derodat <derodat@adacore.com>
11027 * s-os_lib.adb, s-os_lib.ads (Normalize_Pathname): Return an empty
11028 string when the Name input bigger than allowed. Adapt the function
11031 2014-01-29 Ed Schonberg <schonberg@adacore.com>
11033 * checks.adb (Install_Null_Excluding_Check): Do not emit warning
11034 if expression is within a case_expression of if_expression.
11036 2014-01-29 Robert Dewar <dewar@adacore.com>
11038 * exp_ch9.adb, inline.ads: Minor reformatting.
11040 2014-01-29 Tristan Gingold <gingold@adacore.com>
11042 * exp_ch9.adb (Is_Exception_Safe): Return true if no exceptions.
11044 2014-01-29 Yannick Moy <moy@adacore.com>
11046 * inline.ads (Pending_Body_Info): Add SPARK_Mode and
11047 SPARK_Mode_Pragma components to be able to analyze generic
11049 * sem_ch12.adb (Analyze_Package_Instantiation,
11050 Inline_Instance_Body, Need_Subprogram_Instance_Body,
11051 Load_Parent_Of_Generic): Pass in SPARK_Mode from instantiation
11052 for future analysis of the instance.
11053 (Instantiate_Package_Body,
11054 Instantiate_Subprogram_Body, Set_Instance_Inv): Set SPARK_Mode
11055 from instantiation to analyze the instance.
11057 2014-01-29 Robert Dewar <dewar@adacore.com>
11059 * sem_ch7.adb, sem_prag.adb, sem_ch4.adb, sem_ch6.adb: Minor code
11062 2014-01-29 Yannick Moy <moy@adacore.com>
11064 * gnat_rm.texi: Update description of SPARK_Mode pragma.
11066 2014-01-29 Tristan Gingold <gingold@adacore.com>
11068 * exp_ch9.adb (Expand_N_Protected_Body): Remove Num_Entries.
11070 2014-01-29 Thomas Quinot <quinot@adacore.com>
11072 * sem_ch4.adb (Find_Component_In_Instance): Update comment.
11074 2014-01-29 Ed Schonberg <schonberg@adacore.com>
11076 * exp_util.adb (Build_Task_Image_Prefix): Indicate that the
11077 resulting string is an internal entity. and thus requires no
11078 initialization. This is relevant when Initialize_ Scalars is
11079 enabled, because the resultant spurious initialization may lead to
11080 secondary stack anomalies that produce a mangled name for a task.
11082 2014-01-29 Yannick Moy <moy@adacore.com>
11084 * sem_ch6.adb (Analyze_Subprogram_Body_Helper): SPARK_Mode
11085 not inherited from spec anymore. Check consistency
11086 rules after processing of declarations.
11087 * sem_ch7.adb (Analyze_Package_Body_Helper): SPARK_Mode not inherited
11088 from spec anymore. Check consistency rules after processing of
11090 (Analyze_Package_Declaration): Set SPARK_Mode only for non-generic
11092 * sem_prag.adb (Analyze_Pragma/Pragma_SPARK_Mode): Implement new
11095 2014-01-27 Robert Dewar <dewar@adacore.com>
11097 * sem_res.adb (Resolve_Comparison_Op): Add type name/location
11099 (Resolve_Range): Add type name/location to unordered msg.
11101 2014-01-27 Claire Dross <dross@adacore.com>
11103 * a-cofove.adb/s (Copy): Add precondition so that Copy (Source,
11104 Capacity) is only called with Capacity >= Length (Source) and
11105 Capacity in Capacity_Range.
11106 * a-cfdlli.adb/s, a-cfhase.adb/s, a-cfhama.adb/s, a-cforse.adb/s,
11107 a-cforma.adb/s (Copy): Add precondition so that Copy (Source, Capacity)
11108 is only called with Capacity >= Source.Capacity. Raise Capacity_Error
11109 in the code is this is not the case.
11111 2014-01-27 Thomas Quinot <quinot@adacore.com>
11113 * sem_ch4.adb (Analyze_Selected_Component): Fix handling of
11114 selected component in an instance where the component of the
11115 actual is not visibile at instantiation.
11117 2014-01-27 Ed Schonberg <schonberg@adacore.com>
11119 * sem_ch6.adb: sem_ch6.adb (Set_Actual_Subtypes): If the type
11120 has a dynamic predicate, generate freeze node for Actual_Subtype
11121 at once, because the declaration of the corresponding predicate
11122 function will make reference to it.
11124 2014-01-27 Tristan Gingold <gingold@adacore.com>
11126 * exp_ch7.adb, exp_ch9.adb: Adjust comments.
11128 2014-01-27 Robert Dewar <dewar@adacore.com>
11130 * exp_ch4.adb (Expand_N_Op_Expon): Remove unsigned type test
11131 for 2**X optimization.
11133 2014-01-27 Ed Schonberg <schonberg@adacore.com>
11135 * a-suenst.adb: strings.utf_encoding.strings (Decode): Check
11136 explicitly whether value is in range of Character, because the
11137 library is typically compiled with range checks disabled, and
11138 we cannot rely on the implicit check on the argument of 'Val.
11140 2014-01-27 Vincent Celier <celier@adacore.com>
11142 * a-ciorma.adb, a-cihama.adb (Assign): Copy the Source to the Target,
11143 not the Target to itself.
11145 2014-01-27 Robert Dewar <dewar@adacore.com>
11147 * vms_conv.ads, ali.adb, sem_ch6.ads, opt.ads, vms_cmds.ads: Minor
11148 changes to avoid incorrect use of unordered enum types.
11150 2014-01-27 Thomas Quinot <quinot@adacore.com>
11152 * sem_ch4.adb: Minor reformatting.
11154 2014-01-27 Robert Dewar <dewar@adacore.com>
11156 * scn.adb (Check_End_Of_Line): Removed.
11157 (Error_Long_Line): Removed.
11158 (Determine_License): Use versions of above routines from Scanner.
11159 * scng.adb (Check_End_Of_Line): Moved to spec.
11160 (Error_Long_Line): Removed, no longer used.
11161 * scng.ads (Check_End_Of_Line): Moved here from body.
11163 2014-01-27 Tristan Gingold <gingold@adacore.com>
11165 * exp_ch7.adb (Build_Cleanup_Statements): Call
11166 Build_Protected_Subprogram_Call_Cleanup to insert the cleanup
11167 for protected body.
11168 * exp_ch9.adb (Build_Protected_Subprogram_Body): Likewise.
11169 Remove Service_Name variable.
11170 (Build_Protected_SUbprogam_Call_Cleanup): New procedure that
11171 factorize code from the above subprograms.
11172 * exp_ch9.ads (Build_Protected_Subprogram_Call_Cleanup): New procedure.
11174 2014-01-27 Hristian Kirtchev <kirtchev@adacore.com>
11176 * einfo.adb (Has_Option): Reimplemented.
11177 * sem_prag.adb (Analyze_Refinement_Clause): Add global
11178 variables AR_Constit, AW_Constit, ER_Constit, EW_Constit,
11179 External_Constit_Seen and State. Add local variables Body_Ref,
11180 Body_Ref_Elmt and Extra_State. Reimplement part of the logic to
11181 avoid a cumbersome while pool. Verify the legality of an external
11182 state and relevant properties.
11183 (Check_External_Property): New routine.
11184 (Check_Matching_State): Remove parameter profile
11185 and update comment on usage.
11186 (Collect_Constituent): Store the
11187 relevant external property of a constituent.
11188 * sem_util.adb (Async_Readers_Enabled): Update the call to
11189 Has_Enabled_Property.
11190 (Async_Writers_Enabled): Update the call to Has_Enabled_Property.
11191 (Effective_Reads_Enabled): Update the call to Has_Enabled_Property.
11192 (Effective_Writes_Enabled): Update the call to Has_Enabled_Property.
11193 (Has_Enabled_Property): Rename formal parameter Extern to State_Id.
11194 Update comment on usage. Reimplement the logic to recognize the various
11195 formats of properties.
11197 2014-01-27 Ed Schonberg <schonberg@adacore.com>
11199 * par-ch5.adb: Minor reformatting.
11201 2014-01-27 Tristan Gingold <gingold@adacore.com>
11203 * s-tposen.ads: Harmonize style and comments.
11205 2014-01-27 Vincent Celier <celier@adacore.com>
11207 * projects.texi: Document that shared library projects, by
11208 default, cannot import projects that are not shared library
11211 2014-01-27 Robert Dewar <dewar@adacore.com>
11213 * sem_ch8.adb (Find_Selected_Component): Use Replace instead
11216 2014-01-27 Ed Schonberg <schonberg@adacore.com>
11218 * a-suenco.adb, a-suenst.adb (Decode): Raise encoding error if
11219 any other exception is raised.
11220 (Convert): If both Input_Scheme and Output_Scheme are UTF_8 it is
11221 still necessary to perform a conversion in order to remove overlong
11224 2014-01-27 Robert Dewar <dewar@adacore.com>
11226 * exp_smem.adb: Minor reformatting.
11228 2014-01-27 Thomas Quinot <quinot@adacore.com>
11230 * a-calfor.ads: Fix incorrect reference to operator "-" in comment.
11232 2014-01-27 Ed Schonberg <schonberg@adacore.com>
11234 * sem_res.adb (Make_Call_Into_Operator): In ASIS mode, relocate
11235 nodes for operands to the original node for the call, to preserve
11236 Original_Node pointers within the resolved operands, given that
11237 they may have been rewritten as well. Previous approach copied
11238 the operands into a new tree and lost those pointers.
11240 2014-01-27 Claire Dross <dross@adacore.com>
11243 * a-cofove.adb, a-cofove.ads: Add Strict_Equal function to the API.
11245 2014-01-27 Ed Schonberg <schonberg@adacore.com>
11247 * sem_util.adb (Check_Internal_Protected_Use): A call through
11248 an anonymous access parameter of the current protected function
11249 is not a potential modification of the current object.
11251 2014-01-27 Ed Schonberg <schonberg@adacore.com>
11253 * a-cobove.adb (Reserve_Capacity): Procedure raises
11254 Capacity_Error, not Constraint_Error, when request cannot be
11257 2014-01-27 Vincent Celier <celier@adacore.com>
11259 * a-coorma.adb, a-cohama.adb (Assign): Copy the Source to the Target,
11260 not the Target to itself.
11262 2014-01-27 Ed Schonberg <schonberg@adacore.com>
11264 * exp_ch4.adb (Expand_Concatenate): If the target of the
11265 concatenation is a library-level entity, always use the off-line
11266 version of concatenation, regardless of optimization level. This
11267 is space-efficient, and prevents linking problems when some
11268 units are compiled with different optimization levels.
11270 2014-01-27 Ed Schonberg <schonberg@adacore.com>
11272 * sem_ch5.adb: Code clean up.
11274 2014-01-27 Ed Schonberg <schonberg@adacore.com>
11276 * par-ch5.adb (P_Iterator_Specification): Improve error recovery
11277 when an array or container iterator includes a subtype indication,
11278 which is only legal in an element iterator.
11280 2014-01-27 Thomas Quinot <quinot@adacore.com>
11282 * exp_ch7.adb: Minor reformatting.
11284 2014-01-27 Robert Dewar <dewar@adacore.com>
11286 * opt.adb (SPARK_Mode): Default for library units is None rather
11288 * opt.ads: Remove AUTO from SPARK_Mode_Type SPARK_Mode_Type is
11290 * sem_prag.adb (Analyze_Pragma, case SPARK_Mode): Remove AUTO
11292 * snames.ads-tmpl (Name_Auto): Removed, no longer used.
11294 2014-01-27 Robert Dewar <dewar@adacore.com>
11296 * par-ch5.adb (P_Sequence_Of_Statements): Make entry in
11297 Suspicious_Labels table if we have identifier; followed by loop
11299 * par-endh.adb (Evaluate_End_Entry): Search Suspicious_Labels table.
11300 * par.adb (Suspicious_Labels): New table.
11302 2014-01-27 Robert Dewar <dewar@adacore.com>
11304 * exp_aggr.adb (Check_Bounds): Reason is range check, not
11307 2014-01-27 Yannick Moy <moy@adacore.com>
11309 * get_spark_xrefs.adb (Get_SPARK_Xrefs): Accept new type 'c' for
11311 * lib-xref-spark_specific.adb (Is_Global_Constant): Remove useless
11313 (Add_SPARK_Xrefs): Include references to constants.
11314 * spark_xrefs.ads Document new character 'c' for references to
11317 2014-01-27 Thomas Quinot <quinot@adacore.com>
11319 * exp_smem.adb (Add_Write_After): For a function call, insert write as
11320 an after action in a transient scope.
11322 2014-01-27 Thomas Quinot <quinot@adacore.com>
11324 * exp_smem.adb (Expand_Shared_Passive_Variable): For a reference
11325 to a shared variable as an OUT formal in a call to an init proc,
11326 the 'Read call must be emitted after, not before, the call.
11328 2014-01-27 Robert Dewar <dewar@adacore.com>
11330 * gnat_rm.texi: Remove mention of AUTO mode for SPARK_Mode pragma.
11332 2014-01-27 Robert Dewar <dewar@adacore.com>
11334 * a-wichha.adb (Character_Set_Version): Change to output proper
11337 2014-01-27 Hristian Kirtchev <kirtchev@adacore.com>
11339 * einfo.adb (Is_Input_Only_State): Removed.
11340 (Is_Non_Volatile_State): Removed.
11341 (Is_Output_State): Removed.
11342 * einfo.ads (Is_Input_Only_State): Remove attribute and
11343 subprogram. Update related entity.
11344 (Is_Non_Volatile_State):
11345 Remove attribute and subprogram. Update related entity.
11346 (Is_Output_State): Removed attribute and subprogram. Update
11348 * exp_ch6.adb (Expand_Subprogram_Contract): Update comment on
11350 * sem_ch3.adb (Analyze_Declarations): Analyze the contract of
11351 an object, not just variables.
11352 (Analyze_Object_Contract): New routine.
11353 (Analyze_Variable_Contract): Removed.
11354 (Process_Discriminants): Detect an illegal use of volatile
11355 discriminant in SPARK mode.
11356 * sem_ch5.adb (Analyze_Iterator_Specification):
11357 Detect an illegal use of volatile loop variable.
11358 (Analyze_Loop_Parameter_Specification): Detect an illegal use
11359 of volatile loop variable.
11360 * sem_ch6.adb (Process_Formals): Update the volatile object
11361 detection. Detect an illegal formal of mode IN OUT or OUT in
11362 SPARK mode. Enhance the error messages with references.
11363 * sem_ch12.adb (Instantiate_Object): Update the volatile object
11364 detection. Enhance the error messages with references.
11365 * sem_prag.adb (Analyze_Abstract_State): Enhance the error
11366 messages with references.
11367 (Analyze_Contract_Case): Enhance the error messages with references.
11368 (Analyze_External_Property): Call Check_Duplicate_Property to process
11369 an external property.
11370 (Analyze_External_Property_In_Decl_Part): New routine.
11371 (Analyze_External_State_In_Decl_Part): Removed.
11372 (Analyze_Global_Item): Detect an illegal
11373 use of a volatile constant. Detect an illegal use
11374 of a variable with enabled Effective_Reads. Enhance
11375 the error messages with references. Remove obsolete
11376 checks concerning Input_Only and Output_Only states.
11377 (Analyze_Initialization_Item): Enhance the error messages
11379 (Analyze_Initializes_In_Decl_Part): Do not
11380 collect the states and variables when the initialization list
11382 (Analyze_Input_Item): Enhance the error messages with references.
11383 (Analyze_Input_Output): Enhance the error messages with references.
11384 (Analyze_Pragma): Enhance the error messages with references.
11385 (Analyze_Refinement_Clause): Code reformatting.
11386 (Analyze_Refined_Depends_In_Decl_Part):
11387 Rename global variable Global to Reg_Global and update all
11388 occurrences. Add local variables D7 and D8. Update the error
11389 messages with references. Update the call to Collect_Global_Items.
11390 (Analyze_Refined_Global_In_Decl_Part): Add local variables
11391 Has_Proof_In_State, Proof_In_Constits and Proof_In_Items. Update
11392 the call to Collect_Global_Items. Account for a Proof_In state
11393 in null / useless refinement checks. Verify the coverage of
11395 (Check_Dependency_Clause): Remove local variable
11396 Out_Constits. Remove the retrieval and removal of constituents
11397 for an Output_Only state. Remove the reporting of unused
11398 Output_Only state constituents.
11399 (Check_Duplicate_Mode): Enhance
11400 the error message with a reference.
11401 (Check_Duplicate_Property): New routine.
11402 (Check_Duplicate_Option): Enhance the error message with a reference.
11403 (Check_External_Properties): Enhance the error message with a reference.
11404 (Check_Function_Return): Enhance the error message with a reference.
11405 (Check_In_Out_States): Update
11406 comment on usage. Add a specialized error message for Proof_In
11407 constituents. Enhance the error message with a reference.
11408 (Check_Input_States): Update comment on usage. Account for
11409 possible Proof_In constituents. Enhance the error message
11411 (Check_Matching_Constituent): Enhance the error message with a
11413 (Check_Matching_State): Enchance the error message with a reference.
11414 (Check_Mode): Add local variable From_Global. Update the call to
11415 Find_Mode. Emit more precise error messages concerning extra items
11416 (Check_Mode_Restriction_In_Enclosing_Context): Consider
11417 pragma Refined_Global. Enhance the error message with a
11419 (Check_Mode_Restriction_In_Function): Enhance the error message with
11421 (Check_Output_States): Update comment on usage. Add local variable
11422 Posted. Account for possible Proof_In constituents. Produce a detailed
11423 list of missing constituents.
11424 (Check_Proof_In_States): New routine.
11425 (Check_Refined_Global_Item): Handle Proof_In
11426 constituents. Enchance the error message with a reference.
11427 (Collect_Global_Items): Add formal parameters Proof_In_Items
11428 and Has_Proof_In_State. Update the comment on usage. Account
11429 for Proof_In items.
11430 (Create_Or_Modify_Clause): Enchance
11431 the error message with a reference.
11433 formal parameter From_Global. Update the comment on usage.
11434 Detect when the mode is governed by pragma [Refined_]Global.
11435 (Output_Constituents): Removed.
11436 (Report_Extra_Constituents):
11437 Report extra Proof_In constituents.
11438 (Report_Unused_Constituents): Removed.
11439 (Usage_Error): Code reformatting. Enhance the error
11440 messages with reference.
11441 * sem_prag.ads (Analyze_External_Property_In_Decl_Part): New routine.
11442 (Analyze_External_State_In_Decl_Part): Removed.
11443 * sem_res.adb (Resolve_Actuals): Update the volatile object
11444 detection. Enhance the error message with a reference.
11445 (Resolve_Entity_Name): Update the volatile object
11446 detection. Enhance the error message with a reference.
11447 * sem_util.adb (Is_Refined_State): Add a guard to avoid a crash.
11448 (Is_SPARK_Volatile_Object): New routine.
11449 (Has_Volatile_Component): New routine.
11450 * sem_util.ads (Is_Delegate): Alphabetized.
11451 (Is_SPARK_Volatile_Object): New routine.
11452 (Has_Volatile_Component): New routine.
11453 * snames.ads-tmpl: Remove names Name_Input_Only and Name_Output_Only.
11455 2014-01-27 Ed Schonberg <schonberg@adacore.com>
11457 * sem_attr.adb: Resolve fully prefix of 'Update.
11459 2014-01-27 Ben Brosgol <brosgol@adacore.com>
11461 * gnat_rm.texi: Minor clarifications.
11463 2014-01-27 Robert Dewar <dewar@adacore.com>
11465 * sem_elab.adb (Check_Internal_Call_Continue): Avoid complaining
11466 about call that is generated as part of an Initial_Condition
11468 * sem_prag.adb: Minor spelling correction.
11470 2014-01-27 Robert Dewar <dewar@adacore.com>
11472 * sem_prag.adb (Set_Convention_From_Pragma): Check that
11473 convention Ghost can only apply to functions.
11474 * einfo.ads, einfo.adb (Is_Ghost_Subprogram): Add clarifying comment.
11476 2014-01-27 Robert Dewar <dewar@adacore.com>
11478 * gnat_ugn.texi: Add Short_Enums to documentation of
11481 2014-01-27 Robert Dewar <dewar@adacore.com>
11483 * sem_prag.adb (Analyze_Input_Item): Correct check for input
11484 item in same package.
11485 * sem_util.ads, sem_util.adb (Within_Scope): New function.
11487 2014-01-26 Arnaud Charlet <charlet@adacore.com>
11489 * a-intnam-lynxos.ads, mlib-tgt-specific-lynxos.adb,
11490 s-osinte-lynxos-3.adb, s-osinte-lynxos-3.ads, s-osinte-lynxos.adb,
11491 s-osinte-lynxos.ads, s-taprop-lynxos.adb, s-tpopsp-lynxos.adb,
11492 system-lynxos-ppc.ads, system-lynxos-x86.ads: Removed, no longer
11495 2014-01-25 Eric Botcazou <ebotcazou@adacore.com>
11497 * gcc-interface/Makefile.in: Fix oversight.
11499 2014-01-25 Eric Botcazou <ebotcazou@adacore.com>
11501 * gcc-interface/utils.c (convert_to_fat_pointer): Un-obfuscate the
11502 conversion from a thin pointer with a shifted value.
11503 * gcc-interface/utils2.c (gnat_build_constructor): Propagate the
11504 read-only flag from the values onto the result.
11505 (gnat_invariant_expr): Accept read-only CONSTRUCTORs.
11507 2014-01-25 Tristan Gingold <gingold@adacore.com>
11509 * gcc-interface/decl.c (gnat_to_gnu_entity): Always build a variable
11510 for E_Variable with a pragma Linker_Section.
11512 2014-01-25 Robert Dewar <dewar@adacore.com>
11514 * gcc-interface/decl.c (gnat_to_gnu_param): Make sure an Out parameter
11515 with Default_Value aspect is passed in by copy.
11517 2014-01-24 Eric Botcazou <ebotcazou@adacore.com>
11519 * set_targ.adb: Set Short_Enums.
11520 * gcc-interface/lang.opt (fshort-enums): New option.
11521 * gcc-interface/misc.c (gnat_handle_option): Handle it.
11522 (gnat_post_options): Do not modify the global settings.
11524 2014-01-24 Robert Dewar <dewar@adacore.com>
11526 * g-rannum.ads, g-rannum.adb (Random_Ordinary_Fixed): New generic
11528 (Random_Decimal_Fixed): New generic function.
11529 * s-rannum.ads: Minor comment clarifications.
11531 2014-01-24 Robert Dewar <dewar@adacore.com>
11533 * back_end.adb: Remove Short_Enums handling (handled in
11534 Ttypes/Get_Targ now) Minor added comments.
11535 * freeze.adb: Change name Short_Enums_On_Target to
11536 Target_Short_Enums.
11537 * get_targ.ads, get_targ.adb (Get_Short_Enums): New function.
11538 * opt.ads: Minor comment updates.
11539 * sem_ch13.adb: Change name Short_Enums_On_Target to
11540 Target_Short_Enums.
11541 * set_targ.adb: Set Short_Enums from gcc back end.
11542 * set_targ.ads (Short_Enums): New variable.
11543 * targparm.ads, targparm.adb: Remove Short_Enums entries (handled in
11544 Ttypes/Get_Targ now).
11545 * ttypes.ads (Target_Short_Enums): New constant boolean switch
11547 2014-01-24 Pascal Obry <obry@adacore.com>
11549 * g-sercom-mingw.adb: Fix serial port name for port number > 10.
11551 2014-01-24 Gary Dismukes <dismukes@adacore.com>
11553 * exp_disp.adb (Expand_Dispatching_Call): Call Unqualify on Param when
11554 comparing it with Ctrl_Arg, since Ctrl_Arg may have had qualification
11557 2014-01-24 Robert Dewar <dewar@adacore.com>
11559 * sinfo.ads, make.adb, prj-env.adb: Minor reformatting.
11561 2014-01-24 Vincent Celier <celier@adacore.com>
11563 * prj.adb (Add_Aggregated_Project): Do not add a project in
11564 the list if it is already there.
11566 2014-01-24 Yannick Moy <moy@adacore.com>
11568 * lib-xref-spark_specific.adb (Enclosing_Subprogram_Or_Package):
11569 Correct the search for a subrogram declaration to which a pragma is
11572 2014-01-24 Bob Duff <duff@adacore.com>
11574 * gnat_ugn.texi: Document --decimal-grouping and
11575 --based-grouping switches in gnatpp.
11577 2014-01-24 Ed Schonberg <schonberg@adacore.com>
11579 * sinfo.ads: Documentation update.
11581 2014-01-24 Ed Schonberg <schonberg@adacore.com>
11583 * sem_ch3.adb (Constant_Redeclaration): New declaration is
11584 illegal if previous one has an initial expression that is an
11585 aggregate expanded into assignments.
11587 2014-01-24 Ed Schonberg <schonberg@adacore.com>
11589 * sem_ch5.adb (Analyze_Loop_Parameter_Specification): Small
11590 code reorganization to remove spurious warning on a loop with
11591 an array element iterator that has a null range.
11593 2014-01-24 Vincent Celier <celier@adacore.com>
11595 * make.adb (Binding_Phase): When setting the Ada paths, use
11596 the library ALI dir, not the object dir in libraries.
11598 2014-01-24 Yannick Moy <moy@adacore.com>
11600 * sinfo.ads: Add documentation of check flag fields.
11602 2014-01-24 Ed Schonberg <schonberg@adacore.com>
11604 * sem_res.adb (Resolve_Actuals): If an actual is a view
11605 conversion of a discriminated object, and the formal type is
11606 discriminated and constrained, apply a discriminant check to
11609 2014-01-24 Robert Dewar <dewar@adacore.com>
11611 * prj.adb, prj-env.adb, back_end.adb: Add comment, minor code clean ups.
11613 2014-01-24 Ed Schonberg <schonberg@adacore.com>
11615 * sem_ch3.adb (Analyze_Declarations): At the end of an
11616 appropriate declarative part, call Freeze_All from the first
11617 declaration in the scope, not from the first unfrozen one. This
11618 is necessary to apply visibility checks to entities with delayed
11619 aspects. Otherwise, in the presence of instantiations and cleanups
11620 that they may generate, the delayed aspects may be analyzed too
11621 late and produce spurious visibility errors.
11622 * sem_attr.adb: Place etype on range.
11623 * sem_ch6.adb: Documentation expression functions.
11625 2014-01-24 Robert Dewar <dewar@adacore.com>
11627 * exp_ch7.adb: Minor change of Indices to Indexes (preferred
11628 terminology in compiler).
11630 2014-01-24 Robert Dewar <dewar@adacore.com>
11632 * scans.ads: Remove Tok_Raise from Sterm, Eterm, After_SM
11633 categories, now that Ada 95 supports raise expressions.
11635 2014-01-24 Robert Dewar <dewar@adacore.com>
11637 * freeze.adb (Freeze_Enumeration_Type): Use new target parameter
11638 Short_Enums_On_Target.
11639 * sem_ch13.adb (Set_Enum_Esize): Take Short_Enums_On_Target
11641 * targparm.ads, targparm.adb: Add new target parameter Short_Enums.
11643 2014-01-24 Ed Schonberg <schonberg@adacore.com>
11645 * sem_ch5.adb (Analyze_Iterator_Specification): If subtype
11646 indication is given explicity, check that it matches the array
11647 component type or the container element type of the domain
11650 2014-01-24 Tristan Gingold <gingold@adacore.com>
11652 * back_end.adb (Scan_Compiler_Arguments): Set Short_Enums_On_Target.
11653 * gcc-interface/misc.c (flag_short_enums): Declare.
11654 (gnat_post_options): Set it.
11656 2014-01-24 Vincent Celier <celier@adacore.com>
11658 * prj-env.adb (Ada_Objects_Path): Use Ada_Objects_Path_No_Libs
11659 to cache the result when Including_Libraries is False.
11660 * prj-env.ads (Ada_Objects_Path): Update documentation
11661 * prj.adb (Free (Project_Id)): Also free Ada_Objects_Path_No_Libs
11662 (Get_Object_Directory): Return the Library_Ali_Dir only when
11663 when Including_Libraries is True.
11664 * prj.ads (Get_Object_Directory): Fix and complete documentation
11665 (Project_Data): New component Ada_Objects_Path_No_Libs
11667 2014-01-24 Robert Dewar <dewar@adacore.com>
11669 * checks.adb (Expr_Known_Valid): Result of fpt operator never
11672 2014-01-24 Eric Botcazou <ebotcazou@adacore.com>
11674 * back_end.adb: Minor fix in comment.
11676 2014-01-24 Javier Miranda <miranda@adacore.com>
11678 * sem_ch3.adb (Check_Abstract_Overriding): Code reestructuration
11679 required to report the error in case of task types.
11681 2014-01-24 Ed Schonberg <schonberg@adacore.com>
11683 * sem_attr.adb: Additional index checking.
11685 2014-01-24 Ed Schonberg <schonberg@adacore.com>
11687 * sem_attr.adb (Analyze_Attribute, case 'Update): Analyze
11688 expressions in each component association, and for records note
11689 the entity in each association choice, for subsequent resolution.
11690 (Resolve_Attribute, case 'Update): Complete resolution of
11691 expressions in each component association.
11693 2014-01-24 Robert Dewar <dewar@adacore.com>
11695 * sem.adb (Sem): Avoid premature reference to Current_Sem_Unit
11696 (this was causing Is_Main_Unit_Or_Main_Unit_Spec to be set wrong,
11697 leading to wrong handling of SPARK_Mode for library units).
11699 2014-01-24 Robert Dewar <dewar@adacore.com>
11701 * sem_ch6.adb (Analyze_Subprogram_Body_Helper): Set SPARK_Mode
11702 on generic instances (do not consider them to be internally
11705 2014-01-24 Doug Rupp <rupp@adacore.com>
11707 * s-osinte-android.ads (pthread_sigmask): Import sigprocmask
11708 vice pthread_sigmask.
11710 2014-01-24 Vincent Celier <celier@adacore.com>
11712 * prj.adb (Debug_Output (Str, Str2)): Output if verbosity is
11715 2014-01-24 Vincent Celier <celier@adacore.com>
11717 * prj-ext.adb (Add): Do not output anything when Silent is True,
11718 whatever the verbosity. When Source is From_External_Attribute,
11719 set the corresponding environment variable if it is not already set.
11720 * prj-ext.ads (Add): New Boolean parameter Silent, defaulted
11722 * prj-proc.adb (Process_Expression_For_Associative_Array):
11723 For attribute External, call Prj.Ext.Add with Silent set to
11724 True for the child environment, to avoid useless output in non
11727 2014-01-24 Ed Schonberg <schonberg@adacore.com>
11729 * sem_res.adb (Set_Slice_Subtype): Handle properly a discrete
11730 range given by a subtype indication, and force evaluation of
11731 the bounds, as for a simple range.
11732 * exp_util.adb (Evaluate_Slice_Bounds): Utility to force evaluation
11733 of bounds of slice for various kinds of discrete ranges.
11734 (Evaluate_Name, Evaluate_Subtype_From_Expr): use
11735 Evaluate_Slice_Bounds.
11737 2014-01-24 Bob Duff <duff@adacore.com>
11739 * s-taskin.ads (Activator): Make this Atomic, because
11740 Activation_Is_Complete reads it, and that can be called
11741 from any task. Previously, this component was only
11742 modified by the activator before activation, and by
11743 Self after activation.
11744 * a-taside.ads, a-taside.adb (Environment_Task,
11745 Activation_Is_Complete): Implement these missing functions.
11747 2014-01-24 Doug Rupp <rupp@adacore.com>
11749 * init.c: Add a handler section for Android.
11751 2014-01-24 Arnaud Charlet <charlet@adacore.com>
11753 * i-cexten.ads (Unsigned_33..64, Unsigned_33..64): New types.
11755 2014-01-24 Ed Schonberg <schonberg@adacore.com>
11757 * sem_ch4.adb (Operator_Check): If one operand is a
11758 Raise_Expression, set its type to that of the other operand.
11759 * sem_res.adb (Resolve_Raise_Expression): new procedure.
11760 (Resolve_Actuals): For an actual that is a Raise_Expression,
11761 set the type to that of the formal.
11762 * sem_type.adb (Find_Unique_Type): If one of the operands is a
11763 Raise_Expression, return type of the other operand.
11765 2014-01-24 Ed Schonberg <schonberg@adacore.com>
11767 * sem_aggr.adb (Resolve_Record_Aggregate): If a scalar
11768 component of the record has a type with a default aspect, and
11769 the corresponding aggregate component is initiaized with a box,
11770 use the default value in the rewritten aggregate.
11772 2014-01-24 Tristan Gingold <gingold@adacore.com>
11774 * s-interr.ads, s-interr.adb, s-interr-hwint.adb, s-interr-vms.adb,
11775 s-interr-sigaction.adb,
11776 s-interr-dummy.adb (Install_Restricted_Handlers): Add Prio parameter.
11777 * exp_ch9.adb (Make_Initialize_Protection): Add Prio parameter
11778 to the call to Install_Restricted_Handlers.
11780 2014-01-24 Emmanuel Briot <briot@adacore.com>
11782 * prj-nmsc.adb (Check_File): Add protection when the source is
11783 not fully initialized.
11785 2014-01-24 Ed Schonberg <schonberg@adacore.com>
11787 * sem_util.adb (Is_Post_State): In a postcondition, a selected
11788 component that denotes an implicit dereference is a reference
11789 to the post state of the subprogram.
11791 2014-01-24 Robert Dewar <dewar@adacore.com>
11793 * sem_ch6.adb (Analyze_Subprogram_Body_Helper): SPARK_Mode OFF
11794 for generated subprograms.
11795 (Analyze_Subprogram_Specification): Ditto.
11797 2014-01-24 Vincent Celier <celier@adacore.com>
11799 * prj-dect.adb (Check_Attribute_Allowed): Detect more forbidden
11800 attributes in package Builder of aggregate and aggregate library
11802 * prj-nmsc.adb (Process_Naming_Scheme.Check.Check_Aggregate):
11803 Remove procedure (Process_Naming_Scheme.Check.Check_Aggregated):
11804 Remove parameters. Change error message from "... externally
11805 build library ..." to "... externally built project ...".
11806 (Process_Naming_Scheme.Check): Do not do any check in aggregate
11807 project, as attribute Library_Dir and Library_Name have already
11808 been detected as forbidden.
11810 2014-01-24 Vincent Celier <celier@adacore.com>
11812 * prj-env.adb (Find_Project): If cached project path is not in
11813 project directory, look in current directory first and use cached
11814 project path only if project is not found in project directory.
11816 2014-01-24 Robert Dewar <dewar@adacore.com>
11818 * sem_util.adb, lib-xref.adb: Correct false positive warnings.
11820 2014-01-24 Vincent Celier <celier@adacore.com>
11822 * projects.texi: Document that aggregate projects are only
11823 supported by gprbuild, but not by gnatmake. Document that the
11824 only attribute Switches in package Binder of aggregate projects
11825 will be ignored if its index is not others. Document that
11826 attribute Global_Config_File is allowed in package Binder of
11827 aggregate projects.
11829 2014-01-24 Robert Dewar <dewar@adacore.com>
11831 * sem_prag.adb: Minor code reorganization.
11832 * sem_util.adb: Minor fix of potential latent bug in Is_LHS.
11834 2014-01-24 Pascal Obry <obry@adacore.com>
11836 * prj-attr.adb, projects.texi, snames.ads-tmpl: Add Excluded_Patterns
11837 attribute definition.
11839 2014-01-24 Vincent Celier <celier@adacore.com>
11841 * makeutl.adb (Queue.Insert_No_Roots): In gprbuild, do not put
11842 in the Queue the same source (same path, same multi-source index)
11843 from the same project file, to avoid compiling several times
11846 2014-01-24 Eric Botcazou <ebotcazou@adacore.com>
11848 * einfo.ads (First_Rep_Item): Remove obsolete stuff.
11849 (Has_Gigi_Rep_Item): Likewise.
11850 * sem_prag.adb (Analyze_Pragma) <Pragma_Linker_Section>: Do not set
11851 Has_Gigi_Rep_Item for objects.
11852 * gcc-interface/decl.c (prepend_one_attribute_to): Rename into...
11853 (prepend_one_attribute): ...this.
11854 (prepend_one_attribute_pragma): New function extracted from...
11855 (prepend_attributes): ...here. Swap the parameters for consistency.
11856 (gnat_to_gnu_entity): Adjust calls to prepend_one_attribute_to and to
11857 prepend_attributes.
11858 <object>: Deal with a pragma Linker_Section on a constant
11859 or variable. <E_Function>: Deal with a pragma Linker_Section
11861 (get_minimal_subprog_decl): Adjust calls to prepend_one_attribute_to.
11863 2014-01-24 Vincent Celier <celier@adacore.com>
11865 * opt.ads: Minor comment update.
11867 2014-01-24 Robert Dewar <dewar@adacore.com>
11869 * sem_prag.adb (Analyze_Input_Output): Add missing error check
11871 * sem_util.adb (Is_Refined_State): Add defense against junk
11874 2014-01-24 Pascal Obry <obry@adacore.com>
11876 * projects.texi: Removes Build_Slaves attribute documentation.
11878 2014-01-23 Robert Dewar <dewar@adacore.com>
11880 * opt.adb (Register_Opt_Config_Switches): Save SPARK_Mode_Pragma
11883 2014-01-23 Ed Schonberg <schonberg@adacore.com>
11885 * sem_util.adb (Is_Potentially_Unevaluated): Predicate only
11886 applies to expressions that come from source.
11887 * sem_attr.adb (Analyze_Attribute, case 'Old): Improve error
11889 (Analyze_Attribute, case 'Loop_Entry): Apply SPARK 2014 legality
11890 rule regarding potentially unevaluated expressions, to prefix
11893 2014-01-23 Ed Schonberg <schonberg@adacore.com>
11895 * exp_util.adb (Make_Invqriant_Call): If type of expression is
11896 a private extension, get invariant from base type.
11898 2014-01-23 Robert Dewar <dewar@adacore.com>
11900 * sem_util.adb, sem_attr.adb: Minor reformatting.
11902 2014-01-23 Robert Dewar <dewar@adacore.com>
11904 * opt.adb (Save_Opt_Config_Switches): Save SPARK_Mode_Pragma
11905 (Restore_Opt_Config_Switches): Restore SPARK_Mode_Pragma.
11906 * sem.adb (Semantics): Remove save/restore of
11907 SPARK_Mode[_Pragma]. Not needed since already done in
11908 Save/Restore_Opt_Config_Switches.
11910 2014-01-23 Robert Dewar <dewar@adacore.com>
11912 * gnat_rm.texi, einfo.adb, einfo.ads, sem_prag.adb, gnat_ugn.texi,
11913 freeze.adb, repinfo.adb, aspects.adb, aspects.ads, sem_ch13.adb:
11914 Linker_Section enhancements.
11916 2014-01-23 Tristan Gingold <gingold@adacore.com>
11918 * gnat_rm.texi: Minor editing.
11920 2014-01-23 Robert Dewar <dewar@adacore.com>
11922 * opt.adb (Set_Opt_Config_Switches): Reset SPARK mode for
11923 with'ed internal units.
11924 * sem.adb (Semantics): Save and restore SPARK_Mode[_Pragma].
11926 2014-01-23 Javier Miranda <miranda@adacore.com>
11928 * lib-xref.adb (Generate_Reference): As part of processing the
11929 "end-of-spec" reference generate an extra reference to the first
11930 private entity of the package.
11931 * xr_tabls.adb (Add_Reference): No action needed for the extra
11932 'E' reference associated; similar to the processing of the
11935 2014-01-23 Bob Duff <duff@adacore.com>
11937 * gnat_ugn.texi: Change "--&pp off" to "--!pp off".
11939 2014-01-23 Ed Schonberg <schonberg@adacore.com>
11941 * sem_util.ads, sem_util.adb (Is_Potentially_Unevaluated): new
11942 predicate to implement rule given in 6.1.1 (20/3).
11943 * sem_attr.adb (Analyze_Attribute, case 'Old): Reject prefix of
11944 'Old in a postcondition, if it is potentially unevaluated and
11945 it is not an entity name.
11947 2014-01-23 Bob Duff <duff@adacore.com>
11949 * gnat_ugn.texi: Document the new "--&pp off" feature of gnatpp.
11951 2014-01-23 Robert Dewar <dewar@adacore.com>
11953 * gnatlink.adb (Gnatlink): Fix problem of generating bad name
11956 2014-01-23 Bob Duff <duff@adacore.com>
11958 * g-dynhta.ads: Minor comment fix.
11960 2014-01-23 Yannick Moy <moy@adacore.com>
11962 * sem_ch6.adb (Analyze_Subprogram_Body_Helper): Inherit SPARK_Mode
11963 from spec on body only when not already inherited on spec. Set
11964 SPARK_Mode from context on body without previous spec. *
11965 * sem_prag.adb (Analyze_Pragma): Check placement of pragma on
11966 library-level entities. Correct retrieval of entity from
11967 declaration, for cases where the declaration is not a unit.
11968 * sem_ch12.adb (Instantiate_Object): Avoid
11969 calling Is_Volatile_Object on an empty node.
11971 2014-01-23 Robert Dewar <dewar@adacore.com>
11973 * gnatlink.adb (Gnatlink): Check for suspicious executable file
11976 2014-01-23 Robert Dewar <dewar@adacore.com>
11978 * a-ngelfu.ads: Remove bad uses of AND which should be AND THEN.
11979 * sem_res.adb (Check_No_Direct_Boolean_Operators): Don't give
11980 style errors in instances.
11981 * g-dynhta.ads (Static_HTable): Comment updates.
11983 2014-01-23 Vincent Celier <celier@adacore.com>
11985 * prj-conf.adb (Get_Or_Create_Configuration_File): Do not attempt
11986 to find a configuration project file when Config_File_Name is
11987 No_Configuration_File.
11988 * prj-conf.ads (No_Configuration_File): New constant String.
11989 * prj-pars.adb (Parse): Call Get_Or_Create_Configuration_File
11990 with Config_File_Name set to No_Configuration_File, so that
11991 no existing configuration project file will be used, and the
11992 configuration project will be only created in memory when
11993 Add_Default_GNAT_Naming_Scheme is called.
11994 * projects.texi: Minor reformatting.
11996 2014-01-23 Vincent Celier <celier@adacore.com>
11998 * prj-conf.adb (Get_Or_Create_Configuration_File): Never parse
11999 a config project file if On_Load_Config is not null.
12000 * prj-pars.adb: Minor comment changes.
12002 2014-01-23 Ed Schonberg <schonberg@adacore.com>
12004 * lib-xref.adb (Output_References): Output progenitors of
12005 synchronized tagged types, for source navigation.
12007 2014-01-23 Robert Dewar <dewar@adacore.com>
12009 * exp_util.adb, sinfo.adb, sinfo.ads, sem.adb, sem_res.adb,
12010 expander.adb, exp_ch11.adb, exp_ch11.ads, sem_ch11.adb, sem_ch11.ads,
12011 sprint.adb, sprint.ads: Remove unused node N_Subprogram_Info.
12013 2014-01-23 Emmanuel Briot <briot@adacore.com>
12015 * prj-conf.adb (Get_Or_Create_Configuration_File): call
12016 On_Load_Config later.
12018 2014-01-23 Hristian Kirtchev <kirtchev@adacore.com>
12020 * sem_ch3.adb (Analyze_Declarations): Do not
12021 generate the spec of the late primitive in ASIS mode. Add two
12022 comments to explain the special cases when the expansion is
12025 2014-01-23 Robert Dewar <dewar@adacore.com>
12027 * sem_util.adb (Note_Possible_Modification): Fix error of
12028 misbehaving for implicit dereference cases in -gnatc mode.
12030 2014-01-23 Emmanuel Briot <briot@adacore.com>
12032 * prj-pars.adb: Minor reformatting.
12034 2014-01-22 Ed Schonberg <schonberg@adacore.com>
12036 * sem_ch6.adb (Analyze_Subprogram_Body_Helper): A subprogram
12037 body generated for an expression function within a protected body
12038 needs a set of renaming declarations if the expression function
12041 2014-01-22 Ed Schonberg <schonberg@adacore.com>
12043 * lib-xref.adb (Get_Type_Reference): In semantics-only mode,
12044 list interface progenitor of a tagged concurrent type, for better
12047 2014-01-22 Robert Dewar <dewar@adacore.com>
12049 * lib.adb (In_Extended_Main_Code_Unit): Return False for
12051 (In_Extended_Main_Source_Unit): Return False for Standard_Location.
12052 * lib.ads (In_Extended_Main_Code_Unit): Add documentation on
12053 treatment of Slocs No_Location and Standard_Location.
12054 * restrict.adb (Check_Restriction_No_Dependence): Explicitly
12055 check for entity with Standard_Location Sloc, rather than relying
12056 on Lib routines to do that.
12057 * sem_res.adb (Resolve_Call): Implement SPARK_05 restriction
12058 that a call cannot occur before a later occuring body within
12061 2014-01-22 Thomas Quinot <quinot@adacore.com>
12063 * rtsfind.adb: Update comment.
12065 2014-01-22 Hristian Kirtchev <kirtchev@adacore.com>
12067 * sem_aux.ads, sem_aux.adb (Is_Body): New routine.
12068 * sem_ch3.adb (Analyze_Declarations): Add local variable
12069 Body_Seen. Generate the spec of a late controlled
12070 primitive body that is about to freeze its related type.
12071 (Handle_Late_Controlled_Primitive): New routine.
12073 2014-01-22 Robert Dewar <dewar@adacore.com>
12075 * a-stream.adb: Minor reformatting.
12077 2014-01-22 Ed Schonberg <schonberg@adacore.com>
12079 * sem_ch8.adb (From_Actual_Package): Introduce a recursive
12080 sub-procedure Declared_In_Actual to handle properly the visibility
12081 of actuals in actual packages, that are themselves actuals to a
12082 actual package of the current instance. This mimics properly the
12083 visibility of formals of formal packages declared with a box,
12084 within the corresponding generic unit.
12086 2014-01-22 Robert Dewar <dewar@adacore.com>
12088 * checks.adb: Do not assume that a volatile variable is valid.
12090 2014-01-22 Thomas Quinot <quinot@adacore.com>
12092 * g-catiio.ads (Image, Value): Clarify that these functions
12093 operate in the local time zone. Minor documentation update.
12095 2014-01-22 Thomas Quinot <quinot@adacore.com>
12097 * csets.adb, csets.ads, opt.ads: Minor documentation fixes.
12099 2014-01-22 Robert Dewar <dewar@adacore.com>
12101 * sem_aux.adb, sem_aux.ads, sem_ch3.adb (Has_Unconstrained_Elements):
12102 Moved to sem_aux.adb.
12104 2014-01-22 Robert Dewar <dewar@adacore.com>
12106 * vms_data.ads: Minor reformatting.
12108 2014-01-22 Robert Dewar <dewar@adacore.com>
12110 * debug.adb: Document messages affected by -gnatd.E including
12111 the new ones that relate to late definition of equality.
12112 * sem_ch6.adb (Check_Untagged_Equality): In Ada 2012 mode, if
12113 debug flag -gnatd.E is set, then generate warnings rather than
12115 (Check_Untagged_Equality): In earlier versions of Ada,
12116 generate warnings if Warn_On_Ada_2012_Incompatibility flag is set.
12118 2014-01-22 Robert Dewar <dewar@adacore.com>
12120 * sem_prag.adb (Usage_Error): Output additional messages for
12121 unconstrained OUT parameters lacking an input dependency.
12123 2014-01-22 Robert Dewar <dewar@adacore.com>
12125 * sem_ch4.adb: Minor reformatting.
12127 2014-01-22 Robert Dewar <dewar@adacore.com>
12129 * restrict.ads: Minor reformatting.
12130 * sem_res.adb (Resolve_Call): Check for SPARK_05 restriction that
12131 forbids a call from within a subprogram to the same subprogram.
12133 2014-01-22 Thomas Quinot <quinot@adacore.com>
12135 * a-stream.ads (Read_SEA, Write_SEA): New subprograms, optimized
12136 stream attributes for Stream_Element_Array.
12137 * a-stream.adb (Read_SEA, Write_SEA): Bodies for the above.
12138 * rtsfind.adb (Check_CRT): Do not reject a reference to an entity
12139 defined in the current scope.
12141 2014-01-22 Robert Dewar <dewar@adacore.com>
12143 * debug.adb, exp_ch4.adb, erroutc.adb: Minor reformatting.
12145 2014-01-22 Thomas Quinot <quinot@adacore.com>
12147 * sem_ch7.adb, sem_ch8.adb, exp_ch3.adb: Minor reformatting.
12149 2014-01-22 Thomas Quinot <quinot@adacore.com>
12151 * sem_ch3.adb (Analyze_Object_Declaration): For a constant
12152 declaration initialized with a function call, whose type
12153 has variable size, need to remove side effects so that the
12154 initialization expression becomes a dereference of a temporary
12155 reference to the function result.
12157 2014-01-22 Yannick Moy <moy@adacore.com>
12159 * errout.adb (Initialize): Remove trick to add dummy entry
12161 * erroutc.adb (Set_Warnings_Mode_Off,
12162 Set_Warnings_Mode_On): Do nothing if warnings are suppressed by
12163 command line switch.
12164 * opt.ads (Warning_Mode): Document behavior
12165 wrt pragma Warnings, in normal mode and in GNATprove_Mode.
12167 2014-01-22 Robert Dewar <dewar@adacore.com>
12169 * sem_ch3.adb, errout.adb, erroutc.adb: Minor reformatting.
12171 2014-01-22 Robert Dewar <dewar@adacore.com>
12173 * sem_ch13.adb (Check_Pool_Size_Clash): New procedure
12174 (Analyze_Attribute_Definition_Clause, case Storage_Pool): call
12175 Check_Pool_Size_Clash (Analyze_Attribute_Definition_Clause,
12176 case Storage_Size): call Check_Pool_Size_Clash.
12178 2014-01-22 Robert Dewar <dewar@adacore.com>
12180 * sem_ch3.adb, exp_util.adb, sem_dim.adb, sem_elab.adb, sem_ch8.adb,
12181 sem_eval.ads: Minor reformatting.
12183 2014-01-22 Thomas Quinot <quinot@adacore.com>
12185 * sem_eval.adb (Compile_Time_Known_Bounds): Return False for
12186 Any_Composite to prevent cascaded errors.
12188 2014-01-22 Yannick Moy <moy@adacore.com>
12190 * errout.adb (Initialize): Do not insert special entry in Warnings
12191 table in GNATprove_Mode.
12192 * erroutc.adb (Set_Warnings_Mode_On): Add info in Warnings table in
12194 * gnat1drv.adb (Adjust_Global_Switches): Do not suppress frontend
12197 2014-01-22 Robert Dewar <dewar@adacore.com>
12199 * sem_prag.adb (Analyze_Initializes_In_Decl_Part): Handle null
12202 2014-01-22 Robert Dewar <dewar@adacore.com>
12204 * snames.ads-tmpl: Update header.
12206 2014-01-22 Thomas Quinot <quinot@adacore.com>
12208 * exp_util.adb (Insert_Actions): When inserting actions on a
12209 short circuit operator that has already been analyzed, do not park
12210 actions in node; instead introduce an N_Expression_With_Actions
12211 and insert actions immediately.
12212 Add guard for unexpected case of climbing up through statement
12213 in Actions list of an N_Expression_With_Actions.
12214 * sem_elab.adb (Insert_Elab_Check): Remove complex
12215 specialized circuitry for the case where the context is already
12216 analyzed, as it is not needed and introduces irregularities in
12217 finalization. Instead rely on the above change to Insert_Actions
12218 to ensure that late insertion on short circuit operators works
12221 2014-01-22 Ed Schonberg <schonberg@adacore.com>
12223 * sem_ch4.adb (Operator_Check): Improve error message when an
12224 operand of concatenation is an access type.
12226 2014-01-22 Thomas Quinot <quinot@adacore.com>
12228 * sem_dim.adb (Analyze_Dimension_Identifier): Add guard against
12231 2014-01-22 Ed Schonberg <schonberg@adacore.com>
12233 * sem_ch8.adb (Find_Selected_Component): Handle properly the case
12234 of an expanded name in a proper body, whose prefix is a package
12235 in the context of the proper body, when there is a homonym of
12236 the package declared in the parent unit.
12238 2014-01-22 Robert Dewar <dewar@adacore.com>
12240 * sem_warn.adb (Check_Use_Clause): Don't give no entities used
12241 msg if errors found.
12242 (Check_One_Unit): Same change.
12244 2014-01-22 Robert Dewar <dewar@adacore.com>
12246 * ug_words: Add missing/wrong entries for VMS warning switches.
12247 * sem_prag.adb (Check_Duplicate_Pragma): Avoid flagging parent type.
12249 2014-01-22 Jerome Guitton <guitton@adacore.com>
12251 * mlib-tgt-specific-vxworks.adb (Get_Target_Suffix): Replace xscale by
12254 2014-01-22 Robert Dewar <dewar@adacore.com>
12256 * gnat_rm.texi, gnat_ugn.texi: Document passive task optimization
12258 2014-01-22 Eric Botcazou <ebotcazou@adacore.com>
12260 * gcc-interface/Makefile.in: Minor fixes.
12262 2014-01-21 Robert Dewar <dewar@adacore.com>
12264 * par-ch4.adb (P_If_Expression): Rewritten to improve error recovery.
12265 * par-ch5.adb (P_Condition): New version with expression prescanned.
12266 * par.adb (P_Condition): New version with expression prescanned.
12268 2014-01-21 Robert Dewar <dewar@adacore.com>
12270 * gnat_rm.texi: Document that Allow_Integer_Address is ignored
12271 if Address is not a private type.
12272 * sem_prag.adb (Analyze_Pragma, case Allow_Integer_Address):
12273 Ignore pragma if System.Address is not a private type.
12275 2014-01-21 Arnaud Charlet <charlet@adacore.com>
12277 * namet.ads (Name_Len): Initialize to 0 to avoid accessing an
12278 uninitialized value.
12280 2014-01-21 Thomas Quinot <quinot@adacore.com>
12282 * gnat_rm.texi (Scalar_Storage_Order): Update documentation.
12284 2014-01-21 Ed Schonberg <schonberg@adacore.com>
12286 * sem_ch12.adb (Set_Instance_Env): In Ada 2012 mode, preserve
12287 the value of Assertions_Enabled flag when compiling an instance of
12288 an internal unit. This facilitates the use of pre/postconditions
12289 in generic internal units, such as the new elementary function
12292 2014-01-21 Robert Dewar <dewar@adacore.com>
12294 * exp_aggr.adb: Minor reformatting.
12295 * sem_attr.adb: Minor reformatting.
12296 * sem_res.adb: Minor comment addition.
12297 * einfo.adb: Minor comment updates.
12298 * freeze.adb: Minor reformatting and code reorganization.
12300 2014-01-21 Ed Schonberg <schonberg@adacore.com>
12302 * par-ch4.adb (P_If_Expression): Handle more gracefully an
12303 elsif clause that does not have an else part.
12305 2014-01-21 Robert Dewar <dewar@adacore.com>
12307 * checks.adb, sem_util.ads, sem_ch4.adb: Minor reformatting.
12308 * gcc-interface/Makefile.in: clean up target pairs.
12310 2014-01-21 Pascal Obry <obry@adacore.com>
12312 * projects.texi: Minor typo fix.
12314 2014-01-21 Thomas Quinot <quinot@adacore.com>
12316 * freeze.adb (Check_Component_Storage_Order): If a record type
12317 has an explicit Scalar_Storage_Order attribute definition clause,
12318 reject any component that itself is of a composite type and does
12321 2014-01-21 Ed Schonberg <schonberg@adacore.com>
12323 * sem_ch10.adb (Generate_Parent_Reference): Make public so it
12324 can be used to generate proper cross-reference information for
12325 the parent units of proper bodies.
12327 2014-01-21 Thomas Quinot <quinot@adacore.com>
12329 * exp_pakd.adb (Expand_Packed_Element_Set,
12330 Expand_Packed_Element_Reference): No byte swapping required in
12331 the front-end for the case of a reverse storage order array,
12332 as this is now handled uniformly in the back-end. However we
12333 still need to swap back an extracted element if it is itself a
12334 nested composite with reverse storage order.
12336 2014-01-21 Hristian Kirtchev <kirtchev@adacore.com>
12338 * sem_prag.adb (Analyze_External_Property): Add processing for "others".
12339 (Analyze_Pragma): Update the grammar of pragma Abstract_State to
12342 2014-01-21 Arnaud Charlet <charlet@adacore.com>
12344 * gnat_ugn.texi: Minor updates.
12346 2014-01-21 Thomas Quinot <quinot@adacore.com>
12348 * exp_pakd.adb: Update comment, minor reformatting.
12350 2014-01-21 Hristian Kirtchev <kirtchev@adacore.com>
12352 * sem_ch3.adb (Analyze_Variable_Contract): Trigger the volatile
12353 object check when SPARK_Mode is on.
12354 * sem_ch6.adb (Process_Formals): Trigger the volatile object
12355 check when SPARK_Mode is on.
12356 * sem_ch12.adb (Instantiate_Object): Trigger the volatile object
12357 check when SPARK_Mode is on.
12358 * sem_ch13.adb (Analyze_Aspect_Specifications): Insert the
12359 corresponding pragma of aspect SPARK_Mode in the visible
12360 declarations of a package declaration.
12361 * sem_prag.adb (Analyze_Pragma): Trigger the volatile object
12362 check when SPARK_Mode is on.
12363 * sem_res.adb (Resolve_Actuals): Trigger the volatile object
12364 check when SPARK_Mode is on.
12365 (Resolve_Entity_Name): Trigger
12366 the volatile object check when SPARK_Mode is on.
12368 2014-01-21 Robert Dewar <dewar@adacore.com>
12370 * sem_ch3.adb, sem_prag.adb, sem_prag.ads, sem_ch12.adb, sem_res.adb,
12371 sem_ch6.adb, a-except-2005.adb: Minor reformatting.
12373 2014-01-21 Ed Schonberg <schonberg@adacore.com>
12375 * exp_ch3.adb (Expand_N_Object_Declaration): When a class-wide
12376 object is declared, it is rewritten as a renaming of an dynamic
12377 expression that wraps the initial value. The renaming declaration
12378 is first given an internal name, to prevent collisions with the
12379 entity already declared, and then the name is modified to reflect
12380 the original one. the modification of the name must preserve
12381 the source location of the original, to prevent spurious errors
12382 when compiling with style checks if the declaration involves
12383 more than one entity.
12385 2014-01-21 Hristian Kirtchev <kirtchev@adacore.com>
12387 * aspects.adb Add entries for Async_Readers, Async_Writers,
12388 Effective_Reads and Effective_Writes in table Canonical_Aspect.
12389 * aspects.ads Add entries for Async_Readers, Async_Writers,
12390 Effective_Reads and Effective_Writes in tables Aspect_Id,
12391 Aspect_Names, Aspect_Delay and Implementation_Defined_Aspect.
12392 * atree.adb (Ekind_In): New version with 8 parameters.
12393 (Node34): New routine.
12394 (Set_Node34): New routine.
12395 * atree.ads (Ekind_In): New version with 8 parameters.
12396 (Node34): New routine.
12397 (Set_Node34): New routine.
12398 * einfo.adb Contract is now Node34.
12399 (Contract): Update the assertion and node usage.
12400 (Get_Pragma): Include pragmas Async_Readers, Async_Writers,
12401 Effective_Reads and Effective_Writes.
12402 (Set_Contract): Update the assertion and node usage.
12403 (Write_Field24_Name): Remove the output for a contract.
12404 (Write_Field34_Name): Add output for a contract.
12405 * einfo.ads Contract is now Node34. Update the comment on
12406 attribute usage and related node structures.
12407 (Get_Pragma): Update the comment on usage.
12408 * par-prag.adb (Prag): Pragmas Async_Readers, Async_Writers,
12409 Effective_Reads and Effective_Writes do not require special
12410 processing by the parser.
12411 * sem_ch3.adb (Analyze_Variable_Contract): New routine.
12412 (Analyze_Declarations): Analyze the contract of a variable at
12413 the end of the declarative region.
12414 (Analyze_Object_Declaration): Create a contract for a variable.
12415 * sem_ch6.adb (Analyze_Subprogram_Contract): Update the retrieval
12416 of classification pragmas.
12417 (Process_Formals): Detect an illegal
12418 use of a volatile object as a formal in a function.
12419 * sem_ch12.adb (Instantiate_Object): Detect an illegal use of
12420 a volatile object as an actual in generic instantiation.
12421 * sem_prag.adb Add entries for Async_Readers, Async_Writers,
12422 Effective_Reads and Effective_Writes in table Sig_Flags.
12423 (Analyze_External_State_In_Decl_Part): New routine.
12424 (Analyze_Global_Item): Detect an illegal use of a volatile object
12425 as a global item of a function.
12426 (Analyze_Pragma): Reimplement
12427 pragma Abstract_State. Add support for pragmas Async_Readers,
12428 Async_Writers, Effective_Reads and Effective_Writes.
12429 (Check_External_Properties): New routine.
12430 * sem_prag.ads (Analyze_External_State_In_Decl_Part): New routine.
12431 (Check_External_Properties): New routine.
12432 * sem_res.adb (Resolve_Actuals): Detect an illegal use of a
12433 volatile object as an actual in a call.
12434 (Resolve_Entity_Name):
12435 Add local variables Par, Prev and Usage_OK. Detect illegal
12436 contexts of volatile objects.
12437 * sem_util.adb (Add_Contract_Item): Add support for
12438 pragmas associated with the contract of a variable.
12439 (Async_Readers_Enabled): New routine.
12440 (Async_Writers_Enabled): New routine.
12441 (Effective_Reads_Enabled): New routine.
12442 (Effective_Writes_Enabled): New routine.
12443 (Has_Enabled_Property):
12445 (Is_Unchecked_Conversion_Instance): New routine.
12446 (Is_Volatile_Object): Add support for entities that may denote
12448 * sem_util.ads (Add_Contract_Item): Update the
12450 (Async_Readers_Enabled): New routine.
12451 (Async_Writers_Enabled): New routine.
12452 (Effective_Reads_Enabled): New routine.
12453 (Effective_Writes_Enabled): New routine.
12454 (Is_Unchecked_Conversion_Instance): New routine.
12455 * sinfo.ads Update the comment on the structure of N_Contract.
12456 * snames.ads-tmpl Add predefined names for Async_Readers,
12457 Async_Writers, Effective_Reads and Effective_Writes. Add
12458 pragma ids for Async_Readers, Async_Writers, Effective_Reads
12459 and Effective_Writes.
12461 2014-01-21 Robert Dewar <dewar@adacore.com>
12463 * exp_ch4.adb (Eval_Op_Expon): Use CRT_Safe_Compile_Time_Known_Value
12464 * sem_eval.adb (Compile_Time_Known_Value): Remove special
12465 handling of CRT mode (CRT_Safe_Compile_Time_Known_Value): New
12466 function (Eval_Op_Expon): Add CRT_Safe in call to Test_Foldable
12467 (Test_Foldable): Add CRT_Safe parameter
12468 * sem_eval.ads (Compile_Time_Known_Value): Remove special
12469 handling of CRT mode.
12470 (CRT_Safe_Compile_Time_Known_Value): New function.
12472 2014-01-21 Robert Dewar <dewar@adacore.com>
12474 * sem_prag.adb (Analyze_Pragma, case SPARK_Mode): Fix problem
12475 with pragma or aspect that applies to package spec or subprogram
12478 2014-01-21 Robert Dewar <dewar@adacore.com>
12480 * exp_aggr.adb: Minor reformatting.
12482 2014-01-21 Johannes Kanig <kanig@adacore.com>
12484 * gnat1drv.adb (Gnat1drv) remove obsolete reference to -gnatd.H.
12486 2014-01-21 Bob Duff <duff@adacore.com>
12488 * gnat_ugn.texi: Document the "checks" attribute in gnat2xml.
12490 2014-01-21 Steve Baird <baird@adacore.com>
12492 * gnat_rm.texi: Improve description of SPARK_Mode pragma.
12494 2014-01-21 Vincent Celier <celier@adacore.com>
12496 * prj-part.adb (Parse_Single_Project): Accept to extend a project
12497 if it has only be imported by an project being extended. When a
12498 project that has only been imported by a project being extended
12499 is imported by another project that is not being extended,
12500 reset the previous indication, so that it will be an error if
12501 this project is extended later.
12502 * prj-tree.adb (Create_Project): Include component From_Extended
12503 in table Projects_HT
12504 * prj-tree.ads (Project_Name_And_Node): New Boolean component
12507 2014-01-21 Robert Dewar <dewar@adacore.com>
12509 * atree.ads, atree.adb: Add Node33 and Set_Node33.
12510 * einfo.ads, einfo.adb (SPARK_Pragma): New field (SPARK_Aux_Pragma):
12511 New field (SPARK_Pragma_Inherited): New flag
12512 (SPARK_Aux_Pragma_Inherited): New flag (SPARK_Mode_Pragmas):
12514 * lib.ads, lib.adb: Remove SPARK_Mode_Pragma, no longer used.
12515 * opt.ads (SPARK_Mode_Pragma): New global variable.
12516 * sem.ads: Add Save_SPARK_Mode_Pragma field to Scope_Stack_Entry.
12517 * sem_ch3.adb: Use new SPARK_Mode data structures.
12518 * sem_ch6.adb: Set SPARK_Mode fields in subprogram specs and bodies.
12519 * sem_ch7.adb: Set SPARK_Mode fields in package spec and body entities.
12520 * sem_ch8.adb (Push_Scope): Save SPARK_Mode_Pragma.
12521 (Pop_Scope): Restore SPARK_Mode_Pragma.
12522 * sem_prag.adb (Analyze_Pragma, case SPARK_Mode): Rewrite for
12523 new data structures.
12525 2014-01-21 Arnaud Charlet <charlet@adacore.com>
12527 * back_end.adb: Undo previous change, not needed. Minor reformatting.
12529 2014-01-21 Thomas Quinot <quinot@adacore.com>
12531 * exp_ch5.adb: Fix comment.
12532 * switch-c.adb: Minor comment update.
12533 * exp_ch3.adb: Minor reformatting.
12535 2014-01-21 Arnaud Charlet <charlet@adacore.com>
12537 * back_end.adb (Scan_Compiler_Arguments): Do not store object
12538 filename in gnatprove mode.
12540 2014-01-21 Thomas Quinot <quinot@adacore.com>
12542 * sinfo.ads (No_Ctrl_Actions): Clarify documentation (flag also
12543 suppresses usage of primitive _assign for tagged types).
12544 * exp_aggr.adb (Build_Array_Aggr_Code.Gen_Assign): Set
12545 No_Ctrl_Actions for a tagged type that does not require
12546 finalization, as we want to disable usage of _assign (which
12547 may cause undesirable discriminant checks on an uninitialized,
12550 2014-01-21 Ed Schonberg <schonberg@adacore.com>
12552 * sem_prag.adb: Reject invariant'class on completion.
12554 2014-01-21 Javier Miranda <miranda@adacore.com>
12556 * exp_ch3.adb (Build_Init_Procedure): For
12557 derivations of interfaces, do not move the the initialization
12558 of the _parent field since such assignment is not generated.
12560 2014-01-21 Ed Schonberg <schonberg@adacore.com>
12562 * sem_res.adb (Rewrite_Renamed_Operator): Do not replace entity
12563 with the operator it renames if we are within an expression of
12564 a pre/postcondition, because the expression will be reanalyzed
12565 at a later point, and the analysis of the renaming may affect
12566 the visibility of the operator when in an instance.
12568 2014-01-21 Robert Dewar <dewar@adacore.com>
12570 * sinfo.ads, sinfo.adb: Change Do_Discriminant_Check to use new Flag1.
12571 Add this flag to type conversion nodes and assignment nodes.
12572 * treepr.adb: Deal properly with Flag 1,2,3.
12573 * treeprs.adt: Minor comment update.
12575 2014-01-21 Robert Dewar <dewar@adacore.com>
12577 * sem_eval.adb (Compile_Time_Known_Value): Add Ignore_CRT
12579 * sem_eval.ads (Compile_Time_Known_Value): Add Ignore_CRT
12580 parameter, completely rewrite spec.
12582 2014-01-21 Ed Schonberg <schonberg@adacore.com>
12584 * sem_ch10.adb (Install_Withed_Unit): If the unit is a subprogram
12585 instance that is inlined, it may have been rewritten as a wrapper
12586 package. In that case the unit that must be made visible is the
12587 related instance of the package.
12589 2014-01-21 Arnaud Charlet <charlet@adacore.com>
12591 * exp_ch9.adb (Expand_N_Selective_Accept.Add_Accept): Refine
12592 previous change in codepeer mode.
12594 2014-01-21 Arnaud Charlet <charlet@adacore.com>
12596 * exp_ch9.adb (Expand_N_Selective_Accept.Add_Accept): Always add
12597 call to Abort_Undefer, as expected by the runtime.
12598 * s-tasren.adb (Local_Complete_Rendezvous): Replace
12599 Defer_Abort_Nestable by Defer_Abort, since we do not expect abort to be
12600 deferred at this point. Update comments.
12602 2014-01-21 Thomas Quinot <quinot@adacore.com>
12604 * exp_ch4.adb, exp_ch5.adb, checks.adb: Minor reformatting.
12606 2014-01-21 Arnaud Charlet <charlet@adacore.com>
12608 * switch-c.adb, usage.adb, gnat_ugn.texi: Mark -gnates as internal,
12611 2014-01-21 Robert Dewar <dewar@adacore.com>
12613 * switch-c.adb, usage.adb, atree.adb, atree.ads: Minor reformatting.
12615 2014-01-21 Thomas Quinot <quinot@adacore.com>
12617 * atree.adb, atree.ads (Num_Extension_Nodes): Switch to Node_Id, since
12618 this is value is used in Node_Id arithmetic operations.
12619 (Copy_Node, Exchange_Entities): Use loops indexed by Num_Extension_Nodes
12620 instead of hard-coded unrolled code.
12622 2014-01-21 Yannick Moy <moy@adacore.com>
12624 * gnat1drv.adb: Minor code cleanup, removing useless code.
12626 2014-01-21 Arnaud Charlet <charlet@adacore.com>
12628 * opt.ads (SPARK_Switches_File_Name): New.
12629 * switch-c.adb (Scan_Front_End_Switches): Add handling of -gnates=xxx *
12630 * usage.adb (Usage): Document -gnates, in gnatprove mode only.
12631 * gnat_ugn.texi: Document -gnates.
12633 2014-01-21 Yannick Moy <moy@adacore.com>
12635 * errout.adb (Special_Msg_Delete): Update comment. Remove
12636 special case for GNATprove which should not ignore mismatch
12637 in sizes for representation clauses.
12638 * sem_prag.adb (Analyze_Pragma): Remove special case for GNATprove
12639 which should not ignore pragma Pack.
12641 2014-01-21 Ed Schonberg <schonberg@adacore.com>
12643 * sem_ch4.adb: Code clean up.
12645 2014-01-21 Steve Baird <baird@adacore.com>
12647 * gnat_rm.texi: Improve GNAT RM description of SPARK_Mode pragma.
12649 2014-01-21 Robert Dewar <dewar@adacore.com>
12651 * gcc-interface/gigi.h: Get Flags array address.
12652 * gcc-interface/trans.c: Acquire Flags array address.
12653 * atree.adb: Add support for Flags array and Flag0,1,2,3.
12654 * atree.ads: Add support for Flags array and Flag0,1,2,3.
12655 * atree.h: Add support for Flags array and Flag0,1,2,3.
12656 * back_end.adb: Pass Flags array address to gigi.
12658 2014-01-21 Ed Schonberg <schonberg@adacore.com>
12660 * sem_ch8.adb (Attribute_Renaming): Transfer original attribute
12661 reference to generated body so that legality checks on stream
12662 attributes are properly applied. If type is tagged and already
12663 frozen, insert generated body at the point of the renaming
12666 2014-01-21 Ed Schonberg <schonberg@adacore.com>
12668 * sem_ch12.adb: Code clean up.
12669 * sem_ch8.adb: Minor reformatting
12671 2014-01-20 Robert Dewar <dewar@adacore.com>
12673 * checks.adb: Check SPARK_Mode instead of GNATProve_Mode for
12674 converting warnings on inevitable exceptions to errors.
12675 * exp_ch4.adb: Check SPARK_Mode instead of GNATProve_Mode for
12676 converting warnings on inevitable exceptions to errors.
12677 * opt.adb (SPARK_Mode_Config): Handled like other config flags
12678 * opt.ads (SPARK_Mode_Type): Moved here from types (renamed from
12679 SPARK_Mode_Id) (SPARK_Mode_Type): Add pragma Ordered, remove
12680 SPARK_ from names (SPARK_Mode): New flag (SPARK_Mode_Config):
12681 New flag (Config_Switches_Type): Add SPARK_Mode field
12682 * sem.adb: Minor code reorganization (remove unnecessary with)
12683 * sem.ads (Scope_Stack_Entry): Add Save_SPARK_Mode field
12684 * sem_aggr.adb: Check SPARK_Mode instead of GNATProve_Mode for
12685 converting warnings on inevitable exceptions to errors.
12686 * sem_attr.adb: Check SPARK_Mode instead of GNATProve_Mode for
12687 converting warnings on inevitable exceptions to errors.
12688 * sem_ch3.adb: Check SPARK_Mode instead of GNATProve_Mode for
12689 converting warnings on inevitable exceptions to errors.
12690 * sem_ch4.adb: Check SPARK_Mode instead of GNATProve_Mode for
12691 converting warnings on inevitable exceptions to errors.
12692 * sem_ch6.adb (Analyze_Subprogram_Body_Helper): Reset SPARK_Mode
12693 from spec if needed
12694 * sem_ch7.adb (Analyze_Package_Body_Helper): Reset SPARK_Mode
12695 from spec if needed
12696 * sem_ch8.adb (Push_Scope): Save SPARK_Mode (Pop_Scope):
12698 * sem_elab.adb: Check SPARK_Mode instead of GNATProve_Mode for
12699 converting warnings on inevitable exceptions to errors.
12700 * sem_prag.adb (Get_SPARK_Mode_From_Pragma): New function
12701 (Get_SPARK_Mode_Id): Removed (Get_SPARK_Mode_Type): New name
12702 of Get_SPARK_Mode_Id
12703 * sem_prag.ads (Get_SPARK_Mode_From_Pragma): New function
12704 * sem_res.adb: Check SPARK_Mode instead of GNATProve_Mode for
12705 converting warnings on inevitable exceptions to errors.
12706 * sem_util.adb: Check SPARK_Mode instead of GNATProve_Mode for
12707 converting warnings on inevitable exceptions to errors.
12708 * types.ads (SPARK_Mode_Id): Moved to opt.ads and renamed
12711 2014-01-20 Ed Schonberg <schonberg@adacore.com>
12713 * sem_ch13.adb: Add semantic information to rewritten type
12716 2014-01-20 Ed Schonberg <schonberg@adacore.com>
12718 * exp_ch5.adb (Expand_N_Assignment_Statement): If both sides
12719 are of a type with unknown discriminants, convert both to the
12720 underlying view of the type, so that the proper constraint check
12721 can be applied to the right-hand side.
12723 2014-01-20 Robert Dewar <dewar@adacore.com>
12725 * atree.adb (Copy_Node): Fix failure to copy last component
12726 (Exchange_Entities): Fix failure to exchange last entity
12728 2014-01-20 Ed Schonberg <schonberg@adacore.com>
12730 * sem_ch12.adb: Code clean up.
12732 2014-01-20 Robert Dewar <dewar@adacore.com>
12734 * gnat_rm.texi, sem_ch4.adb: Minor reformatting.
12736 2014-01-20 Ed Schonberg <schonberg@adacore.com>
12738 * sem_ch4.adb (Analyze_Quantified_Expression): If after
12739 pre-analysis the loop parameter specification has been
12740 rewritten as a iterator specification, propagate the change to
12741 the quantified expression, for ASIS navigtion needs.
12743 2014-01-20 Vincent Celier <celier@adacore.com>
12745 * par-ch10.adb: Minor error message change: escape [ and ].
12747 2014-01-20 Robert Dewar <dewar@adacore.com>
12749 * checks.adb: Make warnings on exceptions into errors in GNATprove mode.
12750 * errout.adb: Implement [ and ] insertion characters.
12751 * errout.ads: Document new [ and ] insertion characters.
12752 * sem_ch12.adb, restrict.adb, frontend.adb, exp_ch7.adb: Minor
12753 addition of ??? comment.
12754 * lib-xref.adb, exp_util.adb, gnat1drv.adb: Minor reformatting
12755 * exp_ch4.adb, sem_ch3.adb, sem_ch4.adb, sem_ch6.adb, sem_elab.adb,
12756 sem_eval.adb, sem_res.adb, sem_util.adb, sem_attr.adb, sem_aggr.adb:
12757 Make warnings on exceptions into errors in GNATprove mode.
12758 * sem_dim.adb: Minor reformatting throughout Quote [ and ]
12761 2014-01-20 Ed Schonberg <schonberg@adacore.com>
12763 * sem_ch13.adb: Code clean up.
12765 2014-01-20 Robert Dewar <dewar@adacore.com>
12767 * errout.ads, errout.adb: Implement >? >x? >X? sequences in error
12769 * sem_ch6.adb (Check_Statement_Sequence): Missing return is an
12770 error in GNATprove mode.
12772 2014-01-20 Ed Schonberg <schonberg@adacore.com>
12774 * par-ch4.adb (Is_Parameterless_Attribute): The Ada2012 attribute
12775 reference 'Old takes no parameters, and thus can appear as a
12778 2014-01-20 Eric Botcazou <ebotcazou@adacore.com>
12780 * exp_aggr.adb: Fix minor typos.
12782 2014-01-20 Ed Schonberg <schonberg@adacore.com>
12784 * sem_attr.adb (Analyze_Attribute, case 'Constrained): In an
12785 instance the attribute is legal, and its value is determined
12786 statically if the type has no discriminants. This choice is
12787 more useful than rechecking the legality rule in the instance,
12788 is consistent with older usage, and is also consistent with all
12791 2014-01-20 Arnaud Charlet <charlet@adacore.com>
12793 * sem_cat.adb (Validate_Static_Object_Name): Change error into
12794 warning in Relaxed_Semantic_Mode.
12796 2014-01-20 Ed Schonberg <schonberg@adacore.com>
12798 * sem_attr.adb: Code and comments cleanup.
12800 2014-01-20 Yannick Moy <moy@adacore.com>
12802 * debug.adb Free debug flags -gnatd.D, -gnatd.G and -gnatd.V *
12803 * errout.adb (Compilation_Errors): Remove special handling in
12805 * gnat1drv.adb (Adjust_Global_Switches): Remove handling of the
12806 removed debug flags.
12807 * gnat_rm.texi: Initial documentation for Abstract_State, Depends,
12808 Global, Initial_Condition, Initializes and Refined_State pragmas and
12810 * opt.ads (Frame_Condition_Mode, Formal_Extensions,
12811 SPARK_Strict_Mode): Remove global flags.
12812 * sem_ch3.adb (Analyze_Object_Declaration): Check of no hidden state
12813 always performed now, on packages declaring a null state.
12814 (Signed_Integer_Type_Declaration): Remove ill-designed attempt
12815 at providing pedantic mode for bounds of integer types.
12816 * sem_ch4.adb (Analyze_Quantified_Expression): Warning on suspicious
12817 "some" quantified expression now issued under control of -gnatw.t,
12818 like the other warning on unused bound variable.
12819 * sem_prag.adb (Check_Precondition_Postcondition): Remove useless test
12821 (Analyze_Pragma): Remove tests for SPARK 2014
12822 pragmas, not officially allowed by GNAT.
12824 2014-01-20 Hristian Kirtchev <kirtchev@adacore.com>
12826 * sem_prag.adb (Analyze_Pragma): Ensure that
12827 the sole argument of pragmas Abstract_State, Contract_Cases,
12828 Depends, Global and Initializes in in aggregate form.
12829 (Analyze_Refined_Pragma): Ensure that the sole argument of
12830 pragmas Refined_Depends, Refined_Global and Refined_State is in
12832 (Ensure_Aggregate_Form): New routine.
12834 2014-01-20 Doug Rupp <rupp@adacore.com>
12836 * sem_attr.adb (Analyze_Attribute): case
12837 Attribute_Constrained => treat all prefixes as legal for Declib
12840 2014-01-20 Hristian Kirtchev <kirtchev@adacore.com>
12842 * sem_prag.adb (Check_Mode): Reimplement the routine.
12843 (Find_Mode): New routine.
12845 2014-01-20 Robert Dewar <dewar@adacore.com>
12847 * sem_ch4.adb (Operator_Check): Handle additional
12848 Allow_Integer_Address cases.
12850 2014-01-20 Robert Dewar <dewar@adacore.com>
12852 * gnat_rm.texi (Allow_Integer_Address): Remove note about not
12853 allowed if address is non-private, no longer true.
12854 * sem_prag.adb (Analyze_Pragma, case Allow_Integer_Address):
12855 Remove check for address being private, causes difficulty when
12856 pragma used in gnat.adc file and is not needed, since we guard
12857 this in Address_Integer_Convert_OK.
12858 * exp_ch7.adb: Minor reformatting.
12859 * sem_ch4.adb: Handle operator operands in Allow_Integer_Address mode.
12861 2014-01-20 Robert Dewar <dewar@adacore.com>
12863 * checks.adb (Apply_Range_Check): Remove gnatprove special
12864 casing of exponentiation.
12865 * sem_res.adb (Resolve_Op_Expon): Apply range check to right
12866 operand for integer case to check range against Natural.
12868 2014-01-20 Robert Dewar <dewar@adacore.com>
12870 * s-tataat.adb: Minor reformatting.
12872 2014-01-20 Robert Dewar <dewar@adacore.com>
12874 * einfo.adb (Is_Descendent_Of_Address): Now applies to all
12875 entities, and also fix documentation to remove mention of visible
12876 integer type, since this is not what the implementation does.
12877 * einfo.ads (Is_Descendent_Of_Address): Now applies to all
12878 entities, and also fix documentation to remove mention of visible
12879 integer type, since this is not what the implementation does.
12880 * gnat_rm.texi: Minor clarification of Allow_Integer_Address
12882 * sem_ch4.adb (Analyze_One_Call): Handle Allow_Integer_Address
12883 case for parameter type check.
12884 * sem_res.adb (Resolve): Use new function
12885 Address_Integer_Convert_OK.
12886 * sem_type.adb: Minor code reorganization (use Ekind_In) Minor
12887 reformatting throughout.
12888 * sem_util.adb (Address_Integer_Convert_OK): New function.
12889 * sem_util.ads: Minor reformatting (put specs in alpha order)
12890 (Address_Integer_Convert_OK): New function.
12892 2014-01-20 Thomas Quinot <quinot@adacore.com>
12894 * exp_ch7.adb (Wrap_Transient_Expression):
12895 Insertion extra conditional expression only if
12896 Opt.Suppress_Control_Flow_Optimizations is set.
12898 2014-01-20 Arnaud Charlet <charlet@adacore.com>
12900 * s-tataat.adb (Initialize_Attributes): Abort might already be
12901 deferred in Create_Task.
12903 2014-01-20 Hristian Kirtchev <kirtchev@adacore.com>
12905 * checks.adb (Apply_Scalar_Range_Check): Flag
12906 the exponent as requiring a range check when the expression is
12909 2014-01-20 Fedor Rybin <frybin@adacore.com>
12911 * gnat_ugn.texi: Documenting --passed-tests option for gnattest.
12913 2014-01-20 Hristian Kirtchev <kirtchev@adacore.com>
12915 * sem_util.adb (Default_Initialization): New routine.
12916 * sem_util.ads: Add new type Default_Initialization_Kind.
12917 (Default_Initialization): New routine.
12919 2014-01-20 Hristian Kirtchev <kirtchev@adacore.com>
12921 * sem_prag.adb (Check_Mode): Correct all error
12922 message logic dealing with in/in out parameters that may appear
12923 as inputs or have a self reference.
12925 2014-01-20 Robert Dewar <dewar@adacore.com>
12927 * exp_ch9.adb, checks.adb, exp_intr.adb: Minor reformatting.
12928 * sem_res.adb (Resolve): Fix error causing infinite loop for
12929 integer used as address. Allow addresses as integers.
12931 2014-01-20 Arnaud Charlet <charlet@adacore.com>
12933 * s-osinte-linux.ads (struct_sigaction): Fix rep clause.
12935 2014-01-20 Bob Duff <duff@adacore.com>
12937 * par-ch8.adb (P_Use_Type_Clause): Detect syntax
12938 error when "use all" is not followed by "type".
12940 2014-01-20 Bob Duff <duff@adacore.com>
12942 * exp_intr.adb (Expand_Unc_Deallocation): Remove warning on abort
12945 2014-01-20 Ed Schonberg <schonberg@adacore.com>
12947 * checks.adb (Apply_Address_Clause_Check): If there is an
12948 alignment check on the expression in an address clause, and there
12949 is no local exception propagation, add an additional explanatory
12950 message to clarify the cause of previous warning.
12952 2014-01-20 Robert Dewar <dewar@adacore.com>
12954 * exp_ch7.adb: Minor reformatting.
12955 * opt.ads: Minor comment updates.
12956 * sem.adb: Minor name change Is_Main_Unit =>
12957 Is_Main_Unit_Or_Main_Unit_Spec.
12958 * sem_ch6.adb: Minor reformatting and code reorganization.
12960 2014-01-20 Bob Duff <duff@adacore.com>
12962 * gnat_ugn.texi: Update gnatpp switches.
12964 2014-01-20 Thomas Quinot <quinot@adacore.com>
12966 * exp_ch9.adb: Minor comment edit.
12968 2014-01-20 Robert Dewar <dewar@adacore.com>
12970 * gnat_rm.texi: Document that Allow_Integer_Address is permitted
12971 only if System.Address is a private type.
12972 * opt.ads (Allow_Integer_Address): No longer set by -gnates.
12973 * sem_prag.adb (Analyze_Pragma, case Allow_Integer_Address):
12974 Allowed only if type System.Address is private, since otherwise
12976 * sem_res.adb: Fix failure to properly Analyze unchecked
12977 conversions that were introduced by Allow_Integer_Address.
12978 * switch-c.adb: Remove -gnates switch.
12979 * usage.adb: Remove -gnates switch.
12980 * gnat_ugn.texi: Remove documentation of -gnates flag.
12982 2014-01-20 Ed Schonberg <schonberg@adacore.com>
12984 * sem_ch6.adb (Analyze_Expression_Function): Pre-analyze and
12985 resolve expression to perform proper name capture.
12987 2014-01-20 Ed Schonberg <schonberg@adacore.com>
12989 * sem.adb (Semantics): When saving/restoring configuration
12990 switches, the spec of a pre- defined unit that is the main unit
12991 must be treated as a predefined unit as well.
12993 2014-01-20 Thomas Quinot <quinot@adacore.com>
12995 * exp_ch7.adb (Wrap_Transient_Expression): For a Boolean
12996 expression, insert an extra conditional expression when saving
12997 the value of the expression, for the benefit of control flow
12998 graph based coverage analysis.
12999 * exp_ch3.adb: Minor reformatting.
13001 2014-01-20 Robert Dewar <dewar@adacore.com>
13003 * gnat1drv.adb: Set Allow_Integer_Address in relaxed semantics mode.
13004 * gnat_rm.texi: Document pragma Allow_Integer_Address.
13005 * gnat_ugn.texi: Document pragma Allow_Integer_Address, -gnates.
13006 * opt.ads: New flag Allow_Integer_Address.
13007 * par-prag.adb: Dummy entry for pragma Allow_Integer_Address.
13008 * sem_ch5.adb: Minor reformatting.
13009 * sem_prag.adb: Implement pragma Allow_Integer_Address.
13010 * sem_res.adb (Resolve): Allow integer address value if
13012 * sem_util.adb: Minor reformatting.
13013 * snames.ads-tmpl: Add entry for pragma Allow_Integer_Address.
13014 * switch-c.adb: Recognize flag -gnates.
13015 * usage.adb: Document flag -gnates.
13017 2014-01-20 Thomas Quinot <quinot@adacore.com>
13019 * s-tadeca.adb: Fix minor typos in comment.
13021 2014-01-20 Pascal Obry <obry@adacore.com>
13023 * s-win32.ads (FreeLibrary): New import.
13025 2014-01-20 Robert Dewar <dewar@adacore.com>
13027 * sem_res.adb, sem_cat.adb: Minor reformatting.
13028 * sem_ch11.adb (Analyze_Raise_Statement): Only give warning about
13029 assigning to OUT parameters for the current subprogram scope.
13030 * exp_ch4.adb: Minor reformatting.
13032 2014-01-20 Ed Schonberg <schonberg@adacore.com>
13034 * exp_ch4.adb (Process_Transient_Object,
13035 Find_Enclosing_Contexts): If the top-level if-expression that
13036 generated the transient object is an actual in a call, the proper
13037 Hook_Context is a construct enclosing the call.
13038 * einfo.ads: Indicate that Related_Expression is used to link a
13039 loop variable to the container expression over which the loop
13041 (Analyze_Iterator_Specification): Set the Related_Expression of
13042 the loop variable in a container element iterator.
13043 (Note_Possible_Modification): If the variable is the loop
13044 variable in a container element iterator, indicate that the
13045 enclosing container is also modified.
13047 2014-01-20 Hristian Kirtchev <kirtchev@adacore.com>
13049 * aspects.adb (Move_Or_Merge_Aspects): Reimplemented.
13051 2014-01-20 Robert Dewar <dewar@adacore.com>
13053 * s-taasde.ads, gnat_ugn.texi, s-tadeca.adb, sem_res.adb, s-tadeca.ads:
13054 Minor reformatting and code clean up.
13056 2014-01-20 Arnaud Charlet <charlet@adacore.com>
13058 * sem_cat.adb (Validate_Object_Declaration): Relax semantics
13059 of objects of private type if Relaxed_RM_Semantics.
13061 2014-01-20 Claire Dross <dross@adacore.com>
13063 * a-cofove.ads (Vector): Capacity discriminant
13064 should be in range of the index.
13066 2014-01-20 Thomas Quinot <quinot@adacore.com>
13068 * a-caldel.ads(To_Duration), s-taasde.ads(Time_Enqueue):
13069 Clarify specs s-tadeca.adb(Enqueue_Calendar): Compensate for
13070 possible difference between epoch of Ada.Calendar clock and Ada
13071 real-time/tasking clock.
13072 * s-taprop-posix.adb: Minor comment fix.
13074 2014-01-20 Doug Rupp <rupp@adacore.com>
13076 * sysdep.c [vxworks]: Remove Vxworks version noise for RTP.
13078 2014-01-20 Hristian Kirtchev <kirtchev@adacore.com>
13080 * exp_attr.adb (Expand_N_Attribute_Reference): Generate validity
13081 checks on the prefix of attribute 'Old.
13082 * sem_ch3.adb (Process_Range_Expr_In_Decl): Suppress the
13083 generation of validity checks on a range that belongs to the
13084 iteration scheme of a quantified expression.
13085 * sem_ch5.adb (One_Bound): Suppress the generation of validity
13086 checks on a bound that belongs to the iteration scheme of a
13087 quantified expression, generate the check in all other cases.
13089 2014-01-20 Bob Duff <duff@adacore.com>
13091 * gnat_ugn.texi: Enable --pp-new by default. Minor reorganization.
13093 2014-01-20 Ed Schonberg <schonberg@adacore.com>
13095 * sem_res.adb (Resolve): When compiling a predefined unit, ignore
13096 interpretations that do not come from other predefined units,
13097 to prevent spurious ambiguities in the presence of user-defined
13098 operators in the context of (an instance of) a predefined unit.
13100 2014-01-20 Robert Dewar <dewar@adacore.com>
13102 * gnat_rm.texi: Document that Loop_Variant is included in
13103 Statement_Assertions.
13104 * sem_prag.adb (Check_Kind): Add Loop_Variant to
13105 Statement_Assertions (Check_Applicable_Policy): Add Loop_Variant
13106 to Statement_Assertions.
13108 2014-01-20 Doug Rupp <rupp@adacore.com>
13110 * sysdep.c (__gnat_is_file_not_found_error) [vxworks6]: Add case
13111 for errno ENOENT from RTP on NFS mounted file system.
13113 2014-01-20 Ed Schonberg <schonberg@adacore.com>
13115 * sem_util.adb (Check_Function_Writable_Actuals): 1) Do not
13116 examine code that does not come from source. The check does not
13117 apply to code generated for constraint checks, and such code may
13118 generate spurious error messages when compiled with expansion
13119 disabled (as in a generic unit) because side effects may not
13121 2) Make error messages more explicit: indicate the component
13122 of the construct whose value is indeterminate because of a
13123 call to a function with in-out parameter in another component,
13124 when there is no mandated order of execution between the two
13125 components (actuals, aggregate components, alternatives).
13127 2014-01-20 Robert Dewar <dewar@adacore.com>
13129 * gnat_rm.texi: Minor cleanup.
13131 2014-01-20 Hristian Kirtchev <kirtchev@adacore.com>
13133 * sem_attr.adb (Analyze_Attribute): Attributes 'Old and 'Result
13134 can now apply to a refined postcondition.
13135 * sem_ch6.adb (Analyze_Subprogram_Contract): Remove local
13136 variable Result_Seen. Add variables Case_Prag, Post_Prag,
13137 Seen_In_Case and Seen_In_Post. Update the mechanism that detects
13138 whether postconditions and/or constract-cases mention attribute
13139 'Result and introduce a post-state when applied to functions.
13140 (Check_Result_And_Post_State): Removed.
13141 * sem_prag.adb (Analyze_Pragma): Add local variable
13142 Result_Seen. Verify that the expression of pragma Refined_Post
13143 mentions attribute 'Result and introduces a post-state.
13144 * sem_util.ads, sem_util.adb (Check_Result_And_Post_State): New routine.
13146 2014-01-20 Hristian Kirtchev <kirtchev@adacore.com>
13148 * exp_ch7.adb (Is_Subprogram_Call): New routine.
13149 (Process_Transient_Objects): Make variable Must_Hook global with
13150 respect to all locally declared subprograms. Search the context
13151 for at least one subprogram call.
13152 (Requires_Hooking): Removed.
13154 2014-01-20 Claire Dross <dross@adacore.com>
13156 * a-cfdlli.ads a-cfhama.ads a-cfhase.ads a-cforma.ads
13157 * a-cforse.ads a-cofove.ads: Add pragma Annotate (GNATprove,
13158 External_Axiomatization);
13160 2014-01-20 Robert Dewar <dewar@adacore.com>
13162 * sem_attr.adb (Analyze_Attribute, case Loop_Entry): Allow
13163 Loop_Entry in Assert, Assert_And_Cut, and Assume pragmas.
13164 * sem_prag.adb (Analyze_Pragma, case Assert[_And_Cut], Assume):
13165 Allow Loop_Entry to be used in these pragmas if they appear in
13166 an appropriate context.
13167 (Placement_Error): Specialize error
13168 message for pragma Assert[_And_Cut] or pragma Assume containing
13169 Loop_Entry attribute.
13170 * a-exexpr-gcc.adb, sinput.adb: Minor reformatting.
13171 * s-excmac-arm.ads, s-except.ads, s-excmac-gcc.ads: Minor reformatting
13172 and code clean ups.
13174 2014-01-20 Robert Dewar <dewar@adacore.com>
13176 * gnat1drv.adb: Minor comment update.
13178 2014-01-20 Tristan Gingold <gingold@adacore.com>
13180 * raise-gcc.c (PERSONALITY_FUNCTION/arm): Remove unused
13181 variables, comment out unused code.
13182 * a-exexpr-gcc.adb: Move declarations to s-excmac-gcc.ads
13183 * s-excmac-gcc.ads: New file, extracted from a-exexpr-gcc.adb
13184 * s-excmac-arm.ads: New file.
13186 2014-01-20 Hristian Kirtchev <kirtchev@adacore.com>
13188 * exp_ch4.adb (Expand_N_Slice): Remove constant D and variables
13189 Drange and Index_Typ. Remove the circuitry which creates a
13190 range check to compare the index type of the array against the
13192 * sem_res.adb (Resolve_Slice): Add local variable Dexpr. Update
13193 the circuitry which creates a range check to handle a
13194 discrete_range denoted by a subtype indication.
13196 2014-01-20 Pierre-Marie Derodat <derodat@adacore.com>
13198 * sinput.adb, sinput.ads (Sloc_Range): Traverse the tree of original
13199 nodes to get the original sloc range.
13201 2014-01-20 Hristian Kirtchev <kirtchev@adacore.com>
13203 * sem_prag.adb (Analyze_Pragma): Use Defining_Entity to obtain the
13204 entity of a [library level] package.
13206 2014-01-20 Tristan Gingold <gingold@adacore.com>
13208 * raise-gcc.c (exception_class_eq): New function.
13209 (is_handled_by): Use it to compare exception classes.
13210 (PERSONALITY_STORAGE): Define. (continue_unwind): New function to
13211 be called to return URC_CONTINUE_UNWIND.
13212 (personality_body): New function, extracted from PERSONALITY_ROUTINE.
13213 (PERSONALITY_ROUTINE): Add an implementation for the ARM unwinder.
13215 2014-01-20 Robert Dewar <dewar@adacore.com>
13217 * opt.ads: Minor comment update.
13219 2014-01-20 Hristian Kirtchev <kirtchev@adacore.com>
13221 * exp_ch4.adb (Expand_N_Slice): Relocate some variables and
13222 constants to the "Local variables" area. Add new constant D. Add
13223 new variables Drange and Index_Typ. Rename Pfx to Rep and Ptp
13224 to Pref_Typ and update all occurrences. Add circuitry to extract
13225 the discrete_range and the index type and build a range check.
13227 2014-01-20 Arnaud Charlet <charlet@adacore.com>
13229 * gnat1drv.adb (Adjust_Global_Switches): Enable
13230 Treat_Categorization_Errors_As_Warnings when Relaxed_RM_Semantics
13233 2014-01-20 Thomas Quinot <quinot@adacore.com>
13235 * sem_ch5.adb, sem_ch4.adb: Minor reformatting.
13237 2014-01-20 Hristian Kirtchev <kirtchev@adacore.com>
13239 * sem_ch13.adb (Analyze_Aspect_Specifications):
13240 When aspect SPARK_Mode appears on a package body, insert the
13241 generated pragma at the top of the body declarations.
13243 2014-01-20 Robert Dewar <dewar@adacore.com>
13245 * sem_aggr.adb, exp_prag.adb, sem_aux.adb, sinfo.ads, sem_ch10.adb,
13246 checks.adb, sem_prag.adb, sem_ch12.adb, freeze.adb, g-arrspl.adb,
13247 expander.adb, gnat1drv.adb, exp_ch4.adb, sem_ch6.adb,
13248 sem_ch8.adb, exp_dist.adb: Minor reformatting.
13250 2014-01-20 Yannick Moy <moy@adacore.com>
13252 * gnat1drv.adb (Gnat1drv): Call Write_ALI with Object=True in GNATprove
13255 2014-01-20 Pascal Obry <obry@adacore.com>
13257 * g-arrspl.ads (Slice_Set): New definition (will use a copy on
13259 * g-arrspl.adb: Adapt all routine to this new implementation.
13260 (Set): Copy the Slice_Set definition before reusing it.
13262 2014-01-20 Arnaud Charlet <charlet@adacore.com>
13264 * sem_prag.adb (Process_Import_Or_Interface): In
13265 Relaxed_RM_Semantics, support old Ada 83 style of pragma Import.
13266 (Analyze_Pragma): Ditto for pragma Export.
13267 * exp_prag.adb (Expand_Pragma_Import_Or_Interface): Handle old pragma
13270 2014-01-20 Hristian Kirtchev <kirtchev@adacore.com>
13272 * einfo.ads: E_Abstract_State is now part of the entities that
13273 can be overloaded. Update type Overloadable_Kind to reflect the
13274 inclusion of abstract states.
13275 * sem_ch6.adb (New_Overloaded_Entity): A function can now
13276 overload an abstract state.
13277 * sem_prag.adb (Analyze_Constituent): Handle the overloading
13278 of states by functions. Use Entity_Of to obtain the entity of
13279 a constituent. (Analyze_Global_Item): Handle the overloading of
13280 states by functions.
13281 (Analyze_Initialization_Item): Handle the
13282 overloading of states by functions. Use Entity_Of to obtain the
13284 (Analyze_Input_Item): Handle the overloading
13285 of states by functions. Use Entity_Of to obtain the entity of an item.
13286 (Analyze_Input_Output): Handle the overloading of states by functions.
13287 (Analyze_Refinement_Clause): Handle the overloading
13288 of states by functions. Use Entity_Of to obtain the entity of an item.
13289 (Appears_In): Use Entity_Of to obtain the entity of an element.
13290 (Check_Usage): Use Entity_Of to obtain the entity of
13291 an item. Add a guard to prevent a crash due to a previous error.
13292 (Resolve_State): New routine.
13294 2014-01-20 Yannick Moy <moy@adacore.com>
13296 * spark_xrefs.ads, debug.adb, gnat1drv.adb, errout.adb, errout.ads,
13297 opt.ads: Minor comments updates.
13299 2014-01-20 Hristian Kirtchev <kirtchev@adacore.com>
13301 * einfo.adb (Non_Limited_View): Applies to abstract states.
13302 (Set_From_Limited_With): Applies to abstract states.
13303 (Set_Non_Limited_View): Applies to abstract states.
13304 (Write_Field17): Output the non-limited view of an abstract state.
13305 * einfo.ads: Update the comment on usage and occurrences in
13306 nodes for attributes From_Limited_With and Non_Limited_View.
13307 * sem_aux.adb (Available_View): This routine can now handle
13309 * sem_aux.ads (Available_View): This routine can now handle
13310 abstract states. Update the comment on usage.
13311 * sem_ch8.adb (Find_Expanded_Name): Handle abstract views
13312 of states and variables.
13313 (In_Pragmas_Depends_Or_Global): New routine.
13314 * sem_ch10.adb (Build_Limited_Views): Implement
13315 abstract (limited) views of variables and states.
13316 (Build_Shadow_Entity): This routine is now a procedure. Add
13317 formal parameter Shadow. Update the comment on usage. Add
13318 context-specific decoration for states and variables.
13319 (Decorate_State): New routine. (Decorate_Variable): New routine.
13320 (Find_And_Process_States): New routine.
13321 (Process_Declarations): Renamed to Process_Declarations_And_States.
13322 (Process_Declarations_And_States): Add formal parameters
13323 Pack and Create_Abstract_Views. Update the comment on usage.
13324 (Process_States): New routine.
13325 * sem_prag.adb (Check_Dependency_Clause): Handle abstract
13326 views of states and variables. Match the abstract view of a state
13327 against its corresponding non-abstract view.
13328 (Is_Matching_Input):
13329 Handle abstract views of states and variables. Match the abstract
13330 view of a state against its corresponding non-abstract view.
13331 (Process_Global_Item): Handle abstract views of states and
13334 2014-01-20 Bob Duff <duff@adacore.com>
13336 * sem_ch10.adb (Expand_With_Clause): Don't
13337 recurse on the prefix if the current with-ed name refers to a
13338 package that renames its own parent, eg "package P.Q renames P;".
13340 2014-01-20 Yannick Moy <moy@adacore.com>
13342 * exp_spark.adb (Expand_SPARK_Call): Remove procedure.
13343 * opt.adb, opt.ads (Full_Expander_Active): Remove function.
13344 * checks.adb, exp_ch6.adb, exp_ch9.adb, exp_disp.adb, sem_aggr.adb,
13345 * sem_ch10.adb, sem_ch5.adb, sem_ch6.adb, sem_ch8.adb, sem_ch9.adb,
13346 * sem_disp.adb, sem_res.adb Replace Full_Expander_Active by
13349 2014-01-20 Yannick Moy <moy@adacore.com>
13351 * sinfo.ads Update documentation of GNATprove mode.
13353 2014-01-20 Yannick Moy <moy@adacore.com>
13355 * adabkend.adb, ali-util.adb, errout.adb, exp_ch7.adb,
13356 * exp_dbug.adb, freeze.adb, lib-xref.adb, restrict.adb,
13357 * sem_attr.adb, sem_ch4.adb, sem_ch5.adb, sem_ch6.adb, sem_ch8.adb,
13358 * sem_prag.adb, sem_res.adb, sem_util.adb Rename SPARK_Mode into
13360 * sem_ch13.adb: Remove blank.
13361 * exp_spark.adb, exp_spark.ads (Expand_SPARK_Call): Only replace
13362 subprograms by alias for renamings, not for inherited primitive
13364 * exp_util.adb (Expand_Subtype_From_Expr): Apply the expansion
13366 (Remove_Side_Effects): Apply the removal in
13367 GNATprove mode, for the full analysis of expressions.
13368 * expander.adb (Expand): Call the light SPARK expansion in GNATprove
13370 (Expander_Mode_Restore, Expander_Mode_Save_And_Set): Ignore
13371 save/restore actions for Expander_Active flag in GNATprove mode,
13372 similar to what is done in ASIS mode.
13373 * frontend.adb (Frontend): Generic bodies are instantiated in
13375 * gnat1drv.adb (Adjust_Global_Switches): Set operating
13376 mode to Check_Semantics in GNATprove mode, although a light
13377 expansion is still performed.
13378 (Gnat1drv): Set Back_End_Mode to
13379 Declarations_Only in GNATprove mode, and later on special case
13380 the GNATprove mode to continue analysis anyway.
13381 * lib-writ.adb (Write_ALI): Always generate ALI files in
13383 * opt.adb, opt.ads (Full_Expander_Active): Make it equivalent to
13385 (SPARK_Mode): Renamed as GNATprove_Mode.
13386 * sem_aggr.adb (Aggregate_Constraint_Checks): Add checks in the
13387 tree in GNATprove_Mode.
13388 * sem_ch12.adb (Analyze_Package_Instantiation): Always instantiate
13389 body in GNATprove mode.
13390 (Need_Subprogram_Instance_Body): Always instantiate body in GNATprove
13392 * sem_ch3.adb (Constrain_Index, Process_Range_Expr_In_Decl):
13393 Make sure side effects are removed in GNATprove mode.
13395 2014-01-20 Eric Botcazou <ebotcazou@adacore.com>
13397 * gcc-interface/decl.c (gnat_to_gnu_entity) <object>: Robustify tests
13398 for aliased objects with an unconstrained nominal subtype.
13399 * gcc-interface/trans.c (Call_to_gnu): Likewise.
13400 (gnat_to_gnu) <case N_Op_Not>: Robustify test for private type.
13401 <case N_Op_Minus>: Remove useless code.
13402 (Exception_Handler_to_gnu_zcx): Minor tweaks.
13404 2014-01-20 Eric Botcazou <ebotcazou@adacore.com>
13406 * gcc-interface/decl.c (gnat_to_gnu_entity) <case E_Record_Subtype>:
13407 Tidy up. For a subtype with discriminants and variant part, if a
13408 variant is statically selected and the fields all have a constant
13409 position, put them in order of increasing position. Likewise if
13410 no variant part but representation clause is present.
13411 * gcc-interface/utils.c (make_packable_type): Robustify.
13412 (maybe_pad_type): Use local variable and tidy up condition. If no
13413 alignment is specified, use the original one.
13414 (create_type_stub_decl): Minor tweak.
13415 (convert) <case VECTOR_CST>: Fix typo.
13416 <case CONSTRUCTOR>: Deal with padding types around the same type.
13417 Do not punt on missing fields.
13418 (unchecked_convert): Call finish_record_type to lay out the special
13419 record types made for conversions from/to problematic integer types.
13420 Bump the alignment of CONSTRUCTORs before converting them to a more
13423 2014-01-20 Eric Botcazou <ebotcazou@adacore.com>
13425 * gcc-interface/decl.c (gnat_to_gnu_entity) <case E_Component>: Remove
13426 obsolete code for type_annotate_only mode, simplify code and slightly
13427 improve wording of comments.
13429 2014-01-12 Eric Botcazou <ebotcazou@adacore.com>
13432 * gcc-interface/cuintp.c (build_cst_from_int): Use 32-bit integer type
13433 as intermediate type.
13434 (UI_To_gnu): Likewise.
13436 2014-01-03 Eric Botcazou <ebotcazou@adacore.com>
13438 * gnatvsn.ads (Current_Year): Bump to 2014.
13440 2014-01-02 Tobias Burnus <burnus@net-b.de>
13442 * gnat_ugn.texi: Bump @copying's copyright year.
13444 Copyright (C) 2014 Free Software Foundation, Inc.
13446 Copying and distribution of this file, with or without modification,
13447 are permitted in any medium without royalty provided the copyright
13448 notice and this notice are preserved.