1 2011-08-04 Arnaud Charlet <charlet@adacore.com>
3 * prj-env.adb: Remove local debug traces.
5 2011-08-04 Yannick Moy <moy@adacore.com>
7 * checks.adb (Apply_Float_Conversion_Check): correct a typo where Lo_OK
8 was used instead of Hi_OK, which could cause a read of an uninitialized
9 value later on. Detected while working on the new warning.
10 * exp_ch9.adb (Expand_N_Entry_Declaration): remove useless assignment
12 * sem_ch5.adb (Analyze_Assignment): set the last assignment component
13 in more cases, in order to detect more unreferenced values.
14 * sem_util.adb, sem_util.ads (Get_Enclosing_Object): return enclosing
15 object for expression, if any.
17 2011-08-04 Eric Botcazou <ebotcazou@adacore.com>
19 * exp_intr.adb (Expand_Binary_Operator_Call): Look at the RM size of
20 the operand types instead of the Esize.
22 2011-08-04 Steve Baird <baird@adacore.com>
24 * switch-b.adb (Scan_Binder_Switches): Add -P binder switch, used to
26 * bindusg.adb (Display): Add help message describing -P binder switch.
27 * gnat_ugn.texi: Document -P binder switch.
28 * bindgen.adb (Gen_Main_Ada): If CodePeer_Mode is set, then call the
29 user-defined main program directly.
30 (Gen_Output_File_Ada): If CodePeer_Mode is set, generate a with of the
31 user-defined main program in the context clause of the package body.
33 2011-08-04 Yannick Moy <moy@adacore.com>
35 * alfa.adb, alfa.ads (Get_Entity_For_Decl): remove function, partial
36 duplicate of Defining_Entity
37 (Get_Unique_Entity_For_Decl): rename function into
38 Unique_Defining_Entity
39 * einfo.adb, einfo.ads (Is_In_ALFA, Body_Is_In_ALFA): remove flags
40 (Formal_Proof_On): remove synthesized flag
41 * cstand.adb, sem_ch11.adb, sem_ch2.adb, sem_ch3.adb, sem_ch4.adb,
42 sem_ch5.adb, sem_ch6.adb, sem_ch9.adb, sem_res.adb, sem_util.adb,
43 sem_util.ads, stand.ads: Remove treatment associated to entities in ALFA
44 * sem_prag.adb (Analyze_Pragma): remove special treatment for pragma
45 Annotate (Formal_Proof)
47 2011-08-04 Emmanuel Briot <briot@adacore.com>
49 * prj-env.adb (Create_Config_Pragmas_File): fix handling of multi-unit
50 source files with non-standard naming schemes, in imported projects
52 2011-08-04 Emmanuel Briot <briot@adacore.com>
54 * makeutl.adb (Complete_Mains): when a multi-unit source file is
55 specified on the gprbuild command line, we need to compile all units
56 within that file, not just the first one we find
57 Fix error message for mains that are not found.
59 2011-08-04 Thomas Quinot <quinot@adacore.com>
61 * sem_ch6.adb: Update comment.
62 * sem_ch12.adb: Minor reformatting.
64 2011-08-04 Bob Duff <duff@adacore.com>
66 * s-tasren.adb (Task_Do_Or_Queue): Previous code was reading
67 Acceptor.Terminate_Alternative without locking Acceptor, which causes a
68 race condition whose symptom is to fail to lock Parent. That, in turn,
69 causes Parent.Awake_Count to be accessed without locking Parent, which
70 causes another race condition whose symptom is that Parent.Awake_Count
71 can be off by 1 (either too high or too low). The solution is to lock
72 Parent unconditionally, and then lock Acceptor, before reading
73 Acceptor.Terminate_Alternative.
75 2011-08-04 Arnaud Charlet <charlet@adacore.com>
77 * debug.adb: Update comment.
79 2011-08-04 Robert Dewar <dewar@adacore.com>
81 * par_sco.adb, exp_util.adb, make.adb, a-tags.adb, sem_prag.adb,
82 sem_util.adb, sem_attr.adb, exp_ch4.adb, g-comlin.adb, g-comlin.ads,
83 exp_ch6.adb: Minor reformatting.
85 2011-08-04 Gary Dismukes <dismukes@adacore.com>
87 * gnat_ugn.texi: Add sentence about the case of compile-time-detected
90 2011-08-04 Ed Schonberg <schonberg@adacore.com>
92 * gnat_rm.texi: update Ravenscar desription to reflect Ada2012 RM.
94 2011-08-04 Thomas Quinot <quinot@adacore.com>
96 * sinfo.ads: Minor reformatting.
98 2011-08-04 Emmanuel Briot <briot@adacore.com>
100 * makeutl.adb, makeutl.ads, prj-nmsc.adb (Complete_Mains): report error
101 even if there is no location.
103 2011-08-04 Ed Schonberg <schonberg@adacore.com>
105 * sem_res.adb, sem_ch4.adb: move check for restriction
106 No_Task_Hierarchy to resolve_allocator.
108 2011-08-04 Thomas Quinot <quinot@adacore.com>
110 * sinfo.adb, sinfo.ads, sem_prag.adb, sem_ch12.adb (Pragma_Enabled):
111 This flag of N_Pragma nodes is not used, remove it as well as all of
112 the associated circuitry.
114 2011-08-04 Javier Miranda <miranda@adacore.com>
116 * exp_disp.adb (Make_DT): Switch -gnatdQ disables the generation of the
117 runtime check on duplicated externa tags
118 * debug.adb Document switch -gnatdQ.
120 2011-08-04 Gary Dismukes <dismukes@adacore.com>
122 * a-fihema.ads: Minor typo fix.
124 2011-08-04 Yannick Moy <moy@adacore.com>
126 * sem_ch10.adb: Minor comment update.
128 2011-08-04 Hristian Kirtchev <kirtchev@adacore.com>
130 * einfo.adb: Update the node field usage to reflect the renaming of
131 Return_Flag to Return_ Flag_Or_Transient_Decl.
132 (Return_Flag): Renamed to Return_Flag_Or_Transient_Decl.
133 (Set_Return_Flag): Renamed to Set_Return_Flag_Or_Transient_Decl.
134 (Write_Field15_Name): Change Return_Flag to
135 Return_Flag_Or_Transient_Decl.
136 * einfo.ads: Rename node field Return_Flag to
137 Return_Flag_Or_Transient_Decl. Update the associated comment and all
138 occurrences in entities.
139 (Return_Flag): Renamed to Return_Flag_Or_Transient_Decl. Update
140 associated Inline pragma.
141 (Set_Return_Flag): Renamed to Set_Return_Flag_Or_Transient_Decl. Update
142 associated Inline pragma.
143 * exp_ch4.ads, exp_ch4.adb (Expand_N_Expression_With_Actions): New
145 * exp_ch6.adb (Expand_N_Extended_Return_Statement): Update the calls to
146 Return_Flag and Set_Return_Flag.
147 * exp_ch7.adb (Process_Declarations): Add code to recognize hook
148 objects generated for controlled transients declared inside an
149 Exception_With_Actions. Update the calls to Return_Flag.
150 (Process_Object_Declaration): Add code to add a null guard for hook
151 objects generated for controlled transients declared inside an
152 Exception_With_Actions. Update related comment.
153 * exp_util.adb (Has_Controlled_Objects): Add code to recognize hook
154 objects generated for controlled transients declared inside an
155 Exception_With_Actions. Update the calls to Return_Flag.
156 * expander.adb (Expand): Add new case for N_Expression_With_Actions.
158 2011-08-04 Ed Schonberg <schonberg@adacore.com>
160 * sem_util.adb:(Wrong_Type): Improve error message on a one-element
161 positional aggregate.
163 2011-08-04 Vincent Celier <celier@adacore.com>
165 * par_sco.adb (Process_Decisions.Output_Header): Check and record pragma
166 SLOC only for pragmas.
168 2011-08-04 Emmanuel Briot <briot@adacore.com>
170 * projects.texi: Minor typo fix.
172 2011-08-04 Emmanuel Briot <briot@adacore.com>
174 * prj-nmsc.adb (Check_File): Minor change to traces, to help debugging
175 on case-sensitive file systems.
177 2011-08-04 Thomas Quinot <quinot@adacore.com>
179 * put_scos.adb (Put_SCOs): Do not emit decision SCO for an X decision
180 nested in a disabled pragma.
181 * scos.ads, scos.adb, par_sco.ads, par_sco.adb: Record sloc of
182 enclosing pragma, if any, for X decisions.
184 2011-08-04 Thomas Quinot <quinot@adacore.com>
186 * sem_prag.adb: Minor reformatting.
188 2011-08-04 Vincent Celier <celier@adacore.com>
190 * a-tags.adb (Check_TSD): Avoid concatenation of strings, as it is not
191 allowed in no run time mode.
193 2011-08-04 Vincent Celier <celier@adacore.com>
195 * make.adb (Check): When -gnatc is used, check for the source file
196 inside the ALI file with a canonical case file name.
198 2011-08-04 Emmanuel Briot <briot@adacore.com>
200 * g-comlin.adb, g-comlin.ads (Add_Switch): Put back support for
201 overriding the separator.
203 2011-08-04 Robert Dewar <dewar@adacore.com>
205 * sem_aggr.adb, par_sco.adb, sem_type.adb, exp_util.adb, exp_ch9.adb,
206 prj-nmsc.adb, sem_ch13.adb, exp_strm.adb: Minor reformatting.
208 2011-08-04 Robert Dewar <dewar@adacore.com>
210 * gnat_rm.texi: Minor documentation fix for pragma Annotate.
212 2011-08-04 Yannick Moy <moy@adacore.com>
214 * sem_attr.adb (Analyze_Attribute): add check during pre-analysis that
215 'Result only appears in postcondition of function.
217 2011-08-04 Thomas Quinot <quinot@adacore.com>
219 * a-tags.adb (Check_TSD): When raising PROGRAM_ERROR for a duplicated
220 external tag, include the value of the external tag in the exception
223 2011-08-04 Yannick Moy <moy@adacore.com>
225 * sem_attr.adb (Result): modify error message for misplaced 'Result
227 2011-08-04 Sergey Rybin <rybin@adacore.com>
229 * gnat_rm.texi (pragma Annotate): Fix syntax description to make it
230 clear that the second argument must be an identifier.
232 2011-08-04 Thomas Quinot <quinot@adacore.com>
234 * exp_ch9.adb (Build_Barrier_Function): When compiling with
235 -fpreserve-control-flow, insert an IF statement on the barrier
236 condition to ensure that a conditional branch instruction is generated.
238 2011-08-04 Emmanuel Briot <briot@adacore.com>
240 * prj-part.adb, prj.adb, prj.ads, prj-tree.ads
241 (Processing_Flags.Ignore_Missing_With): new flag.
243 2011-08-04 Emmanuel Briot <briot@adacore.com>
245 * prj-nmsc.adb (Find_Sources, Path_Name_Of): Fix handling of
246 Source_List_File on case-insensitive systems where the file is actually
247 on a case-sensitive file system (NFS,...).
249 2011-08-04 Hristian Kirtchev <kirtchev@adacore.com>
251 * sem_ch6.adb (Analyze_Function_Return): In a rare case where a
252 function return contains a controlled [extension] aggregate and the
253 return statement is not part of a handled sequence of statements, wrap
254 the return in a block. This ensures that all controlled temporaries
255 generated during aggregate resolution will be picked up by the
256 finalization machinery.
258 2011-08-04 Ed Schonberg <schonberg@adacore.com>
260 * sem_aggr.adb (Resolve_Aggregate): If aggregate has box-initialized
261 components, freeze type before resolution, to ensure that default
262 initializations are present for all components.
263 * sem_res.adb (Resolve_Actuals): the designated object of an
264 accces-to-constant type is a legal actual in a call to an
265 initialization procedure.
267 2011-08-04 Hristian Kirtchev <kirtchev@adacore.com>
269 * exp_util.adb (Extract_Renamed_Object): Add N_Type_Conversion and
270 N_Unchecked_Type_Conversion to the possible containers of a renamed
273 2011-08-04 Yannick Moy <moy@adacore.com>
275 * par-ch13.adb (Aspect_Specifications_Present): recognize
276 "with Identifier'Class =>" as an aspect, so that a meaningful warning
277 is issued in Strict mode.
278 * par.adb: Fix typos in comments.
280 2011-08-04 Yannick Moy <moy@adacore.com>
282 * sem_attr.adb (Result): modify error message to take into account Post
283 aspect when compiling Ada 2012 (or newer) code.
285 2011-08-04 Nicolas Roche <roche@adacore.com>
287 * env.c (__gnat_clearenv): Avoid use of dynamic size array in order to
288 remove need for GCC exceptions.
290 2011-08-04 Vincent Celier <celier@adacore.com>
292 * makeutl.adb (Do_Complete): Call Debug_Output with the name of the
293 project, not the source file name.
294 * prj.adb (Find_Sources.Look_For_Sources): If the source has been
295 excluded, continue looking. This excluded source will only be returned
296 if there is no other source with the same base name that is not locally
299 2011-08-04 Ed Schonberg <schonberg@adacore.com>
301 * sem_res.adb (Resolve_Intrinsic_Operator): if the result type is
302 private and one of the operands is a real literal, use a qualified
303 expression rather than a conversion which is not meaningful to the
306 2011-08-04 Yannick Moy <moy@adacore.com>
308 * sem_ch13.adb (Aspect_Loop): when an aspect X and its classwise
309 corresponding aspect X'Class are allowed, proceed with analysis of the
310 aspect instead of skipping it.
312 2011-08-04 Tristan Gingold <gingold@adacore.com>
314 * s-flocon.adb, s-flocon.ads: Add a body for s-flocon.ads
315 This will allow to have an Ada implementation for the subprogram.
317 2011-08-04 Ed Schonberg <schonberg@adacore.com>
319 * sem_ch3.adb (Analyze_Full_Type_Declaration): If the declaration is a
320 completion and aspects are present, apply them to the entity for the
321 type which is currently the partial view, but which is the one that
323 * sem_ch13.adb (Analyze_Aspect_Specifications): if the predicate
324 applies to a partial view, indicate that the full view has predicates
326 (Replace_Type_Reference): Handle properly predicates that apply to the
327 full view of a private completion.
329 2011-08-04 Eric Botcazou <ebotcazou@adacore.com>
331 * layout.adb (Layout_Type): For composite types, do not set Esize.
332 * freeze.adb (Set_Small_Size): Remove test on alignment and do not
334 (Size_Known): Look at the RM size of components instead of the Esize.
335 (Freeze_Record_Type): Look at the RM size instead of the Esize to
336 issue warning and activate Implicit_Packing.
337 (Freeze_Entity): Likewise. Do not issue a warning for alias/atomic
338 if the Esize is not known.
339 * sem_ch13.adb (Analyze_Attribute_Definition_Clause) <Size>: Set Esize
340 for elementary types only.
341 (Analyze_Record_Representation_Clause): Look at the RM size instead
342 of the Esize to issue errors.
343 * gcc-interface/decl.c (gnat_to_gnu_entity): Do not set Esize if it
345 <E_Record_Type>: Look at the RM size instead of the Esize. Remove
347 Look at the RM size instead of the Esize for types if the latter is
349 (gnat_to_gnu_field): Use Known_Esize instead of Known_Static_Esize.
351 2011-08-04 Ed Schonberg <schonberg@adacore.com>
353 * sem_type.adb: proper handling of equality not involving anonymous
356 2011-08-04 Hristian Kirtchev <kirtchev@adacore.com>
358 * exp_ch7.adb (Create_Finalizer): Remove local variables Spec_Nod and
359 Vis_Decls. When creating a library-level finalizer for a package spec,
360 both the declaration and body of the finalizer are inserted either in
361 the visible or private declarations of the package spec.
363 2011-08-04 Javier Miranda <miranda@adacore.com>
365 * sem_ch3.adb (Derive_Subprograms): Complete assertion to request the
366 use of the full-view of a type when invoking Is_Ancestor.
367 * sem_type.adb (Is_Ancestor): For consistency, when the traversal of
368 the full-view of private parents is requested, then use also the
369 full-view of the parent of the first derivation.
371 2011-08-04 Tristan Gingold <gingold@adacore.com>
373 * s-taprop-vxworks.adb (Enter_Task): Use System.Float_Control.Reset
374 instead of the locally imported procedure.
375 * s-taprop-mingw.adb (Enter_Task): Ditto.
376 * s-valrea.adb (Scan_Real): Ditto.
377 * s-imgrea.adb (Set_Image_Real): Ditto.
378 * s-flocon.ads: Make the package pure.
380 2011-08-04 Thomas Quinot <quinot@adacore.com>
382 * sinfo.ads, sinfo.adb (Debug_Statement, Set_Debug_Statement): Remove.
383 * tbuild.ads, tbuild.adb (Make_Pragma): Adjust accordingly.
384 * sinfo-cn.ads, sinfo-cn.adb (Change_Name_To_Procedure_Call_Statement):
385 New subprogram, moved here from...
386 * par.adb, par-ch5.adb (P_Statement_Name): ... here.
387 * par-prag.adb (Par.Prag, case Pragma_Debug): Do not perform any
388 rewriting of the last argument into a procedure call statement here...
389 * sem_prag.adb (Analyze_Pragma, case Pragma_Debug): ...do it there
392 2011-08-04 Thomas Quinot <quinot@adacore.com>
394 * par_sco.adb: Minor reformatting.
396 2011-08-04 Robert Dewar <dewar@adacore.com>
398 * erroutc.adb: Minor reformatting.
400 2011-08-04 Thomas Quinot <quinot@adacore.com>
402 * par_sco.adb: Comment update.
404 2011-08-04 Tristan Gingold <gingold@adacore.com>
406 * s-flocon.ads: New file.
407 * g-flocon.ads: Now a renaming of s-flocon.
408 * Makefile.rtl: Add s-flocon.o
410 2011-08-04 Javier Miranda <miranda@adacore.com>
412 * exp_strm.adb (Build_Array_Input_Function): if the array type is
413 constrained, do not attempt to build a subtype of it.
415 2011-08-04 Yannick Moy <moy@adacore.com>
417 * errout.ads Change comments: remove 'R'M as an example where quotes
418 are needed; add ALFA as another case where quotes are not needed
419 * erroutc.adb (Set_Msg_Insertion_Reserved_Word): add ALFA as another
420 case where quotes are not needed.
421 * sem_ch11.adb, sem_ch13.adb, sem_ch2.adb, sem_ch3.adb, sem_ch4.adb,
422 sem_ch5.adb, sem_ch6.adb, sem_ch9.adb, sem_prag.adb, sem_res.adb:
423 Remove all occurrences of 'A'L'F'A
425 2011-08-04 Ed Schonberg <schonberg@adacore.com>
427 * sem_ch13.adb: check legality of invariant pragma.
429 2011-08-04 Eric Botcazou <ebotcazou@adacore.com>
431 * bindgen.adb: Add comments.
433 2011-08-04 Yannick Moy <moy@adacore.com>
435 * einfo.adb, einfo.ads: Free Flag254 and make Formal_Proof_On a
437 * sem_prag.adb (Analyze_Pragma): record the pragma Annotate
438 (Formal_Proof, On/Off) in the Rep_Item list of the current subprogram.
440 2011-08-04 Robert Dewar <dewar@adacore.com>
442 * exp_ch7.adb, exp_ch6.adb, sem_ch3.adb, layout.adb, sem_ch5.adb,
443 osint-c.ads, sem_util.ads, gnat1drv.adb, targparm.ads, sem_ch6.adb,
444 sem_ch13.adb, s-pooloc.adb: Minor reformatting.
446 2011-08-04 Thomas Quinot <quinot@adacore.com>
448 * s-pooloc.ads, s-pooglo.ads: Minor reformatting
450 2011-08-04 Thomas Quinot <quinot@adacore.com>
453 * s-pooloc.adb (Deallocate): Fix the case of deallocating the only
456 2011-08-04 Robert Dewar <dewar@adacore.com>
458 * einfo.ads, exp_ch4.adb: Minor reformatting.
460 2011-08-04 Jerome Lambourg <lambourg@adacore.com>
462 * back_end.ads (Gen_Or_Update_Object_File): Add more comments.
464 2011-08-04 Ed Schonberg <schonberg@adacore.com>
466 * exp_ch4.adb (Expand_Composite_Equality): code cleanup: use component
467 type in all cases to compute list of primitive operations, because full
468 view may be an itype that is not attached to the list of declarations.
470 2011-08-04 Eric Botcazou <ebotcazou@adacore.com>
472 * bindgen.adb (Gen_Adafinal_Ada): Generate an early return if the
473 library has already been finalized.
474 (Gen_Adafinal_C): Likewise.
475 (Gen_Adainit_Ada): Generate an early return if the library has
476 already been elaborated.
477 (Gen_Adainit_C): Likewise.
478 (Gen_Output_File_Ada): Generate an elaboration flag.
479 (Gen_Output_File_C): Likewise.
481 2011-08-04 Hristian Kirtchev <kirtchev@adacore.com>
483 * exp_ch4.adb (Expand_Allocator_Expression): Disable the generation of
484 Set_Finalize_Address_Ptr for CodePeer because Finalize_Address was not
485 built in the first place.
486 (Expand_N_Allocator): Disable the generation of Set_Finalize_Address_Ptr
487 for CodePeer because Finalize_Address was not built to begin with.
488 * exp_ch6.adb (Make_Build_In_Place_Call_In_Allocator): Ditto.
490 2011-08-04 Pascal Obry <obry@adacore.com>
492 * adaint.c (__gnat_tmp_name): Use current process id to create temp
493 filenames, this ensures unicity of filenames across processes.
495 2011-08-04 Hristian Kirtchev <kirtchev@adacore.com>
497 * bindgen.adb (Gen_Finalize_Library_Ada): Rename generated routine
498 Raise_Controlled to Raise_From_Controlled_Operation. Update the
499 signature of Raise_From_Controlled_Operation by adding flag From_Abort.
500 Add False as the actual to From_Abort in the generated call to
501 Raise_From_Controlled_Operation.
503 2011-08-04 Jerome Lambourg <lambourg@adacore.com>
505 * osint-c.ads, osint-c.adb (Set_Library_Info_Name): Move to declaration
506 so that the ali file name can be retrieved from outside of this package.
507 * back_end.ads, back_end.adb (Gen_Or_Update_Object_File): New method
508 doing nothing in the general case, but used to update the object file
509 timestamp if directly generated by the backend.
510 * gnat1drv.adb (Gnat1drv): Make sure the object file's timestamp is set
511 to a later time than the ali file one.
513 2011-08-04 Yannick Moy <moy@adacore.com>
515 * einfo.adb, einfo.ads (Formal_Proof_On): new flag set on subprogram
516 entities whose body contains an Annotate pragma which forces formal
518 * sem_ch11.adb, sem_ch2.adb, sem_ch3.adb, sem_ch4.adb, sem_ch5.adb,
519 sem_ch6.adb, sem_ch9.adb, sem_res.adb: Adapt call to
520 Mark_Non_ALFA_Subprogram to pass in a message and node.
521 * sem_prag.adb (Analyze_Pragma): add treatment of pragma Annotate
522 (Forma_Proof, On) which sets the flag Formal_Proof_On in the
523 surrounding subprogram.
524 * sem_util.adb, sem_util.ads (Mark_Non_ALFA_Subprogram,
525 Mark_Non_ALFA_Subprogram_Unconditional): if the subprogram being marked
526 as not in ALFA is annotated with Formal_Proof being On, then an error
527 is issued based on the additional parameters for message and node.
528 * snames.ads-tmpl (Name_Formal_Proof): new name for annotation.
529 * gcc-interface/Make-lang.in: Update dependencies.
531 2011-08-04 Hristian Kirtchev <kirtchev@adacore.com>
533 * exp_ch3.adb (Expand_Freeze_Class_Wide_Type): Do not generate
534 Finalize_Address when CodePeer is enabled.
536 2011-08-04 Pascal Obry <obry@adacore.com>
538 * adaint.c (__gnat_tmp_name): Use _tempnam() instead of tempnam() as
539 the latter returns a pointer to a static buffer which is deallocated
540 at the end of the routine.
542 2011-08-04 Yannick Moy <moy@adacore.com>
544 * sem_ch3.adb (Array_Type_Declaration): move test for type in ALFA
545 after index creation; mark unconstrained base array type generated as
546 being in/not in ALFA as well
547 (Make_Index): mark subtype created as in/not in ALFA
548 * sem_ch5.adb (Analyze_Iteration_Scheme): mark entity for iterating
549 over a loop as in/not in ALFA, depending on its type and form of loop
552 2011-08-04 Hristian Kirtchev <kirtchev@adacore.com>
554 * exp_ch7.adb (Build_Object_Declarations): Initialize flag Abort
555 directly to False on .NET and JVM.
557 2011-08-04 Yannick Moy <moy@adacore.com>
559 * sem_ch3.adb (Constrain_Enumeration, Constrain_Integer): remove
560 constraint that subtype must come from source code to be in ALFA, so
561 that anonymous subtypes can be in ALFA too.
563 2011-08-04 Yannick Moy <moy@adacore.com>
565 * sem_ch3.adb (Analyze_Object_Declaration): remove obsolete addition of
566 reference for ALFA mode.
567 * lib-xref-alfa.adb, lib-xref.ads (Traverse_Compilation_Unit): make
568 procedure public so as to use it from formal verification back-end.
570 2011-08-04 Jerome Lambourg <lambourg@adacore.com>
572 * g-comlin.adb (For_Each_Simple_Switch.Is_In_Config): Remove the
573 invalid checks of the Parameter, making Remove_Switch not working
576 2011-08-04 Arnaud Charlet <charlet@adacore.com>
578 * targparm.ads: Update header: no run-time exception is needed on this
581 2011-08-04 Vincent Celier <celier@adacore.com>
583 * a-fihema.adb: Use System.IO instead of GNAT.IO
585 2011-08-04 Thomas Quinot <quinot@adacore.com>
587 * sem_ch3.adb (Access_Definition): Anonymous access to subprogram types
588 are forbidden in Compiler_Unit mode.
590 2011-08-04 Robert Dewar <dewar@adacore.com>
592 * sem_util.adb: Minor reformatting.
594 2011-08-04 Hristian Kirtchev <kirtchev@adacore.com>
596 * bindgen.adb (Gen_Finalize_Library_Ada): Update the import string for
597 library-level finalizers.
598 (Gen_Finalize_Library_C): Update the import string for library-level
600 (Gen_Finalize_Library_Defs_C): Update the definition name of a
601 library-level finalizer.
602 * exp_ch7.adb: Remove with and use clauses for Stringt.
603 (Create_Finalizer): Remove local variables Conv_Name, Prag_Decl,
604 Spec_Decl. Add local variable Body_Id. The names of library-level
605 finalizers are now manually fully qualified and are no longer external.
606 A single name is now capable of servicing .NET, JVM and non-VM targets.
607 Pragma Export is no longer required to provide visibility for the name.
608 (Create_Finalizer_String): Removed.
609 (New_Finalizer_Name): New routine which mimics New_..._Name.
611 2011-08-04 Eric Botcazou <ebotcazou@adacore.com>
613 * sem_elab.adb (Check_Internal_Call_Continue): Change the type of the
614 elaboration counter to Standard_Short_Integer.
615 * sem_util.adb (Build_Elaboration_Entity): Likewise.
616 * bindgen.adb (Gen_Elab_Externals_Ada): Adjust to above change.
617 (Gen_Elab_Externals_C): Likewise.
619 2011-08-04 Ed Falis <falis@adacore.com>
621 * system-vxworks-arm.ads, system-vxworks-sparcv9.ads,
622 system-vxworks-ppc.ads, system-vxworks-m68k.ads,
623 system-vxworks-mips.ads, system-vxworks-x86.ads
624 (Always_Compatible_Rep): set to False for all VxWorks targets.
626 2011-08-04 Robert Dewar <dewar@adacore.com>
628 * par_sco.adb, prj-proc.adb, make.adb, bindgen.adb, prj.adb, prj.ads,
629 makeutl.adb, makeutl.ads, prj-nmsc.adb, exp_ch5.adb, exp_ch12.adb,
630 exp_ch7.ads, exp_util.ads, sem_util.ads, g-comlin.ads, exp_ch6.adb,
631 exp_ch6.ads, lib-xref.ads, exp_ch7.adb, exp_util.adb, exp_dist.adb,
632 exp_strm.adb, gnatcmd.adb, freeze.adb, g-comlin.adb, lib-xref-alfa.adb,
633 sem_attr.adb, sem_prag.adb, sem_util.adb, sem_elab.adb, sem_ch8.adb,
634 sem_ch11.adb, sem_eval.adb, sem_ch13.adb, sem_disp.adb, a-fihema.adb:
635 Minor reformatting and code reorganization.
637 2011-08-04 Emmanuel Briot <briot@adacore.com>
639 * projects.texi: Added doc for aggregate projects.
641 2011-08-04 Emmanuel Briot <briot@adacore.com>
643 * prj-proc.adb, prj-nmsc.adb, prj-env.adb (Process_Declarative_Items):
644 Add support for overriding the Project_Path in aggregate projects.
646 2011-08-04 Robert Dewar <dewar@adacore.com>
648 * a-cofove.ads: Minor reformatting.
650 2011-08-04 Hristian Kirtchev <kirtchev@adacore.com>
652 * exp_ch7.adb (Build_Adjust_Or_Finalize_Statements): Update the comment
653 on the generated code.
654 (Build_Finalize_Statements): Update the comment on the generated code.
655 (Build_Initialize_Statements): Update the comment on the generated code.
656 (Build_Object_Declarations): Add local variable Result. The object
657 declarations are now built in sequence.
658 * rtsfind.ads: Add RE_Exception_Occurrence_Access to tables RE_Id and
661 2011-08-04 Robert Dewar <dewar@adacore.com>
663 * checks.adb, alfa.adb, alfa.ads: Minor reformatting.
665 2011-08-04 Eric Botcazou <ebotcazou@adacore.com>
667 * einfo.ads (Elaboration_Entity): Document new definition and use.
668 (Elaboration_Entity_Required): Adjust to above change.
669 * exp_attr.adb (Expand_N_Attribute_Reference): Likewise.
670 * exp_ch12.adb: And with and use for Snames.
671 (Expand_N_Generic_Instantiation): Test 'Elaborated attribute.
672 * exp_util.adb (Set_Elaboration_Flag): Likewise.
673 * sem_attr.adb (Analyze_Attribute) <Check_Library_Unit>: Delete.
674 <Check_Unit_Name>: Deal with N_Expanded_Name.
675 <Attribute_Elaborated>: Extend to all unit names.
676 * sem_elab.adb: And with and use for Uintp.
677 (Check_Internal_Call_Continue): Adjust to Elaboration_Entity change.
678 * sem_util.ads (Build_Elaboration_Entity): Adjust comment.
679 * sem_util.adb (Build_Elaboration_Entity): Change type to Integer.
680 * bindgen.adb (Gen_Elab_Externals_Ada): New local subprogram taken
681 from Gen_Adainit_Ada.
682 (Gen_Elab_Externals_C): Likewise, but taken from Gen_Adainit_C.
683 (Gen_Adafinal_Ada): Remove redundant test. In the non-main program
684 case, do not call System.Standard_Library.Adafinal; instead call
685 finalize_library if needed.
686 (Gen_Adafinal_C): Likewise.
687 (Gen_Adainit_Ada): Do not set SSL.Finalize_Library_Objects in the
688 non-main program case.
689 (Gen_Adainit_C): Generate a couple of external declarations here.
690 In the main program case, set SSL.Finalize_Library_Objects.
691 (Gen_Elab_Calls_Ada): Adjust to Elaboration_Entity change.
692 (Gen_Elab_Calls_C): Likewise.
693 (Gen_Finalize_Library_Ada): Likewise. Skip SAL interface units.
694 (Gen_Finalize_Library_C): Likewise. Generate a full function.
695 (Gen_Main_C): Put back call to Ada_Final and don't finalize library
697 (Gen_Output_File_Ada): Generate pragma Linker_Destructor for Ada_Final
698 if -a is specified. Call Gen_Elab_Externals_Ada. Move around call to
700 (Gen_Output_File_C): Generate __attribute__((destructor)) for Ada_Final
701 if -a is specified. Call Gen_Elab_Externals_C. Remove useless couple
702 of external declarations. Â Call Gen_Finalize_Library_C.
704 2011-08-04 Emmanuel Briot <briot@adacore.com>
706 * prj.adb, prj.ads, makeutl.adb, makeutl.ads (Complete_Mains,
707 Compute_Compilation_Phases): new subprogram.
708 (Builder_Data, Builder_Project_Tree_Data): new subprogram and type
709 The number of mains as well as the various compilation phases that
710 need to be run are now project tree specific, since various
711 aggregated trees might have different requirements. In particular,
712 they do not all require bind or link phases.
714 2011-08-04 Emmanuel Briot <briot@adacore.com>
716 * prj.adb, prj.ads, makeutl.adb, makeutl.ads, prj-env.adb
717 (Project_Tree_Appdata): New type.
718 It is now possible to associate application-specific data to a project
719 tree. In particular, this is used in the gprbuild builder to avoid a
720 number of global tables and htables, especially now that there can be
721 several project trees loaded at once because of aggregate projects.
722 (Debug_Name): new procedure.
723 * projects.texi: Clarify syntax of "**" for Source_Dirs
725 2011-08-03 Emmanuel Briot <briot@adacore.com>
727 * prj.ads, makeutl.adb, makeutl.ads (Queue.Insert): now also inserts
728 the "roots" for a main.
729 (Fill_From_Project): add support for aggregate projects. Main units
730 in aggregated projects are now automatically added in the list of
731 files to build (although this fails later on in gprbuild, because
732 these files are not using the root proejct tree, so this needs
734 * gcc-interface/Make-lang.in: Update dependencies.
736 2011-08-03 Yannick Moy <moy@adacore.com>
738 * sem_ch4.adb (Analyze_Conditional_Expression): only allow boolean
739 conditional expression in ALFA.
740 * sem_res.adb (Resolve_Conditional_Expression): mark non-boolean
741 expressions as not in ALFA.
743 2011-08-03 Robert Dewar <dewar@adacore.com>
745 * a-cofove.adb: Minor reformatting.
747 2011-08-03 Emmanuel Briot <briot@adacore.com>
749 * make.adb, prj.adb, prj.ads, makeutl.adb, makeutl.ads
750 (Insert_Project_Sources, Insert_withed_Sources_For): moved from the
752 These packages are more logically placed in the Queue package, since
753 they manipulate the queue. It is also likely that they can be adapted
754 for gnatmake, thus sharing more code.
755 (Finish_Program, Fail_Program): moved from the gprbuild sources, so
756 that we could move the above.
758 2011-08-03 Emmanuel Briot <briot@adacore.com>
760 * errutil.adb (Finalize): clean up the list of error messages on exit.
761 Calling this subprogram multiple times will no longer show duplicate
762 error messages on stderr.
764 2011-08-03 Emmanuel Briot <briot@adacore.com>
766 * g-comlin.adb, g-comlin.ads (Set_Command_Line): ignore the parameter
767 Getopt_Switches when we have already define a command line
770 2011-08-03 Yannick Moy <moy@adacore.com>
772 * sem_ch11.adb (Analyze_Raise_xxx_Error): do not mark such nodes as not
773 in ALFA. Instead, they are considered as assertions to prove.
774 * sem_ch4.adb (Analyze_Conditional_Expression): do not always mark such
775 nodes as not in ALFA. Instead, include conditional expressions in ALFA
776 if they have no ELSE part, or if they occur in pre- and postconditions,
777 where the Condition cannot have side-effects in ALFA
778 (Analyze_Membership_Op): do not mark such nodes as not in ALFA
779 (Analyze_Type_Conversion): do not always mark such nodes as not in ALFA.
780 Instead, include type conversion between scalar types in ALFA.
781 * sem_ch6.adb (Process_Formals): correctly mark a parameter in ALFA
782 if-and-only-if its type is in ALFA.
784 2011-08-03 Thomas Quinot <quinot@adacore.com>
786 * scos.adb, get_scos.adb, put_scos.adb
787 New code letter for decisions: G (entry guard)
789 (Traverse_Subprogram_Body): Rename to...
790 (Traverse_Subprogram_Or_Task_Body): New subrpogram.
791 (Traverse_Protected_Body): New subprogram
792 (Traverse_Declarations_Or_Statements): Add traversal of task bodies,
793 protected bodies and entry bodies.
795 2011-08-03 Yannick Moy <moy@adacore.com>
797 * einfo.adb, einfo.ads (Is_Postcondition_Proc): new flag for procedure
798 entities with get/set subprograms, which is set on procedure entities
799 generated by the compiler for a postcondition.
800 * sem_ch6.adb (Process_PPCs): set new flag on postcondition procedures
801 * alfa.adb, alfa.ads (Get_Entity_For_Decl): new function returning the
802 entity for a declaration
803 (Get_Unique_Entity_For_Decl): new function returning an entity which
804 represents a declaration, so that matching spec and body have the same
807 2011-08-03 Robert Dewar <dewar@adacore.com>
809 * a-except-2005.adb, a-cfhama.adb, a-cfhase.adb, a-cfhase.ads,
810 a-cforma.adb, a-cforse.ads, a-cforse.adb: Minor reformatting
812 2011-08-03 Yannick Moy <moy@adacore.com>
814 * lib-xref-alfa.adb (Detect_And_Add_ALFA_Scope): make the subprogram
815 library-level because retriction No_Implicit_Dynamic_Code in the
816 front-end prevents its definition as a local subprogram
817 (Traverse_Compilation_Unit): extract new procedure from Add_ALFA_File,
818 for reuse in other contexts
819 (Traverse_Declarations_Or_Statements,
820 Traverse_Handled_Statement_Sequence, Traverse_Package_Body,
821 Traverse_Package_Declaration, Traverse_Subprogram_Body): make all these
822 procedures take a callback parameter to be called on all declarations
824 (Traverse_All_Compilation_Units): new generic function to traverse a
825 compilation unit and call a callback parameter on all declarations
827 2011-08-03 Javier Miranda <miranda@adacore.com>
829 * sem_prag.adb (Process_Interface_Name): Allow duplicated export names
830 in Java since they are always enclosed in a namespace that
831 differentiates them, and overloaded entities are supported by the VM.
833 2011-08-03 Ed Schonberg <schonberg@adacore.com>
835 * checks.adb (Determine_Range): If a computed bound of an operation is
836 outside the range of the base type of the expression, and overflow
837 checks are enabled, the result is unknown and cannot be used for any
838 subsequent constant folding.
839 * sem_eval.adb (Compile_Time_Compare): if the bounds of one operand are
840 unknown, so is the result of the comparison.
842 2011-08-03 Hristian Kirtchev <kirtchev@adacore.com>
844 * a-except-2005.adb (Raise_From_Controlled_Operation): Add new formal
845 From_Abort. When finalization was triggered by an abort, propagate
846 Standard'Abort_Signal rather than Program_Error.
847 * a-except-2005.ads (Raise_From_Controlled_Operation): Add new formal
849 * a-except.adb (Raise_From_Controlled_Operation): Add new formal
850 From_Abort. When finalization was triggered by an abort, propagate
851 Standard'Abort_Signal rather than Program_Error.
852 * a-except.ads:(Raise_From_Controlled_Operation): Add new formal
854 * exp_ch7.adb:(Build_Adjust_Or_Finalize_Statements): New local variable
855 Abort_Id. Update the calls to Build_Object_Declarations and
856 Build_Raise_Statement to include Abort_Id.
857 (Build_Adjust_Statements): New local variable Abort_Id. Update the
858 calls to Build_Object_Declarations and Build_Raise_Statement to include
860 (Build_Finalize_Statements): New local variable Abort_Id. Update the
861 calls to Build_Object_Declarations and Build_Raise_Statement to include
863 (Build_Components): Create an entity for Abort_Id when exceptions are
864 allowed on the target.
865 (Build_Finalizer): New local variable Abort_Id.
866 (Build_Initialize_Statements): New local variable Abort_Id. Update the
867 calls to Build_Object_Declarations and Build_Raise_Statement to include
869 (Build_Object_Declarations): Add new formal Abort_Id. Create the
870 declaration of flag Abort_Id to preserve the original abort status
871 before finalization code is executed.
872 (Build_Raise_Statement): Add new formal Abort_Id. Pass Abort_Id to
873 runtime routine Raise_From_Controlled_Operation.
874 (Create_Finalizer): Update the call to Build_Raise_Statement to include
875 Abort_Id. Update the call to Build_Object_Declarations to include
876 Abort_Id. Update the layout of the finalizer body.
877 (Make_Handler_For_Ctrl_Operation): Add an actual for From_Abort.
878 (Process_Transient_Objects): New local variable Abort_Id. Remove the
879 clunky code to create all flags and objects related to
880 exception propagation and replace it with a call to
881 Build_Object_Declarations. Update the call to Build_Raise_Statement to
883 * exp_ch7.ads (Build_Object_Declarations): Moved from body to spec.
884 Add new formal Abort_Id and associated comment on its use.
885 (Build_Raise_Statement): Add new formal Abort_Id and associated comment
887 * exp_intr.adb (Expand_Unc_Deallocation): New local variable Abort_Id.
888 Remove the clunky code to create all flags and objects related to
889 exception propagation and replace it with a call to
890 Build_Object_Declarations. Update the call to Build_Raise_Statement.
892 2011-08-03 Eric Botcazou <ebotcazou@adacore.com>
894 * s-tassta.adb: Fix minor typos.
896 2011-08-03 Robert Dewar <dewar@adacore.com>
898 * rtsfind.ads, makeutl.ads, prj.ads, prj.adb, make.adb,
899 lib-writ.adb, makeutl.adb, s-soflin.ads, clean.adb: Minor reformatting.
901 2011-08-03 Hristian Kirtchev <kirtchev@adacore.com>
903 * exp_ch7.adb (Create_Finalizer): Treat freeze nodes in similar fashion
904 to packages. This ensures that the finalizer body will not end up
905 inside the freeze node.
906 (Process_Declarations): Add code to detect whether a freeze node has a
907 nested finalization collection.
909 2011-08-03 Pascal Obry <obry@adacore.com>
911 * g-awk.adb, g-awk.ads: Make GNAT.AWK API compatible with Ada 2005.
912 (Current_Session): Return a not null access to Session_Type.
913 (Default_Session): Likewise.
915 2011-08-03 Robert Dewar <dewar@adacore.com>
917 * a-cfdlli.adb, bindgen.adb, exp_ch4.adb, exp_ch13.adb, sem_warn.adb,
918 exp_ch3.adb, exp_ch3.ads: Minor reformatting.
920 2011-08-03 Pascal Obry <obry@adacore.com>
922 * g-awk.ads: Minor comment fix.
924 2011-08-03 Sergey Rybin <rybin@adacore.com>
926 * tree_io.ads (ASIS_Version_Number): Update because of the changes in
927 the tree structure related to discriminant constraints.
928 Original_Discriminant cannot be used any more for computing the
929 defining name for the reference to a discriminant.
931 2011-08-03 Ed Schonberg <schonberg@adacore.com>
933 * sem_disp.adb (Is_Tag_Indeterminate): If the return type of the
934 function is not visibly tagged, this is not a dispatching call and
935 therfore is not Tag_Indeterminate, even if the function is marked as
936 dispatching on result.
938 2011-08-03 Hristian Kirtchev <kirtchev@adacore.com>
940 * exp_ch13.adb: Add with and use clauses for Restrict and Rident.
941 (Expand_N_Free_Statement): Add a guard to protect against run-times
942 which do not support controlled types.
943 * exp_ch3.adb (Expand_Freeze_Class_Wide_Type): Add a guard to protect
944 against run-times which do not support controlled types.
945 * exp_ch4.adb (Complete_Controlled_Allocation): Add a guard to protect
946 against run-times which do not support controlled types.
947 * exp_ch7.adb (Build_Finalization_Collection): Add a guard to protect
948 against run-times which do not support controlled types.
949 * exp_util.adb (Needs_Finalization): Code reformatting. Add a guard to
950 protect against run-times which do not support controlled types.
952 2011-08-03 Eric Botcazou <ebotcazou@adacore.com>
954 * exp_intr.adb: Put back with and use clauses for Exp_Ch11.
955 (Expand_Unc_Deallocation): Expand the AT_END handler at the very end.
957 2011-08-03 Ed Schonberg <schonberg@adacore.com>
959 * exp_ch5.adb (Expand_Iterator_Loop): indicate that the cursor is
960 modified in the source, to prevent spurious warnings when compiling
963 2011-08-03 Thomas Quinot <quinot@adacore.com>
965 * a-except-2005.adb: Minor reformatting.
967 2011-08-03 Ed Schonberg <schonberg@adacore.com>
969 * sem_warn.adb (Check_One_Unit): if the only mention of a withed unit
970 is a renaming declaration in the private part of a package, do not emit
971 a warning that the with_clause could be moved because the renaming may
972 be used in the body or in a child unit.
974 2011-08-03 Hristian Kirtchev <kirtchev@adacore.com>
976 * exp_ch6.adb (Make_Build_In_Place_Call_In_Object_Declaration):
977 Propagate the Comes_From_Source attribute from the original return
978 object to the renaming.
980 2011-08-03 Jose Ruiz <ruiz@adacore.com>
982 * exp_ch7.adb (Build_Raise_Statement): Do not call
983 Raise_From_Controlled_Operation when this routine is not present in
984 the run-time library.
985 (Cleanup_Protected_Object, Cleanup_Task): For restricted run-time
986 libraries (Ravenscar), tasks are non-terminating, and protected objects
987 and tasks can only appear at library level, so we do not want
988 finalization of protected objects nor tasks.
989 * exp_intr.adb: Minor clarification in comment.
990 bindgen.adb (Gen_Adainit_Ada, Gen_Main_C, Gen_Output_File_Ada,
991 Gen_Output_File_C): Remove references to finalization of library-level
992 objects when using restricted run-time libraries.
994 2011-08-03 Ed Schonberg <schonberg@adacore.com>
996 * sem_ch3.adb (Build_Discriminant_Constraints): Set
997 Original_Discriminant only if the parent type is a generic formal.
999 2011-08-03 Hristian Kirtchev <kirtchev@adacore.com>
1001 * exp_ch13.adb: Add with and use clause for Targparm;
1002 (Expand_N_Free_Statement): Prevent the generation of a custom
1003 Deallocate on .NET/JVM targets since this requires pools and address
1005 * exp_ch4.adb (Expand_Allocator_Expression): When compiling for
1006 .NET/JVM targets, attach the newly allocated object to the access
1007 type's finalization collection. Do not generate a call to
1008 Set_Finalize_Address_Ptr on .NET/JVM because this routine does not
1009 exist in the runtime.
1010 (Expand_N_Allocator): When compiling for .NET/JVM targets, do not
1011 create a custom Allocate for object that do not require initialization.
1012 Attach a newly allocated object to the access type's finalization
1013 collection on .NET/JVM.
1014 * exp_ch5.adb (Make_Tag_Ctrl_Assignment): Add special processing for
1015 assignment of controlled types on .NET/JVM. The two hidden pointers
1016 Prev and Next and stored and later restored after the assignment takes
1018 * exp_ch6.adb (Expand_Call): Add local constant Curr_S. Add specialized
1019 kludge for .NET/JVM to recognize a particular piece of code coming from
1020 Heap_Management and change the call to Finalize into Deep_Finalize.
1021 * exp_ch7.adb (Build_Finalization_Collection): Allow the creation of
1022 finalization collections on .NET/JVM only for types derived from
1023 Controlled. Separate the association of storage pools with a collection
1024 and only allow it on non-.NET/JVM targets.
1025 (Make_Attach_Call): New routine.
1026 (Make_Detach_Call): New routine.
1027 (Process_Object_Declarations): Suppress the generation of
1028 build-in-place return object clean up code on .NET/JVM since it uses
1030 * exp_ch7.ads (Make_Attach_Call): New routine.
1031 (Make_Detach_Call): New routine.
1032 * exp_intr.adb Add with and use clause for Targparm.
1033 (Expand_Unc_Deallocation): Detach a controlled object from a collection
1034 on .NET/JVM targets.
1035 * rtsfind.ads: Add entries RE_Attach, RE_Detach and
1036 RE_Root_Controlled_Ptr to tables RE_Id and RE_Unit_Table.
1037 * snames.ads-tmpl: Add name Name_Prev. Move Name_Prev to the special
1038 names used in finalization.
1040 2011-08-03 Hristian Kirtchev <kirtchev@adacore.com>
1042 * a-fihema.adb: Add with and use clauses for System.Soft_Links.
1043 (Attach, Detach): Lock the current task when chaining an object onto a
1046 2011-08-03 Hristian Kirtchev <kirtchev@adacore.com>
1048 * a-except.adb, a-except-2005.adb (Raise_From_Controlled_Operation):
1049 Rewritten to create the message strings when the exception is not
1050 raised by an abort during finalization.
1051 * a-except.ads, a-except-2005.ads: Add pragma Export for procedure
1052 Raise_From_Controlled_Operation and update its associated comment.
1053 * a-fihema.ads, a-fihema.adb: New GNAT unit.
1054 Ada.Finalization.Heap_Management provides key functionality
1055 associated with controlled objects on the heap, their creation,
1056 finalization and reclamation. Type Finalization_Collection is
1057 effectively a wrapper which sits ontop of a storage pool and performs
1058 all necessary bookkeeping for all the objects it contains. Each
1059 access-to-controlled or access-to-class-wide type receives a collection
1060 as part of its expansion. The compiler generates buffer code and
1061 invokes Allocate / Deallocate to create and destroy allocated
1063 * a-finali.adb ("="): Removed.
1064 * a-finali.ads ("="): Removed. Controlled types no longer carry hidden
1065 fields Prev and Next.
1066 * ali.adb (Scan_ALI): Add parsing code to process PF / Has_Finalizer.
1067 A library unit with at least one controlled object on the library level
1068 has a special finalizer which is invoked by the binder. To signal this,
1069 ali files carry field PF.
1070 * ali.ads: New field in type Unit_Record called Has_Finalizer. Add
1071 associated comment on field usage.
1072 * a-tags.adb (Get_RC_Offset): Removed.
1073 (Needs_Finalization): New routine.
1074 * a-tags.ads: Update the structure of the GNAT dispatch tables.
1075 Dispatch tables now carry field Needs_Finalization which provides
1076 runtime indication whether a type is controlled or has controlled
1077 components or both. Remove field RC_Offset.
1078 (Get_RC_Offset): Removed along with its associated pragma Export.
1079 Since tagged types with controlled components no longer carry hidden
1080 field _controller, the special mechanism to retrieve its location is no
1082 (Needs_Finalization): New routine.
1083 * atree.ads, atree.adb (Elist24): New routine.
1084 (Set_Elist24): New routine.
1085 * atree.h: Add a define clause for Elist24.
1086 * bindgen.adb New library-level variable Lib_Final_Built.
1087 (Gen_Adafinal_Ada): Reimplemented. Depending on the restrictions or the
1088 presence of a VM target, the routine generates calls to the proper
1089 library finalization routine.
1090 (Gen_Adainit_Ada): Import Finalize_Library_Objects only on non-VM
1091 targets. Set the correct library finalization routine depending on
1092 whether the library has controlled objects or this is a VM compilation.
1093 (Gen_Finalize_Library_Ada): New routine. This procedure generates calls
1094 to library-level finalizers of compiled units in reverse order of
1095 elaboration. It also produces exception management code and reraises a
1096 potential exception after all units have been finalized.
1097 (Gen_Finalize_Library_C): New routine. This procedure generates calls to
1098 library-level finalizers of compiled units in reverse order of
1100 (Gen_Finalize_Library_Defs_C): New routine. This procedure generates the
1101 definitions of all library-level finalizers available to the compilation
1102 (Gen_Main_Ada): Directly call Adafinal which now contails all target
1104 (Gen_Main_C): Add new local constant Needs_Library_Finalization. Call
1105 System.Standard_Library.Adafinal directly. If the library needs
1106 finalization actions, create the sequence of finalization calls.
1107 (Gen_Output_File_Ada): Alphabetize local variables and constants.
1108 Generate a with clause for System.Soft_Links when compiling for a VM.
1109 Remove the code which imports System.Standard_Library.Adafinal as
1110 Do_Finalize. Generate the library finalization routine.
1111 (Gen_Output_File_C): Add new local constant Needs_Library_Finalization.
1112 If the library needs finalization actions, create all the definitions
1113 of library- level finalizers.
1114 (Has_Finalizer): New routine. Determines whether at least one compiled
1115 unit has a library-level finalizer.
1116 Add type Qualification_Mode.
1117 (Set_Unit_Name): Add a formal which controls the replacement of a dot.
1118 * einfo.adb: New usage of field 15 as Return_Flag.
1119 Remove Finalization_Chain_Entity from the usages of field 19.
1120 Remove Associated_Final_Chain from the usages of field 23.
1121 New usage of field 23 as Associated_Collection.
1122 New usage of field 24 as Finalizer.
1123 New usage of flag 252 as Is_Processed_Transient.
1124 (Associated_Final_Chain): Removed.
1125 (Associated_Collection): New routine.
1126 (Finalization_Chain_Entity): Removed.
1127 (Finalizer): New routine.
1128 (Is_Finalizer): New routine.
1129 (Is_Processed_Transient): New routine.
1130 (Return_Flag): New routine.
1131 (Set_Associated_Final_Chain): Removed.
1132 (Set_Associated_Collection): New routine.
1133 (Set_Finalization_Chain_Entity): Removed.
1134 (Set_Finalizer): New routine.
1135 (Set_Is_Processed_Transient): New routine.
1136 (Set_Return_Flag): New routine.
1137 (Write_Entity_Flags): Include Is_Processed_Transient to the list of
1139 (Write_Field8_Name): Alphabetize the output.
1140 (Write_Field11_Name): Alphabetize the output.
1141 (Write_Field12_Name): Alphabetize the output.
1142 (Write_Field13_Name): Alphabetize the output.
1143 (Write_Field14_Name): Alphabetize the output.
1144 (Write_Field15_Name): Alphabetize the output.
1145 (Write_Field16_Name): Alphabetize the output.
1146 (Write_Field17_Name): Alphabetize the output.
1147 (Write_Field18_Name): Alphabetize the output.
1148 (Write_Field19_Name): Alphabetize the output. Remove the output of
1149 Finalization_Chain_Entity.
1150 (Write_Field20_Name): Alphabetize the output.
1151 (Write_Field21_Name): Alphabetize the output.
1152 (Write_Field22_Name): Alphabetize the output.
1153 (Write_Field23_Name): Alphabetize the output. Remove the output of
1154 Associated_Final_Chain. Add output for Associated_Collection.
1155 (Write_Field24_Name): Alphabetize the output.
1156 (Write_Field25_Name): Add output for Finalizer.
1157 (Write_Field26_Name): Alphabetize the output.
1158 (Write_Field27_Name): Alphabetize the output.
1159 (Write_Field28_Name): Alphabetize the output.
1160 * einfo.ads: Add new field description for Associated_Collection and
1162 Remove Associated_Final_Chain and its uses in nodes.
1163 Remove Finalization_Chain_Entity and its uses in nodes.
1164 Add new field description for Finalizer and its uses in nodes.
1165 Add new synthesized attribute Is_Finalizer.
1166 Add new flag description for Is_Processed_Transient and its uses in
1168 Add new field description for Return_Flag and its uses in nodes.
1169 (Associated_Final_Chain): Removed along with its pragma Inline.
1170 (Associated_Collection): New routine and pragma Inline.
1171 (Finalization_Chain_Entity): Removed along with its pragma Inline.
1172 (Finalizer): New routine and pragma Inline.
1173 (Is_Finalizer): New routine and pragma Inline.
1174 (Is_Processed_Transient): New routine and pragma Inline.
1175 (Return_Flag): New routine and pragma Inline.
1176 (Set_Associated_Final_Chain): Removed along with its pragma Inline.
1177 (Set_Associated_Collection): New routine and pragma Inline.
1178 (Set_Finalization_Chain_Entity): Removed along with its pragma Inline.
1179 (Set_Finalizer): New routine and pragma Inline.
1180 (Set_Is_Processed_Transient): New routine and pragma Inline.
1181 (Set_Return_Flag): New routine and pragma Inline.
1182 * exp_aggr.adb: Alphabetize subprograms.
1183 (Build_Array_Aggr_Code): Remove formal Flist and its associated comment.
1184 (Build_Record_Aggr_Code): Remove formals Flist and Obj along with their
1185 associated comments. Remove local variables External_Final_List and
1187 Rename Ctrl_Stuff_Done to Finalization_Done. Rename local variable A to
1188 Ancestor. Remove the retrieval of finalization lists. Update the call to
1190 (Convert_Aggr_In_Allocator): Remove the retrieval of finalization
1191 lists. Update the call to Late_Expansion.
1192 (Convert_Aggr_In_Assignment): Update the call to Late_Expansion.
1193 (Convert_Aggr_In_Object_Decl): Update the call to Late_Expansion.
1194 (Gen_Assign): Remove the retrieval of the finalization list used to
1195 build the assignment. Update the calls to Make_Init_Call and
1197 (Gen_Ctrl_Actions_For_Aggr): Renamed to Generate_Finalization_Actions.
1198 Remove the mechanism to determine attachment levels and finalization
1199 list retrieval. Remove the processing for coextensions.
1200 (Init_Controller): Removed. Controllers no longer exist.
1201 (Late_Expansion): Remove formals Flist and Obj along with their
1202 associated comments. Update the calls to Build_Record_Aggr_Code and
1203 Build_Array_Aggr_Code.
1204 * exp_ch13.adb (Expand_N_Free_Statement): New routine.
1205 (Expand_N_Freeze_Entity): Add special processing for finalizers which
1206 appear in entry bodies, protected subprograms and task bodies.
1207 * exp_ch13.ads (Expand_N_Free_Statement): New routine.
1208 * exp_ch3.adb (Add_Final_Chain): Removed.
1209 (Build_Array_Init_Proc): Alphabetize local variables.
1210 (Build_Assignment): Alphabetize local variables. Update the call to
1212 (Build_Class_Wide_Master): Rename local variables to better reflect
1214 (Build_Discriminant_Assignments): Code reformatting.
1215 (Build_Init_Call_Thru): Code reformatting.
1216 (Build_Init_Procedure): Code reformatting. Generate a special version
1217 of Deep_Finalize which is capable of finalizing all initialized
1218 components and ignore the rest.
1219 (Build_Init_Statements): Rename local variables to better reflect their
1221 Reimplement the mechanism to include the creation and update of an index
1222 variable called a "counter". It is used as a bookmark for tracing
1223 initialized and non-initialized components.
1224 (Build_Initialization_Call): Remove local variable Controller_Typ.
1225 Alphabetize all local variables. Remove the initialization of the
1226 record controller and update the call to Make_Init_Call.
1227 (Build_Record_Init_Proc): Rename formal Pe to Rec_Ent.
1228 New local variable Counter.
1229 (Constrain_Array): Alphabetize.
1230 (Expand_Freeze_Array_Type): Create a collection instead of a
1232 (Expand_Freeze_Class_Wide_Type): New routine. Creates TSS primitive
1233 Finalize_Address which is used in conjunction with allocated controlled
1235 (Expand_N_Object_Declaration): Remove the creation of a finalization
1236 list for anonymous access types. Update the calls to Make_Init_Call and
1238 (Expand_Freeze_Record_Type): Remove local variable Flist. Remove the
1239 retrieval of finalization lists. Remove the expansion of the record
1240 controller. Create TSS primitive Finalize_Address used in conjunction
1241 with controlled objects on the heap. Create finalization collections
1242 for access-to-controlled record components.
1243 (Expand_Record_Controller): Removed.
1244 (Freeze_Type): Remove the freezing of record controllers. Freezing of
1245 class-wide types now requires additional processing. Create
1246 finalization collections for access-to-controlled types.
1247 (Increment_Counter): New routine.
1248 (Make_Counter): New routine.
1249 (Make_Eq_If): Remove the mention of Name_uController.
1250 (Make_Predefined_Primitive_Specs): There is no longer need to skip
1251 types coming from System.Finalization_Root.
1252 (Predef_Deep_Spec): Reimplemented to reflect the new parameter profiles.
1253 (Predefined_Primitive_Bodies): There is no longer need to skip types
1254 coming from System.Finalization_Root.
1255 (Stream_Operation_OK): Do not generate stream routines for
1256 type Ada.Finalization.Heap_Management.Finalization_Collection.
1257 * exp_ch3.ads: Alphabetize subprograms.
1258 * exp_ch4.adb: Remove with and use clause for Sem_Ch8.
1259 Add with and use clause for Lib.
1260 (Complete_Coextension_Finalization): Removed.
1261 (Complete_Controlled_Allocation): New routine. Create a finalization
1262 collection for anonymous access-to-controlled types. Create a custom
1263 Allocate which interfaces with the back end and the machinery in
1265 (Expand_Allocator_Expression): Add necessary calls to
1266 Complete_Controlled_Allocation. Remove the retrieval of finalization
1267 lists. Update the calls to Make_Adjust_Call. Generate a call to
1268 Ada.Finalization.Heap_Management.Set_Finalize_Address_Ptr to decorate
1269 the associated collection.
1270 (Expand_N_Allocator): Remove the processing for dynamic coextensions.
1271 Code clean up. Remove the retrieval of finalization lists and
1273 Update the call to Make_Init_Call. Generate a call to
1274 Ada.Finalization.Heap_Management.Set_Finalize_Address_Ptr to decorate
1275 the associated collection.
1276 (Get_Allocator_Final_List): Removed. Finalization lists are not
1278 (Suitable_Element): Remove the mention of Name_uController.
1279 * exp_ch5.adb: Remove with and use clauses for Ttypes and Uintp.
1280 (Make_Tag_Ctrl_Assignment): Rewritten to simply do a finalization of
1281 the left hand side, carry out the assignment and adjust the left hand
1283 * exp_ch6.adb (Add_Final_List_Actual_To_Build_In_Place_Call): Removed.
1284 (Add_Collection_Actual_To_Build_In_Place_Call): New routine.
1285 (BIP_Formal_Suffix): Rename BIP_Final_List and BIPfinallist to
1286 BIP_Collection and BIPcollection.
1287 (Build_Heap_Allocator): New routine used to allocate the return object
1288 of a build-in-place function onto a collection.
1289 (Expand_Ctrl_Function_Call): Moved from Exp_Ch7.
1290 (Expand_Call): Do not replace direct calls to Deep routines with their
1292 (Expand_N_Extended_Return_Statement): Give all variables shorter names
1293 and update their occurrences. Add a special return flag to monitor the
1294 [ab]normal execution of the function. The flag is set right before the
1296 Rewrite the mechanism used to allocate a build-in-place return object
1297 on the heap or on a storage pool.
1298 (Is_Direct_Deep_Call): New routine.
1299 (Make_Build_In_Place_Call_In_Allocator): Add a collection to a
1300 build-in-place function call instead of a final list. Build a call to
1301 Set_Finalize_Address_Ptr to decorate the associated collection.
1302 (Make_Build_In_Place_Call_In_Anonymous_Context): Create a temporary in
1303 order to name the build-in-place function call's result for later
1304 finalization. Add a collection to a build-in-place function call
1305 instead of a final list.
1306 (Make_Build_In_Place_Call_In_Assignment): Add a collection to a
1307 build-in-place function call instead of a final list. Remove the code
1308 which moves one final list and transforms it into the actual in a
1309 nested build-in-place call.
1310 (Make_Build_In_Place_Call_In_Object_Declaration): Add a collection to a
1311 build-in-place function call instead of a final list.
1312 (Move_Final_List): Removed.
1313 (Needs_BIP_Collection): New routine.
1314 (Needs_BIP_Final_List): Removed.
1315 * exp_ch6.ads: Replace BIP_Final_List with BIP_Collection in
1316 enumeration type BIP_Formal_Kind.
1317 Update the related comment.
1318 (Needs_BIP_Collection): New routine.
1319 (Needs_BIP_Final_List): Removed.
1320 * exp_ch7.adb: Add with and use clauses for Elists, Exp_Ch6, Stringt
1321 and Ttypes. Remove with and use clauses for Sem_Type. Alphabetize the
1322 majority of subprograms in this unit. Add Name_Finalize_Address to
1323 array Name_Of and TSS_Finalize_Address to array Deep_Name_Of.
1324 (Build_Adjust_Or_Finalize_Statements): Create the adjust or finalization
1325 statements for an array type.
1326 (Build_Adjust_Statements): Create the adjust statements for a record
1328 (Build_Cleanup_Statements): New routine. A procedure which given any
1329 construct containing asynchronous calls, references to _master, or is a
1330 task body, a task allocation or a protected body produces the necessary
1331 runtime calls to clean up these constructs.
1332 (Build_Exception_Handler): New routine.
1333 (Build_Final_List): Removed.
1334 (Build_Finalization_Collection): New routine. A core procedure which
1335 creates a collection to service heap allocated controlled objects
1336 associated with an access-to-controlled type.
1337 (Build_Finalize_Statements): Create the finalization statements for a
1339 (Build_Finalizer): New routine. A core procedure which given any
1340 construct with declarations and/or statements detects all objects which
1341 need any type of clean up (controlled objects, protected objects) and
1342 generates all necessary code to clean up the said objects in the proper
1344 (Build_Finalizer_Call): New routine.
1345 (Build_Initialize_Statements): Create the initialization statements for
1346 an array type. The generated routine contains code to finalize partially
1348 (Build_Object_Declarations): New routine.
1349 (Build_Raise_Statement): New routine.
1350 (Clean_Simple_Protected_Objects): Removed.
1351 (Controller_Component): Removed.
1352 (Enclosing_Function): New routine.
1353 (Expand_Cleanup_Actions): Create a finalizer for a construct which has
1354 either declarations or statements or both.
1355 (Expand_N_Package_Body): Create a finalizer for a non-generic package.
1356 (Expand_N_Package_Declaration): Create a finalizer for a non-generic
1358 (Find_Final_List): Removed.
1359 (Global_Flist_Ref): Removed.
1360 (In_Finalization_Root): Removed.
1361 (Insert_Actions_In_Scope_Around): Determine the range of the transient
1362 scope in terms of tree nodes. Process all transient variables within
1364 (Make_Adjust_Call): Rewritten. There is no longer an attach call
1365 generated after the adjust.
1366 (Make_Attach_Call): Removed.
1367 (Make_Call): New routine.
1368 (Make_Clean): Removed.
1369 (Make_Deep_Array_Body): Rewritten to simply invoke the appropriate
1371 (Make_Deep_Proc): Rewritten to generate the new profile signature used
1373 (Make_Deep_Record_Body): Rewritten to simply invoke the appropriate
1375 (Make_Final_Call): Modified to simply create a call to either
1376 Deep_Finalize or Finalize.
1377 (Make_Finalize_Address_Body): New routine.
1378 (Make_Finalize_Address_Stmts): New routine. A function which produces
1379 TSS primitive Finalize_Address used in conjunction with heap allocated
1381 (Make_Handler_For_Ctrl_Operation): Add specialized code for .NET/JVM.
1382 (Make_Init_Call): Rewritten. There is no longer an attach call
1383 generated after initialization.
1384 (Make_Local_Deep_Finalize): New routine.
1385 (Make_Set_Finalize_Address_Ptr_Call): New routine.
1386 (Make_Transient_Block): Remove the finalization list retrieval and
1388 (Needs_Finalization): Moved to Exp_Util.
1389 (Parent_Field_Type): New routine.
1390 (Preprocess_Components): New routine.
1391 (Process_Transient_Objects): New routine.
1392 (Wrap_HSS_In_Block): New routine.
1393 (Wrap_Transient_Declaration): Remove finalization list management and
1394 controller insertion.
1395 (Wrap_Transient_Expression): Code reformatting.
1396 (Wrap_Transient_Statement): Code reformatting.
1397 * exp_ch7.ads (Build_Final_List): Removed.
1398 (Build_Finalization_Collection): New routine.
1399 (Build_Raise_Statement): New routine.
1400 (Controller_Component): Removed.
1401 (Expand_Ctrl_Function_Call): Moved to Exp_Ch6.
1402 (Find_Final_List): Removed.
1403 (In_Finalization_Root): Removed.
1404 (Is_Simple_Protected_Type): Update related comment.
1405 (Make_Adjust_Call): New parameter profile and associated comments.
1406 (Make_Attach_Call): Removed.
1407 (Make_Final_Call): New parameter profile and associated comments.
1408 (Make_Finalize_Address_Body): New routine.
1409 (Make_Init_Call): New parameter profile and associated comments.
1410 (Make_Local_Deep_Finalize): New routine.
1411 (Make_Set_Finalize_Address_Ptr_Call): New routine.
1412 (Needs_Finalization): Moved to Exp_Util.
1413 * exp_ch9.adb (Add_Object_Pointer): Code reformatting.
1414 (Expand_N_Protected_Body): Remove the handling of finalization lists.
1415 (Find_Protection_Type): Moved to Exp_Util.
1416 * exp_disp.adb: Remove with and use clauses for Exp_Ch7.
1417 (Make_DT): Update sequence of dispatch table initialization. Remove the
1418 initialization of field RC_Offset. Add initialization of field Needs_
1420 * exp_intr.adb (Expand_Unc_Deallocation): Code reformatting.
1421 Reimplement how an object is first finalized, then deallocated.
1422 * exp_strm.adb (Build_Record_Or_Elementary_Input_Function):
1424 * exp_tss.ads: Add special suffix for TSS primitive Finalize_Address.
1425 Register TSS_Finalize_Address with type TSS_Names.
1426 * exp_util.adb (Build_Allocate_Deallocate_Proc): New routine. This core
1427 procedure provides the interface between an allocation / deallocation
1428 and the support machinery in Ada.Finalization.Heap_Management.
1429 (Find_Init_Call): Code reformatting.
1430 (Find_Init_Call_In_List): Code reformatting.
1431 (Find_Protection_Type): Moved from Exp_Ch9.
1432 (Find_Prim_Op): Reimplement to add preference of recovered primitive.
1433 (Has_Controlled_Coextensions): Removed.
1434 (Has_Controlled_Objects): New routine.
1435 (In_Library_Level_Package_Body): New routine.
1436 (Insert_Action_After): New routine.
1437 (Is_Finalizable_Transient): New routine. This predicate determines
1438 whether an object declaration is one of the many variants of controlled
1440 (Is_Null_Access_BIP_Func_Call): New routine.
1441 (Is_Non_BIP_Func_Call): New routine.
1442 (Is_Related_To_Func_Return): New routine.
1443 (Needs_Finalization): Moved from Exp_Ch7.
1444 * exp_util.ads (Build_Allocate_Deallocate_Proc): New routine.
1445 (Find_Protection_Type): Moved from Exp_Ch9.
1446 (Has_Controlled_Coextensions): Removed.
1447 (Has_Controlled_Objects): New routine.
1448 (In_Library_Level_Package_Body): New routine.
1449 (Insert_Action_After): New routine.
1450 (Is_Finalizable_Transient): New routine.
1451 (Is_Null_Access_BIP_Func_Call): New routine.
1452 (Is_Non_BIP_Func_Call): New routine.
1453 (Is_Related_To_Func_Return): New routine.
1454 (Needs_Finalization): Moved from Exp_ch7.
1455 * expander.adb (Expand): Add a case for N_Free_Statement.
1456 * freeze.adb (Freeze_All): Replace the generation of a finalization
1457 list with a collection for access-to-controlled types.
1458 (Freeze_Entity): Code reformatting.
1459 (Freeze_Record_Type): Remove the freezing of a record controller
1461 (Freeze_Subprogram): Code reformatting.
1462 * inline.adb (Cleanup_Scopes): Remove the reset of the scope
1464 * lib-writ.adb (Write_Unit_Information): Output "PF" when a package
1465 has a library-level finalizer.
1466 * lib-writ.ads: Add "PF" to the sequence of unit attributes.
1467 * a-filico.ads, a-filico.adb, s-finimp.ads, s-finimp.adb: Removed.
1468 * Makefile.rtl: Remove a-filico and s-finimp from the list of object
1469 files. Add a-fihema to the list of object files.
1471 Alphabetize the associations in type Is_Parameterless_Attribute.
1472 * rtsfind.ads: Ada.Finalization_List.Controller and
1473 System.Finalization_Implementation are no longer a GNAT unit.
1474 Update the range of type Ada_Finalization_Child. Remove the following
1475 recoverable entities:
1477 RE_Attach_To_Final_List
1481 RE_Finalizable_Ptr_Ptr
1482 RE_Global_Final_List
1483 RE_Limited_Record_Controller
1486 RE_Record_Controller
1487 RE_Simple_List_Controller
1489 Add the following recoverable entities:
1491 RE_Add_Offset_To_Address
1495 RE_Exception_Identity
1496 RE_Finalization_Collection
1497 RE_Finalization_Collection_Ptr
1498 RE_Needs_Finalization
1499 RE_Save_Library_Occurrence
1500 RE_Set_Finalize_Address_Ptr
1501 RE_Set_Storage_Pool_Ptr
1503 * sem_aggr.adb (Resolve_Record_Aggregate): Remove mention of
1505 * sem_aux.adb (First_Discriminant): Remove mention of Name_uController.
1506 (First_Stored_Discriminant): Remove the mention of Name_uController.
1507 * sem_aux.ads: Comment reformatting.
1508 * sem_ch10.adb (Build_Chain): Signal the class-wide creation machinery
1509 to redecorate an already existing class-wide type.
1510 (Decorate_Tagged_Type): New parameter profile and associated comment.
1511 Create a "shadow class-wide type" for a shadow entity.
1512 * sem_ch11.adb (Analyze_Exception_Handlers): Remove the dubious setting
1513 of the final chain along with the associated comment.
1514 * sem_ch3.adb (Access_Type_Declaration): Add new local variable
1515 Full_Desig and set it to the full view of the designated type.
1516 Initialize the finalization collection to empty.
1517 (Build_Derived_Record_Type): Alphabetize local variables. Code
1519 (Collect_Fixed_Components): Remove the mention of Name_uController.
1520 (Create_Constrained_Components): Remove the mention of Name_uController.
1521 (Make_Class_Wide_Type): Add specialized code to redecorate an existing
1522 class-wide type of a shadow entity.
1523 (Process_Full_View): Update the machinery which marks type
1524 Limited_Controlled's entity as limited.
1525 * sem_ch4.adb (Analyze_One_Call): Code reformatting.
1526 * sem_ch6.adb (Create_Extra_Formals): Do not generate a finalization
1527 list, instead make a collection build-in-place formal.
1528 * sem_ch8.adb (Analyze_Object_Renaming): Look at the available view of
1529 a designated type in order to establish a match between the renaming
1530 and the renamed entity.
1531 (Find_Selected_Component): Add guard to prevent spurious exceptions
1532 from being raised on .NET/JVM.
1533 * sem_disp.adb (Check_Dispatching_Operation): Include Finalize_Address
1534 to the list of primitive that need special processing. Update arrays
1535 C_Names and D_Names.
1536 (Replace_Types): Handle class-wide types.
1537 * sem_elab.adb (Check_A_Call): Since Deep_Initialize now has a
1538 different parameter profile, look at the first formal.
1539 * sem_prag.adb: Remove with and use clauses for Exp_Ch7. Add with and
1540 use clauses for Exp_Util.
1541 * sem_res.adb: Remove with and use clauses for Elists.
1542 (Propagate_Coextensions): Removed.
1543 (Resolve_Allocator): Do not propagate the list of coextensions from one
1544 allocator to another.
1545 * sem_util.adb (Build_Actual_Subtype_Of_Component): Rename variable
1546 Deaccessed_T to Desig_Typ.
1547 (Enter_Name): Remove the mention of Name_uController.
1548 (Gather_Components): Remove the mention of Name_uController.
1549 (Incomplete_Or_Private_View): New routine.
1550 (Is_Coextension_Root): Removed.
1551 (Is_Fully_Initialized_Type): Remove the mention of Name_uController.
1552 * sem_util.ads (Incomplete_Or_Private_View): New routine.
1553 (Is_Coextension_Root): Removed.
1554 * s-finroo.ads: Remove with clause for Ada.Unchecked_Conversion.
1555 Controlled types are now derived from a null tagged record. Remove
1556 types Finalizable_Ptr, Finalizable and Empty_Root_Controlled.
1557 * sinfo.adb (Coextensions): Removed.
1558 (Set_Coextensions): Removed.
1559 * sinfo.ads: Remove Coextensions from the explanation of node fields
1560 and its uses in nodes.
1561 Update the field usage of N_Allocator.
1562 (Coextensions): Removed along with its pragma Inline.
1563 (Set_Coextensions): Removed along with its pragma Inline.
1564 * snames.ads-tmpl: Remove names
1569 Name_uLocal_Final_List
1570 Name_Finalization_Root
1577 Name_Finalize_Address
1578 * s-pooglo.adb (Allocate): Add overriding indicator.
1579 (Deallocate): Add overriding indicator.
1580 (Storage_Size): Add overriding indicator.
1581 * s-soflin.adb (Adafinal_NT): Invoke Finalize_Library_Objects rather
1582 than Finalize_Global_List.
1583 (Null_Finalize_Global_List): Removed.
1584 (Save_Library_Occurrence): New routine.
1585 * s-soflin.ads: Remove variable Finalize_Global_List along with its
1586 initialization. Add variable Finalize_Library_Objects along with its
1587 pragma Export. Add variables Library_Exception and
1588 Library_Exception_Set along with their pragma Export.
1589 (Null_Finalize_Global_List): Removed.
1590 (Save_Library_Occurrence): New routine.
1591 * s-tassta.adb (Finalize_Global_Tasks): Call Finalize_Library_Objects
1592 rather than Finalize_Global_List.
1593 * tbuild.adb (Unchecked_Convert_To): Capture and set the parent field
1594 of the constructed node.
1596 2011-08-03 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
1598 * link.c: Include "auto-host.h" before system headers.
1600 2011-08-03 Vincent Celier <celier@adacore.com>
1602 * make.adb (Gnatmake): Add to table Library_Projs only library projects
1603 that are not extended. Do not check if a library project that is
1604 extended should be regenerated. Do not add to table Library_Paths the
1605 libraries that are in extended projects. Link only with libraries that
1606 are in libray projects that are not extended.
1607 * prj-nmsc.adb (Check_Library_Attributes): Do not reset flag Library
1608 for a library project that is extended.
1610 2011-08-03 Gary Dismukes <dismukes@adacore.com>
1612 * sem_ch6.adb (Find_Corresponding_Spec): When in an instance, skip
1613 conforming subprogram renamings that appear to be completions if they
1614 are not fully conformant.
1615 Such renamings are homographs but not completions.
1616 * sem_type.adb (Disambiguate): Handle disambiguation of overloaded
1617 names in a subprogram renaming that appears in an instance.
1619 2011-08-03 Ed Schonberg <schonberg@adacore.com>
1621 * exp_util.adb (Expand_Subtype_From_Expr): if the type is limited but
1622 not immutably limited, build actual subtype from expression to provide
1623 proper bounds to caller.
1625 2011-08-03 Gary Dismukes <dismukes@adacore.com>
1627 * sem_ch8.adb: Minor comment correction.
1629 2011-08-03 Thomas Quinot <quinot@adacore.com>
1631 * exp_strm.adb (Build_Array_Input_Function): In Ada 2005 mode, when
1632 returning a limited array, use an extended return statement.
1634 2011-08-03 Vincent Celier <celier@adacore.com>
1636 * make.adb (Initialize): If --subdirs= is used, but no project file is
1637 specified, attempt to create the specify subdir if it does not already
1638 exist and use it as the object directory as if -D had been specified.
1640 2011-08-03 Arnaud Charlet <charlet@adacore.com>
1642 * s-tpopsp-vms.adb: New file.
1643 * s-taprop-vms.adb: Put back ATCB_Key, since needed by this file on VMS.
1644 * gcc-interfaces/Makefile.in: Use s-taprop-vms.adb on VMS.
1646 2011-08-03 Emmanuel Briot <briot@adacore.com>
1648 * make.adb, makeutl.adb, makeutl.ads, clean.adb (Makeutl.Queue): new
1651 2011-08-03 Yannick Moy <moy@adacore.com>
1653 * cstand.adb (Create_Standard): select Universal_Integer as an ALFA type
1654 * sem_ch3.adb (Array_Type_Declaration): detect array types in ALFA
1655 * sem_util.adb, sem_util.ads (Has_Static_Array_Bounds): new function to
1656 detect that an array has static bounds.
1658 2011-08-03 Thomas Quinot <quinot@adacore.com>
1660 * exp_dist.adb: Minor reformatting.
1662 2011-08-03 Arnaud Charlet <charlet@adacore.com>
1664 * s-taprop-irix.adb, s-taprop-hpux-dce.adb, s-taprop-vms.adb
1665 (ATCB_Key): Removed, not always used.
1667 2011-08-03 Emmanuel Briot <briot@adacore.com>
1669 * gnatcmd.adb, make.adb, prj.adb, prj.ads, makeutl.adb, makeutl.ads,
1670 clean.adb, prj-conf.adb, prj-env.adb, prj-env.ads (Makeutl): remove
1671 most remaining global variables.
1673 2011-08-03 Robert Dewar <dewar@adacore.com>
1675 * gnatcmd.adb, prj-proc.adb, mlib-prj.adb, prj.adb, makeutl.ads,
1676 prj-util.adb, prj-util.ads, prj-conf.adb, prj-env.adb: Minor
1679 2011-08-03 Javier Miranda <miranda@adacore.com>
1681 * exp_util.adb (Is_VM_By_Copy_Actual): Include N_Slide nodes as actuals
1682 that must be passed by copy in VM targets.
1684 2011-08-03 Emmanuel Briot <briot@adacore.com>
1686 * prj.ads, prj-nmsc.adb (Files_Htable): removed this htable, which
1687 duplicates a similar htable now in the project tree.
1689 2011-08-03 Claire Dross <dross@adacore.com>
1691 * a-cfdlli.adb, a-cfhama.adb, a-cfhase.adb, a-cforma.adb, a-cforse.adb,
1692 a-cofove.adb ("=", Length, Is_Empty, Clear, Assign, Copy, Element,
1693 Replace_Element, Query_Element, Update_Element, Move, Insert, Prepend,
1694 Append, Delete, Delete_First, Delete_Last, Reverse_Element, Swap,
1695 Splice, First, First_Element, Last, Last_Element, Next, Previous, Find,
1696 Reverse_Find, Contains, Has_Element, Iterate, Reverse_Iterate, Capacity,
1697 Reserve_Length, Length, Strict_Equal, Left, Right): Data-structure
1700 2011-08-03 Arnaud Charlet <charlet@adacore.com>
1702 * s-taprop-posix.adb, s-taprop-linux.adb, s-taprop-tru64.adb
1703 (ATCB_Key): Removed, not always used.
1704 * s-tpopsp-posix.adb, s-tpopsp-posix-foreign.adb (ATCB_Key): Moved from
1706 * s-tpopsp-tls.adb: New file.
1707 * gcc-interface/Makefile.in: Use TLS implementation of s-tpopsp.adb on
1708 x86/x64/ia64/powerpc/sparc Linux.
1710 2011-08-03 Arnaud Charlet <charlet@adacore.com>
1712 * system-aix.ads, system-aix64.ads: Set ZCX_By_Default to True.
1713 * gcc-interface/Makefile.in: Switch to ZCX by default on AIX ports.
1715 2011-08-03 Thomas Quinot <quinot@adacore.com>
1717 * rtsfind.ads, exp_dist.adb, exp_dist.ads
1718 (Build_From_Any_Call, Build_To_Any_Call, Build_TypeCode_Call):
1719 Fix type selection for mapping integer types to PolyORB types.
1721 2011-08-03 Bob Duff <duff@adacore.com>
1723 * sem_ch7.adb: Minor comment clarification.
1725 2011-08-03 Bob Duff <duff@adacore.com>
1727 * sem_ch13.adb (Analyze_Enumeration_Representation_Clause): If we get
1728 an error analyzing a choice, skip further processing. Further
1729 processing could cause a crash or cascade errors.
1731 2011-08-03 Emmanuel Briot <briot@adacore.com>
1733 * gnatcmd.adb, prj-proc.adb, prj-proc.ads, make.adb, mlib-prj.adb,
1734 prj.adb, prj.ads, makeutl.adb, makeutl.ads, clean.adb, prj-nmsc.adb,
1735 prj-util.adb, prj-util.ads, prj-conf.adb, prj-conf.ads, prj-env.adb,
1736 prj-env.ads (Shared_Project_Tree_Data): new type
1737 An aggregate project and its aggregated trees need to share the common
1738 data structures used for lists of strings, packages,... This makes the
1739 code simpler since otherwise we have to pass the root tree (also used
1740 for the configuration file data) in addition to the current project
1741 tree. This also avoids ambiguities as to which tree should be used.
1742 And finally this saves a bit of memory.
1743 (For_Every_Project_Imported): new parameter Tree.
1744 Since aggregated projects are using a different tree, we need to let
1745 the caller know which tree to use to manipulate the returned project.
1747 2011-08-03 Robert Dewar <dewar@adacore.com>
1749 * prj-proc.adb, exp_util.ads, exp_ch9.adb, make.adb, prj-ext.adb,
1750 prj-ext.ads, alfa.ads, sem_ch4.adb, makeutl.adb, makeutl.ads,
1751 lib-xref-alfa.adb, sem_cat.adb, exp_dist.adb, get_alfa.adb,
1752 prj-env.adb, prj-env.ads, prj-tree.adb, alfa.ads: Minor reformatting.
1754 2011-08-03 Javier Miranda <miranda@adacore.com>
1756 * exp_util.adb, sem_aux.adb, exp_util.ads, sem_aux.ads:
1757 Move routine Is_VM_By_Copy_Actual from sem_aux to exp_util.
1759 2011-08-03 Bob Duff <duff@adacore.com>
1761 * sem_ch8.adb (Is_Primitive_Operator_In_Use): Always check In_Use on
1764 2011-08-03 Joel Brobecker <brobecker@adacore.com brobecker>
1766 * g-sha256.ads, g-sha512.ads, g-sha1.ads, g-sha224.ads, g-sha384.ads,
1767 g-sehash.ads: Fix typo. Update header.
1769 2011-08-03 Thomas Quinot <quinot@adacore.com>
1771 * exp_ch6.adb (Expand_Actuals): Remove Ada_2005 guard on build-in-place
1774 2011-08-03 Gary Dismukes <dismukes@adacore.com>
1776 * sem_ch4.adb (Analyze_Overloaded_Selected_Component): Consider
1777 prefixes of private types along with records, since the selector may be
1779 * sem_res.adb (Resolve_Selected_Component): Consider prefixes of
1780 private types along with records, since the selector may be a
1783 2011-08-03 Emmanuel Briot <briot@adacore.com>
1785 * prj-pp.adb (Pretty_Print): remove trailing blank line in the file
1787 2011-08-03 Javier Miranda <miranda@adacore.com>
1789 * sem_aux.adb (Is_VM_By_Copy_Actual): Fix wrong use of
1790 Tagged_Type_Expansion.
1792 2011-08-03 Yannick Moy <moy@adacore.com>
1795 (Resolve_Op_Concat_Arg): do not issue a SPARK violation when argument of
1796 concatenation is the name of a constant
1798 2011-08-03 Emmanuel Briot <briot@adacore.com>
1800 * prj-proc.adb, prj-ext.adb, prj-ext.ads, prj-env.adb, prj-env.ads,
1801 prj-tree.adb, prj-tree.ads (Initialize_And_Copy, Copy): new subprograms
1802 (Process_Declarative_Items): new parameter Child_Env.
1804 2011-08-03 Yannick Moy <moy@adacore.com>
1806 * alfa.ads Update format of ALFA section in ALI file in order to add a
1807 mapping from bodies to specs when both are present
1808 (ALFA_Scope_Record): add components for spec file/scope
1809 * get_alfa.adb (Get_ALFA): read the new file/scope for spec when present
1811 (Collect_ALFA): after all scopes have been collected, fill in the spec
1812 information when relevant
1813 * put_alfa.adb (Put_ALFA): write the new file/scope for spec when
1816 2011-08-03 Eric Botcazou <ebotcazou@adacore.com>
1818 * inline.adb (Add_Inlined_Subprogram): Do not consider the enclosing
1819 code unit to decide whether to add internally generated subprograms.
1821 2011-08-03 Javier Miranda <miranda@adacore.com>
1823 * sem_aux.ads, sem_aux.adb (Is_VM_By_Copy_Actual): New subprogram.
1825 (Build_Simple_Entry_Call): Handle actuals that must be handled by copy
1828 2011-08-03 Emmanuel Briot <briot@adacore.com>
1830 * make.adb, makeutl.adb, makeutl.ads (Make.Switches_Of): now shares
1831 code with Makeutl.Get_Switches.
1832 * prj-tree.adb: Update comment.
1834 2011-08-03 Thomas Quinot <quinot@adacore.com>
1836 * sem_cat.adb (Validate_RCI_Subprogram_Declaration): Reject a remote
1837 subprogram with a limited formal that does not support external
1840 2011-08-03 Yannick Moy <moy@adacore.com>
1842 * get_alfa.adb (Get_ALFA): add missing Skip_Spaces at start of
1844 * lib-xref-alfa.adb (Add_ALFA_File): split removal of scopes that are
1845 not from current unit in two phases, because it is not possible to
1846 change the table while iterating over its content.
1847 * put_alfa.adb (Put_ALFA): reset current file/scope at each new entity
1849 2011-08-03 Sergey Rybin <rybin@adacore.com>
1851 * vms_data.ads: Add qualifier for gnatmetric --no-static-loop option
1852 * gnat_ugn.texi: Update description of complexity metrics (gnatmetric)
1854 2011-08-03 Ed Schonberg <schonberg@adacore.com>
1856 * sem_res.adb (Resolve_Op_Concat_Arg): if the argument is an aggregate
1857 and the component type is composite, this is ambiguous for predefined
1858 concatenation, but if the node is not overloaded and the entity is a use
1859 -defined function its profile can be used to resolve that aggregate.
1861 2011-08-03 Robert Dewar <dewar@adacore.com>
1863 * exp_ch4.adb: Minor code cleanup.
1865 2011-08-03 Thomas Quinot <quinot@adacore.com>
1867 * exp_dist.adb: Do not generate distribution stubs if serious errors
1868 have been diagnosed.
1870 2011-08-03 Ed Schonberg <schonberg@adacore.com>
1872 * sem_ch4.adb (Try_Primitive_Operation): when checking the validity of
1873 the first formal of a primitive operation, go to the base type to
1874 handle properly an access to a derived type with constrained
1876 * sem_type.adb (Disambiguate): an immediately visible operator hides a
1877 user-defined function that is only use-visible.
1879 2011-08-03 Robert Dewar <dewar@adacore.com>
1881 * sem_aggr.adb, sem_ch3.adb, lib.ads, gnatcmd.adb, prj-proc.adb,
1882 make.adb, lib-writ.adb, prj-part.adb, prj-part.ads, prj-ext.adb,
1883 fname-uf.adb, prj-ext.ads, prj.adb, prj.ads, sem_attr.adb, alfa.adb,
1884 prj-makr.adb, errout.adb, makeutl.adb, makeutl.ads, restrict.ads,
1885 sem_ch6.adb, g-pehage.adb, clean.adb, put_alfa.adb, lib-xref-alfa.adb,
1886 prj-nmsc.adb, prj-nmsc.ads, sem_ch8.adb, prj-pars.ads, exp_aggr.adb,
1887 prj-attr.ads, sem_ch13.adb, get_alfa.adb, prj-env.adb, prj-env.ads,
1888 alfa_test.adb, prj-tree.adb, prj-tree.ads, einfo.ads: Minor reformatting
1890 2011-08-03 Robert Dewar <dewar@adacore.com>
1892 * repinfo.adb (List_Mechanism): Add handling of
1893 Convention_Ada_Pass_By_XXX.
1894 * sem_mech.adb (Set_Mechanism): Ditto.
1895 * sem_prag.adb (Process_Convention): Add entries for
1896 Convention_Ada_Pass_By_XXX.
1897 * snames.adb-tmpl, snames.ads-tmpl: Ditto.
1899 2011-08-03 Pascal Obry <obry@adacore.com>
1901 * makeutl.adb: Minor reformatting.
1903 2011-08-03 Vincent Celier <celier@adacore.com>
1906 (Get_File_Name) If the file cannot be found when there are no config
1907 pragmas file and May_Fail is True, return No_File instead of the file
1908 name, to be consistent.
1910 2011-08-03 Pascal Obry <obry@adacore.com>
1912 * adaint.c (__gnat_is_executable_file_attr): Avoid access
1915 2011-08-03 Javier Miranda <miranda@adacore.com>
1918 (Same_Representation): In VM targets the representation of arrays with
1919 aliased components differs from arrays with non-aliased components.
1921 2011-08-03 Emmanuel Briot <briot@adacore.com>
1923 * prj-proc.adb, prj-attr.adb, prj-attr.ads (Get_Attribute_Index): do
1924 not systematically lower case attribute indexes that contain no "."
1925 Fix definition of several Naming attributes, which take
1926 a unit name as index and therefore should be case insensitive.
1927 Minor refactoring (reduce length of variable names).
1929 2011-08-03 Emmanuel Briot <briot@adacore.com>
1931 * makeutl.adb, makeutl.ads (Get_Switches): new subprogram.
1933 2011-08-03 Emmanuel Briot <briot@adacore.com>
1935 * gnatcmd.adb, prj-proc.adb, prj-proc.ads, make.adb, prj-part.adb,
1936 prj-part.ads, switch-m.adb, switch-m.ads, prj-makr.adb, clean.adb,
1937 prj-pars.adb, prj-pars.ads, prj-conf.adb, prj-conf.ads, prj-tree.adb,
1938 prj-tree.ads (Prj.Tree.Environment): new type.
1940 2011-08-03 Emmanuel Briot <briot@adacore.com>
1942 * prj-proc.adb, prj.ads, makeutl.adb, makeutl.ads, prj-conf.adb,
1943 prj-tree.adb, prj-tree.ads (Environment): new type.
1945 2011-08-03 Emmanuel Briot <briot@adacore.com>
1947 * prj-tree.ads: Remove unused variable.
1949 2011-08-03 Yannick Moy <moy@adacore.com>
1951 * restrict.adb (Restriction_Msg): set "SPARK" all in upper case for
1952 issuing messages related to SPARK restriction violation.
1954 2011-08-03 Ed Schonberg <schonberg@adacore.com>
1956 * sem_ch6.adb: guard against error nodes in return statements.
1958 2011-08-03 Arnaud Charlet <charlet@adacore.com>
1960 * errout.adb (Error_Msg_Internal): the main unit has not been read yet,
1961 a warning can only appear on a configuration file, so emit warning
1962 without further checks.
1964 2011-08-03 Arnaud Charlet <charlet@adacore.com>
1966 * s-interr.ads: add overriding keyword.
1968 2011-08-03 Geert Bosch <bosch@adacore.com>
1970 * exp_attr.adb: Fix minor typo.
1972 2011-08-03 Ed Schonberg <schonberg@adacore.com>
1974 * par-ch4.adb: improve error recovery.
1976 2011-08-03 Emmanuel Briot <briot@adacore.com>
1978 * prj-part.adb, prj-part.ads, prj-makr.adb, prj-pars.adb, prj-conf.adb,
1979 prj-env.adb (Prj.Part.Parse): change parameter Always_Errout_Finalize
1982 2011-08-03 Emmanuel Briot <briot@adacore.com>
1984 * prj-dect.adb (Parse_Attribute_Declaration): make sure we can use
1985 "external" as an attribute name in aggregate projects.
1987 2011-08-03 Jose Ruiz <ruiz@adacore.com>
1989 * s-taprop-vxworks.adb: (Create_Task, Initialize): Ada 2012 pragma CPU
1990 uses CPU numbers starting 1, while VxWorks uses CPU numbers starting
1991 from 0, so we need to adjust.
1993 2011-08-03 Emmanuel Briot <briot@adacore.com>
1995 * prj-proc.adb, prj-ext.adb, prj-ext.ads, makeutl.adb, prj-tree.adb,
1996 prj-tree.ads, gnatcmd.adb, clean.adb (External_References): new type.
1998 2011-08-03 Yannick Moy <moy@adacore.com>
2000 * sem_ch6.adb (New_Overloaded_Entity): only issue error for SPARK
2001 restriction on overloaded entity if the entity is not an operator.
2003 2011-08-03 Yannick Moy <moy@adacore.com>
2005 * sem_ch7.adb, sem_res.adb, sem_attr.adb, restrict.adb,
2006 restrict.ads: Rename remaining Check_Formal_Restriction* into
2007 Check_SPARK_Restriction*.
2009 2011-08-03 Emmanuel Briot <briot@adacore.com>
2011 * prj-proc.adb, prj-part.adb, prj.adb, prj.ads, prj-nmsc.adb,
2012 prj-nmsc.ads, prj-err.adb (Project_Data): now discriminated on its
2014 (Project_Empty): removed
2015 (Empty_Project): new parameter Qualifier
2016 This is used to have fields specific to aggregate projects, cleaner
2017 New field to store the list of aggregated projects.
2018 (Check_Aggregate_Project): removed
2019 (Process_Aggregated_Projects, Free): new subprograms.
2021 2011-08-03 Olivier Hainque <hainque@adacore.com>
2023 * tracebak.c (STOP_FRAME ppc AIX): Stop at null return address as well.
2025 2011-08-03 Ed Schonberg <schonberg@adacore.com>
2027 * sem_ch8.adb (Analyze_Object_Renaming): if the renamed object is an
2028 explicit dereference of an unconstrained type, create a constrained
2029 subtype for it, as is done for function calls that return an
2032 2011-08-03 Thomas Quinot <quinot@adacore.com>
2034 * g-pehage.adb (Finalize): Avoid possible double-free.
2036 2011-08-03 Steve Baird <baird@adacore.com>
2038 * exp_attr.adb (Expand_N_Attribute_Reference): Don't expand
2039 Elab_Spec/Body attrs in CodePeer_Mode.
2041 2011-08-03 Javier Miranda <miranda@adacore.com>
2043 * exp_aggr.adb (Flatten): Convert to positional form aggregates whose
2044 low bound is not known at compile time but they have no others choice.
2045 Done because in this case the bounds can be obtained directly from the
2048 2011-08-03 Ed Falis <falis@adacore.com>
2050 * s-tasinf-vxworks.ads: Update comment to reflect 0 indexing of CPUs
2051 on VxWorks SMP. Remove unusable constant ANY_CPU.
2053 2011-08-03 Emmanuel Briot <briot@adacore.com>
2055 * gnatcmd.adb, make.adb, prj-part.adb, prj-part.ads, prj-makr.adb,
2056 clean.adb, prj-nmsc.adb, prj-pars.adb, prj-conf.adb, prj-env.adb,
2057 prj-env.ads (Prj.Env.Initialize_Default_Project_Path,
2058 Prj.Env.Initialize_Empty): new subprograms
2059 (Get_Env, Find_Project): remove parameter Target_Name.
2061 2011-08-03 Gary Dismukes <dismukes@adacore.com>
2063 * sem_ch3.adb (Build_Derived_Record_Type): Test the Derive_Subps formal
2064 as a condition for the delayed call to Derived_Subprograms done for the
2065 case of the rewriting of a derived type that constrains the
2066 discriminants of its parent type.
2067 Avoids redundant subprogram derivations for private subtype derivations.
2069 2011-08-03 Javier Miranda <miranda@adacore.com>
2071 * exp_aggr.adb (Init_Hidden_Discriminants): New subprogram of
2072 Build_Record_Aggr_Code.
2073 (Build_Record_Aggr_Code): Add missing support to initialize hidden
2074 discriminants in extension aggregates.
2076 2011-08-03 Emmanuel Briot <briot@adacore.com>
2078 * prj-pp.adb (Print): also output project qualifiers, since in
2079 particular "aggregate" is mandatory in an aggregate project.
2081 2011-08-03 Emmanuel Briot <briot@adacore.com>
2083 * prj-part.adb, prj.adb, prj.ads, prj-nmsc.adb, prj-env.adb:
2084 (Debug_Output): new function.
2086 2011-08-03 Eric Botcazou <ebotcazou@adacore.com>
2088 * gnat_ugn.texi: Document -Wstack-usage.
2089 * gcc-interface/misc.c (enumerate_modes): Add guard for ghost FP modes.
2091 2011-08-03 Thomas Quinot <quinot@adacore.com>
2093 * sem_prag.adb Issue an error (not a warning) when a C++ type does not
2094 have keyword LIMITED.
2096 2011-08-03 Yannick Moy <moy@adacore.com>
2098 * alfa.adb, alfa.ads, alfa_test.adb: New files.
2099 * ali.adb (Known_ALI_Lines): add 'C' lines (SCO) and 'F' lines (ALFA)
2100 (Scan_ALI): do not issue a fatal error if parsing known lines after Xref
2101 section (does not happen in compiler, only if code directly calls
2103 * get_alfa.adb, get_alfa.ads: New files.
2104 * lib-writ.adb, lib-writ.ads (Write_ALI): output ALFA information if
2106 * lib-xref-alfa.adb: New file.
2107 * lib-xref.adb, lib-xref.ads
2108 (Xref_Entry): redefine information needed in cross-references for ALFA.
2109 Push ALFA treatments in separated local package.
2110 (Enclosing_Subpragram_Or_Package): treat specially subprogram
2111 identifiers. Return entity of package body instead of spec. Return
2112 Empty for a scope with no location.
2113 (Generate_Reference): adapt to new components for ALFA information.
2114 Remove the need for D references on definitions.
2115 (Is_Local_Reference): moved to ALFA local package
2116 (Output_References): extract subfunction as Extract_Source_Name
2117 (Output_Local_References): remove procedure, replaced by filtering of
2118 cross-references in package ALFA and printing in Put_ALFA.
2119 (Write_Entity_Name): remove procedure
2120 * lib.adb, lib.ads (Extract_Source_Name): extract here function to
2121 print exact name of entity as it appears in source file
2122 (Unit_Ref_Table): make type public for use in Lib.Xref.ALFA
2123 * put_alfa.adb, put_alfa.ads: New files.
2124 * xref_lib.adb (Search_Xref): protect read of cross-references against
2125 reading other sections of the ALI file, in gnatxref
2126 (Search): protect read of cross-references against reading other
2127 sections of the ALI file, in gnatfind.
2128 * gcc-interface/Make-lang.in: Update dependencies.
2130 2011-08-03 Thomas Quinot <quinot@adacore.com>
2132 * sem_ch3.adb: Minor reformatting.
2134 2011-08-03 Jose Ruiz <ruiz@adacore.com>
2136 * s-inmaop-vxworks.adb (Setup_Interrupt_Mask): Do nothing instead of
2137 raising an exception.
2139 2011-08-03 Ed Schonberg <schonberg@adacore.com>
2141 * sem_res.adb (Set_String_Literal_Subtype): if index type is an integer
2142 type, always use 1 as the lower bound or string, even if lower bound of
2143 context is not static, to handle properly null strings in a non-static
2146 2011-08-03 Bob Duff <duff@adacore.com>
2148 * sem_prag.adb (Resolve_Aggregate): An array aggregate with 'others' is
2149 always legal on the right-hand side of an assignment statement; there
2150 is always an applicable index constraint in this case. Therefore, the
2151 check for Pkind = N_Assignment_Statement is now unconditional -- it
2152 doesn't depend on whether Is_Constrained (Typ).
2154 2011-08-03 Robert Dewar <dewar@adacore.com>
2156 * exp_ch5.adb, sem_prag.adb, exp_ch4.adb: Minor reformatting.
2158 2011-08-03 Ed Schonberg <schonberg@adacore.com>
2160 * sem_ch3.adb (Build_Itype_Reference): do not create an itype reference
2161 for an itype created within a generic unit.
2163 2011-08-03 Eric Botcazou <ebotcazou@adacore.com>
2165 * gnat_ugn.texi (Switches for gcc): Make it clearer that -fno-inline
2166 suppresses all inlining.
2168 2011-08-03 Robert Dewar <dewar@adacore.com>
2170 * sem_ch3.adb, sem_res.adb, exp_ch13.adb, exp_disp.adb,
2171 exp_aggr.adb: Minor reformatting.
2173 2011-08-03 Thomas Quinot <quinot@adacore.com>
2175 * exp_ch5.adb (Expand_N_Assignment_Statement): Do not force inlining of
2176 tagged assignment when discriminant checks are suppressed. This is
2177 useless and extremely costly in terms of static stack usage.
2179 2011-08-03 Bob Duff <duff@adacore.com>
2181 * sem_prag.adb (Get_Base_Subprogram): Do not follow Alias for instances
2182 of generics, because this leads to the wrong entity in the wrong scope,
2183 causing (e.g.) pragma Export_Procedure to get an error if the entity is
2185 (Process_Interface_Name): Follow Alias for instances of generics, to
2186 correct for the above change.
2188 2011-08-03 Ed Schonberg <schonberg@adacore.com>
2190 * exp_ch4.adb (Expand_N_Selected_Component): If the discriminant value
2191 is an integer literal it is always safe to replace the reference. In
2192 addition, if the reference appears in the generated code for an object
2193 declaration it is necessary to copy because otherwise the reference
2194 might be to the uninitilized value of the discriminant of the object
2197 2011-08-03 Pascal Obry <obry@adacore.com>
2199 * adaint.c (__gnat_is_executable_file_attr): Fix Win32 circuitry when no
2200 ACL used, in this case we want to check for ending .exe, not .exe
2201 anywhere in the path.
2203 2011-08-03 Sergey Rybin <rybin@adacore.com>
2205 * tree_io.ads (ASIS_Version_Number): Update because of the changes in
2206 the tree structure (semantic decoration of references to record
2209 2011-08-03 Gary Dismukes <dismukes@adacore.com>
2211 * sem_aggr.adb (Analyze_Array_Aggregate): When checking the discrete
2212 choices of a named array aggregate, bail out when any choices are
2213 marked as Errors_Posted.
2215 2011-08-03 Ed Schonberg <schonberg@adacore.com>
2217 * exp_ch13.adb (Expand_N_Freeze_Entity): cleanup determination of scope
2218 in which entity is frozen, to handle properly loop variables in
2221 2011-08-03 Ed Schonberg <schonberg@adacore.com>
2223 * sem_res.adb (Set_String_Literal_Subtype): if the lower bound of the
2224 subtype is not static, compute the upper bound using attributes, to
2225 handle properly index types that are not integer types.
2227 2011-08-03 Bob Duff <duff@adacore.com>
2229 * gnat_rm.texi, gnat_ugn.texi: Fix some dangling URLs.
2230 Update copyright notice.
2232 2011-08-03 Ed Schonberg <schonberg@adacore.com>
2234 * sem_ch3.adb (Build_Discriminant_Constraints): Only use
2235 Original_Discriminant if within an instance.
2236 * sem_ch4.adb (Analyze_Selected_Component): Ditto.
2238 2011-08-03 Thomas Quinot <quinot@adacore.com>
2240 * einfo.ads: Minor reformatting.
2242 2011-08-03 Ed Schonberg <schonberg@adacore.com>
2244 * exp_disp.adb (Check_Premature_Freezing): diagnose the presence of a
2245 composite type with an unfrozen subcomponent, in the profile of a
2246 primitive operation.
2248 2011-08-03 Robert Dewar <dewar@adacore.com>
2250 * sem_util.ads, exp_aggr.adb, exp_ch3.adb: Minor reformatting.
2252 2011-08-03 Ed Schonberg <schonberg@adacore.com>
2254 * sem_ch3.adb (Analyze_Object_Declaration): if a constant object of an
2255 unconstrained type with discriminants is initialized with an aggregate,
2256 use the constrained subtype of the aggregate as the type of the object,
2257 because it is immutable, and this allows the back-end to generate no
2258 code for the object declaration.
2260 2011-08-03 Robert Dewar <dewar@adacore.com>
2262 * exp_ch4.adb (Optimize_Length_Check): Fix bad handling of case where
2263 comparison operand is variable, and turns out to be zero or negative.
2265 2011-08-03 Javier Miranda <miranda@adacore.com>
2268 (Expand_Dispatching_Constructor_Call): Disable expansion of
2269 code required for native targets. Done to avoid generating
2270 references to unavailable runtime entities in VM targets.
2272 (Expand_N_Object_Declaration): Add missing support to handle
2273 the explicit initialization of class-wide interface objects.
2276 2011-08-03 Matthew Heaney <heaney@adacore.com>
2278 * a-cobove.adb (Merge): Move source onto target, instead of using Assign
2280 2011-08-03 Matthew Heaney <heaney@adacore.com>
2282 * a-cbdlli.adb (Splice): move source items from first to last
2284 2011-08-03 Yannick Moy <moy@adacore.com>
2286 * sem_util.ads: comment added.
2288 2011-08-03 Javier Miranda <miranda@adacore.com>
2291 (Expand_Record_Aggregate): In VM targets disable the expansion into
2292 assignments of aggregates whose type is not known at compile time.
2294 2011-08-03 Ed Schonberg <schonberg@adacore.com>
2296 * exp_ch9.adb (Build_Renamed_Formal_Declaration): common procedure for
2297 protected entries and task entries, to build the proper renaming
2298 declaration for entry formals, used in debugging.
2299 * exp_ch2.adb (Expand_Entry_Parameter): handle task and entry
2300 parameters in the same way.
2302 2011-08-02 Robert Dewar <dewar@adacore.com>
2304 * a-direct.adb, sinfo.ads, exp_ch9.adb, scng.adb, sem_util.adb,
2305 sem_util.ads, restrict.ads, par-prag.adb: Minor reformatting and/or
2306 code reorganization.
2308 2011-08-02 Robert Dewar <dewar@adacore.com>
2310 * debug.adb: Debug flag d.P to suppress length comparison optimization
2311 * exp_ch4.adb (Optimize_Length_Comparison): New routine to optimize
2312 comparison of Length by comparing First/Last instead.
2314 2011-08-02 Matthew Heaney <heaney@adacore.com>
2316 * a-cobove.ads: Code clean up.
2318 2011-08-02 Vincent Celier <celier@adacore.com>
2320 * adaint.c (file_names_case_sensitive_cache): New static int.
2321 (__gnat_get_file_names_case_sensitive): Cache the return value in
2322 file_names_case_sensitive_cache at the first invocation, to avoid
2323 multiple calls to getenv.
2325 2011-08-02 Bob Duff <duff@adacore.com>
2327 * sem_ch12.adb (Validate_Derived_Type_Instance): Implement AI05-0218-1.
2329 2011-08-02 Yannick Moy <moy@adacore.com>
2331 * sem_ch3.adb, sem_ch5.adb, sem_ch9.adb, sem_prag.adb, sem.ads,
2332 sem_util.adb, sem_util.ads, sem_res.adb, sem_ch2.adb, sem_ch4.adb,
2333 sem_ch6.adb, sem_ch11.adb: Add semantic flag In_Pre_Post_Expression to
2334 indicate that we are in a precondition or postcondition. This is used in
2335 Mark_Non_ALFA_Subprogram (renaming of Mark_Non_ALFA_Subprogram_Body) to
2336 decide whether to flag the spec or body of the current subprogram as
2339 2011-08-02 Fabien Chouteau <chouteau@adacore.com>
2341 * impunit.adb: Add Ada.Execution_Time.Interrupts in the Ada2012 package
2343 * a-extiin.ads: New file.
2345 2011-08-02 Bob Duff <duff@adacore.com>
2347 * a-direct.adb (Rename): Implement AI05-0231-1. In particular, Rename
2348 now raises Name_Error instead of Use_Error in certain cases. The other
2349 parts of this AI were already implemented properly.
2351 2011-08-02 Vincent Celier <celier@adacore.com>
2353 * link.c: Only import "auto-host.h" when building the gnattools.
2355 2011-08-02 Yannick Moy <moy@adacore.com>
2357 * sem_util.adb: Inter-unit inlining does not work for a subprogram
2358 which calls a local subprogram, so extract subprogram
2359 from Mark_Non_ALFA_Subprogram_Body.
2361 2011-08-02 Javier Miranda <miranda@adacore.com>
2364 (Extract_Dispatching_Call): If the type of the dispatching object is an
2365 access type then return an explicit dereference in the Object out-mode
2368 2011-08-02 Gary Dismukes <dismukes@adacore.com>
2370 * sem_ch3.adb (Analyze_Subtype_Declaration): Generate range
2371 compatibility checks for all indexes of an array subtype, not just the
2372 first. Reset Has_Dynamic_Range_Check on the subtype before each
2373 potential check to ensure that Insert_Range_Checks will not elide any
2374 of the dynamic checks.
2376 2011-08-02 Yannick Moy <moy@adacore.com>
2378 * par-prag.ad (Process_Restrictions_Or_Restriction_Warnings): recognize
2379 SPARK restriction at parsing time.
2380 * scng.adb (Scan): Generate a token Tok_SPARK_Hide for a SPARK HIDE
2381 directive only if the SPARK restriction is set for this unit.
2383 2011-08-02 Yannick Moy <moy@adacore.com>
2385 * sem_ch3.adb, sem_ch5.adb, sem_ch9.adb, sem_util.adb, sem_util.ads,
2386 sem_res.adb, sem_ch2.adb, sem_ch4.adb, sem_ch6.adb,
2387 sem_ch11.adb: Protect call to Current_Subprogram which might be costly
2388 when repeated. Rename Current_Subprogram_Is_Not_In_ALFA into
2389 Mark_Non_ALFA_Subprogram_Body.
2390 Split body of Mark_Non_ALFA_Subprogram_Body to get body small and
2393 2011-08-02 Yannick Moy <moy@adacore.com>
2395 * sem_res.adb: Protect calls to Matching_Static_Array_Bounds which
2398 2011-08-02 Robert Dewar <dewar@adacore.com>
2400 * exp_ch9.adb, exp_sel.adb, restrict.ads, exp_disp.adb, erroutc.ads,
2401 exp_ch3.adb: Minor reformatting.
2403 2011-08-02 Emmanuel Briot <briot@adacore.com>
2405 * adaint.c (__gnat_locate_exec_on_path): only returns executable
2406 files, not any regular file.
2407 (__gnat_locate_file_with_predicate): new subprogram.
2409 2011-08-02 Yannick Moy <moy@adacore.com>
2411 * sinfo.adb, sinfo.ads: Restrict the use of flags
2412 Has_Dynamic_Length_Check and Has_Dynamic_Range_Check to expression
2413 nodes, plus N_Subtype_Declaration for the 2nd one.
2415 2011-08-02 Sergey Rybin <rybin@adacore.com>
2417 * gnat_rm.texi: Ramification of pragma Eliminate documentation
2418 - fix bugs in the description of Source_Trace;
2419 - get rid of UNIT_NAME;
2421 2011-08-02 Javier Miranda <miranda@adacore.com>
2424 (Build_Dispatching_Requeue): Adding support for VM targets
2425 since we cannot directly reference the Tag entity.
2426 * exp_sel.adb (Build_K): Adding support for VM targets.
2427 (Build_S_Assignment): Adding support for VM targets.
2429 (Default_Prim_Op_Position): In VM targets do not restrict availability
2430 of predefined interface primitives to compiling in Ada 2005 mode.
2431 (Is_Predefined_Interface_Primitive): In VM targets this service is not
2432 restricted to compiling in Ada 2005 mode.
2433 (Make_VM_TSD): Generate code that declares and initializes the OSD
2434 record. Needed to support dispatching calls through synchronized
2437 (Make_Predefined_Primitive_Specs): Enable generation of predefined
2438 primitives associated with synchronized interfaces.
2439 (Make_Predefined_Primitive_Bodies): Enable generation of predefined
2440 primitives associated with synchronized interfaces.
2442 2011-08-02 Yannick Moy <moy@adacore.com>
2444 * par-ch11.adb (P_Handled_Sequence_Of_Statements): mark a sequence of
2445 statements hidden in SPARK if preceded by the HIDE directive
2446 (Parse_Exception_Handlers): mark each exception handler in a sequence of
2447 exception handlers as hidden in SPARK if preceded by the HIDE directive
2448 * par-ch6.adb (P_Subprogram): mark a subprogram body hidden in SPARK
2449 if starting with the HIDE directive
2450 * par-ch7.adb (P_Package): mark a package body hidden in SPARK if
2451 starting with the HIDE directive; mark the declarations in a private
2452 part as hidden in SPARK if the private part starts with the HIDE
2454 * restrict.adb, restrict.ads
2455 (Set_Hidden_Part_In_SPARK): record a range of slocs as hidden in SPARK
2456 (Is_In_Hidden_Part_In_SPARK): new function which returns whether its
2457 argument node belongs to a part which is hidden in SPARK
2458 (Check_SPARK_Restriction): do not issue violations on nodes in hidden
2459 parts in SPARK; protect the possibly costly call to
2460 Is_In_Hidden_Part_In_SPARK by a check that the SPARK restriction is on
2461 * scans.ads (Token_Type): new value Tok_SPARK_Hide in enumeration
2462 * scng.adb (Accumulate_Token_Checksum_GNAT_6_3,
2463 Accumulate_Token_Checksum_GNAT_5_03): add case for new token
2465 (Scan): recognize special comment starting with '#' and followed by
2466 SPARK keyword "hide" as a HIDE directive.
2468 2011-08-02 Yannick Moy <moy@adacore.com>
2470 * types.ads, erroutc.ads: Minor reformatting.
2472 2011-08-02 Vincent Celier <celier@adacore.com>
2474 * link.c: Add response file support for cross platforms.
2476 2011-08-02 Ed Schonberg <schonberg@adacore.com>
2478 * sem_aggr.adb (Resolve_Array_Aggregate): when copying the expression
2479 in an association, set parent field of copy before partial analysis.
2480 * sem_res.adb (Resolve_Slice): create reference to itype only when
2481 expansion is enabled.
2483 2011-08-02 Yannick Moy <moy@adacore.com>
2485 * einfo.adb, einfo.ads (Body_Is_In_ALFA, Set_Body_Is_In_ALFA): get/set
2486 for new flag denoting which subprogram bodies are in ALFA
2487 * restrict.adb, sem_ch7.adb: Update comment
2488 * sem_ch11.adb, sem_ch2.adb, sem_ch3.adb, sem_ch4.adb, sem_ch5.adb,
2489 sem_ch9.adb, sem_res.adb: Add calls to
2490 Current_Subprogram_Body_Is_Not_In_ALFA on unsupported constructs.
2491 * sem_ch6.adb (Analyze_Function_Return): add calls to
2492 Current_Subprogram_Body_Is_Not_In_ALFA on return statement in the
2493 middle of the body, and extended return.
2494 (Check_Missing_Return): add calls to Set_Body_Is_In_ALFA with argument
2495 False when missing return.
2496 (Analyze_Subprogram_Body_Helper): initialize the flag Body_Is_In_ALFA
2497 to True for subprograms whose spec is in ALFA. Remove later on the flag
2498 on the entity used for a subprogram body when there exists a separate
2500 * sem_util.adb, sem_util.ads (Current_Subprogram_Body_Is_Not_In_ALFA):
2501 if Current_Subprogram is not Empty, set its flag Body_Is_In_ALFA to
2502 False, otherwise do nothing.
2504 2011-08-02 Robert Dewar <dewar@adacore.com>
2506 * inline.adb, stand.ads, sem_ch6.adb, sem_ch8.adb: Minor reformatting.
2508 2011-08-02 Yannick Moy <moy@adacore.com>
2510 * sem_ch4.ads: minor formatting.
2512 2011-08-02 Yannick Moy <moy@adacore.com>
2514 * sem_aggr.adb, err_vars.ads, sem_ch3.adb, sem_ch5.adb, sem_ch9.adb,
2515 debug.adb, sem_util.adb, sem_res.adb, sem_attr.adb, gnat1drv.adb,
2516 errout.adb, errout.ads, exp_ch6.adb, sem_ch4.adb, restrict.adb,
2517 restrict.ads, sem_ch6.adb, sem_ch8.adb, sem_ch11.adb,
2518 opt.ads: cleanup of SPARK mode
2520 2011-08-02 Yannick Moy <moy@adacore.com>
2522 * cstand.adb (Create_Standard): sets Is_In_ALFA component of standard
2524 * einfo.adb, einfo.ads (Is_In_ALFA): add flag for all entities
2525 (Is_In_ALFA, Set_Is_In_ALFA): new subprograms to access flag Is_In_ALFA
2527 (Analyze_Object_Declaration): set Is_In_ALFA flag for objects
2528 (Constrain_Enumeration): set Is_In_ALFA flag for enumeration subtypes
2529 (Constrain_Integer): set Is_In_ALFA flag for integer subtypes
2530 (Enumeration_Type_Declaration): set Is_In_ALFA flag for enumeration
2532 (Set_Scalar_Range_For_Subtype): unset Is_In_ALFA flag for subtypes with
2534 * sem_ch6.adb (Analyze_Return_Type): unset Is_In_ALFA flag for
2535 functions whose return type is not in ALFA.
2536 (Analyze_Subprogram_Specification): set Is_In_ALFA flag for subprogram
2538 (Process_Formals): unset Is_In_ALFA flag for subprograms if a
2539 parameter's type is not in ALFA.
2540 * stand.ads (Standard_Type_Is_In_ALFA): array defines which standard
2543 2011-08-02 Ed Schonberg <schonberg@adacore.com>
2545 * sem_ch6 (Analyze_Expression_Function): treat the function as
2546 Inline_Always, and introduce a subprogram declaration for it when it is
2548 * inline.adb (Add_Inlined_Body): recognize bodies that come from
2549 expression functions, so that the back-end can determine whether they
2550 can in fact be inlined.
2551 * sem_util.adb (Is_Expression_Function): predicate to determine whether
2552 a function body comes from an expression function.
2554 2011-08-02 Gary Dismukes <dismukes@adacore.com>
2556 * sem_ch6.adb (Check_Conformance): Revise the check for nonconforming
2557 null exclusions to test Can_Never_Be_Null on the anonymous access types
2558 of the formals rather than testing the formals themselves. Exclude this
2559 check in cases where the Old_Formal is marked as a controlling formal,
2560 to avoid issuing spurious errors for bodies completing dispatching
2561 operations (due to the flag not getting set on controlling access
2562 formals in body specs).
2563 (Find_Corresponding_Spec): When checking full and subtype conformance of
2564 subprogram bodies in instances, pass Designated and E in that order, for
2565 consistency with the expected order of the formals (New_Id followed by
2568 2011-08-02 Robert Dewar <dewar@adacore.com>
2570 * sem_ch8.adb: Minor reformatting.
2572 2011-08-02 Ed Schonberg <schonberg@adacore.com>
2574 * sem_ch8.adb (Analyze_Subprogram_Renaming): new procedure
2575 Check_Class_Wide_Actual, to implement AI05-0071, on defaulted
2576 primitive operations of class-wide actuals.
2578 2011-08-02 Javier Miranda <miranda@adacore.com>
2580 * exp_atag.ads, exp_atag.adb
2581 (Build_Common_Dispatching_Select_Statements): Remove argument Loc
2582 since its value is implicitly passed in argument Typ.
2583 * exp_disp.adb (Make_Disp_Conditional_Select_Body,
2584 Make_Disp_Timed_Select_Body): Remove Loc in calls to routine
2585 Build_Common_Dispatching_Select_Statements.
2587 2011-08-02 Robert Dewar <dewar@adacore.com>
2589 * sem_ch3.adb, exp_atag.ads, get_scos.adb, get_scos.ads,
2590 exp_disp.adb, lib-xref.adb, lib-xref.ads: Update comments.
2593 2011-08-02 Robert Dewar <dewar@adacore.com>
2595 * sem_res.adb: Minor reformatting.
2596 * sem_prag.adb: Minor reformatting.
2598 2011-08-02 Javier Miranda <miranda@adacore.com>
2600 * exp_atag.adb, exp_atags.ads
2601 (Build_Common_Dispatching_Select_Statement): Replace argument DT_Ptr
2602 by the tagged type Entity. Required to use this routine in the VM
2603 targets since we do not have available the Tag entity in the VM
2606 (Expand_N_Subprogram_Body): Do not invoke Build_VM_TSDs if package
2607 Ada.Tags has not been previously loaded.
2609 (Expand_N_Package_Declaration, Expand_N_Package_Body): Do not invoke
2610 Build_VM_TSDs if package Ada.Tags has not been previously loaded.
2612 (Enclosing_Dynamic_Scope): Add missing support to handle the full
2613 view of enclosing scopes. Required to handle enclosing scopes that
2614 are synchronized types whose full view is a task type.
2616 (Build_VM_TSDs): Minor code improvement to avoid generating and
2617 analyzing lists with empty nodes.
2618 (Make_Disp_Asynchronous_Select_Body): Add support for VM targets.
2619 (Make_Disp_Conditional_Select_Body): Add support for VM targets.
2620 (Make_Disp_Get_Prim_Op_Kind): Add support for VM targets.
2621 (Make_Disp_Timed_Select_Body): Add support for VM targets.
2622 (Make_Select_Specific_Data_Table): Add support for VM targets.
2623 (Make_VM_TSD): Generate code to initialize the SSD structure of
2626 2011-08-02 Yannick Moy <moy@adacore.com>
2628 * lib-writ.adb (Write_ALI): when ALFA mode is set, write local
2629 cross-references section in ALI.
2630 * lib-xref.adb, lib-xref.ads (Xref_Entry): add components Sub
2631 (enclosing subprogram), Slc (location of Sub) and Sun (unit number of
2633 (Enclosing_Subprogram_Or_Package): new function to return the enclosing
2634 subprogram or package entity of a node
2635 (Is_Local_Reference_Type): new function returns True for references
2636 selected in local cross-references.
2637 (Lt): function extracted from Lt in Output_References
2638 (Write_Entity_Name): function extracted from Output_References
2639 (Generate_Definition): generate reference with type 'D' for definition
2640 of objects (object declaration and parameter specification), with
2641 appropriate locations and units, for use in local cross-references.
2642 (Generate_Reference): update fields Sub, Slc and Sun. Keep newly created
2643 references of type 'I' for initialization in object definition.
2644 (Output_References): move part of function Lt and procedure
2645 Write_Entity_Name outside of the body. Ignore references of types 'D'
2646 and 'I' introduced for local cross-references.
2647 (Output_Local_References): new procedure to output the local
2648 cross-references sections.
2649 (Lref_Entity_Status): new array defining whether an entity is a local
2650 * sem_ch3.adb (Analyze_Object_Declaration): call Generate_Reference
2651 with 'I' type when initialization expression is present.
2652 * get_scos.adb, get_scos.ads: Correct comments and typos
2654 2011-08-02 Javier Miranda <miranda@adacore.com>
2656 * exp_ch6.adb (Expand_N_Subprogram_Body): Enable generation of TSDs in
2658 * exp_ch7.adb (Expand_N_Package_Body): Enable generation of TSDs in
2660 * exp_disp.adb (Build_VM_TSDs): No action needed if the runtime has no
2663 2011-08-02 Vincent Celier <celier@adacore.com>
2665 * prj-nmsc.adb (File_Found): New components Excl_File and Excl_Line
2666 (No_Space_Img): New function
2667 (Find_Excluded_Sources): When reading from a file, record the file name
2668 and the line number for each excluded source.
2669 (Mark_Excluded_Sources): When reporting an error, if the excluded
2670 sources were read from a file, include file name and line number in
2673 2011-08-02 Ed Schonberg <schonberg@adacore.com>
2675 * sem_res.adb (Resolve_Call): implement rule in RM 12.5.1 (23.3/2).
2677 2011-08-02 Robert Dewar <dewar@adacore.com>
2679 * exp_ch7.adb exp_ch6.adb, exp_disp.adb: Minor reformatting
2681 2011-08-02 Javier Miranda <miranda@adacore.com>
2683 * exp_ch6.adb (Expand_N_Subprogram_Body): Temporarily restrict the
2684 generation of TSDs to the DOTNET compiler.
2685 * exp_ch7.adb (Expand_N_Package_Body): Temporarily restrict the
2686 generation of TSDs to the DOTNET compiler.
2688 2011-08-02 Javier Miranda <miranda@adacore.com>
2690 * exp_disp.ads (Build_VM_TSDs): Build the runtime Type Specific Data
2691 record of all the tagged types declared inside library level package
2692 declarations, library level package bodies or library level subprograms.
2693 * exp_disp.adb (Make_VM_TSD): New subprogram that builds the TSD
2694 associated with a given tagged type.
2695 (Build_VM_TSDs): New subprogram.
2696 * exp_ch6.adb (Expand_N_Subprogram_Body): Generate TSDs records of main
2697 compilation units that are subprograms.
2698 * exp_ch7.adb (Expand_N_Package_Body): Generate TSDs of main
2699 compilation units that are package bodies.
2700 (Expand_N_Package_Declaration): Generate TSDs of the main compilation
2701 units that are a package declaration or a package instantiation.
2702 * exp_intr.adb (Expand_Dispatching_Constructor_Call): Minor code
2703 reorganization to improve the error generated by the frontend when the
2704 function Ada.Tags.Secondary_Tag is not available.
2705 * rtsfind.ads (RE_Register_TSD): New runtime entity.
2706 * exp_ch4.adb (Expand_N_Type_Conversion): Minor code cleanup.
2708 2011-08-02 Javier Miranda <miranda@adacore.com>
2710 * exp_disp.adb (Make_DT): Generate call to Check_TSD in Ada 2005 mode.
2712 2011-08-02 Robert Dewar <dewar@adacore.com>
2714 * s-imenne.ads: Minor reformatting.
2716 2011-08-02 Robert Dewar <dewar@adacore.com>
2718 * a-stunau.ads: Add pragma Suppress_Initialization for Big_String
2719 * freeze.adb (Warn_Overlay): Don't warn if initialization suppressed
2720 * s-stalib.ads: Add pragma Suppress_Initialization for Big_String
2722 2011-08-02 Robert Dewar <dewar@adacore.com>
2724 * einfo.ads (Materialize_Entity): Document this is only for renamings
2725 * exp_ch3.adb (Expand_N_Object_Declaration): Make sure we generate
2726 required debug information in the case where we transform the object
2727 declaration into a renaming declaration.
2728 * exp_ch4.adb (Expand_Concatenate): Generate debug info for result
2730 * exp_dbug.ads (Debug_Renaming_Declaration): Document setting of
2733 2011-08-02 Robert Dewar <dewar@adacore.com>
2735 * einfo.ads, einfo.adb (Suppress_Initialization): Replaces
2736 Suppress_Init_Procs.
2737 * exp_ch3.adb, exp_disp.adb, freeze.adb: Use
2738 Suppress_Initialization/Initialization_Suppressed.
2739 * gnat_rm.texi: New documentation for pragma Suppress_Initialization
2740 * sem_aux.ads, sem_aux.adb (Initialization_Suppressed): New function
2741 * sem_dist.adb: Use Suppress_Initialization/Initialization_Suppressed
2742 * sem_prag.adb: New processing for pragma Suppress_Initialization.
2744 2011-08-02 Robert Dewar <dewar@adacore.com>
2746 * gnat_rm.texi, a-tags.ads, sem_prag.adb, sem_ch12.adb, exp_disp.adb:
2749 2011-08-02 Ed Schonberg <schonberg@adacore.com>
2751 * sem_prag.adb (Chain_PPC): Implement AI04-0230: null procedures can
2752 only have inheritable classwide pre/postconditions.
2754 2011-08-02 Javier Miranda <miranda@adacore.com>
2756 * a-tags.ads, a-tags.adb (Check_TSD): New subprogram.
2757 * rtsfind.ads (RE_Check_TSD): New runtime entity.
2758 * exp_disp.adb (Make_DT): Generate call to the new runtime routine that
2759 checks if the external tag of a type is the same as the external tag
2760 of some other declaration.
2762 2011-08-02 Thomas Quinot <quinot@adacore.com>
2764 * s-taskin.ads: Minor reformatting.
2766 2011-08-02 Emmanuel Briot <briot@adacore.com>
2768 * g-comlin.adb (Display_Help): swap the order in which it prints the
2769 short help and the general usage.
2771 2011-08-02 Ed Schonberg <schonberg@adacore.com>
2773 * sem_ch12.adb (Analyze_Generic_Subprogram_Declaration): copy properly
2774 the aspect declarations and attach them to the generic copy for
2775 subsequent analysis.
2776 (Analyze_Subprogram_Instantiation): copy explicitly the aspect
2777 declarations of the generic tree to the new subprogram declarations.
2778 * sem_attr.adb (Check_Precondition_Postcondition): recognize
2779 conditions that apply to a subprogram instance.
2781 2011-08-02 Robert Dewar <dewar@adacore.com>
2783 * gnat_rm.texi: Clarify doc on pragma Source_File_Name[_Project].
2785 2011-08-02 Ed Schonberg <schonberg@adacore.com>
2787 * sem_ch3.adb (Derived_Type_Declaration): When checking that a untagged
2788 private type with a tagged full view is not derived in the immediate
2789 scope of the partial view, (RM 7.3 (7)) use the scope of the base type.
2791 2011-08-02 Robert Dewar <dewar@adacore.com>
2793 * exp_ch4.adb: Minor reformatting.
2795 2011-08-02 Ed Schonberg <schonberg@adacore.com>
2797 * sem_ch5.adb (Analyze_Loop_Statement): If the iteration scheme is an
2798 Ada2012 iterator, the loop will be rewritten during expansion into a
2799 while loop with a cursor and an element declaration. Do not analyze the
2800 body in this case, because if the container is for indefinite types the
2801 actual subtype of the elements will only be determined when the cursor
2802 declaration is analyzed.
2804 2011-08-02 Arnaud Charlet <charlet@adacore.com>
2806 * sem_ch13.adb (Analyze_Attribute_Definition_Clause): Ignore
2807 size/alignment related attributes in CodePeer_Mode.
2809 2011-08-02 Gary Dismukes <dismukes@adacore.com>
2811 * sem_ch3.adb (Check_Ops_From_Incomplete_Type): Remove call to
2812 Prepend_Element, since this can result in the operation getting the
2813 wrong slot in the full type's dispatch table if the full type has
2814 inherited operations. The incomplete type's operation will get added
2815 to the proper position in the full type's primitives
2816 list later in Sem_Disp.Check_Operation_From_Incomplete_Type.
2817 (Process_Incomplete_Dependents): Add Is_Primitive test when checking for
2818 dispatching operations, since there are cases where nonprimitive
2819 subprograms can get added to the list of incomplete dependents (such
2820 as subprograms in nested packages).
2821 * sem_ch6.adb (Process_Formals): First, remove test for being in a
2822 private part when determining whether to add a primitive with a
2823 parameter of a tagged incomplete type to the Private_Dependents list.
2824 Such primitives can also occur in the visible part, and should not have
2825 been excluded from being private dependents.
2826 * sem_ch7.adb (Uninstall_Declarations): When checking the rule of
2827 RM05-3.10.1(9.3/2), test that a subprogram in the Private_Dependents
2828 list of a Taft-amendment incomplete type is a primitive before issuing
2829 an error that the full type must appear in the same unit. There are
2830 cases where nonprimitives can be in the list (such as subprograms in
2832 * sem_disp.adb (Derives_From): Use correct condition for checking that
2833 a formal's type is derived from the type of the corresponding formal in
2834 the parent subprogram (the condition was completely wrong). Add
2835 checking that was missing for controlling result types being derived
2836 from the result type of the parent operation.
2838 2011-08-02 Yannick Moy <moy@adacore.com>
2840 * errout.adb (First_Node): minor renaming
2841 * restrict.adb (Check_Formal_Restriction): put restriction warning on
2844 2011-08-02 Yannick Moy <moy@adacore.com>
2846 * sem_res.adb (Resolve_Logical_Op): ensure N is a binary operator
2847 before accessing operands.
2848 * sem_util.adb (Is_SPARK_Initialization_Expr): follow original nodes to
2849 decide whether an initialization expression respects SPARK rules, as
2850 the plain node is the expanded one. This allows for more valid warnings
2852 * gnat_rm.texi: Minor update.
2854 2011-08-02 Arnaud Charlet <charlet@adacore.com>
2856 * sem_ch13.adb (Analyze_Enumeration_Representation_Clause): Revert
2859 2011-08-02 Robert Dewar <dewar@adacore.com>
2861 * sem_ch3.adb, sem_ch4.adb: Minor reformatting.
2863 2011-08-02 Hristian Kirtchev <kirtchev@adacore.com>
2865 * exp_ch5.adb (Expand_Iterator_Loop): Reformatting. Wrap the original
2866 loop statements and the element renaming declaration with a block when
2867 the element type is controlled.
2869 2011-08-02 Yannick Moy <moy@adacore.com>
2871 * sinfo.ads: Minor formatting.
2873 2011-08-02 Ed Schonberg <schonberg@adacore.com>
2875 * sem_aggr.adb (Add_Association): if the association has a box and no
2876 expression, use the Sloc of the aggregate itself for the new
2878 * errout.adb (First_Node): Exclude nodes with no Sloc, and always use
2881 2011-08-02 Hristian Kirtchev <kirtchev@adacore.com>
2883 * exp_ch5.adb (Expand_Iterator_Loop): Code cleanup and refactoring.
2884 When a container is provided via a function call, generate a renaming
2885 of the function result. This avoids the creation of a transient scope
2886 and the premature finalization of the container.
2887 * exp_ch7.adb (Is_Container_Cursor): Removed.
2888 (Wrap_Transient_Declaration): Remove the supression of the finalization
2889 of the list controller when the declaration denotes a container cursor,
2892 2011-08-02 Yannick Moy <moy@adacore.com>
2894 * restrict.adb (Check_Formal_Restriction): only issue a warning if the
2895 node is from source, instead of the original node being from source.
2897 (Resolve_Array_Aggregate): refine the check for a static expression, to
2898 recognize also static ranges
2899 * sem_ch3.adb, sem_ch3.ads (Analyze_Component_Declaration,
2900 Array_Type_Declaration): postpone the test for the type being a subtype
2901 mark after the type has been resolved, so that component-selection and
2902 expanded-name are discriminated.
2903 (Make_Index, Process_Range_Expr_In_Decl): add a parameter In_Iter_Schm
2904 to distinguish the case of an iteration scheme, so that an error is
2905 issed on a non-static range in SPARK except in an iteration scheme.
2906 * sem_ch5.adb (Analyze_Iteration_Scheme): call Make_Index with
2907 In_Iter_Schm = True.
2908 * sem_ch6.adb (Analyze_Subprogram_Specification): refine the check for
2909 user-defined operators so that they are allowed in renaming
2911 (Find_Selected_Component): refine the check for prefixing of operators
2912 so that they are allowed in renaming. Move the checks for restrictions
2913 on selector name after analysis discriminated between
2914 component-selection and expanded-name.
2915 * sem_res.adb (Resolve_Op_Concat_Arg): do not issue a warning on
2916 concatenation argument of string type if it is static.
2917 * sem_util.adb, sem_util.ads
2918 (Check_Later_Vs_Basic_Declarations): add a new function
2919 Is_Later_Declarative_Item to decice which declarations are allowed as
2920 later items, in the two different modes Ada 83 and SPARK. In the SPARK
2921 mode, add that renamings are considered as later items.
2922 (Enclosing_Package): new function to return the enclosing package
2923 (Enter_Name): correct the rule for homonyms in SPARK
2924 (Is_SPARK_Initialization_Expr): default to returning True on nodes not
2925 from source (result of expansion) to avoid issuing wrong warnings.
2927 2011-08-02 Ed Schonberg <schonberg@adacore.com>
2929 * errout.adb: On anything but an expression First_Node returns its
2932 2011-08-02 Pascal Obry <obry@adacore.com>
2934 * prj-proc.adb, make.adb, makeutl.adb: Minor reformatting.
2936 2011-08-02 Hristian Kirtchev <kirtchev@adacore.com>
2938 * exp_ch5.adb (Expand_Iterator_Loop): Code cleanup and reorganization.
2939 Set the associated loop as the related expression of internally
2941 * exp_ch7.adb (Is_Container_Cursor): New routine.
2942 (Wrap_Transient_Declaration): Supress the finalization of the list
2943 controller when the declaration denotes a container cursor.
2945 2011-08-02 Yannick Moy <moy@adacore.com>
2947 * opt.ads (SPARK_Mode): update comment, SPARK_Mode only set through
2949 * par-ch3.adb (P_Delta_Constraint): remove check in SPARK mode that the
2950 expression is a simple expression. This check cannot be performed in
2951 the semantics, so just drop it.
2952 (P_Index_Or_Discriminant_Constraint): move check that the index or
2953 discriminant is a subtype mark to Analyze_Subtype_Declaration in the
2954 semantics. Other cases were previously checked in the semantics.
2955 * par-ch4.adb (P_Name): move checks that a selector name is not
2956 character literal or an operator symbol to Find_Selected_Component in
2958 * par-ch5.adb (Parse_Decls_Begin_End): move check that basic
2959 declarations are not placed after later declarations in a separate
2960 procedure in Sem_Util (possibly not the best choice?), to be used both
2961 during parsing, for Ada 83 mode, and during semantic analysis, for
2963 * par-endh.adb (Check_End): move check that end label is not missing
2964 to Process_End_Label in the semantics
2965 * par-prag.adb (Process_Restrictions_Or_Restriction_Warnings): remove
2966 the special case for SPARK restriction
2967 * par.adb: use and with Sem_Util, for use in Parse_Decls_Begin_End
2968 * restrict.adb, restrict.ads (Check_Formal_Restriction): add a
2969 parameter Force to issue the error message even on internal node (used
2970 for generated end label). Call Check_Restriction to check when an error
2971 must be issued. In SPARK mode, issue an error message even if the
2972 restriction is not set.
2973 (Check_Restriction): new procedure with an additional out parameter to
2974 inform the caller that a message has been issued
2975 * sem_aggr.adb: Minor modification of message
2976 * sem_attr.adb (Analyze_Attribute): call Check_Formal_Restriction
2977 instead of issuing an error message directly
2978 * sem_ch3.adb (Analyze_Declarations): move here the check that basic
2979 declarations are not placed after later declarations, by calling
2980 Check_Later_Vs_Basic_Declarations
2981 (Analyze_Subtype_Declaration): move here the check that an index or
2982 discriminant constraint must be a subtype mark. Change the check that
2983 a subtype of String must start at one so that it works on subtype marks.
2984 * sem_ch4.adb (Analyze_Call): move here the check that a named
2985 association cannot follow a positional one in a call
2986 * sem_ch5.adb (Check_Unreachable_Code): call Check_Formal_Restriction
2987 instead of issuing an error message directly
2988 * sem_ch8.adb (Find_Selected_Component): move here the check that a
2989 selector name is not a character literal or an operator symbol. Move
2990 here the check that the prefix of an expanded name cannot be a
2991 subprogram or a loop statement.
2992 * sem_util.adb, sem_util.ads (Check_Later_Vs_Basic_Declarations): new
2993 procedure called from parsing and semantics to check that basic
2994 declarations are not placed after later declarations
2995 (Process_End_Label): move here the check that end label is not missing
2997 2011-08-02 Arnaud Charlet <charlet@adacore.com>
2999 * sem_ch13.adb (Analyze_Enumeration_Representation_Clause): Ignore enum
3000 representation clause in codepeer mode, since it confuses CodePeer and
3001 does not bring useful info.
3003 2011-08-02 Ed Falis <falis@adacore.com>
3005 * init.c: initialize fp hw on MILS.
3007 2011-08-02 Ed Schonberg <schonberg@adacore.com>
3009 * errout.adb (First_Node): for bodies, return the node itself (small
3010 optimization). For other nodes, do not check source_unit if the node
3011 comes from Standard.
3013 2011-08-02 Robert Dewar <dewar@adacore.com>
3015 * exp_ch3.adb: Minor comment additions.
3016 * sem_ch13.adb: Minor reformatting.
3018 2011-08-02 Pascal Obry <obry@adacore.com>
3020 * make.adb, makeutl.adb: Removes some superfluous directory separator.
3022 2011-08-02 Robert Dewar <dewar@adacore.com>
3024 * sem_attr.adb: Minor reformatting.
3026 2011-08-02 Robert Dewar <dewar@adacore.com>
3028 * einfo.adb (Has_Default_Aspect): Replaces Has_Default_Value
3029 (Has_Default_Component_Value): Removed
3030 * einfo.ads Comment updates
3031 (Has_Default_Aspect): Replaces Has_Default_Value
3032 (Has_Default_Component_Value): Removed
3034 (Expand_N_Freeze_Entity): Handle Default[_Component]_Value aspects
3036 (Build_Array_Init_Proc): Handle Default_[Component_]Value aspects
3037 (Get_Simple_Init_Val): Handle Default_Value aspect
3038 (Needs_Simple_Initialization): Handle Default_Value aspect
3039 * exp_ch3.ads: Needs_Simple_Initialization
3040 * freeze.adb (Freeze_Entity): Handle Default_[Component_]Value aspect
3041 * par-prag.adb (Pragma_Default[_Component]Value) Removed
3043 (Analyze_Aspect_Specifications): Fix Default[_Component]_Value aspects
3044 * sem_prag.adb (Pragma_Default[_Component]Value) Removed
3045 * snames.ads-tmpl (Pragma_Default[_Component]Value) Removed
3047 2011-08-02 Ed Schonberg <schonberg@adacore.com>
3049 * sem_ch5.adb (Analyze_Iterator_Specification): use base type to locate
3050 package containing iteration primitives.
3051 exp_ch5.adb (Expand_Iterator_Loop): ditto.
3053 2011-08-02 Ed Schonberg <schonberg@adacore.com>
3055 * sem_ch5.adb (Analyze_Iteration_Scheme): For an Ada2012 iterator with
3056 "of", pre-analyze expression in case it is a function call with
3057 finalization actions that must be placed ahead of the loop.
3058 * exp_ch5.adb (Expand_Iterator_Loop): If condition_actions are present
3059 on an Ada2012 iterator, insert them ahead of the rewritten loop.
3061 2011-08-02 Geert Bosch <bosch@adacore.com>
3063 * cstand.adb (Create_Float_Types): Only consider C's long double for
3064 Long_Long_Float, in addition to double.
3066 2011-08-02 Robert Dewar <dewar@adacore.com>
3068 * sem_ch3.adb, sem_ch5.adb, sem_type.adb, switch-c.adb, switch-c.ads,
3069 sem_prag.adb, sem_util.adb, sem_util.ads, sem_res.adb, warnsw.ads,
3070 prepcomp.ads, cstand.adb, stand.ads, a-calfor.adb, s-stusta.adb:
3073 2011-08-02 Ed Schonberg <schonberg@adacore.com>
3075 * sem_attr.adb: handle properly 'Result when it is a prefix of an
3078 2011-08-02 Javier Miranda <miranda@adacore.com>
3080 * einfo.ads, einfo.adb
3081 (Original_Access_Type): Move this attribute to Node26 since there was
3082 an undocumented use of Node21 in E_Access_Subprogram_Type entities
3083 which causes conflicts and breaks the generation of the .NET compiler.
3084 (Interface_Name): Add missing documentation on JGNAT only uses of
3087 2011-08-02 Geert Bosch <bosch@adacore.com>
3089 * cstand.adb (Back_End_Float_Types): Use Elist instead of Nlist
3090 (Find_Back_End_Float_Type): Likewise
3091 (Create_Back_End_Float_Types): Likewise
3092 (Create_Float_Types): Likewise
3093 (Register_Float_Type): Likewise
3094 * sem_ch3.adb (Floating_Point_Type_Declaration): Use Elist instead of
3095 Nlist and split out type selection in new local Find_Base_Type function.
3096 * sem_prag.adb (Process_Import_Predefined_Type): Use Elist instead of
3098 * stand.ads (Predefined_Float_Types): Use Elist instead of Nlist
3100 2011-08-02 Robert Dewar <dewar@adacore.com>
3102 * inline.adb: Minor code reorganization (put Get_Code_Unit_Entity in
3104 * opt.ads: Minor comment change.
3105 * sem_ch12.adb: Minor code reorganization.
3107 2011-08-02 Gary Dismukes <dismukes@adacore.com>
3109 * sem_ch3.adb (Complete_Private_Subtype): Don't append the private
3110 subtype's list of rep items to the list on the full subtype in the case
3111 where the lists are the same.
3113 2011-08-02 Geert Bosch <bosch@adacore.com>
3115 * switch-c.adb (Free): New deallocation procedure to avoid implicitly
3116 using the one from System.Strings, which also deallocates all strings.
3118 2011-08-02 Geert Bosch <bosch@adacore.com>
3120 * gcc-interface/gigi.h, gcc-interface/misc.c (enumerate_modes): New
3122 * gcc-interface/Make-lang.in: Update dependencies.
3124 2011-08-02 Olivier Hainque <hainque@adacore.com>
3126 * gcc-interface/trans.c (Subprogram_Body_to_gnu): Set the function
3129 2011-08-02 Javier Miranda <miranda@adacore.com>
3131 * sem_ch3.adb (Check_Anonymous_Access_Components): Create extra formals
3132 associated with anonymous access to subprograms.
3134 2011-08-02 Geert Bosch <bosch@adacore.com>
3137 (Preprocessing_Symbol_Defs): Move from Prepcomp.Symbol_Definitions.
3138 (Preprocessing_Symbol_Last): Move from Prepcomp.Last_Definition.
3139 * prepcomp.adb (Symbol_Definitions, Last_Definition): Move to opt.ads
3140 (Add_Symbol_Definition): Move to switch-c.adb
3141 (Process_Command_Line_Symbol_Definitions): Adjust references to above.
3142 * prepcomp.ads: Remove dependency on Ada.Unchecked_Deallocation.
3143 (Add_Symbol_Definition): Move to switch-c.adb.
3144 * sem_ch13.adb, sem_prag.adb: Add dependency on Warnsw.
3146 (Set_Dot_Warning_Switch, Set_GNAT_Mode_Warnings, Set_Warning_Switch):
3148 * sem_warn.ads (Warn_On_Record_Holes, Warn_On_Overridden_Size,
3149 Set_Dot_Warning_Switch, Set_GNAT_Mode_Warnings, Set_Warning_Switch):
3151 * switch-c.adb: Replace dependency on Prepcomp and Sem_Warn by Warnsw.
3152 (Add_Symbol_Definition): Moved from Prepcomp.
3153 * switch-c.ads: Update copyright notice. Use String_List instead of
3154 Argument_List, removing dependency on System.OS_Lib.
3156 2011-08-02 Yannick Moy <moy@adacore.com>
3158 * sem_ch3.adb (Analyze_Object_Declaration): issue an error in formal
3159 mode on initialization expression which does not respect SPARK
3161 * sem_util.adb, sem_util.ads (Is_SPARK_Initialization_Expr): determines
3162 if the tree referenced by its argument represents an initialization
3163 expression in SPARK, suitable for initializing an object in an object
3166 2011-08-02 Javier Miranda <miranda@adacore.com>
3168 * exp_ch9.adb (Expand_Access_Protected_Subprogram_Type): Link the
3169 internally generated access to subprogram with its associated protected
3171 * einfo.ads, einfo.adb (Original_Access_Type): New attribute.
3173 2011-08-02 Geert Bosch <bosch@adacore.com>
3175 * cstand.adb (Register_Float_Type): Print information about type to
3176 register, if the Debug_Flag_Dot_B is set.
3177 * debug.adb (Debug_Flag_Dot_B): Document d.b debug option.
3178 * rtsfind.ads (RE_Max_Base_Digits): New run time entity.
3179 * sem_ch3.adb (Floating_Point_Type_Declaration): Allow declarations
3180 with a requested precision of more than Max_Digits digits and no more
3181 than Max_Base_Digits digits, if a range specification is present and the
3182 Predefined_Float_Types list has a suitable type to derive from.
3183 * sem_ch3.adb (Rep_Item_Too_Early): Avoid generating error in the
3184 case of type completion with pragma Import
3186 (Process_Import_Predefined_Type): Processing to complete a type
3187 with pragma Import. Currently supports floating point types only.
3188 (Set_Convention_From_Pragma): Do nothing without underlying type.
3189 (Process_Convention): Guard against absence of underlying type,
3190 which may happen when importing incomplete types.
3191 (Process_Import_Or_Interface): Handle case of importing predefined
3192 types. Tweak error message.
3194 2011-08-02 Eric Botcazou <ebotcazou@adacore.com>
3196 * inline.adb (Add_Inlined_Body): Adjust check for library-level inlined
3197 functions to previous change. Reorganize code slightly.
3199 2011-08-02 Geert Bosch <bosch@adacore.com>
3201 * back_end.ads (Register_Type_Proc): New call back procedure type for
3202 allowing the back end to provide information about available types.
3203 (Register_Back_End_Types): New procedure to register back end types.
3204 * back_end.adb (Register_Back_End_Types): Call the back end to enumerate
3206 * cstand.adb (Back_End_Float_Types): New list for floating point types
3207 supported by the back end.
3208 (Build_Float_Type): Add extra parameter for Float_Rep_Kind.
3209 (Copy_Float_Type): New procedure to make new copies of predefined types.
3210 (Register_Float_Type): New call back procedure to populate the BEFT list
3211 (Find_Back_End_Float_Type): New procedure to find a BEFT by name
3212 (Create_Back_End_Float_Types): New procedure to populate the BEFT list.
3213 (Create_Float_Types): New procedure to create entities for floating
3214 point types predefined in Standard, and put these and any remaining
3215 BEFTs on the Predefined_Float_Types list.
3216 * stand.ads (Predefined_Float_Types): New list for predefined floating
3217 point types that do not have declarations in package Standard.
3219 2011-08-02 Eric Botcazou <ebotcazou@adacore.com>
3221 * inline.adb (Get_Code_Unit_Entity): New local function. Returns the
3222 entity node for the unit containing the parameter.
3223 (Add_Inlined_Body): Use it to find the unit containing the subprogram.
3224 (Add_Inlined_Subprogram): Likewise.
3225 * gcc-interface/Make-lang.in: Update dependencies.
3227 2011-08-02 Thomas Quinot <quinot@adacore.com>
3229 * s-stusta.adb (Print): Make sure Pos is always initialized to a
3232 2011-08-02 Geert Bosch <bosch@adacore.com>
3234 * a-calfor.adb (Image): Simplify, removing unnecessary uses of 'Image.
3236 2011-08-02 Eric Botcazou <ebotcazou@adacore.com>
3238 * sem_type.adb (Covers): Move trivial case to the top and reuse the
3239 computed value of Base_Type.
3241 2011-08-02 Yannick Moy <moy@adacore.com>
3243 * restrict.adb (Check_Restriction): issue an error for any use of
3244 class-wide, even if the No_Dispatch restriction is not set.
3245 * sem_aggr.adb: Correct typos in comments and messages in formal mode
3246 * sem_ch3.adb (Process_Full_View): issue an error in formal mode is,
3247 when completing a private extension, the type named in the private part
3248 is not the same as that named in the visible part.
3249 * sem_res.adb (Resolve_Call): issue an error in formal mode on the use
3250 of an inherited primitive operations of a tagged type or type extension
3251 that returns the tagged type.
3252 * sem_util.adb, sem_util.ads (Is_Inherited_Operation_For_Type): new
3253 function which returns True for an implicit operation inherited by the
3254 derived type declaration for the argument type.
3255 (Is_SPARK_Object_Reference): move to appropriate place in alphabetic
3258 2011-08-02 Ed Schonberg <schonberg@adacore.com>
3260 * sem_ch5.adb (Pre_Analyze_Range): new procedure extracted from
3261 Process_Bounds, to perform analysis with expansion of a range or an
3262 expression that is the iteration scheme for a loop.
3263 (Analyze_Iterator_Specification): If domain of iteration is given by a
3264 function call with a controlled result, as is the case if call returns
3265 a predefined container, ensure that finalization actions are properly
3267 * par-ch3.adb: accept Ada2012 iterator form in P_Discrete_Range.
3269 2011-08-02 Javier Miranda <miranda@adacore.com>
3271 * sem_ch5.adb (Analyze_Iteration_Scheme): Fix typo.
3272 * gcc-interface/Make-lang.in: Update dependencies.
3274 2011-08-02 Javier Miranda <miranda@adacore.com>
3276 * sem_util.ads, sem_util.adb (Is_Variable): Add a new formal to
3277 determine if the analysis is performed using N or Original_Node (N).
3278 * exp_util.adb (Side_Effect_Free): Code cleanup since the new
3279 functionality of routine Is_Variable avoids code duplication.
3280 * checks.adb (Determine_Range): Handle temporaries generated by
3281 Remove_Side_Effects.
3283 2011-08-02 Javier Miranda <miranda@adacore.com>
3285 * exp_ch4.adb (Expand_N_Quantified_Expression): Force reanalysis and
3286 expansion of the condition. Required since the previous analysis was
3287 done with expansion disabled (see Resolve_Quantified_Expression) and
3288 hence checks were not inserted and record comparisons have not been
3291 2011-08-02 Ed Falis <falis@adacore.com>
3293 * s-taprop-vxworks.adb, s-intman-vxworks.adb, s-intman-vxworks.ads:
3296 2011-08-02 Bob Duff <duff@adacore.com>
3298 * opt.ads: Minor comment fix.
3300 2011-08-02 Bob Duff <duff@adacore.com>
3302 * sem_ch12.adb (Analyze_Package_Instantiation,
3303 Analyze_Subprogram_Instantiation): Turn off style checking while
3304 analyzing an instance. Whatever style checks that apply to the generic
3305 unit should apply, so it makes no sense to apply them in an instance.
3306 This was causing trouble when compiling an instance of a runtime
3307 unit that violates the -gnatyO switch.
3308 * stylesw.adb (Set_Style_Check_Options): "when 'O' =>" was missing from
3309 one of the two case statements, causing spurious errors.
3311 2011-08-02 Robert Dewar <dewar@adacore.com>
3313 * uname.adb: Minor reformatting.
3314 * gnatcmd.adb: Minor reformatting.
3315 * exp_attr.adb: Minor reformatting.
3317 2011-08-02 Ed Schonberg <schonberg@adacore.com>
3319 * exp_ch5.adb (Expand_N_Assignment_Statement): under restriction
3320 No_Dispatching_Calls, do not look for the Assign primitive, because
3321 predefined primitives are not created in this case.
3323 2011-08-02 Bob Duff <duff@adacore.com>
3325 * stylesw.ads: Minor comment fixes.
3327 2011-08-02 Robert Dewar <dewar@adacore.com>
3329 * freeze.adb (Add_To_Result): New procedure.
3331 2011-08-02 Jose Ruiz <ruiz@adacore.com>
3333 * exp_attr.adb (Find_Stream_Subprogram): When using a configurable run
3334 time, if the specific run-time routines for handling streams of strings
3335 are not available, use the default mechanism.
3337 2011-08-02 Arnaud Charlet <charlet@adacore.com>
3339 * s-regpat.ads: Fix typo.
3341 2011-08-02 Vincent Celier <celier@adacore.com>
3343 * prj-conf.adb (Get_Or_Create_Configuration_File): If On_Load_Config is
3344 not null, call it to create the in memory config project file without
3345 parsing an existing default config project file.
3347 2011-08-02 Eric Botcazou <ebotcazou@adacore.com>
3349 * atree.adb (Allocate_Initialize_Node): Remove useless temporaries.
3351 2011-08-02 Ed Schonberg <schonberg@adacore.com>
3353 * sem_elim.adb: an abstract subprogram does not need an eliminate
3354 pragma for its descendant to be eliminable.
3356 2011-08-02 Ed Falis <falis@adacore.com>
3358 * init.c: revert to handling before previous checkin for VxWorks
3359 * s-intman-vxworks.adb: delete unnecessary declarations related to
3360 using Ada interrupt facilities for handling signals.
3361 Delete Initialize_Interrupts. Use __gnat_install_handler instead.
3362 * s-intman-vxworks.ads: Import __gnat_install_handler as
3363 Initialize_Interrupts.
3364 * s-taprop-vxworks.adb: Delete Signal_Mask.
3365 (Abort_Handler): change construction of mask to unblock exception
3368 2011-08-02 Jerome Guitton <guitton@adacore.com>
3370 * a-except-2005.adb (Raise_From_Signal_Handler): Call
3371 Debug_Raise_Exception before propagation starts.
3373 2011-08-02 Eric Botcazou <ebotcazou@adacore.com>
3375 * exp_ch6.adb (Expand_Call): Guard restriction checks with a call
3376 to Restriction_Check_Required.
3377 * sem_ch3.adb (Analyze_Object_Declaration): Likewise.
3378 * sem_res.adb (Resolve_Call): Likewise.
3379 * sem_attr.adb (Check_Stream_Attribute): Likewise.
3381 2011-08-02 Bob Duff <duff@adacore.com>
3383 * stylesw.ads: Update comment.
3384 * style.adb: Minor: Use Error_Msg_NE instead of Error_Msg_N.
3385 * errout.ads: Remove obsolete comment.
3387 2011-08-02 Javier Miranda <miranda@adacore.com>
3389 * einfo.ads, einfo.adb (Is_Safe_To_Reevaluate): new function.
3390 (Set_Is_Safe_To_Reevaluate): new procedure.
3391 * sem_ch5.adb (Analyze_Assignment): Add one assertion to ensure that no
3392 assignment is allowed on safe-to-reevaluate variables.
3393 (Analyze_Iteration_Schine.Process_Bounds.One_Bound): Decorate the
3394 temporary created to remove side effects in expressions that use
3395 the secondary stack as safe-to-reevaluate.
3396 * exp_util.adb (Side_Effect_Free): Add missing code to handle well
3397 variables that are not true constants.
3399 2011-08-02 Robert Dewar <dewar@adacore.com>
3401 * sem_ch5.adb, sem_ch7.adb, einfo.ads, sem_util.adb, sem_util.ads,
3402 sem_res.adb, sem_ch6.adb: Minor reformatting.
3404 2011-08-02 Jerome Guitton <guitton@adacore.com>
3406 * a-except-2005.adb (Raise_Current_Excep): Remove obsolete dead code.
3408 2011-08-02 Ed Schonberg <schonberg@adacore.com>
3410 * sem_ch6.adb (New_Overloaded_Entity, Check_Overriding_Indicator): Do
3411 not set Overridden_Operation if subprogram is an initialization
3414 2011-08-02 Yannick Moy <moy@adacore.com>
3416 * par-ch6.adb: Correct obsolete name in comments
3417 * restrict.adb, restrict.ads (Check_Formal_Restriction): new function
3418 which takes two message arguments (existing function takes one), with
3419 second message used for continuation.
3420 * sem_ch5.adb (Analyze_Block_Statement): in formal mode, only reject
3421 block statements that originate from a source block statement, not
3422 generated block statements
3423 * sem_ch6.adb (Analyze_Function_Call): rename L into Actuals, for
3424 symmetry with procedure case
3425 * sem_ch7.adb (Check_One_Tagged_Type_Or_Extension_At_Most): new
3426 function to issue an error in formal mode if a package specification
3427 contains more than one tagged type or type extension.
3428 * sem_res.adb (Resolve_Actuals): in formal mode, check that actual
3429 parameters matching formals of tagged types are objects (or ancestor
3430 type conversions of objects), not general expressions. Issue an error
3431 on view conversions that are not involving ancestor conversion of an
3433 (Resolve_Type_Conversion): in formal mode, issue an error on the
3434 operand of an ancestor type conversion which is not an object
3435 * sem_util.adb, sem_util.ads (Find_Actual): extend the behavior of the
3436 procedure so that it works also for actuals of function calls
3437 (Is_Actual_Tagged_Parameter): new function which determines if its
3438 argument is an actual parameter of a formal of tagged type in a
3440 (Is_SPARK_Object_Reference): new function which determines if the tree
3441 referenced by its argument represents an object in SPARK
3443 2011-08-02 Robert Dewar <dewar@adacore.com>
3445 * sem_ch3.adb: Minor reformatting
3446 Minor comment addition
3447 Minor error msg text change
3449 2011-08-02 Javier Miranda <miranda@adacore.com>
3451 * sem_ch5.adb (Analyze_Iteration_Scheme.Uses_Secondary_Stack): New
3452 function. Used to be more precise when we generate a variable plus one
3453 assignment to remove side effects in the evaluation of the Bound
3455 (Analyze_Iteration_Scheme): Clean attribute analyzed in all the nodes
3456 of the bound expression to force its re-analysis and thus expand the
3457 associated transient scope (if required). Code cleanup replacing the
3458 previous code that declared the constant entity by an invocation to
3459 routine Force_Evaluation which centralizes this work in the frontend.
3461 2011-08-02 Robert Dewar <dewar@adacore.com>
3463 * einfo.adb (Is_Base_Type): Improve efficiency by using a flag table
3464 (Base_Type): Now uses improved Is_Base_Type function
3465 * einfo.ads (Base_Type): Inline this function
3467 2011-08-02 Robert Dewar <dewar@adacore.com>
3469 * sem_prag.adb (Analyze_Pragma): Defend against infinite recursion
3470 (Analyze_Aspect_Specifications): Fix Sloc values for constructed pragmas
3472 2011-08-02 Arnaud Charlet <charlet@adacore.com>
3474 * gcc-interface/Make-lang.in: Update dependencies.
3475 * gcc-interface/Makefile.in: Use s-inmapop-vxworks.adb for all VxWorks
3478 2011-08-02 Yannick Moy <moy@adacore.com>
3480 * par-ch3.adb (P_Delta_Constraint): issue an error in formal mode on
3481 non-simple expression used in delta constraint
3482 (P_Index_Or_Discriminant_Constraint): issue an error in formal mode on
3483 index constraint which is not a subtype mark
3484 * par.adb: With and use Restrict
3485 * sem_ch3.adb (Analyze_Component_Declaration): issue an error in formal
3486 mode on component type which is not a subtype mark and default
3487 expression on component
3488 (Analyze_Subtype_Declaration): issue an error in formal mode on subtype
3489 of string which does not have a lower index bound equal to 1
3490 (Array_Type_Declaration): issue an error in formal mode on index or
3491 component type which is not a subtype mark, and on aliased keyword on
3493 (Derived_Type_Declaration): issue an error in formal mode on interface,
3494 limited or abstract type
3495 (Record_Type_Declaration): issue an error in formal mode on interface
3496 (Record_Type_Definition): issue an error in formal mode on tagged types
3497 and type extensions not declared in the specification of a library unit
3498 package; on null non-tagged record; on variant part
3500 2011-08-02 Vincent Celier <celier@adacore.com>
3502 * prj-nmsc.adb (Check_Library_Attributes): Do not report Library_Dir
3503 not declared for qualified library project when Library_Name is not
3504 declared, but Library_Dir is.
3506 2011-08-02 Robert Dewar <dewar@adacore.com>
3508 * sem_ch13.adb (Analyze_Aspect_Specification): Fix slocs on generated
3509 pragmas (affects aspects [Component_]Default_Value
3510 (Check_Aspect_At_Freeze_Point): For Component_Default_Value, use
3511 component type for the resolution
3513 2011-08-02 Eric Botcazou <ebotcazou@adacore.com>
3515 * einfo.adb (Base_Type): Tune implementation for speed.
3517 2011-08-02 Robert Dewar <dewar@adacore.com>
3519 * freeze.adb: Minor reformatting.
3521 2011-08-02 Thomas Quinot <quinot@adacore.com>
3523 * scos.ads: Update comments.
3525 2011-08-02 Ed Schonberg <schonberg@adacore.com>
3527 * sem_ch3.adb (Build_Derived_Type): Inherit the convention from the
3528 base type, because the parent may be a subtype of a private type whose
3529 convention is established in a private part.
3531 2011-08-02 Hristian Kirtchev <kirtchev@adacore.com>
3533 * exp_ch6.adb (Expand_N_Extended_Return_Statement): Wrap the return
3534 statement in a block when the expansion of the return expression has
3535 created a finalization chain.
3536 * freeze.adb (Freeze_Expression): Alphabetize all choices associated
3537 with the parent node.
3538 Add N_Extended_Return_Statement to handle the case where a transient
3539 object declaration appears in the Return_Object_Declarations list of
3540 an extended return statement.
3542 2011-08-02 Matthew Gingell <gingell@adacore.com>
3544 * adaint.c (__gnat_is_symbolic_link_attr): Supress warning on possibly
3545 unused parameter 'name'.
3547 2011-08-02 Ed Schonberg <schonberg@adacore.com>
3549 * sem_elim.adb (Set_Eliminated): If the overridden operation is an
3550 inherited operation, check whether its alias, which is the source
3551 operastion that it renames, has been marked eliminated.
3553 2011-08-02 Javier Miranda <miranda@adacore.com>
3555 * exp_util.adb (Safe_Prefixed_Reference): Do not consider safe an
3556 in-mode parameter whose type is an access type since it can be used to
3557 modify its designated object. Enforce code that handles as safe an
3558 access type that is not access-to-constant but it is the result of a
3559 previous removal of side-effects.
3560 (Remove_Side_Effects): Minor code reorganization of cases which require
3561 no action. Done to incorporate documentation on new cases uncovered
3562 working in this ticket: no action needed if this routine was invoked
3563 too early and the nodes are not yet decorated.
3564 * sem_res.adb (Resolve_Slice): Minor code cleanup replacling two calls
3565 to routine Remove_Side_Effects by calls to Force_Evaluation since they
3566 were issued with actuals that are implicitly provided by
3569 2011-08-02 Robert Dewar <dewar@adacore.com>
3571 * sem_ch3.adb, sem_res.adb: Minor reformatting.
3573 2011-08-02 Yannick Moy <moy@adacore.com>
3575 * sem_attr.adb (Check_Formal_Restriction_On_Attribute): new procedure
3576 to issue an error in formal mode on attribute not supported in this mode
3577 (Analyze_Attribute): issue errors on standard attributes not supported
3579 * sem_ch3.adb (Modular_Type_Declaration): remove obsolete part of
3580 comment, and issue error in formal mode on modulus which is not a power
3582 (Process_Range_Expr_In_Decl): issue error in formal mode on non-static
3584 * sem_ch8.adb (Find_Type): issue error in formal mode on 'Base in
3586 * sem_res.adb (Resolve_Unary_Op): issue error in formal mode on unary
3587 operator on modular type (except 'not').
3589 2011-08-02 Robert Dewar <dewar@adacore.com>
3591 * gnat_rm.texi: Minor reformatting.
3593 2011-08-02 Arnaud Charlet <charlet@adacore.com>
3595 * s-osinte-linux.ads: Minor comment update and reformatting.
3596 * i-cexten.ads: Make this unit pure, as for its parent.
3597 Will allow its usage in more contexts if needed.
3599 2011-08-02 Robert Dewar <dewar@adacore.com>
3601 * s-utf_32.ads: Minor comment fix.
3603 2011-08-02 Ed Schonberg <schonberg@adacore.com>
3605 * sem_res.adb (Resolve_Actuals): if the subprogram is a primitive
3606 operation of a tagged synchronized type, handle the case where the
3607 controlling argument is overloaded.
3609 2011-08-02 Yannick Moy <moy@adacore.com>
3611 * gnat_rm.texi, opt.ads, sem_prag.adb, snames.ads-tmpl:
3612 Replace pragma SPARK_95 with pragma Restrictions (SPARK)
3613 * par-prag.adb (Process_Restrictions_Or_Restriction_Warnings): set
3614 SPARK mode and formal verification mode on processing SPARK restriction
3615 * s-rident.ads (Restriction_Id): add SPARK restriction in those not
3616 requiring consistency checking.
3618 2011-08-02 Robert Dewar <dewar@adacore.com>
3620 * sem_res.adb: Minor reformatting.
3622 2011-08-02 Robert Dewar <dewar@adacore.com>
3624 * a-cfdlli.ads, a-cfhase.ads, a-cforma.ads, a-cfhama.ads,
3625 a-cforse.ads: Remove unneeded with of Ada.Containers
3626 Remove commented out pragma Inline's
3627 Move specifications of new subprograms to the actual specs
3629 2011-08-02 Yannick Moy <moy@adacore.com>
3631 * a-cfdlli.ads, a-cfhase.ads, a-cforma.ads, a-cfhama.ads,
3632 a-cforse.ads: Update comments.
3634 2011-08-02 Ed Schonberg <schonberg@adacore.com>
3636 * sem_attr.adb: add attribute name when 'Result has the wrong prefix.
3638 2011-08-02 Robert Dewar <dewar@adacore.com>
3640 * a-cfdlli.ads, a-cfhase.ads, a-cforma.ads, a-cfhama.ads,
3641 a-cforse.ads, a-cofove.ads: Minor reformatting.
3643 2011-08-02 Claire Dross <dross@adacore.com>
3645 * a-cfdlli.ads, a-cfhase.ads, a-cforma.ads, a-cfhama.ads, a-cforse.ads,
3646 a-cofove.ads: Add comments.
3648 2011-08-02 Yannick Moy <moy@adacore.com>
3650 * gnat_rm.texi: Document formal containers.
3652 2011-08-02 Emmanuel Briot <briot@adacore.com>
3654 * g-comlin.adb (Goto_Section, Getopt): fix handling of "*" when there
3657 2011-08-02 Robert Dewar <dewar@adacore.com>
3659 * mlib-prj.adb, restrict.ads, sem_aggr.adb, sem_ch12.adb: Minor
3662 2011-08-02 Robert Dewar <dewar@adacore.com>
3664 * aspects.adb: New aspects Default_Value and Default_Component_Value
3665 New format of Aspect_Names table checks for omitted entries
3666 * aspects.ads: Remove mention of Aspect_Cancel and add documentation on
3667 handling of boolean aspects for derived types.
3668 New aspects Default_Value and Default_Component_Value
3669 New format of Aspect_Names table checks for omitted entries
3670 * einfo.ads, einfo.adb (Has_Default_Component_Value): New flag
3671 (Has_Default_Value): New flag
3672 (Has_Default_Component_Value): New flag
3673 (Has_Default_Value): New flag
3674 * par-ch13.adb (P_Aspect_Specifications): New format of Aspect_Names
3676 * par-prag.adb: New pragmas Default_Value and Default_Component_Value
3677 * sem_ch13.adb (Analyze_Aspect_Specifications): New aspects
3678 Default_Value and Default_Component_Value
3679 * sem_prag.adb: New pragmas Default_Value and Default_Component_Value
3680 New aspects Default_Value and Default_Component_Value
3681 * snames.ads-tmpl: New pragmas Default_Value and Default_Component_Value
3682 * sprint.adb: Print N_Aspect_Specification node when called from gdb
3684 2011-08-02 Vincent Celier <celier@adacore.com>
3686 * prj-nmsc.adb (Check_Library_Attributes): For virtual library project,
3687 inherit library kind.
3689 2011-08-02 Ed Schonberg <schonberg@adacore.com>
3691 * sem_res.adb: Add guards in calls to Matching_Static_Array_Bounds.
3694 2011-08-02 Robert Dewar <dewar@adacore.com>
3696 * i-cstrin.ads: Updates to make Interfaces.C.Strings match RM
3698 2011-08-02 Yannick Moy <moy@adacore.com>
3700 * sem_aggr.adb (Resolve_Aggregate): Fix thinko.
3702 2011-08-02 Robert Dewar <dewar@adacore.com>
3704 * impunit.adb: Add comment.
3706 2011-08-02 Yannick Moy <moy@adacore.com>
3708 * sem_aggr.adb (Check_Qualified_Aggregate): new procedure which checks
3709 qualification of aggregates in formal mode
3710 (Is_Top_Level_Aggregate): returns True for an aggregate not contained in
3712 (Resolve_Aggregate): complete the test that an aggregate is adequately
3713 qualified in formal mode
3715 2011-08-02 Pascal Obry <obry@adacore.com>
3717 * make.adb, bindgen.adb, gnatbind.adb: Minor reformatting.
3718 * mlib-prj.adb: Supress warning when compiling binder generated file.
3719 (Build_Library): Supress all warnings when compiling the binder
3722 2011-08-02 Yannick Moy <moy@adacore.com>
3724 * errout.adb, errout.ads (Check_Formal_Restriction): move procedure
3726 * restrict.adb, restrict.ads (Check_Formal_Restriction): ...to here
3727 * sem_aggr.adb, sem_ch5.adb, sem_util.adb:
3728 Add with/use clauses to make Check_Formal_Restriction visible
3730 2011-08-02 Ed Schonberg <schonberg@adacore.com>
3732 * sem_ch12.adb (Check_Generic_Actuals): handle properly actual
3733 in-parameters when type of the generic formal is private in the generic
3734 spec and non-private in the body.
3736 2011-08-02 Claire Dross <dross@adacore.com>
3738 * a-cfdlli.adb, a-cfdlli.ads, a-cfhase.adb, a-cfhase.ads, a-cfhama.adb,
3739 a-cfhama.ads, a-cforse.adb, a-cforse.ads, a-cforma.adb, a-cforma.ads,
3740 a-cofove.adb, a-cofove.ads: New files implementing formal containers.
3741 * impunit.adb, Makefile.rtl: Take new files into account.
3743 2011-08-02 Robert Dewar <dewar@adacore.com>
3745 * sem_aggr.adb, sem_ch3.adb, sem_ch5.adb, make.adb, sem_res.adb,
3746 sem_attr.adb, sem_ch6.adb, sem_ch8.adb: Minor reformatting.
3748 2011-08-02 Yannick Moy <moy@adacore.com>
3750 * sem_aggr.adb (Resolve_Aggregate): disable incorrectly placed check in
3752 * sem_util.adb (Matching_Static_Array_Bounds): proper detection of
3753 matching static array bounds, taking into account the special case of
3755 * sem_ch3.adb: Typo in comment.
3757 2011-08-02 Yannick Moy <moy@adacore.com>
3759 * errout.adb, errout.ads (Check_Formal_Restriction): new procedure
3760 which issues an error in formal mode if its argument node is originally
3762 * sem_ch3.adb (Analyze_Full_Type_Declaration): move test that a type
3763 has a discriminant specification so that it does not include the case
3765 (Derived_Type_Declaration): move here the test that a derived type has a
3766 discriminant specification
3767 * sem_aggr.adb (Resolve_Record_Aggregate): test the presence of the
3768 first element of a component association before accessing its choices
3769 (presence of component association is not enough)
3770 * exp_ch6.adb (Expand_N_Subprogram_Declaration): test if a subprogram
3771 declaration is a library item before accessing the next element in a
3772 list, as library items are not member of lists
3773 * sem_attr.adb, sem_ch11.adb, sem_ch4.adb, sem_ch5.adb, sem_ch6.adb,
3774 sem_ch8.adb, sem_ch9.adb, sem_res.adb, sem_util.adb: use
3775 Check_Formal_Restriction whenever possible.
3777 2011-08-02 Ed Schonberg <schonberg@adacore.com>
3779 * sem_ch3.adb (Find_Type_Of_Object): In ASIS mode, create an itype
3780 reference when needed.
3782 2011-08-02 Bob Duff <duff@adacore.com>
3784 * gnat_ugn.texi: Fix typo.
3786 2011-08-02 Vincent Celier <celier@adacore.com>
3788 * make.adb (Gnatmake): Use MLib.Tgt.Archive_Ext as the extension of
3789 archive file name. Do not use the full path name of archives for Open
3792 2011-08-02 Robert Dewar <dewar@adacore.com>
3794 * sem_ch12.adb, sem_ch11.adb: New calling sequence for
3795 Analyze_Aspect_Specifications
3797 (Analyze_Aspect_Specifications): New handling for boolean aspects
3798 * sem_ch13.ads (Analyze_Aspect_Specifications): New calling sequence
3799 * sem_ch3.adb, sem_ch6.adb, sem_ch7.adb, sem_ch9.adb: New calling
3800 sequence for Analyze_Aspect_Specifications
3801 * sem_prag.adb (Analyze_Pragma): Remove use of Aspect_Cancel entirely
3802 * sinfo.ads, sinfo.adb (Aspect_Cancel): Remove, no longer used
3804 2011-08-02 Robert Dewar <dewar@adacore.com>
3806 * freeze.adb (Freeze_Entity): Remove handling of delayed boolean
3807 aspects, since these no longer exist.
3809 2011-08-02 Robert Dewar <dewar@adacore.com>
3811 * par-ch13.adb (Aspect_Specifications_Present): Always return false on
3812 semicolon, do not try to see if there are aspects following it.
3813 * par-ch3.adb (P_Declarative_Items): Better message for unexpected
3816 2011-08-02 Robert Dewar <dewar@adacore.com>
3818 * sem_ch8.adb, aspects.ads: Minor reformatting.
3820 2011-08-02 Eric Botcazou <ebotcazou@adacore.com>
3822 * sem_ch13.ads (Analyze_Aspect_Specification): Add pragma Inline.
3823 * sem_ch13.adb (Analyze_Non_Null_Aspect_Specifications): New procedure
3825 (Analyze_Aspect_Specifications): ...here. Call above procedure.
3827 2011-08-02 Yannick Moy <moy@adacore.com>
3829 * exp_ch6.adb (Expand_N_Subprogram_Declaration): issue error in formal
3830 mode on subprogram declaration outside of package specification, unless
3831 it is followed by a pragma Import
3832 * sem_ch3.adb (Access_Definition, Access_Subprogram_Declaration,
3833 Access_Type_Declaration): issue error in formal mode on access type
3834 (Analyze_Incomplete_Type_Decl): issue error in formal mode on
3836 (Analyze_Object_Declaration): issue error in formal mode on object
3837 declaration which does not respect SPARK restrictions
3838 (Analyze_Subtype_Declaration): issue error in formal mode on subtype
3839 declaration which does not respect SPARK restrictions
3840 (Constrain_Decimal, Constrain_Float, Constrain_Ordinary_Fixed): issue
3841 error in formal mode on digits or delta constraint
3842 (Decimal_Fixed_Point_Type_Declaration): issue error in formal mode on
3843 decimal fixed point type
3844 (Derived_Type_Declaration): issue error in formal mode on derived type
3845 other than type extensions of tagged record types
3846 * sem_ch6.adb (Process_Formals): remove check in formal mode, redundant
3847 with check on access definition
3848 * sem_ch9.adb (Analyze_Protected_Definition): issue error in formal
3849 mode on protected definition.
3850 (Analyze_Task_Definition): issue error in formal mode on task definition
3852 2011-08-02 Robert Dewar <dewar@adacore.com>
3854 * make.adb, sem_ch8.adb, s-inmaop-vxworks.adb: Minor reformatting.
3856 2011-08-02 Javier Miranda <miranda@adacore.com>
3858 * sem_ch6.adb (Can_Override_Operator): New function.
3859 (Verify_Overriding_Indicator): Add missing code to check overriding
3860 indicator in operators. Fixes regression.
3861 (Check_Overriding_Indicator): Minor reformating after replacing the
3862 code that evaluates if the subprogram can override an operator by
3863 invocations to the above new function.
3865 (Write_Field26_Name): Add missing code to ensure that, following
3866 the documentation in einfo.ads, this field is not shown as attribute
3867 "Static_Initialization" on non-dispatching functions.
3869 2011-08-02 Jose Ruiz <ruiz@adacore.com>
3871 * sem_res.adb (Resolve_Call): A call to
3872 Ada.Real_Time.Timing_Events.Set_Handler violates restriction
3873 No_Relative_Delay (AI-0211) only when it sets a relative timing event,
3874 i.e., when the second parameter is of type Time_Span.
3876 2011-08-02 Vincent Celier <celier@adacore.com>
3878 * make.adb (Gnatmake): use <library dir>/lib<library name>.a to link
3879 with an archive instead of -L<library dir> -l<library name>.
3881 2011-08-02 Ed Schonberg <schonberg@adacore.com>
3883 * sem_ch8.adb (Analyze_Use_Type): If the clause is being re-analyzed,
3884 mark the base types In_Use in addition to making the operations
3887 2011-08-02 Ed Falis <falis@adacore.com>
3889 * init.c: add and setup __gnat_signal_mask for the exception signals
3890 * s-inmaop-vxworks.adb: new file.
3891 * s-intman-vxworks.adb: remove unnecessary initializations and
3893 * s-intman-vxworks.ads: remove unnecessary variable
3894 * s-taprop-vxworks.adb: simplify signal initialization
3896 2011-08-02 Robert Dewar <dewar@adacore.com>
3898 * sem_ch8.adb: Minor code reorganization, comment updates.
3900 2011-08-02 Robert Dewar <dewar@adacore.com>
3902 * sem_res.adb (Matching_Static_Array_Bounds): Moved to Sem_Util
3903 * sem_util.ads, sem_util.adb (Matching_Static_Array_Bounds): Moved
3905 (Matching_Static_Array_Bounds): Use Is_Ok_Static_Expression
3906 (Matching_Static_Array_Bounds): Moved here from Sem_Res
3908 2011-08-02 Ed Schonberg <schonberg@adacore.com>
3910 * atree.h, atree.ads, atree.adb: New subprograms to manipulate Elist5.
3911 * par_ch8.adb (P_Use_Type): initialize Used_Operations for node.
3912 * sinfo.ads, sinfo.adb (Used_Operations): new attribute of
3913 use_type_clauses, to handle more efficiently use_type and use_all_type
3915 * sem_ch8.adb: Rewrite Use_One_Type and End_Use_Type to handle the
3916 Ada2012 Use_All_Type clause.
3917 (Use_Class_Wide_Operations): new procedure.
3919 2011-08-02 Robert Dewar <dewar@adacore.com>
3921 * exp_util.adb, par-ch10.adb, par-ch6.adb, sem.adb, sem_ch6.adb,
3922 sem_ch6.ads, sinfo.adb, sinfo.ads, sprint.adb: Change parameterized
3923 expression to expression function.
3925 2011-08-02 Ed Schonberg <schonberg@adacore.com>
3927 * sem_ch4.adb: transform simple Ada2012 membership into equality only
3928 if types are compatible.
3930 2011-08-02 Yannick Moy <moy@adacore.com>
3932 * sem_res.adb (Matching_Static_Array_Bounds): new function which
3933 returns True if its argument array types have same dimension and same
3934 static bounds at each index.
3935 (Resolve_Actuals): issue an error in formal mode on actuals passed as
3936 OUT or IN OUT paramaters which are not view conversions in SPARK.
3937 (Resolve_Arithmetic_Op): issue an error in formal mode on
3938 multiplication or division with operands of fixed point types which are
3939 not qualified or explicitly converted.
3940 (Resolve_Comparison_Op): issue an error in formal mode on comparisons of
3941 Boolean or array type (except String) operands.
3942 (Resolve_Equality_Op): issue an error in formal mode on equality
3943 operators for array types other than String with non-matching static
3945 (Resolve_Logical_Op): issue an error in formal mode on logical operators
3946 for array types with non-matching static bounds. Factorize the code in
3947 Matching_Static_Array_Bounds.
3948 (Resolve_Qualified_Expression): issue an error in formal mode on
3949 qualified expressions for array types with non-matching static bounds.
3950 (Resolve_Type_Conversion): issue an error in formal mode on type
3951 conversion for array types with non-matching static bounds
3953 2011-08-02 Robert Dewar <dewar@adacore.com>
3955 * par-ch10.adb: Minor code reorganization (use Nkind_In).
3957 2011-08-02 Ed Schonberg <schonberg@adacore.com>
3959 * par-ch9.adb: save location of entry for proper error message.
3961 2011-08-02 Javier Miranda <miranda@adacore.com>
3963 * sem_type.ads, sem_type.adb (Is_Ancestor): Addition of a new formal
3964 (Use_Full_View) which permits this routine to climb through the
3965 ancestors using the full-view of private parents.
3966 * sem_util.adb (Collect_Interfaces_Info, Implements_Interface): Set
3967 Use_Full_View to true in calls to Is_Ancestor.
3968 * sem_disp.adb (Override_Dispatching_Operation): Set Use_Full_View to
3969 true in call to Is_Ancestor.
3970 * exp_ch3.adb (Build_Offset_To_Top_Functions, Initialize_Tag): Set
3971 Use_Full_View to true in call to Is_Ancestor.
3972 * exp_ch7.adb (Controller_Component): Set Use_Full_View to true in
3973 call to Is_Ancestor.
3974 * exp_ch4.adb (Expand_N_Type_Conversion, Tagged_Membership): Set
3975 Use_Full_View to true in calls to Is_Ancestor.
3976 * exp_disp.adb (Expand_Interface_Actuals, Make_Secondary_DT, Make_DT,
3977 Make_Select_Specific_Data_Table, Register_Primitive,
3978 Set_All_DT_Position): Set Use_Full_View to true in calls to Is_Ancestor.
3979 * exp_intr.adb (Expand_Dispatching_Constructor_Call): Set Use_Full_View
3980 to true in call to Is_Ancestor.
3981 * exp_util.adb (Find_Interface_ADT, Find_Interface_Tag): Set
3982 Use_Full_View to true in calls to Is_Ancestor.
3984 (Write_Call_Info): Set Use_Full_View to true in call to Is_Ancestor.
3985 (Write_Type_Info): Set Use_Full_View to true in call to Is_Ancestor.
3987 2011-08-02 Robert Dewar <dewar@adacore.com>
3989 * gnat_rm.texi: Minor reformatting.
3990 * sem_prag.adb: Minor reformatting.
3992 2011-08-02 Tristan Gingold <gingold@adacore.com>
3994 * vms_data.ads: Add VMS qualifier for -gnateP.
3996 2011-08-02 Robert Dewar <dewar@adacore.com>
3998 * par-ch13.adb (P_Aspect_Specification): New meaning of Decl = Empty
3999 * par-ch7.adb (P_Package): Proper placement of aspects for package
4001 * par-endh.adb (Check_End): Ad Is_Sloc parameter
4002 (End_Statements): Add Is_Sloc parameterr
4003 * par.adb (P_Aspect_Specification): New meaning of Decl = Empty
4004 (Check_End): Ad Is_Sloc parameter
4005 (End_Statements): Add Is_Sloc parameterr
4007 2011-08-02 Vincent Celier <celier@adacore.com>
4009 * ug_words: Add VMS qualifier equivalent to -gnateP:
4010 /SYMBOL_PREPROCESSING.
4012 2011-08-02 Jose Ruiz <ruiz@adacore.com>
4014 * gnat-style.texi: For hexadecimal numeric literals the typical
4015 grouping of digits is 4 to represent 2 bytes.
4016 A procedure spec which is split into several lines is indented two
4019 2011-08-02 Yannick Moy <moy@adacore.com>
4021 * exp_aggr.adb (Is_Others_Aggregate): move function to other unit.
4022 * sem_aggr.adb, sem_aggr.ads (Is_Others_Aggregate): move function here
4023 (Resolve_Aggregate): issue errors in formal modes when aggregate is not
4025 (Resolve_Array_Aggregate): issue errors in formal modes on non-static
4026 choice in array aggregate
4027 (Resolve_Extension_Aggregate): issue errors in formal modes on subtype
4029 (Resolve_Record_Aggregate): issue errors in formal modes on mixed
4030 positional and named aggregate for record, or others in record
4031 aggregate, or multiple choice in record aggregate
4032 * sem_res.adb (Resolve_Logical_Op): issue errors in formal mode when
4033 array operands to logical operations AND, OR and XOR do not have the
4034 same static lower and higher bounds
4035 * sem_ch5.adb, sinfo.ads: Correct typos in comments
4037 2011-08-01 Robert Dewar <dewar@adacore.com>
4039 * sem_util.ads, sem_util.adb, sem_ch6.adb (Last_Source_Statement):
4040 Replaces Last_Source_Node_In_Sequence.
4041 * err_vars.ads (Error_Msg_Lang): 16 is OK, don't need 4K
4042 * errout.adb (Set_Error_Msg_Lang): Takes arg with no parens, but stores
4043 parens and blank in string (this was inconsistently implemented).
4045 (Set_Error_Msg_Lang): Takes arg with no parens, but stores parens and
4046 blank in string (this was inconsistently implemented).
4048 (Set_Global_Switches): Set formal mode switches appropriately
4049 * opt.ads, opt.adb: Formal mode is now global switches, more consistent
4051 (Analyze_Pragma, case SPARK_95): Set opt switches appropriately and
4052 call Set_Error_Msg_Lang to set "spark" as language name.
4053 * par.adb: Remove unnecessary call to set formal language for errout
4054 * sem_prag.adb (P_Pragma, case SPARK_95): Set opt switches
4055 appropriately and call Set_Error_Msg_Lang to set "spark" as language
4057 * sem_ch4.adb (Analyze_Concatenation_Operand): remove procedure and
4058 calls to it, moved after resolution so that types are known
4059 * sem_res.adb (Resolve_Op_Concat): issue an error in formal mode if
4060 result of concatenation is not of type String
4061 (Resolve_Op_Concat_Arg): issue an error in formal mode if an operand of
4062 concatenation is not properly restricted
4063 * gnat_rm.texi: Add doc on pragma Spark_95.
4064 * gcc-interface/Makefile.in: Remove obsolete target pairs for
4065 Interfaces.C.* on VMS. Remove s-parame-vms-restrict.ads.
4066 * gcc-interface/Make-lang.in: Update dependencies.
4068 2011-08-01 Javier Miranda <miranda@adacore.com>
4070 * sem_disp.adb (Override_Dispatching_Operation): Enforce strictness of
4071 condition that detects if the overridden operation must replace an
4074 2011-08-01 Javier Miranda <miranda@adacore.com>
4076 * exp_ch4.adb (Expand_N_Case_Expression): Propagate to the expanded
4077 code declarations inserted by Insert_Actions in each alternative of the
4078 N_Case_Expression node.
4080 2011-08-01 Robert Dewar <dewar@adacore.com>
4082 * sem_ch6.adb: Minor code reorganization.
4083 * sem_util.adb: Minor reformatting.
4085 2011-08-01 Pascal Obry <obry@adacore.com>
4087 * prj-env.adb: Remove <prefix>/lib/gpr/<target> project search path.
4088 * gnat_ugn.texi: Add documentation for VERSIONINFO Windows resource.
4090 2011-08-01 Yannick Moy <moy@adacore.com>
4092 * par-ch4.adb (P_Name): issue a syntax error in SPARK mode on character
4093 literal or operator symbol which is prefixed
4094 * sem_attr.adb (Analyze_Access_Attribute): issue an error in formal
4095 mode on access attributes.
4096 * sem_ch4.adb (Analyze_Concatenation_Operand): new procedure to check
4097 that concatenation operands are properly restricted in formal mode
4098 (Analyze_Concatenation, Analyze_Concatenation_Rest): call new procedure
4099 Analyze_Concatenation_Operand. Issue an error in formal mode if the
4100 result of the concatenation has a type different from String.
4101 (Analyze_Conditional_Expression, Analyze_Explicit_Dereference,
4102 Analyze_Quantified_Expression, Analyze_Slice,
4103 Analyze_Null): issue an error in formal mode on unsupported constructs
4105 (Analyze_Block_Statement): only issue error on source block statement
4106 * sem_util.ads, sem_util.adb (Last_Source_Node_In_Sequence): new
4107 function which returns the last node in a list of nodes for which
4108 Comes_From_Source returns True, if any
4109 * sem_ch6.adb (Check_Missing_Return): minor refactoring to use
4110 Last_Source_Node_In_Sequence
4111 * sem_ch8.adb (Analyze_Exception_Renaming, Analyze_Generic_Renaming,
4112 Analyze_Object_Renaming, Analyze_Use_Package): issue an error in formal
4113 mode on unsupported constructs
4114 * sem_ch9.adb Do not return after issuing error in formal mode, as the
4115 rest of the actions may be needed later on since the error is marked as
4117 * sinfo.ads: Typos in comments.
4119 2011-08-01 Pascal Obry <obry@adacore.com>
4121 * projects.texi: Minor editing.
4123 2011-08-01 Yannick Moy <moy@adacore.com>
4125 * err_vars.ads (Error_Msg_Lang, Error_Msg_Langlen): new variables for
4126 insertion character ~~
4127 * errout.ads, errout.adb (Formal_Error_Msg_...): remove procedures
4128 (Set_Error_Msg_Lang): new procedure which fixes the language for use
4129 with insertion character ~~
4130 (Set_Msg_Text): treat insertion character ~~
4131 * par-ch4.adb, par-ch5.adb, par-endh.adb, sem_attr.adb, sem_ch11.adb,
4132 sem_ch3.adb, sem_ch5.adb, sem_ch9.adb, sem_util.adb: Replace calls to
4133 Formal_Error_Msg_... procedures by equivalent Error_Msg_...
4134 procedures. Favor calls to Error_Msg_F(E) over Error_Msg_N(E). Make
4135 errors related to the formal language restriction not serious
4136 (insertion character |).
4137 * par.adb (Par): set formal language for error messages if needed
4138 * sem_ch6.adb (Check_Missing_Return): take into account possible
4139 generated statements at the end of the function
4140 * snames.ads-tmpl (Name_SPARK_95, Pragma_SPARK_95): new variable and
4141 enumeration value to define a new pragma SPARK_95
4142 * opt.ads, opt.adb (SPARK_Version_Type, SPARK_Version_Default,
4143 SPARK_Version): new type and variables to store the SPARK version
4145 (SPARK_Mode): return True when SPARK_Version is set
4146 * par-prag.adb: Correct indentation
4147 (Prag): take Pragma_SPARK_95 into account
4148 * sem_prag.adb (Set_Mechanism_Value, Sig_Flags): take Pragma_SPARK_95
4151 2011-08-01 Robert Dewar <dewar@adacore.com>
4153 * sem_ch3.adb, sem_ch3.ads, sem_ch5.adb, prj-part.adb, par-ch4.adb,
4154 sem_util.adb, sem_ch4.adb, sem_ch6.adb, sem_ch6.ads, sem_ch8.adb,
4155 sem_ch8.ads, sem_ch13.ads, par-ch5.adb, prj-env.ads: Minor reformatting
4157 2011-08-01 Pascal Obry <obry@adacore.com>
4159 * prj-part.ads, prj-part.adb (Parse): Add Target_Name parameter. Pass
4160 Target_Name to Get_Path call.
4161 (Parse_Single_Project): Likewise.
4162 (Post_Parse_Context_Clause): Likewise.
4163 * prj-env.ads, prj-env.adb (Find_Project): Add Target_Name parameter.
4164 Call Initialise_Project_Path with the proper Target_Name.
4165 (Initialize_Project_Path): Add <gnat_root>/<target_name>/lib/gnat
4167 (Get_Path): Add Target_Name parameter. Call Initialise_Project_Path
4168 with the proper Target_Name.
4169 * prj-conf.adb (Get_Or_Create_Configuration_File): Pass Target_Name to
4171 (Parse_Project_And_Apply_Config): Likewise.
4172 * prj-makr.adb (Initialize): Pass empty Target_Name to Parse routine.
4173 This is fine as this part of the code is supporting only native
4175 * prj-pars.adb (Parse): Pass empty Target_Name to Parse routine. This
4176 is fine as this part of the code is supporting only native compilation.
4178 2011-08-01 Yannick Moy <moy@adacore.com>
4180 * sem_util.adb (Enter_Name): issue error in formal mode on declaration
4181 of homonym, unless the homonym is one of the cases allowed in SPARK
4182 * par-ch5.adb (Parse_Decls_Begin_End): issue error in SPARK mode for
4183 package declaration occurring after a body.
4185 2011-08-01 Robert Dewar <dewar@adacore.com>
4187 * checks.adb, exp_ch4.adb: Minor reformatting.
4189 2011-08-01 Javier Miranda <miranda@adacore.com>
4191 * einfo.ads (Access_Disp_Table): Fix documentation.
4192 (Dispatch_Table_Wrappers): Fix documentation.
4194 2011-08-01 Pascal Obry <obry@adacore.com>
4196 * prj-env.adb, prj-env.ads: Minor reformatting.
4198 2011-08-01 Yannick Moy <moy@adacore.com>
4200 * sem_util.ads, sem_util.adb, par.adb, par_util.adb
4201 (Formal_Error_Msg, Formal_Error_Msg_N, Formal_Error_Msg_SP): move
4202 procedures out of these packages.
4203 * errout.ads, errout.adb
4204 (Formal_Error_Msg, Formal_Error_Msg_N, Formal_Error_Msg_SP): move
4205 procedures in of this package
4206 (Formal_Error_Msg_NE): new procedure for wrapper on Error_Msg_NE
4207 * par-ch5.adb (Parse_Decls_Begin_End): issue syntax error in SPARK mode
4208 on misplaced later vs initial declarations, like in Ada 83
4209 * sem_attr.adb (Processing for Analyze_Attribute): issue error in
4210 formal mode on attribute of private type whose full type declaration
4212 * sem_ch3.adb (Analyze_Declarations): issue error in formal mode on a
4213 package declaration inside a package specification
4214 (Analyze_Full_Type_Declaration): issue error in formal mode on
4215 controlled type or discriminant type
4216 * sem_ch6.adb (Analyze_Subprogram_Specification): only issue error on
4217 user-defined operator means that it should come from the source
4218 (New_Overloaded_Entity): issue error in formal mode on overloaded
4220 * sem_ch6.ads, sem_ch13.ads: typos in comments.
4222 2011-08-01 Thomas Quinot <quinot@adacore.com>
4224 * atree.adb: Minor reformatting.
4225 * checks.adb: Minor reformatting.
4227 2011-08-01 Vincent Celier <celier@adacore.com>
4229 * s-parame-vms-ia64.ads: Fix typo in comment
4231 * s-parame-vms-restrict.ads: Removed, unused.
4233 2011-08-01 Javier Miranda <miranda@adacore.com>
4236 (Is_Variable_Size_Array): Remove local subprogram Is_Constant_Bound.
4238 (Constrain_Index): Remove side effects in the evaluation of the bounds.
4239 * sem_ch3.ads, sem_ch3.adb
4240 (Is_Constant_Bound): New extended version of the subprogram that was
4241 previously located inside function Exp_Ch3.Is_Variable_Size_Array.
4242 Moved here since it is shared by routines of sem_ch3 and exp_ch3.
4243 * sem_aux.ads (Constant_Value): Fix typo in comment.
4244 * checks.adb (Generate_Index_Checks): New implementation which, for
4245 array objects with constant bounds, generates the runtime check
4246 referencing the bounds of the array type. For other cases this routine
4247 provides its previous behavior obtaining such values from the array
4249 * sem_res.adb (Set_Slice_Subtype): Link a copied range subtree with its
4251 * atree.adb (New_Copy): Reset flag Is_Overloaded in the new copy since
4252 we cannot have semantic interpretations of the new node.
4254 2011-08-01 Ed Schonberg <schonberg@adacore.com>
4256 * sem_ch6.adb (Fully_Conformant_Expressions): handle quantified
4259 2011-08-01 Arnaud Charlet <charlet@adacore.com>
4261 * sem_ch8.adb: Minor code editing.
4262 * s-vxwext.adb: Remove trailing space.
4263 * freeze.adb, freeze.ads, errout.ads, erroutc.adb: Fix GPLv3 header for
4264 consistency with other files.
4266 2011-08-01 Thomas Quinot <quinot@adacore.com>
4268 * s-auxdec.ads, s-auxdec-vms_64.ads: Minor reformatting.
4270 2011-08-01 Ed Schonberg <schonberg@adacore.com>
4272 * par-ch10.adb: reject parameterized expressions as compilation unit.
4273 * sem_ch4.adb: handle properly conditional expression with overloaded
4274 then_clause and no else_clause.
4276 2011-08-01 Tristan Gingold <gingold@adacore.com>
4278 * s-parame-vms-alpha.ads, s-parame-vms-ia64.ads: Redeclare C_Address
4279 like done by System.Aux_DEC.
4280 * env.c (__gnat_setenv) [VMS]: Put logicals into LNM$PROCESS table.
4282 2011-08-01 Yannick Moy <moy@adacore.com>
4284 * par-endh.adb (Check_End): issue a syntax error in SPARK mode for
4285 missing label at end of declaration (subprogram or package)
4286 * par-ch4.adb (P_Name): issue a syntax error in SPARK mode for mixing
4287 of positional and named parameter association
4288 * par.adb, par-util.adb (Formal_Error_Msg_SP): new wrapper on
4289 Error_Msg_SP which adds a prefix to the error message giving the name
4290 of the formal language analyzed
4291 * sem_ch6.adb (Analyze_Return_Type): issue an error in formal mode for
4292 access result type in subprogram, unconstrained array as result type,.
4293 (Analyze_Subprogram_Declaration): issue an error in formal mode for null
4295 * sem_ch8.adb: Code clean up.
4297 2011-08-01 Javier Miranda <miranda@adacore.com>
4299 * sem_ch7.adb (Uninstall_Declarations): Remove useless code.
4300 * einfo.ads (Access_Disp_Table): Fix documentation.
4301 (Dispatch_Table_Wrappers): Fix documentation.
4302 * einfo.adb (Access_Disp_Table, Dispatch_Table_Wrappers,
4303 Set_Access_Disp_Table, Set_Dispatch_Table_Wrappers): Fix the assertions
4304 to enforce the documentation of this attribute.
4305 (Set_Is_Interface): Cleanup the assertion.
4306 * exp_ch4.adb (Expand_Allocator_Expression, Tagged_Membership): Locate
4307 the Underlying_Type entity before reading attribute Access_Disp_Table.
4308 * exp_disp.adb (Expand_Dispatching_Call, Expand_Interface_Conversion):
4309 Locate the Underlying_Type before reading attribute Access_Disp_Table.
4310 * exp_aggr.adb (Build_Array_Aggr_Code, Build_Record_Aggr_Code): Locate
4311 the Underlying_Type entity before reading attribute Access_Disp_Table.
4312 * exp_ch3.adb (Build_Record_Init_Proc, Expand_N_Object_Declaration):
4313 Locate the Underlying_Type entity before reading attribute
4316 2011-08-01 Ed Schonberg <schonberg@adacore.com>
4318 * s-poosiz.ads: Additional overriding indicators.
4320 2011-08-01 Yannick Moy <moy@adacore.com>
4322 * sem_ch5.adb (Analyze_Exit_Statement): add return after error in
4324 (Analyze_Iteration_Scheme): issue error in formal mode when loop
4325 parameter specification does not include a subtype mark.
4326 * sem_ch6.adb (Analyze_Abstract_Subprogram_Declaration): issue error in
4327 formal mode on abstract subprogram.
4328 (Analyze_Subprogram_Specification): issue error in formal mode on
4329 user-defined operator.
4330 (Process_Formals): issue error in formal mode on access parameter and
4332 * sem_ch9.adb (Analyze_Abort_Statement,
4333 Analyze_Accept_Statement, Analyze_Asynchronous_Select,
4334 Analyze_Conditional_Entry_Call, Analyze_Delay_Relative,
4335 Analyze_Delay_Until, Analyze_Entry_Call_Alternative,
4336 Analyze_Requeue, Analyze_Selective_Accept,
4337 Analyze_Timed_Entry_Call): issue error in formal mode on such constructs
4338 * sem_ch11.adb (Analyze_Raise_Statement, Analyze_Raise_xxx_Error):
4339 issue error in formal mode on user-defined raise statement.
4341 2011-08-01 Thomas Quinot <quinot@adacore.com>
4343 * sem_ch6.adb (Enter_Overloaded_Entity): Do not warn about a
4344 declaration being hidden when overriding an implicit inherited
4346 * par-ch10.adb (P_Compilation_Unit): In syntax check only mode
4347 (-gnats), do not complain about a source file that contains only a
4350 2011-08-01 Ed Schonberg <schonberg@adacore.com>
4352 * sem_ch5.adb (Analyze_Iterator_Scheme): Do not overwrite type of loop
4353 variable if already set.
4355 2011-08-01 Arnaud Charlet <charlet@adacore.com>
4357 * g-socket-dummy.adb, s-osinte-linux.ads, g-socket-dummy.ads,
4358 g-debuti.adb, g-tasloc.adb, g-debuti.ads, g-tasloc.ads,
4359 s-osinte-hpux.ads, g-sercom.adb, g-soliop-solaris.ads, g-sercom.ads,
4360 g-sptain.ads, g-curexc.ads, s-tasloc.adb, s-tasloc.ads, s-tataat.adb,
4361 g-ctrl_c.adb, a-reatim.adb, s-tataat.ads, g-dirope.adb, g-ctrl_c.ads,
4362 g-dirope.ads, g-boubuf.adb, g-calend.adb, g-boubuf.ads, g-souinf.ads,
4363 g-table.adb, g-bytswa-x86.adb, g-wispch.adb, g-io.adb, g-table.ads,
4364 g-wispch.ads, g-io.ads, g-memdum.adb, g-memdum.ads, g-busorg.adb,
4365 g-busorg.ads, g-regpat.adb, g-sothco-dummy.adb, g-encstr.adb,
4366 g-regpat.ads, g-sothco-dummy.ads, s-osinte-aix.ads, g-encstr.ads,
4367 g-sercom-mingw.adb, s-mastop-vms.adb, g-diopit.adb, g-diopit.ads,
4368 s-vxwext.adb, g-dyntab.adb, g-dyntab.ads, g-crc32.adb,
4369 g-sercom-linux.adb, g-crc32.ads, s-regpat.adb, g-flocon.ads,
4370 s-regpat.ads, g-stheme.adb, g-sestin.ads, s-taspri-posix-noaltstack.ads,
4371 g-soliop.ads, s-inmaop-posix.adb, g-locfil.ads, g-enblsp-vms-alpha.adb,
4372 g-socthi-dummy.adb, g-socthi-dummy.ads, gnat.ads, g-moreex.adb,
4373 g-moreex.ads, g-dynhta.adb, g-dynhta.ads, g-deutst.ads, g-htable.adb,
4374 g-cgicoo.adb, g-htable.ads, g-cgicoo.ads, a-interr.adb,
4375 g-socthi-vms.adb, g-socthi-vms.ads, g-hesora.adb, g-bubsor.adb,
4376 g-hesora.ads, g-bubsor.ads, g-md5.adb, g-md5.ads, s-intman-irix.adb,
4377 s-htable.adb, s-osinte-vms.adb, s-htable.ads, s-osinte-vms.ads,
4378 s-taprob.adb, g-bytswa.adb, g-bytswa.ads, s-osinte-solaris-posix.ads,
4379 a-suenco.adb, g-comver.adb, g-comver.ads, g-exctra.adb,
4380 s-osinte-solaris.adb, g-exctra.ads, s-osinte-irix.ads,
4381 s-osinte-solaris.ads, a-caldel-vms.adb, g-socthi-vxworks.adb,
4382 g-expect.adb, g-socthi-vxworks.ads, g-expect.ads, g-comlin.ads,
4383 g-heasor.adb, g-heasor.ads, g-traceb.adb, g-traceb.ads, g-decstr.adb,
4384 g-spipat.adb, g-decstr.ads, g-spipat.ads, s-mastop-tru64.adb,
4385 g-except.ads, g-thread.adb, g-hesorg.adb, g-thread.ads, g-hesorg.ads,
4386 g-expect-vms.adb, a-stuten.ads, g-spchge.adb, g-spchge.ads,
4387 g-u3spch.adb, g-u3spch.ads, g-spitbo.adb, g-spitbo.ads,
4388 s-osinte-dummy.ads, s-osinte-posix.adb, g-pehage.adb, g-pehage.ads,
4389 s-gloloc-mingw.adb, g-sha1.ads, s-traceb-hpux.adb,
4390 g-trasym-unimplemented.adb, g-trasym-unimplemented.ads, g-io_aux.adb,
4391 g-regexp.adb, g-io_aux.ads, g-socthi-mingw.adb, g-regexp.ads,
4392 s-osinte-hpux-dce.adb, g-socthi-mingw.ads, g-cgi.adb,
4393 s-osinte-hpux-dce.ads, g-cgi.ads, g-byorma.adb, g-boumai.ads,
4394 g-byorma.ads, a-caldel.adb, s-regexp.adb, s-regexp.ads,
4395 g-soliop-mingw.ads, g-sptavs.ads, s-osinte-tru64.ads, g-speche.adb,
4396 g-speche.ads, g-socthi.adb, g-stsifd-sockets.adb, g-socthi.ads,
4397 s-osinte-darwin.ads, i-vxwork-x86.ads, g-awk.adb, i-vxwork.ads,
4398 g-awk.ads, g-zspche.adb, g-zspche.ads, g-socket.adb, g-sptabo.ads,
4399 g-socket.ads, g-semaph.adb, g-semaph.ads, s-taspri-posix.ads,
4400 g-enblsp-vms-ia64.adb, g-cgideb.adb, g-cgideb.ads, g-sothco.adb,
4401 s-osinte-freebsd.ads, g-sothco.ads, g-catiio.adb, g-casuti.adb,
4402 g-catiio.ads, g-casuti.ads, g-trasym.adb, g-trasym.ads, s-casuti.adb,
4403 g-os_lib.adb, s-traceb-mastop.adb, g-busora.adb, s-interr-dummy.adb,
4404 g-busora.ads, g-enutst.ads, s-os_lib.adb, a-tasatt.adb,
4405 s-osinte-mingw.ads: Update to GPLv3 run-time license.
4406 Use GNAT instead of GNARL.
4408 2011-08-01 Bob Duff <duff@adacore.com>
4410 * a-cdlili.ads, a-cihama.ads, a-coinve.ads, a-ciorse.ads, a-coorma.ads,
4411 a-cidlli.ads, a-ciormu.ads, a-cihase.ads, a-cohama.ads, a-coorse.ads,
4412 a-ciorma.ads, a-coormu.ads, a-convec.ads, a-cohase.ads: Minor
4415 2011-08-01 Yannick Moy <moy@adacore.com>
4417 * debug.adb (d.D) reverve flag for the SPARK mode
4418 (d.E) reverve flag for SPARK generation mode
4419 (d.F) reverve flag for Why generation mode
4420 * opt.ads, opt.adb (ALFA_Mode, ALFA_Through_SPARK_Mode,
4421 ALFA_Through_Why_Mode, Formal_Verification_Mode, SPARK_Mode): New
4422 functions which return True when the corresponding modes are set
4423 (Formal_Language): return "spark" or "alfa" when in formal verification
4425 * sem_util.ads, sem_util.adb (Formal_Error_Msg): new wrapper on
4426 Error_Msg to prefix the error message with a tag giving the formal
4428 (Formal_Error_Msg_N): new wrapper on Error_Msg_N to prefix the error
4429 message with a tag giving the formal language
4430 * sem_ch5.adb (Analyze_Block_Statement): issue error in formal mode on
4432 (Analyze_Case_Statement): issue error in formal mode on case statement
4433 with a single "others" case alternative
4434 (Analyze_Exit_Statement): issue errors in formal mode on exit
4435 statements which do not respect SPARK restrictions
4436 (Analyze_Goto_Statement): issue error in formal mode on goto statement
4437 (Check_Unreachable_Code): always issue an error (not a warning) in
4438 formal mode on unreachable code (concerns both code after an infinite
4439 loop and after an unconditional jump, both not allowed in SPARK)
4440 * sem_ch6.adb (Analyze_Return_Statement): add call to
4441 Set_Return_Present for a procedure containing a return statement
4442 (already done for functions in Analyze_Function_Return)
4443 (Analyze_Function_Return): issue error in formal mode on extended
4444 return or if return is not last statement in function
4445 (Check_Missing_Return): issue error in formal mode if function does
4446 not end with return or if procedure contains a return
4447 * sem_ch8.ads, sem_ch8.adb (Has_Loop_In_Inner_Open_Scopes): new
4448 function to detect if there is an inner scope of its parameter S which
4451 2011-08-01 Thomas Quinot <quinot@adacore.com>
4453 * sem_ch6.ads: Minor reformatting.
4455 2011-08-01 Javier Miranda <miranda@adacore.com>
4457 * sem_util.adb (Abstract_Interface_List): Complete condition when
4458 processing private type declarations to avoid reading unavailable
4460 (Is_Synchronized_Tagged_Type): Complete condition when processing
4461 private extension declaration nodes to avoid reading unavailable
4464 2011-08-01 Thomas Quinot <quinot@adacore.com>
4466 * sem_ch3.adb: Minor reformatting.
4468 2011-08-01 Thomas Quinot <quinot@adacore.com>
4470 * s-parame-ae653.ads, s-parame-vms-alpha.ads, s-parame-hpux.ads,
4471 i-cpoint.adb, i-cstrin.adb, i-cpoint.ads, i-cstrin.ads,
4472 s-parame-vms-ia64.ads, s-parame.ads, i-c.ads, s-parame-vxworks.ads,
4473 s-parame-vms-restrict.ads: Remove duplicated Interfaces.C.* packages
4474 for VMS, instead parametrize the common implementation with
4475 System.Parameters declarations.
4477 2011-08-01 Eric Botcazou <ebotcazou@adacore.com>
4479 * gnat_rm.texi: Document limitation of Pragma No_Strict_Aliasing.
4481 2011-08-01 Tristan Gingold <gingold@adacore.com>
4483 * seh_init.c: Fix SEH handler installation on win64.
4485 2011-08-01 Ed Schonberg <schonberg@adacore.com>
4487 * sem_ch3.adb (Access_Subprogram_Declaration): in Asis mode, prevent
4488 double analysis of an anonymous access to subprogram, because it can
4489 lead to improper sharing of profiles and a back-end crash.
4491 2011-08-01 Robert Dewar <dewar@adacore.com>
4493 * make.adb, sem_ch4.adb: Minor reformatting.
4494 * gcc-interface/Make-lang.in: Update dependencies.
4495 * sem_util.adb, exp_ch5.adb: Minor reformatting.
4497 2011-08-01 Arnaud Charlet <charlet@adacore.com>
4499 * gnat_rm.texi: Fix definition of Long_Integer.
4501 2011-08-01 Ed Schonberg <schonberg@adacore.com>
4503 * exp_aggr.adb: check limit size of static aggregate unconditionally,
4504 to prevent storage exhaustion.
4505 * exp_ch7.adb (Clean_Simple_Protected_Objects): if the scope being
4506 finalized is a function body, insert the cleanup code before the final
4507 return statement, to prevent spurious warnings.
4508 * s-pooglo.ads: add overriding indicator.
4510 2011-08-01 Ed Schonberg <schonberg@adacore.com>
4512 * sem_ch4.adb (Operator_Check): improve error message when both a
4513 with_clause and a use_clause are needed to make operator usage legal.
4514 * sem_util.ads, sem_util.adb (Unit_Is_Visible): new predicate to
4515 determine whether a compilation unit is visible within an other,
4516 either through a with_clause in the current unit, or a with_clause in
4517 its library unit or one one of its parents.
4519 2011-08-01 Ed Schonberg <schonberg@adacore.com>
4521 * exp_ch5.adb (Expand_N_Iterator_Loop): handle properly an iterator
4522 over an arbitrary expression of an array or container type.
4523 * lib-xref.adb: clarify comment.
4525 2011-08-01 Bob Duff <duff@adacore.com>
4527 * einfo.ads: Minor reformatting.
4528 * debug.adb: Minor comment improvement.
4530 2011-08-01 Javier Miranda <miranda@adacore.com>
4532 * sem_ch4.adb (Try_Object_Operation): For class-wide subprograms do not
4533 consider hidden subprograms as valid candidates.
4535 2011-08-01 Arnaud Charlet <charlet@adacore.com>
4537 * make.adb (Compile): Strip -mxxx switches in CodePeer mode.
4539 2011-08-01 Vasiliy Fofanov <fofanov@adacore.com>
4541 * gnat_ugn.texi: Fix typo.
4543 2011-08-01 Robert Dewar <dewar@adacore.com>
4545 * i-cstrin.adb, sem_util.adb, exp_ch11.adb, sem_ch8.adb,
4546 lib-xref.adb: Minor reformatting
4548 2011-08-01 Gary Dismukes <dismukes@adacore.com>
4550 * exp_ch6.adb (Expand_N_Extended_Return_Statement): Replace test of
4551 when to generate a call to Move_Final_List.
4552 (Has_Controlled_Parts): Remove this function.
4554 2011-08-01 Geert Bosch <bosch@adacore.com>
4556 * par-ch3.adb (P_Discrete_Choice_List): Improve error message for extra
4559 2011-08-01 Thomas Quinot <quinot@adacore.com>
4561 * exp_ch11.adb (Expand_N_Raise_Statement): Mark N_Raise_xxx_Error for
4562 explicit raise of a predefined exception as Comes_From_Source if the
4563 original N_Raise_Statement comes from source.
4565 2011-08-01 Robert Dewar <dewar@adacore.com>
4567 * sinfo.ads: Add comment.
4568 * sem_ch6.adb: Minor reformatting.
4570 2011-08-01 Robert Dewar <dewar@adacore.com>
4572 * freeze.adb (Freeze_Entity): Refine check for bad component size
4573 clause to avoid rejecting confirming clause when atomic/aliased present.
4575 2011-08-01 Ed Schonberg <schonberg@adacore.com>
4577 * sem_ch8.adb (Find_Direct_Name, Analyze_Expanded_Name): use Is_LHS to
4578 better determine whether an entity reference is a write.
4579 * sem_util.adb (Is_LHS): refine predicate to handle assignment to a
4581 * lib-xref.adb (Output_References): Do no suppress a read reference at
4582 the same location as an immediately preceeding modify-reference, to
4583 handle properly in-out actuals.
4585 2011-08-01 Tristan Gingold <gingold@adacore.com>
4587 * env.c (__gnat_setenv) [VMS]: Refine previous change.
4589 2011-08-01 Quentin Ochem <ochem@adacore.com>
4591 * i-cstrin.adb (New_String): Changed implementation, now uses only the
4592 heap to compute the result.
4594 2011-08-01 Robert Dewar <dewar@adacore.com>
4596 * atree.ads: Minor reformatting.
4598 2011-08-01 Emmanuel Briot <briot@adacore.com>
4600 * g-expect.adb (Get_Command_Output): Fix memory leak.
4602 2011-08-01 Geert Bosch <bosch@adacore.com>
4604 * cstand.adb (P_Float_Type): New procedure to print the definition of
4605 predefined fpt types.
4606 (P_Mixed_Name): New procedure to print a name using mixed case
4607 (Print_Standard): Use P_Float_Type for printing floating point types
4608 * einfo.adb (Machine_Emax_Value): Add preliminary support for quad
4609 precision IEEE float.
4611 2011-08-01 Thomas Quinot <quinot@adacore.com>
4613 * sem_ch3.adb: Minor reformatting.
4615 2011-08-01 Ed Schonberg <schonberg@adacore.com>
4617 * sem_ch6.adb (Analyze_Parameterized_Expression): If the expression is
4618 the completion of a generic function, insert the new body rather than
4619 rewriting the original.
4621 2011-08-01 Yannick Moy <moy@adacore.com>
4623 * sinfo.ads, errout.ads: Typos in comments.
4625 2011-08-01 Robert Dewar <dewar@adacore.com>
4627 * par-endh.adb: Minor reformatting.
4629 2011-08-01 Robert Dewar <dewar@adacore.com>
4631 * aspects.ads, aspects.adb: Add aspects for library unit pragmas
4632 (Pre_Post_Aspects): New subtype.
4633 * par-ch12.adb (P_Generic): New syntax for aspects in packages
4634 * par-ch13.adb (P_Aspect_Specifications): Add Semicolon parameter
4635 * par-ch7.adb (P_Package): Remove Decl parameter
4636 (P_Package): Handle new syntax for aspects (before IS)
4637 * par-ch9.adb (P_Protected_Definition): Remove Decl parameter, handle
4639 (P_Task_Definition): Remove Decl parameter, handle new aspect syntax
4640 * par.adb (P_Aspect_Specifications): Add Semicolon parameter
4641 (P_Package): Remove Decl parameter
4642 * sem_ch13.adb (Analyze_Aspect_Specifications): Handle library unit
4644 * sem_ch7.adb (Analyze_Package_Declaration): Analyze new format aspect
4646 * sem_util.ads, sem_util.adb (Static_Boolean): New function
4647 * sinfo.ads: Document new syntax for aspects in packages etc.
4648 * sprint.adb: Handle new syntax of aspects before IS in package
4650 2011-08-01 Thomas Quinot <quinot@adacore.com>
4652 * atree.ads: Minor reformatting.
4653 * sem_prag.adb: Minor reformatting.
4655 2011-08-01 Robert Dewar <dewar@adacore.com>
4657 * exp_util.adb (Insert_Actions): Fix error in handling Actions for
4658 case expr alternative.
4660 2011-08-01 Ed Schonberg <schonberg@adacore.com>
4662 * sem_ch12.adb: Fix typo.
4664 2011-08-01 Geert Bosch <bosch@adacore.com>
4666 * sem_prag.adb (Check_No_Link_Name): New procedure.
4667 (Process_Import_Or_Interface): Use Check_No_Link_Name.
4668 * cstand.adb (Create_Standard): Use Esize (Standard_Long_Long_Float)
4669 instead of Standard_Long_Long_Float_Size global. Preparation for
4670 eventual removal of per type constants.
4671 * exp_util.ads (Get_Stream_Size): New function returning the stream
4672 size value of subtype E.
4673 * exp_util.adb (Get_Stream_Size): Implement new function.
4674 * exp_strm.adb (Build_Elementary_Input_Call): Use Get_Stream_Size
4676 * exp_attr.adb (Attribute_Stream_Size): Use Get_Stream_Size
4678 (Machine_Mantissa_Value): Handle 128-bit quad precision IEEE floats
4680 2011-08-01 Geert Bosch <bosch@adacore.com>
4682 * cstand.adb: Fix comments.
4683 * sem_prag.adb (Analyze_Pragma): Use List_Length instead of explicit
4686 2011-08-01 Robert Dewar <dewar@adacore.com>
4688 * exp_ch4.adb, sem_cat.adb: Minor reformatting.
4690 2011-08-01 Geert Bosch <bosch@adacore.com>
4692 * atree.ads: Fix comment.
4694 2011-08-01 Robert Dewar <dewar@adacore.com>
4696 * aspects.ads, aspects.adb (Aspect_Names): Moved from body to spec.
4697 * par-ch13.adb (P_Aspect_Specifications): Check misspelled aspect name.
4698 * par.adb: Add with for Namet.Sp.
4699 * par-tchk.adb: Minor reformatting.
4701 2011-08-01 Vincent Celier <celier@adacore.com>
4703 * mlib-tgt-specific-vms-alpha.adb, mlib-tgt-specific-vms-ia64.adb
4704 (Build_Dynamic_Library): Use new function Init_Proc_Name to get the name
4705 of the init procedure of a SAL.
4706 * mlib-tgt-vms_common.ads, mlib-tgt-vms_common.adb (Init_Proc_Name):
4709 2011-08-01 Thomas Quinot <quinot@adacore.com>
4711 * exp_ch4.adb, s-tasini.ads, sem_attr.adb, s-soflin.ads: Minor
4714 2011-08-01 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
4716 * adaint.c (__gnat_file_time_name_attr): Get rid of warning.
4718 2011-08-01 Thomas Quinot <quinot@adacore.com>
4720 * sem_util.adb, sem_util.ads (Has_Overriding_Initialize): Make function
4721 conformant with its spec (return True only for types that have
4722 an overriding Initialize primitive operation that prevents them from
4723 having preelaborable initialization).
4724 * sem_cat.adb (Validate_Object_Declaration): Fix test for preelaborable
4725 initialization for controlled types in Ada 2005 or later mode.
4727 2011-08-01 Robert Dewar <dewar@adacore.com>
4729 * aspects.ads, aspects.adb: Add aspect Type_Invariant, Precondition,
4731 (Same_Aspect): New function.
4732 * sem_ch13.adb (Analyze_Aspect_Specifications): Add aspect
4733 Type_Invariant, Precondition, Postcondition.
4734 * snames.ads-tmpl: Add Name_Type_Invariant.
4736 2011-08-01 Robert Dewar <dewar@adacore.com>
4738 * freeze.adb (Freeze_Entity): Don't call Check_Aspect_At_Freeze_Point
4740 (Freeze_All_Ent): Fix error in handling inherited aspects.
4741 * sem_ch13.adb (Analyze_Aspect_Specifications): Skip aspect that is
4742 already analyzed, but don't skip entire processing of a declaration,
4743 that's wrong in some cases of declarations being rewritten.
4744 (Analyze_Aspect_Specification): Set Is_Delayed_Aspect in aspects.
4745 Don't delay for integer, string literals
4746 Treat predicates in usual manner for delay, remove special case code,
4748 (Analyze_Freeze_Entity): Make call to Check_Aspect_At_Freeze_Point
4749 (Build_Predicate_Function): Update saved expression in aspect
4750 (Build_Invariant_Procedure): Update saved expression in aspect
4751 * exp_ch4.adb (Expand_N_Selected_Component): Only do the optimization
4752 of replacement of discriminant references if the reference is simple.
4754 2011-08-01 Robert Dewar <dewar@adacore.com>
4756 * aspects.ads, aspects.adb: Add Static_Predicate and Dynamic_Predicate.
4757 * sem_ch13.adb (Analyze_Aspect_Specification): Add processing for
4758 Static_Predicate and Dynamic_Predicate.
4759 (Build_Predicate_Function): Add processing for Static_Predicate
4760 and Dynamic_Predicate.
4761 * sinfo.ads, sinfo.adb (From_Dynamic_Predicate): New flag
4762 (From_Static_Predicate): New flag
4763 * snames.ads-tmpl: Add Name_Static_Predicate and Name_Dynamic_Predicate
4765 2011-08-01 Robert Dewar <dewar@adacore.com>
4767 * usage.adb: Documentation cleanup for Ada version modes in usage.
4768 * expander.adb: Minor reformatting.
4770 2011-08-01 Robert Dewar <dewar@adacore.com>
4772 * atree.ads: Minor comment fix.
4773 * a-stwifi.adb, a-stzfix.adb, a-strfix.adb, a-ztexio.ads, a-textio.ads,
4774 a-witeio.ads, sem_prag.adb: Minor reformatting.
4776 2011-08-01 Doug Rupp <rupp@adacore.com>
4778 * env.c (__gnat_setenv) [VMS]: Force 32bit on item list structure
4779 pointers. Use descrip.h header file for convenience. Add some
4782 2011-08-01 Robert Dewar <dewar@adacore.com>
4784 * freeze.adb (Freeze_Entity): Call Check_Aspect_At_Freeze_Point
4785 (Freeze_All): Call Check_Aspect_At_End_Of_Declarations
4786 * sem_ch13.ads, sem_ch13.adb (Check_Aspect_At_Freeze_Point):
4788 (Check_Aspect_At_End_Of_Declarations): New procedure
4789 (Analye_Aspect_Specification): Minor changes for above procedures
4790 * sinfo.ads, sinfo.adb (Is_Delayed_Aspect): Now set in aspect
4791 specification node as well.
4793 2011-08-01 Pascal Obry <obry@adacore.com>
4795 * adaint.c (_gnat_stat): GetFilesAttributesEx() would fail on special
4796 Windows files. Use GetFilesAttributes() in this case to check for file
4797 existence instead of returning with an error code.
4799 2011-08-01 Vincent Celier <celier@adacore.com>
4801 * a-stzfix.adb, a-stwifi.adb (Replace_Slice): Fixed computation when
4802 High is above Source length.
4804 2011-08-01 Robert Dewar <dewar@adacore.com>
4806 * a-ztexio.ads, a-textio.ads, a-witeio.ads: Fix comment.
4808 2011-08-01 Robert Dewar <dewar@adacore.com>
4810 * aspects.ads (Boolean_Aspects): New subtype.
4811 * exp_ch13.adb (Expand_Freeze_Entity): Fix errors in handling aspects
4812 for derived types in cases where the parent type and derived type have
4814 * freeze.adb (Freeze_Entity): Fix problems in handling derived type
4815 with aspects when parent type also has aspects.
4816 (Freeze_Entity): Deal with delay of boolean aspects (must evaluate
4817 boolean expression at this point).
4818 * sem_ch13.adb (Analyze_Aspect_Specifications): Delay all aspects in
4819 accordance with final decision on the Ada 2012 feature.
4820 * sinfo.ads, sinfo.adb (Is_Boolean_Aspect): New flag.
4822 2011-08-01 Matthew Heaney <heaney@adacore.com>
4824 * a-chtgbo.adb (Delete_Node_Sans_Free): Replace iterator with selector.
4826 2011-08-01 Pascal Obry <obry@adacore.com>
4828 * a-stzunb-shared.adb, a-strunb-shared.adb, a-stwiun-shared.adb:
4829 Fix Replace_Slice when High is above current string size.
4830 (Replace_Slice): Fix DL computation when High is above current
4833 2011-08-01 Gary Dismukes <dismukes@adacore.com>
4835 * gnat_rm.texi: Add documentation for pragma Static_Elaboration_Desired.
4837 2011-08-01 Matthew Heaney <heaney@adacore.com>
4839 * a-rbtgbo.adb (Delete_Node_Sans_Free): Fixed assignment to left child
4842 2011-08-01 Pascal Obry <obry@adacore.com>
4844 * a-stzunb-shared.adb, a-strunb-shared.adb, a-stwiun-shared.adb: Minor
4847 2011-08-01 Ed Schonberg <schonberg@adacore.com>
4849 * sem_attr.adb (Analyze_Attribute, case 'Access): Handle properly named
4850 access to protected subprograms in generic bodies.
4851 * sem_ch6.adb (Analyze_Subprogram_Declaration): If the context is a
4852 protected type, indicate that the convention of the subprogram is
4853 Convention_Protected, because it may be used in subsequent declarations
4854 within the protected declaration.
4856 2011-08-01 Vincent Celier <celier@adacore.com>
4858 * mlib-prj.adb (Build_Library): Use "ada_" as the prefix for the "init"
4859 and "final" procedures when the name of the library is "ada", to avoid
4860 duplicate symbols "adainit" and "adafinal" in executables.
4862 2011-08-01 Ed Schonberg <schonberg@adacore.com>
4864 * sem_attr.adb (Analyze_Attribute, case 'Result): Handle properly a
4865 quantified expression that appears within a postcondition and uses the
4866 Ada2012 'Result attribute.
4868 2011-07-28 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
4870 * init.c (__gnat_error_handler): Cast reason to int.
4871 (__gnat_install_handler): Explain sa_sigaction use.
4873 2011-07-24 Eric Botcazou <ebotcazou@adacore.com>
4875 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Subprogram_Type>: If the
4876 subprogram has copy-in copy-out parameters, try to promote the mode of
4877 the return type if it is passed in registers.
4879 2011-07-24 Eric Botcazou <ebotcazou@adacore.com>
4881 * gcc-interface/utils2.c (build_binary_op) <ARRAY_REF>: Do not mark the
4882 left operand as addressable.
4884 2011-07-24 Eric Botcazou <ebotcazou@adacore.com>
4886 * gcc-interface/gigi.h (build_function_stub): Remove.
4887 (build_return_expr): Likewise.
4888 (convert_vms_descriptor): Declare.
4889 * gcc-interface/utils.c (convert_vms_descriptor): Make global.
4890 (build_function_stub): Move to...
4891 * gcc-interface/utils2.c (build_return_expr): Move to...
4892 * gcc-interface/trans.c (build_function_stub): ...here.
4893 (build_return_expr): ...here.
4894 (Subprogram_Body_to_gnu): Add local variable for language_function.
4895 Disconnect the parameter attributes cache, if any, once done with it.
4896 Call end_subprog_body only after setting the end_locus.
4897 Build the stub associated with the function, if any, at the very end.
4898 (gnat_to_gnu) <N_Return_Statement>: Remove couple of useless local
4899 variables and streamline control flow.
4901 2011-07-23 Arnaud Charlet <charlet@adacore.com>
4904 * gcc-interface/Makefile.in (powerpc-linux): Remove reference to
4907 2011-07-22 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
4910 * init.c [sun && __SVR4 && !__vxworks] (__gnat_install_handler):
4911 Assign to act.sa_sigaction.
4912 * tracebak.c [USE_GENERIC_UNWINDER] (__gnat_backtrace): Cast
4913 current->return_address to char * before arithmetic.
4915 2011-07-22 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
4917 * init.c [sgi] (__gnat_error_handler): Update sigaction(2) citation.
4918 Correct argument types.
4919 Extract code from reason.
4920 (__gnat_install_handler): Assign to act.sa_sigaction.
4922 2011-07-21 Eric Botcazou <ebotcazou@adacore.com>
4924 * gcc-interface/Make-lang.in (GNAT1_ADA_OBJS): Move ada/b_gnat1.o to...
4925 (GNAT1_OBJS): ...here.
4927 2011-07-15 Eric Botcazou <ebotcazou@adacore.com>
4930 * g-socthi-mingw.adb (Fill): Fix formatting.
4932 * gcc-interface/gigi.h: Move around comment.
4934 2011-07-14 John David Anglin <dave.anglin@nrc-cnrc.gc.ca>
4937 * s-taprop-hpux-dce.adb (Abort_Task): Remove unnecessary cast.
4939 2011-07-14 Florian Weimer <fw@deneb.enyo.de>
4942 * g-socthi-mingw.adb (Fill): Guard against invalid MSG_WAITALL.
4944 2011-07-13 Eric Botcazou <ebotcazou@adacore.com>
4946 * gcc-interface/utils.c (build_vms_descriptor32): Skip the 32-bit
4947 range comparison if Pmode is SImode.
4949 2011-07-12 Laurent GUERBY <laurent@guerby.net>
4950 Eric Botcazou <ebotcazou@adacore.com>
4952 * adadecode.c: Wrap up in extern "C" block.
4953 * adadecode.h: Likewise.
4954 * adaint.c: Likewise. Remove 'const' keyword.
4955 * adaint.h: Likewise.
4957 * atree.h: Likewise.
4959 * cstreams.c: Likewise.
4963 * final.c: Likewise.
4965 * initialize.c: Likewise.
4967 * namet.h: Likewise.
4968 * nlists.h: Likewise.
4969 * raise.c: Likewise.
4970 * raise.h: Likewise.
4971 * repinfo.h: Likewise.
4972 * seh_init.c: Likewise.
4973 * targext.c: Likewise.
4974 * tracebak.c: Likewise.
4975 * uintp.h: Likewise.
4976 * urealp.h: Likewise.
4977 * xeinfo.adb: Wrap up generated C code in extern "C" block.
4978 * xsinfo.adb: Likewise.
4979 * xsnamest.adb: Likewise.
4980 * gcc-interface/gadaint.h: Wrap up in extern "C" block.
4981 * gcc-interface/gigi.h: Wrap up some prototypes in extern "C" block.
4982 * gcc-interface/misc.c: Likewise.
4983 * gcc-interface/Make-lang.in (GCC_LINK): Use LINKER.
4984 (GNAT1_C_OBJS): Remove ada/b_gnat1.o. List ada/seh_init.o and
4985 ada/targext.o here...
4986 (GNAT_ADA_OBJS): ...and not here.
4987 (GNAT1_ADA_OBJS): Add ada/b_gnat1.o.
4988 (GNATBIND_OBJS): Reorder.
4990 2011-07-07 Richard Henderson <rth@redhat.com>
4992 * gcc-interface/misc.c (gnat_init_gcc_eh): Don't call
4993 dwarf2out_frame_init.
4995 2011-07-07 Eric Botcazou <ebotcazou@adacore.com>
4997 * gcc-interface/misc.c (gnat_init): Tweak previous change.
4999 2011-07-07 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
5002 * gcc-interface/Makefile.in: Handle x86_64-solaris2.
5004 2011-07-06 Richard Guenther <rguenther@suse.de>
5006 * gcc-interface/misc.c (gnat_init): Merge calls to
5007 build_common_tree_nodes and build_common_tree_nodes_2.
5008 Re-initialize boolean_false_node.
5010 2011-07-02 Eric Botcazou <ebotcazou@adacore.com>
5011 Olivier Hainque <hainque@adacore.com>
5012 Nicolas Setton <setton@adacore.com>
5014 * gcc-interface/utils.c (record_builtin_type): Set TYPE_ARTIFICIAL on
5015 the type according to the ARTIFICIAL_P parameter.
5016 (create_type_decl): Likewise.
5017 (create_type_stub_decl): Set TYPE_ARTIFICIAL on the type to 1.
5019 2011-07-01 Eric Botcazou <ebotcazou@adacore.com>
5021 * gcc-interface/Make-lang.in (gnat1): Prepend '+' to the command.
5022 (gnatbind): Likewise.
5024 2011-06-29 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
5026 * gcc-interface/Makefile.in (TOOLS_LIBS): Add $(LIBINTL).
5028 2011-06-18 Eric Botcazou <ebotcazou@adacore.com>
5030 * gcc-interface/decl.c (gnat_to_gnu_component_type): Use GNAT_TYPE
5031 local variable throughout. Remove useless call to Base_Type.
5032 (gnat_to_gnu_field): Use GNAT_FIELD_TYPE local variable throughout.
5033 Take it also into account for the volatileness of the field. Set the
5034 TREE_SIDE_EFFECTS flag as well in this case. Reorder some warnings.
5036 2011-06-18 Eric Botcazou <ebotcazou@adacore.com>
5038 * gcc-interface/trans.c (Identifier_to_gnu): Don't set TREE_THIS_NOTRAP
5039 on a dereference built for a by-ref object if it has an address clause.
5041 2011-06-18 Eric Botcazou <ebotcazou@adacore.com>
5043 * einfo.ads (Address_Taken): Document use for the second argument of
5044 Asm_Input and Asm_Output attributes.
5045 * sem_attr.adb (Analyze_Attribute) <Attribute_Asm_Input>: If the second
5046 argument is an entity name, then set Address_Taken on it.
5047 <Attribute_Asm_Output>: Likewise.
5048 * gcc-interface/trans.c (lvalue_required_for_attribute_p): Handle the
5049 Attr_Asm_Input and Attr_Asm_Output attributes explicitly.
5050 (gnat_to_gnu) <N_Code_Statement>: If an operand is going to end up in
5051 memory and is a CONST_DECL, retrieve its corresponding VAR_DECL.
5053 2011-06-16 Joern Rennecke <joern.rennecke@embecosm.com>
5056 * gcc-interface/decl.c (gnat_to_gnu_param): Use pack_cumulative_args.
5058 2011-06-14 Joseph Myers <joseph@codesourcery.com>
5060 * gcc-interface/Make-lang.in (gnatbind$(exeext)): Use ggc-none.o.
5061 (ada/utils.o): Update dependencies.
5062 * gcc-interface/Makefile.in (EXTRA_GNATTOOLS_OBJS): Add
5063 ../../../libcpp/libcpp.a.
5064 * gcc-interface/utils.c: Include common/common-target.h.
5065 (process_attributes): Use targetm_common.have_named_sections.
5067 2011-06-07 Richard Guenther <rguenther@suse.de>
5069 * gcc-interface/misc.c (gnat_init): Do not set size_type_node or call
5072 2011-06-06 Eric Botcazou <ebotcazou@adacore.com>
5074 * gcc-interface/utils2.c (gnat_stabilize_reference): Propagate the
5075 TREE_THIS_NOTRAP flag.
5077 2011-06-06 Eric Botcazou <ebotcazou@adacore.com>
5079 * gcc-interface/utils2.c (gnat_stabilize_reference) <COMPOUND_EXPR>:
5082 2011-06-06 Eric Botcazou <ebotcazou@adacore.com>
5084 * gcc-interface/trans.c (Identifier_to_gnu): Also handle deferred
5085 constants whose full view has discriminants specially.
5087 2011-06-06 Eric Botcazou <ebotcazou@adacore.com>
5089 * gcc-interface/utils.c: Include diagnostic.h.
5090 (gnat_write_global_declarations): Output debug information for all
5091 global type declarations before finalizing the compilation unit.
5092 * gcc-interface/Make-lang.in (ada/utils.o): Add dependency.
5094 2011-05-25 Jakub Jelinek <jakub@redhat.com>
5096 * gcc-interface/utils.c (def_fn_type): Remove extra va_end.
5098 2011-05-25 Kai Tietz <ktietz@redhat.com>
5100 * adaint.c (__gnat_to_canonical_file_list_next): Use array
5101 initialization instead of const/none-const pointer assignment.
5103 2011-05-24 Joseph Myers <joseph@codesourcery.com>
5105 * gcc-interface/Make-lang.in (GNAT1_OBJS): Don't include
5106 $(EXTRA_GNAT1_OBJS).
5107 (GNATBIND_OBJS): Don't include $(EXTRA_GNATBIND_OBJS).
5108 (EXTRA_GNAT1_OBJS, EXTRA_GNATBIND_OBJS): Remove.
5109 (gnat1$(exeext), gnatbind$(exeext)): Use libcommon-target.a.
5110 * gcc-interface/Makefile.in (EXTRA_GNATTOOLS_OBJS): Use
5111 libcommon-target.a instead of prefix.o.
5113 2011-05-21 Joseph Myers <joseph@codesourcery.com>
5116 * gcc-interface/Make-lang.in (gnatbind$(exeext)): Depend on $(LIBDEPS).
5118 2011-05-20 Joseph Myers <joseph@codesourcery.com>
5120 * gcc-interface/Make-lang.in (EXTRA_GNATBIND_OBJS): Remove version.o.
5121 * gcc-interface/Makefile.in (EXTRA_GNATTOOLS_OBJS): Use libcommon.a
5122 instead of version.o.
5124 2011-05-18 Kai Tietz <ktietz@redhat.com>
5126 * gcc-interface/trans.c (Exception_Handler_to_gnu_sjlj): Use
5127 boolean_false_node instead of integer_zero_node.
5128 (convert_with_check): Likewise.
5129 * gcc-interface/decl.c (choices_to_gnu): Likewise.
5131 2011-05-12 Eric Botcazou <ebotcazou@adacore.com>
5133 * gcc-interface/trans.c (call_to_gnu): In the by-reference case, if the
5134 type of the parameter is an unconstrained array, convert the actual to
5135 the type of the formal in the In Out and Out cases as well.
5137 2011-05-11 Nathan Froyd <froydnj@codesourcery.com>
5139 * gcc-interface/utils.c (def_fn_type): Don't call build_function_type;
5140 call build_function_type_array or build_varargs_function_type_array
5142 (create_subprog_type): Don't call build_function_type; call
5143 build_function_type_vec instead.
5145 2011-05-11 Nathan Froyd <froydnj@codesourcery.com>
5147 * gcc-interface/ada-tree.h (TYPE_OBJECT_RECORD_TYPE): Use TYPE_MINVAL.
5148 (TYPE_GCC_MIN_VALUE): Use TYPE_MINVAL.
5149 (TYPE_GCC_MAX_VALUE): Use TYPE_MAXVAL.
5151 2011-05-07 Eric Botcazou <ebotcazou@adacore.com>
5153 * gcc-interface/decl.c (intrin_arglists_compatible_p): Remove spaces.
5155 * gcc-interface/gigi.h (global_bindings_p): Adjust prototype.
5156 * gcc-interface/utils.c (global_bindings_p): Return bool and simplify.
5158 2011-05-05 Nathan Froyd <froydnj@codesourcery.com>
5160 * gcc-interface/trans.c (Case_Statement_to_gnu): Call build_case_label.
5162 2011-05-05 Nathan Froyd <froydnj@codesourcery.com>
5164 * gcc-interface/decl.c (intrin_arglists_compatible_p): Use iterators
5165 instead of accessing TYPE_ARG_TYPES directly.
5166 * gcc-interface/utils.c (handle_nonnull_attribute): Likewise.
5168 2011-05-05 Eric Botcazou <ebotcazou@adacore.com>
5171 * gcc-interface/gigi.h (get_variant_part): Declare.
5172 * gcc-interface/decl.c (get_variant_part): Make global.
5173 * gcc-interface/utils2.c (find_common_type): Do not return T1 if the
5174 types have the same constant size, are record types and T1 has a
5175 variant part while T2 doesn't.
5177 2011-05-05 Eric Botcazou <ebotcazou@adacore.com>
5179 * gcc-interface/utils.c (begin_subprog_body): Do not call
5181 (end_subprog_body): Likewise.
5183 2011-05-04 Richard Guenther <rguenther@suse.de>
5185 * gcc-interface/trans.c (gnat_to_gnu): Remove zero notrunc argument to
5187 (pos_to_constructor): Likewise.
5189 2011-05-03 Nathan Froyd <froydnj@codesourcery.com>
5190 Eric Botcazou <ebotcazou@adacore.com>
5192 * gcc-interface/trans.c (gigi): Call build_function_type_list instead
5193 of build_function_type. Adjust calls to...
5194 (build_raise_check): ...this. Do not take a void_tree parameter.
5195 Call build_function_type_list instead of build_function_type.
5196 Fix head comment and swap couple of conditional blocks.
5198 2011-04-30 Eric Botcazou <ebotcazou@adacore.com>
5200 * gnatvsn.ads (Library_Version): Bump to 4.7.
5201 (Current_Year): Bump to 2011.
5203 2011-04-29 Michael Matz <matz@suse.de>
5205 * gcc-interface/misc.c (gnat_handle_option): Set
5206 warn_maybe_uninitialized.
5208 2011-04-23 Gerald Pfeifer <gerald@pfeifer.com>
5210 * gnat_ugn.texi (Complexity Metrics Control): Update link to
5211 the Watson/McCabe paper.
5213 2011-04-23 Jim Meyering <meyering@redhat.com>
5215 * gnat_ugn.texi (Examples of gnatxref Usage): Fix typo: s/it it/it is/
5217 2011-04-22 Eric Botcazou <ebotcazou@adacore.com>
5219 * gcc-interface/decl.c (make_packable_type): Copy DECL_PARALLEL_TYPE
5222 2011-04-22 Eric Botcazou <ebotcazou@adacore.com>
5224 * gcc-interface/gigi.h (create_subprog_decl): Add ARTIFICIAL_FLAG
5226 * gcc-interface/utils.c (create_subprog_decl): Likewise. Set
5227 DECL_ARTIFICIAL and DECL_NO_INLINE_WARNING_P on the DECL accordingly.
5228 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Subprogram_Type>: Add
5229 ARTIFICIAL_FLAG local variable and pass it to create_subprog_decl.
5230 <all>: Do not set flags on the reused DECL node coming from an alias.
5231 Set DECL_IGNORED_P on the DECL node built for subprograms if they
5232 don't need debug info here...
5233 * gcc-interface/trans.c (Subprogram_Body_to_gnu): ...and not here.
5234 (gigi): Adjust calls to create_subprog_decl.
5235 (build_raise_check): Likewise.
5236 (establish_gnat_vms_condition_handler): Likewise.
5237 (Compilation_Unit_to_gnu): Likewise.
5238 (gnat_to_gnu): Likewise.
5240 2011-04-21 Eric Botcazou <ebotcazou@adacore.com>
5242 * gcc-interface/Makefile.in (NO_SIBLING_ADAFLAGS): Always define.
5243 (NO_REORDER_ADAFLAGS): New variable.
5244 (EXTRA_GNATTOOLS): Always define.
5245 (../stamp-gnatlib1-$(RTSDIR): Copy tsystem.h.
5246 Clean up and adjust list of files compiled with special options.
5247 * gcc-interface/Make-lang.in: Likewise.
5248 (ada/decl.o): Cosmetical change.
5249 (ada/misc.o): Remove dependency on $(PLUGIN_H).
5251 2011-04-20 Jim Meyering <meyering@redhat.com>
5253 * initialize.c (__gnat_initialize): Remove useless if-before-free.
5255 2011-04-17 Eric Botcazou <ebotcazou@adacore.com>
5257 * gcc-interface/Make-lang.in (gnatbind): Replace $(ALL_CFLAGS) with
5258 $(CFLAGS) on the link line.
5260 2011-04-17 Eric Botcazou <ebotcazou@adacore.com>
5262 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Function>: Declare the
5263 padded type built for the return type if it is unconstrained.
5265 2011-04-14 Nathan Froyd <froydnj@codesourcery.com>
5267 * gcc-interface/utils.c (gnat_poplevel): Use block_chainon.
5269 2011-04-12 Nathan Froyd <froydnj@codesourcery.com>
5271 * gcc-interface/ada-tree.h (union lang_tree_node): Check for TS_COMMON
5272 before calling TREE_CHAIN.
5273 * gcc-interface/misc.c (gnat_init_ts): New function.
5274 (LANG_HOOKS_INIT_TS): Define.
5276 2011-04-12 Martin Jambor <mjambor@suse.cz>
5278 * gcc-interface/utils.c (end_subprog_body): Call cgraph_get_create_node
5279 instead of cgraph_node.
5281 2011-04-08 Eric Botcazou <ebotcazou@adacore.com>
5283 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Procedure>: Set minimum
5284 alignment on fields of the RETURN type built for the Copy-In Copy-Out
5287 2011-04-08 Eric Botcazou <ebotcazou@adacore.com>
5289 * gcc-interface/trans.c (Identifier_to_gnu): Do not return initializers
5290 of aggregate types that contain a placeholder.
5292 2011-04-08 Nathan Froyd <froydnj@codesourcery.com>
5294 * gcc-interface/utils.c (handle_sentinel_attribute): Don't use
5296 (handle_type_generic_attribute): Likewise.
5298 2011-04-04 Eric Botcazou <ebotcazou@adacore.com>
5301 * s-oscons-tmplt.c (MSG_WAITALL): Fix thinko in previous change.
5303 2011-04-04 Kai Tietz <ktietz@redhat.com>
5306 * s-oscons-tmplt.c (MSG_WAITALL): Define it for native windows targets
5309 2011-04-02 Eric Botcazou <ebotcazou@adacore.com>
5311 * gcc-interface/utils2.c (build_allocator): In the unconstrained array
5312 type case, do not strip a padding type around the array type.
5314 2011-04-02 Eric Botcazou <ebotcazou@adacore.com>
5316 * gcc-interface/utils.c (update_pointer_to): Finalize named pointer
5319 2011-04-02 Eric Botcazou <ebotcazou@adacore.com>
5321 * gcc-interface/lang.opt (feliminate-unused-debug-types): Delete.
5322 * gcc-interface/misc.c (gnat_handle_option): Remove special handling
5323 code for -feliminate-unused-debug-types.
5324 (gnat_post_options): Likewise.
5326 2011-04-02 Eric Botcazou <ebotcazou@adacore.com>
5328 * gcc-interface/utils.c (gnat_pushdecl): If this is a non-artificial
5329 declaration of a pointer type, then set DECL_ORIGINAL_TYPE to a
5332 2011-04-02 Eric Botcazou <ebotcazou@adacore.com>
5334 * gcc-interface/decl.c (gnat_to_gnu_entity): Do not force the
5335 DECL_ARTIFICIAL flag on enumeration types.
5337 2011-04-02 Eric Botcazou <ebotcazou@adacore.com>
5339 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Array_Type>: Do not make
5340 fat pointer types artificial unconditionally.
5341 <E_Array_Subtype>: Attach the base array type as a parallel type if it
5344 2011-04-02 Eric Botcazou <ebotcazou@adacore.com>
5346 * gcc-interface/gigi.h (get_dummy_type): Declare.
5347 (build_dummy_unc_pointer_types): Likewise.
5348 (finish_fat_pointer_type): Likewise.
5349 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Array_Type>: If a dummy
5350 fat pointer type has been built, complete it in place.
5351 <E_Access_Type>: Call build_dummy_unc_pointer_types to build dummy fat
5352 and thin pointers. Remove useless variable.
5353 (finish_fat_pointer_type): Make global and move to...
5354 * gcc-interface/utils.c (finish_fat_pointer_type): ...here.
5355 (get_dummy_type): New function.
5356 (build_dummy_unc_pointer_types): Likewise.
5357 (gnat_pushdecl): Propage the name to the anonymous variants only.
5358 (update_pointer_to): Only adjust the pointer types in the unconstrained
5361 2011-04-02 Eric Botcazou <ebotcazou@adacore.com>
5363 * gcc-interface/ada-tree.h (DECL_TAFT_TYPE_P): New flag.
5364 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Incomplete_Type>: Set it
5365 if this is a Taft amendment type and the full declaration is available.
5366 * gcc-interface/trans.c (process_type): Likewise.
5367 If there is an old type, mark the new one as used if DECL_TAFT_TYPE_P.
5368 (process_freeze_entity): Likewise.
5369 * gcc-interface/utils.c (dummy_global): New static variable.
5370 (gnat_write_global_declarations): If there are types declared as used
5371 at the global level, insert them in the global hash table.
5373 2011-04-02 Eric Botcazou <ebotcazou@adacore.com>
5375 * gcc-interface/gigi.h (record_builtin_type): Add ARTIFICIAL_P param.
5376 * gcc-interface/utils.c (gnat_pushdecl): If this is a non-artificial
5377 declaration of an array type, then set DECL_ORIGINAL_TYPE to a distinct
5379 (record_builtin_type): Add ARTIFICIAL_P parameter. Set DECL_ARTIFICIAL
5380 flag of the type accordingly.
5381 * gcc-interface/trans.c (gigi): Adjust calls to record_builtin_type.
5383 2011-04-02 Eric Botcazou <ebotcazou@adacore.com>
5385 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Access_Type>: Defer
5386 finalizing types when updating the pointers to the designated type.
5387 <all>: Finalize the deferred types even if we didn't defer processing
5388 of incomplete types in this invocation.
5390 2011-04-01 Olivier Hainque <hainque@adacore.com>
5391 Nicolas Setton <setton@adacore.com>
5392 Eric Botcazou <ebotcazou@adacore.com>
5394 * gcc-interface/misc.c (gnat_descriptive_type): New function.
5395 (LANG_HOOKS_DESCRIPTIVE_TYPE): Redefine to gnat_descriptive_type.
5397 2011-03-28 Kai Tietz <ktietz@redhat.com>
5399 * gcc-interface/Makefile.in (SO_LIB): Handle multilib build for native
5401 (EH_MECHANISM): Use GCC exception mechanism for native Windows targets.
5402 * system-mingw.ads (System): Change ZCX_By_Default default to True.
5404 * raise-gcc.c (PERSONALITY_FUNCTION): Add prototype.
5406 2011-03-28 Tristan Gingold <gingold@adacore.com>
5409 * gcc-interface/Make-lang.in (ada/b_gnat1.adb): Replace ada/b_gnat1.c.
5410 Use ada output of gnatbind.
5411 (ada/b_gnatb.adb): Ditto.
5412 (ada/b_gnat1.o, ada/b_gnatb.o): New rules.
5413 (ada.mostlyclean, ada.stage1)
5414 (ada.stage2, ada.stage3, ada.stage4, ada.stageprofile)
5415 (ada.stagefeedback): Adjust.
5416 * gcc-interface/Makefile.in (b_gnatl.adb): Replace b_gnatl.c.
5417 Use ada output of gnatbind.
5418 (b_gnatm.adb): Ditto.
5419 (b_gnatl.o, b_gnatm.o): New rules.
5421 2011-03-26 Eric Botcazou <ebotcazou@adacore.com>
5423 * gcc-interface/decl.c (gnat_to_gnu_entity) <object>: Create TYPE_DECL
5424 for the padded type built to support a specified size or alignment.
5426 2011-03-26 Eric Botcazou <ebotcazou@adacore.com>
5428 * gcc-interface/gigi.h (finalize_from_with_types): Adjust comment.
5429 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Access_Type>: Defer
5430 unconditionally to the end of the unit when the designated type is
5432 <all>: Rename local variable. Attempt to un-defer types only and do it
5433 for limited_with'ed types as well.
5434 (finalize_from_with_types): Adjust comment. Rename variable and tidy.
5435 * gcc-interface/trans.c (Compilation_Unit_to_gnu): Use GNAT_UNIT
5436 consistently and remove redundant call to finalize_from_with_types.
5438 2011-03-26 Eric Botcazou <ebotcazou@adacore.com>
5440 * inline.adb (Back_End_Cannot_Inline): Lift restriction on calls to
5441 subprograms without a previous spec declared in the same unit.
5442 * gcc-interface/trans.c (Compilation_Unit_to_gnu): Process inlined
5443 subprograms at the end of the unit instead of at the beginning.
5444 * gcc-interface/utils.c (create_subprog_decl): Check that the entity
5445 isn't public for the special handling of non-inline functions nested
5446 inside inline external functions.
5448 2011-03-25 Jeff Law <law@redhat.com>
5450 * gcc-interface/utils.c (def_fn_type): Add missing va_end.
5452 2011-03-24 Eric Botcazou <ebotcazou@adacore.com>
5454 * einfo.ads (Size_Depends_On_Discriminant): Adjust description.
5455 * layout.adb (Compute_Size_Depends_On_Discriminant): New procedure
5456 to compute Set_Size_Depends_On_Discriminant.
5457 (Layout_Type): Call it on array types in back-end layout mode.
5458 * sem_util.adb (Requires_Transient_Scope): Return true for array
5459 types only if the size depends on the value of discriminants.
5460 * gcc-interface/utils2.c (build_binary_op) <MODIFY_EXPR>: Use the RHS
5461 type if the RHS is a call to a function that returns an unconstrained
5462 type with default discriminant.
5464 2011-03-24 Eric Botcazou <ebotcazou@adacore.com>
5466 * gcc-interface/trans.c (gnat_to_gnu): Remove obsolete case of
5467 non-conversion to the nominal result type at the end.
5469 2011-03-23 Eric Botcazou <ebotcazou@adacore.com>
5471 * gcc-interface/trans.c (create_temporary): New function taken from...
5472 (create_init_temporary): ...here. Call it.
5473 (call_to_gnu): Create the temporary for the return value early, if any.
5474 Create it for a function with copy-in/copy-out parameters if there is
5475 no target; in other cases of copy-in/copy-out, use another temporary.
5476 Push the new binding level lazily. Add and rename local variables.
5478 2011-03-23 Eric Botcazou <ebotcazou@adacore.com>
5480 * gcc-interface/decl.c (validate_size): Improve comments and tweak
5482 (set_rm_size): Likewise.
5484 2011-03-23 Eric Botcazou <ebotcazou@adacore.com>
5486 * gcc-interface/decl.c (gnat_to_gnu_entity) <object>: Create TYPE_DECL
5487 for the padded type built in order to support a specified alignment.
5488 Fix incorrect formatting.
5490 2011-03-21 Eric Botcazou <ebotcazou@adacore.com>
5493 * gcc-interface/decl.c (elaborate_expression_1): Localize GNU_DECL.
5495 2011-03-21 Eric Botcazou <ebotcazou@adacore.com>
5497 * gcc-interface/decl.c (components_to_record): Add REORDER parameter,
5498 rename DEBUG_INFO_P into DEBUG_INFO and move P_GNU_REP_LIST parameter
5499 to the end of the list. Adjust recursive call. Rename local variable.
5500 If REORDER is true, reorder components of the record type.
5501 (gnat_to_gnu_entity): Pass OK_To_Reorder_Components flag as argument to
5502 components_to_record and adjust the parameter list.
5504 2011-03-21 Eric Botcazou <ebotcazou@adacore.com>
5506 * gcc-interface/decl.c (elaborate_expression_1): When optimization is
5507 disabled, use the variable for bounds of loop iteration scheme.
5509 2011-03-21 Kai Tietz <ktietz@redhat.com>
5512 * gcc-interface/utils.c (gnat_internal_attribute_table): Add column.
5514 2011-03-17 Eric Botcazou <ebotcazou@adacore.com>
5516 * gcc-interface/decl.c (elaborate_expression_1): Try harder to find
5517 out whether the expression is read-only. Short-circuit placeholder
5518 case and rename a couple of local variables.
5520 2011-03-17 Eric Botcazou <ebotcazou@adacore.com>
5522 * gcc-interface/gigi.h (smaller_form_type_p): Declare.
5523 * gcc-interface/trans.c (smaller_form_type_p): Make global and move...
5524 * gcc-interface/utils.c (smaller_form_type_p): ...to here.
5525 (convert): Deal with conversions from a smaller form type specially.
5527 2011-02-14 Eric Botcazou <ebotcazou@adacore.com>
5529 * gcc-interface/misc.c (gnat_init_options): Do not concatenate -I and
5530 its argument, except for the special -I- switch.
5532 2011-02-12 Gerald Pfeifer <gerald@pfeifer.com>
5534 * gnat_ugn.texi (Compiling Different Versions of Ada): Update link to
5537 2011-02-08 Eric Botcazou <ebotcazou@adacore.com>
5539 * gcc-interface/Makefile.in (x86-64 darwin): Handle multilibs.
5541 2011-02-03 Eric Botcazou <ebotcazou@adacore.com>
5543 * gcc-interface/gigi.h (fill_vms_descriptor): Take GNU_TYPE instead of
5545 * gcc-interface/utils2.c (fill_vms_descriptor): Move from here to...
5546 * gcc-interface/utils.c (fill_vms_descriptor): ...here. Take GNU_TYPE
5547 instead of GNAT_FORMAL. Protect the expression against multiple uses.
5548 Do not generate the check directly, instead instantiate the template
5549 check present in the descriptor.
5550 (make_descriptor_field): Move around.
5551 (build_vms_descriptor32): Build a template check in the POINTER field.
5552 (build_vms_descriptor): Remove useless suffixes.
5553 * gcc-interface/trans.c (call_to_gnu): Adjust fill_vms_descriptor call.
5555 2011-01-26 Eric Botcazou <ebotcazou@adacore.com>
5558 * targext.c: Include target files if IN_RTS is defined.
5560 2011-01-26 Richard Guenther <rguenther@suse.de>
5563 * targext.c: Include config.h.
5564 * gcc-interface/Make-lang.in (ada/targext.o): Add $(CONFIG_H)
5567 2011-01-04 Pascal Obry <obry@adacore.com>
5568 Eric Botcazou <ebotcazou@adacore.com>
5570 * gcc-interface/decl.c: Disable Stdcall convention handling for 64-bit.
5572 2011-01-04 Eric Botcazou <ebotcazou@adacore.com>
5574 * gcc-interface/trans.c (Case_Statement_to_gnu): Put the SLOC of the
5575 end-of-case on the end label and its associated gotos, if any.
5577 2011-01-04 Eric Botcazou <ebotcazou@adacore.com>
5579 * gcc-interface/trans.c (Subprogram_Body_to_gnu): Evaluate the
5580 expressions of the parameter cache within the statement group of
5583 2011-01-04 Olivier Hainque <hainque@adacore.com>
5584 Eric Botcazou <ebotcazou@adacore.com>
5586 * gcc-interface/trans.c (BLOCK_SOURCE_END_LOCATION): Provide default.
5587 (set_end_locus_from_node): New function.
5588 (Subprogram_Body_to_gnu): Use it to mark both the inner BIND_EXPR we
5589 make and the function end_locus.
5590 (Compilation_Unit_to_gnu): Call it instead of a straight Sloc_to_locus
5591 for the elaboration subprogram.
5592 (set_gnu_expr_location_from_node) <default case>: Use it to attempt to
5593 set the end_locus of the expression as well.
5595 2011-01-04 Eric Botcazou <ebotcazou@adacore.com>
5598 * gcc-interface/trans.c (Identifier_to_gnu): In SJLJ mode, do not make
5599 variables that are referenced in exception handlers volatile.
5603 Copyright (C) 2011 Free Software Foundation, Inc.
5605 Copying and distribution of this file, with or without modification,
5606 are permitted in any medium without royalty provided the copyright
5607 notice and this notice are preserved.
5609 * gnat_rm.texi: Ramification of pragma Eliminate documentation
5610 - fix bugs in the description of Source_Trace;
5611 - get rid of UNIT_NAME;
5613 2011-08-02 Javier Miranda <miranda@adacore.com>
5616 (Build_Dispatching_Requeue): Adding support for VM targets
5617 since we cannot directly reference the Tag entity.
5618 * exp_sel.adb (Build_K): Adding support for VM targets.
5619 (Build_S_Assignment): Adding support for VM targets.
5621 (Default_Prim_Op_Position): In VM targets do not restrict availability
5622 of predefined interface primitives to compiling in Ada 2005 mode.
5623 (Is_Predefined_Interface_Primitive): In VM targets this service is not
5624 restricted to compiling in Ada 2005 mode.
5625 (Make_VM_TSD): Generate code that declares and initializes the OSD
5626 record. Needed to support dispatching calls through synchronized
5629 (Make_Predefined_Primitive_Specs): Enable generation of predefined
5630 primitives associated with synchronized interfaces.
5631 (Make_Predefined_Primitive_Bodies): Enable generation of predefined
5632 primitives associated with synchronized interfaces.
5634 2011-08-02 Yannick Moy <moy@adacore.com>
5636 * par-ch11.adb (P_Handled_Sequence_Of_Statements): mark a sequence of
5637 statements hidden in SPARK if preceded by the HIDE directive
5638 (Parse_Exception_Handlers): mark each exception handler in a sequence of
5639 exception handlers as hidden in SPARK if preceded by the HIDE directive
5640 * par-ch6.adb (P_Subprogram): mark a subprogram body hidden in SPARK
5641 if starting with the HIDE directive
5642 * par-ch7.adb (P_Package): mark a package body hidden in SPARK if
5643 starting with the HIDE directive; mark the declarations in a private
5644 part as hidden in SPARK if the private part starts with the HIDE
5646 * restrict.adb, restrict.ads
5647 (Set_Hidden_Part_In_SPARK): record a range of slocs as hidden in SPARK
5648 (Is_In_Hidden_Part_In_SPARK): new function which returns whether its
5649 argument node belongs to a part which is hidden in SPARK
5650 (Check_SPARK_Restriction): do not issue violations on nodes in hidden
5651 parts in SPARK; protect the possibly costly call to
5652 Is_In_Hidden_Part_In_SPARK by a check that the SPARK restriction is on
5653 * scans.ads (Token_Type): new value Tok_SPARK_Hide in enumeration
5654 * scng.adb (Accumulate_Token_Checksum_GNAT_6_3,
5655 Accumulate_Token_Checksum_GNAT_5_03): add case for new token
5657 (Scan): recognize special comment starting with '#' and followed by
5658 SPARK keyword "hide" as a HIDE directive.
5660 2011-08-02 Yannick Moy <moy@adacore.com>
5662 * types.ads, erroutc.ads: Minor reformatting.
5664 2011-08-02 Vincent Celier <celier@adacore.com>
5666 * link.c: Add response file support for cross platforms.
5668 2011-08-02 Ed Schonberg <schonberg@adacore.com>
5670 * sem_aggr.adb (Resolve_Array_Aggregate): when copying the expression
5671 in an association, set parent field of copy before partial analysis.
5672 * sem_res.adb (Resolve_Slice): create reference to itype only when
5673 expansion is enabled.
5675 2011-08-02 Yannick Moy <moy@adacore.com>
5677 * einfo.adb, einfo.ads (Body_Is_In_ALFA, Set_Body_Is_In_ALFA): get/set
5678 for new flag denoting which subprogram bodies are in ALFA
5679 * restrict.adb, sem_ch7.adb: Update comment
5680 * sem_ch11.adb, sem_ch2.adb, sem_ch3.adb, sem_ch4.adb, sem_ch5.adb,
5681 sem_ch9.adb, sem_res.adb: Add calls to
5682 Current_Subprogram_Body_Is_Not_In_ALFA on unsupported constructs.
5683 * sem_ch6.adb (Analyze_Function_Return): add calls to
5684 Current_Subprogram_Body_Is_Not_In_ALFA on return statement in the
5685 middle of the body, and extended return.
5686 (Check_Missing_Return): add calls to Set_Body_Is_In_ALFA with argument
5687 False when missing return.
5688 (Analyze_Subprogram_Body_Helper): initialize the flag Body_Is_In_ALFA
5689 to True for subprograms whose spec is in ALFA. Remove later on the flag
5690 on the entity used for a subprogram body when there exists a separate
5692 * sem_util.adb, sem_util.ads (Current_Subprogram_Body_Is_Not_In_ALFA):
5693 if Current_Subprogram is not Empty, set its flag Body_Is_In_ALFA to
5694 False, otherwise do nothing.
5696 2011-08-02 Robert Dewar <dewar@adacore.com>
5698 * inline.adb, stand.ads, sem_ch6.adb, sem_ch8.adb: Minor reformatting.
5700 2011-08-02 Yannick Moy <moy@adacore.com>
5702 * sem_ch4.ads: minor formatting.
5704 2011-08-02 Yannick Moy <moy@adacore.com>
5706 * sem_aggr.adb, err_vars.ads, sem_ch3.adb, sem_ch5.adb, sem_ch9.adb,
5707 debug.adb, sem_util.adb, sem_res.adb, sem_attr.adb, gnat1drv.adb,
5708 errout.adb, errout.ads, exp_ch6.adb, sem_ch4.adb, restrict.adb,
5709 restrict.ads, sem_ch6.adb, sem_ch8.adb, sem_ch11.adb,
5710 opt.ads: cleanup of SPARK mode
5712 2011-08-02 Yannick Moy <moy@adacore.com>
5714 * cstand.adb (Create_Standard): sets Is_In_ALFA component of standard
5716 * einfo.adb, einfo.ads (Is_In_ALFA): add flag for all entities
5717 (Is_In_ALFA, Set_Is_In_ALFA): new subprograms to access flag Is_In_ALFA
5719 (Analyze_Object_Declaration): set Is_In_ALFA flag for objects
5720 (Constrain_Enumeration): set Is_In_ALFA flag for enumeration subtypes
5721 (Constrain_Integer): set Is_In_ALFA flag for integer subtypes
5722 (Enumeration_Type_Declaration): set Is_In_ALFA flag for enumeration
5724 (Set_Scalar_Range_For_Subtype): unset Is_In_ALFA flag for subtypes with
5726 * sem_ch6.adb (Analyze_Return_Type): unset Is_In_ALFA flag for
5727 functions whose return type is not in ALFA.
5728 (Analyze_Subprogram_Specification): set Is_In_ALFA flag for subprogram
5730 (Process_Formals): unset Is_In_ALFA flag for subprograms if a
5731 parameter's type is not in ALFA.
5732 * stand.ads (Standard_Type_Is_In_ALFA): array defines which standard
5735 2011-08-02 Ed Schonberg <schonberg@adacore.com>
5737 * sem_ch6 (Analyze_Expression_Function): treat the function as
5738 Inline_Always, and introduce a subprogram declaration for it when it is
5740 * inline.adb (Add_Inlined_Body): recognize bodies that come from
5741 expression functions, so that the back-end can determine whether they
5742 can in fact be inlined.
5743 * sem_util.adb (Is_Expression_Function): predicate to determine whether
5744 a function body comes from an expression function.
5746 2011-08-02 Gary Dismukes <dismukes@adacore.com>
5748 * sem_ch6.adb (Check_Conformance): Revise the check for nonconforming
5749 null exclusions to test Can_Never_Be_Null on the anonymous access types
5750 of the formals rather than testing the formals themselves. Exclude this
5751 check in cases where the Old_Formal is marked as a controlling formal,
5752 to avoid issuing spurious errors for bodies completing dispatching
5753 operations (due to the flag not getting set on controlling access
5754 formals in body specs).
5755 (Find_Corresponding_Spec): When checking full and subtype conformance of
5756 subprogram bodies in instances, pass Designated and E in that order, for
5757 consistency with the expected order of the formals (New_Id followed by
5760 2011-08-02 Robert Dewar <dewar@adacore.com>
5762 * sem_ch8.adb: Minor reformatting.
5764 2011-08-02 Ed Schonberg <schonberg@adacore.com>
5766 * sem_ch8.adb (Analyze_Subprogram_Renaming): new procedure
5767 Check_Class_Wide_Actual, to implement AI05-0071, on defaulted
5768 primitive operations of class-wide actuals.
5770 2011-08-02 Javier Miranda <miranda@adacore.com>
5772 * exp_atag.ads, exp_atag.adb
5773 (Build_Common_Dispatching_Select_Statements): Remove argument Loc
5774 since its value is implicitly passed in argument Typ.
5775 * exp_disp.adb (Make_Disp_Conditional_Select_Body,
5776 Make_Disp_Timed_Select_Body): Remove Loc in calls to routine
5777 Build_Common_Dispatching_Select_Statements.
5779 2011-08-02 Robert Dewar <dewar@adacore.com>
5781 * sem_ch3.adb, exp_atag.ads, get_scos.adb, get_scos.ads,
5782 exp_disp.adb, lib-xref.adb, lib-xref.ads: Update comments.
5785 2011-08-02 Robert Dewar <dewar@adacore.com>
5787 * sem_res.adb: Minor reformatting.
5788 * sem_prag.adb: Minor reformatting.
5790 2011-08-02 Javier Miranda <miranda@adacore.com>
5792 * exp_atag.adb, exp_atags.ads
5793 (Build_Common_Dispatching_Select_Statement): Replace argument DT_Ptr
5794 by the tagged type Entity. Required to use this routine in the VM
5795 targets since we do not have available the Tag entity in the VM
5798 (Expand_N_Subprogram_Body): Do not invoke Build_VM_TSDs if package
5799 Ada.Tags has not been previously loaded.
5801 (Expand_N_Package_Declaration, Expand_N_Package_Body): Do not invoke
5802 Build_VM_TSDs if package Ada.Tags has not been previously loaded.
5804 (Enclosing_Dynamic_Scope): Add missing support to handle the full
5805 view of enclosing scopes. Required to handle enclosing scopes that
5806 are synchronized types whose full view is a task type.
5808 (Build_VM_TSDs): Minor code improvement to avoid generating and
5809 analyzing lists with empty nodes.
5810 (Make_Disp_Asynchronous_Select_Body): Add support for VM targets.
5811 (Make_Disp_Conditional_Select_Body): Add support for VM targets.
5812 (Make_Disp_Get_Prim_Op_Kind): Add support for VM targets.
5813 (Make_Disp_Timed_Select_Body): Add support for VM targets.
5814 (Make_Select_Specific_Data_Table): Add support for VM targets.
5815 (Make_VM_TSD): Generate code to initialize the SSD structure of
5818 2011-08-02 Yannick Moy <moy@adacore.com>
5820 * lib-writ.adb (Write_ALI): when ALFA mode is set, write local
5821 cross-references section in ALI.
5822 * lib-xref.adb, lib-xref.ads (Xref_Entry): add components Sub
5823 (enclosing subprogram), Slc (location of Sub) and Sun (unit number of
5825 (Enclosing_Subprogram_Or_Package): new function to return the enclosing
5826 subprogram or package entity of a node
5827 (Is_Local_Reference_Type): new function returns True for references
5828 selected in local cross-references.
5829 (Lt): function extracted from Lt in Output_References
5830 (Write_Entity_Name): function extracted from Output_References
5831 (Generate_Definition): generate reference with type 'D' for definition
5832 of objects (object declaration and parameter specification), with
5833 appropriate locations and units, for use in local cross-references.
5834 (Generate_Reference): update fields Sub, Slc and Sun. Keep newly created
5835 references of type 'I' for initialization in object definition.
5836 (Output_References): move part of function Lt and procedure
5837 Write_Entity_Name outside of the body. Ignore references of types 'D'
5838 and 'I' introduced for local cross-references.
5839 (Output_Local_References): new procedure to output the local
5840 cross-references sections.
5841 (Lref_Entity_Status): new array defining whether an entity is a local
5842 * sem_ch3.adb (Analyze_Object_Declaration): call Generate_Reference
5843 with 'I' type when initialization expression is present.
5844 * get_scos.adb, get_scos.ads: Correct comments and typos
5846 2011-08-02 Javier Miranda <miranda@adacore.com>
5848 * exp_ch6.adb (Expand_N_Subprogram_Body): Enable generation of TSDs in
5850 * exp_ch7.adb (Expand_N_Package_Body): Enable generation of TSDs in
5852 * exp_disp.adb (Build_VM_TSDs): No action needed if the runtime has no
5855 2011-08-02 Vincent Celier <celier@adacore.com>
5857 * prj-nmsc.adb (File_Found): New components Excl_File and Excl_Line
5858 (No_Space_Img): New function
5859 (Find_Excluded_Sources): When reading from a file, record the file name
5860 and the line number for each excluded source.
5861 (Mark_Excluded_Sources): When reporting an error, if the excluded
5862 sources were read from a file, include file name and line number in
5865 2011-08-02 Ed Schonberg <schonberg@adacore.com>
5867 * sem_res.adb (Resolve_Call): implement rule in RM 12.5.1 (23.3/2).
5869 2011-08-02 Robert Dewar <dewar@adacore.com>
5871 * exp_ch7.adb exp_ch6.adb, exp_disp.adb: Minor reformatting
5873 2011-08-02 Javier Miranda <miranda@adacore.com>
5875 * exp_ch6.adb (Expand_N_Subprogram_Body): Temporarily restrict the
5876 generation of TSDs to the DOTNET compiler.
5877 * exp_ch7.adb (Expand_N_Package_Body): Temporarily restrict the
5878 generation of TSDs to the DOTNET compiler.
5880 2011-08-02 Javier Miranda <miranda@adacore.com>
5882 * exp_disp.ads (Build_VM_TSDs): Build the runtime Type Specific Data
5883 record of all the tagged types declared inside library level package
5884 declarations, library level package bodies or library level subprograms.
5885 * exp_disp.adb (Make_VM_TSD): New subprogram that builds the TSD
5886 associated with a given tagged type.
5887 (Build_VM_TSDs): New subprogram.
5888 * exp_ch6.adb (Expand_N_Subprogram_Body): Generate TSDs records of main
5889 compilation units that are subprograms.
5890 * exp_ch7.adb (Expand_N_Package_Body): Generate TSDs of main
5891 compilation units that are package bodies.
5892 (Expand_N_Package_Declaration): Generate TSDs of the main compilation
5893 units that are a package declaration or a package instantiation.
5894 * exp_intr.adb (Expand_Dispatching_Constructor_Call): Minor code
5895 reorganization to improve the error generated by the frontend when the
5896 function Ada.Tags.Secondary_Tag is not available.
5897 * rtsfind.ads (RE_Register_TSD): New runtime entity.
5898 * exp_ch4.adb (Expand_N_Type_Conversion): Minor code cleanup.
5900 2011-08-02 Javier Miranda <miranda@adacore.com>
5902 * exp_disp.adb (Make_DT): Generate call to Check_TSD in Ada 2005 mode.
5904 2011-08-02 Robert Dewar <dewar@adacore.com>
5906 * s-imenne.ads: Minor reformatting.
5908 2011-08-02 Robert Dewar <dewar@adacore.com>
5910 * a-stunau.ads: Add pragma Suppress_Initialization for Big_String
5911 * freeze.adb (Warn_Overlay): Don't warn if initialization suppressed
5912 * s-stalib.ads: Add pragma Suppress_Initialization for Big_String
5914 2011-08-02 Robert Dewar <dewar@adacore.com>
5916 * einfo.ads (Materialize_Entity): Document this is only for renamings
5917 * exp_ch3.adb (Expand_N_Object_Declaration): Make sure we generate
5918 required debug information in the case where we transform the object
5919 declaration into a renaming declaration.
5920 * exp_ch4.adb (Expand_Concatenate): Generate debug info for result
5922 * exp_dbug.ads (Debug_Renaming_Declaration): Document setting of
5925 2011-08-02 Robert Dewar <dewar@adacore.com>
5927 * einfo.ads, einfo.adb (Suppress_Initialization): Replaces
5928 Suppress_Init_Procs.
5929 * exp_ch3.adb, exp_disp.adb, freeze.adb: Use
5930 Suppress_Initialization/Initialization_Suppressed.
5931 * gnat_rm.texi: New documentation for pragma Suppress_Initialization
5932 * sem_aux.ads, sem_aux.adb (Initialization_Suppressed): New function
5933 * sem_dist.adb: Use Suppress_Initialization/Initialization_Suppressed
5934 * sem_prag.adb: New processing for pragma Suppress_Initialization.
5936 2011-08-02 Robert Dewar <dewar@adacore.com>
5938 * gnat_rm.texi, a-tags.ads, sem_prag.adb, sem_ch12.adb, exp_disp.adb:
5941 2011-08-02 Ed Schonberg <schonberg@adacore.com>
5943 * sem_prag.adb (Chain_PPC): Implement AI04-0230: null procedures can
5944 only have inheritable classwide pre/postconditions.
5946 2011-08-02 Javier Miranda <miranda@adacore.com>
5948 * a-tags.ads, a-tags.adb (Check_TSD): New subprogram.
5949 * rtsfind.ads (RE_Check_TSD): New runtime entity.
5950 * exp_disp.adb (Make_DT): Generate call to the new runtime routine that
5951 checks if the external tag of a type is the same as the external tag
5952 of some other declaration.
5954 2011-08-02 Thomas Quinot <quinot@adacore.com>
5956 * s-taskin.ads: Minor reformatting.
5958 2011-08-02 Emmanuel Briot <briot@adacore.com>
5960 * g-comlin.adb (Display_Help): swap the order in which it prints the
5961 short help and the general usage.
5963 2011-08-02 Ed Schonberg <schonberg@adacore.com>
5965 * sem_ch12.adb (Analyze_Generic_Subprogram_Declaration): copy properly
5966 the aspect declarations and attach them to the generic copy for
5967 subsequent analysis.
5968 (Analyze_Subprogram_Instantiation): copy explicitly the aspect
5969 declarations of the generic tree to the new subprogram declarations.
5970 * sem_attr.adb (Check_Precondition_Postcondition): recognize
5971 conditions that apply to a subprogram instance.
5973 2011-08-02 Robert Dewar <dewar@adacore.com>
5975 * gnat_rm.texi: Clarify doc on pragma Source_File_Name[_Project].
5977 2011-08-02 Ed Schonberg <schonberg@adacore.com>
5979 * sem_ch3.adb (Derived_Type_Declaration): When checking that a untagged
5980 private type with a tagged full view is not derived in the immediate
5981 scope of the partial view, (RM 7.3 (7)) use the scope of the base type.
5983 2011-08-02 Robert Dewar <dewar@adacore.com>
5985 * exp_ch4.adb: Minor reformatting.
5987 2011-08-02 Ed Schonberg <schonberg@adacore.com>
5989 * sem_ch5.adb (Analyze_Loop_Statement): If the iteration scheme is an
5990 Ada2012 iterator, the loop will be rewritten during expansion into a
5991 while loop with a cursor and an element declaration. Do not analyze the
5992 body in this case, because if the container is for indefinite types the
5993 actual subtype of the elements will only be determined when the cursor
5994 declaration is analyzed.
5996 2011-08-02 Arnaud Charlet <charlet@adacore.com>
5998 * sem_ch13.adb (Analyze_Attribute_Definition_Clause): Ignore
5999 size/alignment related attributes in CodePeer_Mode.
6001 2011-08-02 Gary Dismukes <dismukes@adacore.com>
6003 * sem_ch3.adb (Check_Ops_From_Incomplete_Type): Remove call to
6004 Prepend_Element, since this can result in the operation getting the
6005 wrong slot in the full type's dispatch table if the full type has
6006 inherited operations. The incomplete type's operation will get added
6007 to the proper position in the full type's primitives
6008 list later in Sem_Disp.Check_Operation_From_Incomplete_Type.
6009 (Process_Incomplete_Dependents): Add Is_Primitive test when checking for
6010 dispatching operations, since there are cases where nonprimitive
6011 subprograms can get added to the list of incomplete dependents (such
6012 as subprograms in nested packages).
6013 * sem_ch6.adb (Process_Formals): First, remove test for being in a
6014 private part when determining whether to add a primitive with a
6015 parameter of a tagged incomplete type to the Private_Dependents list.
6016 Such primitives can also occur in the visible part, and should not have
6017 been excluded from being private dependents.
6018 * sem_ch7.adb (Uninstall_Declarations): When checking the rule of
6019 RM05-3.10.1(9.3/2), test that a subprogram in the Private_Dependents
6020 list of a Taft-amendment incomplete type is a primitive before issuing
6021 an error that the full type must appear in the same unit. There are
6022 cases where nonprimitives can be in the list (such as subprograms in
6024 * sem_disp.adb (Derives_From): Use correct condition for checking that
6025 a formal's type is derived from the type of the corresponding formal in
6026 the parent subprogram (the condition was completely wrong). Add
6027 checking that was missing for controlling result types being derived
6028 from the result type of the parent operation.
6030 2011-08-02 Yannick Moy <moy@adacore.com>
6032 * errout.adb (First_Node): minor renaming
6033 * restrict.adb (Check_Formal_Restriction): put restriction warning on
6036 2011-08-02 Yannick Moy <moy@adacore.com>
6038 * sem_res.adb (Resolve_Logical_Op): ensure N is a binary operator
6039 before accessing operands.
6040 * sem_util.adb (Is_SPARK_Initialization_Expr): follow original nodes to
6041 decide whether an initialization expression respects SPARK rules, as
6042 the plain node is the expanded one. This allows for more valid warnings
6044 * gnat_rm.texi: Minor update.
6046 2011-08-02 Arnaud Charlet <charlet@adacore.com>
6048 * sem_ch13.adb (Analyze_Enumeration_Representation_Clause): Revert
6051 2011-08-02 Robert Dewar <dewar@adacore.com>
6053 * sem_ch3.adb, sem_ch4.adb: Minor reformatting.
6055 2011-08-02 Hristian Kirtchev <kirtchev@adacore.com>
6057 * exp_ch5.adb (Expand_Iterator_Loop): Reformatting. Wrap the original
6058 loop statements and the element renaming declaration with a block when
6059 the element type is controlled.
6061 2011-08-02 Yannick Moy <moy@adacore.com>
6063 * sinfo.ads: Minor formatting.
6065 2011-08-02 Ed Schonberg <schonberg@adacore.com>
6067 * sem_aggr.adb (Add_Association): if the association has a box and no
6068 expression, use the Sloc of the aggregate itself for the new
6070 * errout.adb (First_Node): Exclude nodes with no Sloc, and always use
6073 2011-08-02 Hristian Kirtchev <kirtchev@adacore.com>
6075 * exp_ch5.adb (Expand_Iterator_Loop): Code cleanup and refactoring.
6076 When a container is provided via a function call, generate a renaming
6077 of the function result. This avoids the creation of a transient scope
6078 and the premature finalization of the container.
6079 * exp_ch7.adb (Is_Container_Cursor): Removed.
6080 (Wrap_Transient_Declaration): Remove the supression of the finalization
6081 of the list controller when the declaration denotes a container cursor,
6084 2011-08-02 Yannick Moy <moy@adacore.com>
6086 * restrict.adb (Check_Formal_Restriction): only issue a warning if the
6087 node is from source, instead of the original node being from source.
6089 (Resolve_Array_Aggregate): refine the check for a static expression, to
6090 recognize also static ranges
6091 * sem_ch3.adb, sem_ch3.ads (Analyze_Component_Declaration,
6092 Array_Type_Declaration): postpone the test for the type being a subtype
6093 mark after the type has been resolved, so that component-selection and
6094 expanded-name are discriminated.
6095 (Make_Index, Process_Range_Expr_In_Decl): add a parameter In_Iter_Schm
6096 to distinguish the case of an iteration scheme, so that an error is
6097 issed on a non-static range in SPARK except in an iteration scheme.
6098 * sem_ch5.adb (Analyze_Iteration_Scheme): call Make_Index with
6099 In_Iter_Schm = True.
6100 * sem_ch6.adb (Analyze_Subprogram_Specification): refine the check for
6101 user-defined operators so that they are allowed in renaming
6103 (Find_Selected_Component): refine the check for prefixing of operators
6104 so that they are allowed in renaming. Move the checks for restrictions
6105 on selector name after analysis discriminated between
6106 component-selection and expanded-name.
6107 * sem_res.adb (Resolve_Op_Concat_Arg): do not issue a warning on
6108 concatenation argument of string type if it is static.
6109 * sem_util.adb, sem_util.ads
6110 (Check_Later_Vs_Basic_Declarations): add a new function
6111 Is_Later_Declarative_Item to decice which declarations are allowed as
6112 later items, in the two different modes Ada 83 and SPARK. In the SPARK
6113 mode, add that renamings are considered as later items.
6114 (Enclosing_Package): new function to return the enclosing package
6115 (Enter_Name): correct the rule for homonyms in SPARK
6116 (Is_SPARK_Initialization_Expr): default to returning True on nodes not
6117 from source (result of expansion) to avoid issuing wrong warnings.
6119 2011-08-02 Ed Schonberg <schonberg@adacore.com>
6121 * errout.adb: On anything but an expression First_Node returns its
6124 2011-08-02 Pascal Obry <obry@adacore.com>
6126 * prj-proc.adb, make.adb, makeutl.adb: Minor reformatting.
6128 2011-08-02 Hristian Kirtchev <kirtchev@adacore.com>
6130 * exp_ch5.adb (Expand_Iterator_Loop): Code cleanup and reorganization.
6131 Set the associated loop as the related expression of internally
6133 * exp_ch7.adb (Is_Container_Cursor): New routine.
6134 (Wrap_Transient_Declaration): Supress the finalization of the list
6135 controller when the declaration denotes a container cursor.
6137 2011-08-02 Yannick Moy <moy@adacore.com>
6139 * opt.ads (SPARK_Mode): update comment, SPARK_Mode only set through
6141 * par-ch3.adb (P_Delta_Constraint): remove check in SPARK mode that the
6142 expression is a simple expression. This check cannot be performed in
6143 the semantics, so just drop it.
6144 (P_Index_Or_Discriminant_Constraint): move check that the index or
6145 discriminant is a subtype mark to Analyze_Subtype_Declaration in the
6146 semantics. Other cases were previously checked in the semantics.
6147 * par-ch4.adb (P_Name): move checks that a selector name is not
6148 character literal or an operator symbol to Find_Selected_Component in
6150 * par-ch5.adb (Parse_Decls_Begin_End): move check that basic
6151 declarations are not placed after later declarations in a separate
6152 procedure in Sem_Util (possibly not the best choice?), to be used both
6153 during parsing, for Ada 83 mode, and during semantic analysis, for
6155 * par-endh.adb (Check_End): move check that end label is not missing
6156 to Process_End_Label in the semantics
6157 * par-prag.adb (Process_Restrictions_Or_Restriction_Warnings): remove
6158 the special case for SPARK restriction
6159 * par.adb: use and with Sem_Util, for use in Parse_Decls_Begin_End
6160 * restrict.adb, restrict.ads (Check_Formal_Restriction): add a
6161 parameter Force to issue the error message even on internal node (used
6162 for generated end label). Call Check_Restriction to check when an error
6163 must be issued. In SPARK mode, issue an error message even if the
6164 restriction is not set.
6165 (Check_Restriction): new procedure with an additional out parameter to
6166 inform the caller that a message has been issued
6167 * sem_aggr.adb: Minor modification of message
6168 * sem_attr.adb (Analyze_Attribute): call Check_Formal_Restriction
6169 instead of issuing an error message directly
6170 * sem_ch3.adb (Analyze_Declarations): move here the check that basic
6171 declarations are not placed after later declarations, by calling
6172 Check_Later_Vs_Basic_Declarations
6173 (Analyze_Subtype_Declaration): move here the check that an index or
6174 discriminant constraint must be a subtype mark. Change the check that
6175 a subtype of String must start at one so that it works on subtype marks.
6176 * sem_ch4.adb (Analyze_Call): move here the check that a named
6177 association cannot follow a positional one in a call
6178 * sem_ch5.adb (Check_Unreachable_Code): call Check_Formal_Restriction
6179 instead of issuing an error message directly
6180 * sem_ch8.adb (Find_Selected_Component): move here the check that a
6181 selector name is not a character literal or an operator symbol. Move
6182 here the check that the prefix of an expanded name cannot be a
6183 subprogram or a loop statement.
6184 * sem_util.adb, sem_util.ads (Check_Later_Vs_Basic_Declarations): new
6185 procedure called from parsing and semantics to check that basic
6186 declarations are not placed after later declarations
6187 (Process_End_Label): move here the check that end label is not missing
6189 2011-08-02 Arnaud Charlet <charlet@adacore.com>
6191 * sem_ch13.adb (Analyze_Enumeration_Representation_Clause): Ignore enum
6192 representation clause in codepeer mode, since it confuses CodePeer and
6193 does not bring useful info.
6195 2011-08-02 Ed Falis <falis@adacore.com>
6197 * init.c: initialize fp hw on MILS.
6199 2011-08-02 Ed Schonberg <schonberg@adacore.com>
6201 * errout.adb (First_Node): for bodies, return the node itself (small
6202 optimization). For other nodes, do not check source_unit if the node
6203 comes from Standard.
6205 2011-08-02 Robert Dewar <dewar@adacore.com>
6207 * exp_ch3.adb: Minor comment additions.
6208 * sem_ch13.adb: Minor reformatting.
6210 2011-08-02 Pascal Obry <obry@adacore.com>
6212 * make.adb, makeutl.adb: Removes some superfluous directory separator.
6214 2011-08-02 Robert Dewar <dewar@adacore.com>
6216 * sem_attr.adb: Minor reformatting.
6218 2011-08-02 Robert Dewar <dewar@adacore.com>
6220 * einfo.adb (Has_Default_Aspect): Replaces Has_Default_Value
6221 (Has_Default_Component_Value): Removed
6222 * einfo.ads Comment updates
6223 (Has_Default_Aspect): Replaces Has_Default_Value
6224 (Has_Default_Component_Value): Removed
6226 (Expand_N_Freeze_Entity): Handle Default[_Component]_Value aspects
6228 (Build_Array_Init_Proc): Handle Default_[Component_]Value aspects
6229 (Get_Simple_Init_Val): Handle Default_Value aspect
6230 (Needs_Simple_Initialization): Handle Default_Value aspect
6231 * exp_ch3.ads: Needs_Simple_Initialization
6232 * freeze.adb (Freeze_Entity): Handle Default_[Component_]Value aspect
6233 * par-prag.adb (Pragma_Default[_Component]Value) Removed
6235 (Analyze_Aspect_Specifications): Fix Default[_Component]_Value aspects
6236 * sem_prag.adb (Pragma_Default[_Component]Value) Removed
6237 * snames.ads-tmpl (Pragma_Default[_Component]Value) Removed
6239 2011-08-02 Ed Schonberg <schonberg@adacore.com>
6241 * sem_ch5.adb (Analyze_Iterator_Specification): use base type to locate
6242 package containing iteration primitives.
6243 exp_ch5.adb (Expand_Iterator_Loop): ditto.
6245 2011-08-02 Ed Schonberg <schonberg@adacore.com>
6247 * sem_ch5.adb (Analyze_Iteration_Scheme): For an Ada2012 iterator with
6248 "of", pre-analyze expression in case it is a function call with
6249 finalization actions that must be placed ahead of the loop.
6250 * exp_ch5.adb (Expand_Iterator_Loop): If condition_actions are present
6251 on an Ada2012 iterator, insert them ahead of the rewritten loop.
6253 2011-08-02 Geert Bosch <bosch@adacore.com>
6255 * cstand.adb (Create_Float_Types): Only consider C's long double for
6256 Long_Long_Float, in addition to double.
6258 2011-08-02 Robert Dewar <dewar@adacore.com>
6260 * sem_ch3.adb, sem_ch5.adb, sem_type.adb, switch-c.adb, switch-c.ads,
6261 sem_prag.adb, sem_util.adb, sem_util.ads, sem_res.adb, warnsw.ads,
6262 prepcomp.ads, cstand.adb, stand.ads, a-calfor.adb, s-stusta.adb:
6265 2011-08-02 Ed Schonberg <schonberg@adacore.com>
6267 * sem_attr.adb: handle properly 'Result when it is a prefix of an
6270 2011-08-02 Javier Miranda <miranda@adacore.com>
6272 * einfo.ads, einfo.adb
6273 (Original_Access_Type): Move this attribute to Node26 since there was
6274 an undocumented use of Node21 in E_Access_Subprogram_Type entities
6275 which causes conflicts and breaks the generation of the .NET compiler.
6276 (Interface_Name): Add missing documentation on JGNAT only uses of
6279 2011-08-02 Geert Bosch <bosch@adacore.com>
6281 * cstand.adb (Back_End_Float_Types): Use Elist instead of Nlist
6282 (Find_Back_End_Float_Type): Likewise
6283 (Create_Back_End_Float_Types): Likewise
6284 (Create_Float_Types): Likewise
6285 (Register_Float_Type): Likewise
6286 * sem_ch3.adb (Floating_Point_Type_Declaration): Use Elist instead of
6287 Nlist and split out type selection in new local Find_Base_Type function.
6288 * sem_prag.adb (Process_Import_Predefined_Type): Use Elist instead of
6290 * stand.ads (Predefined_Float_Types): Use Elist instead of Nlist
6292 2011-08-02 Robert Dewar <dewar@adacore.com>
6294 * inline.adb: Minor code reorganization (put Get_Code_Unit_Entity in
6296 * opt.ads: Minor comment change.
6297 * sem_ch12.adb: Minor code reorganization.
6299 2011-08-02 Gary Dismukes <dismukes@adacore.com>
6301 * sem_ch3.adb (Complete_Private_Subtype): Don't append the private
6302 subtype's list of rep items to the list on the full subtype in the case
6303 where the lists are the same.
6305 2011-08-02 Geert Bosch <bosch@adacore.com>
6307 * switch-c.adb (Free): New deallocation procedure to avoid implicitly
6308 using the one from System.Strings, which also deallocates all strings.
6310 2011-08-02 Geert Bosch <bosch@adacore.com>
6312 * gcc-interface/gigi.h, gcc-interface/misc.c (enumerate_modes): New
6314 * gcc-interface/Make-lang.in: Update dependencies.
6316 2011-08-02 Olivier Hainque <hainque@adacore.com>
6318 * gcc-interface/trans.c (Subprogram_Body_to_gnu): Set the function
6321 2011-08-02 Javier Miranda <miranda@adacore.com>
6323 * sem_ch3.adb (Check_Anonymous_Access_Components): Create extra formals
6324 associated with anonymous access to subprograms.
6326 2011-08-02 Geert Bosch <bosch@adacore.com>
6329 (Preprocessing_Symbol_Defs): Move from Prepcomp.Symbol_Definitions.
6330 (Preprocessing_Symbol_Last): Move from Prepcomp.Last_Definition.
6331 * prepcomp.adb (Symbol_Definitions, Last_Definition): Move to opt.ads
6332 (Add_Symbol_Definition): Move to switch-c.adb
6333 (Process_Command_Line_Symbol_Definitions): Adjust references to above.
6334 * prepcomp.ads: Remove dependency on Ada.Unchecked_Deallocation.
6335 (Add_Symbol_Definition): Move to switch-c.adb.
6336 * sem_ch13.adb, sem_prag.adb: Add dependency on Warnsw.
6338 (Set_Dot_Warning_Switch, Set_GNAT_Mode_Warnings, Set_Warning_Switch):
6340 * sem_warn.ads (Warn_On_Record_Holes, Warn_On_Overridden_Size,
6341 Set_Dot_Warning_Switch, Set_GNAT_Mode_Warnings, Set_Warning_Switch):
6343 * switch-c.adb: Replace dependency on Prepcomp and Sem_Warn by Warnsw.
6344 (Add_Symbol_Definition): Moved from Prepcomp.
6345 * switch-c.ads: Update copyright notice. Use String_List instead of
6346 Argument_List, removing dependency on System.OS_Lib.
6348 2011-08-02 Yannick Moy <moy@adacore.com>
6350 * sem_ch3.adb (Analyze_Object_Declaration): issue an error in formal
6351 mode on initialization expression which does not respect SPARK
6353 * sem_util.adb, sem_util.ads (Is_SPARK_Initialization_Expr): determines
6354 if the tree referenced by its argument represents an initialization
6355 expression in SPARK, suitable for initializing an object in an object
6358 2011-08-02 Javier Miranda <miranda@adacore.com>
6360 * exp_ch9.adb (Expand_Access_Protected_Subprogram_Type): Link the
6361 internally generated access to subprogram with its associated protected
6363 * einfo.ads, einfo.adb (Original_Access_Type): New attribute.
6365 2011-08-02 Geert Bosch <bosch@adacore.com>
6367 * cstand.adb (Register_Float_Type): Print information about type to
6368 register, if the Debug_Flag_Dot_B is set.
6369 * debug.adb (Debug_Flag_Dot_B): Document d.b debug option.
6370 * rtsfind.ads (RE_Max_Base_Digits): New run time entity.
6371 * sem_ch3.adb (Floating_Point_Type_Declaration): Allow declarations
6372 with a requested precision of more than Max_Digits digits and no more
6373 than Max_Base_Digits digits, if a range specification is present and the
6374 Predefined_Float_Types list has a suitable type to derive from.
6375 * sem_ch3.adb (Rep_Item_Too_Early): Avoid generating error in the
6376 case of type completion with pragma Import
6378 (Process_Import_Predefined_Type): Processing to complete a type
6379 with pragma Import. Currently supports floating point types only.
6380 (Set_Convention_From_Pragma): Do nothing without underlying type.
6381 (Process_Convention): Guard against absence of underlying type,
6382 which may happen when importing incomplete types.
6383 (Process_Import_Or_Interface): Handle case of importing predefined
6384 types. Tweak error message.
6386 2011-08-02 Eric Botcazou <ebotcazou@adacore.com>
6388 * inline.adb (Add_Inlined_Body): Adjust check for library-level inlined
6389 functions to previous change. Reorganize code slightly.
6391 2011-08-02 Geert Bosch <bosch@adacore.com>
6393 * back_end.ads (Register_Type_Proc): New call back procedure type for
6394 allowing the back end to provide information about available types.
6395 (Register_Back_End_Types): New procedure to register back end types.
6396 * back_end.adb (Register_Back_End_Types): Call the back end to enumerate
6398 * cstand.adb (Back_End_Float_Types): New list for floating point types
6399 supported by the back end.
6400 (Build_Float_Type): Add extra parameter for Float_Rep_Kind.
6401 (Copy_Float_Type): New procedure to make new copies of predefined types.
6402 (Register_Float_Type): New call back procedure to populate the BEFT list
6403 (Find_Back_End_Float_Type): New procedure to find a BEFT by name
6404 (Create_Back_End_Float_Types): New procedure to populate the BEFT list.
6405 (Create_Float_Types): New procedure to create entities for floating
6406 point types predefined in Standard, and put these and any remaining
6407 BEFTs on the Predefined_Float_Types list.
6408 * stand.ads (Predefined_Float_Types): New list for predefined floating
6409 point types that do not have declarations in package Standard.
6411 2011-08-02 Eric Botcazou <ebotcazou@adacore.com>
6413 * inline.adb (Get_Code_Unit_Entity): New local function. Returns the
6414 entity node for the unit containing the parameter.
6415 (Add_Inlined_Body): Use it to find the unit containing the subprogram.
6416 (Add_Inlined_Subprogram): Likewise.
6417 * gcc-interface/Make-lang.in: Update dependencies.
6419 2011-08-02 Thomas Quinot <quinot@adacore.com>
6421 * s-stusta.adb (Print): Make sure Pos is always initialized to a
6424 2011-08-02 Geert Bosch <bosch@adacore.com>
6426 * a-calfor.adb (Image): Simplify, removing unnecessary uses of 'Image.
6428 2011-08-02 Eric Botcazou <ebotcazou@adacore.com>
6430 * sem_type.adb (Covers): Move trivial case to the top and reuse the
6431 computed value of Base_Type.
6433 2011-08-02 Yannick Moy <moy@adacore.com>
6435 * restrict.adb (Check_Restriction): issue an error for any use of
6436 class-wide, even if the No_Dispatch restriction is not set.
6437 * sem_aggr.adb: Correct typos in comments and messages in formal mode
6438 * sem_ch3.adb (Process_Full_View): issue an error in formal mode is,
6439 when completing a private extension, the type named in the private part
6440 is not the same as that named in the visible part.
6441 * sem_res.adb (Resolve_Call): issue an error in formal mode on the use
6442 of an inherited primitive operations of a tagged type or type extension
6443 that returns the tagged type.
6444 * sem_util.adb, sem_util.ads (Is_Inherited_Operation_For_Type): new
6445 function which returns True for an implicit operation inherited by the
6446 derived type declaration for the argument type.
6447 (Is_SPARK_Object_Reference): move to appropriate place in alphabetic
6450 2011-08-02 Ed Schonberg <schonberg@adacore.com>
6452 * sem_ch5.adb (Pre_Analyze_Range): new procedure extracted from
6453 Process_Bounds, to perform analysis with expansion of a range or an
6454 expression that is the iteration scheme for a loop.
6455 (Analyze_Iterator_Specification): If domain of iteration is given by a
6456 function call with a controlled result, as is the case if call returns
6457 a predefined container, ensure that finalization actions are properly
6459 * par-ch3.adb: accept Ada2012 iterator form in P_Discrete_Range.
6461 2011-08-02 Javier Miranda <miranda@adacore.com>
6463 * sem_ch5.adb (Analyze_Iteration_Scheme): Fix typo.
6464 * gcc-interface/Make-lang.in: Update dependencies.
6466 2011-08-02 Javier Miranda <miranda@adacore.com>
6468 * sem_util.ads, sem_util.adb (Is_Variable): Add a new formal to
6469 determine if the analysis is performed using N or Original_Node (N).
6470 * exp_util.adb (Side_Effect_Free): Code cleanup since the new
6471 functionality of routine Is_Variable avoids code duplication.
6472 * checks.adb (Determine_Range): Handle temporaries generated by
6473 Remove_Side_Effects.
6475 2011-08-02 Javier Miranda <miranda@adacore.com>
6477 * exp_ch4.adb (Expand_N_Quantified_Expression): Force reanalysis and
6478 expansion of the condition. Required since the previous analysis was
6479 done with expansion disabled (see Resolve_Quantified_Expression) and
6480 hence checks were not inserted and record comparisons have not been
6483 2011-08-02 Ed Falis <falis@adacore.com>
6485 * s-taprop-vxworks.adb, s-intman-vxworks.adb, s-intman-vxworks.ads:
6488 2011-08-02 Bob Duff <duff@adacore.com>
6490 * opt.ads: Minor comment fix.
6492 2011-08-02 Bob Duff <duff@adacore.com>
6494 * sem_ch12.adb (Analyze_Package_Instantiation,
6495 Analyze_Subprogram_Instantiation): Turn off style checking while
6496 analyzing an instance. Whatever style checks that apply to the generic
6497 unit should apply, so it makes no sense to apply them in an instance.
6498 This was causing trouble when compiling an instance of a runtime
6499 unit that violates the -gnatyO switch.
6500 * stylesw.adb (Set_Style_Check_Options): "when 'O' =>" was missing from
6501 one of the two case statements, causing spurious errors.
6503 2011-08-02 Robert Dewar <dewar@adacore.com>
6505 * uname.adb: Minor reformatting.
6506 * gnatcmd.adb: Minor reformatting.
6507 * exp_attr.adb: Minor reformatting.
6509 2011-08-02 Ed Schonberg <schonberg@adacore.com>
6511 * exp_ch5.adb (Expand_N_Assignment_Statement): under restriction
6512 No_Dispatching_Calls, do not look for the Assign primitive, because
6513 predefined primitives are not created in this case.
6515 2011-08-02 Bob Duff <duff@adacore.com>
6517 * stylesw.ads: Minor comment fixes.
6519 2011-08-02 Robert Dewar <dewar@adacore.com>
6521 * freeze.adb (Add_To_Result): New procedure.
6523 2011-08-02 Jose Ruiz <ruiz@adacore.com>
6525 * exp_attr.adb (Find_Stream_Subprogram): When using a configurable run
6526 time, if the specific run-time routines for handling streams of strings
6527 are not available, use the default mechanism.
6529 2011-08-02 Arnaud Charlet <charlet@adacore.com>
6531 * s-regpat.ads: Fix typo.
6533 2011-08-02 Vincent Celier <celier@adacore.com>
6535 * prj-conf.adb (Get_Or_Create_Configuration_File): If On_Load_Config is
6536 not null, call it to create the in memory config project file without
6537 parsing an existing default config project file.
6539 2011-08-02 Eric Botcazou <ebotcazou@adacore.com>
6541 * atree.adb (Allocate_Initialize_Node): Remove useless temporaries.
6543 2011-08-02 Ed Schonberg <schonberg@adacore.com>
6545 * sem_elim.adb: an abstract subprogram does not need an eliminate
6546 pragma for its descendant to be eliminable.
6548 2011-08-02 Ed Falis <falis@adacore.com>
6550 * init.c: revert to handling before previous checkin for VxWorks
6551 * s-intman-vxworks.adb: delete unnecessary declarations related to
6552 using Ada interrupt facilities for handling signals.
6553 Delete Initialize_Interrupts. Use __gnat_install_handler instead.
6554 * s-intman-vxworks.ads: Import __gnat_install_handler as
6555 Initialize_Interrupts.
6556 * s-taprop-vxworks.adb: Delete Signal_Mask.
6557 (Abort_Handler): change construction of mask to unblock exception
6560 2011-08-02 Jerome Guitton <guitton@adacore.com>
6562 * a-except-2005.adb (Raise_From_Signal_Handler): Call
6563 Debug_Raise_Exception before propagation starts.
6565 2011-08-02 Eric Botcazou <ebotcazou@adacore.com>
6567 * exp_ch6.adb (Expand_Call): Guard restriction checks with a call
6568 to Restriction_Check_Required.
6569 * sem_ch3.adb (Analyze_Object_Declaration): Likewise.
6570 * sem_res.adb (Resolve_Call): Likewise.
6571 * sem_attr.adb (Check_Stream_Attribute): Likewise.
6573 2011-08-02 Bob Duff <duff@adacore.com>
6575 * stylesw.ads: Update comment.
6576 * style.adb: Minor: Use Error_Msg_NE instead of Error_Msg_N.
6577 * errout.ads: Remove obsolete comment.
6579 2011-08-02 Javier Miranda <miranda@adacore.com>
6581 * einfo.ads, einfo.adb (Is_Safe_To_Reevaluate): new function.
6582 (Set_Is_Safe_To_Reevaluate): new procedure.
6583 * sem_ch5.adb (Analyze_Assignment): Add one assertion to ensure that no
6584 assignment is allowed on safe-to-reevaluate variables.
6585 (Analyze_Iteration_Schine.Process_Bounds.One_Bound): Decorate the
6586 temporary created to remove side effects in expressions that use
6587 the secondary stack as safe-to-reevaluate.
6588 * exp_util.adb (Side_Effect_Free): Add missing code to handle well
6589 variables that are not true constants.
6591 2011-08-02 Robert Dewar <dewar@adacore.com>
6593 * sem_ch5.adb, sem_ch7.adb, einfo.ads, sem_util.adb, sem_util.ads,
6594 sem_res.adb, sem_ch6.adb: Minor reformatting.
6596 2011-08-02 Jerome Guitton <guitton@adacore.com>
6598 * a-except-2005.adb (Raise_Current_Excep): Remove obsolete dead code.
6600 2011-08-02 Ed Schonberg <schonberg@adacore.com>
6602 * sem_ch6.adb (New_Overloaded_Entity, Check_Overriding_Indicator): Do
6603 not set Overridden_Operation if subprogram is an initialization
6606 2011-08-02 Yannick Moy <moy@adacore.com>
6608 * par-ch6.adb: Correct obsolete name in comments
6609 * restrict.adb, restrict.ads (Check_Formal_Restriction): new function
6610 which takes two message arguments (existing function takes one), with
6611 second message used for continuation.
6612 * sem_ch5.adb (Analyze_Block_Statement): in formal mode, only reject
6613 block statements that originate from a source block statement, not
6614 generated block statements
6615 * sem_ch6.adb (Analyze_Function_Call): rename L into Actuals, for
6616 symmetry with procedure case
6617 * sem_ch7.adb (Check_One_Tagged_Type_Or_Extension_At_Most): new
6618 function to issue an error in formal mode if a package specification
6619 contains more than one tagged type or type extension.
6620 * sem_res.adb (Resolve_Actuals): in formal mode, check that actual
6621 parameters matching formals of tagged types are objects (or ancestor
6622 type conversions of objects), not general expressions. Issue an error
6623 on view conversions that are not involving ancestor conversion of an
6625 (Resolve_Type_Conversion): in formal mode, issue an error on the
6626 operand of an ancestor type conversion which is not an object
6627 * sem_util.adb, sem_util.ads (Find_Actual): extend the behavior of the
6628 procedure so that it works also for actuals of function calls
6629 (Is_Actual_Tagged_Parameter): new function which determines if its
6630 argument is an actual parameter of a formal of tagged type in a
6632 (Is_SPARK_Object_Reference): new function which determines if the tree
6633 referenced by its argument represents an object in SPARK
6635 2011-08-02 Robert Dewar <dewar@adacore.com>
6637 * sem_ch3.adb: Minor reformatting
6638 Minor comment addition
6639 Minor error msg text change
6641 2011-08-02 Javier Miranda <miranda@adacore.com>
6643 * sem_ch5.adb (Analyze_Iteration_Scheme.Uses_Secondary_Stack): New
6644 function. Used to be more precise when we generate a variable plus one
6645 assignment to remove side effects in the evaluation of the Bound
6647 (Analyze_Iteration_Scheme): Clean attribute analyzed in all the nodes
6648 of the bound expression to force its re-analysis and thus expand the
6649 associated transient scope (if required). Code cleanup replacing the
6650 previous code that declared the constant entity by an invocation to
6651 routine Force_Evaluation which centralizes this work in the frontend.
6653 2011-08-02 Robert Dewar <dewar@adacore.com>
6655 * einfo.adb (Is_Base_Type): Improve efficiency by using a flag table
6656 (Base_Type): Now uses improved Is_Base_Type function
6657 * einfo.ads (Base_Type): Inline this function
6659 2011-08-02 Robert Dewar <dewar@adacore.com>
6661 * sem_prag.adb (Analyze_Pragma): Defend against infinite recursion
6662 (Analyze_Aspect_Specifications): Fix Sloc values for constructed pragmas
6664 2011-08-02 Arnaud Charlet <charlet@adacore.com>
6666 * gcc-interface/Make-lang.in: Update dependencies.
6667 * gcc-interface/Makefile.in: Use s-inmapop-vxworks.adb for all VxWorks
6670 2011-08-02 Yannick Moy <moy@adacore.com>
6672 * par-ch3.adb (P_Delta_Constraint): issue an error in formal mode on
6673 non-simple expression used in delta constraint
6674 (P_Index_Or_Discriminant_Constraint): issue an error in formal mode on
6675 index constraint which is not a subtype mark
6676 * par.adb: With and use Restrict
6677 * sem_ch3.adb (Analyze_Component_Declaration): issue an error in formal
6678 mode on component type which is not a subtype mark and default
6679 expression on component
6680 (Analyze_Subtype_Declaration): issue an error in formal mode on subtype
6681 of string which does not have a lower index bound equal to 1
6682 (Array_Type_Declaration): issue an error in formal mode on index or
6683 component type which is not a subtype mark, and on aliased keyword on
6685 (Derived_Type_Declaration): issue an error in formal mode on interface,
6686 limited or abstract type
6687 (Record_Type_Declaration): issue an error in formal mode on interface
6688 (Record_Type_Definition): issue an error in formal mode on tagged types
6689 and type extensions not declared in the specification of a library unit
6690 package; on null non-tagged record; on variant part
6692 2011-08-02 Vincent Celier <celier@adacore.com>
6694 * prj-nmsc.adb (Check_Library_Attributes): Do not report Library_Dir
6695 not declared for qualified library project when Library_Name is not
6696 declared, but Library_Dir is.
6698 2011-08-02 Robert Dewar <dewar@adacore.com>
6700 * sem_ch13.adb (Analyze_Aspect_Specification): Fix slocs on generated
6701 pragmas (affects aspects [Component_]Default_Value
6702 (Check_Aspect_At_Freeze_Point): For Component_Default_Value, use
6703 component type for the resolution
6705 2011-08-02 Eric Botcazou <ebotcazou@adacore.com>
6707 * einfo.adb (Base_Type): Tune implementation for speed.
6709 2011-08-02 Robert Dewar <dewar@adacore.com>
6711 * freeze.adb: Minor reformatting.
6713 2011-08-02 Thomas Quinot <quinot@adacore.com>
6715 * scos.ads: Update comments.
6717 2011-08-02 Ed Schonberg <schonberg@adacore.com>
6719 * sem_ch3.adb (Build_Derived_Type): Inherit the convention from the
6720 base type, because the parent may be a subtype of a private type whose
6721 convention is established in a private part.
6723 2011-08-02 Hristian Kirtchev <kirtchev@adacore.com>
6725 * exp_ch6.adb (Expand_N_Extended_Return_Statement): Wrap the return
6726 statement in a block when the expansion of the return expression has
6727 created a finalization chain.
6728 * freeze.adb (Freeze_Expression): Alphabetize all choices associated
6729 with the parent node.
6730 Add N_Extended_Return_Statement to handle the case where a transient
6731 object declaration appears in the Return_Object_Declarations list of
6732 an extended return statement.
6734 2011-08-02 Matthew Gingell <gingell@adacore.com>
6736 * adaint.c (__gnat_is_symbolic_link_attr): Supress warning on possibly
6737 unused parameter 'name'.
6739 2011-08-02 Ed Schonberg <schonberg@adacore.com>
6741 * sem_elim.adb (Set_Eliminated): If the overridden operation is an
6742 inherited operation, check whether its alias, which is the source
6743 operastion that it renames, has been marked eliminated.
6745 2011-08-02 Javier Miranda <miranda@adacore.com>
6747 * exp_util.adb (Safe_Prefixed_Reference): Do not consider safe an
6748 in-mode parameter whose type is an access type since it can be used to
6749 modify its designated object. Enforce code that handles as safe an
6750 access type that is not access-to-constant but it is the result of a
6751 previous removal of side-effects.
6752 (Remove_Side_Effects): Minor code reorganization of cases which require
6753 no action. Done to incorporate documentation on new cases uncovered
6754 working in this ticket: no action needed if this routine was invoked
6755 too early and the nodes are not yet decorated.
6756 * sem_res.adb (Resolve_Slice): Minor code cleanup replacling two calls
6757 to routine Remove_Side_Effects by calls to Force_Evaluation since they
6758 were issued with actuals that are implicitly provided by
6761 2011-08-02 Robert Dewar <dewar@adacore.com>
6763 * sem_ch3.adb, sem_res.adb: Minor reformatting.
6765 2011-08-02 Yannick Moy <moy@adacore.com>
6767 * sem_attr.adb (Check_Formal_Restriction_On_Attribute): new procedure
6768 to issue an error in formal mode on attribute not supported in this mode
6769 (Analyze_Attribute): issue errors on standard attributes not supported
6771 * sem_ch3.adb (Modular_Type_Declaration): remove obsolete part of
6772 comment, and issue error in formal mode on modulus which is not a power
6774 (Process_Range_Expr_In_Decl): issue error in formal mode on non-static
6776 * sem_ch8.adb (Find_Type): issue error in formal mode on 'Base in
6778 * sem_res.adb (Resolve_Unary_Op): issue error in formal mode on unary
6779 operator on modular type (except 'not').
6781 2011-08-02 Robert Dewar <dewar@adacore.com>
6783 * gnat_rm.texi: Minor reformatting.
6785 2011-08-02 Arnaud Charlet <charlet@adacore.com>
6787 * s-osinte-linux.ads: Minor comment update and reformatting.
6788 * i-cexten.ads: Make this unit pure, as for its parent.
6789 Will allow its usage in more contexts if needed.
6791 2011-08-02 Robert Dewar <dewar@adacore.com>
6793 * s-utf_32.ads: Minor comment fix.
6795 2011-08-02 Ed Schonberg <schonberg@adacore.com>
6797 * sem_res.adb (Resolve_Actuals): if the subprogram is a primitive
6798 operation of a tagged synchronized type, handle the case where the
6799 controlling argument is overloaded.
6801 2011-08-02 Yannick Moy <moy@adacore.com>
6803 * gnat_rm.texi, opt.ads, sem_prag.adb, snames.ads-tmpl:
6804 Replace pragma SPARK_95 with pragma Restrictions (SPARK)
6805 * par-prag.adb (Process_Restrictions_Or_Restriction_Warnings): set
6806 SPARK mode and formal verification mode on processing SPARK restriction
6807 * s-rident.ads (Restriction_Id): add SPARK restriction in those not
6808 requiring consistency checking.
6810 2011-08-02 Robert Dewar <dewar@adacore.com>
6812 * sem_res.adb: Minor reformatting.
6814 2011-08-02 Robert Dewar <dewar@adacore.com>
6816 * a-cfdlli.ads, a-cfhase.ads, a-cforma.ads, a-cfhama.ads,
6817 a-cforse.ads: Remove unneeded with of Ada.Containers
6818 Remove commented out pragma Inline's
6819 Move specifications of new subprograms to the actual specs
6821 2011-08-02 Yannick Moy <moy@adacore.com>
6823 * a-cfdlli.ads, a-cfhase.ads, a-cforma.ads, a-cfhama.ads,
6824 a-cforse.ads: Update comments.
6826 2011-08-02 Ed Schonberg <schonberg@adacore.com>
6828 * sem_attr.adb: add attribute name when 'Result has the wrong prefix.
6830 2011-08-02 Robert Dewar <dewar@adacore.com>
6832 * a-cfdlli.ads, a-cfhase.ads, a-cforma.ads, a-cfhama.ads,
6833 a-cforse.ads, a-cofove.ads: Minor reformatting.
6835 2011-08-02 Claire Dross <dross@adacore.com>
6837 * a-cfdlli.ads, a-cfhase.ads, a-cforma.ads, a-cfhama.ads, a-cforse.ads,
6838 a-cofove.ads: Add comments.
6840 2011-08-02 Yannick Moy <moy@adacore.com>
6842 * gnat_rm.texi: Document formal containers.
6844 2011-08-02 Emmanuel Briot <briot@adacore.com>
6846 * g-comlin.adb (Goto_Section, Getopt): fix handling of "*" when there
6849 2011-08-02 Robert Dewar <dewar@adacore.com>
6851 * mlib-prj.adb, restrict.ads, sem_aggr.adb, sem_ch12.adb: Minor
6854 2011-08-02 Robert Dewar <dewar@adacore.com>
6856 * aspects.adb: New aspects Default_Value and Default_Component_Value
6857 New format of Aspect_Names table checks for omitted entries
6858 * aspects.ads: Remove mention of Aspect_Cancel and add documentation on
6859 handling of boolean aspects for derived types.
6860 New aspects Default_Value and Default_Component_Value
6861 New format of Aspect_Names table checks for omitted entries
6862 * einfo.ads, einfo.adb (Has_Default_Component_Value): New flag
6863 (Has_Default_Value): New flag
6864 (Has_Default_Component_Value): New flag
6865 (Has_Default_Value): New flag
6866 * par-ch13.adb (P_Aspect_Specifications): New format of Aspect_Names
6868 * par-prag.adb: New pragmas Default_Value and Default_Component_Value
6869 * sem_ch13.adb (Analyze_Aspect_Specifications): New aspects
6870 Default_Value and Default_Component_Value
6871 * sem_prag.adb: New pragmas Default_Value and Default_Component_Value
6872 New aspects Default_Value and Default_Component_Value
6873 * snames.ads-tmpl: New pragmas Default_Value and Default_Component_Value
6874 * sprint.adb: Print N_Aspect_Specification node when called from gdb
6876 2011-08-02 Vincent Celier <celier@adacore.com>
6878 * prj-nmsc.adb (Check_Library_Attributes): For virtual library project,
6879 inherit library kind.
6881 2011-08-02 Ed Schonberg <schonberg@adacore.com>
6883 * sem_res.adb: Add guards in calls to Matching_Static_Array_Bounds.
6886 2011-08-02 Robert Dewar <dewar@adacore.com>
6888 * i-cstrin.ads: Updates to make Interfaces.C.Strings match RM
6890 2011-08-02 Yannick Moy <moy@adacore.com>
6892 * sem_aggr.adb (Resolve_Aggregate): Fix thinko.
6894 2011-08-02 Robert Dewar <dewar@adacore.com>
6896 * impunit.adb: Add comment.
6898 2011-08-02 Yannick Moy <moy@adacore.com>
6900 * sem_aggr.adb (Check_Qualified_Aggregate): new procedure which checks
6901 qualification of aggregates in formal mode
6902 (Is_Top_Level_Aggregate): returns True for an aggregate not contained in
6904 (Resolve_Aggregate): complete the test that an aggregate is adequately
6905 qualified in formal mode
6907 2011-08-02 Pascal Obry <obry@adacore.com>
6909 * make.adb, bindgen.adb, gnatbind.adb: Minor reformatting.
6910 * mlib-prj.adb: Supress warning when compiling binder generated file.
6911 (Build_Library): Supress all warnings when compiling the binder
6914 2011-08-02 Yannick Moy <moy@adacore.com>
6916 * errout.adb, errout.ads (Check_Formal_Restriction): move procedure
6918 * restrict.adb, restrict.ads (Check_Formal_Restriction): ...to here
6919 * sem_aggr.adb, sem_ch5.adb, sem_util.adb:
6920 Add with/use clauses to make Check_Formal_Restriction visible
6922 2011-08-02 Ed Schonberg <schonberg@adacore.com>
6924 * sem_ch12.adb (Check_Generic_Actuals): handle properly actual
6925 in-parameters when type of the generic formal is private in the generic
6926 spec and non-private in the body.
6928 2011-08-02 Claire Dross <dross@adacore.com>
6930 * a-cfdlli.adb, a-cfdlli.ads, a-cfhase.adb, a-cfhase.ads, a-cfhama.adb,
6931 a-cfhama.ads, a-cforse.adb, a-cforse.ads, a-cforma.adb, a-cforma.ads,
6932 a-cofove.adb, a-cofove.ads: New files implementing formal containers.
6933 * impunit.adb, Makefile.rtl: Take new files into account.
6935 2011-08-02 Robert Dewar <dewar@adacore.com>
6937 * sem_aggr.adb, sem_ch3.adb, sem_ch5.adb, make.adb, sem_res.adb,
6938 sem_attr.adb, sem_ch6.adb, sem_ch8.adb: Minor reformatting.
6940 2011-08-02 Yannick Moy <moy@adacore.com>
6942 * sem_aggr.adb (Resolve_Aggregate): disable incorrectly placed check in
6944 * sem_util.adb (Matching_Static_Array_Bounds): proper detection of
6945 matching static array bounds, taking into account the special case of
6947 * sem_ch3.adb: Typo in comment.
6949 2011-08-02 Yannick Moy <moy@adacore.com>
6951 * errout.adb, errout.ads (Check_Formal_Restriction): new procedure
6952 which issues an error in formal mode if its argument node is originally
6954 * sem_ch3.adb (Analyze_Full_Type_Declaration): move test that a type
6955 has a discriminant specification so that it does not include the case
6957 (Derived_Type_Declaration): move here the test that a derived type has a
6958 discriminant specification
6959 * sem_aggr.adb (Resolve_Record_Aggregate): test the presence of the
6960 first element of a component association before accessing its choices
6961 (presence of component association is not enough)
6962 * exp_ch6.adb (Expand_N_Subprogram_Declaration): test if a subprogram
6963 declaration is a library item before accessing the next element in a
6964 list, as library items are not member of lists
6965 * sem_attr.adb, sem_ch11.adb, sem_ch4.adb, sem_ch5.adb, sem_ch6.adb,
6966 sem_ch8.adb, sem_ch9.adb, sem_res.adb, sem_util.adb: use
6967 Check_Formal_Restriction whenever possible.
6969 2011-08-02 Ed Schonberg <schonberg@adacore.com>
6971 * sem_ch3.adb (Find_Type_Of_Object): In ASIS mode, create an itype
6972 reference when needed.
6974 2011-08-02 Bob Duff <duff@adacore.com>
6976 * gnat_ugn.texi: Fix typo.
6978 2011-08-02 Vincent Celier <celier@adacore.com>
6980 * make.adb (Gnatmake): Use MLib.Tgt.Archive_Ext as the extension of
6981 archive file name. Do not use the full path name of archives for Open
6984 2011-08-02 Robert Dewar <dewar@adacore.com>
6986 * sem_ch12.adb, sem_ch11.adb: New calling sequence for
6987 Analyze_Aspect_Specifications
6989 (Analyze_Aspect_Specifications): New handling for boolean aspects
6990 * sem_ch13.ads (Analyze_Aspect_Specifications): New calling sequence
6991 * sem_ch3.adb, sem_ch6.adb, sem_ch7.adb, sem_ch9.adb: New calling
6992 sequence for Analyze_Aspect_Specifications
6993 * sem_prag.adb (Analyze_Pragma): Remove use of Aspect_Cancel entirely
6994 * sinfo.ads, sinfo.adb (Aspect_Cancel): Remove, no longer used
6996 2011-08-02 Robert Dewar <dewar@adacore.com>
6998 * freeze.adb (Freeze_Entity): Remove handling of delayed boolean
6999 aspects, since these no longer exist.
7001 2011-08-02 Robert Dewar <dewar@adacore.com>
7003 * par-ch13.adb (Aspect_Specifications_Present): Always return false on
7004 semicolon, do not try to see if there are aspects following it.
7005 * par-ch3.adb (P_Declarative_Items): Better message for unexpected
7008 2011-08-02 Robert Dewar <dewar@adacore.com>
7010 * sem_ch8.adb, aspects.ads: Minor reformatting.
7012 2011-08-02 Eric Botcazou <ebotcazou@adacore.com>
7014 * sem_ch13.ads (Analyze_Aspect_Specification): Add pragma Inline.
7015 * sem_ch13.adb (Analyze_Non_Null_Aspect_Specifications): New procedure
7017 (Analyze_Aspect_Specifications): ...here. Call above procedure.
7019 2011-08-02 Yannick Moy <moy@adacore.com>
7021 * exp_ch6.adb (Expand_N_Subprogram_Declaration): issue error in formal
7022 mode on subprogram declaration outside of package specification, unless
7023 it is followed by a pragma Import
7024 * sem_ch3.adb (Access_Definition, Access_Subprogram_Declaration,
7025 Access_Type_Declaration): issue error in formal mode on access type
7026 (Analyze_Incomplete_Type_Decl): issue error in formal mode on
7028 (Analyze_Object_Declaration): issue error in formal mode on object
7029 declaration which does not respect SPARK restrictions
7030 (Analyze_Subtype_Declaration): issue error in formal mode on subtype
7031 declaration which does not respect SPARK restrictions
7032 (Constrain_Decimal, Constrain_Float, Constrain_Ordinary_Fixed): issue
7033 error in formal mode on digits or delta constraint
7034 (Decimal_Fixed_Point_Type_Declaration): issue error in formal mode on
7035 decimal fixed point type
7036 (Derived_Type_Declaration): issue error in formal mode on derived type
7037 other than type extensions of tagged record types
7038 * sem_ch6.adb (Process_Formals): remove check in formal mode, redundant
7039 with check on access definition
7040 * sem_ch9.adb (Analyze_Protected_Definition): issue error in formal
7041 mode on protected definition.
7042 (Analyze_Task_Definition): issue error in formal mode on task definition
7044 2011-08-02 Robert Dewar <dewar@adacore.com>
7046 * make.adb, sem_ch8.adb, s-inmaop-vxworks.adb: Minor reformatting.
7048 2011-08-02 Javier Miranda <miranda@adacore.com>
7050 * sem_ch6.adb (Can_Override_Operator): New function.
7051 (Verify_Overriding_Indicator): Add missing code to check overriding
7052 indicator in operators. Fixes regression.
7053 (Check_Overriding_Indicator): Minor reformating after replacing the
7054 code that evaluates if the subprogram can override an operator by
7055 invocations to the above new function.
7057 (Write_Field26_Name): Add missing code to ensure that, following
7058 the documentation in einfo.ads, this field is not shown as attribute
7059 "Static_Initialization" on non-dispatching functions.
7061 2011-08-02 Jose Ruiz <ruiz@adacore.com>
7063 * sem_res.adb (Resolve_Call): A call to
7064 Ada.Real_Time.Timing_Events.Set_Handler violates restriction
7065 No_Relative_Delay (AI-0211) only when it sets a relative timing event,
7066 i.e., when the second parameter is of type Time_Span.
7068 2011-08-02 Vincent Celier <celier@adacore.com>
7070 * make.adb (Gnatmake): use <library dir>/lib<library name>.a to link
7071 with an archive instead of -L<library dir> -l<library name>.
7073 2011-08-02 Ed Schonberg <schonberg@adacore.com>
7075 * sem_ch8.adb (Analyze_Use_Type): If the clause is being re-analyzed,
7076 mark the base types In_Use in addition to making the operations
7079 2011-08-02 Ed Falis <falis@adacore.com>
7081 * init.c: add and setup __gnat_signal_mask for the exception signals
7082 * s-inmaop-vxworks.adb: new file.
7083 * s-intman-vxworks.adb: remove unnecessary initializations and
7085 * s-intman-vxworks.ads: remove unnecessary variable
7086 * s-taprop-vxworks.adb: simplify signal initialization
7088 2011-08-02 Robert Dewar <dewar@adacore.com>
7090 * sem_ch8.adb: Minor code reorganization, comment updates.
7092 2011-08-02 Robert Dewar <dewar@adacore.com>
7094 * sem_res.adb (Matching_Static_Array_Bounds): Moved to Sem_Util
7095 * sem_util.ads, sem_util.adb (Matching_Static_Array_Bounds): Moved
7097 (Matching_Static_Array_Bounds): Use Is_Ok_Static_Expression
7098 (Matching_Static_Array_Bounds): Moved here from Sem_Res
7100 2011-08-02 Ed Schonberg <schonberg@adacore.com>
7102 * atree.h, atree.ads, atree.adb: New subprograms to manipulate Elist5.
7103 * par_ch8.adb (P_Use_Type): initialize Used_Operations for node.
7104 * sinfo.ads, sinfo.adb (Used_Operations): new attribute of
7105 use_type_clauses, to handle more efficiently use_type and use_all_type
7107 * sem_ch8.adb: Rewrite Use_One_Type and End_Use_Type to handle the
7108 Ada2012 Use_All_Type clause.
7109 (Use_Class_Wide_Operations): new procedure.
7111 2011-08-02 Robert Dewar <dewar@adacore.com>
7113 * exp_util.adb, par-ch10.adb, par-ch6.adb, sem.adb, sem_ch6.adb,
7114 sem_ch6.ads, sinfo.adb, sinfo.ads, sprint.adb: Change parameterized
7115 expression to expression function.
7117 2011-08-02 Ed Schonberg <schonberg@adacore.com>
7119 * sem_ch4.adb: transform simple Ada2012 membership into equality only
7120 if types are compatible.
7122 2011-08-02 Yannick Moy <moy@adacore.com>
7124 * sem_res.adb (Matching_Static_Array_Bounds): new function which
7125 returns True if its argument array types have same dimension and same
7126 static bounds at each index.
7127 (Resolve_Actuals): issue an error in formal mode on actuals passed as
7128 OUT or IN OUT paramaters which are not view conversions in SPARK.
7129 (Resolve_Arithmetic_Op): issue an error in formal mode on
7130 multiplication or division with operands of fixed point types which are
7131 not qualified or explicitly converted.
7132 (Resolve_Comparison_Op): issue an error in formal mode on comparisons of
7133 Boolean or array type (except String) operands.
7134 (Resolve_Equality_Op): issue an error in formal mode on equality
7135 operators for array types other than String with non-matching static
7137 (Resolve_Logical_Op): issue an error in formal mode on logical operators
7138 for array types with non-matching static bounds. Factorize the code in
7139 Matching_Static_Array_Bounds.
7140 (Resolve_Qualified_Expression): issue an error in formal mode on
7141 qualified expressions for array types with non-matching static bounds.
7142 (Resolve_Type_Conversion): issue an error in formal mode on type
7143 conversion for array types with non-matching static bounds
7145 2011-08-02 Robert Dewar <dewar@adacore.com>
7147 * par-ch10.adb: Minor code reorganization (use Nkind_In).
7149 2011-08-02 Ed Schonberg <schonberg@adacore.com>
7151 * par-ch9.adb: save location of entry for proper error message.
7153 2011-08-02 Javier Miranda <miranda@adacore.com>
7155 * sem_type.ads, sem_type.adb (Is_Ancestor): Addition of a new formal
7156 (Use_Full_View) which permits this routine to climb through the
7157 ancestors using the full-view of private parents.
7158 * sem_util.adb (Collect_Interfaces_Info, Implements_Interface): Set
7159 Use_Full_View to true in calls to Is_Ancestor.
7160 * sem_disp.adb (Override_Dispatching_Operation): Set Use_Full_View to
7161 true in call to Is_Ancestor.
7162 * exp_ch3.adb (Build_Offset_To_Top_Functions, Initialize_Tag): Set
7163 Use_Full_View to true in call to Is_Ancestor.
7164 * exp_ch7.adb (Controller_Component): Set Use_Full_View to true in
7165 call to Is_Ancestor.
7166 * exp_ch4.adb (Expand_N_Type_Conversion, Tagged_Membership): Set
7167 Use_Full_View to true in calls to Is_Ancestor.
7168 * exp_disp.adb (Expand_Interface_Actuals, Make_Secondary_DT, Make_DT,
7169 Make_Select_Specific_Data_Table, Register_Primitive,
7170 Set_All_DT_Position): Set Use_Full_View to true in calls to Is_Ancestor.
7171 * exp_intr.adb (Expand_Dispatching_Constructor_Call): Set Use_Full_View
7172 to true in call to Is_Ancestor.
7173 * exp_util.adb (Find_Interface_ADT, Find_Interface_Tag): Set
7174 Use_Full_View to true in calls to Is_Ancestor.
7176 (Write_Call_Info): Set Use_Full_View to true in call to Is_Ancestor.
7177 (Write_Type_Info): Set Use_Full_View to true in call to Is_Ancestor.
7179 2011-08-02 Robert Dewar <dewar@adacore.com>
7181 * gnat_rm.texi: Minor reformatting.
7182 * sem_prag.adb: Minor reformatting.
7184 2011-08-02 Tristan Gingold <gingold@adacore.com>
7186 * vms_data.ads: Add VMS qualifier for -gnateP.
7188 2011-08-02 Robert Dewar <dewar@adacore.com>
7190 * par-ch13.adb (P_Aspect_Specification): New meaning of Decl = Empty
7191 * par-ch7.adb (P_Package): Proper placement of aspects for package
7193 * par-endh.adb (Check_End): Ad Is_Sloc parameter
7194 (End_Statements): Add Is_Sloc parameterr
7195 * par.adb (P_Aspect_Specification): New meaning of Decl = Empty
7196 (Check_End): Ad Is_Sloc parameter
7197 (End_Statements): Add Is_Sloc parameterr
7199 2011-08-02 Vincent Celier <celier@adacore.com>
7201 * ug_words: Add VMS qualifier equivalent to -gnateP:
7202 /SYMBOL_PREPROCESSING.
7204 2011-08-02 Jose Ruiz <ruiz@adacore.com>
7206 * gnat-style.texi: For hexadecimal numeric literals the typical
7207 grouping of digits is 4 to represent 2 bytes.
7208 A procedure spec which is split into several lines is indented two
7211 2011-08-02 Yannick Moy <moy@adacore.com>
7213 * exp_aggr.adb (Is_Others_Aggregate): move function to other unit.
7214 * sem_aggr.adb, sem_aggr.ads (Is_Others_Aggregate): move function here
7215 (Resolve_Aggregate): issue errors in formal modes when aggregate is not
7217 (Resolve_Array_Aggregate): issue errors in formal modes on non-static
7218 choice in array aggregate
7219 (Resolve_Extension_Aggregate): issue errors in formal modes on subtype
7221 (Resolve_Record_Aggregate): issue errors in formal modes on mixed
7222 positional and named aggregate for record, or others in record
7223 aggregate, or multiple choice in record aggregate
7224 * sem_res.adb (Resolve_Logical_Op): issue errors in formal mode when
7225 array operands to logical operations AND, OR and XOR do not have the
7226 same static lower and higher bounds
7227 * sem_ch5.adb, sinfo.ads: Correct typos in comments
7229 2011-08-01 Robert Dewar <dewar@adacore.com>
7231 * sem_util.ads, sem_util.adb, sem_ch6.adb (Last_Source_Statement):
7232 Replaces Last_Source_Node_In_Sequence.
7233 * err_vars.ads (Error_Msg_Lang): 16 is OK, don't need 4K
7234 * errout.adb (Set_Error_Msg_Lang): Takes arg with no parens, but stores
7235 parens and blank in string (this was inconsistently implemented).
7237 (Set_Error_Msg_Lang): Takes arg with no parens, but stores parens and
7238 blank in string (this was inconsistently implemented).
7240 (Set_Global_Switches): Set formal mode switches appropriately
7241 * opt.ads, opt.adb: Formal mode is now global switches, more consistent
7243 (Analyze_Pragma, case SPARK_95): Set opt switches appropriately and
7244 call Set_Error_Msg_Lang to set "spark" as language name.
7245 * par.adb: Remove unnecessary call to set formal language for errout
7246 * sem_prag.adb (P_Pragma, case SPARK_95): Set opt switches
7247 appropriately and call Set_Error_Msg_Lang to set "spark" as language
7249 * sem_ch4.adb (Analyze_Concatenation_Operand): remove procedure and
7250 calls to it, moved after resolution so that types are known
7251 * sem_res.adb (Resolve_Op_Concat): issue an error in formal mode if
7252 result of concatenation is not of type String
7253 (Resolve_Op_Concat_Arg): issue an error in formal mode if an operand of
7254 concatenation is not properly restricted
7255 * gnat_rm.texi: Add doc on pragma Spark_95.
7256 * gcc-interface/Makefile.in: Remove obsolete target pairs for
7257 Interfaces.C.* on VMS. Remove s-parame-vms-restrict.ads.
7258 * gcc-interface/Make-lang.in: Update dependencies.
7260 2011-08-01 Javier Miranda <miranda@adacore.com>
7262 * sem_disp.adb (Override_Dispatching_Operation): Enforce strictness of
7263 condition that detects if the overridden operation must replace an
7266 2011-08-01 Javier Miranda <miranda@adacore.com>
7268 * exp_ch4.adb (Expand_N_Case_Expression): Propagate to the expanded
7269 code declarations inserted by Insert_Actions in each alternative of the
7270 N_Case_Expression node.
7272 2011-08-01 Robert Dewar <dewar@adacore.com>
7274 * sem_ch6.adb: Minor code reorganization.
7275 * sem_util.adb: Minor reformatting.
7277 2011-08-01 Pascal Obry <obry@adacore.com>
7279 * prj-env.adb: Remove <prefix>/lib/gpr/<target> project search path.
7280 * gnat_ugn.texi: Add documentation for VERSIONINFO Windows resource.
7282 2011-08-01 Yannick Moy <moy@adacore.com>
7284 * par-ch4.adb (P_Name): issue a syntax error in SPARK mode on character
7285 literal or operator symbol which is prefixed
7286 * sem_attr.adb (Analyze_Access_Attribute): issue an error in formal
7287 mode on access attributes.
7288 * sem_ch4.adb (Analyze_Concatenation_Operand): new procedure to check
7289 that concatenation operands are properly restricted in formal mode
7290 (Analyze_Concatenation, Analyze_Concatenation_Rest): call new procedure
7291 Analyze_Concatenation_Operand. Issue an error in formal mode if the
7292 result of the concatenation has a type different from String.
7293 (Analyze_Conditional_Expression, Analyze_Explicit_Dereference,
7294 Analyze_Quantified_Expression, Analyze_Slice,
7295 Analyze_Null): issue an error in formal mode on unsupported constructs
7297 (Analyze_Block_Statement): only issue error on source block statement
7298 * sem_util.ads, sem_util.adb (Last_Source_Node_In_Sequence): new
7299 function which returns the last node in a list of nodes for which
7300 Comes_From_Source returns True, if any
7301 * sem_ch6.adb (Check_Missing_Return): minor refactoring to use
7302 Last_Source_Node_In_Sequence
7303 * sem_ch8.adb (Analyze_Exception_Renaming, Analyze_Generic_Renaming,
7304 Analyze_Object_Renaming, Analyze_Use_Package): issue an error in formal
7305 mode on unsupported constructs
7306 * sem_ch9.adb Do not return after issuing error in formal mode, as the
7307 rest of the actions may be needed later on since the error is marked as
7309 * sinfo.ads: Typos in comments.
7311 2011-08-01 Pascal Obry <obry@adacore.com>
7313 * projects.texi: Minor editing.
7315 2011-08-01 Yannick Moy <moy@adacore.com>
7317 * err_vars.ads (Error_Msg_Lang, Error_Msg_Langlen): new variables for
7318 insertion character ~~
7319 * errout.ads, errout.adb (Formal_Error_Msg_...): remove procedures
7320 (Set_Error_Msg_Lang): new procedure which fixes the language for use
7321 with insertion character ~~
7322 (Set_Msg_Text): treat insertion character ~~
7323 * par-ch4.adb, par-ch5.adb, par-endh.adb, sem_attr.adb, sem_ch11.adb,
7324 sem_ch3.adb, sem_ch5.adb, sem_ch9.adb, sem_util.adb: Replace calls to
7325 Formal_Error_Msg_... procedures by equivalent Error_Msg_...
7326 procedures. Favor calls to Error_Msg_F(E) over Error_Msg_N(E). Make
7327 errors related to the formal language restriction not serious
7328 (insertion character |).
7329 * par.adb (Par): set formal language for error messages if needed
7330 * sem_ch6.adb (Check_Missing_Return): take into account possible
7331 generated statements at the end of the function
7332 * snames.ads-tmpl (Name_SPARK_95, Pragma_SPARK_95): new variable and
7333 enumeration value to define a new pragma SPARK_95
7334 * opt.ads, opt.adb (SPARK_Version_Type, SPARK_Version_Default,
7335 SPARK_Version): new type and variables to store the SPARK version
7337 (SPARK_Mode): return True when SPARK_Version is set
7338 * par-prag.adb: Correct indentation
7339 (Prag): take Pragma_SPARK_95 into account
7340 * sem_prag.adb (Set_Mechanism_Value, Sig_Flags): take Pragma_SPARK_95
7343 2011-08-01 Robert Dewar <dewar@adacore.com>
7345 * sem_ch3.adb, sem_ch3.ads, sem_ch5.adb, prj-part.adb, par-ch4.adb,
7346 sem_util.adb, sem_ch4.adb, sem_ch6.adb, sem_ch6.ads, sem_ch8.adb,
7347 sem_ch8.ads, sem_ch13.ads, par-ch5.adb, prj-env.ads: Minor reformatting
7349 2011-08-01 Pascal Obry <obry@adacore.com>
7351 * prj-part.ads, prj-part.adb (Parse): Add Target_Name parameter. Pass
7352 Target_Name to Get_Path call.
7353 (Parse_Single_Project): Likewise.
7354 (Post_Parse_Context_Clause): Likewise.
7355 * prj-env.ads, prj-env.adb (Find_Project): Add Target_Name parameter.
7356 Call Initialise_Project_Path with the proper Target_Name.
7357 (Initialize_Project_Path): Add <gnat_root>/<target_name>/lib/gnat
7359 (Get_Path): Add Target_Name parameter. Call Initialise_Project_Path
7360 with the proper Target_Name.
7361 * prj-conf.adb (Get_Or_Create_Configuration_File): Pass Target_Name to
7363 (Parse_Project_And_Apply_Config): Likewise.
7364 * prj-makr.adb (Initialize): Pass empty Target_Name to Parse routine.
7365 This is fine as this part of the code is supporting only native
7367 * prj-pars.adb (Parse): Pass empty Target_Name to Parse routine. This
7368 is fine as this part of the code is supporting only native compilation.
7370 2011-08-01 Yannick Moy <moy@adacore.com>
7372 * sem_util.adb (Enter_Name): issue error in formal mode on declaration
7373 of homonym, unless the homonym is one of the cases allowed in SPARK
7374 * par-ch5.adb (Parse_Decls_Begin_End): issue error in SPARK mode for
7375 package declaration occurring after a body.
7377 2011-08-01 Robert Dewar <dewar@adacore.com>
7379 * checks.adb, exp_ch4.adb: Minor reformatting.
7381 2011-08-01 Javier Miranda <miranda@adacore.com>
7383 * einfo.ads (Access_Disp_Table): Fix documentation.
7384 (Dispatch_Table_Wrappers): Fix documentation.
7386 2011-08-01 Pascal Obry <obry@adacore.com>
7388 * prj-env.adb, prj-env.ads: Minor reformatting.
7390 2011-08-01 Yannick Moy <moy@adacore.com>
7392 * sem_util.ads, sem_util.adb, par.adb, par_util.adb
7393 (Formal_Error_Msg, Formal_Error_Msg_N, Formal_Error_Msg_SP): move
7394 procedures out of these packages.
7395 * errout.ads, errout.adb
7396 (Formal_Error_Msg, Formal_Error_Msg_N, Formal_Error_Msg_SP): move
7397 procedures in of this package
7398 (Formal_Error_Msg_NE): new procedure for wrapper on Error_Msg_NE
7399 * par-ch5.adb (Parse_Decls_Begin_End): issue syntax error in SPARK mode
7400 on misplaced later vs initial declarations, like in Ada 83
7401 * sem_attr.adb (Processing for Analyze_Attribute): issue error in
7402 formal mode on attribute of private type whose full type declaration
7404 * sem_ch3.adb (Analyze_Declarations): issue error in formal mode on a
7405 package declaration inside a package specification
7406 (Analyze_Full_Type_Declaration): issue error in formal mode on
7407 controlled type or discriminant type
7408 * sem_ch6.adb (Analyze_Subprogram_Specification): only issue error on
7409 user-defined operator means that it should come from the source
7410 (New_Overloaded_Entity): issue error in formal mode on overloaded
7412 * sem_ch6.ads, sem_ch13.ads: typos in comments.
7414 2011-08-01 Thomas Quinot <quinot@adacore.com>
7416 * atree.adb: Minor reformatting.
7417 * checks.adb: Minor reformatting.
7419 2011-08-01 Vincent Celier <celier@adacore.com>
7421 * s-parame-vms-ia64.ads: Fix typo in comment
7423 * s-parame-vms-restrict.ads: Removed, unused.
7425 2011-08-01 Javier Miranda <miranda@adacore.com>
7428 (Is_Variable_Size_Array): Remove local subprogram Is_Constant_Bound.
7430 (Constrain_Index): Remove side effects in the evaluation of the bounds.
7431 * sem_ch3.ads, sem_ch3.adb
7432 (Is_Constant_Bound): New extended version of the subprogram that was
7433 previously located inside function Exp_Ch3.Is_Variable_Size_Array.
7434 Moved here since it is shared by routines of sem_ch3 and exp_ch3.
7435 * sem_aux.ads (Constant_Value): Fix typo in comment.
7436 * checks.adb (Generate_Index_Checks): New implementation which, for
7437 array objects with constant bounds, generates the runtime check
7438 referencing the bounds of the array type. For other cases this routine
7439 provides its previous behavior obtaining such values from the array
7441 * sem_res.adb (Set_Slice_Subtype): Link a copied range subtree with its
7443 * atree.adb (New_Copy): Reset flag Is_Overloaded in the new copy since
7444 we cannot have semantic interpretations of the new node.
7446 2011-08-01 Ed Schonberg <schonberg@adacore.com>
7448 * sem_ch6.adb (Fully_Conformant_Expressions): handle quantified
7451 2011-08-01 Arnaud Charlet <charlet@adacore.com>
7453 * sem_ch8.adb: Minor code editing.
7454 * s-vxwext.adb: Remove trailing space.
7455 * freeze.adb, freeze.ads, errout.ads, erroutc.adb: Fix GPLv3 header for
7456 consistency with other files.
7458 2011-08-01 Thomas Quinot <quinot@adacore.com>
7460 * s-auxdec.ads, s-auxdec-vms_64.ads: Minor reformatting.
7462 2011-08-01 Ed Schonberg <schonberg@adacore.com>
7464 * par-ch10.adb: reject parameterized expressions as compilation unit.
7465 * sem_ch4.adb: handle properly conditional expression with overloaded
7466 then_clause and no else_clause.
7468 2011-08-01 Tristan Gingold <gingold@adacore.com>
7470 * s-parame-vms-alpha.ads, s-parame-vms-ia64.ads: Redeclare C_Address
7471 like done by System.Aux_DEC.
7472 * env.c (__gnat_setenv) [VMS]: Put logicals into LNM$PROCESS table.
7474 2011-08-01 Yannick Moy <moy@adacore.com>
7476 * par-endh.adb (Check_End): issue a syntax error in SPARK mode for
7477 missing label at end of declaration (subprogram or package)
7478 * par-ch4.adb (P_Name): issue a syntax error in SPARK mode for mixing
7479 of positional and named parameter association
7480 * par.adb, par-util.adb (Formal_Error_Msg_SP): new wrapper on
7481 Error_Msg_SP which adds a prefix to the error message giving the name
7482 of the formal language analyzed
7483 * sem_ch6.adb (Analyze_Return_Type): issue an error in formal mode for
7484 access result type in subprogram, unconstrained array as result type,.
7485 (Analyze_Subprogram_Declaration): issue an error in formal mode for null
7487 * sem_ch8.adb: Code clean up.
7489 2011-08-01 Javier Miranda <miranda@adacore.com>
7491 * sem_ch7.adb (Uninstall_Declarations): Remove useless code.
7492 * einfo.ads (Access_Disp_Table): Fix documentation.
7493 (Dispatch_Table_Wrappers): Fix documentation.
7494 * einfo.adb (Access_Disp_Table, Dispatch_Table_Wrappers,
7495 Set_Access_Disp_Table, Set_Dispatch_Table_Wrappers): Fix the assertions
7496 to enforce the documentation of this attribute.
7497 (Set_Is_Interface): Cleanup the assertion.
7498 * exp_ch4.adb (Expand_Allocator_Expression, Tagged_Membership): Locate
7499 the Underlying_Type entity before reading attribute Access_Disp_Table.
7500 * exp_disp.adb (Expand_Dispatching_Call, Expand_Interface_Conversion):
7501 Locate the Underlying_Type before reading attribute Access_Disp_Table.
7502 * exp_aggr.adb (Build_Array_Aggr_Code, Build_Record_Aggr_Code): Locate
7503 the Underlying_Type entity before reading attribute Access_Disp_Table.
7504 * exp_ch3.adb (Build_Record_Init_Proc, Expand_N_Object_Declaration):
7505 Locate the Underlying_Type entity before reading attribute
7508 2011-08-01 Ed Schonberg <schonberg@adacore.com>
7510 * s-poosiz.ads: Additional overriding indicators.
7512 2011-08-01 Yannick Moy <moy@adacore.com>
7514 * sem_ch5.adb (Analyze_Exit_Statement): add return after error in
7516 (Analyze_Iteration_Scheme): issue error in formal mode when loop
7517 parameter specification does not include a subtype mark.
7518 * sem_ch6.adb (Analyze_Abstract_Subprogram_Declaration): issue error in
7519 formal mode on abstract subprogram.
7520 (Analyze_Subprogram_Specification): issue error in formal mode on
7521 user-defined operator.
7522 (Process_Formals): issue error in formal mode on access parameter and
7524 * sem_ch9.adb (Analyze_Abort_Statement,
7525 Analyze_Accept_Statement, Analyze_Asynchronous_Select,
7526 Analyze_Conditional_Entry_Call, Analyze_Delay_Relative,
7527 Analyze_Delay_Until, Analyze_Entry_Call_Alternative,
7528 Analyze_Requeue, Analyze_Selective_Accept,
7529 Analyze_Timed_Entry_Call): issue error in formal mode on such constructs
7530 * sem_ch11.adb (Analyze_Raise_Statement, Analyze_Raise_xxx_Error):
7531 issue error in formal mode on user-defined raise statement.
7533 2011-08-01 Thomas Quinot <quinot@adacore.com>
7535 * sem_ch6.adb (Enter_Overloaded_Entity): Do not warn about a
7536 declaration being hidden when overriding an implicit inherited
7538 * par-ch10.adb (P_Compilation_Unit): In syntax check only mode
7539 (-gnats), do not complain about a source file that contains only a
7542 2011-08-01 Ed Schonberg <schonberg@adacore.com>
7544 * sem_ch5.adb (Analyze_Iterator_Scheme): Do not overwrite type of loop
7545 variable if already set.
7547 2011-08-01 Arnaud Charlet <charlet@adacore.com>
7549 * g-socket-dummy.adb, s-osinte-linux.ads, g-socket-dummy.ads,
7550 g-debuti.adb, g-tasloc.adb, g-debuti.ads, g-tasloc.ads,
7551 s-osinte-hpux.ads, g-sercom.adb, g-soliop-solaris.ads, g-sercom.ads,
7552 g-sptain.ads, g-curexc.ads, s-tasloc.adb, s-tasloc.ads, s-tataat.adb,
7553 g-ctrl_c.adb, a-reatim.adb, s-tataat.ads, g-dirope.adb, g-ctrl_c.ads,
7554 g-dirope.ads, g-boubuf.adb, g-calend.adb, g-boubuf.ads, g-souinf.ads,
7555 g-table.adb, g-bytswa-x86.adb, g-wispch.adb, g-io.adb, g-table.ads,
7556 g-wispch.ads, g-io.ads, g-memdum.adb, g-memdum.ads, g-busorg.adb,
7557 g-busorg.ads, g-regpat.adb, g-sothco-dummy.adb, g-encstr.adb,
7558 g-regpat.ads, g-sothco-dummy.ads, s-osinte-aix.ads, g-encstr.ads,
7559 g-sercom-mingw.adb, s-mastop-vms.adb, g-diopit.adb, g-diopit.ads,
7560 s-vxwext.adb, g-dyntab.adb, g-dyntab.ads, g-crc32.adb,
7561 g-sercom-linux.adb, g-crc32.ads, s-regpat.adb, g-flocon.ads,
7562 s-regpat.ads, g-stheme.adb, g-sestin.ads, s-taspri-posix-noaltstack.ads,
7563 g-soliop.ads, s-inmaop-posix.adb, g-locfil.ads, g-enblsp-vms-alpha.adb,
7564 g-socthi-dummy.adb, g-socthi-dummy.ads, gnat.ads, g-moreex.adb,
7565 g-moreex.ads, g-dynhta.adb, g-dynhta.ads, g-deutst.ads, g-htable.adb,
7566 g-cgicoo.adb, g-htable.ads, g-cgicoo.ads, a-interr.adb,
7567 g-socthi-vms.adb, g-socthi-vms.ads, g-hesora.adb, g-bubsor.adb,
7568 g-hesora.ads, g-bubsor.ads, g-md5.adb, g-md5.ads, s-intman-irix.adb,
7569 s-htable.adb, s-osinte-vms.adb, s-htable.ads, s-osinte-vms.ads,
7570 s-taprob.adb, g-bytswa.adb, g-bytswa.ads, s-osinte-solaris-posix.ads,
7571 a-suenco.adb, g-comver.adb, g-comver.ads, g-exctra.adb,
7572 s-osinte-solaris.adb, g-exctra.ads, s-osinte-irix.ads,
7573 s-osinte-solaris.ads, a-caldel-vms.adb, g-socthi-vxworks.adb,
7574 g-expect.adb, g-socthi-vxworks.ads, g-expect.ads, g-comlin.ads,
7575 g-heasor.adb, g-heasor.ads, g-traceb.adb, g-traceb.ads, g-decstr.adb,
7576 g-spipat.adb, g-decstr.ads, g-spipat.ads, s-mastop-tru64.adb,
7577 g-except.ads, g-thread.adb, g-hesorg.adb, g-thread.ads, g-hesorg.ads,
7578 g-expect-vms.adb, a-stuten.ads, g-spchge.adb, g-spchge.ads,
7579 g-u3spch.adb, g-u3spch.ads, g-spitbo.adb, g-spitbo.ads,
7580 s-osinte-dummy.ads, s-osinte-posix.adb, g-pehage.adb, g-pehage.ads,
7581 s-gloloc-mingw.adb, g-sha1.ads, s-traceb-hpux.adb,
7582 g-trasym-unimplemented.adb, g-trasym-unimplemented.ads, g-io_aux.adb,
7583 g-regexp.adb, g-io_aux.ads, g-socthi-mingw.adb, g-regexp.ads,
7584 s-osinte-hpux-dce.adb, g-socthi-mingw.ads, g-cgi.adb,
7585 s-osinte-hpux-dce.ads, g-cgi.ads, g-byorma.adb, g-boumai.ads,
7586 g-byorma.ads, a-caldel.adb, s-regexp.adb, s-regexp.ads,
7587 g-soliop-mingw.ads, g-sptavs.ads, s-osinte-tru64.ads, g-speche.adb,
7588 g-speche.ads, g-socthi.adb, g-stsifd-sockets.adb, g-socthi.ads,
7589 s-osinte-darwin.ads, i-vxwork-x86.ads, g-awk.adb, i-vxwork.ads,
7590 g-awk.ads, g-zspche.adb, g-zspche.ads, g-socket.adb, g-sptabo.ads,
7591 g-socket.ads, g-semaph.adb, g-semaph.ads, s-taspri-posix.ads,
7592 g-enblsp-vms-ia64.adb, g-cgideb.adb, g-cgideb.ads, g-sothco.adb,
7593 s-osinte-freebsd.ads, g-sothco.ads, g-catiio.adb, g-casuti.adb,
7594 g-catiio.ads, g-casuti.ads, g-trasym.adb, g-trasym.ads, s-casuti.adb,
7595 g-os_lib.adb, s-traceb-mastop.adb, g-busora.adb, s-interr-dummy.adb,
7596 g-busora.ads, g-enutst.ads, s-os_lib.adb, a-tasatt.adb,
7597 s-osinte-mingw.ads: Update to GPLv3 run-time license.
7598 Use GNAT instead of GNARL.
7600 2011-08-01 Bob Duff <duff@adacore.com>
7602 * a-cdlili.ads, a-cihama.ads, a-coinve.ads, a-ciorse.ads, a-coorma.ads,
7603 a-cidlli.ads, a-ciormu.ads, a-cihase.ads, a-cohama.ads, a-coorse.ads,
7604 a-ciorma.ads, a-coormu.ads, a-convec.ads, a-cohase.ads: Minor
7607 2011-08-01 Yannick Moy <moy@adacore.com>
7609 * debug.adb (d.D) reverve flag for the SPARK mode
7610 (d.E) reverve flag for SPARK generation mode
7611 (d.F) reverve flag for Why generation mode
7612 * opt.ads, opt.adb (ALFA_Mode, ALFA_Through_SPARK_Mode,
7613 ALFA_Through_Why_Mode, Formal_Verification_Mode, SPARK_Mode): New
7614 functions which return True when the corresponding modes are set
7615 (Formal_Language): return "spark" or "alfa" when in formal verification
7617 * sem_util.ads, sem_util.adb (Formal_Error_Msg): new wrapper on
7618 Error_Msg to prefix the error message with a tag giving the formal
7620 (Formal_Error_Msg_N): new wrapper on Error_Msg_N to prefix the error
7621 message with a tag giving the formal language
7622 * sem_ch5.adb (Analyze_Block_Statement): issue error in formal mode on
7624 (Analyze_Case_Statement): issue error in formal mode on case statement
7625 with a single "others" case alternative
7626 (Analyze_Exit_Statement): issue errors in formal mode on exit
7627 statements which do not respect SPARK restrictions
7628 (Analyze_Goto_Statement): issue error in formal mode on goto statement
7629 (Check_Unreachable_Code): always issue an error (not a warning) in
7630 formal mode on unreachable code (concerns both code after an infinite
7631 loop and after an unconditional jump, both not allowed in SPARK)
7632 * sem_ch6.adb (Analyze_Return_Statement): add call to
7633 Set_Return_Present for a procedure containing a return statement
7634 (already done for functions in Analyze_Function_Return)
7635 (Analyze_Function_Return): issue error in formal mode on extended
7636 return or if return is not last statement in function
7637 (Check_Missing_Return): issue error in formal mode if function does
7638 not end with return or if procedure contains a return
7639 * sem_ch8.ads, sem_ch8.adb (Has_Loop_In_Inner_Open_Scopes): new
7640 function to detect if there is an inner scope of its parameter S which
7643 2011-08-01 Thomas Quinot <quinot@adacore.com>
7645 * sem_ch6.ads: Minor reformatting.
7647 2011-08-01 Javier Miranda <miranda@adacore.com>
7649 * sem_util.adb (Abstract_Interface_List): Complete condition when
7650 processing private type declarations to avoid reading unavailable
7652 (Is_Synchronized_Tagged_Type): Complete condition when processing
7653 private extension declaration nodes to avoid reading unavailable
7656 2011-08-01 Thomas Quinot <quinot@adacore.com>
7658 * sem_ch3.adb: Minor reformatting.
7660 2011-08-01 Thomas Quinot <quinot@adacore.com>
7662 * s-parame-ae653.ads, s-parame-vms-alpha.ads, s-parame-hpux.ads,
7663 i-cpoint.adb, i-cstrin.adb, i-cpoint.ads, i-cstrin.ads,
7664 s-parame-vms-ia64.ads, s-parame.ads, i-c.ads, s-parame-vxworks.ads,
7665 s-parame-vms-restrict.ads: Remove duplicated Interfaces.C.* packages
7666 for VMS, instead parametrize the common implementation with
7667 System.Parameters declarations.
7669 2011-08-01 Eric Botcazou <ebotcazou@adacore.com>
7671 * gnat_rm.texi: Document limitation of Pragma No_Strict_Aliasing.
7673 2011-08-01 Tristan Gingold <gingold@adacore.com>
7675 * seh_init.c: Fix SEH handler installation on win64.
7677 2011-08-01 Ed Schonberg <schonberg@adacore.com>
7679 * sem_ch3.adb (Access_Subprogram_Declaration): in Asis mode, prevent
7680 double analysis of an anonymous access to subprogram, because it can
7681 lead to improper sharing of profiles and a back-end crash.
7683 2011-08-01 Robert Dewar <dewar@adacore.com>
7685 * make.adb, sem_ch4.adb: Minor reformatting.
7686 * gcc-interface/Make-lang.in: Update dependencies.
7687 * sem_util.adb, exp_ch5.adb: Minor reformatting.
7689 2011-08-01 Arnaud Charlet <charlet@adacore.com>
7691 * gnat_rm.texi: Fix definition of Long_Integer.
7693 2011-08-01 Ed Schonberg <schonberg@adacore.com>
7695 * exp_aggr.adb: check limit size of static aggregate unconditionally,
7696 to prevent storage exhaustion.
7697 * exp_ch7.adb (Clean_Simple_Protected_Objects): if the scope being
7698 finalized is a function body, insert the cleanup code before the final
7699 return statement, to prevent spurious warnings.
7700 * s-pooglo.ads: add overriding indicator.
7702 2011-08-01 Ed Schonberg <schonberg@adacore.com>
7704 * sem_ch4.adb (Operator_Check): improve error message when both a
7705 with_clause and a use_clause are needed to make operator usage legal.
7706 * sem_util.ads, sem_util.adb (Unit_Is_Visible): new predicate to
7707 determine whether a compilation unit is visible within an other,
7708 either through a with_clause in the current unit, or a with_clause in
7709 its library unit or one one of its parents.
7711 2011-08-01 Ed Schonberg <schonberg@adacore.com>
7713 * exp_ch5.adb (Expand_N_Iterator_Loop): handle properly an iterator
7714 over an arbitrary expression of an array or container type.
7715 * lib-xref.adb: clarify comment.
7717 2011-08-01 Bob Duff <duff@adacore.com>
7719 * einfo.ads: Minor reformatting.
7720 * debug.adb: Minor comment improvement.
7722 2011-08-01 Javier Miranda <miranda@adacore.com>
7724 * sem_ch4.adb (Try_Object_Operation): For class-wide subprograms do not
7725 consider hidden subprograms as valid candidates.
7727 2011-08-01 Arnaud Charlet <charlet@adacore.com>
7729 * make.adb (Compile): Strip -mxxx switches in CodePeer mode.
7731 2011-08-01 Vasiliy Fofanov <fofanov@adacore.com>
7733 * gnat_ugn.texi: Fix typo.
7735 2011-08-01 Robert Dewar <dewar@adacore.com>
7737 * i-cstrin.adb, sem_util.adb, exp_ch11.adb, sem_ch8.adb,
7738 lib-xref.adb: Minor reformatting
7740 2011-08-01 Gary Dismukes <dismukes@adacore.com>
7742 * exp_ch6.adb (Expand_N_Extended_Return_Statement): Replace test of
7743 when to generate a call to Move_Final_List.
7744 (Has_Controlled_Parts): Remove this function.
7746 2011-08-01 Geert Bosch <bosch@adacore.com>
7748 * par-ch3.adb (P_Discrete_Choice_List): Improve error message for extra
7751 2011-08-01 Thomas Quinot <quinot@adacore.com>
7753 * exp_ch11.adb (Expand_N_Raise_Statement): Mark N_Raise_xxx_Error for
7754 explicit raise of a predefined exception as Comes_From_Source if the
7755 original N_Raise_Statement comes from source.
7757 2011-08-01 Robert Dewar <dewar@adacore.com>
7759 * sinfo.ads: Add comment.
7760 * sem_ch6.adb: Minor reformatting.
7762 2011-08-01 Robert Dewar <dewar@adacore.com>
7764 * freeze.adb (Freeze_Entity): Refine check for bad component size
7765 clause to avoid rejecting confirming clause when atomic/aliased present.
7767 2011-08-01 Ed Schonberg <schonberg@adacore.com>
7769 * sem_ch8.adb (Find_Direct_Name, Analyze_Expanded_Name): use Is_LHS to
7770 better determine whether an entity reference is a write.
7771 * sem_util.adb (Is_LHS): refine predicate to handle assignment to a
7773 * lib-xref.adb (Output_References): Do no suppress a read reference at
7774 the same location as an immediately preceeding modify-reference, to
7775 handle properly in-out actuals.
7777 2011-08-01 Tristan Gingold <gingold@adacore.com>
7779 * env.c (__gnat_setenv) [VMS]: Refine previous change.
7781 2011-08-01 Quentin Ochem <ochem@adacore.com>
7783 * i-cstrin.adb (New_String): Changed implementation, now uses only the
7784 heap to compute the result.
7786 2011-08-01 Robert Dewar <dewar@adacore.com>
7788 * atree.ads: Minor reformatting.
7790 2011-08-01 Emmanuel Briot <briot@adacore.com>
7792 * g-expect.adb (Get_Command_Output): Fix memory leak.
7794 2011-08-01 Geert Bosch <bosch@adacore.com>
7796 * cstand.adb (P_Float_Type): New procedure to print the definition of
7797 predefined fpt types.
7798 (P_Mixed_Name): New procedure to print a name using mixed case
7799 (Print_Standard): Use P_Float_Type for printing floating point types
7800 * einfo.adb (Machine_Emax_Value): Add preliminary support for quad
7801 precision IEEE float.
7803 2011-08-01 Thomas Quinot <quinot@adacore.com>
7805 * sem_ch3.adb: Minor reformatting.
7807 2011-08-01 Ed Schonberg <schonberg@adacore.com>
7809 * sem_ch6.adb (Analyze_Parameterized_Expression): If the expression is
7810 the completion of a generic function, insert the new body rather than
7811 rewriting the original.
7813 2011-08-01 Yannick Moy <moy@adacore.com>
7815 * sinfo.ads, errout.ads: Typos in comments.
7817 2011-08-01 Robert Dewar <dewar@adacore.com>
7819 * par-endh.adb: Minor reformatting.
7821 2011-08-01 Robert Dewar <dewar@adacore.com>
7823 * aspects.ads, aspects.adb: Add aspects for library unit pragmas
7824 (Pre_Post_Aspects): New subtype.
7825 * par-ch12.adb (P_Generic): New syntax for aspects in packages
7826 * par-ch13.adb (P_Aspect_Specifications): Add Semicolon parameter
7827 * par-ch7.adb (P_Package): Remove Decl parameter
7828 (P_Package): Handle new syntax for aspects (before IS)
7829 * par-ch9.adb (P_Protected_Definition): Remove Decl parameter, handle
7831 (P_Task_Definition): Remove Decl parameter, handle new aspect syntax
7832 * par.adb (P_Aspect_Specifications): Add Semicolon parameter
7833 (P_Package): Remove Decl parameter
7834 * sem_ch13.adb (Analyze_Aspect_Specifications): Handle library unit
7836 * sem_ch7.adb (Analyze_Package_Declaration): Analyze new format aspect
7838 * sem_util.ads, sem_util.adb (Static_Boolean): New function
7839 * sinfo.ads: Document new syntax for aspects in packages etc.
7840 * sprint.adb: Handle new syntax of aspects before IS in package
7842 2011-08-01 Thomas Quinot <quinot@adacore.com>
7844 * atree.ads: Minor reformatting.
7845 * sem_prag.adb: Minor reformatting.
7847 2011-08-01 Robert Dewar <dewar@adacore.com>
7849 * exp_util.adb (Insert_Actions): Fix error in handling Actions for
7850 case expr alternative.
7852 2011-08-01 Ed Schonberg <schonberg@adacore.com>
7854 * sem_ch12.adb: Fix typo.
7856 2011-08-01 Geert Bosch <bosch@adacore.com>
7858 * sem_prag.adb (Check_No_Link_Name): New procedure.
7859 (Process_Import_Or_Interface): Use Check_No_Link_Name.
7860 * cstand.adb (Create_Standard): Use Esize (Standard_Long_Long_Float)
7861 instead of Standard_Long_Long_Float_Size global. Preparation for
7862 eventual removal of per type constants.
7863 * exp_util.ads (Get_Stream_Size): New function returning the stream
7864 size value of subtype E.
7865 * exp_util.adb (Get_Stream_Size): Implement new function.
7866 * exp_strm.adb (Build_Elementary_Input_Call): Use Get_Stream_Size
7868 * exp_attr.adb (Attribute_Stream_Size): Use Get_Stream_Size
7870 (Machine_Mantissa_Value): Handle 128-bit quad precision IEEE floats
7872 2011-08-01 Geert Bosch <bosch@adacore.com>
7874 * cstand.adb: Fix comments.
7875 * sem_prag.adb (Analyze_Pragma): Use List_Length instead of explicit
7878 2011-08-01 Robert Dewar <dewar@adacore.com>
7880 * exp_ch4.adb, sem_cat.adb: Minor reformatting.
7882 2011-08-01 Geert Bosch <bosch@adacore.com>
7884 * atree.ads: Fix comment.
7886 2011-08-01 Robert Dewar <dewar@adacore.com>
7888 * aspects.ads, aspects.adb (Aspect_Names): Moved from body to spec.
7889 * par-ch13.adb (P_Aspect_Specifications): Check misspelled aspect name.
7890 * par.adb: Add with for Namet.Sp.
7891 * par-tchk.adb: Minor reformatting.
7893 2011-08-01 Vincent Celier <celier@adacore.com>
7895 * mlib-tgt-specific-vms-alpha.adb, mlib-tgt-specific-vms-ia64.adb
7896 (Build_Dynamic_Library): Use new function Init_Proc_Name to get the name
7897 of the init procedure of a SAL.
7898 * mlib-tgt-vms_common.ads, mlib-tgt-vms_common.adb (Init_Proc_Name):
7901 2011-08-01 Thomas Quinot <quinot@adacore.com>
7903 * exp_ch4.adb, s-tasini.ads, sem_attr.adb, s-soflin.ads: Minor
7906 2011-08-01 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
7908 * adaint.c (__gnat_file_time_name_attr): Get rid of warning.
7910 2011-08-01 Thomas Quinot <quinot@adacore.com>
7912 * sem_util.adb, sem_util.ads (Has_Overriding_Initialize): Make function
7913 conformant with its spec (return True only for types that have
7914 an overriding Initialize primitive operation that prevents them from
7915 having preelaborable initialization).
7916 * sem_cat.adb (Validate_Object_Declaration): Fix test for preelaborable
7917 initialization for controlled types in Ada 2005 or later mode.
7919 2011-08-01 Robert Dewar <dewar@adacore.com>
7921 * aspects.ads, aspects.adb: Add aspect Type_Invariant, Precondition,
7923 (Same_Aspect): New function.
7924 * sem_ch13.adb (Analyze_Aspect_Specifications): Add aspect
7925 Type_Invariant, Precondition, Postcondition.
7926 * snames.ads-tmpl: Add Name_Type_Invariant.
7928 2011-08-01 Robert Dewar <dewar@adacore.com>
7930 * freeze.adb (Freeze_Entity): Don't call Check_Aspect_At_Freeze_Point
7932 (Freeze_All_Ent): Fix error in handling inherited aspects.
7933 * sem_ch13.adb (Analyze_Aspect_Specifications): Skip aspect that is
7934 already analyzed, but don't skip entire processing of a declaration,
7935 that's wrong in some cases of declarations being rewritten.
7936 (Analyze_Aspect_Specification): Set Is_Delayed_Aspect in aspects.
7937 Don't delay for integer, string literals
7938 Treat predicates in usual manner for delay, remove special case code,
7940 (Analyze_Freeze_Entity): Make call to Check_Aspect_At_Freeze_Point
7941 (Build_Predicate_Function): Update saved expression in aspect
7942 (Build_Invariant_Procedure): Update saved expression in aspect
7943 * exp_ch4.adb (Expand_N_Selected_Component): Only do the optimization
7944 of replacement of discriminant references if the reference is simple.
7946 2011-08-01 Robert Dewar <dewar@adacore.com>
7948 * aspects.ads, aspects.adb: Add Static_Predicate and Dynamic_Predicate.
7949 * sem_ch13.adb (Analyze_Aspect_Specification): Add processing for
7950 Static_Predicate and Dynamic_Predicate.
7951 (Build_Predicate_Function): Add processing for Static_Predicate
7952 and Dynamic_Predicate.
7953 * sinfo.ads, sinfo.adb (From_Dynamic_Predicate): New flag
7954 (From_Static_Predicate): New flag
7955 * snames.ads-tmpl: Add Name_Static_Predicate and Name_Dynamic_Predicate
7957 2011-08-01 Robert Dewar <dewar@adacore.com>
7959 * usage.adb: Documentation cleanup for Ada version modes in usage.
7960 * expander.adb: Minor reformatting.
7962 2011-08-01 Robert Dewar <dewar@adacore.com>
7964 * atree.ads: Minor comment fix.
7965 * a-stwifi.adb, a-stzfix.adb, a-strfix.adb, a-ztexio.ads, a-textio.ads,
7966 a-witeio.ads, sem_prag.adb: Minor reformatting.
7968 2011-08-01 Doug Rupp <rupp@adacore.com>
7970 * env.c (__gnat_setenv) [VMS]: Force 32bit on item list structure
7971 pointers. Use descrip.h header file for convenience. Add some
7974 2011-08-01 Robert Dewar <dewar@adacore.com>
7976 * freeze.adb (Freeze_Entity): Call Check_Aspect_At_Freeze_Point
7977 (Freeze_All): Call Check_Aspect_At_End_Of_Declarations
7978 * sem_ch13.ads, sem_ch13.adb (Check_Aspect_At_Freeze_Point):
7980 (Check_Aspect_At_End_Of_Declarations): New procedure
7981 (Analye_Aspect_Specification): Minor changes for above procedures
7982 * sinfo.ads, sinfo.adb (Is_Delayed_Aspect): Now set in aspect
7983 specification node as well.
7985 2011-08-01 Pascal Obry <obry@adacore.com>
7987 * adaint.c (_gnat_stat): GetFilesAttributesEx() would fail on special
7988 Windows files. Use GetFilesAttributes() in this case to check for file
7989 existence instead of returning with an error code.
7991 2011-08-01 Vincent Celier <celier@adacore.com>
7993 * a-stzfix.adb, a-stwifi.adb (Replace_Slice): Fixed computation when
7994 High is above Source length.
7996 2011-08-01 Robert Dewar <dewar@adacore.com>
7998 * a-ztexio.ads, a-textio.ads, a-witeio.ads: Fix comment.
8000 2011-08-01 Robert Dewar <dewar@adacore.com>
8002 * aspects.ads (Boolean_Aspects): New subtype.
8003 * exp_ch13.adb (Expand_Freeze_Entity): Fix errors in handling aspects
8004 for derived types in cases where the parent type and derived type have
8006 * freeze.adb (Freeze_Entity): Fix problems in handling derived type
8007 with aspects when parent type also has aspects.
8008 (Freeze_Entity): Deal with delay of boolean aspects (must evaluate
8009 boolean expression at this point).
8010 * sem_ch13.adb (Analyze_Aspect_Specifications): Delay all aspects in
8011 accordance with final decision on the Ada 2012 feature.
8012 * sinfo.ads, sinfo.adb (Is_Boolean_Aspect): New flag.
8014 2011-08-01 Matthew Heaney <heaney@adacore.com>
8016 * a-chtgbo.adb (Delete_Node_Sans_Free): Replace iterator with selector.
8018 2011-08-01 Pascal Obry <obry@adacore.com>
8020 * a-stzunb-shared.adb, a-strunb-shared.adb, a-stwiun-shared.adb:
8021 Fix Replace_Slice when High is above current string size.
8022 (Replace_Slice): Fix DL computation when High is above current
8025 2011-08-01 Gary Dismukes <dismukes@adacore.com>
8027 * gnat_rm.texi: Add documentation for pragma Static_Elaboration_Desired.
8029 2011-08-01 Matthew Heaney <heaney@adacore.com>
8031 * a-rbtgbo.adb (Delete_Node_Sans_Free): Fixed assignment to left child
8034 2011-08-01 Pascal Obry <obry@adacore.com>
8036 * a-stzunb-shared.adb, a-strunb-shared.adb, a-stwiun-shared.adb: Minor
8039 2011-08-01 Ed Schonberg <schonberg@adacore.com>
8041 * sem_attr.adb (Analyze_Attribute, case 'Access): Handle properly named
8042 access to protected subprograms in generic bodies.
8043 * sem_ch6.adb (Analyze_Subprogram_Declaration): If the context is a
8044 protected type, indicate that the convention of the subprogram is
8045 Convention_Protected, because it may be used in subsequent declarations
8046 within the protected declaration.
8048 2011-08-01 Vincent Celier <celier@adacore.com>
8050 * mlib-prj.adb (Build_Library): Use "ada_" as the prefix for the "init"
8051 and "final" procedures when the name of the library is "ada", to avoid
8052 duplicate symbols "adainit" and "adafinal" in executables.
8054 2011-08-01 Ed Schonberg <schonberg@adacore.com>
8056 * sem_attr.adb (Analyze_Attribute, case 'Result): Handle properly a
8057 quantified expression that appears within a postcondition and uses the
8058 Ada2012 'Result attribute.
8060 2011-07-28 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
8062 * init.c (__gnat_error_handler): Cast reason to int.
8063 (__gnat_install_handler): Explain sa_sigaction use.
8065 2011-07-24 Eric Botcazou <ebotcazou@adacore.com>
8067 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Subprogram_Type>: If the
8068 subprogram has copy-in copy-out parameters, try to promote the mode of
8069 the return type if it is passed in registers.
8071 2011-07-24 Eric Botcazou <ebotcazou@adacore.com>
8073 * gcc-interface/utils2.c (build_binary_op) <ARRAY_REF>: Do not mark the
8074 left operand as addressable.
8076 2011-07-24 Eric Botcazou <ebotcazou@adacore.com>
8078 * gcc-interface/gigi.h (build_function_stub): Remove.
8079 (build_return_expr): Likewise.
8080 (convert_vms_descriptor): Declare.
8081 * gcc-interface/utils.c (convert_vms_descriptor): Make global.
8082 (build_function_stub): Move to...
8083 * gcc-interface/utils2.c (build_return_expr): Move to...
8084 * gcc-interface/trans.c (build_function_stub): ...here.
8085 (build_return_expr): ...here.
8086 (Subprogram_Body_to_gnu): Add local variable for language_function.
8087 Disconnect the parameter attributes cache, if any, once done with it.
8088 Call end_subprog_body only after setting the end_locus.
8089 Build the stub associated with the function, if any, at the very end.
8090 (gnat_to_gnu) <N_Return_Statement>: Remove couple of useless local
8091 variables and streamline control flow.
8093 2011-07-23 Arnaud Charlet <charlet@adacore.com>
8096 * gcc-interface/Makefile.in (powerpc-linux): Remove reference to
8099 2011-07-22 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
8102 * init.c [sun && __SVR4 && !__vxworks] (__gnat_install_handler):
8103 Assign to act.sa_sigaction.
8104 * tracebak.c [USE_GENERIC_UNWINDER] (__gnat_backtrace): Cast
8105 current->return_address to char * before arithmetic.
8107 2011-07-22 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
8109 * init.c [sgi] (__gnat_error_handler): Update sigaction(2) citation.
8110 Correct argument types.
8111 Extract code from reason.
8112 (__gnat_install_handler): Assign to act.sa_sigaction.
8114 2011-07-21 Eric Botcazou <ebotcazou@adacore.com>
8116 * gcc-interface/Make-lang.in (GNAT1_ADA_OBJS): Move ada/b_gnat1.o to...
8117 (GNAT1_OBJS): ...here.
8119 2011-07-15 Eric Botcazou <ebotcazou@adacore.com>
8122 * g-socthi-mingw.adb (Fill): Fix formatting.
8124 * gcc-interface/gigi.h: Move around comment.
8126 2011-07-14 John David Anglin <dave.anglin@nrc-cnrc.gc.ca>
8129 * s-taprop-hpux-dce.adb (Abort_Task): Remove unnecessary cast.
8131 2011-07-14 Florian Weimer <fw@deneb.enyo.de>
8134 * g-socthi-mingw.adb (Fill): Guard against invalid MSG_WAITALL.
8136 2011-07-13 Eric Botcazou <ebotcazou@adacore.com>
8138 * gcc-interface/utils.c (build_vms_descriptor32): Skip the 32-bit
8139 range comparison if Pmode is SImode.
8141 2011-07-12 Laurent GUERBY <laurent@guerby.net>
8142 Eric Botcazou <ebotcazou@adacore.com>
8144 * adadecode.c: Wrap up in extern "C" block.
8145 * adadecode.h: Likewise.
8146 * adaint.c: Likewise. Remove 'const' keyword.
8147 * adaint.h: Likewise.
8149 * atree.h: Likewise.
8151 * cstreams.c: Likewise.
8155 * final.c: Likewise.
8157 * initialize.c: Likewise.
8159 * namet.h: Likewise.
8160 * nlists.h: Likewise.
8161 * raise.c: Likewise.
8162 * raise.h: Likewise.
8163 * repinfo.h: Likewise.
8164 * seh_init.c: Likewise.
8165 * targext.c: Likewise.
8166 * tracebak.c: Likewise.
8167 * uintp.h: Likewise.
8168 * urealp.h: Likewise.
8169 * xeinfo.adb: Wrap up generated C code in extern "C" block.
8170 * xsinfo.adb: Likewise.
8171 * xsnamest.adb: Likewise.
8172 * gcc-interface/gadaint.h: Wrap up in extern "C" block.
8173 * gcc-interface/gigi.h: Wrap up some prototypes in extern "C" block.
8174 * gcc-interface/misc.c: Likewise.
8175 * gcc-interface/Make-lang.in (GCC_LINK): Use LINKER.
8176 (GNAT1_C_OBJS): Remove ada/b_gnat1.o. List ada/seh_init.o and
8177 ada/targext.o here...
8178 (GNAT_ADA_OBJS): ...and not here.
8179 (GNAT1_ADA_OBJS): Add ada/b_gnat1.o.
8180 (GNATBIND_OBJS): Reorder.
8182 2011-07-07 Richard Henderson <rth@redhat.com>
8184 * gcc-interface/misc.c (gnat_init_gcc_eh): Don't call
8185 dwarf2out_frame_init.
8187 2011-07-07 Eric Botcazou <ebotcazou@adacore.com>
8189 * gcc-interface/misc.c (gnat_init): Tweak previous change.
8191 2011-07-07 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
8194 * gcc-interface/Makefile.in: Handle x86_64-solaris2.
8196 2011-07-06 Richard Guenther <rguenther@suse.de>
8198 * gcc-interface/misc.c (gnat_init): Merge calls to
8199 build_common_tree_nodes and build_common_tree_nodes_2.
8200 Re-initialize boolean_false_node.
8202 2011-07-02 Eric Botcazou <ebotcazou@adacore.com>
8203 Olivier Hainque <hainque@adacore.com>
8204 Nicolas Setton <setton@adacore.com>
8206 * gcc-interface/utils.c (record_builtin_type): Set TYPE_ARTIFICIAL on
8207 the type according to the ARTIFICIAL_P parameter.
8208 (create_type_decl): Likewise.
8209 (create_type_stub_decl): Set TYPE_ARTIFICIAL on the type to 1.
8211 2011-07-01 Eric Botcazou <ebotcazou@adacore.com>
8213 * gcc-interface/Make-lang.in (gnat1): Prepend '+' to the command.
8214 (gnatbind): Likewise.
8216 2011-06-29 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
8218 * gcc-interface/Makefile.in (TOOLS_LIBS): Add $(LIBINTL).
8220 2011-06-18 Eric Botcazou <ebotcazou@adacore.com>
8222 * gcc-interface/decl.c (gnat_to_gnu_component_type): Use GNAT_TYPE
8223 local variable throughout. Remove useless call to Base_Type.
8224 (gnat_to_gnu_field): Use GNAT_FIELD_TYPE local variable throughout.
8225 Take it also into account for the volatileness of the field. Set the
8226 TREE_SIDE_EFFECTS flag as well in this case. Reorder some warnings.
8228 2011-06-18 Eric Botcazou <ebotcazou@adacore.com>
8230 * gcc-interface/trans.c (Identifier_to_gnu): Don't set TREE_THIS_NOTRAP
8231 on a dereference built for a by-ref object if it has an address clause.
8233 2011-06-18 Eric Botcazou <ebotcazou@adacore.com>
8235 * einfo.ads (Address_Taken): Document use for the second argument of
8236 Asm_Input and Asm_Output attributes.
8237 * sem_attr.adb (Analyze_Attribute) <Attribute_Asm_Input>: If the second
8238 argument is an entity name, then set Address_Taken on it.
8239 <Attribute_Asm_Output>: Likewise.
8240 * gcc-interface/trans.c (lvalue_required_for_attribute_p): Handle the
8241 Attr_Asm_Input and Attr_Asm_Output attributes explicitly.
8242 (gnat_to_gnu) <N_Code_Statement>: If an operand is going to end up in
8243 memory and is a CONST_DECL, retrieve its corresponding VAR_DECL.
8245 2011-06-16 Joern Rennecke <joern.rennecke@embecosm.com>
8248 * gcc-interface/decl.c (gnat_to_gnu_param): Use pack_cumulative_args.
8250 2011-06-14 Joseph Myers <joseph@codesourcery.com>
8252 * gcc-interface/Make-lang.in (gnatbind$(exeext)): Use ggc-none.o.
8253 (ada/utils.o): Update dependencies.
8254 * gcc-interface/Makefile.in (EXTRA_GNATTOOLS_OBJS): Add
8255 ../../../libcpp/libcpp.a.
8256 * gcc-interface/utils.c: Include common/common-target.h.
8257 (process_attributes): Use targetm_common.have_named_sections.
8259 2011-06-07 Richard Guenther <rguenther@suse.de>
8261 * gcc-interface/misc.c (gnat_init): Do not set size_type_node or call
8264 2011-06-06 Eric Botcazou <ebotcazou@adacore.com>
8266 * gcc-interface/utils2.c (gnat_stabilize_reference): Propagate the
8267 TREE_THIS_NOTRAP flag.
8269 2011-06-06 Eric Botcazou <ebotcazou@adacore.com>
8271 * gcc-interface/utils2.c (gnat_stabilize_reference) <COMPOUND_EXPR>:
8274 2011-06-06 Eric Botcazou <ebotcazou@adacore.com>
8276 * gcc-interface/trans.c (Identifier_to_gnu): Also handle deferred
8277 constants whose full view has discriminants specially.
8279 2011-06-06 Eric Botcazou <ebotcazou@adacore.com>
8281 * gcc-interface/utils.c: Include diagnostic.h.
8282 (gnat_write_global_declarations): Output debug information for all
8283 global type declarations before finalizing the compilation unit.
8284 * gcc-interface/Make-lang.in (ada/utils.o): Add dependency.
8286 2011-05-25 Jakub Jelinek <jakub@redhat.com>
8288 * gcc-interface/utils.c (def_fn_type): Remove extra va_end.
8290 2011-05-25 Kai Tietz <ktietz@redhat.com>
8292 * adaint.c (__gnat_to_canonical_file_list_next): Use array
8293 initialization instead of const/none-const pointer assignment.
8295 2011-05-24 Joseph Myers <joseph@codesourcery.com>
8297 * gcc-interface/Make-lang.in (GNAT1_OBJS): Don't include
8298 $(EXTRA_GNAT1_OBJS).
8299 (GNATBIND_OBJS): Don't include $(EXTRA_GNATBIND_OBJS).
8300 (EXTRA_GNAT1_OBJS, EXTRA_GNATBIND_OBJS): Remove.
8301 (gnat1$(exeext), gnatbind$(exeext)): Use libcommon-target.a.
8302 * gcc-interface/Makefile.in (EXTRA_GNATTOOLS_OBJS): Use
8303 libcommon-target.a instead of prefix.o.
8305 2011-05-21 Joseph Myers <joseph@codesourcery.com>
8308 * gcc-interface/Make-lang.in (gnatbind$(exeext)): Depend on $(LIBDEPS).
8310 2011-05-20 Joseph Myers <joseph@codesourcery.com>
8312 * gcc-interface/Make-lang.in (EXTRA_GNATBIND_OBJS): Remove version.o.
8313 * gcc-interface/Makefile.in (EXTRA_GNATTOOLS_OBJS): Use libcommon.a
8314 instead of version.o.
8316 2011-05-18 Kai Tietz <ktietz@redhat.com>
8318 * gcc-interface/trans.c (Exception_Handler_to_gnu_sjlj): Use
8319 boolean_false_node instead of integer_zero_node.
8320 (convert_with_check): Likewise.
8321 * gcc-interface/decl.c (choices_to_gnu): Likewise.
8323 2011-05-12 Eric Botcazou <ebotcazou@adacore.com>
8325 * gcc-interface/trans.c (call_to_gnu): In the by-reference case, if the
8326 type of the parameter is an unconstrained array, convert the actual to
8327 the type of the formal in the In Out and Out cases as well.
8329 2011-05-11 Nathan Froyd <froydnj@codesourcery.com>
8331 * gcc-interface/utils.c (def_fn_type): Don't call build_function_type;
8332 call build_function_type_array or build_varargs_function_type_array
8334 (create_subprog_type): Don't call build_function_type; call
8335 build_function_type_vec instead.
8337 2011-05-11 Nathan Froyd <froydnj@codesourcery.com>
8339 * gcc-interface/ada-tree.h (TYPE_OBJECT_RECORD_TYPE): Use TYPE_MINVAL.
8340 (TYPE_GCC_MIN_VALUE): Use TYPE_MINVAL.
8341 (TYPE_GCC_MAX_VALUE): Use TYPE_MAXVAL.
8343 2011-05-07 Eric Botcazou <ebotcazou@adacore.com>
8345 * gcc-interface/decl.c (intrin_arglists_compatible_p): Remove spaces.
8347 * gcc-interface/gigi.h (global_bindings_p): Adjust prototype.
8348 * gcc-interface/utils.c (global_bindings_p): Return bool and simplify.
8350 2011-05-05 Nathan Froyd <froydnj@codesourcery.com>
8352 * gcc-interface/trans.c (Case_Statement_to_gnu): Call build_case_label.
8354 2011-05-05 Nathan Froyd <froydnj@codesourcery.com>
8356 * gcc-interface/decl.c (intrin_arglists_compatible_p): Use iterators
8357 instead of accessing TYPE_ARG_TYPES directly.
8358 * gcc-interface/utils.c (handle_nonnull_attribute): Likewise.
8360 2011-05-05 Eric Botcazou <ebotcazou@adacore.com>
8363 * gcc-interface/gigi.h (get_variant_part): Declare.
8364 * gcc-interface/decl.c (get_variant_part): Make global.
8365 * gcc-interface/utils2.c (find_common_type): Do not return T1 if the
8366 types have the same constant size, are record types and T1 has a
8367 variant part while T2 doesn't.
8369 2011-05-05 Eric Botcazou <ebotcazou@adacore.com>
8371 * gcc-interface/utils.c (begin_subprog_body): Do not call
8373 (end_subprog_body): Likewise.
8375 2011-05-04 Richard Guenther <rguenther@suse.de>
8377 * gcc-interface/trans.c (gnat_to_gnu): Remove zero notrunc argument to
8379 (pos_to_constructor): Likewise.
8381 2011-05-03 Nathan Froyd <froydnj@codesourcery.com>
8382 Eric Botcazou <ebotcazou@adacore.com>
8384 * gcc-interface/trans.c (gigi): Call build_function_type_list instead
8385 of build_function_type. Adjust calls to...
8386 (build_raise_check): ...this. Do not take a void_tree parameter.
8387 Call build_function_type_list instead of build_function_type.
8388 Fix head comment and swap couple of conditional blocks.
8390 2011-04-30 Eric Botcazou <ebotcazou@adacore.com>
8392 * gnatvsn.ads (Library_Version): Bump to 4.7.
8393 (Current_Year): Bump to 2011.
8395 2011-04-29 Michael Matz <matz@suse.de>
8397 * gcc-interface/misc.c (gnat_handle_option): Set
8398 warn_maybe_uninitialized.
8400 2011-04-23 Gerald Pfeifer <gerald@pfeifer.com>
8402 * gnat_ugn.texi (Complexity Metrics Control): Update link to
8403 the Watson/McCabe paper.
8405 2011-04-23 Jim Meyering <meyering@redhat.com>
8407 * gnat_ugn.texi (Examples of gnatxref Usage): Fix typo: s/it it/it is/
8409 2011-04-22 Eric Botcazou <ebotcazou@adacore.com>
8411 * gcc-interface/decl.c (make_packable_type): Copy DECL_PARALLEL_TYPE
8414 2011-04-22 Eric Botcazou <ebotcazou@adacore.com>
8416 * gcc-interface/gigi.h (create_subprog_decl): Add ARTIFICIAL_FLAG
8418 * gcc-interface/utils.c (create_subprog_decl): Likewise. Set
8419 DECL_ARTIFICIAL and DECL_NO_INLINE_WARNING_P on the DECL accordingly.
8420 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Subprogram_Type>: Add
8421 ARTIFICIAL_FLAG local variable and pass it to create_subprog_decl.
8422 <all>: Do not set flags on the reused DECL node coming from an alias.
8423 Set DECL_IGNORED_P on the DECL node built for subprograms if they
8424 don't need debug info here...
8425 * gcc-interface/trans.c (Subprogram_Body_to_gnu): ...and not here.
8426 (gigi): Adjust calls to create_subprog_decl.
8427 (build_raise_check): Likewise.
8428 (establish_gnat_vms_condition_handler): Likewise.
8429 (Compilation_Unit_to_gnu): Likewise.
8430 (gnat_to_gnu): Likewise.
8432 2011-04-21 Eric Botcazou <ebotcazou@adacore.com>
8434 * gcc-interface/Makefile.in (NO_SIBLING_ADAFLAGS): Always define.
8435 (NO_REORDER_ADAFLAGS): New variable.
8436 (EXTRA_GNATTOOLS): Always define.
8437 (../stamp-gnatlib1-$(RTSDIR): Copy tsystem.h.
8438 Clean up and adjust list of files compiled with special options.
8439 * gcc-interface/Make-lang.in: Likewise.
8440 (ada/decl.o): Cosmetical change.
8441 (ada/misc.o): Remove dependency on $(PLUGIN_H).
8443 2011-04-20 Jim Meyering <meyering@redhat.com>
8445 * initialize.c (__gnat_initialize): Remove useless if-before-free.
8447 2011-04-17 Eric Botcazou <ebotcazou@adacore.com>
8449 * gcc-interface/Make-lang.in (gnatbind): Replace $(ALL_CFLAGS) with
8450 $(CFLAGS) on the link line.
8452 2011-04-17 Eric Botcazou <ebotcazou@adacore.com>
8454 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Function>: Declare the
8455 padded type built for the return type if it is unconstrained.
8457 2011-04-14 Nathan Froyd <froydnj@codesourcery.com>
8459 * gcc-interface/utils.c (gnat_poplevel): Use block_chainon.
8461 2011-04-12 Nathan Froyd <froydnj@codesourcery.com>
8463 * gcc-interface/ada-tree.h (union lang_tree_node): Check for TS_COMMON
8464 before calling TREE_CHAIN.
8465 * gcc-interface/misc.c (gnat_init_ts): New function.
8466 (LANG_HOOKS_INIT_TS): Define.
8468 2011-04-12 Martin Jambor <mjambor@suse.cz>
8470 * gcc-interface/utils.c (end_subprog_body): Call cgraph_get_create_node
8471 instead of cgraph_node.
8473 2011-04-08 Eric Botcazou <ebotcazou@adacore.com>
8475 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Procedure>: Set minimum
8476 alignment on fields of the RETURN type built for the Copy-In Copy-Out
8479 2011-04-08 Eric Botcazou <ebotcazou@adacore.com>
8481 * gcc-interface/trans.c (Identifier_to_gnu): Do not return initializers
8482 of aggregate types that contain a placeholder.
8484 2011-04-08 Nathan Froyd <froydnj@codesourcery.com>
8486 * gcc-interface/utils.c (handle_sentinel_attribute): Don't use
8488 (handle_type_generic_attribute): Likewise.
8490 2011-04-04 Eric Botcazou <ebotcazou@adacore.com>
8493 * s-oscons-tmplt.c (MSG_WAITALL): Fix thinko in previous change.
8495 2011-04-04 Kai Tietz <ktietz@redhat.com>
8498 * s-oscons-tmplt.c (MSG_WAITALL): Define it for native windows targets
8501 2011-04-02 Eric Botcazou <ebotcazou@adacore.com>
8503 * gcc-interface/utils2.c (build_allocator): In the unconstrained array
8504 type case, do not strip a padding type around the array type.
8506 2011-04-02 Eric Botcazou <ebotcazou@adacore.com>
8508 * gcc-interface/utils.c (update_pointer_to): Finalize named pointer
8511 2011-04-02 Eric Botcazou <ebotcazou@adacore.com>
8513 * gcc-interface/lang.opt (feliminate-unused-debug-types): Delete.
8514 * gcc-interface/misc.c (gnat_handle_option): Remove special handling
8515 code for -feliminate-unused-debug-types.
8516 (gnat_post_options): Likewise.
8518 2011-04-02 Eric Botcazou <ebotcazou@adacore.com>
8520 * gcc-interface/utils.c (gnat_pushdecl): If this is a non-artificial
8521 declaration of a pointer type, then set DECL_ORIGINAL_TYPE to a
8524 2011-04-02 Eric Botcazou <ebotcazou@adacore.com>
8526 * gcc-interface/decl.c (gnat_to_gnu_entity): Do not force the
8527 DECL_ARTIFICIAL flag on enumeration types.
8529 2011-04-02 Eric Botcazou <ebotcazou@adacore.com>
8531 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Array_Type>: Do not make
8532 fat pointer types artificial unconditionally.
8533 <E_Array_Subtype>: Attach the base array type as a parallel type if it
8536 2011-04-02 Eric Botcazou <ebotcazou@adacore.com>
8538 * gcc-interface/gigi.h (get_dummy_type): Declare.
8539 (build_dummy_unc_pointer_types): Likewise.
8540 (finish_fat_pointer_type): Likewise.
8541 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Array_Type>: If a dummy
8542 fat pointer type has been built, complete it in place.
8543 <E_Access_Type>: Call build_dummy_unc_pointer_types to build dummy fat
8544 and thin pointers. Remove useless variable.
8545 (finish_fat_pointer_type): Make global and move to...
8546 * gcc-interface/utils.c (finish_fat_pointer_type): ...here.
8547 (get_dummy_type): New function.
8548 (build_dummy_unc_pointer_types): Likewise.
8549 (gnat_pushdecl): Propage the name to the anonymous variants only.
8550 (update_pointer_to): Only adjust the pointer types in the unconstrained
8553 2011-04-02 Eric Botcazou <ebotcazou@adacore.com>
8555 * gcc-interface/ada-tree.h (DECL_TAFT_TYPE_P): New flag.
8556 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Incomplete_Type>: Set it
8557 if this is a Taft amendment type and the full declaration is available.
8558 * gcc-interface/trans.c (process_type): Likewise.
8559 If there is an old type, mark the new one as used if DECL_TAFT_TYPE_P.
8560 (process_freeze_entity): Likewise.
8561 * gcc-interface/utils.c (dummy_global): New static variable.
8562 (gnat_write_global_declarations): If there are types declared as used
8563 at the global level, insert them in the global hash table.
8565 2011-04-02 Eric Botcazou <ebotcazou@adacore.com>
8567 * gcc-interface/gigi.h (record_builtin_type): Add ARTIFICIAL_P param.
8568 * gcc-interface/utils.c (gnat_pushdecl): If this is a non-artificial
8569 declaration of an array type, then set DECL_ORIGINAL_TYPE to a distinct
8571 (record_builtin_type): Add ARTIFICIAL_P parameter. Set DECL_ARTIFICIAL
8572 flag of the type accordingly.
8573 * gcc-interface/trans.c (gigi): Adjust calls to record_builtin_type.
8575 2011-04-02 Eric Botcazou <ebotcazou@adacore.com>
8577 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Access_Type>: Defer
8578 finalizing types when updating the pointers to the designated type.
8579 <all>: Finalize the deferred types even if we didn't defer processing
8580 of incomplete types in this invocation.
8582 2011-04-01 Olivier Hainque <hainque@adacore.com>
8583 Nicolas Setton <setton@adacore.com>
8584 Eric Botcazou <ebotcazou@adacore.com>
8586 * gcc-interface/misc.c (gnat_descriptive_type): New function.
8587 (LANG_HOOKS_DESCRIPTIVE_TYPE): Redefine to gnat_descriptive_type.
8589 2011-03-28 Kai Tietz <ktietz@redhat.com>
8591 * gcc-interface/Makefile.in (SO_LIB): Handle multilib build for native
8593 (EH_MECHANISM): Use GCC exception mechanism for native Windows targets.
8594 * system-mingw.ads (System): Change ZCX_By_Default default to True.
8596 * raise-gcc.c (PERSONALITY_FUNCTION): Add prototype.
8598 2011-03-28 Tristan Gingold <gingold@adacore.com>
8601 * gcc-interface/Make-lang.in (ada/b_gnat1.adb): Replace ada/b_gnat1.c.
8602 Use ada output of gnatbind.
8603 (ada/b_gnatb.adb): Ditto.
8604 (ada/b_gnat1.o, ada/b_gnatb.o): New rules.
8605 (ada.mostlyclean, ada.stage1)
8606 (ada.stage2, ada.stage3, ada.stage4, ada.stageprofile)
8607 (ada.stagefeedback): Adjust.
8608 * gcc-interface/Makefile.in (b_gnatl.adb): Replace b_gnatl.c.
8609 Use ada output of gnatbind.
8610 (b_gnatm.adb): Ditto.
8611 (b_gnatl.o, b_gnatm.o): New rules.
8613 2011-03-26 Eric Botcazou <ebotcazou@adacore.com>
8615 * gcc-interface/decl.c (gnat_to_gnu_entity) <object>: Create TYPE_DECL
8616 for the padded type built to support a specified size or alignment.
8618 2011-03-26 Eric Botcazou <ebotcazou@adacore.com>
8620 * gcc-interface/gigi.h (finalize_from_with_types): Adjust comment.
8621 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Access_Type>: Defer
8622 unconditionally to the end of the unit when the designated type is
8624 <all>: Rename local variable. Attempt to un-defer types only and do it
8625 for limited_with'ed types as well.
8626 (finalize_from_with_types): Adjust comment. Rename variable and tidy.
8627 * gcc-interface/trans.c (Compilation_Unit_to_gnu): Use GNAT_UNIT
8628 consistently and remove redundant call to finalize_from_with_types.
8630 2011-03-26 Eric Botcazou <ebotcazou@adacore.com>
8632 * inline.adb (Back_End_Cannot_Inline): Lift restriction on calls to
8633 subprograms without a previous spec declared in the same unit.
8634 * gcc-interface/trans.c (Compilation_Unit_to_gnu): Process inlined
8635 subprograms at the end of the unit instead of at the beginning.
8636 * gcc-interface/utils.c (create_subprog_decl): Check that the entity
8637 isn't public for the special handling of non-inline functions nested
8638 inside inline external functions.
8640 2011-03-25 Jeff Law <law@redhat.com>
8642 * gcc-interface/utils.c (def_fn_type): Add missing va_end.
8644 2011-03-24 Eric Botcazou <ebotcazou@adacore.com>
8646 * einfo.ads (Size_Depends_On_Discriminant): Adjust description.
8647 * layout.adb (Compute_Size_Depends_On_Discriminant): New procedure
8648 to compute Set_Size_Depends_On_Discriminant.
8649 (Layout_Type): Call it on array types in back-end layout mode.
8650 * sem_util.adb (Requires_Transient_Scope): Return true for array
8651 types only if the size depends on the value of discriminants.
8652 * gcc-interface/utils2.c (build_binary_op) <MODIFY_EXPR>: Use the RHS
8653 type if the RHS is a call to a function that returns an unconstrained
8654 type with default discriminant.
8656 2011-03-24 Eric Botcazou <ebotcazou@adacore.com>
8658 * gcc-interface/trans.c (gnat_to_gnu): Remove obsolete case of
8659 non-conversion to the nominal result type at the end.
8661 2011-03-23 Eric Botcazou <ebotcazou@adacore.com>
8663 * gcc-interface/trans.c (create_temporary): New function taken from...
8664 (create_init_temporary): ...here. Call it.
8665 (call_to_gnu): Create the temporary for the return value early, if any.
8666 Create it for a function with copy-in/copy-out parameters if there is
8667 no target; in other cases of copy-in/copy-out, use another temporary.
8668 Push the new binding level lazily. Add and rename local variables.
8670 2011-03-23 Eric Botcazou <ebotcazou@adacore.com>
8672 * gcc-interface/decl.c (validate_size): Improve comments and tweak
8674 (set_rm_size): Likewise.
8676 2011-03-23 Eric Botcazou <ebotcazou@adacore.com>
8678 * gcc-interface/decl.c (gnat_to_gnu_entity) <object>: Create TYPE_DECL
8679 for the padded type built in order to support a specified alignment.
8680 Fix incorrect formatting.
8682 2011-03-21 Eric Botcazou <ebotcazou@adacore.com>
8685 * gcc-interface/decl.c (elaborate_expression_1): Localize GNU_DECL.
8687 2011-03-21 Eric Botcazou <ebotcazou@adacore.com>
8689 * gcc-interface/decl.c (components_to_record): Add REORDER parameter,
8690 rename DEBUG_INFO_P into DEBUG_INFO and move P_GNU_REP_LIST parameter
8691 to the end of the list. Adjust recursive call. Rename local variable.
8692 If REORDER is true, reorder components of the record type.
8693 (gnat_to_gnu_entity): Pass OK_To_Reorder_Components flag as argument to
8694 components_to_record and adjust the parameter list.
8696 2011-03-21 Eric Botcazou <ebotcazou@adacore.com>
8698 * gcc-interface/decl.c (elaborate_expression_1): When optimization is
8699 disabled, use the variable for bounds of loop iteration scheme.
8701 2011-03-21 Kai Tietz <ktietz@redhat.com>
8704 * gcc-interface/utils.c (gnat_internal_attribute_table): Add column.
8706 2011-03-17 Eric Botcazou <ebotcazou@adacore.com>
8708 * gcc-interface/decl.c (elaborate_expression_1): Try harder to find
8709 out whether the expression is read-only. Short-circuit placeholder
8710 case and rename a couple of local variables.
8712 2011-03-17 Eric Botcazou <ebotcazou@adacore.com>
8714 * gcc-interface/gigi.h (smaller_form_type_p): Declare.
8715 * gcc-interface/trans.c (smaller_form_type_p): Make global and move...
8716 * gcc-interface/utils.c (smaller_form_type_p): ...to here.
8717 (convert): Deal with conversions from a smaller form type specially.
8719 2011-02-14 Eric Botcazou <ebotcazou@adacore.com>
8721 * gcc-interface/misc.c (gnat_init_options): Do not concatenate -I and
8722 its argument, except for the special -I- switch.
8724 2011-02-12 Gerald Pfeifer <gerald@pfeifer.com>
8726 * gnat_ugn.texi (Compiling Different Versions of Ada): Update link to
8729 2011-02-08 Eric Botcazou <ebotcazou@adacore.com>
8731 * gcc-interface/Makefile.in (x86-64 darwin): Handle multilibs.
8733 2011-02-03 Eric Botcazou <ebotcazou@adacore.com>
8735 * gcc-interface/gigi.h (fill_vms_descriptor): Take GNU_TYPE instead of
8737 * gcc-interface/utils2.c (fill_vms_descriptor): Move from here to...
8738 * gcc-interface/utils.c (fill_vms_descriptor): ...here. Take GNU_TYPE
8739 instead of GNAT_FORMAL. Protect the expression against multiple uses.
8740 Do not generate the check directly, instead instantiate the template
8741 check present in the descriptor.
8742 (make_descriptor_field): Move around.
8743 (build_vms_descriptor32): Build a template check in the POINTER field.
8744 (build_vms_descriptor): Remove useless suffixes.
8745 * gcc-interface/trans.c (call_to_gnu): Adjust fill_vms_descriptor call.
8747 2011-01-26 Eric Botcazou <ebotcazou@adacore.com>
8750 * targext.c: Include target files if IN_RTS is defined.
8752 2011-01-26 Richard Guenther <rguenther@suse.de>
8755 * targext.c: Include config.h.
8756 * gcc-interface/Make-lang.in (ada/targext.o): Add $(CONFIG_H)
8759 2011-01-04 Pascal Obry <obry@adacore.com>
8760 Eric Botcazou <ebotcazou@adacore.com>
8762 * gcc-interface/decl.c: Disable Stdcall convention handling for 64-bit.
8764 2011-01-04 Eric Botcazou <ebotcazou@adacore.com>
8766 * gcc-interface/trans.c (Case_Statement_to_gnu): Put the SLOC of the
8767 end-of-case on the end label and its associated gotos, if any.
8769 2011-01-04 Eric Botcazou <ebotcazou@adacore.com>
8771 * gcc-interface/trans.c (Subprogram_Body_to_gnu): Evaluate the
8772 expressions of the parameter cache within the statement group of
8775 2011-01-04 Olivier Hainque <hainque@adacore.com>
8776 Eric Botcazou <ebotcazou@adacore.com>
8778 * gcc-interface/trans.c (BLOCK_SOURCE_END_LOCATION): Provide default.
8779 (set_end_locus_from_node): New function.
8780 (Subprogram_Body_to_gnu): Use it to mark both the inner BIND_EXPR we
8781 make and the function end_locus.
8782 (Compilation_Unit_to_gnu): Call it instead of a straight Sloc_to_locus
8783 for the elaboration subprogram.
8784 (set_gnu_expr_location_from_node) <default case>: Use it to attempt to
8785 set the end_locus of the expression as well.
8787 2011-01-04 Eric Botcazou <ebotcazou@adacore.com>
8790 * gcc-interface/trans.c (Identifier_to_gnu): In SJLJ mode, do not make
8791 variables that are referenced in exception handlers volatile.
8795 Copyright (C) 2011 Free Software Foundation, Inc.
8797 Copying and distribution of this file, with or without modification,
8798 are permitted in any medium without royalty provided the copyright
8799 notice and this notice are preserved.