1 2011-08-04 Emmanuel Briot <briot@adacore.com>
3 * make.adb, makeutl.adb, makeutl.ads (Make): major refactoring.
4 Create several new subprograms to move code out of Make. This makes the
5 code more readable, removes code duplication, and is a preparation work
6 for adding support for aggregate projects.
8 2011-08-04 Tristan Gingold <gingold@adacore.com>
10 * s-po32gl.ads, s-po32gl.adb: New files.
11 * exp_ch7.ads (Get_Global_Pool_For_Access_Type): New function.
12 * exp_ch7.adb (Get_Global_Pool_For_Access_Type): New function.
13 (Build_Finalization_Collection): Use it.
14 * exp_ch4.adb (Complete_Controlled_Allocation): Ditto.
15 * rtsfind.ads: System_Pool_32_Global, Re_Global_Pool_32_Object: New
17 * gcc-interface/Makefile.in: Use s-po32gl.o on VMS.
18 * gcc-interface/Make-lang.in: Update dependencies.
20 2011-08-04 Emmanuel Briot <briot@adacore.com>
22 * makeutl.adb (Complete_Mains): add support for specs with no suffix on
25 2011-08-04 Emmanuel Briot <briot@adacore.com>
27 * make.adb, makeutl.adb (Complete_Mains): if a main specified on the
28 command line is not a file name, also check whether it could be a unit
31 2011-08-04 Eric Botcazou <ebotcazou@adacore.com>
33 * bindgen.adb (Gen_Finalize_Library_Ada): Factor out code to generate
34 the header of the finalization routine.
35 If the unit has no finalizer but is a body whose spec has one, then
36 generate the decrement of the elaboration entity only.
37 If the unit has a finalizer and is a spec, then do not generate the
38 decrement of the elaboration entity.
39 (Gen_Finalize_Library_C): Likewise.
41 2011-08-04 Hristian Kirtchev <kirtchev@adacore.com>
43 * exp_ch7.adb (Alignment_Of): New subsidiary routine.
44 (Bounds_Size_Expression): Removed.
45 (Double_Alignment_Of): New subsidiary routine.
46 (Make_Finalize_Address_Stmts): New local variable Index_Typ. Account
47 for a hole in the dope vector of unconstrained arrays due to different
48 index and element alignments.
50 2011-08-04 Ed Schonberg <schonberg@adacore.com>
52 * sem_res.adb (Resolve_Allocator): diagnose task allocator that will
53 raise program_error because body has not been seen yet.
55 2011-08-04 Ed Schonberg <schonberg@adacore.com>
57 * sem_ch10.adb (Analyze_With_Clause): Protect against child unit with
60 2011-08-04 Vincent Celier <celier@adacore.com>
62 * makeutl.adb (Do_Complete): Check absolute paths in canonical forms
64 2011-08-04 Yannick Moy <moy@adacore.com>
66 * alfa.adb, alfa.ads (Unique_Defining_Entity): move function from here
67 * sem_util.adb, sem_util.ads (Unique_Defining_Entity): ...to here
69 2011-08-04 Thomas Quinot <quinot@adacore.com>
71 * sem_ch12.adb (Analyze_Package_Instantiation): Do not omit body for
74 2011-08-04 Emmanuel Briot <briot@adacore.com>
76 * make.adb: Share more code with gprbuild
78 2011-08-04 Emmanuel Briot <briot@adacore.com>
80 * projects.texi: Added documentation for the IDE'Gnat project file
83 2011-08-04 Nicolas Roche <roche@adacore.com>
85 * gnat_rm.texi: Minor editing.
87 2011-08-04 Javier Miranda <miranda@adacore.com>
89 * bindgen.adb (Gen_Adafinal_Ada): Do not differentiate the main case
90 and the library case for VM targets.
91 (Gen_Adainit_Ada): Likewise.
93 2011-08-04 Robert Dewar <dewar@adacore.com>
95 * g-altive.ads: Minor comment updates.
96 * prj-nmsc.adb: Minor reformatting.
98 2011-08-04 Javier Miranda <miranda@adacore.com>
101 (Normalize_Scalars_Config): Value of the configuration switch set by
102 pragma Normalize_Scalars when it appears in the gnat.adc file.
103 (Normalize_Scalars): New field for record Config_Switches_Type. Used
104 to save and restore settings of this pragma.
106 (Register_Opt_Config_Switches, Save_Opt_Config_Switches,
107 Restore_Opt_Config_Switches): Add missing support for Normalize_Scalars.
109 2011-08-04 Vincent Celier <celier@adacore.com>
111 * gnat_ugn.texi: Document gnatlink options -M and -M=mapfile
113 2011-08-04 Arnaud Charlet <charlet@adacore.com>
115 * makeutl.adb: Minor reformatting.
117 2011-08-04 Olivier Hainque <hainque@adacore.com>
119 * g-altive.ads: Update comments to reflect that only the soft
120 binding is available today.
122 2011-08-04 Robert Dewar <dewar@adacore.com>
124 * bindgen.adb, einfo.adb, sem_ch12.adb, s-tasren.adb, sem_res.adb,
125 makeutl.adb, prj-nmsc.adb, opt.ads, prj-env.adb: Minor reformatting
126 * gcc-interface/Make-lang.in: Update dependencies.
128 2011-08-04 Arnaud Charlet <charlet@adacore.com>
130 * prj-env.adb: Remove local debug traces.
132 2011-08-04 Yannick Moy <moy@adacore.com>
134 * checks.adb (Apply_Float_Conversion_Check): correct a typo where Lo_OK
135 was used instead of Hi_OK, which could cause a read of an uninitialized
136 value later on. Detected while working on the new warning.
137 * exp_ch9.adb (Expand_N_Entry_Declaration): remove useless assignment
139 * sem_ch5.adb (Analyze_Assignment): set the last assignment component
140 in more cases, in order to detect more unreferenced values.
141 * sem_util.adb, sem_util.ads (Get_Enclosing_Object): return enclosing
142 object for expression, if any.
144 2011-08-04 Eric Botcazou <ebotcazou@adacore.com>
146 * exp_intr.adb (Expand_Binary_Operator_Call): Look at the RM size of
147 the operand types instead of the Esize.
149 2011-08-04 Steve Baird <baird@adacore.com>
151 * switch-b.adb (Scan_Binder_Switches): Add -P binder switch, used to
152 enable CodePeer_Mode.
153 * bindusg.adb (Display): Add help message describing -P binder switch.
154 * gnat_ugn.texi: Document -P binder switch.
155 * bindgen.adb (Gen_Main_Ada): If CodePeer_Mode is set, then call the
156 user-defined main program directly.
157 (Gen_Output_File_Ada): If CodePeer_Mode is set, generate a with of the
158 user-defined main program in the context clause of the package body.
160 2011-08-04 Yannick Moy <moy@adacore.com>
162 * alfa.adb, alfa.ads (Get_Entity_For_Decl): remove function, partial
163 duplicate of Defining_Entity
164 (Get_Unique_Entity_For_Decl): rename function into
165 Unique_Defining_Entity
166 * einfo.adb, einfo.ads (Is_In_ALFA, Body_Is_In_ALFA): remove flags
167 (Formal_Proof_On): remove synthesized flag
168 * cstand.adb, sem_ch11.adb, sem_ch2.adb, sem_ch3.adb, sem_ch4.adb,
169 sem_ch5.adb, sem_ch6.adb, sem_ch9.adb, sem_res.adb, sem_util.adb,
170 sem_util.ads, stand.ads: Remove treatment associated to entities in ALFA
171 * sem_prag.adb (Analyze_Pragma): remove special treatment for pragma
172 Annotate (Formal_Proof)
174 2011-08-04 Emmanuel Briot <briot@adacore.com>
176 * prj-env.adb (Create_Config_Pragmas_File): fix handling of multi-unit
177 source files with non-standard naming schemes, in imported projects
179 2011-08-04 Emmanuel Briot <briot@adacore.com>
181 * makeutl.adb (Complete_Mains): when a multi-unit source file is
182 specified on the gprbuild command line, we need to compile all units
183 within that file, not just the first one we find
184 Fix error message for mains that are not found.
186 2011-08-04 Thomas Quinot <quinot@adacore.com>
188 * sem_ch6.adb: Update comment.
189 * sem_ch12.adb: Minor reformatting.
191 2011-08-04 Bob Duff <duff@adacore.com>
193 * s-tasren.adb (Task_Do_Or_Queue): Previous code was reading
194 Acceptor.Terminate_Alternative without locking Acceptor, which causes a
195 race condition whose symptom is to fail to lock Parent. That, in turn,
196 causes Parent.Awake_Count to be accessed without locking Parent, which
197 causes another race condition whose symptom is that Parent.Awake_Count
198 can be off by 1 (either too high or too low). The solution is to lock
199 Parent unconditionally, and then lock Acceptor, before reading
200 Acceptor.Terminate_Alternative.
202 2011-08-04 Arnaud Charlet <charlet@adacore.com>
204 * debug.adb: Update comment.
206 2011-08-04 Robert Dewar <dewar@adacore.com>
208 * par_sco.adb, exp_util.adb, make.adb, a-tags.adb, sem_prag.adb,
209 sem_util.adb, sem_attr.adb, exp_ch4.adb, g-comlin.adb, g-comlin.ads,
210 exp_ch6.adb: Minor reformatting.
212 2011-08-04 Gary Dismukes <dismukes@adacore.com>
214 * gnat_ugn.texi: Add sentence about the case of compile-time-detected
217 2011-08-04 Ed Schonberg <schonberg@adacore.com>
219 * gnat_rm.texi: update Ravenscar desription to reflect Ada2012 RM.
221 2011-08-04 Thomas Quinot <quinot@adacore.com>
223 * sinfo.ads: Minor reformatting.
225 2011-08-04 Emmanuel Briot <briot@adacore.com>
227 * makeutl.adb, makeutl.ads, prj-nmsc.adb (Complete_Mains): report error
228 even if there is no location.
230 2011-08-04 Ed Schonberg <schonberg@adacore.com>
232 * sem_res.adb, sem_ch4.adb: move check for restriction
233 No_Task_Hierarchy to resolve_allocator.
235 2011-08-04 Thomas Quinot <quinot@adacore.com>
237 * sinfo.adb, sinfo.ads, sem_prag.adb, sem_ch12.adb (Pragma_Enabled):
238 This flag of N_Pragma nodes is not used, remove it as well as all of
239 the associated circuitry.
241 2011-08-04 Javier Miranda <miranda@adacore.com>
243 * exp_disp.adb (Make_DT): Switch -gnatdQ disables the generation of the
244 runtime check on duplicated externa tags
245 * debug.adb Document switch -gnatdQ.
247 2011-08-04 Gary Dismukes <dismukes@adacore.com>
249 * a-fihema.ads: Minor typo fix.
251 2011-08-04 Yannick Moy <moy@adacore.com>
253 * sem_ch10.adb: Minor comment update.
255 2011-08-04 Hristian Kirtchev <kirtchev@adacore.com>
257 * einfo.adb: Update the node field usage to reflect the renaming of
258 Return_Flag to Return_ Flag_Or_Transient_Decl.
259 (Return_Flag): Renamed to Return_Flag_Or_Transient_Decl.
260 (Set_Return_Flag): Renamed to Set_Return_Flag_Or_Transient_Decl.
261 (Write_Field15_Name): Change Return_Flag to
262 Return_Flag_Or_Transient_Decl.
263 * einfo.ads: Rename node field Return_Flag to
264 Return_Flag_Or_Transient_Decl. Update the associated comment and all
265 occurrences in entities.
266 (Return_Flag): Renamed to Return_Flag_Or_Transient_Decl. Update
267 associated Inline pragma.
268 (Set_Return_Flag): Renamed to Set_Return_Flag_Or_Transient_Decl. Update
269 associated Inline pragma.
270 * exp_ch4.ads, exp_ch4.adb (Expand_N_Expression_With_Actions): New
272 * exp_ch6.adb (Expand_N_Extended_Return_Statement): Update the calls to
273 Return_Flag and Set_Return_Flag.
274 * exp_ch7.adb (Process_Declarations): Add code to recognize hook
275 objects generated for controlled transients declared inside an
276 Exception_With_Actions. Update the calls to Return_Flag.
277 (Process_Object_Declaration): Add code to add a null guard for hook
278 objects generated for controlled transients declared inside an
279 Exception_With_Actions. Update related comment.
280 * exp_util.adb (Has_Controlled_Objects): Add code to recognize hook
281 objects generated for controlled transients declared inside an
282 Exception_With_Actions. Update the calls to Return_Flag.
283 * expander.adb (Expand): Add new case for N_Expression_With_Actions.
285 2011-08-04 Ed Schonberg <schonberg@adacore.com>
287 * sem_util.adb:(Wrong_Type): Improve error message on a one-element
288 positional aggregate.
290 2011-08-04 Vincent Celier <celier@adacore.com>
292 * par_sco.adb (Process_Decisions.Output_Header): Check and record pragma
293 SLOC only for pragmas.
295 2011-08-04 Emmanuel Briot <briot@adacore.com>
297 * projects.texi: Minor typo fix.
299 2011-08-04 Emmanuel Briot <briot@adacore.com>
301 * prj-nmsc.adb (Check_File): Minor change to traces, to help debugging
302 on case-sensitive file systems.
304 2011-08-04 Thomas Quinot <quinot@adacore.com>
306 * put_scos.adb (Put_SCOs): Do not emit decision SCO for an X decision
307 nested in a disabled pragma.
308 * scos.ads, scos.adb, par_sco.ads, par_sco.adb: Record sloc of
309 enclosing pragma, if any, for X decisions.
311 2011-08-04 Thomas Quinot <quinot@adacore.com>
313 * sem_prag.adb: Minor reformatting.
315 2011-08-04 Vincent Celier <celier@adacore.com>
317 * a-tags.adb (Check_TSD): Avoid concatenation of strings, as it is not
318 allowed in no run time mode.
320 2011-08-04 Vincent Celier <celier@adacore.com>
322 * make.adb (Check): When -gnatc is used, check for the source file
323 inside the ALI file with a canonical case file name.
325 2011-08-04 Emmanuel Briot <briot@adacore.com>
327 * g-comlin.adb, g-comlin.ads (Add_Switch): Put back support for
328 overriding the separator.
330 2011-08-04 Robert Dewar <dewar@adacore.com>
332 * sem_aggr.adb, par_sco.adb, sem_type.adb, exp_util.adb, exp_ch9.adb,
333 prj-nmsc.adb, sem_ch13.adb, exp_strm.adb: Minor reformatting.
335 2011-08-04 Robert Dewar <dewar@adacore.com>
337 * gnat_rm.texi: Minor documentation fix for pragma Annotate.
339 2011-08-04 Yannick Moy <moy@adacore.com>
341 * sem_attr.adb (Analyze_Attribute): add check during pre-analysis that
342 'Result only appears in postcondition of function.
344 2011-08-04 Thomas Quinot <quinot@adacore.com>
346 * a-tags.adb (Check_TSD): When raising PROGRAM_ERROR for a duplicated
347 external tag, include the value of the external tag in the exception
350 2011-08-04 Yannick Moy <moy@adacore.com>
352 * sem_attr.adb (Result): modify error message for misplaced 'Result
354 2011-08-04 Sergey Rybin <rybin@adacore.com>
356 * gnat_rm.texi (pragma Annotate): Fix syntax description to make it
357 clear that the second argument must be an identifier.
359 2011-08-04 Thomas Quinot <quinot@adacore.com>
361 * exp_ch9.adb (Build_Barrier_Function): When compiling with
362 -fpreserve-control-flow, insert an IF statement on the barrier
363 condition to ensure that a conditional branch instruction is generated.
365 2011-08-04 Emmanuel Briot <briot@adacore.com>
367 * prj-part.adb, prj.adb, prj.ads, prj-tree.ads
368 (Processing_Flags.Ignore_Missing_With): new flag.
370 2011-08-04 Emmanuel Briot <briot@adacore.com>
372 * prj-nmsc.adb (Find_Sources, Path_Name_Of): Fix handling of
373 Source_List_File on case-insensitive systems where the file is actually
374 on a case-sensitive file system (NFS,...).
376 2011-08-04 Hristian Kirtchev <kirtchev@adacore.com>
378 * sem_ch6.adb (Analyze_Function_Return): In a rare case where a
379 function return contains a controlled [extension] aggregate and the
380 return statement is not part of a handled sequence of statements, wrap
381 the return in a block. This ensures that all controlled temporaries
382 generated during aggregate resolution will be picked up by the
383 finalization machinery.
385 2011-08-04 Ed Schonberg <schonberg@adacore.com>
387 * sem_aggr.adb (Resolve_Aggregate): If aggregate has box-initialized
388 components, freeze type before resolution, to ensure that default
389 initializations are present for all components.
390 * sem_res.adb (Resolve_Actuals): the designated object of an
391 accces-to-constant type is a legal actual in a call to an
392 initialization procedure.
394 2011-08-04 Hristian Kirtchev <kirtchev@adacore.com>
396 * exp_util.adb (Extract_Renamed_Object): Add N_Type_Conversion and
397 N_Unchecked_Type_Conversion to the possible containers of a renamed
400 2011-08-04 Yannick Moy <moy@adacore.com>
402 * par-ch13.adb (Aspect_Specifications_Present): recognize
403 "with Identifier'Class =>" as an aspect, so that a meaningful warning
404 is issued in Strict mode.
405 * par.adb: Fix typos in comments.
407 2011-08-04 Yannick Moy <moy@adacore.com>
409 * sem_attr.adb (Result): modify error message to take into account Post
410 aspect when compiling Ada 2012 (or newer) code.
412 2011-08-04 Nicolas Roche <roche@adacore.com>
414 * env.c (__gnat_clearenv): Avoid use of dynamic size array in order to
415 remove need for GCC exceptions.
417 2011-08-04 Vincent Celier <celier@adacore.com>
419 * makeutl.adb (Do_Complete): Call Debug_Output with the name of the
420 project, not the source file name.
421 * prj.adb (Find_Sources.Look_For_Sources): If the source has been
422 excluded, continue looking. This excluded source will only be returned
423 if there is no other source with the same base name that is not locally
426 2011-08-04 Ed Schonberg <schonberg@adacore.com>
428 * sem_res.adb (Resolve_Intrinsic_Operator): if the result type is
429 private and one of the operands is a real literal, use a qualified
430 expression rather than a conversion which is not meaningful to the
433 2011-08-04 Yannick Moy <moy@adacore.com>
435 * sem_ch13.adb (Aspect_Loop): when an aspect X and its classwise
436 corresponding aspect X'Class are allowed, proceed with analysis of the
437 aspect instead of skipping it.
439 2011-08-04 Tristan Gingold <gingold@adacore.com>
441 * s-flocon.adb, s-flocon.ads: Add a body for s-flocon.ads
442 This will allow to have an Ada implementation for the subprogram.
444 2011-08-04 Ed Schonberg <schonberg@adacore.com>
446 * sem_ch3.adb (Analyze_Full_Type_Declaration): If the declaration is a
447 completion and aspects are present, apply them to the entity for the
448 type which is currently the partial view, but which is the one that
450 * sem_ch13.adb (Analyze_Aspect_Specifications): if the predicate
451 applies to a partial view, indicate that the full view has predicates
453 (Replace_Type_Reference): Handle properly predicates that apply to the
454 full view of a private completion.
456 2011-08-04 Eric Botcazou <ebotcazou@adacore.com>
458 * layout.adb (Layout_Type): For composite types, do not set Esize.
459 * freeze.adb (Set_Small_Size): Remove test on alignment and do not
461 (Size_Known): Look at the RM size of components instead of the Esize.
462 (Freeze_Record_Type): Look at the RM size instead of the Esize to
463 issue warning and activate Implicit_Packing.
464 (Freeze_Entity): Likewise. Do not issue a warning for alias/atomic
465 if the Esize is not known.
466 * sem_ch13.adb (Analyze_Attribute_Definition_Clause) <Size>: Set Esize
467 for elementary types only.
468 (Analyze_Record_Representation_Clause): Look at the RM size instead
469 of the Esize to issue errors.
470 * gcc-interface/decl.c (gnat_to_gnu_entity): Do not set Esize if it
472 <E_Record_Type>: Look at the RM size instead of the Esize. Remove
474 Look at the RM size instead of the Esize for types if the latter is
476 (gnat_to_gnu_field): Use Known_Esize instead of Known_Static_Esize.
478 2011-08-04 Ed Schonberg <schonberg@adacore.com>
480 * sem_type.adb: proper handling of equality not involving anonymous
483 2011-08-04 Hristian Kirtchev <kirtchev@adacore.com>
485 * exp_ch7.adb (Create_Finalizer): Remove local variables Spec_Nod and
486 Vis_Decls. When creating a library-level finalizer for a package spec,
487 both the declaration and body of the finalizer are inserted either in
488 the visible or private declarations of the package spec.
490 2011-08-04 Javier Miranda <miranda@adacore.com>
492 * sem_ch3.adb (Derive_Subprograms): Complete assertion to request the
493 use of the full-view of a type when invoking Is_Ancestor.
494 * sem_type.adb (Is_Ancestor): For consistency, when the traversal of
495 the full-view of private parents is requested, then use also the
496 full-view of the parent of the first derivation.
498 2011-08-04 Tristan Gingold <gingold@adacore.com>
500 * s-taprop-vxworks.adb (Enter_Task): Use System.Float_Control.Reset
501 instead of the locally imported procedure.
502 * s-taprop-mingw.adb (Enter_Task): Ditto.
503 * s-valrea.adb (Scan_Real): Ditto.
504 * s-imgrea.adb (Set_Image_Real): Ditto.
505 * s-flocon.ads: Make the package pure.
507 2011-08-04 Thomas Quinot <quinot@adacore.com>
509 * sinfo.ads, sinfo.adb (Debug_Statement, Set_Debug_Statement): Remove.
510 * tbuild.ads, tbuild.adb (Make_Pragma): Adjust accordingly.
511 * sinfo-cn.ads, sinfo-cn.adb (Change_Name_To_Procedure_Call_Statement):
512 New subprogram, moved here from...
513 * par.adb, par-ch5.adb (P_Statement_Name): ... here.
514 * par-prag.adb (Par.Prag, case Pragma_Debug): Do not perform any
515 rewriting of the last argument into a procedure call statement here...
516 * sem_prag.adb (Analyze_Pragma, case Pragma_Debug): ...do it there
519 2011-08-04 Thomas Quinot <quinot@adacore.com>
521 * par_sco.adb: Minor reformatting.
523 2011-08-04 Robert Dewar <dewar@adacore.com>
525 * erroutc.adb: Minor reformatting.
527 2011-08-04 Thomas Quinot <quinot@adacore.com>
529 * par_sco.adb: Comment update.
531 2011-08-04 Tristan Gingold <gingold@adacore.com>
533 * s-flocon.ads: New file.
534 * g-flocon.ads: Now a renaming of s-flocon.
535 * Makefile.rtl: Add s-flocon.o
537 2011-08-04 Javier Miranda <miranda@adacore.com>
539 * exp_strm.adb (Build_Array_Input_Function): if the array type is
540 constrained, do not attempt to build a subtype of it.
542 2011-08-04 Yannick Moy <moy@adacore.com>
544 * errout.ads Change comments: remove 'R'M as an example where quotes
545 are needed; add ALFA as another case where quotes are not needed
546 * erroutc.adb (Set_Msg_Insertion_Reserved_Word): add ALFA as another
547 case where quotes are not needed.
548 * sem_ch11.adb, sem_ch13.adb, sem_ch2.adb, sem_ch3.adb, sem_ch4.adb,
549 sem_ch5.adb, sem_ch6.adb, sem_ch9.adb, sem_prag.adb, sem_res.adb:
550 Remove all occurrences of 'A'L'F'A
552 2011-08-04 Ed Schonberg <schonberg@adacore.com>
554 * sem_ch13.adb: check legality of invariant pragma.
556 2011-08-04 Eric Botcazou <ebotcazou@adacore.com>
558 * bindgen.adb: Add comments.
560 2011-08-04 Yannick Moy <moy@adacore.com>
562 * einfo.adb, einfo.ads: Free Flag254 and make Formal_Proof_On a
564 * sem_prag.adb (Analyze_Pragma): record the pragma Annotate
565 (Formal_Proof, On/Off) in the Rep_Item list of the current subprogram.
567 2011-08-04 Robert Dewar <dewar@adacore.com>
569 * exp_ch7.adb, exp_ch6.adb, sem_ch3.adb, layout.adb, sem_ch5.adb,
570 osint-c.ads, sem_util.ads, gnat1drv.adb, targparm.ads, sem_ch6.adb,
571 sem_ch13.adb, s-pooloc.adb: Minor reformatting.
573 2011-08-04 Thomas Quinot <quinot@adacore.com>
575 * s-pooloc.ads, s-pooglo.ads: Minor reformatting
577 2011-08-04 Thomas Quinot <quinot@adacore.com>
580 * s-pooloc.adb (Deallocate): Fix the case of deallocating the only
583 2011-08-04 Robert Dewar <dewar@adacore.com>
585 * einfo.ads, exp_ch4.adb: Minor reformatting.
587 2011-08-04 Jerome Lambourg <lambourg@adacore.com>
589 * back_end.ads (Gen_Or_Update_Object_File): Add more comments.
591 2011-08-04 Ed Schonberg <schonberg@adacore.com>
593 * exp_ch4.adb (Expand_Composite_Equality): code cleanup: use component
594 type in all cases to compute list of primitive operations, because full
595 view may be an itype that is not attached to the list of declarations.
597 2011-08-04 Eric Botcazou <ebotcazou@adacore.com>
599 * bindgen.adb (Gen_Adafinal_Ada): Generate an early return if the
600 library has already been finalized.
601 (Gen_Adafinal_C): Likewise.
602 (Gen_Adainit_Ada): Generate an early return if the library has
603 already been elaborated.
604 (Gen_Adainit_C): Likewise.
605 (Gen_Output_File_Ada): Generate an elaboration flag.
606 (Gen_Output_File_C): Likewise.
608 2011-08-04 Hristian Kirtchev <kirtchev@adacore.com>
610 * exp_ch4.adb (Expand_Allocator_Expression): Disable the generation of
611 Set_Finalize_Address_Ptr for CodePeer because Finalize_Address was not
612 built in the first place.
613 (Expand_N_Allocator): Disable the generation of Set_Finalize_Address_Ptr
614 for CodePeer because Finalize_Address was not built to begin with.
615 * exp_ch6.adb (Make_Build_In_Place_Call_In_Allocator): Ditto.
617 2011-08-04 Pascal Obry <obry@adacore.com>
619 * adaint.c (__gnat_tmp_name): Use current process id to create temp
620 filenames, this ensures unicity of filenames across processes.
622 2011-08-04 Hristian Kirtchev <kirtchev@adacore.com>
624 * bindgen.adb (Gen_Finalize_Library_Ada): Rename generated routine
625 Raise_Controlled to Raise_From_Controlled_Operation. Update the
626 signature of Raise_From_Controlled_Operation by adding flag From_Abort.
627 Add False as the actual to From_Abort in the generated call to
628 Raise_From_Controlled_Operation.
630 2011-08-04 Jerome Lambourg <lambourg@adacore.com>
632 * osint-c.ads, osint-c.adb (Set_Library_Info_Name): Move to declaration
633 so that the ali file name can be retrieved from outside of this package.
634 * back_end.ads, back_end.adb (Gen_Or_Update_Object_File): New method
635 doing nothing in the general case, but used to update the object file
636 timestamp if directly generated by the backend.
637 * gnat1drv.adb (Gnat1drv): Make sure the object file's timestamp is set
638 to a later time than the ali file one.
640 2011-08-04 Yannick Moy <moy@adacore.com>
642 * einfo.adb, einfo.ads (Formal_Proof_On): new flag set on subprogram
643 entities whose body contains an Annotate pragma which forces formal
645 * sem_ch11.adb, sem_ch2.adb, sem_ch3.adb, sem_ch4.adb, sem_ch5.adb,
646 sem_ch6.adb, sem_ch9.adb, sem_res.adb: Adapt call to
647 Mark_Non_ALFA_Subprogram to pass in a message and node.
648 * sem_prag.adb (Analyze_Pragma): add treatment of pragma Annotate
649 (Forma_Proof, On) which sets the flag Formal_Proof_On in the
650 surrounding subprogram.
651 * sem_util.adb, sem_util.ads (Mark_Non_ALFA_Subprogram,
652 Mark_Non_ALFA_Subprogram_Unconditional): if the subprogram being marked
653 as not in ALFA is annotated with Formal_Proof being On, then an error
654 is issued based on the additional parameters for message and node.
655 * snames.ads-tmpl (Name_Formal_Proof): new name for annotation.
656 * gcc-interface/Make-lang.in: Update dependencies.
658 2011-08-04 Hristian Kirtchev <kirtchev@adacore.com>
660 * exp_ch3.adb (Expand_Freeze_Class_Wide_Type): Do not generate
661 Finalize_Address when CodePeer is enabled.
663 2011-08-04 Pascal Obry <obry@adacore.com>
665 * adaint.c (__gnat_tmp_name): Use _tempnam() instead of tempnam() as
666 the latter returns a pointer to a static buffer which is deallocated
667 at the end of the routine.
669 2011-08-04 Yannick Moy <moy@adacore.com>
671 * sem_ch3.adb (Array_Type_Declaration): move test for type in ALFA
672 after index creation; mark unconstrained base array type generated as
673 being in/not in ALFA as well
674 (Make_Index): mark subtype created as in/not in ALFA
675 * sem_ch5.adb (Analyze_Iteration_Scheme): mark entity for iterating
676 over a loop as in/not in ALFA, depending on its type and form of loop
679 2011-08-04 Hristian Kirtchev <kirtchev@adacore.com>
681 * exp_ch7.adb (Build_Object_Declarations): Initialize flag Abort
682 directly to False on .NET and JVM.
684 2011-08-04 Yannick Moy <moy@adacore.com>
686 * sem_ch3.adb (Constrain_Enumeration, Constrain_Integer): remove
687 constraint that subtype must come from source code to be in ALFA, so
688 that anonymous subtypes can be in ALFA too.
690 2011-08-04 Yannick Moy <moy@adacore.com>
692 * sem_ch3.adb (Analyze_Object_Declaration): remove obsolete addition of
693 reference for ALFA mode.
694 * lib-xref-alfa.adb, lib-xref.ads (Traverse_Compilation_Unit): make
695 procedure public so as to use it from formal verification back-end.
697 2011-08-04 Jerome Lambourg <lambourg@adacore.com>
699 * g-comlin.adb (For_Each_Simple_Switch.Is_In_Config): Remove the
700 invalid checks of the Parameter, making Remove_Switch not working
703 2011-08-04 Arnaud Charlet <charlet@adacore.com>
705 * targparm.ads: Update header: no run-time exception is needed on this
708 2011-08-04 Vincent Celier <celier@adacore.com>
710 * a-fihema.adb: Use System.IO instead of GNAT.IO
712 2011-08-04 Thomas Quinot <quinot@adacore.com>
714 * sem_ch3.adb (Access_Definition): Anonymous access to subprogram types
715 are forbidden in Compiler_Unit mode.
717 2011-08-04 Robert Dewar <dewar@adacore.com>
719 * sem_util.adb: Minor reformatting.
721 2011-08-04 Hristian Kirtchev <kirtchev@adacore.com>
723 * bindgen.adb (Gen_Finalize_Library_Ada): Update the import string for
724 library-level finalizers.
725 (Gen_Finalize_Library_C): Update the import string for library-level
727 (Gen_Finalize_Library_Defs_C): Update the definition name of a
728 library-level finalizer.
729 * exp_ch7.adb: Remove with and use clauses for Stringt.
730 (Create_Finalizer): Remove local variables Conv_Name, Prag_Decl,
731 Spec_Decl. Add local variable Body_Id. The names of library-level
732 finalizers are now manually fully qualified and are no longer external.
733 A single name is now capable of servicing .NET, JVM and non-VM targets.
734 Pragma Export is no longer required to provide visibility for the name.
735 (Create_Finalizer_String): Removed.
736 (New_Finalizer_Name): New routine which mimics New_..._Name.
738 2011-08-04 Eric Botcazou <ebotcazou@adacore.com>
740 * sem_elab.adb (Check_Internal_Call_Continue): Change the type of the
741 elaboration counter to Standard_Short_Integer.
742 * sem_util.adb (Build_Elaboration_Entity): Likewise.
743 * bindgen.adb (Gen_Elab_Externals_Ada): Adjust to above change.
744 (Gen_Elab_Externals_C): Likewise.
746 2011-08-04 Ed Falis <falis@adacore.com>
748 * system-vxworks-arm.ads, system-vxworks-sparcv9.ads,
749 system-vxworks-ppc.ads, system-vxworks-m68k.ads,
750 system-vxworks-mips.ads, system-vxworks-x86.ads
751 (Always_Compatible_Rep): set to False for all VxWorks targets.
753 2011-08-04 Robert Dewar <dewar@adacore.com>
755 * par_sco.adb, prj-proc.adb, make.adb, bindgen.adb, prj.adb, prj.ads,
756 makeutl.adb, makeutl.ads, prj-nmsc.adb, exp_ch5.adb, exp_ch12.adb,
757 exp_ch7.ads, exp_util.ads, sem_util.ads, g-comlin.ads, exp_ch6.adb,
758 exp_ch6.ads, lib-xref.ads, exp_ch7.adb, exp_util.adb, exp_dist.adb,
759 exp_strm.adb, gnatcmd.adb, freeze.adb, g-comlin.adb, lib-xref-alfa.adb,
760 sem_attr.adb, sem_prag.adb, sem_util.adb, sem_elab.adb, sem_ch8.adb,
761 sem_ch11.adb, sem_eval.adb, sem_ch13.adb, sem_disp.adb, a-fihema.adb:
762 Minor reformatting and code reorganization.
764 2011-08-04 Emmanuel Briot <briot@adacore.com>
766 * projects.texi: Added doc for aggregate projects.
768 2011-08-04 Emmanuel Briot <briot@adacore.com>
770 * prj-proc.adb, prj-nmsc.adb, prj-env.adb (Process_Declarative_Items):
771 Add support for overriding the Project_Path in aggregate projects.
773 2011-08-04 Robert Dewar <dewar@adacore.com>
775 * a-cofove.ads: Minor reformatting.
777 2011-08-04 Hristian Kirtchev <kirtchev@adacore.com>
779 * exp_ch7.adb (Build_Adjust_Or_Finalize_Statements): Update the comment
780 on the generated code.
781 (Build_Finalize_Statements): Update the comment on the generated code.
782 (Build_Initialize_Statements): Update the comment on the generated code.
783 (Build_Object_Declarations): Add local variable Result. The object
784 declarations are now built in sequence.
785 * rtsfind.ads: Add RE_Exception_Occurrence_Access to tables RE_Id and
788 2011-08-04 Robert Dewar <dewar@adacore.com>
790 * checks.adb, alfa.adb, alfa.ads: Minor reformatting.
792 2011-08-04 Eric Botcazou <ebotcazou@adacore.com>
794 * einfo.ads (Elaboration_Entity): Document new definition and use.
795 (Elaboration_Entity_Required): Adjust to above change.
796 * exp_attr.adb (Expand_N_Attribute_Reference): Likewise.
797 * exp_ch12.adb: And with and use for Snames.
798 (Expand_N_Generic_Instantiation): Test 'Elaborated attribute.
799 * exp_util.adb (Set_Elaboration_Flag): Likewise.
800 * sem_attr.adb (Analyze_Attribute) <Check_Library_Unit>: Delete.
801 <Check_Unit_Name>: Deal with N_Expanded_Name.
802 <Attribute_Elaborated>: Extend to all unit names.
803 * sem_elab.adb: And with and use for Uintp.
804 (Check_Internal_Call_Continue): Adjust to Elaboration_Entity change.
805 * sem_util.ads (Build_Elaboration_Entity): Adjust comment.
806 * sem_util.adb (Build_Elaboration_Entity): Change type to Integer.
807 * bindgen.adb (Gen_Elab_Externals_Ada): New local subprogram taken
808 from Gen_Adainit_Ada.
809 (Gen_Elab_Externals_C): Likewise, but taken from Gen_Adainit_C.
810 (Gen_Adafinal_Ada): Remove redundant test. In the non-main program
811 case, do not call System.Standard_Library.Adafinal; instead call
812 finalize_library if needed.
813 (Gen_Adafinal_C): Likewise.
814 (Gen_Adainit_Ada): Do not set SSL.Finalize_Library_Objects in the
815 non-main program case.
816 (Gen_Adainit_C): Generate a couple of external declarations here.
817 In the main program case, set SSL.Finalize_Library_Objects.
818 (Gen_Elab_Calls_Ada): Adjust to Elaboration_Entity change.
819 (Gen_Elab_Calls_C): Likewise.
820 (Gen_Finalize_Library_Ada): Likewise. Skip SAL interface units.
821 (Gen_Finalize_Library_C): Likewise. Generate a full function.
822 (Gen_Main_C): Put back call to Ada_Final and don't finalize library
824 (Gen_Output_File_Ada): Generate pragma Linker_Destructor for Ada_Final
825 if -a is specified. Call Gen_Elab_Externals_Ada. Move around call to
827 (Gen_Output_File_C): Generate __attribute__((destructor)) for Ada_Final
828 if -a is specified. Call Gen_Elab_Externals_C. Remove useless couple
829 of external declarations. Â Call Gen_Finalize_Library_C.
831 2011-08-04 Emmanuel Briot <briot@adacore.com>
833 * prj.adb, prj.ads, makeutl.adb, makeutl.ads (Complete_Mains,
834 Compute_Compilation_Phases): new subprogram.
835 (Builder_Data, Builder_Project_Tree_Data): new subprogram and type
836 The number of mains as well as the various compilation phases that
837 need to be run are now project tree specific, since various
838 aggregated trees might have different requirements. In particular,
839 they do not all require bind or link phases.
841 2011-08-04 Emmanuel Briot <briot@adacore.com>
843 * prj.adb, prj.ads, makeutl.adb, makeutl.ads, prj-env.adb
844 (Project_Tree_Appdata): New type.
845 It is now possible to associate application-specific data to a project
846 tree. In particular, this is used in the gprbuild builder to avoid a
847 number of global tables and htables, especially now that there can be
848 several project trees loaded at once because of aggregate projects.
849 (Debug_Name): new procedure.
850 * projects.texi: Clarify syntax of "**" for Source_Dirs
852 2011-08-03 Emmanuel Briot <briot@adacore.com>
854 * prj.ads, makeutl.adb, makeutl.ads (Queue.Insert): now also inserts
855 the "roots" for a main.
856 (Fill_From_Project): add support for aggregate projects. Main units
857 in aggregated projects are now automatically added in the list of
858 files to build (although this fails later on in gprbuild, because
859 these files are not using the root proejct tree, so this needs
861 * gcc-interface/Make-lang.in: Update dependencies.
863 2011-08-03 Yannick Moy <moy@adacore.com>
865 * sem_ch4.adb (Analyze_Conditional_Expression): only allow boolean
866 conditional expression in ALFA.
867 * sem_res.adb (Resolve_Conditional_Expression): mark non-boolean
868 expressions as not in ALFA.
870 2011-08-03 Robert Dewar <dewar@adacore.com>
872 * a-cofove.adb: Minor reformatting.
874 2011-08-03 Emmanuel Briot <briot@adacore.com>
876 * make.adb, prj.adb, prj.ads, makeutl.adb, makeutl.ads
877 (Insert_Project_Sources, Insert_withed_Sources_For): moved from the
879 These packages are more logically placed in the Queue package, since
880 they manipulate the queue. It is also likely that they can be adapted
881 for gnatmake, thus sharing more code.
882 (Finish_Program, Fail_Program): moved from the gprbuild sources, so
883 that we could move the above.
885 2011-08-03 Emmanuel Briot <briot@adacore.com>
887 * errutil.adb (Finalize): clean up the list of error messages on exit.
888 Calling this subprogram multiple times will no longer show duplicate
889 error messages on stderr.
891 2011-08-03 Emmanuel Briot <briot@adacore.com>
893 * g-comlin.adb, g-comlin.ads (Set_Command_Line): ignore the parameter
894 Getopt_Switches when we have already define a command line
897 2011-08-03 Yannick Moy <moy@adacore.com>
899 * sem_ch11.adb (Analyze_Raise_xxx_Error): do not mark such nodes as not
900 in ALFA. Instead, they are considered as assertions to prove.
901 * sem_ch4.adb (Analyze_Conditional_Expression): do not always mark such
902 nodes as not in ALFA. Instead, include conditional expressions in ALFA
903 if they have no ELSE part, or if they occur in pre- and postconditions,
904 where the Condition cannot have side-effects in ALFA
905 (Analyze_Membership_Op): do not mark such nodes as not in ALFA
906 (Analyze_Type_Conversion): do not always mark such nodes as not in ALFA.
907 Instead, include type conversion between scalar types in ALFA.
908 * sem_ch6.adb (Process_Formals): correctly mark a parameter in ALFA
909 if-and-only-if its type is in ALFA.
911 2011-08-03 Thomas Quinot <quinot@adacore.com>
913 * scos.adb, get_scos.adb, put_scos.adb
914 New code letter for decisions: G (entry guard)
916 (Traverse_Subprogram_Body): Rename to...
917 (Traverse_Subprogram_Or_Task_Body): New subrpogram.
918 (Traverse_Protected_Body): New subprogram
919 (Traverse_Declarations_Or_Statements): Add traversal of task bodies,
920 protected bodies and entry bodies.
922 2011-08-03 Yannick Moy <moy@adacore.com>
924 * einfo.adb, einfo.ads (Is_Postcondition_Proc): new flag for procedure
925 entities with get/set subprograms, which is set on procedure entities
926 generated by the compiler for a postcondition.
927 * sem_ch6.adb (Process_PPCs): set new flag on postcondition procedures
928 * alfa.adb, alfa.ads (Get_Entity_For_Decl): new function returning the
929 entity for a declaration
930 (Get_Unique_Entity_For_Decl): new function returning an entity which
931 represents a declaration, so that matching spec and body have the same
934 2011-08-03 Robert Dewar <dewar@adacore.com>
936 * a-except-2005.adb, a-cfhama.adb, a-cfhase.adb, a-cfhase.ads,
937 a-cforma.adb, a-cforse.ads, a-cforse.adb: Minor reformatting
939 2011-08-03 Yannick Moy <moy@adacore.com>
941 * lib-xref-alfa.adb (Detect_And_Add_ALFA_Scope): make the subprogram
942 library-level because retriction No_Implicit_Dynamic_Code in the
943 front-end prevents its definition as a local subprogram
944 (Traverse_Compilation_Unit): extract new procedure from Add_ALFA_File,
945 for reuse in other contexts
946 (Traverse_Declarations_Or_Statements,
947 Traverse_Handled_Statement_Sequence, Traverse_Package_Body,
948 Traverse_Package_Declaration, Traverse_Subprogram_Body): make all these
949 procedures take a callback parameter to be called on all declarations
951 (Traverse_All_Compilation_Units): new generic function to traverse a
952 compilation unit and call a callback parameter on all declarations
954 2011-08-03 Javier Miranda <miranda@adacore.com>
956 * sem_prag.adb (Process_Interface_Name): Allow duplicated export names
957 in Java since they are always enclosed in a namespace that
958 differentiates them, and overloaded entities are supported by the VM.
960 2011-08-03 Ed Schonberg <schonberg@adacore.com>
962 * checks.adb (Determine_Range): If a computed bound of an operation is
963 outside the range of the base type of the expression, and overflow
964 checks are enabled, the result is unknown and cannot be used for any
965 subsequent constant folding.
966 * sem_eval.adb (Compile_Time_Compare): if the bounds of one operand are
967 unknown, so is the result of the comparison.
969 2011-08-03 Hristian Kirtchev <kirtchev@adacore.com>
971 * a-except-2005.adb (Raise_From_Controlled_Operation): Add new formal
972 From_Abort. When finalization was triggered by an abort, propagate
973 Standard'Abort_Signal rather than Program_Error.
974 * a-except-2005.ads (Raise_From_Controlled_Operation): Add new formal
976 * a-except.adb (Raise_From_Controlled_Operation): Add new formal
977 From_Abort. When finalization was triggered by an abort, propagate
978 Standard'Abort_Signal rather than Program_Error.
979 * a-except.ads:(Raise_From_Controlled_Operation): Add new formal
981 * exp_ch7.adb:(Build_Adjust_Or_Finalize_Statements): New local variable
982 Abort_Id. Update the calls to Build_Object_Declarations and
983 Build_Raise_Statement to include Abort_Id.
984 (Build_Adjust_Statements): New local variable Abort_Id. Update the
985 calls to Build_Object_Declarations and Build_Raise_Statement to include
987 (Build_Finalize_Statements): New local variable Abort_Id. Update the
988 calls to Build_Object_Declarations and Build_Raise_Statement to include
990 (Build_Components): Create an entity for Abort_Id when exceptions are
991 allowed on the target.
992 (Build_Finalizer): New local variable Abort_Id.
993 (Build_Initialize_Statements): New local variable Abort_Id. Update the
994 calls to Build_Object_Declarations and Build_Raise_Statement to include
996 (Build_Object_Declarations): Add new formal Abort_Id. Create the
997 declaration of flag Abort_Id to preserve the original abort status
998 before finalization code is executed.
999 (Build_Raise_Statement): Add new formal Abort_Id. Pass Abort_Id to
1000 runtime routine Raise_From_Controlled_Operation.
1001 (Create_Finalizer): Update the call to Build_Raise_Statement to include
1002 Abort_Id. Update the call to Build_Object_Declarations to include
1003 Abort_Id. Update the layout of the finalizer body.
1004 (Make_Handler_For_Ctrl_Operation): Add an actual for From_Abort.
1005 (Process_Transient_Objects): New local variable Abort_Id. Remove the
1006 clunky code to create all flags and objects related to
1007 exception propagation and replace it with a call to
1008 Build_Object_Declarations. Update the call to Build_Raise_Statement to
1010 * exp_ch7.ads (Build_Object_Declarations): Moved from body to spec.
1011 Add new formal Abort_Id and associated comment on its use.
1012 (Build_Raise_Statement): Add new formal Abort_Id and associated comment
1014 * exp_intr.adb (Expand_Unc_Deallocation): New local variable Abort_Id.
1015 Remove the clunky code to create all flags and objects related to
1016 exception propagation and replace it with a call to
1017 Build_Object_Declarations. Update the call to Build_Raise_Statement.
1019 2011-08-03 Eric Botcazou <ebotcazou@adacore.com>
1021 * s-tassta.adb: Fix minor typos.
1023 2011-08-03 Robert Dewar <dewar@adacore.com>
1025 * rtsfind.ads, makeutl.ads, prj.ads, prj.adb, make.adb,
1026 lib-writ.adb, makeutl.adb, s-soflin.ads, clean.adb: Minor reformatting.
1028 2011-08-03 Hristian Kirtchev <kirtchev@adacore.com>
1030 * exp_ch7.adb (Create_Finalizer): Treat freeze nodes in similar fashion
1031 to packages. This ensures that the finalizer body will not end up
1032 inside the freeze node.
1033 (Process_Declarations): Add code to detect whether a freeze node has a
1034 nested finalization collection.
1036 2011-08-03 Pascal Obry <obry@adacore.com>
1038 * g-awk.adb, g-awk.ads: Make GNAT.AWK API compatible with Ada 2005.
1039 (Current_Session): Return a not null access to Session_Type.
1040 (Default_Session): Likewise.
1042 2011-08-03 Robert Dewar <dewar@adacore.com>
1044 * a-cfdlli.adb, bindgen.adb, exp_ch4.adb, exp_ch13.adb, sem_warn.adb,
1045 exp_ch3.adb, exp_ch3.ads: Minor reformatting.
1047 2011-08-03 Pascal Obry <obry@adacore.com>
1049 * g-awk.ads: Minor comment fix.
1051 2011-08-03 Sergey Rybin <rybin@adacore.com>
1053 * tree_io.ads (ASIS_Version_Number): Update because of the changes in
1054 the tree structure related to discriminant constraints.
1055 Original_Discriminant cannot be used any more for computing the
1056 defining name for the reference to a discriminant.
1058 2011-08-03 Ed Schonberg <schonberg@adacore.com>
1060 * sem_disp.adb (Is_Tag_Indeterminate): If the return type of the
1061 function is not visibly tagged, this is not a dispatching call and
1062 therfore is not Tag_Indeterminate, even if the function is marked as
1063 dispatching on result.
1065 2011-08-03 Hristian Kirtchev <kirtchev@adacore.com>
1067 * exp_ch13.adb: Add with and use clauses for Restrict and Rident.
1068 (Expand_N_Free_Statement): Add a guard to protect against run-times
1069 which do not support controlled types.
1070 * exp_ch3.adb (Expand_Freeze_Class_Wide_Type): Add a guard to protect
1071 against run-times which do not support controlled types.
1072 * exp_ch4.adb (Complete_Controlled_Allocation): Add a guard to protect
1073 against run-times which do not support controlled types.
1074 * exp_ch7.adb (Build_Finalization_Collection): Add a guard to protect
1075 against run-times which do not support controlled types.
1076 * exp_util.adb (Needs_Finalization): Code reformatting. Add a guard to
1077 protect against run-times which do not support controlled types.
1079 2011-08-03 Eric Botcazou <ebotcazou@adacore.com>
1081 * exp_intr.adb: Put back with and use clauses for Exp_Ch11.
1082 (Expand_Unc_Deallocation): Expand the AT_END handler at the very end.
1084 2011-08-03 Ed Schonberg <schonberg@adacore.com>
1086 * exp_ch5.adb (Expand_Iterator_Loop): indicate that the cursor is
1087 modified in the source, to prevent spurious warnings when compiling
1090 2011-08-03 Thomas Quinot <quinot@adacore.com>
1092 * a-except-2005.adb: Minor reformatting.
1094 2011-08-03 Ed Schonberg <schonberg@adacore.com>
1096 * sem_warn.adb (Check_One_Unit): if the only mention of a withed unit
1097 is a renaming declaration in the private part of a package, do not emit
1098 a warning that the with_clause could be moved because the renaming may
1099 be used in the body or in a child unit.
1101 2011-08-03 Hristian Kirtchev <kirtchev@adacore.com>
1103 * exp_ch6.adb (Make_Build_In_Place_Call_In_Object_Declaration):
1104 Propagate the Comes_From_Source attribute from the original return
1105 object to the renaming.
1107 2011-08-03 Jose Ruiz <ruiz@adacore.com>
1109 * exp_ch7.adb (Build_Raise_Statement): Do not call
1110 Raise_From_Controlled_Operation when this routine is not present in
1111 the run-time library.
1112 (Cleanup_Protected_Object, Cleanup_Task): For restricted run-time
1113 libraries (Ravenscar), tasks are non-terminating, and protected objects
1114 and tasks can only appear at library level, so we do not want
1115 finalization of protected objects nor tasks.
1116 * exp_intr.adb: Minor clarification in comment.
1117 bindgen.adb (Gen_Adainit_Ada, Gen_Main_C, Gen_Output_File_Ada,
1118 Gen_Output_File_C): Remove references to finalization of library-level
1119 objects when using restricted run-time libraries.
1121 2011-08-03 Ed Schonberg <schonberg@adacore.com>
1123 * sem_ch3.adb (Build_Discriminant_Constraints): Set
1124 Original_Discriminant only if the parent type is a generic formal.
1126 2011-08-03 Hristian Kirtchev <kirtchev@adacore.com>
1128 * exp_ch13.adb: Add with and use clause for Targparm;
1129 (Expand_N_Free_Statement): Prevent the generation of a custom
1130 Deallocate on .NET/JVM targets since this requires pools and address
1132 * exp_ch4.adb (Expand_Allocator_Expression): When compiling for
1133 .NET/JVM targets, attach the newly allocated object to the access
1134 type's finalization collection. Do not generate a call to
1135 Set_Finalize_Address_Ptr on .NET/JVM because this routine does not
1136 exist in the runtime.
1137 (Expand_N_Allocator): When compiling for .NET/JVM targets, do not
1138 create a custom Allocate for object that do not require initialization.
1139 Attach a newly allocated object to the access type's finalization
1140 collection on .NET/JVM.
1141 * exp_ch5.adb (Make_Tag_Ctrl_Assignment): Add special processing for
1142 assignment of controlled types on .NET/JVM. The two hidden pointers
1143 Prev and Next and stored and later restored after the assignment takes
1145 * exp_ch6.adb (Expand_Call): Add local constant Curr_S. Add specialized
1146 kludge for .NET/JVM to recognize a particular piece of code coming from
1147 Heap_Management and change the call to Finalize into Deep_Finalize.
1148 * exp_ch7.adb (Build_Finalization_Collection): Allow the creation of
1149 finalization collections on .NET/JVM only for types derived from
1150 Controlled. Separate the association of storage pools with a collection
1151 and only allow it on non-.NET/JVM targets.
1152 (Make_Attach_Call): New routine.
1153 (Make_Detach_Call): New routine.
1154 (Process_Object_Declarations): Suppress the generation of
1155 build-in-place return object clean up code on .NET/JVM since it uses
1157 * exp_ch7.ads (Make_Attach_Call): New routine.
1158 (Make_Detach_Call): New routine.
1159 * exp_intr.adb Add with and use clause for Targparm.
1160 (Expand_Unc_Deallocation): Detach a controlled object from a collection
1161 on .NET/JVM targets.
1162 * rtsfind.ads: Add entries RE_Attach, RE_Detach and
1163 RE_Root_Controlled_Ptr to tables RE_Id and RE_Unit_Table.
1164 * snames.ads-tmpl: Add name Name_Prev. Move Name_Prev to the special
1165 names used in finalization.
1167 2011-08-03 Hristian Kirtchev <kirtchev@adacore.com>
1169 * a-fihema.adb: Add with and use clauses for System.Soft_Links.
1170 (Attach, Detach): Lock the current task when chaining an object onto a
1173 2011-08-03 Hristian Kirtchev <kirtchev@adacore.com>
1175 * a-except.adb, a-except-2005.adb (Raise_From_Controlled_Operation):
1176 Rewritten to create the message strings when the exception is not
1177 raised by an abort during finalization.
1178 * a-except.ads, a-except-2005.ads: Add pragma Export for procedure
1179 Raise_From_Controlled_Operation and update its associated comment.
1180 * a-fihema.ads, a-fihema.adb: New GNAT unit.
1181 Ada.Finalization.Heap_Management provides key functionality
1182 associated with controlled objects on the heap, their creation,
1183 finalization and reclamation. Type Finalization_Collection is
1184 effectively a wrapper which sits ontop of a storage pool and performs
1185 all necessary bookkeeping for all the objects it contains. Each
1186 access-to-controlled or access-to-class-wide type receives a collection
1187 as part of its expansion. The compiler generates buffer code and
1188 invokes Allocate / Deallocate to create and destroy allocated
1190 * a-finali.adb ("="): Removed.
1191 * a-finali.ads ("="): Removed. Controlled types no longer carry hidden
1192 fields Prev and Next.
1193 * ali.adb (Scan_ALI): Add parsing code to process PF / Has_Finalizer.
1194 A library unit with at least one controlled object on the library level
1195 has a special finalizer which is invoked by the binder. To signal this,
1196 ali files carry field PF.
1197 * ali.ads: New field in type Unit_Record called Has_Finalizer. Add
1198 associated comment on field usage.
1199 * a-tags.adb (Get_RC_Offset): Removed.
1200 (Needs_Finalization): New routine.
1201 * a-tags.ads: Update the structure of the GNAT dispatch tables.
1202 Dispatch tables now carry field Needs_Finalization which provides
1203 runtime indication whether a type is controlled or has controlled
1204 components or both. Remove field RC_Offset.
1205 (Get_RC_Offset): Removed along with its associated pragma Export.
1206 Since tagged types with controlled components no longer carry hidden
1207 field _controller, the special mechanism to retrieve its location is no
1209 (Needs_Finalization): New routine.
1210 * atree.ads, atree.adb (Elist24): New routine.
1211 (Set_Elist24): New routine.
1212 * atree.h: Add a define clause for Elist24.
1213 * bindgen.adb New library-level variable Lib_Final_Built.
1214 (Gen_Adafinal_Ada): Reimplemented. Depending on the restrictions or the
1215 presence of a VM target, the routine generates calls to the proper
1216 library finalization routine.
1217 (Gen_Adainit_Ada): Import Finalize_Library_Objects only on non-VM
1218 targets. Set the correct library finalization routine depending on
1219 whether the library has controlled objects or this is a VM compilation.
1220 (Gen_Finalize_Library_Ada): New routine. This procedure generates calls
1221 to library-level finalizers of compiled units in reverse order of
1222 elaboration. It also produces exception management code and reraises a
1223 potential exception after all units have been finalized.
1224 (Gen_Finalize_Library_C): New routine. This procedure generates calls to
1225 library-level finalizers of compiled units in reverse order of
1227 (Gen_Finalize_Library_Defs_C): New routine. This procedure generates the
1228 definitions of all library-level finalizers available to the compilation
1229 (Gen_Main_Ada): Directly call Adafinal which now contails all target
1231 (Gen_Main_C): Add new local constant Needs_Library_Finalization. Call
1232 System.Standard_Library.Adafinal directly. If the library needs
1233 finalization actions, create the sequence of finalization calls.
1234 (Gen_Output_File_Ada): Alphabetize local variables and constants.
1235 Generate a with clause for System.Soft_Links when compiling for a VM.
1236 Remove the code which imports System.Standard_Library.Adafinal as
1237 Do_Finalize. Generate the library finalization routine.
1238 (Gen_Output_File_C): Add new local constant Needs_Library_Finalization.
1239 If the library needs finalization actions, create all the definitions
1240 of library- level finalizers.
1241 (Has_Finalizer): New routine. Determines whether at least one compiled
1242 unit has a library-level finalizer.
1243 Add type Qualification_Mode.
1244 (Set_Unit_Name): Add a formal which controls the replacement of a dot.
1245 * einfo.adb: New usage of field 15 as Return_Flag.
1246 Remove Finalization_Chain_Entity from the usages of field 19.
1247 Remove Associated_Final_Chain from the usages of field 23.
1248 New usage of field 23 as Associated_Collection.
1249 New usage of field 24 as Finalizer.
1250 New usage of flag 252 as Is_Processed_Transient.
1251 (Associated_Final_Chain): Removed.
1252 (Associated_Collection): New routine.
1253 (Finalization_Chain_Entity): Removed.
1254 (Finalizer): New routine.
1255 (Is_Finalizer): New routine.
1256 (Is_Processed_Transient): New routine.
1257 (Return_Flag): New routine.
1258 (Set_Associated_Final_Chain): Removed.
1259 (Set_Associated_Collection): New routine.
1260 (Set_Finalization_Chain_Entity): Removed.
1261 (Set_Finalizer): New routine.
1262 (Set_Is_Processed_Transient): New routine.
1263 (Set_Return_Flag): New routine.
1264 (Write_Entity_Flags): Include Is_Processed_Transient to the list of
1266 (Write_Field8_Name): Alphabetize the output.
1267 (Write_Field11_Name): Alphabetize the output.
1268 (Write_Field12_Name): Alphabetize the output.
1269 (Write_Field13_Name): Alphabetize the output.
1270 (Write_Field14_Name): Alphabetize the output.
1271 (Write_Field15_Name): Alphabetize the output.
1272 (Write_Field16_Name): Alphabetize the output.
1273 (Write_Field17_Name): Alphabetize the output.
1274 (Write_Field18_Name): Alphabetize the output.
1275 (Write_Field19_Name): Alphabetize the output. Remove the output of
1276 Finalization_Chain_Entity.
1277 (Write_Field20_Name): Alphabetize the output.
1278 (Write_Field21_Name): Alphabetize the output.
1279 (Write_Field22_Name): Alphabetize the output.
1280 (Write_Field23_Name): Alphabetize the output. Remove the output of
1281 Associated_Final_Chain. Add output for Associated_Collection.
1282 (Write_Field24_Name): Alphabetize the output.
1283 (Write_Field25_Name): Add output for Finalizer.
1284 (Write_Field26_Name): Alphabetize the output.
1285 (Write_Field27_Name): Alphabetize the output.
1286 (Write_Field28_Name): Alphabetize the output.
1287 * einfo.ads: Add new field description for Associated_Collection and
1289 Remove Associated_Final_Chain and its uses in nodes.
1290 Remove Finalization_Chain_Entity and its uses in nodes.
1291 Add new field description for Finalizer and its uses in nodes.
1292 Add new synthesized attribute Is_Finalizer.
1293 Add new flag description for Is_Processed_Transient and its uses in
1295 Add new field description for Return_Flag and its uses in nodes.
1296 (Associated_Final_Chain): Removed along with its pragma Inline.
1297 (Associated_Collection): New routine and pragma Inline.
1298 (Finalization_Chain_Entity): Removed along with its pragma Inline.
1299 (Finalizer): New routine and pragma Inline.
1300 (Is_Finalizer): New routine and pragma Inline.
1301 (Is_Processed_Transient): New routine and pragma Inline.
1302 (Return_Flag): New routine and pragma Inline.
1303 (Set_Associated_Final_Chain): Removed along with its pragma Inline.
1304 (Set_Associated_Collection): New routine and pragma Inline.
1305 (Set_Finalization_Chain_Entity): Removed along with its pragma Inline.
1306 (Set_Finalizer): New routine and pragma Inline.
1307 (Set_Is_Processed_Transient): New routine and pragma Inline.
1308 (Set_Return_Flag): New routine and pragma Inline.
1309 * exp_aggr.adb: Alphabetize subprograms.
1310 (Build_Array_Aggr_Code): Remove formal Flist and its associated comment.
1311 (Build_Record_Aggr_Code): Remove formals Flist and Obj along with their
1312 associated comments. Remove local variables External_Final_List and
1314 Rename Ctrl_Stuff_Done to Finalization_Done. Rename local variable A to
1315 Ancestor. Remove the retrieval of finalization lists. Update the call to
1317 (Convert_Aggr_In_Allocator): Remove the retrieval of finalization
1318 lists. Update the call to Late_Expansion.
1319 (Convert_Aggr_In_Assignment): Update the call to Late_Expansion.
1320 (Convert_Aggr_In_Object_Decl): Update the call to Late_Expansion.
1321 (Gen_Assign): Remove the retrieval of the finalization list used to
1322 build the assignment. Update the calls to Make_Init_Call and
1324 (Gen_Ctrl_Actions_For_Aggr): Renamed to Generate_Finalization_Actions.
1325 Remove the mechanism to determine attachment levels and finalization
1326 list retrieval. Remove the processing for coextensions.
1327 (Init_Controller): Removed. Controllers no longer exist.
1328 (Late_Expansion): Remove formals Flist and Obj along with their
1329 associated comments. Update the calls to Build_Record_Aggr_Code and
1330 Build_Array_Aggr_Code.
1331 * exp_ch13.adb (Expand_N_Free_Statement): New routine.
1332 (Expand_N_Freeze_Entity): Add special processing for finalizers which
1333 appear in entry bodies, protected subprograms and task bodies.
1334 * exp_ch13.ads (Expand_N_Free_Statement): New routine.
1335 * exp_ch3.adb (Add_Final_Chain): Removed.
1336 (Build_Array_Init_Proc): Alphabetize local variables.
1337 (Build_Assignment): Alphabetize local variables. Update the call to
1339 (Build_Class_Wide_Master): Rename local variables to better reflect
1341 (Build_Discriminant_Assignments): Code reformatting.
1342 (Build_Init_Call_Thru): Code reformatting.
1343 (Build_Init_Procedure): Code reformatting. Generate a special version
1344 of Deep_Finalize which is capable of finalizing all initialized
1345 components and ignore the rest.
1346 (Build_Init_Statements): Rename local variables to better reflect their
1348 Reimplement the mechanism to include the creation and update of an index
1349 variable called a "counter". It is used as a bookmark for tracing
1350 initialized and non-initialized components.
1351 (Build_Initialization_Call): Remove local variable Controller_Typ.
1352 Alphabetize all local variables. Remove the initialization of the
1353 record controller and update the call to Make_Init_Call.
1354 (Build_Record_Init_Proc): Rename formal Pe to Rec_Ent.
1355 New local variable Counter.
1356 (Constrain_Array): Alphabetize.
1357 (Expand_Freeze_Array_Type): Create a collection instead of a
1359 (Expand_Freeze_Class_Wide_Type): New routine. Creates TSS primitive
1360 Finalize_Address which is used in conjunction with allocated controlled
1362 (Expand_N_Object_Declaration): Remove the creation of a finalization
1363 list for anonymous access types. Update the calls to Make_Init_Call and
1365 (Expand_Freeze_Record_Type): Remove local variable Flist. Remove the
1366 retrieval of finalization lists. Remove the expansion of the record
1367 controller. Create TSS primitive Finalize_Address used in conjunction
1368 with controlled objects on the heap. Create finalization collections
1369 for access-to-controlled record components.
1370 (Expand_Record_Controller): Removed.
1371 (Freeze_Type): Remove the freezing of record controllers. Freezing of
1372 class-wide types now requires additional processing. Create
1373 finalization collections for access-to-controlled types.
1374 (Increment_Counter): New routine.
1375 (Make_Counter): New routine.
1376 (Make_Eq_If): Remove the mention of Name_uController.
1377 (Make_Predefined_Primitive_Specs): There is no longer need to skip
1378 types coming from System.Finalization_Root.
1379 (Predef_Deep_Spec): Reimplemented to reflect the new parameter profiles.
1380 (Predefined_Primitive_Bodies): There is no longer need to skip types
1381 coming from System.Finalization_Root.
1382 (Stream_Operation_OK): Do not generate stream routines for
1383 type Ada.Finalization.Heap_Management.Finalization_Collection.
1384 * exp_ch3.ads: Alphabetize subprograms.
1385 * exp_ch4.adb: Remove with and use clause for Sem_Ch8.
1386 Add with and use clause for Lib.
1387 (Complete_Coextension_Finalization): Removed.
1388 (Complete_Controlled_Allocation): New routine. Create a finalization
1389 collection for anonymous access-to-controlled types. Create a custom
1390 Allocate which interfaces with the back end and the machinery in
1392 (Expand_Allocator_Expression): Add necessary calls to
1393 Complete_Controlled_Allocation. Remove the retrieval of finalization
1394 lists. Update the calls to Make_Adjust_Call. Generate a call to
1395 Ada.Finalization.Heap_Management.Set_Finalize_Address_Ptr to decorate
1396 the associated collection.
1397 (Expand_N_Allocator): Remove the processing for dynamic coextensions.
1398 Code clean up. Remove the retrieval of finalization lists and
1400 Update the call to Make_Init_Call. Generate a call to
1401 Ada.Finalization.Heap_Management.Set_Finalize_Address_Ptr to decorate
1402 the associated collection.
1403 (Get_Allocator_Final_List): Removed. Finalization lists are not
1405 (Suitable_Element): Remove the mention of Name_uController.
1406 * exp_ch5.adb: Remove with and use clauses for Ttypes and Uintp.
1407 (Make_Tag_Ctrl_Assignment): Rewritten to simply do a finalization of
1408 the left hand side, carry out the assignment and adjust the left hand
1410 * exp_ch6.adb (Add_Final_List_Actual_To_Build_In_Place_Call): Removed.
1411 (Add_Collection_Actual_To_Build_In_Place_Call): New routine.
1412 (BIP_Formal_Suffix): Rename BIP_Final_List and BIPfinallist to
1413 BIP_Collection and BIPcollection.
1414 (Build_Heap_Allocator): New routine used to allocate the return object
1415 of a build-in-place function onto a collection.
1416 (Expand_Ctrl_Function_Call): Moved from Exp_Ch7.
1417 (Expand_Call): Do not replace direct calls to Deep routines with their
1419 (Expand_N_Extended_Return_Statement): Give all variables shorter names
1420 and update their occurrences. Add a special return flag to monitor the
1421 [ab]normal execution of the function. The flag is set right before the
1423 Rewrite the mechanism used to allocate a build-in-place return object
1424 on the heap or on a storage pool.
1425 (Is_Direct_Deep_Call): New routine.
1426 (Make_Build_In_Place_Call_In_Allocator): Add a collection to a
1427 build-in-place function call instead of a final list. Build a call to
1428 Set_Finalize_Address_Ptr to decorate the associated collection.
1429 (Make_Build_In_Place_Call_In_Anonymous_Context): Create a temporary in
1430 order to name the build-in-place function call's result for later
1431 finalization. Add a collection to a build-in-place function call
1432 instead of a final list.
1433 (Make_Build_In_Place_Call_In_Assignment): Add a collection to a
1434 build-in-place function call instead of a final list. Remove the code
1435 which moves one final list and transforms it into the actual in a
1436 nested build-in-place call.
1437 (Make_Build_In_Place_Call_In_Object_Declaration): Add a collection to a
1438 build-in-place function call instead of a final list.
1439 (Move_Final_List): Removed.
1440 (Needs_BIP_Collection): New routine.
1441 (Needs_BIP_Final_List): Removed.
1442 * exp_ch6.ads: Replace BIP_Final_List with BIP_Collection in
1443 enumeration type BIP_Formal_Kind.
1444 Update the related comment.
1445 (Needs_BIP_Collection): New routine.
1446 (Needs_BIP_Final_List): Removed.
1447 * exp_ch7.adb: Add with and use clauses for Elists, Exp_Ch6, Stringt
1448 and Ttypes. Remove with and use clauses for Sem_Type. Alphabetize the
1449 majority of subprograms in this unit. Add Name_Finalize_Address to
1450 array Name_Of and TSS_Finalize_Address to array Deep_Name_Of.
1451 (Build_Adjust_Or_Finalize_Statements): Create the adjust or finalization
1452 statements for an array type.
1453 (Build_Adjust_Statements): Create the adjust statements for a record
1455 (Build_Cleanup_Statements): New routine. A procedure which given any
1456 construct containing asynchronous calls, references to _master, or is a
1457 task body, a task allocation or a protected body produces the necessary
1458 runtime calls to clean up these constructs.
1459 (Build_Exception_Handler): New routine.
1460 (Build_Final_List): Removed.
1461 (Build_Finalization_Collection): New routine. A core procedure which
1462 creates a collection to service heap allocated controlled objects
1463 associated with an access-to-controlled type.
1464 (Build_Finalize_Statements): Create the finalization statements for a
1466 (Build_Finalizer): New routine. A core procedure which given any
1467 construct with declarations and/or statements detects all objects which
1468 need any type of clean up (controlled objects, protected objects) and
1469 generates all necessary code to clean up the said objects in the proper
1471 (Build_Finalizer_Call): New routine.
1472 (Build_Initialize_Statements): Create the initialization statements for
1473 an array type. The generated routine contains code to finalize partially
1475 (Build_Object_Declarations): New routine.
1476 (Build_Raise_Statement): New routine.
1477 (Clean_Simple_Protected_Objects): Removed.
1478 (Controller_Component): Removed.
1479 (Enclosing_Function): New routine.
1480 (Expand_Cleanup_Actions): Create a finalizer for a construct which has
1481 either declarations or statements or both.
1482 (Expand_N_Package_Body): Create a finalizer for a non-generic package.
1483 (Expand_N_Package_Declaration): Create a finalizer for a non-generic
1485 (Find_Final_List): Removed.
1486 (Global_Flist_Ref): Removed.
1487 (In_Finalization_Root): Removed.
1488 (Insert_Actions_In_Scope_Around): Determine the range of the transient
1489 scope in terms of tree nodes. Process all transient variables within
1491 (Make_Adjust_Call): Rewritten. There is no longer an attach call
1492 generated after the adjust.
1493 (Make_Attach_Call): Removed.
1494 (Make_Call): New routine.
1495 (Make_Clean): Removed.
1496 (Make_Deep_Array_Body): Rewritten to simply invoke the appropriate
1498 (Make_Deep_Proc): Rewritten to generate the new profile signature used
1500 (Make_Deep_Record_Body): Rewritten to simply invoke the appropriate
1502 (Make_Final_Call): Modified to simply create a call to either
1503 Deep_Finalize or Finalize.
1504 (Make_Finalize_Address_Body): New routine.
1505 (Make_Finalize_Address_Stmts): New routine. A function which produces
1506 TSS primitive Finalize_Address used in conjunction with heap allocated
1508 (Make_Handler_For_Ctrl_Operation): Add specialized code for .NET/JVM.
1509 (Make_Init_Call): Rewritten. There is no longer an attach call
1510 generated after initialization.
1511 (Make_Local_Deep_Finalize): New routine.
1512 (Make_Set_Finalize_Address_Ptr_Call): New routine.
1513 (Make_Transient_Block): Remove the finalization list retrieval and
1515 (Needs_Finalization): Moved to Exp_Util.
1516 (Parent_Field_Type): New routine.
1517 (Preprocess_Components): New routine.
1518 (Process_Transient_Objects): New routine.
1519 (Wrap_HSS_In_Block): New routine.
1520 (Wrap_Transient_Declaration): Remove finalization list management and
1521 controller insertion.
1522 (Wrap_Transient_Expression): Code reformatting.
1523 (Wrap_Transient_Statement): Code reformatting.
1524 * exp_ch7.ads (Build_Final_List): Removed.
1525 (Build_Finalization_Collection): New routine.
1526 (Build_Raise_Statement): New routine.
1527 (Controller_Component): Removed.
1528 (Expand_Ctrl_Function_Call): Moved to Exp_Ch6.
1529 (Find_Final_List): Removed.
1530 (In_Finalization_Root): Removed.
1531 (Is_Simple_Protected_Type): Update related comment.
1532 (Make_Adjust_Call): New parameter profile and associated comments.
1533 (Make_Attach_Call): Removed.
1534 (Make_Final_Call): New parameter profile and associated comments.
1535 (Make_Finalize_Address_Body): New routine.
1536 (Make_Init_Call): New parameter profile and associated comments.
1537 (Make_Local_Deep_Finalize): New routine.
1538 (Make_Set_Finalize_Address_Ptr_Call): New routine.
1539 (Needs_Finalization): Moved to Exp_Util.
1540 * exp_ch9.adb (Add_Object_Pointer): Code reformatting.
1541 (Expand_N_Protected_Body): Remove the handling of finalization lists.
1542 (Find_Protection_Type): Moved to Exp_Util.
1543 * exp_disp.adb: Remove with and use clauses for Exp_Ch7.
1544 (Make_DT): Update sequence of dispatch table initialization. Remove the
1545 initialization of field RC_Offset. Add initialization of field Needs_
1547 * exp_intr.adb (Expand_Unc_Deallocation): Code reformatting.
1548 Reimplement how an object is first finalized, then deallocated.
1549 * exp_strm.adb (Build_Record_Or_Elementary_Input_Function):
1551 * exp_tss.ads: Add special suffix for TSS primitive Finalize_Address.
1552 Register TSS_Finalize_Address with type TSS_Names.
1553 * exp_util.adb (Build_Allocate_Deallocate_Proc): New routine. This core
1554 procedure provides the interface between an allocation / deallocation
1555 and the support machinery in Ada.Finalization.Heap_Management.
1556 (Find_Init_Call): Code reformatting.
1557 (Find_Init_Call_In_List): Code reformatting.
1558 (Find_Protection_Type): Moved from Exp_Ch9.
1559 (Find_Prim_Op): Reimplement to add preference of recovered primitive.
1560 (Has_Controlled_Coextensions): Removed.
1561 (Has_Controlled_Objects): New routine.
1562 (In_Library_Level_Package_Body): New routine.
1563 (Insert_Action_After): New routine.
1564 (Is_Finalizable_Transient): New routine. This predicate determines
1565 whether an object declaration is one of the many variants of controlled
1567 (Is_Null_Access_BIP_Func_Call): New routine.
1568 (Is_Non_BIP_Func_Call): New routine.
1569 (Is_Related_To_Func_Return): New routine.
1570 (Needs_Finalization): Moved from Exp_Ch7.
1571 * exp_util.ads (Build_Allocate_Deallocate_Proc): New routine.
1572 (Find_Protection_Type): Moved from Exp_Ch9.
1573 (Has_Controlled_Coextensions): Removed.
1574 (Has_Controlled_Objects): New routine.
1575 (In_Library_Level_Package_Body): New routine.
1576 (Insert_Action_After): New routine.
1577 (Is_Finalizable_Transient): New routine.
1578 (Is_Null_Access_BIP_Func_Call): New routine.
1579 (Is_Non_BIP_Func_Call): New routine.
1580 (Is_Related_To_Func_Return): New routine.
1581 (Needs_Finalization): Moved from Exp_ch7.
1582 * expander.adb (Expand): Add a case for N_Free_Statement.
1583 * freeze.adb (Freeze_All): Replace the generation of a finalization
1584 list with a collection for access-to-controlled types.
1585 (Freeze_Entity): Code reformatting.
1586 (Freeze_Record_Type): Remove the freezing of a record controller
1588 (Freeze_Subprogram): Code reformatting.
1589 * inline.adb (Cleanup_Scopes): Remove the reset of the scope
1591 * lib-writ.adb (Write_Unit_Information): Output "PF" when a package
1592 has a library-level finalizer.
1593 * lib-writ.ads: Add "PF" to the sequence of unit attributes.
1594 * a-filico.ads, a-filico.adb, s-finimp.ads, s-finimp.adb: Removed.
1595 * Makefile.rtl: Remove a-filico and s-finimp from the list of object
1596 files. Add a-fihema to the list of object files.
1598 Alphabetize the associations in type Is_Parameterless_Attribute.
1599 * rtsfind.ads: Ada.Finalization_List.Controller and
1600 System.Finalization_Implementation are no longer a GNAT unit.
1601 Update the range of type Ada_Finalization_Child. Remove the following
1602 recoverable entities:
1604 RE_Attach_To_Final_List
1608 RE_Finalizable_Ptr_Ptr
1609 RE_Global_Final_List
1610 RE_Limited_Record_Controller
1613 RE_Record_Controller
1614 RE_Simple_List_Controller
1616 Add the following recoverable entities:
1618 RE_Add_Offset_To_Address
1622 RE_Exception_Identity
1623 RE_Finalization_Collection
1624 RE_Finalization_Collection_Ptr
1625 RE_Needs_Finalization
1626 RE_Save_Library_Occurrence
1627 RE_Set_Finalize_Address_Ptr
1628 RE_Set_Storage_Pool_Ptr
1630 * sem_aggr.adb (Resolve_Record_Aggregate): Remove mention of
1632 * sem_aux.adb (First_Discriminant): Remove mention of Name_uController.
1633 (First_Stored_Discriminant): Remove the mention of Name_uController.
1634 * sem_aux.ads: Comment reformatting.
1635 * sem_ch10.adb (Build_Chain): Signal the class-wide creation machinery
1636 to redecorate an already existing class-wide type.
1637 (Decorate_Tagged_Type): New parameter profile and associated comment.
1638 Create a "shadow class-wide type" for a shadow entity.
1639 * sem_ch11.adb (Analyze_Exception_Handlers): Remove the dubious setting
1640 of the final chain along with the associated comment.
1641 * sem_ch3.adb (Access_Type_Declaration): Add new local variable
1642 Full_Desig and set it to the full view of the designated type.
1643 Initialize the finalization collection to empty.
1644 (Build_Derived_Record_Type): Alphabetize local variables. Code
1646 (Collect_Fixed_Components): Remove the mention of Name_uController.
1647 (Create_Constrained_Components): Remove the mention of Name_uController.
1648 (Make_Class_Wide_Type): Add specialized code to redecorate an existing
1649 class-wide type of a shadow entity.
1650 (Process_Full_View): Update the machinery which marks type
1651 Limited_Controlled's entity as limited.
1652 * sem_ch4.adb (Analyze_One_Call): Code reformatting.
1653 * sem_ch6.adb (Create_Extra_Formals): Do not generate a finalization
1654 list, instead make a collection build-in-place formal.
1655 * sem_ch8.adb (Analyze_Object_Renaming): Look at the available view of
1656 a designated type in order to establish a match between the renaming
1657 and the renamed entity.
1658 (Find_Selected_Component): Add guard to prevent spurious exceptions
1659 from being raised on .NET/JVM.
1660 * sem_disp.adb (Check_Dispatching_Operation): Include Finalize_Address
1661 to the list of primitive that need special processing. Update arrays
1662 C_Names and D_Names.
1663 (Replace_Types): Handle class-wide types.
1664 * sem_elab.adb (Check_A_Call): Since Deep_Initialize now has a
1665 different parameter profile, look at the first formal.
1666 * sem_prag.adb: Remove with and use clauses for Exp_Ch7. Add with and
1667 use clauses for Exp_Util.
1668 * sem_res.adb: Remove with and use clauses for Elists.
1669 (Propagate_Coextensions): Removed.
1670 (Resolve_Allocator): Do not propagate the list of coextensions from one
1671 allocator to another.
1672 * sem_util.adb (Build_Actual_Subtype_Of_Component): Rename variable
1673 Deaccessed_T to Desig_Typ.
1674 (Enter_Name): Remove the mention of Name_uController.
1675 (Gather_Components): Remove the mention of Name_uController.
1676 (Incomplete_Or_Private_View): New routine.
1677 (Is_Coextension_Root): Removed.
1678 (Is_Fully_Initialized_Type): Remove the mention of Name_uController.
1679 * sem_util.ads (Incomplete_Or_Private_View): New routine.
1680 (Is_Coextension_Root): Removed.
1681 * s-finroo.ads: Remove with clause for Ada.Unchecked_Conversion.
1682 Controlled types are now derived from a null tagged record. Remove
1683 types Finalizable_Ptr, Finalizable and Empty_Root_Controlled.
1684 * sinfo.adb (Coextensions): Removed.
1685 (Set_Coextensions): Removed.
1686 * sinfo.ads: Remove Coextensions from the explanation of node fields
1687 and its uses in nodes.
1688 Update the field usage of N_Allocator.
1689 (Coextensions): Removed along with its pragma Inline.
1690 (Set_Coextensions): Removed along with its pragma Inline.
1691 * snames.ads-tmpl: Remove names
1696 Name_uLocal_Final_List
1697 Name_Finalization_Root
1704 Name_Finalize_Address
1705 * s-pooglo.adb (Allocate): Add overriding indicator.
1706 (Deallocate): Add overriding indicator.
1707 (Storage_Size): Add overriding indicator.
1708 * s-soflin.adb (Adafinal_NT): Invoke Finalize_Library_Objects rather
1709 than Finalize_Global_List.
1710 (Null_Finalize_Global_List): Removed.
1711 (Save_Library_Occurrence): New routine.
1712 * s-soflin.ads: Remove variable Finalize_Global_List along with its
1713 initialization. Add variable Finalize_Library_Objects along with its
1714 pragma Export. Add variables Library_Exception and
1715 Library_Exception_Set along with their pragma Export.
1716 (Null_Finalize_Global_List): Removed.
1717 (Save_Library_Occurrence): New routine.
1718 * s-tassta.adb (Finalize_Global_Tasks): Call Finalize_Library_Objects
1719 rather than Finalize_Global_List.
1720 * tbuild.adb (Unchecked_Convert_To): Capture and set the parent field
1721 of the constructed node.
1723 2011-08-03 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
1725 * link.c: Include "auto-host.h" before system headers.
1727 2011-08-03 Vincent Celier <celier@adacore.com>
1729 * make.adb (Gnatmake): Add to table Library_Projs only library projects
1730 that are not extended. Do not check if a library project that is
1731 extended should be regenerated. Do not add to table Library_Paths the
1732 libraries that are in extended projects. Link only with libraries that
1733 are in libray projects that are not extended.
1734 * prj-nmsc.adb (Check_Library_Attributes): Do not reset flag Library
1735 for a library project that is extended.
1737 2011-08-03 Gary Dismukes <dismukes@adacore.com>
1739 * sem_ch6.adb (Find_Corresponding_Spec): When in an instance, skip
1740 conforming subprogram renamings that appear to be completions if they
1741 are not fully conformant.
1742 Such renamings are homographs but not completions.
1743 * sem_type.adb (Disambiguate): Handle disambiguation of overloaded
1744 names in a subprogram renaming that appears in an instance.
1746 2011-08-03 Ed Schonberg <schonberg@adacore.com>
1748 * exp_util.adb (Expand_Subtype_From_Expr): if the type is limited but
1749 not immutably limited, build actual subtype from expression to provide
1750 proper bounds to caller.
1752 2011-08-03 Gary Dismukes <dismukes@adacore.com>
1754 * sem_ch8.adb: Minor comment correction.
1756 2011-08-03 Thomas Quinot <quinot@adacore.com>
1758 * exp_strm.adb (Build_Array_Input_Function): In Ada 2005 mode, when
1759 returning a limited array, use an extended return statement.
1761 2011-08-03 Vincent Celier <celier@adacore.com>
1763 * make.adb (Initialize): If --subdirs= is used, but no project file is
1764 specified, attempt to create the specify subdir if it does not already
1765 exist and use it as the object directory as if -D had been specified.
1767 2011-08-03 Arnaud Charlet <charlet@adacore.com>
1769 * s-tpopsp-vms.adb: New file.
1770 * s-taprop-vms.adb: Put back ATCB_Key, since needed by this file on VMS.
1771 * gcc-interfaces/Makefile.in: Use s-taprop-vms.adb on VMS.
1773 2011-08-03 Emmanuel Briot <briot@adacore.com>
1775 * make.adb, makeutl.adb, makeutl.ads, clean.adb (Makeutl.Queue): new
1778 2011-08-03 Yannick Moy <moy@adacore.com>
1780 * cstand.adb (Create_Standard): select Universal_Integer as an ALFA type
1781 * sem_ch3.adb (Array_Type_Declaration): detect array types in ALFA
1782 * sem_util.adb, sem_util.ads (Has_Static_Array_Bounds): new function to
1783 detect that an array has static bounds.
1785 2011-08-03 Thomas Quinot <quinot@adacore.com>
1787 * exp_dist.adb: Minor reformatting.
1789 2011-08-03 Arnaud Charlet <charlet@adacore.com>
1791 * s-taprop-irix.adb, s-taprop-hpux-dce.adb, s-taprop-vms.adb
1792 (ATCB_Key): Removed, not always used.
1794 2011-08-03 Emmanuel Briot <briot@adacore.com>
1796 * gnatcmd.adb, make.adb, prj.adb, prj.ads, makeutl.adb, makeutl.ads,
1797 clean.adb, prj-conf.adb, prj-env.adb, prj-env.ads (Makeutl): remove
1798 most remaining global variables.
1800 2011-08-03 Robert Dewar <dewar@adacore.com>
1802 * gnatcmd.adb, prj-proc.adb, mlib-prj.adb, prj.adb, makeutl.ads,
1803 prj-util.adb, prj-util.ads, prj-conf.adb, prj-env.adb: Minor
1806 2011-08-03 Javier Miranda <miranda@adacore.com>
1808 * exp_util.adb (Is_VM_By_Copy_Actual): Include N_Slide nodes as actuals
1809 that must be passed by copy in VM targets.
1811 2011-08-03 Emmanuel Briot <briot@adacore.com>
1813 * prj.ads, prj-nmsc.adb (Files_Htable): removed this htable, which
1814 duplicates a similar htable now in the project tree.
1816 2011-08-03 Claire Dross <dross@adacore.com>
1818 * a-cfdlli.adb, a-cfhama.adb, a-cfhase.adb, a-cforma.adb, a-cforse.adb,
1819 a-cofove.adb ("=", Length, Is_Empty, Clear, Assign, Copy, Element,
1820 Replace_Element, Query_Element, Update_Element, Move, Insert, Prepend,
1821 Append, Delete, Delete_First, Delete_Last, Reverse_Element, Swap,
1822 Splice, First, First_Element, Last, Last_Element, Next, Previous, Find,
1823 Reverse_Find, Contains, Has_Element, Iterate, Reverse_Iterate, Capacity,
1824 Reserve_Length, Length, Strict_Equal, Left, Right): Data-structure
1827 2011-08-03 Arnaud Charlet <charlet@adacore.com>
1829 * s-taprop-posix.adb, s-taprop-linux.adb, s-taprop-tru64.adb
1830 (ATCB_Key): Removed, not always used.
1831 * s-tpopsp-posix.adb, s-tpopsp-posix-foreign.adb (ATCB_Key): Moved from
1833 * s-tpopsp-tls.adb: New file.
1834 * gcc-interface/Makefile.in: Use TLS implementation of s-tpopsp.adb on
1835 x86/x64/ia64/powerpc/sparc Linux.
1837 2011-08-03 Arnaud Charlet <charlet@adacore.com>
1839 * system-aix.ads, system-aix64.ads: Set ZCX_By_Default to True.
1840 * gcc-interface/Makefile.in: Switch to ZCX by default on AIX ports.
1842 2011-08-03 Thomas Quinot <quinot@adacore.com>
1844 * rtsfind.ads, exp_dist.adb, exp_dist.ads
1845 (Build_From_Any_Call, Build_To_Any_Call, Build_TypeCode_Call):
1846 Fix type selection for mapping integer types to PolyORB types.
1848 2011-08-03 Bob Duff <duff@adacore.com>
1850 * sem_ch7.adb: Minor comment clarification.
1852 2011-08-03 Bob Duff <duff@adacore.com>
1854 * sem_ch13.adb (Analyze_Enumeration_Representation_Clause): If we get
1855 an error analyzing a choice, skip further processing. Further
1856 processing could cause a crash or cascade errors.
1858 2011-08-03 Emmanuel Briot <briot@adacore.com>
1860 * gnatcmd.adb, prj-proc.adb, prj-proc.ads, make.adb, mlib-prj.adb,
1861 prj.adb, prj.ads, makeutl.adb, makeutl.ads, clean.adb, prj-nmsc.adb,
1862 prj-util.adb, prj-util.ads, prj-conf.adb, prj-conf.ads, prj-env.adb,
1863 prj-env.ads (Shared_Project_Tree_Data): new type
1864 An aggregate project and its aggregated trees need to share the common
1865 data structures used for lists of strings, packages,... This makes the
1866 code simpler since otherwise we have to pass the root tree (also used
1867 for the configuration file data) in addition to the current project
1868 tree. This also avoids ambiguities as to which tree should be used.
1869 And finally this saves a bit of memory.
1870 (For_Every_Project_Imported): new parameter Tree.
1871 Since aggregated projects are using a different tree, we need to let
1872 the caller know which tree to use to manipulate the returned project.
1874 2011-08-03 Robert Dewar <dewar@adacore.com>
1876 * prj-proc.adb, exp_util.ads, exp_ch9.adb, make.adb, prj-ext.adb,
1877 prj-ext.ads, alfa.ads, sem_ch4.adb, makeutl.adb, makeutl.ads,
1878 lib-xref-alfa.adb, sem_cat.adb, exp_dist.adb, get_alfa.adb,
1879 prj-env.adb, prj-env.ads, prj-tree.adb, alfa.ads: Minor reformatting.
1881 2011-08-03 Javier Miranda <miranda@adacore.com>
1883 * exp_util.adb, sem_aux.adb, exp_util.ads, sem_aux.ads:
1884 Move routine Is_VM_By_Copy_Actual from sem_aux to exp_util.
1886 2011-08-03 Bob Duff <duff@adacore.com>
1888 * sem_ch8.adb (Is_Primitive_Operator_In_Use): Always check In_Use on
1891 2011-08-03 Joel Brobecker <brobecker@adacore.com brobecker>
1893 * g-sha256.ads, g-sha512.ads, g-sha1.ads, g-sha224.ads, g-sha384.ads,
1894 g-sehash.ads: Fix typo. Update header.
1896 2011-08-03 Thomas Quinot <quinot@adacore.com>
1898 * exp_ch6.adb (Expand_Actuals): Remove Ada_2005 guard on build-in-place
1901 2011-08-03 Gary Dismukes <dismukes@adacore.com>
1903 * sem_ch4.adb (Analyze_Overloaded_Selected_Component): Consider
1904 prefixes of private types along with records, since the selector may be
1906 * sem_res.adb (Resolve_Selected_Component): Consider prefixes of
1907 private types along with records, since the selector may be a
1910 2011-08-03 Emmanuel Briot <briot@adacore.com>
1912 * prj-pp.adb (Pretty_Print): remove trailing blank line in the file
1914 2011-08-03 Javier Miranda <miranda@adacore.com>
1916 * sem_aux.adb (Is_VM_By_Copy_Actual): Fix wrong use of
1917 Tagged_Type_Expansion.
1919 2011-08-03 Yannick Moy <moy@adacore.com>
1922 (Resolve_Op_Concat_Arg): do not issue a SPARK violation when argument of
1923 concatenation is the name of a constant
1925 2011-08-03 Emmanuel Briot <briot@adacore.com>
1927 * prj-proc.adb, prj-ext.adb, prj-ext.ads, prj-env.adb, prj-env.ads,
1928 prj-tree.adb, prj-tree.ads (Initialize_And_Copy, Copy): new subprograms
1929 (Process_Declarative_Items): new parameter Child_Env.
1931 2011-08-03 Yannick Moy <moy@adacore.com>
1933 * alfa.ads Update format of ALFA section in ALI file in order to add a
1934 mapping from bodies to specs when both are present
1935 (ALFA_Scope_Record): add components for spec file/scope
1936 * get_alfa.adb (Get_ALFA): read the new file/scope for spec when present
1938 (Collect_ALFA): after all scopes have been collected, fill in the spec
1939 information when relevant
1940 * put_alfa.adb (Put_ALFA): write the new file/scope for spec when
1943 2011-08-03 Eric Botcazou <ebotcazou@adacore.com>
1945 * inline.adb (Add_Inlined_Subprogram): Do not consider the enclosing
1946 code unit to decide whether to add internally generated subprograms.
1948 2011-08-03 Javier Miranda <miranda@adacore.com>
1950 * sem_aux.ads, sem_aux.adb (Is_VM_By_Copy_Actual): New subprogram.
1952 (Build_Simple_Entry_Call): Handle actuals that must be handled by copy
1955 2011-08-03 Emmanuel Briot <briot@adacore.com>
1957 * make.adb, makeutl.adb, makeutl.ads (Make.Switches_Of): now shares
1958 code with Makeutl.Get_Switches.
1959 * prj-tree.adb: Update comment.
1961 2011-08-03 Thomas Quinot <quinot@adacore.com>
1963 * sem_cat.adb (Validate_RCI_Subprogram_Declaration): Reject a remote
1964 subprogram with a limited formal that does not support external
1967 2011-08-03 Yannick Moy <moy@adacore.com>
1969 * get_alfa.adb (Get_ALFA): add missing Skip_Spaces at start of
1971 * lib-xref-alfa.adb (Add_ALFA_File): split removal of scopes that are
1972 not from current unit in two phases, because it is not possible to
1973 change the table while iterating over its content.
1974 * put_alfa.adb (Put_ALFA): reset current file/scope at each new entity
1976 2011-08-03 Sergey Rybin <rybin@adacore.com>
1978 * vms_data.ads: Add qualifier for gnatmetric --no-static-loop option
1979 * gnat_ugn.texi: Update description of complexity metrics (gnatmetric)
1981 2011-08-03 Ed Schonberg <schonberg@adacore.com>
1983 * sem_res.adb (Resolve_Op_Concat_Arg): if the argument is an aggregate
1984 and the component type is composite, this is ambiguous for predefined
1985 concatenation, but if the node is not overloaded and the entity is a use
1986 -defined function its profile can be used to resolve that aggregate.
1988 2011-08-03 Robert Dewar <dewar@adacore.com>
1990 * exp_ch4.adb: Minor code cleanup.
1992 2011-08-03 Thomas Quinot <quinot@adacore.com>
1994 * exp_dist.adb: Do not generate distribution stubs if serious errors
1995 have been diagnosed.
1997 2011-08-03 Ed Schonberg <schonberg@adacore.com>
1999 * sem_ch4.adb (Try_Primitive_Operation): when checking the validity of
2000 the first formal of a primitive operation, go to the base type to
2001 handle properly an access to a derived type with constrained
2003 * sem_type.adb (Disambiguate): an immediately visible operator hides a
2004 user-defined function that is only use-visible.
2006 2011-08-03 Robert Dewar <dewar@adacore.com>
2008 * sem_aggr.adb, sem_ch3.adb, lib.ads, gnatcmd.adb, prj-proc.adb,
2009 make.adb, lib-writ.adb, prj-part.adb, prj-part.ads, prj-ext.adb,
2010 fname-uf.adb, prj-ext.ads, prj.adb, prj.ads, sem_attr.adb, alfa.adb,
2011 prj-makr.adb, errout.adb, makeutl.adb, makeutl.ads, restrict.ads,
2012 sem_ch6.adb, g-pehage.adb, clean.adb, put_alfa.adb, lib-xref-alfa.adb,
2013 prj-nmsc.adb, prj-nmsc.ads, sem_ch8.adb, prj-pars.ads, exp_aggr.adb,
2014 prj-attr.ads, sem_ch13.adb, get_alfa.adb, prj-env.adb, prj-env.ads,
2015 alfa_test.adb, prj-tree.adb, prj-tree.ads, einfo.ads: Minor reformatting
2017 2011-08-03 Robert Dewar <dewar@adacore.com>
2019 * repinfo.adb (List_Mechanism): Add handling of
2020 Convention_Ada_Pass_By_XXX.
2021 * sem_mech.adb (Set_Mechanism): Ditto.
2022 * sem_prag.adb (Process_Convention): Add entries for
2023 Convention_Ada_Pass_By_XXX.
2024 * snames.adb-tmpl, snames.ads-tmpl: Ditto.
2026 2011-08-03 Pascal Obry <obry@adacore.com>
2028 * makeutl.adb: Minor reformatting.
2030 2011-08-03 Vincent Celier <celier@adacore.com>
2033 (Get_File_Name) If the file cannot be found when there are no config
2034 pragmas file and May_Fail is True, return No_File instead of the file
2035 name, to be consistent.
2037 2011-08-03 Pascal Obry <obry@adacore.com>
2039 * adaint.c (__gnat_is_executable_file_attr): Avoid access
2042 2011-08-03 Javier Miranda <miranda@adacore.com>
2045 (Same_Representation): In VM targets the representation of arrays with
2046 aliased components differs from arrays with non-aliased components.
2048 2011-08-03 Emmanuel Briot <briot@adacore.com>
2050 * prj-proc.adb, prj-attr.adb, prj-attr.ads (Get_Attribute_Index): do
2051 not systematically lower case attribute indexes that contain no "."
2052 Fix definition of several Naming attributes, which take
2053 a unit name as index and therefore should be case insensitive.
2054 Minor refactoring (reduce length of variable names).
2056 2011-08-03 Emmanuel Briot <briot@adacore.com>
2058 * makeutl.adb, makeutl.ads (Get_Switches): new subprogram.
2060 2011-08-03 Emmanuel Briot <briot@adacore.com>
2062 * gnatcmd.adb, prj-proc.adb, prj-proc.ads, make.adb, prj-part.adb,
2063 prj-part.ads, switch-m.adb, switch-m.ads, prj-makr.adb, clean.adb,
2064 prj-pars.adb, prj-pars.ads, prj-conf.adb, prj-conf.ads, prj-tree.adb,
2065 prj-tree.ads (Prj.Tree.Environment): new type.
2067 2011-08-03 Emmanuel Briot <briot@adacore.com>
2069 * prj-proc.adb, prj.ads, makeutl.adb, makeutl.ads, prj-conf.adb,
2070 prj-tree.adb, prj-tree.ads (Environment): new type.
2072 2011-08-03 Emmanuel Briot <briot@adacore.com>
2074 * prj-tree.ads: Remove unused variable.
2076 2011-08-03 Yannick Moy <moy@adacore.com>
2078 * restrict.adb (Restriction_Msg): set "SPARK" all in upper case for
2079 issuing messages related to SPARK restriction violation.
2081 2011-08-03 Ed Schonberg <schonberg@adacore.com>
2083 * sem_ch6.adb: guard against error nodes in return statements.
2085 2011-08-03 Arnaud Charlet <charlet@adacore.com>
2087 * errout.adb (Error_Msg_Internal): the main unit has not been read yet,
2088 a warning can only appear on a configuration file, so emit warning
2089 without further checks.
2091 2011-08-03 Arnaud Charlet <charlet@adacore.com>
2093 * s-interr.ads: add overriding keyword.
2095 2011-08-03 Geert Bosch <bosch@adacore.com>
2097 * exp_attr.adb: Fix minor typo.
2099 2011-08-03 Ed Schonberg <schonberg@adacore.com>
2101 * par-ch4.adb: improve error recovery.
2103 2011-08-03 Emmanuel Briot <briot@adacore.com>
2105 * prj-part.adb, prj-part.ads, prj-makr.adb, prj-pars.adb, prj-conf.adb,
2106 prj-env.adb (Prj.Part.Parse): change parameter Always_Errout_Finalize
2109 2011-08-03 Emmanuel Briot <briot@adacore.com>
2111 * prj-dect.adb (Parse_Attribute_Declaration): make sure we can use
2112 "external" as an attribute name in aggregate projects.
2114 2011-08-03 Jose Ruiz <ruiz@adacore.com>
2116 * s-taprop-vxworks.adb: (Create_Task, Initialize): Ada 2012 pragma CPU
2117 uses CPU numbers starting 1, while VxWorks uses CPU numbers starting
2118 from 0, so we need to adjust.
2120 2011-08-03 Emmanuel Briot <briot@adacore.com>
2122 * prj-proc.adb, prj-ext.adb, prj-ext.ads, makeutl.adb, prj-tree.adb,
2123 prj-tree.ads, gnatcmd.adb, clean.adb (External_References): new type.
2125 2011-08-03 Yannick Moy <moy@adacore.com>
2127 * sem_ch6.adb (New_Overloaded_Entity): only issue error for SPARK
2128 restriction on overloaded entity if the entity is not an operator.
2130 2011-08-03 Yannick Moy <moy@adacore.com>
2132 * sem_ch7.adb, sem_res.adb, sem_attr.adb, restrict.adb,
2133 restrict.ads: Rename remaining Check_Formal_Restriction* into
2134 Check_SPARK_Restriction*.
2136 2011-08-03 Emmanuel Briot <briot@adacore.com>
2138 * prj-proc.adb, prj-part.adb, prj.adb, prj.ads, prj-nmsc.adb,
2139 prj-nmsc.ads, prj-err.adb (Project_Data): now discriminated on its
2141 (Project_Empty): removed
2142 (Empty_Project): new parameter Qualifier
2143 This is used to have fields specific to aggregate projects, cleaner
2144 New field to store the list of aggregated projects.
2145 (Check_Aggregate_Project): removed
2146 (Process_Aggregated_Projects, Free): new subprograms.
2148 2011-08-03 Olivier Hainque <hainque@adacore.com>
2150 * tracebak.c (STOP_FRAME ppc AIX): Stop at null return address as well.
2152 2011-08-03 Ed Schonberg <schonberg@adacore.com>
2154 * sem_ch8.adb (Analyze_Object_Renaming): if the renamed object is an
2155 explicit dereference of an unconstrained type, create a constrained
2156 subtype for it, as is done for function calls that return an
2159 2011-08-03 Thomas Quinot <quinot@adacore.com>
2161 * g-pehage.adb (Finalize): Avoid possible double-free.
2163 2011-08-03 Steve Baird <baird@adacore.com>
2165 * exp_attr.adb (Expand_N_Attribute_Reference): Don't expand
2166 Elab_Spec/Body attrs in CodePeer_Mode.
2168 2011-08-03 Javier Miranda <miranda@adacore.com>
2170 * exp_aggr.adb (Flatten): Convert to positional form aggregates whose
2171 low bound is not known at compile time but they have no others choice.
2172 Done because in this case the bounds can be obtained directly from the
2175 2011-08-03 Ed Falis <falis@adacore.com>
2177 * s-tasinf-vxworks.ads: Update comment to reflect 0 indexing of CPUs
2178 on VxWorks SMP. Remove unusable constant ANY_CPU.
2180 2011-08-03 Emmanuel Briot <briot@adacore.com>
2182 * gnatcmd.adb, make.adb, prj-part.adb, prj-part.ads, prj-makr.adb,
2183 clean.adb, prj-nmsc.adb, prj-pars.adb, prj-conf.adb, prj-env.adb,
2184 prj-env.ads (Prj.Env.Initialize_Default_Project_Path,
2185 Prj.Env.Initialize_Empty): new subprograms
2186 (Get_Env, Find_Project): remove parameter Target_Name.
2188 2011-08-03 Gary Dismukes <dismukes@adacore.com>
2190 * sem_ch3.adb (Build_Derived_Record_Type): Test the Derive_Subps formal
2191 as a condition for the delayed call to Derived_Subprograms done for the
2192 case of the rewriting of a derived type that constrains the
2193 discriminants of its parent type.
2194 Avoids redundant subprogram derivations for private subtype derivations.
2196 2011-08-03 Javier Miranda <miranda@adacore.com>
2198 * exp_aggr.adb (Init_Hidden_Discriminants): New subprogram of
2199 Build_Record_Aggr_Code.
2200 (Build_Record_Aggr_Code): Add missing support to initialize hidden
2201 discriminants in extension aggregates.
2203 2011-08-03 Emmanuel Briot <briot@adacore.com>
2205 * prj-pp.adb (Print): also output project qualifiers, since in
2206 particular "aggregate" is mandatory in an aggregate project.
2208 2011-08-03 Emmanuel Briot <briot@adacore.com>
2210 * prj-part.adb, prj.adb, prj.ads, prj-nmsc.adb, prj-env.adb:
2211 (Debug_Output): new function.
2213 2011-08-03 Eric Botcazou <ebotcazou@adacore.com>
2215 * gnat_ugn.texi: Document -Wstack-usage.
2216 * gcc-interface/misc.c (enumerate_modes): Add guard for ghost FP modes.
2218 2011-08-03 Thomas Quinot <quinot@adacore.com>
2220 * sem_prag.adb Issue an error (not a warning) when a C++ type does not
2221 have keyword LIMITED.
2223 2011-08-03 Yannick Moy <moy@adacore.com>
2225 * alfa.adb, alfa.ads, alfa_test.adb: New files.
2226 * ali.adb (Known_ALI_Lines): add 'C' lines (SCO) and 'F' lines (ALFA)
2227 (Scan_ALI): do not issue a fatal error if parsing known lines after Xref
2228 section (does not happen in compiler, only if code directly calls
2230 * get_alfa.adb, get_alfa.ads: New files.
2231 * lib-writ.adb, lib-writ.ads (Write_ALI): output ALFA information if
2233 * lib-xref-alfa.adb: New file.
2234 * lib-xref.adb, lib-xref.ads
2235 (Xref_Entry): redefine information needed in cross-references for ALFA.
2236 Push ALFA treatments in separated local package.
2237 (Enclosing_Subpragram_Or_Package): treat specially subprogram
2238 identifiers. Return entity of package body instead of spec. Return
2239 Empty for a scope with no location.
2240 (Generate_Reference): adapt to new components for ALFA information.
2241 Remove the need for D references on definitions.
2242 (Is_Local_Reference): moved to ALFA local package
2243 (Output_References): extract subfunction as Extract_Source_Name
2244 (Output_Local_References): remove procedure, replaced by filtering of
2245 cross-references in package ALFA and printing in Put_ALFA.
2246 (Write_Entity_Name): remove procedure
2247 * lib.adb, lib.ads (Extract_Source_Name): extract here function to
2248 print exact name of entity as it appears in source file
2249 (Unit_Ref_Table): make type public for use in Lib.Xref.ALFA
2250 * put_alfa.adb, put_alfa.ads: New files.
2251 * xref_lib.adb (Search_Xref): protect read of cross-references against
2252 reading other sections of the ALI file, in gnatxref
2253 (Search): protect read of cross-references against reading other
2254 sections of the ALI file, in gnatfind.
2255 * gcc-interface/Make-lang.in: Update dependencies.
2257 2011-08-03 Thomas Quinot <quinot@adacore.com>
2259 * sem_ch3.adb: Minor reformatting.
2261 2011-08-03 Jose Ruiz <ruiz@adacore.com>
2263 * s-inmaop-vxworks.adb (Setup_Interrupt_Mask): Do nothing instead of
2264 raising an exception.
2266 2011-08-03 Ed Schonberg <schonberg@adacore.com>
2268 * sem_res.adb (Set_String_Literal_Subtype): if index type is an integer
2269 type, always use 1 as the lower bound or string, even if lower bound of
2270 context is not static, to handle properly null strings in a non-static
2273 2011-08-03 Bob Duff <duff@adacore.com>
2275 * sem_prag.adb (Resolve_Aggregate): An array aggregate with 'others' is
2276 always legal on the right-hand side of an assignment statement; there
2277 is always an applicable index constraint in this case. Therefore, the
2278 check for Pkind = N_Assignment_Statement is now unconditional -- it
2279 doesn't depend on whether Is_Constrained (Typ).
2281 2011-08-03 Robert Dewar <dewar@adacore.com>
2283 * exp_ch5.adb, sem_prag.adb, exp_ch4.adb: Minor reformatting.
2285 2011-08-03 Ed Schonberg <schonberg@adacore.com>
2287 * sem_ch3.adb (Build_Itype_Reference): do not create an itype reference
2288 for an itype created within a generic unit.
2290 2011-08-03 Eric Botcazou <ebotcazou@adacore.com>
2292 * gnat_ugn.texi (Switches for gcc): Make it clearer that -fno-inline
2293 suppresses all inlining.
2295 2011-08-03 Robert Dewar <dewar@adacore.com>
2297 * sem_ch3.adb, sem_res.adb, exp_ch13.adb, exp_disp.adb,
2298 exp_aggr.adb: Minor reformatting.
2300 2011-08-03 Thomas Quinot <quinot@adacore.com>
2302 * exp_ch5.adb (Expand_N_Assignment_Statement): Do not force inlining of
2303 tagged assignment when discriminant checks are suppressed. This is
2304 useless and extremely costly in terms of static stack usage.
2306 2011-08-03 Bob Duff <duff@adacore.com>
2308 * sem_prag.adb (Get_Base_Subprogram): Do not follow Alias for instances
2309 of generics, because this leads to the wrong entity in the wrong scope,
2310 causing (e.g.) pragma Export_Procedure to get an error if the entity is
2312 (Process_Interface_Name): Follow Alias for instances of generics, to
2313 correct for the above change.
2315 2011-08-03 Ed Schonberg <schonberg@adacore.com>
2317 * exp_ch4.adb (Expand_N_Selected_Component): If the discriminant value
2318 is an integer literal it is always safe to replace the reference. In
2319 addition, if the reference appears in the generated code for an object
2320 declaration it is necessary to copy because otherwise the reference
2321 might be to the uninitilized value of the discriminant of the object
2324 2011-08-03 Pascal Obry <obry@adacore.com>
2326 * adaint.c (__gnat_is_executable_file_attr): Fix Win32 circuitry when no
2327 ACL used, in this case we want to check for ending .exe, not .exe
2328 anywhere in the path.
2330 2011-08-03 Sergey Rybin <rybin@adacore.com>
2332 * tree_io.ads (ASIS_Version_Number): Update because of the changes in
2333 the tree structure (semantic decoration of references to record
2336 2011-08-03 Gary Dismukes <dismukes@adacore.com>
2338 * sem_aggr.adb (Analyze_Array_Aggregate): When checking the discrete
2339 choices of a named array aggregate, bail out when any choices are
2340 marked as Errors_Posted.
2342 2011-08-03 Ed Schonberg <schonberg@adacore.com>
2344 * exp_ch13.adb (Expand_N_Freeze_Entity): cleanup determination of scope
2345 in which entity is frozen, to handle properly loop variables in
2348 2011-08-03 Ed Schonberg <schonberg@adacore.com>
2350 * sem_res.adb (Set_String_Literal_Subtype): if the lower bound of the
2351 subtype is not static, compute the upper bound using attributes, to
2352 handle properly index types that are not integer types.
2354 2011-08-03 Bob Duff <duff@adacore.com>
2356 * gnat_rm.texi, gnat_ugn.texi: Fix some dangling URLs.
2357 Update copyright notice.
2359 2011-08-03 Ed Schonberg <schonberg@adacore.com>
2361 * sem_ch3.adb (Build_Discriminant_Constraints): Only use
2362 Original_Discriminant if within an instance.
2363 * sem_ch4.adb (Analyze_Selected_Component): Ditto.
2365 2011-08-03 Thomas Quinot <quinot@adacore.com>
2367 * einfo.ads: Minor reformatting.
2369 2011-08-03 Ed Schonberg <schonberg@adacore.com>
2371 * exp_disp.adb (Check_Premature_Freezing): diagnose the presence of a
2372 composite type with an unfrozen subcomponent, in the profile of a
2373 primitive operation.
2375 2011-08-03 Robert Dewar <dewar@adacore.com>
2377 * sem_util.ads, exp_aggr.adb, exp_ch3.adb: Minor reformatting.
2379 2011-08-03 Ed Schonberg <schonberg@adacore.com>
2381 * sem_ch3.adb (Analyze_Object_Declaration): if a constant object of an
2382 unconstrained type with discriminants is initialized with an aggregate,
2383 use the constrained subtype of the aggregate as the type of the object,
2384 because it is immutable, and this allows the back-end to generate no
2385 code for the object declaration.
2387 2011-08-03 Robert Dewar <dewar@adacore.com>
2389 * exp_ch4.adb (Optimize_Length_Check): Fix bad handling of case where
2390 comparison operand is variable, and turns out to be zero or negative.
2392 2011-08-03 Javier Miranda <miranda@adacore.com>
2395 (Expand_Dispatching_Constructor_Call): Disable expansion of
2396 code required for native targets. Done to avoid generating
2397 references to unavailable runtime entities in VM targets.
2399 (Expand_N_Object_Declaration): Add missing support to handle
2400 the explicit initialization of class-wide interface objects.
2403 2011-08-03 Matthew Heaney <heaney@adacore.com>
2405 * a-cobove.adb (Merge): Move source onto target, instead of using Assign
2407 2011-08-03 Matthew Heaney <heaney@adacore.com>
2409 * a-cbdlli.adb (Splice): move source items from first to last
2411 2011-08-03 Yannick Moy <moy@adacore.com>
2413 * sem_util.ads: comment added.
2415 2011-08-03 Javier Miranda <miranda@adacore.com>
2418 (Expand_Record_Aggregate): In VM targets disable the expansion into
2419 assignments of aggregates whose type is not known at compile time.
2421 2011-08-03 Ed Schonberg <schonberg@adacore.com>
2423 * exp_ch9.adb (Build_Renamed_Formal_Declaration): common procedure for
2424 protected entries and task entries, to build the proper renaming
2425 declaration for entry formals, used in debugging.
2426 * exp_ch2.adb (Expand_Entry_Parameter): handle task and entry
2427 parameters in the same way.
2429 2011-08-02 Robert Dewar <dewar@adacore.com>
2431 * a-direct.adb, sinfo.ads, exp_ch9.adb, scng.adb, sem_util.adb,
2432 sem_util.ads, restrict.ads, par-prag.adb: Minor reformatting and/or
2433 code reorganization.
2435 2011-08-02 Robert Dewar <dewar@adacore.com>
2437 * debug.adb: Debug flag d.P to suppress length comparison optimization
2438 * exp_ch4.adb (Optimize_Length_Comparison): New routine to optimize
2439 comparison of Length by comparing First/Last instead.
2441 2011-08-02 Matthew Heaney <heaney@adacore.com>
2443 * a-cobove.ads: Code clean up.
2445 2011-08-02 Vincent Celier <celier@adacore.com>
2447 * adaint.c (file_names_case_sensitive_cache): New static int.
2448 (__gnat_get_file_names_case_sensitive): Cache the return value in
2449 file_names_case_sensitive_cache at the first invocation, to avoid
2450 multiple calls to getenv.
2452 2011-08-02 Bob Duff <duff@adacore.com>
2454 * sem_ch12.adb (Validate_Derived_Type_Instance): Implement AI05-0218-1.
2456 2011-08-02 Yannick Moy <moy@adacore.com>
2458 * sem_ch3.adb, sem_ch5.adb, sem_ch9.adb, sem_prag.adb, sem.ads,
2459 sem_util.adb, sem_util.ads, sem_res.adb, sem_ch2.adb, sem_ch4.adb,
2460 sem_ch6.adb, sem_ch11.adb: Add semantic flag In_Pre_Post_Expression to
2461 indicate that we are in a precondition or postcondition. This is used in
2462 Mark_Non_ALFA_Subprogram (renaming of Mark_Non_ALFA_Subprogram_Body) to
2463 decide whether to flag the spec or body of the current subprogram as
2466 2011-08-02 Fabien Chouteau <chouteau@adacore.com>
2468 * impunit.adb: Add Ada.Execution_Time.Interrupts in the Ada2012 package
2470 * a-extiin.ads: New file.
2472 2011-08-02 Bob Duff <duff@adacore.com>
2474 * a-direct.adb (Rename): Implement AI05-0231-1. In particular, Rename
2475 now raises Name_Error instead of Use_Error in certain cases. The other
2476 parts of this AI were already implemented properly.
2478 2011-08-02 Vincent Celier <celier@adacore.com>
2480 * link.c: Only import "auto-host.h" when building the gnattools.
2482 2011-08-02 Yannick Moy <moy@adacore.com>
2484 * sem_util.adb: Inter-unit inlining does not work for a subprogram
2485 which calls a local subprogram, so extract subprogram
2486 from Mark_Non_ALFA_Subprogram_Body.
2488 2011-08-02 Javier Miranda <miranda@adacore.com>
2491 (Extract_Dispatching_Call): If the type of the dispatching object is an
2492 access type then return an explicit dereference in the Object out-mode
2495 2011-08-02 Gary Dismukes <dismukes@adacore.com>
2497 * sem_ch3.adb (Analyze_Subtype_Declaration): Generate range
2498 compatibility checks for all indexes of an array subtype, not just the
2499 first. Reset Has_Dynamic_Range_Check on the subtype before each
2500 potential check to ensure that Insert_Range_Checks will not elide any
2501 of the dynamic checks.
2503 2011-08-02 Yannick Moy <moy@adacore.com>
2505 * par-prag.ad (Process_Restrictions_Or_Restriction_Warnings): recognize
2506 SPARK restriction at parsing time.
2507 * scng.adb (Scan): Generate a token Tok_SPARK_Hide for a SPARK HIDE
2508 directive only if the SPARK restriction is set for this unit.
2510 2011-08-02 Yannick Moy <moy@adacore.com>
2512 * sem_ch3.adb, sem_ch5.adb, sem_ch9.adb, sem_util.adb, sem_util.ads,
2513 sem_res.adb, sem_ch2.adb, sem_ch4.adb, sem_ch6.adb,
2514 sem_ch11.adb: Protect call to Current_Subprogram which might be costly
2515 when repeated. Rename Current_Subprogram_Is_Not_In_ALFA into
2516 Mark_Non_ALFA_Subprogram_Body.
2517 Split body of Mark_Non_ALFA_Subprogram_Body to get body small and
2520 2011-08-02 Yannick Moy <moy@adacore.com>
2522 * sem_res.adb: Protect calls to Matching_Static_Array_Bounds which
2525 2011-08-02 Robert Dewar <dewar@adacore.com>
2527 * exp_ch9.adb, exp_sel.adb, restrict.ads, exp_disp.adb, erroutc.ads,
2528 exp_ch3.adb: Minor reformatting.
2530 2011-08-02 Emmanuel Briot <briot@adacore.com>
2532 * adaint.c (__gnat_locate_exec_on_path): only returns executable
2533 files, not any regular file.
2534 (__gnat_locate_file_with_predicate): new subprogram.
2536 2011-08-02 Yannick Moy <moy@adacore.com>
2538 * sinfo.adb, sinfo.ads: Restrict the use of flags
2539 Has_Dynamic_Length_Check and Has_Dynamic_Range_Check to expression
2540 nodes, plus N_Subtype_Declaration for the 2nd one.
2542 2011-08-02 Sergey Rybin <rybin@adacore.com>
2544 * gnat_rm.texi: Ramification of pragma Eliminate documentation
2545 - fix bugs in the description of Source_Trace;
2546 - get rid of UNIT_NAME;
2548 2011-08-02 Javier Miranda <miranda@adacore.com>
2551 (Build_Dispatching_Requeue): Adding support for VM targets
2552 since we cannot directly reference the Tag entity.
2553 * exp_sel.adb (Build_K): Adding support for VM targets.
2554 (Build_S_Assignment): Adding support for VM targets.
2556 (Default_Prim_Op_Position): In VM targets do not restrict availability
2557 of predefined interface primitives to compiling in Ada 2005 mode.
2558 (Is_Predefined_Interface_Primitive): In VM targets this service is not
2559 restricted to compiling in Ada 2005 mode.
2560 (Make_VM_TSD): Generate code that declares and initializes the OSD
2561 record. Needed to support dispatching calls through synchronized
2564 (Make_Predefined_Primitive_Specs): Enable generation of predefined
2565 primitives associated with synchronized interfaces.
2566 (Make_Predefined_Primitive_Bodies): Enable generation of predefined
2567 primitives associated with synchronized interfaces.
2569 2011-08-02 Yannick Moy <moy@adacore.com>
2571 * par-ch11.adb (P_Handled_Sequence_Of_Statements): mark a sequence of
2572 statements hidden in SPARK if preceded by the HIDE directive
2573 (Parse_Exception_Handlers): mark each exception handler in a sequence of
2574 exception handlers as hidden in SPARK if preceded by the HIDE directive
2575 * par-ch6.adb (P_Subprogram): mark a subprogram body hidden in SPARK
2576 if starting with the HIDE directive
2577 * par-ch7.adb (P_Package): mark a package body hidden in SPARK if
2578 starting with the HIDE directive; mark the declarations in a private
2579 part as hidden in SPARK if the private part starts with the HIDE
2581 * restrict.adb, restrict.ads
2582 (Set_Hidden_Part_In_SPARK): record a range of slocs as hidden in SPARK
2583 (Is_In_Hidden_Part_In_SPARK): new function which returns whether its
2584 argument node belongs to a part which is hidden in SPARK
2585 (Check_SPARK_Restriction): do not issue violations on nodes in hidden
2586 parts in SPARK; protect the possibly costly call to
2587 Is_In_Hidden_Part_In_SPARK by a check that the SPARK restriction is on
2588 * scans.ads (Token_Type): new value Tok_SPARK_Hide in enumeration
2589 * scng.adb (Accumulate_Token_Checksum_GNAT_6_3,
2590 Accumulate_Token_Checksum_GNAT_5_03): add case for new token
2592 (Scan): recognize special comment starting with '#' and followed by
2593 SPARK keyword "hide" as a HIDE directive.
2595 2011-08-02 Yannick Moy <moy@adacore.com>
2597 * types.ads, erroutc.ads: Minor reformatting.
2599 2011-08-02 Vincent Celier <celier@adacore.com>
2601 * link.c: Add response file support for cross platforms.
2603 2011-08-02 Ed Schonberg <schonberg@adacore.com>
2605 * sem_aggr.adb (Resolve_Array_Aggregate): when copying the expression
2606 in an association, set parent field of copy before partial analysis.
2607 * sem_res.adb (Resolve_Slice): create reference to itype only when
2608 expansion is enabled.
2610 2011-08-02 Yannick Moy <moy@adacore.com>
2612 * einfo.adb, einfo.ads (Body_Is_In_ALFA, Set_Body_Is_In_ALFA): get/set
2613 for new flag denoting which subprogram bodies are in ALFA
2614 * restrict.adb, sem_ch7.adb: Update comment
2615 * sem_ch11.adb, sem_ch2.adb, sem_ch3.adb, sem_ch4.adb, sem_ch5.adb,
2616 sem_ch9.adb, sem_res.adb: Add calls to
2617 Current_Subprogram_Body_Is_Not_In_ALFA on unsupported constructs.
2618 * sem_ch6.adb (Analyze_Function_Return): add calls to
2619 Current_Subprogram_Body_Is_Not_In_ALFA on return statement in the
2620 middle of the body, and extended return.
2621 (Check_Missing_Return): add calls to Set_Body_Is_In_ALFA with argument
2622 False when missing return.
2623 (Analyze_Subprogram_Body_Helper): initialize the flag Body_Is_In_ALFA
2624 to True for subprograms whose spec is in ALFA. Remove later on the flag
2625 on the entity used for a subprogram body when there exists a separate
2627 * sem_util.adb, sem_util.ads (Current_Subprogram_Body_Is_Not_In_ALFA):
2628 if Current_Subprogram is not Empty, set its flag Body_Is_In_ALFA to
2629 False, otherwise do nothing.
2631 2011-08-02 Robert Dewar <dewar@adacore.com>
2633 * inline.adb, stand.ads, sem_ch6.adb, sem_ch8.adb: Minor reformatting.
2635 2011-08-02 Yannick Moy <moy@adacore.com>
2637 * sem_ch4.ads: minor formatting.
2639 2011-08-02 Yannick Moy <moy@adacore.com>
2641 * sem_aggr.adb, err_vars.ads, sem_ch3.adb, sem_ch5.adb, sem_ch9.adb,
2642 debug.adb, sem_util.adb, sem_res.adb, sem_attr.adb, gnat1drv.adb,
2643 errout.adb, errout.ads, exp_ch6.adb, sem_ch4.adb, restrict.adb,
2644 restrict.ads, sem_ch6.adb, sem_ch8.adb, sem_ch11.adb,
2645 opt.ads: cleanup of SPARK mode
2647 2011-08-02 Yannick Moy <moy@adacore.com>
2649 * cstand.adb (Create_Standard): sets Is_In_ALFA component of standard
2651 * einfo.adb, einfo.ads (Is_In_ALFA): add flag for all entities
2652 (Is_In_ALFA, Set_Is_In_ALFA): new subprograms to access flag Is_In_ALFA
2654 (Analyze_Object_Declaration): set Is_In_ALFA flag for objects
2655 (Constrain_Enumeration): set Is_In_ALFA flag for enumeration subtypes
2656 (Constrain_Integer): set Is_In_ALFA flag for integer subtypes
2657 (Enumeration_Type_Declaration): set Is_In_ALFA flag for enumeration
2659 (Set_Scalar_Range_For_Subtype): unset Is_In_ALFA flag for subtypes with
2661 * sem_ch6.adb (Analyze_Return_Type): unset Is_In_ALFA flag for
2662 functions whose return type is not in ALFA.
2663 (Analyze_Subprogram_Specification): set Is_In_ALFA flag for subprogram
2665 (Process_Formals): unset Is_In_ALFA flag for subprograms if a
2666 parameter's type is not in ALFA.
2667 * stand.ads (Standard_Type_Is_In_ALFA): array defines which standard
2670 2011-08-02 Ed Schonberg <schonberg@adacore.com>
2672 * sem_ch6 (Analyze_Expression_Function): treat the function as
2673 Inline_Always, and introduce a subprogram declaration for it when it is
2675 * inline.adb (Add_Inlined_Body): recognize bodies that come from
2676 expression functions, so that the back-end can determine whether they
2677 can in fact be inlined.
2678 * sem_util.adb (Is_Expression_Function): predicate to determine whether
2679 a function body comes from an expression function.
2681 2011-08-02 Gary Dismukes <dismukes@adacore.com>
2683 * sem_ch6.adb (Check_Conformance): Revise the check for nonconforming
2684 null exclusions to test Can_Never_Be_Null on the anonymous access types
2685 of the formals rather than testing the formals themselves. Exclude this
2686 check in cases where the Old_Formal is marked as a controlling formal,
2687 to avoid issuing spurious errors for bodies completing dispatching
2688 operations (due to the flag not getting set on controlling access
2689 formals in body specs).
2690 (Find_Corresponding_Spec): When checking full and subtype conformance of
2691 subprogram bodies in instances, pass Designated and E in that order, for
2692 consistency with the expected order of the formals (New_Id followed by
2695 2011-08-02 Robert Dewar <dewar@adacore.com>
2697 * sem_ch8.adb: Minor reformatting.
2699 2011-08-02 Ed Schonberg <schonberg@adacore.com>
2701 * sem_ch8.adb (Analyze_Subprogram_Renaming): new procedure
2702 Check_Class_Wide_Actual, to implement AI05-0071, on defaulted
2703 primitive operations of class-wide actuals.
2705 2011-08-02 Javier Miranda <miranda@adacore.com>
2707 * exp_atag.ads, exp_atag.adb
2708 (Build_Common_Dispatching_Select_Statements): Remove argument Loc
2709 since its value is implicitly passed in argument Typ.
2710 * exp_disp.adb (Make_Disp_Conditional_Select_Body,
2711 Make_Disp_Timed_Select_Body): Remove Loc in calls to routine
2712 Build_Common_Dispatching_Select_Statements.
2714 2011-08-02 Robert Dewar <dewar@adacore.com>
2716 * sem_ch3.adb, exp_atag.ads, get_scos.adb, get_scos.ads,
2717 exp_disp.adb, lib-xref.adb, lib-xref.ads: Update comments.
2720 2011-08-02 Robert Dewar <dewar@adacore.com>
2722 * sem_res.adb: Minor reformatting.
2723 * sem_prag.adb: Minor reformatting.
2725 2011-08-02 Javier Miranda <miranda@adacore.com>
2727 * exp_atag.adb, exp_atags.ads
2728 (Build_Common_Dispatching_Select_Statement): Replace argument DT_Ptr
2729 by the tagged type Entity. Required to use this routine in the VM
2730 targets since we do not have available the Tag entity in the VM
2733 (Expand_N_Subprogram_Body): Do not invoke Build_VM_TSDs if package
2734 Ada.Tags has not been previously loaded.
2736 (Expand_N_Package_Declaration, Expand_N_Package_Body): Do not invoke
2737 Build_VM_TSDs if package Ada.Tags has not been previously loaded.
2739 (Enclosing_Dynamic_Scope): Add missing support to handle the full
2740 view of enclosing scopes. Required to handle enclosing scopes that
2741 are synchronized types whose full view is a task type.
2743 (Build_VM_TSDs): Minor code improvement to avoid generating and
2744 analyzing lists with empty nodes.
2745 (Make_Disp_Asynchronous_Select_Body): Add support for VM targets.
2746 (Make_Disp_Conditional_Select_Body): Add support for VM targets.
2747 (Make_Disp_Get_Prim_Op_Kind): Add support for VM targets.
2748 (Make_Disp_Timed_Select_Body): Add support for VM targets.
2749 (Make_Select_Specific_Data_Table): Add support for VM targets.
2750 (Make_VM_TSD): Generate code to initialize the SSD structure of
2753 2011-08-02 Yannick Moy <moy@adacore.com>
2755 * lib-writ.adb (Write_ALI): when ALFA mode is set, write local
2756 cross-references section in ALI.
2757 * lib-xref.adb, lib-xref.ads (Xref_Entry): add components Sub
2758 (enclosing subprogram), Slc (location of Sub) and Sun (unit number of
2760 (Enclosing_Subprogram_Or_Package): new function to return the enclosing
2761 subprogram or package entity of a node
2762 (Is_Local_Reference_Type): new function returns True for references
2763 selected in local cross-references.
2764 (Lt): function extracted from Lt in Output_References
2765 (Write_Entity_Name): function extracted from Output_References
2766 (Generate_Definition): generate reference with type 'D' for definition
2767 of objects (object declaration and parameter specification), with
2768 appropriate locations and units, for use in local cross-references.
2769 (Generate_Reference): update fields Sub, Slc and Sun. Keep newly created
2770 references of type 'I' for initialization in object definition.
2771 (Output_References): move part of function Lt and procedure
2772 Write_Entity_Name outside of the body. Ignore references of types 'D'
2773 and 'I' introduced for local cross-references.
2774 (Output_Local_References): new procedure to output the local
2775 cross-references sections.
2776 (Lref_Entity_Status): new array defining whether an entity is a local
2777 * sem_ch3.adb (Analyze_Object_Declaration): call Generate_Reference
2778 with 'I' type when initialization expression is present.
2779 * get_scos.adb, get_scos.ads: Correct comments and typos
2781 2011-08-02 Javier Miranda <miranda@adacore.com>
2783 * exp_ch6.adb (Expand_N_Subprogram_Body): Enable generation of TSDs in
2785 * exp_ch7.adb (Expand_N_Package_Body): Enable generation of TSDs in
2787 * exp_disp.adb (Build_VM_TSDs): No action needed if the runtime has no
2790 2011-08-02 Vincent Celier <celier@adacore.com>
2792 * prj-nmsc.adb (File_Found): New components Excl_File and Excl_Line
2793 (No_Space_Img): New function
2794 (Find_Excluded_Sources): When reading from a file, record the file name
2795 and the line number for each excluded source.
2796 (Mark_Excluded_Sources): When reporting an error, if the excluded
2797 sources were read from a file, include file name and line number in
2800 2011-08-02 Ed Schonberg <schonberg@adacore.com>
2802 * sem_res.adb (Resolve_Call): implement rule in RM 12.5.1 (23.3/2).
2804 2011-08-02 Robert Dewar <dewar@adacore.com>
2806 * exp_ch7.adb exp_ch6.adb, exp_disp.adb: Minor reformatting
2808 2011-08-02 Javier Miranda <miranda@adacore.com>
2810 * exp_ch6.adb (Expand_N_Subprogram_Body): Temporarily restrict the
2811 generation of TSDs to the DOTNET compiler.
2812 * exp_ch7.adb (Expand_N_Package_Body): Temporarily restrict the
2813 generation of TSDs to the DOTNET compiler.
2815 2011-08-02 Javier Miranda <miranda@adacore.com>
2817 * exp_disp.ads (Build_VM_TSDs): Build the runtime Type Specific Data
2818 record of all the tagged types declared inside library level package
2819 declarations, library level package bodies or library level subprograms.
2820 * exp_disp.adb (Make_VM_TSD): New subprogram that builds the TSD
2821 associated with a given tagged type.
2822 (Build_VM_TSDs): New subprogram.
2823 * exp_ch6.adb (Expand_N_Subprogram_Body): Generate TSDs records of main
2824 compilation units that are subprograms.
2825 * exp_ch7.adb (Expand_N_Package_Body): Generate TSDs of main
2826 compilation units that are package bodies.
2827 (Expand_N_Package_Declaration): Generate TSDs of the main compilation
2828 units that are a package declaration or a package instantiation.
2829 * exp_intr.adb (Expand_Dispatching_Constructor_Call): Minor code
2830 reorganization to improve the error generated by the frontend when the
2831 function Ada.Tags.Secondary_Tag is not available.
2832 * rtsfind.ads (RE_Register_TSD): New runtime entity.
2833 * exp_ch4.adb (Expand_N_Type_Conversion): Minor code cleanup.
2835 2011-08-02 Javier Miranda <miranda@adacore.com>
2837 * exp_disp.adb (Make_DT): Generate call to Check_TSD in Ada 2005 mode.
2839 2011-08-02 Robert Dewar <dewar@adacore.com>
2841 * s-imenne.ads: Minor reformatting.
2843 2011-08-02 Robert Dewar <dewar@adacore.com>
2845 * a-stunau.ads: Add pragma Suppress_Initialization for Big_String
2846 * freeze.adb (Warn_Overlay): Don't warn if initialization suppressed
2847 * s-stalib.ads: Add pragma Suppress_Initialization for Big_String
2849 2011-08-02 Robert Dewar <dewar@adacore.com>
2851 * einfo.ads (Materialize_Entity): Document this is only for renamings
2852 * exp_ch3.adb (Expand_N_Object_Declaration): Make sure we generate
2853 required debug information in the case where we transform the object
2854 declaration into a renaming declaration.
2855 * exp_ch4.adb (Expand_Concatenate): Generate debug info for result
2857 * exp_dbug.ads (Debug_Renaming_Declaration): Document setting of
2860 2011-08-02 Robert Dewar <dewar@adacore.com>
2862 * einfo.ads, einfo.adb (Suppress_Initialization): Replaces
2863 Suppress_Init_Procs.
2864 * exp_ch3.adb, exp_disp.adb, freeze.adb: Use
2865 Suppress_Initialization/Initialization_Suppressed.
2866 * gnat_rm.texi: New documentation for pragma Suppress_Initialization
2867 * sem_aux.ads, sem_aux.adb (Initialization_Suppressed): New function
2868 * sem_dist.adb: Use Suppress_Initialization/Initialization_Suppressed
2869 * sem_prag.adb: New processing for pragma Suppress_Initialization.
2871 2011-08-02 Robert Dewar <dewar@adacore.com>
2873 * gnat_rm.texi, a-tags.ads, sem_prag.adb, sem_ch12.adb, exp_disp.adb:
2876 2011-08-02 Ed Schonberg <schonberg@adacore.com>
2878 * sem_prag.adb (Chain_PPC): Implement AI04-0230: null procedures can
2879 only have inheritable classwide pre/postconditions.
2881 2011-08-02 Javier Miranda <miranda@adacore.com>
2883 * a-tags.ads, a-tags.adb (Check_TSD): New subprogram.
2884 * rtsfind.ads (RE_Check_TSD): New runtime entity.
2885 * exp_disp.adb (Make_DT): Generate call to the new runtime routine that
2886 checks if the external tag of a type is the same as the external tag
2887 of some other declaration.
2889 2011-08-02 Thomas Quinot <quinot@adacore.com>
2891 * s-taskin.ads: Minor reformatting.
2893 2011-08-02 Emmanuel Briot <briot@adacore.com>
2895 * g-comlin.adb (Display_Help): swap the order in which it prints the
2896 short help and the general usage.
2898 2011-08-02 Ed Schonberg <schonberg@adacore.com>
2900 * sem_ch12.adb (Analyze_Generic_Subprogram_Declaration): copy properly
2901 the aspect declarations and attach them to the generic copy for
2902 subsequent analysis.
2903 (Analyze_Subprogram_Instantiation): copy explicitly the aspect
2904 declarations of the generic tree to the new subprogram declarations.
2905 * sem_attr.adb (Check_Precondition_Postcondition): recognize
2906 conditions that apply to a subprogram instance.
2908 2011-08-02 Robert Dewar <dewar@adacore.com>
2910 * gnat_rm.texi: Clarify doc on pragma Source_File_Name[_Project].
2912 2011-08-02 Ed Schonberg <schonberg@adacore.com>
2914 * sem_ch3.adb (Derived_Type_Declaration): When checking that a untagged
2915 private type with a tagged full view is not derived in the immediate
2916 scope of the partial view, (RM 7.3 (7)) use the scope of the base type.
2918 2011-08-02 Robert Dewar <dewar@adacore.com>
2920 * exp_ch4.adb: Minor reformatting.
2922 2011-08-02 Ed Schonberg <schonberg@adacore.com>
2924 * sem_ch5.adb (Analyze_Loop_Statement): If the iteration scheme is an
2925 Ada2012 iterator, the loop will be rewritten during expansion into a
2926 while loop with a cursor and an element declaration. Do not analyze the
2927 body in this case, because if the container is for indefinite types the
2928 actual subtype of the elements will only be determined when the cursor
2929 declaration is analyzed.
2931 2011-08-02 Arnaud Charlet <charlet@adacore.com>
2933 * sem_ch13.adb (Analyze_Attribute_Definition_Clause): Ignore
2934 size/alignment related attributes in CodePeer_Mode.
2936 2011-08-02 Gary Dismukes <dismukes@adacore.com>
2938 * sem_ch3.adb (Check_Ops_From_Incomplete_Type): Remove call to
2939 Prepend_Element, since this can result in the operation getting the
2940 wrong slot in the full type's dispatch table if the full type has
2941 inherited operations. The incomplete type's operation will get added
2942 to the proper position in the full type's primitives
2943 list later in Sem_Disp.Check_Operation_From_Incomplete_Type.
2944 (Process_Incomplete_Dependents): Add Is_Primitive test when checking for
2945 dispatching operations, since there are cases where nonprimitive
2946 subprograms can get added to the list of incomplete dependents (such
2947 as subprograms in nested packages).
2948 * sem_ch6.adb (Process_Formals): First, remove test for being in a
2949 private part when determining whether to add a primitive with a
2950 parameter of a tagged incomplete type to the Private_Dependents list.
2951 Such primitives can also occur in the visible part, and should not have
2952 been excluded from being private dependents.
2953 * sem_ch7.adb (Uninstall_Declarations): When checking the rule of
2954 RM05-3.10.1(9.3/2), test that a subprogram in the Private_Dependents
2955 list of a Taft-amendment incomplete type is a primitive before issuing
2956 an error that the full type must appear in the same unit. There are
2957 cases where nonprimitives can be in the list (such as subprograms in
2959 * sem_disp.adb (Derives_From): Use correct condition for checking that
2960 a formal's type is derived from the type of the corresponding formal in
2961 the parent subprogram (the condition was completely wrong). Add
2962 checking that was missing for controlling result types being derived
2963 from the result type of the parent operation.
2965 2011-08-02 Yannick Moy <moy@adacore.com>
2967 * errout.adb (First_Node): minor renaming
2968 * restrict.adb (Check_Formal_Restriction): put restriction warning on
2971 2011-08-02 Yannick Moy <moy@adacore.com>
2973 * sem_res.adb (Resolve_Logical_Op): ensure N is a binary operator
2974 before accessing operands.
2975 * sem_util.adb (Is_SPARK_Initialization_Expr): follow original nodes to
2976 decide whether an initialization expression respects SPARK rules, as
2977 the plain node is the expanded one. This allows for more valid warnings
2979 * gnat_rm.texi: Minor update.
2981 2011-08-02 Arnaud Charlet <charlet@adacore.com>
2983 * sem_ch13.adb (Analyze_Enumeration_Representation_Clause): Revert
2986 2011-08-02 Robert Dewar <dewar@adacore.com>
2988 * sem_ch3.adb, sem_ch4.adb: Minor reformatting.
2990 2011-08-02 Hristian Kirtchev <kirtchev@adacore.com>
2992 * exp_ch5.adb (Expand_Iterator_Loop): Reformatting. Wrap the original
2993 loop statements and the element renaming declaration with a block when
2994 the element type is controlled.
2996 2011-08-02 Yannick Moy <moy@adacore.com>
2998 * sinfo.ads: Minor formatting.
3000 2011-08-02 Ed Schonberg <schonberg@adacore.com>
3002 * sem_aggr.adb (Add_Association): if the association has a box and no
3003 expression, use the Sloc of the aggregate itself for the new
3005 * errout.adb (First_Node): Exclude nodes with no Sloc, and always use
3008 2011-08-02 Hristian Kirtchev <kirtchev@adacore.com>
3010 * exp_ch5.adb (Expand_Iterator_Loop): Code cleanup and refactoring.
3011 When a container is provided via a function call, generate a renaming
3012 of the function result. This avoids the creation of a transient scope
3013 and the premature finalization of the container.
3014 * exp_ch7.adb (Is_Container_Cursor): Removed.
3015 (Wrap_Transient_Declaration): Remove the supression of the finalization
3016 of the list controller when the declaration denotes a container cursor,
3019 2011-08-02 Yannick Moy <moy@adacore.com>
3021 * restrict.adb (Check_Formal_Restriction): only issue a warning if the
3022 node is from source, instead of the original node being from source.
3024 (Resolve_Array_Aggregate): refine the check for a static expression, to
3025 recognize also static ranges
3026 * sem_ch3.adb, sem_ch3.ads (Analyze_Component_Declaration,
3027 Array_Type_Declaration): postpone the test for the type being a subtype
3028 mark after the type has been resolved, so that component-selection and
3029 expanded-name are discriminated.
3030 (Make_Index, Process_Range_Expr_In_Decl): add a parameter In_Iter_Schm
3031 to distinguish the case of an iteration scheme, so that an error is
3032 issed on a non-static range in SPARK except in an iteration scheme.
3033 * sem_ch5.adb (Analyze_Iteration_Scheme): call Make_Index with
3034 In_Iter_Schm = True.
3035 * sem_ch6.adb (Analyze_Subprogram_Specification): refine the check for
3036 user-defined operators so that they are allowed in renaming
3038 (Find_Selected_Component): refine the check for prefixing of operators
3039 so that they are allowed in renaming. Move the checks for restrictions
3040 on selector name after analysis discriminated between
3041 component-selection and expanded-name.
3042 * sem_res.adb (Resolve_Op_Concat_Arg): do not issue a warning on
3043 concatenation argument of string type if it is static.
3044 * sem_util.adb, sem_util.ads
3045 (Check_Later_Vs_Basic_Declarations): add a new function
3046 Is_Later_Declarative_Item to decice which declarations are allowed as
3047 later items, in the two different modes Ada 83 and SPARK. In the SPARK
3048 mode, add that renamings are considered as later items.
3049 (Enclosing_Package): new function to return the enclosing package
3050 (Enter_Name): correct the rule for homonyms in SPARK
3051 (Is_SPARK_Initialization_Expr): default to returning True on nodes not
3052 from source (result of expansion) to avoid issuing wrong warnings.
3054 2011-08-02 Ed Schonberg <schonberg@adacore.com>
3056 * errout.adb: On anything but an expression First_Node returns its
3059 2011-08-02 Pascal Obry <obry@adacore.com>
3061 * prj-proc.adb, make.adb, makeutl.adb: Minor reformatting.
3063 2011-08-02 Hristian Kirtchev <kirtchev@adacore.com>
3065 * exp_ch5.adb (Expand_Iterator_Loop): Code cleanup and reorganization.
3066 Set the associated loop as the related expression of internally
3068 * exp_ch7.adb (Is_Container_Cursor): New routine.
3069 (Wrap_Transient_Declaration): Supress the finalization of the list
3070 controller when the declaration denotes a container cursor.
3072 2011-08-02 Yannick Moy <moy@adacore.com>
3074 * opt.ads (SPARK_Mode): update comment, SPARK_Mode only set through
3076 * par-ch3.adb (P_Delta_Constraint): remove check in SPARK mode that the
3077 expression is a simple expression. This check cannot be performed in
3078 the semantics, so just drop it.
3079 (P_Index_Or_Discriminant_Constraint): move check that the index or
3080 discriminant is a subtype mark to Analyze_Subtype_Declaration in the
3081 semantics. Other cases were previously checked in the semantics.
3082 * par-ch4.adb (P_Name): move checks that a selector name is not
3083 character literal or an operator symbol to Find_Selected_Component in
3085 * par-ch5.adb (Parse_Decls_Begin_End): move check that basic
3086 declarations are not placed after later declarations in a separate
3087 procedure in Sem_Util (possibly not the best choice?), to be used both
3088 during parsing, for Ada 83 mode, and during semantic analysis, for
3090 * par-endh.adb (Check_End): move check that end label is not missing
3091 to Process_End_Label in the semantics
3092 * par-prag.adb (Process_Restrictions_Or_Restriction_Warnings): remove
3093 the special case for SPARK restriction
3094 * par.adb: use and with Sem_Util, for use in Parse_Decls_Begin_End
3095 * restrict.adb, restrict.ads (Check_Formal_Restriction): add a
3096 parameter Force to issue the error message even on internal node (used
3097 for generated end label). Call Check_Restriction to check when an error
3098 must be issued. In SPARK mode, issue an error message even if the
3099 restriction is not set.
3100 (Check_Restriction): new procedure with an additional out parameter to
3101 inform the caller that a message has been issued
3102 * sem_aggr.adb: Minor modification of message
3103 * sem_attr.adb (Analyze_Attribute): call Check_Formal_Restriction
3104 instead of issuing an error message directly
3105 * sem_ch3.adb (Analyze_Declarations): move here the check that basic
3106 declarations are not placed after later declarations, by calling
3107 Check_Later_Vs_Basic_Declarations
3108 (Analyze_Subtype_Declaration): move here the check that an index or
3109 discriminant constraint must be a subtype mark. Change the check that
3110 a subtype of String must start at one so that it works on subtype marks.
3111 * sem_ch4.adb (Analyze_Call): move here the check that a named
3112 association cannot follow a positional one in a call
3113 * sem_ch5.adb (Check_Unreachable_Code): call Check_Formal_Restriction
3114 instead of issuing an error message directly
3115 * sem_ch8.adb (Find_Selected_Component): move here the check that a
3116 selector name is not a character literal or an operator symbol. Move
3117 here the check that the prefix of an expanded name cannot be a
3118 subprogram or a loop statement.
3119 * sem_util.adb, sem_util.ads (Check_Later_Vs_Basic_Declarations): new
3120 procedure called from parsing and semantics to check that basic
3121 declarations are not placed after later declarations
3122 (Process_End_Label): move here the check that end label is not missing
3124 2011-08-02 Arnaud Charlet <charlet@adacore.com>
3126 * sem_ch13.adb (Analyze_Enumeration_Representation_Clause): Ignore enum
3127 representation clause in codepeer mode, since it confuses CodePeer and
3128 does not bring useful info.
3130 2011-08-02 Ed Falis <falis@adacore.com>
3132 * init.c: initialize fp hw on MILS.
3134 2011-08-02 Ed Schonberg <schonberg@adacore.com>
3136 * errout.adb (First_Node): for bodies, return the node itself (small
3137 optimization). For other nodes, do not check source_unit if the node
3138 comes from Standard.
3140 2011-08-02 Robert Dewar <dewar@adacore.com>
3142 * exp_ch3.adb: Minor comment additions.
3143 * sem_ch13.adb: Minor reformatting.
3145 2011-08-02 Pascal Obry <obry@adacore.com>
3147 * make.adb, makeutl.adb: Removes some superfluous directory separator.
3149 2011-08-02 Robert Dewar <dewar@adacore.com>
3151 * sem_attr.adb: Minor reformatting.
3153 2011-08-02 Robert Dewar <dewar@adacore.com>
3155 * einfo.adb (Has_Default_Aspect): Replaces Has_Default_Value
3156 (Has_Default_Component_Value): Removed
3157 * einfo.ads Comment updates
3158 (Has_Default_Aspect): Replaces Has_Default_Value
3159 (Has_Default_Component_Value): Removed
3161 (Expand_N_Freeze_Entity): Handle Default[_Component]_Value aspects
3163 (Build_Array_Init_Proc): Handle Default_[Component_]Value aspects
3164 (Get_Simple_Init_Val): Handle Default_Value aspect
3165 (Needs_Simple_Initialization): Handle Default_Value aspect
3166 * exp_ch3.ads: Needs_Simple_Initialization
3167 * freeze.adb (Freeze_Entity): Handle Default_[Component_]Value aspect
3168 * par-prag.adb (Pragma_Default[_Component]Value) Removed
3170 (Analyze_Aspect_Specifications): Fix Default[_Component]_Value aspects
3171 * sem_prag.adb (Pragma_Default[_Component]Value) Removed
3172 * snames.ads-tmpl (Pragma_Default[_Component]Value) Removed
3174 2011-08-02 Ed Schonberg <schonberg@adacore.com>
3176 * sem_ch5.adb (Analyze_Iterator_Specification): use base type to locate
3177 package containing iteration primitives.
3178 exp_ch5.adb (Expand_Iterator_Loop): ditto.
3180 2011-08-02 Ed Schonberg <schonberg@adacore.com>
3182 * sem_ch5.adb (Analyze_Iteration_Scheme): For an Ada2012 iterator with
3183 "of", pre-analyze expression in case it is a function call with
3184 finalization actions that must be placed ahead of the loop.
3185 * exp_ch5.adb (Expand_Iterator_Loop): If condition_actions are present
3186 on an Ada2012 iterator, insert them ahead of the rewritten loop.
3188 2011-08-02 Geert Bosch <bosch@adacore.com>
3190 * cstand.adb (Create_Float_Types): Only consider C's long double for
3191 Long_Long_Float, in addition to double.
3193 2011-08-02 Robert Dewar <dewar@adacore.com>
3195 * sem_ch3.adb, sem_ch5.adb, sem_type.adb, switch-c.adb, switch-c.ads,
3196 sem_prag.adb, sem_util.adb, sem_util.ads, sem_res.adb, warnsw.ads,
3197 prepcomp.ads, cstand.adb, stand.ads, a-calfor.adb, s-stusta.adb:
3200 2011-08-02 Ed Schonberg <schonberg@adacore.com>
3202 * sem_attr.adb: handle properly 'Result when it is a prefix of an
3205 2011-08-02 Javier Miranda <miranda@adacore.com>
3207 * einfo.ads, einfo.adb
3208 (Original_Access_Type): Move this attribute to Node26 since there was
3209 an undocumented use of Node21 in E_Access_Subprogram_Type entities
3210 which causes conflicts and breaks the generation of the .NET compiler.
3211 (Interface_Name): Add missing documentation on JGNAT only uses of
3214 2011-08-02 Geert Bosch <bosch@adacore.com>
3216 * cstand.adb (Back_End_Float_Types): Use Elist instead of Nlist
3217 (Find_Back_End_Float_Type): Likewise
3218 (Create_Back_End_Float_Types): Likewise
3219 (Create_Float_Types): Likewise
3220 (Register_Float_Type): Likewise
3221 * sem_ch3.adb (Floating_Point_Type_Declaration): Use Elist instead of
3222 Nlist and split out type selection in new local Find_Base_Type function.
3223 * sem_prag.adb (Process_Import_Predefined_Type): Use Elist instead of
3225 * stand.ads (Predefined_Float_Types): Use Elist instead of Nlist
3227 2011-08-02 Robert Dewar <dewar@adacore.com>
3229 * inline.adb: Minor code reorganization (put Get_Code_Unit_Entity in
3231 * opt.ads: Minor comment change.
3232 * sem_ch12.adb: Minor code reorganization.
3234 2011-08-02 Gary Dismukes <dismukes@adacore.com>
3236 * sem_ch3.adb (Complete_Private_Subtype): Don't append the private
3237 subtype's list of rep items to the list on the full subtype in the case
3238 where the lists are the same.
3240 2011-08-02 Geert Bosch <bosch@adacore.com>
3242 * switch-c.adb (Free): New deallocation procedure to avoid implicitly
3243 using the one from System.Strings, which also deallocates all strings.
3245 2011-08-02 Geert Bosch <bosch@adacore.com>
3247 * gcc-interface/gigi.h, gcc-interface/misc.c (enumerate_modes): New
3249 * gcc-interface/Make-lang.in: Update dependencies.
3251 2011-08-02 Olivier Hainque <hainque@adacore.com>
3253 * gcc-interface/trans.c (Subprogram_Body_to_gnu): Set the function
3256 2011-08-02 Javier Miranda <miranda@adacore.com>
3258 * sem_ch3.adb (Check_Anonymous_Access_Components): Create extra formals
3259 associated with anonymous access to subprograms.
3261 2011-08-02 Geert Bosch <bosch@adacore.com>
3264 (Preprocessing_Symbol_Defs): Move from Prepcomp.Symbol_Definitions.
3265 (Preprocessing_Symbol_Last): Move from Prepcomp.Last_Definition.
3266 * prepcomp.adb (Symbol_Definitions, Last_Definition): Move to opt.ads
3267 (Add_Symbol_Definition): Move to switch-c.adb
3268 (Process_Command_Line_Symbol_Definitions): Adjust references to above.
3269 * prepcomp.ads: Remove dependency on Ada.Unchecked_Deallocation.
3270 (Add_Symbol_Definition): Move to switch-c.adb.
3271 * sem_ch13.adb, sem_prag.adb: Add dependency on Warnsw.
3273 (Set_Dot_Warning_Switch, Set_GNAT_Mode_Warnings, Set_Warning_Switch):
3275 * sem_warn.ads (Warn_On_Record_Holes, Warn_On_Overridden_Size,
3276 Set_Dot_Warning_Switch, Set_GNAT_Mode_Warnings, Set_Warning_Switch):
3278 * switch-c.adb: Replace dependency on Prepcomp and Sem_Warn by Warnsw.
3279 (Add_Symbol_Definition): Moved from Prepcomp.
3280 * switch-c.ads: Update copyright notice. Use String_List instead of
3281 Argument_List, removing dependency on System.OS_Lib.
3283 2011-08-02 Yannick Moy <moy@adacore.com>
3285 * sem_ch3.adb (Analyze_Object_Declaration): issue an error in formal
3286 mode on initialization expression which does not respect SPARK
3288 * sem_util.adb, sem_util.ads (Is_SPARK_Initialization_Expr): determines
3289 if the tree referenced by its argument represents an initialization
3290 expression in SPARK, suitable for initializing an object in an object
3293 2011-08-02 Javier Miranda <miranda@adacore.com>
3295 * exp_ch9.adb (Expand_Access_Protected_Subprogram_Type): Link the
3296 internally generated access to subprogram with its associated protected
3298 * einfo.ads, einfo.adb (Original_Access_Type): New attribute.
3300 2011-08-02 Geert Bosch <bosch@adacore.com>
3302 * cstand.adb (Register_Float_Type): Print information about type to
3303 register, if the Debug_Flag_Dot_B is set.
3304 * debug.adb (Debug_Flag_Dot_B): Document d.b debug option.
3305 * rtsfind.ads (RE_Max_Base_Digits): New run time entity.
3306 * sem_ch3.adb (Floating_Point_Type_Declaration): Allow declarations
3307 with a requested precision of more than Max_Digits digits and no more
3308 than Max_Base_Digits digits, if a range specification is present and the
3309 Predefined_Float_Types list has a suitable type to derive from.
3310 * sem_ch3.adb (Rep_Item_Too_Early): Avoid generating error in the
3311 case of type completion with pragma Import
3313 (Process_Import_Predefined_Type): Processing to complete a type
3314 with pragma Import. Currently supports floating point types only.
3315 (Set_Convention_From_Pragma): Do nothing without underlying type.
3316 (Process_Convention): Guard against absence of underlying type,
3317 which may happen when importing incomplete types.
3318 (Process_Import_Or_Interface): Handle case of importing predefined
3319 types. Tweak error message.
3321 2011-08-02 Eric Botcazou <ebotcazou@adacore.com>
3323 * inline.adb (Add_Inlined_Body): Adjust check for library-level inlined
3324 functions to previous change. Reorganize code slightly.
3326 2011-08-02 Geert Bosch <bosch@adacore.com>
3328 * back_end.ads (Register_Type_Proc): New call back procedure type for
3329 allowing the back end to provide information about available types.
3330 (Register_Back_End_Types): New procedure to register back end types.
3331 * back_end.adb (Register_Back_End_Types): Call the back end to enumerate
3333 * cstand.adb (Back_End_Float_Types): New list for floating point types
3334 supported by the back end.
3335 (Build_Float_Type): Add extra parameter for Float_Rep_Kind.
3336 (Copy_Float_Type): New procedure to make new copies of predefined types.
3337 (Register_Float_Type): New call back procedure to populate the BEFT list
3338 (Find_Back_End_Float_Type): New procedure to find a BEFT by name
3339 (Create_Back_End_Float_Types): New procedure to populate the BEFT list.
3340 (Create_Float_Types): New procedure to create entities for floating
3341 point types predefined in Standard, and put these and any remaining
3342 BEFTs on the Predefined_Float_Types list.
3343 * stand.ads (Predefined_Float_Types): New list for predefined floating
3344 point types that do not have declarations in package Standard.
3346 2011-08-02 Eric Botcazou <ebotcazou@adacore.com>
3348 * inline.adb (Get_Code_Unit_Entity): New local function. Returns the
3349 entity node for the unit containing the parameter.
3350 (Add_Inlined_Body): Use it to find the unit containing the subprogram.
3351 (Add_Inlined_Subprogram): Likewise.
3352 * gcc-interface/Make-lang.in: Update dependencies.
3354 2011-08-02 Thomas Quinot <quinot@adacore.com>
3356 * s-stusta.adb (Print): Make sure Pos is always initialized to a
3359 2011-08-02 Geert Bosch <bosch@adacore.com>
3361 * a-calfor.adb (Image): Simplify, removing unnecessary uses of 'Image.
3363 2011-08-02 Eric Botcazou <ebotcazou@adacore.com>
3365 * sem_type.adb (Covers): Move trivial case to the top and reuse the
3366 computed value of Base_Type.
3368 2011-08-02 Yannick Moy <moy@adacore.com>
3370 * restrict.adb (Check_Restriction): issue an error for any use of
3371 class-wide, even if the No_Dispatch restriction is not set.
3372 * sem_aggr.adb: Correct typos in comments and messages in formal mode
3373 * sem_ch3.adb (Process_Full_View): issue an error in formal mode is,
3374 when completing a private extension, the type named in the private part
3375 is not the same as that named in the visible part.
3376 * sem_res.adb (Resolve_Call): issue an error in formal mode on the use
3377 of an inherited primitive operations of a tagged type or type extension
3378 that returns the tagged type.
3379 * sem_util.adb, sem_util.ads (Is_Inherited_Operation_For_Type): new
3380 function which returns True for an implicit operation inherited by the
3381 derived type declaration for the argument type.
3382 (Is_SPARK_Object_Reference): move to appropriate place in alphabetic
3385 2011-08-02 Ed Schonberg <schonberg@adacore.com>
3387 * sem_ch5.adb (Pre_Analyze_Range): new procedure extracted from
3388 Process_Bounds, to perform analysis with expansion of a range or an
3389 expression that is the iteration scheme for a loop.
3390 (Analyze_Iterator_Specification): If domain of iteration is given by a
3391 function call with a controlled result, as is the case if call returns
3392 a predefined container, ensure that finalization actions are properly
3394 * par-ch3.adb: accept Ada2012 iterator form in P_Discrete_Range.
3396 2011-08-02 Javier Miranda <miranda@adacore.com>
3398 * sem_ch5.adb (Analyze_Iteration_Scheme): Fix typo.
3399 * gcc-interface/Make-lang.in: Update dependencies.
3401 2011-08-02 Javier Miranda <miranda@adacore.com>
3403 * sem_util.ads, sem_util.adb (Is_Variable): Add a new formal to
3404 determine if the analysis is performed using N or Original_Node (N).
3405 * exp_util.adb (Side_Effect_Free): Code cleanup since the new
3406 functionality of routine Is_Variable avoids code duplication.
3407 * checks.adb (Determine_Range): Handle temporaries generated by
3408 Remove_Side_Effects.
3410 2011-08-02 Javier Miranda <miranda@adacore.com>
3412 * exp_ch4.adb (Expand_N_Quantified_Expression): Force reanalysis and
3413 expansion of the condition. Required since the previous analysis was
3414 done with expansion disabled (see Resolve_Quantified_Expression) and
3415 hence checks were not inserted and record comparisons have not been
3418 2011-08-02 Ed Falis <falis@adacore.com>
3420 * s-taprop-vxworks.adb, s-intman-vxworks.adb, s-intman-vxworks.ads:
3423 2011-08-02 Bob Duff <duff@adacore.com>
3425 * opt.ads: Minor comment fix.
3427 2011-08-02 Bob Duff <duff@adacore.com>
3429 * sem_ch12.adb (Analyze_Package_Instantiation,
3430 Analyze_Subprogram_Instantiation): Turn off style checking while
3431 analyzing an instance. Whatever style checks that apply to the generic
3432 unit should apply, so it makes no sense to apply them in an instance.
3433 This was causing trouble when compiling an instance of a runtime
3434 unit that violates the -gnatyO switch.
3435 * stylesw.adb (Set_Style_Check_Options): "when 'O' =>" was missing from
3436 one of the two case statements, causing spurious errors.
3438 2011-08-02 Robert Dewar <dewar@adacore.com>
3440 * uname.adb: Minor reformatting.
3441 * gnatcmd.adb: Minor reformatting.
3442 * exp_attr.adb: Minor reformatting.
3444 2011-08-02 Ed Schonberg <schonberg@adacore.com>
3446 * exp_ch5.adb (Expand_N_Assignment_Statement): under restriction
3447 No_Dispatching_Calls, do not look for the Assign primitive, because
3448 predefined primitives are not created in this case.
3450 2011-08-02 Bob Duff <duff@adacore.com>
3452 * stylesw.ads: Minor comment fixes.
3454 2011-08-02 Robert Dewar <dewar@adacore.com>
3456 * freeze.adb (Add_To_Result): New procedure.
3458 2011-08-02 Jose Ruiz <ruiz@adacore.com>
3460 * exp_attr.adb (Find_Stream_Subprogram): When using a configurable run
3461 time, if the specific run-time routines for handling streams of strings
3462 are not available, use the default mechanism.
3464 2011-08-02 Arnaud Charlet <charlet@adacore.com>
3466 * s-regpat.ads: Fix typo.
3468 2011-08-02 Vincent Celier <celier@adacore.com>
3470 * prj-conf.adb (Get_Or_Create_Configuration_File): If On_Load_Config is
3471 not null, call it to create the in memory config project file without
3472 parsing an existing default config project file.
3474 2011-08-02 Eric Botcazou <ebotcazou@adacore.com>
3476 * atree.adb (Allocate_Initialize_Node): Remove useless temporaries.
3478 2011-08-02 Ed Schonberg <schonberg@adacore.com>
3480 * sem_elim.adb: an abstract subprogram does not need an eliminate
3481 pragma for its descendant to be eliminable.
3483 2011-08-02 Ed Falis <falis@adacore.com>
3485 * init.c: revert to handling before previous checkin for VxWorks
3486 * s-intman-vxworks.adb: delete unnecessary declarations related to
3487 using Ada interrupt facilities for handling signals.
3488 Delete Initialize_Interrupts. Use __gnat_install_handler instead.
3489 * s-intman-vxworks.ads: Import __gnat_install_handler as
3490 Initialize_Interrupts.
3491 * s-taprop-vxworks.adb: Delete Signal_Mask.
3492 (Abort_Handler): change construction of mask to unblock exception
3495 2011-08-02 Jerome Guitton <guitton@adacore.com>
3497 * a-except-2005.adb (Raise_From_Signal_Handler): Call
3498 Debug_Raise_Exception before propagation starts.
3500 2011-08-02 Eric Botcazou <ebotcazou@adacore.com>
3502 * exp_ch6.adb (Expand_Call): Guard restriction checks with a call
3503 to Restriction_Check_Required.
3504 * sem_ch3.adb (Analyze_Object_Declaration): Likewise.
3505 * sem_res.adb (Resolve_Call): Likewise.
3506 * sem_attr.adb (Check_Stream_Attribute): Likewise.
3508 2011-08-02 Bob Duff <duff@adacore.com>
3510 * stylesw.ads: Update comment.
3511 * style.adb: Minor: Use Error_Msg_NE instead of Error_Msg_N.
3512 * errout.ads: Remove obsolete comment.
3514 2011-08-02 Javier Miranda <miranda@adacore.com>
3516 * einfo.ads, einfo.adb (Is_Safe_To_Reevaluate): new function.
3517 (Set_Is_Safe_To_Reevaluate): new procedure.
3518 * sem_ch5.adb (Analyze_Assignment): Add one assertion to ensure that no
3519 assignment is allowed on safe-to-reevaluate variables.
3520 (Analyze_Iteration_Schine.Process_Bounds.One_Bound): Decorate the
3521 temporary created to remove side effects in expressions that use
3522 the secondary stack as safe-to-reevaluate.
3523 * exp_util.adb (Side_Effect_Free): Add missing code to handle well
3524 variables that are not true constants.
3526 2011-08-02 Robert Dewar <dewar@adacore.com>
3528 * sem_ch5.adb, sem_ch7.adb, einfo.ads, sem_util.adb, sem_util.ads,
3529 sem_res.adb, sem_ch6.adb: Minor reformatting.
3531 2011-08-02 Jerome Guitton <guitton@adacore.com>
3533 * a-except-2005.adb (Raise_Current_Excep): Remove obsolete dead code.
3535 2011-08-02 Ed Schonberg <schonberg@adacore.com>
3537 * sem_ch6.adb (New_Overloaded_Entity, Check_Overriding_Indicator): Do
3538 not set Overridden_Operation if subprogram is an initialization
3541 2011-08-02 Yannick Moy <moy@adacore.com>
3543 * par-ch6.adb: Correct obsolete name in comments
3544 * restrict.adb, restrict.ads (Check_Formal_Restriction): new function
3545 which takes two message arguments (existing function takes one), with
3546 second message used for continuation.
3547 * sem_ch5.adb (Analyze_Block_Statement): in formal mode, only reject
3548 block statements that originate from a source block statement, not
3549 generated block statements
3550 * sem_ch6.adb (Analyze_Function_Call): rename L into Actuals, for
3551 symmetry with procedure case
3552 * sem_ch7.adb (Check_One_Tagged_Type_Or_Extension_At_Most): new
3553 function to issue an error in formal mode if a package specification
3554 contains more than one tagged type or type extension.
3555 * sem_res.adb (Resolve_Actuals): in formal mode, check that actual
3556 parameters matching formals of tagged types are objects (or ancestor
3557 type conversions of objects), not general expressions. Issue an error
3558 on view conversions that are not involving ancestor conversion of an
3560 (Resolve_Type_Conversion): in formal mode, issue an error on the
3561 operand of an ancestor type conversion which is not an object
3562 * sem_util.adb, sem_util.ads (Find_Actual): extend the behavior of the
3563 procedure so that it works also for actuals of function calls
3564 (Is_Actual_Tagged_Parameter): new function which determines if its
3565 argument is an actual parameter of a formal of tagged type in a
3567 (Is_SPARK_Object_Reference): new function which determines if the tree
3568 referenced by its argument represents an object in SPARK
3570 2011-08-02 Robert Dewar <dewar@adacore.com>
3572 * sem_ch3.adb: Minor reformatting
3573 Minor comment addition
3574 Minor error msg text change
3576 2011-08-02 Javier Miranda <miranda@adacore.com>
3578 * sem_ch5.adb (Analyze_Iteration_Scheme.Uses_Secondary_Stack): New
3579 function. Used to be more precise when we generate a variable plus one
3580 assignment to remove side effects in the evaluation of the Bound
3582 (Analyze_Iteration_Scheme): Clean attribute analyzed in all the nodes
3583 of the bound expression to force its re-analysis and thus expand the
3584 associated transient scope (if required). Code cleanup replacing the
3585 previous code that declared the constant entity by an invocation to
3586 routine Force_Evaluation which centralizes this work in the frontend.
3588 2011-08-02 Robert Dewar <dewar@adacore.com>
3590 * einfo.adb (Is_Base_Type): Improve efficiency by using a flag table
3591 (Base_Type): Now uses improved Is_Base_Type function
3592 * einfo.ads (Base_Type): Inline this function
3594 2011-08-02 Robert Dewar <dewar@adacore.com>
3596 * sem_prag.adb (Analyze_Pragma): Defend against infinite recursion
3597 (Analyze_Aspect_Specifications): Fix Sloc values for constructed pragmas
3599 2011-08-02 Arnaud Charlet <charlet@adacore.com>
3601 * gcc-interface/Make-lang.in: Update dependencies.
3602 * gcc-interface/Makefile.in: Use s-inmapop-vxworks.adb for all VxWorks
3605 2011-08-02 Yannick Moy <moy@adacore.com>
3607 * par-ch3.adb (P_Delta_Constraint): issue an error in formal mode on
3608 non-simple expression used in delta constraint
3609 (P_Index_Or_Discriminant_Constraint): issue an error in formal mode on
3610 index constraint which is not a subtype mark
3611 * par.adb: With and use Restrict
3612 * sem_ch3.adb (Analyze_Component_Declaration): issue an error in formal
3613 mode on component type which is not a subtype mark and default
3614 expression on component
3615 (Analyze_Subtype_Declaration): issue an error in formal mode on subtype
3616 of string which does not have a lower index bound equal to 1
3617 (Array_Type_Declaration): issue an error in formal mode on index or
3618 component type which is not a subtype mark, and on aliased keyword on
3620 (Derived_Type_Declaration): issue an error in formal mode on interface,
3621 limited or abstract type
3622 (Record_Type_Declaration): issue an error in formal mode on interface
3623 (Record_Type_Definition): issue an error in formal mode on tagged types
3624 and type extensions not declared in the specification of a library unit
3625 package; on null non-tagged record; on variant part
3627 2011-08-02 Vincent Celier <celier@adacore.com>
3629 * prj-nmsc.adb (Check_Library_Attributes): Do not report Library_Dir
3630 not declared for qualified library project when Library_Name is not
3631 declared, but Library_Dir is.
3633 2011-08-02 Robert Dewar <dewar@adacore.com>
3635 * sem_ch13.adb (Analyze_Aspect_Specification): Fix slocs on generated
3636 pragmas (affects aspects [Component_]Default_Value
3637 (Check_Aspect_At_Freeze_Point): For Component_Default_Value, use
3638 component type for the resolution
3640 2011-08-02 Eric Botcazou <ebotcazou@adacore.com>
3642 * einfo.adb (Base_Type): Tune implementation for speed.
3644 2011-08-02 Robert Dewar <dewar@adacore.com>
3646 * freeze.adb: Minor reformatting.
3648 2011-08-02 Thomas Quinot <quinot@adacore.com>
3650 * scos.ads: Update comments.
3652 2011-08-02 Ed Schonberg <schonberg@adacore.com>
3654 * sem_ch3.adb (Build_Derived_Type): Inherit the convention from the
3655 base type, because the parent may be a subtype of a private type whose
3656 convention is established in a private part.
3658 2011-08-02 Hristian Kirtchev <kirtchev@adacore.com>
3660 * exp_ch6.adb (Expand_N_Extended_Return_Statement): Wrap the return
3661 statement in a block when the expansion of the return expression has
3662 created a finalization chain.
3663 * freeze.adb (Freeze_Expression): Alphabetize all choices associated
3664 with the parent node.
3665 Add N_Extended_Return_Statement to handle the case where a transient
3666 object declaration appears in the Return_Object_Declarations list of
3667 an extended return statement.
3669 2011-08-02 Matthew Gingell <gingell@adacore.com>
3671 * adaint.c (__gnat_is_symbolic_link_attr): Supress warning on possibly
3672 unused parameter 'name'.
3674 2011-08-02 Ed Schonberg <schonberg@adacore.com>
3676 * sem_elim.adb (Set_Eliminated): If the overridden operation is an
3677 inherited operation, check whether its alias, which is the source
3678 operastion that it renames, has been marked eliminated.
3680 2011-08-02 Javier Miranda <miranda@adacore.com>
3682 * exp_util.adb (Safe_Prefixed_Reference): Do not consider safe an
3683 in-mode parameter whose type is an access type since it can be used to
3684 modify its designated object. Enforce code that handles as safe an
3685 access type that is not access-to-constant but it is the result of a
3686 previous removal of side-effects.
3687 (Remove_Side_Effects): Minor code reorganization of cases which require
3688 no action. Done to incorporate documentation on new cases uncovered
3689 working in this ticket: no action needed if this routine was invoked
3690 too early and the nodes are not yet decorated.
3691 * sem_res.adb (Resolve_Slice): Minor code cleanup replacling two calls
3692 to routine Remove_Side_Effects by calls to Force_Evaluation since they
3693 were issued with actuals that are implicitly provided by
3696 2011-08-02 Robert Dewar <dewar@adacore.com>
3698 * sem_ch3.adb, sem_res.adb: Minor reformatting.
3700 2011-08-02 Yannick Moy <moy@adacore.com>
3702 * sem_attr.adb (Check_Formal_Restriction_On_Attribute): new procedure
3703 to issue an error in formal mode on attribute not supported in this mode
3704 (Analyze_Attribute): issue errors on standard attributes not supported
3706 * sem_ch3.adb (Modular_Type_Declaration): remove obsolete part of
3707 comment, and issue error in formal mode on modulus which is not a power
3709 (Process_Range_Expr_In_Decl): issue error in formal mode on non-static
3711 * sem_ch8.adb (Find_Type): issue error in formal mode on 'Base in
3713 * sem_res.adb (Resolve_Unary_Op): issue error in formal mode on unary
3714 operator on modular type (except 'not').
3716 2011-08-02 Robert Dewar <dewar@adacore.com>
3718 * gnat_rm.texi: Minor reformatting.
3720 2011-08-02 Arnaud Charlet <charlet@adacore.com>
3722 * s-osinte-linux.ads: Minor comment update and reformatting.
3723 * i-cexten.ads: Make this unit pure, as for its parent.
3724 Will allow its usage in more contexts if needed.
3726 2011-08-02 Robert Dewar <dewar@adacore.com>
3728 * s-utf_32.ads: Minor comment fix.
3730 2011-08-02 Ed Schonberg <schonberg@adacore.com>
3732 * sem_res.adb (Resolve_Actuals): if the subprogram is a primitive
3733 operation of a tagged synchronized type, handle the case where the
3734 controlling argument is overloaded.
3736 2011-08-02 Yannick Moy <moy@adacore.com>
3738 * gnat_rm.texi, opt.ads, sem_prag.adb, snames.ads-tmpl:
3739 Replace pragma SPARK_95 with pragma Restrictions (SPARK)
3740 * par-prag.adb (Process_Restrictions_Or_Restriction_Warnings): set
3741 SPARK mode and formal verification mode on processing SPARK restriction
3742 * s-rident.ads (Restriction_Id): add SPARK restriction in those not
3743 requiring consistency checking.
3745 2011-08-02 Robert Dewar <dewar@adacore.com>
3747 * sem_res.adb: Minor reformatting.
3749 2011-08-02 Robert Dewar <dewar@adacore.com>
3751 * a-cfdlli.ads, a-cfhase.ads, a-cforma.ads, a-cfhama.ads,
3752 a-cforse.ads: Remove unneeded with of Ada.Containers
3753 Remove commented out pragma Inline's
3754 Move specifications of new subprograms to the actual specs
3756 2011-08-02 Yannick Moy <moy@adacore.com>
3758 * a-cfdlli.ads, a-cfhase.ads, a-cforma.ads, a-cfhama.ads,
3759 a-cforse.ads: Update comments.
3761 2011-08-02 Ed Schonberg <schonberg@adacore.com>
3763 * sem_attr.adb: add attribute name when 'Result has the wrong prefix.
3765 2011-08-02 Robert Dewar <dewar@adacore.com>
3767 * a-cfdlli.ads, a-cfhase.ads, a-cforma.ads, a-cfhama.ads,
3768 a-cforse.ads, a-cofove.ads: Minor reformatting.
3770 2011-08-02 Claire Dross <dross@adacore.com>
3772 * a-cfdlli.ads, a-cfhase.ads, a-cforma.ads, a-cfhama.ads, a-cforse.ads,
3773 a-cofove.ads: Add comments.
3775 2011-08-02 Yannick Moy <moy@adacore.com>
3777 * gnat_rm.texi: Document formal containers.
3779 2011-08-02 Emmanuel Briot <briot@adacore.com>
3781 * g-comlin.adb (Goto_Section, Getopt): fix handling of "*" when there
3784 2011-08-02 Robert Dewar <dewar@adacore.com>
3786 * mlib-prj.adb, restrict.ads, sem_aggr.adb, sem_ch12.adb: Minor
3789 2011-08-02 Robert Dewar <dewar@adacore.com>
3791 * aspects.adb: New aspects Default_Value and Default_Component_Value
3792 New format of Aspect_Names table checks for omitted entries
3793 * aspects.ads: Remove mention of Aspect_Cancel and add documentation on
3794 handling of boolean aspects for derived types.
3795 New aspects Default_Value and Default_Component_Value
3796 New format of Aspect_Names table checks for omitted entries
3797 * einfo.ads, einfo.adb (Has_Default_Component_Value): New flag
3798 (Has_Default_Value): New flag
3799 (Has_Default_Component_Value): New flag
3800 (Has_Default_Value): New flag
3801 * par-ch13.adb (P_Aspect_Specifications): New format of Aspect_Names
3803 * par-prag.adb: New pragmas Default_Value and Default_Component_Value
3804 * sem_ch13.adb (Analyze_Aspect_Specifications): New aspects
3805 Default_Value and Default_Component_Value
3806 * sem_prag.adb: New pragmas Default_Value and Default_Component_Value
3807 New aspects Default_Value and Default_Component_Value
3808 * snames.ads-tmpl: New pragmas Default_Value and Default_Component_Value
3809 * sprint.adb: Print N_Aspect_Specification node when called from gdb
3811 2011-08-02 Vincent Celier <celier@adacore.com>
3813 * prj-nmsc.adb (Check_Library_Attributes): For virtual library project,
3814 inherit library kind.
3816 2011-08-02 Ed Schonberg <schonberg@adacore.com>
3818 * sem_res.adb: Add guards in calls to Matching_Static_Array_Bounds.
3821 2011-08-02 Robert Dewar <dewar@adacore.com>
3823 * i-cstrin.ads: Updates to make Interfaces.C.Strings match RM
3825 2011-08-02 Yannick Moy <moy@adacore.com>
3827 * sem_aggr.adb (Resolve_Aggregate): Fix thinko.
3829 2011-08-02 Robert Dewar <dewar@adacore.com>
3831 * impunit.adb: Add comment.
3833 2011-08-02 Yannick Moy <moy@adacore.com>
3835 * sem_aggr.adb (Check_Qualified_Aggregate): new procedure which checks
3836 qualification of aggregates in formal mode
3837 (Is_Top_Level_Aggregate): returns True for an aggregate not contained in
3839 (Resolve_Aggregate): complete the test that an aggregate is adequately
3840 qualified in formal mode
3842 2011-08-02 Pascal Obry <obry@adacore.com>
3844 * make.adb, bindgen.adb, gnatbind.adb: Minor reformatting.
3845 * mlib-prj.adb: Supress warning when compiling binder generated file.
3846 (Build_Library): Supress all warnings when compiling the binder
3849 2011-08-02 Yannick Moy <moy@adacore.com>
3851 * errout.adb, errout.ads (Check_Formal_Restriction): move procedure
3853 * restrict.adb, restrict.ads (Check_Formal_Restriction): ...to here
3854 * sem_aggr.adb, sem_ch5.adb, sem_util.adb:
3855 Add with/use clauses to make Check_Formal_Restriction visible
3857 2011-08-02 Ed Schonberg <schonberg@adacore.com>
3859 * sem_ch12.adb (Check_Generic_Actuals): handle properly actual
3860 in-parameters when type of the generic formal is private in the generic
3861 spec and non-private in the body.
3863 2011-08-02 Claire Dross <dross@adacore.com>
3865 * a-cfdlli.adb, a-cfdlli.ads, a-cfhase.adb, a-cfhase.ads, a-cfhama.adb,
3866 a-cfhama.ads, a-cforse.adb, a-cforse.ads, a-cforma.adb, a-cforma.ads,
3867 a-cofove.adb, a-cofove.ads: New files implementing formal containers.
3868 * impunit.adb, Makefile.rtl: Take new files into account.
3870 2011-08-02 Robert Dewar <dewar@adacore.com>
3872 * sem_aggr.adb, sem_ch3.adb, sem_ch5.adb, make.adb, sem_res.adb,
3873 sem_attr.adb, sem_ch6.adb, sem_ch8.adb: Minor reformatting.
3875 2011-08-02 Yannick Moy <moy@adacore.com>
3877 * sem_aggr.adb (Resolve_Aggregate): disable incorrectly placed check in
3879 * sem_util.adb (Matching_Static_Array_Bounds): proper detection of
3880 matching static array bounds, taking into account the special case of
3882 * sem_ch3.adb: Typo in comment.
3884 2011-08-02 Yannick Moy <moy@adacore.com>
3886 * errout.adb, errout.ads (Check_Formal_Restriction): new procedure
3887 which issues an error in formal mode if its argument node is originally
3889 * sem_ch3.adb (Analyze_Full_Type_Declaration): move test that a type
3890 has a discriminant specification so that it does not include the case
3892 (Derived_Type_Declaration): move here the test that a derived type has a
3893 discriminant specification
3894 * sem_aggr.adb (Resolve_Record_Aggregate): test the presence of the
3895 first element of a component association before accessing its choices
3896 (presence of component association is not enough)
3897 * exp_ch6.adb (Expand_N_Subprogram_Declaration): test if a subprogram
3898 declaration is a library item before accessing the next element in a
3899 list, as library items are not member of lists
3900 * sem_attr.adb, sem_ch11.adb, sem_ch4.adb, sem_ch5.adb, sem_ch6.adb,
3901 sem_ch8.adb, sem_ch9.adb, sem_res.adb, sem_util.adb: use
3902 Check_Formal_Restriction whenever possible.
3904 2011-08-02 Ed Schonberg <schonberg@adacore.com>
3906 * sem_ch3.adb (Find_Type_Of_Object): In ASIS mode, create an itype
3907 reference when needed.
3909 2011-08-02 Bob Duff <duff@adacore.com>
3911 * gnat_ugn.texi: Fix typo.
3913 2011-08-02 Vincent Celier <celier@adacore.com>
3915 * make.adb (Gnatmake): Use MLib.Tgt.Archive_Ext as the extension of
3916 archive file name. Do not use the full path name of archives for Open
3919 2011-08-02 Robert Dewar <dewar@adacore.com>
3921 * sem_ch12.adb, sem_ch11.adb: New calling sequence for
3922 Analyze_Aspect_Specifications
3924 (Analyze_Aspect_Specifications): New handling for boolean aspects
3925 * sem_ch13.ads (Analyze_Aspect_Specifications): New calling sequence
3926 * sem_ch3.adb, sem_ch6.adb, sem_ch7.adb, sem_ch9.adb: New calling
3927 sequence for Analyze_Aspect_Specifications
3928 * sem_prag.adb (Analyze_Pragma): Remove use of Aspect_Cancel entirely
3929 * sinfo.ads, sinfo.adb (Aspect_Cancel): Remove, no longer used
3931 2011-08-02 Robert Dewar <dewar@adacore.com>
3933 * freeze.adb (Freeze_Entity): Remove handling of delayed boolean
3934 aspects, since these no longer exist.
3936 2011-08-02 Robert Dewar <dewar@adacore.com>
3938 * par-ch13.adb (Aspect_Specifications_Present): Always return false on
3939 semicolon, do not try to see if there are aspects following it.
3940 * par-ch3.adb (P_Declarative_Items): Better message for unexpected
3943 2011-08-02 Robert Dewar <dewar@adacore.com>
3945 * sem_ch8.adb, aspects.ads: Minor reformatting.
3947 2011-08-02 Eric Botcazou <ebotcazou@adacore.com>
3949 * sem_ch13.ads (Analyze_Aspect_Specification): Add pragma Inline.
3950 * sem_ch13.adb (Analyze_Non_Null_Aspect_Specifications): New procedure
3952 (Analyze_Aspect_Specifications): ...here. Call above procedure.
3954 2011-08-02 Yannick Moy <moy@adacore.com>
3956 * exp_ch6.adb (Expand_N_Subprogram_Declaration): issue error in formal
3957 mode on subprogram declaration outside of package specification, unless
3958 it is followed by a pragma Import
3959 * sem_ch3.adb (Access_Definition, Access_Subprogram_Declaration,
3960 Access_Type_Declaration): issue error in formal mode on access type
3961 (Analyze_Incomplete_Type_Decl): issue error in formal mode on
3963 (Analyze_Object_Declaration): issue error in formal mode on object
3964 declaration which does not respect SPARK restrictions
3965 (Analyze_Subtype_Declaration): issue error in formal mode on subtype
3966 declaration which does not respect SPARK restrictions
3967 (Constrain_Decimal, Constrain_Float, Constrain_Ordinary_Fixed): issue
3968 error in formal mode on digits or delta constraint
3969 (Decimal_Fixed_Point_Type_Declaration): issue error in formal mode on
3970 decimal fixed point type
3971 (Derived_Type_Declaration): issue error in formal mode on derived type
3972 other than type extensions of tagged record types
3973 * sem_ch6.adb (Process_Formals): remove check in formal mode, redundant
3974 with check on access definition
3975 * sem_ch9.adb (Analyze_Protected_Definition): issue error in formal
3976 mode on protected definition.
3977 (Analyze_Task_Definition): issue error in formal mode on task definition
3979 2011-08-02 Robert Dewar <dewar@adacore.com>
3981 * make.adb, sem_ch8.adb, s-inmaop-vxworks.adb: Minor reformatting.
3983 2011-08-02 Javier Miranda <miranda@adacore.com>
3985 * sem_ch6.adb (Can_Override_Operator): New function.
3986 (Verify_Overriding_Indicator): Add missing code to check overriding
3987 indicator in operators. Fixes regression.
3988 (Check_Overriding_Indicator): Minor reformating after replacing the
3989 code that evaluates if the subprogram can override an operator by
3990 invocations to the above new function.
3992 (Write_Field26_Name): Add missing code to ensure that, following
3993 the documentation in einfo.ads, this field is not shown as attribute
3994 "Static_Initialization" on non-dispatching functions.
3996 2011-08-02 Jose Ruiz <ruiz@adacore.com>
3998 * sem_res.adb (Resolve_Call): A call to
3999 Ada.Real_Time.Timing_Events.Set_Handler violates restriction
4000 No_Relative_Delay (AI-0211) only when it sets a relative timing event,
4001 i.e., when the second parameter is of type Time_Span.
4003 2011-08-02 Vincent Celier <celier@adacore.com>
4005 * make.adb (Gnatmake): use <library dir>/lib<library name>.a to link
4006 with an archive instead of -L<library dir> -l<library name>.
4008 2011-08-02 Ed Schonberg <schonberg@adacore.com>
4010 * sem_ch8.adb (Analyze_Use_Type): If the clause is being re-analyzed,
4011 mark the base types In_Use in addition to making the operations
4014 2011-08-02 Ed Falis <falis@adacore.com>
4016 * init.c: add and setup __gnat_signal_mask for the exception signals
4017 * s-inmaop-vxworks.adb: new file.
4018 * s-intman-vxworks.adb: remove unnecessary initializations and
4020 * s-intman-vxworks.ads: remove unnecessary variable
4021 * s-taprop-vxworks.adb: simplify signal initialization
4023 2011-08-02 Robert Dewar <dewar@adacore.com>
4025 * sem_ch8.adb: Minor code reorganization, comment updates.
4027 2011-08-02 Robert Dewar <dewar@adacore.com>
4029 * sem_res.adb (Matching_Static_Array_Bounds): Moved to Sem_Util
4030 * sem_util.ads, sem_util.adb (Matching_Static_Array_Bounds): Moved
4032 (Matching_Static_Array_Bounds): Use Is_Ok_Static_Expression
4033 (Matching_Static_Array_Bounds): Moved here from Sem_Res
4035 2011-08-02 Ed Schonberg <schonberg@adacore.com>
4037 * atree.h, atree.ads, atree.adb: New subprograms to manipulate Elist5.
4038 * par_ch8.adb (P_Use_Type): initialize Used_Operations for node.
4039 * sinfo.ads, sinfo.adb (Used_Operations): new attribute of
4040 use_type_clauses, to handle more efficiently use_type and use_all_type
4042 * sem_ch8.adb: Rewrite Use_One_Type and End_Use_Type to handle the
4043 Ada2012 Use_All_Type clause.
4044 (Use_Class_Wide_Operations): new procedure.
4046 2011-08-02 Robert Dewar <dewar@adacore.com>
4048 * exp_util.adb, par-ch10.adb, par-ch6.adb, sem.adb, sem_ch6.adb,
4049 sem_ch6.ads, sinfo.adb, sinfo.ads, sprint.adb: Change parameterized
4050 expression to expression function.
4052 2011-08-02 Ed Schonberg <schonberg@adacore.com>
4054 * sem_ch4.adb: transform simple Ada2012 membership into equality only
4055 if types are compatible.
4057 2011-08-02 Yannick Moy <moy@adacore.com>
4059 * sem_res.adb (Matching_Static_Array_Bounds): new function which
4060 returns True if its argument array types have same dimension and same
4061 static bounds at each index.
4062 (Resolve_Actuals): issue an error in formal mode on actuals passed as
4063 OUT or IN OUT paramaters which are not view conversions in SPARK.
4064 (Resolve_Arithmetic_Op): issue an error in formal mode on
4065 multiplication or division with operands of fixed point types which are
4066 not qualified or explicitly converted.
4067 (Resolve_Comparison_Op): issue an error in formal mode on comparisons of
4068 Boolean or array type (except String) operands.
4069 (Resolve_Equality_Op): issue an error in formal mode on equality
4070 operators for array types other than String with non-matching static
4072 (Resolve_Logical_Op): issue an error in formal mode on logical operators
4073 for array types with non-matching static bounds. Factorize the code in
4074 Matching_Static_Array_Bounds.
4075 (Resolve_Qualified_Expression): issue an error in formal mode on
4076 qualified expressions for array types with non-matching static bounds.
4077 (Resolve_Type_Conversion): issue an error in formal mode on type
4078 conversion for array types with non-matching static bounds
4080 2011-08-02 Robert Dewar <dewar@adacore.com>
4082 * par-ch10.adb: Minor code reorganization (use Nkind_In).
4084 2011-08-02 Ed Schonberg <schonberg@adacore.com>
4086 * par-ch9.adb: save location of entry for proper error message.
4088 2011-08-02 Javier Miranda <miranda@adacore.com>
4090 * sem_type.ads, sem_type.adb (Is_Ancestor): Addition of a new formal
4091 (Use_Full_View) which permits this routine to climb through the
4092 ancestors using the full-view of private parents.
4093 * sem_util.adb (Collect_Interfaces_Info, Implements_Interface): Set
4094 Use_Full_View to true in calls to Is_Ancestor.
4095 * sem_disp.adb (Override_Dispatching_Operation): Set Use_Full_View to
4096 true in call to Is_Ancestor.
4097 * exp_ch3.adb (Build_Offset_To_Top_Functions, Initialize_Tag): Set
4098 Use_Full_View to true in call to Is_Ancestor.
4099 * exp_ch7.adb (Controller_Component): Set Use_Full_View to true in
4100 call to Is_Ancestor.
4101 * exp_ch4.adb (Expand_N_Type_Conversion, Tagged_Membership): Set
4102 Use_Full_View to true in calls to Is_Ancestor.
4103 * exp_disp.adb (Expand_Interface_Actuals, Make_Secondary_DT, Make_DT,
4104 Make_Select_Specific_Data_Table, Register_Primitive,
4105 Set_All_DT_Position): Set Use_Full_View to true in calls to Is_Ancestor.
4106 * exp_intr.adb (Expand_Dispatching_Constructor_Call): Set Use_Full_View
4107 to true in call to Is_Ancestor.
4108 * exp_util.adb (Find_Interface_ADT, Find_Interface_Tag): Set
4109 Use_Full_View to true in calls to Is_Ancestor.
4111 (Write_Call_Info): Set Use_Full_View to true in call to Is_Ancestor.
4112 (Write_Type_Info): Set Use_Full_View to true in call to Is_Ancestor.
4114 2011-08-02 Robert Dewar <dewar@adacore.com>
4116 * gnat_rm.texi: Minor reformatting.
4117 * sem_prag.adb: Minor reformatting.
4119 2011-08-02 Tristan Gingold <gingold@adacore.com>
4121 * vms_data.ads: Add VMS qualifier for -gnateP.
4123 2011-08-02 Robert Dewar <dewar@adacore.com>
4125 * par-ch13.adb (P_Aspect_Specification): New meaning of Decl = Empty
4126 * par-ch7.adb (P_Package): Proper placement of aspects for package
4128 * par-endh.adb (Check_End): Ad Is_Sloc parameter
4129 (End_Statements): Add Is_Sloc parameterr
4130 * par.adb (P_Aspect_Specification): New meaning of Decl = Empty
4131 (Check_End): Ad Is_Sloc parameter
4132 (End_Statements): Add Is_Sloc parameterr
4134 2011-08-02 Vincent Celier <celier@adacore.com>
4136 * ug_words: Add VMS qualifier equivalent to -gnateP:
4137 /SYMBOL_PREPROCESSING.
4139 2011-08-02 Jose Ruiz <ruiz@adacore.com>
4141 * gnat-style.texi: For hexadecimal numeric literals the typical
4142 grouping of digits is 4 to represent 2 bytes.
4143 A procedure spec which is split into several lines is indented two
4146 2011-08-02 Yannick Moy <moy@adacore.com>
4148 * exp_aggr.adb (Is_Others_Aggregate): move function to other unit.
4149 * sem_aggr.adb, sem_aggr.ads (Is_Others_Aggregate): move function here
4150 (Resolve_Aggregate): issue errors in formal modes when aggregate is not
4152 (Resolve_Array_Aggregate): issue errors in formal modes on non-static
4153 choice in array aggregate
4154 (Resolve_Extension_Aggregate): issue errors in formal modes on subtype
4156 (Resolve_Record_Aggregate): issue errors in formal modes on mixed
4157 positional and named aggregate for record, or others in record
4158 aggregate, or multiple choice in record aggregate
4159 * sem_res.adb (Resolve_Logical_Op): issue errors in formal mode when
4160 array operands to logical operations AND, OR and XOR do not have the
4161 same static lower and higher bounds
4162 * sem_ch5.adb, sinfo.ads: Correct typos in comments
4164 2011-08-01 Robert Dewar <dewar@adacore.com>
4166 * sem_util.ads, sem_util.adb, sem_ch6.adb (Last_Source_Statement):
4167 Replaces Last_Source_Node_In_Sequence.
4168 * err_vars.ads (Error_Msg_Lang): 16 is OK, don't need 4K
4169 * errout.adb (Set_Error_Msg_Lang): Takes arg with no parens, but stores
4170 parens and blank in string (this was inconsistently implemented).
4172 (Set_Error_Msg_Lang): Takes arg with no parens, but stores parens and
4173 blank in string (this was inconsistently implemented).
4175 (Set_Global_Switches): Set formal mode switches appropriately
4176 * opt.ads, opt.adb: Formal mode is now global switches, more consistent
4178 (Analyze_Pragma, case SPARK_95): Set opt switches appropriately and
4179 call Set_Error_Msg_Lang to set "spark" as language name.
4180 * par.adb: Remove unnecessary call to set formal language for errout
4181 * sem_prag.adb (P_Pragma, case SPARK_95): Set opt switches
4182 appropriately and call Set_Error_Msg_Lang to set "spark" as language
4184 * sem_ch4.adb (Analyze_Concatenation_Operand): remove procedure and
4185 calls to it, moved after resolution so that types are known
4186 * sem_res.adb (Resolve_Op_Concat): issue an error in formal mode if
4187 result of concatenation is not of type String
4188 (Resolve_Op_Concat_Arg): issue an error in formal mode if an operand of
4189 concatenation is not properly restricted
4190 * gnat_rm.texi: Add doc on pragma Spark_95.
4191 * gcc-interface/Makefile.in: Remove obsolete target pairs for
4192 Interfaces.C.* on VMS. Remove s-parame-vms-restrict.ads.
4193 * gcc-interface/Make-lang.in: Update dependencies.
4195 2011-08-01 Javier Miranda <miranda@adacore.com>
4197 * sem_disp.adb (Override_Dispatching_Operation): Enforce strictness of
4198 condition that detects if the overridden operation must replace an
4201 2011-08-01 Javier Miranda <miranda@adacore.com>
4203 * exp_ch4.adb (Expand_N_Case_Expression): Propagate to the expanded
4204 code declarations inserted by Insert_Actions in each alternative of the
4205 N_Case_Expression node.
4207 2011-08-01 Robert Dewar <dewar@adacore.com>
4209 * sem_ch6.adb: Minor code reorganization.
4210 * sem_util.adb: Minor reformatting.
4212 2011-08-01 Pascal Obry <obry@adacore.com>
4214 * prj-env.adb: Remove <prefix>/lib/gpr/<target> project search path.
4215 * gnat_ugn.texi: Add documentation for VERSIONINFO Windows resource.
4217 2011-08-01 Yannick Moy <moy@adacore.com>
4219 * par-ch4.adb (P_Name): issue a syntax error in SPARK mode on character
4220 literal or operator symbol which is prefixed
4221 * sem_attr.adb (Analyze_Access_Attribute): issue an error in formal
4222 mode on access attributes.
4223 * sem_ch4.adb (Analyze_Concatenation_Operand): new procedure to check
4224 that concatenation operands are properly restricted in formal mode
4225 (Analyze_Concatenation, Analyze_Concatenation_Rest): call new procedure
4226 Analyze_Concatenation_Operand. Issue an error in formal mode if the
4227 result of the concatenation has a type different from String.
4228 (Analyze_Conditional_Expression, Analyze_Explicit_Dereference,
4229 Analyze_Quantified_Expression, Analyze_Slice,
4230 Analyze_Null): issue an error in formal mode on unsupported constructs
4232 (Analyze_Block_Statement): only issue error on source block statement
4233 * sem_util.ads, sem_util.adb (Last_Source_Node_In_Sequence): new
4234 function which returns the last node in a list of nodes for which
4235 Comes_From_Source returns True, if any
4236 * sem_ch6.adb (Check_Missing_Return): minor refactoring to use
4237 Last_Source_Node_In_Sequence
4238 * sem_ch8.adb (Analyze_Exception_Renaming, Analyze_Generic_Renaming,
4239 Analyze_Object_Renaming, Analyze_Use_Package): issue an error in formal
4240 mode on unsupported constructs
4241 * sem_ch9.adb Do not return after issuing error in formal mode, as the
4242 rest of the actions may be needed later on since the error is marked as
4244 * sinfo.ads: Typos in comments.
4246 2011-08-01 Pascal Obry <obry@adacore.com>
4248 * projects.texi: Minor editing.
4250 2011-08-01 Yannick Moy <moy@adacore.com>
4252 * err_vars.ads (Error_Msg_Lang, Error_Msg_Langlen): new variables for
4253 insertion character ~~
4254 * errout.ads, errout.adb (Formal_Error_Msg_...): remove procedures
4255 (Set_Error_Msg_Lang): new procedure which fixes the language for use
4256 with insertion character ~~
4257 (Set_Msg_Text): treat insertion character ~~
4258 * par-ch4.adb, par-ch5.adb, par-endh.adb, sem_attr.adb, sem_ch11.adb,
4259 sem_ch3.adb, sem_ch5.adb, sem_ch9.adb, sem_util.adb: Replace calls to
4260 Formal_Error_Msg_... procedures by equivalent Error_Msg_...
4261 procedures. Favor calls to Error_Msg_F(E) over Error_Msg_N(E). Make
4262 errors related to the formal language restriction not serious
4263 (insertion character |).
4264 * par.adb (Par): set formal language for error messages if needed
4265 * sem_ch6.adb (Check_Missing_Return): take into account possible
4266 generated statements at the end of the function
4267 * snames.ads-tmpl (Name_SPARK_95, Pragma_SPARK_95): new variable and
4268 enumeration value to define a new pragma SPARK_95
4269 * opt.ads, opt.adb (SPARK_Version_Type, SPARK_Version_Default,
4270 SPARK_Version): new type and variables to store the SPARK version
4272 (SPARK_Mode): return True when SPARK_Version is set
4273 * par-prag.adb: Correct indentation
4274 (Prag): take Pragma_SPARK_95 into account
4275 * sem_prag.adb (Set_Mechanism_Value, Sig_Flags): take Pragma_SPARK_95
4278 2011-08-01 Robert Dewar <dewar@adacore.com>
4280 * sem_ch3.adb, sem_ch3.ads, sem_ch5.adb, prj-part.adb, par-ch4.adb,
4281 sem_util.adb, sem_ch4.adb, sem_ch6.adb, sem_ch6.ads, sem_ch8.adb,
4282 sem_ch8.ads, sem_ch13.ads, par-ch5.adb, prj-env.ads: Minor reformatting
4284 2011-08-01 Pascal Obry <obry@adacore.com>
4286 * prj-part.ads, prj-part.adb (Parse): Add Target_Name parameter. Pass
4287 Target_Name to Get_Path call.
4288 (Parse_Single_Project): Likewise.
4289 (Post_Parse_Context_Clause): Likewise.
4290 * prj-env.ads, prj-env.adb (Find_Project): Add Target_Name parameter.
4291 Call Initialise_Project_Path with the proper Target_Name.
4292 (Initialize_Project_Path): Add <gnat_root>/<target_name>/lib/gnat
4294 (Get_Path): Add Target_Name parameter. Call Initialise_Project_Path
4295 with the proper Target_Name.
4296 * prj-conf.adb (Get_Or_Create_Configuration_File): Pass Target_Name to
4298 (Parse_Project_And_Apply_Config): Likewise.
4299 * prj-makr.adb (Initialize): Pass empty Target_Name to Parse routine.
4300 This is fine as this part of the code is supporting only native
4302 * prj-pars.adb (Parse): Pass empty Target_Name to Parse routine. This
4303 is fine as this part of the code is supporting only native compilation.
4305 2011-08-01 Yannick Moy <moy@adacore.com>
4307 * sem_util.adb (Enter_Name): issue error in formal mode on declaration
4308 of homonym, unless the homonym is one of the cases allowed in SPARK
4309 * par-ch5.adb (Parse_Decls_Begin_End): issue error in SPARK mode for
4310 package declaration occurring after a body.
4312 2011-08-01 Robert Dewar <dewar@adacore.com>
4314 * checks.adb, exp_ch4.adb: Minor reformatting.
4316 2011-08-01 Javier Miranda <miranda@adacore.com>
4318 * einfo.ads (Access_Disp_Table): Fix documentation.
4319 (Dispatch_Table_Wrappers): Fix documentation.
4321 2011-08-01 Pascal Obry <obry@adacore.com>
4323 * prj-env.adb, prj-env.ads: Minor reformatting.
4325 2011-08-01 Yannick Moy <moy@adacore.com>
4327 * sem_util.ads, sem_util.adb, par.adb, par_util.adb
4328 (Formal_Error_Msg, Formal_Error_Msg_N, Formal_Error_Msg_SP): move
4329 procedures out of these packages.
4330 * errout.ads, errout.adb
4331 (Formal_Error_Msg, Formal_Error_Msg_N, Formal_Error_Msg_SP): move
4332 procedures in of this package
4333 (Formal_Error_Msg_NE): new procedure for wrapper on Error_Msg_NE
4334 * par-ch5.adb (Parse_Decls_Begin_End): issue syntax error in SPARK mode
4335 on misplaced later vs initial declarations, like in Ada 83
4336 * sem_attr.adb (Processing for Analyze_Attribute): issue error in
4337 formal mode on attribute of private type whose full type declaration
4339 * sem_ch3.adb (Analyze_Declarations): issue error in formal mode on a
4340 package declaration inside a package specification
4341 (Analyze_Full_Type_Declaration): issue error in formal mode on
4342 controlled type or discriminant type
4343 * sem_ch6.adb (Analyze_Subprogram_Specification): only issue error on
4344 user-defined operator means that it should come from the source
4345 (New_Overloaded_Entity): issue error in formal mode on overloaded
4347 * sem_ch6.ads, sem_ch13.ads: typos in comments.
4349 2011-08-01 Thomas Quinot <quinot@adacore.com>
4351 * atree.adb: Minor reformatting.
4352 * checks.adb: Minor reformatting.
4354 2011-08-01 Vincent Celier <celier@adacore.com>
4356 * s-parame-vms-ia64.ads: Fix typo in comment
4358 * s-parame-vms-restrict.ads: Removed, unused.
4360 2011-08-01 Javier Miranda <miranda@adacore.com>
4363 (Is_Variable_Size_Array): Remove local subprogram Is_Constant_Bound.
4365 (Constrain_Index): Remove side effects in the evaluation of the bounds.
4366 * sem_ch3.ads, sem_ch3.adb
4367 (Is_Constant_Bound): New extended version of the subprogram that was
4368 previously located inside function Exp_Ch3.Is_Variable_Size_Array.
4369 Moved here since it is shared by routines of sem_ch3 and exp_ch3.
4370 * sem_aux.ads (Constant_Value): Fix typo in comment.
4371 * checks.adb (Generate_Index_Checks): New implementation which, for
4372 array objects with constant bounds, generates the runtime check
4373 referencing the bounds of the array type. For other cases this routine
4374 provides its previous behavior obtaining such values from the array
4376 * sem_res.adb (Set_Slice_Subtype): Link a copied range subtree with its
4378 * atree.adb (New_Copy): Reset flag Is_Overloaded in the new copy since
4379 we cannot have semantic interpretations of the new node.
4381 2011-08-01 Ed Schonberg <schonberg@adacore.com>
4383 * sem_ch6.adb (Fully_Conformant_Expressions): handle quantified
4386 2011-08-01 Arnaud Charlet <charlet@adacore.com>
4388 * sem_ch8.adb: Minor code editing.
4389 * s-vxwext.adb: Remove trailing space.
4390 * freeze.adb, freeze.ads, errout.ads, erroutc.adb: Fix GPLv3 header for
4391 consistency with other files.
4393 2011-08-01 Thomas Quinot <quinot@adacore.com>
4395 * s-auxdec.ads, s-auxdec-vms_64.ads: Minor reformatting.
4397 2011-08-01 Ed Schonberg <schonberg@adacore.com>
4399 * par-ch10.adb: reject parameterized expressions as compilation unit.
4400 * sem_ch4.adb: handle properly conditional expression with overloaded
4401 then_clause and no else_clause.
4403 2011-08-01 Tristan Gingold <gingold@adacore.com>
4405 * s-parame-vms-alpha.ads, s-parame-vms-ia64.ads: Redeclare C_Address
4406 like done by System.Aux_DEC.
4407 * env.c (__gnat_setenv) [VMS]: Put logicals into LNM$PROCESS table.
4409 2011-08-01 Yannick Moy <moy@adacore.com>
4411 * par-endh.adb (Check_End): issue a syntax error in SPARK mode for
4412 missing label at end of declaration (subprogram or package)
4413 * par-ch4.adb (P_Name): issue a syntax error in SPARK mode for mixing
4414 of positional and named parameter association
4415 * par.adb, par-util.adb (Formal_Error_Msg_SP): new wrapper on
4416 Error_Msg_SP which adds a prefix to the error message giving the name
4417 of the formal language analyzed
4418 * sem_ch6.adb (Analyze_Return_Type): issue an error in formal mode for
4419 access result type in subprogram, unconstrained array as result type,.
4420 (Analyze_Subprogram_Declaration): issue an error in formal mode for null
4422 * sem_ch8.adb: Code clean up.
4424 2011-08-01 Javier Miranda <miranda@adacore.com>
4426 * sem_ch7.adb (Uninstall_Declarations): Remove useless code.
4427 * einfo.ads (Access_Disp_Table): Fix documentation.
4428 (Dispatch_Table_Wrappers): Fix documentation.
4429 * einfo.adb (Access_Disp_Table, Dispatch_Table_Wrappers,
4430 Set_Access_Disp_Table, Set_Dispatch_Table_Wrappers): Fix the assertions
4431 to enforce the documentation of this attribute.
4432 (Set_Is_Interface): Cleanup the assertion.
4433 * exp_ch4.adb (Expand_Allocator_Expression, Tagged_Membership): Locate
4434 the Underlying_Type entity before reading attribute Access_Disp_Table.
4435 * exp_disp.adb (Expand_Dispatching_Call, Expand_Interface_Conversion):
4436 Locate the Underlying_Type before reading attribute Access_Disp_Table.
4437 * exp_aggr.adb (Build_Array_Aggr_Code, Build_Record_Aggr_Code): Locate
4438 the Underlying_Type entity before reading attribute Access_Disp_Table.
4439 * exp_ch3.adb (Build_Record_Init_Proc, Expand_N_Object_Declaration):
4440 Locate the Underlying_Type entity before reading attribute
4443 2011-08-01 Ed Schonberg <schonberg@adacore.com>
4445 * s-poosiz.ads: Additional overriding indicators.
4447 2011-08-01 Yannick Moy <moy@adacore.com>
4449 * sem_ch5.adb (Analyze_Exit_Statement): add return after error in
4451 (Analyze_Iteration_Scheme): issue error in formal mode when loop
4452 parameter specification does not include a subtype mark.
4453 * sem_ch6.adb (Analyze_Abstract_Subprogram_Declaration): issue error in
4454 formal mode on abstract subprogram.
4455 (Analyze_Subprogram_Specification): issue error in formal mode on
4456 user-defined operator.
4457 (Process_Formals): issue error in formal mode on access parameter and
4459 * sem_ch9.adb (Analyze_Abort_Statement,
4460 Analyze_Accept_Statement, Analyze_Asynchronous_Select,
4461 Analyze_Conditional_Entry_Call, Analyze_Delay_Relative,
4462 Analyze_Delay_Until, Analyze_Entry_Call_Alternative,
4463 Analyze_Requeue, Analyze_Selective_Accept,
4464 Analyze_Timed_Entry_Call): issue error in formal mode on such constructs
4465 * sem_ch11.adb (Analyze_Raise_Statement, Analyze_Raise_xxx_Error):
4466 issue error in formal mode on user-defined raise statement.
4468 2011-08-01 Thomas Quinot <quinot@adacore.com>
4470 * sem_ch6.adb (Enter_Overloaded_Entity): Do not warn about a
4471 declaration being hidden when overriding an implicit inherited
4473 * par-ch10.adb (P_Compilation_Unit): In syntax check only mode
4474 (-gnats), do not complain about a source file that contains only a
4477 2011-08-01 Ed Schonberg <schonberg@adacore.com>
4479 * sem_ch5.adb (Analyze_Iterator_Scheme): Do not overwrite type of loop
4480 variable if already set.
4482 2011-08-01 Arnaud Charlet <charlet@adacore.com>
4484 * g-socket-dummy.adb, s-osinte-linux.ads, g-socket-dummy.ads,
4485 g-debuti.adb, g-tasloc.adb, g-debuti.ads, g-tasloc.ads,
4486 s-osinte-hpux.ads, g-sercom.adb, g-soliop-solaris.ads, g-sercom.ads,
4487 g-sptain.ads, g-curexc.ads, s-tasloc.adb, s-tasloc.ads, s-tataat.adb,
4488 g-ctrl_c.adb, a-reatim.adb, s-tataat.ads, g-dirope.adb, g-ctrl_c.ads,
4489 g-dirope.ads, g-boubuf.adb, g-calend.adb, g-boubuf.ads, g-souinf.ads,
4490 g-table.adb, g-bytswa-x86.adb, g-wispch.adb, g-io.adb, g-table.ads,
4491 g-wispch.ads, g-io.ads, g-memdum.adb, g-memdum.ads, g-busorg.adb,
4492 g-busorg.ads, g-regpat.adb, g-sothco-dummy.adb, g-encstr.adb,
4493 g-regpat.ads, g-sothco-dummy.ads, s-osinte-aix.ads, g-encstr.ads,
4494 g-sercom-mingw.adb, s-mastop-vms.adb, g-diopit.adb, g-diopit.ads,
4495 s-vxwext.adb, g-dyntab.adb, g-dyntab.ads, g-crc32.adb,
4496 g-sercom-linux.adb, g-crc32.ads, s-regpat.adb, g-flocon.ads,
4497 s-regpat.ads, g-stheme.adb, g-sestin.ads, s-taspri-posix-noaltstack.ads,
4498 g-soliop.ads, s-inmaop-posix.adb, g-locfil.ads, g-enblsp-vms-alpha.adb,
4499 g-socthi-dummy.adb, g-socthi-dummy.ads, gnat.ads, g-moreex.adb,
4500 g-moreex.ads, g-dynhta.adb, g-dynhta.ads, g-deutst.ads, g-htable.adb,
4501 g-cgicoo.adb, g-htable.ads, g-cgicoo.ads, a-interr.adb,
4502 g-socthi-vms.adb, g-socthi-vms.ads, g-hesora.adb, g-bubsor.adb,
4503 g-hesora.ads, g-bubsor.ads, g-md5.adb, g-md5.ads, s-intman-irix.adb,
4504 s-htable.adb, s-osinte-vms.adb, s-htable.ads, s-osinte-vms.ads,
4505 s-taprob.adb, g-bytswa.adb, g-bytswa.ads, s-osinte-solaris-posix.ads,
4506 a-suenco.adb, g-comver.adb, g-comver.ads, g-exctra.adb,
4507 s-osinte-solaris.adb, g-exctra.ads, s-osinte-irix.ads,
4508 s-osinte-solaris.ads, a-caldel-vms.adb, g-socthi-vxworks.adb,
4509 g-expect.adb, g-socthi-vxworks.ads, g-expect.ads, g-comlin.ads,
4510 g-heasor.adb, g-heasor.ads, g-traceb.adb, g-traceb.ads, g-decstr.adb,
4511 g-spipat.adb, g-decstr.ads, g-spipat.ads, s-mastop-tru64.adb,
4512 g-except.ads, g-thread.adb, g-hesorg.adb, g-thread.ads, g-hesorg.ads,
4513 g-expect-vms.adb, a-stuten.ads, g-spchge.adb, g-spchge.ads,
4514 g-u3spch.adb, g-u3spch.ads, g-spitbo.adb, g-spitbo.ads,
4515 s-osinte-dummy.ads, s-osinte-posix.adb, g-pehage.adb, g-pehage.ads,
4516 s-gloloc-mingw.adb, g-sha1.ads, s-traceb-hpux.adb,
4517 g-trasym-unimplemented.adb, g-trasym-unimplemented.ads, g-io_aux.adb,
4518 g-regexp.adb, g-io_aux.ads, g-socthi-mingw.adb, g-regexp.ads,
4519 s-osinte-hpux-dce.adb, g-socthi-mingw.ads, g-cgi.adb,
4520 s-osinte-hpux-dce.ads, g-cgi.ads, g-byorma.adb, g-boumai.ads,
4521 g-byorma.ads, a-caldel.adb, s-regexp.adb, s-regexp.ads,
4522 g-soliop-mingw.ads, g-sptavs.ads, s-osinte-tru64.ads, g-speche.adb,
4523 g-speche.ads, g-socthi.adb, g-stsifd-sockets.adb, g-socthi.ads,
4524 s-osinte-darwin.ads, i-vxwork-x86.ads, g-awk.adb, i-vxwork.ads,
4525 g-awk.ads, g-zspche.adb, g-zspche.ads, g-socket.adb, g-sptabo.ads,
4526 g-socket.ads, g-semaph.adb, g-semaph.ads, s-taspri-posix.ads,
4527 g-enblsp-vms-ia64.adb, g-cgideb.adb, g-cgideb.ads, g-sothco.adb,
4528 s-osinte-freebsd.ads, g-sothco.ads, g-catiio.adb, g-casuti.adb,
4529 g-catiio.ads, g-casuti.ads, g-trasym.adb, g-trasym.ads, s-casuti.adb,
4530 g-os_lib.adb, s-traceb-mastop.adb, g-busora.adb, s-interr-dummy.adb,
4531 g-busora.ads, g-enutst.ads, s-os_lib.adb, a-tasatt.adb,
4532 s-osinte-mingw.ads: Update to GPLv3 run-time license.
4533 Use GNAT instead of GNARL.
4535 2011-08-01 Bob Duff <duff@adacore.com>
4537 * a-cdlili.ads, a-cihama.ads, a-coinve.ads, a-ciorse.ads, a-coorma.ads,
4538 a-cidlli.ads, a-ciormu.ads, a-cihase.ads, a-cohama.ads, a-coorse.ads,
4539 a-ciorma.ads, a-coormu.ads, a-convec.ads, a-cohase.ads: Minor
4542 2011-08-01 Yannick Moy <moy@adacore.com>
4544 * debug.adb (d.D) reverve flag for the SPARK mode
4545 (d.E) reverve flag for SPARK generation mode
4546 (d.F) reverve flag for Why generation mode
4547 * opt.ads, opt.adb (ALFA_Mode, ALFA_Through_SPARK_Mode,
4548 ALFA_Through_Why_Mode, Formal_Verification_Mode, SPARK_Mode): New
4549 functions which return True when the corresponding modes are set
4550 (Formal_Language): return "spark" or "alfa" when in formal verification
4552 * sem_util.ads, sem_util.adb (Formal_Error_Msg): new wrapper on
4553 Error_Msg to prefix the error message with a tag giving the formal
4555 (Formal_Error_Msg_N): new wrapper on Error_Msg_N to prefix the error
4556 message with a tag giving the formal language
4557 * sem_ch5.adb (Analyze_Block_Statement): issue error in formal mode on
4559 (Analyze_Case_Statement): issue error in formal mode on case statement
4560 with a single "others" case alternative
4561 (Analyze_Exit_Statement): issue errors in formal mode on exit
4562 statements which do not respect SPARK restrictions
4563 (Analyze_Goto_Statement): issue error in formal mode on goto statement
4564 (Check_Unreachable_Code): always issue an error (not a warning) in
4565 formal mode on unreachable code (concerns both code after an infinite
4566 loop and after an unconditional jump, both not allowed in SPARK)
4567 * sem_ch6.adb (Analyze_Return_Statement): add call to
4568 Set_Return_Present for a procedure containing a return statement
4569 (already done for functions in Analyze_Function_Return)
4570 (Analyze_Function_Return): issue error in formal mode on extended
4571 return or if return is not last statement in function
4572 (Check_Missing_Return): issue error in formal mode if function does
4573 not end with return or if procedure contains a return
4574 * sem_ch8.ads, sem_ch8.adb (Has_Loop_In_Inner_Open_Scopes): new
4575 function to detect if there is an inner scope of its parameter S which
4578 2011-08-01 Thomas Quinot <quinot@adacore.com>
4580 * sem_ch6.ads: Minor reformatting.
4582 2011-08-01 Javier Miranda <miranda@adacore.com>
4584 * sem_util.adb (Abstract_Interface_List): Complete condition when
4585 processing private type declarations to avoid reading unavailable
4587 (Is_Synchronized_Tagged_Type): Complete condition when processing
4588 private extension declaration nodes to avoid reading unavailable
4591 2011-08-01 Thomas Quinot <quinot@adacore.com>
4593 * sem_ch3.adb: Minor reformatting.
4595 2011-08-01 Thomas Quinot <quinot@adacore.com>
4597 * s-parame-ae653.ads, s-parame-vms-alpha.ads, s-parame-hpux.ads,
4598 i-cpoint.adb, i-cstrin.adb, i-cpoint.ads, i-cstrin.ads,
4599 s-parame-vms-ia64.ads, s-parame.ads, i-c.ads, s-parame-vxworks.ads,
4600 s-parame-vms-restrict.ads: Remove duplicated Interfaces.C.* packages
4601 for VMS, instead parametrize the common implementation with
4602 System.Parameters declarations.
4604 2011-08-01 Eric Botcazou <ebotcazou@adacore.com>
4606 * gnat_rm.texi: Document limitation of Pragma No_Strict_Aliasing.
4608 2011-08-01 Tristan Gingold <gingold@adacore.com>
4610 * seh_init.c: Fix SEH handler installation on win64.
4612 2011-08-01 Ed Schonberg <schonberg@adacore.com>
4614 * sem_ch3.adb (Access_Subprogram_Declaration): in Asis mode, prevent
4615 double analysis of an anonymous access to subprogram, because it can
4616 lead to improper sharing of profiles and a back-end crash.
4618 2011-08-01 Robert Dewar <dewar@adacore.com>
4620 * make.adb, sem_ch4.adb: Minor reformatting.
4621 * gcc-interface/Make-lang.in: Update dependencies.
4622 * sem_util.adb, exp_ch5.adb: Minor reformatting.
4624 2011-08-01 Arnaud Charlet <charlet@adacore.com>
4626 * gnat_rm.texi: Fix definition of Long_Integer.
4628 2011-08-01 Ed Schonberg <schonberg@adacore.com>
4630 * exp_aggr.adb: check limit size of static aggregate unconditionally,
4631 to prevent storage exhaustion.
4632 * exp_ch7.adb (Clean_Simple_Protected_Objects): if the scope being
4633 finalized is a function body, insert the cleanup code before the final
4634 return statement, to prevent spurious warnings.
4635 * s-pooglo.ads: add overriding indicator.
4637 2011-08-01 Ed Schonberg <schonberg@adacore.com>
4639 * sem_ch4.adb (Operator_Check): improve error message when both a
4640 with_clause and a use_clause are needed to make operator usage legal.
4641 * sem_util.ads, sem_util.adb (Unit_Is_Visible): new predicate to
4642 determine whether a compilation unit is visible within an other,
4643 either through a with_clause in the current unit, or a with_clause in
4644 its library unit or one one of its parents.
4646 2011-08-01 Ed Schonberg <schonberg@adacore.com>
4648 * exp_ch5.adb (Expand_N_Iterator_Loop): handle properly an iterator
4649 over an arbitrary expression of an array or container type.
4650 * lib-xref.adb: clarify comment.
4652 2011-08-01 Bob Duff <duff@adacore.com>
4654 * einfo.ads: Minor reformatting.
4655 * debug.adb: Minor comment improvement.
4657 2011-08-01 Javier Miranda <miranda@adacore.com>
4659 * sem_ch4.adb (Try_Object_Operation): For class-wide subprograms do not
4660 consider hidden subprograms as valid candidates.
4662 2011-08-01 Arnaud Charlet <charlet@adacore.com>
4664 * make.adb (Compile): Strip -mxxx switches in CodePeer mode.
4666 2011-08-01 Vasiliy Fofanov <fofanov@adacore.com>
4668 * gnat_ugn.texi: Fix typo.
4670 2011-08-01 Robert Dewar <dewar@adacore.com>
4672 * i-cstrin.adb, sem_util.adb, exp_ch11.adb, sem_ch8.adb,
4673 lib-xref.adb: Minor reformatting
4675 2011-08-01 Gary Dismukes <dismukes@adacore.com>
4677 * exp_ch6.adb (Expand_N_Extended_Return_Statement): Replace test of
4678 when to generate a call to Move_Final_List.
4679 (Has_Controlled_Parts): Remove this function.
4681 2011-08-01 Geert Bosch <bosch@adacore.com>
4683 * par-ch3.adb (P_Discrete_Choice_List): Improve error message for extra
4686 2011-08-01 Thomas Quinot <quinot@adacore.com>
4688 * exp_ch11.adb (Expand_N_Raise_Statement): Mark N_Raise_xxx_Error for
4689 explicit raise of a predefined exception as Comes_From_Source if the
4690 original N_Raise_Statement comes from source.
4692 2011-08-01 Robert Dewar <dewar@adacore.com>
4694 * sinfo.ads: Add comment.
4695 * sem_ch6.adb: Minor reformatting.
4697 2011-08-01 Robert Dewar <dewar@adacore.com>
4699 * freeze.adb (Freeze_Entity): Refine check for bad component size
4700 clause to avoid rejecting confirming clause when atomic/aliased present.
4702 2011-08-01 Ed Schonberg <schonberg@adacore.com>
4704 * sem_ch8.adb (Find_Direct_Name, Analyze_Expanded_Name): use Is_LHS to
4705 better determine whether an entity reference is a write.
4706 * sem_util.adb (Is_LHS): refine predicate to handle assignment to a
4708 * lib-xref.adb (Output_References): Do no suppress a read reference at
4709 the same location as an immediately preceeding modify-reference, to
4710 handle properly in-out actuals.
4712 2011-08-01 Tristan Gingold <gingold@adacore.com>
4714 * env.c (__gnat_setenv) [VMS]: Refine previous change.
4716 2011-08-01 Quentin Ochem <ochem@adacore.com>
4718 * i-cstrin.adb (New_String): Changed implementation, now uses only the
4719 heap to compute the result.
4721 2011-08-01 Robert Dewar <dewar@adacore.com>
4723 * atree.ads: Minor reformatting.
4725 2011-08-01 Emmanuel Briot <briot@adacore.com>
4727 * g-expect.adb (Get_Command_Output): Fix memory leak.
4729 2011-08-01 Geert Bosch <bosch@adacore.com>
4731 * cstand.adb (P_Float_Type): New procedure to print the definition of
4732 predefined fpt types.
4733 (P_Mixed_Name): New procedure to print a name using mixed case
4734 (Print_Standard): Use P_Float_Type for printing floating point types
4735 * einfo.adb (Machine_Emax_Value): Add preliminary support for quad
4736 precision IEEE float.
4738 2011-08-01 Thomas Quinot <quinot@adacore.com>
4740 * sem_ch3.adb: Minor reformatting.
4742 2011-08-01 Ed Schonberg <schonberg@adacore.com>
4744 * sem_ch6.adb (Analyze_Parameterized_Expression): If the expression is
4745 the completion of a generic function, insert the new body rather than
4746 rewriting the original.
4748 2011-08-01 Yannick Moy <moy@adacore.com>
4750 * sinfo.ads, errout.ads: Typos in comments.
4752 2011-08-01 Robert Dewar <dewar@adacore.com>
4754 * par-endh.adb: Minor reformatting.
4756 2011-08-01 Robert Dewar <dewar@adacore.com>
4758 * aspects.ads, aspects.adb: Add aspects for library unit pragmas
4759 (Pre_Post_Aspects): New subtype.
4760 * par-ch12.adb (P_Generic): New syntax for aspects in packages
4761 * par-ch13.adb (P_Aspect_Specifications): Add Semicolon parameter
4762 * par-ch7.adb (P_Package): Remove Decl parameter
4763 (P_Package): Handle new syntax for aspects (before IS)
4764 * par-ch9.adb (P_Protected_Definition): Remove Decl parameter, handle
4766 (P_Task_Definition): Remove Decl parameter, handle new aspect syntax
4767 * par.adb (P_Aspect_Specifications): Add Semicolon parameter
4768 (P_Package): Remove Decl parameter
4769 * sem_ch13.adb (Analyze_Aspect_Specifications): Handle library unit
4771 * sem_ch7.adb (Analyze_Package_Declaration): Analyze new format aspect
4773 * sem_util.ads, sem_util.adb (Static_Boolean): New function
4774 * sinfo.ads: Document new syntax for aspects in packages etc.
4775 * sprint.adb: Handle new syntax of aspects before IS in package
4777 2011-08-01 Thomas Quinot <quinot@adacore.com>
4779 * atree.ads: Minor reformatting.
4780 * sem_prag.adb: Minor reformatting.
4782 2011-08-01 Robert Dewar <dewar@adacore.com>
4784 * exp_util.adb (Insert_Actions): Fix error in handling Actions for
4785 case expr alternative.
4787 2011-08-01 Ed Schonberg <schonberg@adacore.com>
4789 * sem_ch12.adb: Fix typo.
4791 2011-08-01 Geert Bosch <bosch@adacore.com>
4793 * sem_prag.adb (Check_No_Link_Name): New procedure.
4794 (Process_Import_Or_Interface): Use Check_No_Link_Name.
4795 * cstand.adb (Create_Standard): Use Esize (Standard_Long_Long_Float)
4796 instead of Standard_Long_Long_Float_Size global. Preparation for
4797 eventual removal of per type constants.
4798 * exp_util.ads (Get_Stream_Size): New function returning the stream
4799 size value of subtype E.
4800 * exp_util.adb (Get_Stream_Size): Implement new function.
4801 * exp_strm.adb (Build_Elementary_Input_Call): Use Get_Stream_Size
4803 * exp_attr.adb (Attribute_Stream_Size): Use Get_Stream_Size
4805 (Machine_Mantissa_Value): Handle 128-bit quad precision IEEE floats
4807 2011-08-01 Geert Bosch <bosch@adacore.com>
4809 * cstand.adb: Fix comments.
4810 * sem_prag.adb (Analyze_Pragma): Use List_Length instead of explicit
4813 2011-08-01 Robert Dewar <dewar@adacore.com>
4815 * exp_ch4.adb, sem_cat.adb: Minor reformatting.
4817 2011-08-01 Geert Bosch <bosch@adacore.com>
4819 * atree.ads: Fix comment.
4821 2011-08-01 Robert Dewar <dewar@adacore.com>
4823 * aspects.ads, aspects.adb (Aspect_Names): Moved from body to spec.
4824 * par-ch13.adb (P_Aspect_Specifications): Check misspelled aspect name.
4825 * par.adb: Add with for Namet.Sp.
4826 * par-tchk.adb: Minor reformatting.
4828 2011-08-01 Vincent Celier <celier@adacore.com>
4830 * mlib-tgt-specific-vms-alpha.adb, mlib-tgt-specific-vms-ia64.adb
4831 (Build_Dynamic_Library): Use new function Init_Proc_Name to get the name
4832 of the init procedure of a SAL.
4833 * mlib-tgt-vms_common.ads, mlib-tgt-vms_common.adb (Init_Proc_Name):
4836 2011-08-01 Thomas Quinot <quinot@adacore.com>
4838 * exp_ch4.adb, s-tasini.ads, sem_attr.adb, s-soflin.ads: Minor
4841 2011-08-01 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
4843 * adaint.c (__gnat_file_time_name_attr): Get rid of warning.
4845 2011-08-01 Thomas Quinot <quinot@adacore.com>
4847 * sem_util.adb, sem_util.ads (Has_Overriding_Initialize): Make function
4848 conformant with its spec (return True only for types that have
4849 an overriding Initialize primitive operation that prevents them from
4850 having preelaborable initialization).
4851 * sem_cat.adb (Validate_Object_Declaration): Fix test for preelaborable
4852 initialization for controlled types in Ada 2005 or later mode.
4854 2011-08-01 Robert Dewar <dewar@adacore.com>
4856 * aspects.ads, aspects.adb: Add aspect Type_Invariant, Precondition,
4858 (Same_Aspect): New function.
4859 * sem_ch13.adb (Analyze_Aspect_Specifications): Add aspect
4860 Type_Invariant, Precondition, Postcondition.
4861 * snames.ads-tmpl: Add Name_Type_Invariant.
4863 2011-08-01 Robert Dewar <dewar@adacore.com>
4865 * freeze.adb (Freeze_Entity): Don't call Check_Aspect_At_Freeze_Point
4867 (Freeze_All_Ent): Fix error in handling inherited aspects.
4868 * sem_ch13.adb (Analyze_Aspect_Specifications): Skip aspect that is
4869 already analyzed, but don't skip entire processing of a declaration,
4870 that's wrong in some cases of declarations being rewritten.
4871 (Analyze_Aspect_Specification): Set Is_Delayed_Aspect in aspects.
4872 Don't delay for integer, string literals
4873 Treat predicates in usual manner for delay, remove special case code,
4875 (Analyze_Freeze_Entity): Make call to Check_Aspect_At_Freeze_Point
4876 (Build_Predicate_Function): Update saved expression in aspect
4877 (Build_Invariant_Procedure): Update saved expression in aspect
4878 * exp_ch4.adb (Expand_N_Selected_Component): Only do the optimization
4879 of replacement of discriminant references if the reference is simple.
4881 2011-08-01 Robert Dewar <dewar@adacore.com>
4883 * aspects.ads, aspects.adb: Add Static_Predicate and Dynamic_Predicate.
4884 * sem_ch13.adb (Analyze_Aspect_Specification): Add processing for
4885 Static_Predicate and Dynamic_Predicate.
4886 (Build_Predicate_Function): Add processing for Static_Predicate
4887 and Dynamic_Predicate.
4888 * sinfo.ads, sinfo.adb (From_Dynamic_Predicate): New flag
4889 (From_Static_Predicate): New flag
4890 * snames.ads-tmpl: Add Name_Static_Predicate and Name_Dynamic_Predicate
4892 2011-08-01 Robert Dewar <dewar@adacore.com>
4894 * usage.adb: Documentation cleanup for Ada version modes in usage.
4895 * expander.adb: Minor reformatting.
4897 2011-08-01 Robert Dewar <dewar@adacore.com>
4899 * atree.ads: Minor comment fix.
4900 * a-stwifi.adb, a-stzfix.adb, a-strfix.adb, a-ztexio.ads, a-textio.ads,
4901 a-witeio.ads, sem_prag.adb: Minor reformatting.
4903 2011-08-01 Doug Rupp <rupp@adacore.com>
4905 * env.c (__gnat_setenv) [VMS]: Force 32bit on item list structure
4906 pointers. Use descrip.h header file for convenience. Add some
4909 2011-08-01 Robert Dewar <dewar@adacore.com>
4911 * freeze.adb (Freeze_Entity): Call Check_Aspect_At_Freeze_Point
4912 (Freeze_All): Call Check_Aspect_At_End_Of_Declarations
4913 * sem_ch13.ads, sem_ch13.adb (Check_Aspect_At_Freeze_Point):
4915 (Check_Aspect_At_End_Of_Declarations): New procedure
4916 (Analye_Aspect_Specification): Minor changes for above procedures
4917 * sinfo.ads, sinfo.adb (Is_Delayed_Aspect): Now set in aspect
4918 specification node as well.
4920 2011-08-01 Pascal Obry <obry@adacore.com>
4922 * adaint.c (_gnat_stat): GetFilesAttributesEx() would fail on special
4923 Windows files. Use GetFilesAttributes() in this case to check for file
4924 existence instead of returning with an error code.
4926 2011-08-01 Vincent Celier <celier@adacore.com>
4928 * a-stzfix.adb, a-stwifi.adb (Replace_Slice): Fixed computation when
4929 High is above Source length.
4931 2011-08-01 Robert Dewar <dewar@adacore.com>
4933 * a-ztexio.ads, a-textio.ads, a-witeio.ads: Fix comment.
4935 2011-08-01 Robert Dewar <dewar@adacore.com>
4937 * aspects.ads (Boolean_Aspects): New subtype.
4938 * exp_ch13.adb (Expand_Freeze_Entity): Fix errors in handling aspects
4939 for derived types in cases where the parent type and derived type have
4941 * freeze.adb (Freeze_Entity): Fix problems in handling derived type
4942 with aspects when parent type also has aspects.
4943 (Freeze_Entity): Deal with delay of boolean aspects (must evaluate
4944 boolean expression at this point).
4945 * sem_ch13.adb (Analyze_Aspect_Specifications): Delay all aspects in
4946 accordance with final decision on the Ada 2012 feature.
4947 * sinfo.ads, sinfo.adb (Is_Boolean_Aspect): New flag.
4949 2011-08-01 Matthew Heaney <heaney@adacore.com>
4951 * a-chtgbo.adb (Delete_Node_Sans_Free): Replace iterator with selector.
4953 2011-08-01 Pascal Obry <obry@adacore.com>
4955 * a-stzunb-shared.adb, a-strunb-shared.adb, a-stwiun-shared.adb:
4956 Fix Replace_Slice when High is above current string size.
4957 (Replace_Slice): Fix DL computation when High is above current
4960 2011-08-01 Gary Dismukes <dismukes@adacore.com>
4962 * gnat_rm.texi: Add documentation for pragma Static_Elaboration_Desired.
4964 2011-08-01 Matthew Heaney <heaney@adacore.com>
4966 * a-rbtgbo.adb (Delete_Node_Sans_Free): Fixed assignment to left child
4969 2011-08-01 Pascal Obry <obry@adacore.com>
4971 * a-stzunb-shared.adb, a-strunb-shared.adb, a-stwiun-shared.adb: Minor
4974 2011-08-01 Ed Schonberg <schonberg@adacore.com>
4976 * sem_attr.adb (Analyze_Attribute, case 'Access): Handle properly named
4977 access to protected subprograms in generic bodies.
4978 * sem_ch6.adb (Analyze_Subprogram_Declaration): If the context is a
4979 protected type, indicate that the convention of the subprogram is
4980 Convention_Protected, because it may be used in subsequent declarations
4981 within the protected declaration.
4983 2011-08-01 Vincent Celier <celier@adacore.com>
4985 * mlib-prj.adb (Build_Library): Use "ada_" as the prefix for the "init"
4986 and "final" procedures when the name of the library is "ada", to avoid
4987 duplicate symbols "adainit" and "adafinal" in executables.
4989 2011-08-01 Ed Schonberg <schonberg@adacore.com>
4991 * sem_attr.adb (Analyze_Attribute, case 'Result): Handle properly a
4992 quantified expression that appears within a postcondition and uses the
4993 Ada2012 'Result attribute.
4995 2011-07-28 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
4997 * init.c (__gnat_error_handler): Cast reason to int.
4998 (__gnat_install_handler): Explain sa_sigaction use.
5000 2011-07-24 Eric Botcazou <ebotcazou@adacore.com>
5002 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Subprogram_Type>: If the
5003 subprogram has copy-in copy-out parameters, try to promote the mode of
5004 the return type if it is passed in registers.
5006 2011-07-24 Eric Botcazou <ebotcazou@adacore.com>
5008 * gcc-interface/utils2.c (build_binary_op) <ARRAY_REF>: Do not mark the
5009 left operand as addressable.
5011 2011-07-24 Eric Botcazou <ebotcazou@adacore.com>
5013 * gcc-interface/gigi.h (build_function_stub): Remove.
5014 (build_return_expr): Likewise.
5015 (convert_vms_descriptor): Declare.
5016 * gcc-interface/utils.c (convert_vms_descriptor): Make global.
5017 (build_function_stub): Move to...
5018 * gcc-interface/utils2.c (build_return_expr): Move to...
5019 * gcc-interface/trans.c (build_function_stub): ...here.
5020 (build_return_expr): ...here.
5021 (Subprogram_Body_to_gnu): Add local variable for language_function.
5022 Disconnect the parameter attributes cache, if any, once done with it.
5023 Call end_subprog_body only after setting the end_locus.
5024 Build the stub associated with the function, if any, at the very end.
5025 (gnat_to_gnu) <N_Return_Statement>: Remove couple of useless local
5026 variables and streamline control flow.
5028 2011-07-23 Arnaud Charlet <charlet@adacore.com>
5031 * gcc-interface/Makefile.in (powerpc-linux): Remove reference to
5034 2011-07-22 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
5037 * init.c [sun && __SVR4 && !__vxworks] (__gnat_install_handler):
5038 Assign to act.sa_sigaction.
5039 * tracebak.c [USE_GENERIC_UNWINDER] (__gnat_backtrace): Cast
5040 current->return_address to char * before arithmetic.
5042 2011-07-22 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
5044 * init.c [sgi] (__gnat_error_handler): Update sigaction(2) citation.
5045 Correct argument types.
5046 Extract code from reason.
5047 (__gnat_install_handler): Assign to act.sa_sigaction.
5049 2011-07-21 Eric Botcazou <ebotcazou@adacore.com>
5051 * gcc-interface/Make-lang.in (GNAT1_ADA_OBJS): Move ada/b_gnat1.o to...
5052 (GNAT1_OBJS): ...here.
5054 2011-07-15 Eric Botcazou <ebotcazou@adacore.com>
5057 * g-socthi-mingw.adb (Fill): Fix formatting.
5059 * gcc-interface/gigi.h: Move around comment.
5061 2011-07-14 John David Anglin <dave.anglin@nrc-cnrc.gc.ca>
5064 * s-taprop-hpux-dce.adb (Abort_Task): Remove unnecessary cast.
5066 2011-07-14 Florian Weimer <fw@deneb.enyo.de>
5069 * g-socthi-mingw.adb (Fill): Guard against invalid MSG_WAITALL.
5071 2011-07-13 Eric Botcazou <ebotcazou@adacore.com>
5073 * gcc-interface/utils.c (build_vms_descriptor32): Skip the 32-bit
5074 range comparison if Pmode is SImode.
5076 2011-07-12 Laurent GUERBY <laurent@guerby.net>
5077 Eric Botcazou <ebotcazou@adacore.com>
5079 * adadecode.c: Wrap up in extern "C" block.
5080 * adadecode.h: Likewise.
5081 * adaint.c: Likewise. Remove 'const' keyword.
5082 * adaint.h: Likewise.
5084 * atree.h: Likewise.
5086 * cstreams.c: Likewise.
5090 * final.c: Likewise.
5092 * initialize.c: Likewise.
5094 * namet.h: Likewise.
5095 * nlists.h: Likewise.
5096 * raise.c: Likewise.
5097 * raise.h: Likewise.
5098 * repinfo.h: Likewise.
5099 * seh_init.c: Likewise.
5100 * targext.c: Likewise.
5101 * tracebak.c: Likewise.
5102 * uintp.h: Likewise.
5103 * urealp.h: Likewise.
5104 * xeinfo.adb: Wrap up generated C code in extern "C" block.
5105 * xsinfo.adb: Likewise.
5106 * xsnamest.adb: Likewise.
5107 * gcc-interface/gadaint.h: Wrap up in extern "C" block.
5108 * gcc-interface/gigi.h: Wrap up some prototypes in extern "C" block.
5109 * gcc-interface/misc.c: Likewise.
5110 * gcc-interface/Make-lang.in (GCC_LINK): Use LINKER.
5111 (GNAT1_C_OBJS): Remove ada/b_gnat1.o. List ada/seh_init.o and
5112 ada/targext.o here...
5113 (GNAT_ADA_OBJS): ...and not here.
5114 (GNAT1_ADA_OBJS): Add ada/b_gnat1.o.
5115 (GNATBIND_OBJS): Reorder.
5117 2011-07-07 Richard Henderson <rth@redhat.com>
5119 * gcc-interface/misc.c (gnat_init_gcc_eh): Don't call
5120 dwarf2out_frame_init.
5122 2011-07-07 Eric Botcazou <ebotcazou@adacore.com>
5124 * gcc-interface/misc.c (gnat_init): Tweak previous change.
5126 2011-07-07 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
5129 * gcc-interface/Makefile.in: Handle x86_64-solaris2.
5131 2011-07-06 Richard Guenther <rguenther@suse.de>
5133 * gcc-interface/misc.c (gnat_init): Merge calls to
5134 build_common_tree_nodes and build_common_tree_nodes_2.
5135 Re-initialize boolean_false_node.
5137 2011-07-02 Eric Botcazou <ebotcazou@adacore.com>
5138 Olivier Hainque <hainque@adacore.com>
5139 Nicolas Setton <setton@adacore.com>
5141 * gcc-interface/utils.c (record_builtin_type): Set TYPE_ARTIFICIAL on
5142 the type according to the ARTIFICIAL_P parameter.
5143 (create_type_decl): Likewise.
5144 (create_type_stub_decl): Set TYPE_ARTIFICIAL on the type to 1.
5146 2011-07-01 Eric Botcazou <ebotcazou@adacore.com>
5148 * gcc-interface/Make-lang.in (gnat1): Prepend '+' to the command.
5149 (gnatbind): Likewise.
5151 2011-06-29 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
5153 * gcc-interface/Makefile.in (TOOLS_LIBS): Add $(LIBINTL).
5155 2011-06-18 Eric Botcazou <ebotcazou@adacore.com>
5157 * gcc-interface/decl.c (gnat_to_gnu_component_type): Use GNAT_TYPE
5158 local variable throughout. Remove useless call to Base_Type.
5159 (gnat_to_gnu_field): Use GNAT_FIELD_TYPE local variable throughout.
5160 Take it also into account for the volatileness of the field. Set the
5161 TREE_SIDE_EFFECTS flag as well in this case. Reorder some warnings.
5163 2011-06-18 Eric Botcazou <ebotcazou@adacore.com>
5165 * gcc-interface/trans.c (Identifier_to_gnu): Don't set TREE_THIS_NOTRAP
5166 on a dereference built for a by-ref object if it has an address clause.
5168 2011-06-18 Eric Botcazou <ebotcazou@adacore.com>
5170 * einfo.ads (Address_Taken): Document use for the second argument of
5171 Asm_Input and Asm_Output attributes.
5172 * sem_attr.adb (Analyze_Attribute) <Attribute_Asm_Input>: If the second
5173 argument is an entity name, then set Address_Taken on it.
5174 <Attribute_Asm_Output>: Likewise.
5175 * gcc-interface/trans.c (lvalue_required_for_attribute_p): Handle the
5176 Attr_Asm_Input and Attr_Asm_Output attributes explicitly.
5177 (gnat_to_gnu) <N_Code_Statement>: If an operand is going to end up in
5178 memory and is a CONST_DECL, retrieve its corresponding VAR_DECL.
5180 2011-06-16 Joern Rennecke <joern.rennecke@embecosm.com>
5183 * gcc-interface/decl.c (gnat_to_gnu_param): Use pack_cumulative_args.
5185 2011-06-14 Joseph Myers <joseph@codesourcery.com>
5187 * gcc-interface/Make-lang.in (gnatbind$(exeext)): Use ggc-none.o.
5188 (ada/utils.o): Update dependencies.
5189 * gcc-interface/Makefile.in (EXTRA_GNATTOOLS_OBJS): Add
5190 ../../../libcpp/libcpp.a.
5191 * gcc-interface/utils.c: Include common/common-target.h.
5192 (process_attributes): Use targetm_common.have_named_sections.
5194 2011-06-07 Richard Guenther <rguenther@suse.de>
5196 * gcc-interface/misc.c (gnat_init): Do not set size_type_node or call
5199 2011-06-06 Eric Botcazou <ebotcazou@adacore.com>
5201 * gcc-interface/utils2.c (gnat_stabilize_reference): Propagate the
5202 TREE_THIS_NOTRAP flag.
5204 2011-06-06 Eric Botcazou <ebotcazou@adacore.com>
5206 * gcc-interface/utils2.c (gnat_stabilize_reference) <COMPOUND_EXPR>:
5209 2011-06-06 Eric Botcazou <ebotcazou@adacore.com>
5211 * gcc-interface/trans.c (Identifier_to_gnu): Also handle deferred
5212 constants whose full view has discriminants specially.
5214 2011-06-06 Eric Botcazou <ebotcazou@adacore.com>
5216 * gcc-interface/utils.c: Include diagnostic.h.
5217 (gnat_write_global_declarations): Output debug information for all
5218 global type declarations before finalizing the compilation unit.
5219 * gcc-interface/Make-lang.in (ada/utils.o): Add dependency.
5221 2011-05-25 Jakub Jelinek <jakub@redhat.com>
5223 * gcc-interface/utils.c (def_fn_type): Remove extra va_end.
5225 2011-05-25 Kai Tietz <ktietz@redhat.com>
5227 * adaint.c (__gnat_to_canonical_file_list_next): Use array
5228 initialization instead of const/none-const pointer assignment.
5230 2011-05-24 Joseph Myers <joseph@codesourcery.com>
5232 * gcc-interface/Make-lang.in (GNAT1_OBJS): Don't include
5233 $(EXTRA_GNAT1_OBJS).
5234 (GNATBIND_OBJS): Don't include $(EXTRA_GNATBIND_OBJS).
5235 (EXTRA_GNAT1_OBJS, EXTRA_GNATBIND_OBJS): Remove.
5236 (gnat1$(exeext), gnatbind$(exeext)): Use libcommon-target.a.
5237 * gcc-interface/Makefile.in (EXTRA_GNATTOOLS_OBJS): Use
5238 libcommon-target.a instead of prefix.o.
5240 2011-05-21 Joseph Myers <joseph@codesourcery.com>
5243 * gcc-interface/Make-lang.in (gnatbind$(exeext)): Depend on $(LIBDEPS).
5245 2011-05-20 Joseph Myers <joseph@codesourcery.com>
5247 * gcc-interface/Make-lang.in (EXTRA_GNATBIND_OBJS): Remove version.o.
5248 * gcc-interface/Makefile.in (EXTRA_GNATTOOLS_OBJS): Use libcommon.a
5249 instead of version.o.
5251 2011-05-18 Kai Tietz <ktietz@redhat.com>
5253 * gcc-interface/trans.c (Exception_Handler_to_gnu_sjlj): Use
5254 boolean_false_node instead of integer_zero_node.
5255 (convert_with_check): Likewise.
5256 * gcc-interface/decl.c (choices_to_gnu): Likewise.
5258 2011-05-12 Eric Botcazou <ebotcazou@adacore.com>
5260 * gcc-interface/trans.c (call_to_gnu): In the by-reference case, if the
5261 type of the parameter is an unconstrained array, convert the actual to
5262 the type of the formal in the In Out and Out cases as well.
5264 2011-05-11 Nathan Froyd <froydnj@codesourcery.com>
5266 * gcc-interface/utils.c (def_fn_type): Don't call build_function_type;
5267 call build_function_type_array or build_varargs_function_type_array
5269 (create_subprog_type): Don't call build_function_type; call
5270 build_function_type_vec instead.
5272 2011-05-11 Nathan Froyd <froydnj@codesourcery.com>
5274 * gcc-interface/ada-tree.h (TYPE_OBJECT_RECORD_TYPE): Use TYPE_MINVAL.
5275 (TYPE_GCC_MIN_VALUE): Use TYPE_MINVAL.
5276 (TYPE_GCC_MAX_VALUE): Use TYPE_MAXVAL.
5278 2011-05-07 Eric Botcazou <ebotcazou@adacore.com>
5280 * gcc-interface/decl.c (intrin_arglists_compatible_p): Remove spaces.
5282 * gcc-interface/gigi.h (global_bindings_p): Adjust prototype.
5283 * gcc-interface/utils.c (global_bindings_p): Return bool and simplify.
5285 2011-05-05 Nathan Froyd <froydnj@codesourcery.com>
5287 * gcc-interface/trans.c (Case_Statement_to_gnu): Call build_case_label.
5289 2011-05-05 Nathan Froyd <froydnj@codesourcery.com>
5291 * gcc-interface/decl.c (intrin_arglists_compatible_p): Use iterators
5292 instead of accessing TYPE_ARG_TYPES directly.
5293 * gcc-interface/utils.c (handle_nonnull_attribute): Likewise.
5295 2011-05-05 Eric Botcazou <ebotcazou@adacore.com>
5298 * gcc-interface/gigi.h (get_variant_part): Declare.
5299 * gcc-interface/decl.c (get_variant_part): Make global.
5300 * gcc-interface/utils2.c (find_common_type): Do not return T1 if the
5301 types have the same constant size, are record types and T1 has a
5302 variant part while T2 doesn't.
5304 2011-05-05 Eric Botcazou <ebotcazou@adacore.com>
5306 * gcc-interface/utils.c (begin_subprog_body): Do not call
5308 (end_subprog_body): Likewise.
5310 2011-05-04 Richard Guenther <rguenther@suse.de>
5312 * gcc-interface/trans.c (gnat_to_gnu): Remove zero notrunc argument to
5314 (pos_to_constructor): Likewise.
5316 2011-05-03 Nathan Froyd <froydnj@codesourcery.com>
5317 Eric Botcazou <ebotcazou@adacore.com>
5319 * gcc-interface/trans.c (gigi): Call build_function_type_list instead
5320 of build_function_type. Adjust calls to...
5321 (build_raise_check): ...this. Do not take a void_tree parameter.
5322 Call build_function_type_list instead of build_function_type.
5323 Fix head comment and swap couple of conditional blocks.
5325 2011-04-30 Eric Botcazou <ebotcazou@adacore.com>
5327 * gnatvsn.ads (Library_Version): Bump to 4.7.
5328 (Current_Year): Bump to 2011.
5330 2011-04-29 Michael Matz <matz@suse.de>
5332 * gcc-interface/misc.c (gnat_handle_option): Set
5333 warn_maybe_uninitialized.
5335 2011-04-23 Gerald Pfeifer <gerald@pfeifer.com>
5337 * gnat_ugn.texi (Complexity Metrics Control): Update link to
5338 the Watson/McCabe paper.
5340 2011-04-23 Jim Meyering <meyering@redhat.com>
5342 * gnat_ugn.texi (Examples of gnatxref Usage): Fix typo: s/it it/it is/
5344 2011-04-22 Eric Botcazou <ebotcazou@adacore.com>
5346 * gcc-interface/decl.c (make_packable_type): Copy DECL_PARALLEL_TYPE
5349 2011-04-22 Eric Botcazou <ebotcazou@adacore.com>
5351 * gcc-interface/gigi.h (create_subprog_decl): Add ARTIFICIAL_FLAG
5353 * gcc-interface/utils.c (create_subprog_decl): Likewise. Set
5354 DECL_ARTIFICIAL and DECL_NO_INLINE_WARNING_P on the DECL accordingly.
5355 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Subprogram_Type>: Add
5356 ARTIFICIAL_FLAG local variable and pass it to create_subprog_decl.
5357 <all>: Do not set flags on the reused DECL node coming from an alias.
5358 Set DECL_IGNORED_P on the DECL node built for subprograms if they
5359 don't need debug info here...
5360 * gcc-interface/trans.c (Subprogram_Body_to_gnu): ...and not here.
5361 (gigi): Adjust calls to create_subprog_decl.
5362 (build_raise_check): Likewise.
5363 (establish_gnat_vms_condition_handler): Likewise.
5364 (Compilation_Unit_to_gnu): Likewise.
5365 (gnat_to_gnu): Likewise.
5367 2011-04-21 Eric Botcazou <ebotcazou@adacore.com>
5369 * gcc-interface/Makefile.in (NO_SIBLING_ADAFLAGS): Always define.
5370 (NO_REORDER_ADAFLAGS): New variable.
5371 (EXTRA_GNATTOOLS): Always define.
5372 (../stamp-gnatlib1-$(RTSDIR): Copy tsystem.h.
5373 Clean up and adjust list of files compiled with special options.
5374 * gcc-interface/Make-lang.in: Likewise.
5375 (ada/decl.o): Cosmetical change.
5376 (ada/misc.o): Remove dependency on $(PLUGIN_H).
5378 2011-04-20 Jim Meyering <meyering@redhat.com>
5380 * initialize.c (__gnat_initialize): Remove useless if-before-free.
5382 2011-04-17 Eric Botcazou <ebotcazou@adacore.com>
5384 * gcc-interface/Make-lang.in (gnatbind): Replace $(ALL_CFLAGS) with
5385 $(CFLAGS) on the link line.
5387 2011-04-17 Eric Botcazou <ebotcazou@adacore.com>
5389 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Function>: Declare the
5390 padded type built for the return type if it is unconstrained.
5392 2011-04-14 Nathan Froyd <froydnj@codesourcery.com>
5394 * gcc-interface/utils.c (gnat_poplevel): Use block_chainon.
5396 2011-04-12 Nathan Froyd <froydnj@codesourcery.com>
5398 * gcc-interface/ada-tree.h (union lang_tree_node): Check for TS_COMMON
5399 before calling TREE_CHAIN.
5400 * gcc-interface/misc.c (gnat_init_ts): New function.
5401 (LANG_HOOKS_INIT_TS): Define.
5403 2011-04-12 Martin Jambor <mjambor@suse.cz>
5405 * gcc-interface/utils.c (end_subprog_body): Call cgraph_get_create_node
5406 instead of cgraph_node.
5408 2011-04-08 Eric Botcazou <ebotcazou@adacore.com>
5410 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Procedure>: Set minimum
5411 alignment on fields of the RETURN type built for the Copy-In Copy-Out
5414 2011-04-08 Eric Botcazou <ebotcazou@adacore.com>
5416 * gcc-interface/trans.c (Identifier_to_gnu): Do not return initializers
5417 of aggregate types that contain a placeholder.
5419 2011-04-08 Nathan Froyd <froydnj@codesourcery.com>
5421 * gcc-interface/utils.c (handle_sentinel_attribute): Don't use
5423 (handle_type_generic_attribute): Likewise.
5425 2011-04-04 Eric Botcazou <ebotcazou@adacore.com>
5428 * s-oscons-tmplt.c (MSG_WAITALL): Fix thinko in previous change.
5430 2011-04-04 Kai Tietz <ktietz@redhat.com>
5433 * s-oscons-tmplt.c (MSG_WAITALL): Define it for native windows targets
5436 2011-04-02 Eric Botcazou <ebotcazou@adacore.com>
5438 * gcc-interface/utils2.c (build_allocator): In the unconstrained array
5439 type case, do not strip a padding type around the array type.
5441 2011-04-02 Eric Botcazou <ebotcazou@adacore.com>
5443 * gcc-interface/utils.c (update_pointer_to): Finalize named pointer
5446 2011-04-02 Eric Botcazou <ebotcazou@adacore.com>
5448 * gcc-interface/lang.opt (feliminate-unused-debug-types): Delete.
5449 * gcc-interface/misc.c (gnat_handle_option): Remove special handling
5450 code for -feliminate-unused-debug-types.
5451 (gnat_post_options): Likewise.
5453 2011-04-02 Eric Botcazou <ebotcazou@adacore.com>
5455 * gcc-interface/utils.c (gnat_pushdecl): If this is a non-artificial
5456 declaration of a pointer type, then set DECL_ORIGINAL_TYPE to a
5459 2011-04-02 Eric Botcazou <ebotcazou@adacore.com>
5461 * gcc-interface/decl.c (gnat_to_gnu_entity): Do not force the
5462 DECL_ARTIFICIAL flag on enumeration types.
5464 2011-04-02 Eric Botcazou <ebotcazou@adacore.com>
5466 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Array_Type>: Do not make
5467 fat pointer types artificial unconditionally.
5468 <E_Array_Subtype>: Attach the base array type as a parallel type if it
5471 2011-04-02 Eric Botcazou <ebotcazou@adacore.com>
5473 * gcc-interface/gigi.h (get_dummy_type): Declare.
5474 (build_dummy_unc_pointer_types): Likewise.
5475 (finish_fat_pointer_type): Likewise.
5476 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Array_Type>: If a dummy
5477 fat pointer type has been built, complete it in place.
5478 <E_Access_Type>: Call build_dummy_unc_pointer_types to build dummy fat
5479 and thin pointers. Remove useless variable.
5480 (finish_fat_pointer_type): Make global and move to...
5481 * gcc-interface/utils.c (finish_fat_pointer_type): ...here.
5482 (get_dummy_type): New function.
5483 (build_dummy_unc_pointer_types): Likewise.
5484 (gnat_pushdecl): Propage the name to the anonymous variants only.
5485 (update_pointer_to): Only adjust the pointer types in the unconstrained
5488 2011-04-02 Eric Botcazou <ebotcazou@adacore.com>
5490 * gcc-interface/ada-tree.h (DECL_TAFT_TYPE_P): New flag.
5491 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Incomplete_Type>: Set it
5492 if this is a Taft amendment type and the full declaration is available.
5493 * gcc-interface/trans.c (process_type): Likewise.
5494 If there is an old type, mark the new one as used if DECL_TAFT_TYPE_P.
5495 (process_freeze_entity): Likewise.
5496 * gcc-interface/utils.c (dummy_global): New static variable.
5497 (gnat_write_global_declarations): If there are types declared as used
5498 at the global level, insert them in the global hash table.
5500 2011-04-02 Eric Botcazou <ebotcazou@adacore.com>
5502 * gcc-interface/gigi.h (record_builtin_type): Add ARTIFICIAL_P param.
5503 * gcc-interface/utils.c (gnat_pushdecl): If this is a non-artificial
5504 declaration of an array type, then set DECL_ORIGINAL_TYPE to a distinct
5506 (record_builtin_type): Add ARTIFICIAL_P parameter. Set DECL_ARTIFICIAL
5507 flag of the type accordingly.
5508 * gcc-interface/trans.c (gigi): Adjust calls to record_builtin_type.
5510 2011-04-02 Eric Botcazou <ebotcazou@adacore.com>
5512 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Access_Type>: Defer
5513 finalizing types when updating the pointers to the designated type.
5514 <all>: Finalize the deferred types even if we didn't defer processing
5515 of incomplete types in this invocation.
5517 2011-04-01 Olivier Hainque <hainque@adacore.com>
5518 Nicolas Setton <setton@adacore.com>
5519 Eric Botcazou <ebotcazou@adacore.com>
5521 * gcc-interface/misc.c (gnat_descriptive_type): New function.
5522 (LANG_HOOKS_DESCRIPTIVE_TYPE): Redefine to gnat_descriptive_type.
5524 2011-03-28 Kai Tietz <ktietz@redhat.com>
5526 * gcc-interface/Makefile.in (SO_LIB): Handle multilib build for native
5528 (EH_MECHANISM): Use GCC exception mechanism for native Windows targets.
5529 * system-mingw.ads (System): Change ZCX_By_Default default to True.
5531 * raise-gcc.c (PERSONALITY_FUNCTION): Add prototype.
5533 2011-03-28 Tristan Gingold <gingold@adacore.com>
5536 * gcc-interface/Make-lang.in (ada/b_gnat1.adb): Replace ada/b_gnat1.c.
5537 Use ada output of gnatbind.
5538 (ada/b_gnatb.adb): Ditto.
5539 (ada/b_gnat1.o, ada/b_gnatb.o): New rules.
5540 (ada.mostlyclean, ada.stage1)
5541 (ada.stage2, ada.stage3, ada.stage4, ada.stageprofile)
5542 (ada.stagefeedback): Adjust.
5543 * gcc-interface/Makefile.in (b_gnatl.adb): Replace b_gnatl.c.
5544 Use ada output of gnatbind.
5545 (b_gnatm.adb): Ditto.
5546 (b_gnatl.o, b_gnatm.o): New rules.
5548 2011-03-26 Eric Botcazou <ebotcazou@adacore.com>
5550 * gcc-interface/decl.c (gnat_to_gnu_entity) <object>: Create TYPE_DECL
5551 for the padded type built to support a specified size or alignment.
5553 2011-03-26 Eric Botcazou <ebotcazou@adacore.com>
5555 * gcc-interface/gigi.h (finalize_from_with_types): Adjust comment.
5556 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Access_Type>: Defer
5557 unconditionally to the end of the unit when the designated type is
5559 <all>: Rename local variable. Attempt to un-defer types only and do it
5560 for limited_with'ed types as well.
5561 (finalize_from_with_types): Adjust comment. Rename variable and tidy.
5562 * gcc-interface/trans.c (Compilation_Unit_to_gnu): Use GNAT_UNIT
5563 consistently and remove redundant call to finalize_from_with_types.
5565 2011-03-26 Eric Botcazou <ebotcazou@adacore.com>
5567 * inline.adb (Back_End_Cannot_Inline): Lift restriction on calls to
5568 subprograms without a previous spec declared in the same unit.
5569 * gcc-interface/trans.c (Compilation_Unit_to_gnu): Process inlined
5570 subprograms at the end of the unit instead of at the beginning.
5571 * gcc-interface/utils.c (create_subprog_decl): Check that the entity
5572 isn't public for the special handling of non-inline functions nested
5573 inside inline external functions.
5575 2011-03-25 Jeff Law <law@redhat.com>
5577 * gcc-interface/utils.c (def_fn_type): Add missing va_end.
5579 2011-03-24 Eric Botcazou <ebotcazou@adacore.com>
5581 * einfo.ads (Size_Depends_On_Discriminant): Adjust description.
5582 * layout.adb (Compute_Size_Depends_On_Discriminant): New procedure
5583 to compute Set_Size_Depends_On_Discriminant.
5584 (Layout_Type): Call it on array types in back-end layout mode.
5585 * sem_util.adb (Requires_Transient_Scope): Return true for array
5586 types only if the size depends on the value of discriminants.
5587 * gcc-interface/utils2.c (build_binary_op) <MODIFY_EXPR>: Use the RHS
5588 type if the RHS is a call to a function that returns an unconstrained
5589 type with default discriminant.
5591 2011-03-24 Eric Botcazou <ebotcazou@adacore.com>
5593 * gcc-interface/trans.c (gnat_to_gnu): Remove obsolete case of
5594 non-conversion to the nominal result type at the end.
5596 2011-03-23 Eric Botcazou <ebotcazou@adacore.com>
5598 * gcc-interface/trans.c (create_temporary): New function taken from...
5599 (create_init_temporary): ...here. Call it.
5600 (call_to_gnu): Create the temporary for the return value early, if any.
5601 Create it for a function with copy-in/copy-out parameters if there is
5602 no target; in other cases of copy-in/copy-out, use another temporary.
5603 Push the new binding level lazily. Add and rename local variables.
5605 2011-03-23 Eric Botcazou <ebotcazou@adacore.com>
5607 * gcc-interface/decl.c (validate_size): Improve comments and tweak
5609 (set_rm_size): Likewise.
5611 2011-03-23 Eric Botcazou <ebotcazou@adacore.com>
5613 * gcc-interface/decl.c (gnat_to_gnu_entity) <object>: Create TYPE_DECL
5614 for the padded type built in order to support a specified alignment.
5615 Fix incorrect formatting.
5617 2011-03-21 Eric Botcazou <ebotcazou@adacore.com>
5620 * gcc-interface/decl.c (elaborate_expression_1): Localize GNU_DECL.
5622 2011-03-21 Eric Botcazou <ebotcazou@adacore.com>
5624 * gcc-interface/decl.c (components_to_record): Add REORDER parameter,
5625 rename DEBUG_INFO_P into DEBUG_INFO and move P_GNU_REP_LIST parameter
5626 to the end of the list. Adjust recursive call. Rename local variable.
5627 If REORDER is true, reorder components of the record type.
5628 (gnat_to_gnu_entity): Pass OK_To_Reorder_Components flag as argument to
5629 components_to_record and adjust the parameter list.
5631 2011-03-21 Eric Botcazou <ebotcazou@adacore.com>
5633 * gcc-interface/decl.c (elaborate_expression_1): When optimization is
5634 disabled, use the variable for bounds of loop iteration scheme.
5636 2011-03-21 Kai Tietz <ktietz@redhat.com>
5639 * gcc-interface/utils.c (gnat_internal_attribute_table): Add column.
5641 2011-03-17 Eric Botcazou <ebotcazou@adacore.com>
5643 * gcc-interface/decl.c (elaborate_expression_1): Try harder to find
5644 out whether the expression is read-only. Short-circuit placeholder
5645 case and rename a couple of local variables.
5647 2011-03-17 Eric Botcazou <ebotcazou@adacore.com>
5649 * gcc-interface/gigi.h (smaller_form_type_p): Declare.
5650 * gcc-interface/trans.c (smaller_form_type_p): Make global and move...
5651 * gcc-interface/utils.c (smaller_form_type_p): ...to here.
5652 (convert): Deal with conversions from a smaller form type specially.
5654 2011-02-14 Eric Botcazou <ebotcazou@adacore.com>
5656 * gcc-interface/misc.c (gnat_init_options): Do not concatenate -I and
5657 its argument, except for the special -I- switch.
5659 2011-02-12 Gerald Pfeifer <gerald@pfeifer.com>
5661 * gnat_ugn.texi (Compiling Different Versions of Ada): Update link to
5664 2011-02-08 Eric Botcazou <ebotcazou@adacore.com>
5666 * gcc-interface/Makefile.in (x86-64 darwin): Handle multilibs.
5668 2011-02-03 Eric Botcazou <ebotcazou@adacore.com>
5670 * gcc-interface/gigi.h (fill_vms_descriptor): Take GNU_TYPE instead of
5672 * gcc-interface/utils2.c (fill_vms_descriptor): Move from here to...
5673 * gcc-interface/utils.c (fill_vms_descriptor): ...here. Take GNU_TYPE
5674 instead of GNAT_FORMAL. Protect the expression against multiple uses.
5675 Do not generate the check directly, instead instantiate the template
5676 check present in the descriptor.
5677 (make_descriptor_field): Move around.
5678 (build_vms_descriptor32): Build a template check in the POINTER field.
5679 (build_vms_descriptor): Remove useless suffixes.
5680 * gcc-interface/trans.c (call_to_gnu): Adjust fill_vms_descriptor call.
5682 2011-01-26 Eric Botcazou <ebotcazou@adacore.com>
5685 * targext.c: Include target files if IN_RTS is defined.
5687 2011-01-26 Richard Guenther <rguenther@suse.de>
5690 * targext.c: Include config.h.
5691 * gcc-interface/Make-lang.in (ada/targext.o): Add $(CONFIG_H)
5694 2011-01-04 Pascal Obry <obry@adacore.com>
5695 Eric Botcazou <ebotcazou@adacore.com>
5697 * gcc-interface/decl.c: Disable Stdcall convention handling for 64-bit.
5699 2011-01-04 Eric Botcazou <ebotcazou@adacore.com>
5701 * gcc-interface/trans.c (Case_Statement_to_gnu): Put the SLOC of the
5702 end-of-case on the end label and its associated gotos, if any.
5704 2011-01-04 Eric Botcazou <ebotcazou@adacore.com>
5706 * gcc-interface/trans.c (Subprogram_Body_to_gnu): Evaluate the
5707 expressions of the parameter cache within the statement group of
5710 2011-01-04 Olivier Hainque <hainque@adacore.com>
5711 Eric Botcazou <ebotcazou@adacore.com>
5713 * gcc-interface/trans.c (BLOCK_SOURCE_END_LOCATION): Provide default.
5714 (set_end_locus_from_node): New function.
5715 (Subprogram_Body_to_gnu): Use it to mark both the inner BIND_EXPR we
5716 make and the function end_locus.
5717 (Compilation_Unit_to_gnu): Call it instead of a straight Sloc_to_locus
5718 for the elaboration subprogram.
5719 (set_gnu_expr_location_from_node) <default case>: Use it to attempt to
5720 set the end_locus of the expression as well.
5722 2011-01-04 Eric Botcazou <ebotcazou@adacore.com>
5725 * gcc-interface/trans.c (Identifier_to_gnu): In SJLJ mode, do not make
5726 variables that are referenced in exception handlers volatile.
5730 Copyright (C) 2011 Free Software Foundation, Inc.
5732 Copying and distribution of this file, with or without modification,
5733 are permitted in any medium without royalty provided the copyright
5734 notice and this notice are preserved.
5736 * gnat_rm.texi: Ramification of pragma Eliminate documentation
5737 - fix bugs in the description of Source_Trace;
5738 - get rid of UNIT_NAME;
5740 2011-08-02 Javier Miranda <miranda@adacore.com>
5743 (Build_Dispatching_Requeue): Adding support for VM targets
5744 since we cannot directly reference the Tag entity.
5745 * exp_sel.adb (Build_K): Adding support for VM targets.
5746 (Build_S_Assignment): Adding support for VM targets.
5748 (Default_Prim_Op_Position): In VM targets do not restrict availability
5749 of predefined interface primitives to compiling in Ada 2005 mode.
5750 (Is_Predefined_Interface_Primitive): In VM targets this service is not
5751 restricted to compiling in Ada 2005 mode.
5752 (Make_VM_TSD): Generate code that declares and initializes the OSD
5753 record. Needed to support dispatching calls through synchronized
5756 (Make_Predefined_Primitive_Specs): Enable generation of predefined
5757 primitives associated with synchronized interfaces.
5758 (Make_Predefined_Primitive_Bodies): Enable generation of predefined
5759 primitives associated with synchronized interfaces.
5761 2011-08-02 Yannick Moy <moy@adacore.com>
5763 * par-ch11.adb (P_Handled_Sequence_Of_Statements): mark a sequence of
5764 statements hidden in SPARK if preceded by the HIDE directive
5765 (Parse_Exception_Handlers): mark each exception handler in a sequence of
5766 exception handlers as hidden in SPARK if preceded by the HIDE directive
5767 * par-ch6.adb (P_Subprogram): mark a subprogram body hidden in SPARK
5768 if starting with the HIDE directive
5769 * par-ch7.adb (P_Package): mark a package body hidden in SPARK if
5770 starting with the HIDE directive; mark the declarations in a private
5771 part as hidden in SPARK if the private part starts with the HIDE
5773 * restrict.adb, restrict.ads
5774 (Set_Hidden_Part_In_SPARK): record a range of slocs as hidden in SPARK
5775 (Is_In_Hidden_Part_In_SPARK): new function which returns whether its
5776 argument node belongs to a part which is hidden in SPARK
5777 (Check_SPARK_Restriction): do not issue violations on nodes in hidden
5778 parts in SPARK; protect the possibly costly call to
5779 Is_In_Hidden_Part_In_SPARK by a check that the SPARK restriction is on
5780 * scans.ads (Token_Type): new value Tok_SPARK_Hide in enumeration
5781 * scng.adb (Accumulate_Token_Checksum_GNAT_6_3,
5782 Accumulate_Token_Checksum_GNAT_5_03): add case for new token
5784 (Scan): recognize special comment starting with '#' and followed by
5785 SPARK keyword "hide" as a HIDE directive.
5787 2011-08-02 Yannick Moy <moy@adacore.com>
5789 * types.ads, erroutc.ads: Minor reformatting.
5791 2011-08-02 Vincent Celier <celier@adacore.com>
5793 * link.c: Add response file support for cross platforms.
5795 2011-08-02 Ed Schonberg <schonberg@adacore.com>
5797 * sem_aggr.adb (Resolve_Array_Aggregate): when copying the expression
5798 in an association, set parent field of copy before partial analysis.
5799 * sem_res.adb (Resolve_Slice): create reference to itype only when
5800 expansion is enabled.
5802 2011-08-02 Yannick Moy <moy@adacore.com>
5804 * einfo.adb, einfo.ads (Body_Is_In_ALFA, Set_Body_Is_In_ALFA): get/set
5805 for new flag denoting which subprogram bodies are in ALFA
5806 * restrict.adb, sem_ch7.adb: Update comment
5807 * sem_ch11.adb, sem_ch2.adb, sem_ch3.adb, sem_ch4.adb, sem_ch5.adb,
5808 sem_ch9.adb, sem_res.adb: Add calls to
5809 Current_Subprogram_Body_Is_Not_In_ALFA on unsupported constructs.
5810 * sem_ch6.adb (Analyze_Function_Return): add calls to
5811 Current_Subprogram_Body_Is_Not_In_ALFA on return statement in the
5812 middle of the body, and extended return.
5813 (Check_Missing_Return): add calls to Set_Body_Is_In_ALFA with argument
5814 False when missing return.
5815 (Analyze_Subprogram_Body_Helper): initialize the flag Body_Is_In_ALFA
5816 to True for subprograms whose spec is in ALFA. Remove later on the flag
5817 on the entity used for a subprogram body when there exists a separate
5819 * sem_util.adb, sem_util.ads (Current_Subprogram_Body_Is_Not_In_ALFA):
5820 if Current_Subprogram is not Empty, set its flag Body_Is_In_ALFA to
5821 False, otherwise do nothing.
5823 2011-08-02 Robert Dewar <dewar@adacore.com>
5825 * inline.adb, stand.ads, sem_ch6.adb, sem_ch8.adb: Minor reformatting.
5827 2011-08-02 Yannick Moy <moy@adacore.com>
5829 * sem_ch4.ads: minor formatting.
5831 2011-08-02 Yannick Moy <moy@adacore.com>
5833 * sem_aggr.adb, err_vars.ads, sem_ch3.adb, sem_ch5.adb, sem_ch9.adb,
5834 debug.adb, sem_util.adb, sem_res.adb, sem_attr.adb, gnat1drv.adb,
5835 errout.adb, errout.ads, exp_ch6.adb, sem_ch4.adb, restrict.adb,
5836 restrict.ads, sem_ch6.adb, sem_ch8.adb, sem_ch11.adb,
5837 opt.ads: cleanup of SPARK mode
5839 2011-08-02 Yannick Moy <moy@adacore.com>
5841 * cstand.adb (Create_Standard): sets Is_In_ALFA component of standard
5843 * einfo.adb, einfo.ads (Is_In_ALFA): add flag for all entities
5844 (Is_In_ALFA, Set_Is_In_ALFA): new subprograms to access flag Is_In_ALFA
5846 (Analyze_Object_Declaration): set Is_In_ALFA flag for objects
5847 (Constrain_Enumeration): set Is_In_ALFA flag for enumeration subtypes
5848 (Constrain_Integer): set Is_In_ALFA flag for integer subtypes
5849 (Enumeration_Type_Declaration): set Is_In_ALFA flag for enumeration
5851 (Set_Scalar_Range_For_Subtype): unset Is_In_ALFA flag for subtypes with
5853 * sem_ch6.adb (Analyze_Return_Type): unset Is_In_ALFA flag for
5854 functions whose return type is not in ALFA.
5855 (Analyze_Subprogram_Specification): set Is_In_ALFA flag for subprogram
5857 (Process_Formals): unset Is_In_ALFA flag for subprograms if a
5858 parameter's type is not in ALFA.
5859 * stand.ads (Standard_Type_Is_In_ALFA): array defines which standard
5862 2011-08-02 Ed Schonberg <schonberg@adacore.com>
5864 * sem_ch6 (Analyze_Expression_Function): treat the function as
5865 Inline_Always, and introduce a subprogram declaration for it when it is
5867 * inline.adb (Add_Inlined_Body): recognize bodies that come from
5868 expression functions, so that the back-end can determine whether they
5869 can in fact be inlined.
5870 * sem_util.adb (Is_Expression_Function): predicate to determine whether
5871 a function body comes from an expression function.
5873 2011-08-02 Gary Dismukes <dismukes@adacore.com>
5875 * sem_ch6.adb (Check_Conformance): Revise the check for nonconforming
5876 null exclusions to test Can_Never_Be_Null on the anonymous access types
5877 of the formals rather than testing the formals themselves. Exclude this
5878 check in cases where the Old_Formal is marked as a controlling formal,
5879 to avoid issuing spurious errors for bodies completing dispatching
5880 operations (due to the flag not getting set on controlling access
5881 formals in body specs).
5882 (Find_Corresponding_Spec): When checking full and subtype conformance of
5883 subprogram bodies in instances, pass Designated and E in that order, for
5884 consistency with the expected order of the formals (New_Id followed by
5887 2011-08-02 Robert Dewar <dewar@adacore.com>
5889 * sem_ch8.adb: Minor reformatting.
5891 2011-08-02 Ed Schonberg <schonberg@adacore.com>
5893 * sem_ch8.adb (Analyze_Subprogram_Renaming): new procedure
5894 Check_Class_Wide_Actual, to implement AI05-0071, on defaulted
5895 primitive operations of class-wide actuals.
5897 2011-08-02 Javier Miranda <miranda@adacore.com>
5899 * exp_atag.ads, exp_atag.adb
5900 (Build_Common_Dispatching_Select_Statements): Remove argument Loc
5901 since its value is implicitly passed in argument Typ.
5902 * exp_disp.adb (Make_Disp_Conditional_Select_Body,
5903 Make_Disp_Timed_Select_Body): Remove Loc in calls to routine
5904 Build_Common_Dispatching_Select_Statements.
5906 2011-08-02 Robert Dewar <dewar@adacore.com>
5908 * sem_ch3.adb, exp_atag.ads, get_scos.adb, get_scos.ads,
5909 exp_disp.adb, lib-xref.adb, lib-xref.ads: Update comments.
5912 2011-08-02 Robert Dewar <dewar@adacore.com>
5914 * sem_res.adb: Minor reformatting.
5915 * sem_prag.adb: Minor reformatting.
5917 2011-08-02 Javier Miranda <miranda@adacore.com>
5919 * exp_atag.adb, exp_atags.ads
5920 (Build_Common_Dispatching_Select_Statement): Replace argument DT_Ptr
5921 by the tagged type Entity. Required to use this routine in the VM
5922 targets since we do not have available the Tag entity in the VM
5925 (Expand_N_Subprogram_Body): Do not invoke Build_VM_TSDs if package
5926 Ada.Tags has not been previously loaded.
5928 (Expand_N_Package_Declaration, Expand_N_Package_Body): Do not invoke
5929 Build_VM_TSDs if package Ada.Tags has not been previously loaded.
5931 (Enclosing_Dynamic_Scope): Add missing support to handle the full
5932 view of enclosing scopes. Required to handle enclosing scopes that
5933 are synchronized types whose full view is a task type.
5935 (Build_VM_TSDs): Minor code improvement to avoid generating and
5936 analyzing lists with empty nodes.
5937 (Make_Disp_Asynchronous_Select_Body): Add support for VM targets.
5938 (Make_Disp_Conditional_Select_Body): Add support for VM targets.
5939 (Make_Disp_Get_Prim_Op_Kind): Add support for VM targets.
5940 (Make_Disp_Timed_Select_Body): Add support for VM targets.
5941 (Make_Select_Specific_Data_Table): Add support for VM targets.
5942 (Make_VM_TSD): Generate code to initialize the SSD structure of
5945 2011-08-02 Yannick Moy <moy@adacore.com>
5947 * lib-writ.adb (Write_ALI): when ALFA mode is set, write local
5948 cross-references section in ALI.
5949 * lib-xref.adb, lib-xref.ads (Xref_Entry): add components Sub
5950 (enclosing subprogram), Slc (location of Sub) and Sun (unit number of
5952 (Enclosing_Subprogram_Or_Package): new function to return the enclosing
5953 subprogram or package entity of a node
5954 (Is_Local_Reference_Type): new function returns True for references
5955 selected in local cross-references.
5956 (Lt): function extracted from Lt in Output_References
5957 (Write_Entity_Name): function extracted from Output_References
5958 (Generate_Definition): generate reference with type 'D' for definition
5959 of objects (object declaration and parameter specification), with
5960 appropriate locations and units, for use in local cross-references.
5961 (Generate_Reference): update fields Sub, Slc and Sun. Keep newly created
5962 references of type 'I' for initialization in object definition.
5963 (Output_References): move part of function Lt and procedure
5964 Write_Entity_Name outside of the body. Ignore references of types 'D'
5965 and 'I' introduced for local cross-references.
5966 (Output_Local_References): new procedure to output the local
5967 cross-references sections.
5968 (Lref_Entity_Status): new array defining whether an entity is a local
5969 * sem_ch3.adb (Analyze_Object_Declaration): call Generate_Reference
5970 with 'I' type when initialization expression is present.
5971 * get_scos.adb, get_scos.ads: Correct comments and typos
5973 2011-08-02 Javier Miranda <miranda@adacore.com>
5975 * exp_ch6.adb (Expand_N_Subprogram_Body): Enable generation of TSDs in
5977 * exp_ch7.adb (Expand_N_Package_Body): Enable generation of TSDs in
5979 * exp_disp.adb (Build_VM_TSDs): No action needed if the runtime has no
5982 2011-08-02 Vincent Celier <celier@adacore.com>
5984 * prj-nmsc.adb (File_Found): New components Excl_File and Excl_Line
5985 (No_Space_Img): New function
5986 (Find_Excluded_Sources): When reading from a file, record the file name
5987 and the line number for each excluded source.
5988 (Mark_Excluded_Sources): When reporting an error, if the excluded
5989 sources were read from a file, include file name and line number in
5992 2011-08-02 Ed Schonberg <schonberg@adacore.com>
5994 * sem_res.adb (Resolve_Call): implement rule in RM 12.5.1 (23.3/2).
5996 2011-08-02 Robert Dewar <dewar@adacore.com>
5998 * exp_ch7.adb exp_ch6.adb, exp_disp.adb: Minor reformatting
6000 2011-08-02 Javier Miranda <miranda@adacore.com>
6002 * exp_ch6.adb (Expand_N_Subprogram_Body): Temporarily restrict the
6003 generation of TSDs to the DOTNET compiler.
6004 * exp_ch7.adb (Expand_N_Package_Body): Temporarily restrict the
6005 generation of TSDs to the DOTNET compiler.
6007 2011-08-02 Javier Miranda <miranda@adacore.com>
6009 * exp_disp.ads (Build_VM_TSDs): Build the runtime Type Specific Data
6010 record of all the tagged types declared inside library level package
6011 declarations, library level package bodies or library level subprograms.
6012 * exp_disp.adb (Make_VM_TSD): New subprogram that builds the TSD
6013 associated with a given tagged type.
6014 (Build_VM_TSDs): New subprogram.
6015 * exp_ch6.adb (Expand_N_Subprogram_Body): Generate TSDs records of main
6016 compilation units that are subprograms.
6017 * exp_ch7.adb (Expand_N_Package_Body): Generate TSDs of main
6018 compilation units that are package bodies.
6019 (Expand_N_Package_Declaration): Generate TSDs of the main compilation
6020 units that are a package declaration or a package instantiation.
6021 * exp_intr.adb (Expand_Dispatching_Constructor_Call): Minor code
6022 reorganization to improve the error generated by the frontend when the
6023 function Ada.Tags.Secondary_Tag is not available.
6024 * rtsfind.ads (RE_Register_TSD): New runtime entity.
6025 * exp_ch4.adb (Expand_N_Type_Conversion): Minor code cleanup.
6027 2011-08-02 Javier Miranda <miranda@adacore.com>
6029 * exp_disp.adb (Make_DT): Generate call to Check_TSD in Ada 2005 mode.
6031 2011-08-02 Robert Dewar <dewar@adacore.com>
6033 * s-imenne.ads: Minor reformatting.
6035 2011-08-02 Robert Dewar <dewar@adacore.com>
6037 * a-stunau.ads: Add pragma Suppress_Initialization for Big_String
6038 * freeze.adb (Warn_Overlay): Don't warn if initialization suppressed
6039 * s-stalib.ads: Add pragma Suppress_Initialization for Big_String
6041 2011-08-02 Robert Dewar <dewar@adacore.com>
6043 * einfo.ads (Materialize_Entity): Document this is only for renamings
6044 * exp_ch3.adb (Expand_N_Object_Declaration): Make sure we generate
6045 required debug information in the case where we transform the object
6046 declaration into a renaming declaration.
6047 * exp_ch4.adb (Expand_Concatenate): Generate debug info for result
6049 * exp_dbug.ads (Debug_Renaming_Declaration): Document setting of
6052 2011-08-02 Robert Dewar <dewar@adacore.com>
6054 * einfo.ads, einfo.adb (Suppress_Initialization): Replaces
6055 Suppress_Init_Procs.
6056 * exp_ch3.adb, exp_disp.adb, freeze.adb: Use
6057 Suppress_Initialization/Initialization_Suppressed.
6058 * gnat_rm.texi: New documentation for pragma Suppress_Initialization
6059 * sem_aux.ads, sem_aux.adb (Initialization_Suppressed): New function
6060 * sem_dist.adb: Use Suppress_Initialization/Initialization_Suppressed
6061 * sem_prag.adb: New processing for pragma Suppress_Initialization.
6063 2011-08-02 Robert Dewar <dewar@adacore.com>
6065 * gnat_rm.texi, a-tags.ads, sem_prag.adb, sem_ch12.adb, exp_disp.adb:
6068 2011-08-02 Ed Schonberg <schonberg@adacore.com>
6070 * sem_prag.adb (Chain_PPC): Implement AI04-0230: null procedures can
6071 only have inheritable classwide pre/postconditions.
6073 2011-08-02 Javier Miranda <miranda@adacore.com>
6075 * a-tags.ads, a-tags.adb (Check_TSD): New subprogram.
6076 * rtsfind.ads (RE_Check_TSD): New runtime entity.
6077 * exp_disp.adb (Make_DT): Generate call to the new runtime routine that
6078 checks if the external tag of a type is the same as the external tag
6079 of some other declaration.
6081 2011-08-02 Thomas Quinot <quinot@adacore.com>
6083 * s-taskin.ads: Minor reformatting.
6085 2011-08-02 Emmanuel Briot <briot@adacore.com>
6087 * g-comlin.adb (Display_Help): swap the order in which it prints the
6088 short help and the general usage.
6090 2011-08-02 Ed Schonberg <schonberg@adacore.com>
6092 * sem_ch12.adb (Analyze_Generic_Subprogram_Declaration): copy properly
6093 the aspect declarations and attach them to the generic copy for
6094 subsequent analysis.
6095 (Analyze_Subprogram_Instantiation): copy explicitly the aspect
6096 declarations of the generic tree to the new subprogram declarations.
6097 * sem_attr.adb (Check_Precondition_Postcondition): recognize
6098 conditions that apply to a subprogram instance.
6100 2011-08-02 Robert Dewar <dewar@adacore.com>
6102 * gnat_rm.texi: Clarify doc on pragma Source_File_Name[_Project].
6104 2011-08-02 Ed Schonberg <schonberg@adacore.com>
6106 * sem_ch3.adb (Derived_Type_Declaration): When checking that a untagged
6107 private type with a tagged full view is not derived in the immediate
6108 scope of the partial view, (RM 7.3 (7)) use the scope of the base type.
6110 2011-08-02 Robert Dewar <dewar@adacore.com>
6112 * exp_ch4.adb: Minor reformatting.
6114 2011-08-02 Ed Schonberg <schonberg@adacore.com>
6116 * sem_ch5.adb (Analyze_Loop_Statement): If the iteration scheme is an
6117 Ada2012 iterator, the loop will be rewritten during expansion into a
6118 while loop with a cursor and an element declaration. Do not analyze the
6119 body in this case, because if the container is for indefinite types the
6120 actual subtype of the elements will only be determined when the cursor
6121 declaration is analyzed.
6123 2011-08-02 Arnaud Charlet <charlet@adacore.com>
6125 * sem_ch13.adb (Analyze_Attribute_Definition_Clause): Ignore
6126 size/alignment related attributes in CodePeer_Mode.
6128 2011-08-02 Gary Dismukes <dismukes@adacore.com>
6130 * sem_ch3.adb (Check_Ops_From_Incomplete_Type): Remove call to
6131 Prepend_Element, since this can result in the operation getting the
6132 wrong slot in the full type's dispatch table if the full type has
6133 inherited operations. The incomplete type's operation will get added
6134 to the proper position in the full type's primitives
6135 list later in Sem_Disp.Check_Operation_From_Incomplete_Type.
6136 (Process_Incomplete_Dependents): Add Is_Primitive test when checking for
6137 dispatching operations, since there are cases where nonprimitive
6138 subprograms can get added to the list of incomplete dependents (such
6139 as subprograms in nested packages).
6140 * sem_ch6.adb (Process_Formals): First, remove test for being in a
6141 private part when determining whether to add a primitive with a
6142 parameter of a tagged incomplete type to the Private_Dependents list.
6143 Such primitives can also occur in the visible part, and should not have
6144 been excluded from being private dependents.
6145 * sem_ch7.adb (Uninstall_Declarations): When checking the rule of
6146 RM05-3.10.1(9.3/2), test that a subprogram in the Private_Dependents
6147 list of a Taft-amendment incomplete type is a primitive before issuing
6148 an error that the full type must appear in the same unit. There are
6149 cases where nonprimitives can be in the list (such as subprograms in
6151 * sem_disp.adb (Derives_From): Use correct condition for checking that
6152 a formal's type is derived from the type of the corresponding formal in
6153 the parent subprogram (the condition was completely wrong). Add
6154 checking that was missing for controlling result types being derived
6155 from the result type of the parent operation.
6157 2011-08-02 Yannick Moy <moy@adacore.com>
6159 * errout.adb (First_Node): minor renaming
6160 * restrict.adb (Check_Formal_Restriction): put restriction warning on
6163 2011-08-02 Yannick Moy <moy@adacore.com>
6165 * sem_res.adb (Resolve_Logical_Op): ensure N is a binary operator
6166 before accessing operands.
6167 * sem_util.adb (Is_SPARK_Initialization_Expr): follow original nodes to
6168 decide whether an initialization expression respects SPARK rules, as
6169 the plain node is the expanded one. This allows for more valid warnings
6171 * gnat_rm.texi: Minor update.
6173 2011-08-02 Arnaud Charlet <charlet@adacore.com>
6175 * sem_ch13.adb (Analyze_Enumeration_Representation_Clause): Revert
6178 2011-08-02 Robert Dewar <dewar@adacore.com>
6180 * sem_ch3.adb, sem_ch4.adb: Minor reformatting.
6182 2011-08-02 Hristian Kirtchev <kirtchev@adacore.com>
6184 * exp_ch5.adb (Expand_Iterator_Loop): Reformatting. Wrap the original
6185 loop statements and the element renaming declaration with a block when
6186 the element type is controlled.
6188 2011-08-02 Yannick Moy <moy@adacore.com>
6190 * sinfo.ads: Minor formatting.
6192 2011-08-02 Ed Schonberg <schonberg@adacore.com>
6194 * sem_aggr.adb (Add_Association): if the association has a box and no
6195 expression, use the Sloc of the aggregate itself for the new
6197 * errout.adb (First_Node): Exclude nodes with no Sloc, and always use
6200 2011-08-02 Hristian Kirtchev <kirtchev@adacore.com>
6202 * exp_ch5.adb (Expand_Iterator_Loop): Code cleanup and refactoring.
6203 When a container is provided via a function call, generate a renaming
6204 of the function result. This avoids the creation of a transient scope
6205 and the premature finalization of the container.
6206 * exp_ch7.adb (Is_Container_Cursor): Removed.
6207 (Wrap_Transient_Declaration): Remove the supression of the finalization
6208 of the list controller when the declaration denotes a container cursor,
6211 2011-08-02 Yannick Moy <moy@adacore.com>
6213 * restrict.adb (Check_Formal_Restriction): only issue a warning if the
6214 node is from source, instead of the original node being from source.
6216 (Resolve_Array_Aggregate): refine the check for a static expression, to
6217 recognize also static ranges
6218 * sem_ch3.adb, sem_ch3.ads (Analyze_Component_Declaration,
6219 Array_Type_Declaration): postpone the test for the type being a subtype
6220 mark after the type has been resolved, so that component-selection and
6221 expanded-name are discriminated.
6222 (Make_Index, Process_Range_Expr_In_Decl): add a parameter In_Iter_Schm
6223 to distinguish the case of an iteration scheme, so that an error is
6224 issed on a non-static range in SPARK except in an iteration scheme.
6225 * sem_ch5.adb (Analyze_Iteration_Scheme): call Make_Index with
6226 In_Iter_Schm = True.
6227 * sem_ch6.adb (Analyze_Subprogram_Specification): refine the check for
6228 user-defined operators so that they are allowed in renaming
6230 (Find_Selected_Component): refine the check for prefixing of operators
6231 so that they are allowed in renaming. Move the checks for restrictions
6232 on selector name after analysis discriminated between
6233 component-selection and expanded-name.
6234 * sem_res.adb (Resolve_Op_Concat_Arg): do not issue a warning on
6235 concatenation argument of string type if it is static.
6236 * sem_util.adb, sem_util.ads
6237 (Check_Later_Vs_Basic_Declarations): add a new function
6238 Is_Later_Declarative_Item to decice which declarations are allowed as
6239 later items, in the two different modes Ada 83 and SPARK. In the SPARK
6240 mode, add that renamings are considered as later items.
6241 (Enclosing_Package): new function to return the enclosing package
6242 (Enter_Name): correct the rule for homonyms in SPARK
6243 (Is_SPARK_Initialization_Expr): default to returning True on nodes not
6244 from source (result of expansion) to avoid issuing wrong warnings.
6246 2011-08-02 Ed Schonberg <schonberg@adacore.com>
6248 * errout.adb: On anything but an expression First_Node returns its
6251 2011-08-02 Pascal Obry <obry@adacore.com>
6253 * prj-proc.adb, make.adb, makeutl.adb: Minor reformatting.
6255 2011-08-02 Hristian Kirtchev <kirtchev@adacore.com>
6257 * exp_ch5.adb (Expand_Iterator_Loop): Code cleanup and reorganization.
6258 Set the associated loop as the related expression of internally
6260 * exp_ch7.adb (Is_Container_Cursor): New routine.
6261 (Wrap_Transient_Declaration): Supress the finalization of the list
6262 controller when the declaration denotes a container cursor.
6264 2011-08-02 Yannick Moy <moy@adacore.com>
6266 * opt.ads (SPARK_Mode): update comment, SPARK_Mode only set through
6268 * par-ch3.adb (P_Delta_Constraint): remove check in SPARK mode that the
6269 expression is a simple expression. This check cannot be performed in
6270 the semantics, so just drop it.
6271 (P_Index_Or_Discriminant_Constraint): move check that the index or
6272 discriminant is a subtype mark to Analyze_Subtype_Declaration in the
6273 semantics. Other cases were previously checked in the semantics.
6274 * par-ch4.adb (P_Name): move checks that a selector name is not
6275 character literal or an operator symbol to Find_Selected_Component in
6277 * par-ch5.adb (Parse_Decls_Begin_End): move check that basic
6278 declarations are not placed after later declarations in a separate
6279 procedure in Sem_Util (possibly not the best choice?), to be used both
6280 during parsing, for Ada 83 mode, and during semantic analysis, for
6282 * par-endh.adb (Check_End): move check that end label is not missing
6283 to Process_End_Label in the semantics
6284 * par-prag.adb (Process_Restrictions_Or_Restriction_Warnings): remove
6285 the special case for SPARK restriction
6286 * par.adb: use and with Sem_Util, for use in Parse_Decls_Begin_End
6287 * restrict.adb, restrict.ads (Check_Formal_Restriction): add a
6288 parameter Force to issue the error message even on internal node (used
6289 for generated end label). Call Check_Restriction to check when an error
6290 must be issued. In SPARK mode, issue an error message even if the
6291 restriction is not set.
6292 (Check_Restriction): new procedure with an additional out parameter to
6293 inform the caller that a message has been issued
6294 * sem_aggr.adb: Minor modification of message
6295 * sem_attr.adb (Analyze_Attribute): call Check_Formal_Restriction
6296 instead of issuing an error message directly
6297 * sem_ch3.adb (Analyze_Declarations): move here the check that basic
6298 declarations are not placed after later declarations, by calling
6299 Check_Later_Vs_Basic_Declarations
6300 (Analyze_Subtype_Declaration): move here the check that an index or
6301 discriminant constraint must be a subtype mark. Change the check that
6302 a subtype of String must start at one so that it works on subtype marks.
6303 * sem_ch4.adb (Analyze_Call): move here the check that a named
6304 association cannot follow a positional one in a call
6305 * sem_ch5.adb (Check_Unreachable_Code): call Check_Formal_Restriction
6306 instead of issuing an error message directly
6307 * sem_ch8.adb (Find_Selected_Component): move here the check that a
6308 selector name is not a character literal or an operator symbol. Move
6309 here the check that the prefix of an expanded name cannot be a
6310 subprogram or a loop statement.
6311 * sem_util.adb, sem_util.ads (Check_Later_Vs_Basic_Declarations): new
6312 procedure called from parsing and semantics to check that basic
6313 declarations are not placed after later declarations
6314 (Process_End_Label): move here the check that end label is not missing
6316 2011-08-02 Arnaud Charlet <charlet@adacore.com>
6318 * sem_ch13.adb (Analyze_Enumeration_Representation_Clause): Ignore enum
6319 representation clause in codepeer mode, since it confuses CodePeer and
6320 does not bring useful info.
6322 2011-08-02 Ed Falis <falis@adacore.com>
6324 * init.c: initialize fp hw on MILS.
6326 2011-08-02 Ed Schonberg <schonberg@adacore.com>
6328 * errout.adb (First_Node): for bodies, return the node itself (small
6329 optimization). For other nodes, do not check source_unit if the node
6330 comes from Standard.
6332 2011-08-02 Robert Dewar <dewar@adacore.com>
6334 * exp_ch3.adb: Minor comment additions.
6335 * sem_ch13.adb: Minor reformatting.
6337 2011-08-02 Pascal Obry <obry@adacore.com>
6339 * make.adb, makeutl.adb: Removes some superfluous directory separator.
6341 2011-08-02 Robert Dewar <dewar@adacore.com>
6343 * sem_attr.adb: Minor reformatting.
6345 2011-08-02 Robert Dewar <dewar@adacore.com>
6347 * einfo.adb (Has_Default_Aspect): Replaces Has_Default_Value
6348 (Has_Default_Component_Value): Removed
6349 * einfo.ads Comment updates
6350 (Has_Default_Aspect): Replaces Has_Default_Value
6351 (Has_Default_Component_Value): Removed
6353 (Expand_N_Freeze_Entity): Handle Default[_Component]_Value aspects
6355 (Build_Array_Init_Proc): Handle Default_[Component_]Value aspects
6356 (Get_Simple_Init_Val): Handle Default_Value aspect
6357 (Needs_Simple_Initialization): Handle Default_Value aspect
6358 * exp_ch3.ads: Needs_Simple_Initialization
6359 * freeze.adb (Freeze_Entity): Handle Default_[Component_]Value aspect
6360 * par-prag.adb (Pragma_Default[_Component]Value) Removed
6362 (Analyze_Aspect_Specifications): Fix Default[_Component]_Value aspects
6363 * sem_prag.adb (Pragma_Default[_Component]Value) Removed
6364 * snames.ads-tmpl (Pragma_Default[_Component]Value) Removed
6366 2011-08-02 Ed Schonberg <schonberg@adacore.com>
6368 * sem_ch5.adb (Analyze_Iterator_Specification): use base type to locate
6369 package containing iteration primitives.
6370 exp_ch5.adb (Expand_Iterator_Loop): ditto.
6372 2011-08-02 Ed Schonberg <schonberg@adacore.com>
6374 * sem_ch5.adb (Analyze_Iteration_Scheme): For an Ada2012 iterator with
6375 "of", pre-analyze expression in case it is a function call with
6376 finalization actions that must be placed ahead of the loop.
6377 * exp_ch5.adb (Expand_Iterator_Loop): If condition_actions are present
6378 on an Ada2012 iterator, insert them ahead of the rewritten loop.
6380 2011-08-02 Geert Bosch <bosch@adacore.com>
6382 * cstand.adb (Create_Float_Types): Only consider C's long double for
6383 Long_Long_Float, in addition to double.
6385 2011-08-02 Robert Dewar <dewar@adacore.com>
6387 * sem_ch3.adb, sem_ch5.adb, sem_type.adb, switch-c.adb, switch-c.ads,
6388 sem_prag.adb, sem_util.adb, sem_util.ads, sem_res.adb, warnsw.ads,
6389 prepcomp.ads, cstand.adb, stand.ads, a-calfor.adb, s-stusta.adb:
6392 2011-08-02 Ed Schonberg <schonberg@adacore.com>
6394 * sem_attr.adb: handle properly 'Result when it is a prefix of an
6397 2011-08-02 Javier Miranda <miranda@adacore.com>
6399 * einfo.ads, einfo.adb
6400 (Original_Access_Type): Move this attribute to Node26 since there was
6401 an undocumented use of Node21 in E_Access_Subprogram_Type entities
6402 which causes conflicts and breaks the generation of the .NET compiler.
6403 (Interface_Name): Add missing documentation on JGNAT only uses of
6406 2011-08-02 Geert Bosch <bosch@adacore.com>
6408 * cstand.adb (Back_End_Float_Types): Use Elist instead of Nlist
6409 (Find_Back_End_Float_Type): Likewise
6410 (Create_Back_End_Float_Types): Likewise
6411 (Create_Float_Types): Likewise
6412 (Register_Float_Type): Likewise
6413 * sem_ch3.adb (Floating_Point_Type_Declaration): Use Elist instead of
6414 Nlist and split out type selection in new local Find_Base_Type function.
6415 * sem_prag.adb (Process_Import_Predefined_Type): Use Elist instead of
6417 * stand.ads (Predefined_Float_Types): Use Elist instead of Nlist
6419 2011-08-02 Robert Dewar <dewar@adacore.com>
6421 * inline.adb: Minor code reorganization (put Get_Code_Unit_Entity in
6423 * opt.ads: Minor comment change.
6424 * sem_ch12.adb: Minor code reorganization.
6426 2011-08-02 Gary Dismukes <dismukes@adacore.com>
6428 * sem_ch3.adb (Complete_Private_Subtype): Don't append the private
6429 subtype's list of rep items to the list on the full subtype in the case
6430 where the lists are the same.
6432 2011-08-02 Geert Bosch <bosch@adacore.com>
6434 * switch-c.adb (Free): New deallocation procedure to avoid implicitly
6435 using the one from System.Strings, which also deallocates all strings.
6437 2011-08-02 Geert Bosch <bosch@adacore.com>
6439 * gcc-interface/gigi.h, gcc-interface/misc.c (enumerate_modes): New
6441 * gcc-interface/Make-lang.in: Update dependencies.
6443 2011-08-02 Olivier Hainque <hainque@adacore.com>
6445 * gcc-interface/trans.c (Subprogram_Body_to_gnu): Set the function
6448 2011-08-02 Javier Miranda <miranda@adacore.com>
6450 * sem_ch3.adb (Check_Anonymous_Access_Components): Create extra formals
6451 associated with anonymous access to subprograms.
6453 2011-08-02 Geert Bosch <bosch@adacore.com>
6456 (Preprocessing_Symbol_Defs): Move from Prepcomp.Symbol_Definitions.
6457 (Preprocessing_Symbol_Last): Move from Prepcomp.Last_Definition.
6458 * prepcomp.adb (Symbol_Definitions, Last_Definition): Move to opt.ads
6459 (Add_Symbol_Definition): Move to switch-c.adb
6460 (Process_Command_Line_Symbol_Definitions): Adjust references to above.
6461 * prepcomp.ads: Remove dependency on Ada.Unchecked_Deallocation.
6462 (Add_Symbol_Definition): Move to switch-c.adb.
6463 * sem_ch13.adb, sem_prag.adb: Add dependency on Warnsw.
6465 (Set_Dot_Warning_Switch, Set_GNAT_Mode_Warnings, Set_Warning_Switch):
6467 * sem_warn.ads (Warn_On_Record_Holes, Warn_On_Overridden_Size,
6468 Set_Dot_Warning_Switch, Set_GNAT_Mode_Warnings, Set_Warning_Switch):
6470 * switch-c.adb: Replace dependency on Prepcomp and Sem_Warn by Warnsw.
6471 (Add_Symbol_Definition): Moved from Prepcomp.
6472 * switch-c.ads: Update copyright notice. Use String_List instead of
6473 Argument_List, removing dependency on System.OS_Lib.
6475 2011-08-02 Yannick Moy <moy@adacore.com>
6477 * sem_ch3.adb (Analyze_Object_Declaration): issue an error in formal
6478 mode on initialization expression which does not respect SPARK
6480 * sem_util.adb, sem_util.ads (Is_SPARK_Initialization_Expr): determines
6481 if the tree referenced by its argument represents an initialization
6482 expression in SPARK, suitable for initializing an object in an object
6485 2011-08-02 Javier Miranda <miranda@adacore.com>
6487 * exp_ch9.adb (Expand_Access_Protected_Subprogram_Type): Link the
6488 internally generated access to subprogram with its associated protected
6490 * einfo.ads, einfo.adb (Original_Access_Type): New attribute.
6492 2011-08-02 Geert Bosch <bosch@adacore.com>
6494 * cstand.adb (Register_Float_Type): Print information about type to
6495 register, if the Debug_Flag_Dot_B is set.
6496 * debug.adb (Debug_Flag_Dot_B): Document d.b debug option.
6497 * rtsfind.ads (RE_Max_Base_Digits): New run time entity.
6498 * sem_ch3.adb (Floating_Point_Type_Declaration): Allow declarations
6499 with a requested precision of more than Max_Digits digits and no more
6500 than Max_Base_Digits digits, if a range specification is present and the
6501 Predefined_Float_Types list has a suitable type to derive from.
6502 * sem_ch3.adb (Rep_Item_Too_Early): Avoid generating error in the
6503 case of type completion with pragma Import
6505 (Process_Import_Predefined_Type): Processing to complete a type
6506 with pragma Import. Currently supports floating point types only.
6507 (Set_Convention_From_Pragma): Do nothing without underlying type.
6508 (Process_Convention): Guard against absence of underlying type,
6509 which may happen when importing incomplete types.
6510 (Process_Import_Or_Interface): Handle case of importing predefined
6511 types. Tweak error message.
6513 2011-08-02 Eric Botcazou <ebotcazou@adacore.com>
6515 * inline.adb (Add_Inlined_Body): Adjust check for library-level inlined
6516 functions to previous change. Reorganize code slightly.
6518 2011-08-02 Geert Bosch <bosch@adacore.com>
6520 * back_end.ads (Register_Type_Proc): New call back procedure type for
6521 allowing the back end to provide information about available types.
6522 (Register_Back_End_Types): New procedure to register back end types.
6523 * back_end.adb (Register_Back_End_Types): Call the back end to enumerate
6525 * cstand.adb (Back_End_Float_Types): New list for floating point types
6526 supported by the back end.
6527 (Build_Float_Type): Add extra parameter for Float_Rep_Kind.
6528 (Copy_Float_Type): New procedure to make new copies of predefined types.
6529 (Register_Float_Type): New call back procedure to populate the BEFT list
6530 (Find_Back_End_Float_Type): New procedure to find a BEFT by name
6531 (Create_Back_End_Float_Types): New procedure to populate the BEFT list.
6532 (Create_Float_Types): New procedure to create entities for floating
6533 point types predefined in Standard, and put these and any remaining
6534 BEFTs on the Predefined_Float_Types list.
6535 * stand.ads (Predefined_Float_Types): New list for predefined floating
6536 point types that do not have declarations in package Standard.
6538 2011-08-02 Eric Botcazou <ebotcazou@adacore.com>
6540 * inline.adb (Get_Code_Unit_Entity): New local function. Returns the
6541 entity node for the unit containing the parameter.
6542 (Add_Inlined_Body): Use it to find the unit containing the subprogram.
6543 (Add_Inlined_Subprogram): Likewise.
6544 * gcc-interface/Make-lang.in: Update dependencies.
6546 2011-08-02 Thomas Quinot <quinot@adacore.com>
6548 * s-stusta.adb (Print): Make sure Pos is always initialized to a
6551 2011-08-02 Geert Bosch <bosch@adacore.com>
6553 * a-calfor.adb (Image): Simplify, removing unnecessary uses of 'Image.
6555 2011-08-02 Eric Botcazou <ebotcazou@adacore.com>
6557 * sem_type.adb (Covers): Move trivial case to the top and reuse the
6558 computed value of Base_Type.
6560 2011-08-02 Yannick Moy <moy@adacore.com>
6562 * restrict.adb (Check_Restriction): issue an error for any use of
6563 class-wide, even if the No_Dispatch restriction is not set.
6564 * sem_aggr.adb: Correct typos in comments and messages in formal mode
6565 * sem_ch3.adb (Process_Full_View): issue an error in formal mode is,
6566 when completing a private extension, the type named in the private part
6567 is not the same as that named in the visible part.
6568 * sem_res.adb (Resolve_Call): issue an error in formal mode on the use
6569 of an inherited primitive operations of a tagged type or type extension
6570 that returns the tagged type.
6571 * sem_util.adb, sem_util.ads (Is_Inherited_Operation_For_Type): new
6572 function which returns True for an implicit operation inherited by the
6573 derived type declaration for the argument type.
6574 (Is_SPARK_Object_Reference): move to appropriate place in alphabetic
6577 2011-08-02 Ed Schonberg <schonberg@adacore.com>
6579 * sem_ch5.adb (Pre_Analyze_Range): new procedure extracted from
6580 Process_Bounds, to perform analysis with expansion of a range or an
6581 expression that is the iteration scheme for a loop.
6582 (Analyze_Iterator_Specification): If domain of iteration is given by a
6583 function call with a controlled result, as is the case if call returns
6584 a predefined container, ensure that finalization actions are properly
6586 * par-ch3.adb: accept Ada2012 iterator form in P_Discrete_Range.
6588 2011-08-02 Javier Miranda <miranda@adacore.com>
6590 * sem_ch5.adb (Analyze_Iteration_Scheme): Fix typo.
6591 * gcc-interface/Make-lang.in: Update dependencies.
6593 2011-08-02 Javier Miranda <miranda@adacore.com>
6595 * sem_util.ads, sem_util.adb (Is_Variable): Add a new formal to
6596 determine if the analysis is performed using N or Original_Node (N).
6597 * exp_util.adb (Side_Effect_Free): Code cleanup since the new
6598 functionality of routine Is_Variable avoids code duplication.
6599 * checks.adb (Determine_Range): Handle temporaries generated by
6600 Remove_Side_Effects.
6602 2011-08-02 Javier Miranda <miranda@adacore.com>
6604 * exp_ch4.adb (Expand_N_Quantified_Expression): Force reanalysis and
6605 expansion of the condition. Required since the previous analysis was
6606 done with expansion disabled (see Resolve_Quantified_Expression) and
6607 hence checks were not inserted and record comparisons have not been
6610 2011-08-02 Ed Falis <falis@adacore.com>
6612 * s-taprop-vxworks.adb, s-intman-vxworks.adb, s-intman-vxworks.ads:
6615 2011-08-02 Bob Duff <duff@adacore.com>
6617 * opt.ads: Minor comment fix.
6619 2011-08-02 Bob Duff <duff@adacore.com>
6621 * sem_ch12.adb (Analyze_Package_Instantiation,
6622 Analyze_Subprogram_Instantiation): Turn off style checking while
6623 analyzing an instance. Whatever style checks that apply to the generic
6624 unit should apply, so it makes no sense to apply them in an instance.
6625 This was causing trouble when compiling an instance of a runtime
6626 unit that violates the -gnatyO switch.
6627 * stylesw.adb (Set_Style_Check_Options): "when 'O' =>" was missing from
6628 one of the two case statements, causing spurious errors.
6630 2011-08-02 Robert Dewar <dewar@adacore.com>
6632 * uname.adb: Minor reformatting.
6633 * gnatcmd.adb: Minor reformatting.
6634 * exp_attr.adb: Minor reformatting.
6636 2011-08-02 Ed Schonberg <schonberg@adacore.com>
6638 * exp_ch5.adb (Expand_N_Assignment_Statement): under restriction
6639 No_Dispatching_Calls, do not look for the Assign primitive, because
6640 predefined primitives are not created in this case.
6642 2011-08-02 Bob Duff <duff@adacore.com>
6644 * stylesw.ads: Minor comment fixes.
6646 2011-08-02 Robert Dewar <dewar@adacore.com>
6648 * freeze.adb (Add_To_Result): New procedure.
6650 2011-08-02 Jose Ruiz <ruiz@adacore.com>
6652 * exp_attr.adb (Find_Stream_Subprogram): When using a configurable run
6653 time, if the specific run-time routines for handling streams of strings
6654 are not available, use the default mechanism.
6656 2011-08-02 Arnaud Charlet <charlet@adacore.com>
6658 * s-regpat.ads: Fix typo.
6660 2011-08-02 Vincent Celier <celier@adacore.com>
6662 * prj-conf.adb (Get_Or_Create_Configuration_File): If On_Load_Config is
6663 not null, call it to create the in memory config project file without
6664 parsing an existing default config project file.
6666 2011-08-02 Eric Botcazou <ebotcazou@adacore.com>
6668 * atree.adb (Allocate_Initialize_Node): Remove useless temporaries.
6670 2011-08-02 Ed Schonberg <schonberg@adacore.com>
6672 * sem_elim.adb: an abstract subprogram does not need an eliminate
6673 pragma for its descendant to be eliminable.
6675 2011-08-02 Ed Falis <falis@adacore.com>
6677 * init.c: revert to handling before previous checkin for VxWorks
6678 * s-intman-vxworks.adb: delete unnecessary declarations related to
6679 using Ada interrupt facilities for handling signals.
6680 Delete Initialize_Interrupts. Use __gnat_install_handler instead.
6681 * s-intman-vxworks.ads: Import __gnat_install_handler as
6682 Initialize_Interrupts.
6683 * s-taprop-vxworks.adb: Delete Signal_Mask.
6684 (Abort_Handler): change construction of mask to unblock exception
6687 2011-08-02 Jerome Guitton <guitton@adacore.com>
6689 * a-except-2005.adb (Raise_From_Signal_Handler): Call
6690 Debug_Raise_Exception before propagation starts.
6692 2011-08-02 Eric Botcazou <ebotcazou@adacore.com>
6694 * exp_ch6.adb (Expand_Call): Guard restriction checks with a call
6695 to Restriction_Check_Required.
6696 * sem_ch3.adb (Analyze_Object_Declaration): Likewise.
6697 * sem_res.adb (Resolve_Call): Likewise.
6698 * sem_attr.adb (Check_Stream_Attribute): Likewise.
6700 2011-08-02 Bob Duff <duff@adacore.com>
6702 * stylesw.ads: Update comment.
6703 * style.adb: Minor: Use Error_Msg_NE instead of Error_Msg_N.
6704 * errout.ads: Remove obsolete comment.
6706 2011-08-02 Javier Miranda <miranda@adacore.com>
6708 * einfo.ads, einfo.adb (Is_Safe_To_Reevaluate): new function.
6709 (Set_Is_Safe_To_Reevaluate): new procedure.
6710 * sem_ch5.adb (Analyze_Assignment): Add one assertion to ensure that no
6711 assignment is allowed on safe-to-reevaluate variables.
6712 (Analyze_Iteration_Schine.Process_Bounds.One_Bound): Decorate the
6713 temporary created to remove side effects in expressions that use
6714 the secondary stack as safe-to-reevaluate.
6715 * exp_util.adb (Side_Effect_Free): Add missing code to handle well
6716 variables that are not true constants.
6718 2011-08-02 Robert Dewar <dewar@adacore.com>
6720 * sem_ch5.adb, sem_ch7.adb, einfo.ads, sem_util.adb, sem_util.ads,
6721 sem_res.adb, sem_ch6.adb: Minor reformatting.
6723 2011-08-02 Jerome Guitton <guitton@adacore.com>
6725 * a-except-2005.adb (Raise_Current_Excep): Remove obsolete dead code.
6727 2011-08-02 Ed Schonberg <schonberg@adacore.com>
6729 * sem_ch6.adb (New_Overloaded_Entity, Check_Overriding_Indicator): Do
6730 not set Overridden_Operation if subprogram is an initialization
6733 2011-08-02 Yannick Moy <moy@adacore.com>
6735 * par-ch6.adb: Correct obsolete name in comments
6736 * restrict.adb, restrict.ads (Check_Formal_Restriction): new function
6737 which takes two message arguments (existing function takes one), with
6738 second message used for continuation.
6739 * sem_ch5.adb (Analyze_Block_Statement): in formal mode, only reject
6740 block statements that originate from a source block statement, not
6741 generated block statements
6742 * sem_ch6.adb (Analyze_Function_Call): rename L into Actuals, for
6743 symmetry with procedure case
6744 * sem_ch7.adb (Check_One_Tagged_Type_Or_Extension_At_Most): new
6745 function to issue an error in formal mode if a package specification
6746 contains more than one tagged type or type extension.
6747 * sem_res.adb (Resolve_Actuals): in formal mode, check that actual
6748 parameters matching formals of tagged types are objects (or ancestor
6749 type conversions of objects), not general expressions. Issue an error
6750 on view conversions that are not involving ancestor conversion of an
6752 (Resolve_Type_Conversion): in formal mode, issue an error on the
6753 operand of an ancestor type conversion which is not an object
6754 * sem_util.adb, sem_util.ads (Find_Actual): extend the behavior of the
6755 procedure so that it works also for actuals of function calls
6756 (Is_Actual_Tagged_Parameter): new function which determines if its
6757 argument is an actual parameter of a formal of tagged type in a
6759 (Is_SPARK_Object_Reference): new function which determines if the tree
6760 referenced by its argument represents an object in SPARK
6762 2011-08-02 Robert Dewar <dewar@adacore.com>
6764 * sem_ch3.adb: Minor reformatting
6765 Minor comment addition
6766 Minor error msg text change
6768 2011-08-02 Javier Miranda <miranda@adacore.com>
6770 * sem_ch5.adb (Analyze_Iteration_Scheme.Uses_Secondary_Stack): New
6771 function. Used to be more precise when we generate a variable plus one
6772 assignment to remove side effects in the evaluation of the Bound
6774 (Analyze_Iteration_Scheme): Clean attribute analyzed in all the nodes
6775 of the bound expression to force its re-analysis and thus expand the
6776 associated transient scope (if required). Code cleanup replacing the
6777 previous code that declared the constant entity by an invocation to
6778 routine Force_Evaluation which centralizes this work in the frontend.
6780 2011-08-02 Robert Dewar <dewar@adacore.com>
6782 * einfo.adb (Is_Base_Type): Improve efficiency by using a flag table
6783 (Base_Type): Now uses improved Is_Base_Type function
6784 * einfo.ads (Base_Type): Inline this function
6786 2011-08-02 Robert Dewar <dewar@adacore.com>
6788 * sem_prag.adb (Analyze_Pragma): Defend against infinite recursion
6789 (Analyze_Aspect_Specifications): Fix Sloc values for constructed pragmas
6791 2011-08-02 Arnaud Charlet <charlet@adacore.com>
6793 * gcc-interface/Make-lang.in: Update dependencies.
6794 * gcc-interface/Makefile.in: Use s-inmapop-vxworks.adb for all VxWorks
6797 2011-08-02 Yannick Moy <moy@adacore.com>
6799 * par-ch3.adb (P_Delta_Constraint): issue an error in formal mode on
6800 non-simple expression used in delta constraint
6801 (P_Index_Or_Discriminant_Constraint): issue an error in formal mode on
6802 index constraint which is not a subtype mark
6803 * par.adb: With and use Restrict
6804 * sem_ch3.adb (Analyze_Component_Declaration): issue an error in formal
6805 mode on component type which is not a subtype mark and default
6806 expression on component
6807 (Analyze_Subtype_Declaration): issue an error in formal mode on subtype
6808 of string which does not have a lower index bound equal to 1
6809 (Array_Type_Declaration): issue an error in formal mode on index or
6810 component type which is not a subtype mark, and on aliased keyword on
6812 (Derived_Type_Declaration): issue an error in formal mode on interface,
6813 limited or abstract type
6814 (Record_Type_Declaration): issue an error in formal mode on interface
6815 (Record_Type_Definition): issue an error in formal mode on tagged types
6816 and type extensions not declared in the specification of a library unit
6817 package; on null non-tagged record; on variant part
6819 2011-08-02 Vincent Celier <celier@adacore.com>
6821 * prj-nmsc.adb (Check_Library_Attributes): Do not report Library_Dir
6822 not declared for qualified library project when Library_Name is not
6823 declared, but Library_Dir is.
6825 2011-08-02 Robert Dewar <dewar@adacore.com>
6827 * sem_ch13.adb (Analyze_Aspect_Specification): Fix slocs on generated
6828 pragmas (affects aspects [Component_]Default_Value
6829 (Check_Aspect_At_Freeze_Point): For Component_Default_Value, use
6830 component type for the resolution
6832 2011-08-02 Eric Botcazou <ebotcazou@adacore.com>
6834 * einfo.adb (Base_Type): Tune implementation for speed.
6836 2011-08-02 Robert Dewar <dewar@adacore.com>
6838 * freeze.adb: Minor reformatting.
6840 2011-08-02 Thomas Quinot <quinot@adacore.com>
6842 * scos.ads: Update comments.
6844 2011-08-02 Ed Schonberg <schonberg@adacore.com>
6846 * sem_ch3.adb (Build_Derived_Type): Inherit the convention from the
6847 base type, because the parent may be a subtype of a private type whose
6848 convention is established in a private part.
6850 2011-08-02 Hristian Kirtchev <kirtchev@adacore.com>
6852 * exp_ch6.adb (Expand_N_Extended_Return_Statement): Wrap the return
6853 statement in a block when the expansion of the return expression has
6854 created a finalization chain.
6855 * freeze.adb (Freeze_Expression): Alphabetize all choices associated
6856 with the parent node.
6857 Add N_Extended_Return_Statement to handle the case where a transient
6858 object declaration appears in the Return_Object_Declarations list of
6859 an extended return statement.
6861 2011-08-02 Matthew Gingell <gingell@adacore.com>
6863 * adaint.c (__gnat_is_symbolic_link_attr): Supress warning on possibly
6864 unused parameter 'name'.
6866 2011-08-02 Ed Schonberg <schonberg@adacore.com>
6868 * sem_elim.adb (Set_Eliminated): If the overridden operation is an
6869 inherited operation, check whether its alias, which is the source
6870 operastion that it renames, has been marked eliminated.
6872 2011-08-02 Javier Miranda <miranda@adacore.com>
6874 * exp_util.adb (Safe_Prefixed_Reference): Do not consider safe an
6875 in-mode parameter whose type is an access type since it can be used to
6876 modify its designated object. Enforce code that handles as safe an
6877 access type that is not access-to-constant but it is the result of a
6878 previous removal of side-effects.
6879 (Remove_Side_Effects): Minor code reorganization of cases which require
6880 no action. Done to incorporate documentation on new cases uncovered
6881 working in this ticket: no action needed if this routine was invoked
6882 too early and the nodes are not yet decorated.
6883 * sem_res.adb (Resolve_Slice): Minor code cleanup replacling two calls
6884 to routine Remove_Side_Effects by calls to Force_Evaluation since they
6885 were issued with actuals that are implicitly provided by
6888 2011-08-02 Robert Dewar <dewar@adacore.com>
6890 * sem_ch3.adb, sem_res.adb: Minor reformatting.
6892 2011-08-02 Yannick Moy <moy@adacore.com>
6894 * sem_attr.adb (Check_Formal_Restriction_On_Attribute): new procedure
6895 to issue an error in formal mode on attribute not supported in this mode
6896 (Analyze_Attribute): issue errors on standard attributes not supported
6898 * sem_ch3.adb (Modular_Type_Declaration): remove obsolete part of
6899 comment, and issue error in formal mode on modulus which is not a power
6901 (Process_Range_Expr_In_Decl): issue error in formal mode on non-static
6903 * sem_ch8.adb (Find_Type): issue error in formal mode on 'Base in
6905 * sem_res.adb (Resolve_Unary_Op): issue error in formal mode on unary
6906 operator on modular type (except 'not').
6908 2011-08-02 Robert Dewar <dewar@adacore.com>
6910 * gnat_rm.texi: Minor reformatting.
6912 2011-08-02 Arnaud Charlet <charlet@adacore.com>
6914 * s-osinte-linux.ads: Minor comment update and reformatting.
6915 * i-cexten.ads: Make this unit pure, as for its parent.
6916 Will allow its usage in more contexts if needed.
6918 2011-08-02 Robert Dewar <dewar@adacore.com>
6920 * s-utf_32.ads: Minor comment fix.
6922 2011-08-02 Ed Schonberg <schonberg@adacore.com>
6924 * sem_res.adb (Resolve_Actuals): if the subprogram is a primitive
6925 operation of a tagged synchronized type, handle the case where the
6926 controlling argument is overloaded.
6928 2011-08-02 Yannick Moy <moy@adacore.com>
6930 * gnat_rm.texi, opt.ads, sem_prag.adb, snames.ads-tmpl:
6931 Replace pragma SPARK_95 with pragma Restrictions (SPARK)
6932 * par-prag.adb (Process_Restrictions_Or_Restriction_Warnings): set
6933 SPARK mode and formal verification mode on processing SPARK restriction
6934 * s-rident.ads (Restriction_Id): add SPARK restriction in those not
6935 requiring consistency checking.
6937 2011-08-02 Robert Dewar <dewar@adacore.com>
6939 * sem_res.adb: Minor reformatting.
6941 2011-08-02 Robert Dewar <dewar@adacore.com>
6943 * a-cfdlli.ads, a-cfhase.ads, a-cforma.ads, a-cfhama.ads,
6944 a-cforse.ads: Remove unneeded with of Ada.Containers
6945 Remove commented out pragma Inline's
6946 Move specifications of new subprograms to the actual specs
6948 2011-08-02 Yannick Moy <moy@adacore.com>
6950 * a-cfdlli.ads, a-cfhase.ads, a-cforma.ads, a-cfhama.ads,
6951 a-cforse.ads: Update comments.
6953 2011-08-02 Ed Schonberg <schonberg@adacore.com>
6955 * sem_attr.adb: add attribute name when 'Result has the wrong prefix.
6957 2011-08-02 Robert Dewar <dewar@adacore.com>
6959 * a-cfdlli.ads, a-cfhase.ads, a-cforma.ads, a-cfhama.ads,
6960 a-cforse.ads, a-cofove.ads: Minor reformatting.
6962 2011-08-02 Claire Dross <dross@adacore.com>
6964 * a-cfdlli.ads, a-cfhase.ads, a-cforma.ads, a-cfhama.ads, a-cforse.ads,
6965 a-cofove.ads: Add comments.
6967 2011-08-02 Yannick Moy <moy@adacore.com>
6969 * gnat_rm.texi: Document formal containers.
6971 2011-08-02 Emmanuel Briot <briot@adacore.com>
6973 * g-comlin.adb (Goto_Section, Getopt): fix handling of "*" when there
6976 2011-08-02 Robert Dewar <dewar@adacore.com>
6978 * mlib-prj.adb, restrict.ads, sem_aggr.adb, sem_ch12.adb: Minor
6981 2011-08-02 Robert Dewar <dewar@adacore.com>
6983 * aspects.adb: New aspects Default_Value and Default_Component_Value
6984 New format of Aspect_Names table checks for omitted entries
6985 * aspects.ads: Remove mention of Aspect_Cancel and add documentation on
6986 handling of boolean aspects for derived types.
6987 New aspects Default_Value and Default_Component_Value
6988 New format of Aspect_Names table checks for omitted entries
6989 * einfo.ads, einfo.adb (Has_Default_Component_Value): New flag
6990 (Has_Default_Value): New flag
6991 (Has_Default_Component_Value): New flag
6992 (Has_Default_Value): New flag
6993 * par-ch13.adb (P_Aspect_Specifications): New format of Aspect_Names
6995 * par-prag.adb: New pragmas Default_Value and Default_Component_Value
6996 * sem_ch13.adb (Analyze_Aspect_Specifications): New aspects
6997 Default_Value and Default_Component_Value
6998 * sem_prag.adb: New pragmas Default_Value and Default_Component_Value
6999 New aspects Default_Value and Default_Component_Value
7000 * snames.ads-tmpl: New pragmas Default_Value and Default_Component_Value
7001 * sprint.adb: Print N_Aspect_Specification node when called from gdb
7003 2011-08-02 Vincent Celier <celier@adacore.com>
7005 * prj-nmsc.adb (Check_Library_Attributes): For virtual library project,
7006 inherit library kind.
7008 2011-08-02 Ed Schonberg <schonberg@adacore.com>
7010 * sem_res.adb: Add guards in calls to Matching_Static_Array_Bounds.
7013 2011-08-02 Robert Dewar <dewar@adacore.com>
7015 * i-cstrin.ads: Updates to make Interfaces.C.Strings match RM
7017 2011-08-02 Yannick Moy <moy@adacore.com>
7019 * sem_aggr.adb (Resolve_Aggregate): Fix thinko.
7021 2011-08-02 Robert Dewar <dewar@adacore.com>
7023 * impunit.adb: Add comment.
7025 2011-08-02 Yannick Moy <moy@adacore.com>
7027 * sem_aggr.adb (Check_Qualified_Aggregate): new procedure which checks
7028 qualification of aggregates in formal mode
7029 (Is_Top_Level_Aggregate): returns True for an aggregate not contained in
7031 (Resolve_Aggregate): complete the test that an aggregate is adequately
7032 qualified in formal mode
7034 2011-08-02 Pascal Obry <obry@adacore.com>
7036 * make.adb, bindgen.adb, gnatbind.adb: Minor reformatting.
7037 * mlib-prj.adb: Supress warning when compiling binder generated file.
7038 (Build_Library): Supress all warnings when compiling the binder
7041 2011-08-02 Yannick Moy <moy@adacore.com>
7043 * errout.adb, errout.ads (Check_Formal_Restriction): move procedure
7045 * restrict.adb, restrict.ads (Check_Formal_Restriction): ...to here
7046 * sem_aggr.adb, sem_ch5.adb, sem_util.adb:
7047 Add with/use clauses to make Check_Formal_Restriction visible
7049 2011-08-02 Ed Schonberg <schonberg@adacore.com>
7051 * sem_ch12.adb (Check_Generic_Actuals): handle properly actual
7052 in-parameters when type of the generic formal is private in the generic
7053 spec and non-private in the body.
7055 2011-08-02 Claire Dross <dross@adacore.com>
7057 * a-cfdlli.adb, a-cfdlli.ads, a-cfhase.adb, a-cfhase.ads, a-cfhama.adb,
7058 a-cfhama.ads, a-cforse.adb, a-cforse.ads, a-cforma.adb, a-cforma.ads,
7059 a-cofove.adb, a-cofove.ads: New files implementing formal containers.
7060 * impunit.adb, Makefile.rtl: Take new files into account.
7062 2011-08-02 Robert Dewar <dewar@adacore.com>
7064 * sem_aggr.adb, sem_ch3.adb, sem_ch5.adb, make.adb, sem_res.adb,
7065 sem_attr.adb, sem_ch6.adb, sem_ch8.adb: Minor reformatting.
7067 2011-08-02 Yannick Moy <moy@adacore.com>
7069 * sem_aggr.adb (Resolve_Aggregate): disable incorrectly placed check in
7071 * sem_util.adb (Matching_Static_Array_Bounds): proper detection of
7072 matching static array bounds, taking into account the special case of
7074 * sem_ch3.adb: Typo in comment.
7076 2011-08-02 Yannick Moy <moy@adacore.com>
7078 * errout.adb, errout.ads (Check_Formal_Restriction): new procedure
7079 which issues an error in formal mode if its argument node is originally
7081 * sem_ch3.adb (Analyze_Full_Type_Declaration): move test that a type
7082 has a discriminant specification so that it does not include the case
7084 (Derived_Type_Declaration): move here the test that a derived type has a
7085 discriminant specification
7086 * sem_aggr.adb (Resolve_Record_Aggregate): test the presence of the
7087 first element of a component association before accessing its choices
7088 (presence of component association is not enough)
7089 * exp_ch6.adb (Expand_N_Subprogram_Declaration): test if a subprogram
7090 declaration is a library item before accessing the next element in a
7091 list, as library items are not member of lists
7092 * sem_attr.adb, sem_ch11.adb, sem_ch4.adb, sem_ch5.adb, sem_ch6.adb,
7093 sem_ch8.adb, sem_ch9.adb, sem_res.adb, sem_util.adb: use
7094 Check_Formal_Restriction whenever possible.
7096 2011-08-02 Ed Schonberg <schonberg@adacore.com>
7098 * sem_ch3.adb (Find_Type_Of_Object): In ASIS mode, create an itype
7099 reference when needed.
7101 2011-08-02 Bob Duff <duff@adacore.com>
7103 * gnat_ugn.texi: Fix typo.
7105 2011-08-02 Vincent Celier <celier@adacore.com>
7107 * make.adb (Gnatmake): Use MLib.Tgt.Archive_Ext as the extension of
7108 archive file name. Do not use the full path name of archives for Open
7111 2011-08-02 Robert Dewar <dewar@adacore.com>
7113 * sem_ch12.adb, sem_ch11.adb: New calling sequence for
7114 Analyze_Aspect_Specifications
7116 (Analyze_Aspect_Specifications): New handling for boolean aspects
7117 * sem_ch13.ads (Analyze_Aspect_Specifications): New calling sequence
7118 * sem_ch3.adb, sem_ch6.adb, sem_ch7.adb, sem_ch9.adb: New calling
7119 sequence for Analyze_Aspect_Specifications
7120 * sem_prag.adb (Analyze_Pragma): Remove use of Aspect_Cancel entirely
7121 * sinfo.ads, sinfo.adb (Aspect_Cancel): Remove, no longer used
7123 2011-08-02 Robert Dewar <dewar@adacore.com>
7125 * freeze.adb (Freeze_Entity): Remove handling of delayed boolean
7126 aspects, since these no longer exist.
7128 2011-08-02 Robert Dewar <dewar@adacore.com>
7130 * par-ch13.adb (Aspect_Specifications_Present): Always return false on
7131 semicolon, do not try to see if there are aspects following it.
7132 * par-ch3.adb (P_Declarative_Items): Better message for unexpected
7135 2011-08-02 Robert Dewar <dewar@adacore.com>
7137 * sem_ch8.adb, aspects.ads: Minor reformatting.
7139 2011-08-02 Eric Botcazou <ebotcazou@adacore.com>
7141 * sem_ch13.ads (Analyze_Aspect_Specification): Add pragma Inline.
7142 * sem_ch13.adb (Analyze_Non_Null_Aspect_Specifications): New procedure
7144 (Analyze_Aspect_Specifications): ...here. Call above procedure.
7146 2011-08-02 Yannick Moy <moy@adacore.com>
7148 * exp_ch6.adb (Expand_N_Subprogram_Declaration): issue error in formal
7149 mode on subprogram declaration outside of package specification, unless
7150 it is followed by a pragma Import
7151 * sem_ch3.adb (Access_Definition, Access_Subprogram_Declaration,
7152 Access_Type_Declaration): issue error in formal mode on access type
7153 (Analyze_Incomplete_Type_Decl): issue error in formal mode on
7155 (Analyze_Object_Declaration): issue error in formal mode on object
7156 declaration which does not respect SPARK restrictions
7157 (Analyze_Subtype_Declaration): issue error in formal mode on subtype
7158 declaration which does not respect SPARK restrictions
7159 (Constrain_Decimal, Constrain_Float, Constrain_Ordinary_Fixed): issue
7160 error in formal mode on digits or delta constraint
7161 (Decimal_Fixed_Point_Type_Declaration): issue error in formal mode on
7162 decimal fixed point type
7163 (Derived_Type_Declaration): issue error in formal mode on derived type
7164 other than type extensions of tagged record types
7165 * sem_ch6.adb (Process_Formals): remove check in formal mode, redundant
7166 with check on access definition
7167 * sem_ch9.adb (Analyze_Protected_Definition): issue error in formal
7168 mode on protected definition.
7169 (Analyze_Task_Definition): issue error in formal mode on task definition
7171 2011-08-02 Robert Dewar <dewar@adacore.com>
7173 * make.adb, sem_ch8.adb, s-inmaop-vxworks.adb: Minor reformatting.
7175 2011-08-02 Javier Miranda <miranda@adacore.com>
7177 * sem_ch6.adb (Can_Override_Operator): New function.
7178 (Verify_Overriding_Indicator): Add missing code to check overriding
7179 indicator in operators. Fixes regression.
7180 (Check_Overriding_Indicator): Minor reformating after replacing the
7181 code that evaluates if the subprogram can override an operator by
7182 invocations to the above new function.
7184 (Write_Field26_Name): Add missing code to ensure that, following
7185 the documentation in einfo.ads, this field is not shown as attribute
7186 "Static_Initialization" on non-dispatching functions.
7188 2011-08-02 Jose Ruiz <ruiz@adacore.com>
7190 * sem_res.adb (Resolve_Call): A call to
7191 Ada.Real_Time.Timing_Events.Set_Handler violates restriction
7192 No_Relative_Delay (AI-0211) only when it sets a relative timing event,
7193 i.e., when the second parameter is of type Time_Span.
7195 2011-08-02 Vincent Celier <celier@adacore.com>
7197 * make.adb (Gnatmake): use <library dir>/lib<library name>.a to link
7198 with an archive instead of -L<library dir> -l<library name>.
7200 2011-08-02 Ed Schonberg <schonberg@adacore.com>
7202 * sem_ch8.adb (Analyze_Use_Type): If the clause is being re-analyzed,
7203 mark the base types In_Use in addition to making the operations
7206 2011-08-02 Ed Falis <falis@adacore.com>
7208 * init.c: add and setup __gnat_signal_mask for the exception signals
7209 * s-inmaop-vxworks.adb: new file.
7210 * s-intman-vxworks.adb: remove unnecessary initializations and
7212 * s-intman-vxworks.ads: remove unnecessary variable
7213 * s-taprop-vxworks.adb: simplify signal initialization
7215 2011-08-02 Robert Dewar <dewar@adacore.com>
7217 * sem_ch8.adb: Minor code reorganization, comment updates.
7219 2011-08-02 Robert Dewar <dewar@adacore.com>
7221 * sem_res.adb (Matching_Static_Array_Bounds): Moved to Sem_Util
7222 * sem_util.ads, sem_util.adb (Matching_Static_Array_Bounds): Moved
7224 (Matching_Static_Array_Bounds): Use Is_Ok_Static_Expression
7225 (Matching_Static_Array_Bounds): Moved here from Sem_Res
7227 2011-08-02 Ed Schonberg <schonberg@adacore.com>
7229 * atree.h, atree.ads, atree.adb: New subprograms to manipulate Elist5.
7230 * par_ch8.adb (P_Use_Type): initialize Used_Operations for node.
7231 * sinfo.ads, sinfo.adb (Used_Operations): new attribute of
7232 use_type_clauses, to handle more efficiently use_type and use_all_type
7234 * sem_ch8.adb: Rewrite Use_One_Type and End_Use_Type to handle the
7235 Ada2012 Use_All_Type clause.
7236 (Use_Class_Wide_Operations): new procedure.
7238 2011-08-02 Robert Dewar <dewar@adacore.com>
7240 * exp_util.adb, par-ch10.adb, par-ch6.adb, sem.adb, sem_ch6.adb,
7241 sem_ch6.ads, sinfo.adb, sinfo.ads, sprint.adb: Change parameterized
7242 expression to expression function.
7244 2011-08-02 Ed Schonberg <schonberg@adacore.com>
7246 * sem_ch4.adb: transform simple Ada2012 membership into equality only
7247 if types are compatible.
7249 2011-08-02 Yannick Moy <moy@adacore.com>
7251 * sem_res.adb (Matching_Static_Array_Bounds): new function which
7252 returns True if its argument array types have same dimension and same
7253 static bounds at each index.
7254 (Resolve_Actuals): issue an error in formal mode on actuals passed as
7255 OUT or IN OUT paramaters which are not view conversions in SPARK.
7256 (Resolve_Arithmetic_Op): issue an error in formal mode on
7257 multiplication or division with operands of fixed point types which are
7258 not qualified or explicitly converted.
7259 (Resolve_Comparison_Op): issue an error in formal mode on comparisons of
7260 Boolean or array type (except String) operands.
7261 (Resolve_Equality_Op): issue an error in formal mode on equality
7262 operators for array types other than String with non-matching static
7264 (Resolve_Logical_Op): issue an error in formal mode on logical operators
7265 for array types with non-matching static bounds. Factorize the code in
7266 Matching_Static_Array_Bounds.
7267 (Resolve_Qualified_Expression): issue an error in formal mode on
7268 qualified expressions for array types with non-matching static bounds.
7269 (Resolve_Type_Conversion): issue an error in formal mode on type
7270 conversion for array types with non-matching static bounds
7272 2011-08-02 Robert Dewar <dewar@adacore.com>
7274 * par-ch10.adb: Minor code reorganization (use Nkind_In).
7276 2011-08-02 Ed Schonberg <schonberg@adacore.com>
7278 * par-ch9.adb: save location of entry for proper error message.
7280 2011-08-02 Javier Miranda <miranda@adacore.com>
7282 * sem_type.ads, sem_type.adb (Is_Ancestor): Addition of a new formal
7283 (Use_Full_View) which permits this routine to climb through the
7284 ancestors using the full-view of private parents.
7285 * sem_util.adb (Collect_Interfaces_Info, Implements_Interface): Set
7286 Use_Full_View to true in calls to Is_Ancestor.
7287 * sem_disp.adb (Override_Dispatching_Operation): Set Use_Full_View to
7288 true in call to Is_Ancestor.
7289 * exp_ch3.adb (Build_Offset_To_Top_Functions, Initialize_Tag): Set
7290 Use_Full_View to true in call to Is_Ancestor.
7291 * exp_ch7.adb (Controller_Component): Set Use_Full_View to true in
7292 call to Is_Ancestor.
7293 * exp_ch4.adb (Expand_N_Type_Conversion, Tagged_Membership): Set
7294 Use_Full_View to true in calls to Is_Ancestor.
7295 * exp_disp.adb (Expand_Interface_Actuals, Make_Secondary_DT, Make_DT,
7296 Make_Select_Specific_Data_Table, Register_Primitive,
7297 Set_All_DT_Position): Set Use_Full_View to true in calls to Is_Ancestor.
7298 * exp_intr.adb (Expand_Dispatching_Constructor_Call): Set Use_Full_View
7299 to true in call to Is_Ancestor.
7300 * exp_util.adb (Find_Interface_ADT, Find_Interface_Tag): Set
7301 Use_Full_View to true in calls to Is_Ancestor.
7303 (Write_Call_Info): Set Use_Full_View to true in call to Is_Ancestor.
7304 (Write_Type_Info): Set Use_Full_View to true in call to Is_Ancestor.
7306 2011-08-02 Robert Dewar <dewar@adacore.com>
7308 * gnat_rm.texi: Minor reformatting.
7309 * sem_prag.adb: Minor reformatting.
7311 2011-08-02 Tristan Gingold <gingold@adacore.com>
7313 * vms_data.ads: Add VMS qualifier for -gnateP.
7315 2011-08-02 Robert Dewar <dewar@adacore.com>
7317 * par-ch13.adb (P_Aspect_Specification): New meaning of Decl = Empty
7318 * par-ch7.adb (P_Package): Proper placement of aspects for package
7320 * par-endh.adb (Check_End): Ad Is_Sloc parameter
7321 (End_Statements): Add Is_Sloc parameterr
7322 * par.adb (P_Aspect_Specification): New meaning of Decl = Empty
7323 (Check_End): Ad Is_Sloc parameter
7324 (End_Statements): Add Is_Sloc parameterr
7326 2011-08-02 Vincent Celier <celier@adacore.com>
7328 * ug_words: Add VMS qualifier equivalent to -gnateP:
7329 /SYMBOL_PREPROCESSING.
7331 2011-08-02 Jose Ruiz <ruiz@adacore.com>
7333 * gnat-style.texi: For hexadecimal numeric literals the typical
7334 grouping of digits is 4 to represent 2 bytes.
7335 A procedure spec which is split into several lines is indented two
7338 2011-08-02 Yannick Moy <moy@adacore.com>
7340 * exp_aggr.adb (Is_Others_Aggregate): move function to other unit.
7341 * sem_aggr.adb, sem_aggr.ads (Is_Others_Aggregate): move function here
7342 (Resolve_Aggregate): issue errors in formal modes when aggregate is not
7344 (Resolve_Array_Aggregate): issue errors in formal modes on non-static
7345 choice in array aggregate
7346 (Resolve_Extension_Aggregate): issue errors in formal modes on subtype
7348 (Resolve_Record_Aggregate): issue errors in formal modes on mixed
7349 positional and named aggregate for record, or others in record
7350 aggregate, or multiple choice in record aggregate
7351 * sem_res.adb (Resolve_Logical_Op): issue errors in formal mode when
7352 array operands to logical operations AND, OR and XOR do not have the
7353 same static lower and higher bounds
7354 * sem_ch5.adb, sinfo.ads: Correct typos in comments
7356 2011-08-01 Robert Dewar <dewar@adacore.com>
7358 * sem_util.ads, sem_util.adb, sem_ch6.adb (Last_Source_Statement):
7359 Replaces Last_Source_Node_In_Sequence.
7360 * err_vars.ads (Error_Msg_Lang): 16 is OK, don't need 4K
7361 * errout.adb (Set_Error_Msg_Lang): Takes arg with no parens, but stores
7362 parens and blank in string (this was inconsistently implemented).
7364 (Set_Error_Msg_Lang): Takes arg with no parens, but stores parens and
7365 blank in string (this was inconsistently implemented).
7367 (Set_Global_Switches): Set formal mode switches appropriately
7368 * opt.ads, opt.adb: Formal mode is now global switches, more consistent
7370 (Analyze_Pragma, case SPARK_95): Set opt switches appropriately and
7371 call Set_Error_Msg_Lang to set "spark" as language name.
7372 * par.adb: Remove unnecessary call to set formal language for errout
7373 * sem_prag.adb (P_Pragma, case SPARK_95): Set opt switches
7374 appropriately and call Set_Error_Msg_Lang to set "spark" as language
7376 * sem_ch4.adb (Analyze_Concatenation_Operand): remove procedure and
7377 calls to it, moved after resolution so that types are known
7378 * sem_res.adb (Resolve_Op_Concat): issue an error in formal mode if
7379 result of concatenation is not of type String
7380 (Resolve_Op_Concat_Arg): issue an error in formal mode if an operand of
7381 concatenation is not properly restricted
7382 * gnat_rm.texi: Add doc on pragma Spark_95.
7383 * gcc-interface/Makefile.in: Remove obsolete target pairs for
7384 Interfaces.C.* on VMS. Remove s-parame-vms-restrict.ads.
7385 * gcc-interface/Make-lang.in: Update dependencies.
7387 2011-08-01 Javier Miranda <miranda@adacore.com>
7389 * sem_disp.adb (Override_Dispatching_Operation): Enforce strictness of
7390 condition that detects if the overridden operation must replace an
7393 2011-08-01 Javier Miranda <miranda@adacore.com>
7395 * exp_ch4.adb (Expand_N_Case_Expression): Propagate to the expanded
7396 code declarations inserted by Insert_Actions in each alternative of the
7397 N_Case_Expression node.
7399 2011-08-01 Robert Dewar <dewar@adacore.com>
7401 * sem_ch6.adb: Minor code reorganization.
7402 * sem_util.adb: Minor reformatting.
7404 2011-08-01 Pascal Obry <obry@adacore.com>
7406 * prj-env.adb: Remove <prefix>/lib/gpr/<target> project search path.
7407 * gnat_ugn.texi: Add documentation for VERSIONINFO Windows resource.
7409 2011-08-01 Yannick Moy <moy@adacore.com>
7411 * par-ch4.adb (P_Name): issue a syntax error in SPARK mode on character
7412 literal or operator symbol which is prefixed
7413 * sem_attr.adb (Analyze_Access_Attribute): issue an error in formal
7414 mode on access attributes.
7415 * sem_ch4.adb (Analyze_Concatenation_Operand): new procedure to check
7416 that concatenation operands are properly restricted in formal mode
7417 (Analyze_Concatenation, Analyze_Concatenation_Rest): call new procedure
7418 Analyze_Concatenation_Operand. Issue an error in formal mode if the
7419 result of the concatenation has a type different from String.
7420 (Analyze_Conditional_Expression, Analyze_Explicit_Dereference,
7421 Analyze_Quantified_Expression, Analyze_Slice,
7422 Analyze_Null): issue an error in formal mode on unsupported constructs
7424 (Analyze_Block_Statement): only issue error on source block statement
7425 * sem_util.ads, sem_util.adb (Last_Source_Node_In_Sequence): new
7426 function which returns the last node in a list of nodes for which
7427 Comes_From_Source returns True, if any
7428 * sem_ch6.adb (Check_Missing_Return): minor refactoring to use
7429 Last_Source_Node_In_Sequence
7430 * sem_ch8.adb (Analyze_Exception_Renaming, Analyze_Generic_Renaming,
7431 Analyze_Object_Renaming, Analyze_Use_Package): issue an error in formal
7432 mode on unsupported constructs
7433 * sem_ch9.adb Do not return after issuing error in formal mode, as the
7434 rest of the actions may be needed later on since the error is marked as
7436 * sinfo.ads: Typos in comments.
7438 2011-08-01 Pascal Obry <obry@adacore.com>
7440 * projects.texi: Minor editing.
7442 2011-08-01 Yannick Moy <moy@adacore.com>
7444 * err_vars.ads (Error_Msg_Lang, Error_Msg_Langlen): new variables for
7445 insertion character ~~
7446 * errout.ads, errout.adb (Formal_Error_Msg_...): remove procedures
7447 (Set_Error_Msg_Lang): new procedure which fixes the language for use
7448 with insertion character ~~
7449 (Set_Msg_Text): treat insertion character ~~
7450 * par-ch4.adb, par-ch5.adb, par-endh.adb, sem_attr.adb, sem_ch11.adb,
7451 sem_ch3.adb, sem_ch5.adb, sem_ch9.adb, sem_util.adb: Replace calls to
7452 Formal_Error_Msg_... procedures by equivalent Error_Msg_...
7453 procedures. Favor calls to Error_Msg_F(E) over Error_Msg_N(E). Make
7454 errors related to the formal language restriction not serious
7455 (insertion character |).
7456 * par.adb (Par): set formal language for error messages if needed
7457 * sem_ch6.adb (Check_Missing_Return): take into account possible
7458 generated statements at the end of the function
7459 * snames.ads-tmpl (Name_SPARK_95, Pragma_SPARK_95): new variable and
7460 enumeration value to define a new pragma SPARK_95
7461 * opt.ads, opt.adb (SPARK_Version_Type, SPARK_Version_Default,
7462 SPARK_Version): new type and variables to store the SPARK version
7464 (SPARK_Mode): return True when SPARK_Version is set
7465 * par-prag.adb: Correct indentation
7466 (Prag): take Pragma_SPARK_95 into account
7467 * sem_prag.adb (Set_Mechanism_Value, Sig_Flags): take Pragma_SPARK_95
7470 2011-08-01 Robert Dewar <dewar@adacore.com>
7472 * sem_ch3.adb, sem_ch3.ads, sem_ch5.adb, prj-part.adb, par-ch4.adb,
7473 sem_util.adb, sem_ch4.adb, sem_ch6.adb, sem_ch6.ads, sem_ch8.adb,
7474 sem_ch8.ads, sem_ch13.ads, par-ch5.adb, prj-env.ads: Minor reformatting
7476 2011-08-01 Pascal Obry <obry@adacore.com>
7478 * prj-part.ads, prj-part.adb (Parse): Add Target_Name parameter. Pass
7479 Target_Name to Get_Path call.
7480 (Parse_Single_Project): Likewise.
7481 (Post_Parse_Context_Clause): Likewise.
7482 * prj-env.ads, prj-env.adb (Find_Project): Add Target_Name parameter.
7483 Call Initialise_Project_Path with the proper Target_Name.
7484 (Initialize_Project_Path): Add <gnat_root>/<target_name>/lib/gnat
7486 (Get_Path): Add Target_Name parameter. Call Initialise_Project_Path
7487 with the proper Target_Name.
7488 * prj-conf.adb (Get_Or_Create_Configuration_File): Pass Target_Name to
7490 (Parse_Project_And_Apply_Config): Likewise.
7491 * prj-makr.adb (Initialize): Pass empty Target_Name to Parse routine.
7492 This is fine as this part of the code is supporting only native
7494 * prj-pars.adb (Parse): Pass empty Target_Name to Parse routine. This
7495 is fine as this part of the code is supporting only native compilation.
7497 2011-08-01 Yannick Moy <moy@adacore.com>
7499 * sem_util.adb (Enter_Name): issue error in formal mode on declaration
7500 of homonym, unless the homonym is one of the cases allowed in SPARK
7501 * par-ch5.adb (Parse_Decls_Begin_End): issue error in SPARK mode for
7502 package declaration occurring after a body.
7504 2011-08-01 Robert Dewar <dewar@adacore.com>
7506 * checks.adb, exp_ch4.adb: Minor reformatting.
7508 2011-08-01 Javier Miranda <miranda@adacore.com>
7510 * einfo.ads (Access_Disp_Table): Fix documentation.
7511 (Dispatch_Table_Wrappers): Fix documentation.
7513 2011-08-01 Pascal Obry <obry@adacore.com>
7515 * prj-env.adb, prj-env.ads: Minor reformatting.
7517 2011-08-01 Yannick Moy <moy@adacore.com>
7519 * sem_util.ads, sem_util.adb, par.adb, par_util.adb
7520 (Formal_Error_Msg, Formal_Error_Msg_N, Formal_Error_Msg_SP): move
7521 procedures out of these packages.
7522 * errout.ads, errout.adb
7523 (Formal_Error_Msg, Formal_Error_Msg_N, Formal_Error_Msg_SP): move
7524 procedures in of this package
7525 (Formal_Error_Msg_NE): new procedure for wrapper on Error_Msg_NE
7526 * par-ch5.adb (Parse_Decls_Begin_End): issue syntax error in SPARK mode
7527 on misplaced later vs initial declarations, like in Ada 83
7528 * sem_attr.adb (Processing for Analyze_Attribute): issue error in
7529 formal mode on attribute of private type whose full type declaration
7531 * sem_ch3.adb (Analyze_Declarations): issue error in formal mode on a
7532 package declaration inside a package specification
7533 (Analyze_Full_Type_Declaration): issue error in formal mode on
7534 controlled type or discriminant type
7535 * sem_ch6.adb (Analyze_Subprogram_Specification): only issue error on
7536 user-defined operator means that it should come from the source
7537 (New_Overloaded_Entity): issue error in formal mode on overloaded
7539 * sem_ch6.ads, sem_ch13.ads: typos in comments.
7541 2011-08-01 Thomas Quinot <quinot@adacore.com>
7543 * atree.adb: Minor reformatting.
7544 * checks.adb: Minor reformatting.
7546 2011-08-01 Vincent Celier <celier@adacore.com>
7548 * s-parame-vms-ia64.ads: Fix typo in comment
7550 * s-parame-vms-restrict.ads: Removed, unused.
7552 2011-08-01 Javier Miranda <miranda@adacore.com>
7555 (Is_Variable_Size_Array): Remove local subprogram Is_Constant_Bound.
7557 (Constrain_Index): Remove side effects in the evaluation of the bounds.
7558 * sem_ch3.ads, sem_ch3.adb
7559 (Is_Constant_Bound): New extended version of the subprogram that was
7560 previously located inside function Exp_Ch3.Is_Variable_Size_Array.
7561 Moved here since it is shared by routines of sem_ch3 and exp_ch3.
7562 * sem_aux.ads (Constant_Value): Fix typo in comment.
7563 * checks.adb (Generate_Index_Checks): New implementation which, for
7564 array objects with constant bounds, generates the runtime check
7565 referencing the bounds of the array type. For other cases this routine
7566 provides its previous behavior obtaining such values from the array
7568 * sem_res.adb (Set_Slice_Subtype): Link a copied range subtree with its
7570 * atree.adb (New_Copy): Reset flag Is_Overloaded in the new copy since
7571 we cannot have semantic interpretations of the new node.
7573 2011-08-01 Ed Schonberg <schonberg@adacore.com>
7575 * sem_ch6.adb (Fully_Conformant_Expressions): handle quantified
7578 2011-08-01 Arnaud Charlet <charlet@adacore.com>
7580 * sem_ch8.adb: Minor code editing.
7581 * s-vxwext.adb: Remove trailing space.
7582 * freeze.adb, freeze.ads, errout.ads, erroutc.adb: Fix GPLv3 header for
7583 consistency with other files.
7585 2011-08-01 Thomas Quinot <quinot@adacore.com>
7587 * s-auxdec.ads, s-auxdec-vms_64.ads: Minor reformatting.
7589 2011-08-01 Ed Schonberg <schonberg@adacore.com>
7591 * par-ch10.adb: reject parameterized expressions as compilation unit.
7592 * sem_ch4.adb: handle properly conditional expression with overloaded
7593 then_clause and no else_clause.
7595 2011-08-01 Tristan Gingold <gingold@adacore.com>
7597 * s-parame-vms-alpha.ads, s-parame-vms-ia64.ads: Redeclare C_Address
7598 like done by System.Aux_DEC.
7599 * env.c (__gnat_setenv) [VMS]: Put logicals into LNM$PROCESS table.
7601 2011-08-01 Yannick Moy <moy@adacore.com>
7603 * par-endh.adb (Check_End): issue a syntax error in SPARK mode for
7604 missing label at end of declaration (subprogram or package)
7605 * par-ch4.adb (P_Name): issue a syntax error in SPARK mode for mixing
7606 of positional and named parameter association
7607 * par.adb, par-util.adb (Formal_Error_Msg_SP): new wrapper on
7608 Error_Msg_SP which adds a prefix to the error message giving the name
7609 of the formal language analyzed
7610 * sem_ch6.adb (Analyze_Return_Type): issue an error in formal mode for
7611 access result type in subprogram, unconstrained array as result type,.
7612 (Analyze_Subprogram_Declaration): issue an error in formal mode for null
7614 * sem_ch8.adb: Code clean up.
7616 2011-08-01 Javier Miranda <miranda@adacore.com>
7618 * sem_ch7.adb (Uninstall_Declarations): Remove useless code.
7619 * einfo.ads (Access_Disp_Table): Fix documentation.
7620 (Dispatch_Table_Wrappers): Fix documentation.
7621 * einfo.adb (Access_Disp_Table, Dispatch_Table_Wrappers,
7622 Set_Access_Disp_Table, Set_Dispatch_Table_Wrappers): Fix the assertions
7623 to enforce the documentation of this attribute.
7624 (Set_Is_Interface): Cleanup the assertion.
7625 * exp_ch4.adb (Expand_Allocator_Expression, Tagged_Membership): Locate
7626 the Underlying_Type entity before reading attribute Access_Disp_Table.
7627 * exp_disp.adb (Expand_Dispatching_Call, Expand_Interface_Conversion):
7628 Locate the Underlying_Type before reading attribute Access_Disp_Table.
7629 * exp_aggr.adb (Build_Array_Aggr_Code, Build_Record_Aggr_Code): Locate
7630 the Underlying_Type entity before reading attribute Access_Disp_Table.
7631 * exp_ch3.adb (Build_Record_Init_Proc, Expand_N_Object_Declaration):
7632 Locate the Underlying_Type entity before reading attribute
7635 2011-08-01 Ed Schonberg <schonberg@adacore.com>
7637 * s-poosiz.ads: Additional overriding indicators.
7639 2011-08-01 Yannick Moy <moy@adacore.com>
7641 * sem_ch5.adb (Analyze_Exit_Statement): add return after error in
7643 (Analyze_Iteration_Scheme): issue error in formal mode when loop
7644 parameter specification does not include a subtype mark.
7645 * sem_ch6.adb (Analyze_Abstract_Subprogram_Declaration): issue error in
7646 formal mode on abstract subprogram.
7647 (Analyze_Subprogram_Specification): issue error in formal mode on
7648 user-defined operator.
7649 (Process_Formals): issue error in formal mode on access parameter and
7651 * sem_ch9.adb (Analyze_Abort_Statement,
7652 Analyze_Accept_Statement, Analyze_Asynchronous_Select,
7653 Analyze_Conditional_Entry_Call, Analyze_Delay_Relative,
7654 Analyze_Delay_Until, Analyze_Entry_Call_Alternative,
7655 Analyze_Requeue, Analyze_Selective_Accept,
7656 Analyze_Timed_Entry_Call): issue error in formal mode on such constructs
7657 * sem_ch11.adb (Analyze_Raise_Statement, Analyze_Raise_xxx_Error):
7658 issue error in formal mode on user-defined raise statement.
7660 2011-08-01 Thomas Quinot <quinot@adacore.com>
7662 * sem_ch6.adb (Enter_Overloaded_Entity): Do not warn about a
7663 declaration being hidden when overriding an implicit inherited
7665 * par-ch10.adb (P_Compilation_Unit): In syntax check only mode
7666 (-gnats), do not complain about a source file that contains only a
7669 2011-08-01 Ed Schonberg <schonberg@adacore.com>
7671 * sem_ch5.adb (Analyze_Iterator_Scheme): Do not overwrite type of loop
7672 variable if already set.
7674 2011-08-01 Arnaud Charlet <charlet@adacore.com>
7676 * g-socket-dummy.adb, s-osinte-linux.ads, g-socket-dummy.ads,
7677 g-debuti.adb, g-tasloc.adb, g-debuti.ads, g-tasloc.ads,
7678 s-osinte-hpux.ads, g-sercom.adb, g-soliop-solaris.ads, g-sercom.ads,
7679 g-sptain.ads, g-curexc.ads, s-tasloc.adb, s-tasloc.ads, s-tataat.adb,
7680 g-ctrl_c.adb, a-reatim.adb, s-tataat.ads, g-dirope.adb, g-ctrl_c.ads,
7681 g-dirope.ads, g-boubuf.adb, g-calend.adb, g-boubuf.ads, g-souinf.ads,
7682 g-table.adb, g-bytswa-x86.adb, g-wispch.adb, g-io.adb, g-table.ads,
7683 g-wispch.ads, g-io.ads, g-memdum.adb, g-memdum.ads, g-busorg.adb,
7684 g-busorg.ads, g-regpat.adb, g-sothco-dummy.adb, g-encstr.adb,
7685 g-regpat.ads, g-sothco-dummy.ads, s-osinte-aix.ads, g-encstr.ads,
7686 g-sercom-mingw.adb, s-mastop-vms.adb, g-diopit.adb, g-diopit.ads,
7687 s-vxwext.adb, g-dyntab.adb, g-dyntab.ads, g-crc32.adb,
7688 g-sercom-linux.adb, g-crc32.ads, s-regpat.adb, g-flocon.ads,
7689 s-regpat.ads, g-stheme.adb, g-sestin.ads, s-taspri-posix-noaltstack.ads,
7690 g-soliop.ads, s-inmaop-posix.adb, g-locfil.ads, g-enblsp-vms-alpha.adb,
7691 g-socthi-dummy.adb, g-socthi-dummy.ads, gnat.ads, g-moreex.adb,
7692 g-moreex.ads, g-dynhta.adb, g-dynhta.ads, g-deutst.ads, g-htable.adb,
7693 g-cgicoo.adb, g-htable.ads, g-cgicoo.ads, a-interr.adb,
7694 g-socthi-vms.adb, g-socthi-vms.ads, g-hesora.adb, g-bubsor.adb,
7695 g-hesora.ads, g-bubsor.ads, g-md5.adb, g-md5.ads, s-intman-irix.adb,
7696 s-htable.adb, s-osinte-vms.adb, s-htable.ads, s-osinte-vms.ads,
7697 s-taprob.adb, g-bytswa.adb, g-bytswa.ads, s-osinte-solaris-posix.ads,
7698 a-suenco.adb, g-comver.adb, g-comver.ads, g-exctra.adb,
7699 s-osinte-solaris.adb, g-exctra.ads, s-osinte-irix.ads,
7700 s-osinte-solaris.ads, a-caldel-vms.adb, g-socthi-vxworks.adb,
7701 g-expect.adb, g-socthi-vxworks.ads, g-expect.ads, g-comlin.ads,
7702 g-heasor.adb, g-heasor.ads, g-traceb.adb, g-traceb.ads, g-decstr.adb,
7703 g-spipat.adb, g-decstr.ads, g-spipat.ads, s-mastop-tru64.adb,
7704 g-except.ads, g-thread.adb, g-hesorg.adb, g-thread.ads, g-hesorg.ads,
7705 g-expect-vms.adb, a-stuten.ads, g-spchge.adb, g-spchge.ads,
7706 g-u3spch.adb, g-u3spch.ads, g-spitbo.adb, g-spitbo.ads,
7707 s-osinte-dummy.ads, s-osinte-posix.adb, g-pehage.adb, g-pehage.ads,
7708 s-gloloc-mingw.adb, g-sha1.ads, s-traceb-hpux.adb,
7709 g-trasym-unimplemented.adb, g-trasym-unimplemented.ads, g-io_aux.adb,
7710 g-regexp.adb, g-io_aux.ads, g-socthi-mingw.adb, g-regexp.ads,
7711 s-osinte-hpux-dce.adb, g-socthi-mingw.ads, g-cgi.adb,
7712 s-osinte-hpux-dce.ads, g-cgi.ads, g-byorma.adb, g-boumai.ads,
7713 g-byorma.ads, a-caldel.adb, s-regexp.adb, s-regexp.ads,
7714 g-soliop-mingw.ads, g-sptavs.ads, s-osinte-tru64.ads, g-speche.adb,
7715 g-speche.ads, g-socthi.adb, g-stsifd-sockets.adb, g-socthi.ads,
7716 s-osinte-darwin.ads, i-vxwork-x86.ads, g-awk.adb, i-vxwork.ads,
7717 g-awk.ads, g-zspche.adb, g-zspche.ads, g-socket.adb, g-sptabo.ads,
7718 g-socket.ads, g-semaph.adb, g-semaph.ads, s-taspri-posix.ads,
7719 g-enblsp-vms-ia64.adb, g-cgideb.adb, g-cgideb.ads, g-sothco.adb,
7720 s-osinte-freebsd.ads, g-sothco.ads, g-catiio.adb, g-casuti.adb,
7721 g-catiio.ads, g-casuti.ads, g-trasym.adb, g-trasym.ads, s-casuti.adb,
7722 g-os_lib.adb, s-traceb-mastop.adb, g-busora.adb, s-interr-dummy.adb,
7723 g-busora.ads, g-enutst.ads, s-os_lib.adb, a-tasatt.adb,
7724 s-osinte-mingw.ads: Update to GPLv3 run-time license.
7725 Use GNAT instead of GNARL.
7727 2011-08-01 Bob Duff <duff@adacore.com>
7729 * a-cdlili.ads, a-cihama.ads, a-coinve.ads, a-ciorse.ads, a-coorma.ads,
7730 a-cidlli.ads, a-ciormu.ads, a-cihase.ads, a-cohama.ads, a-coorse.ads,
7731 a-ciorma.ads, a-coormu.ads, a-convec.ads, a-cohase.ads: Minor
7734 2011-08-01 Yannick Moy <moy@adacore.com>
7736 * debug.adb (d.D) reverve flag for the SPARK mode
7737 (d.E) reverve flag for SPARK generation mode
7738 (d.F) reverve flag for Why generation mode
7739 * opt.ads, opt.adb (ALFA_Mode, ALFA_Through_SPARK_Mode,
7740 ALFA_Through_Why_Mode, Formal_Verification_Mode, SPARK_Mode): New
7741 functions which return True when the corresponding modes are set
7742 (Formal_Language): return "spark" or "alfa" when in formal verification
7744 * sem_util.ads, sem_util.adb (Formal_Error_Msg): new wrapper on
7745 Error_Msg to prefix the error message with a tag giving the formal
7747 (Formal_Error_Msg_N): new wrapper on Error_Msg_N to prefix the error
7748 message with a tag giving the formal language
7749 * sem_ch5.adb (Analyze_Block_Statement): issue error in formal mode on
7751 (Analyze_Case_Statement): issue error in formal mode on case statement
7752 with a single "others" case alternative
7753 (Analyze_Exit_Statement): issue errors in formal mode on exit
7754 statements which do not respect SPARK restrictions
7755 (Analyze_Goto_Statement): issue error in formal mode on goto statement
7756 (Check_Unreachable_Code): always issue an error (not a warning) in
7757 formal mode on unreachable code (concerns both code after an infinite
7758 loop and after an unconditional jump, both not allowed in SPARK)
7759 * sem_ch6.adb (Analyze_Return_Statement): add call to
7760 Set_Return_Present for a procedure containing a return statement
7761 (already done for functions in Analyze_Function_Return)
7762 (Analyze_Function_Return): issue error in formal mode on extended
7763 return or if return is not last statement in function
7764 (Check_Missing_Return): issue error in formal mode if function does
7765 not end with return or if procedure contains a return
7766 * sem_ch8.ads, sem_ch8.adb (Has_Loop_In_Inner_Open_Scopes): new
7767 function to detect if there is an inner scope of its parameter S which
7770 2011-08-01 Thomas Quinot <quinot@adacore.com>
7772 * sem_ch6.ads: Minor reformatting.
7774 2011-08-01 Javier Miranda <miranda@adacore.com>
7776 * sem_util.adb (Abstract_Interface_List): Complete condition when
7777 processing private type declarations to avoid reading unavailable
7779 (Is_Synchronized_Tagged_Type): Complete condition when processing
7780 private extension declaration nodes to avoid reading unavailable
7783 2011-08-01 Thomas Quinot <quinot@adacore.com>
7785 * sem_ch3.adb: Minor reformatting.
7787 2011-08-01 Thomas Quinot <quinot@adacore.com>
7789 * s-parame-ae653.ads, s-parame-vms-alpha.ads, s-parame-hpux.ads,
7790 i-cpoint.adb, i-cstrin.adb, i-cpoint.ads, i-cstrin.ads,
7791 s-parame-vms-ia64.ads, s-parame.ads, i-c.ads, s-parame-vxworks.ads,
7792 s-parame-vms-restrict.ads: Remove duplicated Interfaces.C.* packages
7793 for VMS, instead parametrize the common implementation with
7794 System.Parameters declarations.
7796 2011-08-01 Eric Botcazou <ebotcazou@adacore.com>
7798 * gnat_rm.texi: Document limitation of Pragma No_Strict_Aliasing.
7800 2011-08-01 Tristan Gingold <gingold@adacore.com>
7802 * seh_init.c: Fix SEH handler installation on win64.
7804 2011-08-01 Ed Schonberg <schonberg@adacore.com>
7806 * sem_ch3.adb (Access_Subprogram_Declaration): in Asis mode, prevent
7807 double analysis of an anonymous access to subprogram, because it can
7808 lead to improper sharing of profiles and a back-end crash.
7810 2011-08-01 Robert Dewar <dewar@adacore.com>
7812 * make.adb, sem_ch4.adb: Minor reformatting.
7813 * gcc-interface/Make-lang.in: Update dependencies.
7814 * sem_util.adb, exp_ch5.adb: Minor reformatting.
7816 2011-08-01 Arnaud Charlet <charlet@adacore.com>
7818 * gnat_rm.texi: Fix definition of Long_Integer.
7820 2011-08-01 Ed Schonberg <schonberg@adacore.com>
7822 * exp_aggr.adb: check limit size of static aggregate unconditionally,
7823 to prevent storage exhaustion.
7824 * exp_ch7.adb (Clean_Simple_Protected_Objects): if the scope being
7825 finalized is a function body, insert the cleanup code before the final
7826 return statement, to prevent spurious warnings.
7827 * s-pooglo.ads: add overriding indicator.
7829 2011-08-01 Ed Schonberg <schonberg@adacore.com>
7831 * sem_ch4.adb (Operator_Check): improve error message when both a
7832 with_clause and a use_clause are needed to make operator usage legal.
7833 * sem_util.ads, sem_util.adb (Unit_Is_Visible): new predicate to
7834 determine whether a compilation unit is visible within an other,
7835 either through a with_clause in the current unit, or a with_clause in
7836 its library unit or one one of its parents.
7838 2011-08-01 Ed Schonberg <schonberg@adacore.com>
7840 * exp_ch5.adb (Expand_N_Iterator_Loop): handle properly an iterator
7841 over an arbitrary expression of an array or container type.
7842 * lib-xref.adb: clarify comment.
7844 2011-08-01 Bob Duff <duff@adacore.com>
7846 * einfo.ads: Minor reformatting.
7847 * debug.adb: Minor comment improvement.
7849 2011-08-01 Javier Miranda <miranda@adacore.com>
7851 * sem_ch4.adb (Try_Object_Operation): For class-wide subprograms do not
7852 consider hidden subprograms as valid candidates.
7854 2011-08-01 Arnaud Charlet <charlet@adacore.com>
7856 * make.adb (Compile): Strip -mxxx switches in CodePeer mode.
7858 2011-08-01 Vasiliy Fofanov <fofanov@adacore.com>
7860 * gnat_ugn.texi: Fix typo.
7862 2011-08-01 Robert Dewar <dewar@adacore.com>
7864 * i-cstrin.adb, sem_util.adb, exp_ch11.adb, sem_ch8.adb,
7865 lib-xref.adb: Minor reformatting
7867 2011-08-01 Gary Dismukes <dismukes@adacore.com>
7869 * exp_ch6.adb (Expand_N_Extended_Return_Statement): Replace test of
7870 when to generate a call to Move_Final_List.
7871 (Has_Controlled_Parts): Remove this function.
7873 2011-08-01 Geert Bosch <bosch@adacore.com>
7875 * par-ch3.adb (P_Discrete_Choice_List): Improve error message for extra
7878 2011-08-01 Thomas Quinot <quinot@adacore.com>
7880 * exp_ch11.adb (Expand_N_Raise_Statement): Mark N_Raise_xxx_Error for
7881 explicit raise of a predefined exception as Comes_From_Source if the
7882 original N_Raise_Statement comes from source.
7884 2011-08-01 Robert Dewar <dewar@adacore.com>
7886 * sinfo.ads: Add comment.
7887 * sem_ch6.adb: Minor reformatting.
7889 2011-08-01 Robert Dewar <dewar@adacore.com>
7891 * freeze.adb (Freeze_Entity): Refine check for bad component size
7892 clause to avoid rejecting confirming clause when atomic/aliased present.
7894 2011-08-01 Ed Schonberg <schonberg@adacore.com>
7896 * sem_ch8.adb (Find_Direct_Name, Analyze_Expanded_Name): use Is_LHS to
7897 better determine whether an entity reference is a write.
7898 * sem_util.adb (Is_LHS): refine predicate to handle assignment to a
7900 * lib-xref.adb (Output_References): Do no suppress a read reference at
7901 the same location as an immediately preceeding modify-reference, to
7902 handle properly in-out actuals.
7904 2011-08-01 Tristan Gingold <gingold@adacore.com>
7906 * env.c (__gnat_setenv) [VMS]: Refine previous change.
7908 2011-08-01 Quentin Ochem <ochem@adacore.com>
7910 * i-cstrin.adb (New_String): Changed implementation, now uses only the
7911 heap to compute the result.
7913 2011-08-01 Robert Dewar <dewar@adacore.com>
7915 * atree.ads: Minor reformatting.
7917 2011-08-01 Emmanuel Briot <briot@adacore.com>
7919 * g-expect.adb (Get_Command_Output): Fix memory leak.
7921 2011-08-01 Geert Bosch <bosch@adacore.com>
7923 * cstand.adb (P_Float_Type): New procedure to print the definition of
7924 predefined fpt types.
7925 (P_Mixed_Name): New procedure to print a name using mixed case
7926 (Print_Standard): Use P_Float_Type for printing floating point types
7927 * einfo.adb (Machine_Emax_Value): Add preliminary support for quad
7928 precision IEEE float.
7930 2011-08-01 Thomas Quinot <quinot@adacore.com>
7932 * sem_ch3.adb: Minor reformatting.
7934 2011-08-01 Ed Schonberg <schonberg@adacore.com>
7936 * sem_ch6.adb (Analyze_Parameterized_Expression): If the expression is
7937 the completion of a generic function, insert the new body rather than
7938 rewriting the original.
7940 2011-08-01 Yannick Moy <moy@adacore.com>
7942 * sinfo.ads, errout.ads: Typos in comments.
7944 2011-08-01 Robert Dewar <dewar@adacore.com>
7946 * par-endh.adb: Minor reformatting.
7948 2011-08-01 Robert Dewar <dewar@adacore.com>
7950 * aspects.ads, aspects.adb: Add aspects for library unit pragmas
7951 (Pre_Post_Aspects): New subtype.
7952 * par-ch12.adb (P_Generic): New syntax for aspects in packages
7953 * par-ch13.adb (P_Aspect_Specifications): Add Semicolon parameter
7954 * par-ch7.adb (P_Package): Remove Decl parameter
7955 (P_Package): Handle new syntax for aspects (before IS)
7956 * par-ch9.adb (P_Protected_Definition): Remove Decl parameter, handle
7958 (P_Task_Definition): Remove Decl parameter, handle new aspect syntax
7959 * par.adb (P_Aspect_Specifications): Add Semicolon parameter
7960 (P_Package): Remove Decl parameter
7961 * sem_ch13.adb (Analyze_Aspect_Specifications): Handle library unit
7963 * sem_ch7.adb (Analyze_Package_Declaration): Analyze new format aspect
7965 * sem_util.ads, sem_util.adb (Static_Boolean): New function
7966 * sinfo.ads: Document new syntax for aspects in packages etc.
7967 * sprint.adb: Handle new syntax of aspects before IS in package
7969 2011-08-01 Thomas Quinot <quinot@adacore.com>
7971 * atree.ads: Minor reformatting.
7972 * sem_prag.adb: Minor reformatting.
7974 2011-08-01 Robert Dewar <dewar@adacore.com>
7976 * exp_util.adb (Insert_Actions): Fix error in handling Actions for
7977 case expr alternative.
7979 2011-08-01 Ed Schonberg <schonberg@adacore.com>
7981 * sem_ch12.adb: Fix typo.
7983 2011-08-01 Geert Bosch <bosch@adacore.com>
7985 * sem_prag.adb (Check_No_Link_Name): New procedure.
7986 (Process_Import_Or_Interface): Use Check_No_Link_Name.
7987 * cstand.adb (Create_Standard): Use Esize (Standard_Long_Long_Float)
7988 instead of Standard_Long_Long_Float_Size global. Preparation for
7989 eventual removal of per type constants.
7990 * exp_util.ads (Get_Stream_Size): New function returning the stream
7991 size value of subtype E.
7992 * exp_util.adb (Get_Stream_Size): Implement new function.
7993 * exp_strm.adb (Build_Elementary_Input_Call): Use Get_Stream_Size
7995 * exp_attr.adb (Attribute_Stream_Size): Use Get_Stream_Size
7997 (Machine_Mantissa_Value): Handle 128-bit quad precision IEEE floats
7999 2011-08-01 Geert Bosch <bosch@adacore.com>
8001 * cstand.adb: Fix comments.
8002 * sem_prag.adb (Analyze_Pragma): Use List_Length instead of explicit
8005 2011-08-01 Robert Dewar <dewar@adacore.com>
8007 * exp_ch4.adb, sem_cat.adb: Minor reformatting.
8009 2011-08-01 Geert Bosch <bosch@adacore.com>
8011 * atree.ads: Fix comment.
8013 2011-08-01 Robert Dewar <dewar@adacore.com>
8015 * aspects.ads, aspects.adb (Aspect_Names): Moved from body to spec.
8016 * par-ch13.adb (P_Aspect_Specifications): Check misspelled aspect name.
8017 * par.adb: Add with for Namet.Sp.
8018 * par-tchk.adb: Minor reformatting.
8020 2011-08-01 Vincent Celier <celier@adacore.com>
8022 * mlib-tgt-specific-vms-alpha.adb, mlib-tgt-specific-vms-ia64.adb
8023 (Build_Dynamic_Library): Use new function Init_Proc_Name to get the name
8024 of the init procedure of a SAL.
8025 * mlib-tgt-vms_common.ads, mlib-tgt-vms_common.adb (Init_Proc_Name):
8028 2011-08-01 Thomas Quinot <quinot@adacore.com>
8030 * exp_ch4.adb, s-tasini.ads, sem_attr.adb, s-soflin.ads: Minor
8033 2011-08-01 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
8035 * adaint.c (__gnat_file_time_name_attr): Get rid of warning.
8037 2011-08-01 Thomas Quinot <quinot@adacore.com>
8039 * sem_util.adb, sem_util.ads (Has_Overriding_Initialize): Make function
8040 conformant with its spec (return True only for types that have
8041 an overriding Initialize primitive operation that prevents them from
8042 having preelaborable initialization).
8043 * sem_cat.adb (Validate_Object_Declaration): Fix test for preelaborable
8044 initialization for controlled types in Ada 2005 or later mode.
8046 2011-08-01 Robert Dewar <dewar@adacore.com>
8048 * aspects.ads, aspects.adb: Add aspect Type_Invariant, Precondition,
8050 (Same_Aspect): New function.
8051 * sem_ch13.adb (Analyze_Aspect_Specifications): Add aspect
8052 Type_Invariant, Precondition, Postcondition.
8053 * snames.ads-tmpl: Add Name_Type_Invariant.
8055 2011-08-01 Robert Dewar <dewar@adacore.com>
8057 * freeze.adb (Freeze_Entity): Don't call Check_Aspect_At_Freeze_Point
8059 (Freeze_All_Ent): Fix error in handling inherited aspects.
8060 * sem_ch13.adb (Analyze_Aspect_Specifications): Skip aspect that is
8061 already analyzed, but don't skip entire processing of a declaration,
8062 that's wrong in some cases of declarations being rewritten.
8063 (Analyze_Aspect_Specification): Set Is_Delayed_Aspect in aspects.
8064 Don't delay for integer, string literals
8065 Treat predicates in usual manner for delay, remove special case code,
8067 (Analyze_Freeze_Entity): Make call to Check_Aspect_At_Freeze_Point
8068 (Build_Predicate_Function): Update saved expression in aspect
8069 (Build_Invariant_Procedure): Update saved expression in aspect
8070 * exp_ch4.adb (Expand_N_Selected_Component): Only do the optimization
8071 of replacement of discriminant references if the reference is simple.
8073 2011-08-01 Robert Dewar <dewar@adacore.com>
8075 * aspects.ads, aspects.adb: Add Static_Predicate and Dynamic_Predicate.
8076 * sem_ch13.adb (Analyze_Aspect_Specification): Add processing for
8077 Static_Predicate and Dynamic_Predicate.
8078 (Build_Predicate_Function): Add processing for Static_Predicate
8079 and Dynamic_Predicate.
8080 * sinfo.ads, sinfo.adb (From_Dynamic_Predicate): New flag
8081 (From_Static_Predicate): New flag
8082 * snames.ads-tmpl: Add Name_Static_Predicate and Name_Dynamic_Predicate
8084 2011-08-01 Robert Dewar <dewar@adacore.com>
8086 * usage.adb: Documentation cleanup for Ada version modes in usage.
8087 * expander.adb: Minor reformatting.
8089 2011-08-01 Robert Dewar <dewar@adacore.com>
8091 * atree.ads: Minor comment fix.
8092 * a-stwifi.adb, a-stzfix.adb, a-strfix.adb, a-ztexio.ads, a-textio.ads,
8093 a-witeio.ads, sem_prag.adb: Minor reformatting.
8095 2011-08-01 Doug Rupp <rupp@adacore.com>
8097 * env.c (__gnat_setenv) [VMS]: Force 32bit on item list structure
8098 pointers. Use descrip.h header file for convenience. Add some
8101 2011-08-01 Robert Dewar <dewar@adacore.com>
8103 * freeze.adb (Freeze_Entity): Call Check_Aspect_At_Freeze_Point
8104 (Freeze_All): Call Check_Aspect_At_End_Of_Declarations
8105 * sem_ch13.ads, sem_ch13.adb (Check_Aspect_At_Freeze_Point):
8107 (Check_Aspect_At_End_Of_Declarations): New procedure
8108 (Analye_Aspect_Specification): Minor changes for above procedures
8109 * sinfo.ads, sinfo.adb (Is_Delayed_Aspect): Now set in aspect
8110 specification node as well.
8112 2011-08-01 Pascal Obry <obry@adacore.com>
8114 * adaint.c (_gnat_stat): GetFilesAttributesEx() would fail on special
8115 Windows files. Use GetFilesAttributes() in this case to check for file
8116 existence instead of returning with an error code.
8118 2011-08-01 Vincent Celier <celier@adacore.com>
8120 * a-stzfix.adb, a-stwifi.adb (Replace_Slice): Fixed computation when
8121 High is above Source length.
8123 2011-08-01 Robert Dewar <dewar@adacore.com>
8125 * a-ztexio.ads, a-textio.ads, a-witeio.ads: Fix comment.
8127 2011-08-01 Robert Dewar <dewar@adacore.com>
8129 * aspects.ads (Boolean_Aspects): New subtype.
8130 * exp_ch13.adb (Expand_Freeze_Entity): Fix errors in handling aspects
8131 for derived types in cases where the parent type and derived type have
8133 * freeze.adb (Freeze_Entity): Fix problems in handling derived type
8134 with aspects when parent type also has aspects.
8135 (Freeze_Entity): Deal with delay of boolean aspects (must evaluate
8136 boolean expression at this point).
8137 * sem_ch13.adb (Analyze_Aspect_Specifications): Delay all aspects in
8138 accordance with final decision on the Ada 2012 feature.
8139 * sinfo.ads, sinfo.adb (Is_Boolean_Aspect): New flag.
8141 2011-08-01 Matthew Heaney <heaney@adacore.com>
8143 * a-chtgbo.adb (Delete_Node_Sans_Free): Replace iterator with selector.
8145 2011-08-01 Pascal Obry <obry@adacore.com>
8147 * a-stzunb-shared.adb, a-strunb-shared.adb, a-stwiun-shared.adb:
8148 Fix Replace_Slice when High is above current string size.
8149 (Replace_Slice): Fix DL computation when High is above current
8152 2011-08-01 Gary Dismukes <dismukes@adacore.com>
8154 * gnat_rm.texi: Add documentation for pragma Static_Elaboration_Desired.
8156 2011-08-01 Matthew Heaney <heaney@adacore.com>
8158 * a-rbtgbo.adb (Delete_Node_Sans_Free): Fixed assignment to left child
8161 2011-08-01 Pascal Obry <obry@adacore.com>
8163 * a-stzunb-shared.adb, a-strunb-shared.adb, a-stwiun-shared.adb: Minor
8166 2011-08-01 Ed Schonberg <schonberg@adacore.com>
8168 * sem_attr.adb (Analyze_Attribute, case 'Access): Handle properly named
8169 access to protected subprograms in generic bodies.
8170 * sem_ch6.adb (Analyze_Subprogram_Declaration): If the context is a
8171 protected type, indicate that the convention of the subprogram is
8172 Convention_Protected, because it may be used in subsequent declarations
8173 within the protected declaration.
8175 2011-08-01 Vincent Celier <celier@adacore.com>
8177 * mlib-prj.adb (Build_Library): Use "ada_" as the prefix for the "init"
8178 and "final" procedures when the name of the library is "ada", to avoid
8179 duplicate symbols "adainit" and "adafinal" in executables.
8181 2011-08-01 Ed Schonberg <schonberg@adacore.com>
8183 * sem_attr.adb (Analyze_Attribute, case 'Result): Handle properly a
8184 quantified expression that appears within a postcondition and uses the
8185 Ada2012 'Result attribute.
8187 2011-07-28 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
8189 * init.c (__gnat_error_handler): Cast reason to int.
8190 (__gnat_install_handler): Explain sa_sigaction use.
8192 2011-07-24 Eric Botcazou <ebotcazou@adacore.com>
8194 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Subprogram_Type>: If the
8195 subprogram has copy-in copy-out parameters, try to promote the mode of
8196 the return type if it is passed in registers.
8198 2011-07-24 Eric Botcazou <ebotcazou@adacore.com>
8200 * gcc-interface/utils2.c (build_binary_op) <ARRAY_REF>: Do not mark the
8201 left operand as addressable.
8203 2011-07-24 Eric Botcazou <ebotcazou@adacore.com>
8205 * gcc-interface/gigi.h (build_function_stub): Remove.
8206 (build_return_expr): Likewise.
8207 (convert_vms_descriptor): Declare.
8208 * gcc-interface/utils.c (convert_vms_descriptor): Make global.
8209 (build_function_stub): Move to...
8210 * gcc-interface/utils2.c (build_return_expr): Move to...
8211 * gcc-interface/trans.c (build_function_stub): ...here.
8212 (build_return_expr): ...here.
8213 (Subprogram_Body_to_gnu): Add local variable for language_function.
8214 Disconnect the parameter attributes cache, if any, once done with it.
8215 Call end_subprog_body only after setting the end_locus.
8216 Build the stub associated with the function, if any, at the very end.
8217 (gnat_to_gnu) <N_Return_Statement>: Remove couple of useless local
8218 variables and streamline control flow.
8220 2011-07-23 Arnaud Charlet <charlet@adacore.com>
8223 * gcc-interface/Makefile.in (powerpc-linux): Remove reference to
8226 2011-07-22 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
8229 * init.c [sun && __SVR4 && !__vxworks] (__gnat_install_handler):
8230 Assign to act.sa_sigaction.
8231 * tracebak.c [USE_GENERIC_UNWINDER] (__gnat_backtrace): Cast
8232 current->return_address to char * before arithmetic.
8234 2011-07-22 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
8236 * init.c [sgi] (__gnat_error_handler): Update sigaction(2) citation.
8237 Correct argument types.
8238 Extract code from reason.
8239 (__gnat_install_handler): Assign to act.sa_sigaction.
8241 2011-07-21 Eric Botcazou <ebotcazou@adacore.com>
8243 * gcc-interface/Make-lang.in (GNAT1_ADA_OBJS): Move ada/b_gnat1.o to...
8244 (GNAT1_OBJS): ...here.
8246 2011-07-15 Eric Botcazou <ebotcazou@adacore.com>
8249 * g-socthi-mingw.adb (Fill): Fix formatting.
8251 * gcc-interface/gigi.h: Move around comment.
8253 2011-07-14 John David Anglin <dave.anglin@nrc-cnrc.gc.ca>
8256 * s-taprop-hpux-dce.adb (Abort_Task): Remove unnecessary cast.
8258 2011-07-14 Florian Weimer <fw@deneb.enyo.de>
8261 * g-socthi-mingw.adb (Fill): Guard against invalid MSG_WAITALL.
8263 2011-07-13 Eric Botcazou <ebotcazou@adacore.com>
8265 * gcc-interface/utils.c (build_vms_descriptor32): Skip the 32-bit
8266 range comparison if Pmode is SImode.
8268 2011-07-12 Laurent GUERBY <laurent@guerby.net>
8269 Eric Botcazou <ebotcazou@adacore.com>
8271 * adadecode.c: Wrap up in extern "C" block.
8272 * adadecode.h: Likewise.
8273 * adaint.c: Likewise. Remove 'const' keyword.
8274 * adaint.h: Likewise.
8276 * atree.h: Likewise.
8278 * cstreams.c: Likewise.
8282 * final.c: Likewise.
8284 * initialize.c: Likewise.
8286 * namet.h: Likewise.
8287 * nlists.h: Likewise.
8288 * raise.c: Likewise.
8289 * raise.h: Likewise.
8290 * repinfo.h: Likewise.
8291 * seh_init.c: Likewise.
8292 * targext.c: Likewise.
8293 * tracebak.c: Likewise.
8294 * uintp.h: Likewise.
8295 * urealp.h: Likewise.
8296 * xeinfo.adb: Wrap up generated C code in extern "C" block.
8297 * xsinfo.adb: Likewise.
8298 * xsnamest.adb: Likewise.
8299 * gcc-interface/gadaint.h: Wrap up in extern "C" block.
8300 * gcc-interface/gigi.h: Wrap up some prototypes in extern "C" block.
8301 * gcc-interface/misc.c: Likewise.
8302 * gcc-interface/Make-lang.in (GCC_LINK): Use LINKER.
8303 (GNAT1_C_OBJS): Remove ada/b_gnat1.o. List ada/seh_init.o and
8304 ada/targext.o here...
8305 (GNAT_ADA_OBJS): ...and not here.
8306 (GNAT1_ADA_OBJS): Add ada/b_gnat1.o.
8307 (GNATBIND_OBJS): Reorder.
8309 2011-07-07 Richard Henderson <rth@redhat.com>
8311 * gcc-interface/misc.c (gnat_init_gcc_eh): Don't call
8312 dwarf2out_frame_init.
8314 2011-07-07 Eric Botcazou <ebotcazou@adacore.com>
8316 * gcc-interface/misc.c (gnat_init): Tweak previous change.
8318 2011-07-07 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
8321 * gcc-interface/Makefile.in: Handle x86_64-solaris2.
8323 2011-07-06 Richard Guenther <rguenther@suse.de>
8325 * gcc-interface/misc.c (gnat_init): Merge calls to
8326 build_common_tree_nodes and build_common_tree_nodes_2.
8327 Re-initialize boolean_false_node.
8329 2011-07-02 Eric Botcazou <ebotcazou@adacore.com>
8330 Olivier Hainque <hainque@adacore.com>
8331 Nicolas Setton <setton@adacore.com>
8333 * gcc-interface/utils.c (record_builtin_type): Set TYPE_ARTIFICIAL on
8334 the type according to the ARTIFICIAL_P parameter.
8335 (create_type_decl): Likewise.
8336 (create_type_stub_decl): Set TYPE_ARTIFICIAL on the type to 1.
8338 2011-07-01 Eric Botcazou <ebotcazou@adacore.com>
8340 * gcc-interface/Make-lang.in (gnat1): Prepend '+' to the command.
8341 (gnatbind): Likewise.
8343 2011-06-29 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
8345 * gcc-interface/Makefile.in (TOOLS_LIBS): Add $(LIBINTL).
8347 2011-06-18 Eric Botcazou <ebotcazou@adacore.com>
8349 * gcc-interface/decl.c (gnat_to_gnu_component_type): Use GNAT_TYPE
8350 local variable throughout. Remove useless call to Base_Type.
8351 (gnat_to_gnu_field): Use GNAT_FIELD_TYPE local variable throughout.
8352 Take it also into account for the volatileness of the field. Set the
8353 TREE_SIDE_EFFECTS flag as well in this case. Reorder some warnings.
8355 2011-06-18 Eric Botcazou <ebotcazou@adacore.com>
8357 * gcc-interface/trans.c (Identifier_to_gnu): Don't set TREE_THIS_NOTRAP
8358 on a dereference built for a by-ref object if it has an address clause.
8360 2011-06-18 Eric Botcazou <ebotcazou@adacore.com>
8362 * einfo.ads (Address_Taken): Document use for the second argument of
8363 Asm_Input and Asm_Output attributes.
8364 * sem_attr.adb (Analyze_Attribute) <Attribute_Asm_Input>: If the second
8365 argument is an entity name, then set Address_Taken on it.
8366 <Attribute_Asm_Output>: Likewise.
8367 * gcc-interface/trans.c (lvalue_required_for_attribute_p): Handle the
8368 Attr_Asm_Input and Attr_Asm_Output attributes explicitly.
8369 (gnat_to_gnu) <N_Code_Statement>: If an operand is going to end up in
8370 memory and is a CONST_DECL, retrieve its corresponding VAR_DECL.
8372 2011-06-16 Joern Rennecke <joern.rennecke@embecosm.com>
8375 * gcc-interface/decl.c (gnat_to_gnu_param): Use pack_cumulative_args.
8377 2011-06-14 Joseph Myers <joseph@codesourcery.com>
8379 * gcc-interface/Make-lang.in (gnatbind$(exeext)): Use ggc-none.o.
8380 (ada/utils.o): Update dependencies.
8381 * gcc-interface/Makefile.in (EXTRA_GNATTOOLS_OBJS): Add
8382 ../../../libcpp/libcpp.a.
8383 * gcc-interface/utils.c: Include common/common-target.h.
8384 (process_attributes): Use targetm_common.have_named_sections.
8386 2011-06-07 Richard Guenther <rguenther@suse.de>
8388 * gcc-interface/misc.c (gnat_init): Do not set size_type_node or call
8391 2011-06-06 Eric Botcazou <ebotcazou@adacore.com>
8393 * gcc-interface/utils2.c (gnat_stabilize_reference): Propagate the
8394 TREE_THIS_NOTRAP flag.
8396 2011-06-06 Eric Botcazou <ebotcazou@adacore.com>
8398 * gcc-interface/utils2.c (gnat_stabilize_reference) <COMPOUND_EXPR>:
8401 2011-06-06 Eric Botcazou <ebotcazou@adacore.com>
8403 * gcc-interface/trans.c (Identifier_to_gnu): Also handle deferred
8404 constants whose full view has discriminants specially.
8406 2011-06-06 Eric Botcazou <ebotcazou@adacore.com>
8408 * gcc-interface/utils.c: Include diagnostic.h.
8409 (gnat_write_global_declarations): Output debug information for all
8410 global type declarations before finalizing the compilation unit.
8411 * gcc-interface/Make-lang.in (ada/utils.o): Add dependency.
8413 2011-05-25 Jakub Jelinek <jakub@redhat.com>
8415 * gcc-interface/utils.c (def_fn_type): Remove extra va_end.
8417 2011-05-25 Kai Tietz <ktietz@redhat.com>
8419 * adaint.c (__gnat_to_canonical_file_list_next): Use array
8420 initialization instead of const/none-const pointer assignment.
8422 2011-05-24 Joseph Myers <joseph@codesourcery.com>
8424 * gcc-interface/Make-lang.in (GNAT1_OBJS): Don't include
8425 $(EXTRA_GNAT1_OBJS).
8426 (GNATBIND_OBJS): Don't include $(EXTRA_GNATBIND_OBJS).
8427 (EXTRA_GNAT1_OBJS, EXTRA_GNATBIND_OBJS): Remove.
8428 (gnat1$(exeext), gnatbind$(exeext)): Use libcommon-target.a.
8429 * gcc-interface/Makefile.in (EXTRA_GNATTOOLS_OBJS): Use
8430 libcommon-target.a instead of prefix.o.
8432 2011-05-21 Joseph Myers <joseph@codesourcery.com>
8435 * gcc-interface/Make-lang.in (gnatbind$(exeext)): Depend on $(LIBDEPS).
8437 2011-05-20 Joseph Myers <joseph@codesourcery.com>
8439 * gcc-interface/Make-lang.in (EXTRA_GNATBIND_OBJS): Remove version.o.
8440 * gcc-interface/Makefile.in (EXTRA_GNATTOOLS_OBJS): Use libcommon.a
8441 instead of version.o.
8443 2011-05-18 Kai Tietz <ktietz@redhat.com>
8445 * gcc-interface/trans.c (Exception_Handler_to_gnu_sjlj): Use
8446 boolean_false_node instead of integer_zero_node.
8447 (convert_with_check): Likewise.
8448 * gcc-interface/decl.c (choices_to_gnu): Likewise.
8450 2011-05-12 Eric Botcazou <ebotcazou@adacore.com>
8452 * gcc-interface/trans.c (call_to_gnu): In the by-reference case, if the
8453 type of the parameter is an unconstrained array, convert the actual to
8454 the type of the formal in the In Out and Out cases as well.
8456 2011-05-11 Nathan Froyd <froydnj@codesourcery.com>
8458 * gcc-interface/utils.c (def_fn_type): Don't call build_function_type;
8459 call build_function_type_array or build_varargs_function_type_array
8461 (create_subprog_type): Don't call build_function_type; call
8462 build_function_type_vec instead.
8464 2011-05-11 Nathan Froyd <froydnj@codesourcery.com>
8466 * gcc-interface/ada-tree.h (TYPE_OBJECT_RECORD_TYPE): Use TYPE_MINVAL.
8467 (TYPE_GCC_MIN_VALUE): Use TYPE_MINVAL.
8468 (TYPE_GCC_MAX_VALUE): Use TYPE_MAXVAL.
8470 2011-05-07 Eric Botcazou <ebotcazou@adacore.com>
8472 * gcc-interface/decl.c (intrin_arglists_compatible_p): Remove spaces.
8474 * gcc-interface/gigi.h (global_bindings_p): Adjust prototype.
8475 * gcc-interface/utils.c (global_bindings_p): Return bool and simplify.
8477 2011-05-05 Nathan Froyd <froydnj@codesourcery.com>
8479 * gcc-interface/trans.c (Case_Statement_to_gnu): Call build_case_label.
8481 2011-05-05 Nathan Froyd <froydnj@codesourcery.com>
8483 * gcc-interface/decl.c (intrin_arglists_compatible_p): Use iterators
8484 instead of accessing TYPE_ARG_TYPES directly.
8485 * gcc-interface/utils.c (handle_nonnull_attribute): Likewise.
8487 2011-05-05 Eric Botcazou <ebotcazou@adacore.com>
8490 * gcc-interface/gigi.h (get_variant_part): Declare.
8491 * gcc-interface/decl.c (get_variant_part): Make global.
8492 * gcc-interface/utils2.c (find_common_type): Do not return T1 if the
8493 types have the same constant size, are record types and T1 has a
8494 variant part while T2 doesn't.
8496 2011-05-05 Eric Botcazou <ebotcazou@adacore.com>
8498 * gcc-interface/utils.c (begin_subprog_body): Do not call
8500 (end_subprog_body): Likewise.
8502 2011-05-04 Richard Guenther <rguenther@suse.de>
8504 * gcc-interface/trans.c (gnat_to_gnu): Remove zero notrunc argument to
8506 (pos_to_constructor): Likewise.
8508 2011-05-03 Nathan Froyd <froydnj@codesourcery.com>
8509 Eric Botcazou <ebotcazou@adacore.com>
8511 * gcc-interface/trans.c (gigi): Call build_function_type_list instead
8512 of build_function_type. Adjust calls to...
8513 (build_raise_check): ...this. Do not take a void_tree parameter.
8514 Call build_function_type_list instead of build_function_type.
8515 Fix head comment and swap couple of conditional blocks.
8517 2011-04-30 Eric Botcazou <ebotcazou@adacore.com>
8519 * gnatvsn.ads (Library_Version): Bump to 4.7.
8520 (Current_Year): Bump to 2011.
8522 2011-04-29 Michael Matz <matz@suse.de>
8524 * gcc-interface/misc.c (gnat_handle_option): Set
8525 warn_maybe_uninitialized.
8527 2011-04-23 Gerald Pfeifer <gerald@pfeifer.com>
8529 * gnat_ugn.texi (Complexity Metrics Control): Update link to
8530 the Watson/McCabe paper.
8532 2011-04-23 Jim Meyering <meyering@redhat.com>
8534 * gnat_ugn.texi (Examples of gnatxref Usage): Fix typo: s/it it/it is/
8536 2011-04-22 Eric Botcazou <ebotcazou@adacore.com>
8538 * gcc-interface/decl.c (make_packable_type): Copy DECL_PARALLEL_TYPE
8541 2011-04-22 Eric Botcazou <ebotcazou@adacore.com>
8543 * gcc-interface/gigi.h (create_subprog_decl): Add ARTIFICIAL_FLAG
8545 * gcc-interface/utils.c (create_subprog_decl): Likewise. Set
8546 DECL_ARTIFICIAL and DECL_NO_INLINE_WARNING_P on the DECL accordingly.
8547 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Subprogram_Type>: Add
8548 ARTIFICIAL_FLAG local variable and pass it to create_subprog_decl.
8549 <all>: Do not set flags on the reused DECL node coming from an alias.
8550 Set DECL_IGNORED_P on the DECL node built for subprograms if they
8551 don't need debug info here...
8552 * gcc-interface/trans.c (Subprogram_Body_to_gnu): ...and not here.
8553 (gigi): Adjust calls to create_subprog_decl.
8554 (build_raise_check): Likewise.
8555 (establish_gnat_vms_condition_handler): Likewise.
8556 (Compilation_Unit_to_gnu): Likewise.
8557 (gnat_to_gnu): Likewise.
8559 2011-04-21 Eric Botcazou <ebotcazou@adacore.com>
8561 * gcc-interface/Makefile.in (NO_SIBLING_ADAFLAGS): Always define.
8562 (NO_REORDER_ADAFLAGS): New variable.
8563 (EXTRA_GNATTOOLS): Always define.
8564 (../stamp-gnatlib1-$(RTSDIR): Copy tsystem.h.
8565 Clean up and adjust list of files compiled with special options.
8566 * gcc-interface/Make-lang.in: Likewise.
8567 (ada/decl.o): Cosmetical change.
8568 (ada/misc.o): Remove dependency on $(PLUGIN_H).
8570 2011-04-20 Jim Meyering <meyering@redhat.com>
8572 * initialize.c (__gnat_initialize): Remove useless if-before-free.
8574 2011-04-17 Eric Botcazou <ebotcazou@adacore.com>
8576 * gcc-interface/Make-lang.in (gnatbind): Replace $(ALL_CFLAGS) with
8577 $(CFLAGS) on the link line.
8579 2011-04-17 Eric Botcazou <ebotcazou@adacore.com>
8581 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Function>: Declare the
8582 padded type built for the return type if it is unconstrained.
8584 2011-04-14 Nathan Froyd <froydnj@codesourcery.com>
8586 * gcc-interface/utils.c (gnat_poplevel): Use block_chainon.
8588 2011-04-12 Nathan Froyd <froydnj@codesourcery.com>
8590 * gcc-interface/ada-tree.h (union lang_tree_node): Check for TS_COMMON
8591 before calling TREE_CHAIN.
8592 * gcc-interface/misc.c (gnat_init_ts): New function.
8593 (LANG_HOOKS_INIT_TS): Define.
8595 2011-04-12 Martin Jambor <mjambor@suse.cz>
8597 * gcc-interface/utils.c (end_subprog_body): Call cgraph_get_create_node
8598 instead of cgraph_node.
8600 2011-04-08 Eric Botcazou <ebotcazou@adacore.com>
8602 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Procedure>: Set minimum
8603 alignment on fields of the RETURN type built for the Copy-In Copy-Out
8606 2011-04-08 Eric Botcazou <ebotcazou@adacore.com>
8608 * gcc-interface/trans.c (Identifier_to_gnu): Do not return initializers
8609 of aggregate types that contain a placeholder.
8611 2011-04-08 Nathan Froyd <froydnj@codesourcery.com>
8613 * gcc-interface/utils.c (handle_sentinel_attribute): Don't use
8615 (handle_type_generic_attribute): Likewise.
8617 2011-04-04 Eric Botcazou <ebotcazou@adacore.com>
8620 * s-oscons-tmplt.c (MSG_WAITALL): Fix thinko in previous change.
8622 2011-04-04 Kai Tietz <ktietz@redhat.com>
8625 * s-oscons-tmplt.c (MSG_WAITALL): Define it for native windows targets
8628 2011-04-02 Eric Botcazou <ebotcazou@adacore.com>
8630 * gcc-interface/utils2.c (build_allocator): In the unconstrained array
8631 type case, do not strip a padding type around the array type.
8633 2011-04-02 Eric Botcazou <ebotcazou@adacore.com>
8635 * gcc-interface/utils.c (update_pointer_to): Finalize named pointer
8638 2011-04-02 Eric Botcazou <ebotcazou@adacore.com>
8640 * gcc-interface/lang.opt (feliminate-unused-debug-types): Delete.
8641 * gcc-interface/misc.c (gnat_handle_option): Remove special handling
8642 code for -feliminate-unused-debug-types.
8643 (gnat_post_options): Likewise.
8645 2011-04-02 Eric Botcazou <ebotcazou@adacore.com>
8647 * gcc-interface/utils.c (gnat_pushdecl): If this is a non-artificial
8648 declaration of a pointer type, then set DECL_ORIGINAL_TYPE to a
8651 2011-04-02 Eric Botcazou <ebotcazou@adacore.com>
8653 * gcc-interface/decl.c (gnat_to_gnu_entity): Do not force the
8654 DECL_ARTIFICIAL flag on enumeration types.
8656 2011-04-02 Eric Botcazou <ebotcazou@adacore.com>
8658 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Array_Type>: Do not make
8659 fat pointer types artificial unconditionally.
8660 <E_Array_Subtype>: Attach the base array type as a parallel type if it
8663 2011-04-02 Eric Botcazou <ebotcazou@adacore.com>
8665 * gcc-interface/gigi.h (get_dummy_type): Declare.
8666 (build_dummy_unc_pointer_types): Likewise.
8667 (finish_fat_pointer_type): Likewise.
8668 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Array_Type>: If a dummy
8669 fat pointer type has been built, complete it in place.
8670 <E_Access_Type>: Call build_dummy_unc_pointer_types to build dummy fat
8671 and thin pointers. Remove useless variable.
8672 (finish_fat_pointer_type): Make global and move to...
8673 * gcc-interface/utils.c (finish_fat_pointer_type): ...here.
8674 (get_dummy_type): New function.
8675 (build_dummy_unc_pointer_types): Likewise.
8676 (gnat_pushdecl): Propage the name to the anonymous variants only.
8677 (update_pointer_to): Only adjust the pointer types in the unconstrained
8680 2011-04-02 Eric Botcazou <ebotcazou@adacore.com>
8682 * gcc-interface/ada-tree.h (DECL_TAFT_TYPE_P): New flag.
8683 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Incomplete_Type>: Set it
8684 if this is a Taft amendment type and the full declaration is available.
8685 * gcc-interface/trans.c (process_type): Likewise.
8686 If there is an old type, mark the new one as used if DECL_TAFT_TYPE_P.
8687 (process_freeze_entity): Likewise.
8688 * gcc-interface/utils.c (dummy_global): New static variable.
8689 (gnat_write_global_declarations): If there are types declared as used
8690 at the global level, insert them in the global hash table.
8692 2011-04-02 Eric Botcazou <ebotcazou@adacore.com>
8694 * gcc-interface/gigi.h (record_builtin_type): Add ARTIFICIAL_P param.
8695 * gcc-interface/utils.c (gnat_pushdecl): If this is a non-artificial
8696 declaration of an array type, then set DECL_ORIGINAL_TYPE to a distinct
8698 (record_builtin_type): Add ARTIFICIAL_P parameter. Set DECL_ARTIFICIAL
8699 flag of the type accordingly.
8700 * gcc-interface/trans.c (gigi): Adjust calls to record_builtin_type.
8702 2011-04-02 Eric Botcazou <ebotcazou@adacore.com>
8704 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Access_Type>: Defer
8705 finalizing types when updating the pointers to the designated type.
8706 <all>: Finalize the deferred types even if we didn't defer processing
8707 of incomplete types in this invocation.
8709 2011-04-01 Olivier Hainque <hainque@adacore.com>
8710 Nicolas Setton <setton@adacore.com>
8711 Eric Botcazou <ebotcazou@adacore.com>
8713 * gcc-interface/misc.c (gnat_descriptive_type): New function.
8714 (LANG_HOOKS_DESCRIPTIVE_TYPE): Redefine to gnat_descriptive_type.
8716 2011-03-28 Kai Tietz <ktietz@redhat.com>
8718 * gcc-interface/Makefile.in (SO_LIB): Handle multilib build for native
8720 (EH_MECHANISM): Use GCC exception mechanism for native Windows targets.
8721 * system-mingw.ads (System): Change ZCX_By_Default default to True.
8723 * raise-gcc.c (PERSONALITY_FUNCTION): Add prototype.
8725 2011-03-28 Tristan Gingold <gingold@adacore.com>
8728 * gcc-interface/Make-lang.in (ada/b_gnat1.adb): Replace ada/b_gnat1.c.
8729 Use ada output of gnatbind.
8730 (ada/b_gnatb.adb): Ditto.
8731 (ada/b_gnat1.o, ada/b_gnatb.o): New rules.
8732 (ada.mostlyclean, ada.stage1)
8733 (ada.stage2, ada.stage3, ada.stage4, ada.stageprofile)
8734 (ada.stagefeedback): Adjust.
8735 * gcc-interface/Makefile.in (b_gnatl.adb): Replace b_gnatl.c.
8736 Use ada output of gnatbind.
8737 (b_gnatm.adb): Ditto.
8738 (b_gnatl.o, b_gnatm.o): New rules.
8740 2011-03-26 Eric Botcazou <ebotcazou@adacore.com>
8742 * gcc-interface/decl.c (gnat_to_gnu_entity) <object>: Create TYPE_DECL
8743 for the padded type built to support a specified size or alignment.
8745 2011-03-26 Eric Botcazou <ebotcazou@adacore.com>
8747 * gcc-interface/gigi.h (finalize_from_with_types): Adjust comment.
8748 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Access_Type>: Defer
8749 unconditionally to the end of the unit when the designated type is
8751 <all>: Rename local variable. Attempt to un-defer types only and do it
8752 for limited_with'ed types as well.
8753 (finalize_from_with_types): Adjust comment. Rename variable and tidy.
8754 * gcc-interface/trans.c (Compilation_Unit_to_gnu): Use GNAT_UNIT
8755 consistently and remove redundant call to finalize_from_with_types.
8757 2011-03-26 Eric Botcazou <ebotcazou@adacore.com>
8759 * inline.adb (Back_End_Cannot_Inline): Lift restriction on calls to
8760 subprograms without a previous spec declared in the same unit.
8761 * gcc-interface/trans.c (Compilation_Unit_to_gnu): Process inlined
8762 subprograms at the end of the unit instead of at the beginning.
8763 * gcc-interface/utils.c (create_subprog_decl): Check that the entity
8764 isn't public for the special handling of non-inline functions nested
8765 inside inline external functions.
8767 2011-03-25 Jeff Law <law@redhat.com>
8769 * gcc-interface/utils.c (def_fn_type): Add missing va_end.
8771 2011-03-24 Eric Botcazou <ebotcazou@adacore.com>
8773 * einfo.ads (Size_Depends_On_Discriminant): Adjust description.
8774 * layout.adb (Compute_Size_Depends_On_Discriminant): New procedure
8775 to compute Set_Size_Depends_On_Discriminant.
8776 (Layout_Type): Call it on array types in back-end layout mode.
8777 * sem_util.adb (Requires_Transient_Scope): Return true for array
8778 types only if the size depends on the value of discriminants.
8779 * gcc-interface/utils2.c (build_binary_op) <MODIFY_EXPR>: Use the RHS
8780 type if the RHS is a call to a function that returns an unconstrained
8781 type with default discriminant.
8783 2011-03-24 Eric Botcazou <ebotcazou@adacore.com>
8785 * gcc-interface/trans.c (gnat_to_gnu): Remove obsolete case of
8786 non-conversion to the nominal result type at the end.
8788 2011-03-23 Eric Botcazou <ebotcazou@adacore.com>
8790 * gcc-interface/trans.c (create_temporary): New function taken from...
8791 (create_init_temporary): ...here. Call it.
8792 (call_to_gnu): Create the temporary for the return value early, if any.
8793 Create it for a function with copy-in/copy-out parameters if there is
8794 no target; in other cases of copy-in/copy-out, use another temporary.
8795 Push the new binding level lazily. Add and rename local variables.
8797 2011-03-23 Eric Botcazou <ebotcazou@adacore.com>
8799 * gcc-interface/decl.c (validate_size): Improve comments and tweak
8801 (set_rm_size): Likewise.
8803 2011-03-23 Eric Botcazou <ebotcazou@adacore.com>
8805 * gcc-interface/decl.c (gnat_to_gnu_entity) <object>: Create TYPE_DECL
8806 for the padded type built in order to support a specified alignment.
8807 Fix incorrect formatting.
8809 2011-03-21 Eric Botcazou <ebotcazou@adacore.com>
8812 * gcc-interface/decl.c (elaborate_expression_1): Localize GNU_DECL.
8814 2011-03-21 Eric Botcazou <ebotcazou@adacore.com>
8816 * gcc-interface/decl.c (components_to_record): Add REORDER parameter,
8817 rename DEBUG_INFO_P into DEBUG_INFO and move P_GNU_REP_LIST parameter
8818 to the end of the list. Adjust recursive call. Rename local variable.
8819 If REORDER is true, reorder components of the record type.
8820 (gnat_to_gnu_entity): Pass OK_To_Reorder_Components flag as argument to
8821 components_to_record and adjust the parameter list.
8823 2011-03-21 Eric Botcazou <ebotcazou@adacore.com>
8825 * gcc-interface/decl.c (elaborate_expression_1): When optimization is
8826 disabled, use the variable for bounds of loop iteration scheme.
8828 2011-03-21 Kai Tietz <ktietz@redhat.com>
8831 * gcc-interface/utils.c (gnat_internal_attribute_table): Add column.
8833 2011-03-17 Eric Botcazou <ebotcazou@adacore.com>
8835 * gcc-interface/decl.c (elaborate_expression_1): Try harder to find
8836 out whether the expression is read-only. Short-circuit placeholder
8837 case and rename a couple of local variables.
8839 2011-03-17 Eric Botcazou <ebotcazou@adacore.com>
8841 * gcc-interface/gigi.h (smaller_form_type_p): Declare.
8842 * gcc-interface/trans.c (smaller_form_type_p): Make global and move...
8843 * gcc-interface/utils.c (smaller_form_type_p): ...to here.
8844 (convert): Deal with conversions from a smaller form type specially.
8846 2011-02-14 Eric Botcazou <ebotcazou@adacore.com>
8848 * gcc-interface/misc.c (gnat_init_options): Do not concatenate -I and
8849 its argument, except for the special -I- switch.
8851 2011-02-12 Gerald Pfeifer <gerald@pfeifer.com>
8853 * gnat_ugn.texi (Compiling Different Versions of Ada): Update link to
8856 2011-02-08 Eric Botcazou <ebotcazou@adacore.com>
8858 * gcc-interface/Makefile.in (x86-64 darwin): Handle multilibs.
8860 2011-02-03 Eric Botcazou <ebotcazou@adacore.com>
8862 * gcc-interface/gigi.h (fill_vms_descriptor): Take GNU_TYPE instead of
8864 * gcc-interface/utils2.c (fill_vms_descriptor): Move from here to...
8865 * gcc-interface/utils.c (fill_vms_descriptor): ...here. Take GNU_TYPE
8866 instead of GNAT_FORMAL. Protect the expression against multiple uses.
8867 Do not generate the check directly, instead instantiate the template
8868 check present in the descriptor.
8869 (make_descriptor_field): Move around.
8870 (build_vms_descriptor32): Build a template check in the POINTER field.
8871 (build_vms_descriptor): Remove useless suffixes.
8872 * gcc-interface/trans.c (call_to_gnu): Adjust fill_vms_descriptor call.
8874 2011-01-26 Eric Botcazou <ebotcazou@adacore.com>
8877 * targext.c: Include target files if IN_RTS is defined.
8879 2011-01-26 Richard Guenther <rguenther@suse.de>
8882 * targext.c: Include config.h.
8883 * gcc-interface/Make-lang.in (ada/targext.o): Add $(CONFIG_H)
8886 2011-01-04 Pascal Obry <obry@adacore.com>
8887 Eric Botcazou <ebotcazou@adacore.com>
8889 * gcc-interface/decl.c: Disable Stdcall convention handling for 64-bit.
8891 2011-01-04 Eric Botcazou <ebotcazou@adacore.com>
8893 * gcc-interface/trans.c (Case_Statement_to_gnu): Put the SLOC of the
8894 end-of-case on the end label and its associated gotos, if any.
8896 2011-01-04 Eric Botcazou <ebotcazou@adacore.com>
8898 * gcc-interface/trans.c (Subprogram_Body_to_gnu): Evaluate the
8899 expressions of the parameter cache within the statement group of
8902 2011-01-04 Olivier Hainque <hainque@adacore.com>
8903 Eric Botcazou <ebotcazou@adacore.com>
8905 * gcc-interface/trans.c (BLOCK_SOURCE_END_LOCATION): Provide default.
8906 (set_end_locus_from_node): New function.
8907 (Subprogram_Body_to_gnu): Use it to mark both the inner BIND_EXPR we
8908 make and the function end_locus.
8909 (Compilation_Unit_to_gnu): Call it instead of a straight Sloc_to_locus
8910 for the elaboration subprogram.
8911 (set_gnu_expr_location_from_node) <default case>: Use it to attempt to
8912 set the end_locus of the expression as well.
8914 2011-01-04 Eric Botcazou <ebotcazou@adacore.com>
8917 * gcc-interface/trans.c (Identifier_to_gnu): In SJLJ mode, do not make
8918 variables that are referenced in exception handlers volatile.
8922 Copyright (C) 2011 Free Software Foundation, Inc.
8924 Copying and distribution of this file, with or without modification,
8925 are permitted in any medium without royalty provided the copyright
8926 notice and this notice are preserved.