1 2011-08-04 Eric Botcazou <ebotcazou@adacore.com>
3 * bindgen.adb (Gen_Finalize_Library_Ada): Factor out code to generate
4 the header of the finalization routine.
5 If the unit has no finalizer but is a body whose spec has one, then
6 generate the decrement of the elaboration entity only.
7 If the unit has a finalizer and is a spec, then do not generate the
8 decrement of the elaboration entity.
9 (Gen_Finalize_Library_C): Likewise.
11 2011-08-04 Hristian Kirtchev <kirtchev@adacore.com>
13 * exp_ch7.adb (Alignment_Of): New subsidiary routine.
14 (Bounds_Size_Expression): Removed.
15 (Double_Alignment_Of): New subsidiary routine.
16 (Make_Finalize_Address_Stmts): New local variable Index_Typ. Account
17 for a hole in the dope vector of unconstrained arrays due to different
18 index and element alignments.
20 2011-08-04 Ed Schonberg <schonberg@adacore.com>
22 * sem_res.adb (Resolve_Allocator): diagnose task allocator that will
23 raise program_error because body has not been seen yet.
25 2011-08-04 Ed Schonberg <schonberg@adacore.com>
27 * sem_ch10.adb (Analyze_With_Clause): Protect against child unit with
30 2011-08-04 Vincent Celier <celier@adacore.com>
32 * makeutl.adb (Do_Complete): Check absolute paths in canonical forms
34 2011-08-04 Yannick Moy <moy@adacore.com>
36 * alfa.adb, alfa.ads (Unique_Defining_Entity): move function from here
37 * sem_util.adb, sem_util.ads (Unique_Defining_Entity): ...to here
39 2011-08-04 Thomas Quinot <quinot@adacore.com>
41 * sem_ch12.adb (Analyze_Package_Instantiation): Do not omit body for
44 2011-08-04 Emmanuel Briot <briot@adacore.com>
46 * make.adb: Share more code with gprbuild
48 2011-08-04 Emmanuel Briot <briot@adacore.com>
50 * projects.texi: Added documentation for the IDE'Gnat project file
53 2011-08-04 Nicolas Roche <roche@adacore.com>
55 * gnat_rm.texi: Minor editing.
57 2011-08-04 Javier Miranda <miranda@adacore.com>
59 * bindgen.adb (Gen_Adafinal_Ada): Do not differentiate the main case
60 and the library case for VM targets.
61 (Gen_Adainit_Ada): Likewise.
63 2011-08-04 Robert Dewar <dewar@adacore.com>
65 * g-altive.ads: Minor comment updates.
66 * prj-nmsc.adb: Minor reformatting.
68 2011-08-04 Javier Miranda <miranda@adacore.com>
71 (Normalize_Scalars_Config): Value of the configuration switch set by
72 pragma Normalize_Scalars when it appears in the gnat.adc file.
73 (Normalize_Scalars): New field for record Config_Switches_Type. Used
74 to save and restore settings of this pragma.
76 (Register_Opt_Config_Switches, Save_Opt_Config_Switches,
77 Restore_Opt_Config_Switches): Add missing support for Normalize_Scalars.
79 2011-08-04 Vincent Celier <celier@adacore.com>
81 * gnat_ugn.texi: Document gnatlink options -M and -M=mapfile
83 2011-08-04 Arnaud Charlet <charlet@adacore.com>
85 * makeutl.adb: Minor reformatting.
87 2011-08-04 Olivier Hainque <hainque@adacore.com>
89 * g-altive.ads: Update comments to reflect that only the soft
90 binding is available today.
92 2011-08-04 Robert Dewar <dewar@adacore.com>
94 * bindgen.adb, einfo.adb, sem_ch12.adb, s-tasren.adb, sem_res.adb,
95 makeutl.adb, prj-nmsc.adb, opt.ads, prj-env.adb: Minor reformatting
96 * gcc-interface/Make-lang.in: Update dependencies.
98 2011-08-04 Arnaud Charlet <charlet@adacore.com>
100 * prj-env.adb: Remove local debug traces.
102 2011-08-04 Yannick Moy <moy@adacore.com>
104 * checks.adb (Apply_Float_Conversion_Check): correct a typo where Lo_OK
105 was used instead of Hi_OK, which could cause a read of an uninitialized
106 value later on. Detected while working on the new warning.
107 * exp_ch9.adb (Expand_N_Entry_Declaration): remove useless assignment
109 * sem_ch5.adb (Analyze_Assignment): set the last assignment component
110 in more cases, in order to detect more unreferenced values.
111 * sem_util.adb, sem_util.ads (Get_Enclosing_Object): return enclosing
112 object for expression, if any.
114 2011-08-04 Eric Botcazou <ebotcazou@adacore.com>
116 * exp_intr.adb (Expand_Binary_Operator_Call): Look at the RM size of
117 the operand types instead of the Esize.
119 2011-08-04 Steve Baird <baird@adacore.com>
121 * switch-b.adb (Scan_Binder_Switches): Add -P binder switch, used to
122 enable CodePeer_Mode.
123 * bindusg.adb (Display): Add help message describing -P binder switch.
124 * gnat_ugn.texi: Document -P binder switch.
125 * bindgen.adb (Gen_Main_Ada): If CodePeer_Mode is set, then call the
126 user-defined main program directly.
127 (Gen_Output_File_Ada): If CodePeer_Mode is set, generate a with of the
128 user-defined main program in the context clause of the package body.
130 2011-08-04 Yannick Moy <moy@adacore.com>
132 * alfa.adb, alfa.ads (Get_Entity_For_Decl): remove function, partial
133 duplicate of Defining_Entity
134 (Get_Unique_Entity_For_Decl): rename function into
135 Unique_Defining_Entity
136 * einfo.adb, einfo.ads (Is_In_ALFA, Body_Is_In_ALFA): remove flags
137 (Formal_Proof_On): remove synthesized flag
138 * cstand.adb, sem_ch11.adb, sem_ch2.adb, sem_ch3.adb, sem_ch4.adb,
139 sem_ch5.adb, sem_ch6.adb, sem_ch9.adb, sem_res.adb, sem_util.adb,
140 sem_util.ads, stand.ads: Remove treatment associated to entities in ALFA
141 * sem_prag.adb (Analyze_Pragma): remove special treatment for pragma
142 Annotate (Formal_Proof)
144 2011-08-04 Emmanuel Briot <briot@adacore.com>
146 * prj-env.adb (Create_Config_Pragmas_File): fix handling of multi-unit
147 source files with non-standard naming schemes, in imported projects
149 2011-08-04 Emmanuel Briot <briot@adacore.com>
151 * makeutl.adb (Complete_Mains): when a multi-unit source file is
152 specified on the gprbuild command line, we need to compile all units
153 within that file, not just the first one we find
154 Fix error message for mains that are not found.
156 2011-08-04 Thomas Quinot <quinot@adacore.com>
158 * sem_ch6.adb: Update comment.
159 * sem_ch12.adb: Minor reformatting.
161 2011-08-04 Bob Duff <duff@adacore.com>
163 * s-tasren.adb (Task_Do_Or_Queue): Previous code was reading
164 Acceptor.Terminate_Alternative without locking Acceptor, which causes a
165 race condition whose symptom is to fail to lock Parent. That, in turn,
166 causes Parent.Awake_Count to be accessed without locking Parent, which
167 causes another race condition whose symptom is that Parent.Awake_Count
168 can be off by 1 (either too high or too low). The solution is to lock
169 Parent unconditionally, and then lock Acceptor, before reading
170 Acceptor.Terminate_Alternative.
172 2011-08-04 Arnaud Charlet <charlet@adacore.com>
174 * debug.adb: Update comment.
176 2011-08-04 Robert Dewar <dewar@adacore.com>
178 * par_sco.adb, exp_util.adb, make.adb, a-tags.adb, sem_prag.adb,
179 sem_util.adb, sem_attr.adb, exp_ch4.adb, g-comlin.adb, g-comlin.ads,
180 exp_ch6.adb: Minor reformatting.
182 2011-08-04 Gary Dismukes <dismukes@adacore.com>
184 * gnat_ugn.texi: Add sentence about the case of compile-time-detected
187 2011-08-04 Ed Schonberg <schonberg@adacore.com>
189 * gnat_rm.texi: update Ravenscar desription to reflect Ada2012 RM.
191 2011-08-04 Thomas Quinot <quinot@adacore.com>
193 * sinfo.ads: Minor reformatting.
195 2011-08-04 Emmanuel Briot <briot@adacore.com>
197 * makeutl.adb, makeutl.ads, prj-nmsc.adb (Complete_Mains): report error
198 even if there is no location.
200 2011-08-04 Ed Schonberg <schonberg@adacore.com>
202 * sem_res.adb, sem_ch4.adb: move check for restriction
203 No_Task_Hierarchy to resolve_allocator.
205 2011-08-04 Thomas Quinot <quinot@adacore.com>
207 * sinfo.adb, sinfo.ads, sem_prag.adb, sem_ch12.adb (Pragma_Enabled):
208 This flag of N_Pragma nodes is not used, remove it as well as all of
209 the associated circuitry.
211 2011-08-04 Javier Miranda <miranda@adacore.com>
213 * exp_disp.adb (Make_DT): Switch -gnatdQ disables the generation of the
214 runtime check on duplicated externa tags
215 * debug.adb Document switch -gnatdQ.
217 2011-08-04 Gary Dismukes <dismukes@adacore.com>
219 * a-fihema.ads: Minor typo fix.
221 2011-08-04 Yannick Moy <moy@adacore.com>
223 * sem_ch10.adb: Minor comment update.
225 2011-08-04 Hristian Kirtchev <kirtchev@adacore.com>
227 * einfo.adb: Update the node field usage to reflect the renaming of
228 Return_Flag to Return_ Flag_Or_Transient_Decl.
229 (Return_Flag): Renamed to Return_Flag_Or_Transient_Decl.
230 (Set_Return_Flag): Renamed to Set_Return_Flag_Or_Transient_Decl.
231 (Write_Field15_Name): Change Return_Flag to
232 Return_Flag_Or_Transient_Decl.
233 * einfo.ads: Rename node field Return_Flag to
234 Return_Flag_Or_Transient_Decl. Update the associated comment and all
235 occurrences in entities.
236 (Return_Flag): Renamed to Return_Flag_Or_Transient_Decl. Update
237 associated Inline pragma.
238 (Set_Return_Flag): Renamed to Set_Return_Flag_Or_Transient_Decl. Update
239 associated Inline pragma.
240 * exp_ch4.ads, exp_ch4.adb (Expand_N_Expression_With_Actions): New
242 * exp_ch6.adb (Expand_N_Extended_Return_Statement): Update the calls to
243 Return_Flag and Set_Return_Flag.
244 * exp_ch7.adb (Process_Declarations): Add code to recognize hook
245 objects generated for controlled transients declared inside an
246 Exception_With_Actions. Update the calls to Return_Flag.
247 (Process_Object_Declaration): Add code to add a null guard for hook
248 objects generated for controlled transients declared inside an
249 Exception_With_Actions. Update related comment.
250 * exp_util.adb (Has_Controlled_Objects): Add code to recognize hook
251 objects generated for controlled transients declared inside an
252 Exception_With_Actions. Update the calls to Return_Flag.
253 * expander.adb (Expand): Add new case for N_Expression_With_Actions.
255 2011-08-04 Ed Schonberg <schonberg@adacore.com>
257 * sem_util.adb:(Wrong_Type): Improve error message on a one-element
258 positional aggregate.
260 2011-08-04 Vincent Celier <celier@adacore.com>
262 * par_sco.adb (Process_Decisions.Output_Header): Check and record pragma
263 SLOC only for pragmas.
265 2011-08-04 Emmanuel Briot <briot@adacore.com>
267 * projects.texi: Minor typo fix.
269 2011-08-04 Emmanuel Briot <briot@adacore.com>
271 * prj-nmsc.adb (Check_File): Minor change to traces, to help debugging
272 on case-sensitive file systems.
274 2011-08-04 Thomas Quinot <quinot@adacore.com>
276 * put_scos.adb (Put_SCOs): Do not emit decision SCO for an X decision
277 nested in a disabled pragma.
278 * scos.ads, scos.adb, par_sco.ads, par_sco.adb: Record sloc of
279 enclosing pragma, if any, for X decisions.
281 2011-08-04 Thomas Quinot <quinot@adacore.com>
283 * sem_prag.adb: Minor reformatting.
285 2011-08-04 Vincent Celier <celier@adacore.com>
287 * a-tags.adb (Check_TSD): Avoid concatenation of strings, as it is not
288 allowed in no run time mode.
290 2011-08-04 Vincent Celier <celier@adacore.com>
292 * make.adb (Check): When -gnatc is used, check for the source file
293 inside the ALI file with a canonical case file name.
295 2011-08-04 Emmanuel Briot <briot@adacore.com>
297 * g-comlin.adb, g-comlin.ads (Add_Switch): Put back support for
298 overriding the separator.
300 2011-08-04 Robert Dewar <dewar@adacore.com>
302 * sem_aggr.adb, par_sco.adb, sem_type.adb, exp_util.adb, exp_ch9.adb,
303 prj-nmsc.adb, sem_ch13.adb, exp_strm.adb: Minor reformatting.
305 2011-08-04 Robert Dewar <dewar@adacore.com>
307 * gnat_rm.texi: Minor documentation fix for pragma Annotate.
309 2011-08-04 Yannick Moy <moy@adacore.com>
311 * sem_attr.adb (Analyze_Attribute): add check during pre-analysis that
312 'Result only appears in postcondition of function.
314 2011-08-04 Thomas Quinot <quinot@adacore.com>
316 * a-tags.adb (Check_TSD): When raising PROGRAM_ERROR for a duplicated
317 external tag, include the value of the external tag in the exception
320 2011-08-04 Yannick Moy <moy@adacore.com>
322 * sem_attr.adb (Result): modify error message for misplaced 'Result
324 2011-08-04 Sergey Rybin <rybin@adacore.com>
326 * gnat_rm.texi (pragma Annotate): Fix syntax description to make it
327 clear that the second argument must be an identifier.
329 2011-08-04 Thomas Quinot <quinot@adacore.com>
331 * exp_ch9.adb (Build_Barrier_Function): When compiling with
332 -fpreserve-control-flow, insert an IF statement on the barrier
333 condition to ensure that a conditional branch instruction is generated.
335 2011-08-04 Emmanuel Briot <briot@adacore.com>
337 * prj-part.adb, prj.adb, prj.ads, prj-tree.ads
338 (Processing_Flags.Ignore_Missing_With): new flag.
340 2011-08-04 Emmanuel Briot <briot@adacore.com>
342 * prj-nmsc.adb (Find_Sources, Path_Name_Of): Fix handling of
343 Source_List_File on case-insensitive systems where the file is actually
344 on a case-sensitive file system (NFS,...).
346 2011-08-04 Hristian Kirtchev <kirtchev@adacore.com>
348 * sem_ch6.adb (Analyze_Function_Return): In a rare case where a
349 function return contains a controlled [extension] aggregate and the
350 return statement is not part of a handled sequence of statements, wrap
351 the return in a block. This ensures that all controlled temporaries
352 generated during aggregate resolution will be picked up by the
353 finalization machinery.
355 2011-08-04 Ed Schonberg <schonberg@adacore.com>
357 * sem_aggr.adb (Resolve_Aggregate): If aggregate has box-initialized
358 components, freeze type before resolution, to ensure that default
359 initializations are present for all components.
360 * sem_res.adb (Resolve_Actuals): the designated object of an
361 accces-to-constant type is a legal actual in a call to an
362 initialization procedure.
364 2011-08-04 Hristian Kirtchev <kirtchev@adacore.com>
366 * exp_util.adb (Extract_Renamed_Object): Add N_Type_Conversion and
367 N_Unchecked_Type_Conversion to the possible containers of a renamed
370 2011-08-04 Yannick Moy <moy@adacore.com>
372 * par-ch13.adb (Aspect_Specifications_Present): recognize
373 "with Identifier'Class =>" as an aspect, so that a meaningful warning
374 is issued in Strict mode.
375 * par.adb: Fix typos in comments.
377 2011-08-04 Yannick Moy <moy@adacore.com>
379 * sem_attr.adb (Result): modify error message to take into account Post
380 aspect when compiling Ada 2012 (or newer) code.
382 2011-08-04 Nicolas Roche <roche@adacore.com>
384 * env.c (__gnat_clearenv): Avoid use of dynamic size array in order to
385 remove need for GCC exceptions.
387 2011-08-04 Vincent Celier <celier@adacore.com>
389 * makeutl.adb (Do_Complete): Call Debug_Output with the name of the
390 project, not the source file name.
391 * prj.adb (Find_Sources.Look_For_Sources): If the source has been
392 excluded, continue looking. This excluded source will only be returned
393 if there is no other source with the same base name that is not locally
396 2011-08-04 Ed Schonberg <schonberg@adacore.com>
398 * sem_res.adb (Resolve_Intrinsic_Operator): if the result type is
399 private and one of the operands is a real literal, use a qualified
400 expression rather than a conversion which is not meaningful to the
403 2011-08-04 Yannick Moy <moy@adacore.com>
405 * sem_ch13.adb (Aspect_Loop): when an aspect X and its classwise
406 corresponding aspect X'Class are allowed, proceed with analysis of the
407 aspect instead of skipping it.
409 2011-08-04 Tristan Gingold <gingold@adacore.com>
411 * s-flocon.adb, s-flocon.ads: Add a body for s-flocon.ads
412 This will allow to have an Ada implementation for the subprogram.
414 2011-08-04 Ed Schonberg <schonberg@adacore.com>
416 * sem_ch3.adb (Analyze_Full_Type_Declaration): If the declaration is a
417 completion and aspects are present, apply them to the entity for the
418 type which is currently the partial view, but which is the one that
420 * sem_ch13.adb (Analyze_Aspect_Specifications): if the predicate
421 applies to a partial view, indicate that the full view has predicates
423 (Replace_Type_Reference): Handle properly predicates that apply to the
424 full view of a private completion.
426 2011-08-04 Eric Botcazou <ebotcazou@adacore.com>
428 * layout.adb (Layout_Type): For composite types, do not set Esize.
429 * freeze.adb (Set_Small_Size): Remove test on alignment and do not
431 (Size_Known): Look at the RM size of components instead of the Esize.
432 (Freeze_Record_Type): Look at the RM size instead of the Esize to
433 issue warning and activate Implicit_Packing.
434 (Freeze_Entity): Likewise. Do not issue a warning for alias/atomic
435 if the Esize is not known.
436 * sem_ch13.adb (Analyze_Attribute_Definition_Clause) <Size>: Set Esize
437 for elementary types only.
438 (Analyze_Record_Representation_Clause): Look at the RM size instead
439 of the Esize to issue errors.
440 * gcc-interface/decl.c (gnat_to_gnu_entity): Do not set Esize if it
442 <E_Record_Type>: Look at the RM size instead of the Esize. Remove
444 Look at the RM size instead of the Esize for types if the latter is
446 (gnat_to_gnu_field): Use Known_Esize instead of Known_Static_Esize.
448 2011-08-04 Ed Schonberg <schonberg@adacore.com>
450 * sem_type.adb: proper handling of equality not involving anonymous
453 2011-08-04 Hristian Kirtchev <kirtchev@adacore.com>
455 * exp_ch7.adb (Create_Finalizer): Remove local variables Spec_Nod and
456 Vis_Decls. When creating a library-level finalizer for a package spec,
457 both the declaration and body of the finalizer are inserted either in
458 the visible or private declarations of the package spec.
460 2011-08-04 Javier Miranda <miranda@adacore.com>
462 * sem_ch3.adb (Derive_Subprograms): Complete assertion to request the
463 use of the full-view of a type when invoking Is_Ancestor.
464 * sem_type.adb (Is_Ancestor): For consistency, when the traversal of
465 the full-view of private parents is requested, then use also the
466 full-view of the parent of the first derivation.
468 2011-08-04 Tristan Gingold <gingold@adacore.com>
470 * s-taprop-vxworks.adb (Enter_Task): Use System.Float_Control.Reset
471 instead of the locally imported procedure.
472 * s-taprop-mingw.adb (Enter_Task): Ditto.
473 * s-valrea.adb (Scan_Real): Ditto.
474 * s-imgrea.adb (Set_Image_Real): Ditto.
475 * s-flocon.ads: Make the package pure.
477 2011-08-04 Thomas Quinot <quinot@adacore.com>
479 * sinfo.ads, sinfo.adb (Debug_Statement, Set_Debug_Statement): Remove.
480 * tbuild.ads, tbuild.adb (Make_Pragma): Adjust accordingly.
481 * sinfo-cn.ads, sinfo-cn.adb (Change_Name_To_Procedure_Call_Statement):
482 New subprogram, moved here from...
483 * par.adb, par-ch5.adb (P_Statement_Name): ... here.
484 * par-prag.adb (Par.Prag, case Pragma_Debug): Do not perform any
485 rewriting of the last argument into a procedure call statement here...
486 * sem_prag.adb (Analyze_Pragma, case Pragma_Debug): ...do it there
489 2011-08-04 Thomas Quinot <quinot@adacore.com>
491 * par_sco.adb: Minor reformatting.
493 2011-08-04 Robert Dewar <dewar@adacore.com>
495 * erroutc.adb: Minor reformatting.
497 2011-08-04 Thomas Quinot <quinot@adacore.com>
499 * par_sco.adb: Comment update.
501 2011-08-04 Tristan Gingold <gingold@adacore.com>
503 * s-flocon.ads: New file.
504 * g-flocon.ads: Now a renaming of s-flocon.
505 * Makefile.rtl: Add s-flocon.o
507 2011-08-04 Javier Miranda <miranda@adacore.com>
509 * exp_strm.adb (Build_Array_Input_Function): if the array type is
510 constrained, do not attempt to build a subtype of it.
512 2011-08-04 Yannick Moy <moy@adacore.com>
514 * errout.ads Change comments: remove 'R'M as an example where quotes
515 are needed; add ALFA as another case where quotes are not needed
516 * erroutc.adb (Set_Msg_Insertion_Reserved_Word): add ALFA as another
517 case where quotes are not needed.
518 * sem_ch11.adb, sem_ch13.adb, sem_ch2.adb, sem_ch3.adb, sem_ch4.adb,
519 sem_ch5.adb, sem_ch6.adb, sem_ch9.adb, sem_prag.adb, sem_res.adb:
520 Remove all occurrences of 'A'L'F'A
522 2011-08-04 Ed Schonberg <schonberg@adacore.com>
524 * sem_ch13.adb: check legality of invariant pragma.
526 2011-08-04 Eric Botcazou <ebotcazou@adacore.com>
528 * bindgen.adb: Add comments.
530 2011-08-04 Yannick Moy <moy@adacore.com>
532 * einfo.adb, einfo.ads: Free Flag254 and make Formal_Proof_On a
534 * sem_prag.adb (Analyze_Pragma): record the pragma Annotate
535 (Formal_Proof, On/Off) in the Rep_Item list of the current subprogram.
537 2011-08-04 Robert Dewar <dewar@adacore.com>
539 * exp_ch7.adb, exp_ch6.adb, sem_ch3.adb, layout.adb, sem_ch5.adb,
540 osint-c.ads, sem_util.ads, gnat1drv.adb, targparm.ads, sem_ch6.adb,
541 sem_ch13.adb, s-pooloc.adb: Minor reformatting.
543 2011-08-04 Thomas Quinot <quinot@adacore.com>
545 * s-pooloc.ads, s-pooglo.ads: Minor reformatting
547 2011-08-04 Thomas Quinot <quinot@adacore.com>
550 * s-pooloc.adb (Deallocate): Fix the case of deallocating the only
553 2011-08-04 Robert Dewar <dewar@adacore.com>
555 * einfo.ads, exp_ch4.adb: Minor reformatting.
557 2011-08-04 Jerome Lambourg <lambourg@adacore.com>
559 * back_end.ads (Gen_Or_Update_Object_File): Add more comments.
561 2011-08-04 Ed Schonberg <schonberg@adacore.com>
563 * exp_ch4.adb (Expand_Composite_Equality): code cleanup: use component
564 type in all cases to compute list of primitive operations, because full
565 view may be an itype that is not attached to the list of declarations.
567 2011-08-04 Eric Botcazou <ebotcazou@adacore.com>
569 * bindgen.adb (Gen_Adafinal_Ada): Generate an early return if the
570 library has already been finalized.
571 (Gen_Adafinal_C): Likewise.
572 (Gen_Adainit_Ada): Generate an early return if the library has
573 already been elaborated.
574 (Gen_Adainit_C): Likewise.
575 (Gen_Output_File_Ada): Generate an elaboration flag.
576 (Gen_Output_File_C): Likewise.
578 2011-08-04 Hristian Kirtchev <kirtchev@adacore.com>
580 * exp_ch4.adb (Expand_Allocator_Expression): Disable the generation of
581 Set_Finalize_Address_Ptr for CodePeer because Finalize_Address was not
582 built in the first place.
583 (Expand_N_Allocator): Disable the generation of Set_Finalize_Address_Ptr
584 for CodePeer because Finalize_Address was not built to begin with.
585 * exp_ch6.adb (Make_Build_In_Place_Call_In_Allocator): Ditto.
587 2011-08-04 Pascal Obry <obry@adacore.com>
589 * adaint.c (__gnat_tmp_name): Use current process id to create temp
590 filenames, this ensures unicity of filenames across processes.
592 2011-08-04 Hristian Kirtchev <kirtchev@adacore.com>
594 * bindgen.adb (Gen_Finalize_Library_Ada): Rename generated routine
595 Raise_Controlled to Raise_From_Controlled_Operation. Update the
596 signature of Raise_From_Controlled_Operation by adding flag From_Abort.
597 Add False as the actual to From_Abort in the generated call to
598 Raise_From_Controlled_Operation.
600 2011-08-04 Jerome Lambourg <lambourg@adacore.com>
602 * osint-c.ads, osint-c.adb (Set_Library_Info_Name): Move to declaration
603 so that the ali file name can be retrieved from outside of this package.
604 * back_end.ads, back_end.adb (Gen_Or_Update_Object_File): New method
605 doing nothing in the general case, but used to update the object file
606 timestamp if directly generated by the backend.
607 * gnat1drv.adb (Gnat1drv): Make sure the object file's timestamp is set
608 to a later time than the ali file one.
610 2011-08-04 Yannick Moy <moy@adacore.com>
612 * einfo.adb, einfo.ads (Formal_Proof_On): new flag set on subprogram
613 entities whose body contains an Annotate pragma which forces formal
615 * sem_ch11.adb, sem_ch2.adb, sem_ch3.adb, sem_ch4.adb, sem_ch5.adb,
616 sem_ch6.adb, sem_ch9.adb, sem_res.adb: Adapt call to
617 Mark_Non_ALFA_Subprogram to pass in a message and node.
618 * sem_prag.adb (Analyze_Pragma): add treatment of pragma Annotate
619 (Forma_Proof, On) which sets the flag Formal_Proof_On in the
620 surrounding subprogram.
621 * sem_util.adb, sem_util.ads (Mark_Non_ALFA_Subprogram,
622 Mark_Non_ALFA_Subprogram_Unconditional): if the subprogram being marked
623 as not in ALFA is annotated with Formal_Proof being On, then an error
624 is issued based on the additional parameters for message and node.
625 * snames.ads-tmpl (Name_Formal_Proof): new name for annotation.
626 * gcc-interface/Make-lang.in: Update dependencies.
628 2011-08-04 Hristian Kirtchev <kirtchev@adacore.com>
630 * exp_ch3.adb (Expand_Freeze_Class_Wide_Type): Do not generate
631 Finalize_Address when CodePeer is enabled.
633 2011-08-04 Pascal Obry <obry@adacore.com>
635 * adaint.c (__gnat_tmp_name): Use _tempnam() instead of tempnam() as
636 the latter returns a pointer to a static buffer which is deallocated
637 at the end of the routine.
639 2011-08-04 Yannick Moy <moy@adacore.com>
641 * sem_ch3.adb (Array_Type_Declaration): move test for type in ALFA
642 after index creation; mark unconstrained base array type generated as
643 being in/not in ALFA as well
644 (Make_Index): mark subtype created as in/not in ALFA
645 * sem_ch5.adb (Analyze_Iteration_Scheme): mark entity for iterating
646 over a loop as in/not in ALFA, depending on its type and form of loop
649 2011-08-04 Hristian Kirtchev <kirtchev@adacore.com>
651 * exp_ch7.adb (Build_Object_Declarations): Initialize flag Abort
652 directly to False on .NET and JVM.
654 2011-08-04 Yannick Moy <moy@adacore.com>
656 * sem_ch3.adb (Constrain_Enumeration, Constrain_Integer): remove
657 constraint that subtype must come from source code to be in ALFA, so
658 that anonymous subtypes can be in ALFA too.
660 2011-08-04 Yannick Moy <moy@adacore.com>
662 * sem_ch3.adb (Analyze_Object_Declaration): remove obsolete addition of
663 reference for ALFA mode.
664 * lib-xref-alfa.adb, lib-xref.ads (Traverse_Compilation_Unit): make
665 procedure public so as to use it from formal verification back-end.
667 2011-08-04 Jerome Lambourg <lambourg@adacore.com>
669 * g-comlin.adb (For_Each_Simple_Switch.Is_In_Config): Remove the
670 invalid checks of the Parameter, making Remove_Switch not working
673 2011-08-04 Arnaud Charlet <charlet@adacore.com>
675 * targparm.ads: Update header: no run-time exception is needed on this
678 2011-08-04 Vincent Celier <celier@adacore.com>
680 * a-fihema.adb: Use System.IO instead of GNAT.IO
682 2011-08-04 Thomas Quinot <quinot@adacore.com>
684 * sem_ch3.adb (Access_Definition): Anonymous access to subprogram types
685 are forbidden in Compiler_Unit mode.
687 2011-08-04 Robert Dewar <dewar@adacore.com>
689 * sem_util.adb: Minor reformatting.
691 2011-08-04 Hristian Kirtchev <kirtchev@adacore.com>
693 * bindgen.adb (Gen_Finalize_Library_Ada): Update the import string for
694 library-level finalizers.
695 (Gen_Finalize_Library_C): Update the import string for library-level
697 (Gen_Finalize_Library_Defs_C): Update the definition name of a
698 library-level finalizer.
699 * exp_ch7.adb: Remove with and use clauses for Stringt.
700 (Create_Finalizer): Remove local variables Conv_Name, Prag_Decl,
701 Spec_Decl. Add local variable Body_Id. The names of library-level
702 finalizers are now manually fully qualified and are no longer external.
703 A single name is now capable of servicing .NET, JVM and non-VM targets.
704 Pragma Export is no longer required to provide visibility for the name.
705 (Create_Finalizer_String): Removed.
706 (New_Finalizer_Name): New routine which mimics New_..._Name.
708 2011-08-04 Eric Botcazou <ebotcazou@adacore.com>
710 * sem_elab.adb (Check_Internal_Call_Continue): Change the type of the
711 elaboration counter to Standard_Short_Integer.
712 * sem_util.adb (Build_Elaboration_Entity): Likewise.
713 * bindgen.adb (Gen_Elab_Externals_Ada): Adjust to above change.
714 (Gen_Elab_Externals_C): Likewise.
716 2011-08-04 Ed Falis <falis@adacore.com>
718 * system-vxworks-arm.ads, system-vxworks-sparcv9.ads,
719 system-vxworks-ppc.ads, system-vxworks-m68k.ads,
720 system-vxworks-mips.ads, system-vxworks-x86.ads
721 (Always_Compatible_Rep): set to False for all VxWorks targets.
723 2011-08-04 Robert Dewar <dewar@adacore.com>
725 * par_sco.adb, prj-proc.adb, make.adb, bindgen.adb, prj.adb, prj.ads,
726 makeutl.adb, makeutl.ads, prj-nmsc.adb, exp_ch5.adb, exp_ch12.adb,
727 exp_ch7.ads, exp_util.ads, sem_util.ads, g-comlin.ads, exp_ch6.adb,
728 exp_ch6.ads, lib-xref.ads, exp_ch7.adb, exp_util.adb, exp_dist.adb,
729 exp_strm.adb, gnatcmd.adb, freeze.adb, g-comlin.adb, lib-xref-alfa.adb,
730 sem_attr.adb, sem_prag.adb, sem_util.adb, sem_elab.adb, sem_ch8.adb,
731 sem_ch11.adb, sem_eval.adb, sem_ch13.adb, sem_disp.adb, a-fihema.adb:
732 Minor reformatting and code reorganization.
734 2011-08-04 Emmanuel Briot <briot@adacore.com>
736 * projects.texi: Added doc for aggregate projects.
738 2011-08-04 Emmanuel Briot <briot@adacore.com>
740 * prj-proc.adb, prj-nmsc.adb, prj-env.adb (Process_Declarative_Items):
741 Add support for overriding the Project_Path in aggregate projects.
743 2011-08-04 Robert Dewar <dewar@adacore.com>
745 * a-cofove.ads: Minor reformatting.
747 2011-08-04 Hristian Kirtchev <kirtchev@adacore.com>
749 * exp_ch7.adb (Build_Adjust_Or_Finalize_Statements): Update the comment
750 on the generated code.
751 (Build_Finalize_Statements): Update the comment on the generated code.
752 (Build_Initialize_Statements): Update the comment on the generated code.
753 (Build_Object_Declarations): Add local variable Result. The object
754 declarations are now built in sequence.
755 * rtsfind.ads: Add RE_Exception_Occurrence_Access to tables RE_Id and
758 2011-08-04 Robert Dewar <dewar@adacore.com>
760 * checks.adb, alfa.adb, alfa.ads: Minor reformatting.
762 2011-08-04 Eric Botcazou <ebotcazou@adacore.com>
764 * einfo.ads (Elaboration_Entity): Document new definition and use.
765 (Elaboration_Entity_Required): Adjust to above change.
766 * exp_attr.adb (Expand_N_Attribute_Reference): Likewise.
767 * exp_ch12.adb: And with and use for Snames.
768 (Expand_N_Generic_Instantiation): Test 'Elaborated attribute.
769 * exp_util.adb (Set_Elaboration_Flag): Likewise.
770 * sem_attr.adb (Analyze_Attribute) <Check_Library_Unit>: Delete.
771 <Check_Unit_Name>: Deal with N_Expanded_Name.
772 <Attribute_Elaborated>: Extend to all unit names.
773 * sem_elab.adb: And with and use for Uintp.
774 (Check_Internal_Call_Continue): Adjust to Elaboration_Entity change.
775 * sem_util.ads (Build_Elaboration_Entity): Adjust comment.
776 * sem_util.adb (Build_Elaboration_Entity): Change type to Integer.
777 * bindgen.adb (Gen_Elab_Externals_Ada): New local subprogram taken
778 from Gen_Adainit_Ada.
779 (Gen_Elab_Externals_C): Likewise, but taken from Gen_Adainit_C.
780 (Gen_Adafinal_Ada): Remove redundant test. In the non-main program
781 case, do not call System.Standard_Library.Adafinal; instead call
782 finalize_library if needed.
783 (Gen_Adafinal_C): Likewise.
784 (Gen_Adainit_Ada): Do not set SSL.Finalize_Library_Objects in the
785 non-main program case.
786 (Gen_Adainit_C): Generate a couple of external declarations here.
787 In the main program case, set SSL.Finalize_Library_Objects.
788 (Gen_Elab_Calls_Ada): Adjust to Elaboration_Entity change.
789 (Gen_Elab_Calls_C): Likewise.
790 (Gen_Finalize_Library_Ada): Likewise. Skip SAL interface units.
791 (Gen_Finalize_Library_C): Likewise. Generate a full function.
792 (Gen_Main_C): Put back call to Ada_Final and don't finalize library
794 (Gen_Output_File_Ada): Generate pragma Linker_Destructor for Ada_Final
795 if -a is specified. Call Gen_Elab_Externals_Ada. Move around call to
797 (Gen_Output_File_C): Generate __attribute__((destructor)) for Ada_Final
798 if -a is specified. Call Gen_Elab_Externals_C. Remove useless couple
799 of external declarations. Â Call Gen_Finalize_Library_C.
801 2011-08-04 Emmanuel Briot <briot@adacore.com>
803 * prj.adb, prj.ads, makeutl.adb, makeutl.ads (Complete_Mains,
804 Compute_Compilation_Phases): new subprogram.
805 (Builder_Data, Builder_Project_Tree_Data): new subprogram and type
806 The number of mains as well as the various compilation phases that
807 need to be run are now project tree specific, since various
808 aggregated trees might have different requirements. In particular,
809 they do not all require bind or link phases.
811 2011-08-04 Emmanuel Briot <briot@adacore.com>
813 * prj.adb, prj.ads, makeutl.adb, makeutl.ads, prj-env.adb
814 (Project_Tree_Appdata): New type.
815 It is now possible to associate application-specific data to a project
816 tree. In particular, this is used in the gprbuild builder to avoid a
817 number of global tables and htables, especially now that there can be
818 several project trees loaded at once because of aggregate projects.
819 (Debug_Name): new procedure.
820 * projects.texi: Clarify syntax of "**" for Source_Dirs
822 2011-08-03 Emmanuel Briot <briot@adacore.com>
824 * prj.ads, makeutl.adb, makeutl.ads (Queue.Insert): now also inserts
825 the "roots" for a main.
826 (Fill_From_Project): add support for aggregate projects. Main units
827 in aggregated projects are now automatically added in the list of
828 files to build (although this fails later on in gprbuild, because
829 these files are not using the root proejct tree, so this needs
831 * gcc-interface/Make-lang.in: Update dependencies.
833 2011-08-03 Yannick Moy <moy@adacore.com>
835 * sem_ch4.adb (Analyze_Conditional_Expression): only allow boolean
836 conditional expression in ALFA.
837 * sem_res.adb (Resolve_Conditional_Expression): mark non-boolean
838 expressions as not in ALFA.
840 2011-08-03 Robert Dewar <dewar@adacore.com>
842 * a-cofove.adb: Minor reformatting.
844 2011-08-03 Emmanuel Briot <briot@adacore.com>
846 * make.adb, prj.adb, prj.ads, makeutl.adb, makeutl.ads
847 (Insert_Project_Sources, Insert_withed_Sources_For): moved from the
849 These packages are more logically placed in the Queue package, since
850 they manipulate the queue. It is also likely that they can be adapted
851 for gnatmake, thus sharing more code.
852 (Finish_Program, Fail_Program): moved from the gprbuild sources, so
853 that we could move the above.
855 2011-08-03 Emmanuel Briot <briot@adacore.com>
857 * errutil.adb (Finalize): clean up the list of error messages on exit.
858 Calling this subprogram multiple times will no longer show duplicate
859 error messages on stderr.
861 2011-08-03 Emmanuel Briot <briot@adacore.com>
863 * g-comlin.adb, g-comlin.ads (Set_Command_Line): ignore the parameter
864 Getopt_Switches when we have already define a command line
867 2011-08-03 Yannick Moy <moy@adacore.com>
869 * sem_ch11.adb (Analyze_Raise_xxx_Error): do not mark such nodes as not
870 in ALFA. Instead, they are considered as assertions to prove.
871 * sem_ch4.adb (Analyze_Conditional_Expression): do not always mark such
872 nodes as not in ALFA. Instead, include conditional expressions in ALFA
873 if they have no ELSE part, or if they occur in pre- and postconditions,
874 where the Condition cannot have side-effects in ALFA
875 (Analyze_Membership_Op): do not mark such nodes as not in ALFA
876 (Analyze_Type_Conversion): do not always mark such nodes as not in ALFA.
877 Instead, include type conversion between scalar types in ALFA.
878 * sem_ch6.adb (Process_Formals): correctly mark a parameter in ALFA
879 if-and-only-if its type is in ALFA.
881 2011-08-03 Thomas Quinot <quinot@adacore.com>
883 * scos.adb, get_scos.adb, put_scos.adb
884 New code letter for decisions: G (entry guard)
886 (Traverse_Subprogram_Body): Rename to...
887 (Traverse_Subprogram_Or_Task_Body): New subrpogram.
888 (Traverse_Protected_Body): New subprogram
889 (Traverse_Declarations_Or_Statements): Add traversal of task bodies,
890 protected bodies and entry bodies.
892 2011-08-03 Yannick Moy <moy@adacore.com>
894 * einfo.adb, einfo.ads (Is_Postcondition_Proc): new flag for procedure
895 entities with get/set subprograms, which is set on procedure entities
896 generated by the compiler for a postcondition.
897 * sem_ch6.adb (Process_PPCs): set new flag on postcondition procedures
898 * alfa.adb, alfa.ads (Get_Entity_For_Decl): new function returning the
899 entity for a declaration
900 (Get_Unique_Entity_For_Decl): new function returning an entity which
901 represents a declaration, so that matching spec and body have the same
904 2011-08-03 Robert Dewar <dewar@adacore.com>
906 * a-except-2005.adb, a-cfhama.adb, a-cfhase.adb, a-cfhase.ads,
907 a-cforma.adb, a-cforse.ads, a-cforse.adb: Minor reformatting
909 2011-08-03 Yannick Moy <moy@adacore.com>
911 * lib-xref-alfa.adb (Detect_And_Add_ALFA_Scope): make the subprogram
912 library-level because retriction No_Implicit_Dynamic_Code in the
913 front-end prevents its definition as a local subprogram
914 (Traverse_Compilation_Unit): extract new procedure from Add_ALFA_File,
915 for reuse in other contexts
916 (Traverse_Declarations_Or_Statements,
917 Traverse_Handled_Statement_Sequence, Traverse_Package_Body,
918 Traverse_Package_Declaration, Traverse_Subprogram_Body): make all these
919 procedures take a callback parameter to be called on all declarations
921 (Traverse_All_Compilation_Units): new generic function to traverse a
922 compilation unit and call a callback parameter on all declarations
924 2011-08-03 Javier Miranda <miranda@adacore.com>
926 * sem_prag.adb (Process_Interface_Name): Allow duplicated export names
927 in Java since they are always enclosed in a namespace that
928 differentiates them, and overloaded entities are supported by the VM.
930 2011-08-03 Ed Schonberg <schonberg@adacore.com>
932 * checks.adb (Determine_Range): If a computed bound of an operation is
933 outside the range of the base type of the expression, and overflow
934 checks are enabled, the result is unknown and cannot be used for any
935 subsequent constant folding.
936 * sem_eval.adb (Compile_Time_Compare): if the bounds of one operand are
937 unknown, so is the result of the comparison.
939 2011-08-03 Hristian Kirtchev <kirtchev@adacore.com>
941 * a-except-2005.adb (Raise_From_Controlled_Operation): Add new formal
942 From_Abort. When finalization was triggered by an abort, propagate
943 Standard'Abort_Signal rather than Program_Error.
944 * a-except-2005.ads (Raise_From_Controlled_Operation): Add new formal
946 * a-except.adb (Raise_From_Controlled_Operation): Add new formal
947 From_Abort. When finalization was triggered by an abort, propagate
948 Standard'Abort_Signal rather than Program_Error.
949 * a-except.ads:(Raise_From_Controlled_Operation): Add new formal
951 * exp_ch7.adb:(Build_Adjust_Or_Finalize_Statements): New local variable
952 Abort_Id. Update the calls to Build_Object_Declarations and
953 Build_Raise_Statement to include Abort_Id.
954 (Build_Adjust_Statements): New local variable Abort_Id. Update the
955 calls to Build_Object_Declarations and Build_Raise_Statement to include
957 (Build_Finalize_Statements): New local variable Abort_Id. Update the
958 calls to Build_Object_Declarations and Build_Raise_Statement to include
960 (Build_Components): Create an entity for Abort_Id when exceptions are
961 allowed on the target.
962 (Build_Finalizer): New local variable Abort_Id.
963 (Build_Initialize_Statements): New local variable Abort_Id. Update the
964 calls to Build_Object_Declarations and Build_Raise_Statement to include
966 (Build_Object_Declarations): Add new formal Abort_Id. Create the
967 declaration of flag Abort_Id to preserve the original abort status
968 before finalization code is executed.
969 (Build_Raise_Statement): Add new formal Abort_Id. Pass Abort_Id to
970 runtime routine Raise_From_Controlled_Operation.
971 (Create_Finalizer): Update the call to Build_Raise_Statement to include
972 Abort_Id. Update the call to Build_Object_Declarations to include
973 Abort_Id. Update the layout of the finalizer body.
974 (Make_Handler_For_Ctrl_Operation): Add an actual for From_Abort.
975 (Process_Transient_Objects): New local variable Abort_Id. Remove the
976 clunky code to create all flags and objects related to
977 exception propagation and replace it with a call to
978 Build_Object_Declarations. Update the call to Build_Raise_Statement to
980 * exp_ch7.ads (Build_Object_Declarations): Moved from body to spec.
981 Add new formal Abort_Id and associated comment on its use.
982 (Build_Raise_Statement): Add new formal Abort_Id and associated comment
984 * exp_intr.adb (Expand_Unc_Deallocation): New local variable Abort_Id.
985 Remove the clunky code to create all flags and objects related to
986 exception propagation and replace it with a call to
987 Build_Object_Declarations. Update the call to Build_Raise_Statement.
989 2011-08-03 Eric Botcazou <ebotcazou@adacore.com>
991 * s-tassta.adb: Fix minor typos.
993 2011-08-03 Robert Dewar <dewar@adacore.com>
995 * rtsfind.ads, makeutl.ads, prj.ads, prj.adb, make.adb,
996 lib-writ.adb, makeutl.adb, s-soflin.ads, clean.adb: Minor reformatting.
998 2011-08-03 Hristian Kirtchev <kirtchev@adacore.com>
1000 * exp_ch7.adb (Create_Finalizer): Treat freeze nodes in similar fashion
1001 to packages. This ensures that the finalizer body will not end up
1002 inside the freeze node.
1003 (Process_Declarations): Add code to detect whether a freeze node has a
1004 nested finalization collection.
1006 2011-08-03 Pascal Obry <obry@adacore.com>
1008 * g-awk.adb, g-awk.ads: Make GNAT.AWK API compatible with Ada 2005.
1009 (Current_Session): Return a not null access to Session_Type.
1010 (Default_Session): Likewise.
1012 2011-08-03 Robert Dewar <dewar@adacore.com>
1014 * a-cfdlli.adb, bindgen.adb, exp_ch4.adb, exp_ch13.adb, sem_warn.adb,
1015 exp_ch3.adb, exp_ch3.ads: Minor reformatting.
1017 2011-08-03 Pascal Obry <obry@adacore.com>
1019 * g-awk.ads: Minor comment fix.
1021 2011-08-03 Sergey Rybin <rybin@adacore.com>
1023 * tree_io.ads (ASIS_Version_Number): Update because of the changes in
1024 the tree structure related to discriminant constraints.
1025 Original_Discriminant cannot be used any more for computing the
1026 defining name for the reference to a discriminant.
1028 2011-08-03 Ed Schonberg <schonberg@adacore.com>
1030 * sem_disp.adb (Is_Tag_Indeterminate): If the return type of the
1031 function is not visibly tagged, this is not a dispatching call and
1032 therfore is not Tag_Indeterminate, even if the function is marked as
1033 dispatching on result.
1035 2011-08-03 Hristian Kirtchev <kirtchev@adacore.com>
1037 * exp_ch13.adb: Add with and use clauses for Restrict and Rident.
1038 (Expand_N_Free_Statement): Add a guard to protect against run-times
1039 which do not support controlled types.
1040 * exp_ch3.adb (Expand_Freeze_Class_Wide_Type): Add a guard to protect
1041 against run-times which do not support controlled types.
1042 * exp_ch4.adb (Complete_Controlled_Allocation): Add a guard to protect
1043 against run-times which do not support controlled types.
1044 * exp_ch7.adb (Build_Finalization_Collection): Add a guard to protect
1045 against run-times which do not support controlled types.
1046 * exp_util.adb (Needs_Finalization): Code reformatting. Add a guard to
1047 protect against run-times which do not support controlled types.
1049 2011-08-03 Eric Botcazou <ebotcazou@adacore.com>
1051 * exp_intr.adb: Put back with and use clauses for Exp_Ch11.
1052 (Expand_Unc_Deallocation): Expand the AT_END handler at the very end.
1054 2011-08-03 Ed Schonberg <schonberg@adacore.com>
1056 * exp_ch5.adb (Expand_Iterator_Loop): indicate that the cursor is
1057 modified in the source, to prevent spurious warnings when compiling
1060 2011-08-03 Thomas Quinot <quinot@adacore.com>
1062 * a-except-2005.adb: Minor reformatting.
1064 2011-08-03 Ed Schonberg <schonberg@adacore.com>
1066 * sem_warn.adb (Check_One_Unit): if the only mention of a withed unit
1067 is a renaming declaration in the private part of a package, do not emit
1068 a warning that the with_clause could be moved because the renaming may
1069 be used in the body or in a child unit.
1071 2011-08-03 Hristian Kirtchev <kirtchev@adacore.com>
1073 * exp_ch6.adb (Make_Build_In_Place_Call_In_Object_Declaration):
1074 Propagate the Comes_From_Source attribute from the original return
1075 object to the renaming.
1077 2011-08-03 Jose Ruiz <ruiz@adacore.com>
1079 * exp_ch7.adb (Build_Raise_Statement): Do not call
1080 Raise_From_Controlled_Operation when this routine is not present in
1081 the run-time library.
1082 (Cleanup_Protected_Object, Cleanup_Task): For restricted run-time
1083 libraries (Ravenscar), tasks are non-terminating, and protected objects
1084 and tasks can only appear at library level, so we do not want
1085 finalization of protected objects nor tasks.
1086 * exp_intr.adb: Minor clarification in comment.
1087 bindgen.adb (Gen_Adainit_Ada, Gen_Main_C, Gen_Output_File_Ada,
1088 Gen_Output_File_C): Remove references to finalization of library-level
1089 objects when using restricted run-time libraries.
1091 2011-08-03 Ed Schonberg <schonberg@adacore.com>
1093 * sem_ch3.adb (Build_Discriminant_Constraints): Set
1094 Original_Discriminant only if the parent type is a generic formal.
1096 2011-08-03 Hristian Kirtchev <kirtchev@adacore.com>
1098 * exp_ch13.adb: Add with and use clause for Targparm;
1099 (Expand_N_Free_Statement): Prevent the generation of a custom
1100 Deallocate on .NET/JVM targets since this requires pools and address
1102 * exp_ch4.adb (Expand_Allocator_Expression): When compiling for
1103 .NET/JVM targets, attach the newly allocated object to the access
1104 type's finalization collection. Do not generate a call to
1105 Set_Finalize_Address_Ptr on .NET/JVM because this routine does not
1106 exist in the runtime.
1107 (Expand_N_Allocator): When compiling for .NET/JVM targets, do not
1108 create a custom Allocate for object that do not require initialization.
1109 Attach a newly allocated object to the access type's finalization
1110 collection on .NET/JVM.
1111 * exp_ch5.adb (Make_Tag_Ctrl_Assignment): Add special processing for
1112 assignment of controlled types on .NET/JVM. The two hidden pointers
1113 Prev and Next and stored and later restored after the assignment takes
1115 * exp_ch6.adb (Expand_Call): Add local constant Curr_S. Add specialized
1116 kludge for .NET/JVM to recognize a particular piece of code coming from
1117 Heap_Management and change the call to Finalize into Deep_Finalize.
1118 * exp_ch7.adb (Build_Finalization_Collection): Allow the creation of
1119 finalization collections on .NET/JVM only for types derived from
1120 Controlled. Separate the association of storage pools with a collection
1121 and only allow it on non-.NET/JVM targets.
1122 (Make_Attach_Call): New routine.
1123 (Make_Detach_Call): New routine.
1124 (Process_Object_Declarations): Suppress the generation of
1125 build-in-place return object clean up code on .NET/JVM since it uses
1127 * exp_ch7.ads (Make_Attach_Call): New routine.
1128 (Make_Detach_Call): New routine.
1129 * exp_intr.adb Add with and use clause for Targparm.
1130 (Expand_Unc_Deallocation): Detach a controlled object from a collection
1131 on .NET/JVM targets.
1132 * rtsfind.ads: Add entries RE_Attach, RE_Detach and
1133 RE_Root_Controlled_Ptr to tables RE_Id and RE_Unit_Table.
1134 * snames.ads-tmpl: Add name Name_Prev. Move Name_Prev to the special
1135 names used in finalization.
1137 2011-08-03 Hristian Kirtchev <kirtchev@adacore.com>
1139 * a-fihema.adb: Add with and use clauses for System.Soft_Links.
1140 (Attach, Detach): Lock the current task when chaining an object onto a
1143 2011-08-03 Hristian Kirtchev <kirtchev@adacore.com>
1145 * a-except.adb, a-except-2005.adb (Raise_From_Controlled_Operation):
1146 Rewritten to create the message strings when the exception is not
1147 raised by an abort during finalization.
1148 * a-except.ads, a-except-2005.ads: Add pragma Export for procedure
1149 Raise_From_Controlled_Operation and update its associated comment.
1150 * a-fihema.ads, a-fihema.adb: New GNAT unit.
1151 Ada.Finalization.Heap_Management provides key functionality
1152 associated with controlled objects on the heap, their creation,
1153 finalization and reclamation. Type Finalization_Collection is
1154 effectively a wrapper which sits ontop of a storage pool and performs
1155 all necessary bookkeeping for all the objects it contains. Each
1156 access-to-controlled or access-to-class-wide type receives a collection
1157 as part of its expansion. The compiler generates buffer code and
1158 invokes Allocate / Deallocate to create and destroy allocated
1160 * a-finali.adb ("="): Removed.
1161 * a-finali.ads ("="): Removed. Controlled types no longer carry hidden
1162 fields Prev and Next.
1163 * ali.adb (Scan_ALI): Add parsing code to process PF / Has_Finalizer.
1164 A library unit with at least one controlled object on the library level
1165 has a special finalizer which is invoked by the binder. To signal this,
1166 ali files carry field PF.
1167 * ali.ads: New field in type Unit_Record called Has_Finalizer. Add
1168 associated comment on field usage.
1169 * a-tags.adb (Get_RC_Offset): Removed.
1170 (Needs_Finalization): New routine.
1171 * a-tags.ads: Update the structure of the GNAT dispatch tables.
1172 Dispatch tables now carry field Needs_Finalization which provides
1173 runtime indication whether a type is controlled or has controlled
1174 components or both. Remove field RC_Offset.
1175 (Get_RC_Offset): Removed along with its associated pragma Export.
1176 Since tagged types with controlled components no longer carry hidden
1177 field _controller, the special mechanism to retrieve its location is no
1179 (Needs_Finalization): New routine.
1180 * atree.ads, atree.adb (Elist24): New routine.
1181 (Set_Elist24): New routine.
1182 * atree.h: Add a define clause for Elist24.
1183 * bindgen.adb New library-level variable Lib_Final_Built.
1184 (Gen_Adafinal_Ada): Reimplemented. Depending on the restrictions or the
1185 presence of a VM target, the routine generates calls to the proper
1186 library finalization routine.
1187 (Gen_Adainit_Ada): Import Finalize_Library_Objects only on non-VM
1188 targets. Set the correct library finalization routine depending on
1189 whether the library has controlled objects or this is a VM compilation.
1190 (Gen_Finalize_Library_Ada): New routine. This procedure generates calls
1191 to library-level finalizers of compiled units in reverse order of
1192 elaboration. It also produces exception management code and reraises a
1193 potential exception after all units have been finalized.
1194 (Gen_Finalize_Library_C): New routine. This procedure generates calls to
1195 library-level finalizers of compiled units in reverse order of
1197 (Gen_Finalize_Library_Defs_C): New routine. This procedure generates the
1198 definitions of all library-level finalizers available to the compilation
1199 (Gen_Main_Ada): Directly call Adafinal which now contails all target
1201 (Gen_Main_C): Add new local constant Needs_Library_Finalization. Call
1202 System.Standard_Library.Adafinal directly. If the library needs
1203 finalization actions, create the sequence of finalization calls.
1204 (Gen_Output_File_Ada): Alphabetize local variables and constants.
1205 Generate a with clause for System.Soft_Links when compiling for a VM.
1206 Remove the code which imports System.Standard_Library.Adafinal as
1207 Do_Finalize. Generate the library finalization routine.
1208 (Gen_Output_File_C): Add new local constant Needs_Library_Finalization.
1209 If the library needs finalization actions, create all the definitions
1210 of library- level finalizers.
1211 (Has_Finalizer): New routine. Determines whether at least one compiled
1212 unit has a library-level finalizer.
1213 Add type Qualification_Mode.
1214 (Set_Unit_Name): Add a formal which controls the replacement of a dot.
1215 * einfo.adb: New usage of field 15 as Return_Flag.
1216 Remove Finalization_Chain_Entity from the usages of field 19.
1217 Remove Associated_Final_Chain from the usages of field 23.
1218 New usage of field 23 as Associated_Collection.
1219 New usage of field 24 as Finalizer.
1220 New usage of flag 252 as Is_Processed_Transient.
1221 (Associated_Final_Chain): Removed.
1222 (Associated_Collection): New routine.
1223 (Finalization_Chain_Entity): Removed.
1224 (Finalizer): New routine.
1225 (Is_Finalizer): New routine.
1226 (Is_Processed_Transient): New routine.
1227 (Return_Flag): New routine.
1228 (Set_Associated_Final_Chain): Removed.
1229 (Set_Associated_Collection): New routine.
1230 (Set_Finalization_Chain_Entity): Removed.
1231 (Set_Finalizer): New routine.
1232 (Set_Is_Processed_Transient): New routine.
1233 (Set_Return_Flag): New routine.
1234 (Write_Entity_Flags): Include Is_Processed_Transient to the list of
1236 (Write_Field8_Name): Alphabetize the output.
1237 (Write_Field11_Name): Alphabetize the output.
1238 (Write_Field12_Name): Alphabetize the output.
1239 (Write_Field13_Name): Alphabetize the output.
1240 (Write_Field14_Name): Alphabetize the output.
1241 (Write_Field15_Name): Alphabetize the output.
1242 (Write_Field16_Name): Alphabetize the output.
1243 (Write_Field17_Name): Alphabetize the output.
1244 (Write_Field18_Name): Alphabetize the output.
1245 (Write_Field19_Name): Alphabetize the output. Remove the output of
1246 Finalization_Chain_Entity.
1247 (Write_Field20_Name): Alphabetize the output.
1248 (Write_Field21_Name): Alphabetize the output.
1249 (Write_Field22_Name): Alphabetize the output.
1250 (Write_Field23_Name): Alphabetize the output. Remove the output of
1251 Associated_Final_Chain. Add output for Associated_Collection.
1252 (Write_Field24_Name): Alphabetize the output.
1253 (Write_Field25_Name): Add output for Finalizer.
1254 (Write_Field26_Name): Alphabetize the output.
1255 (Write_Field27_Name): Alphabetize the output.
1256 (Write_Field28_Name): Alphabetize the output.
1257 * einfo.ads: Add new field description for Associated_Collection and
1259 Remove Associated_Final_Chain and its uses in nodes.
1260 Remove Finalization_Chain_Entity and its uses in nodes.
1261 Add new field description for Finalizer and its uses in nodes.
1262 Add new synthesized attribute Is_Finalizer.
1263 Add new flag description for Is_Processed_Transient and its uses in
1265 Add new field description for Return_Flag and its uses in nodes.
1266 (Associated_Final_Chain): Removed along with its pragma Inline.
1267 (Associated_Collection): New routine and pragma Inline.
1268 (Finalization_Chain_Entity): Removed along with its pragma Inline.
1269 (Finalizer): New routine and pragma Inline.
1270 (Is_Finalizer): New routine and pragma Inline.
1271 (Is_Processed_Transient): New routine and pragma Inline.
1272 (Return_Flag): New routine and pragma Inline.
1273 (Set_Associated_Final_Chain): Removed along with its pragma Inline.
1274 (Set_Associated_Collection): New routine and pragma Inline.
1275 (Set_Finalization_Chain_Entity): Removed along with its pragma Inline.
1276 (Set_Finalizer): New routine and pragma Inline.
1277 (Set_Is_Processed_Transient): New routine and pragma Inline.
1278 (Set_Return_Flag): New routine and pragma Inline.
1279 * exp_aggr.adb: Alphabetize subprograms.
1280 (Build_Array_Aggr_Code): Remove formal Flist and its associated comment.
1281 (Build_Record_Aggr_Code): Remove formals Flist and Obj along with their
1282 associated comments. Remove local variables External_Final_List and
1284 Rename Ctrl_Stuff_Done to Finalization_Done. Rename local variable A to
1285 Ancestor. Remove the retrieval of finalization lists. Update the call to
1287 (Convert_Aggr_In_Allocator): Remove the retrieval of finalization
1288 lists. Update the call to Late_Expansion.
1289 (Convert_Aggr_In_Assignment): Update the call to Late_Expansion.
1290 (Convert_Aggr_In_Object_Decl): Update the call to Late_Expansion.
1291 (Gen_Assign): Remove the retrieval of the finalization list used to
1292 build the assignment. Update the calls to Make_Init_Call and
1294 (Gen_Ctrl_Actions_For_Aggr): Renamed to Generate_Finalization_Actions.
1295 Remove the mechanism to determine attachment levels and finalization
1296 list retrieval. Remove the processing for coextensions.
1297 (Init_Controller): Removed. Controllers no longer exist.
1298 (Late_Expansion): Remove formals Flist and Obj along with their
1299 associated comments. Update the calls to Build_Record_Aggr_Code and
1300 Build_Array_Aggr_Code.
1301 * exp_ch13.adb (Expand_N_Free_Statement): New routine.
1302 (Expand_N_Freeze_Entity): Add special processing for finalizers which
1303 appear in entry bodies, protected subprograms and task bodies.
1304 * exp_ch13.ads (Expand_N_Free_Statement): New routine.
1305 * exp_ch3.adb (Add_Final_Chain): Removed.
1306 (Build_Array_Init_Proc): Alphabetize local variables.
1307 (Build_Assignment): Alphabetize local variables. Update the call to
1309 (Build_Class_Wide_Master): Rename local variables to better reflect
1311 (Build_Discriminant_Assignments): Code reformatting.
1312 (Build_Init_Call_Thru): Code reformatting.
1313 (Build_Init_Procedure): Code reformatting. Generate a special version
1314 of Deep_Finalize which is capable of finalizing all initialized
1315 components and ignore the rest.
1316 (Build_Init_Statements): Rename local variables to better reflect their
1318 Reimplement the mechanism to include the creation and update of an index
1319 variable called a "counter". It is used as a bookmark for tracing
1320 initialized and non-initialized components.
1321 (Build_Initialization_Call): Remove local variable Controller_Typ.
1322 Alphabetize all local variables. Remove the initialization of the
1323 record controller and update the call to Make_Init_Call.
1324 (Build_Record_Init_Proc): Rename formal Pe to Rec_Ent.
1325 New local variable Counter.
1326 (Constrain_Array): Alphabetize.
1327 (Expand_Freeze_Array_Type): Create a collection instead of a
1329 (Expand_Freeze_Class_Wide_Type): New routine. Creates TSS primitive
1330 Finalize_Address which is used in conjunction with allocated controlled
1332 (Expand_N_Object_Declaration): Remove the creation of a finalization
1333 list for anonymous access types. Update the calls to Make_Init_Call and
1335 (Expand_Freeze_Record_Type): Remove local variable Flist. Remove the
1336 retrieval of finalization lists. Remove the expansion of the record
1337 controller. Create TSS primitive Finalize_Address used in conjunction
1338 with controlled objects on the heap. Create finalization collections
1339 for access-to-controlled record components.
1340 (Expand_Record_Controller): Removed.
1341 (Freeze_Type): Remove the freezing of record controllers. Freezing of
1342 class-wide types now requires additional processing. Create
1343 finalization collections for access-to-controlled types.
1344 (Increment_Counter): New routine.
1345 (Make_Counter): New routine.
1346 (Make_Eq_If): Remove the mention of Name_uController.
1347 (Make_Predefined_Primitive_Specs): There is no longer need to skip
1348 types coming from System.Finalization_Root.
1349 (Predef_Deep_Spec): Reimplemented to reflect the new parameter profiles.
1350 (Predefined_Primitive_Bodies): There is no longer need to skip types
1351 coming from System.Finalization_Root.
1352 (Stream_Operation_OK): Do not generate stream routines for
1353 type Ada.Finalization.Heap_Management.Finalization_Collection.
1354 * exp_ch3.ads: Alphabetize subprograms.
1355 * exp_ch4.adb: Remove with and use clause for Sem_Ch8.
1356 Add with and use clause for Lib.
1357 (Complete_Coextension_Finalization): Removed.
1358 (Complete_Controlled_Allocation): New routine. Create a finalization
1359 collection for anonymous access-to-controlled types. Create a custom
1360 Allocate which interfaces with the back end and the machinery in
1362 (Expand_Allocator_Expression): Add necessary calls to
1363 Complete_Controlled_Allocation. Remove the retrieval of finalization
1364 lists. Update the calls to Make_Adjust_Call. Generate a call to
1365 Ada.Finalization.Heap_Management.Set_Finalize_Address_Ptr to decorate
1366 the associated collection.
1367 (Expand_N_Allocator): Remove the processing for dynamic coextensions.
1368 Code clean up. Remove the retrieval of finalization lists and
1370 Update the call to Make_Init_Call. Generate a call to
1371 Ada.Finalization.Heap_Management.Set_Finalize_Address_Ptr to decorate
1372 the associated collection.
1373 (Get_Allocator_Final_List): Removed. Finalization lists are not
1375 (Suitable_Element): Remove the mention of Name_uController.
1376 * exp_ch5.adb: Remove with and use clauses for Ttypes and Uintp.
1377 (Make_Tag_Ctrl_Assignment): Rewritten to simply do a finalization of
1378 the left hand side, carry out the assignment and adjust the left hand
1380 * exp_ch6.adb (Add_Final_List_Actual_To_Build_In_Place_Call): Removed.
1381 (Add_Collection_Actual_To_Build_In_Place_Call): New routine.
1382 (BIP_Formal_Suffix): Rename BIP_Final_List and BIPfinallist to
1383 BIP_Collection and BIPcollection.
1384 (Build_Heap_Allocator): New routine used to allocate the return object
1385 of a build-in-place function onto a collection.
1386 (Expand_Ctrl_Function_Call): Moved from Exp_Ch7.
1387 (Expand_Call): Do not replace direct calls to Deep routines with their
1389 (Expand_N_Extended_Return_Statement): Give all variables shorter names
1390 and update their occurrences. Add a special return flag to monitor the
1391 [ab]normal execution of the function. The flag is set right before the
1393 Rewrite the mechanism used to allocate a build-in-place return object
1394 on the heap or on a storage pool.
1395 (Is_Direct_Deep_Call): New routine.
1396 (Make_Build_In_Place_Call_In_Allocator): Add a collection to a
1397 build-in-place function call instead of a final list. Build a call to
1398 Set_Finalize_Address_Ptr to decorate the associated collection.
1399 (Make_Build_In_Place_Call_In_Anonymous_Context): Create a temporary in
1400 order to name the build-in-place function call's result for later
1401 finalization. Add a collection to a build-in-place function call
1402 instead of a final list.
1403 (Make_Build_In_Place_Call_In_Assignment): Add a collection to a
1404 build-in-place function call instead of a final list. Remove the code
1405 which moves one final list and transforms it into the actual in a
1406 nested build-in-place call.
1407 (Make_Build_In_Place_Call_In_Object_Declaration): Add a collection to a
1408 build-in-place function call instead of a final list.
1409 (Move_Final_List): Removed.
1410 (Needs_BIP_Collection): New routine.
1411 (Needs_BIP_Final_List): Removed.
1412 * exp_ch6.ads: Replace BIP_Final_List with BIP_Collection in
1413 enumeration type BIP_Formal_Kind.
1414 Update the related comment.
1415 (Needs_BIP_Collection): New routine.
1416 (Needs_BIP_Final_List): Removed.
1417 * exp_ch7.adb: Add with and use clauses for Elists, Exp_Ch6, Stringt
1418 and Ttypes. Remove with and use clauses for Sem_Type. Alphabetize the
1419 majority of subprograms in this unit. Add Name_Finalize_Address to
1420 array Name_Of and TSS_Finalize_Address to array Deep_Name_Of.
1421 (Build_Adjust_Or_Finalize_Statements): Create the adjust or finalization
1422 statements for an array type.
1423 (Build_Adjust_Statements): Create the adjust statements for a record
1425 (Build_Cleanup_Statements): New routine. A procedure which given any
1426 construct containing asynchronous calls, references to _master, or is a
1427 task body, a task allocation or a protected body produces the necessary
1428 runtime calls to clean up these constructs.
1429 (Build_Exception_Handler): New routine.
1430 (Build_Final_List): Removed.
1431 (Build_Finalization_Collection): New routine. A core procedure which
1432 creates a collection to service heap allocated controlled objects
1433 associated with an access-to-controlled type.
1434 (Build_Finalize_Statements): Create the finalization statements for a
1436 (Build_Finalizer): New routine. A core procedure which given any
1437 construct with declarations and/or statements detects all objects which
1438 need any type of clean up (controlled objects, protected objects) and
1439 generates all necessary code to clean up the said objects in the proper
1441 (Build_Finalizer_Call): New routine.
1442 (Build_Initialize_Statements): Create the initialization statements for
1443 an array type. The generated routine contains code to finalize partially
1445 (Build_Object_Declarations): New routine.
1446 (Build_Raise_Statement): New routine.
1447 (Clean_Simple_Protected_Objects): Removed.
1448 (Controller_Component): Removed.
1449 (Enclosing_Function): New routine.
1450 (Expand_Cleanup_Actions): Create a finalizer for a construct which has
1451 either declarations or statements or both.
1452 (Expand_N_Package_Body): Create a finalizer for a non-generic package.
1453 (Expand_N_Package_Declaration): Create a finalizer for a non-generic
1455 (Find_Final_List): Removed.
1456 (Global_Flist_Ref): Removed.
1457 (In_Finalization_Root): Removed.
1458 (Insert_Actions_In_Scope_Around): Determine the range of the transient
1459 scope in terms of tree nodes. Process all transient variables within
1461 (Make_Adjust_Call): Rewritten. There is no longer an attach call
1462 generated after the adjust.
1463 (Make_Attach_Call): Removed.
1464 (Make_Call): New routine.
1465 (Make_Clean): Removed.
1466 (Make_Deep_Array_Body): Rewritten to simply invoke the appropriate
1468 (Make_Deep_Proc): Rewritten to generate the new profile signature used
1470 (Make_Deep_Record_Body): Rewritten to simply invoke the appropriate
1472 (Make_Final_Call): Modified to simply create a call to either
1473 Deep_Finalize or Finalize.
1474 (Make_Finalize_Address_Body): New routine.
1475 (Make_Finalize_Address_Stmts): New routine. A function which produces
1476 TSS primitive Finalize_Address used in conjunction with heap allocated
1478 (Make_Handler_For_Ctrl_Operation): Add specialized code for .NET/JVM.
1479 (Make_Init_Call): Rewritten. There is no longer an attach call
1480 generated after initialization.
1481 (Make_Local_Deep_Finalize): New routine.
1482 (Make_Set_Finalize_Address_Ptr_Call): New routine.
1483 (Make_Transient_Block): Remove the finalization list retrieval and
1485 (Needs_Finalization): Moved to Exp_Util.
1486 (Parent_Field_Type): New routine.
1487 (Preprocess_Components): New routine.
1488 (Process_Transient_Objects): New routine.
1489 (Wrap_HSS_In_Block): New routine.
1490 (Wrap_Transient_Declaration): Remove finalization list management and
1491 controller insertion.
1492 (Wrap_Transient_Expression): Code reformatting.
1493 (Wrap_Transient_Statement): Code reformatting.
1494 * exp_ch7.ads (Build_Final_List): Removed.
1495 (Build_Finalization_Collection): New routine.
1496 (Build_Raise_Statement): New routine.
1497 (Controller_Component): Removed.
1498 (Expand_Ctrl_Function_Call): Moved to Exp_Ch6.
1499 (Find_Final_List): Removed.
1500 (In_Finalization_Root): Removed.
1501 (Is_Simple_Protected_Type): Update related comment.
1502 (Make_Adjust_Call): New parameter profile and associated comments.
1503 (Make_Attach_Call): Removed.
1504 (Make_Final_Call): New parameter profile and associated comments.
1505 (Make_Finalize_Address_Body): New routine.
1506 (Make_Init_Call): New parameter profile and associated comments.
1507 (Make_Local_Deep_Finalize): New routine.
1508 (Make_Set_Finalize_Address_Ptr_Call): New routine.
1509 (Needs_Finalization): Moved to Exp_Util.
1510 * exp_ch9.adb (Add_Object_Pointer): Code reformatting.
1511 (Expand_N_Protected_Body): Remove the handling of finalization lists.
1512 (Find_Protection_Type): Moved to Exp_Util.
1513 * exp_disp.adb: Remove with and use clauses for Exp_Ch7.
1514 (Make_DT): Update sequence of dispatch table initialization. Remove the
1515 initialization of field RC_Offset. Add initialization of field Needs_
1517 * exp_intr.adb (Expand_Unc_Deallocation): Code reformatting.
1518 Reimplement how an object is first finalized, then deallocated.
1519 * exp_strm.adb (Build_Record_Or_Elementary_Input_Function):
1521 * exp_tss.ads: Add special suffix for TSS primitive Finalize_Address.
1522 Register TSS_Finalize_Address with type TSS_Names.
1523 * exp_util.adb (Build_Allocate_Deallocate_Proc): New routine. This core
1524 procedure provides the interface between an allocation / deallocation
1525 and the support machinery in Ada.Finalization.Heap_Management.
1526 (Find_Init_Call): Code reformatting.
1527 (Find_Init_Call_In_List): Code reformatting.
1528 (Find_Protection_Type): Moved from Exp_Ch9.
1529 (Find_Prim_Op): Reimplement to add preference of recovered primitive.
1530 (Has_Controlled_Coextensions): Removed.
1531 (Has_Controlled_Objects): New routine.
1532 (In_Library_Level_Package_Body): New routine.
1533 (Insert_Action_After): New routine.
1534 (Is_Finalizable_Transient): New routine. This predicate determines
1535 whether an object declaration is one of the many variants of controlled
1537 (Is_Null_Access_BIP_Func_Call): New routine.
1538 (Is_Non_BIP_Func_Call): New routine.
1539 (Is_Related_To_Func_Return): New routine.
1540 (Needs_Finalization): Moved from Exp_Ch7.
1541 * exp_util.ads (Build_Allocate_Deallocate_Proc): New routine.
1542 (Find_Protection_Type): Moved from Exp_Ch9.
1543 (Has_Controlled_Coextensions): Removed.
1544 (Has_Controlled_Objects): New routine.
1545 (In_Library_Level_Package_Body): New routine.
1546 (Insert_Action_After): New routine.
1547 (Is_Finalizable_Transient): New routine.
1548 (Is_Null_Access_BIP_Func_Call): New routine.
1549 (Is_Non_BIP_Func_Call): New routine.
1550 (Is_Related_To_Func_Return): New routine.
1551 (Needs_Finalization): Moved from Exp_ch7.
1552 * expander.adb (Expand): Add a case for N_Free_Statement.
1553 * freeze.adb (Freeze_All): Replace the generation of a finalization
1554 list with a collection for access-to-controlled types.
1555 (Freeze_Entity): Code reformatting.
1556 (Freeze_Record_Type): Remove the freezing of a record controller
1558 (Freeze_Subprogram): Code reformatting.
1559 * inline.adb (Cleanup_Scopes): Remove the reset of the scope
1561 * lib-writ.adb (Write_Unit_Information): Output "PF" when a package
1562 has a library-level finalizer.
1563 * lib-writ.ads: Add "PF" to the sequence of unit attributes.
1564 * a-filico.ads, a-filico.adb, s-finimp.ads, s-finimp.adb: Removed.
1565 * Makefile.rtl: Remove a-filico and s-finimp from the list of object
1566 files. Add a-fihema to the list of object files.
1568 Alphabetize the associations in type Is_Parameterless_Attribute.
1569 * rtsfind.ads: Ada.Finalization_List.Controller and
1570 System.Finalization_Implementation are no longer a GNAT unit.
1571 Update the range of type Ada_Finalization_Child. Remove the following
1572 recoverable entities:
1574 RE_Attach_To_Final_List
1578 RE_Finalizable_Ptr_Ptr
1579 RE_Global_Final_List
1580 RE_Limited_Record_Controller
1583 RE_Record_Controller
1584 RE_Simple_List_Controller
1586 Add the following recoverable entities:
1588 RE_Add_Offset_To_Address
1592 RE_Exception_Identity
1593 RE_Finalization_Collection
1594 RE_Finalization_Collection_Ptr
1595 RE_Needs_Finalization
1596 RE_Save_Library_Occurrence
1597 RE_Set_Finalize_Address_Ptr
1598 RE_Set_Storage_Pool_Ptr
1600 * sem_aggr.adb (Resolve_Record_Aggregate): Remove mention of
1602 * sem_aux.adb (First_Discriminant): Remove mention of Name_uController.
1603 (First_Stored_Discriminant): Remove the mention of Name_uController.
1604 * sem_aux.ads: Comment reformatting.
1605 * sem_ch10.adb (Build_Chain): Signal the class-wide creation machinery
1606 to redecorate an already existing class-wide type.
1607 (Decorate_Tagged_Type): New parameter profile and associated comment.
1608 Create a "shadow class-wide type" for a shadow entity.
1609 * sem_ch11.adb (Analyze_Exception_Handlers): Remove the dubious setting
1610 of the final chain along with the associated comment.
1611 * sem_ch3.adb (Access_Type_Declaration): Add new local variable
1612 Full_Desig and set it to the full view of the designated type.
1613 Initialize the finalization collection to empty.
1614 (Build_Derived_Record_Type): Alphabetize local variables. Code
1616 (Collect_Fixed_Components): Remove the mention of Name_uController.
1617 (Create_Constrained_Components): Remove the mention of Name_uController.
1618 (Make_Class_Wide_Type): Add specialized code to redecorate an existing
1619 class-wide type of a shadow entity.
1620 (Process_Full_View): Update the machinery which marks type
1621 Limited_Controlled's entity as limited.
1622 * sem_ch4.adb (Analyze_One_Call): Code reformatting.
1623 * sem_ch6.adb (Create_Extra_Formals): Do not generate a finalization
1624 list, instead make a collection build-in-place formal.
1625 * sem_ch8.adb (Analyze_Object_Renaming): Look at the available view of
1626 a designated type in order to establish a match between the renaming
1627 and the renamed entity.
1628 (Find_Selected_Component): Add guard to prevent spurious exceptions
1629 from being raised on .NET/JVM.
1630 * sem_disp.adb (Check_Dispatching_Operation): Include Finalize_Address
1631 to the list of primitive that need special processing. Update arrays
1632 C_Names and D_Names.
1633 (Replace_Types): Handle class-wide types.
1634 * sem_elab.adb (Check_A_Call): Since Deep_Initialize now has a
1635 different parameter profile, look at the first formal.
1636 * sem_prag.adb: Remove with and use clauses for Exp_Ch7. Add with and
1637 use clauses for Exp_Util.
1638 * sem_res.adb: Remove with and use clauses for Elists.
1639 (Propagate_Coextensions): Removed.
1640 (Resolve_Allocator): Do not propagate the list of coextensions from one
1641 allocator to another.
1642 * sem_util.adb (Build_Actual_Subtype_Of_Component): Rename variable
1643 Deaccessed_T to Desig_Typ.
1644 (Enter_Name): Remove the mention of Name_uController.
1645 (Gather_Components): Remove the mention of Name_uController.
1646 (Incomplete_Or_Private_View): New routine.
1647 (Is_Coextension_Root): Removed.
1648 (Is_Fully_Initialized_Type): Remove the mention of Name_uController.
1649 * sem_util.ads (Incomplete_Or_Private_View): New routine.
1650 (Is_Coextension_Root): Removed.
1651 * s-finroo.ads: Remove with clause for Ada.Unchecked_Conversion.
1652 Controlled types are now derived from a null tagged record. Remove
1653 types Finalizable_Ptr, Finalizable and Empty_Root_Controlled.
1654 * sinfo.adb (Coextensions): Removed.
1655 (Set_Coextensions): Removed.
1656 * sinfo.ads: Remove Coextensions from the explanation of node fields
1657 and its uses in nodes.
1658 Update the field usage of N_Allocator.
1659 (Coextensions): Removed along with its pragma Inline.
1660 (Set_Coextensions): Removed along with its pragma Inline.
1661 * snames.ads-tmpl: Remove names
1666 Name_uLocal_Final_List
1667 Name_Finalization_Root
1674 Name_Finalize_Address
1675 * s-pooglo.adb (Allocate): Add overriding indicator.
1676 (Deallocate): Add overriding indicator.
1677 (Storage_Size): Add overriding indicator.
1678 * s-soflin.adb (Adafinal_NT): Invoke Finalize_Library_Objects rather
1679 than Finalize_Global_List.
1680 (Null_Finalize_Global_List): Removed.
1681 (Save_Library_Occurrence): New routine.
1682 * s-soflin.ads: Remove variable Finalize_Global_List along with its
1683 initialization. Add variable Finalize_Library_Objects along with its
1684 pragma Export. Add variables Library_Exception and
1685 Library_Exception_Set along with their pragma Export.
1686 (Null_Finalize_Global_List): Removed.
1687 (Save_Library_Occurrence): New routine.
1688 * s-tassta.adb (Finalize_Global_Tasks): Call Finalize_Library_Objects
1689 rather than Finalize_Global_List.
1690 * tbuild.adb (Unchecked_Convert_To): Capture and set the parent field
1691 of the constructed node.
1693 2011-08-03 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
1695 * link.c: Include "auto-host.h" before system headers.
1697 2011-08-03 Vincent Celier <celier@adacore.com>
1699 * make.adb (Gnatmake): Add to table Library_Projs only library projects
1700 that are not extended. Do not check if a library project that is
1701 extended should be regenerated. Do not add to table Library_Paths the
1702 libraries that are in extended projects. Link only with libraries that
1703 are in libray projects that are not extended.
1704 * prj-nmsc.adb (Check_Library_Attributes): Do not reset flag Library
1705 for a library project that is extended.
1707 2011-08-03 Gary Dismukes <dismukes@adacore.com>
1709 * sem_ch6.adb (Find_Corresponding_Spec): When in an instance, skip
1710 conforming subprogram renamings that appear to be completions if they
1711 are not fully conformant.
1712 Such renamings are homographs but not completions.
1713 * sem_type.adb (Disambiguate): Handle disambiguation of overloaded
1714 names in a subprogram renaming that appears in an instance.
1716 2011-08-03 Ed Schonberg <schonberg@adacore.com>
1718 * exp_util.adb (Expand_Subtype_From_Expr): if the type is limited but
1719 not immutably limited, build actual subtype from expression to provide
1720 proper bounds to caller.
1722 2011-08-03 Gary Dismukes <dismukes@adacore.com>
1724 * sem_ch8.adb: Minor comment correction.
1726 2011-08-03 Thomas Quinot <quinot@adacore.com>
1728 * exp_strm.adb (Build_Array_Input_Function): In Ada 2005 mode, when
1729 returning a limited array, use an extended return statement.
1731 2011-08-03 Vincent Celier <celier@adacore.com>
1733 * make.adb (Initialize): If --subdirs= is used, but no project file is
1734 specified, attempt to create the specify subdir if it does not already
1735 exist and use it as the object directory as if -D had been specified.
1737 2011-08-03 Arnaud Charlet <charlet@adacore.com>
1739 * s-tpopsp-vms.adb: New file.
1740 * s-taprop-vms.adb: Put back ATCB_Key, since needed by this file on VMS.
1741 * gcc-interfaces/Makefile.in: Use s-taprop-vms.adb on VMS.
1743 2011-08-03 Emmanuel Briot <briot@adacore.com>
1745 * make.adb, makeutl.adb, makeutl.ads, clean.adb (Makeutl.Queue): new
1748 2011-08-03 Yannick Moy <moy@adacore.com>
1750 * cstand.adb (Create_Standard): select Universal_Integer as an ALFA type
1751 * sem_ch3.adb (Array_Type_Declaration): detect array types in ALFA
1752 * sem_util.adb, sem_util.ads (Has_Static_Array_Bounds): new function to
1753 detect that an array has static bounds.
1755 2011-08-03 Thomas Quinot <quinot@adacore.com>
1757 * exp_dist.adb: Minor reformatting.
1759 2011-08-03 Arnaud Charlet <charlet@adacore.com>
1761 * s-taprop-irix.adb, s-taprop-hpux-dce.adb, s-taprop-vms.adb
1762 (ATCB_Key): Removed, not always used.
1764 2011-08-03 Emmanuel Briot <briot@adacore.com>
1766 * gnatcmd.adb, make.adb, prj.adb, prj.ads, makeutl.adb, makeutl.ads,
1767 clean.adb, prj-conf.adb, prj-env.adb, prj-env.ads (Makeutl): remove
1768 most remaining global variables.
1770 2011-08-03 Robert Dewar <dewar@adacore.com>
1772 * gnatcmd.adb, prj-proc.adb, mlib-prj.adb, prj.adb, makeutl.ads,
1773 prj-util.adb, prj-util.ads, prj-conf.adb, prj-env.adb: Minor
1776 2011-08-03 Javier Miranda <miranda@adacore.com>
1778 * exp_util.adb (Is_VM_By_Copy_Actual): Include N_Slide nodes as actuals
1779 that must be passed by copy in VM targets.
1781 2011-08-03 Emmanuel Briot <briot@adacore.com>
1783 * prj.ads, prj-nmsc.adb (Files_Htable): removed this htable, which
1784 duplicates a similar htable now in the project tree.
1786 2011-08-03 Claire Dross <dross@adacore.com>
1788 * a-cfdlli.adb, a-cfhama.adb, a-cfhase.adb, a-cforma.adb, a-cforse.adb,
1789 a-cofove.adb ("=", Length, Is_Empty, Clear, Assign, Copy, Element,
1790 Replace_Element, Query_Element, Update_Element, Move, Insert, Prepend,
1791 Append, Delete, Delete_First, Delete_Last, Reverse_Element, Swap,
1792 Splice, First, First_Element, Last, Last_Element, Next, Previous, Find,
1793 Reverse_Find, Contains, Has_Element, Iterate, Reverse_Iterate, Capacity,
1794 Reserve_Length, Length, Strict_Equal, Left, Right): Data-structure
1797 2011-08-03 Arnaud Charlet <charlet@adacore.com>
1799 * s-taprop-posix.adb, s-taprop-linux.adb, s-taprop-tru64.adb
1800 (ATCB_Key): Removed, not always used.
1801 * s-tpopsp-posix.adb, s-tpopsp-posix-foreign.adb (ATCB_Key): Moved from
1803 * s-tpopsp-tls.adb: New file.
1804 * gcc-interface/Makefile.in: Use TLS implementation of s-tpopsp.adb on
1805 x86/x64/ia64/powerpc/sparc Linux.
1807 2011-08-03 Arnaud Charlet <charlet@adacore.com>
1809 * system-aix.ads, system-aix64.ads: Set ZCX_By_Default to True.
1810 * gcc-interface/Makefile.in: Switch to ZCX by default on AIX ports.
1812 2011-08-03 Thomas Quinot <quinot@adacore.com>
1814 * rtsfind.ads, exp_dist.adb, exp_dist.ads
1815 (Build_From_Any_Call, Build_To_Any_Call, Build_TypeCode_Call):
1816 Fix type selection for mapping integer types to PolyORB types.
1818 2011-08-03 Bob Duff <duff@adacore.com>
1820 * sem_ch7.adb: Minor comment clarification.
1822 2011-08-03 Bob Duff <duff@adacore.com>
1824 * sem_ch13.adb (Analyze_Enumeration_Representation_Clause): If we get
1825 an error analyzing a choice, skip further processing. Further
1826 processing could cause a crash or cascade errors.
1828 2011-08-03 Emmanuel Briot <briot@adacore.com>
1830 * gnatcmd.adb, prj-proc.adb, prj-proc.ads, make.adb, mlib-prj.adb,
1831 prj.adb, prj.ads, makeutl.adb, makeutl.ads, clean.adb, prj-nmsc.adb,
1832 prj-util.adb, prj-util.ads, prj-conf.adb, prj-conf.ads, prj-env.adb,
1833 prj-env.ads (Shared_Project_Tree_Data): new type
1834 An aggregate project and its aggregated trees need to share the common
1835 data structures used for lists of strings, packages,... This makes the
1836 code simpler since otherwise we have to pass the root tree (also used
1837 for the configuration file data) in addition to the current project
1838 tree. This also avoids ambiguities as to which tree should be used.
1839 And finally this saves a bit of memory.
1840 (For_Every_Project_Imported): new parameter Tree.
1841 Since aggregated projects are using a different tree, we need to let
1842 the caller know which tree to use to manipulate the returned project.
1844 2011-08-03 Robert Dewar <dewar@adacore.com>
1846 * prj-proc.adb, exp_util.ads, exp_ch9.adb, make.adb, prj-ext.adb,
1847 prj-ext.ads, alfa.ads, sem_ch4.adb, makeutl.adb, makeutl.ads,
1848 lib-xref-alfa.adb, sem_cat.adb, exp_dist.adb, get_alfa.adb,
1849 prj-env.adb, prj-env.ads, prj-tree.adb, alfa.ads: Minor reformatting.
1851 2011-08-03 Javier Miranda <miranda@adacore.com>
1853 * exp_util.adb, sem_aux.adb, exp_util.ads, sem_aux.ads:
1854 Move routine Is_VM_By_Copy_Actual from sem_aux to exp_util.
1856 2011-08-03 Bob Duff <duff@adacore.com>
1858 * sem_ch8.adb (Is_Primitive_Operator_In_Use): Always check In_Use on
1861 2011-08-03 Joel Brobecker <brobecker@adacore.com brobecker>
1863 * g-sha256.ads, g-sha512.ads, g-sha1.ads, g-sha224.ads, g-sha384.ads,
1864 g-sehash.ads: Fix typo. Update header.
1866 2011-08-03 Thomas Quinot <quinot@adacore.com>
1868 * exp_ch6.adb (Expand_Actuals): Remove Ada_2005 guard on build-in-place
1871 2011-08-03 Gary Dismukes <dismukes@adacore.com>
1873 * sem_ch4.adb (Analyze_Overloaded_Selected_Component): Consider
1874 prefixes of private types along with records, since the selector may be
1876 * sem_res.adb (Resolve_Selected_Component): Consider prefixes of
1877 private types along with records, since the selector may be a
1880 2011-08-03 Emmanuel Briot <briot@adacore.com>
1882 * prj-pp.adb (Pretty_Print): remove trailing blank line in the file
1884 2011-08-03 Javier Miranda <miranda@adacore.com>
1886 * sem_aux.adb (Is_VM_By_Copy_Actual): Fix wrong use of
1887 Tagged_Type_Expansion.
1889 2011-08-03 Yannick Moy <moy@adacore.com>
1892 (Resolve_Op_Concat_Arg): do not issue a SPARK violation when argument of
1893 concatenation is the name of a constant
1895 2011-08-03 Emmanuel Briot <briot@adacore.com>
1897 * prj-proc.adb, prj-ext.adb, prj-ext.ads, prj-env.adb, prj-env.ads,
1898 prj-tree.adb, prj-tree.ads (Initialize_And_Copy, Copy): new subprograms
1899 (Process_Declarative_Items): new parameter Child_Env.
1901 2011-08-03 Yannick Moy <moy@adacore.com>
1903 * alfa.ads Update format of ALFA section in ALI file in order to add a
1904 mapping from bodies to specs when both are present
1905 (ALFA_Scope_Record): add components for spec file/scope
1906 * get_alfa.adb (Get_ALFA): read the new file/scope for spec when present
1908 (Collect_ALFA): after all scopes have been collected, fill in the spec
1909 information when relevant
1910 * put_alfa.adb (Put_ALFA): write the new file/scope for spec when
1913 2011-08-03 Eric Botcazou <ebotcazou@adacore.com>
1915 * inline.adb (Add_Inlined_Subprogram): Do not consider the enclosing
1916 code unit to decide whether to add internally generated subprograms.
1918 2011-08-03 Javier Miranda <miranda@adacore.com>
1920 * sem_aux.ads, sem_aux.adb (Is_VM_By_Copy_Actual): New subprogram.
1922 (Build_Simple_Entry_Call): Handle actuals that must be handled by copy
1925 2011-08-03 Emmanuel Briot <briot@adacore.com>
1927 * make.adb, makeutl.adb, makeutl.ads (Make.Switches_Of): now shares
1928 code with Makeutl.Get_Switches.
1929 * prj-tree.adb: Update comment.
1931 2011-08-03 Thomas Quinot <quinot@adacore.com>
1933 * sem_cat.adb (Validate_RCI_Subprogram_Declaration): Reject a remote
1934 subprogram with a limited formal that does not support external
1937 2011-08-03 Yannick Moy <moy@adacore.com>
1939 * get_alfa.adb (Get_ALFA): add missing Skip_Spaces at start of
1941 * lib-xref-alfa.adb (Add_ALFA_File): split removal of scopes that are
1942 not from current unit in two phases, because it is not possible to
1943 change the table while iterating over its content.
1944 * put_alfa.adb (Put_ALFA): reset current file/scope at each new entity
1946 2011-08-03 Sergey Rybin <rybin@adacore.com>
1948 * vms_data.ads: Add qualifier for gnatmetric --no-static-loop option
1949 * gnat_ugn.texi: Update description of complexity metrics (gnatmetric)
1951 2011-08-03 Ed Schonberg <schonberg@adacore.com>
1953 * sem_res.adb (Resolve_Op_Concat_Arg): if the argument is an aggregate
1954 and the component type is composite, this is ambiguous for predefined
1955 concatenation, but if the node is not overloaded and the entity is a use
1956 -defined function its profile can be used to resolve that aggregate.
1958 2011-08-03 Robert Dewar <dewar@adacore.com>
1960 * exp_ch4.adb: Minor code cleanup.
1962 2011-08-03 Thomas Quinot <quinot@adacore.com>
1964 * exp_dist.adb: Do not generate distribution stubs if serious errors
1965 have been diagnosed.
1967 2011-08-03 Ed Schonberg <schonberg@adacore.com>
1969 * sem_ch4.adb (Try_Primitive_Operation): when checking the validity of
1970 the first formal of a primitive operation, go to the base type to
1971 handle properly an access to a derived type with constrained
1973 * sem_type.adb (Disambiguate): an immediately visible operator hides a
1974 user-defined function that is only use-visible.
1976 2011-08-03 Robert Dewar <dewar@adacore.com>
1978 * sem_aggr.adb, sem_ch3.adb, lib.ads, gnatcmd.adb, prj-proc.adb,
1979 make.adb, lib-writ.adb, prj-part.adb, prj-part.ads, prj-ext.adb,
1980 fname-uf.adb, prj-ext.ads, prj.adb, prj.ads, sem_attr.adb, alfa.adb,
1981 prj-makr.adb, errout.adb, makeutl.adb, makeutl.ads, restrict.ads,
1982 sem_ch6.adb, g-pehage.adb, clean.adb, put_alfa.adb, lib-xref-alfa.adb,
1983 prj-nmsc.adb, prj-nmsc.ads, sem_ch8.adb, prj-pars.ads, exp_aggr.adb,
1984 prj-attr.ads, sem_ch13.adb, get_alfa.adb, prj-env.adb, prj-env.ads,
1985 alfa_test.adb, prj-tree.adb, prj-tree.ads, einfo.ads: Minor reformatting
1987 2011-08-03 Robert Dewar <dewar@adacore.com>
1989 * repinfo.adb (List_Mechanism): Add handling of
1990 Convention_Ada_Pass_By_XXX.
1991 * sem_mech.adb (Set_Mechanism): Ditto.
1992 * sem_prag.adb (Process_Convention): Add entries for
1993 Convention_Ada_Pass_By_XXX.
1994 * snames.adb-tmpl, snames.ads-tmpl: Ditto.
1996 2011-08-03 Pascal Obry <obry@adacore.com>
1998 * makeutl.adb: Minor reformatting.
2000 2011-08-03 Vincent Celier <celier@adacore.com>
2003 (Get_File_Name) If the file cannot be found when there are no config
2004 pragmas file and May_Fail is True, return No_File instead of the file
2005 name, to be consistent.
2007 2011-08-03 Pascal Obry <obry@adacore.com>
2009 * adaint.c (__gnat_is_executable_file_attr): Avoid access
2012 2011-08-03 Javier Miranda <miranda@adacore.com>
2015 (Same_Representation): In VM targets the representation of arrays with
2016 aliased components differs from arrays with non-aliased components.
2018 2011-08-03 Emmanuel Briot <briot@adacore.com>
2020 * prj-proc.adb, prj-attr.adb, prj-attr.ads (Get_Attribute_Index): do
2021 not systematically lower case attribute indexes that contain no "."
2022 Fix definition of several Naming attributes, which take
2023 a unit name as index and therefore should be case insensitive.
2024 Minor refactoring (reduce length of variable names).
2026 2011-08-03 Emmanuel Briot <briot@adacore.com>
2028 * makeutl.adb, makeutl.ads (Get_Switches): new subprogram.
2030 2011-08-03 Emmanuel Briot <briot@adacore.com>
2032 * gnatcmd.adb, prj-proc.adb, prj-proc.ads, make.adb, prj-part.adb,
2033 prj-part.ads, switch-m.adb, switch-m.ads, prj-makr.adb, clean.adb,
2034 prj-pars.adb, prj-pars.ads, prj-conf.adb, prj-conf.ads, prj-tree.adb,
2035 prj-tree.ads (Prj.Tree.Environment): new type.
2037 2011-08-03 Emmanuel Briot <briot@adacore.com>
2039 * prj-proc.adb, prj.ads, makeutl.adb, makeutl.ads, prj-conf.adb,
2040 prj-tree.adb, prj-tree.ads (Environment): new type.
2042 2011-08-03 Emmanuel Briot <briot@adacore.com>
2044 * prj-tree.ads: Remove unused variable.
2046 2011-08-03 Yannick Moy <moy@adacore.com>
2048 * restrict.adb (Restriction_Msg): set "SPARK" all in upper case for
2049 issuing messages related to SPARK restriction violation.
2051 2011-08-03 Ed Schonberg <schonberg@adacore.com>
2053 * sem_ch6.adb: guard against error nodes in return statements.
2055 2011-08-03 Arnaud Charlet <charlet@adacore.com>
2057 * errout.adb (Error_Msg_Internal): the main unit has not been read yet,
2058 a warning can only appear on a configuration file, so emit warning
2059 without further checks.
2061 2011-08-03 Arnaud Charlet <charlet@adacore.com>
2063 * s-interr.ads: add overriding keyword.
2065 2011-08-03 Geert Bosch <bosch@adacore.com>
2067 * exp_attr.adb: Fix minor typo.
2069 2011-08-03 Ed Schonberg <schonberg@adacore.com>
2071 * par-ch4.adb: improve error recovery.
2073 2011-08-03 Emmanuel Briot <briot@adacore.com>
2075 * prj-part.adb, prj-part.ads, prj-makr.adb, prj-pars.adb, prj-conf.adb,
2076 prj-env.adb (Prj.Part.Parse): change parameter Always_Errout_Finalize
2079 2011-08-03 Emmanuel Briot <briot@adacore.com>
2081 * prj-dect.adb (Parse_Attribute_Declaration): make sure we can use
2082 "external" as an attribute name in aggregate projects.
2084 2011-08-03 Jose Ruiz <ruiz@adacore.com>
2086 * s-taprop-vxworks.adb: (Create_Task, Initialize): Ada 2012 pragma CPU
2087 uses CPU numbers starting 1, while VxWorks uses CPU numbers starting
2088 from 0, so we need to adjust.
2090 2011-08-03 Emmanuel Briot <briot@adacore.com>
2092 * prj-proc.adb, prj-ext.adb, prj-ext.ads, makeutl.adb, prj-tree.adb,
2093 prj-tree.ads, gnatcmd.adb, clean.adb (External_References): new type.
2095 2011-08-03 Yannick Moy <moy@adacore.com>
2097 * sem_ch6.adb (New_Overloaded_Entity): only issue error for SPARK
2098 restriction on overloaded entity if the entity is not an operator.
2100 2011-08-03 Yannick Moy <moy@adacore.com>
2102 * sem_ch7.adb, sem_res.adb, sem_attr.adb, restrict.adb,
2103 restrict.ads: Rename remaining Check_Formal_Restriction* into
2104 Check_SPARK_Restriction*.
2106 2011-08-03 Emmanuel Briot <briot@adacore.com>
2108 * prj-proc.adb, prj-part.adb, prj.adb, prj.ads, prj-nmsc.adb,
2109 prj-nmsc.ads, prj-err.adb (Project_Data): now discriminated on its
2111 (Project_Empty): removed
2112 (Empty_Project): new parameter Qualifier
2113 This is used to have fields specific to aggregate projects, cleaner
2114 New field to store the list of aggregated projects.
2115 (Check_Aggregate_Project): removed
2116 (Process_Aggregated_Projects, Free): new subprograms.
2118 2011-08-03 Olivier Hainque <hainque@adacore.com>
2120 * tracebak.c (STOP_FRAME ppc AIX): Stop at null return address as well.
2122 2011-08-03 Ed Schonberg <schonberg@adacore.com>
2124 * sem_ch8.adb (Analyze_Object_Renaming): if the renamed object is an
2125 explicit dereference of an unconstrained type, create a constrained
2126 subtype for it, as is done for function calls that return an
2129 2011-08-03 Thomas Quinot <quinot@adacore.com>
2131 * g-pehage.adb (Finalize): Avoid possible double-free.
2133 2011-08-03 Steve Baird <baird@adacore.com>
2135 * exp_attr.adb (Expand_N_Attribute_Reference): Don't expand
2136 Elab_Spec/Body attrs in CodePeer_Mode.
2138 2011-08-03 Javier Miranda <miranda@adacore.com>
2140 * exp_aggr.adb (Flatten): Convert to positional form aggregates whose
2141 low bound is not known at compile time but they have no others choice.
2142 Done because in this case the bounds can be obtained directly from the
2145 2011-08-03 Ed Falis <falis@adacore.com>
2147 * s-tasinf-vxworks.ads: Update comment to reflect 0 indexing of CPUs
2148 on VxWorks SMP. Remove unusable constant ANY_CPU.
2150 2011-08-03 Emmanuel Briot <briot@adacore.com>
2152 * gnatcmd.adb, make.adb, prj-part.adb, prj-part.ads, prj-makr.adb,
2153 clean.adb, prj-nmsc.adb, prj-pars.adb, prj-conf.adb, prj-env.adb,
2154 prj-env.ads (Prj.Env.Initialize_Default_Project_Path,
2155 Prj.Env.Initialize_Empty): new subprograms
2156 (Get_Env, Find_Project): remove parameter Target_Name.
2158 2011-08-03 Gary Dismukes <dismukes@adacore.com>
2160 * sem_ch3.adb (Build_Derived_Record_Type): Test the Derive_Subps formal
2161 as a condition for the delayed call to Derived_Subprograms done for the
2162 case of the rewriting of a derived type that constrains the
2163 discriminants of its parent type.
2164 Avoids redundant subprogram derivations for private subtype derivations.
2166 2011-08-03 Javier Miranda <miranda@adacore.com>
2168 * exp_aggr.adb (Init_Hidden_Discriminants): New subprogram of
2169 Build_Record_Aggr_Code.
2170 (Build_Record_Aggr_Code): Add missing support to initialize hidden
2171 discriminants in extension aggregates.
2173 2011-08-03 Emmanuel Briot <briot@adacore.com>
2175 * prj-pp.adb (Print): also output project qualifiers, since in
2176 particular "aggregate" is mandatory in an aggregate project.
2178 2011-08-03 Emmanuel Briot <briot@adacore.com>
2180 * prj-part.adb, prj.adb, prj.ads, prj-nmsc.adb, prj-env.adb:
2181 (Debug_Output): new function.
2183 2011-08-03 Eric Botcazou <ebotcazou@adacore.com>
2185 * gnat_ugn.texi: Document -Wstack-usage.
2186 * gcc-interface/misc.c (enumerate_modes): Add guard for ghost FP modes.
2188 2011-08-03 Thomas Quinot <quinot@adacore.com>
2190 * sem_prag.adb Issue an error (not a warning) when a C++ type does not
2191 have keyword LIMITED.
2193 2011-08-03 Yannick Moy <moy@adacore.com>
2195 * alfa.adb, alfa.ads, alfa_test.adb: New files.
2196 * ali.adb (Known_ALI_Lines): add 'C' lines (SCO) and 'F' lines (ALFA)
2197 (Scan_ALI): do not issue a fatal error if parsing known lines after Xref
2198 section (does not happen in compiler, only if code directly calls
2200 * get_alfa.adb, get_alfa.ads: New files.
2201 * lib-writ.adb, lib-writ.ads (Write_ALI): output ALFA information if
2203 * lib-xref-alfa.adb: New file.
2204 * lib-xref.adb, lib-xref.ads
2205 (Xref_Entry): redefine information needed in cross-references for ALFA.
2206 Push ALFA treatments in separated local package.
2207 (Enclosing_Subpragram_Or_Package): treat specially subprogram
2208 identifiers. Return entity of package body instead of spec. Return
2209 Empty for a scope with no location.
2210 (Generate_Reference): adapt to new components for ALFA information.
2211 Remove the need for D references on definitions.
2212 (Is_Local_Reference): moved to ALFA local package
2213 (Output_References): extract subfunction as Extract_Source_Name
2214 (Output_Local_References): remove procedure, replaced by filtering of
2215 cross-references in package ALFA and printing in Put_ALFA.
2216 (Write_Entity_Name): remove procedure
2217 * lib.adb, lib.ads (Extract_Source_Name): extract here function to
2218 print exact name of entity as it appears in source file
2219 (Unit_Ref_Table): make type public for use in Lib.Xref.ALFA
2220 * put_alfa.adb, put_alfa.ads: New files.
2221 * xref_lib.adb (Search_Xref): protect read of cross-references against
2222 reading other sections of the ALI file, in gnatxref
2223 (Search): protect read of cross-references against reading other
2224 sections of the ALI file, in gnatfind.
2225 * gcc-interface/Make-lang.in: Update dependencies.
2227 2011-08-03 Thomas Quinot <quinot@adacore.com>
2229 * sem_ch3.adb: Minor reformatting.
2231 2011-08-03 Jose Ruiz <ruiz@adacore.com>
2233 * s-inmaop-vxworks.adb (Setup_Interrupt_Mask): Do nothing instead of
2234 raising an exception.
2236 2011-08-03 Ed Schonberg <schonberg@adacore.com>
2238 * sem_res.adb (Set_String_Literal_Subtype): if index type is an integer
2239 type, always use 1 as the lower bound or string, even if lower bound of
2240 context is not static, to handle properly null strings in a non-static
2243 2011-08-03 Bob Duff <duff@adacore.com>
2245 * sem_prag.adb (Resolve_Aggregate): An array aggregate with 'others' is
2246 always legal on the right-hand side of an assignment statement; there
2247 is always an applicable index constraint in this case. Therefore, the
2248 check for Pkind = N_Assignment_Statement is now unconditional -- it
2249 doesn't depend on whether Is_Constrained (Typ).
2251 2011-08-03 Robert Dewar <dewar@adacore.com>
2253 * exp_ch5.adb, sem_prag.adb, exp_ch4.adb: Minor reformatting.
2255 2011-08-03 Ed Schonberg <schonberg@adacore.com>
2257 * sem_ch3.adb (Build_Itype_Reference): do not create an itype reference
2258 for an itype created within a generic unit.
2260 2011-08-03 Eric Botcazou <ebotcazou@adacore.com>
2262 * gnat_ugn.texi (Switches for gcc): Make it clearer that -fno-inline
2263 suppresses all inlining.
2265 2011-08-03 Robert Dewar <dewar@adacore.com>
2267 * sem_ch3.adb, sem_res.adb, exp_ch13.adb, exp_disp.adb,
2268 exp_aggr.adb: Minor reformatting.
2270 2011-08-03 Thomas Quinot <quinot@adacore.com>
2272 * exp_ch5.adb (Expand_N_Assignment_Statement): Do not force inlining of
2273 tagged assignment when discriminant checks are suppressed. This is
2274 useless and extremely costly in terms of static stack usage.
2276 2011-08-03 Bob Duff <duff@adacore.com>
2278 * sem_prag.adb (Get_Base_Subprogram): Do not follow Alias for instances
2279 of generics, because this leads to the wrong entity in the wrong scope,
2280 causing (e.g.) pragma Export_Procedure to get an error if the entity is
2282 (Process_Interface_Name): Follow Alias for instances of generics, to
2283 correct for the above change.
2285 2011-08-03 Ed Schonberg <schonberg@adacore.com>
2287 * exp_ch4.adb (Expand_N_Selected_Component): If the discriminant value
2288 is an integer literal it is always safe to replace the reference. In
2289 addition, if the reference appears in the generated code for an object
2290 declaration it is necessary to copy because otherwise the reference
2291 might be to the uninitilized value of the discriminant of the object
2294 2011-08-03 Pascal Obry <obry@adacore.com>
2296 * adaint.c (__gnat_is_executable_file_attr): Fix Win32 circuitry when no
2297 ACL used, in this case we want to check for ending .exe, not .exe
2298 anywhere in the path.
2300 2011-08-03 Sergey Rybin <rybin@adacore.com>
2302 * tree_io.ads (ASIS_Version_Number): Update because of the changes in
2303 the tree structure (semantic decoration of references to record
2306 2011-08-03 Gary Dismukes <dismukes@adacore.com>
2308 * sem_aggr.adb (Analyze_Array_Aggregate): When checking the discrete
2309 choices of a named array aggregate, bail out when any choices are
2310 marked as Errors_Posted.
2312 2011-08-03 Ed Schonberg <schonberg@adacore.com>
2314 * exp_ch13.adb (Expand_N_Freeze_Entity): cleanup determination of scope
2315 in which entity is frozen, to handle properly loop variables in
2318 2011-08-03 Ed Schonberg <schonberg@adacore.com>
2320 * sem_res.adb (Set_String_Literal_Subtype): if the lower bound of the
2321 subtype is not static, compute the upper bound using attributes, to
2322 handle properly index types that are not integer types.
2324 2011-08-03 Bob Duff <duff@adacore.com>
2326 * gnat_rm.texi, gnat_ugn.texi: Fix some dangling URLs.
2327 Update copyright notice.
2329 2011-08-03 Ed Schonberg <schonberg@adacore.com>
2331 * sem_ch3.adb (Build_Discriminant_Constraints): Only use
2332 Original_Discriminant if within an instance.
2333 * sem_ch4.adb (Analyze_Selected_Component): Ditto.
2335 2011-08-03 Thomas Quinot <quinot@adacore.com>
2337 * einfo.ads: Minor reformatting.
2339 2011-08-03 Ed Schonberg <schonberg@adacore.com>
2341 * exp_disp.adb (Check_Premature_Freezing): diagnose the presence of a
2342 composite type with an unfrozen subcomponent, in the profile of a
2343 primitive operation.
2345 2011-08-03 Robert Dewar <dewar@adacore.com>
2347 * sem_util.ads, exp_aggr.adb, exp_ch3.adb: Minor reformatting.
2349 2011-08-03 Ed Schonberg <schonberg@adacore.com>
2351 * sem_ch3.adb (Analyze_Object_Declaration): if a constant object of an
2352 unconstrained type with discriminants is initialized with an aggregate,
2353 use the constrained subtype of the aggregate as the type of the object,
2354 because it is immutable, and this allows the back-end to generate no
2355 code for the object declaration.
2357 2011-08-03 Robert Dewar <dewar@adacore.com>
2359 * exp_ch4.adb (Optimize_Length_Check): Fix bad handling of case where
2360 comparison operand is variable, and turns out to be zero or negative.
2362 2011-08-03 Javier Miranda <miranda@adacore.com>
2365 (Expand_Dispatching_Constructor_Call): Disable expansion of
2366 code required for native targets. Done to avoid generating
2367 references to unavailable runtime entities in VM targets.
2369 (Expand_N_Object_Declaration): Add missing support to handle
2370 the explicit initialization of class-wide interface objects.
2373 2011-08-03 Matthew Heaney <heaney@adacore.com>
2375 * a-cobove.adb (Merge): Move source onto target, instead of using Assign
2377 2011-08-03 Matthew Heaney <heaney@adacore.com>
2379 * a-cbdlli.adb (Splice): move source items from first to last
2381 2011-08-03 Yannick Moy <moy@adacore.com>
2383 * sem_util.ads: comment added.
2385 2011-08-03 Javier Miranda <miranda@adacore.com>
2388 (Expand_Record_Aggregate): In VM targets disable the expansion into
2389 assignments of aggregates whose type is not known at compile time.
2391 2011-08-03 Ed Schonberg <schonberg@adacore.com>
2393 * exp_ch9.adb (Build_Renamed_Formal_Declaration): common procedure for
2394 protected entries and task entries, to build the proper renaming
2395 declaration for entry formals, used in debugging.
2396 * exp_ch2.adb (Expand_Entry_Parameter): handle task and entry
2397 parameters in the same way.
2399 2011-08-02 Robert Dewar <dewar@adacore.com>
2401 * a-direct.adb, sinfo.ads, exp_ch9.adb, scng.adb, sem_util.adb,
2402 sem_util.ads, restrict.ads, par-prag.adb: Minor reformatting and/or
2403 code reorganization.
2405 2011-08-02 Robert Dewar <dewar@adacore.com>
2407 * debug.adb: Debug flag d.P to suppress length comparison optimization
2408 * exp_ch4.adb (Optimize_Length_Comparison): New routine to optimize
2409 comparison of Length by comparing First/Last instead.
2411 2011-08-02 Matthew Heaney <heaney@adacore.com>
2413 * a-cobove.ads: Code clean up.
2415 2011-08-02 Vincent Celier <celier@adacore.com>
2417 * adaint.c (file_names_case_sensitive_cache): New static int.
2418 (__gnat_get_file_names_case_sensitive): Cache the return value in
2419 file_names_case_sensitive_cache at the first invocation, to avoid
2420 multiple calls to getenv.
2422 2011-08-02 Bob Duff <duff@adacore.com>
2424 * sem_ch12.adb (Validate_Derived_Type_Instance): Implement AI05-0218-1.
2426 2011-08-02 Yannick Moy <moy@adacore.com>
2428 * sem_ch3.adb, sem_ch5.adb, sem_ch9.adb, sem_prag.adb, sem.ads,
2429 sem_util.adb, sem_util.ads, sem_res.adb, sem_ch2.adb, sem_ch4.adb,
2430 sem_ch6.adb, sem_ch11.adb: Add semantic flag In_Pre_Post_Expression to
2431 indicate that we are in a precondition or postcondition. This is used in
2432 Mark_Non_ALFA_Subprogram (renaming of Mark_Non_ALFA_Subprogram_Body) to
2433 decide whether to flag the spec or body of the current subprogram as
2436 2011-08-02 Fabien Chouteau <chouteau@adacore.com>
2438 * impunit.adb: Add Ada.Execution_Time.Interrupts in the Ada2012 package
2440 * a-extiin.ads: New file.
2442 2011-08-02 Bob Duff <duff@adacore.com>
2444 * a-direct.adb (Rename): Implement AI05-0231-1. In particular, Rename
2445 now raises Name_Error instead of Use_Error in certain cases. The other
2446 parts of this AI were already implemented properly.
2448 2011-08-02 Vincent Celier <celier@adacore.com>
2450 * link.c: Only import "auto-host.h" when building the gnattools.
2452 2011-08-02 Yannick Moy <moy@adacore.com>
2454 * sem_util.adb: Inter-unit inlining does not work for a subprogram
2455 which calls a local subprogram, so extract subprogram
2456 from Mark_Non_ALFA_Subprogram_Body.
2458 2011-08-02 Javier Miranda <miranda@adacore.com>
2461 (Extract_Dispatching_Call): If the type of the dispatching object is an
2462 access type then return an explicit dereference in the Object out-mode
2465 2011-08-02 Gary Dismukes <dismukes@adacore.com>
2467 * sem_ch3.adb (Analyze_Subtype_Declaration): Generate range
2468 compatibility checks for all indexes of an array subtype, not just the
2469 first. Reset Has_Dynamic_Range_Check on the subtype before each
2470 potential check to ensure that Insert_Range_Checks will not elide any
2471 of the dynamic checks.
2473 2011-08-02 Yannick Moy <moy@adacore.com>
2475 * par-prag.ad (Process_Restrictions_Or_Restriction_Warnings): recognize
2476 SPARK restriction at parsing time.
2477 * scng.adb (Scan): Generate a token Tok_SPARK_Hide for a SPARK HIDE
2478 directive only if the SPARK restriction is set for this unit.
2480 2011-08-02 Yannick Moy <moy@adacore.com>
2482 * sem_ch3.adb, sem_ch5.adb, sem_ch9.adb, sem_util.adb, sem_util.ads,
2483 sem_res.adb, sem_ch2.adb, sem_ch4.adb, sem_ch6.adb,
2484 sem_ch11.adb: Protect call to Current_Subprogram which might be costly
2485 when repeated. Rename Current_Subprogram_Is_Not_In_ALFA into
2486 Mark_Non_ALFA_Subprogram_Body.
2487 Split body of Mark_Non_ALFA_Subprogram_Body to get body small and
2490 2011-08-02 Yannick Moy <moy@adacore.com>
2492 * sem_res.adb: Protect calls to Matching_Static_Array_Bounds which
2495 2011-08-02 Robert Dewar <dewar@adacore.com>
2497 * exp_ch9.adb, exp_sel.adb, restrict.ads, exp_disp.adb, erroutc.ads,
2498 exp_ch3.adb: Minor reformatting.
2500 2011-08-02 Emmanuel Briot <briot@adacore.com>
2502 * adaint.c (__gnat_locate_exec_on_path): only returns executable
2503 files, not any regular file.
2504 (__gnat_locate_file_with_predicate): new subprogram.
2506 2011-08-02 Yannick Moy <moy@adacore.com>
2508 * sinfo.adb, sinfo.ads: Restrict the use of flags
2509 Has_Dynamic_Length_Check and Has_Dynamic_Range_Check to expression
2510 nodes, plus N_Subtype_Declaration for the 2nd one.
2512 2011-08-02 Sergey Rybin <rybin@adacore.com>
2514 * gnat_rm.texi: Ramification of pragma Eliminate documentation
2515 - fix bugs in the description of Source_Trace;
2516 - get rid of UNIT_NAME;
2518 2011-08-02 Javier Miranda <miranda@adacore.com>
2521 (Build_Dispatching_Requeue): Adding support for VM targets
2522 since we cannot directly reference the Tag entity.
2523 * exp_sel.adb (Build_K): Adding support for VM targets.
2524 (Build_S_Assignment): Adding support for VM targets.
2526 (Default_Prim_Op_Position): In VM targets do not restrict availability
2527 of predefined interface primitives to compiling in Ada 2005 mode.
2528 (Is_Predefined_Interface_Primitive): In VM targets this service is not
2529 restricted to compiling in Ada 2005 mode.
2530 (Make_VM_TSD): Generate code that declares and initializes the OSD
2531 record. Needed to support dispatching calls through synchronized
2534 (Make_Predefined_Primitive_Specs): Enable generation of predefined
2535 primitives associated with synchronized interfaces.
2536 (Make_Predefined_Primitive_Bodies): Enable generation of predefined
2537 primitives associated with synchronized interfaces.
2539 2011-08-02 Yannick Moy <moy@adacore.com>
2541 * par-ch11.adb (P_Handled_Sequence_Of_Statements): mark a sequence of
2542 statements hidden in SPARK if preceded by the HIDE directive
2543 (Parse_Exception_Handlers): mark each exception handler in a sequence of
2544 exception handlers as hidden in SPARK if preceded by the HIDE directive
2545 * par-ch6.adb (P_Subprogram): mark a subprogram body hidden in SPARK
2546 if starting with the HIDE directive
2547 * par-ch7.adb (P_Package): mark a package body hidden in SPARK if
2548 starting with the HIDE directive; mark the declarations in a private
2549 part as hidden in SPARK if the private part starts with the HIDE
2551 * restrict.adb, restrict.ads
2552 (Set_Hidden_Part_In_SPARK): record a range of slocs as hidden in SPARK
2553 (Is_In_Hidden_Part_In_SPARK): new function which returns whether its
2554 argument node belongs to a part which is hidden in SPARK
2555 (Check_SPARK_Restriction): do not issue violations on nodes in hidden
2556 parts in SPARK; protect the possibly costly call to
2557 Is_In_Hidden_Part_In_SPARK by a check that the SPARK restriction is on
2558 * scans.ads (Token_Type): new value Tok_SPARK_Hide in enumeration
2559 * scng.adb (Accumulate_Token_Checksum_GNAT_6_3,
2560 Accumulate_Token_Checksum_GNAT_5_03): add case for new token
2562 (Scan): recognize special comment starting with '#' and followed by
2563 SPARK keyword "hide" as a HIDE directive.
2565 2011-08-02 Yannick Moy <moy@adacore.com>
2567 * types.ads, erroutc.ads: Minor reformatting.
2569 2011-08-02 Vincent Celier <celier@adacore.com>
2571 * link.c: Add response file support for cross platforms.
2573 2011-08-02 Ed Schonberg <schonberg@adacore.com>
2575 * sem_aggr.adb (Resolve_Array_Aggregate): when copying the expression
2576 in an association, set parent field of copy before partial analysis.
2577 * sem_res.adb (Resolve_Slice): create reference to itype only when
2578 expansion is enabled.
2580 2011-08-02 Yannick Moy <moy@adacore.com>
2582 * einfo.adb, einfo.ads (Body_Is_In_ALFA, Set_Body_Is_In_ALFA): get/set
2583 for new flag denoting which subprogram bodies are in ALFA
2584 * restrict.adb, sem_ch7.adb: Update comment
2585 * sem_ch11.adb, sem_ch2.adb, sem_ch3.adb, sem_ch4.adb, sem_ch5.adb,
2586 sem_ch9.adb, sem_res.adb: Add calls to
2587 Current_Subprogram_Body_Is_Not_In_ALFA on unsupported constructs.
2588 * sem_ch6.adb (Analyze_Function_Return): add calls to
2589 Current_Subprogram_Body_Is_Not_In_ALFA on return statement in the
2590 middle of the body, and extended return.
2591 (Check_Missing_Return): add calls to Set_Body_Is_In_ALFA with argument
2592 False when missing return.
2593 (Analyze_Subprogram_Body_Helper): initialize the flag Body_Is_In_ALFA
2594 to True for subprograms whose spec is in ALFA. Remove later on the flag
2595 on the entity used for a subprogram body when there exists a separate
2597 * sem_util.adb, sem_util.ads (Current_Subprogram_Body_Is_Not_In_ALFA):
2598 if Current_Subprogram is not Empty, set its flag Body_Is_In_ALFA to
2599 False, otherwise do nothing.
2601 2011-08-02 Robert Dewar <dewar@adacore.com>
2603 * inline.adb, stand.ads, sem_ch6.adb, sem_ch8.adb: Minor reformatting.
2605 2011-08-02 Yannick Moy <moy@adacore.com>
2607 * sem_ch4.ads: minor formatting.
2609 2011-08-02 Yannick Moy <moy@adacore.com>
2611 * sem_aggr.adb, err_vars.ads, sem_ch3.adb, sem_ch5.adb, sem_ch9.adb,
2612 debug.adb, sem_util.adb, sem_res.adb, sem_attr.adb, gnat1drv.adb,
2613 errout.adb, errout.ads, exp_ch6.adb, sem_ch4.adb, restrict.adb,
2614 restrict.ads, sem_ch6.adb, sem_ch8.adb, sem_ch11.adb,
2615 opt.ads: cleanup of SPARK mode
2617 2011-08-02 Yannick Moy <moy@adacore.com>
2619 * cstand.adb (Create_Standard): sets Is_In_ALFA component of standard
2621 * einfo.adb, einfo.ads (Is_In_ALFA): add flag for all entities
2622 (Is_In_ALFA, Set_Is_In_ALFA): new subprograms to access flag Is_In_ALFA
2624 (Analyze_Object_Declaration): set Is_In_ALFA flag for objects
2625 (Constrain_Enumeration): set Is_In_ALFA flag for enumeration subtypes
2626 (Constrain_Integer): set Is_In_ALFA flag for integer subtypes
2627 (Enumeration_Type_Declaration): set Is_In_ALFA flag for enumeration
2629 (Set_Scalar_Range_For_Subtype): unset Is_In_ALFA flag for subtypes with
2631 * sem_ch6.adb (Analyze_Return_Type): unset Is_In_ALFA flag for
2632 functions whose return type is not in ALFA.
2633 (Analyze_Subprogram_Specification): set Is_In_ALFA flag for subprogram
2635 (Process_Formals): unset Is_In_ALFA flag for subprograms if a
2636 parameter's type is not in ALFA.
2637 * stand.ads (Standard_Type_Is_In_ALFA): array defines which standard
2640 2011-08-02 Ed Schonberg <schonberg@adacore.com>
2642 * sem_ch6 (Analyze_Expression_Function): treat the function as
2643 Inline_Always, and introduce a subprogram declaration for it when it is
2645 * inline.adb (Add_Inlined_Body): recognize bodies that come from
2646 expression functions, so that the back-end can determine whether they
2647 can in fact be inlined.
2648 * sem_util.adb (Is_Expression_Function): predicate to determine whether
2649 a function body comes from an expression function.
2651 2011-08-02 Gary Dismukes <dismukes@adacore.com>
2653 * sem_ch6.adb (Check_Conformance): Revise the check for nonconforming
2654 null exclusions to test Can_Never_Be_Null on the anonymous access types
2655 of the formals rather than testing the formals themselves. Exclude this
2656 check in cases where the Old_Formal is marked as a controlling formal,
2657 to avoid issuing spurious errors for bodies completing dispatching
2658 operations (due to the flag not getting set on controlling access
2659 formals in body specs).
2660 (Find_Corresponding_Spec): When checking full and subtype conformance of
2661 subprogram bodies in instances, pass Designated and E in that order, for
2662 consistency with the expected order of the formals (New_Id followed by
2665 2011-08-02 Robert Dewar <dewar@adacore.com>
2667 * sem_ch8.adb: Minor reformatting.
2669 2011-08-02 Ed Schonberg <schonberg@adacore.com>
2671 * sem_ch8.adb (Analyze_Subprogram_Renaming): new procedure
2672 Check_Class_Wide_Actual, to implement AI05-0071, on defaulted
2673 primitive operations of class-wide actuals.
2675 2011-08-02 Javier Miranda <miranda@adacore.com>
2677 * exp_atag.ads, exp_atag.adb
2678 (Build_Common_Dispatching_Select_Statements): Remove argument Loc
2679 since its value is implicitly passed in argument Typ.
2680 * exp_disp.adb (Make_Disp_Conditional_Select_Body,
2681 Make_Disp_Timed_Select_Body): Remove Loc in calls to routine
2682 Build_Common_Dispatching_Select_Statements.
2684 2011-08-02 Robert Dewar <dewar@adacore.com>
2686 * sem_ch3.adb, exp_atag.ads, get_scos.adb, get_scos.ads,
2687 exp_disp.adb, lib-xref.adb, lib-xref.ads: Update comments.
2690 2011-08-02 Robert Dewar <dewar@adacore.com>
2692 * sem_res.adb: Minor reformatting.
2693 * sem_prag.adb: Minor reformatting.
2695 2011-08-02 Javier Miranda <miranda@adacore.com>
2697 * exp_atag.adb, exp_atags.ads
2698 (Build_Common_Dispatching_Select_Statement): Replace argument DT_Ptr
2699 by the tagged type Entity. Required to use this routine in the VM
2700 targets since we do not have available the Tag entity in the VM
2703 (Expand_N_Subprogram_Body): Do not invoke Build_VM_TSDs if package
2704 Ada.Tags has not been previously loaded.
2706 (Expand_N_Package_Declaration, Expand_N_Package_Body): Do not invoke
2707 Build_VM_TSDs if package Ada.Tags has not been previously loaded.
2709 (Enclosing_Dynamic_Scope): Add missing support to handle the full
2710 view of enclosing scopes. Required to handle enclosing scopes that
2711 are synchronized types whose full view is a task type.
2713 (Build_VM_TSDs): Minor code improvement to avoid generating and
2714 analyzing lists with empty nodes.
2715 (Make_Disp_Asynchronous_Select_Body): Add support for VM targets.
2716 (Make_Disp_Conditional_Select_Body): Add support for VM targets.
2717 (Make_Disp_Get_Prim_Op_Kind): Add support for VM targets.
2718 (Make_Disp_Timed_Select_Body): Add support for VM targets.
2719 (Make_Select_Specific_Data_Table): Add support for VM targets.
2720 (Make_VM_TSD): Generate code to initialize the SSD structure of
2723 2011-08-02 Yannick Moy <moy@adacore.com>
2725 * lib-writ.adb (Write_ALI): when ALFA mode is set, write local
2726 cross-references section in ALI.
2727 * lib-xref.adb, lib-xref.ads (Xref_Entry): add components Sub
2728 (enclosing subprogram), Slc (location of Sub) and Sun (unit number of
2730 (Enclosing_Subprogram_Or_Package): new function to return the enclosing
2731 subprogram or package entity of a node
2732 (Is_Local_Reference_Type): new function returns True for references
2733 selected in local cross-references.
2734 (Lt): function extracted from Lt in Output_References
2735 (Write_Entity_Name): function extracted from Output_References
2736 (Generate_Definition): generate reference with type 'D' for definition
2737 of objects (object declaration and parameter specification), with
2738 appropriate locations and units, for use in local cross-references.
2739 (Generate_Reference): update fields Sub, Slc and Sun. Keep newly created
2740 references of type 'I' for initialization in object definition.
2741 (Output_References): move part of function Lt and procedure
2742 Write_Entity_Name outside of the body. Ignore references of types 'D'
2743 and 'I' introduced for local cross-references.
2744 (Output_Local_References): new procedure to output the local
2745 cross-references sections.
2746 (Lref_Entity_Status): new array defining whether an entity is a local
2747 * sem_ch3.adb (Analyze_Object_Declaration): call Generate_Reference
2748 with 'I' type when initialization expression is present.
2749 * get_scos.adb, get_scos.ads: Correct comments and typos
2751 2011-08-02 Javier Miranda <miranda@adacore.com>
2753 * exp_ch6.adb (Expand_N_Subprogram_Body): Enable generation of TSDs in
2755 * exp_ch7.adb (Expand_N_Package_Body): Enable generation of TSDs in
2757 * exp_disp.adb (Build_VM_TSDs): No action needed if the runtime has no
2760 2011-08-02 Vincent Celier <celier@adacore.com>
2762 * prj-nmsc.adb (File_Found): New components Excl_File and Excl_Line
2763 (No_Space_Img): New function
2764 (Find_Excluded_Sources): When reading from a file, record the file name
2765 and the line number for each excluded source.
2766 (Mark_Excluded_Sources): When reporting an error, if the excluded
2767 sources were read from a file, include file name and line number in
2770 2011-08-02 Ed Schonberg <schonberg@adacore.com>
2772 * sem_res.adb (Resolve_Call): implement rule in RM 12.5.1 (23.3/2).
2774 2011-08-02 Robert Dewar <dewar@adacore.com>
2776 * exp_ch7.adb exp_ch6.adb, exp_disp.adb: Minor reformatting
2778 2011-08-02 Javier Miranda <miranda@adacore.com>
2780 * exp_ch6.adb (Expand_N_Subprogram_Body): Temporarily restrict the
2781 generation of TSDs to the DOTNET compiler.
2782 * exp_ch7.adb (Expand_N_Package_Body): Temporarily restrict the
2783 generation of TSDs to the DOTNET compiler.
2785 2011-08-02 Javier Miranda <miranda@adacore.com>
2787 * exp_disp.ads (Build_VM_TSDs): Build the runtime Type Specific Data
2788 record of all the tagged types declared inside library level package
2789 declarations, library level package bodies or library level subprograms.
2790 * exp_disp.adb (Make_VM_TSD): New subprogram that builds the TSD
2791 associated with a given tagged type.
2792 (Build_VM_TSDs): New subprogram.
2793 * exp_ch6.adb (Expand_N_Subprogram_Body): Generate TSDs records of main
2794 compilation units that are subprograms.
2795 * exp_ch7.adb (Expand_N_Package_Body): Generate TSDs of main
2796 compilation units that are package bodies.
2797 (Expand_N_Package_Declaration): Generate TSDs of the main compilation
2798 units that are a package declaration or a package instantiation.
2799 * exp_intr.adb (Expand_Dispatching_Constructor_Call): Minor code
2800 reorganization to improve the error generated by the frontend when the
2801 function Ada.Tags.Secondary_Tag is not available.
2802 * rtsfind.ads (RE_Register_TSD): New runtime entity.
2803 * exp_ch4.adb (Expand_N_Type_Conversion): Minor code cleanup.
2805 2011-08-02 Javier Miranda <miranda@adacore.com>
2807 * exp_disp.adb (Make_DT): Generate call to Check_TSD in Ada 2005 mode.
2809 2011-08-02 Robert Dewar <dewar@adacore.com>
2811 * s-imenne.ads: Minor reformatting.
2813 2011-08-02 Robert Dewar <dewar@adacore.com>
2815 * a-stunau.ads: Add pragma Suppress_Initialization for Big_String
2816 * freeze.adb (Warn_Overlay): Don't warn if initialization suppressed
2817 * s-stalib.ads: Add pragma Suppress_Initialization for Big_String
2819 2011-08-02 Robert Dewar <dewar@adacore.com>
2821 * einfo.ads (Materialize_Entity): Document this is only for renamings
2822 * exp_ch3.adb (Expand_N_Object_Declaration): Make sure we generate
2823 required debug information in the case where we transform the object
2824 declaration into a renaming declaration.
2825 * exp_ch4.adb (Expand_Concatenate): Generate debug info for result
2827 * exp_dbug.ads (Debug_Renaming_Declaration): Document setting of
2830 2011-08-02 Robert Dewar <dewar@adacore.com>
2832 * einfo.ads, einfo.adb (Suppress_Initialization): Replaces
2833 Suppress_Init_Procs.
2834 * exp_ch3.adb, exp_disp.adb, freeze.adb: Use
2835 Suppress_Initialization/Initialization_Suppressed.
2836 * gnat_rm.texi: New documentation for pragma Suppress_Initialization
2837 * sem_aux.ads, sem_aux.adb (Initialization_Suppressed): New function
2838 * sem_dist.adb: Use Suppress_Initialization/Initialization_Suppressed
2839 * sem_prag.adb: New processing for pragma Suppress_Initialization.
2841 2011-08-02 Robert Dewar <dewar@adacore.com>
2843 * gnat_rm.texi, a-tags.ads, sem_prag.adb, sem_ch12.adb, exp_disp.adb:
2846 2011-08-02 Ed Schonberg <schonberg@adacore.com>
2848 * sem_prag.adb (Chain_PPC): Implement AI04-0230: null procedures can
2849 only have inheritable classwide pre/postconditions.
2851 2011-08-02 Javier Miranda <miranda@adacore.com>
2853 * a-tags.ads, a-tags.adb (Check_TSD): New subprogram.
2854 * rtsfind.ads (RE_Check_TSD): New runtime entity.
2855 * exp_disp.adb (Make_DT): Generate call to the new runtime routine that
2856 checks if the external tag of a type is the same as the external tag
2857 of some other declaration.
2859 2011-08-02 Thomas Quinot <quinot@adacore.com>
2861 * s-taskin.ads: Minor reformatting.
2863 2011-08-02 Emmanuel Briot <briot@adacore.com>
2865 * g-comlin.adb (Display_Help): swap the order in which it prints the
2866 short help and the general usage.
2868 2011-08-02 Ed Schonberg <schonberg@adacore.com>
2870 * sem_ch12.adb (Analyze_Generic_Subprogram_Declaration): copy properly
2871 the aspect declarations and attach them to the generic copy for
2872 subsequent analysis.
2873 (Analyze_Subprogram_Instantiation): copy explicitly the aspect
2874 declarations of the generic tree to the new subprogram declarations.
2875 * sem_attr.adb (Check_Precondition_Postcondition): recognize
2876 conditions that apply to a subprogram instance.
2878 2011-08-02 Robert Dewar <dewar@adacore.com>
2880 * gnat_rm.texi: Clarify doc on pragma Source_File_Name[_Project].
2882 2011-08-02 Ed Schonberg <schonberg@adacore.com>
2884 * sem_ch3.adb (Derived_Type_Declaration): When checking that a untagged
2885 private type with a tagged full view is not derived in the immediate
2886 scope of the partial view, (RM 7.3 (7)) use the scope of the base type.
2888 2011-08-02 Robert Dewar <dewar@adacore.com>
2890 * exp_ch4.adb: Minor reformatting.
2892 2011-08-02 Ed Schonberg <schonberg@adacore.com>
2894 * sem_ch5.adb (Analyze_Loop_Statement): If the iteration scheme is an
2895 Ada2012 iterator, the loop will be rewritten during expansion into a
2896 while loop with a cursor and an element declaration. Do not analyze the
2897 body in this case, because if the container is for indefinite types the
2898 actual subtype of the elements will only be determined when the cursor
2899 declaration is analyzed.
2901 2011-08-02 Arnaud Charlet <charlet@adacore.com>
2903 * sem_ch13.adb (Analyze_Attribute_Definition_Clause): Ignore
2904 size/alignment related attributes in CodePeer_Mode.
2906 2011-08-02 Gary Dismukes <dismukes@adacore.com>
2908 * sem_ch3.adb (Check_Ops_From_Incomplete_Type): Remove call to
2909 Prepend_Element, since this can result in the operation getting the
2910 wrong slot in the full type's dispatch table if the full type has
2911 inherited operations. The incomplete type's operation will get added
2912 to the proper position in the full type's primitives
2913 list later in Sem_Disp.Check_Operation_From_Incomplete_Type.
2914 (Process_Incomplete_Dependents): Add Is_Primitive test when checking for
2915 dispatching operations, since there are cases where nonprimitive
2916 subprograms can get added to the list of incomplete dependents (such
2917 as subprograms in nested packages).
2918 * sem_ch6.adb (Process_Formals): First, remove test for being in a
2919 private part when determining whether to add a primitive with a
2920 parameter of a tagged incomplete type to the Private_Dependents list.
2921 Such primitives can also occur in the visible part, and should not have
2922 been excluded from being private dependents.
2923 * sem_ch7.adb (Uninstall_Declarations): When checking the rule of
2924 RM05-3.10.1(9.3/2), test that a subprogram in the Private_Dependents
2925 list of a Taft-amendment incomplete type is a primitive before issuing
2926 an error that the full type must appear in the same unit. There are
2927 cases where nonprimitives can be in the list (such as subprograms in
2929 * sem_disp.adb (Derives_From): Use correct condition for checking that
2930 a formal's type is derived from the type of the corresponding formal in
2931 the parent subprogram (the condition was completely wrong). Add
2932 checking that was missing for controlling result types being derived
2933 from the result type of the parent operation.
2935 2011-08-02 Yannick Moy <moy@adacore.com>
2937 * errout.adb (First_Node): minor renaming
2938 * restrict.adb (Check_Formal_Restriction): put restriction warning on
2941 2011-08-02 Yannick Moy <moy@adacore.com>
2943 * sem_res.adb (Resolve_Logical_Op): ensure N is a binary operator
2944 before accessing operands.
2945 * sem_util.adb (Is_SPARK_Initialization_Expr): follow original nodes to
2946 decide whether an initialization expression respects SPARK rules, as
2947 the plain node is the expanded one. This allows for more valid warnings
2949 * gnat_rm.texi: Minor update.
2951 2011-08-02 Arnaud Charlet <charlet@adacore.com>
2953 * sem_ch13.adb (Analyze_Enumeration_Representation_Clause): Revert
2956 2011-08-02 Robert Dewar <dewar@adacore.com>
2958 * sem_ch3.adb, sem_ch4.adb: Minor reformatting.
2960 2011-08-02 Hristian Kirtchev <kirtchev@adacore.com>
2962 * exp_ch5.adb (Expand_Iterator_Loop): Reformatting. Wrap the original
2963 loop statements and the element renaming declaration with a block when
2964 the element type is controlled.
2966 2011-08-02 Yannick Moy <moy@adacore.com>
2968 * sinfo.ads: Minor formatting.
2970 2011-08-02 Ed Schonberg <schonberg@adacore.com>
2972 * sem_aggr.adb (Add_Association): if the association has a box and no
2973 expression, use the Sloc of the aggregate itself for the new
2975 * errout.adb (First_Node): Exclude nodes with no Sloc, and always use
2978 2011-08-02 Hristian Kirtchev <kirtchev@adacore.com>
2980 * exp_ch5.adb (Expand_Iterator_Loop): Code cleanup and refactoring.
2981 When a container is provided via a function call, generate a renaming
2982 of the function result. This avoids the creation of a transient scope
2983 and the premature finalization of the container.
2984 * exp_ch7.adb (Is_Container_Cursor): Removed.
2985 (Wrap_Transient_Declaration): Remove the supression of the finalization
2986 of the list controller when the declaration denotes a container cursor,
2989 2011-08-02 Yannick Moy <moy@adacore.com>
2991 * restrict.adb (Check_Formal_Restriction): only issue a warning if the
2992 node is from source, instead of the original node being from source.
2994 (Resolve_Array_Aggregate): refine the check for a static expression, to
2995 recognize also static ranges
2996 * sem_ch3.adb, sem_ch3.ads (Analyze_Component_Declaration,
2997 Array_Type_Declaration): postpone the test for the type being a subtype
2998 mark after the type has been resolved, so that component-selection and
2999 expanded-name are discriminated.
3000 (Make_Index, Process_Range_Expr_In_Decl): add a parameter In_Iter_Schm
3001 to distinguish the case of an iteration scheme, so that an error is
3002 issed on a non-static range in SPARK except in an iteration scheme.
3003 * sem_ch5.adb (Analyze_Iteration_Scheme): call Make_Index with
3004 In_Iter_Schm = True.
3005 * sem_ch6.adb (Analyze_Subprogram_Specification): refine the check for
3006 user-defined operators so that they are allowed in renaming
3008 (Find_Selected_Component): refine the check for prefixing of operators
3009 so that they are allowed in renaming. Move the checks for restrictions
3010 on selector name after analysis discriminated between
3011 component-selection and expanded-name.
3012 * sem_res.adb (Resolve_Op_Concat_Arg): do not issue a warning on
3013 concatenation argument of string type if it is static.
3014 * sem_util.adb, sem_util.ads
3015 (Check_Later_Vs_Basic_Declarations): add a new function
3016 Is_Later_Declarative_Item to decice which declarations are allowed as
3017 later items, in the two different modes Ada 83 and SPARK. In the SPARK
3018 mode, add that renamings are considered as later items.
3019 (Enclosing_Package): new function to return the enclosing package
3020 (Enter_Name): correct the rule for homonyms in SPARK
3021 (Is_SPARK_Initialization_Expr): default to returning True on nodes not
3022 from source (result of expansion) to avoid issuing wrong warnings.
3024 2011-08-02 Ed Schonberg <schonberg@adacore.com>
3026 * errout.adb: On anything but an expression First_Node returns its
3029 2011-08-02 Pascal Obry <obry@adacore.com>
3031 * prj-proc.adb, make.adb, makeutl.adb: Minor reformatting.
3033 2011-08-02 Hristian Kirtchev <kirtchev@adacore.com>
3035 * exp_ch5.adb (Expand_Iterator_Loop): Code cleanup and reorganization.
3036 Set the associated loop as the related expression of internally
3038 * exp_ch7.adb (Is_Container_Cursor): New routine.
3039 (Wrap_Transient_Declaration): Supress the finalization of the list
3040 controller when the declaration denotes a container cursor.
3042 2011-08-02 Yannick Moy <moy@adacore.com>
3044 * opt.ads (SPARK_Mode): update comment, SPARK_Mode only set through
3046 * par-ch3.adb (P_Delta_Constraint): remove check in SPARK mode that the
3047 expression is a simple expression. This check cannot be performed in
3048 the semantics, so just drop it.
3049 (P_Index_Or_Discriminant_Constraint): move check that the index or
3050 discriminant is a subtype mark to Analyze_Subtype_Declaration in the
3051 semantics. Other cases were previously checked in the semantics.
3052 * par-ch4.adb (P_Name): move checks that a selector name is not
3053 character literal or an operator symbol to Find_Selected_Component in
3055 * par-ch5.adb (Parse_Decls_Begin_End): move check that basic
3056 declarations are not placed after later declarations in a separate
3057 procedure in Sem_Util (possibly not the best choice?), to be used both
3058 during parsing, for Ada 83 mode, and during semantic analysis, for
3060 * par-endh.adb (Check_End): move check that end label is not missing
3061 to Process_End_Label in the semantics
3062 * par-prag.adb (Process_Restrictions_Or_Restriction_Warnings): remove
3063 the special case for SPARK restriction
3064 * par.adb: use and with Sem_Util, for use in Parse_Decls_Begin_End
3065 * restrict.adb, restrict.ads (Check_Formal_Restriction): add a
3066 parameter Force to issue the error message even on internal node (used
3067 for generated end label). Call Check_Restriction to check when an error
3068 must be issued. In SPARK mode, issue an error message even if the
3069 restriction is not set.
3070 (Check_Restriction): new procedure with an additional out parameter to
3071 inform the caller that a message has been issued
3072 * sem_aggr.adb: Minor modification of message
3073 * sem_attr.adb (Analyze_Attribute): call Check_Formal_Restriction
3074 instead of issuing an error message directly
3075 * sem_ch3.adb (Analyze_Declarations): move here the check that basic
3076 declarations are not placed after later declarations, by calling
3077 Check_Later_Vs_Basic_Declarations
3078 (Analyze_Subtype_Declaration): move here the check that an index or
3079 discriminant constraint must be a subtype mark. Change the check that
3080 a subtype of String must start at one so that it works on subtype marks.
3081 * sem_ch4.adb (Analyze_Call): move here the check that a named
3082 association cannot follow a positional one in a call
3083 * sem_ch5.adb (Check_Unreachable_Code): call Check_Formal_Restriction
3084 instead of issuing an error message directly
3085 * sem_ch8.adb (Find_Selected_Component): move here the check that a
3086 selector name is not a character literal or an operator symbol. Move
3087 here the check that the prefix of an expanded name cannot be a
3088 subprogram or a loop statement.
3089 * sem_util.adb, sem_util.ads (Check_Later_Vs_Basic_Declarations): new
3090 procedure called from parsing and semantics to check that basic
3091 declarations are not placed after later declarations
3092 (Process_End_Label): move here the check that end label is not missing
3094 2011-08-02 Arnaud Charlet <charlet@adacore.com>
3096 * sem_ch13.adb (Analyze_Enumeration_Representation_Clause): Ignore enum
3097 representation clause in codepeer mode, since it confuses CodePeer and
3098 does not bring useful info.
3100 2011-08-02 Ed Falis <falis@adacore.com>
3102 * init.c: initialize fp hw on MILS.
3104 2011-08-02 Ed Schonberg <schonberg@adacore.com>
3106 * errout.adb (First_Node): for bodies, return the node itself (small
3107 optimization). For other nodes, do not check source_unit if the node
3108 comes from Standard.
3110 2011-08-02 Robert Dewar <dewar@adacore.com>
3112 * exp_ch3.adb: Minor comment additions.
3113 * sem_ch13.adb: Minor reformatting.
3115 2011-08-02 Pascal Obry <obry@adacore.com>
3117 * make.adb, makeutl.adb: Removes some superfluous directory separator.
3119 2011-08-02 Robert Dewar <dewar@adacore.com>
3121 * sem_attr.adb: Minor reformatting.
3123 2011-08-02 Robert Dewar <dewar@adacore.com>
3125 * einfo.adb (Has_Default_Aspect): Replaces Has_Default_Value
3126 (Has_Default_Component_Value): Removed
3127 * einfo.ads Comment updates
3128 (Has_Default_Aspect): Replaces Has_Default_Value
3129 (Has_Default_Component_Value): Removed
3131 (Expand_N_Freeze_Entity): Handle Default[_Component]_Value aspects
3133 (Build_Array_Init_Proc): Handle Default_[Component_]Value aspects
3134 (Get_Simple_Init_Val): Handle Default_Value aspect
3135 (Needs_Simple_Initialization): Handle Default_Value aspect
3136 * exp_ch3.ads: Needs_Simple_Initialization
3137 * freeze.adb (Freeze_Entity): Handle Default_[Component_]Value aspect
3138 * par-prag.adb (Pragma_Default[_Component]Value) Removed
3140 (Analyze_Aspect_Specifications): Fix Default[_Component]_Value aspects
3141 * sem_prag.adb (Pragma_Default[_Component]Value) Removed
3142 * snames.ads-tmpl (Pragma_Default[_Component]Value) Removed
3144 2011-08-02 Ed Schonberg <schonberg@adacore.com>
3146 * sem_ch5.adb (Analyze_Iterator_Specification): use base type to locate
3147 package containing iteration primitives.
3148 exp_ch5.adb (Expand_Iterator_Loop): ditto.
3150 2011-08-02 Ed Schonberg <schonberg@adacore.com>
3152 * sem_ch5.adb (Analyze_Iteration_Scheme): For an Ada2012 iterator with
3153 "of", pre-analyze expression in case it is a function call with
3154 finalization actions that must be placed ahead of the loop.
3155 * exp_ch5.adb (Expand_Iterator_Loop): If condition_actions are present
3156 on an Ada2012 iterator, insert them ahead of the rewritten loop.
3158 2011-08-02 Geert Bosch <bosch@adacore.com>
3160 * cstand.adb (Create_Float_Types): Only consider C's long double for
3161 Long_Long_Float, in addition to double.
3163 2011-08-02 Robert Dewar <dewar@adacore.com>
3165 * sem_ch3.adb, sem_ch5.adb, sem_type.adb, switch-c.adb, switch-c.ads,
3166 sem_prag.adb, sem_util.adb, sem_util.ads, sem_res.adb, warnsw.ads,
3167 prepcomp.ads, cstand.adb, stand.ads, a-calfor.adb, s-stusta.adb:
3170 2011-08-02 Ed Schonberg <schonberg@adacore.com>
3172 * sem_attr.adb: handle properly 'Result when it is a prefix of an
3175 2011-08-02 Javier Miranda <miranda@adacore.com>
3177 * einfo.ads, einfo.adb
3178 (Original_Access_Type): Move this attribute to Node26 since there was
3179 an undocumented use of Node21 in E_Access_Subprogram_Type entities
3180 which causes conflicts and breaks the generation of the .NET compiler.
3181 (Interface_Name): Add missing documentation on JGNAT only uses of
3184 2011-08-02 Geert Bosch <bosch@adacore.com>
3186 * cstand.adb (Back_End_Float_Types): Use Elist instead of Nlist
3187 (Find_Back_End_Float_Type): Likewise
3188 (Create_Back_End_Float_Types): Likewise
3189 (Create_Float_Types): Likewise
3190 (Register_Float_Type): Likewise
3191 * sem_ch3.adb (Floating_Point_Type_Declaration): Use Elist instead of
3192 Nlist and split out type selection in new local Find_Base_Type function.
3193 * sem_prag.adb (Process_Import_Predefined_Type): Use Elist instead of
3195 * stand.ads (Predefined_Float_Types): Use Elist instead of Nlist
3197 2011-08-02 Robert Dewar <dewar@adacore.com>
3199 * inline.adb: Minor code reorganization (put Get_Code_Unit_Entity in
3201 * opt.ads: Minor comment change.
3202 * sem_ch12.adb: Minor code reorganization.
3204 2011-08-02 Gary Dismukes <dismukes@adacore.com>
3206 * sem_ch3.adb (Complete_Private_Subtype): Don't append the private
3207 subtype's list of rep items to the list on the full subtype in the case
3208 where the lists are the same.
3210 2011-08-02 Geert Bosch <bosch@adacore.com>
3212 * switch-c.adb (Free): New deallocation procedure to avoid implicitly
3213 using the one from System.Strings, which also deallocates all strings.
3215 2011-08-02 Geert Bosch <bosch@adacore.com>
3217 * gcc-interface/gigi.h, gcc-interface/misc.c (enumerate_modes): New
3219 * gcc-interface/Make-lang.in: Update dependencies.
3221 2011-08-02 Olivier Hainque <hainque@adacore.com>
3223 * gcc-interface/trans.c (Subprogram_Body_to_gnu): Set the function
3226 2011-08-02 Javier Miranda <miranda@adacore.com>
3228 * sem_ch3.adb (Check_Anonymous_Access_Components): Create extra formals
3229 associated with anonymous access to subprograms.
3231 2011-08-02 Geert Bosch <bosch@adacore.com>
3234 (Preprocessing_Symbol_Defs): Move from Prepcomp.Symbol_Definitions.
3235 (Preprocessing_Symbol_Last): Move from Prepcomp.Last_Definition.
3236 * prepcomp.adb (Symbol_Definitions, Last_Definition): Move to opt.ads
3237 (Add_Symbol_Definition): Move to switch-c.adb
3238 (Process_Command_Line_Symbol_Definitions): Adjust references to above.
3239 * prepcomp.ads: Remove dependency on Ada.Unchecked_Deallocation.
3240 (Add_Symbol_Definition): Move to switch-c.adb.
3241 * sem_ch13.adb, sem_prag.adb: Add dependency on Warnsw.
3243 (Set_Dot_Warning_Switch, Set_GNAT_Mode_Warnings, Set_Warning_Switch):
3245 * sem_warn.ads (Warn_On_Record_Holes, Warn_On_Overridden_Size,
3246 Set_Dot_Warning_Switch, Set_GNAT_Mode_Warnings, Set_Warning_Switch):
3248 * switch-c.adb: Replace dependency on Prepcomp and Sem_Warn by Warnsw.
3249 (Add_Symbol_Definition): Moved from Prepcomp.
3250 * switch-c.ads: Update copyright notice. Use String_List instead of
3251 Argument_List, removing dependency on System.OS_Lib.
3253 2011-08-02 Yannick Moy <moy@adacore.com>
3255 * sem_ch3.adb (Analyze_Object_Declaration): issue an error in formal
3256 mode on initialization expression which does not respect SPARK
3258 * sem_util.adb, sem_util.ads (Is_SPARK_Initialization_Expr): determines
3259 if the tree referenced by its argument represents an initialization
3260 expression in SPARK, suitable for initializing an object in an object
3263 2011-08-02 Javier Miranda <miranda@adacore.com>
3265 * exp_ch9.adb (Expand_Access_Protected_Subprogram_Type): Link the
3266 internally generated access to subprogram with its associated protected
3268 * einfo.ads, einfo.adb (Original_Access_Type): New attribute.
3270 2011-08-02 Geert Bosch <bosch@adacore.com>
3272 * cstand.adb (Register_Float_Type): Print information about type to
3273 register, if the Debug_Flag_Dot_B is set.
3274 * debug.adb (Debug_Flag_Dot_B): Document d.b debug option.
3275 * rtsfind.ads (RE_Max_Base_Digits): New run time entity.
3276 * sem_ch3.adb (Floating_Point_Type_Declaration): Allow declarations
3277 with a requested precision of more than Max_Digits digits and no more
3278 than Max_Base_Digits digits, if a range specification is present and the
3279 Predefined_Float_Types list has a suitable type to derive from.
3280 * sem_ch3.adb (Rep_Item_Too_Early): Avoid generating error in the
3281 case of type completion with pragma Import
3283 (Process_Import_Predefined_Type): Processing to complete a type
3284 with pragma Import. Currently supports floating point types only.
3285 (Set_Convention_From_Pragma): Do nothing without underlying type.
3286 (Process_Convention): Guard against absence of underlying type,
3287 which may happen when importing incomplete types.
3288 (Process_Import_Or_Interface): Handle case of importing predefined
3289 types. Tweak error message.
3291 2011-08-02 Eric Botcazou <ebotcazou@adacore.com>
3293 * inline.adb (Add_Inlined_Body): Adjust check for library-level inlined
3294 functions to previous change. Reorganize code slightly.
3296 2011-08-02 Geert Bosch <bosch@adacore.com>
3298 * back_end.ads (Register_Type_Proc): New call back procedure type for
3299 allowing the back end to provide information about available types.
3300 (Register_Back_End_Types): New procedure to register back end types.
3301 * back_end.adb (Register_Back_End_Types): Call the back end to enumerate
3303 * cstand.adb (Back_End_Float_Types): New list for floating point types
3304 supported by the back end.
3305 (Build_Float_Type): Add extra parameter for Float_Rep_Kind.
3306 (Copy_Float_Type): New procedure to make new copies of predefined types.
3307 (Register_Float_Type): New call back procedure to populate the BEFT list
3308 (Find_Back_End_Float_Type): New procedure to find a BEFT by name
3309 (Create_Back_End_Float_Types): New procedure to populate the BEFT list.
3310 (Create_Float_Types): New procedure to create entities for floating
3311 point types predefined in Standard, and put these and any remaining
3312 BEFTs on the Predefined_Float_Types list.
3313 * stand.ads (Predefined_Float_Types): New list for predefined floating
3314 point types that do not have declarations in package Standard.
3316 2011-08-02 Eric Botcazou <ebotcazou@adacore.com>
3318 * inline.adb (Get_Code_Unit_Entity): New local function. Returns the
3319 entity node for the unit containing the parameter.
3320 (Add_Inlined_Body): Use it to find the unit containing the subprogram.
3321 (Add_Inlined_Subprogram): Likewise.
3322 * gcc-interface/Make-lang.in: Update dependencies.
3324 2011-08-02 Thomas Quinot <quinot@adacore.com>
3326 * s-stusta.adb (Print): Make sure Pos is always initialized to a
3329 2011-08-02 Geert Bosch <bosch@adacore.com>
3331 * a-calfor.adb (Image): Simplify, removing unnecessary uses of 'Image.
3333 2011-08-02 Eric Botcazou <ebotcazou@adacore.com>
3335 * sem_type.adb (Covers): Move trivial case to the top and reuse the
3336 computed value of Base_Type.
3338 2011-08-02 Yannick Moy <moy@adacore.com>
3340 * restrict.adb (Check_Restriction): issue an error for any use of
3341 class-wide, even if the No_Dispatch restriction is not set.
3342 * sem_aggr.adb: Correct typos in comments and messages in formal mode
3343 * sem_ch3.adb (Process_Full_View): issue an error in formal mode is,
3344 when completing a private extension, the type named in the private part
3345 is not the same as that named in the visible part.
3346 * sem_res.adb (Resolve_Call): issue an error in formal mode on the use
3347 of an inherited primitive operations of a tagged type or type extension
3348 that returns the tagged type.
3349 * sem_util.adb, sem_util.ads (Is_Inherited_Operation_For_Type): new
3350 function which returns True for an implicit operation inherited by the
3351 derived type declaration for the argument type.
3352 (Is_SPARK_Object_Reference): move to appropriate place in alphabetic
3355 2011-08-02 Ed Schonberg <schonberg@adacore.com>
3357 * sem_ch5.adb (Pre_Analyze_Range): new procedure extracted from
3358 Process_Bounds, to perform analysis with expansion of a range or an
3359 expression that is the iteration scheme for a loop.
3360 (Analyze_Iterator_Specification): If domain of iteration is given by a
3361 function call with a controlled result, as is the case if call returns
3362 a predefined container, ensure that finalization actions are properly
3364 * par-ch3.adb: accept Ada2012 iterator form in P_Discrete_Range.
3366 2011-08-02 Javier Miranda <miranda@adacore.com>
3368 * sem_ch5.adb (Analyze_Iteration_Scheme): Fix typo.
3369 * gcc-interface/Make-lang.in: Update dependencies.
3371 2011-08-02 Javier Miranda <miranda@adacore.com>
3373 * sem_util.ads, sem_util.adb (Is_Variable): Add a new formal to
3374 determine if the analysis is performed using N or Original_Node (N).
3375 * exp_util.adb (Side_Effect_Free): Code cleanup since the new
3376 functionality of routine Is_Variable avoids code duplication.
3377 * checks.adb (Determine_Range): Handle temporaries generated by
3378 Remove_Side_Effects.
3380 2011-08-02 Javier Miranda <miranda@adacore.com>
3382 * exp_ch4.adb (Expand_N_Quantified_Expression): Force reanalysis and
3383 expansion of the condition. Required since the previous analysis was
3384 done with expansion disabled (see Resolve_Quantified_Expression) and
3385 hence checks were not inserted and record comparisons have not been
3388 2011-08-02 Ed Falis <falis@adacore.com>
3390 * s-taprop-vxworks.adb, s-intman-vxworks.adb, s-intman-vxworks.ads:
3393 2011-08-02 Bob Duff <duff@adacore.com>
3395 * opt.ads: Minor comment fix.
3397 2011-08-02 Bob Duff <duff@adacore.com>
3399 * sem_ch12.adb (Analyze_Package_Instantiation,
3400 Analyze_Subprogram_Instantiation): Turn off style checking while
3401 analyzing an instance. Whatever style checks that apply to the generic
3402 unit should apply, so it makes no sense to apply them in an instance.
3403 This was causing trouble when compiling an instance of a runtime
3404 unit that violates the -gnatyO switch.
3405 * stylesw.adb (Set_Style_Check_Options): "when 'O' =>" was missing from
3406 one of the two case statements, causing spurious errors.
3408 2011-08-02 Robert Dewar <dewar@adacore.com>
3410 * uname.adb: Minor reformatting.
3411 * gnatcmd.adb: Minor reformatting.
3412 * exp_attr.adb: Minor reformatting.
3414 2011-08-02 Ed Schonberg <schonberg@adacore.com>
3416 * exp_ch5.adb (Expand_N_Assignment_Statement): under restriction
3417 No_Dispatching_Calls, do not look for the Assign primitive, because
3418 predefined primitives are not created in this case.
3420 2011-08-02 Bob Duff <duff@adacore.com>
3422 * stylesw.ads: Minor comment fixes.
3424 2011-08-02 Robert Dewar <dewar@adacore.com>
3426 * freeze.adb (Add_To_Result): New procedure.
3428 2011-08-02 Jose Ruiz <ruiz@adacore.com>
3430 * exp_attr.adb (Find_Stream_Subprogram): When using a configurable run
3431 time, if the specific run-time routines for handling streams of strings
3432 are not available, use the default mechanism.
3434 2011-08-02 Arnaud Charlet <charlet@adacore.com>
3436 * s-regpat.ads: Fix typo.
3438 2011-08-02 Vincent Celier <celier@adacore.com>
3440 * prj-conf.adb (Get_Or_Create_Configuration_File): If On_Load_Config is
3441 not null, call it to create the in memory config project file without
3442 parsing an existing default config project file.
3444 2011-08-02 Eric Botcazou <ebotcazou@adacore.com>
3446 * atree.adb (Allocate_Initialize_Node): Remove useless temporaries.
3448 2011-08-02 Ed Schonberg <schonberg@adacore.com>
3450 * sem_elim.adb: an abstract subprogram does not need an eliminate
3451 pragma for its descendant to be eliminable.
3453 2011-08-02 Ed Falis <falis@adacore.com>
3455 * init.c: revert to handling before previous checkin for VxWorks
3456 * s-intman-vxworks.adb: delete unnecessary declarations related to
3457 using Ada interrupt facilities for handling signals.
3458 Delete Initialize_Interrupts. Use __gnat_install_handler instead.
3459 * s-intman-vxworks.ads: Import __gnat_install_handler as
3460 Initialize_Interrupts.
3461 * s-taprop-vxworks.adb: Delete Signal_Mask.
3462 (Abort_Handler): change construction of mask to unblock exception
3465 2011-08-02 Jerome Guitton <guitton@adacore.com>
3467 * a-except-2005.adb (Raise_From_Signal_Handler): Call
3468 Debug_Raise_Exception before propagation starts.
3470 2011-08-02 Eric Botcazou <ebotcazou@adacore.com>
3472 * exp_ch6.adb (Expand_Call): Guard restriction checks with a call
3473 to Restriction_Check_Required.
3474 * sem_ch3.adb (Analyze_Object_Declaration): Likewise.
3475 * sem_res.adb (Resolve_Call): Likewise.
3476 * sem_attr.adb (Check_Stream_Attribute): Likewise.
3478 2011-08-02 Bob Duff <duff@adacore.com>
3480 * stylesw.ads: Update comment.
3481 * style.adb: Minor: Use Error_Msg_NE instead of Error_Msg_N.
3482 * errout.ads: Remove obsolete comment.
3484 2011-08-02 Javier Miranda <miranda@adacore.com>
3486 * einfo.ads, einfo.adb (Is_Safe_To_Reevaluate): new function.
3487 (Set_Is_Safe_To_Reevaluate): new procedure.
3488 * sem_ch5.adb (Analyze_Assignment): Add one assertion to ensure that no
3489 assignment is allowed on safe-to-reevaluate variables.
3490 (Analyze_Iteration_Schine.Process_Bounds.One_Bound): Decorate the
3491 temporary created to remove side effects in expressions that use
3492 the secondary stack as safe-to-reevaluate.
3493 * exp_util.adb (Side_Effect_Free): Add missing code to handle well
3494 variables that are not true constants.
3496 2011-08-02 Robert Dewar <dewar@adacore.com>
3498 * sem_ch5.adb, sem_ch7.adb, einfo.ads, sem_util.adb, sem_util.ads,
3499 sem_res.adb, sem_ch6.adb: Minor reformatting.
3501 2011-08-02 Jerome Guitton <guitton@adacore.com>
3503 * a-except-2005.adb (Raise_Current_Excep): Remove obsolete dead code.
3505 2011-08-02 Ed Schonberg <schonberg@adacore.com>
3507 * sem_ch6.adb (New_Overloaded_Entity, Check_Overriding_Indicator): Do
3508 not set Overridden_Operation if subprogram is an initialization
3511 2011-08-02 Yannick Moy <moy@adacore.com>
3513 * par-ch6.adb: Correct obsolete name in comments
3514 * restrict.adb, restrict.ads (Check_Formal_Restriction): new function
3515 which takes two message arguments (existing function takes one), with
3516 second message used for continuation.
3517 * sem_ch5.adb (Analyze_Block_Statement): in formal mode, only reject
3518 block statements that originate from a source block statement, not
3519 generated block statements
3520 * sem_ch6.adb (Analyze_Function_Call): rename L into Actuals, for
3521 symmetry with procedure case
3522 * sem_ch7.adb (Check_One_Tagged_Type_Or_Extension_At_Most): new
3523 function to issue an error in formal mode if a package specification
3524 contains more than one tagged type or type extension.
3525 * sem_res.adb (Resolve_Actuals): in formal mode, check that actual
3526 parameters matching formals of tagged types are objects (or ancestor
3527 type conversions of objects), not general expressions. Issue an error
3528 on view conversions that are not involving ancestor conversion of an
3530 (Resolve_Type_Conversion): in formal mode, issue an error on the
3531 operand of an ancestor type conversion which is not an object
3532 * sem_util.adb, sem_util.ads (Find_Actual): extend the behavior of the
3533 procedure so that it works also for actuals of function calls
3534 (Is_Actual_Tagged_Parameter): new function which determines if its
3535 argument is an actual parameter of a formal of tagged type in a
3537 (Is_SPARK_Object_Reference): new function which determines if the tree
3538 referenced by its argument represents an object in SPARK
3540 2011-08-02 Robert Dewar <dewar@adacore.com>
3542 * sem_ch3.adb: Minor reformatting
3543 Minor comment addition
3544 Minor error msg text change
3546 2011-08-02 Javier Miranda <miranda@adacore.com>
3548 * sem_ch5.adb (Analyze_Iteration_Scheme.Uses_Secondary_Stack): New
3549 function. Used to be more precise when we generate a variable plus one
3550 assignment to remove side effects in the evaluation of the Bound
3552 (Analyze_Iteration_Scheme): Clean attribute analyzed in all the nodes
3553 of the bound expression to force its re-analysis and thus expand the
3554 associated transient scope (if required). Code cleanup replacing the
3555 previous code that declared the constant entity by an invocation to
3556 routine Force_Evaluation which centralizes this work in the frontend.
3558 2011-08-02 Robert Dewar <dewar@adacore.com>
3560 * einfo.adb (Is_Base_Type): Improve efficiency by using a flag table
3561 (Base_Type): Now uses improved Is_Base_Type function
3562 * einfo.ads (Base_Type): Inline this function
3564 2011-08-02 Robert Dewar <dewar@adacore.com>
3566 * sem_prag.adb (Analyze_Pragma): Defend against infinite recursion
3567 (Analyze_Aspect_Specifications): Fix Sloc values for constructed pragmas
3569 2011-08-02 Arnaud Charlet <charlet@adacore.com>
3571 * gcc-interface/Make-lang.in: Update dependencies.
3572 * gcc-interface/Makefile.in: Use s-inmapop-vxworks.adb for all VxWorks
3575 2011-08-02 Yannick Moy <moy@adacore.com>
3577 * par-ch3.adb (P_Delta_Constraint): issue an error in formal mode on
3578 non-simple expression used in delta constraint
3579 (P_Index_Or_Discriminant_Constraint): issue an error in formal mode on
3580 index constraint which is not a subtype mark
3581 * par.adb: With and use Restrict
3582 * sem_ch3.adb (Analyze_Component_Declaration): issue an error in formal
3583 mode on component type which is not a subtype mark and default
3584 expression on component
3585 (Analyze_Subtype_Declaration): issue an error in formal mode on subtype
3586 of string which does not have a lower index bound equal to 1
3587 (Array_Type_Declaration): issue an error in formal mode on index or
3588 component type which is not a subtype mark, and on aliased keyword on
3590 (Derived_Type_Declaration): issue an error in formal mode on interface,
3591 limited or abstract type
3592 (Record_Type_Declaration): issue an error in formal mode on interface
3593 (Record_Type_Definition): issue an error in formal mode on tagged types
3594 and type extensions not declared in the specification of a library unit
3595 package; on null non-tagged record; on variant part
3597 2011-08-02 Vincent Celier <celier@adacore.com>
3599 * prj-nmsc.adb (Check_Library_Attributes): Do not report Library_Dir
3600 not declared for qualified library project when Library_Name is not
3601 declared, but Library_Dir is.
3603 2011-08-02 Robert Dewar <dewar@adacore.com>
3605 * sem_ch13.adb (Analyze_Aspect_Specification): Fix slocs on generated
3606 pragmas (affects aspects [Component_]Default_Value
3607 (Check_Aspect_At_Freeze_Point): For Component_Default_Value, use
3608 component type for the resolution
3610 2011-08-02 Eric Botcazou <ebotcazou@adacore.com>
3612 * einfo.adb (Base_Type): Tune implementation for speed.
3614 2011-08-02 Robert Dewar <dewar@adacore.com>
3616 * freeze.adb: Minor reformatting.
3618 2011-08-02 Thomas Quinot <quinot@adacore.com>
3620 * scos.ads: Update comments.
3622 2011-08-02 Ed Schonberg <schonberg@adacore.com>
3624 * sem_ch3.adb (Build_Derived_Type): Inherit the convention from the
3625 base type, because the parent may be a subtype of a private type whose
3626 convention is established in a private part.
3628 2011-08-02 Hristian Kirtchev <kirtchev@adacore.com>
3630 * exp_ch6.adb (Expand_N_Extended_Return_Statement): Wrap the return
3631 statement in a block when the expansion of the return expression has
3632 created a finalization chain.
3633 * freeze.adb (Freeze_Expression): Alphabetize all choices associated
3634 with the parent node.
3635 Add N_Extended_Return_Statement to handle the case where a transient
3636 object declaration appears in the Return_Object_Declarations list of
3637 an extended return statement.
3639 2011-08-02 Matthew Gingell <gingell@adacore.com>
3641 * adaint.c (__gnat_is_symbolic_link_attr): Supress warning on possibly
3642 unused parameter 'name'.
3644 2011-08-02 Ed Schonberg <schonberg@adacore.com>
3646 * sem_elim.adb (Set_Eliminated): If the overridden operation is an
3647 inherited operation, check whether its alias, which is the source
3648 operastion that it renames, has been marked eliminated.
3650 2011-08-02 Javier Miranda <miranda@adacore.com>
3652 * exp_util.adb (Safe_Prefixed_Reference): Do not consider safe an
3653 in-mode parameter whose type is an access type since it can be used to
3654 modify its designated object. Enforce code that handles as safe an
3655 access type that is not access-to-constant but it is the result of a
3656 previous removal of side-effects.
3657 (Remove_Side_Effects): Minor code reorganization of cases which require
3658 no action. Done to incorporate documentation on new cases uncovered
3659 working in this ticket: no action needed if this routine was invoked
3660 too early and the nodes are not yet decorated.
3661 * sem_res.adb (Resolve_Slice): Minor code cleanup replacling two calls
3662 to routine Remove_Side_Effects by calls to Force_Evaluation since they
3663 were issued with actuals that are implicitly provided by
3666 2011-08-02 Robert Dewar <dewar@adacore.com>
3668 * sem_ch3.adb, sem_res.adb: Minor reformatting.
3670 2011-08-02 Yannick Moy <moy@adacore.com>
3672 * sem_attr.adb (Check_Formal_Restriction_On_Attribute): new procedure
3673 to issue an error in formal mode on attribute not supported in this mode
3674 (Analyze_Attribute): issue errors on standard attributes not supported
3676 * sem_ch3.adb (Modular_Type_Declaration): remove obsolete part of
3677 comment, and issue error in formal mode on modulus which is not a power
3679 (Process_Range_Expr_In_Decl): issue error in formal mode on non-static
3681 * sem_ch8.adb (Find_Type): issue error in formal mode on 'Base in
3683 * sem_res.adb (Resolve_Unary_Op): issue error in formal mode on unary
3684 operator on modular type (except 'not').
3686 2011-08-02 Robert Dewar <dewar@adacore.com>
3688 * gnat_rm.texi: Minor reformatting.
3690 2011-08-02 Arnaud Charlet <charlet@adacore.com>
3692 * s-osinte-linux.ads: Minor comment update and reformatting.
3693 * i-cexten.ads: Make this unit pure, as for its parent.
3694 Will allow its usage in more contexts if needed.
3696 2011-08-02 Robert Dewar <dewar@adacore.com>
3698 * s-utf_32.ads: Minor comment fix.
3700 2011-08-02 Ed Schonberg <schonberg@adacore.com>
3702 * sem_res.adb (Resolve_Actuals): if the subprogram is a primitive
3703 operation of a tagged synchronized type, handle the case where the
3704 controlling argument is overloaded.
3706 2011-08-02 Yannick Moy <moy@adacore.com>
3708 * gnat_rm.texi, opt.ads, sem_prag.adb, snames.ads-tmpl:
3709 Replace pragma SPARK_95 with pragma Restrictions (SPARK)
3710 * par-prag.adb (Process_Restrictions_Or_Restriction_Warnings): set
3711 SPARK mode and formal verification mode on processing SPARK restriction
3712 * s-rident.ads (Restriction_Id): add SPARK restriction in those not
3713 requiring consistency checking.
3715 2011-08-02 Robert Dewar <dewar@adacore.com>
3717 * sem_res.adb: Minor reformatting.
3719 2011-08-02 Robert Dewar <dewar@adacore.com>
3721 * a-cfdlli.ads, a-cfhase.ads, a-cforma.ads, a-cfhama.ads,
3722 a-cforse.ads: Remove unneeded with of Ada.Containers
3723 Remove commented out pragma Inline's
3724 Move specifications of new subprograms to the actual specs
3726 2011-08-02 Yannick Moy <moy@adacore.com>
3728 * a-cfdlli.ads, a-cfhase.ads, a-cforma.ads, a-cfhama.ads,
3729 a-cforse.ads: Update comments.
3731 2011-08-02 Ed Schonberg <schonberg@adacore.com>
3733 * sem_attr.adb: add attribute name when 'Result has the wrong prefix.
3735 2011-08-02 Robert Dewar <dewar@adacore.com>
3737 * a-cfdlli.ads, a-cfhase.ads, a-cforma.ads, a-cfhama.ads,
3738 a-cforse.ads, a-cofove.ads: Minor reformatting.
3740 2011-08-02 Claire Dross <dross@adacore.com>
3742 * a-cfdlli.ads, a-cfhase.ads, a-cforma.ads, a-cfhama.ads, a-cforse.ads,
3743 a-cofove.ads: Add comments.
3745 2011-08-02 Yannick Moy <moy@adacore.com>
3747 * gnat_rm.texi: Document formal containers.
3749 2011-08-02 Emmanuel Briot <briot@adacore.com>
3751 * g-comlin.adb (Goto_Section, Getopt): fix handling of "*" when there
3754 2011-08-02 Robert Dewar <dewar@adacore.com>
3756 * mlib-prj.adb, restrict.ads, sem_aggr.adb, sem_ch12.adb: Minor
3759 2011-08-02 Robert Dewar <dewar@adacore.com>
3761 * aspects.adb: New aspects Default_Value and Default_Component_Value
3762 New format of Aspect_Names table checks for omitted entries
3763 * aspects.ads: Remove mention of Aspect_Cancel and add documentation on
3764 handling of boolean aspects for derived types.
3765 New aspects Default_Value and Default_Component_Value
3766 New format of Aspect_Names table checks for omitted entries
3767 * einfo.ads, einfo.adb (Has_Default_Component_Value): New flag
3768 (Has_Default_Value): New flag
3769 (Has_Default_Component_Value): New flag
3770 (Has_Default_Value): New flag
3771 * par-ch13.adb (P_Aspect_Specifications): New format of Aspect_Names
3773 * par-prag.adb: New pragmas Default_Value and Default_Component_Value
3774 * sem_ch13.adb (Analyze_Aspect_Specifications): New aspects
3775 Default_Value and Default_Component_Value
3776 * sem_prag.adb: New pragmas Default_Value and Default_Component_Value
3777 New aspects Default_Value and Default_Component_Value
3778 * snames.ads-tmpl: New pragmas Default_Value and Default_Component_Value
3779 * sprint.adb: Print N_Aspect_Specification node when called from gdb
3781 2011-08-02 Vincent Celier <celier@adacore.com>
3783 * prj-nmsc.adb (Check_Library_Attributes): For virtual library project,
3784 inherit library kind.
3786 2011-08-02 Ed Schonberg <schonberg@adacore.com>
3788 * sem_res.adb: Add guards in calls to Matching_Static_Array_Bounds.
3791 2011-08-02 Robert Dewar <dewar@adacore.com>
3793 * i-cstrin.ads: Updates to make Interfaces.C.Strings match RM
3795 2011-08-02 Yannick Moy <moy@adacore.com>
3797 * sem_aggr.adb (Resolve_Aggregate): Fix thinko.
3799 2011-08-02 Robert Dewar <dewar@adacore.com>
3801 * impunit.adb: Add comment.
3803 2011-08-02 Yannick Moy <moy@adacore.com>
3805 * sem_aggr.adb (Check_Qualified_Aggregate): new procedure which checks
3806 qualification of aggregates in formal mode
3807 (Is_Top_Level_Aggregate): returns True for an aggregate not contained in
3809 (Resolve_Aggregate): complete the test that an aggregate is adequately
3810 qualified in formal mode
3812 2011-08-02 Pascal Obry <obry@adacore.com>
3814 * make.adb, bindgen.adb, gnatbind.adb: Minor reformatting.
3815 * mlib-prj.adb: Supress warning when compiling binder generated file.
3816 (Build_Library): Supress all warnings when compiling the binder
3819 2011-08-02 Yannick Moy <moy@adacore.com>
3821 * errout.adb, errout.ads (Check_Formal_Restriction): move procedure
3823 * restrict.adb, restrict.ads (Check_Formal_Restriction): ...to here
3824 * sem_aggr.adb, sem_ch5.adb, sem_util.adb:
3825 Add with/use clauses to make Check_Formal_Restriction visible
3827 2011-08-02 Ed Schonberg <schonberg@adacore.com>
3829 * sem_ch12.adb (Check_Generic_Actuals): handle properly actual
3830 in-parameters when type of the generic formal is private in the generic
3831 spec and non-private in the body.
3833 2011-08-02 Claire Dross <dross@adacore.com>
3835 * a-cfdlli.adb, a-cfdlli.ads, a-cfhase.adb, a-cfhase.ads, a-cfhama.adb,
3836 a-cfhama.ads, a-cforse.adb, a-cforse.ads, a-cforma.adb, a-cforma.ads,
3837 a-cofove.adb, a-cofove.ads: New files implementing formal containers.
3838 * impunit.adb, Makefile.rtl: Take new files into account.
3840 2011-08-02 Robert Dewar <dewar@adacore.com>
3842 * sem_aggr.adb, sem_ch3.adb, sem_ch5.adb, make.adb, sem_res.adb,
3843 sem_attr.adb, sem_ch6.adb, sem_ch8.adb: Minor reformatting.
3845 2011-08-02 Yannick Moy <moy@adacore.com>
3847 * sem_aggr.adb (Resolve_Aggregate): disable incorrectly placed check in
3849 * sem_util.adb (Matching_Static_Array_Bounds): proper detection of
3850 matching static array bounds, taking into account the special case of
3852 * sem_ch3.adb: Typo in comment.
3854 2011-08-02 Yannick Moy <moy@adacore.com>
3856 * errout.adb, errout.ads (Check_Formal_Restriction): new procedure
3857 which issues an error in formal mode if its argument node is originally
3859 * sem_ch3.adb (Analyze_Full_Type_Declaration): move test that a type
3860 has a discriminant specification so that it does not include the case
3862 (Derived_Type_Declaration): move here the test that a derived type has a
3863 discriminant specification
3864 * sem_aggr.adb (Resolve_Record_Aggregate): test the presence of the
3865 first element of a component association before accessing its choices
3866 (presence of component association is not enough)
3867 * exp_ch6.adb (Expand_N_Subprogram_Declaration): test if a subprogram
3868 declaration is a library item before accessing the next element in a
3869 list, as library items are not member of lists
3870 * sem_attr.adb, sem_ch11.adb, sem_ch4.adb, sem_ch5.adb, sem_ch6.adb,
3871 sem_ch8.adb, sem_ch9.adb, sem_res.adb, sem_util.adb: use
3872 Check_Formal_Restriction whenever possible.
3874 2011-08-02 Ed Schonberg <schonberg@adacore.com>
3876 * sem_ch3.adb (Find_Type_Of_Object): In ASIS mode, create an itype
3877 reference when needed.
3879 2011-08-02 Bob Duff <duff@adacore.com>
3881 * gnat_ugn.texi: Fix typo.
3883 2011-08-02 Vincent Celier <celier@adacore.com>
3885 * make.adb (Gnatmake): Use MLib.Tgt.Archive_Ext as the extension of
3886 archive file name. Do not use the full path name of archives for Open
3889 2011-08-02 Robert Dewar <dewar@adacore.com>
3891 * sem_ch12.adb, sem_ch11.adb: New calling sequence for
3892 Analyze_Aspect_Specifications
3894 (Analyze_Aspect_Specifications): New handling for boolean aspects
3895 * sem_ch13.ads (Analyze_Aspect_Specifications): New calling sequence
3896 * sem_ch3.adb, sem_ch6.adb, sem_ch7.adb, sem_ch9.adb: New calling
3897 sequence for Analyze_Aspect_Specifications
3898 * sem_prag.adb (Analyze_Pragma): Remove use of Aspect_Cancel entirely
3899 * sinfo.ads, sinfo.adb (Aspect_Cancel): Remove, no longer used
3901 2011-08-02 Robert Dewar <dewar@adacore.com>
3903 * freeze.adb (Freeze_Entity): Remove handling of delayed boolean
3904 aspects, since these no longer exist.
3906 2011-08-02 Robert Dewar <dewar@adacore.com>
3908 * par-ch13.adb (Aspect_Specifications_Present): Always return false on
3909 semicolon, do not try to see if there are aspects following it.
3910 * par-ch3.adb (P_Declarative_Items): Better message for unexpected
3913 2011-08-02 Robert Dewar <dewar@adacore.com>
3915 * sem_ch8.adb, aspects.ads: Minor reformatting.
3917 2011-08-02 Eric Botcazou <ebotcazou@adacore.com>
3919 * sem_ch13.ads (Analyze_Aspect_Specification): Add pragma Inline.
3920 * sem_ch13.adb (Analyze_Non_Null_Aspect_Specifications): New procedure
3922 (Analyze_Aspect_Specifications): ...here. Call above procedure.
3924 2011-08-02 Yannick Moy <moy@adacore.com>
3926 * exp_ch6.adb (Expand_N_Subprogram_Declaration): issue error in formal
3927 mode on subprogram declaration outside of package specification, unless
3928 it is followed by a pragma Import
3929 * sem_ch3.adb (Access_Definition, Access_Subprogram_Declaration,
3930 Access_Type_Declaration): issue error in formal mode on access type
3931 (Analyze_Incomplete_Type_Decl): issue error in formal mode on
3933 (Analyze_Object_Declaration): issue error in formal mode on object
3934 declaration which does not respect SPARK restrictions
3935 (Analyze_Subtype_Declaration): issue error in formal mode on subtype
3936 declaration which does not respect SPARK restrictions
3937 (Constrain_Decimal, Constrain_Float, Constrain_Ordinary_Fixed): issue
3938 error in formal mode on digits or delta constraint
3939 (Decimal_Fixed_Point_Type_Declaration): issue error in formal mode on
3940 decimal fixed point type
3941 (Derived_Type_Declaration): issue error in formal mode on derived type
3942 other than type extensions of tagged record types
3943 * sem_ch6.adb (Process_Formals): remove check in formal mode, redundant
3944 with check on access definition
3945 * sem_ch9.adb (Analyze_Protected_Definition): issue error in formal
3946 mode on protected definition.
3947 (Analyze_Task_Definition): issue error in formal mode on task definition
3949 2011-08-02 Robert Dewar <dewar@adacore.com>
3951 * make.adb, sem_ch8.adb, s-inmaop-vxworks.adb: Minor reformatting.
3953 2011-08-02 Javier Miranda <miranda@adacore.com>
3955 * sem_ch6.adb (Can_Override_Operator): New function.
3956 (Verify_Overriding_Indicator): Add missing code to check overriding
3957 indicator in operators. Fixes regression.
3958 (Check_Overriding_Indicator): Minor reformating after replacing the
3959 code that evaluates if the subprogram can override an operator by
3960 invocations to the above new function.
3962 (Write_Field26_Name): Add missing code to ensure that, following
3963 the documentation in einfo.ads, this field is not shown as attribute
3964 "Static_Initialization" on non-dispatching functions.
3966 2011-08-02 Jose Ruiz <ruiz@adacore.com>
3968 * sem_res.adb (Resolve_Call): A call to
3969 Ada.Real_Time.Timing_Events.Set_Handler violates restriction
3970 No_Relative_Delay (AI-0211) only when it sets a relative timing event,
3971 i.e., when the second parameter is of type Time_Span.
3973 2011-08-02 Vincent Celier <celier@adacore.com>
3975 * make.adb (Gnatmake): use <library dir>/lib<library name>.a to link
3976 with an archive instead of -L<library dir> -l<library name>.
3978 2011-08-02 Ed Schonberg <schonberg@adacore.com>
3980 * sem_ch8.adb (Analyze_Use_Type): If the clause is being re-analyzed,
3981 mark the base types In_Use in addition to making the operations
3984 2011-08-02 Ed Falis <falis@adacore.com>
3986 * init.c: add and setup __gnat_signal_mask for the exception signals
3987 * s-inmaop-vxworks.adb: new file.
3988 * s-intman-vxworks.adb: remove unnecessary initializations and
3990 * s-intman-vxworks.ads: remove unnecessary variable
3991 * s-taprop-vxworks.adb: simplify signal initialization
3993 2011-08-02 Robert Dewar <dewar@adacore.com>
3995 * sem_ch8.adb: Minor code reorganization, comment updates.
3997 2011-08-02 Robert Dewar <dewar@adacore.com>
3999 * sem_res.adb (Matching_Static_Array_Bounds): Moved to Sem_Util
4000 * sem_util.ads, sem_util.adb (Matching_Static_Array_Bounds): Moved
4002 (Matching_Static_Array_Bounds): Use Is_Ok_Static_Expression
4003 (Matching_Static_Array_Bounds): Moved here from Sem_Res
4005 2011-08-02 Ed Schonberg <schonberg@adacore.com>
4007 * atree.h, atree.ads, atree.adb: New subprograms to manipulate Elist5.
4008 * par_ch8.adb (P_Use_Type): initialize Used_Operations for node.
4009 * sinfo.ads, sinfo.adb (Used_Operations): new attribute of
4010 use_type_clauses, to handle more efficiently use_type and use_all_type
4012 * sem_ch8.adb: Rewrite Use_One_Type and End_Use_Type to handle the
4013 Ada2012 Use_All_Type clause.
4014 (Use_Class_Wide_Operations): new procedure.
4016 2011-08-02 Robert Dewar <dewar@adacore.com>
4018 * exp_util.adb, par-ch10.adb, par-ch6.adb, sem.adb, sem_ch6.adb,
4019 sem_ch6.ads, sinfo.adb, sinfo.ads, sprint.adb: Change parameterized
4020 expression to expression function.
4022 2011-08-02 Ed Schonberg <schonberg@adacore.com>
4024 * sem_ch4.adb: transform simple Ada2012 membership into equality only
4025 if types are compatible.
4027 2011-08-02 Yannick Moy <moy@adacore.com>
4029 * sem_res.adb (Matching_Static_Array_Bounds): new function which
4030 returns True if its argument array types have same dimension and same
4031 static bounds at each index.
4032 (Resolve_Actuals): issue an error in formal mode on actuals passed as
4033 OUT or IN OUT paramaters which are not view conversions in SPARK.
4034 (Resolve_Arithmetic_Op): issue an error in formal mode on
4035 multiplication or division with operands of fixed point types which are
4036 not qualified or explicitly converted.
4037 (Resolve_Comparison_Op): issue an error in formal mode on comparisons of
4038 Boolean or array type (except String) operands.
4039 (Resolve_Equality_Op): issue an error in formal mode on equality
4040 operators for array types other than String with non-matching static
4042 (Resolve_Logical_Op): issue an error in formal mode on logical operators
4043 for array types with non-matching static bounds. Factorize the code in
4044 Matching_Static_Array_Bounds.
4045 (Resolve_Qualified_Expression): issue an error in formal mode on
4046 qualified expressions for array types with non-matching static bounds.
4047 (Resolve_Type_Conversion): issue an error in formal mode on type
4048 conversion for array types with non-matching static bounds
4050 2011-08-02 Robert Dewar <dewar@adacore.com>
4052 * par-ch10.adb: Minor code reorganization (use Nkind_In).
4054 2011-08-02 Ed Schonberg <schonberg@adacore.com>
4056 * par-ch9.adb: save location of entry for proper error message.
4058 2011-08-02 Javier Miranda <miranda@adacore.com>
4060 * sem_type.ads, sem_type.adb (Is_Ancestor): Addition of a new formal
4061 (Use_Full_View) which permits this routine to climb through the
4062 ancestors using the full-view of private parents.
4063 * sem_util.adb (Collect_Interfaces_Info, Implements_Interface): Set
4064 Use_Full_View to true in calls to Is_Ancestor.
4065 * sem_disp.adb (Override_Dispatching_Operation): Set Use_Full_View to
4066 true in call to Is_Ancestor.
4067 * exp_ch3.adb (Build_Offset_To_Top_Functions, Initialize_Tag): Set
4068 Use_Full_View to true in call to Is_Ancestor.
4069 * exp_ch7.adb (Controller_Component): Set Use_Full_View to true in
4070 call to Is_Ancestor.
4071 * exp_ch4.adb (Expand_N_Type_Conversion, Tagged_Membership): Set
4072 Use_Full_View to true in calls to Is_Ancestor.
4073 * exp_disp.adb (Expand_Interface_Actuals, Make_Secondary_DT, Make_DT,
4074 Make_Select_Specific_Data_Table, Register_Primitive,
4075 Set_All_DT_Position): Set Use_Full_View to true in calls to Is_Ancestor.
4076 * exp_intr.adb (Expand_Dispatching_Constructor_Call): Set Use_Full_View
4077 to true in call to Is_Ancestor.
4078 * exp_util.adb (Find_Interface_ADT, Find_Interface_Tag): Set
4079 Use_Full_View to true in calls to Is_Ancestor.
4081 (Write_Call_Info): Set Use_Full_View to true in call to Is_Ancestor.
4082 (Write_Type_Info): Set Use_Full_View to true in call to Is_Ancestor.
4084 2011-08-02 Robert Dewar <dewar@adacore.com>
4086 * gnat_rm.texi: Minor reformatting.
4087 * sem_prag.adb: Minor reformatting.
4089 2011-08-02 Tristan Gingold <gingold@adacore.com>
4091 * vms_data.ads: Add VMS qualifier for -gnateP.
4093 2011-08-02 Robert Dewar <dewar@adacore.com>
4095 * par-ch13.adb (P_Aspect_Specification): New meaning of Decl = Empty
4096 * par-ch7.adb (P_Package): Proper placement of aspects for package
4098 * par-endh.adb (Check_End): Ad Is_Sloc parameter
4099 (End_Statements): Add Is_Sloc parameterr
4100 * par.adb (P_Aspect_Specification): New meaning of Decl = Empty
4101 (Check_End): Ad Is_Sloc parameter
4102 (End_Statements): Add Is_Sloc parameterr
4104 2011-08-02 Vincent Celier <celier@adacore.com>
4106 * ug_words: Add VMS qualifier equivalent to -gnateP:
4107 /SYMBOL_PREPROCESSING.
4109 2011-08-02 Jose Ruiz <ruiz@adacore.com>
4111 * gnat-style.texi: For hexadecimal numeric literals the typical
4112 grouping of digits is 4 to represent 2 bytes.
4113 A procedure spec which is split into several lines is indented two
4116 2011-08-02 Yannick Moy <moy@adacore.com>
4118 * exp_aggr.adb (Is_Others_Aggregate): move function to other unit.
4119 * sem_aggr.adb, sem_aggr.ads (Is_Others_Aggregate): move function here
4120 (Resolve_Aggregate): issue errors in formal modes when aggregate is not
4122 (Resolve_Array_Aggregate): issue errors in formal modes on non-static
4123 choice in array aggregate
4124 (Resolve_Extension_Aggregate): issue errors in formal modes on subtype
4126 (Resolve_Record_Aggregate): issue errors in formal modes on mixed
4127 positional and named aggregate for record, or others in record
4128 aggregate, or multiple choice in record aggregate
4129 * sem_res.adb (Resolve_Logical_Op): issue errors in formal mode when
4130 array operands to logical operations AND, OR and XOR do not have the
4131 same static lower and higher bounds
4132 * sem_ch5.adb, sinfo.ads: Correct typos in comments
4134 2011-08-01 Robert Dewar <dewar@adacore.com>
4136 * sem_util.ads, sem_util.adb, sem_ch6.adb (Last_Source_Statement):
4137 Replaces Last_Source_Node_In_Sequence.
4138 * err_vars.ads (Error_Msg_Lang): 16 is OK, don't need 4K
4139 * errout.adb (Set_Error_Msg_Lang): Takes arg with no parens, but stores
4140 parens and blank in string (this was inconsistently implemented).
4142 (Set_Error_Msg_Lang): Takes arg with no parens, but stores parens and
4143 blank in string (this was inconsistently implemented).
4145 (Set_Global_Switches): Set formal mode switches appropriately
4146 * opt.ads, opt.adb: Formal mode is now global switches, more consistent
4148 (Analyze_Pragma, case SPARK_95): Set opt switches appropriately and
4149 call Set_Error_Msg_Lang to set "spark" as language name.
4150 * par.adb: Remove unnecessary call to set formal language for errout
4151 * sem_prag.adb (P_Pragma, case SPARK_95): Set opt switches
4152 appropriately and call Set_Error_Msg_Lang to set "spark" as language
4154 * sem_ch4.adb (Analyze_Concatenation_Operand): remove procedure and
4155 calls to it, moved after resolution so that types are known
4156 * sem_res.adb (Resolve_Op_Concat): issue an error in formal mode if
4157 result of concatenation is not of type String
4158 (Resolve_Op_Concat_Arg): issue an error in formal mode if an operand of
4159 concatenation is not properly restricted
4160 * gnat_rm.texi: Add doc on pragma Spark_95.
4161 * gcc-interface/Makefile.in: Remove obsolete target pairs for
4162 Interfaces.C.* on VMS. Remove s-parame-vms-restrict.ads.
4163 * gcc-interface/Make-lang.in: Update dependencies.
4165 2011-08-01 Javier Miranda <miranda@adacore.com>
4167 * sem_disp.adb (Override_Dispatching_Operation): Enforce strictness of
4168 condition that detects if the overridden operation must replace an
4171 2011-08-01 Javier Miranda <miranda@adacore.com>
4173 * exp_ch4.adb (Expand_N_Case_Expression): Propagate to the expanded
4174 code declarations inserted by Insert_Actions in each alternative of the
4175 N_Case_Expression node.
4177 2011-08-01 Robert Dewar <dewar@adacore.com>
4179 * sem_ch6.adb: Minor code reorganization.
4180 * sem_util.adb: Minor reformatting.
4182 2011-08-01 Pascal Obry <obry@adacore.com>
4184 * prj-env.adb: Remove <prefix>/lib/gpr/<target> project search path.
4185 * gnat_ugn.texi: Add documentation for VERSIONINFO Windows resource.
4187 2011-08-01 Yannick Moy <moy@adacore.com>
4189 * par-ch4.adb (P_Name): issue a syntax error in SPARK mode on character
4190 literal or operator symbol which is prefixed
4191 * sem_attr.adb (Analyze_Access_Attribute): issue an error in formal
4192 mode on access attributes.
4193 * sem_ch4.adb (Analyze_Concatenation_Operand): new procedure to check
4194 that concatenation operands are properly restricted in formal mode
4195 (Analyze_Concatenation, Analyze_Concatenation_Rest): call new procedure
4196 Analyze_Concatenation_Operand. Issue an error in formal mode if the
4197 result of the concatenation has a type different from String.
4198 (Analyze_Conditional_Expression, Analyze_Explicit_Dereference,
4199 Analyze_Quantified_Expression, Analyze_Slice,
4200 Analyze_Null): issue an error in formal mode on unsupported constructs
4202 (Analyze_Block_Statement): only issue error on source block statement
4203 * sem_util.ads, sem_util.adb (Last_Source_Node_In_Sequence): new
4204 function which returns the last node in a list of nodes for which
4205 Comes_From_Source returns True, if any
4206 * sem_ch6.adb (Check_Missing_Return): minor refactoring to use
4207 Last_Source_Node_In_Sequence
4208 * sem_ch8.adb (Analyze_Exception_Renaming, Analyze_Generic_Renaming,
4209 Analyze_Object_Renaming, Analyze_Use_Package): issue an error in formal
4210 mode on unsupported constructs
4211 * sem_ch9.adb Do not return after issuing error in formal mode, as the
4212 rest of the actions may be needed later on since the error is marked as
4214 * sinfo.ads: Typos in comments.
4216 2011-08-01 Pascal Obry <obry@adacore.com>
4218 * projects.texi: Minor editing.
4220 2011-08-01 Yannick Moy <moy@adacore.com>
4222 * err_vars.ads (Error_Msg_Lang, Error_Msg_Langlen): new variables for
4223 insertion character ~~
4224 * errout.ads, errout.adb (Formal_Error_Msg_...): remove procedures
4225 (Set_Error_Msg_Lang): new procedure which fixes the language for use
4226 with insertion character ~~
4227 (Set_Msg_Text): treat insertion character ~~
4228 * par-ch4.adb, par-ch5.adb, par-endh.adb, sem_attr.adb, sem_ch11.adb,
4229 sem_ch3.adb, sem_ch5.adb, sem_ch9.adb, sem_util.adb: Replace calls to
4230 Formal_Error_Msg_... procedures by equivalent Error_Msg_...
4231 procedures. Favor calls to Error_Msg_F(E) over Error_Msg_N(E). Make
4232 errors related to the formal language restriction not serious
4233 (insertion character |).
4234 * par.adb (Par): set formal language for error messages if needed
4235 * sem_ch6.adb (Check_Missing_Return): take into account possible
4236 generated statements at the end of the function
4237 * snames.ads-tmpl (Name_SPARK_95, Pragma_SPARK_95): new variable and
4238 enumeration value to define a new pragma SPARK_95
4239 * opt.ads, opt.adb (SPARK_Version_Type, SPARK_Version_Default,
4240 SPARK_Version): new type and variables to store the SPARK version
4242 (SPARK_Mode): return True when SPARK_Version is set
4243 * par-prag.adb: Correct indentation
4244 (Prag): take Pragma_SPARK_95 into account
4245 * sem_prag.adb (Set_Mechanism_Value, Sig_Flags): take Pragma_SPARK_95
4248 2011-08-01 Robert Dewar <dewar@adacore.com>
4250 * sem_ch3.adb, sem_ch3.ads, sem_ch5.adb, prj-part.adb, par-ch4.adb,
4251 sem_util.adb, sem_ch4.adb, sem_ch6.adb, sem_ch6.ads, sem_ch8.adb,
4252 sem_ch8.ads, sem_ch13.ads, par-ch5.adb, prj-env.ads: Minor reformatting
4254 2011-08-01 Pascal Obry <obry@adacore.com>
4256 * prj-part.ads, prj-part.adb (Parse): Add Target_Name parameter. Pass
4257 Target_Name to Get_Path call.
4258 (Parse_Single_Project): Likewise.
4259 (Post_Parse_Context_Clause): Likewise.
4260 * prj-env.ads, prj-env.adb (Find_Project): Add Target_Name parameter.
4261 Call Initialise_Project_Path with the proper Target_Name.
4262 (Initialize_Project_Path): Add <gnat_root>/<target_name>/lib/gnat
4264 (Get_Path): Add Target_Name parameter. Call Initialise_Project_Path
4265 with the proper Target_Name.
4266 * prj-conf.adb (Get_Or_Create_Configuration_File): Pass Target_Name to
4268 (Parse_Project_And_Apply_Config): Likewise.
4269 * prj-makr.adb (Initialize): Pass empty Target_Name to Parse routine.
4270 This is fine as this part of the code is supporting only native
4272 * prj-pars.adb (Parse): Pass empty Target_Name to Parse routine. This
4273 is fine as this part of the code is supporting only native compilation.
4275 2011-08-01 Yannick Moy <moy@adacore.com>
4277 * sem_util.adb (Enter_Name): issue error in formal mode on declaration
4278 of homonym, unless the homonym is one of the cases allowed in SPARK
4279 * par-ch5.adb (Parse_Decls_Begin_End): issue error in SPARK mode for
4280 package declaration occurring after a body.
4282 2011-08-01 Robert Dewar <dewar@adacore.com>
4284 * checks.adb, exp_ch4.adb: Minor reformatting.
4286 2011-08-01 Javier Miranda <miranda@adacore.com>
4288 * einfo.ads (Access_Disp_Table): Fix documentation.
4289 (Dispatch_Table_Wrappers): Fix documentation.
4291 2011-08-01 Pascal Obry <obry@adacore.com>
4293 * prj-env.adb, prj-env.ads: Minor reformatting.
4295 2011-08-01 Yannick Moy <moy@adacore.com>
4297 * sem_util.ads, sem_util.adb, par.adb, par_util.adb
4298 (Formal_Error_Msg, Formal_Error_Msg_N, Formal_Error_Msg_SP): move
4299 procedures out of these packages.
4300 * errout.ads, errout.adb
4301 (Formal_Error_Msg, Formal_Error_Msg_N, Formal_Error_Msg_SP): move
4302 procedures in of this package
4303 (Formal_Error_Msg_NE): new procedure for wrapper on Error_Msg_NE
4304 * par-ch5.adb (Parse_Decls_Begin_End): issue syntax error in SPARK mode
4305 on misplaced later vs initial declarations, like in Ada 83
4306 * sem_attr.adb (Processing for Analyze_Attribute): issue error in
4307 formal mode on attribute of private type whose full type declaration
4309 * sem_ch3.adb (Analyze_Declarations): issue error in formal mode on a
4310 package declaration inside a package specification
4311 (Analyze_Full_Type_Declaration): issue error in formal mode on
4312 controlled type or discriminant type
4313 * sem_ch6.adb (Analyze_Subprogram_Specification): only issue error on
4314 user-defined operator means that it should come from the source
4315 (New_Overloaded_Entity): issue error in formal mode on overloaded
4317 * sem_ch6.ads, sem_ch13.ads: typos in comments.
4319 2011-08-01 Thomas Quinot <quinot@adacore.com>
4321 * atree.adb: Minor reformatting.
4322 * checks.adb: Minor reformatting.
4324 2011-08-01 Vincent Celier <celier@adacore.com>
4326 * s-parame-vms-ia64.ads: Fix typo in comment
4328 * s-parame-vms-restrict.ads: Removed, unused.
4330 2011-08-01 Javier Miranda <miranda@adacore.com>
4333 (Is_Variable_Size_Array): Remove local subprogram Is_Constant_Bound.
4335 (Constrain_Index): Remove side effects in the evaluation of the bounds.
4336 * sem_ch3.ads, sem_ch3.adb
4337 (Is_Constant_Bound): New extended version of the subprogram that was
4338 previously located inside function Exp_Ch3.Is_Variable_Size_Array.
4339 Moved here since it is shared by routines of sem_ch3 and exp_ch3.
4340 * sem_aux.ads (Constant_Value): Fix typo in comment.
4341 * checks.adb (Generate_Index_Checks): New implementation which, for
4342 array objects with constant bounds, generates the runtime check
4343 referencing the bounds of the array type. For other cases this routine
4344 provides its previous behavior obtaining such values from the array
4346 * sem_res.adb (Set_Slice_Subtype): Link a copied range subtree with its
4348 * atree.adb (New_Copy): Reset flag Is_Overloaded in the new copy since
4349 we cannot have semantic interpretations of the new node.
4351 2011-08-01 Ed Schonberg <schonberg@adacore.com>
4353 * sem_ch6.adb (Fully_Conformant_Expressions): handle quantified
4356 2011-08-01 Arnaud Charlet <charlet@adacore.com>
4358 * sem_ch8.adb: Minor code editing.
4359 * s-vxwext.adb: Remove trailing space.
4360 * freeze.adb, freeze.ads, errout.ads, erroutc.adb: Fix GPLv3 header for
4361 consistency with other files.
4363 2011-08-01 Thomas Quinot <quinot@adacore.com>
4365 * s-auxdec.ads, s-auxdec-vms_64.ads: Minor reformatting.
4367 2011-08-01 Ed Schonberg <schonberg@adacore.com>
4369 * par-ch10.adb: reject parameterized expressions as compilation unit.
4370 * sem_ch4.adb: handle properly conditional expression with overloaded
4371 then_clause and no else_clause.
4373 2011-08-01 Tristan Gingold <gingold@adacore.com>
4375 * s-parame-vms-alpha.ads, s-parame-vms-ia64.ads: Redeclare C_Address
4376 like done by System.Aux_DEC.
4377 * env.c (__gnat_setenv) [VMS]: Put logicals into LNM$PROCESS table.
4379 2011-08-01 Yannick Moy <moy@adacore.com>
4381 * par-endh.adb (Check_End): issue a syntax error in SPARK mode for
4382 missing label at end of declaration (subprogram or package)
4383 * par-ch4.adb (P_Name): issue a syntax error in SPARK mode for mixing
4384 of positional and named parameter association
4385 * par.adb, par-util.adb (Formal_Error_Msg_SP): new wrapper on
4386 Error_Msg_SP which adds a prefix to the error message giving the name
4387 of the formal language analyzed
4388 * sem_ch6.adb (Analyze_Return_Type): issue an error in formal mode for
4389 access result type in subprogram, unconstrained array as result type,.
4390 (Analyze_Subprogram_Declaration): issue an error in formal mode for null
4392 * sem_ch8.adb: Code clean up.
4394 2011-08-01 Javier Miranda <miranda@adacore.com>
4396 * sem_ch7.adb (Uninstall_Declarations): Remove useless code.
4397 * einfo.ads (Access_Disp_Table): Fix documentation.
4398 (Dispatch_Table_Wrappers): Fix documentation.
4399 * einfo.adb (Access_Disp_Table, Dispatch_Table_Wrappers,
4400 Set_Access_Disp_Table, Set_Dispatch_Table_Wrappers): Fix the assertions
4401 to enforce the documentation of this attribute.
4402 (Set_Is_Interface): Cleanup the assertion.
4403 * exp_ch4.adb (Expand_Allocator_Expression, Tagged_Membership): Locate
4404 the Underlying_Type entity before reading attribute Access_Disp_Table.
4405 * exp_disp.adb (Expand_Dispatching_Call, Expand_Interface_Conversion):
4406 Locate the Underlying_Type before reading attribute Access_Disp_Table.
4407 * exp_aggr.adb (Build_Array_Aggr_Code, Build_Record_Aggr_Code): Locate
4408 the Underlying_Type entity before reading attribute Access_Disp_Table.
4409 * exp_ch3.adb (Build_Record_Init_Proc, Expand_N_Object_Declaration):
4410 Locate the Underlying_Type entity before reading attribute
4413 2011-08-01 Ed Schonberg <schonberg@adacore.com>
4415 * s-poosiz.ads: Additional overriding indicators.
4417 2011-08-01 Yannick Moy <moy@adacore.com>
4419 * sem_ch5.adb (Analyze_Exit_Statement): add return after error in
4421 (Analyze_Iteration_Scheme): issue error in formal mode when loop
4422 parameter specification does not include a subtype mark.
4423 * sem_ch6.adb (Analyze_Abstract_Subprogram_Declaration): issue error in
4424 formal mode on abstract subprogram.
4425 (Analyze_Subprogram_Specification): issue error in formal mode on
4426 user-defined operator.
4427 (Process_Formals): issue error in formal mode on access parameter and
4429 * sem_ch9.adb (Analyze_Abort_Statement,
4430 Analyze_Accept_Statement, Analyze_Asynchronous_Select,
4431 Analyze_Conditional_Entry_Call, Analyze_Delay_Relative,
4432 Analyze_Delay_Until, Analyze_Entry_Call_Alternative,
4433 Analyze_Requeue, Analyze_Selective_Accept,
4434 Analyze_Timed_Entry_Call): issue error in formal mode on such constructs
4435 * sem_ch11.adb (Analyze_Raise_Statement, Analyze_Raise_xxx_Error):
4436 issue error in formal mode on user-defined raise statement.
4438 2011-08-01 Thomas Quinot <quinot@adacore.com>
4440 * sem_ch6.adb (Enter_Overloaded_Entity): Do not warn about a
4441 declaration being hidden when overriding an implicit inherited
4443 * par-ch10.adb (P_Compilation_Unit): In syntax check only mode
4444 (-gnats), do not complain about a source file that contains only a
4447 2011-08-01 Ed Schonberg <schonberg@adacore.com>
4449 * sem_ch5.adb (Analyze_Iterator_Scheme): Do not overwrite type of loop
4450 variable if already set.
4452 2011-08-01 Arnaud Charlet <charlet@adacore.com>
4454 * g-socket-dummy.adb, s-osinte-linux.ads, g-socket-dummy.ads,
4455 g-debuti.adb, g-tasloc.adb, g-debuti.ads, g-tasloc.ads,
4456 s-osinte-hpux.ads, g-sercom.adb, g-soliop-solaris.ads, g-sercom.ads,
4457 g-sptain.ads, g-curexc.ads, s-tasloc.adb, s-tasloc.ads, s-tataat.adb,
4458 g-ctrl_c.adb, a-reatim.adb, s-tataat.ads, g-dirope.adb, g-ctrl_c.ads,
4459 g-dirope.ads, g-boubuf.adb, g-calend.adb, g-boubuf.ads, g-souinf.ads,
4460 g-table.adb, g-bytswa-x86.adb, g-wispch.adb, g-io.adb, g-table.ads,
4461 g-wispch.ads, g-io.ads, g-memdum.adb, g-memdum.ads, g-busorg.adb,
4462 g-busorg.ads, g-regpat.adb, g-sothco-dummy.adb, g-encstr.adb,
4463 g-regpat.ads, g-sothco-dummy.ads, s-osinte-aix.ads, g-encstr.ads,
4464 g-sercom-mingw.adb, s-mastop-vms.adb, g-diopit.adb, g-diopit.ads,
4465 s-vxwext.adb, g-dyntab.adb, g-dyntab.ads, g-crc32.adb,
4466 g-sercom-linux.adb, g-crc32.ads, s-regpat.adb, g-flocon.ads,
4467 s-regpat.ads, g-stheme.adb, g-sestin.ads, s-taspri-posix-noaltstack.ads,
4468 g-soliop.ads, s-inmaop-posix.adb, g-locfil.ads, g-enblsp-vms-alpha.adb,
4469 g-socthi-dummy.adb, g-socthi-dummy.ads, gnat.ads, g-moreex.adb,
4470 g-moreex.ads, g-dynhta.adb, g-dynhta.ads, g-deutst.ads, g-htable.adb,
4471 g-cgicoo.adb, g-htable.ads, g-cgicoo.ads, a-interr.adb,
4472 g-socthi-vms.adb, g-socthi-vms.ads, g-hesora.adb, g-bubsor.adb,
4473 g-hesora.ads, g-bubsor.ads, g-md5.adb, g-md5.ads, s-intman-irix.adb,
4474 s-htable.adb, s-osinte-vms.adb, s-htable.ads, s-osinte-vms.ads,
4475 s-taprob.adb, g-bytswa.adb, g-bytswa.ads, s-osinte-solaris-posix.ads,
4476 a-suenco.adb, g-comver.adb, g-comver.ads, g-exctra.adb,
4477 s-osinte-solaris.adb, g-exctra.ads, s-osinte-irix.ads,
4478 s-osinte-solaris.ads, a-caldel-vms.adb, g-socthi-vxworks.adb,
4479 g-expect.adb, g-socthi-vxworks.ads, g-expect.ads, g-comlin.ads,
4480 g-heasor.adb, g-heasor.ads, g-traceb.adb, g-traceb.ads, g-decstr.adb,
4481 g-spipat.adb, g-decstr.ads, g-spipat.ads, s-mastop-tru64.adb,
4482 g-except.ads, g-thread.adb, g-hesorg.adb, g-thread.ads, g-hesorg.ads,
4483 g-expect-vms.adb, a-stuten.ads, g-spchge.adb, g-spchge.ads,
4484 g-u3spch.adb, g-u3spch.ads, g-spitbo.adb, g-spitbo.ads,
4485 s-osinte-dummy.ads, s-osinte-posix.adb, g-pehage.adb, g-pehage.ads,
4486 s-gloloc-mingw.adb, g-sha1.ads, s-traceb-hpux.adb,
4487 g-trasym-unimplemented.adb, g-trasym-unimplemented.ads, g-io_aux.adb,
4488 g-regexp.adb, g-io_aux.ads, g-socthi-mingw.adb, g-regexp.ads,
4489 s-osinte-hpux-dce.adb, g-socthi-mingw.ads, g-cgi.adb,
4490 s-osinte-hpux-dce.ads, g-cgi.ads, g-byorma.adb, g-boumai.ads,
4491 g-byorma.ads, a-caldel.adb, s-regexp.adb, s-regexp.ads,
4492 g-soliop-mingw.ads, g-sptavs.ads, s-osinte-tru64.ads, g-speche.adb,
4493 g-speche.ads, g-socthi.adb, g-stsifd-sockets.adb, g-socthi.ads,
4494 s-osinte-darwin.ads, i-vxwork-x86.ads, g-awk.adb, i-vxwork.ads,
4495 g-awk.ads, g-zspche.adb, g-zspche.ads, g-socket.adb, g-sptabo.ads,
4496 g-socket.ads, g-semaph.adb, g-semaph.ads, s-taspri-posix.ads,
4497 g-enblsp-vms-ia64.adb, g-cgideb.adb, g-cgideb.ads, g-sothco.adb,
4498 s-osinte-freebsd.ads, g-sothco.ads, g-catiio.adb, g-casuti.adb,
4499 g-catiio.ads, g-casuti.ads, g-trasym.adb, g-trasym.ads, s-casuti.adb,
4500 g-os_lib.adb, s-traceb-mastop.adb, g-busora.adb, s-interr-dummy.adb,
4501 g-busora.ads, g-enutst.ads, s-os_lib.adb, a-tasatt.adb,
4502 s-osinte-mingw.ads: Update to GPLv3 run-time license.
4503 Use GNAT instead of GNARL.
4505 2011-08-01 Bob Duff <duff@adacore.com>
4507 * a-cdlili.ads, a-cihama.ads, a-coinve.ads, a-ciorse.ads, a-coorma.ads,
4508 a-cidlli.ads, a-ciormu.ads, a-cihase.ads, a-cohama.ads, a-coorse.ads,
4509 a-ciorma.ads, a-coormu.ads, a-convec.ads, a-cohase.ads: Minor
4512 2011-08-01 Yannick Moy <moy@adacore.com>
4514 * debug.adb (d.D) reverve flag for the SPARK mode
4515 (d.E) reverve flag for SPARK generation mode
4516 (d.F) reverve flag for Why generation mode
4517 * opt.ads, opt.adb (ALFA_Mode, ALFA_Through_SPARK_Mode,
4518 ALFA_Through_Why_Mode, Formal_Verification_Mode, SPARK_Mode): New
4519 functions which return True when the corresponding modes are set
4520 (Formal_Language): return "spark" or "alfa" when in formal verification
4522 * sem_util.ads, sem_util.adb (Formal_Error_Msg): new wrapper on
4523 Error_Msg to prefix the error message with a tag giving the formal
4525 (Formal_Error_Msg_N): new wrapper on Error_Msg_N to prefix the error
4526 message with a tag giving the formal language
4527 * sem_ch5.adb (Analyze_Block_Statement): issue error in formal mode on
4529 (Analyze_Case_Statement): issue error in formal mode on case statement
4530 with a single "others" case alternative
4531 (Analyze_Exit_Statement): issue errors in formal mode on exit
4532 statements which do not respect SPARK restrictions
4533 (Analyze_Goto_Statement): issue error in formal mode on goto statement
4534 (Check_Unreachable_Code): always issue an error (not a warning) in
4535 formal mode on unreachable code (concerns both code after an infinite
4536 loop and after an unconditional jump, both not allowed in SPARK)
4537 * sem_ch6.adb (Analyze_Return_Statement): add call to
4538 Set_Return_Present for a procedure containing a return statement
4539 (already done for functions in Analyze_Function_Return)
4540 (Analyze_Function_Return): issue error in formal mode on extended
4541 return or if return is not last statement in function
4542 (Check_Missing_Return): issue error in formal mode if function does
4543 not end with return or if procedure contains a return
4544 * sem_ch8.ads, sem_ch8.adb (Has_Loop_In_Inner_Open_Scopes): new
4545 function to detect if there is an inner scope of its parameter S which
4548 2011-08-01 Thomas Quinot <quinot@adacore.com>
4550 * sem_ch6.ads: Minor reformatting.
4552 2011-08-01 Javier Miranda <miranda@adacore.com>
4554 * sem_util.adb (Abstract_Interface_List): Complete condition when
4555 processing private type declarations to avoid reading unavailable
4557 (Is_Synchronized_Tagged_Type): Complete condition when processing
4558 private extension declaration nodes to avoid reading unavailable
4561 2011-08-01 Thomas Quinot <quinot@adacore.com>
4563 * sem_ch3.adb: Minor reformatting.
4565 2011-08-01 Thomas Quinot <quinot@adacore.com>
4567 * s-parame-ae653.ads, s-parame-vms-alpha.ads, s-parame-hpux.ads,
4568 i-cpoint.adb, i-cstrin.adb, i-cpoint.ads, i-cstrin.ads,
4569 s-parame-vms-ia64.ads, s-parame.ads, i-c.ads, s-parame-vxworks.ads,
4570 s-parame-vms-restrict.ads: Remove duplicated Interfaces.C.* packages
4571 for VMS, instead parametrize the common implementation with
4572 System.Parameters declarations.
4574 2011-08-01 Eric Botcazou <ebotcazou@adacore.com>
4576 * gnat_rm.texi: Document limitation of Pragma No_Strict_Aliasing.
4578 2011-08-01 Tristan Gingold <gingold@adacore.com>
4580 * seh_init.c: Fix SEH handler installation on win64.
4582 2011-08-01 Ed Schonberg <schonberg@adacore.com>
4584 * sem_ch3.adb (Access_Subprogram_Declaration): in Asis mode, prevent
4585 double analysis of an anonymous access to subprogram, because it can
4586 lead to improper sharing of profiles and a back-end crash.
4588 2011-08-01 Robert Dewar <dewar@adacore.com>
4590 * make.adb, sem_ch4.adb: Minor reformatting.
4591 * gcc-interface/Make-lang.in: Update dependencies.
4592 * sem_util.adb, exp_ch5.adb: Minor reformatting.
4594 2011-08-01 Arnaud Charlet <charlet@adacore.com>
4596 * gnat_rm.texi: Fix definition of Long_Integer.
4598 2011-08-01 Ed Schonberg <schonberg@adacore.com>
4600 * exp_aggr.adb: check limit size of static aggregate unconditionally,
4601 to prevent storage exhaustion.
4602 * exp_ch7.adb (Clean_Simple_Protected_Objects): if the scope being
4603 finalized is a function body, insert the cleanup code before the final
4604 return statement, to prevent spurious warnings.
4605 * s-pooglo.ads: add overriding indicator.
4607 2011-08-01 Ed Schonberg <schonberg@adacore.com>
4609 * sem_ch4.adb (Operator_Check): improve error message when both a
4610 with_clause and a use_clause are needed to make operator usage legal.
4611 * sem_util.ads, sem_util.adb (Unit_Is_Visible): new predicate to
4612 determine whether a compilation unit is visible within an other,
4613 either through a with_clause in the current unit, or a with_clause in
4614 its library unit or one one of its parents.
4616 2011-08-01 Ed Schonberg <schonberg@adacore.com>
4618 * exp_ch5.adb (Expand_N_Iterator_Loop): handle properly an iterator
4619 over an arbitrary expression of an array or container type.
4620 * lib-xref.adb: clarify comment.
4622 2011-08-01 Bob Duff <duff@adacore.com>
4624 * einfo.ads: Minor reformatting.
4625 * debug.adb: Minor comment improvement.
4627 2011-08-01 Javier Miranda <miranda@adacore.com>
4629 * sem_ch4.adb (Try_Object_Operation): For class-wide subprograms do not
4630 consider hidden subprograms as valid candidates.
4632 2011-08-01 Arnaud Charlet <charlet@adacore.com>
4634 * make.adb (Compile): Strip -mxxx switches in CodePeer mode.
4636 2011-08-01 Vasiliy Fofanov <fofanov@adacore.com>
4638 * gnat_ugn.texi: Fix typo.
4640 2011-08-01 Robert Dewar <dewar@adacore.com>
4642 * i-cstrin.adb, sem_util.adb, exp_ch11.adb, sem_ch8.adb,
4643 lib-xref.adb: Minor reformatting
4645 2011-08-01 Gary Dismukes <dismukes@adacore.com>
4647 * exp_ch6.adb (Expand_N_Extended_Return_Statement): Replace test of
4648 when to generate a call to Move_Final_List.
4649 (Has_Controlled_Parts): Remove this function.
4651 2011-08-01 Geert Bosch <bosch@adacore.com>
4653 * par-ch3.adb (P_Discrete_Choice_List): Improve error message for extra
4656 2011-08-01 Thomas Quinot <quinot@adacore.com>
4658 * exp_ch11.adb (Expand_N_Raise_Statement): Mark N_Raise_xxx_Error for
4659 explicit raise of a predefined exception as Comes_From_Source if the
4660 original N_Raise_Statement comes from source.
4662 2011-08-01 Robert Dewar <dewar@adacore.com>
4664 * sinfo.ads: Add comment.
4665 * sem_ch6.adb: Minor reformatting.
4667 2011-08-01 Robert Dewar <dewar@adacore.com>
4669 * freeze.adb (Freeze_Entity): Refine check for bad component size
4670 clause to avoid rejecting confirming clause when atomic/aliased present.
4672 2011-08-01 Ed Schonberg <schonberg@adacore.com>
4674 * sem_ch8.adb (Find_Direct_Name, Analyze_Expanded_Name): use Is_LHS to
4675 better determine whether an entity reference is a write.
4676 * sem_util.adb (Is_LHS): refine predicate to handle assignment to a
4678 * lib-xref.adb (Output_References): Do no suppress a read reference at
4679 the same location as an immediately preceeding modify-reference, to
4680 handle properly in-out actuals.
4682 2011-08-01 Tristan Gingold <gingold@adacore.com>
4684 * env.c (__gnat_setenv) [VMS]: Refine previous change.
4686 2011-08-01 Quentin Ochem <ochem@adacore.com>
4688 * i-cstrin.adb (New_String): Changed implementation, now uses only the
4689 heap to compute the result.
4691 2011-08-01 Robert Dewar <dewar@adacore.com>
4693 * atree.ads: Minor reformatting.
4695 2011-08-01 Emmanuel Briot <briot@adacore.com>
4697 * g-expect.adb (Get_Command_Output): Fix memory leak.
4699 2011-08-01 Geert Bosch <bosch@adacore.com>
4701 * cstand.adb (P_Float_Type): New procedure to print the definition of
4702 predefined fpt types.
4703 (P_Mixed_Name): New procedure to print a name using mixed case
4704 (Print_Standard): Use P_Float_Type for printing floating point types
4705 * einfo.adb (Machine_Emax_Value): Add preliminary support for quad
4706 precision IEEE float.
4708 2011-08-01 Thomas Quinot <quinot@adacore.com>
4710 * sem_ch3.adb: Minor reformatting.
4712 2011-08-01 Ed Schonberg <schonberg@adacore.com>
4714 * sem_ch6.adb (Analyze_Parameterized_Expression): If the expression is
4715 the completion of a generic function, insert the new body rather than
4716 rewriting the original.
4718 2011-08-01 Yannick Moy <moy@adacore.com>
4720 * sinfo.ads, errout.ads: Typos in comments.
4722 2011-08-01 Robert Dewar <dewar@adacore.com>
4724 * par-endh.adb: Minor reformatting.
4726 2011-08-01 Robert Dewar <dewar@adacore.com>
4728 * aspects.ads, aspects.adb: Add aspects for library unit pragmas
4729 (Pre_Post_Aspects): New subtype.
4730 * par-ch12.adb (P_Generic): New syntax for aspects in packages
4731 * par-ch13.adb (P_Aspect_Specifications): Add Semicolon parameter
4732 * par-ch7.adb (P_Package): Remove Decl parameter
4733 (P_Package): Handle new syntax for aspects (before IS)
4734 * par-ch9.adb (P_Protected_Definition): Remove Decl parameter, handle
4736 (P_Task_Definition): Remove Decl parameter, handle new aspect syntax
4737 * par.adb (P_Aspect_Specifications): Add Semicolon parameter
4738 (P_Package): Remove Decl parameter
4739 * sem_ch13.adb (Analyze_Aspect_Specifications): Handle library unit
4741 * sem_ch7.adb (Analyze_Package_Declaration): Analyze new format aspect
4743 * sem_util.ads, sem_util.adb (Static_Boolean): New function
4744 * sinfo.ads: Document new syntax for aspects in packages etc.
4745 * sprint.adb: Handle new syntax of aspects before IS in package
4747 2011-08-01 Thomas Quinot <quinot@adacore.com>
4749 * atree.ads: Minor reformatting.
4750 * sem_prag.adb: Minor reformatting.
4752 2011-08-01 Robert Dewar <dewar@adacore.com>
4754 * exp_util.adb (Insert_Actions): Fix error in handling Actions for
4755 case expr alternative.
4757 2011-08-01 Ed Schonberg <schonberg@adacore.com>
4759 * sem_ch12.adb: Fix typo.
4761 2011-08-01 Geert Bosch <bosch@adacore.com>
4763 * sem_prag.adb (Check_No_Link_Name): New procedure.
4764 (Process_Import_Or_Interface): Use Check_No_Link_Name.
4765 * cstand.adb (Create_Standard): Use Esize (Standard_Long_Long_Float)
4766 instead of Standard_Long_Long_Float_Size global. Preparation for
4767 eventual removal of per type constants.
4768 * exp_util.ads (Get_Stream_Size): New function returning the stream
4769 size value of subtype E.
4770 * exp_util.adb (Get_Stream_Size): Implement new function.
4771 * exp_strm.adb (Build_Elementary_Input_Call): Use Get_Stream_Size
4773 * exp_attr.adb (Attribute_Stream_Size): Use Get_Stream_Size
4775 (Machine_Mantissa_Value): Handle 128-bit quad precision IEEE floats
4777 2011-08-01 Geert Bosch <bosch@adacore.com>
4779 * cstand.adb: Fix comments.
4780 * sem_prag.adb (Analyze_Pragma): Use List_Length instead of explicit
4783 2011-08-01 Robert Dewar <dewar@adacore.com>
4785 * exp_ch4.adb, sem_cat.adb: Minor reformatting.
4787 2011-08-01 Geert Bosch <bosch@adacore.com>
4789 * atree.ads: Fix comment.
4791 2011-08-01 Robert Dewar <dewar@adacore.com>
4793 * aspects.ads, aspects.adb (Aspect_Names): Moved from body to spec.
4794 * par-ch13.adb (P_Aspect_Specifications): Check misspelled aspect name.
4795 * par.adb: Add with for Namet.Sp.
4796 * par-tchk.adb: Minor reformatting.
4798 2011-08-01 Vincent Celier <celier@adacore.com>
4800 * mlib-tgt-specific-vms-alpha.adb, mlib-tgt-specific-vms-ia64.adb
4801 (Build_Dynamic_Library): Use new function Init_Proc_Name to get the name
4802 of the init procedure of a SAL.
4803 * mlib-tgt-vms_common.ads, mlib-tgt-vms_common.adb (Init_Proc_Name):
4806 2011-08-01 Thomas Quinot <quinot@adacore.com>
4808 * exp_ch4.adb, s-tasini.ads, sem_attr.adb, s-soflin.ads: Minor
4811 2011-08-01 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
4813 * adaint.c (__gnat_file_time_name_attr): Get rid of warning.
4815 2011-08-01 Thomas Quinot <quinot@adacore.com>
4817 * sem_util.adb, sem_util.ads (Has_Overriding_Initialize): Make function
4818 conformant with its spec (return True only for types that have
4819 an overriding Initialize primitive operation that prevents them from
4820 having preelaborable initialization).
4821 * sem_cat.adb (Validate_Object_Declaration): Fix test for preelaborable
4822 initialization for controlled types in Ada 2005 or later mode.
4824 2011-08-01 Robert Dewar <dewar@adacore.com>
4826 * aspects.ads, aspects.adb: Add aspect Type_Invariant, Precondition,
4828 (Same_Aspect): New function.
4829 * sem_ch13.adb (Analyze_Aspect_Specifications): Add aspect
4830 Type_Invariant, Precondition, Postcondition.
4831 * snames.ads-tmpl: Add Name_Type_Invariant.
4833 2011-08-01 Robert Dewar <dewar@adacore.com>
4835 * freeze.adb (Freeze_Entity): Don't call Check_Aspect_At_Freeze_Point
4837 (Freeze_All_Ent): Fix error in handling inherited aspects.
4838 * sem_ch13.adb (Analyze_Aspect_Specifications): Skip aspect that is
4839 already analyzed, but don't skip entire processing of a declaration,
4840 that's wrong in some cases of declarations being rewritten.
4841 (Analyze_Aspect_Specification): Set Is_Delayed_Aspect in aspects.
4842 Don't delay for integer, string literals
4843 Treat predicates in usual manner for delay, remove special case code,
4845 (Analyze_Freeze_Entity): Make call to Check_Aspect_At_Freeze_Point
4846 (Build_Predicate_Function): Update saved expression in aspect
4847 (Build_Invariant_Procedure): Update saved expression in aspect
4848 * exp_ch4.adb (Expand_N_Selected_Component): Only do the optimization
4849 of replacement of discriminant references if the reference is simple.
4851 2011-08-01 Robert Dewar <dewar@adacore.com>
4853 * aspects.ads, aspects.adb: Add Static_Predicate and Dynamic_Predicate.
4854 * sem_ch13.adb (Analyze_Aspect_Specification): Add processing for
4855 Static_Predicate and Dynamic_Predicate.
4856 (Build_Predicate_Function): Add processing for Static_Predicate
4857 and Dynamic_Predicate.
4858 * sinfo.ads, sinfo.adb (From_Dynamic_Predicate): New flag
4859 (From_Static_Predicate): New flag
4860 * snames.ads-tmpl: Add Name_Static_Predicate and Name_Dynamic_Predicate
4862 2011-08-01 Robert Dewar <dewar@adacore.com>
4864 * usage.adb: Documentation cleanup for Ada version modes in usage.
4865 * expander.adb: Minor reformatting.
4867 2011-08-01 Robert Dewar <dewar@adacore.com>
4869 * atree.ads: Minor comment fix.
4870 * a-stwifi.adb, a-stzfix.adb, a-strfix.adb, a-ztexio.ads, a-textio.ads,
4871 a-witeio.ads, sem_prag.adb: Minor reformatting.
4873 2011-08-01 Doug Rupp <rupp@adacore.com>
4875 * env.c (__gnat_setenv) [VMS]: Force 32bit on item list structure
4876 pointers. Use descrip.h header file for convenience. Add some
4879 2011-08-01 Robert Dewar <dewar@adacore.com>
4881 * freeze.adb (Freeze_Entity): Call Check_Aspect_At_Freeze_Point
4882 (Freeze_All): Call Check_Aspect_At_End_Of_Declarations
4883 * sem_ch13.ads, sem_ch13.adb (Check_Aspect_At_Freeze_Point):
4885 (Check_Aspect_At_End_Of_Declarations): New procedure
4886 (Analye_Aspect_Specification): Minor changes for above procedures
4887 * sinfo.ads, sinfo.adb (Is_Delayed_Aspect): Now set in aspect
4888 specification node as well.
4890 2011-08-01 Pascal Obry <obry@adacore.com>
4892 * adaint.c (_gnat_stat): GetFilesAttributesEx() would fail on special
4893 Windows files. Use GetFilesAttributes() in this case to check for file
4894 existence instead of returning with an error code.
4896 2011-08-01 Vincent Celier <celier@adacore.com>
4898 * a-stzfix.adb, a-stwifi.adb (Replace_Slice): Fixed computation when
4899 High is above Source length.
4901 2011-08-01 Robert Dewar <dewar@adacore.com>
4903 * a-ztexio.ads, a-textio.ads, a-witeio.ads: Fix comment.
4905 2011-08-01 Robert Dewar <dewar@adacore.com>
4907 * aspects.ads (Boolean_Aspects): New subtype.
4908 * exp_ch13.adb (Expand_Freeze_Entity): Fix errors in handling aspects
4909 for derived types in cases where the parent type and derived type have
4911 * freeze.adb (Freeze_Entity): Fix problems in handling derived type
4912 with aspects when parent type also has aspects.
4913 (Freeze_Entity): Deal with delay of boolean aspects (must evaluate
4914 boolean expression at this point).
4915 * sem_ch13.adb (Analyze_Aspect_Specifications): Delay all aspects in
4916 accordance with final decision on the Ada 2012 feature.
4917 * sinfo.ads, sinfo.adb (Is_Boolean_Aspect): New flag.
4919 2011-08-01 Matthew Heaney <heaney@adacore.com>
4921 * a-chtgbo.adb (Delete_Node_Sans_Free): Replace iterator with selector.
4923 2011-08-01 Pascal Obry <obry@adacore.com>
4925 * a-stzunb-shared.adb, a-strunb-shared.adb, a-stwiun-shared.adb:
4926 Fix Replace_Slice when High is above current string size.
4927 (Replace_Slice): Fix DL computation when High is above current
4930 2011-08-01 Gary Dismukes <dismukes@adacore.com>
4932 * gnat_rm.texi: Add documentation for pragma Static_Elaboration_Desired.
4934 2011-08-01 Matthew Heaney <heaney@adacore.com>
4936 * a-rbtgbo.adb (Delete_Node_Sans_Free): Fixed assignment to left child
4939 2011-08-01 Pascal Obry <obry@adacore.com>
4941 * a-stzunb-shared.adb, a-strunb-shared.adb, a-stwiun-shared.adb: Minor
4944 2011-08-01 Ed Schonberg <schonberg@adacore.com>
4946 * sem_attr.adb (Analyze_Attribute, case 'Access): Handle properly named
4947 access to protected subprograms in generic bodies.
4948 * sem_ch6.adb (Analyze_Subprogram_Declaration): If the context is a
4949 protected type, indicate that the convention of the subprogram is
4950 Convention_Protected, because it may be used in subsequent declarations
4951 within the protected declaration.
4953 2011-08-01 Vincent Celier <celier@adacore.com>
4955 * mlib-prj.adb (Build_Library): Use "ada_" as the prefix for the "init"
4956 and "final" procedures when the name of the library is "ada", to avoid
4957 duplicate symbols "adainit" and "adafinal" in executables.
4959 2011-08-01 Ed Schonberg <schonberg@adacore.com>
4961 * sem_attr.adb (Analyze_Attribute, case 'Result): Handle properly a
4962 quantified expression that appears within a postcondition and uses the
4963 Ada2012 'Result attribute.
4965 2011-07-28 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
4967 * init.c (__gnat_error_handler): Cast reason to int.
4968 (__gnat_install_handler): Explain sa_sigaction use.
4970 2011-07-24 Eric Botcazou <ebotcazou@adacore.com>
4972 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Subprogram_Type>: If the
4973 subprogram has copy-in copy-out parameters, try to promote the mode of
4974 the return type if it is passed in registers.
4976 2011-07-24 Eric Botcazou <ebotcazou@adacore.com>
4978 * gcc-interface/utils2.c (build_binary_op) <ARRAY_REF>: Do not mark the
4979 left operand as addressable.
4981 2011-07-24 Eric Botcazou <ebotcazou@adacore.com>
4983 * gcc-interface/gigi.h (build_function_stub): Remove.
4984 (build_return_expr): Likewise.
4985 (convert_vms_descriptor): Declare.
4986 * gcc-interface/utils.c (convert_vms_descriptor): Make global.
4987 (build_function_stub): Move to...
4988 * gcc-interface/utils2.c (build_return_expr): Move to...
4989 * gcc-interface/trans.c (build_function_stub): ...here.
4990 (build_return_expr): ...here.
4991 (Subprogram_Body_to_gnu): Add local variable for language_function.
4992 Disconnect the parameter attributes cache, if any, once done with it.
4993 Call end_subprog_body only after setting the end_locus.
4994 Build the stub associated with the function, if any, at the very end.
4995 (gnat_to_gnu) <N_Return_Statement>: Remove couple of useless local
4996 variables and streamline control flow.
4998 2011-07-23 Arnaud Charlet <charlet@adacore.com>
5001 * gcc-interface/Makefile.in (powerpc-linux): Remove reference to
5004 2011-07-22 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
5007 * init.c [sun && __SVR4 && !__vxworks] (__gnat_install_handler):
5008 Assign to act.sa_sigaction.
5009 * tracebak.c [USE_GENERIC_UNWINDER] (__gnat_backtrace): Cast
5010 current->return_address to char * before arithmetic.
5012 2011-07-22 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
5014 * init.c [sgi] (__gnat_error_handler): Update sigaction(2) citation.
5015 Correct argument types.
5016 Extract code from reason.
5017 (__gnat_install_handler): Assign to act.sa_sigaction.
5019 2011-07-21 Eric Botcazou <ebotcazou@adacore.com>
5021 * gcc-interface/Make-lang.in (GNAT1_ADA_OBJS): Move ada/b_gnat1.o to...
5022 (GNAT1_OBJS): ...here.
5024 2011-07-15 Eric Botcazou <ebotcazou@adacore.com>
5027 * g-socthi-mingw.adb (Fill): Fix formatting.
5029 * gcc-interface/gigi.h: Move around comment.
5031 2011-07-14 John David Anglin <dave.anglin@nrc-cnrc.gc.ca>
5034 * s-taprop-hpux-dce.adb (Abort_Task): Remove unnecessary cast.
5036 2011-07-14 Florian Weimer <fw@deneb.enyo.de>
5039 * g-socthi-mingw.adb (Fill): Guard against invalid MSG_WAITALL.
5041 2011-07-13 Eric Botcazou <ebotcazou@adacore.com>
5043 * gcc-interface/utils.c (build_vms_descriptor32): Skip the 32-bit
5044 range comparison if Pmode is SImode.
5046 2011-07-12 Laurent GUERBY <laurent@guerby.net>
5047 Eric Botcazou <ebotcazou@adacore.com>
5049 * adadecode.c: Wrap up in extern "C" block.
5050 * adadecode.h: Likewise.
5051 * adaint.c: Likewise. Remove 'const' keyword.
5052 * adaint.h: Likewise.
5054 * atree.h: Likewise.
5056 * cstreams.c: Likewise.
5060 * final.c: Likewise.
5062 * initialize.c: Likewise.
5064 * namet.h: Likewise.
5065 * nlists.h: Likewise.
5066 * raise.c: Likewise.
5067 * raise.h: Likewise.
5068 * repinfo.h: Likewise.
5069 * seh_init.c: Likewise.
5070 * targext.c: Likewise.
5071 * tracebak.c: Likewise.
5072 * uintp.h: Likewise.
5073 * urealp.h: Likewise.
5074 * xeinfo.adb: Wrap up generated C code in extern "C" block.
5075 * xsinfo.adb: Likewise.
5076 * xsnamest.adb: Likewise.
5077 * gcc-interface/gadaint.h: Wrap up in extern "C" block.
5078 * gcc-interface/gigi.h: Wrap up some prototypes in extern "C" block.
5079 * gcc-interface/misc.c: Likewise.
5080 * gcc-interface/Make-lang.in (GCC_LINK): Use LINKER.
5081 (GNAT1_C_OBJS): Remove ada/b_gnat1.o. List ada/seh_init.o and
5082 ada/targext.o here...
5083 (GNAT_ADA_OBJS): ...and not here.
5084 (GNAT1_ADA_OBJS): Add ada/b_gnat1.o.
5085 (GNATBIND_OBJS): Reorder.
5087 2011-07-07 Richard Henderson <rth@redhat.com>
5089 * gcc-interface/misc.c (gnat_init_gcc_eh): Don't call
5090 dwarf2out_frame_init.
5092 2011-07-07 Eric Botcazou <ebotcazou@adacore.com>
5094 * gcc-interface/misc.c (gnat_init): Tweak previous change.
5096 2011-07-07 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
5099 * gcc-interface/Makefile.in: Handle x86_64-solaris2.
5101 2011-07-06 Richard Guenther <rguenther@suse.de>
5103 * gcc-interface/misc.c (gnat_init): Merge calls to
5104 build_common_tree_nodes and build_common_tree_nodes_2.
5105 Re-initialize boolean_false_node.
5107 2011-07-02 Eric Botcazou <ebotcazou@adacore.com>
5108 Olivier Hainque <hainque@adacore.com>
5109 Nicolas Setton <setton@adacore.com>
5111 * gcc-interface/utils.c (record_builtin_type): Set TYPE_ARTIFICIAL on
5112 the type according to the ARTIFICIAL_P parameter.
5113 (create_type_decl): Likewise.
5114 (create_type_stub_decl): Set TYPE_ARTIFICIAL on the type to 1.
5116 2011-07-01 Eric Botcazou <ebotcazou@adacore.com>
5118 * gcc-interface/Make-lang.in (gnat1): Prepend '+' to the command.
5119 (gnatbind): Likewise.
5121 2011-06-29 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
5123 * gcc-interface/Makefile.in (TOOLS_LIBS): Add $(LIBINTL).
5125 2011-06-18 Eric Botcazou <ebotcazou@adacore.com>
5127 * gcc-interface/decl.c (gnat_to_gnu_component_type): Use GNAT_TYPE
5128 local variable throughout. Remove useless call to Base_Type.
5129 (gnat_to_gnu_field): Use GNAT_FIELD_TYPE local variable throughout.
5130 Take it also into account for the volatileness of the field. Set the
5131 TREE_SIDE_EFFECTS flag as well in this case. Reorder some warnings.
5133 2011-06-18 Eric Botcazou <ebotcazou@adacore.com>
5135 * gcc-interface/trans.c (Identifier_to_gnu): Don't set TREE_THIS_NOTRAP
5136 on a dereference built for a by-ref object if it has an address clause.
5138 2011-06-18 Eric Botcazou <ebotcazou@adacore.com>
5140 * einfo.ads (Address_Taken): Document use for the second argument of
5141 Asm_Input and Asm_Output attributes.
5142 * sem_attr.adb (Analyze_Attribute) <Attribute_Asm_Input>: If the second
5143 argument is an entity name, then set Address_Taken on it.
5144 <Attribute_Asm_Output>: Likewise.
5145 * gcc-interface/trans.c (lvalue_required_for_attribute_p): Handle the
5146 Attr_Asm_Input and Attr_Asm_Output attributes explicitly.
5147 (gnat_to_gnu) <N_Code_Statement>: If an operand is going to end up in
5148 memory and is a CONST_DECL, retrieve its corresponding VAR_DECL.
5150 2011-06-16 Joern Rennecke <joern.rennecke@embecosm.com>
5153 * gcc-interface/decl.c (gnat_to_gnu_param): Use pack_cumulative_args.
5155 2011-06-14 Joseph Myers <joseph@codesourcery.com>
5157 * gcc-interface/Make-lang.in (gnatbind$(exeext)): Use ggc-none.o.
5158 (ada/utils.o): Update dependencies.
5159 * gcc-interface/Makefile.in (EXTRA_GNATTOOLS_OBJS): Add
5160 ../../../libcpp/libcpp.a.
5161 * gcc-interface/utils.c: Include common/common-target.h.
5162 (process_attributes): Use targetm_common.have_named_sections.
5164 2011-06-07 Richard Guenther <rguenther@suse.de>
5166 * gcc-interface/misc.c (gnat_init): Do not set size_type_node or call
5169 2011-06-06 Eric Botcazou <ebotcazou@adacore.com>
5171 * gcc-interface/utils2.c (gnat_stabilize_reference): Propagate the
5172 TREE_THIS_NOTRAP flag.
5174 2011-06-06 Eric Botcazou <ebotcazou@adacore.com>
5176 * gcc-interface/utils2.c (gnat_stabilize_reference) <COMPOUND_EXPR>:
5179 2011-06-06 Eric Botcazou <ebotcazou@adacore.com>
5181 * gcc-interface/trans.c (Identifier_to_gnu): Also handle deferred
5182 constants whose full view has discriminants specially.
5184 2011-06-06 Eric Botcazou <ebotcazou@adacore.com>
5186 * gcc-interface/utils.c: Include diagnostic.h.
5187 (gnat_write_global_declarations): Output debug information for all
5188 global type declarations before finalizing the compilation unit.
5189 * gcc-interface/Make-lang.in (ada/utils.o): Add dependency.
5191 2011-05-25 Jakub Jelinek <jakub@redhat.com>
5193 * gcc-interface/utils.c (def_fn_type): Remove extra va_end.
5195 2011-05-25 Kai Tietz <ktietz@redhat.com>
5197 * adaint.c (__gnat_to_canonical_file_list_next): Use array
5198 initialization instead of const/none-const pointer assignment.
5200 2011-05-24 Joseph Myers <joseph@codesourcery.com>
5202 * gcc-interface/Make-lang.in (GNAT1_OBJS): Don't include
5203 $(EXTRA_GNAT1_OBJS).
5204 (GNATBIND_OBJS): Don't include $(EXTRA_GNATBIND_OBJS).
5205 (EXTRA_GNAT1_OBJS, EXTRA_GNATBIND_OBJS): Remove.
5206 (gnat1$(exeext), gnatbind$(exeext)): Use libcommon-target.a.
5207 * gcc-interface/Makefile.in (EXTRA_GNATTOOLS_OBJS): Use
5208 libcommon-target.a instead of prefix.o.
5210 2011-05-21 Joseph Myers <joseph@codesourcery.com>
5213 * gcc-interface/Make-lang.in (gnatbind$(exeext)): Depend on $(LIBDEPS).
5215 2011-05-20 Joseph Myers <joseph@codesourcery.com>
5217 * gcc-interface/Make-lang.in (EXTRA_GNATBIND_OBJS): Remove version.o.
5218 * gcc-interface/Makefile.in (EXTRA_GNATTOOLS_OBJS): Use libcommon.a
5219 instead of version.o.
5221 2011-05-18 Kai Tietz <ktietz@redhat.com>
5223 * gcc-interface/trans.c (Exception_Handler_to_gnu_sjlj): Use
5224 boolean_false_node instead of integer_zero_node.
5225 (convert_with_check): Likewise.
5226 * gcc-interface/decl.c (choices_to_gnu): Likewise.
5228 2011-05-12 Eric Botcazou <ebotcazou@adacore.com>
5230 * gcc-interface/trans.c (call_to_gnu): In the by-reference case, if the
5231 type of the parameter is an unconstrained array, convert the actual to
5232 the type of the formal in the In Out and Out cases as well.
5234 2011-05-11 Nathan Froyd <froydnj@codesourcery.com>
5236 * gcc-interface/utils.c (def_fn_type): Don't call build_function_type;
5237 call build_function_type_array or build_varargs_function_type_array
5239 (create_subprog_type): Don't call build_function_type; call
5240 build_function_type_vec instead.
5242 2011-05-11 Nathan Froyd <froydnj@codesourcery.com>
5244 * gcc-interface/ada-tree.h (TYPE_OBJECT_RECORD_TYPE): Use TYPE_MINVAL.
5245 (TYPE_GCC_MIN_VALUE): Use TYPE_MINVAL.
5246 (TYPE_GCC_MAX_VALUE): Use TYPE_MAXVAL.
5248 2011-05-07 Eric Botcazou <ebotcazou@adacore.com>
5250 * gcc-interface/decl.c (intrin_arglists_compatible_p): Remove spaces.
5252 * gcc-interface/gigi.h (global_bindings_p): Adjust prototype.
5253 * gcc-interface/utils.c (global_bindings_p): Return bool and simplify.
5255 2011-05-05 Nathan Froyd <froydnj@codesourcery.com>
5257 * gcc-interface/trans.c (Case_Statement_to_gnu): Call build_case_label.
5259 2011-05-05 Nathan Froyd <froydnj@codesourcery.com>
5261 * gcc-interface/decl.c (intrin_arglists_compatible_p): Use iterators
5262 instead of accessing TYPE_ARG_TYPES directly.
5263 * gcc-interface/utils.c (handle_nonnull_attribute): Likewise.
5265 2011-05-05 Eric Botcazou <ebotcazou@adacore.com>
5268 * gcc-interface/gigi.h (get_variant_part): Declare.
5269 * gcc-interface/decl.c (get_variant_part): Make global.
5270 * gcc-interface/utils2.c (find_common_type): Do not return T1 if the
5271 types have the same constant size, are record types and T1 has a
5272 variant part while T2 doesn't.
5274 2011-05-05 Eric Botcazou <ebotcazou@adacore.com>
5276 * gcc-interface/utils.c (begin_subprog_body): Do not call
5278 (end_subprog_body): Likewise.
5280 2011-05-04 Richard Guenther <rguenther@suse.de>
5282 * gcc-interface/trans.c (gnat_to_gnu): Remove zero notrunc argument to
5284 (pos_to_constructor): Likewise.
5286 2011-05-03 Nathan Froyd <froydnj@codesourcery.com>
5287 Eric Botcazou <ebotcazou@adacore.com>
5289 * gcc-interface/trans.c (gigi): Call build_function_type_list instead
5290 of build_function_type. Adjust calls to...
5291 (build_raise_check): ...this. Do not take a void_tree parameter.
5292 Call build_function_type_list instead of build_function_type.
5293 Fix head comment and swap couple of conditional blocks.
5295 2011-04-30 Eric Botcazou <ebotcazou@adacore.com>
5297 * gnatvsn.ads (Library_Version): Bump to 4.7.
5298 (Current_Year): Bump to 2011.
5300 2011-04-29 Michael Matz <matz@suse.de>
5302 * gcc-interface/misc.c (gnat_handle_option): Set
5303 warn_maybe_uninitialized.
5305 2011-04-23 Gerald Pfeifer <gerald@pfeifer.com>
5307 * gnat_ugn.texi (Complexity Metrics Control): Update link to
5308 the Watson/McCabe paper.
5310 2011-04-23 Jim Meyering <meyering@redhat.com>
5312 * gnat_ugn.texi (Examples of gnatxref Usage): Fix typo: s/it it/it is/
5314 2011-04-22 Eric Botcazou <ebotcazou@adacore.com>
5316 * gcc-interface/decl.c (make_packable_type): Copy DECL_PARALLEL_TYPE
5319 2011-04-22 Eric Botcazou <ebotcazou@adacore.com>
5321 * gcc-interface/gigi.h (create_subprog_decl): Add ARTIFICIAL_FLAG
5323 * gcc-interface/utils.c (create_subprog_decl): Likewise. Set
5324 DECL_ARTIFICIAL and DECL_NO_INLINE_WARNING_P on the DECL accordingly.
5325 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Subprogram_Type>: Add
5326 ARTIFICIAL_FLAG local variable and pass it to create_subprog_decl.
5327 <all>: Do not set flags on the reused DECL node coming from an alias.
5328 Set DECL_IGNORED_P on the DECL node built for subprograms if they
5329 don't need debug info here...
5330 * gcc-interface/trans.c (Subprogram_Body_to_gnu): ...and not here.
5331 (gigi): Adjust calls to create_subprog_decl.
5332 (build_raise_check): Likewise.
5333 (establish_gnat_vms_condition_handler): Likewise.
5334 (Compilation_Unit_to_gnu): Likewise.
5335 (gnat_to_gnu): Likewise.
5337 2011-04-21 Eric Botcazou <ebotcazou@adacore.com>
5339 * gcc-interface/Makefile.in (NO_SIBLING_ADAFLAGS): Always define.
5340 (NO_REORDER_ADAFLAGS): New variable.
5341 (EXTRA_GNATTOOLS): Always define.
5342 (../stamp-gnatlib1-$(RTSDIR): Copy tsystem.h.
5343 Clean up and adjust list of files compiled with special options.
5344 * gcc-interface/Make-lang.in: Likewise.
5345 (ada/decl.o): Cosmetical change.
5346 (ada/misc.o): Remove dependency on $(PLUGIN_H).
5348 2011-04-20 Jim Meyering <meyering@redhat.com>
5350 * initialize.c (__gnat_initialize): Remove useless if-before-free.
5352 2011-04-17 Eric Botcazou <ebotcazou@adacore.com>
5354 * gcc-interface/Make-lang.in (gnatbind): Replace $(ALL_CFLAGS) with
5355 $(CFLAGS) on the link line.
5357 2011-04-17 Eric Botcazou <ebotcazou@adacore.com>
5359 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Function>: Declare the
5360 padded type built for the return type if it is unconstrained.
5362 2011-04-14 Nathan Froyd <froydnj@codesourcery.com>
5364 * gcc-interface/utils.c (gnat_poplevel): Use block_chainon.
5366 2011-04-12 Nathan Froyd <froydnj@codesourcery.com>
5368 * gcc-interface/ada-tree.h (union lang_tree_node): Check for TS_COMMON
5369 before calling TREE_CHAIN.
5370 * gcc-interface/misc.c (gnat_init_ts): New function.
5371 (LANG_HOOKS_INIT_TS): Define.
5373 2011-04-12 Martin Jambor <mjambor@suse.cz>
5375 * gcc-interface/utils.c (end_subprog_body): Call cgraph_get_create_node
5376 instead of cgraph_node.
5378 2011-04-08 Eric Botcazou <ebotcazou@adacore.com>
5380 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Procedure>: Set minimum
5381 alignment on fields of the RETURN type built for the Copy-In Copy-Out
5384 2011-04-08 Eric Botcazou <ebotcazou@adacore.com>
5386 * gcc-interface/trans.c (Identifier_to_gnu): Do not return initializers
5387 of aggregate types that contain a placeholder.
5389 2011-04-08 Nathan Froyd <froydnj@codesourcery.com>
5391 * gcc-interface/utils.c (handle_sentinel_attribute): Don't use
5393 (handle_type_generic_attribute): Likewise.
5395 2011-04-04 Eric Botcazou <ebotcazou@adacore.com>
5398 * s-oscons-tmplt.c (MSG_WAITALL): Fix thinko in previous change.
5400 2011-04-04 Kai Tietz <ktietz@redhat.com>
5403 * s-oscons-tmplt.c (MSG_WAITALL): Define it for native windows targets
5406 2011-04-02 Eric Botcazou <ebotcazou@adacore.com>
5408 * gcc-interface/utils2.c (build_allocator): In the unconstrained array
5409 type case, do not strip a padding type around the array type.
5411 2011-04-02 Eric Botcazou <ebotcazou@adacore.com>
5413 * gcc-interface/utils.c (update_pointer_to): Finalize named pointer
5416 2011-04-02 Eric Botcazou <ebotcazou@adacore.com>
5418 * gcc-interface/lang.opt (feliminate-unused-debug-types): Delete.
5419 * gcc-interface/misc.c (gnat_handle_option): Remove special handling
5420 code for -feliminate-unused-debug-types.
5421 (gnat_post_options): Likewise.
5423 2011-04-02 Eric Botcazou <ebotcazou@adacore.com>
5425 * gcc-interface/utils.c (gnat_pushdecl): If this is a non-artificial
5426 declaration of a pointer type, then set DECL_ORIGINAL_TYPE to a
5429 2011-04-02 Eric Botcazou <ebotcazou@adacore.com>
5431 * gcc-interface/decl.c (gnat_to_gnu_entity): Do not force the
5432 DECL_ARTIFICIAL flag on enumeration types.
5434 2011-04-02 Eric Botcazou <ebotcazou@adacore.com>
5436 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Array_Type>: Do not make
5437 fat pointer types artificial unconditionally.
5438 <E_Array_Subtype>: Attach the base array type as a parallel type if it
5441 2011-04-02 Eric Botcazou <ebotcazou@adacore.com>
5443 * gcc-interface/gigi.h (get_dummy_type): Declare.
5444 (build_dummy_unc_pointer_types): Likewise.
5445 (finish_fat_pointer_type): Likewise.
5446 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Array_Type>: If a dummy
5447 fat pointer type has been built, complete it in place.
5448 <E_Access_Type>: Call build_dummy_unc_pointer_types to build dummy fat
5449 and thin pointers. Remove useless variable.
5450 (finish_fat_pointer_type): Make global and move to...
5451 * gcc-interface/utils.c (finish_fat_pointer_type): ...here.
5452 (get_dummy_type): New function.
5453 (build_dummy_unc_pointer_types): Likewise.
5454 (gnat_pushdecl): Propage the name to the anonymous variants only.
5455 (update_pointer_to): Only adjust the pointer types in the unconstrained
5458 2011-04-02 Eric Botcazou <ebotcazou@adacore.com>
5460 * gcc-interface/ada-tree.h (DECL_TAFT_TYPE_P): New flag.
5461 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Incomplete_Type>: Set it
5462 if this is a Taft amendment type and the full declaration is available.
5463 * gcc-interface/trans.c (process_type): Likewise.
5464 If there is an old type, mark the new one as used if DECL_TAFT_TYPE_P.
5465 (process_freeze_entity): Likewise.
5466 * gcc-interface/utils.c (dummy_global): New static variable.
5467 (gnat_write_global_declarations): If there are types declared as used
5468 at the global level, insert them in the global hash table.
5470 2011-04-02 Eric Botcazou <ebotcazou@adacore.com>
5472 * gcc-interface/gigi.h (record_builtin_type): Add ARTIFICIAL_P param.
5473 * gcc-interface/utils.c (gnat_pushdecl): If this is a non-artificial
5474 declaration of an array type, then set DECL_ORIGINAL_TYPE to a distinct
5476 (record_builtin_type): Add ARTIFICIAL_P parameter. Set DECL_ARTIFICIAL
5477 flag of the type accordingly.
5478 * gcc-interface/trans.c (gigi): Adjust calls to record_builtin_type.
5480 2011-04-02 Eric Botcazou <ebotcazou@adacore.com>
5482 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Access_Type>: Defer
5483 finalizing types when updating the pointers to the designated type.
5484 <all>: Finalize the deferred types even if we didn't defer processing
5485 of incomplete types in this invocation.
5487 2011-04-01 Olivier Hainque <hainque@adacore.com>
5488 Nicolas Setton <setton@adacore.com>
5489 Eric Botcazou <ebotcazou@adacore.com>
5491 * gcc-interface/misc.c (gnat_descriptive_type): New function.
5492 (LANG_HOOKS_DESCRIPTIVE_TYPE): Redefine to gnat_descriptive_type.
5494 2011-03-28 Kai Tietz <ktietz@redhat.com>
5496 * gcc-interface/Makefile.in (SO_LIB): Handle multilib build for native
5498 (EH_MECHANISM): Use GCC exception mechanism for native Windows targets.
5499 * system-mingw.ads (System): Change ZCX_By_Default default to True.
5501 * raise-gcc.c (PERSONALITY_FUNCTION): Add prototype.
5503 2011-03-28 Tristan Gingold <gingold@adacore.com>
5506 * gcc-interface/Make-lang.in (ada/b_gnat1.adb): Replace ada/b_gnat1.c.
5507 Use ada output of gnatbind.
5508 (ada/b_gnatb.adb): Ditto.
5509 (ada/b_gnat1.o, ada/b_gnatb.o): New rules.
5510 (ada.mostlyclean, ada.stage1)
5511 (ada.stage2, ada.stage3, ada.stage4, ada.stageprofile)
5512 (ada.stagefeedback): Adjust.
5513 * gcc-interface/Makefile.in (b_gnatl.adb): Replace b_gnatl.c.
5514 Use ada output of gnatbind.
5515 (b_gnatm.adb): Ditto.
5516 (b_gnatl.o, b_gnatm.o): New rules.
5518 2011-03-26 Eric Botcazou <ebotcazou@adacore.com>
5520 * gcc-interface/decl.c (gnat_to_gnu_entity) <object>: Create TYPE_DECL
5521 for the padded type built to support a specified size or alignment.
5523 2011-03-26 Eric Botcazou <ebotcazou@adacore.com>
5525 * gcc-interface/gigi.h (finalize_from_with_types): Adjust comment.
5526 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Access_Type>: Defer
5527 unconditionally to the end of the unit when the designated type is
5529 <all>: Rename local variable. Attempt to un-defer types only and do it
5530 for limited_with'ed types as well.
5531 (finalize_from_with_types): Adjust comment. Rename variable and tidy.
5532 * gcc-interface/trans.c (Compilation_Unit_to_gnu): Use GNAT_UNIT
5533 consistently and remove redundant call to finalize_from_with_types.
5535 2011-03-26 Eric Botcazou <ebotcazou@adacore.com>
5537 * inline.adb (Back_End_Cannot_Inline): Lift restriction on calls to
5538 subprograms without a previous spec declared in the same unit.
5539 * gcc-interface/trans.c (Compilation_Unit_to_gnu): Process inlined
5540 subprograms at the end of the unit instead of at the beginning.
5541 * gcc-interface/utils.c (create_subprog_decl): Check that the entity
5542 isn't public for the special handling of non-inline functions nested
5543 inside inline external functions.
5545 2011-03-25 Jeff Law <law@redhat.com>
5547 * gcc-interface/utils.c (def_fn_type): Add missing va_end.
5549 2011-03-24 Eric Botcazou <ebotcazou@adacore.com>
5551 * einfo.ads (Size_Depends_On_Discriminant): Adjust description.
5552 * layout.adb (Compute_Size_Depends_On_Discriminant): New procedure
5553 to compute Set_Size_Depends_On_Discriminant.
5554 (Layout_Type): Call it on array types in back-end layout mode.
5555 * sem_util.adb (Requires_Transient_Scope): Return true for array
5556 types only if the size depends on the value of discriminants.
5557 * gcc-interface/utils2.c (build_binary_op) <MODIFY_EXPR>: Use the RHS
5558 type if the RHS is a call to a function that returns an unconstrained
5559 type with default discriminant.
5561 2011-03-24 Eric Botcazou <ebotcazou@adacore.com>
5563 * gcc-interface/trans.c (gnat_to_gnu): Remove obsolete case of
5564 non-conversion to the nominal result type at the end.
5566 2011-03-23 Eric Botcazou <ebotcazou@adacore.com>
5568 * gcc-interface/trans.c (create_temporary): New function taken from...
5569 (create_init_temporary): ...here. Call it.
5570 (call_to_gnu): Create the temporary for the return value early, if any.
5571 Create it for a function with copy-in/copy-out parameters if there is
5572 no target; in other cases of copy-in/copy-out, use another temporary.
5573 Push the new binding level lazily. Add and rename local variables.
5575 2011-03-23 Eric Botcazou <ebotcazou@adacore.com>
5577 * gcc-interface/decl.c (validate_size): Improve comments and tweak
5579 (set_rm_size): Likewise.
5581 2011-03-23 Eric Botcazou <ebotcazou@adacore.com>
5583 * gcc-interface/decl.c (gnat_to_gnu_entity) <object>: Create TYPE_DECL
5584 for the padded type built in order to support a specified alignment.
5585 Fix incorrect formatting.
5587 2011-03-21 Eric Botcazou <ebotcazou@adacore.com>
5590 * gcc-interface/decl.c (elaborate_expression_1): Localize GNU_DECL.
5592 2011-03-21 Eric Botcazou <ebotcazou@adacore.com>
5594 * gcc-interface/decl.c (components_to_record): Add REORDER parameter,
5595 rename DEBUG_INFO_P into DEBUG_INFO and move P_GNU_REP_LIST parameter
5596 to the end of the list. Adjust recursive call. Rename local variable.
5597 If REORDER is true, reorder components of the record type.
5598 (gnat_to_gnu_entity): Pass OK_To_Reorder_Components flag as argument to
5599 components_to_record and adjust the parameter list.
5601 2011-03-21 Eric Botcazou <ebotcazou@adacore.com>
5603 * gcc-interface/decl.c (elaborate_expression_1): When optimization is
5604 disabled, use the variable for bounds of loop iteration scheme.
5606 2011-03-21 Kai Tietz <ktietz@redhat.com>
5609 * gcc-interface/utils.c (gnat_internal_attribute_table): Add column.
5611 2011-03-17 Eric Botcazou <ebotcazou@adacore.com>
5613 * gcc-interface/decl.c (elaborate_expression_1): Try harder to find
5614 out whether the expression is read-only. Short-circuit placeholder
5615 case and rename a couple of local variables.
5617 2011-03-17 Eric Botcazou <ebotcazou@adacore.com>
5619 * gcc-interface/gigi.h (smaller_form_type_p): Declare.
5620 * gcc-interface/trans.c (smaller_form_type_p): Make global and move...
5621 * gcc-interface/utils.c (smaller_form_type_p): ...to here.
5622 (convert): Deal with conversions from a smaller form type specially.
5624 2011-02-14 Eric Botcazou <ebotcazou@adacore.com>
5626 * gcc-interface/misc.c (gnat_init_options): Do not concatenate -I and
5627 its argument, except for the special -I- switch.
5629 2011-02-12 Gerald Pfeifer <gerald@pfeifer.com>
5631 * gnat_ugn.texi (Compiling Different Versions of Ada): Update link to
5634 2011-02-08 Eric Botcazou <ebotcazou@adacore.com>
5636 * gcc-interface/Makefile.in (x86-64 darwin): Handle multilibs.
5638 2011-02-03 Eric Botcazou <ebotcazou@adacore.com>
5640 * gcc-interface/gigi.h (fill_vms_descriptor): Take GNU_TYPE instead of
5642 * gcc-interface/utils2.c (fill_vms_descriptor): Move from here to...
5643 * gcc-interface/utils.c (fill_vms_descriptor): ...here. Take GNU_TYPE
5644 instead of GNAT_FORMAL. Protect the expression against multiple uses.
5645 Do not generate the check directly, instead instantiate the template
5646 check present in the descriptor.
5647 (make_descriptor_field): Move around.
5648 (build_vms_descriptor32): Build a template check in the POINTER field.
5649 (build_vms_descriptor): Remove useless suffixes.
5650 * gcc-interface/trans.c (call_to_gnu): Adjust fill_vms_descriptor call.
5652 2011-01-26 Eric Botcazou <ebotcazou@adacore.com>
5655 * targext.c: Include target files if IN_RTS is defined.
5657 2011-01-26 Richard Guenther <rguenther@suse.de>
5660 * targext.c: Include config.h.
5661 * gcc-interface/Make-lang.in (ada/targext.o): Add $(CONFIG_H)
5664 2011-01-04 Pascal Obry <obry@adacore.com>
5665 Eric Botcazou <ebotcazou@adacore.com>
5667 * gcc-interface/decl.c: Disable Stdcall convention handling for 64-bit.
5669 2011-01-04 Eric Botcazou <ebotcazou@adacore.com>
5671 * gcc-interface/trans.c (Case_Statement_to_gnu): Put the SLOC of the
5672 end-of-case on the end label and its associated gotos, if any.
5674 2011-01-04 Eric Botcazou <ebotcazou@adacore.com>
5676 * gcc-interface/trans.c (Subprogram_Body_to_gnu): Evaluate the
5677 expressions of the parameter cache within the statement group of
5680 2011-01-04 Olivier Hainque <hainque@adacore.com>
5681 Eric Botcazou <ebotcazou@adacore.com>
5683 * gcc-interface/trans.c (BLOCK_SOURCE_END_LOCATION): Provide default.
5684 (set_end_locus_from_node): New function.
5685 (Subprogram_Body_to_gnu): Use it to mark both the inner BIND_EXPR we
5686 make and the function end_locus.
5687 (Compilation_Unit_to_gnu): Call it instead of a straight Sloc_to_locus
5688 for the elaboration subprogram.
5689 (set_gnu_expr_location_from_node) <default case>: Use it to attempt to
5690 set the end_locus of the expression as well.
5692 2011-01-04 Eric Botcazou <ebotcazou@adacore.com>
5695 * gcc-interface/trans.c (Identifier_to_gnu): In SJLJ mode, do not make
5696 variables that are referenced in exception handlers volatile.
5700 Copyright (C) 2011 Free Software Foundation, Inc.
5702 Copying and distribution of this file, with or without modification,
5703 are permitted in any medium without royalty provided the copyright
5704 notice and this notice are preserved.
5706 * gnat_rm.texi: Ramification of pragma Eliminate documentation
5707 - fix bugs in the description of Source_Trace;
5708 - get rid of UNIT_NAME;
5710 2011-08-02 Javier Miranda <miranda@adacore.com>
5713 (Build_Dispatching_Requeue): Adding support for VM targets
5714 since we cannot directly reference the Tag entity.
5715 * exp_sel.adb (Build_K): Adding support for VM targets.
5716 (Build_S_Assignment): Adding support for VM targets.
5718 (Default_Prim_Op_Position): In VM targets do not restrict availability
5719 of predefined interface primitives to compiling in Ada 2005 mode.
5720 (Is_Predefined_Interface_Primitive): In VM targets this service is not
5721 restricted to compiling in Ada 2005 mode.
5722 (Make_VM_TSD): Generate code that declares and initializes the OSD
5723 record. Needed to support dispatching calls through synchronized
5726 (Make_Predefined_Primitive_Specs): Enable generation of predefined
5727 primitives associated with synchronized interfaces.
5728 (Make_Predefined_Primitive_Bodies): Enable generation of predefined
5729 primitives associated with synchronized interfaces.
5731 2011-08-02 Yannick Moy <moy@adacore.com>
5733 * par-ch11.adb (P_Handled_Sequence_Of_Statements): mark a sequence of
5734 statements hidden in SPARK if preceded by the HIDE directive
5735 (Parse_Exception_Handlers): mark each exception handler in a sequence of
5736 exception handlers as hidden in SPARK if preceded by the HIDE directive
5737 * par-ch6.adb (P_Subprogram): mark a subprogram body hidden in SPARK
5738 if starting with the HIDE directive
5739 * par-ch7.adb (P_Package): mark a package body hidden in SPARK if
5740 starting with the HIDE directive; mark the declarations in a private
5741 part as hidden in SPARK if the private part starts with the HIDE
5743 * restrict.adb, restrict.ads
5744 (Set_Hidden_Part_In_SPARK): record a range of slocs as hidden in SPARK
5745 (Is_In_Hidden_Part_In_SPARK): new function which returns whether its
5746 argument node belongs to a part which is hidden in SPARK
5747 (Check_SPARK_Restriction): do not issue violations on nodes in hidden
5748 parts in SPARK; protect the possibly costly call to
5749 Is_In_Hidden_Part_In_SPARK by a check that the SPARK restriction is on
5750 * scans.ads (Token_Type): new value Tok_SPARK_Hide in enumeration
5751 * scng.adb (Accumulate_Token_Checksum_GNAT_6_3,
5752 Accumulate_Token_Checksum_GNAT_5_03): add case for new token
5754 (Scan): recognize special comment starting with '#' and followed by
5755 SPARK keyword "hide" as a HIDE directive.
5757 2011-08-02 Yannick Moy <moy@adacore.com>
5759 * types.ads, erroutc.ads: Minor reformatting.
5761 2011-08-02 Vincent Celier <celier@adacore.com>
5763 * link.c: Add response file support for cross platforms.
5765 2011-08-02 Ed Schonberg <schonberg@adacore.com>
5767 * sem_aggr.adb (Resolve_Array_Aggregate): when copying the expression
5768 in an association, set parent field of copy before partial analysis.
5769 * sem_res.adb (Resolve_Slice): create reference to itype only when
5770 expansion is enabled.
5772 2011-08-02 Yannick Moy <moy@adacore.com>
5774 * einfo.adb, einfo.ads (Body_Is_In_ALFA, Set_Body_Is_In_ALFA): get/set
5775 for new flag denoting which subprogram bodies are in ALFA
5776 * restrict.adb, sem_ch7.adb: Update comment
5777 * sem_ch11.adb, sem_ch2.adb, sem_ch3.adb, sem_ch4.adb, sem_ch5.adb,
5778 sem_ch9.adb, sem_res.adb: Add calls to
5779 Current_Subprogram_Body_Is_Not_In_ALFA on unsupported constructs.
5780 * sem_ch6.adb (Analyze_Function_Return): add calls to
5781 Current_Subprogram_Body_Is_Not_In_ALFA on return statement in the
5782 middle of the body, and extended return.
5783 (Check_Missing_Return): add calls to Set_Body_Is_In_ALFA with argument
5784 False when missing return.
5785 (Analyze_Subprogram_Body_Helper): initialize the flag Body_Is_In_ALFA
5786 to True for subprograms whose spec is in ALFA. Remove later on the flag
5787 on the entity used for a subprogram body when there exists a separate
5789 * sem_util.adb, sem_util.ads (Current_Subprogram_Body_Is_Not_In_ALFA):
5790 if Current_Subprogram is not Empty, set its flag Body_Is_In_ALFA to
5791 False, otherwise do nothing.
5793 2011-08-02 Robert Dewar <dewar@adacore.com>
5795 * inline.adb, stand.ads, sem_ch6.adb, sem_ch8.adb: Minor reformatting.
5797 2011-08-02 Yannick Moy <moy@adacore.com>
5799 * sem_ch4.ads: minor formatting.
5801 2011-08-02 Yannick Moy <moy@adacore.com>
5803 * sem_aggr.adb, err_vars.ads, sem_ch3.adb, sem_ch5.adb, sem_ch9.adb,
5804 debug.adb, sem_util.adb, sem_res.adb, sem_attr.adb, gnat1drv.adb,
5805 errout.adb, errout.ads, exp_ch6.adb, sem_ch4.adb, restrict.adb,
5806 restrict.ads, sem_ch6.adb, sem_ch8.adb, sem_ch11.adb,
5807 opt.ads: cleanup of SPARK mode
5809 2011-08-02 Yannick Moy <moy@adacore.com>
5811 * cstand.adb (Create_Standard): sets Is_In_ALFA component of standard
5813 * einfo.adb, einfo.ads (Is_In_ALFA): add flag for all entities
5814 (Is_In_ALFA, Set_Is_In_ALFA): new subprograms to access flag Is_In_ALFA
5816 (Analyze_Object_Declaration): set Is_In_ALFA flag for objects
5817 (Constrain_Enumeration): set Is_In_ALFA flag for enumeration subtypes
5818 (Constrain_Integer): set Is_In_ALFA flag for integer subtypes
5819 (Enumeration_Type_Declaration): set Is_In_ALFA flag for enumeration
5821 (Set_Scalar_Range_For_Subtype): unset Is_In_ALFA flag for subtypes with
5823 * sem_ch6.adb (Analyze_Return_Type): unset Is_In_ALFA flag for
5824 functions whose return type is not in ALFA.
5825 (Analyze_Subprogram_Specification): set Is_In_ALFA flag for subprogram
5827 (Process_Formals): unset Is_In_ALFA flag for subprograms if a
5828 parameter's type is not in ALFA.
5829 * stand.ads (Standard_Type_Is_In_ALFA): array defines which standard
5832 2011-08-02 Ed Schonberg <schonberg@adacore.com>
5834 * sem_ch6 (Analyze_Expression_Function): treat the function as
5835 Inline_Always, and introduce a subprogram declaration for it when it is
5837 * inline.adb (Add_Inlined_Body): recognize bodies that come from
5838 expression functions, so that the back-end can determine whether they
5839 can in fact be inlined.
5840 * sem_util.adb (Is_Expression_Function): predicate to determine whether
5841 a function body comes from an expression function.
5843 2011-08-02 Gary Dismukes <dismukes@adacore.com>
5845 * sem_ch6.adb (Check_Conformance): Revise the check for nonconforming
5846 null exclusions to test Can_Never_Be_Null on the anonymous access types
5847 of the formals rather than testing the formals themselves. Exclude this
5848 check in cases where the Old_Formal is marked as a controlling formal,
5849 to avoid issuing spurious errors for bodies completing dispatching
5850 operations (due to the flag not getting set on controlling access
5851 formals in body specs).
5852 (Find_Corresponding_Spec): When checking full and subtype conformance of
5853 subprogram bodies in instances, pass Designated and E in that order, for
5854 consistency with the expected order of the formals (New_Id followed by
5857 2011-08-02 Robert Dewar <dewar@adacore.com>
5859 * sem_ch8.adb: Minor reformatting.
5861 2011-08-02 Ed Schonberg <schonberg@adacore.com>
5863 * sem_ch8.adb (Analyze_Subprogram_Renaming): new procedure
5864 Check_Class_Wide_Actual, to implement AI05-0071, on defaulted
5865 primitive operations of class-wide actuals.
5867 2011-08-02 Javier Miranda <miranda@adacore.com>
5869 * exp_atag.ads, exp_atag.adb
5870 (Build_Common_Dispatching_Select_Statements): Remove argument Loc
5871 since its value is implicitly passed in argument Typ.
5872 * exp_disp.adb (Make_Disp_Conditional_Select_Body,
5873 Make_Disp_Timed_Select_Body): Remove Loc in calls to routine
5874 Build_Common_Dispatching_Select_Statements.
5876 2011-08-02 Robert Dewar <dewar@adacore.com>
5878 * sem_ch3.adb, exp_atag.ads, get_scos.adb, get_scos.ads,
5879 exp_disp.adb, lib-xref.adb, lib-xref.ads: Update comments.
5882 2011-08-02 Robert Dewar <dewar@adacore.com>
5884 * sem_res.adb: Minor reformatting.
5885 * sem_prag.adb: Minor reformatting.
5887 2011-08-02 Javier Miranda <miranda@adacore.com>
5889 * exp_atag.adb, exp_atags.ads
5890 (Build_Common_Dispatching_Select_Statement): Replace argument DT_Ptr
5891 by the tagged type Entity. Required to use this routine in the VM
5892 targets since we do not have available the Tag entity in the VM
5895 (Expand_N_Subprogram_Body): Do not invoke Build_VM_TSDs if package
5896 Ada.Tags has not been previously loaded.
5898 (Expand_N_Package_Declaration, Expand_N_Package_Body): Do not invoke
5899 Build_VM_TSDs if package Ada.Tags has not been previously loaded.
5901 (Enclosing_Dynamic_Scope): Add missing support to handle the full
5902 view of enclosing scopes. Required to handle enclosing scopes that
5903 are synchronized types whose full view is a task type.
5905 (Build_VM_TSDs): Minor code improvement to avoid generating and
5906 analyzing lists with empty nodes.
5907 (Make_Disp_Asynchronous_Select_Body): Add support for VM targets.
5908 (Make_Disp_Conditional_Select_Body): Add support for VM targets.
5909 (Make_Disp_Get_Prim_Op_Kind): Add support for VM targets.
5910 (Make_Disp_Timed_Select_Body): Add support for VM targets.
5911 (Make_Select_Specific_Data_Table): Add support for VM targets.
5912 (Make_VM_TSD): Generate code to initialize the SSD structure of
5915 2011-08-02 Yannick Moy <moy@adacore.com>
5917 * lib-writ.adb (Write_ALI): when ALFA mode is set, write local
5918 cross-references section in ALI.
5919 * lib-xref.adb, lib-xref.ads (Xref_Entry): add components Sub
5920 (enclosing subprogram), Slc (location of Sub) and Sun (unit number of
5922 (Enclosing_Subprogram_Or_Package): new function to return the enclosing
5923 subprogram or package entity of a node
5924 (Is_Local_Reference_Type): new function returns True for references
5925 selected in local cross-references.
5926 (Lt): function extracted from Lt in Output_References
5927 (Write_Entity_Name): function extracted from Output_References
5928 (Generate_Definition): generate reference with type 'D' for definition
5929 of objects (object declaration and parameter specification), with
5930 appropriate locations and units, for use in local cross-references.
5931 (Generate_Reference): update fields Sub, Slc and Sun. Keep newly created
5932 references of type 'I' for initialization in object definition.
5933 (Output_References): move part of function Lt and procedure
5934 Write_Entity_Name outside of the body. Ignore references of types 'D'
5935 and 'I' introduced for local cross-references.
5936 (Output_Local_References): new procedure to output the local
5937 cross-references sections.
5938 (Lref_Entity_Status): new array defining whether an entity is a local
5939 * sem_ch3.adb (Analyze_Object_Declaration): call Generate_Reference
5940 with 'I' type when initialization expression is present.
5941 * get_scos.adb, get_scos.ads: Correct comments and typos
5943 2011-08-02 Javier Miranda <miranda@adacore.com>
5945 * exp_ch6.adb (Expand_N_Subprogram_Body): Enable generation of TSDs in
5947 * exp_ch7.adb (Expand_N_Package_Body): Enable generation of TSDs in
5949 * exp_disp.adb (Build_VM_TSDs): No action needed if the runtime has no
5952 2011-08-02 Vincent Celier <celier@adacore.com>
5954 * prj-nmsc.adb (File_Found): New components Excl_File and Excl_Line
5955 (No_Space_Img): New function
5956 (Find_Excluded_Sources): When reading from a file, record the file name
5957 and the line number for each excluded source.
5958 (Mark_Excluded_Sources): When reporting an error, if the excluded
5959 sources were read from a file, include file name and line number in
5962 2011-08-02 Ed Schonberg <schonberg@adacore.com>
5964 * sem_res.adb (Resolve_Call): implement rule in RM 12.5.1 (23.3/2).
5966 2011-08-02 Robert Dewar <dewar@adacore.com>
5968 * exp_ch7.adb exp_ch6.adb, exp_disp.adb: Minor reformatting
5970 2011-08-02 Javier Miranda <miranda@adacore.com>
5972 * exp_ch6.adb (Expand_N_Subprogram_Body): Temporarily restrict the
5973 generation of TSDs to the DOTNET compiler.
5974 * exp_ch7.adb (Expand_N_Package_Body): Temporarily restrict the
5975 generation of TSDs to the DOTNET compiler.
5977 2011-08-02 Javier Miranda <miranda@adacore.com>
5979 * exp_disp.ads (Build_VM_TSDs): Build the runtime Type Specific Data
5980 record of all the tagged types declared inside library level package
5981 declarations, library level package bodies or library level subprograms.
5982 * exp_disp.adb (Make_VM_TSD): New subprogram that builds the TSD
5983 associated with a given tagged type.
5984 (Build_VM_TSDs): New subprogram.
5985 * exp_ch6.adb (Expand_N_Subprogram_Body): Generate TSDs records of main
5986 compilation units that are subprograms.
5987 * exp_ch7.adb (Expand_N_Package_Body): Generate TSDs of main
5988 compilation units that are package bodies.
5989 (Expand_N_Package_Declaration): Generate TSDs of the main compilation
5990 units that are a package declaration or a package instantiation.
5991 * exp_intr.adb (Expand_Dispatching_Constructor_Call): Minor code
5992 reorganization to improve the error generated by the frontend when the
5993 function Ada.Tags.Secondary_Tag is not available.
5994 * rtsfind.ads (RE_Register_TSD): New runtime entity.
5995 * exp_ch4.adb (Expand_N_Type_Conversion): Minor code cleanup.
5997 2011-08-02 Javier Miranda <miranda@adacore.com>
5999 * exp_disp.adb (Make_DT): Generate call to Check_TSD in Ada 2005 mode.
6001 2011-08-02 Robert Dewar <dewar@adacore.com>
6003 * s-imenne.ads: Minor reformatting.
6005 2011-08-02 Robert Dewar <dewar@adacore.com>
6007 * a-stunau.ads: Add pragma Suppress_Initialization for Big_String
6008 * freeze.adb (Warn_Overlay): Don't warn if initialization suppressed
6009 * s-stalib.ads: Add pragma Suppress_Initialization for Big_String
6011 2011-08-02 Robert Dewar <dewar@adacore.com>
6013 * einfo.ads (Materialize_Entity): Document this is only for renamings
6014 * exp_ch3.adb (Expand_N_Object_Declaration): Make sure we generate
6015 required debug information in the case where we transform the object
6016 declaration into a renaming declaration.
6017 * exp_ch4.adb (Expand_Concatenate): Generate debug info for result
6019 * exp_dbug.ads (Debug_Renaming_Declaration): Document setting of
6022 2011-08-02 Robert Dewar <dewar@adacore.com>
6024 * einfo.ads, einfo.adb (Suppress_Initialization): Replaces
6025 Suppress_Init_Procs.
6026 * exp_ch3.adb, exp_disp.adb, freeze.adb: Use
6027 Suppress_Initialization/Initialization_Suppressed.
6028 * gnat_rm.texi: New documentation for pragma Suppress_Initialization
6029 * sem_aux.ads, sem_aux.adb (Initialization_Suppressed): New function
6030 * sem_dist.adb: Use Suppress_Initialization/Initialization_Suppressed
6031 * sem_prag.adb: New processing for pragma Suppress_Initialization.
6033 2011-08-02 Robert Dewar <dewar@adacore.com>
6035 * gnat_rm.texi, a-tags.ads, sem_prag.adb, sem_ch12.adb, exp_disp.adb:
6038 2011-08-02 Ed Schonberg <schonberg@adacore.com>
6040 * sem_prag.adb (Chain_PPC): Implement AI04-0230: null procedures can
6041 only have inheritable classwide pre/postconditions.
6043 2011-08-02 Javier Miranda <miranda@adacore.com>
6045 * a-tags.ads, a-tags.adb (Check_TSD): New subprogram.
6046 * rtsfind.ads (RE_Check_TSD): New runtime entity.
6047 * exp_disp.adb (Make_DT): Generate call to the new runtime routine that
6048 checks if the external tag of a type is the same as the external tag
6049 of some other declaration.
6051 2011-08-02 Thomas Quinot <quinot@adacore.com>
6053 * s-taskin.ads: Minor reformatting.
6055 2011-08-02 Emmanuel Briot <briot@adacore.com>
6057 * g-comlin.adb (Display_Help): swap the order in which it prints the
6058 short help and the general usage.
6060 2011-08-02 Ed Schonberg <schonberg@adacore.com>
6062 * sem_ch12.adb (Analyze_Generic_Subprogram_Declaration): copy properly
6063 the aspect declarations and attach them to the generic copy for
6064 subsequent analysis.
6065 (Analyze_Subprogram_Instantiation): copy explicitly the aspect
6066 declarations of the generic tree to the new subprogram declarations.
6067 * sem_attr.adb (Check_Precondition_Postcondition): recognize
6068 conditions that apply to a subprogram instance.
6070 2011-08-02 Robert Dewar <dewar@adacore.com>
6072 * gnat_rm.texi: Clarify doc on pragma Source_File_Name[_Project].
6074 2011-08-02 Ed Schonberg <schonberg@adacore.com>
6076 * sem_ch3.adb (Derived_Type_Declaration): When checking that a untagged
6077 private type with a tagged full view is not derived in the immediate
6078 scope of the partial view, (RM 7.3 (7)) use the scope of the base type.
6080 2011-08-02 Robert Dewar <dewar@adacore.com>
6082 * exp_ch4.adb: Minor reformatting.
6084 2011-08-02 Ed Schonberg <schonberg@adacore.com>
6086 * sem_ch5.adb (Analyze_Loop_Statement): If the iteration scheme is an
6087 Ada2012 iterator, the loop will be rewritten during expansion into a
6088 while loop with a cursor and an element declaration. Do not analyze the
6089 body in this case, because if the container is for indefinite types the
6090 actual subtype of the elements will only be determined when the cursor
6091 declaration is analyzed.
6093 2011-08-02 Arnaud Charlet <charlet@adacore.com>
6095 * sem_ch13.adb (Analyze_Attribute_Definition_Clause): Ignore
6096 size/alignment related attributes in CodePeer_Mode.
6098 2011-08-02 Gary Dismukes <dismukes@adacore.com>
6100 * sem_ch3.adb (Check_Ops_From_Incomplete_Type): Remove call to
6101 Prepend_Element, since this can result in the operation getting the
6102 wrong slot in the full type's dispatch table if the full type has
6103 inherited operations. The incomplete type's operation will get added
6104 to the proper position in the full type's primitives
6105 list later in Sem_Disp.Check_Operation_From_Incomplete_Type.
6106 (Process_Incomplete_Dependents): Add Is_Primitive test when checking for
6107 dispatching operations, since there are cases where nonprimitive
6108 subprograms can get added to the list of incomplete dependents (such
6109 as subprograms in nested packages).
6110 * sem_ch6.adb (Process_Formals): First, remove test for being in a
6111 private part when determining whether to add a primitive with a
6112 parameter of a tagged incomplete type to the Private_Dependents list.
6113 Such primitives can also occur in the visible part, and should not have
6114 been excluded from being private dependents.
6115 * sem_ch7.adb (Uninstall_Declarations): When checking the rule of
6116 RM05-3.10.1(9.3/2), test that a subprogram in the Private_Dependents
6117 list of a Taft-amendment incomplete type is a primitive before issuing
6118 an error that the full type must appear in the same unit. There are
6119 cases where nonprimitives can be in the list (such as subprograms in
6121 * sem_disp.adb (Derives_From): Use correct condition for checking that
6122 a formal's type is derived from the type of the corresponding formal in
6123 the parent subprogram (the condition was completely wrong). Add
6124 checking that was missing for controlling result types being derived
6125 from the result type of the parent operation.
6127 2011-08-02 Yannick Moy <moy@adacore.com>
6129 * errout.adb (First_Node): minor renaming
6130 * restrict.adb (Check_Formal_Restriction): put restriction warning on
6133 2011-08-02 Yannick Moy <moy@adacore.com>
6135 * sem_res.adb (Resolve_Logical_Op): ensure N is a binary operator
6136 before accessing operands.
6137 * sem_util.adb (Is_SPARK_Initialization_Expr): follow original nodes to
6138 decide whether an initialization expression respects SPARK rules, as
6139 the plain node is the expanded one. This allows for more valid warnings
6141 * gnat_rm.texi: Minor update.
6143 2011-08-02 Arnaud Charlet <charlet@adacore.com>
6145 * sem_ch13.adb (Analyze_Enumeration_Representation_Clause): Revert
6148 2011-08-02 Robert Dewar <dewar@adacore.com>
6150 * sem_ch3.adb, sem_ch4.adb: Minor reformatting.
6152 2011-08-02 Hristian Kirtchev <kirtchev@adacore.com>
6154 * exp_ch5.adb (Expand_Iterator_Loop): Reformatting. Wrap the original
6155 loop statements and the element renaming declaration with a block when
6156 the element type is controlled.
6158 2011-08-02 Yannick Moy <moy@adacore.com>
6160 * sinfo.ads: Minor formatting.
6162 2011-08-02 Ed Schonberg <schonberg@adacore.com>
6164 * sem_aggr.adb (Add_Association): if the association has a box and no
6165 expression, use the Sloc of the aggregate itself for the new
6167 * errout.adb (First_Node): Exclude nodes with no Sloc, and always use
6170 2011-08-02 Hristian Kirtchev <kirtchev@adacore.com>
6172 * exp_ch5.adb (Expand_Iterator_Loop): Code cleanup and refactoring.
6173 When a container is provided via a function call, generate a renaming
6174 of the function result. This avoids the creation of a transient scope
6175 and the premature finalization of the container.
6176 * exp_ch7.adb (Is_Container_Cursor): Removed.
6177 (Wrap_Transient_Declaration): Remove the supression of the finalization
6178 of the list controller when the declaration denotes a container cursor,
6181 2011-08-02 Yannick Moy <moy@adacore.com>
6183 * restrict.adb (Check_Formal_Restriction): only issue a warning if the
6184 node is from source, instead of the original node being from source.
6186 (Resolve_Array_Aggregate): refine the check for a static expression, to
6187 recognize also static ranges
6188 * sem_ch3.adb, sem_ch3.ads (Analyze_Component_Declaration,
6189 Array_Type_Declaration): postpone the test for the type being a subtype
6190 mark after the type has been resolved, so that component-selection and
6191 expanded-name are discriminated.
6192 (Make_Index, Process_Range_Expr_In_Decl): add a parameter In_Iter_Schm
6193 to distinguish the case of an iteration scheme, so that an error is
6194 issed on a non-static range in SPARK except in an iteration scheme.
6195 * sem_ch5.adb (Analyze_Iteration_Scheme): call Make_Index with
6196 In_Iter_Schm = True.
6197 * sem_ch6.adb (Analyze_Subprogram_Specification): refine the check for
6198 user-defined operators so that they are allowed in renaming
6200 (Find_Selected_Component): refine the check for prefixing of operators
6201 so that they are allowed in renaming. Move the checks for restrictions
6202 on selector name after analysis discriminated between
6203 component-selection and expanded-name.
6204 * sem_res.adb (Resolve_Op_Concat_Arg): do not issue a warning on
6205 concatenation argument of string type if it is static.
6206 * sem_util.adb, sem_util.ads
6207 (Check_Later_Vs_Basic_Declarations): add a new function
6208 Is_Later_Declarative_Item to decice which declarations are allowed as
6209 later items, in the two different modes Ada 83 and SPARK. In the SPARK
6210 mode, add that renamings are considered as later items.
6211 (Enclosing_Package): new function to return the enclosing package
6212 (Enter_Name): correct the rule for homonyms in SPARK
6213 (Is_SPARK_Initialization_Expr): default to returning True on nodes not
6214 from source (result of expansion) to avoid issuing wrong warnings.
6216 2011-08-02 Ed Schonberg <schonberg@adacore.com>
6218 * errout.adb: On anything but an expression First_Node returns its
6221 2011-08-02 Pascal Obry <obry@adacore.com>
6223 * prj-proc.adb, make.adb, makeutl.adb: Minor reformatting.
6225 2011-08-02 Hristian Kirtchev <kirtchev@adacore.com>
6227 * exp_ch5.adb (Expand_Iterator_Loop): Code cleanup and reorganization.
6228 Set the associated loop as the related expression of internally
6230 * exp_ch7.adb (Is_Container_Cursor): New routine.
6231 (Wrap_Transient_Declaration): Supress the finalization of the list
6232 controller when the declaration denotes a container cursor.
6234 2011-08-02 Yannick Moy <moy@adacore.com>
6236 * opt.ads (SPARK_Mode): update comment, SPARK_Mode only set through
6238 * par-ch3.adb (P_Delta_Constraint): remove check in SPARK mode that the
6239 expression is a simple expression. This check cannot be performed in
6240 the semantics, so just drop it.
6241 (P_Index_Or_Discriminant_Constraint): move check that the index or
6242 discriminant is a subtype mark to Analyze_Subtype_Declaration in the
6243 semantics. Other cases were previously checked in the semantics.
6244 * par-ch4.adb (P_Name): move checks that a selector name is not
6245 character literal or an operator symbol to Find_Selected_Component in
6247 * par-ch5.adb (Parse_Decls_Begin_End): move check that basic
6248 declarations are not placed after later declarations in a separate
6249 procedure in Sem_Util (possibly not the best choice?), to be used both
6250 during parsing, for Ada 83 mode, and during semantic analysis, for
6252 * par-endh.adb (Check_End): move check that end label is not missing
6253 to Process_End_Label in the semantics
6254 * par-prag.adb (Process_Restrictions_Or_Restriction_Warnings): remove
6255 the special case for SPARK restriction
6256 * par.adb: use and with Sem_Util, for use in Parse_Decls_Begin_End
6257 * restrict.adb, restrict.ads (Check_Formal_Restriction): add a
6258 parameter Force to issue the error message even on internal node (used
6259 for generated end label). Call Check_Restriction to check when an error
6260 must be issued. In SPARK mode, issue an error message even if the
6261 restriction is not set.
6262 (Check_Restriction): new procedure with an additional out parameter to
6263 inform the caller that a message has been issued
6264 * sem_aggr.adb: Minor modification of message
6265 * sem_attr.adb (Analyze_Attribute): call Check_Formal_Restriction
6266 instead of issuing an error message directly
6267 * sem_ch3.adb (Analyze_Declarations): move here the check that basic
6268 declarations are not placed after later declarations, by calling
6269 Check_Later_Vs_Basic_Declarations
6270 (Analyze_Subtype_Declaration): move here the check that an index or
6271 discriminant constraint must be a subtype mark. Change the check that
6272 a subtype of String must start at one so that it works on subtype marks.
6273 * sem_ch4.adb (Analyze_Call): move here the check that a named
6274 association cannot follow a positional one in a call
6275 * sem_ch5.adb (Check_Unreachable_Code): call Check_Formal_Restriction
6276 instead of issuing an error message directly
6277 * sem_ch8.adb (Find_Selected_Component): move here the check that a
6278 selector name is not a character literal or an operator symbol. Move
6279 here the check that the prefix of an expanded name cannot be a
6280 subprogram or a loop statement.
6281 * sem_util.adb, sem_util.ads (Check_Later_Vs_Basic_Declarations): new
6282 procedure called from parsing and semantics to check that basic
6283 declarations are not placed after later declarations
6284 (Process_End_Label): move here the check that end label is not missing
6286 2011-08-02 Arnaud Charlet <charlet@adacore.com>
6288 * sem_ch13.adb (Analyze_Enumeration_Representation_Clause): Ignore enum
6289 representation clause in codepeer mode, since it confuses CodePeer and
6290 does not bring useful info.
6292 2011-08-02 Ed Falis <falis@adacore.com>
6294 * init.c: initialize fp hw on MILS.
6296 2011-08-02 Ed Schonberg <schonberg@adacore.com>
6298 * errout.adb (First_Node): for bodies, return the node itself (small
6299 optimization). For other nodes, do not check source_unit if the node
6300 comes from Standard.
6302 2011-08-02 Robert Dewar <dewar@adacore.com>
6304 * exp_ch3.adb: Minor comment additions.
6305 * sem_ch13.adb: Minor reformatting.
6307 2011-08-02 Pascal Obry <obry@adacore.com>
6309 * make.adb, makeutl.adb: Removes some superfluous directory separator.
6311 2011-08-02 Robert Dewar <dewar@adacore.com>
6313 * sem_attr.adb: Minor reformatting.
6315 2011-08-02 Robert Dewar <dewar@adacore.com>
6317 * einfo.adb (Has_Default_Aspect): Replaces Has_Default_Value
6318 (Has_Default_Component_Value): Removed
6319 * einfo.ads Comment updates
6320 (Has_Default_Aspect): Replaces Has_Default_Value
6321 (Has_Default_Component_Value): Removed
6323 (Expand_N_Freeze_Entity): Handle Default[_Component]_Value aspects
6325 (Build_Array_Init_Proc): Handle Default_[Component_]Value aspects
6326 (Get_Simple_Init_Val): Handle Default_Value aspect
6327 (Needs_Simple_Initialization): Handle Default_Value aspect
6328 * exp_ch3.ads: Needs_Simple_Initialization
6329 * freeze.adb (Freeze_Entity): Handle Default_[Component_]Value aspect
6330 * par-prag.adb (Pragma_Default[_Component]Value) Removed
6332 (Analyze_Aspect_Specifications): Fix Default[_Component]_Value aspects
6333 * sem_prag.adb (Pragma_Default[_Component]Value) Removed
6334 * snames.ads-tmpl (Pragma_Default[_Component]Value) Removed
6336 2011-08-02 Ed Schonberg <schonberg@adacore.com>
6338 * sem_ch5.adb (Analyze_Iterator_Specification): use base type to locate
6339 package containing iteration primitives.
6340 exp_ch5.adb (Expand_Iterator_Loop): ditto.
6342 2011-08-02 Ed Schonberg <schonberg@adacore.com>
6344 * sem_ch5.adb (Analyze_Iteration_Scheme): For an Ada2012 iterator with
6345 "of", pre-analyze expression in case it is a function call with
6346 finalization actions that must be placed ahead of the loop.
6347 * exp_ch5.adb (Expand_Iterator_Loop): If condition_actions are present
6348 on an Ada2012 iterator, insert them ahead of the rewritten loop.
6350 2011-08-02 Geert Bosch <bosch@adacore.com>
6352 * cstand.adb (Create_Float_Types): Only consider C's long double for
6353 Long_Long_Float, in addition to double.
6355 2011-08-02 Robert Dewar <dewar@adacore.com>
6357 * sem_ch3.adb, sem_ch5.adb, sem_type.adb, switch-c.adb, switch-c.ads,
6358 sem_prag.adb, sem_util.adb, sem_util.ads, sem_res.adb, warnsw.ads,
6359 prepcomp.ads, cstand.adb, stand.ads, a-calfor.adb, s-stusta.adb:
6362 2011-08-02 Ed Schonberg <schonberg@adacore.com>
6364 * sem_attr.adb: handle properly 'Result when it is a prefix of an
6367 2011-08-02 Javier Miranda <miranda@adacore.com>
6369 * einfo.ads, einfo.adb
6370 (Original_Access_Type): Move this attribute to Node26 since there was
6371 an undocumented use of Node21 in E_Access_Subprogram_Type entities
6372 which causes conflicts and breaks the generation of the .NET compiler.
6373 (Interface_Name): Add missing documentation on JGNAT only uses of
6376 2011-08-02 Geert Bosch <bosch@adacore.com>
6378 * cstand.adb (Back_End_Float_Types): Use Elist instead of Nlist
6379 (Find_Back_End_Float_Type): Likewise
6380 (Create_Back_End_Float_Types): Likewise
6381 (Create_Float_Types): Likewise
6382 (Register_Float_Type): Likewise
6383 * sem_ch3.adb (Floating_Point_Type_Declaration): Use Elist instead of
6384 Nlist and split out type selection in new local Find_Base_Type function.
6385 * sem_prag.adb (Process_Import_Predefined_Type): Use Elist instead of
6387 * stand.ads (Predefined_Float_Types): Use Elist instead of Nlist
6389 2011-08-02 Robert Dewar <dewar@adacore.com>
6391 * inline.adb: Minor code reorganization (put Get_Code_Unit_Entity in
6393 * opt.ads: Minor comment change.
6394 * sem_ch12.adb: Minor code reorganization.
6396 2011-08-02 Gary Dismukes <dismukes@adacore.com>
6398 * sem_ch3.adb (Complete_Private_Subtype): Don't append the private
6399 subtype's list of rep items to the list on the full subtype in the case
6400 where the lists are the same.
6402 2011-08-02 Geert Bosch <bosch@adacore.com>
6404 * switch-c.adb (Free): New deallocation procedure to avoid implicitly
6405 using the one from System.Strings, which also deallocates all strings.
6407 2011-08-02 Geert Bosch <bosch@adacore.com>
6409 * gcc-interface/gigi.h, gcc-interface/misc.c (enumerate_modes): New
6411 * gcc-interface/Make-lang.in: Update dependencies.
6413 2011-08-02 Olivier Hainque <hainque@adacore.com>
6415 * gcc-interface/trans.c (Subprogram_Body_to_gnu): Set the function
6418 2011-08-02 Javier Miranda <miranda@adacore.com>
6420 * sem_ch3.adb (Check_Anonymous_Access_Components): Create extra formals
6421 associated with anonymous access to subprograms.
6423 2011-08-02 Geert Bosch <bosch@adacore.com>
6426 (Preprocessing_Symbol_Defs): Move from Prepcomp.Symbol_Definitions.
6427 (Preprocessing_Symbol_Last): Move from Prepcomp.Last_Definition.
6428 * prepcomp.adb (Symbol_Definitions, Last_Definition): Move to opt.ads
6429 (Add_Symbol_Definition): Move to switch-c.adb
6430 (Process_Command_Line_Symbol_Definitions): Adjust references to above.
6431 * prepcomp.ads: Remove dependency on Ada.Unchecked_Deallocation.
6432 (Add_Symbol_Definition): Move to switch-c.adb.
6433 * sem_ch13.adb, sem_prag.adb: Add dependency on Warnsw.
6435 (Set_Dot_Warning_Switch, Set_GNAT_Mode_Warnings, Set_Warning_Switch):
6437 * sem_warn.ads (Warn_On_Record_Holes, Warn_On_Overridden_Size,
6438 Set_Dot_Warning_Switch, Set_GNAT_Mode_Warnings, Set_Warning_Switch):
6440 * switch-c.adb: Replace dependency on Prepcomp and Sem_Warn by Warnsw.
6441 (Add_Symbol_Definition): Moved from Prepcomp.
6442 * switch-c.ads: Update copyright notice. Use String_List instead of
6443 Argument_List, removing dependency on System.OS_Lib.
6445 2011-08-02 Yannick Moy <moy@adacore.com>
6447 * sem_ch3.adb (Analyze_Object_Declaration): issue an error in formal
6448 mode on initialization expression which does not respect SPARK
6450 * sem_util.adb, sem_util.ads (Is_SPARK_Initialization_Expr): determines
6451 if the tree referenced by its argument represents an initialization
6452 expression in SPARK, suitable for initializing an object in an object
6455 2011-08-02 Javier Miranda <miranda@adacore.com>
6457 * exp_ch9.adb (Expand_Access_Protected_Subprogram_Type): Link the
6458 internally generated access to subprogram with its associated protected
6460 * einfo.ads, einfo.adb (Original_Access_Type): New attribute.
6462 2011-08-02 Geert Bosch <bosch@adacore.com>
6464 * cstand.adb (Register_Float_Type): Print information about type to
6465 register, if the Debug_Flag_Dot_B is set.
6466 * debug.adb (Debug_Flag_Dot_B): Document d.b debug option.
6467 * rtsfind.ads (RE_Max_Base_Digits): New run time entity.
6468 * sem_ch3.adb (Floating_Point_Type_Declaration): Allow declarations
6469 with a requested precision of more than Max_Digits digits and no more
6470 than Max_Base_Digits digits, if a range specification is present and the
6471 Predefined_Float_Types list has a suitable type to derive from.
6472 * sem_ch3.adb (Rep_Item_Too_Early): Avoid generating error in the
6473 case of type completion with pragma Import
6475 (Process_Import_Predefined_Type): Processing to complete a type
6476 with pragma Import. Currently supports floating point types only.
6477 (Set_Convention_From_Pragma): Do nothing without underlying type.
6478 (Process_Convention): Guard against absence of underlying type,
6479 which may happen when importing incomplete types.
6480 (Process_Import_Or_Interface): Handle case of importing predefined
6481 types. Tweak error message.
6483 2011-08-02 Eric Botcazou <ebotcazou@adacore.com>
6485 * inline.adb (Add_Inlined_Body): Adjust check for library-level inlined
6486 functions to previous change. Reorganize code slightly.
6488 2011-08-02 Geert Bosch <bosch@adacore.com>
6490 * back_end.ads (Register_Type_Proc): New call back procedure type for
6491 allowing the back end to provide information about available types.
6492 (Register_Back_End_Types): New procedure to register back end types.
6493 * back_end.adb (Register_Back_End_Types): Call the back end to enumerate
6495 * cstand.adb (Back_End_Float_Types): New list for floating point types
6496 supported by the back end.
6497 (Build_Float_Type): Add extra parameter for Float_Rep_Kind.
6498 (Copy_Float_Type): New procedure to make new copies of predefined types.
6499 (Register_Float_Type): New call back procedure to populate the BEFT list
6500 (Find_Back_End_Float_Type): New procedure to find a BEFT by name
6501 (Create_Back_End_Float_Types): New procedure to populate the BEFT list.
6502 (Create_Float_Types): New procedure to create entities for floating
6503 point types predefined in Standard, and put these and any remaining
6504 BEFTs on the Predefined_Float_Types list.
6505 * stand.ads (Predefined_Float_Types): New list for predefined floating
6506 point types that do not have declarations in package Standard.
6508 2011-08-02 Eric Botcazou <ebotcazou@adacore.com>
6510 * inline.adb (Get_Code_Unit_Entity): New local function. Returns the
6511 entity node for the unit containing the parameter.
6512 (Add_Inlined_Body): Use it to find the unit containing the subprogram.
6513 (Add_Inlined_Subprogram): Likewise.
6514 * gcc-interface/Make-lang.in: Update dependencies.
6516 2011-08-02 Thomas Quinot <quinot@adacore.com>
6518 * s-stusta.adb (Print): Make sure Pos is always initialized to a
6521 2011-08-02 Geert Bosch <bosch@adacore.com>
6523 * a-calfor.adb (Image): Simplify, removing unnecessary uses of 'Image.
6525 2011-08-02 Eric Botcazou <ebotcazou@adacore.com>
6527 * sem_type.adb (Covers): Move trivial case to the top and reuse the
6528 computed value of Base_Type.
6530 2011-08-02 Yannick Moy <moy@adacore.com>
6532 * restrict.adb (Check_Restriction): issue an error for any use of
6533 class-wide, even if the No_Dispatch restriction is not set.
6534 * sem_aggr.adb: Correct typos in comments and messages in formal mode
6535 * sem_ch3.adb (Process_Full_View): issue an error in formal mode is,
6536 when completing a private extension, the type named in the private part
6537 is not the same as that named in the visible part.
6538 * sem_res.adb (Resolve_Call): issue an error in formal mode on the use
6539 of an inherited primitive operations of a tagged type or type extension
6540 that returns the tagged type.
6541 * sem_util.adb, sem_util.ads (Is_Inherited_Operation_For_Type): new
6542 function which returns True for an implicit operation inherited by the
6543 derived type declaration for the argument type.
6544 (Is_SPARK_Object_Reference): move to appropriate place in alphabetic
6547 2011-08-02 Ed Schonberg <schonberg@adacore.com>
6549 * sem_ch5.adb (Pre_Analyze_Range): new procedure extracted from
6550 Process_Bounds, to perform analysis with expansion of a range or an
6551 expression that is the iteration scheme for a loop.
6552 (Analyze_Iterator_Specification): If domain of iteration is given by a
6553 function call with a controlled result, as is the case if call returns
6554 a predefined container, ensure that finalization actions are properly
6556 * par-ch3.adb: accept Ada2012 iterator form in P_Discrete_Range.
6558 2011-08-02 Javier Miranda <miranda@adacore.com>
6560 * sem_ch5.adb (Analyze_Iteration_Scheme): Fix typo.
6561 * gcc-interface/Make-lang.in: Update dependencies.
6563 2011-08-02 Javier Miranda <miranda@adacore.com>
6565 * sem_util.ads, sem_util.adb (Is_Variable): Add a new formal to
6566 determine if the analysis is performed using N or Original_Node (N).
6567 * exp_util.adb (Side_Effect_Free): Code cleanup since the new
6568 functionality of routine Is_Variable avoids code duplication.
6569 * checks.adb (Determine_Range): Handle temporaries generated by
6570 Remove_Side_Effects.
6572 2011-08-02 Javier Miranda <miranda@adacore.com>
6574 * exp_ch4.adb (Expand_N_Quantified_Expression): Force reanalysis and
6575 expansion of the condition. Required since the previous analysis was
6576 done with expansion disabled (see Resolve_Quantified_Expression) and
6577 hence checks were not inserted and record comparisons have not been
6580 2011-08-02 Ed Falis <falis@adacore.com>
6582 * s-taprop-vxworks.adb, s-intman-vxworks.adb, s-intman-vxworks.ads:
6585 2011-08-02 Bob Duff <duff@adacore.com>
6587 * opt.ads: Minor comment fix.
6589 2011-08-02 Bob Duff <duff@adacore.com>
6591 * sem_ch12.adb (Analyze_Package_Instantiation,
6592 Analyze_Subprogram_Instantiation): Turn off style checking while
6593 analyzing an instance. Whatever style checks that apply to the generic
6594 unit should apply, so it makes no sense to apply them in an instance.
6595 This was causing trouble when compiling an instance of a runtime
6596 unit that violates the -gnatyO switch.
6597 * stylesw.adb (Set_Style_Check_Options): "when 'O' =>" was missing from
6598 one of the two case statements, causing spurious errors.
6600 2011-08-02 Robert Dewar <dewar@adacore.com>
6602 * uname.adb: Minor reformatting.
6603 * gnatcmd.adb: Minor reformatting.
6604 * exp_attr.adb: Minor reformatting.
6606 2011-08-02 Ed Schonberg <schonberg@adacore.com>
6608 * exp_ch5.adb (Expand_N_Assignment_Statement): under restriction
6609 No_Dispatching_Calls, do not look for the Assign primitive, because
6610 predefined primitives are not created in this case.
6612 2011-08-02 Bob Duff <duff@adacore.com>
6614 * stylesw.ads: Minor comment fixes.
6616 2011-08-02 Robert Dewar <dewar@adacore.com>
6618 * freeze.adb (Add_To_Result): New procedure.
6620 2011-08-02 Jose Ruiz <ruiz@adacore.com>
6622 * exp_attr.adb (Find_Stream_Subprogram): When using a configurable run
6623 time, if the specific run-time routines for handling streams of strings
6624 are not available, use the default mechanism.
6626 2011-08-02 Arnaud Charlet <charlet@adacore.com>
6628 * s-regpat.ads: Fix typo.
6630 2011-08-02 Vincent Celier <celier@adacore.com>
6632 * prj-conf.adb (Get_Or_Create_Configuration_File): If On_Load_Config is
6633 not null, call it to create the in memory config project file without
6634 parsing an existing default config project file.
6636 2011-08-02 Eric Botcazou <ebotcazou@adacore.com>
6638 * atree.adb (Allocate_Initialize_Node): Remove useless temporaries.
6640 2011-08-02 Ed Schonberg <schonberg@adacore.com>
6642 * sem_elim.adb: an abstract subprogram does not need an eliminate
6643 pragma for its descendant to be eliminable.
6645 2011-08-02 Ed Falis <falis@adacore.com>
6647 * init.c: revert to handling before previous checkin for VxWorks
6648 * s-intman-vxworks.adb: delete unnecessary declarations related to
6649 using Ada interrupt facilities for handling signals.
6650 Delete Initialize_Interrupts. Use __gnat_install_handler instead.
6651 * s-intman-vxworks.ads: Import __gnat_install_handler as
6652 Initialize_Interrupts.
6653 * s-taprop-vxworks.adb: Delete Signal_Mask.
6654 (Abort_Handler): change construction of mask to unblock exception
6657 2011-08-02 Jerome Guitton <guitton@adacore.com>
6659 * a-except-2005.adb (Raise_From_Signal_Handler): Call
6660 Debug_Raise_Exception before propagation starts.
6662 2011-08-02 Eric Botcazou <ebotcazou@adacore.com>
6664 * exp_ch6.adb (Expand_Call): Guard restriction checks with a call
6665 to Restriction_Check_Required.
6666 * sem_ch3.adb (Analyze_Object_Declaration): Likewise.
6667 * sem_res.adb (Resolve_Call): Likewise.
6668 * sem_attr.adb (Check_Stream_Attribute): Likewise.
6670 2011-08-02 Bob Duff <duff@adacore.com>
6672 * stylesw.ads: Update comment.
6673 * style.adb: Minor: Use Error_Msg_NE instead of Error_Msg_N.
6674 * errout.ads: Remove obsolete comment.
6676 2011-08-02 Javier Miranda <miranda@adacore.com>
6678 * einfo.ads, einfo.adb (Is_Safe_To_Reevaluate): new function.
6679 (Set_Is_Safe_To_Reevaluate): new procedure.
6680 * sem_ch5.adb (Analyze_Assignment): Add one assertion to ensure that no
6681 assignment is allowed on safe-to-reevaluate variables.
6682 (Analyze_Iteration_Schine.Process_Bounds.One_Bound): Decorate the
6683 temporary created to remove side effects in expressions that use
6684 the secondary stack as safe-to-reevaluate.
6685 * exp_util.adb (Side_Effect_Free): Add missing code to handle well
6686 variables that are not true constants.
6688 2011-08-02 Robert Dewar <dewar@adacore.com>
6690 * sem_ch5.adb, sem_ch7.adb, einfo.ads, sem_util.adb, sem_util.ads,
6691 sem_res.adb, sem_ch6.adb: Minor reformatting.
6693 2011-08-02 Jerome Guitton <guitton@adacore.com>
6695 * a-except-2005.adb (Raise_Current_Excep): Remove obsolete dead code.
6697 2011-08-02 Ed Schonberg <schonberg@adacore.com>
6699 * sem_ch6.adb (New_Overloaded_Entity, Check_Overriding_Indicator): Do
6700 not set Overridden_Operation if subprogram is an initialization
6703 2011-08-02 Yannick Moy <moy@adacore.com>
6705 * par-ch6.adb: Correct obsolete name in comments
6706 * restrict.adb, restrict.ads (Check_Formal_Restriction): new function
6707 which takes two message arguments (existing function takes one), with
6708 second message used for continuation.
6709 * sem_ch5.adb (Analyze_Block_Statement): in formal mode, only reject
6710 block statements that originate from a source block statement, not
6711 generated block statements
6712 * sem_ch6.adb (Analyze_Function_Call): rename L into Actuals, for
6713 symmetry with procedure case
6714 * sem_ch7.adb (Check_One_Tagged_Type_Or_Extension_At_Most): new
6715 function to issue an error in formal mode if a package specification
6716 contains more than one tagged type or type extension.
6717 * sem_res.adb (Resolve_Actuals): in formal mode, check that actual
6718 parameters matching formals of tagged types are objects (or ancestor
6719 type conversions of objects), not general expressions. Issue an error
6720 on view conversions that are not involving ancestor conversion of an
6722 (Resolve_Type_Conversion): in formal mode, issue an error on the
6723 operand of an ancestor type conversion which is not an object
6724 * sem_util.adb, sem_util.ads (Find_Actual): extend the behavior of the
6725 procedure so that it works also for actuals of function calls
6726 (Is_Actual_Tagged_Parameter): new function which determines if its
6727 argument is an actual parameter of a formal of tagged type in a
6729 (Is_SPARK_Object_Reference): new function which determines if the tree
6730 referenced by its argument represents an object in SPARK
6732 2011-08-02 Robert Dewar <dewar@adacore.com>
6734 * sem_ch3.adb: Minor reformatting
6735 Minor comment addition
6736 Minor error msg text change
6738 2011-08-02 Javier Miranda <miranda@adacore.com>
6740 * sem_ch5.adb (Analyze_Iteration_Scheme.Uses_Secondary_Stack): New
6741 function. Used to be more precise when we generate a variable plus one
6742 assignment to remove side effects in the evaluation of the Bound
6744 (Analyze_Iteration_Scheme): Clean attribute analyzed in all the nodes
6745 of the bound expression to force its re-analysis and thus expand the
6746 associated transient scope (if required). Code cleanup replacing the
6747 previous code that declared the constant entity by an invocation to
6748 routine Force_Evaluation which centralizes this work in the frontend.
6750 2011-08-02 Robert Dewar <dewar@adacore.com>
6752 * einfo.adb (Is_Base_Type): Improve efficiency by using a flag table
6753 (Base_Type): Now uses improved Is_Base_Type function
6754 * einfo.ads (Base_Type): Inline this function
6756 2011-08-02 Robert Dewar <dewar@adacore.com>
6758 * sem_prag.adb (Analyze_Pragma): Defend against infinite recursion
6759 (Analyze_Aspect_Specifications): Fix Sloc values for constructed pragmas
6761 2011-08-02 Arnaud Charlet <charlet@adacore.com>
6763 * gcc-interface/Make-lang.in: Update dependencies.
6764 * gcc-interface/Makefile.in: Use s-inmapop-vxworks.adb for all VxWorks
6767 2011-08-02 Yannick Moy <moy@adacore.com>
6769 * par-ch3.adb (P_Delta_Constraint): issue an error in formal mode on
6770 non-simple expression used in delta constraint
6771 (P_Index_Or_Discriminant_Constraint): issue an error in formal mode on
6772 index constraint which is not a subtype mark
6773 * par.adb: With and use Restrict
6774 * sem_ch3.adb (Analyze_Component_Declaration): issue an error in formal
6775 mode on component type which is not a subtype mark and default
6776 expression on component
6777 (Analyze_Subtype_Declaration): issue an error in formal mode on subtype
6778 of string which does not have a lower index bound equal to 1
6779 (Array_Type_Declaration): issue an error in formal mode on index or
6780 component type which is not a subtype mark, and on aliased keyword on
6782 (Derived_Type_Declaration): issue an error in formal mode on interface,
6783 limited or abstract type
6784 (Record_Type_Declaration): issue an error in formal mode on interface
6785 (Record_Type_Definition): issue an error in formal mode on tagged types
6786 and type extensions not declared in the specification of a library unit
6787 package; on null non-tagged record; on variant part
6789 2011-08-02 Vincent Celier <celier@adacore.com>
6791 * prj-nmsc.adb (Check_Library_Attributes): Do not report Library_Dir
6792 not declared for qualified library project when Library_Name is not
6793 declared, but Library_Dir is.
6795 2011-08-02 Robert Dewar <dewar@adacore.com>
6797 * sem_ch13.adb (Analyze_Aspect_Specification): Fix slocs on generated
6798 pragmas (affects aspects [Component_]Default_Value
6799 (Check_Aspect_At_Freeze_Point): For Component_Default_Value, use
6800 component type for the resolution
6802 2011-08-02 Eric Botcazou <ebotcazou@adacore.com>
6804 * einfo.adb (Base_Type): Tune implementation for speed.
6806 2011-08-02 Robert Dewar <dewar@adacore.com>
6808 * freeze.adb: Minor reformatting.
6810 2011-08-02 Thomas Quinot <quinot@adacore.com>
6812 * scos.ads: Update comments.
6814 2011-08-02 Ed Schonberg <schonberg@adacore.com>
6816 * sem_ch3.adb (Build_Derived_Type): Inherit the convention from the
6817 base type, because the parent may be a subtype of a private type whose
6818 convention is established in a private part.
6820 2011-08-02 Hristian Kirtchev <kirtchev@adacore.com>
6822 * exp_ch6.adb (Expand_N_Extended_Return_Statement): Wrap the return
6823 statement in a block when the expansion of the return expression has
6824 created a finalization chain.
6825 * freeze.adb (Freeze_Expression): Alphabetize all choices associated
6826 with the parent node.
6827 Add N_Extended_Return_Statement to handle the case where a transient
6828 object declaration appears in the Return_Object_Declarations list of
6829 an extended return statement.
6831 2011-08-02 Matthew Gingell <gingell@adacore.com>
6833 * adaint.c (__gnat_is_symbolic_link_attr): Supress warning on possibly
6834 unused parameter 'name'.
6836 2011-08-02 Ed Schonberg <schonberg@adacore.com>
6838 * sem_elim.adb (Set_Eliminated): If the overridden operation is an
6839 inherited operation, check whether its alias, which is the source
6840 operastion that it renames, has been marked eliminated.
6842 2011-08-02 Javier Miranda <miranda@adacore.com>
6844 * exp_util.adb (Safe_Prefixed_Reference): Do not consider safe an
6845 in-mode parameter whose type is an access type since it can be used to
6846 modify its designated object. Enforce code that handles as safe an
6847 access type that is not access-to-constant but it is the result of a
6848 previous removal of side-effects.
6849 (Remove_Side_Effects): Minor code reorganization of cases which require
6850 no action. Done to incorporate documentation on new cases uncovered
6851 working in this ticket: no action needed if this routine was invoked
6852 too early and the nodes are not yet decorated.
6853 * sem_res.adb (Resolve_Slice): Minor code cleanup replacling two calls
6854 to routine Remove_Side_Effects by calls to Force_Evaluation since they
6855 were issued with actuals that are implicitly provided by
6858 2011-08-02 Robert Dewar <dewar@adacore.com>
6860 * sem_ch3.adb, sem_res.adb: Minor reformatting.
6862 2011-08-02 Yannick Moy <moy@adacore.com>
6864 * sem_attr.adb (Check_Formal_Restriction_On_Attribute): new procedure
6865 to issue an error in formal mode on attribute not supported in this mode
6866 (Analyze_Attribute): issue errors on standard attributes not supported
6868 * sem_ch3.adb (Modular_Type_Declaration): remove obsolete part of
6869 comment, and issue error in formal mode on modulus which is not a power
6871 (Process_Range_Expr_In_Decl): issue error in formal mode on non-static
6873 * sem_ch8.adb (Find_Type): issue error in formal mode on 'Base in
6875 * sem_res.adb (Resolve_Unary_Op): issue error in formal mode on unary
6876 operator on modular type (except 'not').
6878 2011-08-02 Robert Dewar <dewar@adacore.com>
6880 * gnat_rm.texi: Minor reformatting.
6882 2011-08-02 Arnaud Charlet <charlet@adacore.com>
6884 * s-osinte-linux.ads: Minor comment update and reformatting.
6885 * i-cexten.ads: Make this unit pure, as for its parent.
6886 Will allow its usage in more contexts if needed.
6888 2011-08-02 Robert Dewar <dewar@adacore.com>
6890 * s-utf_32.ads: Minor comment fix.
6892 2011-08-02 Ed Schonberg <schonberg@adacore.com>
6894 * sem_res.adb (Resolve_Actuals): if the subprogram is a primitive
6895 operation of a tagged synchronized type, handle the case where the
6896 controlling argument is overloaded.
6898 2011-08-02 Yannick Moy <moy@adacore.com>
6900 * gnat_rm.texi, opt.ads, sem_prag.adb, snames.ads-tmpl:
6901 Replace pragma SPARK_95 with pragma Restrictions (SPARK)
6902 * par-prag.adb (Process_Restrictions_Or_Restriction_Warnings): set
6903 SPARK mode and formal verification mode on processing SPARK restriction
6904 * s-rident.ads (Restriction_Id): add SPARK restriction in those not
6905 requiring consistency checking.
6907 2011-08-02 Robert Dewar <dewar@adacore.com>
6909 * sem_res.adb: Minor reformatting.
6911 2011-08-02 Robert Dewar <dewar@adacore.com>
6913 * a-cfdlli.ads, a-cfhase.ads, a-cforma.ads, a-cfhama.ads,
6914 a-cforse.ads: Remove unneeded with of Ada.Containers
6915 Remove commented out pragma Inline's
6916 Move specifications of new subprograms to the actual specs
6918 2011-08-02 Yannick Moy <moy@adacore.com>
6920 * a-cfdlli.ads, a-cfhase.ads, a-cforma.ads, a-cfhama.ads,
6921 a-cforse.ads: Update comments.
6923 2011-08-02 Ed Schonberg <schonberg@adacore.com>
6925 * sem_attr.adb: add attribute name when 'Result has the wrong prefix.
6927 2011-08-02 Robert Dewar <dewar@adacore.com>
6929 * a-cfdlli.ads, a-cfhase.ads, a-cforma.ads, a-cfhama.ads,
6930 a-cforse.ads, a-cofove.ads: Minor reformatting.
6932 2011-08-02 Claire Dross <dross@adacore.com>
6934 * a-cfdlli.ads, a-cfhase.ads, a-cforma.ads, a-cfhama.ads, a-cforse.ads,
6935 a-cofove.ads: Add comments.
6937 2011-08-02 Yannick Moy <moy@adacore.com>
6939 * gnat_rm.texi: Document formal containers.
6941 2011-08-02 Emmanuel Briot <briot@adacore.com>
6943 * g-comlin.adb (Goto_Section, Getopt): fix handling of "*" when there
6946 2011-08-02 Robert Dewar <dewar@adacore.com>
6948 * mlib-prj.adb, restrict.ads, sem_aggr.adb, sem_ch12.adb: Minor
6951 2011-08-02 Robert Dewar <dewar@adacore.com>
6953 * aspects.adb: New aspects Default_Value and Default_Component_Value
6954 New format of Aspect_Names table checks for omitted entries
6955 * aspects.ads: Remove mention of Aspect_Cancel and add documentation on
6956 handling of boolean aspects for derived types.
6957 New aspects Default_Value and Default_Component_Value
6958 New format of Aspect_Names table checks for omitted entries
6959 * einfo.ads, einfo.adb (Has_Default_Component_Value): New flag
6960 (Has_Default_Value): New flag
6961 (Has_Default_Component_Value): New flag
6962 (Has_Default_Value): New flag
6963 * par-ch13.adb (P_Aspect_Specifications): New format of Aspect_Names
6965 * par-prag.adb: New pragmas Default_Value and Default_Component_Value
6966 * sem_ch13.adb (Analyze_Aspect_Specifications): New aspects
6967 Default_Value and Default_Component_Value
6968 * sem_prag.adb: New pragmas Default_Value and Default_Component_Value
6969 New aspects Default_Value and Default_Component_Value
6970 * snames.ads-tmpl: New pragmas Default_Value and Default_Component_Value
6971 * sprint.adb: Print N_Aspect_Specification node when called from gdb
6973 2011-08-02 Vincent Celier <celier@adacore.com>
6975 * prj-nmsc.adb (Check_Library_Attributes): For virtual library project,
6976 inherit library kind.
6978 2011-08-02 Ed Schonberg <schonberg@adacore.com>
6980 * sem_res.adb: Add guards in calls to Matching_Static_Array_Bounds.
6983 2011-08-02 Robert Dewar <dewar@adacore.com>
6985 * i-cstrin.ads: Updates to make Interfaces.C.Strings match RM
6987 2011-08-02 Yannick Moy <moy@adacore.com>
6989 * sem_aggr.adb (Resolve_Aggregate): Fix thinko.
6991 2011-08-02 Robert Dewar <dewar@adacore.com>
6993 * impunit.adb: Add comment.
6995 2011-08-02 Yannick Moy <moy@adacore.com>
6997 * sem_aggr.adb (Check_Qualified_Aggregate): new procedure which checks
6998 qualification of aggregates in formal mode
6999 (Is_Top_Level_Aggregate): returns True for an aggregate not contained in
7001 (Resolve_Aggregate): complete the test that an aggregate is adequately
7002 qualified in formal mode
7004 2011-08-02 Pascal Obry <obry@adacore.com>
7006 * make.adb, bindgen.adb, gnatbind.adb: Minor reformatting.
7007 * mlib-prj.adb: Supress warning when compiling binder generated file.
7008 (Build_Library): Supress all warnings when compiling the binder
7011 2011-08-02 Yannick Moy <moy@adacore.com>
7013 * errout.adb, errout.ads (Check_Formal_Restriction): move procedure
7015 * restrict.adb, restrict.ads (Check_Formal_Restriction): ...to here
7016 * sem_aggr.adb, sem_ch5.adb, sem_util.adb:
7017 Add with/use clauses to make Check_Formal_Restriction visible
7019 2011-08-02 Ed Schonberg <schonberg@adacore.com>
7021 * sem_ch12.adb (Check_Generic_Actuals): handle properly actual
7022 in-parameters when type of the generic formal is private in the generic
7023 spec and non-private in the body.
7025 2011-08-02 Claire Dross <dross@adacore.com>
7027 * a-cfdlli.adb, a-cfdlli.ads, a-cfhase.adb, a-cfhase.ads, a-cfhama.adb,
7028 a-cfhama.ads, a-cforse.adb, a-cforse.ads, a-cforma.adb, a-cforma.ads,
7029 a-cofove.adb, a-cofove.ads: New files implementing formal containers.
7030 * impunit.adb, Makefile.rtl: Take new files into account.
7032 2011-08-02 Robert Dewar <dewar@adacore.com>
7034 * sem_aggr.adb, sem_ch3.adb, sem_ch5.adb, make.adb, sem_res.adb,
7035 sem_attr.adb, sem_ch6.adb, sem_ch8.adb: Minor reformatting.
7037 2011-08-02 Yannick Moy <moy@adacore.com>
7039 * sem_aggr.adb (Resolve_Aggregate): disable incorrectly placed check in
7041 * sem_util.adb (Matching_Static_Array_Bounds): proper detection of
7042 matching static array bounds, taking into account the special case of
7044 * sem_ch3.adb: Typo in comment.
7046 2011-08-02 Yannick Moy <moy@adacore.com>
7048 * errout.adb, errout.ads (Check_Formal_Restriction): new procedure
7049 which issues an error in formal mode if its argument node is originally
7051 * sem_ch3.adb (Analyze_Full_Type_Declaration): move test that a type
7052 has a discriminant specification so that it does not include the case
7054 (Derived_Type_Declaration): move here the test that a derived type has a
7055 discriminant specification
7056 * sem_aggr.adb (Resolve_Record_Aggregate): test the presence of the
7057 first element of a component association before accessing its choices
7058 (presence of component association is not enough)
7059 * exp_ch6.adb (Expand_N_Subprogram_Declaration): test if a subprogram
7060 declaration is a library item before accessing the next element in a
7061 list, as library items are not member of lists
7062 * sem_attr.adb, sem_ch11.adb, sem_ch4.adb, sem_ch5.adb, sem_ch6.adb,
7063 sem_ch8.adb, sem_ch9.adb, sem_res.adb, sem_util.adb: use
7064 Check_Formal_Restriction whenever possible.
7066 2011-08-02 Ed Schonberg <schonberg@adacore.com>
7068 * sem_ch3.adb (Find_Type_Of_Object): In ASIS mode, create an itype
7069 reference when needed.
7071 2011-08-02 Bob Duff <duff@adacore.com>
7073 * gnat_ugn.texi: Fix typo.
7075 2011-08-02 Vincent Celier <celier@adacore.com>
7077 * make.adb (Gnatmake): Use MLib.Tgt.Archive_Ext as the extension of
7078 archive file name. Do not use the full path name of archives for Open
7081 2011-08-02 Robert Dewar <dewar@adacore.com>
7083 * sem_ch12.adb, sem_ch11.adb: New calling sequence for
7084 Analyze_Aspect_Specifications
7086 (Analyze_Aspect_Specifications): New handling for boolean aspects
7087 * sem_ch13.ads (Analyze_Aspect_Specifications): New calling sequence
7088 * sem_ch3.adb, sem_ch6.adb, sem_ch7.adb, sem_ch9.adb: New calling
7089 sequence for Analyze_Aspect_Specifications
7090 * sem_prag.adb (Analyze_Pragma): Remove use of Aspect_Cancel entirely
7091 * sinfo.ads, sinfo.adb (Aspect_Cancel): Remove, no longer used
7093 2011-08-02 Robert Dewar <dewar@adacore.com>
7095 * freeze.adb (Freeze_Entity): Remove handling of delayed boolean
7096 aspects, since these no longer exist.
7098 2011-08-02 Robert Dewar <dewar@adacore.com>
7100 * par-ch13.adb (Aspect_Specifications_Present): Always return false on
7101 semicolon, do not try to see if there are aspects following it.
7102 * par-ch3.adb (P_Declarative_Items): Better message for unexpected
7105 2011-08-02 Robert Dewar <dewar@adacore.com>
7107 * sem_ch8.adb, aspects.ads: Minor reformatting.
7109 2011-08-02 Eric Botcazou <ebotcazou@adacore.com>
7111 * sem_ch13.ads (Analyze_Aspect_Specification): Add pragma Inline.
7112 * sem_ch13.adb (Analyze_Non_Null_Aspect_Specifications): New procedure
7114 (Analyze_Aspect_Specifications): ...here. Call above procedure.
7116 2011-08-02 Yannick Moy <moy@adacore.com>
7118 * exp_ch6.adb (Expand_N_Subprogram_Declaration): issue error in formal
7119 mode on subprogram declaration outside of package specification, unless
7120 it is followed by a pragma Import
7121 * sem_ch3.adb (Access_Definition, Access_Subprogram_Declaration,
7122 Access_Type_Declaration): issue error in formal mode on access type
7123 (Analyze_Incomplete_Type_Decl): issue error in formal mode on
7125 (Analyze_Object_Declaration): issue error in formal mode on object
7126 declaration which does not respect SPARK restrictions
7127 (Analyze_Subtype_Declaration): issue error in formal mode on subtype
7128 declaration which does not respect SPARK restrictions
7129 (Constrain_Decimal, Constrain_Float, Constrain_Ordinary_Fixed): issue
7130 error in formal mode on digits or delta constraint
7131 (Decimal_Fixed_Point_Type_Declaration): issue error in formal mode on
7132 decimal fixed point type
7133 (Derived_Type_Declaration): issue error in formal mode on derived type
7134 other than type extensions of tagged record types
7135 * sem_ch6.adb (Process_Formals): remove check in formal mode, redundant
7136 with check on access definition
7137 * sem_ch9.adb (Analyze_Protected_Definition): issue error in formal
7138 mode on protected definition.
7139 (Analyze_Task_Definition): issue error in formal mode on task definition
7141 2011-08-02 Robert Dewar <dewar@adacore.com>
7143 * make.adb, sem_ch8.adb, s-inmaop-vxworks.adb: Minor reformatting.
7145 2011-08-02 Javier Miranda <miranda@adacore.com>
7147 * sem_ch6.adb (Can_Override_Operator): New function.
7148 (Verify_Overriding_Indicator): Add missing code to check overriding
7149 indicator in operators. Fixes regression.
7150 (Check_Overriding_Indicator): Minor reformating after replacing the
7151 code that evaluates if the subprogram can override an operator by
7152 invocations to the above new function.
7154 (Write_Field26_Name): Add missing code to ensure that, following
7155 the documentation in einfo.ads, this field is not shown as attribute
7156 "Static_Initialization" on non-dispatching functions.
7158 2011-08-02 Jose Ruiz <ruiz@adacore.com>
7160 * sem_res.adb (Resolve_Call): A call to
7161 Ada.Real_Time.Timing_Events.Set_Handler violates restriction
7162 No_Relative_Delay (AI-0211) only when it sets a relative timing event,
7163 i.e., when the second parameter is of type Time_Span.
7165 2011-08-02 Vincent Celier <celier@adacore.com>
7167 * make.adb (Gnatmake): use <library dir>/lib<library name>.a to link
7168 with an archive instead of -L<library dir> -l<library name>.
7170 2011-08-02 Ed Schonberg <schonberg@adacore.com>
7172 * sem_ch8.adb (Analyze_Use_Type): If the clause is being re-analyzed,
7173 mark the base types In_Use in addition to making the operations
7176 2011-08-02 Ed Falis <falis@adacore.com>
7178 * init.c: add and setup __gnat_signal_mask for the exception signals
7179 * s-inmaop-vxworks.adb: new file.
7180 * s-intman-vxworks.adb: remove unnecessary initializations and
7182 * s-intman-vxworks.ads: remove unnecessary variable
7183 * s-taprop-vxworks.adb: simplify signal initialization
7185 2011-08-02 Robert Dewar <dewar@adacore.com>
7187 * sem_ch8.adb: Minor code reorganization, comment updates.
7189 2011-08-02 Robert Dewar <dewar@adacore.com>
7191 * sem_res.adb (Matching_Static_Array_Bounds): Moved to Sem_Util
7192 * sem_util.ads, sem_util.adb (Matching_Static_Array_Bounds): Moved
7194 (Matching_Static_Array_Bounds): Use Is_Ok_Static_Expression
7195 (Matching_Static_Array_Bounds): Moved here from Sem_Res
7197 2011-08-02 Ed Schonberg <schonberg@adacore.com>
7199 * atree.h, atree.ads, atree.adb: New subprograms to manipulate Elist5.
7200 * par_ch8.adb (P_Use_Type): initialize Used_Operations for node.
7201 * sinfo.ads, sinfo.adb (Used_Operations): new attribute of
7202 use_type_clauses, to handle more efficiently use_type and use_all_type
7204 * sem_ch8.adb: Rewrite Use_One_Type and End_Use_Type to handle the
7205 Ada2012 Use_All_Type clause.
7206 (Use_Class_Wide_Operations): new procedure.
7208 2011-08-02 Robert Dewar <dewar@adacore.com>
7210 * exp_util.adb, par-ch10.adb, par-ch6.adb, sem.adb, sem_ch6.adb,
7211 sem_ch6.ads, sinfo.adb, sinfo.ads, sprint.adb: Change parameterized
7212 expression to expression function.
7214 2011-08-02 Ed Schonberg <schonberg@adacore.com>
7216 * sem_ch4.adb: transform simple Ada2012 membership into equality only
7217 if types are compatible.
7219 2011-08-02 Yannick Moy <moy@adacore.com>
7221 * sem_res.adb (Matching_Static_Array_Bounds): new function which
7222 returns True if its argument array types have same dimension and same
7223 static bounds at each index.
7224 (Resolve_Actuals): issue an error in formal mode on actuals passed as
7225 OUT or IN OUT paramaters which are not view conversions in SPARK.
7226 (Resolve_Arithmetic_Op): issue an error in formal mode on
7227 multiplication or division with operands of fixed point types which are
7228 not qualified or explicitly converted.
7229 (Resolve_Comparison_Op): issue an error in formal mode on comparisons of
7230 Boolean or array type (except String) operands.
7231 (Resolve_Equality_Op): issue an error in formal mode on equality
7232 operators for array types other than String with non-matching static
7234 (Resolve_Logical_Op): issue an error in formal mode on logical operators
7235 for array types with non-matching static bounds. Factorize the code in
7236 Matching_Static_Array_Bounds.
7237 (Resolve_Qualified_Expression): issue an error in formal mode on
7238 qualified expressions for array types with non-matching static bounds.
7239 (Resolve_Type_Conversion): issue an error in formal mode on type
7240 conversion for array types with non-matching static bounds
7242 2011-08-02 Robert Dewar <dewar@adacore.com>
7244 * par-ch10.adb: Minor code reorganization (use Nkind_In).
7246 2011-08-02 Ed Schonberg <schonberg@adacore.com>
7248 * par-ch9.adb: save location of entry for proper error message.
7250 2011-08-02 Javier Miranda <miranda@adacore.com>
7252 * sem_type.ads, sem_type.adb (Is_Ancestor): Addition of a new formal
7253 (Use_Full_View) which permits this routine to climb through the
7254 ancestors using the full-view of private parents.
7255 * sem_util.adb (Collect_Interfaces_Info, Implements_Interface): Set
7256 Use_Full_View to true in calls to Is_Ancestor.
7257 * sem_disp.adb (Override_Dispatching_Operation): Set Use_Full_View to
7258 true in call to Is_Ancestor.
7259 * exp_ch3.adb (Build_Offset_To_Top_Functions, Initialize_Tag): Set
7260 Use_Full_View to true in call to Is_Ancestor.
7261 * exp_ch7.adb (Controller_Component): Set Use_Full_View to true in
7262 call to Is_Ancestor.
7263 * exp_ch4.adb (Expand_N_Type_Conversion, Tagged_Membership): Set
7264 Use_Full_View to true in calls to Is_Ancestor.
7265 * exp_disp.adb (Expand_Interface_Actuals, Make_Secondary_DT, Make_DT,
7266 Make_Select_Specific_Data_Table, Register_Primitive,
7267 Set_All_DT_Position): Set Use_Full_View to true in calls to Is_Ancestor.
7268 * exp_intr.adb (Expand_Dispatching_Constructor_Call): Set Use_Full_View
7269 to true in call to Is_Ancestor.
7270 * exp_util.adb (Find_Interface_ADT, Find_Interface_Tag): Set
7271 Use_Full_View to true in calls to Is_Ancestor.
7273 (Write_Call_Info): Set Use_Full_View to true in call to Is_Ancestor.
7274 (Write_Type_Info): Set Use_Full_View to true in call to Is_Ancestor.
7276 2011-08-02 Robert Dewar <dewar@adacore.com>
7278 * gnat_rm.texi: Minor reformatting.
7279 * sem_prag.adb: Minor reformatting.
7281 2011-08-02 Tristan Gingold <gingold@adacore.com>
7283 * vms_data.ads: Add VMS qualifier for -gnateP.
7285 2011-08-02 Robert Dewar <dewar@adacore.com>
7287 * par-ch13.adb (P_Aspect_Specification): New meaning of Decl = Empty
7288 * par-ch7.adb (P_Package): Proper placement of aspects for package
7290 * par-endh.adb (Check_End): Ad Is_Sloc parameter
7291 (End_Statements): Add Is_Sloc parameterr
7292 * par.adb (P_Aspect_Specification): New meaning of Decl = Empty
7293 (Check_End): Ad Is_Sloc parameter
7294 (End_Statements): Add Is_Sloc parameterr
7296 2011-08-02 Vincent Celier <celier@adacore.com>
7298 * ug_words: Add VMS qualifier equivalent to -gnateP:
7299 /SYMBOL_PREPROCESSING.
7301 2011-08-02 Jose Ruiz <ruiz@adacore.com>
7303 * gnat-style.texi: For hexadecimal numeric literals the typical
7304 grouping of digits is 4 to represent 2 bytes.
7305 A procedure spec which is split into several lines is indented two
7308 2011-08-02 Yannick Moy <moy@adacore.com>
7310 * exp_aggr.adb (Is_Others_Aggregate): move function to other unit.
7311 * sem_aggr.adb, sem_aggr.ads (Is_Others_Aggregate): move function here
7312 (Resolve_Aggregate): issue errors in formal modes when aggregate is not
7314 (Resolve_Array_Aggregate): issue errors in formal modes on non-static
7315 choice in array aggregate
7316 (Resolve_Extension_Aggregate): issue errors in formal modes on subtype
7318 (Resolve_Record_Aggregate): issue errors in formal modes on mixed
7319 positional and named aggregate for record, or others in record
7320 aggregate, or multiple choice in record aggregate
7321 * sem_res.adb (Resolve_Logical_Op): issue errors in formal mode when
7322 array operands to logical operations AND, OR and XOR do not have the
7323 same static lower and higher bounds
7324 * sem_ch5.adb, sinfo.ads: Correct typos in comments
7326 2011-08-01 Robert Dewar <dewar@adacore.com>
7328 * sem_util.ads, sem_util.adb, sem_ch6.adb (Last_Source_Statement):
7329 Replaces Last_Source_Node_In_Sequence.
7330 * err_vars.ads (Error_Msg_Lang): 16 is OK, don't need 4K
7331 * errout.adb (Set_Error_Msg_Lang): Takes arg with no parens, but stores
7332 parens and blank in string (this was inconsistently implemented).
7334 (Set_Error_Msg_Lang): Takes arg with no parens, but stores parens and
7335 blank in string (this was inconsistently implemented).
7337 (Set_Global_Switches): Set formal mode switches appropriately
7338 * opt.ads, opt.adb: Formal mode is now global switches, more consistent
7340 (Analyze_Pragma, case SPARK_95): Set opt switches appropriately and
7341 call Set_Error_Msg_Lang to set "spark" as language name.
7342 * par.adb: Remove unnecessary call to set formal language for errout
7343 * sem_prag.adb (P_Pragma, case SPARK_95): Set opt switches
7344 appropriately and call Set_Error_Msg_Lang to set "spark" as language
7346 * sem_ch4.adb (Analyze_Concatenation_Operand): remove procedure and
7347 calls to it, moved after resolution so that types are known
7348 * sem_res.adb (Resolve_Op_Concat): issue an error in formal mode if
7349 result of concatenation is not of type String
7350 (Resolve_Op_Concat_Arg): issue an error in formal mode if an operand of
7351 concatenation is not properly restricted
7352 * gnat_rm.texi: Add doc on pragma Spark_95.
7353 * gcc-interface/Makefile.in: Remove obsolete target pairs for
7354 Interfaces.C.* on VMS. Remove s-parame-vms-restrict.ads.
7355 * gcc-interface/Make-lang.in: Update dependencies.
7357 2011-08-01 Javier Miranda <miranda@adacore.com>
7359 * sem_disp.adb (Override_Dispatching_Operation): Enforce strictness of
7360 condition that detects if the overridden operation must replace an
7363 2011-08-01 Javier Miranda <miranda@adacore.com>
7365 * exp_ch4.adb (Expand_N_Case_Expression): Propagate to the expanded
7366 code declarations inserted by Insert_Actions in each alternative of the
7367 N_Case_Expression node.
7369 2011-08-01 Robert Dewar <dewar@adacore.com>
7371 * sem_ch6.adb: Minor code reorganization.
7372 * sem_util.adb: Minor reformatting.
7374 2011-08-01 Pascal Obry <obry@adacore.com>
7376 * prj-env.adb: Remove <prefix>/lib/gpr/<target> project search path.
7377 * gnat_ugn.texi: Add documentation for VERSIONINFO Windows resource.
7379 2011-08-01 Yannick Moy <moy@adacore.com>
7381 * par-ch4.adb (P_Name): issue a syntax error in SPARK mode on character
7382 literal or operator symbol which is prefixed
7383 * sem_attr.adb (Analyze_Access_Attribute): issue an error in formal
7384 mode on access attributes.
7385 * sem_ch4.adb (Analyze_Concatenation_Operand): new procedure to check
7386 that concatenation operands are properly restricted in formal mode
7387 (Analyze_Concatenation, Analyze_Concatenation_Rest): call new procedure
7388 Analyze_Concatenation_Operand. Issue an error in formal mode if the
7389 result of the concatenation has a type different from String.
7390 (Analyze_Conditional_Expression, Analyze_Explicit_Dereference,
7391 Analyze_Quantified_Expression, Analyze_Slice,
7392 Analyze_Null): issue an error in formal mode on unsupported constructs
7394 (Analyze_Block_Statement): only issue error on source block statement
7395 * sem_util.ads, sem_util.adb (Last_Source_Node_In_Sequence): new
7396 function which returns the last node in a list of nodes for which
7397 Comes_From_Source returns True, if any
7398 * sem_ch6.adb (Check_Missing_Return): minor refactoring to use
7399 Last_Source_Node_In_Sequence
7400 * sem_ch8.adb (Analyze_Exception_Renaming, Analyze_Generic_Renaming,
7401 Analyze_Object_Renaming, Analyze_Use_Package): issue an error in formal
7402 mode on unsupported constructs
7403 * sem_ch9.adb Do not return after issuing error in formal mode, as the
7404 rest of the actions may be needed later on since the error is marked as
7406 * sinfo.ads: Typos in comments.
7408 2011-08-01 Pascal Obry <obry@adacore.com>
7410 * projects.texi: Minor editing.
7412 2011-08-01 Yannick Moy <moy@adacore.com>
7414 * err_vars.ads (Error_Msg_Lang, Error_Msg_Langlen): new variables for
7415 insertion character ~~
7416 * errout.ads, errout.adb (Formal_Error_Msg_...): remove procedures
7417 (Set_Error_Msg_Lang): new procedure which fixes the language for use
7418 with insertion character ~~
7419 (Set_Msg_Text): treat insertion character ~~
7420 * par-ch4.adb, par-ch5.adb, par-endh.adb, sem_attr.adb, sem_ch11.adb,
7421 sem_ch3.adb, sem_ch5.adb, sem_ch9.adb, sem_util.adb: Replace calls to
7422 Formal_Error_Msg_... procedures by equivalent Error_Msg_...
7423 procedures. Favor calls to Error_Msg_F(E) over Error_Msg_N(E). Make
7424 errors related to the formal language restriction not serious
7425 (insertion character |).
7426 * par.adb (Par): set formal language for error messages if needed
7427 * sem_ch6.adb (Check_Missing_Return): take into account possible
7428 generated statements at the end of the function
7429 * snames.ads-tmpl (Name_SPARK_95, Pragma_SPARK_95): new variable and
7430 enumeration value to define a new pragma SPARK_95
7431 * opt.ads, opt.adb (SPARK_Version_Type, SPARK_Version_Default,
7432 SPARK_Version): new type and variables to store the SPARK version
7434 (SPARK_Mode): return True when SPARK_Version is set
7435 * par-prag.adb: Correct indentation
7436 (Prag): take Pragma_SPARK_95 into account
7437 * sem_prag.adb (Set_Mechanism_Value, Sig_Flags): take Pragma_SPARK_95
7440 2011-08-01 Robert Dewar <dewar@adacore.com>
7442 * sem_ch3.adb, sem_ch3.ads, sem_ch5.adb, prj-part.adb, par-ch4.adb,
7443 sem_util.adb, sem_ch4.adb, sem_ch6.adb, sem_ch6.ads, sem_ch8.adb,
7444 sem_ch8.ads, sem_ch13.ads, par-ch5.adb, prj-env.ads: Minor reformatting
7446 2011-08-01 Pascal Obry <obry@adacore.com>
7448 * prj-part.ads, prj-part.adb (Parse): Add Target_Name parameter. Pass
7449 Target_Name to Get_Path call.
7450 (Parse_Single_Project): Likewise.
7451 (Post_Parse_Context_Clause): Likewise.
7452 * prj-env.ads, prj-env.adb (Find_Project): Add Target_Name parameter.
7453 Call Initialise_Project_Path with the proper Target_Name.
7454 (Initialize_Project_Path): Add <gnat_root>/<target_name>/lib/gnat
7456 (Get_Path): Add Target_Name parameter. Call Initialise_Project_Path
7457 with the proper Target_Name.
7458 * prj-conf.adb (Get_Or_Create_Configuration_File): Pass Target_Name to
7460 (Parse_Project_And_Apply_Config): Likewise.
7461 * prj-makr.adb (Initialize): Pass empty Target_Name to Parse routine.
7462 This is fine as this part of the code is supporting only native
7464 * prj-pars.adb (Parse): Pass empty Target_Name to Parse routine. This
7465 is fine as this part of the code is supporting only native compilation.
7467 2011-08-01 Yannick Moy <moy@adacore.com>
7469 * sem_util.adb (Enter_Name): issue error in formal mode on declaration
7470 of homonym, unless the homonym is one of the cases allowed in SPARK
7471 * par-ch5.adb (Parse_Decls_Begin_End): issue error in SPARK mode for
7472 package declaration occurring after a body.
7474 2011-08-01 Robert Dewar <dewar@adacore.com>
7476 * checks.adb, exp_ch4.adb: Minor reformatting.
7478 2011-08-01 Javier Miranda <miranda@adacore.com>
7480 * einfo.ads (Access_Disp_Table): Fix documentation.
7481 (Dispatch_Table_Wrappers): Fix documentation.
7483 2011-08-01 Pascal Obry <obry@adacore.com>
7485 * prj-env.adb, prj-env.ads: Minor reformatting.
7487 2011-08-01 Yannick Moy <moy@adacore.com>
7489 * sem_util.ads, sem_util.adb, par.adb, par_util.adb
7490 (Formal_Error_Msg, Formal_Error_Msg_N, Formal_Error_Msg_SP): move
7491 procedures out of these packages.
7492 * errout.ads, errout.adb
7493 (Formal_Error_Msg, Formal_Error_Msg_N, Formal_Error_Msg_SP): move
7494 procedures in of this package
7495 (Formal_Error_Msg_NE): new procedure for wrapper on Error_Msg_NE
7496 * par-ch5.adb (Parse_Decls_Begin_End): issue syntax error in SPARK mode
7497 on misplaced later vs initial declarations, like in Ada 83
7498 * sem_attr.adb (Processing for Analyze_Attribute): issue error in
7499 formal mode on attribute of private type whose full type declaration
7501 * sem_ch3.adb (Analyze_Declarations): issue error in formal mode on a
7502 package declaration inside a package specification
7503 (Analyze_Full_Type_Declaration): issue error in formal mode on
7504 controlled type or discriminant type
7505 * sem_ch6.adb (Analyze_Subprogram_Specification): only issue error on
7506 user-defined operator means that it should come from the source
7507 (New_Overloaded_Entity): issue error in formal mode on overloaded
7509 * sem_ch6.ads, sem_ch13.ads: typos in comments.
7511 2011-08-01 Thomas Quinot <quinot@adacore.com>
7513 * atree.adb: Minor reformatting.
7514 * checks.adb: Minor reformatting.
7516 2011-08-01 Vincent Celier <celier@adacore.com>
7518 * s-parame-vms-ia64.ads: Fix typo in comment
7520 * s-parame-vms-restrict.ads: Removed, unused.
7522 2011-08-01 Javier Miranda <miranda@adacore.com>
7525 (Is_Variable_Size_Array): Remove local subprogram Is_Constant_Bound.
7527 (Constrain_Index): Remove side effects in the evaluation of the bounds.
7528 * sem_ch3.ads, sem_ch3.adb
7529 (Is_Constant_Bound): New extended version of the subprogram that was
7530 previously located inside function Exp_Ch3.Is_Variable_Size_Array.
7531 Moved here since it is shared by routines of sem_ch3 and exp_ch3.
7532 * sem_aux.ads (Constant_Value): Fix typo in comment.
7533 * checks.adb (Generate_Index_Checks): New implementation which, for
7534 array objects with constant bounds, generates the runtime check
7535 referencing the bounds of the array type. For other cases this routine
7536 provides its previous behavior obtaining such values from the array
7538 * sem_res.adb (Set_Slice_Subtype): Link a copied range subtree with its
7540 * atree.adb (New_Copy): Reset flag Is_Overloaded in the new copy since
7541 we cannot have semantic interpretations of the new node.
7543 2011-08-01 Ed Schonberg <schonberg@adacore.com>
7545 * sem_ch6.adb (Fully_Conformant_Expressions): handle quantified
7548 2011-08-01 Arnaud Charlet <charlet@adacore.com>
7550 * sem_ch8.adb: Minor code editing.
7551 * s-vxwext.adb: Remove trailing space.
7552 * freeze.adb, freeze.ads, errout.ads, erroutc.adb: Fix GPLv3 header for
7553 consistency with other files.
7555 2011-08-01 Thomas Quinot <quinot@adacore.com>
7557 * s-auxdec.ads, s-auxdec-vms_64.ads: Minor reformatting.
7559 2011-08-01 Ed Schonberg <schonberg@adacore.com>
7561 * par-ch10.adb: reject parameterized expressions as compilation unit.
7562 * sem_ch4.adb: handle properly conditional expression with overloaded
7563 then_clause and no else_clause.
7565 2011-08-01 Tristan Gingold <gingold@adacore.com>
7567 * s-parame-vms-alpha.ads, s-parame-vms-ia64.ads: Redeclare C_Address
7568 like done by System.Aux_DEC.
7569 * env.c (__gnat_setenv) [VMS]: Put logicals into LNM$PROCESS table.
7571 2011-08-01 Yannick Moy <moy@adacore.com>
7573 * par-endh.adb (Check_End): issue a syntax error in SPARK mode for
7574 missing label at end of declaration (subprogram or package)
7575 * par-ch4.adb (P_Name): issue a syntax error in SPARK mode for mixing
7576 of positional and named parameter association
7577 * par.adb, par-util.adb (Formal_Error_Msg_SP): new wrapper on
7578 Error_Msg_SP which adds a prefix to the error message giving the name
7579 of the formal language analyzed
7580 * sem_ch6.adb (Analyze_Return_Type): issue an error in formal mode for
7581 access result type in subprogram, unconstrained array as result type,.
7582 (Analyze_Subprogram_Declaration): issue an error in formal mode for null
7584 * sem_ch8.adb: Code clean up.
7586 2011-08-01 Javier Miranda <miranda@adacore.com>
7588 * sem_ch7.adb (Uninstall_Declarations): Remove useless code.
7589 * einfo.ads (Access_Disp_Table): Fix documentation.
7590 (Dispatch_Table_Wrappers): Fix documentation.
7591 * einfo.adb (Access_Disp_Table, Dispatch_Table_Wrappers,
7592 Set_Access_Disp_Table, Set_Dispatch_Table_Wrappers): Fix the assertions
7593 to enforce the documentation of this attribute.
7594 (Set_Is_Interface): Cleanup the assertion.
7595 * exp_ch4.adb (Expand_Allocator_Expression, Tagged_Membership): Locate
7596 the Underlying_Type entity before reading attribute Access_Disp_Table.
7597 * exp_disp.adb (Expand_Dispatching_Call, Expand_Interface_Conversion):
7598 Locate the Underlying_Type before reading attribute Access_Disp_Table.
7599 * exp_aggr.adb (Build_Array_Aggr_Code, Build_Record_Aggr_Code): Locate
7600 the Underlying_Type entity before reading attribute Access_Disp_Table.
7601 * exp_ch3.adb (Build_Record_Init_Proc, Expand_N_Object_Declaration):
7602 Locate the Underlying_Type entity before reading attribute
7605 2011-08-01 Ed Schonberg <schonberg@adacore.com>
7607 * s-poosiz.ads: Additional overriding indicators.
7609 2011-08-01 Yannick Moy <moy@adacore.com>
7611 * sem_ch5.adb (Analyze_Exit_Statement): add return after error in
7613 (Analyze_Iteration_Scheme): issue error in formal mode when loop
7614 parameter specification does not include a subtype mark.
7615 * sem_ch6.adb (Analyze_Abstract_Subprogram_Declaration): issue error in
7616 formal mode on abstract subprogram.
7617 (Analyze_Subprogram_Specification): issue error in formal mode on
7618 user-defined operator.
7619 (Process_Formals): issue error in formal mode on access parameter and
7621 * sem_ch9.adb (Analyze_Abort_Statement,
7622 Analyze_Accept_Statement, Analyze_Asynchronous_Select,
7623 Analyze_Conditional_Entry_Call, Analyze_Delay_Relative,
7624 Analyze_Delay_Until, Analyze_Entry_Call_Alternative,
7625 Analyze_Requeue, Analyze_Selective_Accept,
7626 Analyze_Timed_Entry_Call): issue error in formal mode on such constructs
7627 * sem_ch11.adb (Analyze_Raise_Statement, Analyze_Raise_xxx_Error):
7628 issue error in formal mode on user-defined raise statement.
7630 2011-08-01 Thomas Quinot <quinot@adacore.com>
7632 * sem_ch6.adb (Enter_Overloaded_Entity): Do not warn about a
7633 declaration being hidden when overriding an implicit inherited
7635 * par-ch10.adb (P_Compilation_Unit): In syntax check only mode
7636 (-gnats), do not complain about a source file that contains only a
7639 2011-08-01 Ed Schonberg <schonberg@adacore.com>
7641 * sem_ch5.adb (Analyze_Iterator_Scheme): Do not overwrite type of loop
7642 variable if already set.
7644 2011-08-01 Arnaud Charlet <charlet@adacore.com>
7646 * g-socket-dummy.adb, s-osinte-linux.ads, g-socket-dummy.ads,
7647 g-debuti.adb, g-tasloc.adb, g-debuti.ads, g-tasloc.ads,
7648 s-osinte-hpux.ads, g-sercom.adb, g-soliop-solaris.ads, g-sercom.ads,
7649 g-sptain.ads, g-curexc.ads, s-tasloc.adb, s-tasloc.ads, s-tataat.adb,
7650 g-ctrl_c.adb, a-reatim.adb, s-tataat.ads, g-dirope.adb, g-ctrl_c.ads,
7651 g-dirope.ads, g-boubuf.adb, g-calend.adb, g-boubuf.ads, g-souinf.ads,
7652 g-table.adb, g-bytswa-x86.adb, g-wispch.adb, g-io.adb, g-table.ads,
7653 g-wispch.ads, g-io.ads, g-memdum.adb, g-memdum.ads, g-busorg.adb,
7654 g-busorg.ads, g-regpat.adb, g-sothco-dummy.adb, g-encstr.adb,
7655 g-regpat.ads, g-sothco-dummy.ads, s-osinte-aix.ads, g-encstr.ads,
7656 g-sercom-mingw.adb, s-mastop-vms.adb, g-diopit.adb, g-diopit.ads,
7657 s-vxwext.adb, g-dyntab.adb, g-dyntab.ads, g-crc32.adb,
7658 g-sercom-linux.adb, g-crc32.ads, s-regpat.adb, g-flocon.ads,
7659 s-regpat.ads, g-stheme.adb, g-sestin.ads, s-taspri-posix-noaltstack.ads,
7660 g-soliop.ads, s-inmaop-posix.adb, g-locfil.ads, g-enblsp-vms-alpha.adb,
7661 g-socthi-dummy.adb, g-socthi-dummy.ads, gnat.ads, g-moreex.adb,
7662 g-moreex.ads, g-dynhta.adb, g-dynhta.ads, g-deutst.ads, g-htable.adb,
7663 g-cgicoo.adb, g-htable.ads, g-cgicoo.ads, a-interr.adb,
7664 g-socthi-vms.adb, g-socthi-vms.ads, g-hesora.adb, g-bubsor.adb,
7665 g-hesora.ads, g-bubsor.ads, g-md5.adb, g-md5.ads, s-intman-irix.adb,
7666 s-htable.adb, s-osinte-vms.adb, s-htable.ads, s-osinte-vms.ads,
7667 s-taprob.adb, g-bytswa.adb, g-bytswa.ads, s-osinte-solaris-posix.ads,
7668 a-suenco.adb, g-comver.adb, g-comver.ads, g-exctra.adb,
7669 s-osinte-solaris.adb, g-exctra.ads, s-osinte-irix.ads,
7670 s-osinte-solaris.ads, a-caldel-vms.adb, g-socthi-vxworks.adb,
7671 g-expect.adb, g-socthi-vxworks.ads, g-expect.ads, g-comlin.ads,
7672 g-heasor.adb, g-heasor.ads, g-traceb.adb, g-traceb.ads, g-decstr.adb,
7673 g-spipat.adb, g-decstr.ads, g-spipat.ads, s-mastop-tru64.adb,
7674 g-except.ads, g-thread.adb, g-hesorg.adb, g-thread.ads, g-hesorg.ads,
7675 g-expect-vms.adb, a-stuten.ads, g-spchge.adb, g-spchge.ads,
7676 g-u3spch.adb, g-u3spch.ads, g-spitbo.adb, g-spitbo.ads,
7677 s-osinte-dummy.ads, s-osinte-posix.adb, g-pehage.adb, g-pehage.ads,
7678 s-gloloc-mingw.adb, g-sha1.ads, s-traceb-hpux.adb,
7679 g-trasym-unimplemented.adb, g-trasym-unimplemented.ads, g-io_aux.adb,
7680 g-regexp.adb, g-io_aux.ads, g-socthi-mingw.adb, g-regexp.ads,
7681 s-osinte-hpux-dce.adb, g-socthi-mingw.ads, g-cgi.adb,
7682 s-osinte-hpux-dce.ads, g-cgi.ads, g-byorma.adb, g-boumai.ads,
7683 g-byorma.ads, a-caldel.adb, s-regexp.adb, s-regexp.ads,
7684 g-soliop-mingw.ads, g-sptavs.ads, s-osinte-tru64.ads, g-speche.adb,
7685 g-speche.ads, g-socthi.adb, g-stsifd-sockets.adb, g-socthi.ads,
7686 s-osinte-darwin.ads, i-vxwork-x86.ads, g-awk.adb, i-vxwork.ads,
7687 g-awk.ads, g-zspche.adb, g-zspche.ads, g-socket.adb, g-sptabo.ads,
7688 g-socket.ads, g-semaph.adb, g-semaph.ads, s-taspri-posix.ads,
7689 g-enblsp-vms-ia64.adb, g-cgideb.adb, g-cgideb.ads, g-sothco.adb,
7690 s-osinte-freebsd.ads, g-sothco.ads, g-catiio.adb, g-casuti.adb,
7691 g-catiio.ads, g-casuti.ads, g-trasym.adb, g-trasym.ads, s-casuti.adb,
7692 g-os_lib.adb, s-traceb-mastop.adb, g-busora.adb, s-interr-dummy.adb,
7693 g-busora.ads, g-enutst.ads, s-os_lib.adb, a-tasatt.adb,
7694 s-osinte-mingw.ads: Update to GPLv3 run-time license.
7695 Use GNAT instead of GNARL.
7697 2011-08-01 Bob Duff <duff@adacore.com>
7699 * a-cdlili.ads, a-cihama.ads, a-coinve.ads, a-ciorse.ads, a-coorma.ads,
7700 a-cidlli.ads, a-ciormu.ads, a-cihase.ads, a-cohama.ads, a-coorse.ads,
7701 a-ciorma.ads, a-coormu.ads, a-convec.ads, a-cohase.ads: Minor
7704 2011-08-01 Yannick Moy <moy@adacore.com>
7706 * debug.adb (d.D) reverve flag for the SPARK mode
7707 (d.E) reverve flag for SPARK generation mode
7708 (d.F) reverve flag for Why generation mode
7709 * opt.ads, opt.adb (ALFA_Mode, ALFA_Through_SPARK_Mode,
7710 ALFA_Through_Why_Mode, Formal_Verification_Mode, SPARK_Mode): New
7711 functions which return True when the corresponding modes are set
7712 (Formal_Language): return "spark" or "alfa" when in formal verification
7714 * sem_util.ads, sem_util.adb (Formal_Error_Msg): new wrapper on
7715 Error_Msg to prefix the error message with a tag giving the formal
7717 (Formal_Error_Msg_N): new wrapper on Error_Msg_N to prefix the error
7718 message with a tag giving the formal language
7719 * sem_ch5.adb (Analyze_Block_Statement): issue error in formal mode on
7721 (Analyze_Case_Statement): issue error in formal mode on case statement
7722 with a single "others" case alternative
7723 (Analyze_Exit_Statement): issue errors in formal mode on exit
7724 statements which do not respect SPARK restrictions
7725 (Analyze_Goto_Statement): issue error in formal mode on goto statement
7726 (Check_Unreachable_Code): always issue an error (not a warning) in
7727 formal mode on unreachable code (concerns both code after an infinite
7728 loop and after an unconditional jump, both not allowed in SPARK)
7729 * sem_ch6.adb (Analyze_Return_Statement): add call to
7730 Set_Return_Present for a procedure containing a return statement
7731 (already done for functions in Analyze_Function_Return)
7732 (Analyze_Function_Return): issue error in formal mode on extended
7733 return or if return is not last statement in function
7734 (Check_Missing_Return): issue error in formal mode if function does
7735 not end with return or if procedure contains a return
7736 * sem_ch8.ads, sem_ch8.adb (Has_Loop_In_Inner_Open_Scopes): new
7737 function to detect if there is an inner scope of its parameter S which
7740 2011-08-01 Thomas Quinot <quinot@adacore.com>
7742 * sem_ch6.ads: Minor reformatting.
7744 2011-08-01 Javier Miranda <miranda@adacore.com>
7746 * sem_util.adb (Abstract_Interface_List): Complete condition when
7747 processing private type declarations to avoid reading unavailable
7749 (Is_Synchronized_Tagged_Type): Complete condition when processing
7750 private extension declaration nodes to avoid reading unavailable
7753 2011-08-01 Thomas Quinot <quinot@adacore.com>
7755 * sem_ch3.adb: Minor reformatting.
7757 2011-08-01 Thomas Quinot <quinot@adacore.com>
7759 * s-parame-ae653.ads, s-parame-vms-alpha.ads, s-parame-hpux.ads,
7760 i-cpoint.adb, i-cstrin.adb, i-cpoint.ads, i-cstrin.ads,
7761 s-parame-vms-ia64.ads, s-parame.ads, i-c.ads, s-parame-vxworks.ads,
7762 s-parame-vms-restrict.ads: Remove duplicated Interfaces.C.* packages
7763 for VMS, instead parametrize the common implementation with
7764 System.Parameters declarations.
7766 2011-08-01 Eric Botcazou <ebotcazou@adacore.com>
7768 * gnat_rm.texi: Document limitation of Pragma No_Strict_Aliasing.
7770 2011-08-01 Tristan Gingold <gingold@adacore.com>
7772 * seh_init.c: Fix SEH handler installation on win64.
7774 2011-08-01 Ed Schonberg <schonberg@adacore.com>
7776 * sem_ch3.adb (Access_Subprogram_Declaration): in Asis mode, prevent
7777 double analysis of an anonymous access to subprogram, because it can
7778 lead to improper sharing of profiles and a back-end crash.
7780 2011-08-01 Robert Dewar <dewar@adacore.com>
7782 * make.adb, sem_ch4.adb: Minor reformatting.
7783 * gcc-interface/Make-lang.in: Update dependencies.
7784 * sem_util.adb, exp_ch5.adb: Minor reformatting.
7786 2011-08-01 Arnaud Charlet <charlet@adacore.com>
7788 * gnat_rm.texi: Fix definition of Long_Integer.
7790 2011-08-01 Ed Schonberg <schonberg@adacore.com>
7792 * exp_aggr.adb: check limit size of static aggregate unconditionally,
7793 to prevent storage exhaustion.
7794 * exp_ch7.adb (Clean_Simple_Protected_Objects): if the scope being
7795 finalized is a function body, insert the cleanup code before the final
7796 return statement, to prevent spurious warnings.
7797 * s-pooglo.ads: add overriding indicator.
7799 2011-08-01 Ed Schonberg <schonberg@adacore.com>
7801 * sem_ch4.adb (Operator_Check): improve error message when both a
7802 with_clause and a use_clause are needed to make operator usage legal.
7803 * sem_util.ads, sem_util.adb (Unit_Is_Visible): new predicate to
7804 determine whether a compilation unit is visible within an other,
7805 either through a with_clause in the current unit, or a with_clause in
7806 its library unit or one one of its parents.
7808 2011-08-01 Ed Schonberg <schonberg@adacore.com>
7810 * exp_ch5.adb (Expand_N_Iterator_Loop): handle properly an iterator
7811 over an arbitrary expression of an array or container type.
7812 * lib-xref.adb: clarify comment.
7814 2011-08-01 Bob Duff <duff@adacore.com>
7816 * einfo.ads: Minor reformatting.
7817 * debug.adb: Minor comment improvement.
7819 2011-08-01 Javier Miranda <miranda@adacore.com>
7821 * sem_ch4.adb (Try_Object_Operation): For class-wide subprograms do not
7822 consider hidden subprograms as valid candidates.
7824 2011-08-01 Arnaud Charlet <charlet@adacore.com>
7826 * make.adb (Compile): Strip -mxxx switches in CodePeer mode.
7828 2011-08-01 Vasiliy Fofanov <fofanov@adacore.com>
7830 * gnat_ugn.texi: Fix typo.
7832 2011-08-01 Robert Dewar <dewar@adacore.com>
7834 * i-cstrin.adb, sem_util.adb, exp_ch11.adb, sem_ch8.adb,
7835 lib-xref.adb: Minor reformatting
7837 2011-08-01 Gary Dismukes <dismukes@adacore.com>
7839 * exp_ch6.adb (Expand_N_Extended_Return_Statement): Replace test of
7840 when to generate a call to Move_Final_List.
7841 (Has_Controlled_Parts): Remove this function.
7843 2011-08-01 Geert Bosch <bosch@adacore.com>
7845 * par-ch3.adb (P_Discrete_Choice_List): Improve error message for extra
7848 2011-08-01 Thomas Quinot <quinot@adacore.com>
7850 * exp_ch11.adb (Expand_N_Raise_Statement): Mark N_Raise_xxx_Error for
7851 explicit raise of a predefined exception as Comes_From_Source if the
7852 original N_Raise_Statement comes from source.
7854 2011-08-01 Robert Dewar <dewar@adacore.com>
7856 * sinfo.ads: Add comment.
7857 * sem_ch6.adb: Minor reformatting.
7859 2011-08-01 Robert Dewar <dewar@adacore.com>
7861 * freeze.adb (Freeze_Entity): Refine check for bad component size
7862 clause to avoid rejecting confirming clause when atomic/aliased present.
7864 2011-08-01 Ed Schonberg <schonberg@adacore.com>
7866 * sem_ch8.adb (Find_Direct_Name, Analyze_Expanded_Name): use Is_LHS to
7867 better determine whether an entity reference is a write.
7868 * sem_util.adb (Is_LHS): refine predicate to handle assignment to a
7870 * lib-xref.adb (Output_References): Do no suppress a read reference at
7871 the same location as an immediately preceeding modify-reference, to
7872 handle properly in-out actuals.
7874 2011-08-01 Tristan Gingold <gingold@adacore.com>
7876 * env.c (__gnat_setenv) [VMS]: Refine previous change.
7878 2011-08-01 Quentin Ochem <ochem@adacore.com>
7880 * i-cstrin.adb (New_String): Changed implementation, now uses only the
7881 heap to compute the result.
7883 2011-08-01 Robert Dewar <dewar@adacore.com>
7885 * atree.ads: Minor reformatting.
7887 2011-08-01 Emmanuel Briot <briot@adacore.com>
7889 * g-expect.adb (Get_Command_Output): Fix memory leak.
7891 2011-08-01 Geert Bosch <bosch@adacore.com>
7893 * cstand.adb (P_Float_Type): New procedure to print the definition of
7894 predefined fpt types.
7895 (P_Mixed_Name): New procedure to print a name using mixed case
7896 (Print_Standard): Use P_Float_Type for printing floating point types
7897 * einfo.adb (Machine_Emax_Value): Add preliminary support for quad
7898 precision IEEE float.
7900 2011-08-01 Thomas Quinot <quinot@adacore.com>
7902 * sem_ch3.adb: Minor reformatting.
7904 2011-08-01 Ed Schonberg <schonberg@adacore.com>
7906 * sem_ch6.adb (Analyze_Parameterized_Expression): If the expression is
7907 the completion of a generic function, insert the new body rather than
7908 rewriting the original.
7910 2011-08-01 Yannick Moy <moy@adacore.com>
7912 * sinfo.ads, errout.ads: Typos in comments.
7914 2011-08-01 Robert Dewar <dewar@adacore.com>
7916 * par-endh.adb: Minor reformatting.
7918 2011-08-01 Robert Dewar <dewar@adacore.com>
7920 * aspects.ads, aspects.adb: Add aspects for library unit pragmas
7921 (Pre_Post_Aspects): New subtype.
7922 * par-ch12.adb (P_Generic): New syntax for aspects in packages
7923 * par-ch13.adb (P_Aspect_Specifications): Add Semicolon parameter
7924 * par-ch7.adb (P_Package): Remove Decl parameter
7925 (P_Package): Handle new syntax for aspects (before IS)
7926 * par-ch9.adb (P_Protected_Definition): Remove Decl parameter, handle
7928 (P_Task_Definition): Remove Decl parameter, handle new aspect syntax
7929 * par.adb (P_Aspect_Specifications): Add Semicolon parameter
7930 (P_Package): Remove Decl parameter
7931 * sem_ch13.adb (Analyze_Aspect_Specifications): Handle library unit
7933 * sem_ch7.adb (Analyze_Package_Declaration): Analyze new format aspect
7935 * sem_util.ads, sem_util.adb (Static_Boolean): New function
7936 * sinfo.ads: Document new syntax for aspects in packages etc.
7937 * sprint.adb: Handle new syntax of aspects before IS in package
7939 2011-08-01 Thomas Quinot <quinot@adacore.com>
7941 * atree.ads: Minor reformatting.
7942 * sem_prag.adb: Minor reformatting.
7944 2011-08-01 Robert Dewar <dewar@adacore.com>
7946 * exp_util.adb (Insert_Actions): Fix error in handling Actions for
7947 case expr alternative.
7949 2011-08-01 Ed Schonberg <schonberg@adacore.com>
7951 * sem_ch12.adb: Fix typo.
7953 2011-08-01 Geert Bosch <bosch@adacore.com>
7955 * sem_prag.adb (Check_No_Link_Name): New procedure.
7956 (Process_Import_Or_Interface): Use Check_No_Link_Name.
7957 * cstand.adb (Create_Standard): Use Esize (Standard_Long_Long_Float)
7958 instead of Standard_Long_Long_Float_Size global. Preparation for
7959 eventual removal of per type constants.
7960 * exp_util.ads (Get_Stream_Size): New function returning the stream
7961 size value of subtype E.
7962 * exp_util.adb (Get_Stream_Size): Implement new function.
7963 * exp_strm.adb (Build_Elementary_Input_Call): Use Get_Stream_Size
7965 * exp_attr.adb (Attribute_Stream_Size): Use Get_Stream_Size
7967 (Machine_Mantissa_Value): Handle 128-bit quad precision IEEE floats
7969 2011-08-01 Geert Bosch <bosch@adacore.com>
7971 * cstand.adb: Fix comments.
7972 * sem_prag.adb (Analyze_Pragma): Use List_Length instead of explicit
7975 2011-08-01 Robert Dewar <dewar@adacore.com>
7977 * exp_ch4.adb, sem_cat.adb: Minor reformatting.
7979 2011-08-01 Geert Bosch <bosch@adacore.com>
7981 * atree.ads: Fix comment.
7983 2011-08-01 Robert Dewar <dewar@adacore.com>
7985 * aspects.ads, aspects.adb (Aspect_Names): Moved from body to spec.
7986 * par-ch13.adb (P_Aspect_Specifications): Check misspelled aspect name.
7987 * par.adb: Add with for Namet.Sp.
7988 * par-tchk.adb: Minor reformatting.
7990 2011-08-01 Vincent Celier <celier@adacore.com>
7992 * mlib-tgt-specific-vms-alpha.adb, mlib-tgt-specific-vms-ia64.adb
7993 (Build_Dynamic_Library): Use new function Init_Proc_Name to get the name
7994 of the init procedure of a SAL.
7995 * mlib-tgt-vms_common.ads, mlib-tgt-vms_common.adb (Init_Proc_Name):
7998 2011-08-01 Thomas Quinot <quinot@adacore.com>
8000 * exp_ch4.adb, s-tasini.ads, sem_attr.adb, s-soflin.ads: Minor
8003 2011-08-01 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
8005 * adaint.c (__gnat_file_time_name_attr): Get rid of warning.
8007 2011-08-01 Thomas Quinot <quinot@adacore.com>
8009 * sem_util.adb, sem_util.ads (Has_Overriding_Initialize): Make function
8010 conformant with its spec (return True only for types that have
8011 an overriding Initialize primitive operation that prevents them from
8012 having preelaborable initialization).
8013 * sem_cat.adb (Validate_Object_Declaration): Fix test for preelaborable
8014 initialization for controlled types in Ada 2005 or later mode.
8016 2011-08-01 Robert Dewar <dewar@adacore.com>
8018 * aspects.ads, aspects.adb: Add aspect Type_Invariant, Precondition,
8020 (Same_Aspect): New function.
8021 * sem_ch13.adb (Analyze_Aspect_Specifications): Add aspect
8022 Type_Invariant, Precondition, Postcondition.
8023 * snames.ads-tmpl: Add Name_Type_Invariant.
8025 2011-08-01 Robert Dewar <dewar@adacore.com>
8027 * freeze.adb (Freeze_Entity): Don't call Check_Aspect_At_Freeze_Point
8029 (Freeze_All_Ent): Fix error in handling inherited aspects.
8030 * sem_ch13.adb (Analyze_Aspect_Specifications): Skip aspect that is
8031 already analyzed, but don't skip entire processing of a declaration,
8032 that's wrong in some cases of declarations being rewritten.
8033 (Analyze_Aspect_Specification): Set Is_Delayed_Aspect in aspects.
8034 Don't delay for integer, string literals
8035 Treat predicates in usual manner for delay, remove special case code,
8037 (Analyze_Freeze_Entity): Make call to Check_Aspect_At_Freeze_Point
8038 (Build_Predicate_Function): Update saved expression in aspect
8039 (Build_Invariant_Procedure): Update saved expression in aspect
8040 * exp_ch4.adb (Expand_N_Selected_Component): Only do the optimization
8041 of replacement of discriminant references if the reference is simple.
8043 2011-08-01 Robert Dewar <dewar@adacore.com>
8045 * aspects.ads, aspects.adb: Add Static_Predicate and Dynamic_Predicate.
8046 * sem_ch13.adb (Analyze_Aspect_Specification): Add processing for
8047 Static_Predicate and Dynamic_Predicate.
8048 (Build_Predicate_Function): Add processing for Static_Predicate
8049 and Dynamic_Predicate.
8050 * sinfo.ads, sinfo.adb (From_Dynamic_Predicate): New flag
8051 (From_Static_Predicate): New flag
8052 * snames.ads-tmpl: Add Name_Static_Predicate and Name_Dynamic_Predicate
8054 2011-08-01 Robert Dewar <dewar@adacore.com>
8056 * usage.adb: Documentation cleanup for Ada version modes in usage.
8057 * expander.adb: Minor reformatting.
8059 2011-08-01 Robert Dewar <dewar@adacore.com>
8061 * atree.ads: Minor comment fix.
8062 * a-stwifi.adb, a-stzfix.adb, a-strfix.adb, a-ztexio.ads, a-textio.ads,
8063 a-witeio.ads, sem_prag.adb: Minor reformatting.
8065 2011-08-01 Doug Rupp <rupp@adacore.com>
8067 * env.c (__gnat_setenv) [VMS]: Force 32bit on item list structure
8068 pointers. Use descrip.h header file for convenience. Add some
8071 2011-08-01 Robert Dewar <dewar@adacore.com>
8073 * freeze.adb (Freeze_Entity): Call Check_Aspect_At_Freeze_Point
8074 (Freeze_All): Call Check_Aspect_At_End_Of_Declarations
8075 * sem_ch13.ads, sem_ch13.adb (Check_Aspect_At_Freeze_Point):
8077 (Check_Aspect_At_End_Of_Declarations): New procedure
8078 (Analye_Aspect_Specification): Minor changes for above procedures
8079 * sinfo.ads, sinfo.adb (Is_Delayed_Aspect): Now set in aspect
8080 specification node as well.
8082 2011-08-01 Pascal Obry <obry@adacore.com>
8084 * adaint.c (_gnat_stat): GetFilesAttributesEx() would fail on special
8085 Windows files. Use GetFilesAttributes() in this case to check for file
8086 existence instead of returning with an error code.
8088 2011-08-01 Vincent Celier <celier@adacore.com>
8090 * a-stzfix.adb, a-stwifi.adb (Replace_Slice): Fixed computation when
8091 High is above Source length.
8093 2011-08-01 Robert Dewar <dewar@adacore.com>
8095 * a-ztexio.ads, a-textio.ads, a-witeio.ads: Fix comment.
8097 2011-08-01 Robert Dewar <dewar@adacore.com>
8099 * aspects.ads (Boolean_Aspects): New subtype.
8100 * exp_ch13.adb (Expand_Freeze_Entity): Fix errors in handling aspects
8101 for derived types in cases where the parent type and derived type have
8103 * freeze.adb (Freeze_Entity): Fix problems in handling derived type
8104 with aspects when parent type also has aspects.
8105 (Freeze_Entity): Deal with delay of boolean aspects (must evaluate
8106 boolean expression at this point).
8107 * sem_ch13.adb (Analyze_Aspect_Specifications): Delay all aspects in
8108 accordance with final decision on the Ada 2012 feature.
8109 * sinfo.ads, sinfo.adb (Is_Boolean_Aspect): New flag.
8111 2011-08-01 Matthew Heaney <heaney@adacore.com>
8113 * a-chtgbo.adb (Delete_Node_Sans_Free): Replace iterator with selector.
8115 2011-08-01 Pascal Obry <obry@adacore.com>
8117 * a-stzunb-shared.adb, a-strunb-shared.adb, a-stwiun-shared.adb:
8118 Fix Replace_Slice when High is above current string size.
8119 (Replace_Slice): Fix DL computation when High is above current
8122 2011-08-01 Gary Dismukes <dismukes@adacore.com>
8124 * gnat_rm.texi: Add documentation for pragma Static_Elaboration_Desired.
8126 2011-08-01 Matthew Heaney <heaney@adacore.com>
8128 * a-rbtgbo.adb (Delete_Node_Sans_Free): Fixed assignment to left child
8131 2011-08-01 Pascal Obry <obry@adacore.com>
8133 * a-stzunb-shared.adb, a-strunb-shared.adb, a-stwiun-shared.adb: Minor
8136 2011-08-01 Ed Schonberg <schonberg@adacore.com>
8138 * sem_attr.adb (Analyze_Attribute, case 'Access): Handle properly named
8139 access to protected subprograms in generic bodies.
8140 * sem_ch6.adb (Analyze_Subprogram_Declaration): If the context is a
8141 protected type, indicate that the convention of the subprogram is
8142 Convention_Protected, because it may be used in subsequent declarations
8143 within the protected declaration.
8145 2011-08-01 Vincent Celier <celier@adacore.com>
8147 * mlib-prj.adb (Build_Library): Use "ada_" as the prefix for the "init"
8148 and "final" procedures when the name of the library is "ada", to avoid
8149 duplicate symbols "adainit" and "adafinal" in executables.
8151 2011-08-01 Ed Schonberg <schonberg@adacore.com>
8153 * sem_attr.adb (Analyze_Attribute, case 'Result): Handle properly a
8154 quantified expression that appears within a postcondition and uses the
8155 Ada2012 'Result attribute.
8157 2011-07-28 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
8159 * init.c (__gnat_error_handler): Cast reason to int.
8160 (__gnat_install_handler): Explain sa_sigaction use.
8162 2011-07-24 Eric Botcazou <ebotcazou@adacore.com>
8164 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Subprogram_Type>: If the
8165 subprogram has copy-in copy-out parameters, try to promote the mode of
8166 the return type if it is passed in registers.
8168 2011-07-24 Eric Botcazou <ebotcazou@adacore.com>
8170 * gcc-interface/utils2.c (build_binary_op) <ARRAY_REF>: Do not mark the
8171 left operand as addressable.
8173 2011-07-24 Eric Botcazou <ebotcazou@adacore.com>
8175 * gcc-interface/gigi.h (build_function_stub): Remove.
8176 (build_return_expr): Likewise.
8177 (convert_vms_descriptor): Declare.
8178 * gcc-interface/utils.c (convert_vms_descriptor): Make global.
8179 (build_function_stub): Move to...
8180 * gcc-interface/utils2.c (build_return_expr): Move to...
8181 * gcc-interface/trans.c (build_function_stub): ...here.
8182 (build_return_expr): ...here.
8183 (Subprogram_Body_to_gnu): Add local variable for language_function.
8184 Disconnect the parameter attributes cache, if any, once done with it.
8185 Call end_subprog_body only after setting the end_locus.
8186 Build the stub associated with the function, if any, at the very end.
8187 (gnat_to_gnu) <N_Return_Statement>: Remove couple of useless local
8188 variables and streamline control flow.
8190 2011-07-23 Arnaud Charlet <charlet@adacore.com>
8193 * gcc-interface/Makefile.in (powerpc-linux): Remove reference to
8196 2011-07-22 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
8199 * init.c [sun && __SVR4 && !__vxworks] (__gnat_install_handler):
8200 Assign to act.sa_sigaction.
8201 * tracebak.c [USE_GENERIC_UNWINDER] (__gnat_backtrace): Cast
8202 current->return_address to char * before arithmetic.
8204 2011-07-22 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
8206 * init.c [sgi] (__gnat_error_handler): Update sigaction(2) citation.
8207 Correct argument types.
8208 Extract code from reason.
8209 (__gnat_install_handler): Assign to act.sa_sigaction.
8211 2011-07-21 Eric Botcazou <ebotcazou@adacore.com>
8213 * gcc-interface/Make-lang.in (GNAT1_ADA_OBJS): Move ada/b_gnat1.o to...
8214 (GNAT1_OBJS): ...here.
8216 2011-07-15 Eric Botcazou <ebotcazou@adacore.com>
8219 * g-socthi-mingw.adb (Fill): Fix formatting.
8221 * gcc-interface/gigi.h: Move around comment.
8223 2011-07-14 John David Anglin <dave.anglin@nrc-cnrc.gc.ca>
8226 * s-taprop-hpux-dce.adb (Abort_Task): Remove unnecessary cast.
8228 2011-07-14 Florian Weimer <fw@deneb.enyo.de>
8231 * g-socthi-mingw.adb (Fill): Guard against invalid MSG_WAITALL.
8233 2011-07-13 Eric Botcazou <ebotcazou@adacore.com>
8235 * gcc-interface/utils.c (build_vms_descriptor32): Skip the 32-bit
8236 range comparison if Pmode is SImode.
8238 2011-07-12 Laurent GUERBY <laurent@guerby.net>
8239 Eric Botcazou <ebotcazou@adacore.com>
8241 * adadecode.c: Wrap up in extern "C" block.
8242 * adadecode.h: Likewise.
8243 * adaint.c: Likewise. Remove 'const' keyword.
8244 * adaint.h: Likewise.
8246 * atree.h: Likewise.
8248 * cstreams.c: Likewise.
8252 * final.c: Likewise.
8254 * initialize.c: Likewise.
8256 * namet.h: Likewise.
8257 * nlists.h: Likewise.
8258 * raise.c: Likewise.
8259 * raise.h: Likewise.
8260 * repinfo.h: Likewise.
8261 * seh_init.c: Likewise.
8262 * targext.c: Likewise.
8263 * tracebak.c: Likewise.
8264 * uintp.h: Likewise.
8265 * urealp.h: Likewise.
8266 * xeinfo.adb: Wrap up generated C code in extern "C" block.
8267 * xsinfo.adb: Likewise.
8268 * xsnamest.adb: Likewise.
8269 * gcc-interface/gadaint.h: Wrap up in extern "C" block.
8270 * gcc-interface/gigi.h: Wrap up some prototypes in extern "C" block.
8271 * gcc-interface/misc.c: Likewise.
8272 * gcc-interface/Make-lang.in (GCC_LINK): Use LINKER.
8273 (GNAT1_C_OBJS): Remove ada/b_gnat1.o. List ada/seh_init.o and
8274 ada/targext.o here...
8275 (GNAT_ADA_OBJS): ...and not here.
8276 (GNAT1_ADA_OBJS): Add ada/b_gnat1.o.
8277 (GNATBIND_OBJS): Reorder.
8279 2011-07-07 Richard Henderson <rth@redhat.com>
8281 * gcc-interface/misc.c (gnat_init_gcc_eh): Don't call
8282 dwarf2out_frame_init.
8284 2011-07-07 Eric Botcazou <ebotcazou@adacore.com>
8286 * gcc-interface/misc.c (gnat_init): Tweak previous change.
8288 2011-07-07 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
8291 * gcc-interface/Makefile.in: Handle x86_64-solaris2.
8293 2011-07-06 Richard Guenther <rguenther@suse.de>
8295 * gcc-interface/misc.c (gnat_init): Merge calls to
8296 build_common_tree_nodes and build_common_tree_nodes_2.
8297 Re-initialize boolean_false_node.
8299 2011-07-02 Eric Botcazou <ebotcazou@adacore.com>
8300 Olivier Hainque <hainque@adacore.com>
8301 Nicolas Setton <setton@adacore.com>
8303 * gcc-interface/utils.c (record_builtin_type): Set TYPE_ARTIFICIAL on
8304 the type according to the ARTIFICIAL_P parameter.
8305 (create_type_decl): Likewise.
8306 (create_type_stub_decl): Set TYPE_ARTIFICIAL on the type to 1.
8308 2011-07-01 Eric Botcazou <ebotcazou@adacore.com>
8310 * gcc-interface/Make-lang.in (gnat1): Prepend '+' to the command.
8311 (gnatbind): Likewise.
8313 2011-06-29 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
8315 * gcc-interface/Makefile.in (TOOLS_LIBS): Add $(LIBINTL).
8317 2011-06-18 Eric Botcazou <ebotcazou@adacore.com>
8319 * gcc-interface/decl.c (gnat_to_gnu_component_type): Use GNAT_TYPE
8320 local variable throughout. Remove useless call to Base_Type.
8321 (gnat_to_gnu_field): Use GNAT_FIELD_TYPE local variable throughout.
8322 Take it also into account for the volatileness of the field. Set the
8323 TREE_SIDE_EFFECTS flag as well in this case. Reorder some warnings.
8325 2011-06-18 Eric Botcazou <ebotcazou@adacore.com>
8327 * gcc-interface/trans.c (Identifier_to_gnu): Don't set TREE_THIS_NOTRAP
8328 on a dereference built for a by-ref object if it has an address clause.
8330 2011-06-18 Eric Botcazou <ebotcazou@adacore.com>
8332 * einfo.ads (Address_Taken): Document use for the second argument of
8333 Asm_Input and Asm_Output attributes.
8334 * sem_attr.adb (Analyze_Attribute) <Attribute_Asm_Input>: If the second
8335 argument is an entity name, then set Address_Taken on it.
8336 <Attribute_Asm_Output>: Likewise.
8337 * gcc-interface/trans.c (lvalue_required_for_attribute_p): Handle the
8338 Attr_Asm_Input and Attr_Asm_Output attributes explicitly.
8339 (gnat_to_gnu) <N_Code_Statement>: If an operand is going to end up in
8340 memory and is a CONST_DECL, retrieve its corresponding VAR_DECL.
8342 2011-06-16 Joern Rennecke <joern.rennecke@embecosm.com>
8345 * gcc-interface/decl.c (gnat_to_gnu_param): Use pack_cumulative_args.
8347 2011-06-14 Joseph Myers <joseph@codesourcery.com>
8349 * gcc-interface/Make-lang.in (gnatbind$(exeext)): Use ggc-none.o.
8350 (ada/utils.o): Update dependencies.
8351 * gcc-interface/Makefile.in (EXTRA_GNATTOOLS_OBJS): Add
8352 ../../../libcpp/libcpp.a.
8353 * gcc-interface/utils.c: Include common/common-target.h.
8354 (process_attributes): Use targetm_common.have_named_sections.
8356 2011-06-07 Richard Guenther <rguenther@suse.de>
8358 * gcc-interface/misc.c (gnat_init): Do not set size_type_node or call
8361 2011-06-06 Eric Botcazou <ebotcazou@adacore.com>
8363 * gcc-interface/utils2.c (gnat_stabilize_reference): Propagate the
8364 TREE_THIS_NOTRAP flag.
8366 2011-06-06 Eric Botcazou <ebotcazou@adacore.com>
8368 * gcc-interface/utils2.c (gnat_stabilize_reference) <COMPOUND_EXPR>:
8371 2011-06-06 Eric Botcazou <ebotcazou@adacore.com>
8373 * gcc-interface/trans.c (Identifier_to_gnu): Also handle deferred
8374 constants whose full view has discriminants specially.
8376 2011-06-06 Eric Botcazou <ebotcazou@adacore.com>
8378 * gcc-interface/utils.c: Include diagnostic.h.
8379 (gnat_write_global_declarations): Output debug information for all
8380 global type declarations before finalizing the compilation unit.
8381 * gcc-interface/Make-lang.in (ada/utils.o): Add dependency.
8383 2011-05-25 Jakub Jelinek <jakub@redhat.com>
8385 * gcc-interface/utils.c (def_fn_type): Remove extra va_end.
8387 2011-05-25 Kai Tietz <ktietz@redhat.com>
8389 * adaint.c (__gnat_to_canonical_file_list_next): Use array
8390 initialization instead of const/none-const pointer assignment.
8392 2011-05-24 Joseph Myers <joseph@codesourcery.com>
8394 * gcc-interface/Make-lang.in (GNAT1_OBJS): Don't include
8395 $(EXTRA_GNAT1_OBJS).
8396 (GNATBIND_OBJS): Don't include $(EXTRA_GNATBIND_OBJS).
8397 (EXTRA_GNAT1_OBJS, EXTRA_GNATBIND_OBJS): Remove.
8398 (gnat1$(exeext), gnatbind$(exeext)): Use libcommon-target.a.
8399 * gcc-interface/Makefile.in (EXTRA_GNATTOOLS_OBJS): Use
8400 libcommon-target.a instead of prefix.o.
8402 2011-05-21 Joseph Myers <joseph@codesourcery.com>
8405 * gcc-interface/Make-lang.in (gnatbind$(exeext)): Depend on $(LIBDEPS).
8407 2011-05-20 Joseph Myers <joseph@codesourcery.com>
8409 * gcc-interface/Make-lang.in (EXTRA_GNATBIND_OBJS): Remove version.o.
8410 * gcc-interface/Makefile.in (EXTRA_GNATTOOLS_OBJS): Use libcommon.a
8411 instead of version.o.
8413 2011-05-18 Kai Tietz <ktietz@redhat.com>
8415 * gcc-interface/trans.c (Exception_Handler_to_gnu_sjlj): Use
8416 boolean_false_node instead of integer_zero_node.
8417 (convert_with_check): Likewise.
8418 * gcc-interface/decl.c (choices_to_gnu): Likewise.
8420 2011-05-12 Eric Botcazou <ebotcazou@adacore.com>
8422 * gcc-interface/trans.c (call_to_gnu): In the by-reference case, if the
8423 type of the parameter is an unconstrained array, convert the actual to
8424 the type of the formal in the In Out and Out cases as well.
8426 2011-05-11 Nathan Froyd <froydnj@codesourcery.com>
8428 * gcc-interface/utils.c (def_fn_type): Don't call build_function_type;
8429 call build_function_type_array or build_varargs_function_type_array
8431 (create_subprog_type): Don't call build_function_type; call
8432 build_function_type_vec instead.
8434 2011-05-11 Nathan Froyd <froydnj@codesourcery.com>
8436 * gcc-interface/ada-tree.h (TYPE_OBJECT_RECORD_TYPE): Use TYPE_MINVAL.
8437 (TYPE_GCC_MIN_VALUE): Use TYPE_MINVAL.
8438 (TYPE_GCC_MAX_VALUE): Use TYPE_MAXVAL.
8440 2011-05-07 Eric Botcazou <ebotcazou@adacore.com>
8442 * gcc-interface/decl.c (intrin_arglists_compatible_p): Remove spaces.
8444 * gcc-interface/gigi.h (global_bindings_p): Adjust prototype.
8445 * gcc-interface/utils.c (global_bindings_p): Return bool and simplify.
8447 2011-05-05 Nathan Froyd <froydnj@codesourcery.com>
8449 * gcc-interface/trans.c (Case_Statement_to_gnu): Call build_case_label.
8451 2011-05-05 Nathan Froyd <froydnj@codesourcery.com>
8453 * gcc-interface/decl.c (intrin_arglists_compatible_p): Use iterators
8454 instead of accessing TYPE_ARG_TYPES directly.
8455 * gcc-interface/utils.c (handle_nonnull_attribute): Likewise.
8457 2011-05-05 Eric Botcazou <ebotcazou@adacore.com>
8460 * gcc-interface/gigi.h (get_variant_part): Declare.
8461 * gcc-interface/decl.c (get_variant_part): Make global.
8462 * gcc-interface/utils2.c (find_common_type): Do not return T1 if the
8463 types have the same constant size, are record types and T1 has a
8464 variant part while T2 doesn't.
8466 2011-05-05 Eric Botcazou <ebotcazou@adacore.com>
8468 * gcc-interface/utils.c (begin_subprog_body): Do not call
8470 (end_subprog_body): Likewise.
8472 2011-05-04 Richard Guenther <rguenther@suse.de>
8474 * gcc-interface/trans.c (gnat_to_gnu): Remove zero notrunc argument to
8476 (pos_to_constructor): Likewise.
8478 2011-05-03 Nathan Froyd <froydnj@codesourcery.com>
8479 Eric Botcazou <ebotcazou@adacore.com>
8481 * gcc-interface/trans.c (gigi): Call build_function_type_list instead
8482 of build_function_type. Adjust calls to...
8483 (build_raise_check): ...this. Do not take a void_tree parameter.
8484 Call build_function_type_list instead of build_function_type.
8485 Fix head comment and swap couple of conditional blocks.
8487 2011-04-30 Eric Botcazou <ebotcazou@adacore.com>
8489 * gnatvsn.ads (Library_Version): Bump to 4.7.
8490 (Current_Year): Bump to 2011.
8492 2011-04-29 Michael Matz <matz@suse.de>
8494 * gcc-interface/misc.c (gnat_handle_option): Set
8495 warn_maybe_uninitialized.
8497 2011-04-23 Gerald Pfeifer <gerald@pfeifer.com>
8499 * gnat_ugn.texi (Complexity Metrics Control): Update link to
8500 the Watson/McCabe paper.
8502 2011-04-23 Jim Meyering <meyering@redhat.com>
8504 * gnat_ugn.texi (Examples of gnatxref Usage): Fix typo: s/it it/it is/
8506 2011-04-22 Eric Botcazou <ebotcazou@adacore.com>
8508 * gcc-interface/decl.c (make_packable_type): Copy DECL_PARALLEL_TYPE
8511 2011-04-22 Eric Botcazou <ebotcazou@adacore.com>
8513 * gcc-interface/gigi.h (create_subprog_decl): Add ARTIFICIAL_FLAG
8515 * gcc-interface/utils.c (create_subprog_decl): Likewise. Set
8516 DECL_ARTIFICIAL and DECL_NO_INLINE_WARNING_P on the DECL accordingly.
8517 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Subprogram_Type>: Add
8518 ARTIFICIAL_FLAG local variable and pass it to create_subprog_decl.
8519 <all>: Do not set flags on the reused DECL node coming from an alias.
8520 Set DECL_IGNORED_P on the DECL node built for subprograms if they
8521 don't need debug info here...
8522 * gcc-interface/trans.c (Subprogram_Body_to_gnu): ...and not here.
8523 (gigi): Adjust calls to create_subprog_decl.
8524 (build_raise_check): Likewise.
8525 (establish_gnat_vms_condition_handler): Likewise.
8526 (Compilation_Unit_to_gnu): Likewise.
8527 (gnat_to_gnu): Likewise.
8529 2011-04-21 Eric Botcazou <ebotcazou@adacore.com>
8531 * gcc-interface/Makefile.in (NO_SIBLING_ADAFLAGS): Always define.
8532 (NO_REORDER_ADAFLAGS): New variable.
8533 (EXTRA_GNATTOOLS): Always define.
8534 (../stamp-gnatlib1-$(RTSDIR): Copy tsystem.h.
8535 Clean up and adjust list of files compiled with special options.
8536 * gcc-interface/Make-lang.in: Likewise.
8537 (ada/decl.o): Cosmetical change.
8538 (ada/misc.o): Remove dependency on $(PLUGIN_H).
8540 2011-04-20 Jim Meyering <meyering@redhat.com>
8542 * initialize.c (__gnat_initialize): Remove useless if-before-free.
8544 2011-04-17 Eric Botcazou <ebotcazou@adacore.com>
8546 * gcc-interface/Make-lang.in (gnatbind): Replace $(ALL_CFLAGS) with
8547 $(CFLAGS) on the link line.
8549 2011-04-17 Eric Botcazou <ebotcazou@adacore.com>
8551 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Function>: Declare the
8552 padded type built for the return type if it is unconstrained.
8554 2011-04-14 Nathan Froyd <froydnj@codesourcery.com>
8556 * gcc-interface/utils.c (gnat_poplevel): Use block_chainon.
8558 2011-04-12 Nathan Froyd <froydnj@codesourcery.com>
8560 * gcc-interface/ada-tree.h (union lang_tree_node): Check for TS_COMMON
8561 before calling TREE_CHAIN.
8562 * gcc-interface/misc.c (gnat_init_ts): New function.
8563 (LANG_HOOKS_INIT_TS): Define.
8565 2011-04-12 Martin Jambor <mjambor@suse.cz>
8567 * gcc-interface/utils.c (end_subprog_body): Call cgraph_get_create_node
8568 instead of cgraph_node.
8570 2011-04-08 Eric Botcazou <ebotcazou@adacore.com>
8572 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Procedure>: Set minimum
8573 alignment on fields of the RETURN type built for the Copy-In Copy-Out
8576 2011-04-08 Eric Botcazou <ebotcazou@adacore.com>
8578 * gcc-interface/trans.c (Identifier_to_gnu): Do not return initializers
8579 of aggregate types that contain a placeholder.
8581 2011-04-08 Nathan Froyd <froydnj@codesourcery.com>
8583 * gcc-interface/utils.c (handle_sentinel_attribute): Don't use
8585 (handle_type_generic_attribute): Likewise.
8587 2011-04-04 Eric Botcazou <ebotcazou@adacore.com>
8590 * s-oscons-tmplt.c (MSG_WAITALL): Fix thinko in previous change.
8592 2011-04-04 Kai Tietz <ktietz@redhat.com>
8595 * s-oscons-tmplt.c (MSG_WAITALL): Define it for native windows targets
8598 2011-04-02 Eric Botcazou <ebotcazou@adacore.com>
8600 * gcc-interface/utils2.c (build_allocator): In the unconstrained array
8601 type case, do not strip a padding type around the array type.
8603 2011-04-02 Eric Botcazou <ebotcazou@adacore.com>
8605 * gcc-interface/utils.c (update_pointer_to): Finalize named pointer
8608 2011-04-02 Eric Botcazou <ebotcazou@adacore.com>
8610 * gcc-interface/lang.opt (feliminate-unused-debug-types): Delete.
8611 * gcc-interface/misc.c (gnat_handle_option): Remove special handling
8612 code for -feliminate-unused-debug-types.
8613 (gnat_post_options): Likewise.
8615 2011-04-02 Eric Botcazou <ebotcazou@adacore.com>
8617 * gcc-interface/utils.c (gnat_pushdecl): If this is a non-artificial
8618 declaration of a pointer type, then set DECL_ORIGINAL_TYPE to a
8621 2011-04-02 Eric Botcazou <ebotcazou@adacore.com>
8623 * gcc-interface/decl.c (gnat_to_gnu_entity): Do not force the
8624 DECL_ARTIFICIAL flag on enumeration types.
8626 2011-04-02 Eric Botcazou <ebotcazou@adacore.com>
8628 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Array_Type>: Do not make
8629 fat pointer types artificial unconditionally.
8630 <E_Array_Subtype>: Attach the base array type as a parallel type if it
8633 2011-04-02 Eric Botcazou <ebotcazou@adacore.com>
8635 * gcc-interface/gigi.h (get_dummy_type): Declare.
8636 (build_dummy_unc_pointer_types): Likewise.
8637 (finish_fat_pointer_type): Likewise.
8638 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Array_Type>: If a dummy
8639 fat pointer type has been built, complete it in place.
8640 <E_Access_Type>: Call build_dummy_unc_pointer_types to build dummy fat
8641 and thin pointers. Remove useless variable.
8642 (finish_fat_pointer_type): Make global and move to...
8643 * gcc-interface/utils.c (finish_fat_pointer_type): ...here.
8644 (get_dummy_type): New function.
8645 (build_dummy_unc_pointer_types): Likewise.
8646 (gnat_pushdecl): Propage the name to the anonymous variants only.
8647 (update_pointer_to): Only adjust the pointer types in the unconstrained
8650 2011-04-02 Eric Botcazou <ebotcazou@adacore.com>
8652 * gcc-interface/ada-tree.h (DECL_TAFT_TYPE_P): New flag.
8653 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Incomplete_Type>: Set it
8654 if this is a Taft amendment type and the full declaration is available.
8655 * gcc-interface/trans.c (process_type): Likewise.
8656 If there is an old type, mark the new one as used if DECL_TAFT_TYPE_P.
8657 (process_freeze_entity): Likewise.
8658 * gcc-interface/utils.c (dummy_global): New static variable.
8659 (gnat_write_global_declarations): If there are types declared as used
8660 at the global level, insert them in the global hash table.
8662 2011-04-02 Eric Botcazou <ebotcazou@adacore.com>
8664 * gcc-interface/gigi.h (record_builtin_type): Add ARTIFICIAL_P param.
8665 * gcc-interface/utils.c (gnat_pushdecl): If this is a non-artificial
8666 declaration of an array type, then set DECL_ORIGINAL_TYPE to a distinct
8668 (record_builtin_type): Add ARTIFICIAL_P parameter. Set DECL_ARTIFICIAL
8669 flag of the type accordingly.
8670 * gcc-interface/trans.c (gigi): Adjust calls to record_builtin_type.
8672 2011-04-02 Eric Botcazou <ebotcazou@adacore.com>
8674 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Access_Type>: Defer
8675 finalizing types when updating the pointers to the designated type.
8676 <all>: Finalize the deferred types even if we didn't defer processing
8677 of incomplete types in this invocation.
8679 2011-04-01 Olivier Hainque <hainque@adacore.com>
8680 Nicolas Setton <setton@adacore.com>
8681 Eric Botcazou <ebotcazou@adacore.com>
8683 * gcc-interface/misc.c (gnat_descriptive_type): New function.
8684 (LANG_HOOKS_DESCRIPTIVE_TYPE): Redefine to gnat_descriptive_type.
8686 2011-03-28 Kai Tietz <ktietz@redhat.com>
8688 * gcc-interface/Makefile.in (SO_LIB): Handle multilib build for native
8690 (EH_MECHANISM): Use GCC exception mechanism for native Windows targets.
8691 * system-mingw.ads (System): Change ZCX_By_Default default to True.
8693 * raise-gcc.c (PERSONALITY_FUNCTION): Add prototype.
8695 2011-03-28 Tristan Gingold <gingold@adacore.com>
8698 * gcc-interface/Make-lang.in (ada/b_gnat1.adb): Replace ada/b_gnat1.c.
8699 Use ada output of gnatbind.
8700 (ada/b_gnatb.adb): Ditto.
8701 (ada/b_gnat1.o, ada/b_gnatb.o): New rules.
8702 (ada.mostlyclean, ada.stage1)
8703 (ada.stage2, ada.stage3, ada.stage4, ada.stageprofile)
8704 (ada.stagefeedback): Adjust.
8705 * gcc-interface/Makefile.in (b_gnatl.adb): Replace b_gnatl.c.
8706 Use ada output of gnatbind.
8707 (b_gnatm.adb): Ditto.
8708 (b_gnatl.o, b_gnatm.o): New rules.
8710 2011-03-26 Eric Botcazou <ebotcazou@adacore.com>
8712 * gcc-interface/decl.c (gnat_to_gnu_entity) <object>: Create TYPE_DECL
8713 for the padded type built to support a specified size or alignment.
8715 2011-03-26 Eric Botcazou <ebotcazou@adacore.com>
8717 * gcc-interface/gigi.h (finalize_from_with_types): Adjust comment.
8718 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Access_Type>: Defer
8719 unconditionally to the end of the unit when the designated type is
8721 <all>: Rename local variable. Attempt to un-defer types only and do it
8722 for limited_with'ed types as well.
8723 (finalize_from_with_types): Adjust comment. Rename variable and tidy.
8724 * gcc-interface/trans.c (Compilation_Unit_to_gnu): Use GNAT_UNIT
8725 consistently and remove redundant call to finalize_from_with_types.
8727 2011-03-26 Eric Botcazou <ebotcazou@adacore.com>
8729 * inline.adb (Back_End_Cannot_Inline): Lift restriction on calls to
8730 subprograms without a previous spec declared in the same unit.
8731 * gcc-interface/trans.c (Compilation_Unit_to_gnu): Process inlined
8732 subprograms at the end of the unit instead of at the beginning.
8733 * gcc-interface/utils.c (create_subprog_decl): Check that the entity
8734 isn't public for the special handling of non-inline functions nested
8735 inside inline external functions.
8737 2011-03-25 Jeff Law <law@redhat.com>
8739 * gcc-interface/utils.c (def_fn_type): Add missing va_end.
8741 2011-03-24 Eric Botcazou <ebotcazou@adacore.com>
8743 * einfo.ads (Size_Depends_On_Discriminant): Adjust description.
8744 * layout.adb (Compute_Size_Depends_On_Discriminant): New procedure
8745 to compute Set_Size_Depends_On_Discriminant.
8746 (Layout_Type): Call it on array types in back-end layout mode.
8747 * sem_util.adb (Requires_Transient_Scope): Return true for array
8748 types only if the size depends on the value of discriminants.
8749 * gcc-interface/utils2.c (build_binary_op) <MODIFY_EXPR>: Use the RHS
8750 type if the RHS is a call to a function that returns an unconstrained
8751 type with default discriminant.
8753 2011-03-24 Eric Botcazou <ebotcazou@adacore.com>
8755 * gcc-interface/trans.c (gnat_to_gnu): Remove obsolete case of
8756 non-conversion to the nominal result type at the end.
8758 2011-03-23 Eric Botcazou <ebotcazou@adacore.com>
8760 * gcc-interface/trans.c (create_temporary): New function taken from...
8761 (create_init_temporary): ...here. Call it.
8762 (call_to_gnu): Create the temporary for the return value early, if any.
8763 Create it for a function with copy-in/copy-out parameters if there is
8764 no target; in other cases of copy-in/copy-out, use another temporary.
8765 Push the new binding level lazily. Add and rename local variables.
8767 2011-03-23 Eric Botcazou <ebotcazou@adacore.com>
8769 * gcc-interface/decl.c (validate_size): Improve comments and tweak
8771 (set_rm_size): Likewise.
8773 2011-03-23 Eric Botcazou <ebotcazou@adacore.com>
8775 * gcc-interface/decl.c (gnat_to_gnu_entity) <object>: Create TYPE_DECL
8776 for the padded type built in order to support a specified alignment.
8777 Fix incorrect formatting.
8779 2011-03-21 Eric Botcazou <ebotcazou@adacore.com>
8782 * gcc-interface/decl.c (elaborate_expression_1): Localize GNU_DECL.
8784 2011-03-21 Eric Botcazou <ebotcazou@adacore.com>
8786 * gcc-interface/decl.c (components_to_record): Add REORDER parameter,
8787 rename DEBUG_INFO_P into DEBUG_INFO and move P_GNU_REP_LIST parameter
8788 to the end of the list. Adjust recursive call. Rename local variable.
8789 If REORDER is true, reorder components of the record type.
8790 (gnat_to_gnu_entity): Pass OK_To_Reorder_Components flag as argument to
8791 components_to_record and adjust the parameter list.
8793 2011-03-21 Eric Botcazou <ebotcazou@adacore.com>
8795 * gcc-interface/decl.c (elaborate_expression_1): When optimization is
8796 disabled, use the variable for bounds of loop iteration scheme.
8798 2011-03-21 Kai Tietz <ktietz@redhat.com>
8801 * gcc-interface/utils.c (gnat_internal_attribute_table): Add column.
8803 2011-03-17 Eric Botcazou <ebotcazou@adacore.com>
8805 * gcc-interface/decl.c (elaborate_expression_1): Try harder to find
8806 out whether the expression is read-only. Short-circuit placeholder
8807 case and rename a couple of local variables.
8809 2011-03-17 Eric Botcazou <ebotcazou@adacore.com>
8811 * gcc-interface/gigi.h (smaller_form_type_p): Declare.
8812 * gcc-interface/trans.c (smaller_form_type_p): Make global and move...
8813 * gcc-interface/utils.c (smaller_form_type_p): ...to here.
8814 (convert): Deal with conversions from a smaller form type specially.
8816 2011-02-14 Eric Botcazou <ebotcazou@adacore.com>
8818 * gcc-interface/misc.c (gnat_init_options): Do not concatenate -I and
8819 its argument, except for the special -I- switch.
8821 2011-02-12 Gerald Pfeifer <gerald@pfeifer.com>
8823 * gnat_ugn.texi (Compiling Different Versions of Ada): Update link to
8826 2011-02-08 Eric Botcazou <ebotcazou@adacore.com>
8828 * gcc-interface/Makefile.in (x86-64 darwin): Handle multilibs.
8830 2011-02-03 Eric Botcazou <ebotcazou@adacore.com>
8832 * gcc-interface/gigi.h (fill_vms_descriptor): Take GNU_TYPE instead of
8834 * gcc-interface/utils2.c (fill_vms_descriptor): Move from here to...
8835 * gcc-interface/utils.c (fill_vms_descriptor): ...here. Take GNU_TYPE
8836 instead of GNAT_FORMAL. Protect the expression against multiple uses.
8837 Do not generate the check directly, instead instantiate the template
8838 check present in the descriptor.
8839 (make_descriptor_field): Move around.
8840 (build_vms_descriptor32): Build a template check in the POINTER field.
8841 (build_vms_descriptor): Remove useless suffixes.
8842 * gcc-interface/trans.c (call_to_gnu): Adjust fill_vms_descriptor call.
8844 2011-01-26 Eric Botcazou <ebotcazou@adacore.com>
8847 * targext.c: Include target files if IN_RTS is defined.
8849 2011-01-26 Richard Guenther <rguenther@suse.de>
8852 * targext.c: Include config.h.
8853 * gcc-interface/Make-lang.in (ada/targext.o): Add $(CONFIG_H)
8856 2011-01-04 Pascal Obry <obry@adacore.com>
8857 Eric Botcazou <ebotcazou@adacore.com>
8859 * gcc-interface/decl.c: Disable Stdcall convention handling for 64-bit.
8861 2011-01-04 Eric Botcazou <ebotcazou@adacore.com>
8863 * gcc-interface/trans.c (Case_Statement_to_gnu): Put the SLOC of the
8864 end-of-case on the end label and its associated gotos, if any.
8866 2011-01-04 Eric Botcazou <ebotcazou@adacore.com>
8868 * gcc-interface/trans.c (Subprogram_Body_to_gnu): Evaluate the
8869 expressions of the parameter cache within the statement group of
8872 2011-01-04 Olivier Hainque <hainque@adacore.com>
8873 Eric Botcazou <ebotcazou@adacore.com>
8875 * gcc-interface/trans.c (BLOCK_SOURCE_END_LOCATION): Provide default.
8876 (set_end_locus_from_node): New function.
8877 (Subprogram_Body_to_gnu): Use it to mark both the inner BIND_EXPR we
8878 make and the function end_locus.
8879 (Compilation_Unit_to_gnu): Call it instead of a straight Sloc_to_locus
8880 for the elaboration subprogram.
8881 (set_gnu_expr_location_from_node) <default case>: Use it to attempt to
8882 set the end_locus of the expression as well.
8884 2011-01-04 Eric Botcazou <ebotcazou@adacore.com>
8887 * gcc-interface/trans.c (Identifier_to_gnu): In SJLJ mode, do not make
8888 variables that are referenced in exception handlers volatile.
8892 Copyright (C) 2011 Free Software Foundation, Inc.
8894 Copying and distribution of this file, with or without modification,
8895 are permitted in any medium without royalty provided the copyright
8896 notice and this notice are preserved.