1 2011-08-04 Yannick Moy <moy@adacore.com>
3 * einfo.adb, einfo.ads (Formal_Proof_On): new flag set on subprogram
4 entities whose body contains an Annotate pragma which forces formal
6 * sem_ch11.adb, sem_ch2.adb, sem_ch3.adb, sem_ch4.adb, sem_ch5.adb,
7 sem_ch6.adb, sem_ch9.adb, sem_res.adb: Adapt call to
8 Mark_Non_ALFA_Subprogram to pass in a message and node.
9 * sem_prag.adb (Analyze_Pragma): add treatment of pragma Annotate
10 (Forma_Proof, On) which sets the flag Formal_Proof_On in the
11 surrounding subprogram.
12 * sem_util.adb, sem_util.ads (Mark_Non_ALFA_Subprogram,
13 Mark_Non_ALFA_Subprogram_Unconditional): if the subprogram being marked
14 as not in ALFA is annotated with Formal_Proof being On, then an error
15 is issued based on the additional parameters for message and node.
16 * snames.ads-tmpl (Name_Formal_Proof): new name for annotation.
17 * gcc-interface/Make-lang.in: Update dependencies.
19 2011-08-04 Hristian Kirtchev <kirtchev@adacore.com>
21 * exp_ch3.adb (Expand_Freeze_Class_Wide_Type): Do not generate
22 Finalize_Address when CodePeer is enabled.
24 2011-08-04 Pascal Obry <obry@adacore.com>
26 * adaint.c (__gnat_tmp_name): Use _tempnam() instead of tempnam() as
27 the latter returns a pointer to a static buffer which is deallocated
28 at the end of the routine.
30 2011-08-04 Yannick Moy <moy@adacore.com>
32 * sem_ch3.adb (Array_Type_Declaration): move test for type in ALFA
33 after index creation; mark unconstrained base array type generated as
34 being in/not in ALFA as well
35 (Make_Index): mark subtype created as in/not in ALFA
36 * sem_ch5.adb (Analyze_Iteration_Scheme): mark entity for iterating
37 over a loop as in/not in ALFA, depending on its type and form of loop
40 2011-08-04 Hristian Kirtchev <kirtchev@adacore.com>
42 * exp_ch7.adb (Build_Object_Declarations): Initialize flag Abort
43 directly to False on .NET and JVM.
45 2011-08-04 Yannick Moy <moy@adacore.com>
47 * sem_ch3.adb (Constrain_Enumeration, Constrain_Integer): remove
48 constraint that subtype must come from source code to be in ALFA, so
49 that anonymous subtypes can be in ALFA too.
51 2011-08-04 Yannick Moy <moy@adacore.com>
53 * sem_ch3.adb (Analyze_Object_Declaration): remove obsolete addition of
54 reference for ALFA mode.
55 * lib-xref-alfa.adb, lib-xref.ads (Traverse_Compilation_Unit): make
56 procedure public so as to use it from formal verification back-end.
58 2011-08-04 Jerome Lambourg <lambourg@adacore.com>
60 * g-comlin.adb (For_Each_Simple_Switch.Is_In_Config): Remove the
61 invalid checks of the Parameter, making Remove_Switch not working
64 2011-08-04 Arnaud Charlet <charlet@adacore.com>
66 * targparm.ads: Update header: no run-time exception is needed on this
69 2011-08-04 Vincent Celier <celier@adacore.com>
71 * a-fihema.adb: Use System.IO instead of GNAT.IO
73 2011-08-04 Thomas Quinot <quinot@adacore.com>
75 * sem_ch3.adb (Access_Definition): Anonymous access to subprogram types
76 are forbidden in Compiler_Unit mode.
78 2011-08-04 Robert Dewar <dewar@adacore.com>
80 * sem_util.adb: Minor reformatting.
82 2011-08-04 Hristian Kirtchev <kirtchev@adacore.com>
84 * bindgen.adb (Gen_Finalize_Library_Ada): Update the import string for
85 library-level finalizers.
86 (Gen_Finalize_Library_C): Update the import string for library-level
88 (Gen_Finalize_Library_Defs_C): Update the definition name of a
89 library-level finalizer.
90 * exp_ch7.adb: Remove with and use clauses for Stringt.
91 (Create_Finalizer): Remove local variables Conv_Name, Prag_Decl,
92 Spec_Decl. Add local variable Body_Id. The names of library-level
93 finalizers are now manually fully qualified and are no longer external.
94 A single name is now capable of servicing .NET, JVM and non-VM targets.
95 Pragma Export is no longer required to provide visibility for the name.
96 (Create_Finalizer_String): Removed.
97 (New_Finalizer_Name): New routine which mimics New_..._Name.
99 2011-08-04 Eric Botcazou <ebotcazou@adacore.com>
101 * sem_elab.adb (Check_Internal_Call_Continue): Change the type of the
102 elaboration counter to Standard_Short_Integer.
103 * sem_util.adb (Build_Elaboration_Entity): Likewise.
104 * bindgen.adb (Gen_Elab_Externals_Ada): Adjust to above change.
105 (Gen_Elab_Externals_C): Likewise.
107 2011-08-04 Ed Falis <falis@adacore.com>
109 * system-vxworks-arm.ads, system-vxworks-sparcv9.ads,
110 system-vxworks-ppc.ads, system-vxworks-m68k.ads,
111 system-vxworks-mips.ads, system-vxworks-x86.ads
112 (Always_Compatible_Rep): set to False for all VxWorks targets.
114 2011-08-04 Robert Dewar <dewar@adacore.com>
116 * par_sco.adb, prj-proc.adb, make.adb, bindgen.adb, prj.adb, prj.ads,
117 makeutl.adb, makeutl.ads, prj-nmsc.adb, exp_ch5.adb, exp_ch12.adb,
118 exp_ch7.ads, exp_util.ads, sem_util.ads, g-comlin.ads, exp_ch6.adb,
119 exp_ch6.ads, lib-xref.ads, exp_ch7.adb, exp_util.adb, exp_dist.adb,
120 exp_strm.adb, gnatcmd.adb, freeze.adb, g-comlin.adb, lib-xref-alfa.adb,
121 sem_attr.adb, sem_prag.adb, sem_util.adb, sem_elab.adb, sem_ch8.adb,
122 sem_ch11.adb, sem_eval.adb, sem_ch13.adb, sem_disp.adb, a-fihema.adb:
123 Minor reformatting and code reorganization.
125 2011-08-04 Emmanuel Briot <briot@adacore.com>
127 * projects.texi: Added doc for aggregate projects.
129 2011-08-04 Emmanuel Briot <briot@adacore.com>
131 * prj-proc.adb, prj-nmsc.adb, prj-env.adb (Process_Declarative_Items):
132 Add support for overriding the Project_Path in aggregate projects.
134 2011-08-04 Robert Dewar <dewar@adacore.com>
136 * a-cofove.ads: Minor reformatting.
138 2011-08-04 Hristian Kirtchev <kirtchev@adacore.com>
140 * exp_ch7.adb (Build_Adjust_Or_Finalize_Statements): Update the comment
141 on the generated code.
142 (Build_Finalize_Statements): Update the comment on the generated code.
143 (Build_Initialize_Statements): Update the comment on the generated code.
144 (Build_Object_Declarations): Add local variable Result. The object
145 declarations are now built in sequence.
146 * rtsfind.ads: Add RE_Exception_Occurrence_Access to tables RE_Id and
149 2011-08-04 Robert Dewar <dewar@adacore.com>
151 * checks.adb, alfa.adb, alfa.ads: Minor reformatting.
153 2011-08-04 Eric Botcazou <ebotcazou@adacore.com>
155 * einfo.ads (Elaboration_Entity): Document new definition and use.
156 (Elaboration_Entity_Required): Adjust to above change.
157 * exp_attr.adb (Expand_N_Attribute_Reference): Likewise.
158 * exp_ch12.adb: And with and use for Snames.
159 (Expand_N_Generic_Instantiation): Test 'Elaborated attribute.
160 * exp_util.adb (Set_Elaboration_Flag): Likewise.
161 * sem_attr.adb (Analyze_Attribute) <Check_Library_Unit>: Delete.
162 <Check_Unit_Name>: Deal with N_Expanded_Name.
163 <Attribute_Elaborated>: Extend to all unit names.
164 * sem_elab.adb: And with and use for Uintp.
165 (Check_Internal_Call_Continue): Adjust to Elaboration_Entity change.
166 * sem_util.ads (Build_Elaboration_Entity): Adjust comment.
167 * sem_util.adb (Build_Elaboration_Entity): Change type to Integer.
168 * bindgen.adb (Gen_Elab_Externals_Ada): New local subprogram taken
169 from Gen_Adainit_Ada.
170 (Gen_Elab_Externals_C): Likewise, but taken from Gen_Adainit_C.
171 (Gen_Adafinal_Ada): Remove redundant test. In the non-main program
172 case, do not call System.Standard_Library.Adafinal; instead call
173 finalize_library if needed.
174 (Gen_Adafinal_C): Likewise.
175 (Gen_Adainit_Ada): Do not set SSL.Finalize_Library_Objects in the
176 non-main program case.
177 (Gen_Adainit_C): Generate a couple of external declarations here.
178 In the main program case, set SSL.Finalize_Library_Objects.
179 (Gen_Elab_Calls_Ada): Adjust to Elaboration_Entity change.
180 (Gen_Elab_Calls_C): Likewise.
181 (Gen_Finalize_Library_Ada): Likewise. Skip SAL interface units.
182 (Gen_Finalize_Library_C): Likewise. Generate a full function.
183 (Gen_Main_C): Put back call to Ada_Final and don't finalize library
185 (Gen_Output_File_Ada): Generate pragma Linker_Destructor for Ada_Final
186 if -a is specified. Call Gen_Elab_Externals_Ada. Move around call to
188 (Gen_Output_File_C): Generate __attribute__((destructor)) for Ada_Final
189 if -a is specified. Call Gen_Elab_Externals_C. Remove useless couple
190 of external declarations. Call Gen_Finalize_Library_C.
192 2011-08-04 Emmanuel Briot <briot@adacore.com>
194 * prj.adb, prj.ads, makeutl.adb, makeutl.ads (Complete_Mains,
195 Compute_Compilation_Phases): new subprogram.
196 (Builder_Data, Builder_Project_Tree_Data): new subprogram and type
197 The number of mains as well as the various compilation phases that
198 need to be run are now project tree specific, since various
199 aggregated trees might have different requirements. In particular,
200 they do not all require bind or link phases.
202 2011-08-04 Emmanuel Briot <briot@adacore.com>
204 * prj.adb, prj.ads, makeutl.adb, makeutl.ads, prj-env.adb
205 (Project_Tree_Appdata): New type.
206 It is now possible to associate application-specific data to a project
207 tree. In particular, this is used in the gprbuild builder to avoid a
208 number of global tables and htables, especially now that there can be
209 several project trees loaded at once because of aggregate projects.
210 (Debug_Name): new procedure.
211 * projects.texi: Clarify syntax of "**" for Source_Dirs
213 2011-08-03 Emmanuel Briot <briot@adacore.com>
215 * prj.ads, makeutl.adb, makeutl.ads (Queue.Insert): now also inserts
216 the "roots" for a main.
217 (Fill_From_Project): add support for aggregate projects. Main units
218 in aggregated projects are now automatically added in the list of
219 files to build (although this fails later on in gprbuild, because
220 these files are not using the root proejct tree, so this needs
222 * gcc-interface/Make-lang.in: Update dependencies.
224 2011-08-03 Yannick Moy <moy@adacore.com>
226 * sem_ch4.adb (Analyze_Conditional_Expression): only allow boolean
227 conditional expression in ALFA.
228 * sem_res.adb (Resolve_Conditional_Expression): mark non-boolean
229 expressions as not in ALFA.
231 2011-08-03 Robert Dewar <dewar@adacore.com>
233 * a-cofove.adb: Minor reformatting.
235 2011-08-03 Emmanuel Briot <briot@adacore.com>
237 * make.adb, prj.adb, prj.ads, makeutl.adb, makeutl.ads
238 (Insert_Project_Sources, Insert_withed_Sources_For): moved from the
240 These packages are more logically placed in the Queue package, since
241 they manipulate the queue. It is also likely that they can be adapted
242 for gnatmake, thus sharing more code.
243 (Finish_Program, Fail_Program): moved from the gprbuild sources, so
244 that we could move the above.
246 2011-08-03 Emmanuel Briot <briot@adacore.com>
248 * errutil.adb (Finalize): clean up the list of error messages on exit.
249 Calling this subprogram multiple times will no longer show duplicate
250 error messages on stderr.
252 2011-08-03 Emmanuel Briot <briot@adacore.com>
254 * g-comlin.adb, g-comlin.ads (Set_Command_Line): ignore the parameter
255 Getopt_Switches when we have already define a command line
258 2011-08-03 Yannick Moy <moy@adacore.com>
260 * sem_ch11.adb (Analyze_Raise_xxx_Error): do not mark such nodes as not
261 in ALFA. Instead, they are considered as assertions to prove.
262 * sem_ch4.adb (Analyze_Conditional_Expression): do not always mark such
263 nodes as not in ALFA. Instead, include conditional expressions in ALFA
264 if they have no ELSE part, or if they occur in pre- and postconditions,
265 where the Condition cannot have side-effects in ALFA
266 (Analyze_Membership_Op): do not mark such nodes as not in ALFA
267 (Analyze_Type_Conversion): do not always mark such nodes as not in ALFA.
268 Instead, include type conversion between scalar types in ALFA.
269 * sem_ch6.adb (Process_Formals): correctly mark a parameter in ALFA
270 if-and-only-if its type is in ALFA.
272 2011-08-03 Thomas Quinot <quinot@adacore.com>
274 * scos.adb, get_scos.adb, put_scos.adb
275 New code letter for decisions: G (entry guard)
277 (Traverse_Subprogram_Body): Rename to...
278 (Traverse_Subprogram_Or_Task_Body): New subrpogram.
279 (Traverse_Protected_Body): New subprogram
280 (Traverse_Declarations_Or_Statements): Add traversal of task bodies,
281 protected bodies and entry bodies.
283 2011-08-03 Yannick Moy <moy@adacore.com>
285 * einfo.adb, einfo.ads (Is_Postcondition_Proc): new flag for procedure
286 entities with get/set subprograms, which is set on procedure entities
287 generated by the compiler for a postcondition.
288 * sem_ch6.adb (Process_PPCs): set new flag on postcondition procedures
289 * alfa.adb, alfa.ads (Get_Entity_For_Decl): new function returning the
290 entity for a declaration
291 (Get_Unique_Entity_For_Decl): new function returning an entity which
292 represents a declaration, so that matching spec and body have the same
295 2011-08-03 Robert Dewar <dewar@adacore.com>
297 * a-except-2005.adb, a-cfhama.adb, a-cfhase.adb, a-cfhase.ads,
298 a-cforma.adb, a-cforse.ads, a-cforse.adb: Minor reformatting
300 2011-08-03 Yannick Moy <moy@adacore.com>
302 * lib-xref-alfa.adb (Detect_And_Add_ALFA_Scope): make the subprogram
303 library-level because retriction No_Implicit_Dynamic_Code in the
304 front-end prevents its definition as a local subprogram
305 (Traverse_Compilation_Unit): extract new procedure from Add_ALFA_File,
306 for reuse in other contexts
307 (Traverse_Declarations_Or_Statements,
308 Traverse_Handled_Statement_Sequence, Traverse_Package_Body,
309 Traverse_Package_Declaration, Traverse_Subprogram_Body): make all these
310 procedures take a callback parameter to be called on all declarations
312 (Traverse_All_Compilation_Units): new generic function to traverse a
313 compilation unit and call a callback parameter on all declarations
315 2011-08-03 Javier Miranda <miranda@adacore.com>
317 * sem_prag.adb (Process_Interface_Name): Allow duplicated export names
318 in Java since they are always enclosed in a namespace that
319 differentiates them, and overloaded entities are supported by the VM.
321 2011-08-03 Ed Schonberg <schonberg@adacore.com>
323 * checks.adb (Determine_Range): If a computed bound of an operation is
324 outside the range of the base type of the expression, and overflow
325 checks are enabled, the result is unknown and cannot be used for any
326 subsequent constant folding.
327 * sem_eval.adb (Compile_Time_Compare): if the bounds of one operand are
328 unknown, so is the result of the comparison.
330 2011-08-03 Hristian Kirtchev <kirtchev@adacore.com>
332 * a-except-2005.adb (Raise_From_Controlled_Operation): Add new formal
333 From_Abort. When finalization was triggered by an abort, propagate
334 Standard'Abort_Signal rather than Program_Error.
335 * a-except-2005.ads (Raise_From_Controlled_Operation): Add new formal
337 * a-except.adb (Raise_From_Controlled_Operation): Add new formal
338 From_Abort. When finalization was triggered by an abort, propagate
339 Standard'Abort_Signal rather than Program_Error.
340 * a-except.ads:(Raise_From_Controlled_Operation): Add new formal
342 * exp_ch7.adb:(Build_Adjust_Or_Finalize_Statements): New local variable
343 Abort_Id. Update the calls to Build_Object_Declarations and
344 Build_Raise_Statement to include Abort_Id.
345 (Build_Adjust_Statements): New local variable Abort_Id. Update the
346 calls to Build_Object_Declarations and Build_Raise_Statement to include
348 (Build_Finalize_Statements): New local variable Abort_Id. Update the
349 calls to Build_Object_Declarations and Build_Raise_Statement to include
351 (Build_Components): Create an entity for Abort_Id when exceptions are
352 allowed on the target.
353 (Build_Finalizer): New local variable Abort_Id.
354 (Build_Initialize_Statements): New local variable Abort_Id. Update the
355 calls to Build_Object_Declarations and Build_Raise_Statement to include
357 (Build_Object_Declarations): Add new formal Abort_Id. Create the
358 declaration of flag Abort_Id to preserve the original abort status
359 before finalization code is executed.
360 (Build_Raise_Statement): Add new formal Abort_Id. Pass Abort_Id to
361 runtime routine Raise_From_Controlled_Operation.
362 (Create_Finalizer): Update the call to Build_Raise_Statement to include
363 Abort_Id. Update the call to Build_Object_Declarations to include
364 Abort_Id. Update the layout of the finalizer body.
365 (Make_Handler_For_Ctrl_Operation): Add an actual for From_Abort.
366 (Process_Transient_Objects): New local variable Abort_Id. Remove the
367 clunky code to create all flags and objects related to
368 exception propagation and replace it with a call to
369 Build_Object_Declarations. Update the call to Build_Raise_Statement to
371 * exp_ch7.ads (Build_Object_Declarations): Moved from body to spec.
372 Add new formal Abort_Id and associated comment on its use.
373 (Build_Raise_Statement): Add new formal Abort_Id and associated comment
375 * exp_intr.adb (Expand_Unc_Deallocation): New local variable Abort_Id.
376 Remove the clunky code to create all flags and objects related to
377 exception propagation and replace it with a call to
378 Build_Object_Declarations. Update the call to Build_Raise_Statement.
380 2011-08-03 Eric Botcazou <ebotcazou@adacore.com>
382 * s-tassta.adb: Fix minor typos.
384 2011-08-03 Robert Dewar <dewar@adacore.com>
386 * rtsfind.ads, makeutl.ads, prj.ads, prj.adb, make.adb,
387 lib-writ.adb, makeutl.adb, s-soflin.ads, clean.adb: Minor reformatting.
389 2011-08-03 Hristian Kirtchev <kirtchev@adacore.com>
391 * exp_ch7.adb (Create_Finalizer): Treat freeze nodes in similar fashion
392 to packages. This ensures that the finalizer body will not end up
393 inside the freeze node.
394 (Process_Declarations): Add code to detect whether a freeze node has a
395 nested finalization collection.
397 2011-08-03 Pascal Obry <obry@adacore.com>
399 * g-awk.adb, g-awk.ads: Make GNAT.AWK API compatible with Ada 2005.
400 (Current_Session): Return a not null access to Session_Type.
401 (Default_Session): Likewise.
403 2011-08-03 Robert Dewar <dewar@adacore.com>
405 * a-cfdlli.adb, bindgen.adb, exp_ch4.adb, exp_ch13.adb, sem_warn.adb,
406 exp_ch3.adb, exp_ch3.ads: Minor reformatting.
408 2011-08-03 Pascal Obry <obry@adacore.com>
410 * g-awk.ads: Minor comment fix.
412 2011-08-03 Sergey Rybin <rybin@adacore.com>
414 * tree_io.ads (ASIS_Version_Number): Update because of the changes in
415 the tree structure related to discriminant constraints.
416 Original_Discriminant cannot be used any more for computing the
417 defining name for the reference to a discriminant.
419 2011-08-03 Ed Schonberg <schonberg@adacore.com>
421 * sem_disp.adb (Is_Tag_Indeterminate): If the return type of the
422 function is not visibly tagged, this is not a dispatching call and
423 therfore is not Tag_Indeterminate, even if the function is marked as
424 dispatching on result.
426 2011-08-03 Hristian Kirtchev <kirtchev@adacore.com>
428 * exp_ch13.adb: Add with and use clauses for Restrict and Rident.
429 (Expand_N_Free_Statement): Add a guard to protect against run-times
430 which do not support controlled types.
431 * exp_ch3.adb (Expand_Freeze_Class_Wide_Type): Add a guard to protect
432 against run-times which do not support controlled types.
433 * exp_ch4.adb (Complete_Controlled_Allocation): Add a guard to protect
434 against run-times which do not support controlled types.
435 * exp_ch7.adb (Build_Finalization_Collection): Add a guard to protect
436 against run-times which do not support controlled types.
437 * exp_util.adb (Needs_Finalization): Code reformatting. Add a guard to
438 protect against run-times which do not support controlled types.
440 2011-08-03 Eric Botcazou <ebotcazou@adacore.com>
442 * exp_intr.adb: Put back with and use clauses for Exp_Ch11.
443 (Expand_Unc_Deallocation): Expand the AT_END handler at the very end.
445 2011-08-03 Ed Schonberg <schonberg@adacore.com>
447 * exp_ch5.adb (Expand_Iterator_Loop): indicate that the cursor is
448 modified in the source, to prevent spurious warnings when compiling
451 2011-08-03 Thomas Quinot <quinot@adacore.com>
453 * a-except-2005.adb: Minor reformatting.
455 2011-08-03 Ed Schonberg <schonberg@adacore.com>
457 * sem_warn.adb (Check_One_Unit): if the only mention of a withed unit
458 is a renaming declaration in the private part of a package, do not emit
459 a warning that the with_clause could be moved because the renaming may
460 be used in the body or in a child unit.
462 2011-08-03 Hristian Kirtchev <kirtchev@adacore.com>
464 * exp_ch6.adb (Make_Build_In_Place_Call_In_Object_Declaration):
465 Propagate the Comes_From_Source attribute from the original return
466 object to the renaming.
468 2011-08-03 Jose Ruiz <ruiz@adacore.com>
470 * exp_ch7.adb (Build_Raise_Statement): Do not call
471 Raise_From_Controlled_Operation when this routine is not present in
472 the run-time library.
473 (Cleanup_Protected_Object, Cleanup_Task): For restricted run-time
474 libraries (Ravenscar), tasks are non-terminating, and protected objects
475 and tasks can only appear at library level, so we do not want
476 finalization of protected objects nor tasks.
477 * exp_intr.adb: Minor clarification in comment.
478 bindgen.adb (Gen_Adainit_Ada, Gen_Main_C, Gen_Output_File_Ada,
479 Gen_Output_File_C): Remove references to finalization of library-level
480 objects when using restricted run-time libraries.
482 2011-08-03 Ed Schonberg <schonberg@adacore.com>
484 * sem_ch3.adb (Build_Discriminant_Constraints): Set
485 Original_Discriminant only if the parent type is a generic formal.
487 2011-08-03 Hristian Kirtchev <kirtchev@adacore.com>
489 * exp_ch13.adb: Add with and use clause for Targparm;
490 (Expand_N_Free_Statement): Prevent the generation of a custom
491 Deallocate on .NET/JVM targets since this requires pools and address
493 * exp_ch4.adb (Expand_Allocator_Expression): When compiling for
494 .NET/JVM targets, attach the newly allocated object to the access
495 type's finalization collection. Do not generate a call to
496 Set_Finalize_Address_Ptr on .NET/JVM because this routine does not
497 exist in the runtime.
498 (Expand_N_Allocator): When compiling for .NET/JVM targets, do not
499 create a custom Allocate for object that do not require initialization.
500 Attach a newly allocated object to the access type's finalization
501 collection on .NET/JVM.
502 * exp_ch5.adb (Make_Tag_Ctrl_Assignment): Add special processing for
503 assignment of controlled types on .NET/JVM. The two hidden pointers
504 Prev and Next and stored and later restored after the assignment takes
506 * exp_ch6.adb (Expand_Call): Add local constant Curr_S. Add specialized
507 kludge for .NET/JVM to recognize a particular piece of code coming from
508 Heap_Management and change the call to Finalize into Deep_Finalize.
509 * exp_ch7.adb (Build_Finalization_Collection): Allow the creation of
510 finalization collections on .NET/JVM only for types derived from
511 Controlled. Separate the association of storage pools with a collection
512 and only allow it on non-.NET/JVM targets.
513 (Make_Attach_Call): New routine.
514 (Make_Detach_Call): New routine.
515 (Process_Object_Declarations): Suppress the generation of
516 build-in-place return object clean up code on .NET/JVM since it uses
518 * exp_ch7.ads (Make_Attach_Call): New routine.
519 (Make_Detach_Call): New routine.
520 * exp_intr.adb Add with and use clause for Targparm.
521 (Expand_Unc_Deallocation): Detach a controlled object from a collection
523 * rtsfind.ads: Add entries RE_Attach, RE_Detach and
524 RE_Root_Controlled_Ptr to tables RE_Id and RE_Unit_Table.
525 * snames.ads-tmpl: Add name Name_Prev. Move Name_Prev to the special
526 names used in finalization.
528 2011-08-03 Hristian Kirtchev <kirtchev@adacore.com>
530 * a-fihema.adb: Add with and use clauses for System.Soft_Links.
531 (Attach, Detach): Lock the current task when chaining an object onto a
534 2011-08-03 Hristian Kirtchev <kirtchev@adacore.com>
536 * a-except.adb, a-except-2005.adb (Raise_From_Controlled_Operation):
537 Rewritten to create the message strings when the exception is not
538 raised by an abort during finalization.
539 * a-except.ads, a-except-2005.ads: Add pragma Export for procedure
540 Raise_From_Controlled_Operation and update its associated comment.
541 * a-fihema.ads, a-fihema.adb: New GNAT unit.
542 Ada.Finalization.Heap_Management provides key functionality
543 associated with controlled objects on the heap, their creation,
544 finalization and reclamation. Type Finalization_Collection is
545 effectively a wrapper which sits ontop of a storage pool and performs
546 all necessary bookkeeping for all the objects it contains. Each
547 access-to-controlled or access-to-class-wide type receives a collection
548 as part of its expansion. The compiler generates buffer code and
549 invokes Allocate / Deallocate to create and destroy allocated
551 * a-finali.adb ("="): Removed.
552 * a-finali.ads ("="): Removed. Controlled types no longer carry hidden
553 fields Prev and Next.
554 * ali.adb (Scan_ALI): Add parsing code to process PF / Has_Finalizer.
555 A library unit with at least one controlled object on the library level
556 has a special finalizer which is invoked by the binder. To signal this,
557 ali files carry field PF.
558 * ali.ads: New field in type Unit_Record called Has_Finalizer. Add
559 associated comment on field usage.
560 * a-tags.adb (Get_RC_Offset): Removed.
561 (Needs_Finalization): New routine.
562 * a-tags.ads: Update the structure of the GNAT dispatch tables.
563 Dispatch tables now carry field Needs_Finalization which provides
564 runtime indication whether a type is controlled or has controlled
565 components or both. Remove field RC_Offset.
566 (Get_RC_Offset): Removed along with its associated pragma Export.
567 Since tagged types with controlled components no longer carry hidden
568 field _controller, the special mechanism to retrieve its location is no
570 (Needs_Finalization): New routine.
571 * atree.ads, atree.adb (Elist24): New routine.
572 (Set_Elist24): New routine.
573 * atree.h: Add a define clause for Elist24.
574 * bindgen.adb New library-level variable Lib_Final_Built.
575 (Gen_Adafinal_Ada): Reimplemented. Depending on the restrictions or the
576 presence of a VM target, the routine generates calls to the proper
577 library finalization routine.
578 (Gen_Adainit_Ada): Import Finalize_Library_Objects only on non-VM
579 targets. Set the correct library finalization routine depending on
580 whether the library has controlled objects or this is a VM compilation.
581 (Gen_Finalize_Library_Ada): New routine. This procedure generates calls
582 to library-level finalizers of compiled units in reverse order of
583 elaboration. It also produces exception management code and reraises a
584 potential exception after all units have been finalized.
585 (Gen_Finalize_Library_C): New routine. This procedure generates calls to
586 library-level finalizers of compiled units in reverse order of
588 (Gen_Finalize_Library_Defs_C): New routine. This procedure generates the
589 definitions of all library-level finalizers available to the compilation
590 (Gen_Main_Ada): Directly call Adafinal which now contails all target
592 (Gen_Main_C): Add new local constant Needs_Library_Finalization. Call
593 System.Standard_Library.Adafinal directly. If the library needs
594 finalization actions, create the sequence of finalization calls.
595 (Gen_Output_File_Ada): Alphabetize local variables and constants.
596 Generate a with clause for System.Soft_Links when compiling for a VM.
597 Remove the code which imports System.Standard_Library.Adafinal as
598 Do_Finalize. Generate the library finalization routine.
599 (Gen_Output_File_C): Add new local constant Needs_Library_Finalization.
600 If the library needs finalization actions, create all the definitions
601 of library- level finalizers.
602 (Has_Finalizer): New routine. Determines whether at least one compiled
603 unit has a library-level finalizer.
604 Add type Qualification_Mode.
605 (Set_Unit_Name): Add a formal which controls the replacement of a dot.
606 * einfo.adb: New usage of field 15 as Return_Flag.
607 Remove Finalization_Chain_Entity from the usages of field 19.
608 Remove Associated_Final_Chain from the usages of field 23.
609 New usage of field 23 as Associated_Collection.
610 New usage of field 24 as Finalizer.
611 New usage of flag 252 as Is_Processed_Transient.
612 (Associated_Final_Chain): Removed.
613 (Associated_Collection): New routine.
614 (Finalization_Chain_Entity): Removed.
615 (Finalizer): New routine.
616 (Is_Finalizer): New routine.
617 (Is_Processed_Transient): New routine.
618 (Return_Flag): New routine.
619 (Set_Associated_Final_Chain): Removed.
620 (Set_Associated_Collection): New routine.
621 (Set_Finalization_Chain_Entity): Removed.
622 (Set_Finalizer): New routine.
623 (Set_Is_Processed_Transient): New routine.
624 (Set_Return_Flag): New routine.
625 (Write_Entity_Flags): Include Is_Processed_Transient to the list of
627 (Write_Field8_Name): Alphabetize the output.
628 (Write_Field11_Name): Alphabetize the output.
629 (Write_Field12_Name): Alphabetize the output.
630 (Write_Field13_Name): Alphabetize the output.
631 (Write_Field14_Name): Alphabetize the output.
632 (Write_Field15_Name): Alphabetize the output.
633 (Write_Field16_Name): Alphabetize the output.
634 (Write_Field17_Name): Alphabetize the output.
635 (Write_Field18_Name): Alphabetize the output.
636 (Write_Field19_Name): Alphabetize the output. Remove the output of
637 Finalization_Chain_Entity.
638 (Write_Field20_Name): Alphabetize the output.
639 (Write_Field21_Name): Alphabetize the output.
640 (Write_Field22_Name): Alphabetize the output.
641 (Write_Field23_Name): Alphabetize the output. Remove the output of
642 Associated_Final_Chain. Add output for Associated_Collection.
643 (Write_Field24_Name): Alphabetize the output.
644 (Write_Field25_Name): Add output for Finalizer.
645 (Write_Field26_Name): Alphabetize the output.
646 (Write_Field27_Name): Alphabetize the output.
647 (Write_Field28_Name): Alphabetize the output.
648 * einfo.ads: Add new field description for Associated_Collection and
650 Remove Associated_Final_Chain and its uses in nodes.
651 Remove Finalization_Chain_Entity and its uses in nodes.
652 Add new field description for Finalizer and its uses in nodes.
653 Add new synthesized attribute Is_Finalizer.
654 Add new flag description for Is_Processed_Transient and its uses in
656 Add new field description for Return_Flag and its uses in nodes.
657 (Associated_Final_Chain): Removed along with its pragma Inline.
658 (Associated_Collection): New routine and pragma Inline.
659 (Finalization_Chain_Entity): Removed along with its pragma Inline.
660 (Finalizer): New routine and pragma Inline.
661 (Is_Finalizer): New routine and pragma Inline.
662 (Is_Processed_Transient): New routine and pragma Inline.
663 (Return_Flag): New routine and pragma Inline.
664 (Set_Associated_Final_Chain): Removed along with its pragma Inline.
665 (Set_Associated_Collection): New routine and pragma Inline.
666 (Set_Finalization_Chain_Entity): Removed along with its pragma Inline.
667 (Set_Finalizer): New routine and pragma Inline.
668 (Set_Is_Processed_Transient): New routine and pragma Inline.
669 (Set_Return_Flag): New routine and pragma Inline.
670 * exp_aggr.adb: Alphabetize subprograms.
671 (Build_Array_Aggr_Code): Remove formal Flist and its associated comment.
672 (Build_Record_Aggr_Code): Remove formals Flist and Obj along with their
673 associated comments. Remove local variables External_Final_List and
675 Rename Ctrl_Stuff_Done to Finalization_Done. Rename local variable A to
676 Ancestor. Remove the retrieval of finalization lists. Update the call to
678 (Convert_Aggr_In_Allocator): Remove the retrieval of finalization
679 lists. Update the call to Late_Expansion.
680 (Convert_Aggr_In_Assignment): Update the call to Late_Expansion.
681 (Convert_Aggr_In_Object_Decl): Update the call to Late_Expansion.
682 (Gen_Assign): Remove the retrieval of the finalization list used to
683 build the assignment. Update the calls to Make_Init_Call and
685 (Gen_Ctrl_Actions_For_Aggr): Renamed to Generate_Finalization_Actions.
686 Remove the mechanism to determine attachment levels and finalization
687 list retrieval. Remove the processing for coextensions.
688 (Init_Controller): Removed. Controllers no longer exist.
689 (Late_Expansion): Remove formals Flist and Obj along with their
690 associated comments. Update the calls to Build_Record_Aggr_Code and
691 Build_Array_Aggr_Code.
692 * exp_ch13.adb (Expand_N_Free_Statement): New routine.
693 (Expand_N_Freeze_Entity): Add special processing for finalizers which
694 appear in entry bodies, protected subprograms and task bodies.
695 * exp_ch13.ads (Expand_N_Free_Statement): New routine.
696 * exp_ch3.adb (Add_Final_Chain): Removed.
697 (Build_Array_Init_Proc): Alphabetize local variables.
698 (Build_Assignment): Alphabetize local variables. Update the call to
700 (Build_Class_Wide_Master): Rename local variables to better reflect
702 (Build_Discriminant_Assignments): Code reformatting.
703 (Build_Init_Call_Thru): Code reformatting.
704 (Build_Init_Procedure): Code reformatting. Generate a special version
705 of Deep_Finalize which is capable of finalizing all initialized
706 components and ignore the rest.
707 (Build_Init_Statements): Rename local variables to better reflect their
709 Reimplement the mechanism to include the creation and update of an index
710 variable called a "counter". It is used as a bookmark for tracing
711 initialized and non-initialized components.
712 (Build_Initialization_Call): Remove local variable Controller_Typ.
713 Alphabetize all local variables. Remove the initialization of the
714 record controller and update the call to Make_Init_Call.
715 (Build_Record_Init_Proc): Rename formal Pe to Rec_Ent.
716 New local variable Counter.
717 (Constrain_Array): Alphabetize.
718 (Expand_Freeze_Array_Type): Create a collection instead of a
720 (Expand_Freeze_Class_Wide_Type): New routine. Creates TSS primitive
721 Finalize_Address which is used in conjunction with allocated controlled
723 (Expand_N_Object_Declaration): Remove the creation of a finalization
724 list for anonymous access types. Update the calls to Make_Init_Call and
726 (Expand_Freeze_Record_Type): Remove local variable Flist. Remove the
727 retrieval of finalization lists. Remove the expansion of the record
728 controller. Create TSS primitive Finalize_Address used in conjunction
729 with controlled objects on the heap. Create finalization collections
730 for access-to-controlled record components.
731 (Expand_Record_Controller): Removed.
732 (Freeze_Type): Remove the freezing of record controllers. Freezing of
733 class-wide types now requires additional processing. Create
734 finalization collections for access-to-controlled types.
735 (Increment_Counter): New routine.
736 (Make_Counter): New routine.
737 (Make_Eq_If): Remove the mention of Name_uController.
738 (Make_Predefined_Primitive_Specs): There is no longer need to skip
739 types coming from System.Finalization_Root.
740 (Predef_Deep_Spec): Reimplemented to reflect the new parameter profiles.
741 (Predefined_Primitive_Bodies): There is no longer need to skip types
742 coming from System.Finalization_Root.
743 (Stream_Operation_OK): Do not generate stream routines for
744 type Ada.Finalization.Heap_Management.Finalization_Collection.
745 * exp_ch3.ads: Alphabetize subprograms.
746 * exp_ch4.adb: Remove with and use clause for Sem_Ch8.
747 Add with and use clause for Lib.
748 (Complete_Coextension_Finalization): Removed.
749 (Complete_Controlled_Allocation): New routine. Create a finalization
750 collection for anonymous access-to-controlled types. Create a custom
751 Allocate which interfaces with the back end and the machinery in
753 (Expand_Allocator_Expression): Add necessary calls to
754 Complete_Controlled_Allocation. Remove the retrieval of finalization
755 lists. Update the calls to Make_Adjust_Call. Generate a call to
756 Ada.Finalization.Heap_Management.Set_Finalize_Address_Ptr to decorate
757 the associated collection.
758 (Expand_N_Allocator): Remove the processing for dynamic coextensions.
759 Code clean up. Remove the retrieval of finalization lists and
761 Update the call to Make_Init_Call. Generate a call to
762 Ada.Finalization.Heap_Management.Set_Finalize_Address_Ptr to decorate
763 the associated collection.
764 (Get_Allocator_Final_List): Removed. Finalization lists are not
766 (Suitable_Element): Remove the mention of Name_uController.
767 * exp_ch5.adb: Remove with and use clauses for Ttypes and Uintp.
768 (Make_Tag_Ctrl_Assignment): Rewritten to simply do a finalization of
769 the left hand side, carry out the assignment and adjust the left hand
771 * exp_ch6.adb (Add_Final_List_Actual_To_Build_In_Place_Call): Removed.
772 (Add_Collection_Actual_To_Build_In_Place_Call): New routine.
773 (BIP_Formal_Suffix): Rename BIP_Final_List and BIPfinallist to
774 BIP_Collection and BIPcollection.
775 (Build_Heap_Allocator): New routine used to allocate the return object
776 of a build-in-place function onto a collection.
777 (Expand_Ctrl_Function_Call): Moved from Exp_Ch7.
778 (Expand_Call): Do not replace direct calls to Deep routines with their
780 (Expand_N_Extended_Return_Statement): Give all variables shorter names
781 and update their occurrences. Add a special return flag to monitor the
782 [ab]normal execution of the function. The flag is set right before the
784 Rewrite the mechanism used to allocate a build-in-place return object
785 on the heap or on a storage pool.
786 (Is_Direct_Deep_Call): New routine.
787 (Make_Build_In_Place_Call_In_Allocator): Add a collection to a
788 build-in-place function call instead of a final list. Build a call to
789 Set_Finalize_Address_Ptr to decorate the associated collection.
790 (Make_Build_In_Place_Call_In_Anonymous_Context): Create a temporary in
791 order to name the build-in-place function call's result for later
792 finalization. Add a collection to a build-in-place function call
793 instead of a final list.
794 (Make_Build_In_Place_Call_In_Assignment): Add a collection to a
795 build-in-place function call instead of a final list. Remove the code
796 which moves one final list and transforms it into the actual in a
797 nested build-in-place call.
798 (Make_Build_In_Place_Call_In_Object_Declaration): Add a collection to a
799 build-in-place function call instead of a final list.
800 (Move_Final_List): Removed.
801 (Needs_BIP_Collection): New routine.
802 (Needs_BIP_Final_List): Removed.
803 * exp_ch6.ads: Replace BIP_Final_List with BIP_Collection in
804 enumeration type BIP_Formal_Kind.
805 Update the related comment.
806 (Needs_BIP_Collection): New routine.
807 (Needs_BIP_Final_List): Removed.
808 * exp_ch7.adb: Add with and use clauses for Elists, Exp_Ch6, Stringt
809 and Ttypes. Remove with and use clauses for Sem_Type. Alphabetize the
810 majority of subprograms in this unit. Add Name_Finalize_Address to
811 array Name_Of and TSS_Finalize_Address to array Deep_Name_Of.
812 (Build_Adjust_Or_Finalize_Statements): Create the adjust or finalization
813 statements for an array type.
814 (Build_Adjust_Statements): Create the adjust statements for a record
816 (Build_Cleanup_Statements): New routine. A procedure which given any
817 construct containing asynchronous calls, references to _master, or is a
818 task body, a task allocation or a protected body produces the necessary
819 runtime calls to clean up these constructs.
820 (Build_Exception_Handler): New routine.
821 (Build_Final_List): Removed.
822 (Build_Finalization_Collection): New routine. A core procedure which
823 creates a collection to service heap allocated controlled objects
824 associated with an access-to-controlled type.
825 (Build_Finalize_Statements): Create the finalization statements for a
827 (Build_Finalizer): New routine. A core procedure which given any
828 construct with declarations and/or statements detects all objects which
829 need any type of clean up (controlled objects, protected objects) and
830 generates all necessary code to clean up the said objects in the proper
832 (Build_Finalizer_Call): New routine.
833 (Build_Initialize_Statements): Create the initialization statements for
834 an array type. The generated routine contains code to finalize partially
836 (Build_Object_Declarations): New routine.
837 (Build_Raise_Statement): New routine.
838 (Clean_Simple_Protected_Objects): Removed.
839 (Controller_Component): Removed.
840 (Enclosing_Function): New routine.
841 (Expand_Cleanup_Actions): Create a finalizer for a construct which has
842 either declarations or statements or both.
843 (Expand_N_Package_Body): Create a finalizer for a non-generic package.
844 (Expand_N_Package_Declaration): Create a finalizer for a non-generic
846 (Find_Final_List): Removed.
847 (Global_Flist_Ref): Removed.
848 (In_Finalization_Root): Removed.
849 (Insert_Actions_In_Scope_Around): Determine the range of the transient
850 scope in terms of tree nodes. Process all transient variables within
852 (Make_Adjust_Call): Rewritten. There is no longer an attach call
853 generated after the adjust.
854 (Make_Attach_Call): Removed.
855 (Make_Call): New routine.
856 (Make_Clean): Removed.
857 (Make_Deep_Array_Body): Rewritten to simply invoke the appropriate
859 (Make_Deep_Proc): Rewritten to generate the new profile signature used
861 (Make_Deep_Record_Body): Rewritten to simply invoke the appropriate
863 (Make_Final_Call): Modified to simply create a call to either
864 Deep_Finalize or Finalize.
865 (Make_Finalize_Address_Body): New routine.
866 (Make_Finalize_Address_Stmts): New routine. A function which produces
867 TSS primitive Finalize_Address used in conjunction with heap allocated
869 (Make_Handler_For_Ctrl_Operation): Add specialized code for .NET/JVM.
870 (Make_Init_Call): Rewritten. There is no longer an attach call
871 generated after initialization.
872 (Make_Local_Deep_Finalize): New routine.
873 (Make_Set_Finalize_Address_Ptr_Call): New routine.
874 (Make_Transient_Block): Remove the finalization list retrieval and
876 (Needs_Finalization): Moved to Exp_Util.
877 (Parent_Field_Type): New routine.
878 (Preprocess_Components): New routine.
879 (Process_Transient_Objects): New routine.
880 (Wrap_HSS_In_Block): New routine.
881 (Wrap_Transient_Declaration): Remove finalization list management and
882 controller insertion.
883 (Wrap_Transient_Expression): Code reformatting.
884 (Wrap_Transient_Statement): Code reformatting.
885 * exp_ch7.ads (Build_Final_List): Removed.
886 (Build_Finalization_Collection): New routine.
887 (Build_Raise_Statement): New routine.
888 (Controller_Component): Removed.
889 (Expand_Ctrl_Function_Call): Moved to Exp_Ch6.
890 (Find_Final_List): Removed.
891 (In_Finalization_Root): Removed.
892 (Is_Simple_Protected_Type): Update related comment.
893 (Make_Adjust_Call): New parameter profile and associated comments.
894 (Make_Attach_Call): Removed.
895 (Make_Final_Call): New parameter profile and associated comments.
896 (Make_Finalize_Address_Body): New routine.
897 (Make_Init_Call): New parameter profile and associated comments.
898 (Make_Local_Deep_Finalize): New routine.
899 (Make_Set_Finalize_Address_Ptr_Call): New routine.
900 (Needs_Finalization): Moved to Exp_Util.
901 * exp_ch9.adb (Add_Object_Pointer): Code reformatting.
902 (Expand_N_Protected_Body): Remove the handling of finalization lists.
903 (Find_Protection_Type): Moved to Exp_Util.
904 * exp_disp.adb: Remove with and use clauses for Exp_Ch7.
905 (Make_DT): Update sequence of dispatch table initialization. Remove the
906 initialization of field RC_Offset. Add initialization of field Needs_
908 * exp_intr.adb (Expand_Unc_Deallocation): Code reformatting.
909 Reimplement how an object is first finalized, then deallocated.
910 * exp_strm.adb (Build_Record_Or_Elementary_Input_Function):
912 * exp_tss.ads: Add special suffix for TSS primitive Finalize_Address.
913 Register TSS_Finalize_Address with type TSS_Names.
914 * exp_util.adb (Build_Allocate_Deallocate_Proc): New routine. This core
915 procedure provides the interface between an allocation / deallocation
916 and the support machinery in Ada.Finalization.Heap_Management.
917 (Find_Init_Call): Code reformatting.
918 (Find_Init_Call_In_List): Code reformatting.
919 (Find_Protection_Type): Moved from Exp_Ch9.
920 (Find_Prim_Op): Reimplement to add preference of recovered primitive.
921 (Has_Controlled_Coextensions): Removed.
922 (Has_Controlled_Objects): New routine.
923 (In_Library_Level_Package_Body): New routine.
924 (Insert_Action_After): New routine.
925 (Is_Finalizable_Transient): New routine. This predicate determines
926 whether an object declaration is one of the many variants of controlled
928 (Is_Null_Access_BIP_Func_Call): New routine.
929 (Is_Non_BIP_Func_Call): New routine.
930 (Is_Related_To_Func_Return): New routine.
931 (Needs_Finalization): Moved from Exp_Ch7.
932 * exp_util.ads (Build_Allocate_Deallocate_Proc): New routine.
933 (Find_Protection_Type): Moved from Exp_Ch9.
934 (Has_Controlled_Coextensions): Removed.
935 (Has_Controlled_Objects): New routine.
936 (In_Library_Level_Package_Body): New routine.
937 (Insert_Action_After): New routine.
938 (Is_Finalizable_Transient): New routine.
939 (Is_Null_Access_BIP_Func_Call): New routine.
940 (Is_Non_BIP_Func_Call): New routine.
941 (Is_Related_To_Func_Return): New routine.
942 (Needs_Finalization): Moved from Exp_ch7.
943 * expander.adb (Expand): Add a case for N_Free_Statement.
944 * freeze.adb (Freeze_All): Replace the generation of a finalization
945 list with a collection for access-to-controlled types.
946 (Freeze_Entity): Code reformatting.
947 (Freeze_Record_Type): Remove the freezing of a record controller
949 (Freeze_Subprogram): Code reformatting.
950 * inline.adb (Cleanup_Scopes): Remove the reset of the scope
952 * lib-writ.adb (Write_Unit_Information): Output "PF" when a package
953 has a library-level finalizer.
954 * lib-writ.ads: Add "PF" to the sequence of unit attributes.
955 * a-filico.ads, a-filico.adb, s-finimp.ads, s-finimp.adb: Removed.
956 * Makefile.rtl: Remove a-filico and s-finimp from the list of object
957 files. Add a-fihema to the list of object files.
959 Alphabetize the associations in type Is_Parameterless_Attribute.
960 * rtsfind.ads: Ada.Finalization_List.Controller and
961 System.Finalization_Implementation are no longer a GNAT unit.
962 Update the range of type Ada_Finalization_Child. Remove the following
963 recoverable entities:
965 RE_Attach_To_Final_List
969 RE_Finalizable_Ptr_Ptr
971 RE_Limited_Record_Controller
975 RE_Simple_List_Controller
977 Add the following recoverable entities:
979 RE_Add_Offset_To_Address
983 RE_Exception_Identity
984 RE_Finalization_Collection
985 RE_Finalization_Collection_Ptr
986 RE_Needs_Finalization
987 RE_Save_Library_Occurrence
988 RE_Set_Finalize_Address_Ptr
989 RE_Set_Storage_Pool_Ptr
991 * sem_aggr.adb (Resolve_Record_Aggregate): Remove mention of
993 * sem_aux.adb (First_Discriminant): Remove mention of Name_uController.
994 (First_Stored_Discriminant): Remove the mention of Name_uController.
995 * sem_aux.ads: Comment reformatting.
996 * sem_ch10.adb (Build_Chain): Signal the class-wide creation machinery
997 to redecorate an already existing class-wide type.
998 (Decorate_Tagged_Type): New parameter profile and associated comment.
999 Create a "shadow class-wide type" for a shadow entity.
1000 * sem_ch11.adb (Analyze_Exception_Handlers): Remove the dubious setting
1001 of the final chain along with the associated comment.
1002 * sem_ch3.adb (Access_Type_Declaration): Add new local variable
1003 Full_Desig and set it to the full view of the designated type.
1004 Initialize the finalization collection to empty.
1005 (Build_Derived_Record_Type): Alphabetize local variables. Code
1007 (Collect_Fixed_Components): Remove the mention of Name_uController.
1008 (Create_Constrained_Components): Remove the mention of Name_uController.
1009 (Make_Class_Wide_Type): Add specialized code to redecorate an existing
1010 class-wide type of a shadow entity.
1011 (Process_Full_View): Update the machinery which marks type
1012 Limited_Controlled's entity as limited.
1013 * sem_ch4.adb (Analyze_One_Call): Code reformatting.
1014 * sem_ch6.adb (Create_Extra_Formals): Do not generate a finalization
1015 list, instead make a collection build-in-place formal.
1016 * sem_ch8.adb (Analyze_Object_Renaming): Look at the available view of
1017 a designated type in order to establish a match between the renaming
1018 and the renamed entity.
1019 (Find_Selected_Component): Add guard to prevent spurious exceptions
1020 from being raised on .NET/JVM.
1021 * sem_disp.adb (Check_Dispatching_Operation): Include Finalize_Address
1022 to the list of primitive that need special processing. Update arrays
1023 C_Names and D_Names.
1024 (Replace_Types): Handle class-wide types.
1025 * sem_elab.adb (Check_A_Call): Since Deep_Initialize now has a
1026 different parameter profile, look at the first formal.
1027 * sem_prag.adb: Remove with and use clauses for Exp_Ch7. Add with and
1028 use clauses for Exp_Util.
1029 * sem_res.adb: Remove with and use clauses for Elists.
1030 (Propagate_Coextensions): Removed.
1031 (Resolve_Allocator): Do not propagate the list of coextensions from one
1032 allocator to another.
1033 * sem_util.adb (Build_Actual_Subtype_Of_Component): Rename variable
1034 Deaccessed_T to Desig_Typ.
1035 (Enter_Name): Remove the mention of Name_uController.
1036 (Gather_Components): Remove the mention of Name_uController.
1037 (Incomplete_Or_Private_View): New routine.
1038 (Is_Coextension_Root): Removed.
1039 (Is_Fully_Initialized_Type): Remove the mention of Name_uController.
1040 * sem_util.ads (Incomplete_Or_Private_View): New routine.
1041 (Is_Coextension_Root): Removed.
1042 * s-finroo.ads: Remove with clause for Ada.Unchecked_Conversion.
1043 Controlled types are now derived from a null tagged record. Remove
1044 types Finalizable_Ptr, Finalizable and Empty_Root_Controlled.
1045 * sinfo.adb (Coextensions): Removed.
1046 (Set_Coextensions): Removed.
1047 * sinfo.ads: Remove Coextensions from the explanation of node fields
1048 and its uses in nodes.
1049 Update the field usage of N_Allocator.
1050 (Coextensions): Removed along with its pragma Inline.
1051 (Set_Coextensions): Removed along with its pragma Inline.
1052 * snames.ads-tmpl: Remove names
1057 Name_uLocal_Final_List
1058 Name_Finalization_Root
1065 Name_Finalize_Address
1066 * s-pooglo.adb (Allocate): Add overriding indicator.
1067 (Deallocate): Add overriding indicator.
1068 (Storage_Size): Add overriding indicator.
1069 * s-soflin.adb (Adafinal_NT): Invoke Finalize_Library_Objects rather
1070 than Finalize_Global_List.
1071 (Null_Finalize_Global_List): Removed.
1072 (Save_Library_Occurrence): New routine.
1073 * s-soflin.ads: Remove variable Finalize_Global_List along with its
1074 initialization. Add variable Finalize_Library_Objects along with its
1075 pragma Export. Add variables Library_Exception and
1076 Library_Exception_Set along with their pragma Export.
1077 (Null_Finalize_Global_List): Removed.
1078 (Save_Library_Occurrence): New routine.
1079 * s-tassta.adb (Finalize_Global_Tasks): Call Finalize_Library_Objects
1080 rather than Finalize_Global_List.
1081 * tbuild.adb (Unchecked_Convert_To): Capture and set the parent field
1082 of the constructed node.
1084 2011-08-03 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
1086 * link.c: Include "auto-host.h" before system headers.
1088 2011-08-03 Vincent Celier <celier@adacore.com>
1090 * make.adb (Gnatmake): Add to table Library_Projs only library projects
1091 that are not extended. Do not check if a library project that is
1092 extended should be regenerated. Do not add to table Library_Paths the
1093 libraries that are in extended projects. Link only with libraries that
1094 are in libray projects that are not extended.
1095 * prj-nmsc.adb (Check_Library_Attributes): Do not reset flag Library
1096 for a library project that is extended.
1098 2011-08-03 Gary Dismukes <dismukes@adacore.com>
1100 * sem_ch6.adb (Find_Corresponding_Spec): When in an instance, skip
1101 conforming subprogram renamings that appear to be completions if they
1102 are not fully conformant.
1103 Such renamings are homographs but not completions.
1104 * sem_type.adb (Disambiguate): Handle disambiguation of overloaded
1105 names in a subprogram renaming that appears in an instance.
1107 2011-08-03 Ed Schonberg <schonberg@adacore.com>
1109 * exp_util.adb (Expand_Subtype_From_Expr): if the type is limited but
1110 not immutably limited, build actual subtype from expression to provide
1111 proper bounds to caller.
1113 2011-08-03 Gary Dismukes <dismukes@adacore.com>
1115 * sem_ch8.adb: Minor comment correction.
1117 2011-08-03 Thomas Quinot <quinot@adacore.com>
1119 * exp_strm.adb (Build_Array_Input_Function): In Ada 2005 mode, when
1120 returning a limited array, use an extended return statement.
1122 2011-08-03 Vincent Celier <celier@adacore.com>
1124 * make.adb (Initialize): If --subdirs= is used, but no project file is
1125 specified, attempt to create the specify subdir if it does not already
1126 exist and use it as the object directory as if -D had been specified.
1128 2011-08-03 Arnaud Charlet <charlet@adacore.com>
1130 * s-tpopsp-vms.adb: New file.
1131 * s-taprop-vms.adb: Put back ATCB_Key, since needed by this file on VMS.
1132 * gcc-interfaces/Makefile.in: Use s-taprop-vms.adb on VMS.
1134 2011-08-03 Emmanuel Briot <briot@adacore.com>
1136 * make.adb, makeutl.adb, makeutl.ads, clean.adb (Makeutl.Queue): new
1139 2011-08-03 Yannick Moy <moy@adacore.com>
1141 * cstand.adb (Create_Standard): select Universal_Integer as an ALFA type
1142 * sem_ch3.adb (Array_Type_Declaration): detect array types in ALFA
1143 * sem_util.adb, sem_util.ads (Has_Static_Array_Bounds): new function to
1144 detect that an array has static bounds.
1146 2011-08-03 Thomas Quinot <quinot@adacore.com>
1148 * exp_dist.adb: Minor reformatting.
1150 2011-08-03 Arnaud Charlet <charlet@adacore.com>
1152 * s-taprop-irix.adb, s-taprop-hpux-dce.adb, s-taprop-vms.adb
1153 (ATCB_Key): Removed, not always used.
1155 2011-08-03 Emmanuel Briot <briot@adacore.com>
1157 * gnatcmd.adb, make.adb, prj.adb, prj.ads, makeutl.adb, makeutl.ads,
1158 clean.adb, prj-conf.adb, prj-env.adb, prj-env.ads (Makeutl): remove
1159 most remaining global variables.
1161 2011-08-03 Robert Dewar <dewar@adacore.com>
1163 * gnatcmd.adb, prj-proc.adb, mlib-prj.adb, prj.adb, makeutl.ads,
1164 prj-util.adb, prj-util.ads, prj-conf.adb, prj-env.adb: Minor
1167 2011-08-03 Javier Miranda <miranda@adacore.com>
1169 * exp_util.adb (Is_VM_By_Copy_Actual): Include N_Slide nodes as actuals
1170 that must be passed by copy in VM targets.
1172 2011-08-03 Emmanuel Briot <briot@adacore.com>
1174 * prj.ads, prj-nmsc.adb (Files_Htable): removed this htable, which
1175 duplicates a similar htable now in the project tree.
1177 2011-08-03 Claire Dross <dross@adacore.com>
1179 * a-cfdlli.adb, a-cfhama.adb, a-cfhase.adb, a-cforma.adb, a-cforse.adb,
1180 a-cofove.adb ("=", Length, Is_Empty, Clear, Assign, Copy, Element,
1181 Replace_Element, Query_Element, Update_Element, Move, Insert, Prepend,
1182 Append, Delete, Delete_First, Delete_Last, Reverse_Element, Swap,
1183 Splice, First, First_Element, Last, Last_Element, Next, Previous, Find,
1184 Reverse_Find, Contains, Has_Element, Iterate, Reverse_Iterate, Capacity,
1185 Reserve_Length, Length, Strict_Equal, Left, Right): Data-structure
1188 2011-08-03 Arnaud Charlet <charlet@adacore.com>
1190 * s-taprop-posix.adb, s-taprop-linux.adb, s-taprop-tru64.adb
1191 (ATCB_Key): Removed, not always used.
1192 * s-tpopsp-posix.adb, s-tpopsp-posix-foreign.adb (ATCB_Key): Moved from
1194 * s-tpopsp-tls.adb: New file.
1195 * gcc-interface/Makefile.in: Use TLS implementation of s-tpopsp.adb on
1196 x86/x64/ia64/powerpc/sparc Linux.
1198 2011-08-03 Arnaud Charlet <charlet@adacore.com>
1200 * system-aix.ads, system-aix64.ads: Set ZCX_By_Default to True.
1201 * gcc-interface/Makefile.in: Switch to ZCX by default on AIX ports.
1203 2011-08-03 Thomas Quinot <quinot@adacore.com>
1205 * rtsfind.ads, exp_dist.adb, exp_dist.ads
1206 (Build_From_Any_Call, Build_To_Any_Call, Build_TypeCode_Call):
1207 Fix type selection for mapping integer types to PolyORB types.
1209 2011-08-03 Bob Duff <duff@adacore.com>
1211 * sem_ch7.adb: Minor comment clarification.
1213 2011-08-03 Bob Duff <duff@adacore.com>
1215 * sem_ch13.adb (Analyze_Enumeration_Representation_Clause): If we get
1216 an error analyzing a choice, skip further processing. Further
1217 processing could cause a crash or cascade errors.
1219 2011-08-03 Emmanuel Briot <briot@adacore.com>
1221 * gnatcmd.adb, prj-proc.adb, prj-proc.ads, make.adb, mlib-prj.adb,
1222 prj.adb, prj.ads, makeutl.adb, makeutl.ads, clean.adb, prj-nmsc.adb,
1223 prj-util.adb, prj-util.ads, prj-conf.adb, prj-conf.ads, prj-env.adb,
1224 prj-env.ads (Shared_Project_Tree_Data): new type
1225 An aggregate project and its aggregated trees need to share the common
1226 data structures used for lists of strings, packages,... This makes the
1227 code simpler since otherwise we have to pass the root tree (also used
1228 for the configuration file data) in addition to the current project
1229 tree. This also avoids ambiguities as to which tree should be used.
1230 And finally this saves a bit of memory.
1231 (For_Every_Project_Imported): new parameter Tree.
1232 Since aggregated projects are using a different tree, we need to let
1233 the caller know which tree to use to manipulate the returned project.
1235 2011-08-03 Robert Dewar <dewar@adacore.com>
1237 * prj-proc.adb, exp_util.ads, exp_ch9.adb, make.adb, prj-ext.adb,
1238 prj-ext.ads, alfa.ads, sem_ch4.adb, makeutl.adb, makeutl.ads,
1239 lib-xref-alfa.adb, sem_cat.adb, exp_dist.adb, get_alfa.adb,
1240 prj-env.adb, prj-env.ads, prj-tree.adb, alfa.ads: Minor reformatting.
1242 2011-08-03 Javier Miranda <miranda@adacore.com>
1244 * exp_util.adb, sem_aux.adb, exp_util.ads, sem_aux.ads:
1245 Move routine Is_VM_By_Copy_Actual from sem_aux to exp_util.
1247 2011-08-03 Bob Duff <duff@adacore.com>
1249 * sem_ch8.adb (Is_Primitive_Operator_In_Use): Always check In_Use on
1252 2011-08-03 Joel Brobecker <brobecker@adacore.com brobecker>
1254 * g-sha256.ads, g-sha512.ads, g-sha1.ads, g-sha224.ads, g-sha384.ads,
1255 g-sehash.ads: Fix typo. Update header.
1257 2011-08-03 Thomas Quinot <quinot@adacore.com>
1259 * exp_ch6.adb (Expand_Actuals): Remove Ada_2005 guard on build-in-place
1262 2011-08-03 Gary Dismukes <dismukes@adacore.com>
1264 * sem_ch4.adb (Analyze_Overloaded_Selected_Component): Consider
1265 prefixes of private types along with records, since the selector may be
1267 * sem_res.adb (Resolve_Selected_Component): Consider prefixes of
1268 private types along with records, since the selector may be a
1271 2011-08-03 Emmanuel Briot <briot@adacore.com>
1273 * prj-pp.adb (Pretty_Print): remove trailing blank line in the file
1275 2011-08-03 Javier Miranda <miranda@adacore.com>
1277 * sem_aux.adb (Is_VM_By_Copy_Actual): Fix wrong use of
1278 Tagged_Type_Expansion.
1280 2011-08-03 Yannick Moy <moy@adacore.com>
1283 (Resolve_Op_Concat_Arg): do not issue a SPARK violation when argument of
1284 concatenation is the name of a constant
1286 2011-08-03 Emmanuel Briot <briot@adacore.com>
1288 * prj-proc.adb, prj-ext.adb, prj-ext.ads, prj-env.adb, prj-env.ads,
1289 prj-tree.adb, prj-tree.ads (Initialize_And_Copy, Copy): new subprograms
1290 (Process_Declarative_Items): new parameter Child_Env.
1292 2011-08-03 Yannick Moy <moy@adacore.com>
1294 * alfa.ads Update format of ALFA section in ALI file in order to add a
1295 mapping from bodies to specs when both are present
1296 (ALFA_Scope_Record): add components for spec file/scope
1297 * get_alfa.adb (Get_ALFA): read the new file/scope for spec when present
1299 (Collect_ALFA): after all scopes have been collected, fill in the spec
1300 information when relevant
1301 * put_alfa.adb (Put_ALFA): write the new file/scope for spec when
1304 2011-08-03 Eric Botcazou <ebotcazou@adacore.com>
1306 * inline.adb (Add_Inlined_Subprogram): Do not consider the enclosing
1307 code unit to decide whether to add internally generated subprograms.
1309 2011-08-03 Javier Miranda <miranda@adacore.com>
1311 * sem_aux.ads, sem_aux.adb (Is_VM_By_Copy_Actual): New subprogram.
1313 (Build_Simple_Entry_Call): Handle actuals that must be handled by copy
1316 2011-08-03 Emmanuel Briot <briot@adacore.com>
1318 * make.adb, makeutl.adb, makeutl.ads (Make.Switches_Of): now shares
1319 code with Makeutl.Get_Switches.
1320 * prj-tree.adb: Update comment.
1322 2011-08-03 Thomas Quinot <quinot@adacore.com>
1324 * sem_cat.adb (Validate_RCI_Subprogram_Declaration): Reject a remote
1325 subprogram with a limited formal that does not support external
1328 2011-08-03 Yannick Moy <moy@adacore.com>
1330 * get_alfa.adb (Get_ALFA): add missing Skip_Spaces at start of
1332 * lib-xref-alfa.adb (Add_ALFA_File): split removal of scopes that are
1333 not from current unit in two phases, because it is not possible to
1334 change the table while iterating over its content.
1335 * put_alfa.adb (Put_ALFA): reset current file/scope at each new entity
1337 2011-08-03 Sergey Rybin <rybin@adacore.com>
1339 * vms_data.ads: Add qualifier for gnatmetric --no-static-loop option
1340 * gnat_ugn.texi: Update description of complexity metrics (gnatmetric)
1342 2011-08-03 Ed Schonberg <schonberg@adacore.com>
1344 * sem_res.adb (Resolve_Op_Concat_Arg): if the argument is an aggregate
1345 and the component type is composite, this is ambiguous for predefined
1346 concatenation, but if the node is not overloaded and the entity is a use
1347 -defined function its profile can be used to resolve that aggregate.
1349 2011-08-03 Robert Dewar <dewar@adacore.com>
1351 * exp_ch4.adb: Minor code cleanup.
1353 2011-08-03 Thomas Quinot <quinot@adacore.com>
1355 * exp_dist.adb: Do not generate distribution stubs if serious errors
1356 have been diagnosed.
1358 2011-08-03 Ed Schonberg <schonberg@adacore.com>
1360 * sem_ch4.adb (Try_Primitive_Operation): when checking the validity of
1361 the first formal of a primitive operation, go to the base type to
1362 handle properly an access to a derived type with constrained
1364 * sem_type.adb (Disambiguate): an immediately visible operator hides a
1365 user-defined function that is only use-visible.
1367 2011-08-03 Robert Dewar <dewar@adacore.com>
1369 * sem_aggr.adb, sem_ch3.adb, lib.ads, gnatcmd.adb, prj-proc.adb,
1370 make.adb, lib-writ.adb, prj-part.adb, prj-part.ads, prj-ext.adb,
1371 fname-uf.adb, prj-ext.ads, prj.adb, prj.ads, sem_attr.adb, alfa.adb,
1372 prj-makr.adb, errout.adb, makeutl.adb, makeutl.ads, restrict.ads,
1373 sem_ch6.adb, g-pehage.adb, clean.adb, put_alfa.adb, lib-xref-alfa.adb,
1374 prj-nmsc.adb, prj-nmsc.ads, sem_ch8.adb, prj-pars.ads, exp_aggr.adb,
1375 prj-attr.ads, sem_ch13.adb, get_alfa.adb, prj-env.adb, prj-env.ads,
1376 alfa_test.adb, prj-tree.adb, prj-tree.ads, einfo.ads: Minor reformatting
1378 2011-08-03 Robert Dewar <dewar@adacore.com>
1380 * repinfo.adb (List_Mechanism): Add handling of
1381 Convention_Ada_Pass_By_XXX.
1382 * sem_mech.adb (Set_Mechanism): Ditto.
1383 * sem_prag.adb (Process_Convention): Add entries for
1384 Convention_Ada_Pass_By_XXX.
1385 * snames.adb-tmpl, snames.ads-tmpl: Ditto.
1387 2011-08-03 Pascal Obry <obry@adacore.com>
1389 * makeutl.adb: Minor reformatting.
1391 2011-08-03 Vincent Celier <celier@adacore.com>
1394 (Get_File_Name) If the file cannot be found when there are no config
1395 pragmas file and May_Fail is True, return No_File instead of the file
1396 name, to be consistent.
1398 2011-08-03 Pascal Obry <obry@adacore.com>
1400 * adaint.c (__gnat_is_executable_file_attr): Avoid access
1403 2011-08-03 Javier Miranda <miranda@adacore.com>
1406 (Same_Representation): In VM targets the representation of arrays with
1407 aliased components differs from arrays with non-aliased components.
1409 2011-08-03 Emmanuel Briot <briot@adacore.com>
1411 * prj-proc.adb, prj-attr.adb, prj-attr.ads (Get_Attribute_Index): do
1412 not systematically lower case attribute indexes that contain no "."
1413 Fix definition of several Naming attributes, which take
1414 a unit name as index and therefore should be case insensitive.
1415 Minor refactoring (reduce length of variable names).
1417 2011-08-03 Emmanuel Briot <briot@adacore.com>
1419 * makeutl.adb, makeutl.ads (Get_Switches): new subprogram.
1421 2011-08-03 Emmanuel Briot <briot@adacore.com>
1423 * gnatcmd.adb, prj-proc.adb, prj-proc.ads, make.adb, prj-part.adb,
1424 prj-part.ads, switch-m.adb, switch-m.ads, prj-makr.adb, clean.adb,
1425 prj-pars.adb, prj-pars.ads, prj-conf.adb, prj-conf.ads, prj-tree.adb,
1426 prj-tree.ads (Prj.Tree.Environment): new type.
1428 2011-08-03 Emmanuel Briot <briot@adacore.com>
1430 * prj-proc.adb, prj.ads, makeutl.adb, makeutl.ads, prj-conf.adb,
1431 prj-tree.adb, prj-tree.ads (Environment): new type.
1433 2011-08-03 Emmanuel Briot <briot@adacore.com>
1435 * prj-tree.ads: Remove unused variable.
1437 2011-08-03 Yannick Moy <moy@adacore.com>
1439 * restrict.adb (Restriction_Msg): set "SPARK" all in upper case for
1440 issuing messages related to SPARK restriction violation.
1442 2011-08-03 Ed Schonberg <schonberg@adacore.com>
1444 * sem_ch6.adb: guard against error nodes in return statements.
1446 2011-08-03 Arnaud Charlet <charlet@adacore.com>
1448 * errout.adb (Error_Msg_Internal): the main unit has not been read yet,
1449 a warning can only appear on a configuration file, so emit warning
1450 without further checks.
1452 2011-08-03 Arnaud Charlet <charlet@adacore.com>
1454 * s-interr.ads: add overriding keyword.
1456 2011-08-03 Geert Bosch <bosch@adacore.com>
1458 * exp_attr.adb: Fix minor typo.
1460 2011-08-03 Ed Schonberg <schonberg@adacore.com>
1462 * par-ch4.adb: improve error recovery.
1464 2011-08-03 Emmanuel Briot <briot@adacore.com>
1466 * prj-part.adb, prj-part.ads, prj-makr.adb, prj-pars.adb, prj-conf.adb,
1467 prj-env.adb (Prj.Part.Parse): change parameter Always_Errout_Finalize
1470 2011-08-03 Emmanuel Briot <briot@adacore.com>
1472 * prj-dect.adb (Parse_Attribute_Declaration): make sure we can use
1473 "external" as an attribute name in aggregate projects.
1475 2011-08-03 Jose Ruiz <ruiz@adacore.com>
1477 * s-taprop-vxworks.adb: (Create_Task, Initialize): Ada 2012 pragma CPU
1478 uses CPU numbers starting 1, while VxWorks uses CPU numbers starting
1479 from 0, so we need to adjust.
1481 2011-08-03 Emmanuel Briot <briot@adacore.com>
1483 * prj-proc.adb, prj-ext.adb, prj-ext.ads, makeutl.adb, prj-tree.adb,
1484 prj-tree.ads, gnatcmd.adb, clean.adb (External_References): new type.
1486 2011-08-03 Yannick Moy <moy@adacore.com>
1488 * sem_ch6.adb (New_Overloaded_Entity): only issue error for SPARK
1489 restriction on overloaded entity if the entity is not an operator.
1491 2011-08-03 Yannick Moy <moy@adacore.com>
1493 * sem_ch7.adb, sem_res.adb, sem_attr.adb, restrict.adb,
1494 restrict.ads: Rename remaining Check_Formal_Restriction* into
1495 Check_SPARK_Restriction*.
1497 2011-08-03 Emmanuel Briot <briot@adacore.com>
1499 * prj-proc.adb, prj-part.adb, prj.adb, prj.ads, prj-nmsc.adb,
1500 prj-nmsc.ads, prj-err.adb (Project_Data): now discriminated on its
1502 (Project_Empty): removed
1503 (Empty_Project): new parameter Qualifier
1504 This is used to have fields specific to aggregate projects, cleaner
1505 New field to store the list of aggregated projects.
1506 (Check_Aggregate_Project): removed
1507 (Process_Aggregated_Projects, Free): new subprograms.
1509 2011-08-03 Olivier Hainque <hainque@adacore.com>
1511 * tracebak.c (STOP_FRAME ppc AIX): Stop at null return address as well.
1513 2011-08-03 Ed Schonberg <schonberg@adacore.com>
1515 * sem_ch8.adb (Analyze_Object_Renaming): if the renamed object is an
1516 explicit dereference of an unconstrained type, create a constrained
1517 subtype for it, as is done for function calls that return an
1520 2011-08-03 Thomas Quinot <quinot@adacore.com>
1522 * g-pehage.adb (Finalize): Avoid possible double-free.
1524 2011-08-03 Steve Baird <baird@adacore.com>
1526 * exp_attr.adb (Expand_N_Attribute_Reference): Don't expand
1527 Elab_Spec/Body attrs in CodePeer_Mode.
1529 2011-08-03 Javier Miranda <miranda@adacore.com>
1531 * exp_aggr.adb (Flatten): Convert to positional form aggregates whose
1532 low bound is not known at compile time but they have no others choice.
1533 Done because in this case the bounds can be obtained directly from the
1536 2011-08-03 Ed Falis <falis@adacore.com>
1538 * s-tasinf-vxworks.ads: Update comment to reflect 0 indexing of CPUs
1539 on VxWorks SMP. Remove unusable constant ANY_CPU.
1541 2011-08-03 Emmanuel Briot <briot@adacore.com>
1543 * gnatcmd.adb, make.adb, prj-part.adb, prj-part.ads, prj-makr.adb,
1544 clean.adb, prj-nmsc.adb, prj-pars.adb, prj-conf.adb, prj-env.adb,
1545 prj-env.ads (Prj.Env.Initialize_Default_Project_Path,
1546 Prj.Env.Initialize_Empty): new subprograms
1547 (Get_Env, Find_Project): remove parameter Target_Name.
1549 2011-08-03 Gary Dismukes <dismukes@adacore.com>
1551 * sem_ch3.adb (Build_Derived_Record_Type): Test the Derive_Subps formal
1552 as a condition for the delayed call to Derived_Subprograms done for the
1553 case of the rewriting of a derived type that constrains the
1554 discriminants of its parent type.
1555 Avoids redundant subprogram derivations for private subtype derivations.
1557 2011-08-03 Javier Miranda <miranda@adacore.com>
1559 * exp_aggr.adb (Init_Hidden_Discriminants): New subprogram of
1560 Build_Record_Aggr_Code.
1561 (Build_Record_Aggr_Code): Add missing support to initialize hidden
1562 discriminants in extension aggregates.
1564 2011-08-03 Emmanuel Briot <briot@adacore.com>
1566 * prj-pp.adb (Print): also output project qualifiers, since in
1567 particular "aggregate" is mandatory in an aggregate project.
1569 2011-08-03 Emmanuel Briot <briot@adacore.com>
1571 * prj-part.adb, prj.adb, prj.ads, prj-nmsc.adb, prj-env.adb:
1572 (Debug_Output): new function.
1574 2011-08-03 Eric Botcazou <ebotcazou@adacore.com>
1576 * gnat_ugn.texi: Document -Wstack-usage.
1577 * gcc-interface/misc.c (enumerate_modes): Add guard for ghost FP modes.
1579 2011-08-03 Thomas Quinot <quinot@adacore.com>
1581 * sem_prag.adb Issue an error (not a warning) when a C++ type does not
1582 have keyword LIMITED.
1584 2011-08-03 Yannick Moy <moy@adacore.com>
1586 * alfa.adb, alfa.ads, alfa_test.adb: New files.
1587 * ali.adb (Known_ALI_Lines): add 'C' lines (SCO) and 'F' lines (ALFA)
1588 (Scan_ALI): do not issue a fatal error if parsing known lines after Xref
1589 section (does not happen in compiler, only if code directly calls
1591 * get_alfa.adb, get_alfa.ads: New files.
1592 * lib-writ.adb, lib-writ.ads (Write_ALI): output ALFA information if
1594 * lib-xref-alfa.adb: New file.
1595 * lib-xref.adb, lib-xref.ads
1596 (Xref_Entry): redefine information needed in cross-references for ALFA.
1597 Push ALFA treatments in separated local package.
1598 (Enclosing_Subpragram_Or_Package): treat specially subprogram
1599 identifiers. Return entity of package body instead of spec. Return
1600 Empty for a scope with no location.
1601 (Generate_Reference): adapt to new components for ALFA information.
1602 Remove the need for D references on definitions.
1603 (Is_Local_Reference): moved to ALFA local package
1604 (Output_References): extract subfunction as Extract_Source_Name
1605 (Output_Local_References): remove procedure, replaced by filtering of
1606 cross-references in package ALFA and printing in Put_ALFA.
1607 (Write_Entity_Name): remove procedure
1608 * lib.adb, lib.ads (Extract_Source_Name): extract here function to
1609 print exact name of entity as it appears in source file
1610 (Unit_Ref_Table): make type public for use in Lib.Xref.ALFA
1611 * put_alfa.adb, put_alfa.ads: New files.
1612 * xref_lib.adb (Search_Xref): protect read of cross-references against
1613 reading other sections of the ALI file, in gnatxref
1614 (Search): protect read of cross-references against reading other
1615 sections of the ALI file, in gnatfind.
1616 * gcc-interface/Make-lang.in: Update dependencies.
1618 2011-08-03 Thomas Quinot <quinot@adacore.com>
1620 * sem_ch3.adb: Minor reformatting.
1622 2011-08-03 Jose Ruiz <ruiz@adacore.com>
1624 * s-inmaop-vxworks.adb (Setup_Interrupt_Mask): Do nothing instead of
1625 raising an exception.
1627 2011-08-03 Ed Schonberg <schonberg@adacore.com>
1629 * sem_res.adb (Set_String_Literal_Subtype): if index type is an integer
1630 type, always use 1 as the lower bound or string, even if lower bound of
1631 context is not static, to handle properly null strings in a non-static
1634 2011-08-03 Bob Duff <duff@adacore.com>
1636 * sem_prag.adb (Resolve_Aggregate): An array aggregate with 'others' is
1637 always legal on the right-hand side of an assignment statement; there
1638 is always an applicable index constraint in this case. Therefore, the
1639 check for Pkind = N_Assignment_Statement is now unconditional -- it
1640 doesn't depend on whether Is_Constrained (Typ).
1642 2011-08-03 Robert Dewar <dewar@adacore.com>
1644 * exp_ch5.adb, sem_prag.adb, exp_ch4.adb: Minor reformatting.
1646 2011-08-03 Ed Schonberg <schonberg@adacore.com>
1648 * sem_ch3.adb (Build_Itype_Reference): do not create an itype reference
1649 for an itype created within a generic unit.
1651 2011-08-03 Eric Botcazou <ebotcazou@adacore.com>
1653 * gnat_ugn.texi (Switches for gcc): Make it clearer that -fno-inline
1654 suppresses all inlining.
1656 2011-08-03 Robert Dewar <dewar@adacore.com>
1658 * sem_ch3.adb, sem_res.adb, exp_ch13.adb, exp_disp.adb,
1659 exp_aggr.adb: Minor reformatting.
1661 2011-08-03 Thomas Quinot <quinot@adacore.com>
1663 * exp_ch5.adb (Expand_N_Assignment_Statement): Do not force inlining of
1664 tagged assignment when discriminant checks are suppressed. This is
1665 useless and extremely costly in terms of static stack usage.
1667 2011-08-03 Bob Duff <duff@adacore.com>
1669 * sem_prag.adb (Get_Base_Subprogram): Do not follow Alias for instances
1670 of generics, because this leads to the wrong entity in the wrong scope,
1671 causing (e.g.) pragma Export_Procedure to get an error if the entity is
1673 (Process_Interface_Name): Follow Alias for instances of generics, to
1674 correct for the above change.
1676 2011-08-03 Ed Schonberg <schonberg@adacore.com>
1678 * exp_ch4.adb (Expand_N_Selected_Component): If the discriminant value
1679 is an integer literal it is always safe to replace the reference. In
1680 addition, if the reference appears in the generated code for an object
1681 declaration it is necessary to copy because otherwise the reference
1682 might be to the uninitilized value of the discriminant of the object
1685 2011-08-03 Pascal Obry <obry@adacore.com>
1687 * adaint.c (__gnat_is_executable_file_attr): Fix Win32 circuitry when no
1688 ACL used, in this case we want to check for ending .exe, not .exe
1689 anywhere in the path.
1691 2011-08-03 Sergey Rybin <rybin@adacore.com>
1693 * tree_io.ads (ASIS_Version_Number): Update because of the changes in
1694 the tree structure (semantic decoration of references to record
1697 2011-08-03 Gary Dismukes <dismukes@adacore.com>
1699 * sem_aggr.adb (Analyze_Array_Aggregate): When checking the discrete
1700 choices of a named array aggregate, bail out when any choices are
1701 marked as Errors_Posted.
1703 2011-08-03 Ed Schonberg <schonberg@adacore.com>
1705 * exp_ch13.adb (Expand_N_Freeze_Entity): cleanup determination of scope
1706 in which entity is frozen, to handle properly loop variables in
1709 2011-08-03 Ed Schonberg <schonberg@adacore.com>
1711 * sem_res.adb (Set_String_Literal_Subtype): if the lower bound of the
1712 subtype is not static, compute the upper bound using attributes, to
1713 handle properly index types that are not integer types.
1715 2011-08-03 Bob Duff <duff@adacore.com>
1717 * gnat_rm.texi, gnat_ugn.texi: Fix some dangling URLs.
1718 Update copyright notice.
1720 2011-08-03 Ed Schonberg <schonberg@adacore.com>
1722 * sem_ch3.adb (Build_Discriminant_Constraints): Only use
1723 Original_Discriminant if within an instance.
1724 * sem_ch4.adb (Analyze_Selected_Component): Ditto.
1726 2011-08-03 Thomas Quinot <quinot@adacore.com>
1728 * einfo.ads: Minor reformatting.
1730 2011-08-03 Ed Schonberg <schonberg@adacore.com>
1732 * exp_disp.adb (Check_Premature_Freezing): diagnose the presence of a
1733 composite type with an unfrozen subcomponent, in the profile of a
1734 primitive operation.
1736 2011-08-03 Robert Dewar <dewar@adacore.com>
1738 * sem_util.ads, exp_aggr.adb, exp_ch3.adb: Minor reformatting.
1740 2011-08-03 Ed Schonberg <schonberg@adacore.com>
1742 * sem_ch3.adb (Analyze_Object_Declaration): if a constant object of an
1743 unconstrained type with discriminants is initialized with an aggregate,
1744 use the constrained subtype of the aggregate as the type of the object,
1745 because it is immutable, and this allows the back-end to generate no
1746 code for the object declaration.
1748 2011-08-03 Robert Dewar <dewar@adacore.com>
1750 * exp_ch4.adb (Optimize_Length_Check): Fix bad handling of case where
1751 comparison operand is variable, and turns out to be zero or negative.
1753 2011-08-03 Javier Miranda <miranda@adacore.com>
1756 (Expand_Dispatching_Constructor_Call): Disable expansion of
1757 code required for native targets. Done to avoid generating
1758 references to unavailable runtime entities in VM targets.
1760 (Expand_N_Object_Declaration): Add missing support to handle
1761 the explicit initialization of class-wide interface objects.
1764 2011-08-03 Matthew Heaney <heaney@adacore.com>
1766 * a-cobove.adb (Merge): Move source onto target, instead of using Assign
1768 2011-08-03 Matthew Heaney <heaney@adacore.com>
1770 * a-cbdlli.adb (Splice): move source items from first to last
1772 2011-08-03 Yannick Moy <moy@adacore.com>
1774 * sem_util.ads: comment added.
1776 2011-08-03 Javier Miranda <miranda@adacore.com>
1779 (Expand_Record_Aggregate): In VM targets disable the expansion into
1780 assignments of aggregates whose type is not known at compile time.
1782 2011-08-03 Ed Schonberg <schonberg@adacore.com>
1784 * exp_ch9.adb (Build_Renamed_Formal_Declaration): common procedure for
1785 protected entries and task entries, to build the proper renaming
1786 declaration for entry formals, used in debugging.
1787 * exp_ch2.adb (Expand_Entry_Parameter): handle task and entry
1788 parameters in the same way.
1790 2011-08-02 Robert Dewar <dewar@adacore.com>
1792 * a-direct.adb, sinfo.ads, exp_ch9.adb, scng.adb, sem_util.adb,
1793 sem_util.ads, restrict.ads, par-prag.adb: Minor reformatting and/or
1794 code reorganization.
1796 2011-08-02 Robert Dewar <dewar@adacore.com>
1798 * debug.adb: Debug flag d.P to suppress length comparison optimization
1799 * exp_ch4.adb (Optimize_Length_Comparison): New routine to optimize
1800 comparison of Length by comparing First/Last instead.
1802 2011-08-02 Matthew Heaney <heaney@adacore.com>
1804 * a-cobove.ads: Code clean up.
1806 2011-08-02 Vincent Celier <celier@adacore.com>
1808 * adaint.c (file_names_case_sensitive_cache): New static int.
1809 (__gnat_get_file_names_case_sensitive): Cache the return value in
1810 file_names_case_sensitive_cache at the first invocation, to avoid
1811 multiple calls to getenv.
1813 2011-08-02 Bob Duff <duff@adacore.com>
1815 * sem_ch12.adb (Validate_Derived_Type_Instance): Implement AI05-0218-1.
1817 2011-08-02 Yannick Moy <moy@adacore.com>
1819 * sem_ch3.adb, sem_ch5.adb, sem_ch9.adb, sem_prag.adb, sem.ads,
1820 sem_util.adb, sem_util.ads, sem_res.adb, sem_ch2.adb, sem_ch4.adb,
1821 sem_ch6.adb, sem_ch11.adb: Add semantic flag In_Pre_Post_Expression to
1822 indicate that we are in a precondition or postcondition. This is used in
1823 Mark_Non_ALFA_Subprogram (renaming of Mark_Non_ALFA_Subprogram_Body) to
1824 decide whether to flag the spec or body of the current subprogram as
1827 2011-08-02 Fabien Chouteau <chouteau@adacore.com>
1829 * impunit.adb: Add Ada.Execution_Time.Interrupts in the Ada2012 package
1831 * a-extiin.ads: New file.
1833 2011-08-02 Bob Duff <duff@adacore.com>
1835 * a-direct.adb (Rename): Implement AI05-0231-1. In particular, Rename
1836 now raises Name_Error instead of Use_Error in certain cases. The other
1837 parts of this AI were already implemented properly.
1839 2011-08-02 Vincent Celier <celier@adacore.com>
1841 * link.c: Only import "auto-host.h" when building the gnattools.
1843 2011-08-02 Yannick Moy <moy@adacore.com>
1845 * sem_util.adb: Inter-unit inlining does not work for a subprogram
1846 which calls a local subprogram, so extract subprogram
1847 from Mark_Non_ALFA_Subprogram_Body.
1849 2011-08-02 Javier Miranda <miranda@adacore.com>
1852 (Extract_Dispatching_Call): If the type of the dispatching object is an
1853 access type then return an explicit dereference in the Object out-mode
1856 2011-08-02 Gary Dismukes <dismukes@adacore.com>
1858 * sem_ch3.adb (Analyze_Subtype_Declaration): Generate range
1859 compatibility checks for all indexes of an array subtype, not just the
1860 first. Reset Has_Dynamic_Range_Check on the subtype before each
1861 potential check to ensure that Insert_Range_Checks will not elide any
1862 of the dynamic checks.
1864 2011-08-02 Yannick Moy <moy@adacore.com>
1866 * par-prag.ad (Process_Restrictions_Or_Restriction_Warnings): recognize
1867 SPARK restriction at parsing time.
1868 * scng.adb (Scan): Generate a token Tok_SPARK_Hide for a SPARK HIDE
1869 directive only if the SPARK restriction is set for this unit.
1871 2011-08-02 Yannick Moy <moy@adacore.com>
1873 * sem_ch3.adb, sem_ch5.adb, sem_ch9.adb, sem_util.adb, sem_util.ads,
1874 sem_res.adb, sem_ch2.adb, sem_ch4.adb, sem_ch6.adb,
1875 sem_ch11.adb: Protect call to Current_Subprogram which might be costly
1876 when repeated. Rename Current_Subprogram_Is_Not_In_ALFA into
1877 Mark_Non_ALFA_Subprogram_Body.
1878 Split body of Mark_Non_ALFA_Subprogram_Body to get body small and
1881 2011-08-02 Yannick Moy <moy@adacore.com>
1883 * sem_res.adb: Protect calls to Matching_Static_Array_Bounds which
1886 2011-08-02 Robert Dewar <dewar@adacore.com>
1888 * exp_ch9.adb, exp_sel.adb, restrict.ads, exp_disp.adb, erroutc.ads,
1889 exp_ch3.adb: Minor reformatting.
1891 2011-08-02 Emmanuel Briot <briot@adacore.com>
1893 * adaint.c (__gnat_locate_exec_on_path): only returns executable
1894 files, not any regular file.
1895 (__gnat_locate_file_with_predicate): new subprogram.
1897 2011-08-02 Yannick Moy <moy@adacore.com>
1899 * sinfo.adb, sinfo.ads: Restrict the use of flags
1900 Has_Dynamic_Length_Check and Has_Dynamic_Range_Check to expression
1901 nodes, plus N_Subtype_Declaration for the 2nd one.
1903 2011-08-02 Sergey Rybin <rybin@adacore.com>
1905 * gnat_rm.texi: Ramification of pragma Eliminate documentation
1906 - fix bugs in the description of Source_Trace;
1907 - get rid of UNIT_NAME;
1909 2011-08-02 Javier Miranda <miranda@adacore.com>
1912 (Build_Dispatching_Requeue): Adding support for VM targets
1913 since we cannot directly reference the Tag entity.
1914 * exp_sel.adb (Build_K): Adding support for VM targets.
1915 (Build_S_Assignment): Adding support for VM targets.
1917 (Default_Prim_Op_Position): In VM targets do not restrict availability
1918 of predefined interface primitives to compiling in Ada 2005 mode.
1919 (Is_Predefined_Interface_Primitive): In VM targets this service is not
1920 restricted to compiling in Ada 2005 mode.
1921 (Make_VM_TSD): Generate code that declares and initializes the OSD
1922 record. Needed to support dispatching calls through synchronized
1925 (Make_Predefined_Primitive_Specs): Enable generation of predefined
1926 primitives associated with synchronized interfaces.
1927 (Make_Predefined_Primitive_Bodies): Enable generation of predefined
1928 primitives associated with synchronized interfaces.
1930 2011-08-02 Yannick Moy <moy@adacore.com>
1932 * par-ch11.adb (P_Handled_Sequence_Of_Statements): mark a sequence of
1933 statements hidden in SPARK if preceded by the HIDE directive
1934 (Parse_Exception_Handlers): mark each exception handler in a sequence of
1935 exception handlers as hidden in SPARK if preceded by the HIDE directive
1936 * par-ch6.adb (P_Subprogram): mark a subprogram body hidden in SPARK
1937 if starting with the HIDE directive
1938 * par-ch7.adb (P_Package): mark a package body hidden in SPARK if
1939 starting with the HIDE directive; mark the declarations in a private
1940 part as hidden in SPARK if the private part starts with the HIDE
1942 * restrict.adb, restrict.ads
1943 (Set_Hidden_Part_In_SPARK): record a range of slocs as hidden in SPARK
1944 (Is_In_Hidden_Part_In_SPARK): new function which returns whether its
1945 argument node belongs to a part which is hidden in SPARK
1946 (Check_SPARK_Restriction): do not issue violations on nodes in hidden
1947 parts in SPARK; protect the possibly costly call to
1948 Is_In_Hidden_Part_In_SPARK by a check that the SPARK restriction is on
1949 * scans.ads (Token_Type): new value Tok_SPARK_Hide in enumeration
1950 * scng.adb (Accumulate_Token_Checksum_GNAT_6_3,
1951 Accumulate_Token_Checksum_GNAT_5_03): add case for new token
1953 (Scan): recognize special comment starting with '#' and followed by
1954 SPARK keyword "hide" as a HIDE directive.
1956 2011-08-02 Yannick Moy <moy@adacore.com>
1958 * types.ads, erroutc.ads: Minor reformatting.
1960 2011-08-02 Vincent Celier <celier@adacore.com>
1962 * link.c: Add response file support for cross platforms.
1964 2011-08-02 Ed Schonberg <schonberg@adacore.com>
1966 * sem_aggr.adb (Resolve_Array_Aggregate): when copying the expression
1967 in an association, set parent field of copy before partial analysis.
1968 * sem_res.adb (Resolve_Slice): create reference to itype only when
1969 expansion is enabled.
1971 2011-08-02 Yannick Moy <moy@adacore.com>
1973 * einfo.adb, einfo.ads (Body_Is_In_ALFA, Set_Body_Is_In_ALFA): get/set
1974 for new flag denoting which subprogram bodies are in ALFA
1975 * restrict.adb, sem_ch7.adb: Update comment
1976 * sem_ch11.adb, sem_ch2.adb, sem_ch3.adb, sem_ch4.adb, sem_ch5.adb,
1977 sem_ch9.adb, sem_res.adb: Add calls to
1978 Current_Subprogram_Body_Is_Not_In_ALFA on unsupported constructs.
1979 * sem_ch6.adb (Analyze_Function_Return): add calls to
1980 Current_Subprogram_Body_Is_Not_In_ALFA on return statement in the
1981 middle of the body, and extended return.
1982 (Check_Missing_Return): add calls to Set_Body_Is_In_ALFA with argument
1983 False when missing return.
1984 (Analyze_Subprogram_Body_Helper): initialize the flag Body_Is_In_ALFA
1985 to True for subprograms whose spec is in ALFA. Remove later on the flag
1986 on the entity used for a subprogram body when there exists a separate
1988 * sem_util.adb, sem_util.ads (Current_Subprogram_Body_Is_Not_In_ALFA):
1989 if Current_Subprogram is not Empty, set its flag Body_Is_In_ALFA to
1990 False, otherwise do nothing.
1992 2011-08-02 Robert Dewar <dewar@adacore.com>
1994 * inline.adb, stand.ads, sem_ch6.adb, sem_ch8.adb: Minor reformatting.
1996 2011-08-02 Yannick Moy <moy@adacore.com>
1998 * sem_ch4.ads: minor formatting.
2000 2011-08-02 Yannick Moy <moy@adacore.com>
2002 * sem_aggr.adb, err_vars.ads, sem_ch3.adb, sem_ch5.adb, sem_ch9.adb,
2003 debug.adb, sem_util.adb, sem_res.adb, sem_attr.adb, gnat1drv.adb,
2004 errout.adb, errout.ads, exp_ch6.adb, sem_ch4.adb, restrict.adb,
2005 restrict.ads, sem_ch6.adb, sem_ch8.adb, sem_ch11.adb,
2006 opt.ads: cleanup of SPARK mode
2008 2011-08-02 Yannick Moy <moy@adacore.com>
2010 * cstand.adb (Create_Standard): sets Is_In_ALFA component of standard
2012 * einfo.adb, einfo.ads (Is_In_ALFA): add flag for all entities
2013 (Is_In_ALFA, Set_Is_In_ALFA): new subprograms to access flag Is_In_ALFA
2015 (Analyze_Object_Declaration): set Is_In_ALFA flag for objects
2016 (Constrain_Enumeration): set Is_In_ALFA flag for enumeration subtypes
2017 (Constrain_Integer): set Is_In_ALFA flag for integer subtypes
2018 (Enumeration_Type_Declaration): set Is_In_ALFA flag for enumeration
2020 (Set_Scalar_Range_For_Subtype): unset Is_In_ALFA flag for subtypes with
2022 * sem_ch6.adb (Analyze_Return_Type): unset Is_In_ALFA flag for
2023 functions whose return type is not in ALFA.
2024 (Analyze_Subprogram_Specification): set Is_In_ALFA flag for subprogram
2026 (Process_Formals): unset Is_In_ALFA flag for subprograms if a
2027 parameter's type is not in ALFA.
2028 * stand.ads (Standard_Type_Is_In_ALFA): array defines which standard
2031 2011-08-02 Ed Schonberg <schonberg@adacore.com>
2033 * sem_ch6 (Analyze_Expression_Function): treat the function as
2034 Inline_Always, and introduce a subprogram declaration for it when it is
2036 * inline.adb (Add_Inlined_Body): recognize bodies that come from
2037 expression functions, so that the back-end can determine whether they
2038 can in fact be inlined.
2039 * sem_util.adb (Is_Expression_Function): predicate to determine whether
2040 a function body comes from an expression function.
2042 2011-08-02 Gary Dismukes <dismukes@adacore.com>
2044 * sem_ch6.adb (Check_Conformance): Revise the check for nonconforming
2045 null exclusions to test Can_Never_Be_Null on the anonymous access types
2046 of the formals rather than testing the formals themselves. Exclude this
2047 check in cases where the Old_Formal is marked as a controlling formal,
2048 to avoid issuing spurious errors for bodies completing dispatching
2049 operations (due to the flag not getting set on controlling access
2050 formals in body specs).
2051 (Find_Corresponding_Spec): When checking full and subtype conformance of
2052 subprogram bodies in instances, pass Designated and E in that order, for
2053 consistency with the expected order of the formals (New_Id followed by
2056 2011-08-02 Robert Dewar <dewar@adacore.com>
2058 * sem_ch8.adb: Minor reformatting.
2060 2011-08-02 Ed Schonberg <schonberg@adacore.com>
2062 * sem_ch8.adb (Analyze_Subprogram_Renaming): new procedure
2063 Check_Class_Wide_Actual, to implement AI05-0071, on defaulted
2064 primitive operations of class-wide actuals.
2066 2011-08-02 Javier Miranda <miranda@adacore.com>
2068 * exp_atag.ads, exp_atag.adb
2069 (Build_Common_Dispatching_Select_Statements): Remove argument Loc
2070 since its value is implicitly passed in argument Typ.
2071 * exp_disp.adb (Make_Disp_Conditional_Select_Body,
2072 Make_Disp_Timed_Select_Body): Remove Loc in calls to routine
2073 Build_Common_Dispatching_Select_Statements.
2075 2011-08-02 Robert Dewar <dewar@adacore.com>
2077 * sem_ch3.adb, exp_atag.ads, get_scos.adb, get_scos.ads,
2078 exp_disp.adb, lib-xref.adb, lib-xref.ads: Update comments.
2081 2011-08-02 Robert Dewar <dewar@adacore.com>
2083 * sem_res.adb: Minor reformatting.
2084 * sem_prag.adb: Minor reformatting.
2086 2011-08-02 Javier Miranda <miranda@adacore.com>
2088 * exp_atag.adb, exp_atags.ads
2089 (Build_Common_Dispatching_Select_Statement): Replace argument DT_Ptr
2090 by the tagged type Entity. Required to use this routine in the VM
2091 targets since we do not have available the Tag entity in the VM
2094 (Expand_N_Subprogram_Body): Do not invoke Build_VM_TSDs if package
2095 Ada.Tags has not been previously loaded.
2097 (Expand_N_Package_Declaration, Expand_N_Package_Body): Do not invoke
2098 Build_VM_TSDs if package Ada.Tags has not been previously loaded.
2100 (Enclosing_Dynamic_Scope): Add missing support to handle the full
2101 view of enclosing scopes. Required to handle enclosing scopes that
2102 are synchronized types whose full view is a task type.
2104 (Build_VM_TSDs): Minor code improvement to avoid generating and
2105 analyzing lists with empty nodes.
2106 (Make_Disp_Asynchronous_Select_Body): Add support for VM targets.
2107 (Make_Disp_Conditional_Select_Body): Add support for VM targets.
2108 (Make_Disp_Get_Prim_Op_Kind): Add support for VM targets.
2109 (Make_Disp_Timed_Select_Body): Add support for VM targets.
2110 (Make_Select_Specific_Data_Table): Add support for VM targets.
2111 (Make_VM_TSD): Generate code to initialize the SSD structure of
2114 2011-08-02 Yannick Moy <moy@adacore.com>
2116 * lib-writ.adb (Write_ALI): when ALFA mode is set, write local
2117 cross-references section in ALI.
2118 * lib-xref.adb, lib-xref.ads (Xref_Entry): add components Sub
2119 (enclosing subprogram), Slc (location of Sub) and Sun (unit number of
2121 (Enclosing_Subprogram_Or_Package): new function to return the enclosing
2122 subprogram or package entity of a node
2123 (Is_Local_Reference_Type): new function returns True for references
2124 selected in local cross-references.
2125 (Lt): function extracted from Lt in Output_References
2126 (Write_Entity_Name): function extracted from Output_References
2127 (Generate_Definition): generate reference with type 'D' for definition
2128 of objects (object declaration and parameter specification), with
2129 appropriate locations and units, for use in local cross-references.
2130 (Generate_Reference): update fields Sub, Slc and Sun. Keep newly created
2131 references of type 'I' for initialization in object definition.
2132 (Output_References): move part of function Lt and procedure
2133 Write_Entity_Name outside of the body. Ignore references of types 'D'
2134 and 'I' introduced for local cross-references.
2135 (Output_Local_References): new procedure to output the local
2136 cross-references sections.
2137 (Lref_Entity_Status): new array defining whether an entity is a local
2138 * sem_ch3.adb (Analyze_Object_Declaration): call Generate_Reference
2139 with 'I' type when initialization expression is present.
2140 * get_scos.adb, get_scos.ads: Correct comments and typos
2142 2011-08-02 Javier Miranda <miranda@adacore.com>
2144 * exp_ch6.adb (Expand_N_Subprogram_Body): Enable generation of TSDs in
2146 * exp_ch7.adb (Expand_N_Package_Body): Enable generation of TSDs in
2148 * exp_disp.adb (Build_VM_TSDs): No action needed if the runtime has no
2151 2011-08-02 Vincent Celier <celier@adacore.com>
2153 * prj-nmsc.adb (File_Found): New components Excl_File and Excl_Line
2154 (No_Space_Img): New function
2155 (Find_Excluded_Sources): When reading from a file, record the file name
2156 and the line number for each excluded source.
2157 (Mark_Excluded_Sources): When reporting an error, if the excluded
2158 sources were read from a file, include file name and line number in
2161 2011-08-02 Ed Schonberg <schonberg@adacore.com>
2163 * sem_res.adb (Resolve_Call): implement rule in RM 12.5.1 (23.3/2).
2165 2011-08-02 Robert Dewar <dewar@adacore.com>
2167 * exp_ch7.adb exp_ch6.adb, exp_disp.adb: Minor reformatting
2169 2011-08-02 Javier Miranda <miranda@adacore.com>
2171 * exp_ch6.adb (Expand_N_Subprogram_Body): Temporarily restrict the
2172 generation of TSDs to the DOTNET compiler.
2173 * exp_ch7.adb (Expand_N_Package_Body): Temporarily restrict the
2174 generation of TSDs to the DOTNET compiler.
2176 2011-08-02 Javier Miranda <miranda@adacore.com>
2178 * exp_disp.ads (Build_VM_TSDs): Build the runtime Type Specific Data
2179 record of all the tagged types declared inside library level package
2180 declarations, library level package bodies or library level subprograms.
2181 * exp_disp.adb (Make_VM_TSD): New subprogram that builds the TSD
2182 associated with a given tagged type.
2183 (Build_VM_TSDs): New subprogram.
2184 * exp_ch6.adb (Expand_N_Subprogram_Body): Generate TSDs records of main
2185 compilation units that are subprograms.
2186 * exp_ch7.adb (Expand_N_Package_Body): Generate TSDs of main
2187 compilation units that are package bodies.
2188 (Expand_N_Package_Declaration): Generate TSDs of the main compilation
2189 units that are a package declaration or a package instantiation.
2190 * exp_intr.adb (Expand_Dispatching_Constructor_Call): Minor code
2191 reorganization to improve the error generated by the frontend when the
2192 function Ada.Tags.Secondary_Tag is not available.
2193 * rtsfind.ads (RE_Register_TSD): New runtime entity.
2194 * exp_ch4.adb (Expand_N_Type_Conversion): Minor code cleanup.
2196 2011-08-02 Javier Miranda <miranda@adacore.com>
2198 * exp_disp.adb (Make_DT): Generate call to Check_TSD in Ada 2005 mode.
2200 2011-08-02 Robert Dewar <dewar@adacore.com>
2202 * s-imenne.ads: Minor reformatting.
2204 2011-08-02 Robert Dewar <dewar@adacore.com>
2206 * a-stunau.ads: Add pragma Suppress_Initialization for Big_String
2207 * freeze.adb (Warn_Overlay): Don't warn if initialization suppressed
2208 * s-stalib.ads: Add pragma Suppress_Initialization for Big_String
2210 2011-08-02 Robert Dewar <dewar@adacore.com>
2212 * einfo.ads (Materialize_Entity): Document this is only for renamings
2213 * exp_ch3.adb (Expand_N_Object_Declaration): Make sure we generate
2214 required debug information in the case where we transform the object
2215 declaration into a renaming declaration.
2216 * exp_ch4.adb (Expand_Concatenate): Generate debug info for result
2218 * exp_dbug.ads (Debug_Renaming_Declaration): Document setting of
2221 2011-08-02 Robert Dewar <dewar@adacore.com>
2223 * einfo.ads, einfo.adb (Suppress_Initialization): Replaces
2224 Suppress_Init_Procs.
2225 * exp_ch3.adb, exp_disp.adb, freeze.adb: Use
2226 Suppress_Initialization/Initialization_Suppressed.
2227 * gnat_rm.texi: New documentation for pragma Suppress_Initialization
2228 * sem_aux.ads, sem_aux.adb (Initialization_Suppressed): New function
2229 * sem_dist.adb: Use Suppress_Initialization/Initialization_Suppressed
2230 * sem_prag.adb: New processing for pragma Suppress_Initialization.
2232 2011-08-02 Robert Dewar <dewar@adacore.com>
2234 * gnat_rm.texi, a-tags.ads, sem_prag.adb, sem_ch12.adb, exp_disp.adb:
2237 2011-08-02 Ed Schonberg <schonberg@adacore.com>
2239 * sem_prag.adb (Chain_PPC): Implement AI04-0230: null procedures can
2240 only have inheritable classwide pre/postconditions.
2242 2011-08-02 Javier Miranda <miranda@adacore.com>
2244 * a-tags.ads, a-tags.adb (Check_TSD): New subprogram.
2245 * rtsfind.ads (RE_Check_TSD): New runtime entity.
2246 * exp_disp.adb (Make_DT): Generate call to the new runtime routine that
2247 checks if the external tag of a type is the same as the external tag
2248 of some other declaration.
2250 2011-08-02 Thomas Quinot <quinot@adacore.com>
2252 * s-taskin.ads: Minor reformatting.
2254 2011-08-02 Emmanuel Briot <briot@adacore.com>
2256 * g-comlin.adb (Display_Help): swap the order in which it prints the
2257 short help and the general usage.
2259 2011-08-02 Ed Schonberg <schonberg@adacore.com>
2261 * sem_ch12.adb (Analyze_Generic_Subprogram_Declaration): copy properly
2262 the aspect declarations and attach them to the generic copy for
2263 subsequent analysis.
2264 (Analyze_Subprogram_Instantiation): copy explicitly the aspect
2265 declarations of the generic tree to the new subprogram declarations.
2266 * sem_attr.adb (Check_Precondition_Postcondition): recognize
2267 conditions that apply to a subprogram instance.
2269 2011-08-02 Robert Dewar <dewar@adacore.com>
2271 * gnat_rm.texi: Clarify doc on pragma Source_File_Name[_Project].
2273 2011-08-02 Ed Schonberg <schonberg@adacore.com>
2275 * sem_ch3.adb (Derived_Type_Declaration): When checking that a untagged
2276 private type with a tagged full view is not derived in the immediate
2277 scope of the partial view, (RM 7.3 (7)) use the scope of the base type.
2279 2011-08-02 Robert Dewar <dewar@adacore.com>
2281 * exp_ch4.adb: Minor reformatting.
2283 2011-08-02 Ed Schonberg <schonberg@adacore.com>
2285 * sem_ch5.adb (Analyze_Loop_Statement): If the iteration scheme is an
2286 Ada2012 iterator, the loop will be rewritten during expansion into a
2287 while loop with a cursor and an element declaration. Do not analyze the
2288 body in this case, because if the container is for indefinite types the
2289 actual subtype of the elements will only be determined when the cursor
2290 declaration is analyzed.
2292 2011-08-02 Arnaud Charlet <charlet@adacore.com>
2294 * sem_ch13.adb (Analyze_Attribute_Definition_Clause): Ignore
2295 size/alignment related attributes in CodePeer_Mode.
2297 2011-08-02 Gary Dismukes <dismukes@adacore.com>
2299 * sem_ch3.adb (Check_Ops_From_Incomplete_Type): Remove call to
2300 Prepend_Element, since this can result in the operation getting the
2301 wrong slot in the full type's dispatch table if the full type has
2302 inherited operations. The incomplete type's operation will get added
2303 to the proper position in the full type's primitives
2304 list later in Sem_Disp.Check_Operation_From_Incomplete_Type.
2305 (Process_Incomplete_Dependents): Add Is_Primitive test when checking for
2306 dispatching operations, since there are cases where nonprimitive
2307 subprograms can get added to the list of incomplete dependents (such
2308 as subprograms in nested packages).
2309 * sem_ch6.adb (Process_Formals): First, remove test for being in a
2310 private part when determining whether to add a primitive with a
2311 parameter of a tagged incomplete type to the Private_Dependents list.
2312 Such primitives can also occur in the visible part, and should not have
2313 been excluded from being private dependents.
2314 * sem_ch7.adb (Uninstall_Declarations): When checking the rule of
2315 RM05-3.10.1(9.3/2), test that a subprogram in the Private_Dependents
2316 list of a Taft-amendment incomplete type is a primitive before issuing
2317 an error that the full type must appear in the same unit. There are
2318 cases where nonprimitives can be in the list (such as subprograms in
2320 * sem_disp.adb (Derives_From): Use correct condition for checking that
2321 a formal's type is derived from the type of the corresponding formal in
2322 the parent subprogram (the condition was completely wrong). Add
2323 checking that was missing for controlling result types being derived
2324 from the result type of the parent operation.
2326 2011-08-02 Yannick Moy <moy@adacore.com>
2328 * errout.adb (First_Node): minor renaming
2329 * restrict.adb (Check_Formal_Restriction): put restriction warning on
2332 2011-08-02 Yannick Moy <moy@adacore.com>
2334 * sem_res.adb (Resolve_Logical_Op): ensure N is a binary operator
2335 before accessing operands.
2336 * sem_util.adb (Is_SPARK_Initialization_Expr): follow original nodes to
2337 decide whether an initialization expression respects SPARK rules, as
2338 the plain node is the expanded one. This allows for more valid warnings
2340 * gnat_rm.texi: Minor update.
2342 2011-08-02 Arnaud Charlet <charlet@adacore.com>
2344 * sem_ch13.adb (Analyze_Enumeration_Representation_Clause): Revert
2347 2011-08-02 Robert Dewar <dewar@adacore.com>
2349 * sem_ch3.adb, sem_ch4.adb: Minor reformatting.
2351 2011-08-02 Hristian Kirtchev <kirtchev@adacore.com>
2353 * exp_ch5.adb (Expand_Iterator_Loop): Reformatting. Wrap the original
2354 loop statements and the element renaming declaration with a block when
2355 the element type is controlled.
2357 2011-08-02 Yannick Moy <moy@adacore.com>
2359 * sinfo.ads: Minor formatting.
2361 2011-08-02 Ed Schonberg <schonberg@adacore.com>
2363 * sem_aggr.adb (Add_Association): if the association has a box and no
2364 expression, use the Sloc of the aggregate itself for the new
2366 * errout.adb (First_Node): Exclude nodes with no Sloc, and always use
2369 2011-08-02 Hristian Kirtchev <kirtchev@adacore.com>
2371 * exp_ch5.adb (Expand_Iterator_Loop): Code cleanup and refactoring.
2372 When a container is provided via a function call, generate a renaming
2373 of the function result. This avoids the creation of a transient scope
2374 and the premature finalization of the container.
2375 * exp_ch7.adb (Is_Container_Cursor): Removed.
2376 (Wrap_Transient_Declaration): Remove the supression of the finalization
2377 of the list controller when the declaration denotes a container cursor,
2380 2011-08-02 Yannick Moy <moy@adacore.com>
2382 * restrict.adb (Check_Formal_Restriction): only issue a warning if the
2383 node is from source, instead of the original node being from source.
2385 (Resolve_Array_Aggregate): refine the check for a static expression, to
2386 recognize also static ranges
2387 * sem_ch3.adb, sem_ch3.ads (Analyze_Component_Declaration,
2388 Array_Type_Declaration): postpone the test for the type being a subtype
2389 mark after the type has been resolved, so that component-selection and
2390 expanded-name are discriminated.
2391 (Make_Index, Process_Range_Expr_In_Decl): add a parameter In_Iter_Schm
2392 to distinguish the case of an iteration scheme, so that an error is
2393 issed on a non-static range in SPARK except in an iteration scheme.
2394 * sem_ch5.adb (Analyze_Iteration_Scheme): call Make_Index with
2395 In_Iter_Schm = True.
2396 * sem_ch6.adb (Analyze_Subprogram_Specification): refine the check for
2397 user-defined operators so that they are allowed in renaming
2399 (Find_Selected_Component): refine the check for prefixing of operators
2400 so that they are allowed in renaming. Move the checks for restrictions
2401 on selector name after analysis discriminated between
2402 component-selection and expanded-name.
2403 * sem_res.adb (Resolve_Op_Concat_Arg): do not issue a warning on
2404 concatenation argument of string type if it is static.
2405 * sem_util.adb, sem_util.ads
2406 (Check_Later_Vs_Basic_Declarations): add a new function
2407 Is_Later_Declarative_Item to decice which declarations are allowed as
2408 later items, in the two different modes Ada 83 and SPARK. In the SPARK
2409 mode, add that renamings are considered as later items.
2410 (Enclosing_Package): new function to return the enclosing package
2411 (Enter_Name): correct the rule for homonyms in SPARK
2412 (Is_SPARK_Initialization_Expr): default to returning True on nodes not
2413 from source (result of expansion) to avoid issuing wrong warnings.
2415 2011-08-02 Ed Schonberg <schonberg@adacore.com>
2417 * errout.adb: On anything but an expression First_Node returns its
2420 2011-08-02 Pascal Obry <obry@adacore.com>
2422 * prj-proc.adb, make.adb, makeutl.adb: Minor reformatting.
2424 2011-08-02 Hristian Kirtchev <kirtchev@adacore.com>
2426 * exp_ch5.adb (Expand_Iterator_Loop): Code cleanup and reorganization.
2427 Set the associated loop as the related expression of internally
2429 * exp_ch7.adb (Is_Container_Cursor): New routine.
2430 (Wrap_Transient_Declaration): Supress the finalization of the list
2431 controller when the declaration denotes a container cursor.
2433 2011-08-02 Yannick Moy <moy@adacore.com>
2435 * opt.ads (SPARK_Mode): update comment, SPARK_Mode only set through
2437 * par-ch3.adb (P_Delta_Constraint): remove check in SPARK mode that the
2438 expression is a simple expression. This check cannot be performed in
2439 the semantics, so just drop it.
2440 (P_Index_Or_Discriminant_Constraint): move check that the index or
2441 discriminant is a subtype mark to Analyze_Subtype_Declaration in the
2442 semantics. Other cases were previously checked in the semantics.
2443 * par-ch4.adb (P_Name): move checks that a selector name is not
2444 character literal or an operator symbol to Find_Selected_Component in
2446 * par-ch5.adb (Parse_Decls_Begin_End): move check that basic
2447 declarations are not placed after later declarations in a separate
2448 procedure in Sem_Util (possibly not the best choice?), to be used both
2449 during parsing, for Ada 83 mode, and during semantic analysis, for
2451 * par-endh.adb (Check_End): move check that end label is not missing
2452 to Process_End_Label in the semantics
2453 * par-prag.adb (Process_Restrictions_Or_Restriction_Warnings): remove
2454 the special case for SPARK restriction
2455 * par.adb: use and with Sem_Util, for use in Parse_Decls_Begin_End
2456 * restrict.adb, restrict.ads (Check_Formal_Restriction): add a
2457 parameter Force to issue the error message even on internal node (used
2458 for generated end label). Call Check_Restriction to check when an error
2459 must be issued. In SPARK mode, issue an error message even if the
2460 restriction is not set.
2461 (Check_Restriction): new procedure with an additional out parameter to
2462 inform the caller that a message has been issued
2463 * sem_aggr.adb: Minor modification of message
2464 * sem_attr.adb (Analyze_Attribute): call Check_Formal_Restriction
2465 instead of issuing an error message directly
2466 * sem_ch3.adb (Analyze_Declarations): move here the check that basic
2467 declarations are not placed after later declarations, by calling
2468 Check_Later_Vs_Basic_Declarations
2469 (Analyze_Subtype_Declaration): move here the check that an index or
2470 discriminant constraint must be a subtype mark. Change the check that
2471 a subtype of String must start at one so that it works on subtype marks.
2472 * sem_ch4.adb (Analyze_Call): move here the check that a named
2473 association cannot follow a positional one in a call
2474 * sem_ch5.adb (Check_Unreachable_Code): call Check_Formal_Restriction
2475 instead of issuing an error message directly
2476 * sem_ch8.adb (Find_Selected_Component): move here the check that a
2477 selector name is not a character literal or an operator symbol. Move
2478 here the check that the prefix of an expanded name cannot be a
2479 subprogram or a loop statement.
2480 * sem_util.adb, sem_util.ads (Check_Later_Vs_Basic_Declarations): new
2481 procedure called from parsing and semantics to check that basic
2482 declarations are not placed after later declarations
2483 (Process_End_Label): move here the check that end label is not missing
2485 2011-08-02 Arnaud Charlet <charlet@adacore.com>
2487 * sem_ch13.adb (Analyze_Enumeration_Representation_Clause): Ignore enum
2488 representation clause in codepeer mode, since it confuses CodePeer and
2489 does not bring useful info.
2491 2011-08-02 Ed Falis <falis@adacore.com>
2493 * init.c: initialize fp hw on MILS.
2495 2011-08-02 Ed Schonberg <schonberg@adacore.com>
2497 * errout.adb (First_Node): for bodies, return the node itself (small
2498 optimization). For other nodes, do not check source_unit if the node
2499 comes from Standard.
2501 2011-08-02 Robert Dewar <dewar@adacore.com>
2503 * exp_ch3.adb: Minor comment additions.
2504 * sem_ch13.adb: Minor reformatting.
2506 2011-08-02 Pascal Obry <obry@adacore.com>
2508 * make.adb, makeutl.adb: Removes some superfluous directory separator.
2510 2011-08-02 Robert Dewar <dewar@adacore.com>
2512 * sem_attr.adb: Minor reformatting.
2514 2011-08-02 Robert Dewar <dewar@adacore.com>
2516 * einfo.adb (Has_Default_Aspect): Replaces Has_Default_Value
2517 (Has_Default_Component_Value): Removed
2518 * einfo.ads Comment updates
2519 (Has_Default_Aspect): Replaces Has_Default_Value
2520 (Has_Default_Component_Value): Removed
2522 (Expand_N_Freeze_Entity): Handle Default[_Component]_Value aspects
2524 (Build_Array_Init_Proc): Handle Default_[Component_]Value aspects
2525 (Get_Simple_Init_Val): Handle Default_Value aspect
2526 (Needs_Simple_Initialization): Handle Default_Value aspect
2527 * exp_ch3.ads: Needs_Simple_Initialization
2528 * freeze.adb (Freeze_Entity): Handle Default_[Component_]Value aspect
2529 * par-prag.adb (Pragma_Default[_Component]Value) Removed
2531 (Analyze_Aspect_Specifications): Fix Default[_Component]_Value aspects
2532 * sem_prag.adb (Pragma_Default[_Component]Value) Removed
2533 * snames.ads-tmpl (Pragma_Default[_Component]Value) Removed
2535 2011-08-02 Ed Schonberg <schonberg@adacore.com>
2537 * sem_ch5.adb (Analyze_Iterator_Specification): use base type to locate
2538 package containing iteration primitives.
2539 exp_ch5.adb (Expand_Iterator_Loop): ditto.
2541 2011-08-02 Ed Schonberg <schonberg@adacore.com>
2543 * sem_ch5.adb (Analyze_Iteration_Scheme): For an Ada2012 iterator with
2544 "of", pre-analyze expression in case it is a function call with
2545 finalization actions that must be placed ahead of the loop.
2546 * exp_ch5.adb (Expand_Iterator_Loop): If condition_actions are present
2547 on an Ada2012 iterator, insert them ahead of the rewritten loop.
2549 2011-08-02 Geert Bosch <bosch@adacore.com>
2551 * cstand.adb (Create_Float_Types): Only consider C's long double for
2552 Long_Long_Float, in addition to double.
2554 2011-08-02 Robert Dewar <dewar@adacore.com>
2556 * sem_ch3.adb, sem_ch5.adb, sem_type.adb, switch-c.adb, switch-c.ads,
2557 sem_prag.adb, sem_util.adb, sem_util.ads, sem_res.adb, warnsw.ads,
2558 prepcomp.ads, cstand.adb, stand.ads, a-calfor.adb, s-stusta.adb:
2561 2011-08-02 Ed Schonberg <schonberg@adacore.com>
2563 * sem_attr.adb: handle properly 'Result when it is a prefix of an
2566 2011-08-02 Javier Miranda <miranda@adacore.com>
2568 * einfo.ads, einfo.adb
2569 (Original_Access_Type): Move this attribute to Node26 since there was
2570 an undocumented use of Node21 in E_Access_Subprogram_Type entities
2571 which causes conflicts and breaks the generation of the .NET compiler.
2572 (Interface_Name): Add missing documentation on JGNAT only uses of
2575 2011-08-02 Geert Bosch <bosch@adacore.com>
2577 * cstand.adb (Back_End_Float_Types): Use Elist instead of Nlist
2578 (Find_Back_End_Float_Type): Likewise
2579 (Create_Back_End_Float_Types): Likewise
2580 (Create_Float_Types): Likewise
2581 (Register_Float_Type): Likewise
2582 * sem_ch3.adb (Floating_Point_Type_Declaration): Use Elist instead of
2583 Nlist and split out type selection in new local Find_Base_Type function.
2584 * sem_prag.adb (Process_Import_Predefined_Type): Use Elist instead of
2586 * stand.ads (Predefined_Float_Types): Use Elist instead of Nlist
2588 2011-08-02 Robert Dewar <dewar@adacore.com>
2590 * inline.adb: Minor code reorganization (put Get_Code_Unit_Entity in
2592 * opt.ads: Minor comment change.
2593 * sem_ch12.adb: Minor code reorganization.
2595 2011-08-02 Gary Dismukes <dismukes@adacore.com>
2597 * sem_ch3.adb (Complete_Private_Subtype): Don't append the private
2598 subtype's list of rep items to the list on the full subtype in the case
2599 where the lists are the same.
2601 2011-08-02 Geert Bosch <bosch@adacore.com>
2603 * switch-c.adb (Free): New deallocation procedure to avoid implicitly
2604 using the one from System.Strings, which also deallocates all strings.
2606 2011-08-02 Geert Bosch <bosch@adacore.com>
2608 * gcc-interface/gigi.h, gcc-interface/misc.c (enumerate_modes): New
2610 * gcc-interface/Make-lang.in: Update dependencies.
2612 2011-08-02 Olivier Hainque <hainque@adacore.com>
2614 * gcc-interface/trans.c (Subprogram_Body_to_gnu): Set the function
2617 2011-08-02 Javier Miranda <miranda@adacore.com>
2619 * sem_ch3.adb (Check_Anonymous_Access_Components): Create extra formals
2620 associated with anonymous access to subprograms.
2622 2011-08-02 Geert Bosch <bosch@adacore.com>
2625 (Preprocessing_Symbol_Defs): Move from Prepcomp.Symbol_Definitions.
2626 (Preprocessing_Symbol_Last): Move from Prepcomp.Last_Definition.
2627 * prepcomp.adb (Symbol_Definitions, Last_Definition): Move to opt.ads
2628 (Add_Symbol_Definition): Move to switch-c.adb
2629 (Process_Command_Line_Symbol_Definitions): Adjust references to above.
2630 * prepcomp.ads: Remove dependency on Ada.Unchecked_Deallocation.
2631 (Add_Symbol_Definition): Move to switch-c.adb.
2632 * sem_ch13.adb, sem_prag.adb: Add dependency on Warnsw.
2634 (Set_Dot_Warning_Switch, Set_GNAT_Mode_Warnings, Set_Warning_Switch):
2636 * sem_warn.ads (Warn_On_Record_Holes, Warn_On_Overridden_Size,
2637 Set_Dot_Warning_Switch, Set_GNAT_Mode_Warnings, Set_Warning_Switch):
2639 * switch-c.adb: Replace dependency on Prepcomp and Sem_Warn by Warnsw.
2640 (Add_Symbol_Definition): Moved from Prepcomp.
2641 * switch-c.ads: Update copyright notice. Use String_List instead of
2642 Argument_List, removing dependency on System.OS_Lib.
2644 2011-08-02 Yannick Moy <moy@adacore.com>
2646 * sem_ch3.adb (Analyze_Object_Declaration): issue an error in formal
2647 mode on initialization expression which does not respect SPARK
2649 * sem_util.adb, sem_util.ads (Is_SPARK_Initialization_Expr): determines
2650 if the tree referenced by its argument represents an initialization
2651 expression in SPARK, suitable for initializing an object in an object
2654 2011-08-02 Javier Miranda <miranda@adacore.com>
2656 * exp_ch9.adb (Expand_Access_Protected_Subprogram_Type): Link the
2657 internally generated access to subprogram with its associated protected
2659 * einfo.ads, einfo.adb (Original_Access_Type): New attribute.
2661 2011-08-02 Geert Bosch <bosch@adacore.com>
2663 * cstand.adb (Register_Float_Type): Print information about type to
2664 register, if the Debug_Flag_Dot_B is set.
2665 * debug.adb (Debug_Flag_Dot_B): Document d.b debug option.
2666 * rtsfind.ads (RE_Max_Base_Digits): New run time entity.
2667 * sem_ch3.adb (Floating_Point_Type_Declaration): Allow declarations
2668 with a requested precision of more than Max_Digits digits and no more
2669 than Max_Base_Digits digits, if a range specification is present and the
2670 Predefined_Float_Types list has a suitable type to derive from.
2671 * sem_ch3.adb (Rep_Item_Too_Early): Avoid generating error in the
2672 case of type completion with pragma Import
2674 (Process_Import_Predefined_Type): Processing to complete a type
2675 with pragma Import. Currently supports floating point types only.
2676 (Set_Convention_From_Pragma): Do nothing without underlying type.
2677 (Process_Convention): Guard against absence of underlying type,
2678 which may happen when importing incomplete types.
2679 (Process_Import_Or_Interface): Handle case of importing predefined
2680 types. Tweak error message.
2682 2011-08-02 Eric Botcazou <ebotcazou@adacore.com>
2684 * inline.adb (Add_Inlined_Body): Adjust check for library-level inlined
2685 functions to previous change. Reorganize code slightly.
2687 2011-08-02 Geert Bosch <bosch@adacore.com>
2689 * back_end.ads (Register_Type_Proc): New call back procedure type for
2690 allowing the back end to provide information about available types.
2691 (Register_Back_End_Types): New procedure to register back end types.
2692 * back_end.adb (Register_Back_End_Types): Call the back end to enumerate
2694 * cstand.adb (Back_End_Float_Types): New list for floating point types
2695 supported by the back end.
2696 (Build_Float_Type): Add extra parameter for Float_Rep_Kind.
2697 (Copy_Float_Type): New procedure to make new copies of predefined types.
2698 (Register_Float_Type): New call back procedure to populate the BEFT list
2699 (Find_Back_End_Float_Type): New procedure to find a BEFT by name
2700 (Create_Back_End_Float_Types): New procedure to populate the BEFT list.
2701 (Create_Float_Types): New procedure to create entities for floating
2702 point types predefined in Standard, and put these and any remaining
2703 BEFTs on the Predefined_Float_Types list.
2704 * stand.ads (Predefined_Float_Types): New list for predefined floating
2705 point types that do not have declarations in package Standard.
2707 2011-08-02 Eric Botcazou <ebotcazou@adacore.com>
2709 * inline.adb (Get_Code_Unit_Entity): New local function. Returns the
2710 entity node for the unit containing the parameter.
2711 (Add_Inlined_Body): Use it to find the unit containing the subprogram.
2712 (Add_Inlined_Subprogram): Likewise.
2713 * gcc-interface/Make-lang.in: Update dependencies.
2715 2011-08-02 Thomas Quinot <quinot@adacore.com>
2717 * s-stusta.adb (Print): Make sure Pos is always initialized to a
2720 2011-08-02 Geert Bosch <bosch@adacore.com>
2722 * a-calfor.adb (Image): Simplify, removing unnecessary uses of 'Image.
2724 2011-08-02 Eric Botcazou <ebotcazou@adacore.com>
2726 * sem_type.adb (Covers): Move trivial case to the top and reuse the
2727 computed value of Base_Type.
2729 2011-08-02 Yannick Moy <moy@adacore.com>
2731 * restrict.adb (Check_Restriction): issue an error for any use of
2732 class-wide, even if the No_Dispatch restriction is not set.
2733 * sem_aggr.adb: Correct typos in comments and messages in formal mode
2734 * sem_ch3.adb (Process_Full_View): issue an error in formal mode is,
2735 when completing a private extension, the type named in the private part
2736 is not the same as that named in the visible part.
2737 * sem_res.adb (Resolve_Call): issue an error in formal mode on the use
2738 of an inherited primitive operations of a tagged type or type extension
2739 that returns the tagged type.
2740 * sem_util.adb, sem_util.ads (Is_Inherited_Operation_For_Type): new
2741 function which returns True for an implicit operation inherited by the
2742 derived type declaration for the argument type.
2743 (Is_SPARK_Object_Reference): move to appropriate place in alphabetic
2746 2011-08-02 Ed Schonberg <schonberg@adacore.com>
2748 * sem_ch5.adb (Pre_Analyze_Range): new procedure extracted from
2749 Process_Bounds, to perform analysis with expansion of a range or an
2750 expression that is the iteration scheme for a loop.
2751 (Analyze_Iterator_Specification): If domain of iteration is given by a
2752 function call with a controlled result, as is the case if call returns
2753 a predefined container, ensure that finalization actions are properly
2755 * par-ch3.adb: accept Ada2012 iterator form in P_Discrete_Range.
2757 2011-08-02 Javier Miranda <miranda@adacore.com>
2759 * sem_ch5.adb (Analyze_Iteration_Scheme): Fix typo.
2760 * gcc-interface/Make-lang.in: Update dependencies.
2762 2011-08-02 Javier Miranda <miranda@adacore.com>
2764 * sem_util.ads, sem_util.adb (Is_Variable): Add a new formal to
2765 determine if the analysis is performed using N or Original_Node (N).
2766 * exp_util.adb (Side_Effect_Free): Code cleanup since the new
2767 functionality of routine Is_Variable avoids code duplication.
2768 * checks.adb (Determine_Range): Handle temporaries generated by
2769 Remove_Side_Effects.
2771 2011-08-02 Javier Miranda <miranda@adacore.com>
2773 * exp_ch4.adb (Expand_N_Quantified_Expression): Force reanalysis and
2774 expansion of the condition. Required since the previous analysis was
2775 done with expansion disabled (see Resolve_Quantified_Expression) and
2776 hence checks were not inserted and record comparisons have not been
2779 2011-08-02 Ed Falis <falis@adacore.com>
2781 * s-taprop-vxworks.adb, s-intman-vxworks.adb, s-intman-vxworks.ads:
2784 2011-08-02 Bob Duff <duff@adacore.com>
2786 * opt.ads: Minor comment fix.
2788 2011-08-02 Bob Duff <duff@adacore.com>
2790 * sem_ch12.adb (Analyze_Package_Instantiation,
2791 Analyze_Subprogram_Instantiation): Turn off style checking while
2792 analyzing an instance. Whatever style checks that apply to the generic
2793 unit should apply, so it makes no sense to apply them in an instance.
2794 This was causing trouble when compiling an instance of a runtime
2795 unit that violates the -gnatyO switch.
2796 * stylesw.adb (Set_Style_Check_Options): "when 'O' =>" was missing from
2797 one of the two case statements, causing spurious errors.
2799 2011-08-02 Robert Dewar <dewar@adacore.com>
2801 * uname.adb: Minor reformatting.
2802 * gnatcmd.adb: Minor reformatting.
2803 * exp_attr.adb: Minor reformatting.
2805 2011-08-02 Ed Schonberg <schonberg@adacore.com>
2807 * exp_ch5.adb (Expand_N_Assignment_Statement): under restriction
2808 No_Dispatching_Calls, do not look for the Assign primitive, because
2809 predefined primitives are not created in this case.
2811 2011-08-02 Bob Duff <duff@adacore.com>
2813 * stylesw.ads: Minor comment fixes.
2815 2011-08-02 Robert Dewar <dewar@adacore.com>
2817 * freeze.adb (Add_To_Result): New procedure.
2819 2011-08-02 Jose Ruiz <ruiz@adacore.com>
2821 * exp_attr.adb (Find_Stream_Subprogram): When using a configurable run
2822 time, if the specific run-time routines for handling streams of strings
2823 are not available, use the default mechanism.
2825 2011-08-02 Arnaud Charlet <charlet@adacore.com>
2827 * s-regpat.ads: Fix typo.
2829 2011-08-02 Vincent Celier <celier@adacore.com>
2831 * prj-conf.adb (Get_Or_Create_Configuration_File): If On_Load_Config is
2832 not null, call it to create the in memory config project file without
2833 parsing an existing default config project file.
2835 2011-08-02 Eric Botcazou <ebotcazou@adacore.com>
2837 * atree.adb (Allocate_Initialize_Node): Remove useless temporaries.
2839 2011-08-02 Ed Schonberg <schonberg@adacore.com>
2841 * sem_elim.adb: an abstract subprogram does not need an eliminate
2842 pragma for its descendant to be eliminable.
2844 2011-08-02 Ed Falis <falis@adacore.com>
2846 * init.c: revert to handling before previous checkin for VxWorks
2847 * s-intman-vxworks.adb: delete unnecessary declarations related to
2848 using Ada interrupt facilities for handling signals.
2849 Delete Initialize_Interrupts. Use __gnat_install_handler instead.
2850 * s-intman-vxworks.ads: Import __gnat_install_handler as
2851 Initialize_Interrupts.
2852 * s-taprop-vxworks.adb: Delete Signal_Mask.
2853 (Abort_Handler): change construction of mask to unblock exception
2856 2011-08-02 Jerome Guitton <guitton@adacore.com>
2858 * a-except-2005.adb (Raise_From_Signal_Handler): Call
2859 Debug_Raise_Exception before propagation starts.
2861 2011-08-02 Eric Botcazou <ebotcazou@adacore.com>
2863 * exp_ch6.adb (Expand_Call): Guard restriction checks with a call
2864 to Restriction_Check_Required.
2865 * sem_ch3.adb (Analyze_Object_Declaration): Likewise.
2866 * sem_res.adb (Resolve_Call): Likewise.
2867 * sem_attr.adb (Check_Stream_Attribute): Likewise.
2869 2011-08-02 Bob Duff <duff@adacore.com>
2871 * stylesw.ads: Update comment.
2872 * style.adb: Minor: Use Error_Msg_NE instead of Error_Msg_N.
2873 * errout.ads: Remove obsolete comment.
2875 2011-08-02 Javier Miranda <miranda@adacore.com>
2877 * einfo.ads, einfo.adb (Is_Safe_To_Reevaluate): new function.
2878 (Set_Is_Safe_To_Reevaluate): new procedure.
2879 * sem_ch5.adb (Analyze_Assignment): Add one assertion to ensure that no
2880 assignment is allowed on safe-to-reevaluate variables.
2881 (Analyze_Iteration_Schine.Process_Bounds.One_Bound): Decorate the
2882 temporary created to remove side effects in expressions that use
2883 the secondary stack as safe-to-reevaluate.
2884 * exp_util.adb (Side_Effect_Free): Add missing code to handle well
2885 variables that are not true constants.
2887 2011-08-02 Robert Dewar <dewar@adacore.com>
2889 * sem_ch5.adb, sem_ch7.adb, einfo.ads, sem_util.adb, sem_util.ads,
2890 sem_res.adb, sem_ch6.adb: Minor reformatting.
2892 2011-08-02 Jerome Guitton <guitton@adacore.com>
2894 * a-except-2005.adb (Raise_Current_Excep): Remove obsolete dead code.
2896 2011-08-02 Ed Schonberg <schonberg@adacore.com>
2898 * sem_ch6.adb (New_Overloaded_Entity, Check_Overriding_Indicator): Do
2899 not set Overridden_Operation if subprogram is an initialization
2902 2011-08-02 Yannick Moy <moy@adacore.com>
2904 * par-ch6.adb: Correct obsolete name in comments
2905 * restrict.adb, restrict.ads (Check_Formal_Restriction): new function
2906 which takes two message arguments (existing function takes one), with
2907 second message used for continuation.
2908 * sem_ch5.adb (Analyze_Block_Statement): in formal mode, only reject
2909 block statements that originate from a source block statement, not
2910 generated block statements
2911 * sem_ch6.adb (Analyze_Function_Call): rename L into Actuals, for
2912 symmetry with procedure case
2913 * sem_ch7.adb (Check_One_Tagged_Type_Or_Extension_At_Most): new
2914 function to issue an error in formal mode if a package specification
2915 contains more than one tagged type or type extension.
2916 * sem_res.adb (Resolve_Actuals): in formal mode, check that actual
2917 parameters matching formals of tagged types are objects (or ancestor
2918 type conversions of objects), not general expressions. Issue an error
2919 on view conversions that are not involving ancestor conversion of an
2921 (Resolve_Type_Conversion): in formal mode, issue an error on the
2922 operand of an ancestor type conversion which is not an object
2923 * sem_util.adb, sem_util.ads (Find_Actual): extend the behavior of the
2924 procedure so that it works also for actuals of function calls
2925 (Is_Actual_Tagged_Parameter): new function which determines if its
2926 argument is an actual parameter of a formal of tagged type in a
2928 (Is_SPARK_Object_Reference): new function which determines if the tree
2929 referenced by its argument represents an object in SPARK
2931 2011-08-02 Robert Dewar <dewar@adacore.com>
2933 * sem_ch3.adb: Minor reformatting
2934 Minor comment addition
2935 Minor error msg text change
2937 2011-08-02 Javier Miranda <miranda@adacore.com>
2939 * sem_ch5.adb (Analyze_Iteration_Scheme.Uses_Secondary_Stack): New
2940 function. Used to be more precise when we generate a variable plus one
2941 assignment to remove side effects in the evaluation of the Bound
2943 (Analyze_Iteration_Scheme): Clean attribute analyzed in all the nodes
2944 of the bound expression to force its re-analysis and thus expand the
2945 associated transient scope (if required). Code cleanup replacing the
2946 previous code that declared the constant entity by an invocation to
2947 routine Force_Evaluation which centralizes this work in the frontend.
2949 2011-08-02 Robert Dewar <dewar@adacore.com>
2951 * einfo.adb (Is_Base_Type): Improve efficiency by using a flag table
2952 (Base_Type): Now uses improved Is_Base_Type function
2953 * einfo.ads (Base_Type): Inline this function
2955 2011-08-02 Robert Dewar <dewar@adacore.com>
2957 * sem_prag.adb (Analyze_Pragma): Defend against infinite recursion
2958 (Analyze_Aspect_Specifications): Fix Sloc values for constructed pragmas
2960 2011-08-02 Arnaud Charlet <charlet@adacore.com>
2962 * gcc-interface/Make-lang.in: Update dependencies.
2963 * gcc-interface/Makefile.in: Use s-inmapop-vxworks.adb for all VxWorks
2966 2011-08-02 Yannick Moy <moy@adacore.com>
2968 * par-ch3.adb (P_Delta_Constraint): issue an error in formal mode on
2969 non-simple expression used in delta constraint
2970 (P_Index_Or_Discriminant_Constraint): issue an error in formal mode on
2971 index constraint which is not a subtype mark
2972 * par.adb: With and use Restrict
2973 * sem_ch3.adb (Analyze_Component_Declaration): issue an error in formal
2974 mode on component type which is not a subtype mark and default
2975 expression on component
2976 (Analyze_Subtype_Declaration): issue an error in formal mode on subtype
2977 of string which does not have a lower index bound equal to 1
2978 (Array_Type_Declaration): issue an error in formal mode on index or
2979 component type which is not a subtype mark, and on aliased keyword on
2981 (Derived_Type_Declaration): issue an error in formal mode on interface,
2982 limited or abstract type
2983 (Record_Type_Declaration): issue an error in formal mode on interface
2984 (Record_Type_Definition): issue an error in formal mode on tagged types
2985 and type extensions not declared in the specification of a library unit
2986 package; on null non-tagged record; on variant part
2988 2011-08-02 Vincent Celier <celier@adacore.com>
2990 * prj-nmsc.adb (Check_Library_Attributes): Do not report Library_Dir
2991 not declared for qualified library project when Library_Name is not
2992 declared, but Library_Dir is.
2994 2011-08-02 Robert Dewar <dewar@adacore.com>
2996 * sem_ch13.adb (Analyze_Aspect_Specification): Fix slocs on generated
2997 pragmas (affects aspects [Component_]Default_Value
2998 (Check_Aspect_At_Freeze_Point): For Component_Default_Value, use
2999 component type for the resolution
3001 2011-08-02 Eric Botcazou <ebotcazou@adacore.com>
3003 * einfo.adb (Base_Type): Tune implementation for speed.
3005 2011-08-02 Robert Dewar <dewar@adacore.com>
3007 * freeze.adb: Minor reformatting.
3009 2011-08-02 Thomas Quinot <quinot@adacore.com>
3011 * scos.ads: Update comments.
3013 2011-08-02 Ed Schonberg <schonberg@adacore.com>
3015 * sem_ch3.adb (Build_Derived_Type): Inherit the convention from the
3016 base type, because the parent may be a subtype of a private type whose
3017 convention is established in a private part.
3019 2011-08-02 Hristian Kirtchev <kirtchev@adacore.com>
3021 * exp_ch6.adb (Expand_N_Extended_Return_Statement): Wrap the return
3022 statement in a block when the expansion of the return expression has
3023 created a finalization chain.
3024 * freeze.adb (Freeze_Expression): Alphabetize all choices associated
3025 with the parent node.
3026 Add N_Extended_Return_Statement to handle the case where a transient
3027 object declaration appears in the Return_Object_Declarations list of
3028 an extended return statement.
3030 2011-08-02 Matthew Gingell <gingell@adacore.com>
3032 * adaint.c (__gnat_is_symbolic_link_attr): Supress warning on possibly
3033 unused parameter 'name'.
3035 2011-08-02 Ed Schonberg <schonberg@adacore.com>
3037 * sem_elim.adb (Set_Eliminated): If the overridden operation is an
3038 inherited operation, check whether its alias, which is the source
3039 operastion that it renames, has been marked eliminated.
3041 2011-08-02 Javier Miranda <miranda@adacore.com>
3043 * exp_util.adb (Safe_Prefixed_Reference): Do not consider safe an
3044 in-mode parameter whose type is an access type since it can be used to
3045 modify its designated object. Enforce code that handles as safe an
3046 access type that is not access-to-constant but it is the result of a
3047 previous removal of side-effects.
3048 (Remove_Side_Effects): Minor code reorganization of cases which require
3049 no action. Done to incorporate documentation on new cases uncovered
3050 working in this ticket: no action needed if this routine was invoked
3051 too early and the nodes are not yet decorated.
3052 * sem_res.adb (Resolve_Slice): Minor code cleanup replacling two calls
3053 to routine Remove_Side_Effects by calls to Force_Evaluation since they
3054 were issued with actuals that are implicitly provided by
3057 2011-08-02 Robert Dewar <dewar@adacore.com>
3059 * sem_ch3.adb, sem_res.adb: Minor reformatting.
3061 2011-08-02 Yannick Moy <moy@adacore.com>
3063 * sem_attr.adb (Check_Formal_Restriction_On_Attribute): new procedure
3064 to issue an error in formal mode on attribute not supported in this mode
3065 (Analyze_Attribute): issue errors on standard attributes not supported
3067 * sem_ch3.adb (Modular_Type_Declaration): remove obsolete part of
3068 comment, and issue error in formal mode on modulus which is not a power
3070 (Process_Range_Expr_In_Decl): issue error in formal mode on non-static
3072 * sem_ch8.adb (Find_Type): issue error in formal mode on 'Base in
3074 * sem_res.adb (Resolve_Unary_Op): issue error in formal mode on unary
3075 operator on modular type (except 'not').
3077 2011-08-02 Robert Dewar <dewar@adacore.com>
3079 * gnat_rm.texi: Minor reformatting.
3081 2011-08-02 Arnaud Charlet <charlet@adacore.com>
3083 * s-osinte-linux.ads: Minor comment update and reformatting.
3084 * i-cexten.ads: Make this unit pure, as for its parent.
3085 Will allow its usage in more contexts if needed.
3087 2011-08-02 Robert Dewar <dewar@adacore.com>
3089 * s-utf_32.ads: Minor comment fix.
3091 2011-08-02 Ed Schonberg <schonberg@adacore.com>
3093 * sem_res.adb (Resolve_Actuals): if the subprogram is a primitive
3094 operation of a tagged synchronized type, handle the case where the
3095 controlling argument is overloaded.
3097 2011-08-02 Yannick Moy <moy@adacore.com>
3099 * gnat_rm.texi, opt.ads, sem_prag.adb, snames.ads-tmpl:
3100 Replace pragma SPARK_95 with pragma Restrictions (SPARK)
3101 * par-prag.adb (Process_Restrictions_Or_Restriction_Warnings): set
3102 SPARK mode and formal verification mode on processing SPARK restriction
3103 * s-rident.ads (Restriction_Id): add SPARK restriction in those not
3104 requiring consistency checking.
3106 2011-08-02 Robert Dewar <dewar@adacore.com>
3108 * sem_res.adb: Minor reformatting.
3110 2011-08-02 Robert Dewar <dewar@adacore.com>
3112 * a-cfdlli.ads, a-cfhase.ads, a-cforma.ads, a-cfhama.ads,
3113 a-cforse.ads: Remove unneeded with of Ada.Containers
3114 Remove commented out pragma Inline's
3115 Move specifications of new subprograms to the actual specs
3117 2011-08-02 Yannick Moy <moy@adacore.com>
3119 * a-cfdlli.ads, a-cfhase.ads, a-cforma.ads, a-cfhama.ads,
3120 a-cforse.ads: Update comments.
3122 2011-08-02 Ed Schonberg <schonberg@adacore.com>
3124 * sem_attr.adb: add attribute name when 'Result has the wrong prefix.
3126 2011-08-02 Robert Dewar <dewar@adacore.com>
3128 * a-cfdlli.ads, a-cfhase.ads, a-cforma.ads, a-cfhama.ads,
3129 a-cforse.ads, a-cofove.ads: Minor reformatting.
3131 2011-08-02 Claire Dross <dross@adacore.com>
3133 * a-cfdlli.ads, a-cfhase.ads, a-cforma.ads, a-cfhama.ads, a-cforse.ads,
3134 a-cofove.ads: Add comments.
3136 2011-08-02 Yannick Moy <moy@adacore.com>
3138 * gnat_rm.texi: Document formal containers.
3140 2011-08-02 Emmanuel Briot <briot@adacore.com>
3142 * g-comlin.adb (Goto_Section, Getopt): fix handling of "*" when there
3145 2011-08-02 Robert Dewar <dewar@adacore.com>
3147 * mlib-prj.adb, restrict.ads, sem_aggr.adb, sem_ch12.adb: Minor
3150 2011-08-02 Robert Dewar <dewar@adacore.com>
3152 * aspects.adb: New aspects Default_Value and Default_Component_Value
3153 New format of Aspect_Names table checks for omitted entries
3154 * aspects.ads: Remove mention of Aspect_Cancel and add documentation on
3155 handling of boolean aspects for derived types.
3156 New aspects Default_Value and Default_Component_Value
3157 New format of Aspect_Names table checks for omitted entries
3158 * einfo.ads, einfo.adb (Has_Default_Component_Value): New flag
3159 (Has_Default_Value): New flag
3160 (Has_Default_Component_Value): New flag
3161 (Has_Default_Value): New flag
3162 * par-ch13.adb (P_Aspect_Specifications): New format of Aspect_Names
3164 * par-prag.adb: New pragmas Default_Value and Default_Component_Value
3165 * sem_ch13.adb (Analyze_Aspect_Specifications): New aspects
3166 Default_Value and Default_Component_Value
3167 * sem_prag.adb: New pragmas Default_Value and Default_Component_Value
3168 New aspects Default_Value and Default_Component_Value
3169 * snames.ads-tmpl: New pragmas Default_Value and Default_Component_Value
3170 * sprint.adb: Print N_Aspect_Specification node when called from gdb
3172 2011-08-02 Vincent Celier <celier@adacore.com>
3174 * prj-nmsc.adb (Check_Library_Attributes): For virtual library project,
3175 inherit library kind.
3177 2011-08-02 Ed Schonberg <schonberg@adacore.com>
3179 * sem_res.adb: Add guards in calls to Matching_Static_Array_Bounds.
3182 2011-08-02 Robert Dewar <dewar@adacore.com>
3184 * i-cstrin.ads: Updates to make Interfaces.C.Strings match RM
3186 2011-08-02 Yannick Moy <moy@adacore.com>
3188 * sem_aggr.adb (Resolve_Aggregate): Fix thinko.
3190 2011-08-02 Robert Dewar <dewar@adacore.com>
3192 * impunit.adb: Add comment.
3194 2011-08-02 Yannick Moy <moy@adacore.com>
3196 * sem_aggr.adb (Check_Qualified_Aggregate): new procedure which checks
3197 qualification of aggregates in formal mode
3198 (Is_Top_Level_Aggregate): returns True for an aggregate not contained in
3200 (Resolve_Aggregate): complete the test that an aggregate is adequately
3201 qualified in formal mode
3203 2011-08-02 Pascal Obry <obry@adacore.com>
3205 * make.adb, bindgen.adb, gnatbind.adb: Minor reformatting.
3206 * mlib-prj.adb: Supress warning when compiling binder generated file.
3207 (Build_Library): Supress all warnings when compiling the binder
3210 2011-08-02 Yannick Moy <moy@adacore.com>
3212 * errout.adb, errout.ads (Check_Formal_Restriction): move procedure
3214 * restrict.adb, restrict.ads (Check_Formal_Restriction): ...to here
3215 * sem_aggr.adb, sem_ch5.adb, sem_util.adb:
3216 Add with/use clauses to make Check_Formal_Restriction visible
3218 2011-08-02 Ed Schonberg <schonberg@adacore.com>
3220 * sem_ch12.adb (Check_Generic_Actuals): handle properly actual
3221 in-parameters when type of the generic formal is private in the generic
3222 spec and non-private in the body.
3224 2011-08-02 Claire Dross <dross@adacore.com>
3226 * a-cfdlli.adb, a-cfdlli.ads, a-cfhase.adb, a-cfhase.ads, a-cfhama.adb,
3227 a-cfhama.ads, a-cforse.adb, a-cforse.ads, a-cforma.adb, a-cforma.ads,
3228 a-cofove.adb, a-cofove.ads: New files implementing formal containers.
3229 * impunit.adb, Makefile.rtl: Take new files into account.
3231 2011-08-02 Robert Dewar <dewar@adacore.com>
3233 * sem_aggr.adb, sem_ch3.adb, sem_ch5.adb, make.adb, sem_res.adb,
3234 sem_attr.adb, sem_ch6.adb, sem_ch8.adb: Minor reformatting.
3236 2011-08-02 Yannick Moy <moy@adacore.com>
3238 * sem_aggr.adb (Resolve_Aggregate): disable incorrectly placed check in
3240 * sem_util.adb (Matching_Static_Array_Bounds): proper detection of
3241 matching static array bounds, taking into account the special case of
3243 * sem_ch3.adb: Typo in comment.
3245 2011-08-02 Yannick Moy <moy@adacore.com>
3247 * errout.adb, errout.ads (Check_Formal_Restriction): new procedure
3248 which issues an error in formal mode if its argument node is originally
3250 * sem_ch3.adb (Analyze_Full_Type_Declaration): move test that a type
3251 has a discriminant specification so that it does not include the case
3253 (Derived_Type_Declaration): move here the test that a derived type has a
3254 discriminant specification
3255 * sem_aggr.adb (Resolve_Record_Aggregate): test the presence of the
3256 first element of a component association before accessing its choices
3257 (presence of component association is not enough)
3258 * exp_ch6.adb (Expand_N_Subprogram_Declaration): test if a subprogram
3259 declaration is a library item before accessing the next element in a
3260 list, as library items are not member of lists
3261 * sem_attr.adb, sem_ch11.adb, sem_ch4.adb, sem_ch5.adb, sem_ch6.adb,
3262 sem_ch8.adb, sem_ch9.adb, sem_res.adb, sem_util.adb: use
3263 Check_Formal_Restriction whenever possible.
3265 2011-08-02 Ed Schonberg <schonberg@adacore.com>
3267 * sem_ch3.adb (Find_Type_Of_Object): In ASIS mode, create an itype
3268 reference when needed.
3270 2011-08-02 Bob Duff <duff@adacore.com>
3272 * gnat_ugn.texi: Fix typo.
3274 2011-08-02 Vincent Celier <celier@adacore.com>
3276 * make.adb (Gnatmake): Use MLib.Tgt.Archive_Ext as the extension of
3277 archive file name. Do not use the full path name of archives for Open
3280 2011-08-02 Robert Dewar <dewar@adacore.com>
3282 * sem_ch12.adb, sem_ch11.adb: New calling sequence for
3283 Analyze_Aspect_Specifications
3285 (Analyze_Aspect_Specifications): New handling for boolean aspects
3286 * sem_ch13.ads (Analyze_Aspect_Specifications): New calling sequence
3287 * sem_ch3.adb, sem_ch6.adb, sem_ch7.adb, sem_ch9.adb: New calling
3288 sequence for Analyze_Aspect_Specifications
3289 * sem_prag.adb (Analyze_Pragma): Remove use of Aspect_Cancel entirely
3290 * sinfo.ads, sinfo.adb (Aspect_Cancel): Remove, no longer used
3292 2011-08-02 Robert Dewar <dewar@adacore.com>
3294 * freeze.adb (Freeze_Entity): Remove handling of delayed boolean
3295 aspects, since these no longer exist.
3297 2011-08-02 Robert Dewar <dewar@adacore.com>
3299 * par-ch13.adb (Aspect_Specifications_Present): Always return false on
3300 semicolon, do not try to see if there are aspects following it.
3301 * par-ch3.adb (P_Declarative_Items): Better message for unexpected
3304 2011-08-02 Robert Dewar <dewar@adacore.com>
3306 * sem_ch8.adb, aspects.ads: Minor reformatting.
3308 2011-08-02 Eric Botcazou <ebotcazou@adacore.com>
3310 * sem_ch13.ads (Analyze_Aspect_Specification): Add pragma Inline.
3311 * sem_ch13.adb (Analyze_Non_Null_Aspect_Specifications): New procedure
3313 (Analyze_Aspect_Specifications): ...here. Call above procedure.
3315 2011-08-02 Yannick Moy <moy@adacore.com>
3317 * exp_ch6.adb (Expand_N_Subprogram_Declaration): issue error in formal
3318 mode on subprogram declaration outside of package specification, unless
3319 it is followed by a pragma Import
3320 * sem_ch3.adb (Access_Definition, Access_Subprogram_Declaration,
3321 Access_Type_Declaration): issue error in formal mode on access type
3322 (Analyze_Incomplete_Type_Decl): issue error in formal mode on
3324 (Analyze_Object_Declaration): issue error in formal mode on object
3325 declaration which does not respect SPARK restrictions
3326 (Analyze_Subtype_Declaration): issue error in formal mode on subtype
3327 declaration which does not respect SPARK restrictions
3328 (Constrain_Decimal, Constrain_Float, Constrain_Ordinary_Fixed): issue
3329 error in formal mode on digits or delta constraint
3330 (Decimal_Fixed_Point_Type_Declaration): issue error in formal mode on
3331 decimal fixed point type
3332 (Derived_Type_Declaration): issue error in formal mode on derived type
3333 other than type extensions of tagged record types
3334 * sem_ch6.adb (Process_Formals): remove check in formal mode, redundant
3335 with check on access definition
3336 * sem_ch9.adb (Analyze_Protected_Definition): issue error in formal
3337 mode on protected definition.
3338 (Analyze_Task_Definition): issue error in formal mode on task definition
3340 2011-08-02 Robert Dewar <dewar@adacore.com>
3342 * make.adb, sem_ch8.adb, s-inmaop-vxworks.adb: Minor reformatting.
3344 2011-08-02 Javier Miranda <miranda@adacore.com>
3346 * sem_ch6.adb (Can_Override_Operator): New function.
3347 (Verify_Overriding_Indicator): Add missing code to check overriding
3348 indicator in operators. Fixes regression.
3349 (Check_Overriding_Indicator): Minor reformating after replacing the
3350 code that evaluates if the subprogram can override an operator by
3351 invocations to the above new function.
3353 (Write_Field26_Name): Add missing code to ensure that, following
3354 the documentation in einfo.ads, this field is not shown as attribute
3355 "Static_Initialization" on non-dispatching functions.
3357 2011-08-02 Jose Ruiz <ruiz@adacore.com>
3359 * sem_res.adb (Resolve_Call): A call to
3360 Ada.Real_Time.Timing_Events.Set_Handler violates restriction
3361 No_Relative_Delay (AI-0211) only when it sets a relative timing event,
3362 i.e., when the second parameter is of type Time_Span.
3364 2011-08-02 Vincent Celier <celier@adacore.com>
3366 * make.adb (Gnatmake): use <library dir>/lib<library name>.a to link
3367 with an archive instead of -L<library dir> -l<library name>.
3369 2011-08-02 Ed Schonberg <schonberg@adacore.com>
3371 * sem_ch8.adb (Analyze_Use_Type): If the clause is being re-analyzed,
3372 mark the base types In_Use in addition to making the operations
3375 2011-08-02 Ed Falis <falis@adacore.com>
3377 * init.c: add and setup __gnat_signal_mask for the exception signals
3378 * s-inmaop-vxworks.adb: new file.
3379 * s-intman-vxworks.adb: remove unnecessary initializations and
3381 * s-intman-vxworks.ads: remove unnecessary variable
3382 * s-taprop-vxworks.adb: simplify signal initialization
3384 2011-08-02 Robert Dewar <dewar@adacore.com>
3386 * sem_ch8.adb: Minor code reorganization, comment updates.
3388 2011-08-02 Robert Dewar <dewar@adacore.com>
3390 * sem_res.adb (Matching_Static_Array_Bounds): Moved to Sem_Util
3391 * sem_util.ads, sem_util.adb (Matching_Static_Array_Bounds): Moved
3393 (Matching_Static_Array_Bounds): Use Is_Ok_Static_Expression
3394 (Matching_Static_Array_Bounds): Moved here from Sem_Res
3396 2011-08-02 Ed Schonberg <schonberg@adacore.com>
3398 * atree.h, atree.ads, atree.adb: New subprograms to manipulate Elist5.
3399 * par_ch8.adb (P_Use_Type): initialize Used_Operations for node.
3400 * sinfo.ads, sinfo.adb (Used_Operations): new attribute of
3401 use_type_clauses, to handle more efficiently use_type and use_all_type
3403 * sem_ch8.adb: Rewrite Use_One_Type and End_Use_Type to handle the
3404 Ada2012 Use_All_Type clause.
3405 (Use_Class_Wide_Operations): new procedure.
3407 2011-08-02 Robert Dewar <dewar@adacore.com>
3409 * exp_util.adb, par-ch10.adb, par-ch6.adb, sem.adb, sem_ch6.adb,
3410 sem_ch6.ads, sinfo.adb, sinfo.ads, sprint.adb: Change parameterized
3411 expression to expression function.
3413 2011-08-02 Ed Schonberg <schonberg@adacore.com>
3415 * sem_ch4.adb: transform simple Ada2012 membership into equality only
3416 if types are compatible.
3418 2011-08-02 Yannick Moy <moy@adacore.com>
3420 * sem_res.adb (Matching_Static_Array_Bounds): new function which
3421 returns True if its argument array types have same dimension and same
3422 static bounds at each index.
3423 (Resolve_Actuals): issue an error in formal mode on actuals passed as
3424 OUT or IN OUT paramaters which are not view conversions in SPARK.
3425 (Resolve_Arithmetic_Op): issue an error in formal mode on
3426 multiplication or division with operands of fixed point types which are
3427 not qualified or explicitly converted.
3428 (Resolve_Comparison_Op): issue an error in formal mode on comparisons of
3429 Boolean or array type (except String) operands.
3430 (Resolve_Equality_Op): issue an error in formal mode on equality
3431 operators for array types other than String with non-matching static
3433 (Resolve_Logical_Op): issue an error in formal mode on logical operators
3434 for array types with non-matching static bounds. Factorize the code in
3435 Matching_Static_Array_Bounds.
3436 (Resolve_Qualified_Expression): issue an error in formal mode on
3437 qualified expressions for array types with non-matching static bounds.
3438 (Resolve_Type_Conversion): issue an error in formal mode on type
3439 conversion for array types with non-matching static bounds
3441 2011-08-02 Robert Dewar <dewar@adacore.com>
3443 * par-ch10.adb: Minor code reorganization (use Nkind_In).
3445 2011-08-02 Ed Schonberg <schonberg@adacore.com>
3447 * par-ch9.adb: save location of entry for proper error message.
3449 2011-08-02 Javier Miranda <miranda@adacore.com>
3451 * sem_type.ads, sem_type.adb (Is_Ancestor): Addition of a new formal
3452 (Use_Full_View) which permits this routine to climb through the
3453 ancestors using the full-view of private parents.
3454 * sem_util.adb (Collect_Interfaces_Info, Implements_Interface): Set
3455 Use_Full_View to true in calls to Is_Ancestor.
3456 * sem_disp.adb (Override_Dispatching_Operation): Set Use_Full_View to
3457 true in call to Is_Ancestor.
3458 * exp_ch3.adb (Build_Offset_To_Top_Functions, Initialize_Tag): Set
3459 Use_Full_View to true in call to Is_Ancestor.
3460 * exp_ch7.adb (Controller_Component): Set Use_Full_View to true in
3461 call to Is_Ancestor.
3462 * exp_ch4.adb (Expand_N_Type_Conversion, Tagged_Membership): Set
3463 Use_Full_View to true in calls to Is_Ancestor.
3464 * exp_disp.adb (Expand_Interface_Actuals, Make_Secondary_DT, Make_DT,
3465 Make_Select_Specific_Data_Table, Register_Primitive,
3466 Set_All_DT_Position): Set Use_Full_View to true in calls to Is_Ancestor.
3467 * exp_intr.adb (Expand_Dispatching_Constructor_Call): Set Use_Full_View
3468 to true in call to Is_Ancestor.
3469 * exp_util.adb (Find_Interface_ADT, Find_Interface_Tag): Set
3470 Use_Full_View to true in calls to Is_Ancestor.
3472 (Write_Call_Info): Set Use_Full_View to true in call to Is_Ancestor.
3473 (Write_Type_Info): Set Use_Full_View to true in call to Is_Ancestor.
3475 2011-08-02 Robert Dewar <dewar@adacore.com>
3477 * gnat_rm.texi: Minor reformatting.
3478 * sem_prag.adb: Minor reformatting.
3480 2011-08-02 Tristan Gingold <gingold@adacore.com>
3482 * vms_data.ads: Add VMS qualifier for -gnateP.
3484 2011-08-02 Robert Dewar <dewar@adacore.com>
3486 * par-ch13.adb (P_Aspect_Specification): New meaning of Decl = Empty
3487 * par-ch7.adb (P_Package): Proper placement of aspects for package
3489 * par-endh.adb (Check_End): Ad Is_Sloc parameter
3490 (End_Statements): Add Is_Sloc parameterr
3491 * par.adb (P_Aspect_Specification): New meaning of Decl = Empty
3492 (Check_End): Ad Is_Sloc parameter
3493 (End_Statements): Add Is_Sloc parameterr
3495 2011-08-02 Vincent Celier <celier@adacore.com>
3497 * ug_words: Add VMS qualifier equivalent to -gnateP:
3498 /SYMBOL_PREPROCESSING.
3500 2011-08-02 Jose Ruiz <ruiz@adacore.com>
3502 * gnat-style.texi: For hexadecimal numeric literals the typical
3503 grouping of digits is 4 to represent 2 bytes.
3504 A procedure spec which is split into several lines is indented two
3507 2011-08-02 Yannick Moy <moy@adacore.com>
3509 * exp_aggr.adb (Is_Others_Aggregate): move function to other unit.
3510 * sem_aggr.adb, sem_aggr.ads (Is_Others_Aggregate): move function here
3511 (Resolve_Aggregate): issue errors in formal modes when aggregate is not
3513 (Resolve_Array_Aggregate): issue errors in formal modes on non-static
3514 choice in array aggregate
3515 (Resolve_Extension_Aggregate): issue errors in formal modes on subtype
3517 (Resolve_Record_Aggregate): issue errors in formal modes on mixed
3518 positional and named aggregate for record, or others in record
3519 aggregate, or multiple choice in record aggregate
3520 * sem_res.adb (Resolve_Logical_Op): issue errors in formal mode when
3521 array operands to logical operations AND, OR and XOR do not have the
3522 same static lower and higher bounds
3523 * sem_ch5.adb, sinfo.ads: Correct typos in comments
3525 2011-08-01 Robert Dewar <dewar@adacore.com>
3527 * sem_util.ads, sem_util.adb, sem_ch6.adb (Last_Source_Statement):
3528 Replaces Last_Source_Node_In_Sequence.
3529 * err_vars.ads (Error_Msg_Lang): 16 is OK, don't need 4K
3530 * errout.adb (Set_Error_Msg_Lang): Takes arg with no parens, but stores
3531 parens and blank in string (this was inconsistently implemented).
3533 (Set_Error_Msg_Lang): Takes arg with no parens, but stores parens and
3534 blank in string (this was inconsistently implemented).
3536 (Set_Global_Switches): Set formal mode switches appropriately
3537 * opt.ads, opt.adb: Formal mode is now global switches, more consistent
3539 (Analyze_Pragma, case SPARK_95): Set opt switches appropriately and
3540 call Set_Error_Msg_Lang to set "spark" as language name.
3541 * par.adb: Remove unnecessary call to set formal language for errout
3542 * sem_prag.adb (P_Pragma, case SPARK_95): Set opt switches
3543 appropriately and call Set_Error_Msg_Lang to set "spark" as language
3545 * sem_ch4.adb (Analyze_Concatenation_Operand): remove procedure and
3546 calls to it, moved after resolution so that types are known
3547 * sem_res.adb (Resolve_Op_Concat): issue an error in formal mode if
3548 result of concatenation is not of type String
3549 (Resolve_Op_Concat_Arg): issue an error in formal mode if an operand of
3550 concatenation is not properly restricted
3551 * gnat_rm.texi: Add doc on pragma Spark_95.
3552 * gcc-interface/Makefile.in: Remove obsolete target pairs for
3553 Interfaces.C.* on VMS. Remove s-parame-vms-restrict.ads.
3554 * gcc-interface/Make-lang.in: Update dependencies.
3556 2011-08-01 Javier Miranda <miranda@adacore.com>
3558 * sem_disp.adb (Override_Dispatching_Operation): Enforce strictness of
3559 condition that detects if the overridden operation must replace an
3562 2011-08-01 Javier Miranda <miranda@adacore.com>
3564 * exp_ch4.adb (Expand_N_Case_Expression): Propagate to the expanded
3565 code declarations inserted by Insert_Actions in each alternative of the
3566 N_Case_Expression node.
3568 2011-08-01 Robert Dewar <dewar@adacore.com>
3570 * sem_ch6.adb: Minor code reorganization.
3571 * sem_util.adb: Minor reformatting.
3573 2011-08-01 Pascal Obry <obry@adacore.com>
3575 * prj-env.adb: Remove <prefix>/lib/gpr/<target> project search path.
3576 * gnat_ugn.texi: Add documentation for VERSIONINFO Windows resource.
3578 2011-08-01 Yannick Moy <moy@adacore.com>
3580 * par-ch4.adb (P_Name): issue a syntax error in SPARK mode on character
3581 literal or operator symbol which is prefixed
3582 * sem_attr.adb (Analyze_Access_Attribute): issue an error in formal
3583 mode on access attributes.
3584 * sem_ch4.adb (Analyze_Concatenation_Operand): new procedure to check
3585 that concatenation operands are properly restricted in formal mode
3586 (Analyze_Concatenation, Analyze_Concatenation_Rest): call new procedure
3587 Analyze_Concatenation_Operand. Issue an error in formal mode if the
3588 result of the concatenation has a type different from String.
3589 (Analyze_Conditional_Expression, Analyze_Explicit_Dereference,
3590 Analyze_Quantified_Expression, Analyze_Slice,
3591 Analyze_Null): issue an error in formal mode on unsupported constructs
3593 (Analyze_Block_Statement): only issue error on source block statement
3594 * sem_util.ads, sem_util.adb (Last_Source_Node_In_Sequence): new
3595 function which returns the last node in a list of nodes for which
3596 Comes_From_Source returns True, if any
3597 * sem_ch6.adb (Check_Missing_Return): minor refactoring to use
3598 Last_Source_Node_In_Sequence
3599 * sem_ch8.adb (Analyze_Exception_Renaming, Analyze_Generic_Renaming,
3600 Analyze_Object_Renaming, Analyze_Use_Package): issue an error in formal
3601 mode on unsupported constructs
3602 * sem_ch9.adb Do not return after issuing error in formal mode, as the
3603 rest of the actions may be needed later on since the error is marked as
3605 * sinfo.ads: Typos in comments.
3607 2011-08-01 Pascal Obry <obry@adacore.com>
3609 * projects.texi: Minor editing.
3611 2011-08-01 Yannick Moy <moy@adacore.com>
3613 * err_vars.ads (Error_Msg_Lang, Error_Msg_Langlen): new variables for
3614 insertion character ~~
3615 * errout.ads, errout.adb (Formal_Error_Msg_...): remove procedures
3616 (Set_Error_Msg_Lang): new procedure which fixes the language for use
3617 with insertion character ~~
3618 (Set_Msg_Text): treat insertion character ~~
3619 * par-ch4.adb, par-ch5.adb, par-endh.adb, sem_attr.adb, sem_ch11.adb,
3620 sem_ch3.adb, sem_ch5.adb, sem_ch9.adb, sem_util.adb: Replace calls to
3621 Formal_Error_Msg_... procedures by equivalent Error_Msg_...
3622 procedures. Favor calls to Error_Msg_F(E) over Error_Msg_N(E). Make
3623 errors related to the formal language restriction not serious
3624 (insertion character |).
3625 * par.adb (Par): set formal language for error messages if needed
3626 * sem_ch6.adb (Check_Missing_Return): take into account possible
3627 generated statements at the end of the function
3628 * snames.ads-tmpl (Name_SPARK_95, Pragma_SPARK_95): new variable and
3629 enumeration value to define a new pragma SPARK_95
3630 * opt.ads, opt.adb (SPARK_Version_Type, SPARK_Version_Default,
3631 SPARK_Version): new type and variables to store the SPARK version
3633 (SPARK_Mode): return True when SPARK_Version is set
3634 * par-prag.adb: Correct indentation
3635 (Prag): take Pragma_SPARK_95 into account
3636 * sem_prag.adb (Set_Mechanism_Value, Sig_Flags): take Pragma_SPARK_95
3639 2011-08-01 Robert Dewar <dewar@adacore.com>
3641 * sem_ch3.adb, sem_ch3.ads, sem_ch5.adb, prj-part.adb, par-ch4.adb,
3642 sem_util.adb, sem_ch4.adb, sem_ch6.adb, sem_ch6.ads, sem_ch8.adb,
3643 sem_ch8.ads, sem_ch13.ads, par-ch5.adb, prj-env.ads: Minor reformatting
3645 2011-08-01 Pascal Obry <obry@adacore.com>
3647 * prj-part.ads, prj-part.adb (Parse): Add Target_Name parameter. Pass
3648 Target_Name to Get_Path call.
3649 (Parse_Single_Project): Likewise.
3650 (Post_Parse_Context_Clause): Likewise.
3651 * prj-env.ads, prj-env.adb (Find_Project): Add Target_Name parameter.
3652 Call Initialise_Project_Path with the proper Target_Name.
3653 (Initialize_Project_Path): Add <gnat_root>/<target_name>/lib/gnat
3655 (Get_Path): Add Target_Name parameter. Call Initialise_Project_Path
3656 with the proper Target_Name.
3657 * prj-conf.adb (Get_Or_Create_Configuration_File): Pass Target_Name to
3659 (Parse_Project_And_Apply_Config): Likewise.
3660 * prj-makr.adb (Initialize): Pass empty Target_Name to Parse routine.
3661 This is fine as this part of the code is supporting only native
3663 * prj-pars.adb (Parse): Pass empty Target_Name to Parse routine. This
3664 is fine as this part of the code is supporting only native compilation.
3666 2011-08-01 Yannick Moy <moy@adacore.com>
3668 * sem_util.adb (Enter_Name): issue error in formal mode on declaration
3669 of homonym, unless the homonym is one of the cases allowed in SPARK
3670 * par-ch5.adb (Parse_Decls_Begin_End): issue error in SPARK mode for
3671 package declaration occurring after a body.
3673 2011-08-01 Robert Dewar <dewar@adacore.com>
3675 * checks.adb, exp_ch4.adb: Minor reformatting.
3677 2011-08-01 Javier Miranda <miranda@adacore.com>
3679 * einfo.ads (Access_Disp_Table): Fix documentation.
3680 (Dispatch_Table_Wrappers): Fix documentation.
3682 2011-08-01 Pascal Obry <obry@adacore.com>
3684 * prj-env.adb, prj-env.ads: Minor reformatting.
3686 2011-08-01 Yannick Moy <moy@adacore.com>
3688 * sem_util.ads, sem_util.adb, par.adb, par_util.adb
3689 (Formal_Error_Msg, Formal_Error_Msg_N, Formal_Error_Msg_SP): move
3690 procedures out of these packages.
3691 * errout.ads, errout.adb
3692 (Formal_Error_Msg, Formal_Error_Msg_N, Formal_Error_Msg_SP): move
3693 procedures in of this package
3694 (Formal_Error_Msg_NE): new procedure for wrapper on Error_Msg_NE
3695 * par-ch5.adb (Parse_Decls_Begin_End): issue syntax error in SPARK mode
3696 on misplaced later vs initial declarations, like in Ada 83
3697 * sem_attr.adb (Processing for Analyze_Attribute): issue error in
3698 formal mode on attribute of private type whose full type declaration
3700 * sem_ch3.adb (Analyze_Declarations): issue error in formal mode on a
3701 package declaration inside a package specification
3702 (Analyze_Full_Type_Declaration): issue error in formal mode on
3703 controlled type or discriminant type
3704 * sem_ch6.adb (Analyze_Subprogram_Specification): only issue error on
3705 user-defined operator means that it should come from the source
3706 (New_Overloaded_Entity): issue error in formal mode on overloaded
3708 * sem_ch6.ads, sem_ch13.ads: typos in comments.
3710 2011-08-01 Thomas Quinot <quinot@adacore.com>
3712 * atree.adb: Minor reformatting.
3713 * checks.adb: Minor reformatting.
3715 2011-08-01 Vincent Celier <celier@adacore.com>
3717 * s-parame-vms-ia64.ads: Fix typo in comment
3719 * s-parame-vms-restrict.ads: Removed, unused.
3721 2011-08-01 Javier Miranda <miranda@adacore.com>
3724 (Is_Variable_Size_Array): Remove local subprogram Is_Constant_Bound.
3726 (Constrain_Index): Remove side effects in the evaluation of the bounds.
3727 * sem_ch3.ads, sem_ch3.adb
3728 (Is_Constant_Bound): New extended version of the subprogram that was
3729 previously located inside function Exp_Ch3.Is_Variable_Size_Array.
3730 Moved here since it is shared by routines of sem_ch3 and exp_ch3.
3731 * sem_aux.ads (Constant_Value): Fix typo in comment.
3732 * checks.adb (Generate_Index_Checks): New implementation which, for
3733 array objects with constant bounds, generates the runtime check
3734 referencing the bounds of the array type. For other cases this routine
3735 provides its previous behavior obtaining such values from the array
3737 * sem_res.adb (Set_Slice_Subtype): Link a copied range subtree with its
3739 * atree.adb (New_Copy): Reset flag Is_Overloaded in the new copy since
3740 we cannot have semantic interpretations of the new node.
3742 2011-08-01 Ed Schonberg <schonberg@adacore.com>
3744 * sem_ch6.adb (Fully_Conformant_Expressions): handle quantified
3747 2011-08-01 Arnaud Charlet <charlet@adacore.com>
3749 * sem_ch8.adb: Minor code editing.
3750 * s-vxwext.adb: Remove trailing space.
3751 * freeze.adb, freeze.ads, errout.ads, erroutc.adb: Fix GPLv3 header for
3752 consistency with other files.
3754 2011-08-01 Thomas Quinot <quinot@adacore.com>
3756 * s-auxdec.ads, s-auxdec-vms_64.ads: Minor reformatting.
3758 2011-08-01 Ed Schonberg <schonberg@adacore.com>
3760 * par-ch10.adb: reject parameterized expressions as compilation unit.
3761 * sem_ch4.adb: handle properly conditional expression with overloaded
3762 then_clause and no else_clause.
3764 2011-08-01 Tristan Gingold <gingold@adacore.com>
3766 * s-parame-vms-alpha.ads, s-parame-vms-ia64.ads: Redeclare C_Address
3767 like done by System.Aux_DEC.
3768 * env.c (__gnat_setenv) [VMS]: Put logicals into LNM$PROCESS table.
3770 2011-08-01 Yannick Moy <moy@adacore.com>
3772 * par-endh.adb (Check_End): issue a syntax error in SPARK mode for
3773 missing label at end of declaration (subprogram or package)
3774 * par-ch4.adb (P_Name): issue a syntax error in SPARK mode for mixing
3775 of positional and named parameter association
3776 * par.adb, par-util.adb (Formal_Error_Msg_SP): new wrapper on
3777 Error_Msg_SP which adds a prefix to the error message giving the name
3778 of the formal language analyzed
3779 * sem_ch6.adb (Analyze_Return_Type): issue an error in formal mode for
3780 access result type in subprogram, unconstrained array as result type,.
3781 (Analyze_Subprogram_Declaration): issue an error in formal mode for null
3783 * sem_ch8.adb: Code clean up.
3785 2011-08-01 Javier Miranda <miranda@adacore.com>
3787 * sem_ch7.adb (Uninstall_Declarations): Remove useless code.
3788 * einfo.ads (Access_Disp_Table): Fix documentation.
3789 (Dispatch_Table_Wrappers): Fix documentation.
3790 * einfo.adb (Access_Disp_Table, Dispatch_Table_Wrappers,
3791 Set_Access_Disp_Table, Set_Dispatch_Table_Wrappers): Fix the assertions
3792 to enforce the documentation of this attribute.
3793 (Set_Is_Interface): Cleanup the assertion.
3794 * exp_ch4.adb (Expand_Allocator_Expression, Tagged_Membership): Locate
3795 the Underlying_Type entity before reading attribute Access_Disp_Table.
3796 * exp_disp.adb (Expand_Dispatching_Call, Expand_Interface_Conversion):
3797 Locate the Underlying_Type before reading attribute Access_Disp_Table.
3798 * exp_aggr.adb (Build_Array_Aggr_Code, Build_Record_Aggr_Code): Locate
3799 the Underlying_Type entity before reading attribute Access_Disp_Table.
3800 * exp_ch3.adb (Build_Record_Init_Proc, Expand_N_Object_Declaration):
3801 Locate the Underlying_Type entity before reading attribute
3804 2011-08-01 Ed Schonberg <schonberg@adacore.com>
3806 * s-poosiz.ads: Additional overriding indicators.
3808 2011-08-01 Yannick Moy <moy@adacore.com>
3810 * sem_ch5.adb (Analyze_Exit_Statement): add return after error in
3812 (Analyze_Iteration_Scheme): issue error in formal mode when loop
3813 parameter specification does not include a subtype mark.
3814 * sem_ch6.adb (Analyze_Abstract_Subprogram_Declaration): issue error in
3815 formal mode on abstract subprogram.
3816 (Analyze_Subprogram_Specification): issue error in formal mode on
3817 user-defined operator.
3818 (Process_Formals): issue error in formal mode on access parameter and
3820 * sem_ch9.adb (Analyze_Abort_Statement,
3821 Analyze_Accept_Statement, Analyze_Asynchronous_Select,
3822 Analyze_Conditional_Entry_Call, Analyze_Delay_Relative,
3823 Analyze_Delay_Until, Analyze_Entry_Call_Alternative,
3824 Analyze_Requeue, Analyze_Selective_Accept,
3825 Analyze_Timed_Entry_Call): issue error in formal mode on such constructs
3826 * sem_ch11.adb (Analyze_Raise_Statement, Analyze_Raise_xxx_Error):
3827 issue error in formal mode on user-defined raise statement.
3829 2011-08-01 Thomas Quinot <quinot@adacore.com>
3831 * sem_ch6.adb (Enter_Overloaded_Entity): Do not warn about a
3832 declaration being hidden when overriding an implicit inherited
3834 * par-ch10.adb (P_Compilation_Unit): In syntax check only mode
3835 (-gnats), do not complain about a source file that contains only a
3838 2011-08-01 Ed Schonberg <schonberg@adacore.com>
3840 * sem_ch5.adb (Analyze_Iterator_Scheme): Do not overwrite type of loop
3841 variable if already set.
3843 2011-08-01 Arnaud Charlet <charlet@adacore.com>
3845 * g-socket-dummy.adb, s-osinte-linux.ads, g-socket-dummy.ads,
3846 g-debuti.adb, g-tasloc.adb, g-debuti.ads, g-tasloc.ads,
3847 s-osinte-hpux.ads, g-sercom.adb, g-soliop-solaris.ads, g-sercom.ads,
3848 g-sptain.ads, g-curexc.ads, s-tasloc.adb, s-tasloc.ads, s-tataat.adb,
3849 g-ctrl_c.adb, a-reatim.adb, s-tataat.ads, g-dirope.adb, g-ctrl_c.ads,
3850 g-dirope.ads, g-boubuf.adb, g-calend.adb, g-boubuf.ads, g-souinf.ads,
3851 g-table.adb, g-bytswa-x86.adb, g-wispch.adb, g-io.adb, g-table.ads,
3852 g-wispch.ads, g-io.ads, g-memdum.adb, g-memdum.ads, g-busorg.adb,
3853 g-busorg.ads, g-regpat.adb, g-sothco-dummy.adb, g-encstr.adb,
3854 g-regpat.ads, g-sothco-dummy.ads, s-osinte-aix.ads, g-encstr.ads,
3855 g-sercom-mingw.adb, s-mastop-vms.adb, g-diopit.adb, g-diopit.ads,
3856 s-vxwext.adb, g-dyntab.adb, g-dyntab.ads, g-crc32.adb,
3857 g-sercom-linux.adb, g-crc32.ads, s-regpat.adb, g-flocon.ads,
3858 s-regpat.ads, g-stheme.adb, g-sestin.ads, s-taspri-posix-noaltstack.ads,
3859 g-soliop.ads, s-inmaop-posix.adb, g-locfil.ads, g-enblsp-vms-alpha.adb,
3860 g-socthi-dummy.adb, g-socthi-dummy.ads, gnat.ads, g-moreex.adb,
3861 g-moreex.ads, g-dynhta.adb, g-dynhta.ads, g-deutst.ads, g-htable.adb,
3862 g-cgicoo.adb, g-htable.ads, g-cgicoo.ads, a-interr.adb,
3863 g-socthi-vms.adb, g-socthi-vms.ads, g-hesora.adb, g-bubsor.adb,
3864 g-hesora.ads, g-bubsor.ads, g-md5.adb, g-md5.ads, s-intman-irix.adb,
3865 s-htable.adb, s-osinte-vms.adb, s-htable.ads, s-osinte-vms.ads,
3866 s-taprob.adb, g-bytswa.adb, g-bytswa.ads, s-osinte-solaris-posix.ads,
3867 a-suenco.adb, g-comver.adb, g-comver.ads, g-exctra.adb,
3868 s-osinte-solaris.adb, g-exctra.ads, s-osinte-irix.ads,
3869 s-osinte-solaris.ads, a-caldel-vms.adb, g-socthi-vxworks.adb,
3870 g-expect.adb, g-socthi-vxworks.ads, g-expect.ads, g-comlin.ads,
3871 g-heasor.adb, g-heasor.ads, g-traceb.adb, g-traceb.ads, g-decstr.adb,
3872 g-spipat.adb, g-decstr.ads, g-spipat.ads, s-mastop-tru64.adb,
3873 g-except.ads, g-thread.adb, g-hesorg.adb, g-thread.ads, g-hesorg.ads,
3874 g-expect-vms.adb, a-stuten.ads, g-spchge.adb, g-spchge.ads,
3875 g-u3spch.adb, g-u3spch.ads, g-spitbo.adb, g-spitbo.ads,
3876 s-osinte-dummy.ads, s-osinte-posix.adb, g-pehage.adb, g-pehage.ads,
3877 s-gloloc-mingw.adb, g-sha1.ads, s-traceb-hpux.adb,
3878 g-trasym-unimplemented.adb, g-trasym-unimplemented.ads, g-io_aux.adb,
3879 g-regexp.adb, g-io_aux.ads, g-socthi-mingw.adb, g-regexp.ads,
3880 s-osinte-hpux-dce.adb, g-socthi-mingw.ads, g-cgi.adb,
3881 s-osinte-hpux-dce.ads, g-cgi.ads, g-byorma.adb, g-boumai.ads,
3882 g-byorma.ads, a-caldel.adb, s-regexp.adb, s-regexp.ads,
3883 g-soliop-mingw.ads, g-sptavs.ads, s-osinte-tru64.ads, g-speche.adb,
3884 g-speche.ads, g-socthi.adb, g-stsifd-sockets.adb, g-socthi.ads,
3885 s-osinte-darwin.ads, i-vxwork-x86.ads, g-awk.adb, i-vxwork.ads,
3886 g-awk.ads, g-zspche.adb, g-zspche.ads, g-socket.adb, g-sptabo.ads,
3887 g-socket.ads, g-semaph.adb, g-semaph.ads, s-taspri-posix.ads,
3888 g-enblsp-vms-ia64.adb, g-cgideb.adb, g-cgideb.ads, g-sothco.adb,
3889 s-osinte-freebsd.ads, g-sothco.ads, g-catiio.adb, g-casuti.adb,
3890 g-catiio.ads, g-casuti.ads, g-trasym.adb, g-trasym.ads, s-casuti.adb,
3891 g-os_lib.adb, s-traceb-mastop.adb, g-busora.adb, s-interr-dummy.adb,
3892 g-busora.ads, g-enutst.ads, s-os_lib.adb, a-tasatt.adb,
3893 s-osinte-mingw.ads: Update to GPLv3 run-time license.
3894 Use GNAT instead of GNARL.
3896 2011-08-01 Bob Duff <duff@adacore.com>
3898 * a-cdlili.ads, a-cihama.ads, a-coinve.ads, a-ciorse.ads, a-coorma.ads,
3899 a-cidlli.ads, a-ciormu.ads, a-cihase.ads, a-cohama.ads, a-coorse.ads,
3900 a-ciorma.ads, a-coormu.ads, a-convec.ads, a-cohase.ads: Minor
3903 2011-08-01 Yannick Moy <moy@adacore.com>
3905 * debug.adb (d.D) reverve flag for the SPARK mode
3906 (d.E) reverve flag for SPARK generation mode
3907 (d.F) reverve flag for Why generation mode
3908 * opt.ads, opt.adb (ALFA_Mode, ALFA_Through_SPARK_Mode,
3909 ALFA_Through_Why_Mode, Formal_Verification_Mode, SPARK_Mode): New
3910 functions which return True when the corresponding modes are set
3911 (Formal_Language): return "spark" or "alfa" when in formal verification
3913 * sem_util.ads, sem_util.adb (Formal_Error_Msg): new wrapper on
3914 Error_Msg to prefix the error message with a tag giving the formal
3916 (Formal_Error_Msg_N): new wrapper on Error_Msg_N to prefix the error
3917 message with a tag giving the formal language
3918 * sem_ch5.adb (Analyze_Block_Statement): issue error in formal mode on
3920 (Analyze_Case_Statement): issue error in formal mode on case statement
3921 with a single "others" case alternative
3922 (Analyze_Exit_Statement): issue errors in formal mode on exit
3923 statements which do not respect SPARK restrictions
3924 (Analyze_Goto_Statement): issue error in formal mode on goto statement
3925 (Check_Unreachable_Code): always issue an error (not a warning) in
3926 formal mode on unreachable code (concerns both code after an infinite
3927 loop and after an unconditional jump, both not allowed in SPARK)
3928 * sem_ch6.adb (Analyze_Return_Statement): add call to
3929 Set_Return_Present for a procedure containing a return statement
3930 (already done for functions in Analyze_Function_Return)
3931 (Analyze_Function_Return): issue error in formal mode on extended
3932 return or if return is not last statement in function
3933 (Check_Missing_Return): issue error in formal mode if function does
3934 not end with return or if procedure contains a return
3935 * sem_ch8.ads, sem_ch8.adb (Has_Loop_In_Inner_Open_Scopes): new
3936 function to detect if there is an inner scope of its parameter S which
3939 2011-08-01 Thomas Quinot <quinot@adacore.com>
3941 * sem_ch6.ads: Minor reformatting.
3943 2011-08-01 Javier Miranda <miranda@adacore.com>
3945 * sem_util.adb (Abstract_Interface_List): Complete condition when
3946 processing private type declarations to avoid reading unavailable
3948 (Is_Synchronized_Tagged_Type): Complete condition when processing
3949 private extension declaration nodes to avoid reading unavailable
3952 2011-08-01 Thomas Quinot <quinot@adacore.com>
3954 * sem_ch3.adb: Minor reformatting.
3956 2011-08-01 Thomas Quinot <quinot@adacore.com>
3958 * s-parame-ae653.ads, s-parame-vms-alpha.ads, s-parame-hpux.ads,
3959 i-cpoint.adb, i-cstrin.adb, i-cpoint.ads, i-cstrin.ads,
3960 s-parame-vms-ia64.ads, s-parame.ads, i-c.ads, s-parame-vxworks.ads,
3961 s-parame-vms-restrict.ads: Remove duplicated Interfaces.C.* packages
3962 for VMS, instead parametrize the common implementation with
3963 System.Parameters declarations.
3965 2011-08-01 Eric Botcazou <ebotcazou@adacore.com>
3967 * gnat_rm.texi: Document limitation of Pragma No_Strict_Aliasing.
3969 2011-08-01 Tristan Gingold <gingold@adacore.com>
3971 * seh_init.c: Fix SEH handler installation on win64.
3973 2011-08-01 Ed Schonberg <schonberg@adacore.com>
3975 * sem_ch3.adb (Access_Subprogram_Declaration): in Asis mode, prevent
3976 double analysis of an anonymous access to subprogram, because it can
3977 lead to improper sharing of profiles and a back-end crash.
3979 2011-08-01 Robert Dewar <dewar@adacore.com>
3981 * make.adb, sem_ch4.adb: Minor reformatting.
3982 * gcc-interface/Make-lang.in: Update dependencies.
3983 * sem_util.adb, exp_ch5.adb: Minor reformatting.
3985 2011-08-01 Arnaud Charlet <charlet@adacore.com>
3987 * gnat_rm.texi: Fix definition of Long_Integer.
3989 2011-08-01 Ed Schonberg <schonberg@adacore.com>
3991 * exp_aggr.adb: check limit size of static aggregate unconditionally,
3992 to prevent storage exhaustion.
3993 * exp_ch7.adb (Clean_Simple_Protected_Objects): if the scope being
3994 finalized is a function body, insert the cleanup code before the final
3995 return statement, to prevent spurious warnings.
3996 * s-pooglo.ads: add overriding indicator.
3998 2011-08-01 Ed Schonberg <schonberg@adacore.com>
4000 * sem_ch4.adb (Operator_Check): improve error message when both a
4001 with_clause and a use_clause are needed to make operator usage legal.
4002 * sem_util.ads, sem_util.adb (Unit_Is_Visible): new predicate to
4003 determine whether a compilation unit is visible within an other,
4004 either through a with_clause in the current unit, or a with_clause in
4005 its library unit or one one of its parents.
4007 2011-08-01 Ed Schonberg <schonberg@adacore.com>
4009 * exp_ch5.adb (Expand_N_Iterator_Loop): handle properly an iterator
4010 over an arbitrary expression of an array or container type.
4011 * lib-xref.adb: clarify comment.
4013 2011-08-01 Bob Duff <duff@adacore.com>
4015 * einfo.ads: Minor reformatting.
4016 * debug.adb: Minor comment improvement.
4018 2011-08-01 Javier Miranda <miranda@adacore.com>
4020 * sem_ch4.adb (Try_Object_Operation): For class-wide subprograms do not
4021 consider hidden subprograms as valid candidates.
4023 2011-08-01 Arnaud Charlet <charlet@adacore.com>
4025 * make.adb (Compile): Strip -mxxx switches in CodePeer mode.
4027 2011-08-01 Vasiliy Fofanov <fofanov@adacore.com>
4029 * gnat_ugn.texi: Fix typo.
4031 2011-08-01 Robert Dewar <dewar@adacore.com>
4033 * i-cstrin.adb, sem_util.adb, exp_ch11.adb, sem_ch8.adb,
4034 lib-xref.adb: Minor reformatting
4036 2011-08-01 Gary Dismukes <dismukes@adacore.com>
4038 * exp_ch6.adb (Expand_N_Extended_Return_Statement): Replace test of
4039 when to generate a call to Move_Final_List.
4040 (Has_Controlled_Parts): Remove this function.
4042 2011-08-01 Geert Bosch <bosch@adacore.com>
4044 * par-ch3.adb (P_Discrete_Choice_List): Improve error message for extra
4047 2011-08-01 Thomas Quinot <quinot@adacore.com>
4049 * exp_ch11.adb (Expand_N_Raise_Statement): Mark N_Raise_xxx_Error for
4050 explicit raise of a predefined exception as Comes_From_Source if the
4051 original N_Raise_Statement comes from source.
4053 2011-08-01 Robert Dewar <dewar@adacore.com>
4055 * sinfo.ads: Add comment.
4056 * sem_ch6.adb: Minor reformatting.
4058 2011-08-01 Robert Dewar <dewar@adacore.com>
4060 * freeze.adb (Freeze_Entity): Refine check for bad component size
4061 clause to avoid rejecting confirming clause when atomic/aliased present.
4063 2011-08-01 Ed Schonberg <schonberg@adacore.com>
4065 * sem_ch8.adb (Find_Direct_Name, Analyze_Expanded_Name): use Is_LHS to
4066 better determine whether an entity reference is a write.
4067 * sem_util.adb (Is_LHS): refine predicate to handle assignment to a
4069 * lib-xref.adb (Output_References): Do no suppress a read reference at
4070 the same location as an immediately preceeding modify-reference, to
4071 handle properly in-out actuals.
4073 2011-08-01 Tristan Gingold <gingold@adacore.com>
4075 * env.c (__gnat_setenv) [VMS]: Refine previous change.
4077 2011-08-01 Quentin Ochem <ochem@adacore.com>
4079 * i-cstrin.adb (New_String): Changed implementation, now uses only the
4080 heap to compute the result.
4082 2011-08-01 Robert Dewar <dewar@adacore.com>
4084 * atree.ads: Minor reformatting.
4086 2011-08-01 Emmanuel Briot <briot@adacore.com>
4088 * g-expect.adb (Get_Command_Output): Fix memory leak.
4090 2011-08-01 Geert Bosch <bosch@adacore.com>
4092 * cstand.adb (P_Float_Type): New procedure to print the definition of
4093 predefined fpt types.
4094 (P_Mixed_Name): New procedure to print a name using mixed case
4095 (Print_Standard): Use P_Float_Type for printing floating point types
4096 * einfo.adb (Machine_Emax_Value): Add preliminary support for quad
4097 precision IEEE float.
4099 2011-08-01 Thomas Quinot <quinot@adacore.com>
4101 * sem_ch3.adb: Minor reformatting.
4103 2011-08-01 Ed Schonberg <schonberg@adacore.com>
4105 * sem_ch6.adb (Analyze_Parameterized_Expression): If the expression is
4106 the completion of a generic function, insert the new body rather than
4107 rewriting the original.
4109 2011-08-01 Yannick Moy <moy@adacore.com>
4111 * sinfo.ads, errout.ads: Typos in comments.
4113 2011-08-01 Robert Dewar <dewar@adacore.com>
4115 * par-endh.adb: Minor reformatting.
4117 2011-08-01 Robert Dewar <dewar@adacore.com>
4119 * aspects.ads, aspects.adb: Add aspects for library unit pragmas
4120 (Pre_Post_Aspects): New subtype.
4121 * par-ch12.adb (P_Generic): New syntax for aspects in packages
4122 * par-ch13.adb (P_Aspect_Specifications): Add Semicolon parameter
4123 * par-ch7.adb (P_Package): Remove Decl parameter
4124 (P_Package): Handle new syntax for aspects (before IS)
4125 * par-ch9.adb (P_Protected_Definition): Remove Decl parameter, handle
4127 (P_Task_Definition): Remove Decl parameter, handle new aspect syntax
4128 * par.adb (P_Aspect_Specifications): Add Semicolon parameter
4129 (P_Package): Remove Decl parameter
4130 * sem_ch13.adb (Analyze_Aspect_Specifications): Handle library unit
4132 * sem_ch7.adb (Analyze_Package_Declaration): Analyze new format aspect
4134 * sem_util.ads, sem_util.adb (Static_Boolean): New function
4135 * sinfo.ads: Document new syntax for aspects in packages etc.
4136 * sprint.adb: Handle new syntax of aspects before IS in package
4138 2011-08-01 Thomas Quinot <quinot@adacore.com>
4140 * atree.ads: Minor reformatting.
4141 * sem_prag.adb: Minor reformatting.
4143 2011-08-01 Robert Dewar <dewar@adacore.com>
4145 * exp_util.adb (Insert_Actions): Fix error in handling Actions for
4146 case expr alternative.
4148 2011-08-01 Ed Schonberg <schonberg@adacore.com>
4150 * sem_ch12.adb: Fix typo.
4152 2011-08-01 Geert Bosch <bosch@adacore.com>
4154 * sem_prag.adb (Check_No_Link_Name): New procedure.
4155 (Process_Import_Or_Interface): Use Check_No_Link_Name.
4156 * cstand.adb (Create_Standard): Use Esize (Standard_Long_Long_Float)
4157 instead of Standard_Long_Long_Float_Size global. Preparation for
4158 eventual removal of per type constants.
4159 * exp_util.ads (Get_Stream_Size): New function returning the stream
4160 size value of subtype E.
4161 * exp_util.adb (Get_Stream_Size): Implement new function.
4162 * exp_strm.adb (Build_Elementary_Input_Call): Use Get_Stream_Size
4164 * exp_attr.adb (Attribute_Stream_Size): Use Get_Stream_Size
4166 (Machine_Mantissa_Value): Handle 128-bit quad precision IEEE floats
4168 2011-08-01 Geert Bosch <bosch@adacore.com>
4170 * cstand.adb: Fix comments.
4171 * sem_prag.adb (Analyze_Pragma): Use List_Length instead of explicit
4174 2011-08-01 Robert Dewar <dewar@adacore.com>
4176 * exp_ch4.adb, sem_cat.adb: Minor reformatting.
4178 2011-08-01 Geert Bosch <bosch@adacore.com>
4180 * atree.ads: Fix comment.
4182 2011-08-01 Robert Dewar <dewar@adacore.com>
4184 * aspects.ads, aspects.adb (Aspect_Names): Moved from body to spec.
4185 * par-ch13.adb (P_Aspect_Specifications): Check misspelled aspect name.
4186 * par.adb: Add with for Namet.Sp.
4187 * par-tchk.adb: Minor reformatting.
4189 2011-08-01 Vincent Celier <celier@adacore.com>
4191 * mlib-tgt-specific-vms-alpha.adb, mlib-tgt-specific-vms-ia64.adb
4192 (Build_Dynamic_Library): Use new function Init_Proc_Name to get the name
4193 of the init procedure of a SAL.
4194 * mlib-tgt-vms_common.ads, mlib-tgt-vms_common.adb (Init_Proc_Name):
4197 2011-08-01 Thomas Quinot <quinot@adacore.com>
4199 * exp_ch4.adb, s-tasini.ads, sem_attr.adb, s-soflin.ads: Minor
4202 2011-08-01 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
4204 * adaint.c (__gnat_file_time_name_attr): Get rid of warning.
4206 2011-08-01 Thomas Quinot <quinot@adacore.com>
4208 * sem_util.adb, sem_util.ads (Has_Overriding_Initialize): Make function
4209 conformant with its spec (return True only for types that have
4210 an overriding Initialize primitive operation that prevents them from
4211 having preelaborable initialization).
4212 * sem_cat.adb (Validate_Object_Declaration): Fix test for preelaborable
4213 initialization for controlled types in Ada 2005 or later mode.
4215 2011-08-01 Robert Dewar <dewar@adacore.com>
4217 * aspects.ads, aspects.adb: Add aspect Type_Invariant, Precondition,
4219 (Same_Aspect): New function.
4220 * sem_ch13.adb (Analyze_Aspect_Specifications): Add aspect
4221 Type_Invariant, Precondition, Postcondition.
4222 * snames.ads-tmpl: Add Name_Type_Invariant.
4224 2011-08-01 Robert Dewar <dewar@adacore.com>
4226 * freeze.adb (Freeze_Entity): Don't call Check_Aspect_At_Freeze_Point
4228 (Freeze_All_Ent): Fix error in handling inherited aspects.
4229 * sem_ch13.adb (Analyze_Aspect_Specifications): Skip aspect that is
4230 already analyzed, but don't skip entire processing of a declaration,
4231 that's wrong in some cases of declarations being rewritten.
4232 (Analyze_Aspect_Specification): Set Is_Delayed_Aspect in aspects.
4233 Don't delay for integer, string literals
4234 Treat predicates in usual manner for delay, remove special case code,
4236 (Analyze_Freeze_Entity): Make call to Check_Aspect_At_Freeze_Point
4237 (Build_Predicate_Function): Update saved expression in aspect
4238 (Build_Invariant_Procedure): Update saved expression in aspect
4239 * exp_ch4.adb (Expand_N_Selected_Component): Only do the optimization
4240 of replacement of discriminant references if the reference is simple.
4242 2011-08-01 Robert Dewar <dewar@adacore.com>
4244 * aspects.ads, aspects.adb: Add Static_Predicate and Dynamic_Predicate.
4245 * sem_ch13.adb (Analyze_Aspect_Specification): Add processing for
4246 Static_Predicate and Dynamic_Predicate.
4247 (Build_Predicate_Function): Add processing for Static_Predicate
4248 and Dynamic_Predicate.
4249 * sinfo.ads, sinfo.adb (From_Dynamic_Predicate): New flag
4250 (From_Static_Predicate): New flag
4251 * snames.ads-tmpl: Add Name_Static_Predicate and Name_Dynamic_Predicate
4253 2011-08-01 Robert Dewar <dewar@adacore.com>
4255 * usage.adb: Documentation cleanup for Ada version modes in usage.
4256 * expander.adb: Minor reformatting.
4258 2011-08-01 Robert Dewar <dewar@adacore.com>
4260 * atree.ads: Minor comment fix.
4261 * a-stwifi.adb, a-stzfix.adb, a-strfix.adb, a-ztexio.ads, a-textio.ads,
4262 a-witeio.ads, sem_prag.adb: Minor reformatting.
4264 2011-08-01 Doug Rupp <rupp@adacore.com>
4266 * env.c (__gnat_setenv) [VMS]: Force 32bit on item list structure
4267 pointers. Use descrip.h header file for convenience. Add some
4270 2011-08-01 Robert Dewar <dewar@adacore.com>
4272 * freeze.adb (Freeze_Entity): Call Check_Aspect_At_Freeze_Point
4273 (Freeze_All): Call Check_Aspect_At_End_Of_Declarations
4274 * sem_ch13.ads, sem_ch13.adb (Check_Aspect_At_Freeze_Point):
4276 (Check_Aspect_At_End_Of_Declarations): New procedure
4277 (Analye_Aspect_Specification): Minor changes for above procedures
4278 * sinfo.ads, sinfo.adb (Is_Delayed_Aspect): Now set in aspect
4279 specification node as well.
4281 2011-08-01 Pascal Obry <obry@adacore.com>
4283 * adaint.c (_gnat_stat): GetFilesAttributesEx() would fail on special
4284 Windows files. Use GetFilesAttributes() in this case to check for file
4285 existence instead of returning with an error code.
4287 2011-08-01 Vincent Celier <celier@adacore.com>
4289 * a-stzfix.adb, a-stwifi.adb (Replace_Slice): Fixed computation when
4290 High is above Source length.
4292 2011-08-01 Robert Dewar <dewar@adacore.com>
4294 * a-ztexio.ads, a-textio.ads, a-witeio.ads: Fix comment.
4296 2011-08-01 Robert Dewar <dewar@adacore.com>
4298 * aspects.ads (Boolean_Aspects): New subtype.
4299 * exp_ch13.adb (Expand_Freeze_Entity): Fix errors in handling aspects
4300 for derived types in cases where the parent type and derived type have
4302 * freeze.adb (Freeze_Entity): Fix problems in handling derived type
4303 with aspects when parent type also has aspects.
4304 (Freeze_Entity): Deal with delay of boolean aspects (must evaluate
4305 boolean expression at this point).
4306 * sem_ch13.adb (Analyze_Aspect_Specifications): Delay all aspects in
4307 accordance with final decision on the Ada 2012 feature.
4308 * sinfo.ads, sinfo.adb (Is_Boolean_Aspect): New flag.
4310 2011-08-01 Matthew Heaney <heaney@adacore.com>
4312 * a-chtgbo.adb (Delete_Node_Sans_Free): Replace iterator with selector.
4314 2011-08-01 Pascal Obry <obry@adacore.com>
4316 * a-stzunb-shared.adb, a-strunb-shared.adb, a-stwiun-shared.adb:
4317 Fix Replace_Slice when High is above current string size.
4318 (Replace_Slice): Fix DL computation when High is above current
4321 2011-08-01 Gary Dismukes <dismukes@adacore.com>
4323 * gnat_rm.texi: Add documentation for pragma Static_Elaboration_Desired.
4325 2011-08-01 Matthew Heaney <heaney@adacore.com>
4327 * a-rbtgbo.adb (Delete_Node_Sans_Free): Fixed assignment to left child
4330 2011-08-01 Pascal Obry <obry@adacore.com>
4332 * a-stzunb-shared.adb, a-strunb-shared.adb, a-stwiun-shared.adb: Minor
4335 2011-08-01 Ed Schonberg <schonberg@adacore.com>
4337 * sem_attr.adb (Analyze_Attribute, case 'Access): Handle properly named
4338 access to protected subprograms in generic bodies.
4339 * sem_ch6.adb (Analyze_Subprogram_Declaration): If the context is a
4340 protected type, indicate that the convention of the subprogram is
4341 Convention_Protected, because it may be used in subsequent declarations
4342 within the protected declaration.
4344 2011-08-01 Vincent Celier <celier@adacore.com>
4346 * mlib-prj.adb (Build_Library): Use "ada_" as the prefix for the "init"
4347 and "final" procedures when the name of the library is "ada", to avoid
4348 duplicate symbols "adainit" and "adafinal" in executables.
4350 2011-08-01 Ed Schonberg <schonberg@adacore.com>
4352 * sem_attr.adb (Analyze_Attribute, case 'Result): Handle properly a
4353 quantified expression that appears within a postcondition and uses the
4354 Ada2012 'Result attribute.
4356 2011-07-28 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
4358 * init.c (__gnat_error_handler): Cast reason to int.
4359 (__gnat_install_handler): Explain sa_sigaction use.
4361 2011-07-24 Eric Botcazou <ebotcazou@adacore.com>
4363 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Subprogram_Type>: If the
4364 subprogram has copy-in copy-out parameters, try to promote the mode of
4365 the return type if it is passed in registers.
4367 2011-07-24 Eric Botcazou <ebotcazou@adacore.com>
4369 * gcc-interface/utils2.c (build_binary_op) <ARRAY_REF>: Do not mark the
4370 left operand as addressable.
4372 2011-07-24 Eric Botcazou <ebotcazou@adacore.com>
4374 * gcc-interface/gigi.h (build_function_stub): Remove.
4375 (build_return_expr): Likewise.
4376 (convert_vms_descriptor): Declare.
4377 * gcc-interface/utils.c (convert_vms_descriptor): Make global.
4378 (build_function_stub): Move to...
4379 * gcc-interface/utils2.c (build_return_expr): Move to...
4380 * gcc-interface/trans.c (build_function_stub): ...here.
4381 (build_return_expr): ...here.
4382 (Subprogram_Body_to_gnu): Add local variable for language_function.
4383 Disconnect the parameter attributes cache, if any, once done with it.
4384 Call end_subprog_body only after setting the end_locus.
4385 Build the stub associated with the function, if any, at the very end.
4386 (gnat_to_gnu) <N_Return_Statement>: Remove couple of useless local
4387 variables and streamline control flow.
4389 2011-07-23 Arnaud Charlet <charlet@adacore.com>
4392 * gcc-interface/Makefile.in (powerpc-linux): Remove reference to
4395 2011-07-22 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
4398 * init.c [sun && __SVR4 && !__vxworks] (__gnat_install_handler):
4399 Assign to act.sa_sigaction.
4400 * tracebak.c [USE_GENERIC_UNWINDER] (__gnat_backtrace): Cast
4401 current->return_address to char * before arithmetic.
4403 2011-07-22 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
4405 * init.c [sgi] (__gnat_error_handler): Update sigaction(2) citation.
4406 Correct argument types.
4407 Extract code from reason.
4408 (__gnat_install_handler): Assign to act.sa_sigaction.
4410 2011-07-21 Eric Botcazou <ebotcazou@adacore.com>
4412 * gcc-interface/Make-lang.in (GNAT1_ADA_OBJS): Move ada/b_gnat1.o to...
4413 (GNAT1_OBJS): ...here.
4415 2011-07-15 Eric Botcazou <ebotcazou@adacore.com>
4418 * g-socthi-mingw.adb (Fill): Fix formatting.
4420 * gcc-interface/gigi.h: Move around comment.
4422 2011-07-14 John David Anglin <dave.anglin@nrc-cnrc.gc.ca>
4425 * s-taprop-hpux-dce.adb (Abort_Task): Remove unnecessary cast.
4427 2011-07-14 Florian Weimer <fw@deneb.enyo.de>
4430 * g-socthi-mingw.adb (Fill): Guard against invalid MSG_WAITALL.
4432 2011-07-13 Eric Botcazou <ebotcazou@adacore.com>
4434 * gcc-interface/utils.c (build_vms_descriptor32): Skip the 32-bit
4435 range comparison if Pmode is SImode.
4437 2011-07-12 Laurent GUERBY <laurent@guerby.net>
4438 Eric Botcazou <ebotcazou@adacore.com>
4440 * adadecode.c: Wrap up in extern "C" block.
4441 * adadecode.h: Likewise.
4442 * adaint.c: Likewise. Remove 'const' keyword.
4443 * adaint.h: Likewise.
4445 * atree.h: Likewise.
4447 * cstreams.c: Likewise.
4451 * final.c: Likewise.
4453 * initialize.c: Likewise.
4455 * namet.h: Likewise.
4456 * nlists.h: Likewise.
4457 * raise.c: Likewise.
4458 * raise.h: Likewise.
4459 * repinfo.h: Likewise.
4460 * seh_init.c: Likewise.
4461 * targext.c: Likewise.
4462 * tracebak.c: Likewise.
4463 * uintp.h: Likewise.
4464 * urealp.h: Likewise.
4465 * xeinfo.adb: Wrap up generated C code in extern "C" block.
4466 * xsinfo.adb: Likewise.
4467 * xsnamest.adb: Likewise.
4468 * gcc-interface/gadaint.h: Wrap up in extern "C" block.
4469 * gcc-interface/gigi.h: Wrap up some prototypes in extern "C" block.
4470 * gcc-interface/misc.c: Likewise.
4471 * gcc-interface/Make-lang.in (GCC_LINK): Use LINKER.
4472 (GNAT1_C_OBJS): Remove ada/b_gnat1.o. List ada/seh_init.o and
4473 ada/targext.o here...
4474 (GNAT_ADA_OBJS): ...and not here.
4475 (GNAT1_ADA_OBJS): Add ada/b_gnat1.o.
4476 (GNATBIND_OBJS): Reorder.
4478 2011-07-07 Richard Henderson <rth@redhat.com>
4480 * gcc-interface/misc.c (gnat_init_gcc_eh): Don't call
4481 dwarf2out_frame_init.
4483 2011-07-07 Eric Botcazou <ebotcazou@adacore.com>
4485 * gcc-interface/misc.c (gnat_init): Tweak previous change.
4487 2011-07-07 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
4490 * gcc-interface/Makefile.in: Handle x86_64-solaris2.
4492 2011-07-06 Richard Guenther <rguenther@suse.de>
4494 * gcc-interface/misc.c (gnat_init): Merge calls to
4495 build_common_tree_nodes and build_common_tree_nodes_2.
4496 Re-initialize boolean_false_node.
4498 2011-07-02 Eric Botcazou <ebotcazou@adacore.com>
4499 Olivier Hainque <hainque@adacore.com>
4500 Nicolas Setton <setton@adacore.com>
4502 * gcc-interface/utils.c (record_builtin_type): Set TYPE_ARTIFICIAL on
4503 the type according to the ARTIFICIAL_P parameter.
4504 (create_type_decl): Likewise.
4505 (create_type_stub_decl): Set TYPE_ARTIFICIAL on the type to 1.
4507 2011-07-01 Eric Botcazou <ebotcazou@adacore.com>
4509 * gcc-interface/Make-lang.in (gnat1): Prepend '+' to the command.
4510 (gnatbind): Likewise.
4512 2011-06-29 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
4514 * gcc-interface/Makefile.in (TOOLS_LIBS): Add $(LIBINTL).
4516 2011-06-18 Eric Botcazou <ebotcazou@adacore.com>
4518 * gcc-interface/decl.c (gnat_to_gnu_component_type): Use GNAT_TYPE
4519 local variable throughout. Remove useless call to Base_Type.
4520 (gnat_to_gnu_field): Use GNAT_FIELD_TYPE local variable throughout.
4521 Take it also into account for the volatileness of the field. Set the
4522 TREE_SIDE_EFFECTS flag as well in this case. Reorder some warnings.
4524 2011-06-18 Eric Botcazou <ebotcazou@adacore.com>
4526 * gcc-interface/trans.c (Identifier_to_gnu): Don't set TREE_THIS_NOTRAP
4527 on a dereference built for a by-ref object if it has an address clause.
4529 2011-06-18 Eric Botcazou <ebotcazou@adacore.com>
4531 * einfo.ads (Address_Taken): Document use for the second argument of
4532 Asm_Input and Asm_Output attributes.
4533 * sem_attr.adb (Analyze_Attribute) <Attribute_Asm_Input>: If the second
4534 argument is an entity name, then set Address_Taken on it.
4535 <Attribute_Asm_Output>: Likewise.
4536 * gcc-interface/trans.c (lvalue_required_for_attribute_p): Handle the
4537 Attr_Asm_Input and Attr_Asm_Output attributes explicitly.
4538 (gnat_to_gnu) <N_Code_Statement>: If an operand is going to end up in
4539 memory and is a CONST_DECL, retrieve its corresponding VAR_DECL.
4541 2011-06-16 Joern Rennecke <joern.rennecke@embecosm.com>
4544 * gcc-interface/decl.c (gnat_to_gnu_param): Use pack_cumulative_args.
4546 2011-06-14 Joseph Myers <joseph@codesourcery.com>
4548 * gcc-interface/Make-lang.in (gnatbind$(exeext)): Use ggc-none.o.
4549 (ada/utils.o): Update dependencies.
4550 * gcc-interface/Makefile.in (EXTRA_GNATTOOLS_OBJS): Add
4551 ../../../libcpp/libcpp.a.
4552 * gcc-interface/utils.c: Include common/common-target.h.
4553 (process_attributes): Use targetm_common.have_named_sections.
4555 2011-06-07 Richard Guenther <rguenther@suse.de>
4557 * gcc-interface/misc.c (gnat_init): Do not set size_type_node or call
4560 2011-06-06 Eric Botcazou <ebotcazou@adacore.com>
4562 * gcc-interface/utils2.c (gnat_stabilize_reference): Propagate the
4563 TREE_THIS_NOTRAP flag.
4565 2011-06-06 Eric Botcazou <ebotcazou@adacore.com>
4567 * gcc-interface/utils2.c (gnat_stabilize_reference) <COMPOUND_EXPR>:
4570 2011-06-06 Eric Botcazou <ebotcazou@adacore.com>
4572 * gcc-interface/trans.c (Identifier_to_gnu): Also handle deferred
4573 constants whose full view has discriminants specially.
4575 2011-06-06 Eric Botcazou <ebotcazou@adacore.com>
4577 * gcc-interface/utils.c: Include diagnostic.h.
4578 (gnat_write_global_declarations): Output debug information for all
4579 global type declarations before finalizing the compilation unit.
4580 * gcc-interface/Make-lang.in (ada/utils.o): Add dependency.
4582 2011-05-25 Jakub Jelinek <jakub@redhat.com>
4584 * gcc-interface/utils.c (def_fn_type): Remove extra va_end.
4586 2011-05-25 Kai Tietz <ktietz@redhat.com>
4588 * adaint.c (__gnat_to_canonical_file_list_next): Use array
4589 initialization instead of const/none-const pointer assignment.
4591 2011-05-24 Joseph Myers <joseph@codesourcery.com>
4593 * gcc-interface/Make-lang.in (GNAT1_OBJS): Don't include
4594 $(EXTRA_GNAT1_OBJS).
4595 (GNATBIND_OBJS): Don't include $(EXTRA_GNATBIND_OBJS).
4596 (EXTRA_GNAT1_OBJS, EXTRA_GNATBIND_OBJS): Remove.
4597 (gnat1$(exeext), gnatbind$(exeext)): Use libcommon-target.a.
4598 * gcc-interface/Makefile.in (EXTRA_GNATTOOLS_OBJS): Use
4599 libcommon-target.a instead of prefix.o.
4601 2011-05-21 Joseph Myers <joseph@codesourcery.com>
4604 * gcc-interface/Make-lang.in (gnatbind$(exeext)): Depend on $(LIBDEPS).
4606 2011-05-20 Joseph Myers <joseph@codesourcery.com>
4608 * gcc-interface/Make-lang.in (EXTRA_GNATBIND_OBJS): Remove version.o.
4609 * gcc-interface/Makefile.in (EXTRA_GNATTOOLS_OBJS): Use libcommon.a
4610 instead of version.o.
4612 2011-05-18 Kai Tietz <ktietz@redhat.com>
4614 * gcc-interface/trans.c (Exception_Handler_to_gnu_sjlj): Use
4615 boolean_false_node instead of integer_zero_node.
4616 (convert_with_check): Likewise.
4617 * gcc-interface/decl.c (choices_to_gnu): Likewise.
4619 2011-05-12 Eric Botcazou <ebotcazou@adacore.com>
4621 * gcc-interface/trans.c (call_to_gnu): In the by-reference case, if the
4622 type of the parameter is an unconstrained array, convert the actual to
4623 the type of the formal in the In Out and Out cases as well.
4625 2011-05-11 Nathan Froyd <froydnj@codesourcery.com>
4627 * gcc-interface/utils.c (def_fn_type): Don't call build_function_type;
4628 call build_function_type_array or build_varargs_function_type_array
4630 (create_subprog_type): Don't call build_function_type; call
4631 build_function_type_vec instead.
4633 2011-05-11 Nathan Froyd <froydnj@codesourcery.com>
4635 * gcc-interface/ada-tree.h (TYPE_OBJECT_RECORD_TYPE): Use TYPE_MINVAL.
4636 (TYPE_GCC_MIN_VALUE): Use TYPE_MINVAL.
4637 (TYPE_GCC_MAX_VALUE): Use TYPE_MAXVAL.
4639 2011-05-07 Eric Botcazou <ebotcazou@adacore.com>
4641 * gcc-interface/decl.c (intrin_arglists_compatible_p): Remove spaces.
4643 * gcc-interface/gigi.h (global_bindings_p): Adjust prototype.
4644 * gcc-interface/utils.c (global_bindings_p): Return bool and simplify.
4646 2011-05-05 Nathan Froyd <froydnj@codesourcery.com>
4648 * gcc-interface/trans.c (Case_Statement_to_gnu): Call build_case_label.
4650 2011-05-05 Nathan Froyd <froydnj@codesourcery.com>
4652 * gcc-interface/decl.c (intrin_arglists_compatible_p): Use iterators
4653 instead of accessing TYPE_ARG_TYPES directly.
4654 * gcc-interface/utils.c (handle_nonnull_attribute): Likewise.
4656 2011-05-05 Eric Botcazou <ebotcazou@adacore.com>
4659 * gcc-interface/gigi.h (get_variant_part): Declare.
4660 * gcc-interface/decl.c (get_variant_part): Make global.
4661 * gcc-interface/utils2.c (find_common_type): Do not return T1 if the
4662 types have the same constant size, are record types and T1 has a
4663 variant part while T2 doesn't.
4665 2011-05-05 Eric Botcazou <ebotcazou@adacore.com>
4667 * gcc-interface/utils.c (begin_subprog_body): Do not call
4669 (end_subprog_body): Likewise.
4671 2011-05-04 Richard Guenther <rguenther@suse.de>
4673 * gcc-interface/trans.c (gnat_to_gnu): Remove zero notrunc argument to
4675 (pos_to_constructor): Likewise.
4677 2011-05-03 Nathan Froyd <froydnj@codesourcery.com>
4678 Eric Botcazou <ebotcazou@adacore.com>
4680 * gcc-interface/trans.c (gigi): Call build_function_type_list instead
4681 of build_function_type. Adjust calls to...
4682 (build_raise_check): ...this. Do not take a void_tree parameter.
4683 Call build_function_type_list instead of build_function_type.
4684 Fix head comment and swap couple of conditional blocks.
4686 2011-04-30 Eric Botcazou <ebotcazou@adacore.com>
4688 * gnatvsn.ads (Library_Version): Bump to 4.7.
4689 (Current_Year): Bump to 2011.
4691 2011-04-29 Michael Matz <matz@suse.de>
4693 * gcc-interface/misc.c (gnat_handle_option): Set
4694 warn_maybe_uninitialized.
4696 2011-04-23 Gerald Pfeifer <gerald@pfeifer.com>
4698 * gnat_ugn.texi (Complexity Metrics Control): Update link to
4699 the Watson/McCabe paper.
4701 2011-04-23 Jim Meyering <meyering@redhat.com>
4703 * gnat_ugn.texi (Examples of gnatxref Usage): Fix typo: s/it it/it is/
4705 2011-04-22 Eric Botcazou <ebotcazou@adacore.com>
4707 * gcc-interface/decl.c (make_packable_type): Copy DECL_PARALLEL_TYPE
4710 2011-04-22 Eric Botcazou <ebotcazou@adacore.com>
4712 * gcc-interface/gigi.h (create_subprog_decl): Add ARTIFICIAL_FLAG
4714 * gcc-interface/utils.c (create_subprog_decl): Likewise. Set
4715 DECL_ARTIFICIAL and DECL_NO_INLINE_WARNING_P on the DECL accordingly.
4716 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Subprogram_Type>: Add
4717 ARTIFICIAL_FLAG local variable and pass it to create_subprog_decl.
4718 <all>: Do not set flags on the reused DECL node coming from an alias.
4719 Set DECL_IGNORED_P on the DECL node built for subprograms if they
4720 don't need debug info here...
4721 * gcc-interface/trans.c (Subprogram_Body_to_gnu): ...and not here.
4722 (gigi): Adjust calls to create_subprog_decl.
4723 (build_raise_check): Likewise.
4724 (establish_gnat_vms_condition_handler): Likewise.
4725 (Compilation_Unit_to_gnu): Likewise.
4726 (gnat_to_gnu): Likewise.
4728 2011-04-21 Eric Botcazou <ebotcazou@adacore.com>
4730 * gcc-interface/Makefile.in (NO_SIBLING_ADAFLAGS): Always define.
4731 (NO_REORDER_ADAFLAGS): New variable.
4732 (EXTRA_GNATTOOLS): Always define.
4733 (../stamp-gnatlib1-$(RTSDIR): Copy tsystem.h.
4734 Clean up and adjust list of files compiled with special options.
4735 * gcc-interface/Make-lang.in: Likewise.
4736 (ada/decl.o): Cosmetical change.
4737 (ada/misc.o): Remove dependency on $(PLUGIN_H).
4739 2011-04-20 Jim Meyering <meyering@redhat.com>
4741 * initialize.c (__gnat_initialize): Remove useless if-before-free.
4743 2011-04-17 Eric Botcazou <ebotcazou@adacore.com>
4745 * gcc-interface/Make-lang.in (gnatbind): Replace $(ALL_CFLAGS) with
4746 $(CFLAGS) on the link line.
4748 2011-04-17 Eric Botcazou <ebotcazou@adacore.com>
4750 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Function>: Declare the
4751 padded type built for the return type if it is unconstrained.
4753 2011-04-14 Nathan Froyd <froydnj@codesourcery.com>
4755 * gcc-interface/utils.c (gnat_poplevel): Use block_chainon.
4757 2011-04-12 Nathan Froyd <froydnj@codesourcery.com>
4759 * gcc-interface/ada-tree.h (union lang_tree_node): Check for TS_COMMON
4760 before calling TREE_CHAIN.
4761 * gcc-interface/misc.c (gnat_init_ts): New function.
4762 (LANG_HOOKS_INIT_TS): Define.
4764 2011-04-12 Martin Jambor <mjambor@suse.cz>
4766 * gcc-interface/utils.c (end_subprog_body): Call cgraph_get_create_node
4767 instead of cgraph_node.
4769 2011-04-08 Eric Botcazou <ebotcazou@adacore.com>
4771 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Procedure>: Set minimum
4772 alignment on fields of the RETURN type built for the Copy-In Copy-Out
4775 2011-04-08 Eric Botcazou <ebotcazou@adacore.com>
4777 * gcc-interface/trans.c (Identifier_to_gnu): Do not return initializers
4778 of aggregate types that contain a placeholder.
4780 2011-04-08 Nathan Froyd <froydnj@codesourcery.com>
4782 * gcc-interface/utils.c (handle_sentinel_attribute): Don't use
4784 (handle_type_generic_attribute): Likewise.
4786 2011-04-04 Eric Botcazou <ebotcazou@adacore.com>
4789 * s-oscons-tmplt.c (MSG_WAITALL): Fix thinko in previous change.
4791 2011-04-04 Kai Tietz <ktietz@redhat.com>
4794 * s-oscons-tmplt.c (MSG_WAITALL): Define it for native windows targets
4797 2011-04-02 Eric Botcazou <ebotcazou@adacore.com>
4799 * gcc-interface/utils2.c (build_allocator): In the unconstrained array
4800 type case, do not strip a padding type around the array type.
4802 2011-04-02 Eric Botcazou <ebotcazou@adacore.com>
4804 * gcc-interface/utils.c (update_pointer_to): Finalize named pointer
4807 2011-04-02 Eric Botcazou <ebotcazou@adacore.com>
4809 * gcc-interface/lang.opt (feliminate-unused-debug-types): Delete.
4810 * gcc-interface/misc.c (gnat_handle_option): Remove special handling
4811 code for -feliminate-unused-debug-types.
4812 (gnat_post_options): Likewise.
4814 2011-04-02 Eric Botcazou <ebotcazou@adacore.com>
4816 * gcc-interface/utils.c (gnat_pushdecl): If this is a non-artificial
4817 declaration of a pointer type, then set DECL_ORIGINAL_TYPE to a
4820 2011-04-02 Eric Botcazou <ebotcazou@adacore.com>
4822 * gcc-interface/decl.c (gnat_to_gnu_entity): Do not force the
4823 DECL_ARTIFICIAL flag on enumeration types.
4825 2011-04-02 Eric Botcazou <ebotcazou@adacore.com>
4827 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Array_Type>: Do not make
4828 fat pointer types artificial unconditionally.
4829 <E_Array_Subtype>: Attach the base array type as a parallel type if it
4832 2011-04-02 Eric Botcazou <ebotcazou@adacore.com>
4834 * gcc-interface/gigi.h (get_dummy_type): Declare.
4835 (build_dummy_unc_pointer_types): Likewise.
4836 (finish_fat_pointer_type): Likewise.
4837 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Array_Type>: If a dummy
4838 fat pointer type has been built, complete it in place.
4839 <E_Access_Type>: Call build_dummy_unc_pointer_types to build dummy fat
4840 and thin pointers. Remove useless variable.
4841 (finish_fat_pointer_type): Make global and move to...
4842 * gcc-interface/utils.c (finish_fat_pointer_type): ...here.
4843 (get_dummy_type): New function.
4844 (build_dummy_unc_pointer_types): Likewise.
4845 (gnat_pushdecl): Propage the name to the anonymous variants only.
4846 (update_pointer_to): Only adjust the pointer types in the unconstrained
4849 2011-04-02 Eric Botcazou <ebotcazou@adacore.com>
4851 * gcc-interface/ada-tree.h (DECL_TAFT_TYPE_P): New flag.
4852 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Incomplete_Type>: Set it
4853 if this is a Taft amendment type and the full declaration is available.
4854 * gcc-interface/trans.c (process_type): Likewise.
4855 If there is an old type, mark the new one as used if DECL_TAFT_TYPE_P.
4856 (process_freeze_entity): Likewise.
4857 * gcc-interface/utils.c (dummy_global): New static variable.
4858 (gnat_write_global_declarations): If there are types declared as used
4859 at the global level, insert them in the global hash table.
4861 2011-04-02 Eric Botcazou <ebotcazou@adacore.com>
4863 * gcc-interface/gigi.h (record_builtin_type): Add ARTIFICIAL_P param.
4864 * gcc-interface/utils.c (gnat_pushdecl): If this is a non-artificial
4865 declaration of an array type, then set DECL_ORIGINAL_TYPE to a distinct
4867 (record_builtin_type): Add ARTIFICIAL_P parameter. Set DECL_ARTIFICIAL
4868 flag of the type accordingly.
4869 * gcc-interface/trans.c (gigi): Adjust calls to record_builtin_type.
4871 2011-04-02 Eric Botcazou <ebotcazou@adacore.com>
4873 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Access_Type>: Defer
4874 finalizing types when updating the pointers to the designated type.
4875 <all>: Finalize the deferred types even if we didn't defer processing
4876 of incomplete types in this invocation.
4878 2011-04-01 Olivier Hainque <hainque@adacore.com>
4879 Nicolas Setton <setton@adacore.com>
4880 Eric Botcazou <ebotcazou@adacore.com>
4882 * gcc-interface/misc.c (gnat_descriptive_type): New function.
4883 (LANG_HOOKS_DESCRIPTIVE_TYPE): Redefine to gnat_descriptive_type.
4885 2011-03-28 Kai Tietz <ktietz@redhat.com>
4887 * gcc-interface/Makefile.in (SO_LIB): Handle multilib build for native
4889 (EH_MECHANISM): Use GCC exception mechanism for native Windows targets.
4890 * system-mingw.ads (System): Change ZCX_By_Default default to True.
4892 * raise-gcc.c (PERSONALITY_FUNCTION): Add prototype.
4894 2011-03-28 Tristan Gingold <gingold@adacore.com>
4897 * gcc-interface/Make-lang.in (ada/b_gnat1.adb): Replace ada/b_gnat1.c.
4898 Use ada output of gnatbind.
4899 (ada/b_gnatb.adb): Ditto.
4900 (ada/b_gnat1.o, ada/b_gnatb.o): New rules.
4901 (ada.mostlyclean, ada.stage1)
4902 (ada.stage2, ada.stage3, ada.stage4, ada.stageprofile)
4903 (ada.stagefeedback): Adjust.
4904 * gcc-interface/Makefile.in (b_gnatl.adb): Replace b_gnatl.c.
4905 Use ada output of gnatbind.
4906 (b_gnatm.adb): Ditto.
4907 (b_gnatl.o, b_gnatm.o): New rules.
4909 2011-03-26 Eric Botcazou <ebotcazou@adacore.com>
4911 * gcc-interface/decl.c (gnat_to_gnu_entity) <object>: Create TYPE_DECL
4912 for the padded type built to support a specified size or alignment.
4914 2011-03-26 Eric Botcazou <ebotcazou@adacore.com>
4916 * gcc-interface/gigi.h (finalize_from_with_types): Adjust comment.
4917 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Access_Type>: Defer
4918 unconditionally to the end of the unit when the designated type is
4920 <all>: Rename local variable. Attempt to un-defer types only and do it
4921 for limited_with'ed types as well.
4922 (finalize_from_with_types): Adjust comment. Rename variable and tidy.
4923 * gcc-interface/trans.c (Compilation_Unit_to_gnu): Use GNAT_UNIT
4924 consistently and remove redundant call to finalize_from_with_types.
4926 2011-03-26 Eric Botcazou <ebotcazou@adacore.com>
4928 * inline.adb (Back_End_Cannot_Inline): Lift restriction on calls to
4929 subprograms without a previous spec declared in the same unit.
4930 * gcc-interface/trans.c (Compilation_Unit_to_gnu): Process inlined
4931 subprograms at the end of the unit instead of at the beginning.
4932 * gcc-interface/utils.c (create_subprog_decl): Check that the entity
4933 isn't public for the special handling of non-inline functions nested
4934 inside inline external functions.
4936 2011-03-25 Jeff Law <law@redhat.com>
4938 * gcc-interface/utils.c (def_fn_type): Add missing va_end.
4940 2011-03-24 Eric Botcazou <ebotcazou@adacore.com>
4942 * einfo.ads (Size_Depends_On_Discriminant): Adjust description.
4943 * layout.adb (Compute_Size_Depends_On_Discriminant): New procedure
4944 to compute Set_Size_Depends_On_Discriminant.
4945 (Layout_Type): Call it on array types in back-end layout mode.
4946 * sem_util.adb (Requires_Transient_Scope): Return true for array
4947 types only if the size depends on the value of discriminants.
4948 * gcc-interface/utils2.c (build_binary_op) <MODIFY_EXPR>: Use the RHS
4949 type if the RHS is a call to a function that returns an unconstrained
4950 type with default discriminant.
4952 2011-03-24 Eric Botcazou <ebotcazou@adacore.com>
4954 * gcc-interface/trans.c (gnat_to_gnu): Remove obsolete case of
4955 non-conversion to the nominal result type at the end.
4957 2011-03-23 Eric Botcazou <ebotcazou@adacore.com>
4959 * gcc-interface/trans.c (create_temporary): New function taken from...
4960 (create_init_temporary): ...here. Call it.
4961 (call_to_gnu): Create the temporary for the return value early, if any.
4962 Create it for a function with copy-in/copy-out parameters if there is
4963 no target; in other cases of copy-in/copy-out, use another temporary.
4964 Push the new binding level lazily. Add and rename local variables.
4966 2011-03-23 Eric Botcazou <ebotcazou@adacore.com>
4968 * gcc-interface/decl.c (validate_size): Improve comments and tweak
4970 (set_rm_size): Likewise.
4972 2011-03-23 Eric Botcazou <ebotcazou@adacore.com>
4974 * gcc-interface/decl.c (gnat_to_gnu_entity) <object>: Create TYPE_DECL
4975 for the padded type built in order to support a specified alignment.
4976 Fix incorrect formatting.
4978 2011-03-21 Eric Botcazou <ebotcazou@adacore.com>
4981 * gcc-interface/decl.c (elaborate_expression_1): Localize GNU_DECL.
4983 2011-03-21 Eric Botcazou <ebotcazou@adacore.com>
4985 * gcc-interface/decl.c (components_to_record): Add REORDER parameter,
4986 rename DEBUG_INFO_P into DEBUG_INFO and move P_GNU_REP_LIST parameter
4987 to the end of the list. Adjust recursive call. Rename local variable.
4988 If REORDER is true, reorder components of the record type.
4989 (gnat_to_gnu_entity): Pass OK_To_Reorder_Components flag as argument to
4990 components_to_record and adjust the parameter list.
4992 2011-03-21 Eric Botcazou <ebotcazou@adacore.com>
4994 * gcc-interface/decl.c (elaborate_expression_1): When optimization is
4995 disabled, use the variable for bounds of loop iteration scheme.
4997 2011-03-21 Kai Tietz <ktietz@redhat.com>
5000 * gcc-interface/utils.c (gnat_internal_attribute_table): Add column.
5002 2011-03-17 Eric Botcazou <ebotcazou@adacore.com>
5004 * gcc-interface/decl.c (elaborate_expression_1): Try harder to find
5005 out whether the expression is read-only. Short-circuit placeholder
5006 case and rename a couple of local variables.
5008 2011-03-17 Eric Botcazou <ebotcazou@adacore.com>
5010 * gcc-interface/gigi.h (smaller_form_type_p): Declare.
5011 * gcc-interface/trans.c (smaller_form_type_p): Make global and move...
5012 * gcc-interface/utils.c (smaller_form_type_p): ...to here.
5013 (convert): Deal with conversions from a smaller form type specially.
5015 2011-02-14 Eric Botcazou <ebotcazou@adacore.com>
5017 * gcc-interface/misc.c (gnat_init_options): Do not concatenate -I and
5018 its argument, except for the special -I- switch.
5020 2011-02-12 Gerald Pfeifer <gerald@pfeifer.com>
5022 * gnat_ugn.texi (Compiling Different Versions of Ada): Update link to
5025 2011-02-08 Eric Botcazou <ebotcazou@adacore.com>
5027 * gcc-interface/Makefile.in (x86-64 darwin): Handle multilibs.
5029 2011-02-03 Eric Botcazou <ebotcazou@adacore.com>
5031 * gcc-interface/gigi.h (fill_vms_descriptor): Take GNU_TYPE instead of
5033 * gcc-interface/utils2.c (fill_vms_descriptor): Move from here to...
5034 * gcc-interface/utils.c (fill_vms_descriptor): ...here. Take GNU_TYPE
5035 instead of GNAT_FORMAL. Protect the expression against multiple uses.
5036 Do not generate the check directly, instead instantiate the template
5037 check present in the descriptor.
5038 (make_descriptor_field): Move around.
5039 (build_vms_descriptor32): Build a template check in the POINTER field.
5040 (build_vms_descriptor): Remove useless suffixes.
5041 * gcc-interface/trans.c (call_to_gnu): Adjust fill_vms_descriptor call.
5043 2011-01-26 Eric Botcazou <ebotcazou@adacore.com>
5046 * targext.c: Include target files if IN_RTS is defined.
5048 2011-01-26 Richard Guenther <rguenther@suse.de>
5051 * targext.c: Include config.h.
5052 * gcc-interface/Make-lang.in (ada/targext.o): Add $(CONFIG_H)
5055 2011-01-04 Pascal Obry <obry@adacore.com>
5056 Eric Botcazou <ebotcazou@adacore.com>
5058 * gcc-interface/decl.c: Disable Stdcall convention handling for 64-bit.
5060 2011-01-04 Eric Botcazou <ebotcazou@adacore.com>
5062 * gcc-interface/trans.c (Case_Statement_to_gnu): Put the SLOC of the
5063 end-of-case on the end label and its associated gotos, if any.
5065 2011-01-04 Eric Botcazou <ebotcazou@adacore.com>
5067 * gcc-interface/trans.c (Subprogram_Body_to_gnu): Evaluate the
5068 expressions of the parameter cache within the statement group of
5071 2011-01-04 Olivier Hainque <hainque@adacore.com>
5072 Eric Botcazou <ebotcazou@adacore.com>
5074 * gcc-interface/trans.c (BLOCK_SOURCE_END_LOCATION): Provide default.
5075 (set_end_locus_from_node): New function.
5076 (Subprogram_Body_to_gnu): Use it to mark both the inner BIND_EXPR we
5077 make and the function end_locus.
5078 (Compilation_Unit_to_gnu): Call it instead of a straight Sloc_to_locus
5079 for the elaboration subprogram.
5080 (set_gnu_expr_location_from_node) <default case>: Use it to attempt to
5081 set the end_locus of the expression as well.
5083 2011-01-04 Eric Botcazou <ebotcazou@adacore.com>
5086 * gcc-interface/trans.c (Identifier_to_gnu): In SJLJ mode, do not make
5087 variables that are referenced in exception handlers volatile.
5091 Copyright (C) 2011 Free Software Foundation, Inc.
5093 Copying and distribution of this file, with or without modification,
5094 are permitted in any medium without royalty provided the copyright
5095 notice and this notice are preserved.
5097 * gnat_rm.texi: Ramification of pragma Eliminate documentation
5098 - fix bugs in the description of Source_Trace;
5099 - get rid of UNIT_NAME;
5101 2011-08-02 Javier Miranda <miranda@adacore.com>
5104 (Build_Dispatching_Requeue): Adding support for VM targets
5105 since we cannot directly reference the Tag entity.
5106 * exp_sel.adb (Build_K): Adding support for VM targets.
5107 (Build_S_Assignment): Adding support for VM targets.
5109 (Default_Prim_Op_Position): In VM targets do not restrict availability
5110 of predefined interface primitives to compiling in Ada 2005 mode.
5111 (Is_Predefined_Interface_Primitive): In VM targets this service is not
5112 restricted to compiling in Ada 2005 mode.
5113 (Make_VM_TSD): Generate code that declares and initializes the OSD
5114 record. Needed to support dispatching calls through synchronized
5117 (Make_Predefined_Primitive_Specs): Enable generation of predefined
5118 primitives associated with synchronized interfaces.
5119 (Make_Predefined_Primitive_Bodies): Enable generation of predefined
5120 primitives associated with synchronized interfaces.
5122 2011-08-02 Yannick Moy <moy@adacore.com>
5124 * par-ch11.adb (P_Handled_Sequence_Of_Statements): mark a sequence of
5125 statements hidden in SPARK if preceded by the HIDE directive
5126 (Parse_Exception_Handlers): mark each exception handler in a sequence of
5127 exception handlers as hidden in SPARK if preceded by the HIDE directive
5128 * par-ch6.adb (P_Subprogram): mark a subprogram body hidden in SPARK
5129 if starting with the HIDE directive
5130 * par-ch7.adb (P_Package): mark a package body hidden in SPARK if
5131 starting with the HIDE directive; mark the declarations in a private
5132 part as hidden in SPARK if the private part starts with the HIDE
5134 * restrict.adb, restrict.ads
5135 (Set_Hidden_Part_In_SPARK): record a range of slocs as hidden in SPARK
5136 (Is_In_Hidden_Part_In_SPARK): new function which returns whether its
5137 argument node belongs to a part which is hidden in SPARK
5138 (Check_SPARK_Restriction): do not issue violations on nodes in hidden
5139 parts in SPARK; protect the possibly costly call to
5140 Is_In_Hidden_Part_In_SPARK by a check that the SPARK restriction is on
5141 * scans.ads (Token_Type): new value Tok_SPARK_Hide in enumeration
5142 * scng.adb (Accumulate_Token_Checksum_GNAT_6_3,
5143 Accumulate_Token_Checksum_GNAT_5_03): add case for new token
5145 (Scan): recognize special comment starting with '#' and followed by
5146 SPARK keyword "hide" as a HIDE directive.
5148 2011-08-02 Yannick Moy <moy@adacore.com>
5150 * types.ads, erroutc.ads: Minor reformatting.
5152 2011-08-02 Vincent Celier <celier@adacore.com>
5154 * link.c: Add response file support for cross platforms.
5156 2011-08-02 Ed Schonberg <schonberg@adacore.com>
5158 * sem_aggr.adb (Resolve_Array_Aggregate): when copying the expression
5159 in an association, set parent field of copy before partial analysis.
5160 * sem_res.adb (Resolve_Slice): create reference to itype only when
5161 expansion is enabled.
5163 2011-08-02 Yannick Moy <moy@adacore.com>
5165 * einfo.adb, einfo.ads (Body_Is_In_ALFA, Set_Body_Is_In_ALFA): get/set
5166 for new flag denoting which subprogram bodies are in ALFA
5167 * restrict.adb, sem_ch7.adb: Update comment
5168 * sem_ch11.adb, sem_ch2.adb, sem_ch3.adb, sem_ch4.adb, sem_ch5.adb,
5169 sem_ch9.adb, sem_res.adb: Add calls to
5170 Current_Subprogram_Body_Is_Not_In_ALFA on unsupported constructs.
5171 * sem_ch6.adb (Analyze_Function_Return): add calls to
5172 Current_Subprogram_Body_Is_Not_In_ALFA on return statement in the
5173 middle of the body, and extended return.
5174 (Check_Missing_Return): add calls to Set_Body_Is_In_ALFA with argument
5175 False when missing return.
5176 (Analyze_Subprogram_Body_Helper): initialize the flag Body_Is_In_ALFA
5177 to True for subprograms whose spec is in ALFA. Remove later on the flag
5178 on the entity used for a subprogram body when there exists a separate
5180 * sem_util.adb, sem_util.ads (Current_Subprogram_Body_Is_Not_In_ALFA):
5181 if Current_Subprogram is not Empty, set its flag Body_Is_In_ALFA to
5182 False, otherwise do nothing.
5184 2011-08-02 Robert Dewar <dewar@adacore.com>
5186 * inline.adb, stand.ads, sem_ch6.adb, sem_ch8.adb: Minor reformatting.
5188 2011-08-02 Yannick Moy <moy@adacore.com>
5190 * sem_ch4.ads: minor formatting.
5192 2011-08-02 Yannick Moy <moy@adacore.com>
5194 * sem_aggr.adb, err_vars.ads, sem_ch3.adb, sem_ch5.adb, sem_ch9.adb,
5195 debug.adb, sem_util.adb, sem_res.adb, sem_attr.adb, gnat1drv.adb,
5196 errout.adb, errout.ads, exp_ch6.adb, sem_ch4.adb, restrict.adb,
5197 restrict.ads, sem_ch6.adb, sem_ch8.adb, sem_ch11.adb,
5198 opt.ads: cleanup of SPARK mode
5200 2011-08-02 Yannick Moy <moy@adacore.com>
5202 * cstand.adb (Create_Standard): sets Is_In_ALFA component of standard
5204 * einfo.adb, einfo.ads (Is_In_ALFA): add flag for all entities
5205 (Is_In_ALFA, Set_Is_In_ALFA): new subprograms to access flag Is_In_ALFA
5207 (Analyze_Object_Declaration): set Is_In_ALFA flag for objects
5208 (Constrain_Enumeration): set Is_In_ALFA flag for enumeration subtypes
5209 (Constrain_Integer): set Is_In_ALFA flag for integer subtypes
5210 (Enumeration_Type_Declaration): set Is_In_ALFA flag for enumeration
5212 (Set_Scalar_Range_For_Subtype): unset Is_In_ALFA flag for subtypes with
5214 * sem_ch6.adb (Analyze_Return_Type): unset Is_In_ALFA flag for
5215 functions whose return type is not in ALFA.
5216 (Analyze_Subprogram_Specification): set Is_In_ALFA flag for subprogram
5218 (Process_Formals): unset Is_In_ALFA flag for subprograms if a
5219 parameter's type is not in ALFA.
5220 * stand.ads (Standard_Type_Is_In_ALFA): array defines which standard
5223 2011-08-02 Ed Schonberg <schonberg@adacore.com>
5225 * sem_ch6 (Analyze_Expression_Function): treat the function as
5226 Inline_Always, and introduce a subprogram declaration for it when it is
5228 * inline.adb (Add_Inlined_Body): recognize bodies that come from
5229 expression functions, so that the back-end can determine whether they
5230 can in fact be inlined.
5231 * sem_util.adb (Is_Expression_Function): predicate to determine whether
5232 a function body comes from an expression function.
5234 2011-08-02 Gary Dismukes <dismukes@adacore.com>
5236 * sem_ch6.adb (Check_Conformance): Revise the check for nonconforming
5237 null exclusions to test Can_Never_Be_Null on the anonymous access types
5238 of the formals rather than testing the formals themselves. Exclude this
5239 check in cases where the Old_Formal is marked as a controlling formal,
5240 to avoid issuing spurious errors for bodies completing dispatching
5241 operations (due to the flag not getting set on controlling access
5242 formals in body specs).
5243 (Find_Corresponding_Spec): When checking full and subtype conformance of
5244 subprogram bodies in instances, pass Designated and E in that order, for
5245 consistency with the expected order of the formals (New_Id followed by
5248 2011-08-02 Robert Dewar <dewar@adacore.com>
5250 * sem_ch8.adb: Minor reformatting.
5252 2011-08-02 Ed Schonberg <schonberg@adacore.com>
5254 * sem_ch8.adb (Analyze_Subprogram_Renaming): new procedure
5255 Check_Class_Wide_Actual, to implement AI05-0071, on defaulted
5256 primitive operations of class-wide actuals.
5258 2011-08-02 Javier Miranda <miranda@adacore.com>
5260 * exp_atag.ads, exp_atag.adb
5261 (Build_Common_Dispatching_Select_Statements): Remove argument Loc
5262 since its value is implicitly passed in argument Typ.
5263 * exp_disp.adb (Make_Disp_Conditional_Select_Body,
5264 Make_Disp_Timed_Select_Body): Remove Loc in calls to routine
5265 Build_Common_Dispatching_Select_Statements.
5267 2011-08-02 Robert Dewar <dewar@adacore.com>
5269 * sem_ch3.adb, exp_atag.ads, get_scos.adb, get_scos.ads,
5270 exp_disp.adb, lib-xref.adb, lib-xref.ads: Update comments.
5273 2011-08-02 Robert Dewar <dewar@adacore.com>
5275 * sem_res.adb: Minor reformatting.
5276 * sem_prag.adb: Minor reformatting.
5278 2011-08-02 Javier Miranda <miranda@adacore.com>
5280 * exp_atag.adb, exp_atags.ads
5281 (Build_Common_Dispatching_Select_Statement): Replace argument DT_Ptr
5282 by the tagged type Entity. Required to use this routine in the VM
5283 targets since we do not have available the Tag entity in the VM
5286 (Expand_N_Subprogram_Body): Do not invoke Build_VM_TSDs if package
5287 Ada.Tags has not been previously loaded.
5289 (Expand_N_Package_Declaration, Expand_N_Package_Body): Do not invoke
5290 Build_VM_TSDs if package Ada.Tags has not been previously loaded.
5292 (Enclosing_Dynamic_Scope): Add missing support to handle the full
5293 view of enclosing scopes. Required to handle enclosing scopes that
5294 are synchronized types whose full view is a task type.
5296 (Build_VM_TSDs): Minor code improvement to avoid generating and
5297 analyzing lists with empty nodes.
5298 (Make_Disp_Asynchronous_Select_Body): Add support for VM targets.
5299 (Make_Disp_Conditional_Select_Body): Add support for VM targets.
5300 (Make_Disp_Get_Prim_Op_Kind): Add support for VM targets.
5301 (Make_Disp_Timed_Select_Body): Add support for VM targets.
5302 (Make_Select_Specific_Data_Table): Add support for VM targets.
5303 (Make_VM_TSD): Generate code to initialize the SSD structure of
5306 2011-08-02 Yannick Moy <moy@adacore.com>
5308 * lib-writ.adb (Write_ALI): when ALFA mode is set, write local
5309 cross-references section in ALI.
5310 * lib-xref.adb, lib-xref.ads (Xref_Entry): add components Sub
5311 (enclosing subprogram), Slc (location of Sub) and Sun (unit number of
5313 (Enclosing_Subprogram_Or_Package): new function to return the enclosing
5314 subprogram or package entity of a node
5315 (Is_Local_Reference_Type): new function returns True for references
5316 selected in local cross-references.
5317 (Lt): function extracted from Lt in Output_References
5318 (Write_Entity_Name): function extracted from Output_References
5319 (Generate_Definition): generate reference with type 'D' for definition
5320 of objects (object declaration and parameter specification), with
5321 appropriate locations and units, for use in local cross-references.
5322 (Generate_Reference): update fields Sub, Slc and Sun. Keep newly created
5323 references of type 'I' for initialization in object definition.
5324 (Output_References): move part of function Lt and procedure
5325 Write_Entity_Name outside of the body. Ignore references of types 'D'
5326 and 'I' introduced for local cross-references.
5327 (Output_Local_References): new procedure to output the local
5328 cross-references sections.
5329 (Lref_Entity_Status): new array defining whether an entity is a local
5330 * sem_ch3.adb (Analyze_Object_Declaration): call Generate_Reference
5331 with 'I' type when initialization expression is present.
5332 * get_scos.adb, get_scos.ads: Correct comments and typos
5334 2011-08-02 Javier Miranda <miranda@adacore.com>
5336 * exp_ch6.adb (Expand_N_Subprogram_Body): Enable generation of TSDs in
5338 * exp_ch7.adb (Expand_N_Package_Body): Enable generation of TSDs in
5340 * exp_disp.adb (Build_VM_TSDs): No action needed if the runtime has no
5343 2011-08-02 Vincent Celier <celier@adacore.com>
5345 * prj-nmsc.adb (File_Found): New components Excl_File and Excl_Line
5346 (No_Space_Img): New function
5347 (Find_Excluded_Sources): When reading from a file, record the file name
5348 and the line number for each excluded source.
5349 (Mark_Excluded_Sources): When reporting an error, if the excluded
5350 sources were read from a file, include file name and line number in
5353 2011-08-02 Ed Schonberg <schonberg@adacore.com>
5355 * sem_res.adb (Resolve_Call): implement rule in RM 12.5.1 (23.3/2).
5357 2011-08-02 Robert Dewar <dewar@adacore.com>
5359 * exp_ch7.adb exp_ch6.adb, exp_disp.adb: Minor reformatting
5361 2011-08-02 Javier Miranda <miranda@adacore.com>
5363 * exp_ch6.adb (Expand_N_Subprogram_Body): Temporarily restrict the
5364 generation of TSDs to the DOTNET compiler.
5365 * exp_ch7.adb (Expand_N_Package_Body): Temporarily restrict the
5366 generation of TSDs to the DOTNET compiler.
5368 2011-08-02 Javier Miranda <miranda@adacore.com>
5370 * exp_disp.ads (Build_VM_TSDs): Build the runtime Type Specific Data
5371 record of all the tagged types declared inside library level package
5372 declarations, library level package bodies or library level subprograms.
5373 * exp_disp.adb (Make_VM_TSD): New subprogram that builds the TSD
5374 associated with a given tagged type.
5375 (Build_VM_TSDs): New subprogram.
5376 * exp_ch6.adb (Expand_N_Subprogram_Body): Generate TSDs records of main
5377 compilation units that are subprograms.
5378 * exp_ch7.adb (Expand_N_Package_Body): Generate TSDs of main
5379 compilation units that are package bodies.
5380 (Expand_N_Package_Declaration): Generate TSDs of the main compilation
5381 units that are a package declaration or a package instantiation.
5382 * exp_intr.adb (Expand_Dispatching_Constructor_Call): Minor code
5383 reorganization to improve the error generated by the frontend when the
5384 function Ada.Tags.Secondary_Tag is not available.
5385 * rtsfind.ads (RE_Register_TSD): New runtime entity.
5386 * exp_ch4.adb (Expand_N_Type_Conversion): Minor code cleanup.
5388 2011-08-02 Javier Miranda <miranda@adacore.com>
5390 * exp_disp.adb (Make_DT): Generate call to Check_TSD in Ada 2005 mode.
5392 2011-08-02 Robert Dewar <dewar@adacore.com>
5394 * s-imenne.ads: Minor reformatting.
5396 2011-08-02 Robert Dewar <dewar@adacore.com>
5398 * a-stunau.ads: Add pragma Suppress_Initialization for Big_String
5399 * freeze.adb (Warn_Overlay): Don't warn if initialization suppressed
5400 * s-stalib.ads: Add pragma Suppress_Initialization for Big_String
5402 2011-08-02 Robert Dewar <dewar@adacore.com>
5404 * einfo.ads (Materialize_Entity): Document this is only for renamings
5405 * exp_ch3.adb (Expand_N_Object_Declaration): Make sure we generate
5406 required debug information in the case where we transform the object
5407 declaration into a renaming declaration.
5408 * exp_ch4.adb (Expand_Concatenate): Generate debug info for result
5410 * exp_dbug.ads (Debug_Renaming_Declaration): Document setting of
5413 2011-08-02 Robert Dewar <dewar@adacore.com>
5415 * einfo.ads, einfo.adb (Suppress_Initialization): Replaces
5416 Suppress_Init_Procs.
5417 * exp_ch3.adb, exp_disp.adb, freeze.adb: Use
5418 Suppress_Initialization/Initialization_Suppressed.
5419 * gnat_rm.texi: New documentation for pragma Suppress_Initialization
5420 * sem_aux.ads, sem_aux.adb (Initialization_Suppressed): New function
5421 * sem_dist.adb: Use Suppress_Initialization/Initialization_Suppressed
5422 * sem_prag.adb: New processing for pragma Suppress_Initialization.
5424 2011-08-02 Robert Dewar <dewar@adacore.com>
5426 * gnat_rm.texi, a-tags.ads, sem_prag.adb, sem_ch12.adb, exp_disp.adb:
5429 2011-08-02 Ed Schonberg <schonberg@adacore.com>
5431 * sem_prag.adb (Chain_PPC): Implement AI04-0230: null procedures can
5432 only have inheritable classwide pre/postconditions.
5434 2011-08-02 Javier Miranda <miranda@adacore.com>
5436 * a-tags.ads, a-tags.adb (Check_TSD): New subprogram.
5437 * rtsfind.ads (RE_Check_TSD): New runtime entity.
5438 * exp_disp.adb (Make_DT): Generate call to the new runtime routine that
5439 checks if the external tag of a type is the same as the external tag
5440 of some other declaration.
5442 2011-08-02 Thomas Quinot <quinot@adacore.com>
5444 * s-taskin.ads: Minor reformatting.
5446 2011-08-02 Emmanuel Briot <briot@adacore.com>
5448 * g-comlin.adb (Display_Help): swap the order in which it prints the
5449 short help and the general usage.
5451 2011-08-02 Ed Schonberg <schonberg@adacore.com>
5453 * sem_ch12.adb (Analyze_Generic_Subprogram_Declaration): copy properly
5454 the aspect declarations and attach them to the generic copy for
5455 subsequent analysis.
5456 (Analyze_Subprogram_Instantiation): copy explicitly the aspect
5457 declarations of the generic tree to the new subprogram declarations.
5458 * sem_attr.adb (Check_Precondition_Postcondition): recognize
5459 conditions that apply to a subprogram instance.
5461 2011-08-02 Robert Dewar <dewar@adacore.com>
5463 * gnat_rm.texi: Clarify doc on pragma Source_File_Name[_Project].
5465 2011-08-02 Ed Schonberg <schonberg@adacore.com>
5467 * sem_ch3.adb (Derived_Type_Declaration): When checking that a untagged
5468 private type with a tagged full view is not derived in the immediate
5469 scope of the partial view, (RM 7.3 (7)) use the scope of the base type.
5471 2011-08-02 Robert Dewar <dewar@adacore.com>
5473 * exp_ch4.adb: Minor reformatting.
5475 2011-08-02 Ed Schonberg <schonberg@adacore.com>
5477 * sem_ch5.adb (Analyze_Loop_Statement): If the iteration scheme is an
5478 Ada2012 iterator, the loop will be rewritten during expansion into a
5479 while loop with a cursor and an element declaration. Do not analyze the
5480 body in this case, because if the container is for indefinite types the
5481 actual subtype of the elements will only be determined when the cursor
5482 declaration is analyzed.
5484 2011-08-02 Arnaud Charlet <charlet@adacore.com>
5486 * sem_ch13.adb (Analyze_Attribute_Definition_Clause): Ignore
5487 size/alignment related attributes in CodePeer_Mode.
5489 2011-08-02 Gary Dismukes <dismukes@adacore.com>
5491 * sem_ch3.adb (Check_Ops_From_Incomplete_Type): Remove call to
5492 Prepend_Element, since this can result in the operation getting the
5493 wrong slot in the full type's dispatch table if the full type has
5494 inherited operations. The incomplete type's operation will get added
5495 to the proper position in the full type's primitives
5496 list later in Sem_Disp.Check_Operation_From_Incomplete_Type.
5497 (Process_Incomplete_Dependents): Add Is_Primitive test when checking for
5498 dispatching operations, since there are cases where nonprimitive
5499 subprograms can get added to the list of incomplete dependents (such
5500 as subprograms in nested packages).
5501 * sem_ch6.adb (Process_Formals): First, remove test for being in a
5502 private part when determining whether to add a primitive with a
5503 parameter of a tagged incomplete type to the Private_Dependents list.
5504 Such primitives can also occur in the visible part, and should not have
5505 been excluded from being private dependents.
5506 * sem_ch7.adb (Uninstall_Declarations): When checking the rule of
5507 RM05-3.10.1(9.3/2), test that a subprogram in the Private_Dependents
5508 list of a Taft-amendment incomplete type is a primitive before issuing
5509 an error that the full type must appear in the same unit. There are
5510 cases where nonprimitives can be in the list (such as subprograms in
5512 * sem_disp.adb (Derives_From): Use correct condition for checking that
5513 a formal's type is derived from the type of the corresponding formal in
5514 the parent subprogram (the condition was completely wrong). Add
5515 checking that was missing for controlling result types being derived
5516 from the result type of the parent operation.
5518 2011-08-02 Yannick Moy <moy@adacore.com>
5520 * errout.adb (First_Node): minor renaming
5521 * restrict.adb (Check_Formal_Restriction): put restriction warning on
5524 2011-08-02 Yannick Moy <moy@adacore.com>
5526 * sem_res.adb (Resolve_Logical_Op): ensure N is a binary operator
5527 before accessing operands.
5528 * sem_util.adb (Is_SPARK_Initialization_Expr): follow original nodes to
5529 decide whether an initialization expression respects SPARK rules, as
5530 the plain node is the expanded one. This allows for more valid warnings
5532 * gnat_rm.texi: Minor update.
5534 2011-08-02 Arnaud Charlet <charlet@adacore.com>
5536 * sem_ch13.adb (Analyze_Enumeration_Representation_Clause): Revert
5539 2011-08-02 Robert Dewar <dewar@adacore.com>
5541 * sem_ch3.adb, sem_ch4.adb: Minor reformatting.
5543 2011-08-02 Hristian Kirtchev <kirtchev@adacore.com>
5545 * exp_ch5.adb (Expand_Iterator_Loop): Reformatting. Wrap the original
5546 loop statements and the element renaming declaration with a block when
5547 the element type is controlled.
5549 2011-08-02 Yannick Moy <moy@adacore.com>
5551 * sinfo.ads: Minor formatting.
5553 2011-08-02 Ed Schonberg <schonberg@adacore.com>
5555 * sem_aggr.adb (Add_Association): if the association has a box and no
5556 expression, use the Sloc of the aggregate itself for the new
5558 * errout.adb (First_Node): Exclude nodes with no Sloc, and always use
5561 2011-08-02 Hristian Kirtchev <kirtchev@adacore.com>
5563 * exp_ch5.adb (Expand_Iterator_Loop): Code cleanup and refactoring.
5564 When a container is provided via a function call, generate a renaming
5565 of the function result. This avoids the creation of a transient scope
5566 and the premature finalization of the container.
5567 * exp_ch7.adb (Is_Container_Cursor): Removed.
5568 (Wrap_Transient_Declaration): Remove the supression of the finalization
5569 of the list controller when the declaration denotes a container cursor,
5572 2011-08-02 Yannick Moy <moy@adacore.com>
5574 * restrict.adb (Check_Formal_Restriction): only issue a warning if the
5575 node is from source, instead of the original node being from source.
5577 (Resolve_Array_Aggregate): refine the check for a static expression, to
5578 recognize also static ranges
5579 * sem_ch3.adb, sem_ch3.ads (Analyze_Component_Declaration,
5580 Array_Type_Declaration): postpone the test for the type being a subtype
5581 mark after the type has been resolved, so that component-selection and
5582 expanded-name are discriminated.
5583 (Make_Index, Process_Range_Expr_In_Decl): add a parameter In_Iter_Schm
5584 to distinguish the case of an iteration scheme, so that an error is
5585 issed on a non-static range in SPARK except in an iteration scheme.
5586 * sem_ch5.adb (Analyze_Iteration_Scheme): call Make_Index with
5587 In_Iter_Schm = True.
5588 * sem_ch6.adb (Analyze_Subprogram_Specification): refine the check for
5589 user-defined operators so that they are allowed in renaming
5591 (Find_Selected_Component): refine the check for prefixing of operators
5592 so that they are allowed in renaming. Move the checks for restrictions
5593 on selector name after analysis discriminated between
5594 component-selection and expanded-name.
5595 * sem_res.adb (Resolve_Op_Concat_Arg): do not issue a warning on
5596 concatenation argument of string type if it is static.
5597 * sem_util.adb, sem_util.ads
5598 (Check_Later_Vs_Basic_Declarations): add a new function
5599 Is_Later_Declarative_Item to decice which declarations are allowed as
5600 later items, in the two different modes Ada 83 and SPARK. In the SPARK
5601 mode, add that renamings are considered as later items.
5602 (Enclosing_Package): new function to return the enclosing package
5603 (Enter_Name): correct the rule for homonyms in SPARK
5604 (Is_SPARK_Initialization_Expr): default to returning True on nodes not
5605 from source (result of expansion) to avoid issuing wrong warnings.
5607 2011-08-02 Ed Schonberg <schonberg@adacore.com>
5609 * errout.adb: On anything but an expression First_Node returns its
5612 2011-08-02 Pascal Obry <obry@adacore.com>
5614 * prj-proc.adb, make.adb, makeutl.adb: Minor reformatting.
5616 2011-08-02 Hristian Kirtchev <kirtchev@adacore.com>
5618 * exp_ch5.adb (Expand_Iterator_Loop): Code cleanup and reorganization.
5619 Set the associated loop as the related expression of internally
5621 * exp_ch7.adb (Is_Container_Cursor): New routine.
5622 (Wrap_Transient_Declaration): Supress the finalization of the list
5623 controller when the declaration denotes a container cursor.
5625 2011-08-02 Yannick Moy <moy@adacore.com>
5627 * opt.ads (SPARK_Mode): update comment, SPARK_Mode only set through
5629 * par-ch3.adb (P_Delta_Constraint): remove check in SPARK mode that the
5630 expression is a simple expression. This check cannot be performed in
5631 the semantics, so just drop it.
5632 (P_Index_Or_Discriminant_Constraint): move check that the index or
5633 discriminant is a subtype mark to Analyze_Subtype_Declaration in the
5634 semantics. Other cases were previously checked in the semantics.
5635 * par-ch4.adb (P_Name): move checks that a selector name is not
5636 character literal or an operator symbol to Find_Selected_Component in
5638 * par-ch5.adb (Parse_Decls_Begin_End): move check that basic
5639 declarations are not placed after later declarations in a separate
5640 procedure in Sem_Util (possibly not the best choice?), to be used both
5641 during parsing, for Ada 83 mode, and during semantic analysis, for
5643 * par-endh.adb (Check_End): move check that end label is not missing
5644 to Process_End_Label in the semantics
5645 * par-prag.adb (Process_Restrictions_Or_Restriction_Warnings): remove
5646 the special case for SPARK restriction
5647 * par.adb: use and with Sem_Util, for use in Parse_Decls_Begin_End
5648 * restrict.adb, restrict.ads (Check_Formal_Restriction): add a
5649 parameter Force to issue the error message even on internal node (used
5650 for generated end label). Call Check_Restriction to check when an error
5651 must be issued. In SPARK mode, issue an error message even if the
5652 restriction is not set.
5653 (Check_Restriction): new procedure with an additional out parameter to
5654 inform the caller that a message has been issued
5655 * sem_aggr.adb: Minor modification of message
5656 * sem_attr.adb (Analyze_Attribute): call Check_Formal_Restriction
5657 instead of issuing an error message directly
5658 * sem_ch3.adb (Analyze_Declarations): move here the check that basic
5659 declarations are not placed after later declarations, by calling
5660 Check_Later_Vs_Basic_Declarations
5661 (Analyze_Subtype_Declaration): move here the check that an index or
5662 discriminant constraint must be a subtype mark. Change the check that
5663 a subtype of String must start at one so that it works on subtype marks.
5664 * sem_ch4.adb (Analyze_Call): move here the check that a named
5665 association cannot follow a positional one in a call
5666 * sem_ch5.adb (Check_Unreachable_Code): call Check_Formal_Restriction
5667 instead of issuing an error message directly
5668 * sem_ch8.adb (Find_Selected_Component): move here the check that a
5669 selector name is not a character literal or an operator symbol. Move
5670 here the check that the prefix of an expanded name cannot be a
5671 subprogram or a loop statement.
5672 * sem_util.adb, sem_util.ads (Check_Later_Vs_Basic_Declarations): new
5673 procedure called from parsing and semantics to check that basic
5674 declarations are not placed after later declarations
5675 (Process_End_Label): move here the check that end label is not missing
5677 2011-08-02 Arnaud Charlet <charlet@adacore.com>
5679 * sem_ch13.adb (Analyze_Enumeration_Representation_Clause): Ignore enum
5680 representation clause in codepeer mode, since it confuses CodePeer and
5681 does not bring useful info.
5683 2011-08-02 Ed Falis <falis@adacore.com>
5685 * init.c: initialize fp hw on MILS.
5687 2011-08-02 Ed Schonberg <schonberg@adacore.com>
5689 * errout.adb (First_Node): for bodies, return the node itself (small
5690 optimization). For other nodes, do not check source_unit if the node
5691 comes from Standard.
5693 2011-08-02 Robert Dewar <dewar@adacore.com>
5695 * exp_ch3.adb: Minor comment additions.
5696 * sem_ch13.adb: Minor reformatting.
5698 2011-08-02 Pascal Obry <obry@adacore.com>
5700 * make.adb, makeutl.adb: Removes some superfluous directory separator.
5702 2011-08-02 Robert Dewar <dewar@adacore.com>
5704 * sem_attr.adb: Minor reformatting.
5706 2011-08-02 Robert Dewar <dewar@adacore.com>
5708 * einfo.adb (Has_Default_Aspect): Replaces Has_Default_Value
5709 (Has_Default_Component_Value): Removed
5710 * einfo.ads Comment updates
5711 (Has_Default_Aspect): Replaces Has_Default_Value
5712 (Has_Default_Component_Value): Removed
5714 (Expand_N_Freeze_Entity): Handle Default[_Component]_Value aspects
5716 (Build_Array_Init_Proc): Handle Default_[Component_]Value aspects
5717 (Get_Simple_Init_Val): Handle Default_Value aspect
5718 (Needs_Simple_Initialization): Handle Default_Value aspect
5719 * exp_ch3.ads: Needs_Simple_Initialization
5720 * freeze.adb (Freeze_Entity): Handle Default_[Component_]Value aspect
5721 * par-prag.adb (Pragma_Default[_Component]Value) Removed
5723 (Analyze_Aspect_Specifications): Fix Default[_Component]_Value aspects
5724 * sem_prag.adb (Pragma_Default[_Component]Value) Removed
5725 * snames.ads-tmpl (Pragma_Default[_Component]Value) Removed
5727 2011-08-02 Ed Schonberg <schonberg@adacore.com>
5729 * sem_ch5.adb (Analyze_Iterator_Specification): use base type to locate
5730 package containing iteration primitives.
5731 exp_ch5.adb (Expand_Iterator_Loop): ditto.
5733 2011-08-02 Ed Schonberg <schonberg@adacore.com>
5735 * sem_ch5.adb (Analyze_Iteration_Scheme): For an Ada2012 iterator with
5736 "of", pre-analyze expression in case it is a function call with
5737 finalization actions that must be placed ahead of the loop.
5738 * exp_ch5.adb (Expand_Iterator_Loop): If condition_actions are present
5739 on an Ada2012 iterator, insert them ahead of the rewritten loop.
5741 2011-08-02 Geert Bosch <bosch@adacore.com>
5743 * cstand.adb (Create_Float_Types): Only consider C's long double for
5744 Long_Long_Float, in addition to double.
5746 2011-08-02 Robert Dewar <dewar@adacore.com>
5748 * sem_ch3.adb, sem_ch5.adb, sem_type.adb, switch-c.adb, switch-c.ads,
5749 sem_prag.adb, sem_util.adb, sem_util.ads, sem_res.adb, warnsw.ads,
5750 prepcomp.ads, cstand.adb, stand.ads, a-calfor.adb, s-stusta.adb:
5753 2011-08-02 Ed Schonberg <schonberg@adacore.com>
5755 * sem_attr.adb: handle properly 'Result when it is a prefix of an
5758 2011-08-02 Javier Miranda <miranda@adacore.com>
5760 * einfo.ads, einfo.adb
5761 (Original_Access_Type): Move this attribute to Node26 since there was
5762 an undocumented use of Node21 in E_Access_Subprogram_Type entities
5763 which causes conflicts and breaks the generation of the .NET compiler.
5764 (Interface_Name): Add missing documentation on JGNAT only uses of
5767 2011-08-02 Geert Bosch <bosch@adacore.com>
5769 * cstand.adb (Back_End_Float_Types): Use Elist instead of Nlist
5770 (Find_Back_End_Float_Type): Likewise
5771 (Create_Back_End_Float_Types): Likewise
5772 (Create_Float_Types): Likewise
5773 (Register_Float_Type): Likewise
5774 * sem_ch3.adb (Floating_Point_Type_Declaration): Use Elist instead of
5775 Nlist and split out type selection in new local Find_Base_Type function.
5776 * sem_prag.adb (Process_Import_Predefined_Type): Use Elist instead of
5778 * stand.ads (Predefined_Float_Types): Use Elist instead of Nlist
5780 2011-08-02 Robert Dewar <dewar@adacore.com>
5782 * inline.adb: Minor code reorganization (put Get_Code_Unit_Entity in
5784 * opt.ads: Minor comment change.
5785 * sem_ch12.adb: Minor code reorganization.
5787 2011-08-02 Gary Dismukes <dismukes@adacore.com>
5789 * sem_ch3.adb (Complete_Private_Subtype): Don't append the private
5790 subtype's list of rep items to the list on the full subtype in the case
5791 where the lists are the same.
5793 2011-08-02 Geert Bosch <bosch@adacore.com>
5795 * switch-c.adb (Free): New deallocation procedure to avoid implicitly
5796 using the one from System.Strings, which also deallocates all strings.
5798 2011-08-02 Geert Bosch <bosch@adacore.com>
5800 * gcc-interface/gigi.h, gcc-interface/misc.c (enumerate_modes): New
5802 * gcc-interface/Make-lang.in: Update dependencies.
5804 2011-08-02 Olivier Hainque <hainque@adacore.com>
5806 * gcc-interface/trans.c (Subprogram_Body_to_gnu): Set the function
5809 2011-08-02 Javier Miranda <miranda@adacore.com>
5811 * sem_ch3.adb (Check_Anonymous_Access_Components): Create extra formals
5812 associated with anonymous access to subprograms.
5814 2011-08-02 Geert Bosch <bosch@adacore.com>
5817 (Preprocessing_Symbol_Defs): Move from Prepcomp.Symbol_Definitions.
5818 (Preprocessing_Symbol_Last): Move from Prepcomp.Last_Definition.
5819 * prepcomp.adb (Symbol_Definitions, Last_Definition): Move to opt.ads
5820 (Add_Symbol_Definition): Move to switch-c.adb
5821 (Process_Command_Line_Symbol_Definitions): Adjust references to above.
5822 * prepcomp.ads: Remove dependency on Ada.Unchecked_Deallocation.
5823 (Add_Symbol_Definition): Move to switch-c.adb.
5824 * sem_ch13.adb, sem_prag.adb: Add dependency on Warnsw.
5826 (Set_Dot_Warning_Switch, Set_GNAT_Mode_Warnings, Set_Warning_Switch):
5828 * sem_warn.ads (Warn_On_Record_Holes, Warn_On_Overridden_Size,
5829 Set_Dot_Warning_Switch, Set_GNAT_Mode_Warnings, Set_Warning_Switch):
5831 * switch-c.adb: Replace dependency on Prepcomp and Sem_Warn by Warnsw.
5832 (Add_Symbol_Definition): Moved from Prepcomp.
5833 * switch-c.ads: Update copyright notice. Use String_List instead of
5834 Argument_List, removing dependency on System.OS_Lib.
5836 2011-08-02 Yannick Moy <moy@adacore.com>
5838 * sem_ch3.adb (Analyze_Object_Declaration): issue an error in formal
5839 mode on initialization expression which does not respect SPARK
5841 * sem_util.adb, sem_util.ads (Is_SPARK_Initialization_Expr): determines
5842 if the tree referenced by its argument represents an initialization
5843 expression in SPARK, suitable for initializing an object in an object
5846 2011-08-02 Javier Miranda <miranda@adacore.com>
5848 * exp_ch9.adb (Expand_Access_Protected_Subprogram_Type): Link the
5849 internally generated access to subprogram with its associated protected
5851 * einfo.ads, einfo.adb (Original_Access_Type): New attribute.
5853 2011-08-02 Geert Bosch <bosch@adacore.com>
5855 * cstand.adb (Register_Float_Type): Print information about type to
5856 register, if the Debug_Flag_Dot_B is set.
5857 * debug.adb (Debug_Flag_Dot_B): Document d.b debug option.
5858 * rtsfind.ads (RE_Max_Base_Digits): New run time entity.
5859 * sem_ch3.adb (Floating_Point_Type_Declaration): Allow declarations
5860 with a requested precision of more than Max_Digits digits and no more
5861 than Max_Base_Digits digits, if a range specification is present and the
5862 Predefined_Float_Types list has a suitable type to derive from.
5863 * sem_ch3.adb (Rep_Item_Too_Early): Avoid generating error in the
5864 case of type completion with pragma Import
5866 (Process_Import_Predefined_Type): Processing to complete a type
5867 with pragma Import. Currently supports floating point types only.
5868 (Set_Convention_From_Pragma): Do nothing without underlying type.
5869 (Process_Convention): Guard against absence of underlying type,
5870 which may happen when importing incomplete types.
5871 (Process_Import_Or_Interface): Handle case of importing predefined
5872 types. Tweak error message.
5874 2011-08-02 Eric Botcazou <ebotcazou@adacore.com>
5876 * inline.adb (Add_Inlined_Body): Adjust check for library-level inlined
5877 functions to previous change. Reorganize code slightly.
5879 2011-08-02 Geert Bosch <bosch@adacore.com>
5881 * back_end.ads (Register_Type_Proc): New call back procedure type for
5882 allowing the back end to provide information about available types.
5883 (Register_Back_End_Types): New procedure to register back end types.
5884 * back_end.adb (Register_Back_End_Types): Call the back end to enumerate
5886 * cstand.adb (Back_End_Float_Types): New list for floating point types
5887 supported by the back end.
5888 (Build_Float_Type): Add extra parameter for Float_Rep_Kind.
5889 (Copy_Float_Type): New procedure to make new copies of predefined types.
5890 (Register_Float_Type): New call back procedure to populate the BEFT list
5891 (Find_Back_End_Float_Type): New procedure to find a BEFT by name
5892 (Create_Back_End_Float_Types): New procedure to populate the BEFT list.
5893 (Create_Float_Types): New procedure to create entities for floating
5894 point types predefined in Standard, and put these and any remaining
5895 BEFTs on the Predefined_Float_Types list.
5896 * stand.ads (Predefined_Float_Types): New list for predefined floating
5897 point types that do not have declarations in package Standard.
5899 2011-08-02 Eric Botcazou <ebotcazou@adacore.com>
5901 * inline.adb (Get_Code_Unit_Entity): New local function. Returns the
5902 entity node for the unit containing the parameter.
5903 (Add_Inlined_Body): Use it to find the unit containing the subprogram.
5904 (Add_Inlined_Subprogram): Likewise.
5905 * gcc-interface/Make-lang.in: Update dependencies.
5907 2011-08-02 Thomas Quinot <quinot@adacore.com>
5909 * s-stusta.adb (Print): Make sure Pos is always initialized to a
5912 2011-08-02 Geert Bosch <bosch@adacore.com>
5914 * a-calfor.adb (Image): Simplify, removing unnecessary uses of 'Image.
5916 2011-08-02 Eric Botcazou <ebotcazou@adacore.com>
5918 * sem_type.adb (Covers): Move trivial case to the top and reuse the
5919 computed value of Base_Type.
5921 2011-08-02 Yannick Moy <moy@adacore.com>
5923 * restrict.adb (Check_Restriction): issue an error for any use of
5924 class-wide, even if the No_Dispatch restriction is not set.
5925 * sem_aggr.adb: Correct typos in comments and messages in formal mode
5926 * sem_ch3.adb (Process_Full_View): issue an error in formal mode is,
5927 when completing a private extension, the type named in the private part
5928 is not the same as that named in the visible part.
5929 * sem_res.adb (Resolve_Call): issue an error in formal mode on the use
5930 of an inherited primitive operations of a tagged type or type extension
5931 that returns the tagged type.
5932 * sem_util.adb, sem_util.ads (Is_Inherited_Operation_For_Type): new
5933 function which returns True for an implicit operation inherited by the
5934 derived type declaration for the argument type.
5935 (Is_SPARK_Object_Reference): move to appropriate place in alphabetic
5938 2011-08-02 Ed Schonberg <schonberg@adacore.com>
5940 * sem_ch5.adb (Pre_Analyze_Range): new procedure extracted from
5941 Process_Bounds, to perform analysis with expansion of a range or an
5942 expression that is the iteration scheme for a loop.
5943 (Analyze_Iterator_Specification): If domain of iteration is given by a
5944 function call with a controlled result, as is the case if call returns
5945 a predefined container, ensure that finalization actions are properly
5947 * par-ch3.adb: accept Ada2012 iterator form in P_Discrete_Range.
5949 2011-08-02 Javier Miranda <miranda@adacore.com>
5951 * sem_ch5.adb (Analyze_Iteration_Scheme): Fix typo.
5952 * gcc-interface/Make-lang.in: Update dependencies.
5954 2011-08-02 Javier Miranda <miranda@adacore.com>
5956 * sem_util.ads, sem_util.adb (Is_Variable): Add a new formal to
5957 determine if the analysis is performed using N or Original_Node (N).
5958 * exp_util.adb (Side_Effect_Free): Code cleanup since the new
5959 functionality of routine Is_Variable avoids code duplication.
5960 * checks.adb (Determine_Range): Handle temporaries generated by
5961 Remove_Side_Effects.
5963 2011-08-02 Javier Miranda <miranda@adacore.com>
5965 * exp_ch4.adb (Expand_N_Quantified_Expression): Force reanalysis and
5966 expansion of the condition. Required since the previous analysis was
5967 done with expansion disabled (see Resolve_Quantified_Expression) and
5968 hence checks were not inserted and record comparisons have not been
5971 2011-08-02 Ed Falis <falis@adacore.com>
5973 * s-taprop-vxworks.adb, s-intman-vxworks.adb, s-intman-vxworks.ads:
5976 2011-08-02 Bob Duff <duff@adacore.com>
5978 * opt.ads: Minor comment fix.
5980 2011-08-02 Bob Duff <duff@adacore.com>
5982 * sem_ch12.adb (Analyze_Package_Instantiation,
5983 Analyze_Subprogram_Instantiation): Turn off style checking while
5984 analyzing an instance. Whatever style checks that apply to the generic
5985 unit should apply, so it makes no sense to apply them in an instance.
5986 This was causing trouble when compiling an instance of a runtime
5987 unit that violates the -gnatyO switch.
5988 * stylesw.adb (Set_Style_Check_Options): "when 'O' =>" was missing from
5989 one of the two case statements, causing spurious errors.
5991 2011-08-02 Robert Dewar <dewar@adacore.com>
5993 * uname.adb: Minor reformatting.
5994 * gnatcmd.adb: Minor reformatting.
5995 * exp_attr.adb: Minor reformatting.
5997 2011-08-02 Ed Schonberg <schonberg@adacore.com>
5999 * exp_ch5.adb (Expand_N_Assignment_Statement): under restriction
6000 No_Dispatching_Calls, do not look for the Assign primitive, because
6001 predefined primitives are not created in this case.
6003 2011-08-02 Bob Duff <duff@adacore.com>
6005 * stylesw.ads: Minor comment fixes.
6007 2011-08-02 Robert Dewar <dewar@adacore.com>
6009 * freeze.adb (Add_To_Result): New procedure.
6011 2011-08-02 Jose Ruiz <ruiz@adacore.com>
6013 * exp_attr.adb (Find_Stream_Subprogram): When using a configurable run
6014 time, if the specific run-time routines for handling streams of strings
6015 are not available, use the default mechanism.
6017 2011-08-02 Arnaud Charlet <charlet@adacore.com>
6019 * s-regpat.ads: Fix typo.
6021 2011-08-02 Vincent Celier <celier@adacore.com>
6023 * prj-conf.adb (Get_Or_Create_Configuration_File): If On_Load_Config is
6024 not null, call it to create the in memory config project file without
6025 parsing an existing default config project file.
6027 2011-08-02 Eric Botcazou <ebotcazou@adacore.com>
6029 * atree.adb (Allocate_Initialize_Node): Remove useless temporaries.
6031 2011-08-02 Ed Schonberg <schonberg@adacore.com>
6033 * sem_elim.adb: an abstract subprogram does not need an eliminate
6034 pragma for its descendant to be eliminable.
6036 2011-08-02 Ed Falis <falis@adacore.com>
6038 * init.c: revert to handling before previous checkin for VxWorks
6039 * s-intman-vxworks.adb: delete unnecessary declarations related to
6040 using Ada interrupt facilities for handling signals.
6041 Delete Initialize_Interrupts. Use __gnat_install_handler instead.
6042 * s-intman-vxworks.ads: Import __gnat_install_handler as
6043 Initialize_Interrupts.
6044 * s-taprop-vxworks.adb: Delete Signal_Mask.
6045 (Abort_Handler): change construction of mask to unblock exception
6048 2011-08-02 Jerome Guitton <guitton@adacore.com>
6050 * a-except-2005.adb (Raise_From_Signal_Handler): Call
6051 Debug_Raise_Exception before propagation starts.
6053 2011-08-02 Eric Botcazou <ebotcazou@adacore.com>
6055 * exp_ch6.adb (Expand_Call): Guard restriction checks with a call
6056 to Restriction_Check_Required.
6057 * sem_ch3.adb (Analyze_Object_Declaration): Likewise.
6058 * sem_res.adb (Resolve_Call): Likewise.
6059 * sem_attr.adb (Check_Stream_Attribute): Likewise.
6061 2011-08-02 Bob Duff <duff@adacore.com>
6063 * stylesw.ads: Update comment.
6064 * style.adb: Minor: Use Error_Msg_NE instead of Error_Msg_N.
6065 * errout.ads: Remove obsolete comment.
6067 2011-08-02 Javier Miranda <miranda@adacore.com>
6069 * einfo.ads, einfo.adb (Is_Safe_To_Reevaluate): new function.
6070 (Set_Is_Safe_To_Reevaluate): new procedure.
6071 * sem_ch5.adb (Analyze_Assignment): Add one assertion to ensure that no
6072 assignment is allowed on safe-to-reevaluate variables.
6073 (Analyze_Iteration_Schine.Process_Bounds.One_Bound): Decorate the
6074 temporary created to remove side effects in expressions that use
6075 the secondary stack as safe-to-reevaluate.
6076 * exp_util.adb (Side_Effect_Free): Add missing code to handle well
6077 variables that are not true constants.
6079 2011-08-02 Robert Dewar <dewar@adacore.com>
6081 * sem_ch5.adb, sem_ch7.adb, einfo.ads, sem_util.adb, sem_util.ads,
6082 sem_res.adb, sem_ch6.adb: Minor reformatting.
6084 2011-08-02 Jerome Guitton <guitton@adacore.com>
6086 * a-except-2005.adb (Raise_Current_Excep): Remove obsolete dead code.
6088 2011-08-02 Ed Schonberg <schonberg@adacore.com>
6090 * sem_ch6.adb (New_Overloaded_Entity, Check_Overriding_Indicator): Do
6091 not set Overridden_Operation if subprogram is an initialization
6094 2011-08-02 Yannick Moy <moy@adacore.com>
6096 * par-ch6.adb: Correct obsolete name in comments
6097 * restrict.adb, restrict.ads (Check_Formal_Restriction): new function
6098 which takes two message arguments (existing function takes one), with
6099 second message used for continuation.
6100 * sem_ch5.adb (Analyze_Block_Statement): in formal mode, only reject
6101 block statements that originate from a source block statement, not
6102 generated block statements
6103 * sem_ch6.adb (Analyze_Function_Call): rename L into Actuals, for
6104 symmetry with procedure case
6105 * sem_ch7.adb (Check_One_Tagged_Type_Or_Extension_At_Most): new
6106 function to issue an error in formal mode if a package specification
6107 contains more than one tagged type or type extension.
6108 * sem_res.adb (Resolve_Actuals): in formal mode, check that actual
6109 parameters matching formals of tagged types are objects (or ancestor
6110 type conversions of objects), not general expressions. Issue an error
6111 on view conversions that are not involving ancestor conversion of an
6113 (Resolve_Type_Conversion): in formal mode, issue an error on the
6114 operand of an ancestor type conversion which is not an object
6115 * sem_util.adb, sem_util.ads (Find_Actual): extend the behavior of the
6116 procedure so that it works also for actuals of function calls
6117 (Is_Actual_Tagged_Parameter): new function which determines if its
6118 argument is an actual parameter of a formal of tagged type in a
6120 (Is_SPARK_Object_Reference): new function which determines if the tree
6121 referenced by its argument represents an object in SPARK
6123 2011-08-02 Robert Dewar <dewar@adacore.com>
6125 * sem_ch3.adb: Minor reformatting
6126 Minor comment addition
6127 Minor error msg text change
6129 2011-08-02 Javier Miranda <miranda@adacore.com>
6131 * sem_ch5.adb (Analyze_Iteration_Scheme.Uses_Secondary_Stack): New
6132 function. Used to be more precise when we generate a variable plus one
6133 assignment to remove side effects in the evaluation of the Bound
6135 (Analyze_Iteration_Scheme): Clean attribute analyzed in all the nodes
6136 of the bound expression to force its re-analysis and thus expand the
6137 associated transient scope (if required). Code cleanup replacing the
6138 previous code that declared the constant entity by an invocation to
6139 routine Force_Evaluation which centralizes this work in the frontend.
6141 2011-08-02 Robert Dewar <dewar@adacore.com>
6143 * einfo.adb (Is_Base_Type): Improve efficiency by using a flag table
6144 (Base_Type): Now uses improved Is_Base_Type function
6145 * einfo.ads (Base_Type): Inline this function
6147 2011-08-02 Robert Dewar <dewar@adacore.com>
6149 * sem_prag.adb (Analyze_Pragma): Defend against infinite recursion
6150 (Analyze_Aspect_Specifications): Fix Sloc values for constructed pragmas
6152 2011-08-02 Arnaud Charlet <charlet@adacore.com>
6154 * gcc-interface/Make-lang.in: Update dependencies.
6155 * gcc-interface/Makefile.in: Use s-inmapop-vxworks.adb for all VxWorks
6158 2011-08-02 Yannick Moy <moy@adacore.com>
6160 * par-ch3.adb (P_Delta_Constraint): issue an error in formal mode on
6161 non-simple expression used in delta constraint
6162 (P_Index_Or_Discriminant_Constraint): issue an error in formal mode on
6163 index constraint which is not a subtype mark
6164 * par.adb: With and use Restrict
6165 * sem_ch3.adb (Analyze_Component_Declaration): issue an error in formal
6166 mode on component type which is not a subtype mark and default
6167 expression on component
6168 (Analyze_Subtype_Declaration): issue an error in formal mode on subtype
6169 of string which does not have a lower index bound equal to 1
6170 (Array_Type_Declaration): issue an error in formal mode on index or
6171 component type which is not a subtype mark, and on aliased keyword on
6173 (Derived_Type_Declaration): issue an error in formal mode on interface,
6174 limited or abstract type
6175 (Record_Type_Declaration): issue an error in formal mode on interface
6176 (Record_Type_Definition): issue an error in formal mode on tagged types
6177 and type extensions not declared in the specification of a library unit
6178 package; on null non-tagged record; on variant part
6180 2011-08-02 Vincent Celier <celier@adacore.com>
6182 * prj-nmsc.adb (Check_Library_Attributes): Do not report Library_Dir
6183 not declared for qualified library project when Library_Name is not
6184 declared, but Library_Dir is.
6186 2011-08-02 Robert Dewar <dewar@adacore.com>
6188 * sem_ch13.adb (Analyze_Aspect_Specification): Fix slocs on generated
6189 pragmas (affects aspects [Component_]Default_Value
6190 (Check_Aspect_At_Freeze_Point): For Component_Default_Value, use
6191 component type for the resolution
6193 2011-08-02 Eric Botcazou <ebotcazou@adacore.com>
6195 * einfo.adb (Base_Type): Tune implementation for speed.
6197 2011-08-02 Robert Dewar <dewar@adacore.com>
6199 * freeze.adb: Minor reformatting.
6201 2011-08-02 Thomas Quinot <quinot@adacore.com>
6203 * scos.ads: Update comments.
6205 2011-08-02 Ed Schonberg <schonberg@adacore.com>
6207 * sem_ch3.adb (Build_Derived_Type): Inherit the convention from the
6208 base type, because the parent may be a subtype of a private type whose
6209 convention is established in a private part.
6211 2011-08-02 Hristian Kirtchev <kirtchev@adacore.com>
6213 * exp_ch6.adb (Expand_N_Extended_Return_Statement): Wrap the return
6214 statement in a block when the expansion of the return expression has
6215 created a finalization chain.
6216 * freeze.adb (Freeze_Expression): Alphabetize all choices associated
6217 with the parent node.
6218 Add N_Extended_Return_Statement to handle the case where a transient
6219 object declaration appears in the Return_Object_Declarations list of
6220 an extended return statement.
6222 2011-08-02 Matthew Gingell <gingell@adacore.com>
6224 * adaint.c (__gnat_is_symbolic_link_attr): Supress warning on possibly
6225 unused parameter 'name'.
6227 2011-08-02 Ed Schonberg <schonberg@adacore.com>
6229 * sem_elim.adb (Set_Eliminated): If the overridden operation is an
6230 inherited operation, check whether its alias, which is the source
6231 operastion that it renames, has been marked eliminated.
6233 2011-08-02 Javier Miranda <miranda@adacore.com>
6235 * exp_util.adb (Safe_Prefixed_Reference): Do not consider safe an
6236 in-mode parameter whose type is an access type since it can be used to
6237 modify its designated object. Enforce code that handles as safe an
6238 access type that is not access-to-constant but it is the result of a
6239 previous removal of side-effects.
6240 (Remove_Side_Effects): Minor code reorganization of cases which require
6241 no action. Done to incorporate documentation on new cases uncovered
6242 working in this ticket: no action needed if this routine was invoked
6243 too early and the nodes are not yet decorated.
6244 * sem_res.adb (Resolve_Slice): Minor code cleanup replacling two calls
6245 to routine Remove_Side_Effects by calls to Force_Evaluation since they
6246 were issued with actuals that are implicitly provided by
6249 2011-08-02 Robert Dewar <dewar@adacore.com>
6251 * sem_ch3.adb, sem_res.adb: Minor reformatting.
6253 2011-08-02 Yannick Moy <moy@adacore.com>
6255 * sem_attr.adb (Check_Formal_Restriction_On_Attribute): new procedure
6256 to issue an error in formal mode on attribute not supported in this mode
6257 (Analyze_Attribute): issue errors on standard attributes not supported
6259 * sem_ch3.adb (Modular_Type_Declaration): remove obsolete part of
6260 comment, and issue error in formal mode on modulus which is not a power
6262 (Process_Range_Expr_In_Decl): issue error in formal mode on non-static
6264 * sem_ch8.adb (Find_Type): issue error in formal mode on 'Base in
6266 * sem_res.adb (Resolve_Unary_Op): issue error in formal mode on unary
6267 operator on modular type (except 'not').
6269 2011-08-02 Robert Dewar <dewar@adacore.com>
6271 * gnat_rm.texi: Minor reformatting.
6273 2011-08-02 Arnaud Charlet <charlet@adacore.com>
6275 * s-osinte-linux.ads: Minor comment update and reformatting.
6276 * i-cexten.ads: Make this unit pure, as for its parent.
6277 Will allow its usage in more contexts if needed.
6279 2011-08-02 Robert Dewar <dewar@adacore.com>
6281 * s-utf_32.ads: Minor comment fix.
6283 2011-08-02 Ed Schonberg <schonberg@adacore.com>
6285 * sem_res.adb (Resolve_Actuals): if the subprogram is a primitive
6286 operation of a tagged synchronized type, handle the case where the
6287 controlling argument is overloaded.
6289 2011-08-02 Yannick Moy <moy@adacore.com>
6291 * gnat_rm.texi, opt.ads, sem_prag.adb, snames.ads-tmpl:
6292 Replace pragma SPARK_95 with pragma Restrictions (SPARK)
6293 * par-prag.adb (Process_Restrictions_Or_Restriction_Warnings): set
6294 SPARK mode and formal verification mode on processing SPARK restriction
6295 * s-rident.ads (Restriction_Id): add SPARK restriction in those not
6296 requiring consistency checking.
6298 2011-08-02 Robert Dewar <dewar@adacore.com>
6300 * sem_res.adb: Minor reformatting.
6302 2011-08-02 Robert Dewar <dewar@adacore.com>
6304 * a-cfdlli.ads, a-cfhase.ads, a-cforma.ads, a-cfhama.ads,
6305 a-cforse.ads: Remove unneeded with of Ada.Containers
6306 Remove commented out pragma Inline's
6307 Move specifications of new subprograms to the actual specs
6309 2011-08-02 Yannick Moy <moy@adacore.com>
6311 * a-cfdlli.ads, a-cfhase.ads, a-cforma.ads, a-cfhama.ads,
6312 a-cforse.ads: Update comments.
6314 2011-08-02 Ed Schonberg <schonberg@adacore.com>
6316 * sem_attr.adb: add attribute name when 'Result has the wrong prefix.
6318 2011-08-02 Robert Dewar <dewar@adacore.com>
6320 * a-cfdlli.ads, a-cfhase.ads, a-cforma.ads, a-cfhama.ads,
6321 a-cforse.ads, a-cofove.ads: Minor reformatting.
6323 2011-08-02 Claire Dross <dross@adacore.com>
6325 * a-cfdlli.ads, a-cfhase.ads, a-cforma.ads, a-cfhama.ads, a-cforse.ads,
6326 a-cofove.ads: Add comments.
6328 2011-08-02 Yannick Moy <moy@adacore.com>
6330 * gnat_rm.texi: Document formal containers.
6332 2011-08-02 Emmanuel Briot <briot@adacore.com>
6334 * g-comlin.adb (Goto_Section, Getopt): fix handling of "*" when there
6337 2011-08-02 Robert Dewar <dewar@adacore.com>
6339 * mlib-prj.adb, restrict.ads, sem_aggr.adb, sem_ch12.adb: Minor
6342 2011-08-02 Robert Dewar <dewar@adacore.com>
6344 * aspects.adb: New aspects Default_Value and Default_Component_Value
6345 New format of Aspect_Names table checks for omitted entries
6346 * aspects.ads: Remove mention of Aspect_Cancel and add documentation on
6347 handling of boolean aspects for derived types.
6348 New aspects Default_Value and Default_Component_Value
6349 New format of Aspect_Names table checks for omitted entries
6350 * einfo.ads, einfo.adb (Has_Default_Component_Value): New flag
6351 (Has_Default_Value): New flag
6352 (Has_Default_Component_Value): New flag
6353 (Has_Default_Value): New flag
6354 * par-ch13.adb (P_Aspect_Specifications): New format of Aspect_Names
6356 * par-prag.adb: New pragmas Default_Value and Default_Component_Value
6357 * sem_ch13.adb (Analyze_Aspect_Specifications): New aspects
6358 Default_Value and Default_Component_Value
6359 * sem_prag.adb: New pragmas Default_Value and Default_Component_Value
6360 New aspects Default_Value and Default_Component_Value
6361 * snames.ads-tmpl: New pragmas Default_Value and Default_Component_Value
6362 * sprint.adb: Print N_Aspect_Specification node when called from gdb
6364 2011-08-02 Vincent Celier <celier@adacore.com>
6366 * prj-nmsc.adb (Check_Library_Attributes): For virtual library project,
6367 inherit library kind.
6369 2011-08-02 Ed Schonberg <schonberg@adacore.com>
6371 * sem_res.adb: Add guards in calls to Matching_Static_Array_Bounds.
6374 2011-08-02 Robert Dewar <dewar@adacore.com>
6376 * i-cstrin.ads: Updates to make Interfaces.C.Strings match RM
6378 2011-08-02 Yannick Moy <moy@adacore.com>
6380 * sem_aggr.adb (Resolve_Aggregate): Fix thinko.
6382 2011-08-02 Robert Dewar <dewar@adacore.com>
6384 * impunit.adb: Add comment.
6386 2011-08-02 Yannick Moy <moy@adacore.com>
6388 * sem_aggr.adb (Check_Qualified_Aggregate): new procedure which checks
6389 qualification of aggregates in formal mode
6390 (Is_Top_Level_Aggregate): returns True for an aggregate not contained in
6392 (Resolve_Aggregate): complete the test that an aggregate is adequately
6393 qualified in formal mode
6395 2011-08-02 Pascal Obry <obry@adacore.com>
6397 * make.adb, bindgen.adb, gnatbind.adb: Minor reformatting.
6398 * mlib-prj.adb: Supress warning when compiling binder generated file.
6399 (Build_Library): Supress all warnings when compiling the binder
6402 2011-08-02 Yannick Moy <moy@adacore.com>
6404 * errout.adb, errout.ads (Check_Formal_Restriction): move procedure
6406 * restrict.adb, restrict.ads (Check_Formal_Restriction): ...to here
6407 * sem_aggr.adb, sem_ch5.adb, sem_util.adb:
6408 Add with/use clauses to make Check_Formal_Restriction visible
6410 2011-08-02 Ed Schonberg <schonberg@adacore.com>
6412 * sem_ch12.adb (Check_Generic_Actuals): handle properly actual
6413 in-parameters when type of the generic formal is private in the generic
6414 spec and non-private in the body.
6416 2011-08-02 Claire Dross <dross@adacore.com>
6418 * a-cfdlli.adb, a-cfdlli.ads, a-cfhase.adb, a-cfhase.ads, a-cfhama.adb,
6419 a-cfhama.ads, a-cforse.adb, a-cforse.ads, a-cforma.adb, a-cforma.ads,
6420 a-cofove.adb, a-cofove.ads: New files implementing formal containers.
6421 * impunit.adb, Makefile.rtl: Take new files into account.
6423 2011-08-02 Robert Dewar <dewar@adacore.com>
6425 * sem_aggr.adb, sem_ch3.adb, sem_ch5.adb, make.adb, sem_res.adb,
6426 sem_attr.adb, sem_ch6.adb, sem_ch8.adb: Minor reformatting.
6428 2011-08-02 Yannick Moy <moy@adacore.com>
6430 * sem_aggr.adb (Resolve_Aggregate): disable incorrectly placed check in
6432 * sem_util.adb (Matching_Static_Array_Bounds): proper detection of
6433 matching static array bounds, taking into account the special case of
6435 * sem_ch3.adb: Typo in comment.
6437 2011-08-02 Yannick Moy <moy@adacore.com>
6439 * errout.adb, errout.ads (Check_Formal_Restriction): new procedure
6440 which issues an error in formal mode if its argument node is originally
6442 * sem_ch3.adb (Analyze_Full_Type_Declaration): move test that a type
6443 has a discriminant specification so that it does not include the case
6445 (Derived_Type_Declaration): move here the test that a derived type has a
6446 discriminant specification
6447 * sem_aggr.adb (Resolve_Record_Aggregate): test the presence of the
6448 first element of a component association before accessing its choices
6449 (presence of component association is not enough)
6450 * exp_ch6.adb (Expand_N_Subprogram_Declaration): test if a subprogram
6451 declaration is a library item before accessing the next element in a
6452 list, as library items are not member of lists
6453 * sem_attr.adb, sem_ch11.adb, sem_ch4.adb, sem_ch5.adb, sem_ch6.adb,
6454 sem_ch8.adb, sem_ch9.adb, sem_res.adb, sem_util.adb: use
6455 Check_Formal_Restriction whenever possible.
6457 2011-08-02 Ed Schonberg <schonberg@adacore.com>
6459 * sem_ch3.adb (Find_Type_Of_Object): In ASIS mode, create an itype
6460 reference when needed.
6462 2011-08-02 Bob Duff <duff@adacore.com>
6464 * gnat_ugn.texi: Fix typo.
6466 2011-08-02 Vincent Celier <celier@adacore.com>
6468 * make.adb (Gnatmake): Use MLib.Tgt.Archive_Ext as the extension of
6469 archive file name. Do not use the full path name of archives for Open
6472 2011-08-02 Robert Dewar <dewar@adacore.com>
6474 * sem_ch12.adb, sem_ch11.adb: New calling sequence for
6475 Analyze_Aspect_Specifications
6477 (Analyze_Aspect_Specifications): New handling for boolean aspects
6478 * sem_ch13.ads (Analyze_Aspect_Specifications): New calling sequence
6479 * sem_ch3.adb, sem_ch6.adb, sem_ch7.adb, sem_ch9.adb: New calling
6480 sequence for Analyze_Aspect_Specifications
6481 * sem_prag.adb (Analyze_Pragma): Remove use of Aspect_Cancel entirely
6482 * sinfo.ads, sinfo.adb (Aspect_Cancel): Remove, no longer used
6484 2011-08-02 Robert Dewar <dewar@adacore.com>
6486 * freeze.adb (Freeze_Entity): Remove handling of delayed boolean
6487 aspects, since these no longer exist.
6489 2011-08-02 Robert Dewar <dewar@adacore.com>
6491 * par-ch13.adb (Aspect_Specifications_Present): Always return false on
6492 semicolon, do not try to see if there are aspects following it.
6493 * par-ch3.adb (P_Declarative_Items): Better message for unexpected
6496 2011-08-02 Robert Dewar <dewar@adacore.com>
6498 * sem_ch8.adb, aspects.ads: Minor reformatting.
6500 2011-08-02 Eric Botcazou <ebotcazou@adacore.com>
6502 * sem_ch13.ads (Analyze_Aspect_Specification): Add pragma Inline.
6503 * sem_ch13.adb (Analyze_Non_Null_Aspect_Specifications): New procedure
6505 (Analyze_Aspect_Specifications): ...here. Call above procedure.
6507 2011-08-02 Yannick Moy <moy@adacore.com>
6509 * exp_ch6.adb (Expand_N_Subprogram_Declaration): issue error in formal
6510 mode on subprogram declaration outside of package specification, unless
6511 it is followed by a pragma Import
6512 * sem_ch3.adb (Access_Definition, Access_Subprogram_Declaration,
6513 Access_Type_Declaration): issue error in formal mode on access type
6514 (Analyze_Incomplete_Type_Decl): issue error in formal mode on
6516 (Analyze_Object_Declaration): issue error in formal mode on object
6517 declaration which does not respect SPARK restrictions
6518 (Analyze_Subtype_Declaration): issue error in formal mode on subtype
6519 declaration which does not respect SPARK restrictions
6520 (Constrain_Decimal, Constrain_Float, Constrain_Ordinary_Fixed): issue
6521 error in formal mode on digits or delta constraint
6522 (Decimal_Fixed_Point_Type_Declaration): issue error in formal mode on
6523 decimal fixed point type
6524 (Derived_Type_Declaration): issue error in formal mode on derived type
6525 other than type extensions of tagged record types
6526 * sem_ch6.adb (Process_Formals): remove check in formal mode, redundant
6527 with check on access definition
6528 * sem_ch9.adb (Analyze_Protected_Definition): issue error in formal
6529 mode on protected definition.
6530 (Analyze_Task_Definition): issue error in formal mode on task definition
6532 2011-08-02 Robert Dewar <dewar@adacore.com>
6534 * make.adb, sem_ch8.adb, s-inmaop-vxworks.adb: Minor reformatting.
6536 2011-08-02 Javier Miranda <miranda@adacore.com>
6538 * sem_ch6.adb (Can_Override_Operator): New function.
6539 (Verify_Overriding_Indicator): Add missing code to check overriding
6540 indicator in operators. Fixes regression.
6541 (Check_Overriding_Indicator): Minor reformating after replacing the
6542 code that evaluates if the subprogram can override an operator by
6543 invocations to the above new function.
6545 (Write_Field26_Name): Add missing code to ensure that, following
6546 the documentation in einfo.ads, this field is not shown as attribute
6547 "Static_Initialization" on non-dispatching functions.
6549 2011-08-02 Jose Ruiz <ruiz@adacore.com>
6551 * sem_res.adb (Resolve_Call): A call to
6552 Ada.Real_Time.Timing_Events.Set_Handler violates restriction
6553 No_Relative_Delay (AI-0211) only when it sets a relative timing event,
6554 i.e., when the second parameter is of type Time_Span.
6556 2011-08-02 Vincent Celier <celier@adacore.com>
6558 * make.adb (Gnatmake): use <library dir>/lib<library name>.a to link
6559 with an archive instead of -L<library dir> -l<library name>.
6561 2011-08-02 Ed Schonberg <schonberg@adacore.com>
6563 * sem_ch8.adb (Analyze_Use_Type): If the clause is being re-analyzed,
6564 mark the base types In_Use in addition to making the operations
6567 2011-08-02 Ed Falis <falis@adacore.com>
6569 * init.c: add and setup __gnat_signal_mask for the exception signals
6570 * s-inmaop-vxworks.adb: new file.
6571 * s-intman-vxworks.adb: remove unnecessary initializations and
6573 * s-intman-vxworks.ads: remove unnecessary variable
6574 * s-taprop-vxworks.adb: simplify signal initialization
6576 2011-08-02 Robert Dewar <dewar@adacore.com>
6578 * sem_ch8.adb: Minor code reorganization, comment updates.
6580 2011-08-02 Robert Dewar <dewar@adacore.com>
6582 * sem_res.adb (Matching_Static_Array_Bounds): Moved to Sem_Util
6583 * sem_util.ads, sem_util.adb (Matching_Static_Array_Bounds): Moved
6585 (Matching_Static_Array_Bounds): Use Is_Ok_Static_Expression
6586 (Matching_Static_Array_Bounds): Moved here from Sem_Res
6588 2011-08-02 Ed Schonberg <schonberg@adacore.com>
6590 * atree.h, atree.ads, atree.adb: New subprograms to manipulate Elist5.
6591 * par_ch8.adb (P_Use_Type): initialize Used_Operations for node.
6592 * sinfo.ads, sinfo.adb (Used_Operations): new attribute of
6593 use_type_clauses, to handle more efficiently use_type and use_all_type
6595 * sem_ch8.adb: Rewrite Use_One_Type and End_Use_Type to handle the
6596 Ada2012 Use_All_Type clause.
6597 (Use_Class_Wide_Operations): new procedure.
6599 2011-08-02 Robert Dewar <dewar@adacore.com>
6601 * exp_util.adb, par-ch10.adb, par-ch6.adb, sem.adb, sem_ch6.adb,
6602 sem_ch6.ads, sinfo.adb, sinfo.ads, sprint.adb: Change parameterized
6603 expression to expression function.
6605 2011-08-02 Ed Schonberg <schonberg@adacore.com>
6607 * sem_ch4.adb: transform simple Ada2012 membership into equality only
6608 if types are compatible.
6610 2011-08-02 Yannick Moy <moy@adacore.com>
6612 * sem_res.adb (Matching_Static_Array_Bounds): new function which
6613 returns True if its argument array types have same dimension and same
6614 static bounds at each index.
6615 (Resolve_Actuals): issue an error in formal mode on actuals passed as
6616 OUT or IN OUT paramaters which are not view conversions in SPARK.
6617 (Resolve_Arithmetic_Op): issue an error in formal mode on
6618 multiplication or division with operands of fixed point types which are
6619 not qualified or explicitly converted.
6620 (Resolve_Comparison_Op): issue an error in formal mode on comparisons of
6621 Boolean or array type (except String) operands.
6622 (Resolve_Equality_Op): issue an error in formal mode on equality
6623 operators for array types other than String with non-matching static
6625 (Resolve_Logical_Op): issue an error in formal mode on logical operators
6626 for array types with non-matching static bounds. Factorize the code in
6627 Matching_Static_Array_Bounds.
6628 (Resolve_Qualified_Expression): issue an error in formal mode on
6629 qualified expressions for array types with non-matching static bounds.
6630 (Resolve_Type_Conversion): issue an error in formal mode on type
6631 conversion for array types with non-matching static bounds
6633 2011-08-02 Robert Dewar <dewar@adacore.com>
6635 * par-ch10.adb: Minor code reorganization (use Nkind_In).
6637 2011-08-02 Ed Schonberg <schonberg@adacore.com>
6639 * par-ch9.adb: save location of entry for proper error message.
6641 2011-08-02 Javier Miranda <miranda@adacore.com>
6643 * sem_type.ads, sem_type.adb (Is_Ancestor): Addition of a new formal
6644 (Use_Full_View) which permits this routine to climb through the
6645 ancestors using the full-view of private parents.
6646 * sem_util.adb (Collect_Interfaces_Info, Implements_Interface): Set
6647 Use_Full_View to true in calls to Is_Ancestor.
6648 * sem_disp.adb (Override_Dispatching_Operation): Set Use_Full_View to
6649 true in call to Is_Ancestor.
6650 * exp_ch3.adb (Build_Offset_To_Top_Functions, Initialize_Tag): Set
6651 Use_Full_View to true in call to Is_Ancestor.
6652 * exp_ch7.adb (Controller_Component): Set Use_Full_View to true in
6653 call to Is_Ancestor.
6654 * exp_ch4.adb (Expand_N_Type_Conversion, Tagged_Membership): Set
6655 Use_Full_View to true in calls to Is_Ancestor.
6656 * exp_disp.adb (Expand_Interface_Actuals, Make_Secondary_DT, Make_DT,
6657 Make_Select_Specific_Data_Table, Register_Primitive,
6658 Set_All_DT_Position): Set Use_Full_View to true in calls to Is_Ancestor.
6659 * exp_intr.adb (Expand_Dispatching_Constructor_Call): Set Use_Full_View
6660 to true in call to Is_Ancestor.
6661 * exp_util.adb (Find_Interface_ADT, Find_Interface_Tag): Set
6662 Use_Full_View to true in calls to Is_Ancestor.
6664 (Write_Call_Info): Set Use_Full_View to true in call to Is_Ancestor.
6665 (Write_Type_Info): Set Use_Full_View to true in call to Is_Ancestor.
6667 2011-08-02 Robert Dewar <dewar@adacore.com>
6669 * gnat_rm.texi: Minor reformatting.
6670 * sem_prag.adb: Minor reformatting.
6672 2011-08-02 Tristan Gingold <gingold@adacore.com>
6674 * vms_data.ads: Add VMS qualifier for -gnateP.
6676 2011-08-02 Robert Dewar <dewar@adacore.com>
6678 * par-ch13.adb (P_Aspect_Specification): New meaning of Decl = Empty
6679 * par-ch7.adb (P_Package): Proper placement of aspects for package
6681 * par-endh.adb (Check_End): Ad Is_Sloc parameter
6682 (End_Statements): Add Is_Sloc parameterr
6683 * par.adb (P_Aspect_Specification): New meaning of Decl = Empty
6684 (Check_End): Ad Is_Sloc parameter
6685 (End_Statements): Add Is_Sloc parameterr
6687 2011-08-02 Vincent Celier <celier@adacore.com>
6689 * ug_words: Add VMS qualifier equivalent to -gnateP:
6690 /SYMBOL_PREPROCESSING.
6692 2011-08-02 Jose Ruiz <ruiz@adacore.com>
6694 * gnat-style.texi: For hexadecimal numeric literals the typical
6695 grouping of digits is 4 to represent 2 bytes.
6696 A procedure spec which is split into several lines is indented two
6699 2011-08-02 Yannick Moy <moy@adacore.com>
6701 * exp_aggr.adb (Is_Others_Aggregate): move function to other unit.
6702 * sem_aggr.adb, sem_aggr.ads (Is_Others_Aggregate): move function here
6703 (Resolve_Aggregate): issue errors in formal modes when aggregate is not
6705 (Resolve_Array_Aggregate): issue errors in formal modes on non-static
6706 choice in array aggregate
6707 (Resolve_Extension_Aggregate): issue errors in formal modes on subtype
6709 (Resolve_Record_Aggregate): issue errors in formal modes on mixed
6710 positional and named aggregate for record, or others in record
6711 aggregate, or multiple choice in record aggregate
6712 * sem_res.adb (Resolve_Logical_Op): issue errors in formal mode when
6713 array operands to logical operations AND, OR and XOR do not have the
6714 same static lower and higher bounds
6715 * sem_ch5.adb, sinfo.ads: Correct typos in comments
6717 2011-08-01 Robert Dewar <dewar@adacore.com>
6719 * sem_util.ads, sem_util.adb, sem_ch6.adb (Last_Source_Statement):
6720 Replaces Last_Source_Node_In_Sequence.
6721 * err_vars.ads (Error_Msg_Lang): 16 is OK, don't need 4K
6722 * errout.adb (Set_Error_Msg_Lang): Takes arg with no parens, but stores
6723 parens and blank in string (this was inconsistently implemented).
6725 (Set_Error_Msg_Lang): Takes arg with no parens, but stores parens and
6726 blank in string (this was inconsistently implemented).
6728 (Set_Global_Switches): Set formal mode switches appropriately
6729 * opt.ads, opt.adb: Formal mode is now global switches, more consistent
6731 (Analyze_Pragma, case SPARK_95): Set opt switches appropriately and
6732 call Set_Error_Msg_Lang to set "spark" as language name.
6733 * par.adb: Remove unnecessary call to set formal language for errout
6734 * sem_prag.adb (P_Pragma, case SPARK_95): Set opt switches
6735 appropriately and call Set_Error_Msg_Lang to set "spark" as language
6737 * sem_ch4.adb (Analyze_Concatenation_Operand): remove procedure and
6738 calls to it, moved after resolution so that types are known
6739 * sem_res.adb (Resolve_Op_Concat): issue an error in formal mode if
6740 result of concatenation is not of type String
6741 (Resolve_Op_Concat_Arg): issue an error in formal mode if an operand of
6742 concatenation is not properly restricted
6743 * gnat_rm.texi: Add doc on pragma Spark_95.
6744 * gcc-interface/Makefile.in: Remove obsolete target pairs for
6745 Interfaces.C.* on VMS. Remove s-parame-vms-restrict.ads.
6746 * gcc-interface/Make-lang.in: Update dependencies.
6748 2011-08-01 Javier Miranda <miranda@adacore.com>
6750 * sem_disp.adb (Override_Dispatching_Operation): Enforce strictness of
6751 condition that detects if the overridden operation must replace an
6754 2011-08-01 Javier Miranda <miranda@adacore.com>
6756 * exp_ch4.adb (Expand_N_Case_Expression): Propagate to the expanded
6757 code declarations inserted by Insert_Actions in each alternative of the
6758 N_Case_Expression node.
6760 2011-08-01 Robert Dewar <dewar@adacore.com>
6762 * sem_ch6.adb: Minor code reorganization.
6763 * sem_util.adb: Minor reformatting.
6765 2011-08-01 Pascal Obry <obry@adacore.com>
6767 * prj-env.adb: Remove <prefix>/lib/gpr/<target> project search path.
6768 * gnat_ugn.texi: Add documentation for VERSIONINFO Windows resource.
6770 2011-08-01 Yannick Moy <moy@adacore.com>
6772 * par-ch4.adb (P_Name): issue a syntax error in SPARK mode on character
6773 literal or operator symbol which is prefixed
6774 * sem_attr.adb (Analyze_Access_Attribute): issue an error in formal
6775 mode on access attributes.
6776 * sem_ch4.adb (Analyze_Concatenation_Operand): new procedure to check
6777 that concatenation operands are properly restricted in formal mode
6778 (Analyze_Concatenation, Analyze_Concatenation_Rest): call new procedure
6779 Analyze_Concatenation_Operand. Issue an error in formal mode if the
6780 result of the concatenation has a type different from String.
6781 (Analyze_Conditional_Expression, Analyze_Explicit_Dereference,
6782 Analyze_Quantified_Expression, Analyze_Slice,
6783 Analyze_Null): issue an error in formal mode on unsupported constructs
6785 (Analyze_Block_Statement): only issue error on source block statement
6786 * sem_util.ads, sem_util.adb (Last_Source_Node_In_Sequence): new
6787 function which returns the last node in a list of nodes for which
6788 Comes_From_Source returns True, if any
6789 * sem_ch6.adb (Check_Missing_Return): minor refactoring to use
6790 Last_Source_Node_In_Sequence
6791 * sem_ch8.adb (Analyze_Exception_Renaming, Analyze_Generic_Renaming,
6792 Analyze_Object_Renaming, Analyze_Use_Package): issue an error in formal
6793 mode on unsupported constructs
6794 * sem_ch9.adb Do not return after issuing error in formal mode, as the
6795 rest of the actions may be needed later on since the error is marked as
6797 * sinfo.ads: Typos in comments.
6799 2011-08-01 Pascal Obry <obry@adacore.com>
6801 * projects.texi: Minor editing.
6803 2011-08-01 Yannick Moy <moy@adacore.com>
6805 * err_vars.ads (Error_Msg_Lang, Error_Msg_Langlen): new variables for
6806 insertion character ~~
6807 * errout.ads, errout.adb (Formal_Error_Msg_...): remove procedures
6808 (Set_Error_Msg_Lang): new procedure which fixes the language for use
6809 with insertion character ~~
6810 (Set_Msg_Text): treat insertion character ~~
6811 * par-ch4.adb, par-ch5.adb, par-endh.adb, sem_attr.adb, sem_ch11.adb,
6812 sem_ch3.adb, sem_ch5.adb, sem_ch9.adb, sem_util.adb: Replace calls to
6813 Formal_Error_Msg_... procedures by equivalent Error_Msg_...
6814 procedures. Favor calls to Error_Msg_F(E) over Error_Msg_N(E). Make
6815 errors related to the formal language restriction not serious
6816 (insertion character |).
6817 * par.adb (Par): set formal language for error messages if needed
6818 * sem_ch6.adb (Check_Missing_Return): take into account possible
6819 generated statements at the end of the function
6820 * snames.ads-tmpl (Name_SPARK_95, Pragma_SPARK_95): new variable and
6821 enumeration value to define a new pragma SPARK_95
6822 * opt.ads, opt.adb (SPARK_Version_Type, SPARK_Version_Default,
6823 SPARK_Version): new type and variables to store the SPARK version
6825 (SPARK_Mode): return True when SPARK_Version is set
6826 * par-prag.adb: Correct indentation
6827 (Prag): take Pragma_SPARK_95 into account
6828 * sem_prag.adb (Set_Mechanism_Value, Sig_Flags): take Pragma_SPARK_95
6831 2011-08-01 Robert Dewar <dewar@adacore.com>
6833 * sem_ch3.adb, sem_ch3.ads, sem_ch5.adb, prj-part.adb, par-ch4.adb,
6834 sem_util.adb, sem_ch4.adb, sem_ch6.adb, sem_ch6.ads, sem_ch8.adb,
6835 sem_ch8.ads, sem_ch13.ads, par-ch5.adb, prj-env.ads: Minor reformatting
6837 2011-08-01 Pascal Obry <obry@adacore.com>
6839 * prj-part.ads, prj-part.adb (Parse): Add Target_Name parameter. Pass
6840 Target_Name to Get_Path call.
6841 (Parse_Single_Project): Likewise.
6842 (Post_Parse_Context_Clause): Likewise.
6843 * prj-env.ads, prj-env.adb (Find_Project): Add Target_Name parameter.
6844 Call Initialise_Project_Path with the proper Target_Name.
6845 (Initialize_Project_Path): Add <gnat_root>/<target_name>/lib/gnat
6847 (Get_Path): Add Target_Name parameter. Call Initialise_Project_Path
6848 with the proper Target_Name.
6849 * prj-conf.adb (Get_Or_Create_Configuration_File): Pass Target_Name to
6851 (Parse_Project_And_Apply_Config): Likewise.
6852 * prj-makr.adb (Initialize): Pass empty Target_Name to Parse routine.
6853 This is fine as this part of the code is supporting only native
6855 * prj-pars.adb (Parse): Pass empty Target_Name to Parse routine. This
6856 is fine as this part of the code is supporting only native compilation.
6858 2011-08-01 Yannick Moy <moy@adacore.com>
6860 * sem_util.adb (Enter_Name): issue error in formal mode on declaration
6861 of homonym, unless the homonym is one of the cases allowed in SPARK
6862 * par-ch5.adb (Parse_Decls_Begin_End): issue error in SPARK mode for
6863 package declaration occurring after a body.
6865 2011-08-01 Robert Dewar <dewar@adacore.com>
6867 * checks.adb, exp_ch4.adb: Minor reformatting.
6869 2011-08-01 Javier Miranda <miranda@adacore.com>
6871 * einfo.ads (Access_Disp_Table): Fix documentation.
6872 (Dispatch_Table_Wrappers): Fix documentation.
6874 2011-08-01 Pascal Obry <obry@adacore.com>
6876 * prj-env.adb, prj-env.ads: Minor reformatting.
6878 2011-08-01 Yannick Moy <moy@adacore.com>
6880 * sem_util.ads, sem_util.adb, par.adb, par_util.adb
6881 (Formal_Error_Msg, Formal_Error_Msg_N, Formal_Error_Msg_SP): move
6882 procedures out of these packages.
6883 * errout.ads, errout.adb
6884 (Formal_Error_Msg, Formal_Error_Msg_N, Formal_Error_Msg_SP): move
6885 procedures in of this package
6886 (Formal_Error_Msg_NE): new procedure for wrapper on Error_Msg_NE
6887 * par-ch5.adb (Parse_Decls_Begin_End): issue syntax error in SPARK mode
6888 on misplaced later vs initial declarations, like in Ada 83
6889 * sem_attr.adb (Processing for Analyze_Attribute): issue error in
6890 formal mode on attribute of private type whose full type declaration
6892 * sem_ch3.adb (Analyze_Declarations): issue error in formal mode on a
6893 package declaration inside a package specification
6894 (Analyze_Full_Type_Declaration): issue error in formal mode on
6895 controlled type or discriminant type
6896 * sem_ch6.adb (Analyze_Subprogram_Specification): only issue error on
6897 user-defined operator means that it should come from the source
6898 (New_Overloaded_Entity): issue error in formal mode on overloaded
6900 * sem_ch6.ads, sem_ch13.ads: typos in comments.
6902 2011-08-01 Thomas Quinot <quinot@adacore.com>
6904 * atree.adb: Minor reformatting.
6905 * checks.adb: Minor reformatting.
6907 2011-08-01 Vincent Celier <celier@adacore.com>
6909 * s-parame-vms-ia64.ads: Fix typo in comment
6911 * s-parame-vms-restrict.ads: Removed, unused.
6913 2011-08-01 Javier Miranda <miranda@adacore.com>
6916 (Is_Variable_Size_Array): Remove local subprogram Is_Constant_Bound.
6918 (Constrain_Index): Remove side effects in the evaluation of the bounds.
6919 * sem_ch3.ads, sem_ch3.adb
6920 (Is_Constant_Bound): New extended version of the subprogram that was
6921 previously located inside function Exp_Ch3.Is_Variable_Size_Array.
6922 Moved here since it is shared by routines of sem_ch3 and exp_ch3.
6923 * sem_aux.ads (Constant_Value): Fix typo in comment.
6924 * checks.adb (Generate_Index_Checks): New implementation which, for
6925 array objects with constant bounds, generates the runtime check
6926 referencing the bounds of the array type. For other cases this routine
6927 provides its previous behavior obtaining such values from the array
6929 * sem_res.adb (Set_Slice_Subtype): Link a copied range subtree with its
6931 * atree.adb (New_Copy): Reset flag Is_Overloaded in the new copy since
6932 we cannot have semantic interpretations of the new node.
6934 2011-08-01 Ed Schonberg <schonberg@adacore.com>
6936 * sem_ch6.adb (Fully_Conformant_Expressions): handle quantified
6939 2011-08-01 Arnaud Charlet <charlet@adacore.com>
6941 * sem_ch8.adb: Minor code editing.
6942 * s-vxwext.adb: Remove trailing space.
6943 * freeze.adb, freeze.ads, errout.ads, erroutc.adb: Fix GPLv3 header for
6944 consistency with other files.
6946 2011-08-01 Thomas Quinot <quinot@adacore.com>
6948 * s-auxdec.ads, s-auxdec-vms_64.ads: Minor reformatting.
6950 2011-08-01 Ed Schonberg <schonberg@adacore.com>
6952 * par-ch10.adb: reject parameterized expressions as compilation unit.
6953 * sem_ch4.adb: handle properly conditional expression with overloaded
6954 then_clause and no else_clause.
6956 2011-08-01 Tristan Gingold <gingold@adacore.com>
6958 * s-parame-vms-alpha.ads, s-parame-vms-ia64.ads: Redeclare C_Address
6959 like done by System.Aux_DEC.
6960 * env.c (__gnat_setenv) [VMS]: Put logicals into LNM$PROCESS table.
6962 2011-08-01 Yannick Moy <moy@adacore.com>
6964 * par-endh.adb (Check_End): issue a syntax error in SPARK mode for
6965 missing label at end of declaration (subprogram or package)
6966 * par-ch4.adb (P_Name): issue a syntax error in SPARK mode for mixing
6967 of positional and named parameter association
6968 * par.adb, par-util.adb (Formal_Error_Msg_SP): new wrapper on
6969 Error_Msg_SP which adds a prefix to the error message giving the name
6970 of the formal language analyzed
6971 * sem_ch6.adb (Analyze_Return_Type): issue an error in formal mode for
6972 access result type in subprogram, unconstrained array as result type,.
6973 (Analyze_Subprogram_Declaration): issue an error in formal mode for null
6975 * sem_ch8.adb: Code clean up.
6977 2011-08-01 Javier Miranda <miranda@adacore.com>
6979 * sem_ch7.adb (Uninstall_Declarations): Remove useless code.
6980 * einfo.ads (Access_Disp_Table): Fix documentation.
6981 (Dispatch_Table_Wrappers): Fix documentation.
6982 * einfo.adb (Access_Disp_Table, Dispatch_Table_Wrappers,
6983 Set_Access_Disp_Table, Set_Dispatch_Table_Wrappers): Fix the assertions
6984 to enforce the documentation of this attribute.
6985 (Set_Is_Interface): Cleanup the assertion.
6986 * exp_ch4.adb (Expand_Allocator_Expression, Tagged_Membership): Locate
6987 the Underlying_Type entity before reading attribute Access_Disp_Table.
6988 * exp_disp.adb (Expand_Dispatching_Call, Expand_Interface_Conversion):
6989 Locate the Underlying_Type before reading attribute Access_Disp_Table.
6990 * exp_aggr.adb (Build_Array_Aggr_Code, Build_Record_Aggr_Code): Locate
6991 the Underlying_Type entity before reading attribute Access_Disp_Table.
6992 * exp_ch3.adb (Build_Record_Init_Proc, Expand_N_Object_Declaration):
6993 Locate the Underlying_Type entity before reading attribute
6996 2011-08-01 Ed Schonberg <schonberg@adacore.com>
6998 * s-poosiz.ads: Additional overriding indicators.
7000 2011-08-01 Yannick Moy <moy@adacore.com>
7002 * sem_ch5.adb (Analyze_Exit_Statement): add return after error in
7004 (Analyze_Iteration_Scheme): issue error in formal mode when loop
7005 parameter specification does not include a subtype mark.
7006 * sem_ch6.adb (Analyze_Abstract_Subprogram_Declaration): issue error in
7007 formal mode on abstract subprogram.
7008 (Analyze_Subprogram_Specification): issue error in formal mode on
7009 user-defined operator.
7010 (Process_Formals): issue error in formal mode on access parameter and
7012 * sem_ch9.adb (Analyze_Abort_Statement,
7013 Analyze_Accept_Statement, Analyze_Asynchronous_Select,
7014 Analyze_Conditional_Entry_Call, Analyze_Delay_Relative,
7015 Analyze_Delay_Until, Analyze_Entry_Call_Alternative,
7016 Analyze_Requeue, Analyze_Selective_Accept,
7017 Analyze_Timed_Entry_Call): issue error in formal mode on such constructs
7018 * sem_ch11.adb (Analyze_Raise_Statement, Analyze_Raise_xxx_Error):
7019 issue error in formal mode on user-defined raise statement.
7021 2011-08-01 Thomas Quinot <quinot@adacore.com>
7023 * sem_ch6.adb (Enter_Overloaded_Entity): Do not warn about a
7024 declaration being hidden when overriding an implicit inherited
7026 * par-ch10.adb (P_Compilation_Unit): In syntax check only mode
7027 (-gnats), do not complain about a source file that contains only a
7030 2011-08-01 Ed Schonberg <schonberg@adacore.com>
7032 * sem_ch5.adb (Analyze_Iterator_Scheme): Do not overwrite type of loop
7033 variable if already set.
7035 2011-08-01 Arnaud Charlet <charlet@adacore.com>
7037 * g-socket-dummy.adb, s-osinte-linux.ads, g-socket-dummy.ads,
7038 g-debuti.adb, g-tasloc.adb, g-debuti.ads, g-tasloc.ads,
7039 s-osinte-hpux.ads, g-sercom.adb, g-soliop-solaris.ads, g-sercom.ads,
7040 g-sptain.ads, g-curexc.ads, s-tasloc.adb, s-tasloc.ads, s-tataat.adb,
7041 g-ctrl_c.adb, a-reatim.adb, s-tataat.ads, g-dirope.adb, g-ctrl_c.ads,
7042 g-dirope.ads, g-boubuf.adb, g-calend.adb, g-boubuf.ads, g-souinf.ads,
7043 g-table.adb, g-bytswa-x86.adb, g-wispch.adb, g-io.adb, g-table.ads,
7044 g-wispch.ads, g-io.ads, g-memdum.adb, g-memdum.ads, g-busorg.adb,
7045 g-busorg.ads, g-regpat.adb, g-sothco-dummy.adb, g-encstr.adb,
7046 g-regpat.ads, g-sothco-dummy.ads, s-osinte-aix.ads, g-encstr.ads,
7047 g-sercom-mingw.adb, s-mastop-vms.adb, g-diopit.adb, g-diopit.ads,
7048 s-vxwext.adb, g-dyntab.adb, g-dyntab.ads, g-crc32.adb,
7049 g-sercom-linux.adb, g-crc32.ads, s-regpat.adb, g-flocon.ads,
7050 s-regpat.ads, g-stheme.adb, g-sestin.ads, s-taspri-posix-noaltstack.ads,
7051 g-soliop.ads, s-inmaop-posix.adb, g-locfil.ads, g-enblsp-vms-alpha.adb,
7052 g-socthi-dummy.adb, g-socthi-dummy.ads, gnat.ads, g-moreex.adb,
7053 g-moreex.ads, g-dynhta.adb, g-dynhta.ads, g-deutst.ads, g-htable.adb,
7054 g-cgicoo.adb, g-htable.ads, g-cgicoo.ads, a-interr.adb,
7055 g-socthi-vms.adb, g-socthi-vms.ads, g-hesora.adb, g-bubsor.adb,
7056 g-hesora.ads, g-bubsor.ads, g-md5.adb, g-md5.ads, s-intman-irix.adb,
7057 s-htable.adb, s-osinte-vms.adb, s-htable.ads, s-osinte-vms.ads,
7058 s-taprob.adb, g-bytswa.adb, g-bytswa.ads, s-osinte-solaris-posix.ads,
7059 a-suenco.adb, g-comver.adb, g-comver.ads, g-exctra.adb,
7060 s-osinte-solaris.adb, g-exctra.ads, s-osinte-irix.ads,
7061 s-osinte-solaris.ads, a-caldel-vms.adb, g-socthi-vxworks.adb,
7062 g-expect.adb, g-socthi-vxworks.ads, g-expect.ads, g-comlin.ads,
7063 g-heasor.adb, g-heasor.ads, g-traceb.adb, g-traceb.ads, g-decstr.adb,
7064 g-spipat.adb, g-decstr.ads, g-spipat.ads, s-mastop-tru64.adb,
7065 g-except.ads, g-thread.adb, g-hesorg.adb, g-thread.ads, g-hesorg.ads,
7066 g-expect-vms.adb, a-stuten.ads, g-spchge.adb, g-spchge.ads,
7067 g-u3spch.adb, g-u3spch.ads, g-spitbo.adb, g-spitbo.ads,
7068 s-osinte-dummy.ads, s-osinte-posix.adb, g-pehage.adb, g-pehage.ads,
7069 s-gloloc-mingw.adb, g-sha1.ads, s-traceb-hpux.adb,
7070 g-trasym-unimplemented.adb, g-trasym-unimplemented.ads, g-io_aux.adb,
7071 g-regexp.adb, g-io_aux.ads, g-socthi-mingw.adb, g-regexp.ads,
7072 s-osinte-hpux-dce.adb, g-socthi-mingw.ads, g-cgi.adb,
7073 s-osinte-hpux-dce.ads, g-cgi.ads, g-byorma.adb, g-boumai.ads,
7074 g-byorma.ads, a-caldel.adb, s-regexp.adb, s-regexp.ads,
7075 g-soliop-mingw.ads, g-sptavs.ads, s-osinte-tru64.ads, g-speche.adb,
7076 g-speche.ads, g-socthi.adb, g-stsifd-sockets.adb, g-socthi.ads,
7077 s-osinte-darwin.ads, i-vxwork-x86.ads, g-awk.adb, i-vxwork.ads,
7078 g-awk.ads, g-zspche.adb, g-zspche.ads, g-socket.adb, g-sptabo.ads,
7079 g-socket.ads, g-semaph.adb, g-semaph.ads, s-taspri-posix.ads,
7080 g-enblsp-vms-ia64.adb, g-cgideb.adb, g-cgideb.ads, g-sothco.adb,
7081 s-osinte-freebsd.ads, g-sothco.ads, g-catiio.adb, g-casuti.adb,
7082 g-catiio.ads, g-casuti.ads, g-trasym.adb, g-trasym.ads, s-casuti.adb,
7083 g-os_lib.adb, s-traceb-mastop.adb, g-busora.adb, s-interr-dummy.adb,
7084 g-busora.ads, g-enutst.ads, s-os_lib.adb, a-tasatt.adb,
7085 s-osinte-mingw.ads: Update to GPLv3 run-time license.
7086 Use GNAT instead of GNARL.
7088 2011-08-01 Bob Duff <duff@adacore.com>
7090 * a-cdlili.ads, a-cihama.ads, a-coinve.ads, a-ciorse.ads, a-coorma.ads,
7091 a-cidlli.ads, a-ciormu.ads, a-cihase.ads, a-cohama.ads, a-coorse.ads,
7092 a-ciorma.ads, a-coormu.ads, a-convec.ads, a-cohase.ads: Minor
7095 2011-08-01 Yannick Moy <moy@adacore.com>
7097 * debug.adb (d.D) reverve flag for the SPARK mode
7098 (d.E) reverve flag for SPARK generation mode
7099 (d.F) reverve flag for Why generation mode
7100 * opt.ads, opt.adb (ALFA_Mode, ALFA_Through_SPARK_Mode,
7101 ALFA_Through_Why_Mode, Formal_Verification_Mode, SPARK_Mode): New
7102 functions which return True when the corresponding modes are set
7103 (Formal_Language): return "spark" or "alfa" when in formal verification
7105 * sem_util.ads, sem_util.adb (Formal_Error_Msg): new wrapper on
7106 Error_Msg to prefix the error message with a tag giving the formal
7108 (Formal_Error_Msg_N): new wrapper on Error_Msg_N to prefix the error
7109 message with a tag giving the formal language
7110 * sem_ch5.adb (Analyze_Block_Statement): issue error in formal mode on
7112 (Analyze_Case_Statement): issue error in formal mode on case statement
7113 with a single "others" case alternative
7114 (Analyze_Exit_Statement): issue errors in formal mode on exit
7115 statements which do not respect SPARK restrictions
7116 (Analyze_Goto_Statement): issue error in formal mode on goto statement
7117 (Check_Unreachable_Code): always issue an error (not a warning) in
7118 formal mode on unreachable code (concerns both code after an infinite
7119 loop and after an unconditional jump, both not allowed in SPARK)
7120 * sem_ch6.adb (Analyze_Return_Statement): add call to
7121 Set_Return_Present for a procedure containing a return statement
7122 (already done for functions in Analyze_Function_Return)
7123 (Analyze_Function_Return): issue error in formal mode on extended
7124 return or if return is not last statement in function
7125 (Check_Missing_Return): issue error in formal mode if function does
7126 not end with return or if procedure contains a return
7127 * sem_ch8.ads, sem_ch8.adb (Has_Loop_In_Inner_Open_Scopes): new
7128 function to detect if there is an inner scope of its parameter S which
7131 2011-08-01 Thomas Quinot <quinot@adacore.com>
7133 * sem_ch6.ads: Minor reformatting.
7135 2011-08-01 Javier Miranda <miranda@adacore.com>
7137 * sem_util.adb (Abstract_Interface_List): Complete condition when
7138 processing private type declarations to avoid reading unavailable
7140 (Is_Synchronized_Tagged_Type): Complete condition when processing
7141 private extension declaration nodes to avoid reading unavailable
7144 2011-08-01 Thomas Quinot <quinot@adacore.com>
7146 * sem_ch3.adb: Minor reformatting.
7148 2011-08-01 Thomas Quinot <quinot@adacore.com>
7150 * s-parame-ae653.ads, s-parame-vms-alpha.ads, s-parame-hpux.ads,
7151 i-cpoint.adb, i-cstrin.adb, i-cpoint.ads, i-cstrin.ads,
7152 s-parame-vms-ia64.ads, s-parame.ads, i-c.ads, s-parame-vxworks.ads,
7153 s-parame-vms-restrict.ads: Remove duplicated Interfaces.C.* packages
7154 for VMS, instead parametrize the common implementation with
7155 System.Parameters declarations.
7157 2011-08-01 Eric Botcazou <ebotcazou@adacore.com>
7159 * gnat_rm.texi: Document limitation of Pragma No_Strict_Aliasing.
7161 2011-08-01 Tristan Gingold <gingold@adacore.com>
7163 * seh_init.c: Fix SEH handler installation on win64.
7165 2011-08-01 Ed Schonberg <schonberg@adacore.com>
7167 * sem_ch3.adb (Access_Subprogram_Declaration): in Asis mode, prevent
7168 double analysis of an anonymous access to subprogram, because it can
7169 lead to improper sharing of profiles and a back-end crash.
7171 2011-08-01 Robert Dewar <dewar@adacore.com>
7173 * make.adb, sem_ch4.adb: Minor reformatting.
7174 * gcc-interface/Make-lang.in: Update dependencies.
7175 * sem_util.adb, exp_ch5.adb: Minor reformatting.
7177 2011-08-01 Arnaud Charlet <charlet@adacore.com>
7179 * gnat_rm.texi: Fix definition of Long_Integer.
7181 2011-08-01 Ed Schonberg <schonberg@adacore.com>
7183 * exp_aggr.adb: check limit size of static aggregate unconditionally,
7184 to prevent storage exhaustion.
7185 * exp_ch7.adb (Clean_Simple_Protected_Objects): if the scope being
7186 finalized is a function body, insert the cleanup code before the final
7187 return statement, to prevent spurious warnings.
7188 * s-pooglo.ads: add overriding indicator.
7190 2011-08-01 Ed Schonberg <schonberg@adacore.com>
7192 * sem_ch4.adb (Operator_Check): improve error message when both a
7193 with_clause and a use_clause are needed to make operator usage legal.
7194 * sem_util.ads, sem_util.adb (Unit_Is_Visible): new predicate to
7195 determine whether a compilation unit is visible within an other,
7196 either through a with_clause in the current unit, or a with_clause in
7197 its library unit or one one of its parents.
7199 2011-08-01 Ed Schonberg <schonberg@adacore.com>
7201 * exp_ch5.adb (Expand_N_Iterator_Loop): handle properly an iterator
7202 over an arbitrary expression of an array or container type.
7203 * lib-xref.adb: clarify comment.
7205 2011-08-01 Bob Duff <duff@adacore.com>
7207 * einfo.ads: Minor reformatting.
7208 * debug.adb: Minor comment improvement.
7210 2011-08-01 Javier Miranda <miranda@adacore.com>
7212 * sem_ch4.adb (Try_Object_Operation): For class-wide subprograms do not
7213 consider hidden subprograms as valid candidates.
7215 2011-08-01 Arnaud Charlet <charlet@adacore.com>
7217 * make.adb (Compile): Strip -mxxx switches in CodePeer mode.
7219 2011-08-01 Vasiliy Fofanov <fofanov@adacore.com>
7221 * gnat_ugn.texi: Fix typo.
7223 2011-08-01 Robert Dewar <dewar@adacore.com>
7225 * i-cstrin.adb, sem_util.adb, exp_ch11.adb, sem_ch8.adb,
7226 lib-xref.adb: Minor reformatting
7228 2011-08-01 Gary Dismukes <dismukes@adacore.com>
7230 * exp_ch6.adb (Expand_N_Extended_Return_Statement): Replace test of
7231 when to generate a call to Move_Final_List.
7232 (Has_Controlled_Parts): Remove this function.
7234 2011-08-01 Geert Bosch <bosch@adacore.com>
7236 * par-ch3.adb (P_Discrete_Choice_List): Improve error message for extra
7239 2011-08-01 Thomas Quinot <quinot@adacore.com>
7241 * exp_ch11.adb (Expand_N_Raise_Statement): Mark N_Raise_xxx_Error for
7242 explicit raise of a predefined exception as Comes_From_Source if the
7243 original N_Raise_Statement comes from source.
7245 2011-08-01 Robert Dewar <dewar@adacore.com>
7247 * sinfo.ads: Add comment.
7248 * sem_ch6.adb: Minor reformatting.
7250 2011-08-01 Robert Dewar <dewar@adacore.com>
7252 * freeze.adb (Freeze_Entity): Refine check for bad component size
7253 clause to avoid rejecting confirming clause when atomic/aliased present.
7255 2011-08-01 Ed Schonberg <schonberg@adacore.com>
7257 * sem_ch8.adb (Find_Direct_Name, Analyze_Expanded_Name): use Is_LHS to
7258 better determine whether an entity reference is a write.
7259 * sem_util.adb (Is_LHS): refine predicate to handle assignment to a
7261 * lib-xref.adb (Output_References): Do no suppress a read reference at
7262 the same location as an immediately preceeding modify-reference, to
7263 handle properly in-out actuals.
7265 2011-08-01 Tristan Gingold <gingold@adacore.com>
7267 * env.c (__gnat_setenv) [VMS]: Refine previous change.
7269 2011-08-01 Quentin Ochem <ochem@adacore.com>
7271 * i-cstrin.adb (New_String): Changed implementation, now uses only the
7272 heap to compute the result.
7274 2011-08-01 Robert Dewar <dewar@adacore.com>
7276 * atree.ads: Minor reformatting.
7278 2011-08-01 Emmanuel Briot <briot@adacore.com>
7280 * g-expect.adb (Get_Command_Output): Fix memory leak.
7282 2011-08-01 Geert Bosch <bosch@adacore.com>
7284 * cstand.adb (P_Float_Type): New procedure to print the definition of
7285 predefined fpt types.
7286 (P_Mixed_Name): New procedure to print a name using mixed case
7287 (Print_Standard): Use P_Float_Type for printing floating point types
7288 * einfo.adb (Machine_Emax_Value): Add preliminary support for quad
7289 precision IEEE float.
7291 2011-08-01 Thomas Quinot <quinot@adacore.com>
7293 * sem_ch3.adb: Minor reformatting.
7295 2011-08-01 Ed Schonberg <schonberg@adacore.com>
7297 * sem_ch6.adb (Analyze_Parameterized_Expression): If the expression is
7298 the completion of a generic function, insert the new body rather than
7299 rewriting the original.
7301 2011-08-01 Yannick Moy <moy@adacore.com>
7303 * sinfo.ads, errout.ads: Typos in comments.
7305 2011-08-01 Robert Dewar <dewar@adacore.com>
7307 * par-endh.adb: Minor reformatting.
7309 2011-08-01 Robert Dewar <dewar@adacore.com>
7311 * aspects.ads, aspects.adb: Add aspects for library unit pragmas
7312 (Pre_Post_Aspects): New subtype.
7313 * par-ch12.adb (P_Generic): New syntax for aspects in packages
7314 * par-ch13.adb (P_Aspect_Specifications): Add Semicolon parameter
7315 * par-ch7.adb (P_Package): Remove Decl parameter
7316 (P_Package): Handle new syntax for aspects (before IS)
7317 * par-ch9.adb (P_Protected_Definition): Remove Decl parameter, handle
7319 (P_Task_Definition): Remove Decl parameter, handle new aspect syntax
7320 * par.adb (P_Aspect_Specifications): Add Semicolon parameter
7321 (P_Package): Remove Decl parameter
7322 * sem_ch13.adb (Analyze_Aspect_Specifications): Handle library unit
7324 * sem_ch7.adb (Analyze_Package_Declaration): Analyze new format aspect
7326 * sem_util.ads, sem_util.adb (Static_Boolean): New function
7327 * sinfo.ads: Document new syntax for aspects in packages etc.
7328 * sprint.adb: Handle new syntax of aspects before IS in package
7330 2011-08-01 Thomas Quinot <quinot@adacore.com>
7332 * atree.ads: Minor reformatting.
7333 * sem_prag.adb: Minor reformatting.
7335 2011-08-01 Robert Dewar <dewar@adacore.com>
7337 * exp_util.adb (Insert_Actions): Fix error in handling Actions for
7338 case expr alternative.
7340 2011-08-01 Ed Schonberg <schonberg@adacore.com>
7342 * sem_ch12.adb: Fix typo.
7344 2011-08-01 Geert Bosch <bosch@adacore.com>
7346 * sem_prag.adb (Check_No_Link_Name): New procedure.
7347 (Process_Import_Or_Interface): Use Check_No_Link_Name.
7348 * cstand.adb (Create_Standard): Use Esize (Standard_Long_Long_Float)
7349 instead of Standard_Long_Long_Float_Size global. Preparation for
7350 eventual removal of per type constants.
7351 * exp_util.ads (Get_Stream_Size): New function returning the stream
7352 size value of subtype E.
7353 * exp_util.adb (Get_Stream_Size): Implement new function.
7354 * exp_strm.adb (Build_Elementary_Input_Call): Use Get_Stream_Size
7356 * exp_attr.adb (Attribute_Stream_Size): Use Get_Stream_Size
7358 (Machine_Mantissa_Value): Handle 128-bit quad precision IEEE floats
7360 2011-08-01 Geert Bosch <bosch@adacore.com>
7362 * cstand.adb: Fix comments.
7363 * sem_prag.adb (Analyze_Pragma): Use List_Length instead of explicit
7366 2011-08-01 Robert Dewar <dewar@adacore.com>
7368 * exp_ch4.adb, sem_cat.adb: Minor reformatting.
7370 2011-08-01 Geert Bosch <bosch@adacore.com>
7372 * atree.ads: Fix comment.
7374 2011-08-01 Robert Dewar <dewar@adacore.com>
7376 * aspects.ads, aspects.adb (Aspect_Names): Moved from body to spec.
7377 * par-ch13.adb (P_Aspect_Specifications): Check misspelled aspect name.
7378 * par.adb: Add with for Namet.Sp.
7379 * par-tchk.adb: Minor reformatting.
7381 2011-08-01 Vincent Celier <celier@adacore.com>
7383 * mlib-tgt-specific-vms-alpha.adb, mlib-tgt-specific-vms-ia64.adb
7384 (Build_Dynamic_Library): Use new function Init_Proc_Name to get the name
7385 of the init procedure of a SAL.
7386 * mlib-tgt-vms_common.ads, mlib-tgt-vms_common.adb (Init_Proc_Name):
7389 2011-08-01 Thomas Quinot <quinot@adacore.com>
7391 * exp_ch4.adb, s-tasini.ads, sem_attr.adb, s-soflin.ads: Minor
7394 2011-08-01 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
7396 * adaint.c (__gnat_file_time_name_attr): Get rid of warning.
7398 2011-08-01 Thomas Quinot <quinot@adacore.com>
7400 * sem_util.adb, sem_util.ads (Has_Overriding_Initialize): Make function
7401 conformant with its spec (return True only for types that have
7402 an overriding Initialize primitive operation that prevents them from
7403 having preelaborable initialization).
7404 * sem_cat.adb (Validate_Object_Declaration): Fix test for preelaborable
7405 initialization for controlled types in Ada 2005 or later mode.
7407 2011-08-01 Robert Dewar <dewar@adacore.com>
7409 * aspects.ads, aspects.adb: Add aspect Type_Invariant, Precondition,
7411 (Same_Aspect): New function.
7412 * sem_ch13.adb (Analyze_Aspect_Specifications): Add aspect
7413 Type_Invariant, Precondition, Postcondition.
7414 * snames.ads-tmpl: Add Name_Type_Invariant.
7416 2011-08-01 Robert Dewar <dewar@adacore.com>
7418 * freeze.adb (Freeze_Entity): Don't call Check_Aspect_At_Freeze_Point
7420 (Freeze_All_Ent): Fix error in handling inherited aspects.
7421 * sem_ch13.adb (Analyze_Aspect_Specifications): Skip aspect that is
7422 already analyzed, but don't skip entire processing of a declaration,
7423 that's wrong in some cases of declarations being rewritten.
7424 (Analyze_Aspect_Specification): Set Is_Delayed_Aspect in aspects.
7425 Don't delay for integer, string literals
7426 Treat predicates in usual manner for delay, remove special case code,
7428 (Analyze_Freeze_Entity): Make call to Check_Aspect_At_Freeze_Point
7429 (Build_Predicate_Function): Update saved expression in aspect
7430 (Build_Invariant_Procedure): Update saved expression in aspect
7431 * exp_ch4.adb (Expand_N_Selected_Component): Only do the optimization
7432 of replacement of discriminant references if the reference is simple.
7434 2011-08-01 Robert Dewar <dewar@adacore.com>
7436 * aspects.ads, aspects.adb: Add Static_Predicate and Dynamic_Predicate.
7437 * sem_ch13.adb (Analyze_Aspect_Specification): Add processing for
7438 Static_Predicate and Dynamic_Predicate.
7439 (Build_Predicate_Function): Add processing for Static_Predicate
7440 and Dynamic_Predicate.
7441 * sinfo.ads, sinfo.adb (From_Dynamic_Predicate): New flag
7442 (From_Static_Predicate): New flag
7443 * snames.ads-tmpl: Add Name_Static_Predicate and Name_Dynamic_Predicate
7445 2011-08-01 Robert Dewar <dewar@adacore.com>
7447 * usage.adb: Documentation cleanup for Ada version modes in usage.
7448 * expander.adb: Minor reformatting.
7450 2011-08-01 Robert Dewar <dewar@adacore.com>
7452 * atree.ads: Minor comment fix.
7453 * a-stwifi.adb, a-stzfix.adb, a-strfix.adb, a-ztexio.ads, a-textio.ads,
7454 a-witeio.ads, sem_prag.adb: Minor reformatting.
7456 2011-08-01 Doug Rupp <rupp@adacore.com>
7458 * env.c (__gnat_setenv) [VMS]: Force 32bit on item list structure
7459 pointers. Use descrip.h header file for convenience. Add some
7462 2011-08-01 Robert Dewar <dewar@adacore.com>
7464 * freeze.adb (Freeze_Entity): Call Check_Aspect_At_Freeze_Point
7465 (Freeze_All): Call Check_Aspect_At_End_Of_Declarations
7466 * sem_ch13.ads, sem_ch13.adb (Check_Aspect_At_Freeze_Point):
7468 (Check_Aspect_At_End_Of_Declarations): New procedure
7469 (Analye_Aspect_Specification): Minor changes for above procedures
7470 * sinfo.ads, sinfo.adb (Is_Delayed_Aspect): Now set in aspect
7471 specification node as well.
7473 2011-08-01 Pascal Obry <obry@adacore.com>
7475 * adaint.c (_gnat_stat): GetFilesAttributesEx() would fail on special
7476 Windows files. Use GetFilesAttributes() in this case to check for file
7477 existence instead of returning with an error code.
7479 2011-08-01 Vincent Celier <celier@adacore.com>
7481 * a-stzfix.adb, a-stwifi.adb (Replace_Slice): Fixed computation when
7482 High is above Source length.
7484 2011-08-01 Robert Dewar <dewar@adacore.com>
7486 * a-ztexio.ads, a-textio.ads, a-witeio.ads: Fix comment.
7488 2011-08-01 Robert Dewar <dewar@adacore.com>
7490 * aspects.ads (Boolean_Aspects): New subtype.
7491 * exp_ch13.adb (Expand_Freeze_Entity): Fix errors in handling aspects
7492 for derived types in cases where the parent type and derived type have
7494 * freeze.adb (Freeze_Entity): Fix problems in handling derived type
7495 with aspects when parent type also has aspects.
7496 (Freeze_Entity): Deal with delay of boolean aspects (must evaluate
7497 boolean expression at this point).
7498 * sem_ch13.adb (Analyze_Aspect_Specifications): Delay all aspects in
7499 accordance with final decision on the Ada 2012 feature.
7500 * sinfo.ads, sinfo.adb (Is_Boolean_Aspect): New flag.
7502 2011-08-01 Matthew Heaney <heaney@adacore.com>
7504 * a-chtgbo.adb (Delete_Node_Sans_Free): Replace iterator with selector.
7506 2011-08-01 Pascal Obry <obry@adacore.com>
7508 * a-stzunb-shared.adb, a-strunb-shared.adb, a-stwiun-shared.adb:
7509 Fix Replace_Slice when High is above current string size.
7510 (Replace_Slice): Fix DL computation when High is above current
7513 2011-08-01 Gary Dismukes <dismukes@adacore.com>
7515 * gnat_rm.texi: Add documentation for pragma Static_Elaboration_Desired.
7517 2011-08-01 Matthew Heaney <heaney@adacore.com>
7519 * a-rbtgbo.adb (Delete_Node_Sans_Free): Fixed assignment to left child
7522 2011-08-01 Pascal Obry <obry@adacore.com>
7524 * a-stzunb-shared.adb, a-strunb-shared.adb, a-stwiun-shared.adb: Minor
7527 2011-08-01 Ed Schonberg <schonberg@adacore.com>
7529 * sem_attr.adb (Analyze_Attribute, case 'Access): Handle properly named
7530 access to protected subprograms in generic bodies.
7531 * sem_ch6.adb (Analyze_Subprogram_Declaration): If the context is a
7532 protected type, indicate that the convention of the subprogram is
7533 Convention_Protected, because it may be used in subsequent declarations
7534 within the protected declaration.
7536 2011-08-01 Vincent Celier <celier@adacore.com>
7538 * mlib-prj.adb (Build_Library): Use "ada_" as the prefix for the "init"
7539 and "final" procedures when the name of the library is "ada", to avoid
7540 duplicate symbols "adainit" and "adafinal" in executables.
7542 2011-08-01 Ed Schonberg <schonberg@adacore.com>
7544 * sem_attr.adb (Analyze_Attribute, case 'Result): Handle properly a
7545 quantified expression that appears within a postcondition and uses the
7546 Ada2012 'Result attribute.
7548 2011-07-28 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
7550 * init.c (__gnat_error_handler): Cast reason to int.
7551 (__gnat_install_handler): Explain sa_sigaction use.
7553 2011-07-24 Eric Botcazou <ebotcazou@adacore.com>
7555 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Subprogram_Type>: If the
7556 subprogram has copy-in copy-out parameters, try to promote the mode of
7557 the return type if it is passed in registers.
7559 2011-07-24 Eric Botcazou <ebotcazou@adacore.com>
7561 * gcc-interface/utils2.c (build_binary_op) <ARRAY_REF>: Do not mark the
7562 left operand as addressable.
7564 2011-07-24 Eric Botcazou <ebotcazou@adacore.com>
7566 * gcc-interface/gigi.h (build_function_stub): Remove.
7567 (build_return_expr): Likewise.
7568 (convert_vms_descriptor): Declare.
7569 * gcc-interface/utils.c (convert_vms_descriptor): Make global.
7570 (build_function_stub): Move to...
7571 * gcc-interface/utils2.c (build_return_expr): Move to...
7572 * gcc-interface/trans.c (build_function_stub): ...here.
7573 (build_return_expr): ...here.
7574 (Subprogram_Body_to_gnu): Add local variable for language_function.
7575 Disconnect the parameter attributes cache, if any, once done with it.
7576 Call end_subprog_body only after setting the end_locus.
7577 Build the stub associated with the function, if any, at the very end.
7578 (gnat_to_gnu) <N_Return_Statement>: Remove couple of useless local
7579 variables and streamline control flow.
7581 2011-07-23 Arnaud Charlet <charlet@adacore.com>
7584 * gcc-interface/Makefile.in (powerpc-linux): Remove reference to
7587 2011-07-22 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
7590 * init.c [sun && __SVR4 && !__vxworks] (__gnat_install_handler):
7591 Assign to act.sa_sigaction.
7592 * tracebak.c [USE_GENERIC_UNWINDER] (__gnat_backtrace): Cast
7593 current->return_address to char * before arithmetic.
7595 2011-07-22 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
7597 * init.c [sgi] (__gnat_error_handler): Update sigaction(2) citation.
7598 Correct argument types.
7599 Extract code from reason.
7600 (__gnat_install_handler): Assign to act.sa_sigaction.
7602 2011-07-21 Eric Botcazou <ebotcazou@adacore.com>
7604 * gcc-interface/Make-lang.in (GNAT1_ADA_OBJS): Move ada/b_gnat1.o to...
7605 (GNAT1_OBJS): ...here.
7607 2011-07-15 Eric Botcazou <ebotcazou@adacore.com>
7610 * g-socthi-mingw.adb (Fill): Fix formatting.
7612 * gcc-interface/gigi.h: Move around comment.
7614 2011-07-14 John David Anglin <dave.anglin@nrc-cnrc.gc.ca>
7617 * s-taprop-hpux-dce.adb (Abort_Task): Remove unnecessary cast.
7619 2011-07-14 Florian Weimer <fw@deneb.enyo.de>
7622 * g-socthi-mingw.adb (Fill): Guard against invalid MSG_WAITALL.
7624 2011-07-13 Eric Botcazou <ebotcazou@adacore.com>
7626 * gcc-interface/utils.c (build_vms_descriptor32): Skip the 32-bit
7627 range comparison if Pmode is SImode.
7629 2011-07-12 Laurent GUERBY <laurent@guerby.net>
7630 Eric Botcazou <ebotcazou@adacore.com>
7632 * adadecode.c: Wrap up in extern "C" block.
7633 * adadecode.h: Likewise.
7634 * adaint.c: Likewise. Remove 'const' keyword.
7635 * adaint.h: Likewise.
7637 * atree.h: Likewise.
7639 * cstreams.c: Likewise.
7643 * final.c: Likewise.
7645 * initialize.c: Likewise.
7647 * namet.h: Likewise.
7648 * nlists.h: Likewise.
7649 * raise.c: Likewise.
7650 * raise.h: Likewise.
7651 * repinfo.h: Likewise.
7652 * seh_init.c: Likewise.
7653 * targext.c: Likewise.
7654 * tracebak.c: Likewise.
7655 * uintp.h: Likewise.
7656 * urealp.h: Likewise.
7657 * xeinfo.adb: Wrap up generated C code in extern "C" block.
7658 * xsinfo.adb: Likewise.
7659 * xsnamest.adb: Likewise.
7660 * gcc-interface/gadaint.h: Wrap up in extern "C" block.
7661 * gcc-interface/gigi.h: Wrap up some prototypes in extern "C" block.
7662 * gcc-interface/misc.c: Likewise.
7663 * gcc-interface/Make-lang.in (GCC_LINK): Use LINKER.
7664 (GNAT1_C_OBJS): Remove ada/b_gnat1.o. List ada/seh_init.o and
7665 ada/targext.o here...
7666 (GNAT_ADA_OBJS): ...and not here.
7667 (GNAT1_ADA_OBJS): Add ada/b_gnat1.o.
7668 (GNATBIND_OBJS): Reorder.
7670 2011-07-07 Richard Henderson <rth@redhat.com>
7672 * gcc-interface/misc.c (gnat_init_gcc_eh): Don't call
7673 dwarf2out_frame_init.
7675 2011-07-07 Eric Botcazou <ebotcazou@adacore.com>
7677 * gcc-interface/misc.c (gnat_init): Tweak previous change.
7679 2011-07-07 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
7682 * gcc-interface/Makefile.in: Handle x86_64-solaris2.
7684 2011-07-06 Richard Guenther <rguenther@suse.de>
7686 * gcc-interface/misc.c (gnat_init): Merge calls to
7687 build_common_tree_nodes and build_common_tree_nodes_2.
7688 Re-initialize boolean_false_node.
7690 2011-07-02 Eric Botcazou <ebotcazou@adacore.com>
7691 Olivier Hainque <hainque@adacore.com>
7692 Nicolas Setton <setton@adacore.com>
7694 * gcc-interface/utils.c (record_builtin_type): Set TYPE_ARTIFICIAL on
7695 the type according to the ARTIFICIAL_P parameter.
7696 (create_type_decl): Likewise.
7697 (create_type_stub_decl): Set TYPE_ARTIFICIAL on the type to 1.
7699 2011-07-01 Eric Botcazou <ebotcazou@adacore.com>
7701 * gcc-interface/Make-lang.in (gnat1): Prepend '+' to the command.
7702 (gnatbind): Likewise.
7704 2011-06-29 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
7706 * gcc-interface/Makefile.in (TOOLS_LIBS): Add $(LIBINTL).
7708 2011-06-18 Eric Botcazou <ebotcazou@adacore.com>
7710 * gcc-interface/decl.c (gnat_to_gnu_component_type): Use GNAT_TYPE
7711 local variable throughout. Remove useless call to Base_Type.
7712 (gnat_to_gnu_field): Use GNAT_FIELD_TYPE local variable throughout.
7713 Take it also into account for the volatileness of the field. Set the
7714 TREE_SIDE_EFFECTS flag as well in this case. Reorder some warnings.
7716 2011-06-18 Eric Botcazou <ebotcazou@adacore.com>
7718 * gcc-interface/trans.c (Identifier_to_gnu): Don't set TREE_THIS_NOTRAP
7719 on a dereference built for a by-ref object if it has an address clause.
7721 2011-06-18 Eric Botcazou <ebotcazou@adacore.com>
7723 * einfo.ads (Address_Taken): Document use for the second argument of
7724 Asm_Input and Asm_Output attributes.
7725 * sem_attr.adb (Analyze_Attribute) <Attribute_Asm_Input>: If the second
7726 argument is an entity name, then set Address_Taken on it.
7727 <Attribute_Asm_Output>: Likewise.
7728 * gcc-interface/trans.c (lvalue_required_for_attribute_p): Handle the
7729 Attr_Asm_Input and Attr_Asm_Output attributes explicitly.
7730 (gnat_to_gnu) <N_Code_Statement>: If an operand is going to end up in
7731 memory and is a CONST_DECL, retrieve its corresponding VAR_DECL.
7733 2011-06-16 Joern Rennecke <joern.rennecke@embecosm.com>
7736 * gcc-interface/decl.c (gnat_to_gnu_param): Use pack_cumulative_args.
7738 2011-06-14 Joseph Myers <joseph@codesourcery.com>
7740 * gcc-interface/Make-lang.in (gnatbind$(exeext)): Use ggc-none.o.
7741 (ada/utils.o): Update dependencies.
7742 * gcc-interface/Makefile.in (EXTRA_GNATTOOLS_OBJS): Add
7743 ../../../libcpp/libcpp.a.
7744 * gcc-interface/utils.c: Include common/common-target.h.
7745 (process_attributes): Use targetm_common.have_named_sections.
7747 2011-06-07 Richard Guenther <rguenther@suse.de>
7749 * gcc-interface/misc.c (gnat_init): Do not set size_type_node or call
7752 2011-06-06 Eric Botcazou <ebotcazou@adacore.com>
7754 * gcc-interface/utils2.c (gnat_stabilize_reference): Propagate the
7755 TREE_THIS_NOTRAP flag.
7757 2011-06-06 Eric Botcazou <ebotcazou@adacore.com>
7759 * gcc-interface/utils2.c (gnat_stabilize_reference) <COMPOUND_EXPR>:
7762 2011-06-06 Eric Botcazou <ebotcazou@adacore.com>
7764 * gcc-interface/trans.c (Identifier_to_gnu): Also handle deferred
7765 constants whose full view has discriminants specially.
7767 2011-06-06 Eric Botcazou <ebotcazou@adacore.com>
7769 * gcc-interface/utils.c: Include diagnostic.h.
7770 (gnat_write_global_declarations): Output debug information for all
7771 global type declarations before finalizing the compilation unit.
7772 * gcc-interface/Make-lang.in (ada/utils.o): Add dependency.
7774 2011-05-25 Jakub Jelinek <jakub@redhat.com>
7776 * gcc-interface/utils.c (def_fn_type): Remove extra va_end.
7778 2011-05-25 Kai Tietz <ktietz@redhat.com>
7780 * adaint.c (__gnat_to_canonical_file_list_next): Use array
7781 initialization instead of const/none-const pointer assignment.
7783 2011-05-24 Joseph Myers <joseph@codesourcery.com>
7785 * gcc-interface/Make-lang.in (GNAT1_OBJS): Don't include
7786 $(EXTRA_GNAT1_OBJS).
7787 (GNATBIND_OBJS): Don't include $(EXTRA_GNATBIND_OBJS).
7788 (EXTRA_GNAT1_OBJS, EXTRA_GNATBIND_OBJS): Remove.
7789 (gnat1$(exeext), gnatbind$(exeext)): Use libcommon-target.a.
7790 * gcc-interface/Makefile.in (EXTRA_GNATTOOLS_OBJS): Use
7791 libcommon-target.a instead of prefix.o.
7793 2011-05-21 Joseph Myers <joseph@codesourcery.com>
7796 * gcc-interface/Make-lang.in (gnatbind$(exeext)): Depend on $(LIBDEPS).
7798 2011-05-20 Joseph Myers <joseph@codesourcery.com>
7800 * gcc-interface/Make-lang.in (EXTRA_GNATBIND_OBJS): Remove version.o.
7801 * gcc-interface/Makefile.in (EXTRA_GNATTOOLS_OBJS): Use libcommon.a
7802 instead of version.o.
7804 2011-05-18 Kai Tietz <ktietz@redhat.com>
7806 * gcc-interface/trans.c (Exception_Handler_to_gnu_sjlj): Use
7807 boolean_false_node instead of integer_zero_node.
7808 (convert_with_check): Likewise.
7809 * gcc-interface/decl.c (choices_to_gnu): Likewise.
7811 2011-05-12 Eric Botcazou <ebotcazou@adacore.com>
7813 * gcc-interface/trans.c (call_to_gnu): In the by-reference case, if the
7814 type of the parameter is an unconstrained array, convert the actual to
7815 the type of the formal in the In Out and Out cases as well.
7817 2011-05-11 Nathan Froyd <froydnj@codesourcery.com>
7819 * gcc-interface/utils.c (def_fn_type): Don't call build_function_type;
7820 call build_function_type_array or build_varargs_function_type_array
7822 (create_subprog_type): Don't call build_function_type; call
7823 build_function_type_vec instead.
7825 2011-05-11 Nathan Froyd <froydnj@codesourcery.com>
7827 * gcc-interface/ada-tree.h (TYPE_OBJECT_RECORD_TYPE): Use TYPE_MINVAL.
7828 (TYPE_GCC_MIN_VALUE): Use TYPE_MINVAL.
7829 (TYPE_GCC_MAX_VALUE): Use TYPE_MAXVAL.
7831 2011-05-07 Eric Botcazou <ebotcazou@adacore.com>
7833 * gcc-interface/decl.c (intrin_arglists_compatible_p): Remove spaces.
7835 * gcc-interface/gigi.h (global_bindings_p): Adjust prototype.
7836 * gcc-interface/utils.c (global_bindings_p): Return bool and simplify.
7838 2011-05-05 Nathan Froyd <froydnj@codesourcery.com>
7840 * gcc-interface/trans.c (Case_Statement_to_gnu): Call build_case_label.
7842 2011-05-05 Nathan Froyd <froydnj@codesourcery.com>
7844 * gcc-interface/decl.c (intrin_arglists_compatible_p): Use iterators
7845 instead of accessing TYPE_ARG_TYPES directly.
7846 * gcc-interface/utils.c (handle_nonnull_attribute): Likewise.
7848 2011-05-05 Eric Botcazou <ebotcazou@adacore.com>
7851 * gcc-interface/gigi.h (get_variant_part): Declare.
7852 * gcc-interface/decl.c (get_variant_part): Make global.
7853 * gcc-interface/utils2.c (find_common_type): Do not return T1 if the
7854 types have the same constant size, are record types and T1 has a
7855 variant part while T2 doesn't.
7857 2011-05-05 Eric Botcazou <ebotcazou@adacore.com>
7859 * gcc-interface/utils.c (begin_subprog_body): Do not call
7861 (end_subprog_body): Likewise.
7863 2011-05-04 Richard Guenther <rguenther@suse.de>
7865 * gcc-interface/trans.c (gnat_to_gnu): Remove zero notrunc argument to
7867 (pos_to_constructor): Likewise.
7869 2011-05-03 Nathan Froyd <froydnj@codesourcery.com>
7870 Eric Botcazou <ebotcazou@adacore.com>
7872 * gcc-interface/trans.c (gigi): Call build_function_type_list instead
7873 of build_function_type. Adjust calls to...
7874 (build_raise_check): ...this. Do not take a void_tree parameter.
7875 Call build_function_type_list instead of build_function_type.
7876 Fix head comment and swap couple of conditional blocks.
7878 2011-04-30 Eric Botcazou <ebotcazou@adacore.com>
7880 * gnatvsn.ads (Library_Version): Bump to 4.7.
7881 (Current_Year): Bump to 2011.
7883 2011-04-29 Michael Matz <matz@suse.de>
7885 * gcc-interface/misc.c (gnat_handle_option): Set
7886 warn_maybe_uninitialized.
7888 2011-04-23 Gerald Pfeifer <gerald@pfeifer.com>
7890 * gnat_ugn.texi (Complexity Metrics Control): Update link to
7891 the Watson/McCabe paper.
7893 2011-04-23 Jim Meyering <meyering@redhat.com>
7895 * gnat_ugn.texi (Examples of gnatxref Usage): Fix typo: s/it it/it is/
7897 2011-04-22 Eric Botcazou <ebotcazou@adacore.com>
7899 * gcc-interface/decl.c (make_packable_type): Copy DECL_PARALLEL_TYPE
7902 2011-04-22 Eric Botcazou <ebotcazou@adacore.com>
7904 * gcc-interface/gigi.h (create_subprog_decl): Add ARTIFICIAL_FLAG
7906 * gcc-interface/utils.c (create_subprog_decl): Likewise. Set
7907 DECL_ARTIFICIAL and DECL_NO_INLINE_WARNING_P on the DECL accordingly.
7908 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Subprogram_Type>: Add
7909 ARTIFICIAL_FLAG local variable and pass it to create_subprog_decl.
7910 <all>: Do not set flags on the reused DECL node coming from an alias.
7911 Set DECL_IGNORED_P on the DECL node built for subprograms if they
7912 don't need debug info here...
7913 * gcc-interface/trans.c (Subprogram_Body_to_gnu): ...and not here.
7914 (gigi): Adjust calls to create_subprog_decl.
7915 (build_raise_check): Likewise.
7916 (establish_gnat_vms_condition_handler): Likewise.
7917 (Compilation_Unit_to_gnu): Likewise.
7918 (gnat_to_gnu): Likewise.
7920 2011-04-21 Eric Botcazou <ebotcazou@adacore.com>
7922 * gcc-interface/Makefile.in (NO_SIBLING_ADAFLAGS): Always define.
7923 (NO_REORDER_ADAFLAGS): New variable.
7924 (EXTRA_GNATTOOLS): Always define.
7925 (../stamp-gnatlib1-$(RTSDIR): Copy tsystem.h.
7926 Clean up and adjust list of files compiled with special options.
7927 * gcc-interface/Make-lang.in: Likewise.
7928 (ada/decl.o): Cosmetical change.
7929 (ada/misc.o): Remove dependency on $(PLUGIN_H).
7931 2011-04-20 Jim Meyering <meyering@redhat.com>
7933 * initialize.c (__gnat_initialize): Remove useless if-before-free.
7935 2011-04-17 Eric Botcazou <ebotcazou@adacore.com>
7937 * gcc-interface/Make-lang.in (gnatbind): Replace $(ALL_CFLAGS) with
7938 $(CFLAGS) on the link line.
7940 2011-04-17 Eric Botcazou <ebotcazou@adacore.com>
7942 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Function>: Declare the
7943 padded type built for the return type if it is unconstrained.
7945 2011-04-14 Nathan Froyd <froydnj@codesourcery.com>
7947 * gcc-interface/utils.c (gnat_poplevel): Use block_chainon.
7949 2011-04-12 Nathan Froyd <froydnj@codesourcery.com>
7951 * gcc-interface/ada-tree.h (union lang_tree_node): Check for TS_COMMON
7952 before calling TREE_CHAIN.
7953 * gcc-interface/misc.c (gnat_init_ts): New function.
7954 (LANG_HOOKS_INIT_TS): Define.
7956 2011-04-12 Martin Jambor <mjambor@suse.cz>
7958 * gcc-interface/utils.c (end_subprog_body): Call cgraph_get_create_node
7959 instead of cgraph_node.
7961 2011-04-08 Eric Botcazou <ebotcazou@adacore.com>
7963 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Procedure>: Set minimum
7964 alignment on fields of the RETURN type built for the Copy-In Copy-Out
7967 2011-04-08 Eric Botcazou <ebotcazou@adacore.com>
7969 * gcc-interface/trans.c (Identifier_to_gnu): Do not return initializers
7970 of aggregate types that contain a placeholder.
7972 2011-04-08 Nathan Froyd <froydnj@codesourcery.com>
7974 * gcc-interface/utils.c (handle_sentinel_attribute): Don't use
7976 (handle_type_generic_attribute): Likewise.
7978 2011-04-04 Eric Botcazou <ebotcazou@adacore.com>
7981 * s-oscons-tmplt.c (MSG_WAITALL): Fix thinko in previous change.
7983 2011-04-04 Kai Tietz <ktietz@redhat.com>
7986 * s-oscons-tmplt.c (MSG_WAITALL): Define it for native windows targets
7989 2011-04-02 Eric Botcazou <ebotcazou@adacore.com>
7991 * gcc-interface/utils2.c (build_allocator): In the unconstrained array
7992 type case, do not strip a padding type around the array type.
7994 2011-04-02 Eric Botcazou <ebotcazou@adacore.com>
7996 * gcc-interface/utils.c (update_pointer_to): Finalize named pointer
7999 2011-04-02 Eric Botcazou <ebotcazou@adacore.com>
8001 * gcc-interface/lang.opt (feliminate-unused-debug-types): Delete.
8002 * gcc-interface/misc.c (gnat_handle_option): Remove special handling
8003 code for -feliminate-unused-debug-types.
8004 (gnat_post_options): Likewise.
8006 2011-04-02 Eric Botcazou <ebotcazou@adacore.com>
8008 * gcc-interface/utils.c (gnat_pushdecl): If this is a non-artificial
8009 declaration of a pointer type, then set DECL_ORIGINAL_TYPE to a
8012 2011-04-02 Eric Botcazou <ebotcazou@adacore.com>
8014 * gcc-interface/decl.c (gnat_to_gnu_entity): Do not force the
8015 DECL_ARTIFICIAL flag on enumeration types.
8017 2011-04-02 Eric Botcazou <ebotcazou@adacore.com>
8019 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Array_Type>: Do not make
8020 fat pointer types artificial unconditionally.
8021 <E_Array_Subtype>: Attach the base array type as a parallel type if it
8024 2011-04-02 Eric Botcazou <ebotcazou@adacore.com>
8026 * gcc-interface/gigi.h (get_dummy_type): Declare.
8027 (build_dummy_unc_pointer_types): Likewise.
8028 (finish_fat_pointer_type): Likewise.
8029 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Array_Type>: If a dummy
8030 fat pointer type has been built, complete it in place.
8031 <E_Access_Type>: Call build_dummy_unc_pointer_types to build dummy fat
8032 and thin pointers. Remove useless variable.
8033 (finish_fat_pointer_type): Make global and move to...
8034 * gcc-interface/utils.c (finish_fat_pointer_type): ...here.
8035 (get_dummy_type): New function.
8036 (build_dummy_unc_pointer_types): Likewise.
8037 (gnat_pushdecl): Propage the name to the anonymous variants only.
8038 (update_pointer_to): Only adjust the pointer types in the unconstrained
8041 2011-04-02 Eric Botcazou <ebotcazou@adacore.com>
8043 * gcc-interface/ada-tree.h (DECL_TAFT_TYPE_P): New flag.
8044 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Incomplete_Type>: Set it
8045 if this is a Taft amendment type and the full declaration is available.
8046 * gcc-interface/trans.c (process_type): Likewise.
8047 If there is an old type, mark the new one as used if DECL_TAFT_TYPE_P.
8048 (process_freeze_entity): Likewise.
8049 * gcc-interface/utils.c (dummy_global): New static variable.
8050 (gnat_write_global_declarations): If there are types declared as used
8051 at the global level, insert them in the global hash table.
8053 2011-04-02 Eric Botcazou <ebotcazou@adacore.com>
8055 * gcc-interface/gigi.h (record_builtin_type): Add ARTIFICIAL_P param.
8056 * gcc-interface/utils.c (gnat_pushdecl): If this is a non-artificial
8057 declaration of an array type, then set DECL_ORIGINAL_TYPE to a distinct
8059 (record_builtin_type): Add ARTIFICIAL_P parameter. Set DECL_ARTIFICIAL
8060 flag of the type accordingly.
8061 * gcc-interface/trans.c (gigi): Adjust calls to record_builtin_type.
8063 2011-04-02 Eric Botcazou <ebotcazou@adacore.com>
8065 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Access_Type>: Defer
8066 finalizing types when updating the pointers to the designated type.
8067 <all>: Finalize the deferred types even if we didn't defer processing
8068 of incomplete types in this invocation.
8070 2011-04-01 Olivier Hainque <hainque@adacore.com>
8071 Nicolas Setton <setton@adacore.com>
8072 Eric Botcazou <ebotcazou@adacore.com>
8074 * gcc-interface/misc.c (gnat_descriptive_type): New function.
8075 (LANG_HOOKS_DESCRIPTIVE_TYPE): Redefine to gnat_descriptive_type.
8077 2011-03-28 Kai Tietz <ktietz@redhat.com>
8079 * gcc-interface/Makefile.in (SO_LIB): Handle multilib build for native
8081 (EH_MECHANISM): Use GCC exception mechanism for native Windows targets.
8082 * system-mingw.ads (System): Change ZCX_By_Default default to True.
8084 * raise-gcc.c (PERSONALITY_FUNCTION): Add prototype.
8086 2011-03-28 Tristan Gingold <gingold@adacore.com>
8089 * gcc-interface/Make-lang.in (ada/b_gnat1.adb): Replace ada/b_gnat1.c.
8090 Use ada output of gnatbind.
8091 (ada/b_gnatb.adb): Ditto.
8092 (ada/b_gnat1.o, ada/b_gnatb.o): New rules.
8093 (ada.mostlyclean, ada.stage1)
8094 (ada.stage2, ada.stage3, ada.stage4, ada.stageprofile)
8095 (ada.stagefeedback): Adjust.
8096 * gcc-interface/Makefile.in (b_gnatl.adb): Replace b_gnatl.c.
8097 Use ada output of gnatbind.
8098 (b_gnatm.adb): Ditto.
8099 (b_gnatl.o, b_gnatm.o): New rules.
8101 2011-03-26 Eric Botcazou <ebotcazou@adacore.com>
8103 * gcc-interface/decl.c (gnat_to_gnu_entity) <object>: Create TYPE_DECL
8104 for the padded type built to support a specified size or alignment.
8106 2011-03-26 Eric Botcazou <ebotcazou@adacore.com>
8108 * gcc-interface/gigi.h (finalize_from_with_types): Adjust comment.
8109 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Access_Type>: Defer
8110 unconditionally to the end of the unit when the designated type is
8112 <all>: Rename local variable. Attempt to un-defer types only and do it
8113 for limited_with'ed types as well.
8114 (finalize_from_with_types): Adjust comment. Rename variable and tidy.
8115 * gcc-interface/trans.c (Compilation_Unit_to_gnu): Use GNAT_UNIT
8116 consistently and remove redundant call to finalize_from_with_types.
8118 2011-03-26 Eric Botcazou <ebotcazou@adacore.com>
8120 * inline.adb (Back_End_Cannot_Inline): Lift restriction on calls to
8121 subprograms without a previous spec declared in the same unit.
8122 * gcc-interface/trans.c (Compilation_Unit_to_gnu): Process inlined
8123 subprograms at the end of the unit instead of at the beginning.
8124 * gcc-interface/utils.c (create_subprog_decl): Check that the entity
8125 isn't public for the special handling of non-inline functions nested
8126 inside inline external functions.
8128 2011-03-25 Jeff Law <law@redhat.com>
8130 * gcc-interface/utils.c (def_fn_type): Add missing va_end.
8132 2011-03-24 Eric Botcazou <ebotcazou@adacore.com>
8134 * einfo.ads (Size_Depends_On_Discriminant): Adjust description.
8135 * layout.adb (Compute_Size_Depends_On_Discriminant): New procedure
8136 to compute Set_Size_Depends_On_Discriminant.
8137 (Layout_Type): Call it on array types in back-end layout mode.
8138 * sem_util.adb (Requires_Transient_Scope): Return true for array
8139 types only if the size depends on the value of discriminants.
8140 * gcc-interface/utils2.c (build_binary_op) <MODIFY_EXPR>: Use the RHS
8141 type if the RHS is a call to a function that returns an unconstrained
8142 type with default discriminant.
8144 2011-03-24 Eric Botcazou <ebotcazou@adacore.com>
8146 * gcc-interface/trans.c (gnat_to_gnu): Remove obsolete case of
8147 non-conversion to the nominal result type at the end.
8149 2011-03-23 Eric Botcazou <ebotcazou@adacore.com>
8151 * gcc-interface/trans.c (create_temporary): New function taken from...
8152 (create_init_temporary): ...here. Call it.
8153 (call_to_gnu): Create the temporary for the return value early, if any.
8154 Create it for a function with copy-in/copy-out parameters if there is
8155 no target; in other cases of copy-in/copy-out, use another temporary.
8156 Push the new binding level lazily. Add and rename local variables.
8158 2011-03-23 Eric Botcazou <ebotcazou@adacore.com>
8160 * gcc-interface/decl.c (validate_size): Improve comments and tweak
8162 (set_rm_size): Likewise.
8164 2011-03-23 Eric Botcazou <ebotcazou@adacore.com>
8166 * gcc-interface/decl.c (gnat_to_gnu_entity) <object>: Create TYPE_DECL
8167 for the padded type built in order to support a specified alignment.
8168 Fix incorrect formatting.
8170 2011-03-21 Eric Botcazou <ebotcazou@adacore.com>
8173 * gcc-interface/decl.c (elaborate_expression_1): Localize GNU_DECL.
8175 2011-03-21 Eric Botcazou <ebotcazou@adacore.com>
8177 * gcc-interface/decl.c (components_to_record): Add REORDER parameter,
8178 rename DEBUG_INFO_P into DEBUG_INFO and move P_GNU_REP_LIST parameter
8179 to the end of the list. Adjust recursive call. Rename local variable.
8180 If REORDER is true, reorder components of the record type.
8181 (gnat_to_gnu_entity): Pass OK_To_Reorder_Components flag as argument to
8182 components_to_record and adjust the parameter list.
8184 2011-03-21 Eric Botcazou <ebotcazou@adacore.com>
8186 * gcc-interface/decl.c (elaborate_expression_1): When optimization is
8187 disabled, use the variable for bounds of loop iteration scheme.
8189 2011-03-21 Kai Tietz <ktietz@redhat.com>
8192 * gcc-interface/utils.c (gnat_internal_attribute_table): Add column.
8194 2011-03-17 Eric Botcazou <ebotcazou@adacore.com>
8196 * gcc-interface/decl.c (elaborate_expression_1): Try harder to find
8197 out whether the expression is read-only. Short-circuit placeholder
8198 case and rename a couple of local variables.
8200 2011-03-17 Eric Botcazou <ebotcazou@adacore.com>
8202 * gcc-interface/gigi.h (smaller_form_type_p): Declare.
8203 * gcc-interface/trans.c (smaller_form_type_p): Make global and move...
8204 * gcc-interface/utils.c (smaller_form_type_p): ...to here.
8205 (convert): Deal with conversions from a smaller form type specially.
8207 2011-02-14 Eric Botcazou <ebotcazou@adacore.com>
8209 * gcc-interface/misc.c (gnat_init_options): Do not concatenate -I and
8210 its argument, except for the special -I- switch.
8212 2011-02-12 Gerald Pfeifer <gerald@pfeifer.com>
8214 * gnat_ugn.texi (Compiling Different Versions of Ada): Update link to
8217 2011-02-08 Eric Botcazou <ebotcazou@adacore.com>
8219 * gcc-interface/Makefile.in (x86-64 darwin): Handle multilibs.
8221 2011-02-03 Eric Botcazou <ebotcazou@adacore.com>
8223 * gcc-interface/gigi.h (fill_vms_descriptor): Take GNU_TYPE instead of
8225 * gcc-interface/utils2.c (fill_vms_descriptor): Move from here to...
8226 * gcc-interface/utils.c (fill_vms_descriptor): ...here. Take GNU_TYPE
8227 instead of GNAT_FORMAL. Protect the expression against multiple uses.
8228 Do not generate the check directly, instead instantiate the template
8229 check present in the descriptor.
8230 (make_descriptor_field): Move around.
8231 (build_vms_descriptor32): Build a template check in the POINTER field.
8232 (build_vms_descriptor): Remove useless suffixes.
8233 * gcc-interface/trans.c (call_to_gnu): Adjust fill_vms_descriptor call.
8235 2011-01-26 Eric Botcazou <ebotcazou@adacore.com>
8238 * targext.c: Include target files if IN_RTS is defined.
8240 2011-01-26 Richard Guenther <rguenther@suse.de>
8243 * targext.c: Include config.h.
8244 * gcc-interface/Make-lang.in (ada/targext.o): Add $(CONFIG_H)
8247 2011-01-04 Pascal Obry <obry@adacore.com>
8248 Eric Botcazou <ebotcazou@adacore.com>
8250 * gcc-interface/decl.c: Disable Stdcall convention handling for 64-bit.
8252 2011-01-04 Eric Botcazou <ebotcazou@adacore.com>
8254 * gcc-interface/trans.c (Case_Statement_to_gnu): Put the SLOC of the
8255 end-of-case on the end label and its associated gotos, if any.
8257 2011-01-04 Eric Botcazou <ebotcazou@adacore.com>
8259 * gcc-interface/trans.c (Subprogram_Body_to_gnu): Evaluate the
8260 expressions of the parameter cache within the statement group of
8263 2011-01-04 Olivier Hainque <hainque@adacore.com>
8264 Eric Botcazou <ebotcazou@adacore.com>
8266 * gcc-interface/trans.c (BLOCK_SOURCE_END_LOCATION): Provide default.
8267 (set_end_locus_from_node): New function.
8268 (Subprogram_Body_to_gnu): Use it to mark both the inner BIND_EXPR we
8269 make and the function end_locus.
8270 (Compilation_Unit_to_gnu): Call it instead of a straight Sloc_to_locus
8271 for the elaboration subprogram.
8272 (set_gnu_expr_location_from_node) <default case>: Use it to attempt to
8273 set the end_locus of the expression as well.
8275 2011-01-04 Eric Botcazou <ebotcazou@adacore.com>
8278 * gcc-interface/trans.c (Identifier_to_gnu): In SJLJ mode, do not make
8279 variables that are referenced in exception handlers volatile.
8283 Copyright (C) 2011 Free Software Foundation, Inc.
8285 Copying and distribution of this file, with or without modification,
8286 are permitted in any medium without royalty provided the copyright
8287 notice and this notice are preserved.