1 2011-08-29 Robert Dewar <dewar@adacore.com>
3 * sem_ch10.adb, a-coorse.adb, exp_dist.adb, exp_ch3.adb: Minor
5 * gcc-interface/Make-lang.in: Update dependencies.
7 2011-08-29 Yannick Moy <moy@adacore.com>
9 * alfa.ads (Name_Of_Heap_Variable): New constant name.
10 * lib-xref-alfa.adb, lib-xref.adb, lib-xref.ads (Drefs): New global
11 table to hold dereferences.
12 (Add_ALFA_Xrefs): Take into account dereferences as special
13 reads/writes to the variable "HEAP".
14 (Enclosing_Subprogram_Or_Package): Move subprogram here.
15 (Generate_Dereference): New procedure to store a read/write dereferencew
17 * put_alfa.adb (Put_ALFA): Use different default than (0,0) used for
18 the special "HEAP" var.
19 * sem_ch4.adb (Analyze_Explicit_Dereference): Store read dereference
21 * sem_util.adb (Note_Possible_Modification): Store write dereference
24 2011-08-29 Hristian Kirtchev <kirtchev@adacore.com>
26 * exp_ch3.adb (Freeze_Type): Generate an accessibility check which
27 ensures that the level of the subpool access type is not deeper than
28 that of the pool object.
29 * sem_util.adb (Object_Access_Level): Expand to handle defining
31 * sem_res.adb (Resolve_Allocator): Add a guard to avoid examining the
32 subpool handle name of a rewritten allocator.
34 2011-08-29 Robert Dewar <dewar@adacore.com>
36 * impunit.adb, exp_ch4.adb, s-finmas.adb: Minor reformatting.
38 2011-08-29 Thomas Quinot <quinot@adacore.com>
40 * exp_dist.adb (TC_Rec_Add_Process_Element): For a choice with multiple
41 values, we generate multiple triples of parameters in the TypeCode.
42 Bump Choice_Index for each such triple so that a subsequent default
43 choice is associated with the correct index in the typecode.
45 2011-08-29 Ed Schonberg <schonberg@adacore.com>
47 * a-cdlili.adb (Iterate): Initialize properly an iterator over a null
49 (First, Last): Handle properly an iterator over a null container.
51 2011-08-29 Bob Duff <duff@adacore.com>
53 * sem_ch10.adb (Analyze_With_Clause,Install_Withed_Unit): Abandon
54 processing if we run across a node with no Scope. This can happen if
55 we're with-ing an library-level instance, and that instance got errors
56 that caused "instantiation abandoned".
57 * sem_util.adb (Unit_Declaration_Node): Make it more robust, by raising
58 an exception instead of using Assert, so it won't go into an infinite
59 loop, even when assertions are turned off.
61 2011-08-29 Ed Schonberg <schonberg@adacore.com>
63 * a-coorse.adb: Proper handling of empty ordered sets.
65 2011-08-29 Johannes Kanig <kanig@adacore.com>
67 * debug.adb: Add comments.
69 2011-08-29 Thomas Quinot <quinot@adacore.com>
71 * a-except.adb, a-except-2005.adb: Minor comment rewording and
74 2011-08-29 Yannick Moy <moy@adacore.com>
76 * sem_ch3.adb (Array_Type_Declaration): Remove insertion of
77 declaration for Itypes in Alfa mode.
79 2011-08-29 Robert Dewar <dewar@adacore.com>
81 * a-cdlili.ads, a-coinve.ads, a-coorma.adb, a-coorma.ads, s-tassta.adb,
82 a-cborma.adb, a-cborma.ads, a-cohama.ads, a-coorse.ads, a-cbhama.ads,
83 a-cborse.ads, a-cobove.adb, a-cobove.ads, a-cbhase.ads: Minor
86 2011-08-29 Tristan Gingold <gingold@adacore.com>
88 * exp_ch7.adb, exp_ch7.ads (Build_Exception_Handler): Move its spec to
90 * exp_intr.adb (Expand_Unc_Deallocation): Use Build_Exception_Handler.
91 * a-except.adb, a-except-2005.adb (Rcheck_22): Do not defer aborts
94 2011-08-29 Robert Dewar <dewar@adacore.com>
96 * a-cbhama.adb, a-cbhama.ads: Minor reformatting.
98 2011-08-29 Javier Miranda <miranda@adacore.com>
100 * sem_ch8.adb (Analyze_Subprogram_Renaming): Complete support for
101 renamings of formal subprograms when the actual for a formal type is
104 2011-08-29 Matthew Heaney <heaney@adacore.com>
106 * a-cbhama.ads, a-cbhase.ads (Move): Clear Source following assignment
109 2011-08-29 Matthew Heaney <heaney@adacore.com>
111 * a-cborma.ads, a-cborse.ads (Cursor): Default-initialize all
112 components of record type.
113 * a-cborma.adb, a-cborse.adb (Move): Clear Source following assignmentw
116 2011-08-29 Ed Schonberg <schonberg@adacore.com>
118 * a-cbhama.adb, a-cbhama.ads, a-cborma.adb, a-cborma.ads, a-cobove.adb,
119 a-cobove.ads, a-coorma.adb, a-coorma.ads: Add iterator machinery to
122 2011-08-29 Robert Dewar <dewar@adacore.com>
124 * sem_ch3.adb, sem_util.adb, gnat1drv.adb, s-parint.ads: Minor
127 2011-08-29 Matthew Heaney <heaney@adacore.com>
129 * a-cbhama.ads, a-cbhase.ads (Cursor): Default-initialize all
130 components of record type.
132 2011-08-29 Bob Duff <duff@adacore.com>
134 * s-tassta.adb (Task_Wrapper): Handle and ignore exceptions propagated
135 by the termination handler.
137 2011-08-29 Yannick Moy <moy@adacore.com>
139 * sem_ch3.adb (Array_Type_Declaration): Create declarations for Itypes
140 created in Alfa mode, instead of inserting artificial declarations of
141 non-Itypes in the tree.
142 * sem_util.adb, sem_util.ads (Itype_Has_Declaration): New function to
143 know if an Itype has a corresponding declaration, as defined in
146 2011-08-29 Yannick Moy <moy@adacore.com>
148 * gnat1drv.adb: Minor rewrite.
150 2011-08-29 Bob Duff <duff@adacore.com>
152 * s-tasuti.adb (Make_Passive): Work around race condition in
153 Make_Independent, which can cause Wait_Count to be zero. So instead of
154 asserting that Wait_Count > 0, and then decrementing it, decrement it
155 only if Wait_Count > 0.
156 * s-taskin.ads (Wait_Count, Alive_Count, Awake_Count): All of these
157 should be nonnegative, so declare them Natural instead of Integer.
159 2011-08-29 Robert Dewar <dewar@adacore.com>
161 * exp_ch5.adb, sem_ch3.adb, a-cihama.adb, a-cihama.ads, exp_ch7.adb,
162 sem_ch5.adb, a-ciorse.adb, a-ciorse.ads, sem_ch12.adb, a-cidlli.adb,
163 a-cidlli.ads, sem_util.adb, sem_res.adb, gnat1drv.adb, a-except.adb,
164 a-except.ads, a-except-2005.ads, sem_ch4.adb, exp_disp.adb,
165 exp_aggr.adb, sem_ch13.adb, par-ch3.adb: Minor reformatting.
167 2011-08-29 Tristan Gingold <gingold@adacore.com>
169 * s-auxdec-vms-alpha.adb: Add comments, remove some HT before labels.
171 2011-08-29 Vadim Godunko <godunko@adacore.com>
173 * s-parint.ads: Minor comment clarification.
175 2011-08-29 Vincent Celier <celier@adacore.com>
177 * prj.adb (Initialize): Make sure that new reserved words after Ada 95
178 may be used as identifiers.
180 2011-08-29 Ed Schonberg <schonberg@adacore.com>
182 * a-coinho.ads: Minor reformating.
184 2011-08-29 Ed Schonberg <schonberg@adacore.com>
186 * exp_ch5.adb (Expand_Iterator_Loop): Handle properly a loop over a
187 container of a derived type.
189 2011-08-29 Ed Schonberg <schonberg@adacore.com>
191 * a-cidlli.adb, a-cidlli.ads, a-cihama.adb, a-cihama.ads,
192 a-ciorse.adb, a-ciorse.ads: Add iterator machinery to containers.
194 2011-08-29 Pascal Obry <obry@adacore.com>
196 * exp_disp.adb: Minor comment fix.
197 (Make_Disp_Asynchronous_Select_Body): Properly initialize out parameters
198 to avoid warnings when compiling with -Wall.
199 (Make_Disp_Conditional_Select_Body): Likewise.
200 (Make_Disp_Timed_Select_Body): Likewise.
202 2011-08-29 Ed Schonberg <schonberg@adacore.com>
204 * sem_ch12.adb (Analyze_Formal_Subprogram_Declaration): If default is
205 an entity name, generate reference for it.
207 2011-08-29 Ed Schonberg <schonberg@adacore.com>
209 * exp_ch5.adb (Expand_Iterator_Loop): Uniform handling of "X of S"
211 * sem_util.adb (Is_Iterator, Is_Reversible_Iterator): Yield True for
213 * sem_ch5.adb: Move some rewriting to the expander, where it belongs.
215 2011-08-29 Ed Schonberg <schonberg@adacore.com>
217 * sem_ch8.adb (Check_Constrained_Object): Do not create an actual
218 subtype for an object whose type is an unconstrained union.
220 2011-08-29 Ed Schonberg <schonberg@adacore.com>
222 * par-ch3.adb (P_Array_Type_Definiation, P_Component_Items): "aliased"
223 is allowed in a component definition, by AI95-406.
225 2011-08-29 Matthew Heaney <heaney@adacore.com>
227 * a-chtgbo.adb (Generic_Iteration): Use correct overloading of Next.
229 2011-08-29 Hristian Kirtchev <kirtchev@adacore.com>
231 * a-except-2005.adb: Alphabetize all routines.
232 (Triggered_By_Abort): New routine.
233 * a-except-2005.ads (Triggered_By_Abort): New routine.
234 * a-except.adb Alphabetize all routines.
235 (Triggered_By_Abort): New routine.
236 * a-except.ads (Triggered_By_Abort): New routine.
237 * exp_ch7.adb: Update all comments involving the detection of aborts in
239 (Build_Object_Declarations): Do not generate code to detect the
240 presence of an abort at the start of finalization code, use a runtime
242 * rtsfind.ads: Add RE_Triggered_By_Abort to tables RE_Id and
244 * sem_res.adb (Resolve_Allocator): Emit a warning when attempting to
245 allocate a task on a subpool.
246 * s-stposu.adb: Add library-level flag Finalize_Address_Table_In_Use.
247 The flag disables all actions related to the maintenance of
248 Finalize_Address_Table when subpools are not in use.
249 (Allocate_Any_Controlled): Signal the machinery that subpools are in
251 (Deallocate_Any_Controlled): Do not call Delete_Finalize_Address which
252 performs costly task locking when subpools are not in use.
254 2011-08-29 Yannick Moy <moy@adacore.com>
256 * gnat1drv.adb (Adjust_Global_Switches): Restore expansion of tagged
257 types and dispatching calls in Alfa mode.
258 * lib-xref-alfa.adb (Collect_ALFA): Rewrite computation of
259 correspondance between body and spec scopes, to reuse utility functions
260 (Traverse_Declarations_Or_Statements): Protect access to body for stub
261 by testing the presence of the library unit for the body
262 * sem_ch6.adb (Set_Actual_Subtypes): take into account that in Alfa
263 mode the expansion of accept statements is skipped
264 * sem_util.adb, sem_util.ads (Unique_Entity): New function returning
265 the unique entity corresponding to the one returned by
266 Unique_Defining_Entity applied to the enclosing declaration of the
269 2011-08-29 Bob Duff <duff@adacore.com>
271 * treepr.ads: Improve debugging facilities. pn(x) no longer crashes in
272 gdb when x is not a node (it can be a node list, name_id, etc). pp is
273 an alias for pn. ppp is an alias for pt.
275 2011-08-29 Javier Miranda <miranda@adacore.com>
277 * exp_aggr.adb (Expand_Record_Aggregate): Use the top-level enclosing
278 aggregate to take a consistent decision on the need to convert into
279 assignments aggregates that initialize constant objects.
281 2011-08-29 Hristian Kirtchev <kirtchev@adacore.com>
283 * exp_ch4.adb (Expand_Allocator_Expression): Add a call to
284 Build_Allocate_Deallocate_Proc in order to handle allocation of
285 non-controlled objects on subpools.
286 * impunit.adb: Remove s-finmas and s-spsufi since they were never meant
287 to be end-user visible.
288 * s-finmas.adb: Add with and use clause for System.HTable.
289 Add an instantiation of Simple_HTable which provides a mapping between
290 the address of a controlled object and the corresponding
291 Finalize_Address used to clean up the object. The table is used when a
292 master is operating in heterogeneous mode.
293 (Attach): Explain why the input node is not verified on being already
295 (Delete_Finalize_Address): New routine.
296 (Detach): Add pragma Assert which ensures that a node is already
298 (Finalize): Add local variable Cleanup. Rewrite the iteration scheme
299 since nodes are no longer removed on traversal. Explain why node
300 detachment is undesirable in this case.
301 (Get_Finalize_Address): New routine.
303 (Is_Empty_List): Removed.
304 (pm): Renamed to Print_Master. Add output for discriminant
306 Comment reformatting.
307 (Set_Finalize_Address (Address, Finalize_Address_Ptr)): New routine.
308 * s-finmas.ads: Various comments additions / improvements.
309 Type Finalization_Master has a discriminant which determines the mode of
311 (Delete_Finalize_Address): New routine.
312 (Get_Finalize_Address): New routine.
313 (pm): Renamed to Print_Master.
314 (Set_Finalize_Address (Address, Finalize_Address_Ptr)): New routine.
315 * s-stposu.adb: Add with clause for System.Address_Image; Add with and
316 use clause for System.IO.
317 (Allocate_Any_Controlled): Add machinery to set TSS primitive
318 Finalize_Address depending on the mode of allocation and the mode of
320 (Deallocate_Any_Controlled): Remove the relation pair object -
321 Finalize_Address regardless of the master mode. Add comment explaining
323 (Detach): Ensure that fields Prev and Next are null after detachment.
324 (Finalize_Pool): Remove local variable Next_Ptr. Rewrite the iteration
325 scheme to check whether the list of subpools is empty. There is no
326 longer need to store the next subpool or advance the current pointer.
327 (Is_Empty_List): New routine.
328 (Print_Pool): New routine.
329 (Print_Subpool): New routine.
330 * s-stposu.ads: Various comments additions / improvements.
331 Field Master of type Root_Subpool is now a heterogeneous collection.
332 (Print_Pool): New routine.
333 (Print_Subpool): New routine.
335 2011-08-29 Ed Schonberg <schonberg@adacore.com>
337 * exp_ch5.adb (Expand_N_Iterator_Loop): Implement Ada2012 loop iterator
338 forms, using aspects of container types.
339 * sem_ch3.adb (Find_Type_Name): Preserve Has_Delayed_Aspects and
340 Has_Implicit_Dereference flags, that may be set on the partial view.
341 * sem_ch4.adb (Process_Overloaded_Indexed_Component): Prefix may be a
342 container type with an indexing aspect.
343 (Analyze_Quantified_Expression): Analyze construct with expansion
344 disabled, because it will be rewritten as a loop during expansion.
345 (Try_Container_Indexing): The prefix itself may be a container type
346 with an indexing aspect, as with a vector of vectors.
347 * sem_ch5.adb (Analyze_Iteration_Scheme): In a generic context, analyze
348 the original doamin of iteration, for name capture.
349 (Analyze_Iterator_Specification): If the domain is an expression that
350 needs finalization, create a separate declaration for it.
351 For an iterator with "of" retrieve default iterator info from aspect of
352 container type. For "in" iterator, retrieve type of Iterate function.
353 * sem_ch13.adb (Check_Iterator_Function): Fix typo.
354 (Check_Aspect_At_End_Of_Declaration): Make type unfrozen before
355 analysis, to prevent spurious errors about late attributes.
356 * sprint.adb: Handle quantified expression with either loop or iterator
358 * a-convec.ads, a-convec.adb: Iterate function returns a reversible
361 2011-08-29 Vincent Celier <celier@adacore.com>
363 * make.adb (Scan_Make_Arg): Take any option as is in packages Compiler,
364 Binder or Linker of the main project file.
366 2011-08-29 Ed Schonberg <schonberg@adacore.com>
368 * inline.adb (Add_Scopes_To_Clean): Exclude any entity within a generic
371 2011-08-29 Yannick Moy <moy@adacore.com>
373 * exp_ch9.adb: Partial revert of previous change for Alfa mode
375 2011-08-29 Yannick Moy <moy@adacore.com>
377 * exp_ch11.adb: Minor expansion of comment.
379 2011-08-29 Yannick Moy <moy@adacore.com>
381 * lib-xref-alfa.adb (Add_ALFA_Scope): Treat generic entities.
383 2011-08-29 Ed Schonberg <schonberg@adacore.com>
385 * sem_res.adb (Resolve_Arithmetic_Op): If the node has a universal
386 interpretation, set the type before resolving the operands, because
387 legality checks on an exponention operand need to know the type of the
390 2011-08-29 Ed Schonberg <schonberg@adacore.com>
392 * sem_ch12.adb (Analyze_Package_Instantiation): Do not set delayed
393 cleanups on a master if the instance is within a generic unit.
394 Complement to the corresponding fix to inline.adb for K520-030.
396 2011-08-29 Tristan Gingold <gingold@adacore.com>
398 * exp_ch7.adb (Build_Raise_Statement): Raise PE instead of the current
400 * exp_intr.adb: Minor comment fix.
402 2011-08-29 Bob Duff <duff@adacore.com>
404 * sem_ch13.adb (Analyze_Aspect_Specifications): Fix cases where
405 Delay_Required was used as an uninitialized variable.
407 2011-08-29 Robert Dewar <dewar@adacore.com>
409 * a-cdlili.adb, a-cdlili.ads, a-coinve.adb, a-coinve.ads,
410 sem_util.adb, sem_util.ads, a-cohama.adb, a-cohama.ads, a-coorse.adb,
411 a-coorse.ads, aspects.ads, sem_ch8.adb: Minor reformatting.
413 2011-08-29 Thomas Quinot <quinot@adacore.com>
415 * system-freebsd-x86_64.ads (Backend_Overflow_Checks): Set true True.
416 Remove unused variables.
418 2011-08-29 Ed Schonberg <schonberg@adacore.com>
420 * sem_res.adb: Remove Build_Explicit_Dereference.
421 * sem_util.adb, sem_util.ads (Build_Explicit_Dereference): Moved here
422 from sem_res.adb, used in analysis of additional constructs.
423 (Is_Iterator, Is_Reversible_Iterator): New predicates for Ada2012
424 expansion of iterators.
425 (Is_Object_Reference): Recognize variables rewritten as explicit
426 dereferences in Ada2012.
427 * snames.ads-tmpl: Add Has_Element, Forward_Iterator,
428 Reversible_Iterator names, for expansion of Ada2012 iterators.
429 * aspects.ads, aspects.adb (Find_Aspect): Utility.
430 * a-cdlili.ads, a-cdlili.adb: Add new iterator machinery to doubly
431 linked list container.
432 * a-coinve.ads, a-coinve.adb: Ditto for indefinite vector containers.
433 * a-coorse.ads, a-coorse.adb: Ditto for ordered sets.
435 2011-08-29 Ed Schonberg <schonberg@adacore.com>
437 * a-cohama.adb, a-cohama.ads: Add iterator primitives to hashed map
440 2011-08-29 Vincent Celier <celier@adacore.com>
442 * make.adb (Gnatmake): Get the maximum number of simultaneous
443 compilation processes after the Builder switches has been scanned, as
444 there may include -jnn.
446 2011-08-29 Matthew Heaney <heaney@adacore.com>
448 * a-chtgbo.adb (Generic_Equal): Use correct overloading of Next.
450 2011-08-29 Tristan Gingold <gingold@adacore.com>
452 * gnatcmd.adb (GNATCmd): On OpenVMS, truncate the length of
453 GNAT_DRIVER_COMMAND_LINE to 255.
455 2011-08-29 Pascal Obry <obry@adacore.com>
457 * freeze.adb, sem_ch8.adb, a-convec.adb, a-convec.ads: Minor
458 reformatting and style fix (class attribute casing).
460 2011-08-29 Yannick Moy <moy@adacore.com>
462 * exp_ch11.adb: Yet another case where expansion should be common
463 between CodePeer and Alfa.
465 2011-08-29 Yannick Moy <moy@adacore.com>
467 * exp_ch9.adb: Partial revert of previous change for Alfa mode.
469 2011-08-29 Ed Schonberg <schonberg@adacore.com>
471 * sem_ch6.adb (Matches_Limited_With_View): The limited views of an
472 incomplete type and its completion match.
474 2011-08-29 Yannick Moy <moy@adacore.com>
476 * exp_ch13.adb: Adjust previous change.
478 2011-08-29 Robert Dewar <dewar@adacore.com>
480 * sem_prag.adb, prj.adb, sem_util.adb, sem_res.adb, gnat1drv.adb,
481 exp_ch4.adb, sem_ch8.adb: Minor code reorganization
484 2011-08-29 Emmanuel Briot <briot@adacore.com>
486 * make.adb, prj.adb, prj.ads (Compute_All_Imported_Projects): Also
487 initialize aggregated projects.
489 2011-08-29 Ed Schonberg <schonberg@adacore.com>
491 * sem_ch8.adb (Find_Renamed_Entity): Within an instance, use scope
492 depth of candidates to resolve a potentially spurious ambiguity between
493 two visible subprograms.
495 2011-08-29 Yannick Moy <moy@adacore.com>
497 * sem_prag.adb (Analyze_Pragma): Allow Test_Case pragma without
499 * sem_util.adb (Get_Ensures_From_Test_Case_Pragma,
500 Get_Requires_From_Test_Case_Pragma): Allow Test_Case pragma without
503 2011-08-29 Arnaud Charlet <charlet@adacore.com>
505 * gnat1drv.adb (Adjust_Global_Switches): Improve previous change.
508 2011-08-29 Thomas Quinot <quinot@adacore.com>
510 * sem_res.adb: Minor reformatting.
512 2011-08-29 Johannes Kanig <kanig@adacore.com>
514 * exp_ch4.adb (Expand_Quantified_Expression): Do not expand in ALFA
516 * gnat1drv.adb (Adjust_Global_Switches): Set
517 Use_Expressions_With_Actions to False in ALFA mode.
518 * sem_res.adb (Resolve_Quantified_Expression): Simpler treatment in
521 2011-08-29 Yannick Moy <moy@adacore.com>
523 * exp_ch13.adb (Expand_N_Freeze_Entity): Do nothing in Alfa mode.
524 * exp_ch9.adb: Do not expand tasking constructs in Alfa mode.
525 * gnat1drv.adb (Adjust_Global_Switches): Suppress the expansion of
526 tagged types and dispatching calls in Alfa mode.
528 2011-08-29 Javier Miranda <miranda@adacore.com>
530 * sem_ch3.adb (Process_Discriminants): Add missing check to ensure that
531 we do not report an error on an Empty node.
533 2011-08-29 Geert Bosch <bosch@adacore.com>
535 * Makefile.rtl (GNATRTL_NONTASKING_OBJECTS): Add a-nllrar.o,
536 a-nlrear.o and a-nurear.o.
538 2011-08-29 Robert Dewar <dewar@adacore.com>
540 * freeze.adb: Minor code reorganization.
542 * sem_util.adb, errout.adb, exp_ch11.adb, a-ngrear.adb, s-gearop.adb,
543 sem_ch6.adb: Minor reformatting
545 2011-08-29 Tristan Gingold <gingold@adacore.com>
547 * s-except.ads, s-except.adb: Provide dummy body.
549 2011-08-29 Yannick Moy <moy@adacore.com>
551 * sem_warn.adb (Within_Postcondition): Take into account the case of
552 an Ensures component in a Test_Case.
554 2011-08-29 Tristan Gingold <gingold@adacore.com>
556 * s-excdeb.ads, s-excdeb.adb: New files, created from s-except.
557 * rtsfind.ads (RTU_Id): Replaces System_Exceptions by
558 System_Exceptions_Debug
559 (RE_Unit_Table): Search RE_Local_Raise in System_Exceptions_Debug
560 * a-except.adb: With and use System.Exceptions_Debug instead of
562 * a-except-2005.adb: Likewise.
563 * s-assert.adb: Likewise.
564 * s-except.adb, s-except.ads: Move debugging hooks to s-excdeb.
565 * Makefile.rtl: Add s-excdeb. Adjust compilation rule.
566 * gcc-interfaces/Makefile.in, gcc-interface/Make-lang.in: Add
567 s-excdeb. Update dependencies.
568 (GNATRTL_LINEARALGEBRA_OBJS): Remove a-nlrear.o a-nurear.o a-nllrar.o
569 as these no longer need external libraries.
571 2011-08-29 Ed Schonberg <schonberg@adacore.com>
573 * sem_res.adb (Resolve_Op_Expon): Additional check to reject an
574 exponentiation operator on universal values in a context that requires
577 2011-08-29 Tristan Gingold <gingold@adacore.com>
579 * raise-gcc.c (personnality_routine): Fix thinko. Set Ada occurrence
580 before calling notify_handled_exception.
581 * a-exextr.adb: Fix comment.
583 2011-08-29 Hristian Kirtchev <kirtchev@adacore.com>
585 * exp_ch4.adb (Expand_Allocator_Expression): Add code to set attribute
586 Finalize_Address of the access type's finalization master.
587 (Expand_N_Allocator): Add code to set attribute Finalize_Address of the
588 access type's finalization master. Add a guard to prevent
589 Associated_Storage_Pool from being set on .NET/JVM.
590 * exp_ch6.adb (Make_Build_In_Place_Call_In_Allocator): Add code to set
591 attribute Finalize_Address of the access type's finalization master.
592 * exp_ch7.adb (Make_Finalize_Address_Call): New routine.
593 * exp_ch7.ads (Make_Finalize_Address_Call): New routine.
594 * rtsfind.ads: Add RE_Set_Finalize_Address to tables RE_Id and
596 * s-finmas.adb: Add with clause for System.Address_Image. Add with and
597 use clause for System.IO
598 (Detach): Relax the assertion, to be reinstated later.
599 (Finalize): Rewrite the iteration loop to avoid pointer comparison.
600 Relax the assertion on Finalize_Address, to be reinstated later.
601 (Is_Empty_List): New routine.
602 (pm): New debug routine.
603 (Set_Finalize_Address): New routine.
604 * s-finmas.ads (pm): New debug routine.
605 (Set_Finalize_Address): New routine.
606 * s-stposu.adb (Allocate_Any_Controlled): Code reformatting.
608 2011-08-29 Tristan Gingold <gingold@adacore.com>
610 * a-exexpr-gcc.adb (GCC_Exception_Access, GNAT_GCC_Exception_Access):
613 2011-08-29 Tristan Gingold <gingold@adacore.com>
615 * s-taprop-vms.adb (Get_Exc_Stack_Addr): Remove.
616 (Initialize_TCB): Remove Exc_Stack_Ptr initialization.
617 (Finalize_TCB): Remove its finalization.
618 (Initialize): Remove assignment of GET_Exc_Stack_Addr
619 * s-soflin.adb (NT_Exc_Stack): Remove
620 (Get_Exc_Stack_Addr_NT): Likewise.
621 (Get_Exc_Stack_Addr_Soft): Likewise.
622 * s-soflin.ads (Get_Exc_Stack_Addr_NT): Remove.
623 (Get_Exc_Stack_Addr): Likewise.
624 (Get_Exc_Stack_Addr_Soft): Likewise
625 * s-taspri-vms.ads (Exc_Stack_T): Remove.
626 (Exc_Stack_Ptr_T): Likewise.
627 (Private_Data): Remove Exc_Stack_Ptr component.
629 2011-08-29 Tristan Gingold <gingold@adacore.com>
631 * raise-gcc.c (get_ip_from_context): New function. Factorize code.
633 2011-08-29 Tristan Gingold <gingold@adacore.com>
635 * gnat_ugn.texi: Fix aix and x86-solaris info for run-time.
637 2011-08-29 Geert Bosch <bosch@adacore.com>
639 * s-gearop.ads (Back_Substitute, Diagonal, Forward_Eliminate,
640 L2_Norm, Swap_Column): New generic subprograms
641 * s-gearop.adb (Back_Substitute, Diagonal, Forward_Eliminate,
642 L2_Norm, Swap_Column): Implement new subprograms in order to
643 eliminate dependency on BLAS and LAPACK libraries in
644 Ada.Numerics.Generic_Real_Arrays and eventually also the complex
645 version. Forward_Eliminate/Back_Substitute can be used to put a
646 matrix in row echelon or reduced row echelon form using partial
648 * a-ngrear.adb: (Back_Substitute, Diagonal, Forward_Eleminate,
649 Swap_Column): Instantiate from System.Generic_Array_Operations.
650 ("*", "abs"): Implement by instantiation from Generic_Array_Operations.
651 (Sqrt): Local function for simple computation of square root without
652 adding dependencies on Generic_Elementary_Functions.
653 (Swap): New subprogram to exchange floating point numbers.
654 (Inverse): Reimplement using Jordan-Gauss elimination.
655 (Jacobi): New procedure implementing Jacobi's method for computation
656 of eigensystems, based on Rutishauser's implementation.
657 (L2_Norm): Implement directly using the inner product.
658 (Sort_Eigensystem): Sort eigenvalue/eigenvector pairs in order of
659 decreasing eigenvalue as required by the Ada RM.
660 (Swap_Column): New helper procedure for Sort_Eigensystem.
661 Remove with of System.Generic_Real_BLAS and System.Generic_Real_LAPACK.
662 Add with of Ada.Containers.Generic_Anonymous_Array_Sort, for
665 2011-08-29 Thomas Quinot <quinot@adacore.com>
667 * put_scos.adb (Put_SCOs): Do not emit a newline for an empty
670 2011-08-29 Hristian Kirtchev <kirtchev@adacore.com>
672 * s-finmas.adb (Finalize): Check Finalize_Address of the master rather
673 than the current node.
674 * s-finmas.ads: Move field Finalize_Address from type FM_Node to
675 Finalization_Master. The list headers have two fields instead of three.
676 This should fix alignment issue but subpool allocations are now
677 unusable. Alphabetize subprograms.
678 * s-stposu.adb (Allocate_Any_Controlled): Use the offset rather than
679 the size of the header when converting the beginning of the object to
680 a FM_Node. Set the master's Finalize_Address attribute if not already
682 (Deallocate_Any_Controlled): Use the offset rather than the size of the
683 header when converting the beginning of the object to a FM_Node.
685 2011-08-29 Gary Dismukes <dismukes@adacore.com>
687 * exp_ch11.adb (Expand_N_Raise_Statement): Don't suppress expansion of
688 reraise when compiling for CodePeer.
690 2011-08-29 Arnaud Charlet <charlet@adacore.com>
692 * a-iteint.ads, Makefile.rtl: Add missing compilation of a-iteint.ads,
693 now needed by a-convec.adb. Fix warning.
695 2011-08-29 Hristian Kirtchev <kirtchev@adacore.com>
697 * exp_util.adb (Build_Allocate_Deallocate_Proc): Add a guard for the
698 processing of TSS routine Finalize_Address when compiling in
701 2011-08-29 Thomas Quinot <quinot@adacore.com>
703 * a-strunb.ads, einfo.ads, g-comlin.ads, sem_ch6.adb,
704 sem_warn.adb: Minor reformatting.
706 2011-08-29 Emmanuel Briot <briot@adacore.com>
708 * prj-conf.adb (Get_Config_Switches): Also collect the list of
709 languages from aggregated projects.
711 2011-08-29 Yannick Moy <moy@adacore.com>
713 * lib-xref-alfa.adb, lib-xref.ads (Traverse_Declarations_Or_Statements,
714 Traverse_Handled_Statement_Sequence, Traverse_Package_Body,
715 Traverse_Package_Declaration, Traverse_Subprogram_Body,
716 Traverse_Compilation_Unit): Add a parameter Inside_Stubs so that bodies
717 for stubs are traversed too when parameter is set
718 (Traverse_All_Compilation_Units): Traverse without going inside stubs
719 (Traverse_Declarations_Or_Statements): Do the special traversing for
721 * sem_util.adb, sem_util.ads (Get_Body_From_Stub): New function to
722 return subprogram or package body from stub.
723 (Is_Subprogram_Stub_Without_Prior_Declaration): New function to detect
724 stubs without prior subprogram decl.
726 2011-08-29 Vasiliy Fofanov <fofanov@adacore.com>
728 * gnat_ugn.texi: Fix typo.
730 2011-08-29 Hristian Kirtchev <kirtchev@adacore.com>
732 * s-stposu.adb (Allocate_Any_Controlled): Reimplement the mechanism
733 which accounts for size vs alignment issues and calculates the size of
735 (Deallocate_Any_Controlled): Ditto.
736 (Nearest_Multiple_Rounded_Up): New routine.
738 2011-08-29 Tristan Gingold <gingold@adacore.com>
740 * a-exstat.adb (String_To_EO): Do no set Cleanup_Flag.
741 * a-exexda.adb (Set_Exception_C_Msg): Ditto.
742 (Set_Exception_Msg): Ditto.
743 * a-exexpr-gcc.adb (Setup_Current_Excep): Ditto. Do not set
745 * a-except.adb, a-except-2005.adb (Save_Occurrence_No_Private): Remove.
746 Use Save_Occurrence instead of Save_Occurrence_No_Private.
747 (Raise_With_Msg): Remove Cleanup_Flag.
748 * a-except.ads, a-except-2005.ads (Exception_Occurrence): Remove
749 Clean_Flag and Private_Data components.
751 2011-08-29 Yannick Moy <moy@adacore.com>
753 * freeze.adb (Freeze_Record_Type): Ignore packing in Alfa mode, like
755 * sem_ch3.adb (Signed_Integer_Type_Declaration): Correct the generation
756 of an explicitly declared type, so that the base types of the original
757 type and this generated type are the same, and a "type" (not a subtype
759 * errout.adb (Special_Msg_Delete): Do not issue messages "Size too
760 small" in Alfa mode, like in CodePeer mode.
761 * sem_ch13.adb (Analyze_Attribute_Definition_Clause): Ignore rep
762 clauses in Alfa mode.
764 2011-08-29 Javier Miranda <miranda@adacore.com>
766 * exp_ch6.ads, exp_ch6.adb (Is_Null_Procedure): Move the spec of this
767 function to the package spec.
768 * sem_ch6.adb (Find_Corresponding_Spec, New_Overloaded_Entity): For
769 internally generated bodies of null procedures locate the internally
770 generated spec enforcing mode conformance.
771 (Is_Interface_Conformant): Ensure that the controlling formal of the
774 2011-08-29 Ed Schonberg <schonberg@adacore.com>
776 * sem_prag.adb (Analyze_Pragma, case Inline): In an instance, do not
777 reject the pragma if it appears to apply to a formal subprogram.
779 2011-08-29 Ed Schonberg <schonberg@adacore.com>
781 * exp_ch4.adb (Expand_Allocator_Expression): Use consistent name for
782 inner expression, to prevent double evaluation.
784 2011-08-29 Tristan Gingold <gingold@adacore.com>
786 * a-exexpr.adb (Propagate_Exception): Remove all the parameters as
788 * a-exexpr-gcc.adb (Propagate_Exception): Ditto.
789 * a-except-2005.adb (Propagate_Exception): Adjust spec.
790 (Raise_Current_Excep): Adjust call.
791 (Raise_From_Signal_Handler): Call now simply call Raise_Current_Excep.
793 2011-08-29 Thomas Quinot <quinot@adacore.com>
795 * exp_disp.adb: Minor reformatting.
797 2011-08-29 Tristan Gingold <gingold@adacore.com>
799 * a-exexpr.adb (Setup_Exception): Removed.
800 * a-exexpr-gcc.adb (Setup_Exception): Removed.
801 * a-except.adb (Exception_Propagation): Removed.
802 * a-except-2005.adb (Setup_Exception): Removed.
803 (Reraise): Remove call to Setup_Exception.
804 (Reraise_Occurrence): Ditto.
805 (Reraise_Occurrence_Always): Ditto.
806 (Reraise_Occurrence_No_Defer): Ditto.
807 (Transfer_Occurrence): Ditto.
808 * a-exexda.adb (Set_Exception_C_Msg): Remove call to Setup_Exception.
809 (Set_Exception_Msg): Ditto.
811 2011-08-29 Robert Dewar <dewar@adacore.com>
813 * a-convec.adb, exp_disp.adb: Minor reformatting.
815 2011-08-29 Tristan Gingold <gingold@adacore.com>
817 * a-exexpr-gcc.adb (GNAT_GCC_Exception_Access): Set to convention C.
819 2011-08-29 Gary Dismukes <dismukes@adacore.com>
821 * exp_ch3.adb (Build_Record_Init_Proc.Build_Init_Procedure): Set
822 Exception_Handlers to No_List instead of Empty_List in the case where
823 there are no handlers.
825 2011-08-29 Tristan Gingold <gingold@adacore.com>
827 * gcc-interface/gigi.h (enum standard_datatypes): Add
829 (reraise_zcx_decl): New macro.
830 * gcc-interface/trans.c (gnu_incoming_exc_ptr): New variable.
831 (gigi): Set reraise_zcx_decl.
832 (Exception_Handler_to_gnu_zcx): Save and restore gnu_incoming_exc_ptr.
833 (gnat_to_gnu): Handle N_Raise_Statement.
835 2011-08-29 Robert Dewar <dewar@adacore.com>
837 * sem_ch6.adb, exp_ch3.adb, s-stposu.adb, a-undesu.ads,
838 a-undesu.adb: Minor reformatting.
840 2011-08-29 Ed Schonberg <schonberg@adacore.com>
842 * exp_disp.adb (Check_Premature_Freezing): When building a dispatch
843 table, accept an unfrozen untagged component if it is an actual for a
844 formal incomplete type.
845 * a-convec.ads, a-convec.adb: Instantiate Ada.Iterator_Interfaces to
846 provide new iterator forms over vectors.
847 Introduce type Iterator in package body to implement operations of
848 Reversible_Iterator interface.
849 * a-iteint.ads: Make package pure so it is usable with new container
850 packages, that are categorized Remote_Types.
852 2011-08-29 Robert Dewar <dewar@adacore.com>
854 * a-exexpr-gcc.adb, a-synbar.adb, sem_ch13.adb: Minor reformatting.
856 2011-08-29 Bob Duff <duff@adacore.com>
858 * sem_aggr.adb (Resolve_Aggr_Expr): Call this routine even in the case
859 of <>, because this is the routine that checks for dimensionality
860 errors (for example, for a two-dimensional array, (others => <>) should
861 be (others => (others => <>)).
863 2011-08-29 Hristian Kirtchev <kirtchev@adacore.com>
865 * impunit.adb: Add new run-time units.
866 * freeze.adb, exp_ch7.ads, exp_ch7.adb, exp_util.ads, exp_util.adb,
867 s-stposu.ads, s-stposu.adb: Code clean up.
868 Handle protected class-wide or task class-wide types
869 Handle C/C++/CIL/Java types.
870 * s-spsufi.adb, s-spsufi.ads: New files.
872 2011-08-29 Yannick Moy <moy@adacore.com>
874 * sem_ch13.adb (Analyze_Aspect_Specifications): Reject test-case on
875 library-level subprogram.
876 * sem_prag.adb (Check_Test_Case): Stricter rules for test-case
878 (Analyze_Pragma): Change name "Normal" for "Nominal" in test-case
880 * snames.ads-tmpl: Change name "Normal" for "Nominal" in test-case
882 * gnat_rm.texi: Update doc for Test_Case pragma.
884 2011-08-29 Tristan Gingold <gingold@adacore.com>
886 * a-exexpr-gcc.adb (Unwind_Exception): Remove default value, made it
888 (GCC_Exception_Access): New type.
889 (Unwind_DeleteException): New imported procedure
890 (Foreign_Exception): Import it.
891 (GNAT_GCC_Exception): Simply have the occurrence inside.
892 (To_GCC_Exception): New function.
893 (To_GNAT_GCC_Exception): New function.
894 (GNAT_GCC_Exception_Cleanup): New procedure..
895 (Propagate_GCC_Exception): New procedure.
896 (Reraise_GCC_Exception): New procedure.
897 (Setup_Current_Excep): New procedure.
898 (CleanupUnwind_Handler): Change type of UW_Exception parameter.
899 (Unwind_RaiseException): Ditto.
900 (Unwind_ForcedUnwind): Ditto.
902 (Begin_Handler): Change type of parameter.
903 (End_Handler): Ditto. Now delete the exception if still present.
904 (Setup_Key): Removed.
905 (Is_Setup_And_Not_Propagated): Removed.
906 (Set_Setup_And_Not_Propagated): Ditto.
907 (Clear_Setup_And_Not_Propagated): Ditto.
908 (Save_Occurrence_And_Private): Ditto.
909 (EID_For): Add 'not null' constraint on parameter.
910 (Setup_Exception): Does nothing.
911 (Propagate_Exception): Simplified.
912 * exp_ch11.adb (Expand_N_Raise_Statement): In back-end exception model,
913 re-raise is not expanded anymore.
914 * s-except.ads (Foreign_Exception): New exception - placeholder for
916 * raise-gcc.c (__gnat_setup_current_excep): Declare
917 (CXX_EXCEPTION_CLASS): Define (not yet used)
918 (GNAT_EXCEPTION_CLASS): Define.
919 (is_handled_by): Handle foreign exceptions.
920 (PERSONALITY_FUNCTION): Call __gnat_setup_current_excep.
922 2011-08-29 Jose Ruiz <ruiz@adacore.com>
924 * a-synbar.adb (Synchronous_Barrier): Some additional clarification.
926 2011-08-29 Thomas Quinot <quinot@adacore.com>
928 * a-synbar-posix.adb: Minor reformatting.
930 2011-08-29 Jose Ruiz <ruiz@adacore.com>
932 * a-exetim-posix.adb, a-exetim-mingw.adb, a-exetim-mingw.ads,
933 a-exetim-default.ads (Interrupt_Clocks_Supported,
934 Separate_Interrupt_Clocks_Supported, Clock_For_Interrupts): Add these
935 definitions to be compliant with AI-0171. The target systems do not
936 support separate account for the execution time of interrupt handlers.
938 2011-08-29 Jose Ruiz <ruiz@adacore.com>
940 * a-synbar.adb (Wait): Change the order of evaluation of the conditions
941 in the barrier to put first the easiest to evaluate (and the one which
942 will be True more often). More efficient.
944 2011-08-29 Eric Botcazou <ebotcazou@adacore.com>
946 * s-atocou-x86.adb: Fix constraint in machine code insertion.
948 2011-08-29 Bob Duff <duff@adacore.com>
950 * aspects.ads, aspects.adb: Add new aspects for various pragmas and
951 attributes that are now aspects, as specified by AI05-0229-1.
952 * sem_ch13.adb (Analyze_Aspect_Specifications,
953 Check_Aspect_At_Freeze_Point): Analyze the new aspects. Turn them into
954 pragmas or attribute references, as appropriate.
956 2011-08-29 Robert Dewar <dewar@adacore.com>
958 * a-synbar.ads, a-synbar.adb, a-synbar-posix.adb,
959 a-synbar-posix.ads: Minor reformatting.
961 2011-08-29 Yannick Moy <moy@adacore.com>
963 * snames.ads-tmpl: Add name Force.
965 2011-08-29 Pascal Obry <obry@adacore.com>
967 * prj-nmsc.adb: Minor reformatting.
969 2011-08-29 Jose Ruiz <ruiz@adacore.com>
971 * a-exetim.ads (Interrupt_Clocks_Supported,
972 Separate_Interrupt_Clocks_Supported, Clock_For_Interrupts): Add these
973 definitions to be compliant with AI-0171.
975 2011-08-29 Robert Dewar <dewar@adacore.com>
977 * a-ngelfu.adb: Add comments.
979 2011-08-29 Geert Bosch <bosch@adacore.com>
981 * a-ngelfu.adb (Tan): Do not raise Constraint_Error if the argument is
982 the closest machine number to Pi / 2.0.
984 2011-08-29 Jose Ruiz <ruiz@adacore.com>
986 * impunit.adb (Non_Imp_File_Names_12): Add a-synbar for new Ada 2012
987 package Ada.Synchronous_Barriers.
988 * a-synbar.ads, a-synbar.adb, a-synbar-posix.ads, a-synbar-posix.adb:
989 Add new specs and bodies for Ada.Synchronous_Barriers. There is a
990 default implementation using protected objects and another one
991 a-synbar-posix using POSIX barriers as the underlying support.
992 * gcc-interface/Makefile.in (LIBGNAT_TARGET_PAIRS for Linux (x86,
993 x86_64, ia64) and MIPS IRIX): Use the a-synbar-posix implementation of
994 Ada.Synchronous_Barriers which uses POSIX barriers (more efficient).
995 Clean up dependencies.
996 * Makefile.rtl (GNATRTL_TASKING_OBJS): Add a-synbar.o
998 2011-08-29 Robert Dewar <dewar@adacore.com>
1000 * sem_ch7.adb, make.adb, sem_res.adb, exp_intr.adb,
1001 exp_dist.adb: Minor code reorganization.
1004 2011-08-29 Thomas Quinot <quinot@adacore.com>
1006 * sem_cat.adb (Validate_RACW_Primitive): The return type of an RACW
1007 primitive operation must support external streaming if it is not a
1008 controlling access result.
1010 2011-08-29 Thomas Quinot <quinot@adacore.com>
1012 * sinfo.ads, sem_ch7.adb: Minor reformatting.
1014 2011-08-29 Bob Duff <duff@adacore.com>
1016 * sem_ch4.adb (Analyze_Allocator): Check No_Nested_Finalization
1017 restriction on allocators, as required by AI05-0013-1.
1018 * restrict.ads: Minor comment fix.
1020 2011-08-29 Tristan Gingold <gingold@adacore.com>
1022 * a-exexpr.adb, a-except-2005.ads (Jmpbuf_Address): Move to a-exexpr.adb
1023 (To_Jmpbuf_Address): Ditto
1024 (builtin_longjmp): Ditto
1026 2011-08-29 Thomas Quinot <quinot@adacore.com>
1028 * sem_res.adb: Minor reformatting.
1030 2011-08-29 Vincent Celier <celier@adacore.com>
1032 * make.adb (Gnatmake): Move special processing for VM targets after the
1033 call to Get_Target_Parameters.
1035 2011-08-29 Thomas Quinot <quinot@adacore.com>
1037 * sem_ch12.adb, par-ch12.adb: Minor reformatting.
1039 2011-08-29 Hristian Kirtchev <kirtchev@adacore.com>
1041 * sem_res.adb (Resolve_Allocator): Implement Ada2012-B052. Detect cases
1042 where an anonymous access discriminant of a limited designated type
1043 appears in a non-immutably limited discriminated type and issue an
1044 error message. Add local variable Desig_T and replace all occurrences
1047 2011-08-29 Jose Ruiz <ruiz@adacore.com>
1049 * a-rttiev.adb (Set_Handler): Update comment to indicate that our
1050 implementation is compliant to RM D.15(15/2) after the modification
1051 imposed by AI05-0094-1 (binding interpretation).
1053 2011-08-29 Robert Dewar <dewar@adacore.com>
1055 * exp_ch9.adb, s-tasren.adb, exp_sel.adb, exp_sel.ads, exp_ch11.adb,
1056 s-interr-hwint.adb, s-tpobop.adb, sem_ch13.adb: Minor reformatting.
1058 2011-08-29 Thomas Quinot <quinot@adacore.com>
1060 * par-endh.adb (Check_End): For an END where it is mandatory to repeat
1061 the scope name, do not report a missing label as a style violation (it
1062 will be diagnosed as an illegality).
1063 * exp_dist.adb (Add_Params_For_Variant_Components): Fix handling of
1064 variant records: Get_Enum_Lit_From_Pos already returns a usage
1065 occurrence of the literal, no need to use New_Occurrence_Of. Set Etype
1066 on Expr in Integer_Literal case so that it can be used by
1069 2011-08-29 Tristan Gingold <gingold@adacore.com>
1071 * exp_sel.ads (Build_Abort_BLock_Handler): New function spec.
1073 * exp_sel.adb (Build_Abort_Block): Use Build_Abort_Block_Handler.
1074 (Build_Abort_Block_Handler): New function to build an Abort_Signal
1076 * exp_ch9.adb (Expand_N_Asynchronous_Select): Call
1077 Build_Abort_Block_Handler to build the exception handler. Do not
1078 undefer aborts for the Abort_Signal exception handler if back-end
1079 exception mechanism.
1080 * exp_ch11.adb (Expand_Exception_Handlers): Do not undefer aborts if
1081 back_end exceptions for all others and abort_signal.
1082 * s-except.ads (ZCX_By_Default): New constant.
1083 * a-except-2005.adb (Raise_Exception): Do not defer abort if ZCX.
1084 (Raise_Exception_Always): Ditto.
1085 (Raise_From_Signal_Handler): Ditto.
1086 (Raise_With_Location_And_Msg): Ditto.
1087 (Raise_With_Msg): Ditto.
1089 (Reraise_Occurence): Ditto.
1090 (Reraise_Occurrence_Always): Ditto.
1091 * s-tasren.adb (Exceptional_Complete_Rendezvous): Defer aborts if ZCX.
1092 * s-tpobop.adb: (Exceptional_Complete_Body): Undefer abort if ZCX.
1094 2011-08-29 Thomas Quinot <quinot@adacore.com>
1096 * sem_util.ads (Get_Enum_Lit_From_Pos): Clarify documentation.
1098 2011-08-29 Robert Dewar <dewar@adacore.com>
1100 * snames.adb-tmpl, sem_ch13.adb: Minor reformatting
1101 Minor code reorganization.
1103 2011-08-29 Bob Duff <duff@adacore.com>
1105 * usage.adb (-gnatwy): Fix documentation: this switch applies to Ada
1106 2012, not just Ada 2005.
1108 2011-08-29 Vincent Celier <celier@adacore.com>
1110 * gnat_ugn.texi: Indicate that when the compiler is called by gnatmake
1111 with a project file or with gprbuid, if -gnatep= is specified, the
1112 builder may need to be invoked with -x.
1114 2011-08-29 Tristan Gingold <gingold@adacore.com>
1116 * a-exexpr-gcc.adb: Minor comment fix.
1118 2011-08-29 Robert Dewar <dewar@adacore.com>
1120 * sem_ch8.adb: Minor reformatting.
1122 2011-08-29 Bob Duff <duff@adacore.com>
1124 * par-ch2.adb (P_Identifier): Warn that "some" is reserved in Ada 2012.
1125 * par-ch4.adb (P_Quantified_Expression): Remove unnecessary code for
1126 treating "some" as unreserved in earlier Ada versions. This is now
1127 handled in Snames.Is_Keyword_Name. Parse "for some" using Tok_Some,
1128 rather than Name_Some, since Tok_Some is now recognized as reserved.
1129 * scans.adb (Initialize_Ada_Keywords): Handle Tok_Some like any other
1131 * scans.ads: Minor comment fixes.
1132 * snames.adb-tmpl (Is_Keyword_Name): Handle Ada 2012 reserved words as
1133 for other language versions.
1134 * scn.adb (Scan_Reserved_Identifier): Remove unnecessary code for
1135 treating "some" as unreserved in earlier Ada versions. This is now
1136 handled in Snames.Is_Keyword_Name.
1137 * par-ch3.adb (P_Defining_Identifier): Warn that "some" is reserved in
1139 (P_Subtype_Mark_Resync): Remove unnecessary code for treating "some" as
1140 unreserved in earlier Ada versions. This is now handled in
1141 Snames.Is_Keyword_Name.
1142 * snames.ads-tmpl (Ada_2012_Reserved_Words): Handle Ada 2012 reserved
1143 words as for other language versions.
1144 * gnat_ugn.texi (-gnatwy): Fix documentation: this switch applies to
1145 Ada 2012, not just Ada 2005.
1147 2011-08-29 Ed Schonberg <schonberg@adacore.com>
1149 * sem_ch13.adb: Additional semantic checks for aspects involved in
1152 2011-08-29 Matthew Heaney <heaney@adacore.com>
1154 * a-comutr.ads, a-comutr.adb, a-cimutr.ads, a-cimutr.adb,
1155 a-cbmutr.ads, a-cbmutr.adb (Find_In_Subtree): Remove superfluous
1156 Container parameter.
1157 (Ancestor_Find): ditto.
1159 2011-08-29 Thomas Quinot <quinot@adacore.com>
1161 * par-endh.adb: Minor reformatting.
1163 2011-08-29 Tristan Gingold <gingold@adacore.com>
1165 * a-exexpr-gcc.adb (Unwind_Action) Rewrite as an integer with constants.
1166 (GNAT_GCC_Exception): Remove N_Cleanups_To_Trigger component.
1167 (Adjust_N_CLeanups_For): Remove.
1168 (CleanupUnwind_Handler): Call Unhandled_Exception_Terminate when end of
1170 (Propgate_Exception): Adjust.
1171 * raise-gcc.c: Add a few static/const.
1172 (Adjust_N_Cleanups_For): Remove declaration.
1173 (PERSONALITY_FUNCTION): Remove code dealing with N_Cleanups_To_Trigger.
1175 2011-08-29 Ed Schonberg <schonberg@adacore.com>
1177 * sem_ch8.adb: Use type of function return when rewriting as object
1180 2011-08-29 Gary Dismukes <dismukes@adacore.com>
1182 * sem_type.adb: Minor reformatting.
1184 2011-08-29 Robert Dewar <dewar@adacore.com>
1186 * makeutl.adb: Minor reformatting.
1188 2011-08-29 Ed Schonberg <schonberg@adacore.com>
1190 * sem_ch8.adb (Analyze_Object_Renaming): If the renamed object is a
1191 function call of a limited type, the expansion of the renaming is
1192 complicated by the presence of various temporaries and subtypes that
1193 capture constraints of the renamed object.
1194 Rewrite node as an object declaration, whose expansion is simpler.
1195 Given that the object is limited there is no copy involved and no
1198 2011-08-29 Robert Dewar <dewar@adacore.com>
1200 * exp_ch5.adb, sinfo.ads, make.adb, s-pooglo.adb, sem_ch12.adb,
1201 freeze.adb, sem_ch6.adb, par-ch12.adb: Minor reformatting.
1203 2011-08-29 Tristan Gingold <gingold@adacore.com>
1205 * system-darwin-x86.ads, system-linux-s390x.ads, system-linux-alpha.ads,
1206 system-tru64.ads, system-irix-n32.ads, system-vxworks-arm.ads,
1207 system-linux-hppa.ads, system-linux-s390.ads,
1208 system-solaris-sparcv9.ads, system-mingw.ads, system-linux-ia64.ads,
1209 system-vms_64.ads, system-vxworks-sparcv9.ads, system-linux-ppc.ads,
1210 system-aix64.ads, system-lynxos-ppc.ads, system-linux-sh4.ads,
1211 system-solaris-x86.ads, system-linux-x86_64.ads, system-linux-x86.ads,
1212 system-vxworks-ppc.ads, system-hpux.ads, system-darwin-ppc.ads,
1213 system-solaris-sparc.ads, system-lynxos-x86.ads,
1214 system-vxworks-m68k.ads, system-hpux-ia64.ads, system-irix-o32.ads,
1215 system-solaris-x86_64.ads, system-mingw-x86_64.ads,
1216 system-vxworks-mips.ads, system-linux-sparc.ads, system-vms-ia64.ads,
1217 system-freebsd-x86.ads, system-aix.ads, system-darwin-x86_64.ads,
1218 system-vxworks-x86.ads: Remove GCC_ZCX_Support
1219 * s-taprop-posix.adb, s-taprop-irix.adb, s-taprop-vxworks.adb,
1220 s-taprop-tru64.adb, s-taprop-linux.adb, s-taprop-solaris.adb: Ditto.
1221 * opt.ads: Adjust comment.
1222 * targparm.ads, targparm.adb: Remove GCC_ZCX_Support_On_Target.
1223 * gnat1drv.adb: Do not check for GCC_ZCX_Support_On_Target.
1224 * system.ads: Move GCC_ZCX_Support to obsolete entries.
1226 2011-08-29 Emmanuel Briot <briot@adacore.com>
1228 * makeutl.adb (Do_Complete): Resolve symbolic links when a relative
1229 file name is specified on the gnatmake or gprbuild command line, and
1230 before we search for that file in the project.
1232 2011-08-29 Ed Schonberg <schonberg@adacore.com>
1234 * sem_type.adb (Within_Instance): New predicate in Collect_Interps,
1235 used to determine whether a possible interpretation for an overloadable
1236 entity is declared within the current instantiation and should be
1237 included in the candidate set.
1239 2011-08-29 Vasiliy Fofanov <fofanov@adacore.com>
1241 * gnat_rm.texi, gnat_ugn.texi: Clean ups.
1243 2011-08-29 Ed Schonberg <schonberg@adacore.com>
1245 * sem_res.adb (Resolve_Actuals): Use base type to determine whether an
1246 access subtype is access_to_subprogram, when applying checks for
1249 2011-08-29 Matthew Heaney <heaney@adacore.com>
1251 * a-comutr.adb, a-cimutr.adb, a-cbmutr.adb (Splice_Subtree): Only check
1252 for sibling when common parent.
1254 2011-08-29 Thomas Quinot <quinot@adacore.com>
1256 * get_scos.adb: Literals of Pragma_Id are pragma names prefixed with
1259 2011-08-29 Ed Schonberg <schonberg@adacore.com>
1261 * sem_ch6.adb (Analyze_Subprogram_Body_Helper): Enable freeze actions
1262 for the return type when in ASIS mode.
1264 2011-08-29 Vincent Celier <celier@adacore.com>
1266 * make.adb (Gnatmake): Get the default search dirs, then the target
1267 parameters after getting the Builder switches, as the Builder switches
1268 may include --RTS= and that could change the default search dirs.
1270 2011-08-29 Hristian Kirtchev <kirtchev@adacore.com>
1272 * exp_ch7.adb (Make_Adjust_Call): Rewrite to mimic the structure of
1273 Make_Final_Call. Move the processing for class-wide types before the
1274 processing for derivations from [Limited_]Controlled.
1275 (Make_Final_Call): Move the processing for class-wide types before the
1276 processing for derivations from [Limited_]Controlled.
1277 * s-stposu.adb (Allocate_Any_Controlled): Correct the membership check.
1278 Add code to account for alignments larger than the list header. Add a
1279 comment illustrating the structure of the allocated object + padding +
1281 (Deallocate_Any_Controlled): Add code to account for alignments larger
1282 than the list header.
1284 2011-08-29 Ed Schonberg <schonberg@adacore.com>
1286 * sinfo.ads, sinfo.adb: New node kind
1287 N_Formal_Incomplete_Type_Definition, related flags.
1288 par-ch12.adb (P_Formal_Type_Declaration, G_Formal_Type_Definition):
1289 Parse formal incomplete types.
1290 * sem.adb (Analyze): Formal_Incomplete_Type_Definitions are handled in
1292 * sem_ch7.adb (Analyze_Package_Specification, Unit_Requires_Body):
1293 Formal incomplete types do not need completion.
1294 * sem_ch12.adb (Analyze_Formal_Incomplete_Type,
1295 Validate_Incomplete_Type_Instance): New procedures to handle formal
1297 * freeze.adb (Freeze_Entity): Do not freeze the subtype of an actual
1298 that corresponds to a formal incomplete type.
1299 * sprint.adb: Handle formal incomplete type declarations.
1300 * exp_util.adb (Insert_Actions): An incomplete_type_definition is not
1303 2011-08-29 Hristian Kirtchev <kirtchev@adacore.com>
1305 * a-fihema.ads, a-fihema.adb: Unit removed.
1306 * a-undesu.ads, a-undesu.adb: New unit implementing
1307 Ada.Unchecked_Deallocate_Subpool.
1308 * einfo.adb: Remove Associated_Collection from the node usage.
1309 Add Finalization_Master to the node usage.
1310 (Associated_Collection): Removed.
1311 (Finalization_Master): New routine.
1312 (Set_Associated_Collection): Removed.
1313 (Set_Finalization_Master): New routine.
1314 (Write_Field23_Name): Remove Associated_Collection from the output. Add
1315 Finalization_Master to the output.
1316 * einfo.ads: Remove attribute Associated_Collection and its uses in
1318 Add new attribute Finalization_Master along with its uses in entitites.
1319 (Associated_Collection): Removed along with its pragma import.
1320 (Finalization_Master): New routine along with a pragma import.
1321 (Set_Associated_Collection): Removed along with its pragma import.
1322 (Set_Finalization_Master): New routine along with a pragma import.
1323 * exp_ch3.adb (Expand_Freeze_Array_Type): Replace call to
1324 Build_Finalization_Collection with Build_Finalization_Master.
1325 (Expand_Freeze_Record_Type): Move the generation of Finalize_Address
1326 before the bodies of the predefined routines. Add comment explaining
1327 this. Replace call to Build_Finalization_Collection with
1328 Build_Finalization_Master.
1329 (Freeze_Type): Replace call to Build_Finalization_Collection with
1330 Build_Finalization_Master.
1331 (Make_Finalize_Address_Body): Comment reformatting.
1332 (Make_Predefined_Primitive_Specs): Code reformatting.
1333 (Stream_Operation_OK): Update comment mentioning finalization
1334 collections. Replace RE_Finalization_Collection with
1335 RE_Finalization_Master.
1336 * exp_ch4.adb (Complete_Controlled_Allocation): Replace call to
1337 Associated_Collection with Finalization_Master. Replace call to
1338 Build_Finalization_Collection with Build_Finalization_Master.
1339 (Expand_Allocator_Expression): Replace call to Associated_Collection
1340 with Finalization_Master. Replace call to Set_Associated_Collection with
1341 Set_Finalization_Master. Remove the generation of
1342 Set_Finalize_Address_Ptr.
1343 (Expand_N_Allocator): Replace call to Associated_Collection with
1344 Finalization_Master. Remove the generation of Set_Finalize_Address_Ptr.
1345 * exp_ch6.adb (Add_Collection_Actual_To_Build_In_Place_Call): Renamed to
1346 Add_Finalization_Master_Actual_To_Build_In_Place_Call. Update the
1347 comment on usage. Replace call to Needs_BIP_Collection with
1348 Needs_BIP_Finalization_Master Remplace BIP_Collection with
1349 BIP_Finalization_Master. Update all comments which mention finalization
1350 collections. Replace Associated_Collection with
1351 Finalization_Master. Replace Build_Finalization_Collection with
1352 Build_Finalization_Master.
1353 (BIP_Formal_Suffix): Update BIP_Collection's case.
1354 (Build_Heap_Allocator): Update the related comment. Rename local
1355 variable Collect to Fin_Mas_Id and update its occurrences. Update
1356 comments which mention finalization collections. Replace
1357 Set_Associated_Collection with Set_Finalization_Master.
1358 (Expand_Call): Update the code which detects a special piece of library
1360 (Make_Build_In_Place_Call_In_Allocator): Replace the call to
1361 Add_Collection_Actual_To_Build_In_Place_Call with
1362 Add_Finalization_Master_Actual_To_Build_In_Place_Call. Remove the code
1363 which generates a call to Make_Set_Finalize_Address_Ptr_Call.
1364 (Make_Build_In_Place_Call_In_Anonymous_Context): Replace call to
1365 Add_Collection_Actual_To_Build_In_Place_Call with
1366 Add_Finalization_Master_Actual_To_Build_In_Place_Call.
1367 (Make_Build_In_Place_Call_In_Assignment): Replace call to
1368 Add_Collection_Actual_To_Build_In_Place_Call with
1369 Add_Finalization_Master_Actual_To_Build_In_Place_Call.
1370 (Needs_BIP_Collection): Renamed to Needs_BIP_Finalization_Master.
1371 * exp_ch6.ads: Rename BIP_Collection to BIP_Finalization_Master.
1372 (Needs_BIP_Collection): Renamed to Needs_BIP_Finalization_Master.
1373 * exp_ch7.adb (Build_BIP_Cleanup_Stmts): Update comment on usage.
1374 Rename local variable Collect to Fin_Mas_Id and update its occurrences.
1375 Replace call to Set_Associated_Collection with Set_Finalization_Master.
1376 (Build_Finalization_Collection): Renamed to Build_Finalization_Master.
1377 Replace the call to Associated_Collection with Finalization_Master.
1378 Rename local variable Coll_Id to Fin_Mas_Id and update its occurrences.
1379 Update the way finalization master names are generated. Update the
1380 retrieval of the correct access type which will carry the pool and
1382 (Make_Final_Call): Reimplement the way [Deep_]Finalize is retrieved.
1383 (Make_Finalize_Address_Body): Abstract types do not need
1384 Finalize_Address. Code reformatting.
1385 (Make_Finalize_Address_Stmts): Update comment on usage.
1386 (Make_Set_Finalize_Address_Ptr_Call): Removed.
1387 (Process_Declarations): Update comments.
1388 * exp_ch7.ads (Build_Finalization_Collection): Renamed to
1389 Build_Finalization_Master. Update associated comment.
1390 (Make_Set_Finalize_Address_Ptr_Call): Removed.
1391 * exp_ch13.adb: Update comments which mention finalization collections.
1392 (Expand_N_Free_Statement): Replace the call to Associated_Collection
1393 with Finalization_Master.
1394 * exp_util.adb (Build_Allocate_Deallocate_Proc): Reimplemented to
1395 create calls to routines Allocate_Any_Controlled and
1396 Deallocate_Any_Controlled.
1397 (Find_Finalize_Address): New routine.
1398 (Is_Allocate_Deallocate_Proc): Update the RTE entities used in the
1400 (Requires_Cleanup_Actions): Update the comment on freeze node
1402 * exp_util.ads: Remove comment on generated code for
1403 Build_Allocate_Deallocate_Proc. The code is now quite complex and it
1404 is better to simply look in the body.
1405 * freeze.adb (Freeze_All): Update the comment of finalization
1406 collections. Replace the call to Associated_Collection with
1407 Finalization_Master. Replace the call to Build_Finalization_Collection
1408 with Build_Finalization_Master.
1409 * impunit.adb: Add a-undesu and s-stposu to the list of units.
1410 * Makefile.rtl: Add files a-undesu, s-finmas and s-stposu. Remove file
1412 * rtsfind.adb (Get_Unit_Name): Remove the processing for children of
1413 Ada.Finalization. Add processing for children of System.Storage_Pools.
1414 * rtsfind.ads: Remove the naming of second level children of
1416 Remove Ada_Finalization_Heap_Management from the list of units.
1417 Remove subtype Ada_Finalization_Child.
1418 Remove the following subprogram entities:
1422 RE_Finalization_Collection
1423 RE_Finalization_Collection_Ptr
1424 RE_Set_Finalize_Address_Ptr
1426 Add the naming of second level children of System.Storage_Pools.
1427 Add System_Finalization_Masters and System_Storage_Pools_Subpools to
1429 Add subtype System_Storage_Pools_Child.
1430 Add the following subprogram entities to System.Finalization_Masters:
1432 RE_Finalization_Master
1433 RE_Finalization_Master_Ptr
1435 Add the following subprogram entities to System.Storage_Pools.Subpools:
1437 RE_Allocate_Any_Controlled
1438 RE_Deallocate_Any_Controlled
1439 RE_Root_Storage_Pool_With_Subpools
1443 Move the following subprogram entities from
1444 Ada.Finalization.Heap_Management to System.Finalization_Masters:
1446 RE_Add_Offset_To_Address
1451 * sem_ch3.adb (Access_Type_Declaration): Replace the call to
1452 Set_Associated_Collection with Set_Finalization_Master.
1453 * sem_ch6.adb (Create_Extra_Formals): Update the way extra formal
1454 BIP_Finalization_Master is created.
1455 * s-finmas.adb: New unit System.Finalization_Masters.
1456 * s-finmas.ads: New unit System.Finalization_Masters.
1457 * s-stopoo.ads, s-stopoo.adb: Minor code reformatting.
1458 * s-stposu.ads, s-stposu.adb: New unit implementing
1459 System.Storage_Pools.Subpools.
1461 2011-08-29 Bob Duff <duff@adacore.com>
1463 * tbuild.adb: Add assertion.
1465 2011-08-29 Thomas Quinot <quinot@adacore.com>
1467 * s-pooglo.adb: Minor reformatting.
1469 2011-08-29 Ed Schonberg <schonberg@adacore.com>
1471 * exp_ch5.adb (Expand_N_Assignment_Statement): if the left-hand side is
1472 an indexed component of a packed array whose element type is a record
1473 with a representation clause different from that of the right-hand
1474 side, generate a temporary to minimuze the number of bit-field
1475 operations generated.
1477 2011-08-29 Ed Schonberg <schonberg@adacore.com>
1479 * exp_util.adb (Insert_Actions): Use clauses can be part of lists of
1480 declarations, and thus are likely insertion points for actions.
1482 2011-08-29 Bob Duff <duff@adacore.com>
1484 * einfo.ads: Minor comment fix.
1486 2011-08-29 Robert Dewar <dewar@adacore.com>
1488 * frontend.adb, gnat1drv.adb: Minor reformatting.
1490 2011-08-29 Tristan Gingold <gingold@adacore.com>
1492 * s-pooglo.adb (Allocate, Deallocate): Take into account the alignment.
1493 * a-fihema.adb (Allocate, Deallocate): Ditto. Possibly add padding
1494 space in front of the header.
1496 2011-08-29 Johannes Kanig <kanig@adacore.com>
1498 * frontend.adb (Frontend): Exit after creating Standard package when
1499 -gnatd.H is present.
1500 * gnat1drv.adb (Gnat1drv): Call Backend right away when -gnatd.H is
1503 2011-08-29 Robert Dewar <dewar@adacore.com>
1505 * exp_ch9.adb, mlib-prj.adb, prj.adb, prj.ads, ttypes.ads, sem_ch4.adb,
1506 makeutl.adb, makeutl.ads, atree.ads, snames.adb-tmpl,
1507 snames.ads-tmpl: Minor reformatting.
1509 2011-08-29 Philippe Gil <gil@adacore.com>
1511 * prj.adb (Reset_Units_In_Table): New procedure.
1512 Reset units to avoid access to freed memory.
1514 2011-08-29 Thomas Quinot <quinot@adacore.com>
1516 * get_scos.adb: When reading a P statement SCO without a pragma name
1517 (from an older ALI file), ensure that the Pragma_Name component is set
1518 to Unknown_Pragma (not left uninitialized).
1520 2011-08-29 Vincent Celier <celier@adacore.com>
1522 * makeutl.adb (Get_Directories): New procedure moved from Buildgpr and
1523 modified to compute correctly the object path of a SAL project that is
1524 extending another library project.
1525 (Write_Path_File): New procedure.
1526 * makeutl.ads (Directories): New table moved from Buildgpr
1527 (Get_Directories): New procedure moved from Buildgpr
1528 (Write_Path_File): New procedure
1529 * mlib-prj.adb (Build_Library): Use Makeutl.Get_Directories to set the
1530 paths before binding SALs, instead of Set_Ada_Paths.
1531 * prj-env.adb (Set_Path_File_Var): Procedure has been moved to package
1533 * prj.adb (Set_Path_File_Var): New procedure moved from Prj.Env
1534 (Current_Source_Path_File_Of): New function
1535 (Set_Current_Object_Path_File_Of): New procedure
1536 (Current_Source_Object_File_Of): New function
1537 (Set_Current_Object_Path_File_Of): New procedure
1538 * prj.ads (Set_Path_File_Var): New procedure moved from Prj.Env
1539 (Current_Source_Path_File_Of): New function
1540 (Set_Current_Object_Path_File_Of): New procedure
1541 (Current_Source_Object_File_Of): New function
1542 (Set_Current_Object_Path_File_Of): New procedure
1544 2011-08-29 Ed Schonberg <schonberg@adacore.com>
1546 * exp_ch5.adb (Expand_N_Assignment_Statement): For an assignment to a
1547 packed entity, use a bit-field assignment only if there is no change of
1550 2011-08-29 Thomas Quinot <quinot@adacore.com>
1552 * rtsfind.ads, exp_ch3.adb (In_Runtime): Minor code improvement, use
1553 Is_RTU instead of using Chars comparisons.
1555 2011-08-29 Thomas Quinot <quinot@adacore.com>
1557 * exp_strm.adb (Build_Mutable_Record_Read_Procedure): Do not create a
1558 temporary object if the actual is constrained, and the discriminants
1559 read from the stream don't match.
1561 2011-08-29 Tristan Gingold <gingold@adacore.com>
1563 * sem_attr.adb, exp_attr.adb: Add handling of
1564 Attribute_System_Allocator_Alignment
1565 * snames.ads-tmpl: Add Name_System_Allocator_Alignment and
1566 Attribute_System_Allocator_Alignment.
1567 * ttypes.ads, get_targ.ads: Add Get_System_Allocator_Alignment.
1568 * gcc-interface/targtyps.c, gcc-interface/utils2.c,
1569 gcc-interface/gigi.h: Renames get_target_default_allocator_alignment to
1570 get_target_system_allocator_alignment.
1572 2011-08-29 Arnaud Charlet <charlet@adacore.com>
1574 * gcc-interface/Makefile.in, gcc-interface/Make-lang.in: Update
1577 2011-08-29 Arnaud Charlet <charlet@adacore.com>
1579 * exp_ch3.adb (In_Runtime): Fix typo.
1581 2011-08-29 Bob Duff <duff@adacore.com>
1583 * sem_ch4.adb (Analyze_Allocator): Analyze the subpool specification.
1585 2011-08-29 Ed Schonberg <schonberg@adacore.com>
1587 * exp_ch3.adb (Expand_N_Object_Declaration): If the entity is tagged
1588 and a separate tag assignment is generated, ensure that the tag
1589 assignment is analyzed.
1591 2011-08-29 Ed Schonberg <schonberg@adacore.com>
1593 * atree.ads, atree.adb (Copy_Separate_List): New function that applies
1594 Copy_Separate_Tree to a list of nodes. Used to create disjoint copies
1595 of statement lists that may contain local declarations.
1596 * exp_ch9.adb (Expand_N_Timed_Entry_Call): Use Copy_Separate_List to
1597 duplicate the triggering statements needed for the expansion of this
1598 construct, when the trigger is a dispatching call to a synchronized
1601 2011-08-29 Arnaud Charlet <charlet@adacore.com>
1603 * gnat_rm.texi: Add doc for 'Elab_Subp_Body.
1604 * bindgen.adb: Add comments.
1605 * snames.adb-tmpl (Is_Attribute_Name): Only recognize 'Elab_Subp_Body
1608 2011-08-29 Robert Dewar <dewar@adacore.com>
1610 * exp_attr.adb: Minor reformatting.
1611 Minor code reorganization and commenting.
1612 * par_sco.adb, checks.adb, sem_attr.adb, get_scos.adb: Minor
1615 2011-08-29 Thomas Quinot <quinot@adacore.com>
1617 * get_scos.adb: Ignore chaining indicators not currently supported
1620 2011-08-29 Arnaud Charlet <charlet@adacore.com>
1622 * system.ads: Minor editing.
1624 2011-08-29 Arnaud Charlet <charlet@adacore.com>
1626 * bindgen.adb (Gen_Elab_Calls): Generate calls to subp'Elab_Subp_Body in
1628 * sem_attr.ads, sem_attr.adb, exp_Attr.adb, sem_ch6.adb: Add handling of
1629 Attribute_Elab_Subp_Body.
1630 * snames.ads-tmpl (Attribute_Elab_Subp_Body, Name_Elab_Subp_Body): New.
1631 * sem_util.adb: Update comments.
1633 2011-08-29 Thomas Quinot <quinot@adacore.com>
1635 * par_sco.adb, scos.adb, scos.ads, put_scos.adb, get_scos.adb: Record
1636 pragma name for each SCO statement corresponding to a pragma.
1638 2011-08-29 Arnaud Charlet <charlet@adacore.com>
1640 * opt.ads: Minor editing.
1642 2011-08-29 Yannick Moy <moy@adacore.com>
1644 * gnat1drv.adb (Adjust_Global_Switches): Remove options for ALFA mode
1645 that only made sense for CodePeer mode.
1647 2011-08-29 Jose Ruiz <ruiz@adacore.com>
1649 * targparm.ads (Support_64_Bit_Divides_On_Target): Remove this flag
1650 which is no longer used.
1651 * targparm.adb (S64, S64_Str, Get_Target_Parameters): Remove the
1652 handling of the 64-bit division check.
1653 * exp_ch4.adb (Expand_N_Op_Divide): Remove the check for 64-bit
1655 * system*.ads (Support_64_Bit_Divides): Remove this flag which is no
1658 2011-08-29 Thomas Quinot <quinot@adacore.com>
1660 * get_scos.adb: Minor reformatting.
1662 2011-08-29 Hristian Kirtchev <kirtchev@adacore.com>
1664 * exp_util.adb (Process_Statements_For_Controlled_Objects): Whenever a
1665 statement list is wrapped in a block, the block is explicitly analyzed
1666 in order to properly redecorate the entities and create a servicing
1669 2011-08-29 Tristan Gingold <gingold@adacore.com>
1671 * sinfo.ads, sinfo.adb (Zero_Cost_Handling): Remove.
1672 (Set_Zero_Cost_Handling): Remove.
1674 2011-08-29 Thomas Quinot <quinot@adacore.com>
1676 * par_sco.adb, scos.ads, put_scos.adb, get_scos.adb: Minor reformatting
1678 2011-08-29 Geert Bosch <bosch@adacore.com>
1680 * s-vaflop-vms-alpha.adb (Neg_F): Use subtraction instead of negation
1681 instruction, as the latter may produce -0.0, which is not a valid VAX
1683 (Neg_G): Likewise for VAX F float.
1685 2011-08-29 Robert Dewar <dewar@adacore.com>
1687 * exp_util.adb: Minor reformatting.
1689 2011-08-29 Yannick Moy <moy@adacore.com>
1691 * sem_ch3.adb: Minor comment update.
1693 2011-08-29 Thomas Quinot <quinot@adacore.com>
1695 * checks.adb (Apply_Type_Conversion_Checks): Use the Underlying_Type of
1698 2011-08-29 Thomas Quinot <quinot@adacore.com>
1700 * par_sco.adb (Traverse_Declarations_Or_Statements): Do not flush
1701 current statement sequence on a generic instantiation or a subprogram
1704 2011-08-29 Robert Dewar <dewar@adacore.com>
1706 * sem_type.adb, einfo.ads, freeze.adb, exp_ch4.adb, sem_ch13.adb:
1709 2011-08-29 Hristian Kirtchev <kirtchev@adacore.com>
1711 * exp_util.adb (Requires_Cleanup_Actions (List_Id, Boolean, Boolean)):
1712 Correct the check which involves the freeze node of a controlled or
1713 access-to-controlled type.
1715 2011-08-29 Geert Bosch <bosch@adacore.com>
1717 * sem_warn.adb (Check_Code_Statement): Remove check for consecutive Asm
1719 * s-vaflop-vms-alpha.adb: Remove bogus Volatile => True arguments from
1722 2011-08-29 Yannick Moy <moy@adacore.com>
1724 * sem_ch3.adb (Array_Type_Declaration): Insert a subtype declaration
1725 for every index type and component type that is not a subtype_mark.
1726 (Process_Subtype): Set Etype of subtype.
1728 2011-08-29 Robert Dewar <dewar@adacore.com>
1730 * a-cbmutr.adb, a-cimutr.adb, a-comutr.adb, prj-nmsc.adb: Minor code
1731 reorganization. Minor reformatting.
1733 2011-08-29 Steve Baird <baird@adacore.com>
1735 * exp_ch4.adb (Expand_N_Op_Expon): Suppress N_Op_Expon node expansion
1736 for CodePeer and ALFA modes.
1738 2011-08-29 Ed Schonberg <schonberg@adacore.com>
1740 * sem_type.adb (Collect_Interps): Within an instance, collect a homonym
1741 that comes from an enclosing scope if it is not the renaming of an
1742 actual, to handle properly a spurious ambiguity in an instance.
1744 2011-08-29 Eric Botcazou <ebotcazou@adacore.com>
1746 * sem_ch13.adb (Alignment_Check_For_Esize_Change): Rename to...
1747 (Alignment_Check_For_Size_Change): ...this. Add SIZE parameter and
1748 use it instead of the Esize of the first parameter.
1749 (Analyze_Attribute_Definition_Clause) <Object_Size>: Adjust call to
1751 <Size>: Likewise. Call it for composite types on the RM size.
1753 2011-08-29 Yannick Moy <moy@adacore.com>
1755 * exp_ch4.adb (Expand_N_Op_Not): Do not expand not on array.
1756 * sem_util.adb (Unique_Name): Correct behaviour for names of
1759 2011-08-29 Yannick Moy <moy@adacore.com>
1761 * sem_prag.adb (Check_Precondition_Postcondition): In formal
1762 verification mode, analyze pragma expression for correctness, for
1763 pre/post on library-level subprogram, as it is not expanded later.
1765 2011-08-29 Yannick Moy <moy@adacore.com>
1767 * exp_aggr.adb (Expand_Array_Aggregate): Do not expand array aggregates
1768 in formal verification.
1770 2011-08-29 Thomas Quinot <quinot@adacore.com>
1772 * sem_util.adb: Minor reformatting.
1773 * freeze.adb, sem_ch13.adb: Fix comment: Bit_Order is an attribute,
1775 * par_sco.ads, par_sco.adb: Update comments.
1777 2011-08-29 Yannick Moy <moy@adacore.com>
1779 * einfo.adb, einfo.ads: Remove flag Is_Postcondition_Proc and
1780 associated getter/setter.
1781 * sem_ch6.adb: Remove reference to Is_Postcondition_Proc.
1783 2011-08-29 Vincent Celier <celier@adacore.com>
1785 * prj-attr.adb: New Compiler attribute Dependency_Kind and Language_Kind
1786 * prj-conf.adb: Add_Default_GNAT_Naming_Scheme: Add a package Compiler
1787 with declarations for Language_Kind and Dependency_Kind for Ada.
1788 * prj-nmsc.adb (Check_Unit_Name): New name of procedure Check_Ada_Name
1789 (Process_Compiler): Take into account the new attributes Dependency_Kind
1791 (Check_Configuration): Check if language kind is unit based, not if the
1792 language name is Ada.
1793 (Process_Exceptions_Unit_Based): Ditto
1794 (Add_Language): Remove default additions of language and dependency kind
1795 * prj.ads: Minor comment change
1796 * snames.ads-tmpl: New standard names Dependency_Kind and Language_Kind
1798 2011-08-29 Johannes Kanig <kanig@adacore.com>
1800 * debug.adb: Update comments.
1802 2011-08-24 Joseph Myers <joseph@codesourcery.com>
1804 * gcc-interface/Make-lang.in (CFLAGS-ada/tracebak.o)
1805 (CFLAGS-ada/targext.o, CFLAGS-ada/cio.o, CFLAGS-ada/init.o)
1806 (CFLAGS-ada/initialize.o, CFLAGS-ada/raise.o): New.
1807 (ada/tracebak.o, ada/targext.o, ada/cio.o, ada/init.o)
1808 (ada/initialize.o, ada/raise.o): Remove explicit compilation rules.
1810 2011-08-22 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
1812 * gcc-interface/Makefile.in (PICFLAG_FOR_TARGET): New.
1813 (GNATLIBCFLAGS_FOR_C): Replace
1814 TARGET_LIBGCC2_CFLAGS by PICFLAG_FOR_TARGET.
1815 (gnatlib-shared-default, gnatlib-shared-dual-win32)
1816 (gnatlib-shared-win32, gnatlib-shared-darwin, gnatlib-shared)
1817 (gnatlib-sjlj, gnatlib-zcx): Likewise.
1819 2011-08-07 Eric Botcazou <ebotcazou@adacore.com>
1821 * gcc-interface/Makefile.in (raise-gcc.o): Fix previous change.
1823 * gcc-interface/gigi.h (enumerate_modes): Fix formatting.
1825 * gcc-interface/trans.c (Subprogram_Body_to_gnu): Revert latest change.
1827 2011-08-05 Nicolas Roche <roche@adacore.com>
1829 * gcc-interface/Makefile.in: Don't use directly ../xgcc to build shared
1830 libgnat. Use rather the value of GCC_FOR_TARGET. Fix issue with
1832 * gcc-interface/Make-lang.in: Add support for canadian cross setting.
1834 2011-08-05 Matthew Heaney <heaney@adacore.com>
1836 * a-comutr.adb, a-cimutr.adb, a-cbmutr.adb (Child_Count, Child_Depth):
1837 subprogram bodies declared out-of-order.
1839 2011-08-05 Yannick Moy <moy@adacore.com>
1841 * sem_util.adb (Unique_Name): only prefix with "standard" the names of
1842 entities directly in package Standard, otherwise skip the standard
1845 2011-08-05 Robert Dewar <dewar@adacore.com>
1847 * a-cbmutr.adb: Minor reformatting
1848 (Allocate_Node): refactor node allocation algorithm
1850 2011-08-05 Robert Dewar <dewar@adacore.com>
1852 * opt.ads, opt.adb (Debug_Pragmas_Disabled): New switch.
1853 * sem_prag.adb (Analyze_Pragma, case Debug_Policy): Implement Disable
1855 (Analyze_Pragma, case Check_Policy): Ditto.
1856 * sem_prag.ads (Check_Disabled): New function
1857 * snames.ads-tmpl: Add Name_Disable.
1859 2011-08-05 Robert Dewar <dewar@adacore.com>
1861 * gnat_rm.texi: Document implementation-defined policy DISABLE for
1862 pragmas Assertion_Policy, Check_Policy, Debug_Policy.
1864 2011-08-05 Ed Schonberg <schonberg@adacore.com>
1866 * sem_prag.adb (Analyze_Pragma, case Inline): reject an Inline pragma
1867 that appears in a generic formal part and applies to a formal
1870 2011-08-05 Robert Dewar <dewar@adacore.com>
1872 * a-cbmutr.ads: Minor reformatting.
1874 2011-08-05 Matthew Heaney <heaney@adacore.com>
1876 * a-comutr.adb, a-cimutr.adb, a-cbmutr.adb (Read): do not use T'Valid
1877 to check count, check sign of value instead.
1878 * a-comutr.adb, a-cimutr.adb (Write): return immediately if tree empty
1879 (Copy_Subtree): allocate copy of source element
1880 (Equal_Subtree): compare elements, not access objects
1882 2011-08-05 Vincent Celier <celier@adacore.com>
1884 * gnat_ugn.texi: Fix VMS alternative.
1886 2011-08-05 Thomas Quinot <quinot@adacore.com>
1888 * sem_ch11.adb: Add comment.
1890 2011-08-05 Robert Dewar <dewar@adacore.com>
1892 * exp_util.adb: Minor comment fix.
1894 2011-08-05 Robert Dewar <dewar@adacore.com>
1896 * scng.adb (Error_Unterminated_String): Improve flag position when
1899 2011-08-05 Matthew Heaney <heaney@adacore.com>
1901 * Makefile.rtl, impunit.adb: Added a-cbmutr.ad[sb] (bounded multiway
1903 * a-cbmutr.ads, a-cbmutr.adb: This is the new Ada 2012 unit for bounded
1904 multiway tree containers.
1906 2011-08-05 Robert Dewar <dewar@adacore.com>
1908 * styleg.adb (Check_Comment): Implement comment spacing of 1 or 2
1909 * stylesw.adb: Implement -gnatyC to control comment spacing
1910 * stylesw.ads (Style_Check_Comments_Spacing): New switch (set by
1912 * usage.adb: Add line for -gnatyC.
1914 2011-08-05 Robert Dewar <dewar@adacore.com>
1916 * gnat_ugn.texi: Document -gnatyC.
1917 * vms_data.ads: Implement COMMENTS1/COMMENTS2 (retaining COMMENTS as a
1918 synonym for COMMENTS2).
1920 2011-08-05 Robert Dewar <dewar@adacore.com>
1922 * par_sco.adb, sem_ch3.adb, scos.ads, a-iteint.ads, sem_ch12.adb,
1923 a-cimutr.adb, a-cimutr.ads, sem_util.ads, sem_res.adb, a-fihema.adb,
1924 sem_ch4.adb, lib-xref-alfa.adb, exp_disp.adb, a-comutr.adb,
1925 a-comutr.ads, lib-xref.adb: Minor reformatting.
1927 2011-08-05 Robert Dewar <dewar@adacore.com>
1929 * sem_ch11.adb (Analyze_Raise_Statement): Kill assignment to formal
1930 warning if there is an exception handler present.
1932 2011-08-05 Pascal Obry <obry@adacore.com>
1934 * a-iteint.ads: Fix copyright year.
1936 2011-08-05 Thomas Quinot <quinot@adacore.com>
1938 * par_sco.adb (Traverse_Declarations_Or_Statements): Do not generate a
1939 statement SCO for a USE clause or a representation clause.
1941 2011-08-05 Yannick Moy <moy@adacore.com>
1943 * lib-xref-alfa.adb (Collect_ALFA): generate the proper relation
1944 between body and spec for stub.
1945 (Detect_And_Add_ALFA_Scope): take into account subprogram stub
1946 * lib-xref.adb (Enclosing_Subprogram_Or_Package): in the case of a
1947 pragma precondition or postcondition, for which the enclosing
1948 subprogram or package in the AST is not the desired one, return empty.
1950 2011-08-05 Thomas Quinot <quinot@adacore.com>
1952 * g-expect.adb: Minor reformatting.
1954 2011-08-05 Bob Duff <duff@adacore.com>
1956 * a-fihema.adb: Comment out OS_Lib.
1958 2011-08-05 Matthew Heaney <heaney@adacore.com>
1960 * Makefile.rtl, impunit.adb: Added a-c[oi]mutr.ad[sb]
1961 (unbounded multiway tree containers) and a-iteint.ads.
1962 * a-comutr.ads, a-comutr.adb:
1963 This is the new Ada 2012 unit for unbounded multiway tree containers
1964 * a-cimutr.ads, a-cimutr.adb
1965 This is the new Ada 2012 unit for indefinite multiway tree containers
1966 * a-iteint.ads: New file.
1968 2011-08-05 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
1970 * gcc-interface/Makefile.in (raise-gcc.o): Search $(srcdir)/../libgcc.
1972 2011-08-05 Bob Duff <duff@adacore.com>
1974 * sinfo.ads, sinfo.adb (Subpool_Handle_Name): New attribute for
1976 * par-ch4.adb (P_Allocator): Parse new subpool specification syntax.
1978 2011-08-05 Ed Schonberg <schonberg@adacore.com>
1980 * sem_ch4.adb (Try_Container_Indexing): New procedure to implement the
1981 general indexing aspects of Ada2012. Called when analyzing indexed
1982 components when other interpretations fail.
1983 * sem_ch8.adb (Find_Direct_Name): check for implicit dereference only
1984 in an expression context where overloading is meaningful. This excludes
1985 the occurrence in an aspect specification (efficiency only).
1986 * sem_attr.adb (Analyze_Attribute): indicate that the attributes
1987 related to iterators can be set by an attribute specification, but
1989 * sem_ch13.adb (Analyze_Aspect_Specifications): handle
1990 Constant_Indexing and Variable_Indexing.
1991 (Check_Indexing_Functions): New procedure to perform legality checks.
1992 Additional semantic checks at end of declarations.
1994 2011-08-05 Sergey Rybin <rybin@adacore.com>
1996 * tree_io.ads: Update ASIS_Version_Number because of the change of the
1997 order of calling Tree_Write/Tree_Read routines made for aspects.
1999 2011-08-05 Bob Duff <duff@adacore.com>
2001 * a-fihema.adb (Finalize): Fix race condition.
2003 2011-08-05 Yannick Moy <moy@adacore.com>
2005 * sem_ch12.adb (Analyze_Package_Instantiation,
2006 Need_Subprogram_Instance_Body): do not generate instance bodies in ALFA
2009 2011-08-05 Ed Schonberg <schonberg@adacore.com>
2011 * sem_type.adb (Specific_Type): in an instance, the type-specific
2012 operand of an equality check that involves null may have a private
2013 type. Use full view to determine legality of construct.
2015 2011-08-05 Vincent Celier <celier@adacore.com>
2017 * gnatcmd.adb (Get_Closure): Do not crash when it is not possible to
2018 delete or close the file when the call to gnatmake was successful.
2020 2011-08-05 Yannick Moy <moy@adacore.com>
2022 * gnat1drv.adb (Adjust_Global_Switches): in ALFA mode, set
2023 Global_Discard_Names.
2025 2011-08-05 Ed Schonberg <schonberg@adacore.com>
2027 * sinfo.ads: comments on use of entity field for aspect specifications.
2029 2011-08-05 Ed Schonberg <schonberg@adacore.com>
2031 * sem_ch12.adb (Reset_Entity): If the entity field of the associated
2032 node is not itself an entity but a selected component, it is a
2033 rewritten parameterless call to an en enclosing synchronized operation,
2034 and this expansion will be performed again in the instance, so there is
2035 no global information to preserve.
2037 2011-08-05 Javier Miranda <miranda@adacore.com>
2039 * exp_disp.adb (Set_All_DT_Position): Cleanup code and improve support
2040 for renamings of predefined primitives.
2041 (In_Predef_Prims_DT): New subprogram.
2043 2011-08-05 Ed Schonberg <schonberg@adacore.com>
2045 * sem_util.adb, sem_util.ads (Check_Implicit_Dereference): If a
2046 possible interpretation of name is a reference type, add an
2047 interpretation that is the designated type of the reference
2048 discriminant of that type.
2049 * sem_res.adb (resolve): If the interpretation imposed by context is an
2050 implicit dereference, rewrite the node as the deference of the
2051 reference discriminant.
2052 * sem_ch3.adb (Analyze_Subtype_Declaration, Build_Derived_Record_Type,
2053 Build_Discriminated_Subtype): Inherit Has_Implicit_Dereference from
2054 parent type or base type.
2055 * sem_ch4.adb (Process_Indexed_Component,
2056 Process_Overloaded_Indexed_Component, Indicate_Name_And_Type,
2057 Analyze_Overloaded_Selected_Component, Analyze_Selected_Component):
2058 Check for implicit dereference.
2059 (List_Operand_Interps): Indicate when an implicit dereference is
2061 * sem_ch8.adb (Find_Direct_Name): Check for implicit dereference.
2063 2011-08-05 Thomas Quinot <quinot@adacore.com>
2065 * scos.ads: Update documentation of SCO table. Pragma statements can now
2066 be marked as disabled (using 'p' instead of 'P' as the statement kind).
2067 * par_sco.ads, par_sco.adb: Implement the above change.
2068 (Process_Decisions_Defer): Generate a P decision for the first parameter
2069 of a dyadic pragma Debug.
2070 * sem_prag.adb (Analyze_Pragma, case Debug): Mark pragma as enabled if
2072 * put_scos.adb: Code simplification based on above change.
2074 2011-08-05 Robert Dewar <dewar@adacore.com>
2076 * sem_ch3.adb, gnatcmd.adb, switch-c.adb, exp_attr.adb, make.adb,
2077 bindgen.adb, einfo.adb, sem_ch12.adb, sem_attr.adb, a-fihema.adb,
2078 a-fihema.ads, sem_elab.adb, sem_elab.ads, aspects.adb, opt.ads,
2079 prj-conf.adb, sem_ch13.adb, s-ficobl.ads: Minor reformatting
2081 2011-08-05 Bob Duff <duff@adacore.com>
2083 * a-stunau.ads, g-spipat.adb: Update comments.
2085 2011-08-05 Bob Duff <duff@adacore.com>
2087 * a-fihema.ads: Minor comment fix.
2088 * a-fihema.adb (Allocate, Deallocate): Assert that the alignment is
2090 (Attach, Detach): Remove some unnecessary code.
2091 (Finalize): Remove Node_Ptr_To_Address, replace with a constant.
2093 2011-08-05 Bob Duff <duff@adacore.com>
2095 * a-fihema.ads, a-fihema.adb (Finalization_Collection): Avoid heap
2096 allocation for Objects component. This simplifies the code somewhat. It
2097 is also a little more efficient in the not-so-unusual case where there
2098 are no controlled objects allocated.
2099 Make Finalization_Started flag atomic.
2100 (Finalize): Avoid unnecessary detachment of items from the list.
2101 (pcol): Minor cleanup.
2103 2011-08-05 Ed Schonberg <schonberg@adacore.com>
2105 * sem_ch12.adb (Analyze_Formal_Package_Declaration): reject a formal
2106 package whose name is the same as that of the generic unit, or its
2109 2011-08-05 Bob Duff <duff@adacore.com>
2111 * a-fihema.adb, a-fihema.ads: Minor comment improvements.
2112 * sem_ch3.adb, exp_ch5.adb, exp_ch7.adb, exp_ch7.ads, exp_util.adb:
2113 Minor comment fixes.
2115 2011-08-05 Arnaud Charlet <charlet@adacore.com>
2117 * make.adb (Linking_Phase): No longer need to set source search path
2118 before calling gnatlink in CodePeer mode.
2119 * gnatlink.adb (Gnatlink): No longer pass -gnat83/95/05/12 switch to
2120 gcc in CodePeer mode, since the binder generated file no longer has a
2122 * switch.ads, switch.adb (Is_Language_Switch): Removed.
2123 * switch-c.adb: Update comment.
2125 2011-08-05 Thomas Quinot <quinot@adacore.com>
2127 * exp_strm.adb, bindgen.adb, s-ficobl.ads: Minor reformatting.
2129 2011-08-05 Nicolas Roche <roche@adacore.com>
2131 * gnat_ugn.texi: Fix minor syntax error issue.
2133 2011-08-05 Vincent Celier <celier@adacore.com>
2135 * gnatcmd.adb (Get_Closure): Do not crash when it is not possible to
2136 delete or close the file when the call to gnatmake returns a non
2137 successful return code.
2139 2011-08-05 Ed Schonberg <schonberg@adacore.com>
2141 * exp_ch4.adb (Expand_N_Type_Conversion): When expanding a predicate
2142 check, indicate that the copy of the original node does not come from
2143 source, to prevent an infinite recursion of the expansion.
2145 2011-08-05 Johannes Kanig <kanig@adacore.com>
2147 * debug.adb: document switch -gnatd.G for gnat2why, which deactivates
2148 VC generation for subprogram bodies.
2150 2011-08-05 Yannick Moy <moy@adacore.com>
2153 * sem_ch3.adb (Signed_Integer_Type_Declaration): in ALFA mode, define
2154 the base type with the smallest allowed base type.
2156 2011-08-05 Sergey Rybin <rybin@adacore.com>
2158 * tree_gen.adb, tree_in.adb, aspects.adb: Fix tree read-write for
2161 2011-08-05 Ed Schonberg <schonberg@adacore.com>
2163 * sem_ch12.ads: minor comment updates.
2165 2011-08-05 Ed Schonberg <schonberg@adacore.com>
2167 * sem_ch12.adb (Analyze_Formal_Package_Declaration): in an
2168 instantiation and a formal package the compiler generates a package
2169 renaming declaration so that the generic name within the declaration
2170 is interpreted as a renaming of the instance. At the end of a formal
2171 package declaration, this renaming must become invisible.
2173 2011-08-05 Hristian Kirtchev <kirtchev@adacore.com>
2175 * exp_ch7.adb (Is_Init_Call): Reimplemented to avoid character
2176 comparison and rely on concrete entities instead.
2178 2011-08-05 Ed Schonberg <schonberg@adacore.com>
2180 * einfo.ads, einfo.adb (Has_Implicit_Dereference): new flag on types
2181 and discriminants, to indicate that the type has an access discriminant
2182 that supports implicit dereference.
2183 * snames.ads-tmpl: Add names of aspects and attributes related to
2184 Ada2012 iterators: constant_indexing, default_iterator,
2185 iterator_element, implicit_dereference, variable_indexing.
2186 * aspects.ads, aspects.adb: entries for iterator-related aspects.
2187 * sem_ch13.adb (Analyze_aspect_specifications): dummy entries for
2188 iterator-related aspects.
2189 * sem_attr.adb, exp_attr.adb Dummy entries for iterator-related aspects.
2191 2011-08-05 Sergey Rybin <rybin@adacore.com>
2193 * gnat_ugn.texi, vms_data.ads: Extend the subsection about coupling
2194 metrics in gnatmetric to cover new kinds of coupling mentrics.
2196 2011-08-05 Steve Baird <baird@adacore.com>
2198 * bindgen.adb (Gen_CodePeer_Wrapper): Call Ada_Main_Program instead
2199 of calling the user-defined main subprogram.
2200 (Gen_Main): Declare Ada_Main_Program and (if CodePeer_Mode
2201 is set) Call_Main_Subprogram ahead of, as opposed to
2203 (Gen_Output_File_Ada): Remove CodePeer_Mode-conditional
2204 generation of a "with" of the user-defined main subprogram.
2205 Remove CodePeer_Mode-conditional call to Gen_CodePeer_Wrapper
2206 (which is now called from Gen_Main instead).
2208 2011-08-05 Emmanuel Briot <briot@adacore.com>
2210 * projects.texi: Added reference to the Makefile package.
2212 2011-08-05 Thomas Quinot <quinot@adacore.com>
2214 * exp_ch7.adb: Minor comment rewording.
2216 2011-08-05 Ed Falis <falis@adacore.com>
2218 * env.c: Fix comment.
2220 2011-08-05 Hristian Kirtchev <kirtchev@adacore.com>
2222 * sem_elab.adb (Is_Finalization_Procedure): Reimplemented to avoid
2223 character comparison and rely on concrete entities instead.
2225 2011-08-05 Ed Schonberg <schonberg@adacore.com>
2227 * sem_ch3.adb: (Check_Private_Overriding): better error message,
2228 suggested by AI95-0068.
2230 2011-08-05 Hristian Kirtchev <kirtchev@adacore.com>
2232 * exp_ch7.adb (Find_Last_Init): Use Next_Suitable_Statement to retrieve
2233 the two potential initialization calls. This accounts for any
2234 access-before-elaboration checks which may precede the initialization
2236 (Next_Suitable_Statement): New routine. Returns the next real statement
2237 after the input node while skipping generated checks.
2238 * sem_elab.adb (Check_A_Call): New formal parameter In_Init_Proc along
2239 with comment on usage.
2240 Do not generate Elaborate_All when the trigger is a finalization call
2241 coming from a type init proc.
2242 (Check_Elab_Call): Propagate the initialization procedure context to
2243 subsequent calls to Check_A_Call.
2244 (Check_Internal_Call_Continue): Propagate the initialization procedure
2245 context to subsequent calls to Check_Elab_Call.
2246 (Is_Finalization_Procedure): New routine. Returns True if the input
2247 entity denotes a [Deep_]Finalize routine.
2248 * sem_elab.ads (Check_Elab_Call): New formal parameter In_Init_Proc
2249 along with comment on usage.
2251 2011-08-05 Vadim Godunko <godunko@adacore.com>
2253 * s-atocou.ads: Add list of supported platforms.
2255 2011-08-05 Yannick Moy <moy@adacore.com>
2257 * sem_prag.adb, restrict.adb: Correct style for or'ing Boolean variables
2259 * opt.ads (Disable_ALI_File): new Boolean flag
2260 * lib-writ.adb (Write_ALI): when Disable_ALI_File is set, do nothing
2262 2011-08-05 Ed Falis <falis@adacore.com>
2264 * env.c (__gnat_environ): Fix includes for RTPs and VTHREADS so that
2265 environ is properly defined.
2267 2011-08-05 Vincent Celier <celier@adacore.com>
2269 * make.adb (Compilation_Phase): Exit immediately when all objects have
2270 been found up to date, to avoid multiple exit messages.
2271 * prj-nmsc.adb (Add_Source): Allow duplicate source file names in the
2272 same project for languages with no compiler.
2273 * gnat_ugn.texi: Document compiler switch -gnateI and gnatmake switch
2275 2011-08-05 Robert Dewar <dewar@adacore.com>
2277 * exp_ch7.ads, sem_type.adb, make.adb, sem_prag.adb, sem_util.adb,
2278 sem_util.ads, sem_attr.adb, restrict.ads, sem_ch6.adb, prj-conf.adb,
2279 prj-conf.ads, s-atocou.ads, s-atocou.adb, s-atocou-x86.adb,
2280 s-atocou-builtin.adb: Minor reformatting.
2282 2011-08-05 Yannick Moy <moy@adacore.com>
2284 * exp_ch7.adb (Establish_Transient_Scope): in formal verification mode,
2285 if the node to wrap is a pragma check, this node and enclosed
2286 expression are not expanded, so do not apply any transformations here.
2287 * exp_prag.adb (Expand_Pragma_Check): document the need to avoid
2288 introducing transient scopes.
2290 2011-08-05 Jose Ruiz <ruiz@adacore.com>
2292 * adaint.c (__gnat_set_writable, __gnat_set_readable,
2293 __gnat_set_executable, __gnat_set_non_writable, __gnat_set_non_readable,
2294 __gnat_copy_attribs): On VxWorks 6.x and later, the required chmod
2295 routine is available, so we use the default implementation of these
2297 * s-os_lib.ads (Copy_File, Copy_Time_Stamps): Document that there is
2298 support for copying attributes on VxWorks 6.
2300 2011-08-05 Yannick Moy <moy@adacore.com>
2302 * debug.adb: Remove use of -gnatd.D.
2303 * gnat1drv.adb (Adjust_Global_Switches): adjust switches for ALFA mode
2304 * opt.ads: Simplify variables for ALFA mode, to keep one only
2305 * restrict.adb, sem_prag.adb: Adapt treatment done for CodePeer mode
2308 2011-08-05 Vincent Celier <celier@adacore.com>
2310 * prj-conf.adb (Do_Autoconf): Look also for --RTS in
2311 Builder'Default_Switches.
2313 2011-08-05 Vincent Celier <celier@adacore.com>
2315 * makeusg.adb: Add lines for --create-map-file switches.
2317 2011-08-05 Ed Schonberg <schonberg@adacore.com>
2319 * freeze.adb (Freeze_Entity): For a subprogram, if a type in the
2320 profile is incomplete and the full view is available, replace it with
2322 * sem_ch6.adb (Possible_Freeze): if a type in the profile is
2323 incomplete, freezing the subprogram is delayed until the full view is
2325 * sem_type.adb (Disambiguate): an ambiguity between a user-defined
2326 fixed-point multiplication operator and the predefined operator is
2327 resolved in favor of the user-defined one.
2329 2011-08-05 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
2331 * init.c [__alpha__ && __osf__] (__gnat_error_handler): Use
2334 2011-08-04 Ed Schonberg <schonberg@adacore.com>
2336 * sem_util.ads, sem_unit.adb (Type_Without_Stream_Operation): determine
2337 whether a type lacks user-defined Read or Write operations, or has a
2338 component that lacks them.
2339 * sem_attr.adb (Check_Stream_Attribute): if restriction
2340 No_Default_Stream_Attributes is active, verify that all subcomponent
2341 types of the target have user-defined stream operations, and report
2343 * exp_ch3.adb (Stream_Operqtion_OK): use Type_Without_Stream_Operation.
2344 * exp_strm.adb: Build_Elementary_Input_Call,
2345 Build_Elementary_Write_Call): remove checks for restriction
2346 No_Default_Stream_Attributes, now checked in semantics.
2348 2011-08-04 Vincent Celier <celier@adacore.com>
2350 * prj-conf.ads, prj-conf.adb (Do_Autoconf): If there is no --RTS
2351 switches on the command line, look for all valid --RTS switches in the
2352 Builder switches and for each language use the first runtime name found
2353 to invoke gprconfig.
2354 (Get_Or_Create_Configuration_File): Warn if --RTS is specified on the
2355 command line and there is no auto-configuration.
2356 (Runtime_Name_Set_For): New function.
2358 2011-08-04 Hristian Kirtchev <kirtchev@adacore.com>
2360 * exp_ch7.adb (Build_Object_Declarations): Do not generate the
2361 elaborate initialization expression for variable Abort when processing
2362 a package body or a declaration.
2363 (Create_Finalizer): Propagate the package context when creating the
2364 exception-related variables.
2365 * exp_ch7.ads (Build_Object_Declarations): New formal parameter
2366 For_Package along with usage comment.
2368 2011-08-04 Arnaud Charlet <charlet@adacore.com>
2370 * gcc-interface/Makefile.in: Clean up targets.
2371 Enable new package for atomic counters and copy-on-write implementation
2372 of unbounded strings on x86 platforms.
2373 * gcc-interface/Make-lang.in: Update dependencies.
2375 2011-08-04 Robert Dewar <dewar@adacore.com>
2377 * exp_ch7.adb: Minor reformatting.
2379 2011-08-04 Robert Dewar <dewar@adacore.com>
2381 * exp_strm.adb: Minor reformatting.
2383 2011-08-04 Vadim Godunko <godunko@adacore.com>
2385 * s-atocou.adb: Replace by dummy version and use on targets where atomic
2386 operations are not supported.
2387 * s-atocou-builtin.adb: Renamed from s-atocou.adb.
2388 * s-atocou-x86.adb: New file.
2389 * Makefile.rtl: Add s-atocou.o file
2391 2011-08-04 Arnaud Charlet <charlet@adacore.com>
2393 * make.adb (Compile): Move setting of CodePeer_Mode to ...
2394 (Compilation_Phase): ... here.
2395 (Scan_Make_Arg): Now bind and link by default in CodePeer mode.
2397 2011-08-04 Thomas Quinot <quinot@adacore.com>
2399 * Make-generated.in: Fix minor typo in comment.
2401 2011-08-04 Thomas Quinot <quinot@adacore.com>
2403 * gnatls.adb: Use Prj.Env.Initialize_Default_Project_Path to retrieve
2406 2011-08-04 Robert Dewar <dewar@adacore.com>
2408 * a-coinho.adb: Minor reformatting.
2410 2011-08-04 Robert Dewar <dewar@adacore.com>
2412 * a-coinho.ads: Minor reformatting.
2414 2011-08-04 Vadim Godunko <godunko@adacore.com>
2416 * s-atocou.ads, s-atocou.adb: New files.
2417 * a-strunb-shared.ads, a-strunb-shared.adb, a-stwiun-shared.ads,
2418 a-stwiun-shared.adb, a-stzunb-shared.ads, a-stzunb-shared.adb: Remove
2419 direct use of GCC's atomic builtins and replace them by use of new
2420 atomic counter package.
2422 2011-08-04 Ed Schonberg <schonberg@adacore.com>
2424 * exp_strm.adb: better error message for No_Default_Stream_Attributes.
2426 2011-08-04 Hristian Kirtchev <kirtchev@adacore.com>
2428 * a-tags.adb (Unregister_Tag): Replace the complex address arithmetic
2429 with a call to Get_External_Tag.
2430 * exp_ch7.adb (Build_Cleanup_Statements): Update the comment on
2431 subprogram usage. Remove the guard against package declarations and
2432 bodies since Build_Cleanup_Statements is no longer invoked in that
2434 (Build_Components): Initialize Tagged_Type_Stmts when the context
2435 contains at least one library-level tagged type.
2436 (Build_Finalizer): New local variables Has_Tagged_Types and
2437 Tagged_Type_Stmts along with associated comments on usage. Update the
2438 logic to include tagged type processing.
2439 (Create_Finalizer): Insert all library-level tagged type unregistration
2440 code before the jump block circuitry.
2441 (Expand_N_Package_Body): Remove the call to Build_Cleanup_Statements.
2442 (Expand_N_Package_Declaration): Remove the call to
2443 Build_Cleanup_Statements.
2444 (Process_Tagged_Type_Declaration): New routine. Generate a call to
2445 unregister the external tag of a tagged type.
2446 (Processing_Actions): Reimplemented to handle tagged types.
2447 (Process_Declarations): Detect the declaration of a library-level
2448 tagged type and carry out the appropriate actions.
2449 (Unregister_Tagged_Types): Removed. The machinery has been directly
2450 merged with Build_Finalizer.
2452 2011-08-04 Robert Dewar <dewar@adacore.com>
2454 * bindgen.ads, gnatlink.adb, sem_ch4.adb, gnatbind.adb, put_alfa.adb,
2455 gnatls.adb, exp_ch3.adb: Minor reformatting.
2457 2011-08-04 Marc Sango <sango@adacore.com>
2459 * sem_attr.adb (Analyze_Attribute): Replace the message
2460 "invisible attribute of}" of the spark restriction violation in
2461 attribute reference by the simple message "invisible attribute of type".
2462 Indeed, the node value Error_Msg_Node_1 used is in conflit with the
2463 two insertion characters: '&' and '}'.
2465 2011-08-04 Vadim Godunko <godunko@adacore.com>
2467 * impunit.adb (Non_Imp_File_Names_12): Add "a-coinho".
2468 * a-coinho.ads, a-coinho.adb: New file.
2469 * Makefile.rtl: Add Ada.Containers.Indefinite_Holders.
2471 2011-08-04 Nicolas Roche <roche@adacore.com>
2473 * alfa_test.adb: Not all ali files are containing alfa information even
2474 if compiled with -gnatd.F. So suppress warning about missing ALFA
2477 2011-08-04 Yannick Moy <moy@adacore.com>
2479 * lib-xref-alfa.adb (Add_ALFA_Scope): use non-empty unique name for
2481 * put_alfa.adb: Check that scope name is not empty.
2483 2011-08-04 Ed Schonberg <schonberg@adacore.com>
2485 * exp_ch3.adb (Stream_Operation_Ok): new predicate
2486 Needs_Elementary_Stream_Operation, to determine whether user-defined
2487 Read and Write attributes are available for the elementary components
2488 of the given type. If only the predefined attributes are available,
2489 then when restriction No_Default_Stream_Attributes is active the
2490 predefined stream attributes for the composite type cannot be created.
2492 2011-08-04 Robert Dewar <dewar@adacore.com>
2494 * bindgen.adb: Fix obsolete comments and names from Ada/C days.
2495 Put routines in alpha order
2497 2011-08-04 Jose Ruiz <ruiz@adacore.com>
2499 * gcc-interface/Makefile.in: Remove xenomai specific versions of system.
2500 * gcc-interface/Make-lang.in: Update dependencies.
2502 2011-08-04 Arnaud Charlet <charlet@adacore.com>
2504 * gcc-interface/lang.opt: Add AdaWhy language, simimlar to Ada.
2505 * gcc-interface/lang-specs.h: Add handling of AdaWhy specs (calls
2508 2011-08-04 Robert Dewar <dewar@adacore.com>
2510 * sem_ch3.adb, make.adb, a-cohata.ads, sem_prag.adb, makeutl.adb,
2511 lib-xref-alfa.adb: Minor reformatting.
2513 2011-08-04 Marc Sango <sango@adacore.com>
2515 * sem_ch12.adb (Analyze_Generic_Package_Declaration,
2516 Analyze_Generic_Subprogram_Declaration, Analyze_Package_Instantiation,
2517 Analyze_Subprogram_Instantiation): Check absence of generic in SPARK
2520 2011-08-04 Tristan Gingold <gingold@adacore.com>
2522 * bindgen.adb (Gen_Adainit_C): Remove.
2523 (Gen_Adafinal_C): Ditto.
2524 (Gen_Elab_Externals_C): Ditto.
2525 (Gen_Elab_Calls_C): Ditto.
2526 (Gen_Elab_Order_C): Ditto.
2527 (Gen_Elab_Defs_C): Ditto.
2528 (Gen_Finalize_Library_C): Ditto.
2529 (Gen_Finalize_Library_Defs_C): Ditto.
2530 (Gen_Main_C): Ditto.
2531 (Gen_Output_File_C): Ditto.
2532 (Gen_Restrictions_C): Ditto.
2533 (Gen_Versions_C): Ditto.
2534 (Write_Info_Ada_C): Ditto.
2535 (Gen_Object_Files_Options): Call WBI instead of Write_Info_Ada_C
2536 (Gen_Output_File): Do not force Ada_Bind_File anymore.
2537 Always call Gen_Output_File_Ada.
2538 * gnatlink.adb (Begin_Info): Now a constant.
2540 (Ada_Bind_File): Remove
2541 (Process_Args): Do not handle -A/-C. Remove not Ada_Bind_File cases.
2542 * switch-b.adb (Scan_Binder_Switches): Do not handle -C.
2543 * gnatbind.adb (Gnatbind): Remove not Ada_Bind_File cases.
2544 * opt.ads (Ada_Bind_File): Remove.
2546 2011-08-04 Thomas Quinot <quinot@adacore.com>
2548 * projects.texi: Document target-specific directory in default project
2551 2011-08-04 Thomas Quinot <quinot@adacore.com>
2553 * gnatls.adb, prj-env.adb: Add $prefix/share/gpr to default project
2556 2011-08-04 Yannick Moy <moy@adacore.com>
2558 * sem_ch3.adb, sem_ch5.adb, sem_util.adb, sem_ch4.adb, sem_ch8.adb,
2559 opt.ads, lib-xref.ads: Code clean up.
2561 2011-08-04 Yannick Moy <moy@adacore.com>
2563 * gnat_rm.texi: Update description of Test_Case
2564 * gnat_ugn.texi: Typo.
2566 2011-08-04 Ed Falis <falis@adacore.com>
2568 * adaint.c (__gnat_get_number_of_cpus): fix typo in last checkin.
2570 2011-08-04 Hristian Kirtchev <kirtchev@adacore.com>
2572 * exp_ch4.adb (Suitable_Element): Skip field _parent on .NET/JVM when
2573 it is of type Root_Controlled. This action eliminates fields Prev and
2574 Next from type equality.
2576 2011-08-04 Yannick Moy <moy@adacore.com>
2578 * lib-xref-alfa.adb: Correct typo.
2580 2011-08-04 Matthew Heaney <heaney@adacore.com>
2582 * a-cohata.ads (Hash_Table_Type): default-initialize the Nodes
2585 2011-08-04 Yannick Moy <moy@adacore.com>
2587 * sem_prag.adb (Check_Arg_Is_String_Literal): remove useless procedure
2588 (Analyze_Pragma): allow static string expression for name of Test_Case,
2589 instead of simply string literals.
2590 * sem_util.adb (Get_Name_From_Test_Case_Pragma): adapt to static string
2593 2011-08-04 Vincent Celier <celier@adacore.com>
2595 * makeutl.adb (Complete_Mains.Find_File_Add_Extension): Use canonical
2596 case suffixes to find truncated main sources.
2598 2011-08-04 Tristan Gingold <gingold@adacore.com>
2600 * impunit.adb (Non_Imp_File_Names_95): Add g-tastus.
2601 s-stusta.adb (Compute_All_Task): Use Put_Line instead of Put.
2602 (Compute_Current_Task): Ditto.
2604 2011-08-04 Tristan Gingold <gingold@adacore.com>
2606 * gnat_ugn.texi: Mention GNAT.Task_Stack_Usage.
2608 2011-08-04 Yannick Moy <moy@adacore.com>
2610 * lib-xref-alfa.adb (Is_Global_Constant): new function that detects
2611 library-level constant.
2612 (Add_ALFA_Xrefs): ignore global constants in ALFA xref.
2613 * sem_res.adb (Resolve_Actuals): do not add cross-reference to Formal
2614 used as selector of parameter association, in ALFA mode.
2616 2011-08-04 Robert Dewar <dewar@adacore.com>
2618 * exp_ch5.adb, exp_ch7.adb, exp_util.adb, bindgen.adb, sem_prag.adb,
2619 s-tassta.adb, exp_ch4.adb, exp_disp.adb, s-stausa.adb: Minor
2622 2011-08-04 Arnaud Charlet <charlet@adacore.com>
2624 * make.adb (Linking_Phase): Set source search path before calling
2625 gnatlink in CodePeer mode.
2627 2011-08-04 Javier Miranda <miranda@adacore.com>
2629 * exp_ch7.adb (Expand_N_Package_Body, Expand_N_Package_Declaration):
2630 Remove code which takes care of building TSDs.
2631 * rtsfind.ads (RE_Check_Interface_Conversion): New entity.
2632 * exp_ch4.adb (Apply_Accessibility_Check): Add support for generating
2633 the accessibility check in VM targets.
2634 * exp_disp.adb (Make_VM_TSD): Spec moved to exp_disp.ads
2635 (Building_Static_DT): Now returns false for VM targets.
2636 (Build_VM_TSDs): Removed.
2637 (Expand_Interface_Conversion): Generate missing runtime check for
2638 conversions to interface types whose target type is unknown at compile
2640 (Make_VM_TSD): Add missing code to disable the generation of calls to
2641 Check_TSD if the tagged type is not defined at library level, or not
2642 has a representation clause specifying its external tag, or -gnatdQ is
2644 * exp_disp.ads (Build_VM_TSDs): Removed.
2645 (Make_VM_TSDs): Spec relocated from exp_disp.adb
2646 * sem_disp.adb (Check_Dispatching_Operation): No code required to
2647 register primitives in the dispatch tables in VM targets.
2648 * exp_ch3.adb (Expand_N_Object_Declaration): Remove wrong expansion of
2649 initialization of class-wide interface objects in VM targets.
2650 (Expand_Freeze_Record_Type): For VM targets call Make_VM_TSD (instead
2653 2011-08-04 Jerome Lambourg <lambourg@adacore.com>
2655 * gnatlink.adb (Gnatlink): Correct missleading error message displayed
2656 when dotnet-ld cannot be found.
2658 2011-08-04 Arnaud Charlet <charlet@adacore.com>
2660 * bindgen.adb: Simplify significantly generation of binder body file in
2662 * sem_ch6.adb (Analyze_Subprogram_Body_Helper): Prevent assert failure
2663 when compiling binder generated file in CodePeer mode (xxx'Elab_Spec
2666 2011-08-04 Yannick Moy <moy@adacore.com>
2668 * sem_prag.adb, sem.ads: Code cleanup.
2670 2011-08-04 Tristan Gingold <gingold@adacore.com>
2672 * s-tassta.adb (Task_Wrapper): Rewrite the dynamic stack usage part.
2673 * s-stausa.adb, s-stausa.ads: Major rewrite. Now provides accurate
2674 results if possible.
2675 * s-stusta.adb (Print): Adjust after changes in s-stausa.
2676 * gnat_ugn.texi: Update dynamic stack usage section.
2678 2011-08-04 Steve Baird <baird@adacore.com>
2680 * bindgen.adb (Gen_CodePeer_Wrapper): new procedure.
2681 Generate (if CodePeer_Mode is set) a "wrapper" subprogram which
2682 contains only a call to the user-defined main subprogram.
2683 (Gen_Main_Ada) - If CodePeer_Mode is set, then
2684 call the "wrapper" subprogram instead of directly
2685 calling the user-defined main subprogram.
2687 2011-08-04 Hristian Kirtchev <kirtchev@adacore.com>
2689 * exp_ch5.adb (Expand_N_Case_Statement): Check the statements of all
2690 alternatives of a case statement for controlled objects. Rename local
2691 variable A to Dead_Alt.
2692 (Expand_N_If_Statement): Check the then and else statements of an if
2693 statement for controlled objects. Check the then statements of all
2694 elsif parts of an if statement for controlled objects.
2695 (Expand_N_Loop_Statement): Check the statements of a loop for controlled
2697 * exp_ch7.adb (Process_Transient_Objects): Rewrite the condition which
2698 detects a loop associated with the expansion of an array object.
2699 Augment the processing of the loop statements to account for a possible
2700 wrap done by Process_Statements_For_Controlled_Objects.
2701 * exp_ch9.adb (Expand_N_Asynchronous_Select): Check the triggering
2702 statements and abortable part of an asynchronous select for controlled
2704 (Expand_N_Conditional_Entry_Call): Check the else statements of a
2705 conditional entry call for controlled objects.
2706 (Expand_N_Selective_Accept): Check the alternatives of a selective
2707 accept for controlled objects.
2708 (Expand_N_Timed_Entry_Call): Check the entry call and delay
2709 alternatives of a timed entry call for controlled objects.
2710 * exp_ch11.adb (Expand_Exception_Handlers): Check the statements of an
2711 exception handler for controlled objects.
2712 * exp_util.adb (Requires_Cleanup_Actions (List_Id, Boolean, Boolean)):
2713 Add formal parameter Nested_Constructs along with its associated
2715 (Requires_Cleanup_Actions (Node_Id)): Update all calls to
2716 Requires_Cleanup_Actions.
2717 (Process_Statements_For_Controlled_Objects): New routine.
2718 * exp_util.ads (Process_Statements_For_Controlled_Objects): New
2719 routine. Inspect a node which contains a non-handled sequence of
2720 statements for controlled objects. If such an object is found, the
2721 statements are wrapped in a block.
2723 2011-08-04 Bob Duff <duff@adacore.com>
2725 * sem_type.adb (Covers): If T2 is a subtype of a class-wide type, we
2726 need to compare with Class_Wide_Type (T2), in order to get at the
2727 original class-wide type node.
2728 * sem_type.ads (Covers): Improve the comment.
2729 * einfo.ads (Class_Wide_Type): Improve the comment.
2730 * exp_intr.adb (Expand_Unc_Deallocation): Remove unnecessary setting of
2731 the type of the Deref.
2733 2011-08-04 Yannick Moy <moy@adacore.com>
2735 * gnat_rm.texi: Document that Test_Case pragma can only appear on
2736 separate declarations.
2737 * sem_prag.adb (procedure Check_Identifier_Is_One_Of): new procedure to
2738 check identifier of pragma argument.
2739 (Chain_TC): check that no other test case associated to the same entity
2740 share the same name.
2741 (Check_Test_Case): disallow test case inside subprogram body
2742 (Analyze_Pragma): correct call to check identifier and not argument
2743 * sem_util.adb, sem_util.ads (Get_Name_From_Test_Case_Pragma): new
2744 function gets name from test case pragma.
2746 2011-08-04 Yannick Moy <moy@adacore.com>
2748 * gnat_rm.texi: Document new pragma and aspect.
2749 * aspects.adb, aspects.ads (Aspect_Id): new value Aspect_Test_Case
2750 (No_Duplicates_Allowed): new constant array defining whether duplicates
2751 aspects of each kind can appear on the same declaration.
2752 * einfo.adb, einfo.ads (Spec_PPC_List): replace field with Contract
2753 field, which points to a node holding the previous Spec_PPC_List.
2754 * exp_ch9.adb, sem_ch6.adb, sem_prag.adb: Reach to Spec_PPC_List
2755 through the indirection with Contract.
2756 * exp_util.adb (Insert_Actions): raise Program_Error on N_Contract node
2757 * par-prag.adb (Prag): do nothing on Test_Case pragma
2758 * sem.adb (Analyze): abort on N_Contract, on which Analyze should not
2760 * sem_attr.adb (Analyze_Attribute): allow attribute 'Result in
2761 component Ensures of Test_Case.
2762 * sem_ch12.adb, sem_ch6.adb, sem_ch9.adb
2763 (Analyze_Generic_Subprogram_Declaration,
2764 Analyze_Subprogram_Instantiation,
2765 Analyze_Abstract_Subprogram_Declaration,
2766 Analyze_Subprogram_Body_Helper,
2767 Analyze_Subprogram_Specification, Analyze_Entry_Declaration):
2768 insert contract in subprogram node at point of definition
2770 (Aspect_Loop): do not raise error on duplicate Test_Case aspect
2771 (Analyze_Aspect_Specifications): analyze Test_Case aspect and create
2772 corresponding pragma
2773 (Check_Aspect_At_Freeze_Point): raise Program_Error on Test_Case aspect
2774 * sem_ch3.adb (Analyze_Declarations): insert analysis of test-cases,
2775 similar to the analysis of pre/post
2776 (Derive_Subprogram): insert contract in subprogram node at point of
2778 * sem_prag.adb, sem_prag.ads
2779 (Check_Arg_Is_String_Literal, Check_Identifier):
2780 new checking procedures to be called in treatment of pragmas
2781 (Check_Test_Case): new procedure to check that a Test_Case aspect or
2782 pragma is well-formed. This does not check currently that 'Result is
2783 used only in the Ensures component of a Test_Case.
2784 (Analyze_Pragma): add case for Test_Case
2785 (Analyze_TC_In_Decl_Part): pre-analyze the Requires and Ensures
2786 components of a Test_Case.
2787 (Preanalyze_TC_Args): new procedure to preanalyze the boolean
2788 expressions in the 3rd (and 4th if present) arguments of a Test_Case
2789 pragma, treated as spec expressions.
2790 (Sig_Flags): add value -1 for Test_Case.
2791 * sem_util.adb, sem_util.ads (Get_Ensures_From_Test_Case_Pragma,
2792 Get_Requires_From_Test_Case_Pragma): getters for both expression
2793 components of a Test_Case.
2794 * sinfo.adb, sinfo.ads (N_Contract): new kind of node used as
2795 indirection between an entry or [generic] subprogram entity and its
2796 pre/post + test-cases.
2797 (Spec_PPC_List, Spec_TC_List, Set_Spec_PPC_List, Set_Spec_TC_List):
2798 get/set for fields of an N_Contract node.
2799 * snames.ads-tmpl (Name_Test_Case, Name_Ensures, Name_Mode,
2800 Name_Normal, Name_Requires, Name_Robustness, Pragma_Test_Case): new
2801 names and pragma for Test_Case.
2802 * sprint.adb (Sprint_Node): raise Program_Error on N_Contract node
2804 2011-08-04 Vincent Celier <celier@adacore.com>
2806 * gnat_ugn.texi: Improve documentation of gnatmake switch
2807 --source-info-file=.
2809 2011-08-04 Hristian Kirtchev <kirtchev@adacore.com>
2811 * exp_ch7.adb (Make_Final_Call): Add local variable Atyp (assertion
2812 type). Initialize Atyp to the appropriate type which is later checked
2813 for completion. Rewrite the assertion associated with private type
2816 2011-08-04 Ed Falis <falis@adacore.com>
2818 * adaint.c: Add call to vxCpuConfiguredGet for VxWorks SMP to
2819 initialize the number of CPUs.
2821 2011-08-04 Ed Schonberg <schonberg@adacore.com>
2823 * sem_type.adb (Disambiguate): New subsidiary routine
2824 In_Same_Declaration_List, to implement AI05-0020: a user-defined
2825 equality on an anonymous access type whose designated type is private
2826 does not lead to an ambiguity with the universal access equality
2827 operator in the body or child units of the defining package. The same
2828 is true for a multiplication operator on a private type completed with
2831 2011-08-04 Javier Miranda <miranda@adacore.com>
2833 * opt.ads (Init_Or_Norm_Scalars_Config): Removed.
2834 (Normalize_Scalars_Config): Removed.
2836 (Register_Opt_Config_Switches): Remove registering config values of
2837 Init_Or_Norm_Scalars_Config and Normalize_Scalars_Config.
2838 (Restore_Opt_Config_Switches): Remove code which restores the values of
2839 Init_Or_Norm_Scalars and Normalize_Scalars. Recalculate value of
2840 Init_Or_Norm_Scalars.
2841 (Save_Opt_Config_Switches): Remove code which saves values of
2842 Init_Or_Norm_Scalars and Normalize_Scalars.
2843 (Set_Opt_Config_Switches): Remove code which restores config values of
2844 Init_Or_Norm_Scalars and Normalize_Scalars. Recalculate value of
2845 Init_Or_Norm_Scalars.
2847 2011-08-04 Yannick Moy <moy@adacore.com>
2849 * frontend.adb (Frontend): remove previous patch to avoid full
2850 qualification in ALFA mode.
2851 * lib-xref-alfa.adb (Add_ALFA_Xrefs): use unique name for variables.
2852 * sem_util.adb, sem_util.ads (Unique_Name): new function to define a
2853 unique name for an entity, which could be used to identify the entity
2854 across compilation units.
2856 2011-08-04 Thomas Quinot <quinot@adacore.com>
2859 (Initialize_Default_Project_Path): Add target specific directory
2860 ($prefix/$target/lib/gnat) in front of project path in all cases
2861 (making gnatmake's behaviour consistent with gprbuild).
2862 * gnatcmd.adb, make.adb, prj-makr.adb, clean.adb:
2863 Pass target name from Sdefault to project subsystem.
2864 * gnatls.adb: Show new target specific default project directory.
2866 2011-08-04 Johannes Kanig <kanig@adacore.com>
2868 * cstand.adb: Add Information to Identifier in Standard
2869 (Identifer_For): Set Entity to the corresponding entity
2871 2011-08-04 Sergey Rybin <rybin@adacore.com>
2873 * gnat_ugn.texi: Update doc on gnatcheck.
2875 2011-08-04 Yannick Moy <moy@adacore.com>
2877 * lib-xref-alfa.adb (Add_ALFA_Xrefs): correct definition of ranges of
2880 2011-08-04 Yannick Moy <moy@adacore.com>
2882 * exp_prag.adb (Expand_Pragma_Check): in ALFA mode, return without
2883 performing expansion.
2884 * sem_ch6.adb (Analyze_Subprogram_Body_Helper,
2885 Analyze_Generic_Subprogram_Body): protect call to Process_PCCs so that
2886 it is not called in ALFA mode.
2888 2011-08-04 Emmanuel Briot <briot@adacore.com>
2890 * make.adb, osint.adb, osint.ads (Reset_Command_Line_Files): not used
2891 after all, so removed.
2893 2011-08-04 Sergey Rybin <rybin@adacore.com>
2895 * vms_data.ads: Add missing VMS qualifiers.
2897 2011-08-04 Emmanuel Briot <briot@adacore.com>
2899 * make.adb, makeutl.adb, osint.adb, osint.ads (Check_Mains): rebuild
2900 the list of files on the command line after processing it through
2903 2011-08-04 Hristian Kirtchev <kirtchev@adacore.com>
2905 * exp_ch7.adb (Build_Raise_Statement): Remove the specialized
2906 processing for .NET/JVM. These targets can now benefit from
2907 Raise_From_Controlled_Operation and they share the same processing with
2909 (Establish_Transient_Scope): Remove the restriction for .NET/JVM.
2910 These targets need transient scopes in order to properly finalize short
2911 lived controlled objects.
2912 (Make_Handler_For_Ctrl_Operation): Remove the specialized processing for
2913 NET/JVM. These targets can now benefit from
2914 Raise_From_Controlled_Operation and they share the same processing with
2917 2011-08-04 Geert Bosch <bosch@adacore.com>
2919 * tracebak.c (STOP_FRAME): Stop at any next pointer outside the stack
2921 2011-08-04 Ed Schonberg <schonberg@adacore.com>
2923 * exp_aggr.adb (Has_Visible_Private_Ancestor): subsidiary routine to
2924 Expand_Record_Aggregate, to determine whether aggregate must be
2925 expanded into assignments. This is the case if the ancestor part is
2926 private, regarless of the setting of the flag Has_Private_Ancestor.
2928 2011-08-04 Ed Falis <falis@adacore.com>
2930 * vxaddr2line.adb: Add support for e500v2 and for Linux hosts
2932 2011-08-04 Bob Duff <duff@adacore.com>
2934 * sinfo.ads: Fix comment.
2936 2011-08-04 Steve Baird <baird@adacore.com>
2938 * bindgen.adb (Get_Ada_Main_Name): If CodePeer_Mode is set, then
2939 choose a package name in much the same way as is
2940 done for JGNAT when VM_Target /= No_VM, except that
2941 a slightly more distinctive prefix string is used.
2943 2011-08-04 Emmanuel Briot <briot@adacore.com>
2945 * makeutl.adb (Complete_Mains): no longer accept unit names on the
2946 gnatmake command line.
2947 This behavior was never documented (and was supported only because of
2948 an early bug in the code). This case might lead to ambiguous cases
2949 (between unit names and truncated base names without suffixes).
2951 2011-08-04 Hristian Kirtchev <kirtchev@adacore.com>
2953 * a-tags.ads, a-tags.adb (Unregister_Tag): New routine.
2954 Remove the external tag of a tagged type from the internal hash table.
2955 * exp_ch7.adb (Build_Cleanup_Statements): Update the comment on the
2956 expanded usage of the routine. Strenghten the check for Is_Master. Add
2957 processing for tagged types.
2958 (Build_Finalizer): Create all the necessary lists used in finalizer
2959 creation when the processed context is a package that may contain
2961 (Expand_Cleanup_Actions): Rename the call to Has_Controlled_Objects to
2962 Requires_Cleanup_Actions.
2963 (Expand_N_Package_Body): Package bodies may need clean up code
2964 depending on whether they contain tagged types.
2965 (Expand_N_Package_Declaration): Package declarations may need clean up
2966 code depending on whether they contain tagged types.
2967 (Unregister_Tagged_Types): New routine. Search through a list of
2968 declarations or statements, looking for non-abstract Ada tagged types.
2969 For each such type, generate code to unregister the external tag.
2970 * exp_util.adb (Has_Controlled_Objects (Node_Id)): Renamed to
2971 Requires_Cleanup_Actions.
2972 (Requires_Cleanup_Actions (List_Id, Boolean)): New routine. Search
2973 through a list of declarations or statements looking for non-abstract
2974 Ada tagged types or controlled objects.
2975 * exp_util.ads (Has_Controlled_Objects (Node_Id)): Renamed to
2976 Requires_Cleanup_Actions.
2977 (Has_Controlled_Objects (List_Id, Boolean)): Removed.
2978 * rtsfind.ads: Add entry RE_Unregister_Tag to tables RE_Id and
2981 2011-08-04 Vincent Celier <celier@adacore.com>
2983 * prj-env.adb (For_All_Source_Dirs.For_Project): Check if project Prj
2984 has Ada sources, not project Project, because if the root project
2985 Project has no sources of its own, all projects will be deemed without
2988 2011-08-04 Gary Dismukes <dismukes@adacore.com>
2990 * bindgen.adb (Gen_Adainit_Ada): Move the generation of the declaration
2991 of the No_Param_Proc acc-to-subp type used for initialization of
2992 __gnat_finalize_library_objects so that it's declared at library level
2993 rather than nested inside of the adainit routine.
2995 2011-08-04 Javier Miranda <miranda@adacore.com>
2997 * exp_disp.adb (Make_DT): Generate code to check the external tag ONLY
2998 if the tagged type has a representation clause which specifies its
3001 2011-08-04 Ed Schonberg <schonberg@adacore.com>
3003 * einfo.ads, einfo.adb (Has_Private_Ancestor): now a flag on types.
3004 Remove previous procedure with that name.
3005 * sem_ch3.adb (Build_Derived_Record_Type): set Has_Private_Ancestor
3007 * sem_aggr.adb (Resolve_Extension_Aggregate): if the ancestor part is a
3008 subtype mark, the ancestor cannot have unknown discriminants.
3009 (Resolve_Record_Aggregate): if the type has invisible components
3010 because of a private ancestor, the aggregate is illegal.
3012 2011-08-04 Vincent Celier <celier@adacore.com>
3014 * switch-m.adb (Normalize_Compiler_Switches): Recognize and take into
3015 account switches -gnat2005, -gnat12 and -gnat2012.
3017 2011-08-04 Bob Duff <duff@adacore.com>
3019 * s-tasdeb.ads: Minor comment fix.
3021 2011-08-04 Arnaud Charlet <charlet@adacore.com>
3023 * gnatlink.adb (Gnatlink): Pass -gnat83/95/05/12 switch to gcc in
3025 * switch.ads, switch.adb (Is_Language_Switch): New function.
3027 2011-08-04 Vincent Celier <celier@adacore.com>
3029 * switch-c.adb: Minor comment addition.
3031 2011-08-04 Vincent Celier <celier@adacore.com>
3033 * vms_conv.adb (Process_Argument): Fail graciously when qualifier
3034 ending with '=' is followed by a space (missing file name).
3036 2011-08-04 Pascal Obry <obry@adacore.com>
3038 * g-regist.ads: Fix size of HKEY on x86_64-windows.
3040 2011-08-04 Ed Schonberg <schonberg@adacore.com>
3042 * sem_ch12.adb (Analyze_Associations): New routine
3043 Check_Overloaded_Formal_Subprogram to reject a formal package when
3044 there is a named association or a box initialisation for an overloaded
3045 formal subprogram of the corresponding generic.
3047 2011-08-04 Yannick Moy <moy@adacore.com>
3049 * alfa.ads (ALFA_Xref_Record): add component for type of entity
3050 * get_alfa.adb, put_alfa.adb: Read and write new component of
3052 * lib-xref-alfa.adb (Collect_ALFA): generate new component.
3054 2011-08-04 Pascal Obry <obry@adacore.com>
3056 * urealp.adb: Minor reformatting.
3058 2011-08-04 Tristan Gingold <gingold@adacore.com>
3060 * exp_ch7.adb (build_finalizer.process_declarations.processing_actions):
3061 Handle the case when Cleanup_Protected_Object returns Empty.
3063 2011-08-04 Yannick Moy <moy@adacore.com>
3065 * frontend.adb (Frontend): only qualify names in non-ALFA mode
3067 2011-08-04 Ed Schonberg <schonberg@adacore.com>
3069 * sem_ch4.adb (Try_Class_Wide_Operation): if the context is a procedure
3070 call, ignore functions.
3072 2011-08-04 Geert Bosch <bosch@adacore.com>
3074 * urealp.adb (Equivalent_Decimal_Exponent): Avoid the use of floating
3077 2011-08-04 Emmanuel Briot <briot@adacore.com>
3079 * makeutl.adb (Compute_Builder_Switches): no longer accept a unit name
3080 as an index for Builder'Switches. This conforms to the documentation.
3081 * make.adb (Insert_Project_Sources): avoid duplicate code
3083 2011-08-04 Emmanuel Briot <briot@adacore.com>
3085 * makeutl.adb (Complete_Mains): if the user has passed a relative file
3086 name on the command line (for instance "../dummy"), never assume it can
3089 2011-08-04 Tristan Gingold <gingold@adacore.com>
3091 * bindgen.adb: Remove code the reference or create the
3092 Break_Start/__gnat_break_start procedure.
3093 * s-stalib.adb (Break_Start): Removed.
3095 2011-08-04 Emmanuel Briot <briot@adacore.com>
3097 * make.adb, makeutl.adb, makeutl.ads (Compute_Builder_Switches): now
3098 shared with gprbuild.
3100 2011-08-04 Yannick Moy <moy@adacore.com>
3102 * par-ch4.adb (P_Primary): preferentially issue an error message about
3103 a missing parenthesis arount a conditional or case expression in Ada
3104 2012 mode, if we detect that the alignment is not correct for a
3107 2011-08-04 Hristian Kirtchev <kirtchev@adacore.com>
3109 * exp_ch7.adb (Process_Declarations): Do not consider the result of a
3110 tag-to-class-wide conversion as needing finalization actions.
3111 * exp_util.adb (Has_Controlled_Objects): Do not consider the result of
3112 a tag-to-class-wide conversion as needing finalization actions.
3113 (Is_Finalizable_Transient): The result of a tag-to-class-wide
3114 conversion does not need finalization actions.
3115 (Is_Tag_To_CW_Conversion): New routine.
3116 * exp_util.ads (Is_Tag_To_CW_Conversion): New routine. Determines
3117 whether an object is the result of a tag-to-class-wide conversion.
3119 2011-08-04 Yannick Moy <moy@adacore.com>
3121 * sem_ch13.adb (Analyze_Aspect_Specifications): correct order in which
3122 the left-hand-side and right-hand-side of a conjunct are inserted when
3123 translating a pre- or postcondition
3124 * sem_ch6.adb: Correct typo in comment
3126 2011-08-04 Ed Schonberg <schonberg@adacore.com>
3128 * gnat_rm.texi: Ravenscar does not prohibit dependence on
3129 Unchecked_Conversion and Unchecked_Deallocation.
3131 2011-08-04 Thomas Quinot <quinot@adacore.com>
3133 * make.adb: Minor reformatting.
3135 2011-08-04 Emmanuel Briot <briot@adacore.com>
3137 * prj.adb, prj.ads, makeutl.adb (Complete_Mains): search for the
3138 sources in the project and its imported projects, but not in the whole
3141 2011-08-04 Emmanuel Briot <briot@adacore.com>
3143 * make.adb: Remove debug trace.
3145 2011-08-04 Vincent Celier <celier@adacore.com>
3147 * makeutl.adb (Do_Complete): Get the absolute path name of a relative
3148 path in canonical form, to be able to compare path names on platforms
3149 such as Windows or Darwin.
3151 2011-08-04 Thomas Quinot <quinot@adacore.com>
3153 * par_sco.adb (Traverse_Declarations_Or_Statements.Set_Statement_Entry):
3154 For a pragma (statement with C1 = 'P'), record the sloc of the pragma.
3155 * scos.ads: Update documentation accordingly.
3156 * put_scos.adb (Output_SCO_Line): Omit statement SCOs for disabled
3159 2011-08-04 Ed Schonberg <schonberg@adacore.com>
3161 * sem_attr.adb (Bad_Attribute_For_Predicate): flag illegal use of
3162 attribute only if prefix type is scalar.
3164 2011-08-04 Emmanuel Briot <briot@adacore.com>
3166 * make.adb, makeutl.adb, prj-env.adb (Check_Mains): put back support
3167 in gnatmake for specifying mains on the command line that do not belong
3168 to the main project. These mains must currently all belong to the same
3170 (Ultimate_Extension_Of): removed, since duplicated
3171 Ultimate_Extending_Project.
3173 2011-08-04 Arnaud Charlet <charlet@adacore.com>
3175 * make.adb (Do_Codepeer_Globalize_Step): Removed. Use CodePeer_Mode
3177 (CodePeer_Mode_String): New.
3178 (Linking_Phase, Binding_Phase): Call gnatlink with -P switch in
3180 (Scan_Make_Arg): Do not disable binding/linking phase in CodePeer mode.
3181 * bindgen.adb (Gen_Elab_Calls_Ada): Ignore subprograms in CodePeer
3182 mode, since no useful elaboration subprogram is needed by CodePeer.
3183 * gnatlink.adb (Gnatlink): Add support for -P switch (CodePeer mode).
3184 In this mode, compile binder file with -gnatC and do stop after this
3187 2011-08-04 Vincent Celier <celier@adacore.com>
3189 * exp_ch7.adb: Minor comment fix.
3191 2011-08-04 Robert Dewar <dewar@adacore.com>
3193 * exp_ch7.adb, make.adb, sem_ch10.adb, bindgen.adb, sem_res.adb,
3194 exp_ch4.adb, makeutl.adb: Minor reformatting.
3196 2011-08-04 Emmanuel Briot <briot@adacore.com>
3198 * make.adb, makeutl.adb, makeutl.ads (Make): major refactoring.
3199 Create several new subprograms to move code out of Make. This makes the
3200 code more readable, removes code duplication, and is a preparation work
3201 for adding support for aggregate projects.
3203 2011-08-04 Tristan Gingold <gingold@adacore.com>
3205 * s-po32gl.ads, s-po32gl.adb: New files.
3206 * exp_ch7.ads (Get_Global_Pool_For_Access_Type): New function.
3207 * exp_ch7.adb (Get_Global_Pool_For_Access_Type): New function.
3208 (Build_Finalization_Collection): Use it.
3209 * exp_ch4.adb (Complete_Controlled_Allocation): Ditto.
3210 * rtsfind.ads: System_Pool_32_Global, Re_Global_Pool_32_Object: New
3212 * gcc-interface/Makefile.in: Use s-po32gl.o on VMS.
3213 * gcc-interface/Make-lang.in: Update dependencies.
3215 2011-08-04 Emmanuel Briot <briot@adacore.com>
3217 * makeutl.adb (Complete_Mains): add support for specs with no suffix on
3220 2011-08-04 Emmanuel Briot <briot@adacore.com>
3222 * make.adb, makeutl.adb (Complete_Mains): if a main specified on the
3223 command line is not a file name, also check whether it could be a unit
3226 2011-08-04 Eric Botcazou <ebotcazou@adacore.com>
3228 * bindgen.adb (Gen_Finalize_Library_Ada): Factor out code to generate
3229 the header of the finalization routine.
3230 If the unit has no finalizer but is a body whose spec has one, then
3231 generate the decrement of the elaboration entity only.
3232 If the unit has a finalizer and is a spec, then do not generate the
3233 decrement of the elaboration entity.
3234 (Gen_Finalize_Library_C): Likewise.
3236 2011-08-04 Hristian Kirtchev <kirtchev@adacore.com>
3238 * exp_ch7.adb (Alignment_Of): New subsidiary routine.
3239 (Bounds_Size_Expression): Removed.
3240 (Double_Alignment_Of): New subsidiary routine.
3241 (Make_Finalize_Address_Stmts): New local variable Index_Typ. Account
3242 for a hole in the dope vector of unconstrained arrays due to different
3243 index and element alignments.
3245 2011-08-04 Ed Schonberg <schonberg@adacore.com>
3247 * sem_res.adb (Resolve_Allocator): diagnose task allocator that will
3248 raise program_error because body has not been seen yet.
3250 2011-08-04 Ed Schonberg <schonberg@adacore.com>
3252 * sem_ch10.adb (Analyze_With_Clause): Protect against child unit with
3255 2011-08-04 Vincent Celier <celier@adacore.com>
3257 * makeutl.adb (Do_Complete): Check absolute paths in canonical forms
3259 2011-08-04 Yannick Moy <moy@adacore.com>
3261 * alfa.adb, alfa.ads (Unique_Defining_Entity): move function from here
3262 * sem_util.adb, sem_util.ads (Unique_Defining_Entity): ...to here
3264 2011-08-04 Thomas Quinot <quinot@adacore.com>
3266 * sem_ch12.adb (Analyze_Package_Instantiation): Do not omit body for
3267 instantiation in RCI.
3269 2011-08-04 Emmanuel Briot <briot@adacore.com>
3271 * make.adb: Share more code with gprbuild
3273 2011-08-04 Emmanuel Briot <briot@adacore.com>
3275 * projects.texi: Added documentation for the IDE'Gnat project file
3278 2011-08-04 Nicolas Roche <roche@adacore.com>
3280 * gnat_rm.texi: Minor editing.
3282 2011-08-04 Javier Miranda <miranda@adacore.com>
3284 * bindgen.adb (Gen_Adafinal_Ada): Do not differentiate the main case
3285 and the library case for VM targets.
3286 (Gen_Adainit_Ada): Likewise.
3288 2011-08-04 Robert Dewar <dewar@adacore.com>
3290 * g-altive.ads: Minor comment updates.
3291 * prj-nmsc.adb: Minor reformatting.
3293 2011-08-04 Javier Miranda <miranda@adacore.com>
3296 (Normalize_Scalars_Config): Value of the configuration switch set by
3297 pragma Normalize_Scalars when it appears in the gnat.adc file.
3298 (Normalize_Scalars): New field for record Config_Switches_Type. Used
3299 to save and restore settings of this pragma.
3301 (Register_Opt_Config_Switches, Save_Opt_Config_Switches,
3302 Restore_Opt_Config_Switches): Add missing support for Normalize_Scalars.
3304 2011-08-04 Vincent Celier <celier@adacore.com>
3306 * gnat_ugn.texi: Document gnatlink options -M and -M=mapfile
3308 2011-08-04 Arnaud Charlet <charlet@adacore.com>
3310 * makeutl.adb: Minor reformatting.
3312 2011-08-04 Olivier Hainque <hainque@adacore.com>
3314 * g-altive.ads: Update comments to reflect that only the soft
3315 binding is available today.
3317 2011-08-04 Robert Dewar <dewar@adacore.com>
3319 * bindgen.adb, einfo.adb, sem_ch12.adb, s-tasren.adb, sem_res.adb,
3320 makeutl.adb, prj-nmsc.adb, opt.ads, prj-env.adb: Minor reformatting
3321 * gcc-interface/Make-lang.in: Update dependencies.
3323 2011-08-04 Arnaud Charlet <charlet@adacore.com>
3325 * prj-env.adb: Remove local debug traces.
3327 2011-08-04 Yannick Moy <moy@adacore.com>
3329 * checks.adb (Apply_Float_Conversion_Check): correct a typo where Lo_OK
3330 was used instead of Hi_OK, which could cause a read of an uninitialized
3331 value later on. Detected while working on the new warning.
3332 * exp_ch9.adb (Expand_N_Entry_Declaration): remove useless assignment
3334 * sem_ch5.adb (Analyze_Assignment): set the last assignment component
3335 in more cases, in order to detect more unreferenced values.
3336 * sem_util.adb, sem_util.ads (Get_Enclosing_Object): return enclosing
3337 object for expression, if any.
3339 2011-08-04 Eric Botcazou <ebotcazou@adacore.com>
3341 * exp_intr.adb (Expand_Binary_Operator_Call): Look at the RM size of
3342 the operand types instead of the Esize.
3344 2011-08-04 Steve Baird <baird@adacore.com>
3346 * switch-b.adb (Scan_Binder_Switches): Add -P binder switch, used to
3347 enable CodePeer_Mode.
3348 * bindusg.adb (Display): Add help message describing -P binder switch.
3349 * gnat_ugn.texi: Document -P binder switch.
3350 * bindgen.adb (Gen_Main_Ada): If CodePeer_Mode is set, then call the
3351 user-defined main program directly.
3352 (Gen_Output_File_Ada): If CodePeer_Mode is set, generate a with of the
3353 user-defined main program in the context clause of the package body.
3355 2011-08-04 Yannick Moy <moy@adacore.com>
3357 * alfa.adb, alfa.ads (Get_Entity_For_Decl): remove function, partial
3358 duplicate of Defining_Entity
3359 (Get_Unique_Entity_For_Decl): rename function into
3360 Unique_Defining_Entity
3361 * einfo.adb, einfo.ads (Is_In_ALFA, Body_Is_In_ALFA): remove flags
3362 (Formal_Proof_On): remove synthesized flag
3363 * cstand.adb, sem_ch11.adb, sem_ch2.adb, sem_ch3.adb, sem_ch4.adb,
3364 sem_ch5.adb, sem_ch6.adb, sem_ch9.adb, sem_res.adb, sem_util.adb,
3365 sem_util.ads, stand.ads: Remove treatment associated to entities in ALFA
3366 * sem_prag.adb (Analyze_Pragma): remove special treatment for pragma
3367 Annotate (Formal_Proof)
3369 2011-08-04 Emmanuel Briot <briot@adacore.com>
3371 * prj-env.adb (Create_Config_Pragmas_File): fix handling of multi-unit
3372 source files with non-standard naming schemes, in imported projects
3374 2011-08-04 Emmanuel Briot <briot@adacore.com>
3376 * makeutl.adb (Complete_Mains): when a multi-unit source file is
3377 specified on the gprbuild command line, we need to compile all units
3378 within that file, not just the first one we find
3379 Fix error message for mains that are not found.
3381 2011-08-04 Thomas Quinot <quinot@adacore.com>
3383 * sem_ch6.adb: Update comment.
3384 * sem_ch12.adb: Minor reformatting.
3386 2011-08-04 Bob Duff <duff@adacore.com>
3388 * s-tasren.adb (Task_Do_Or_Queue): Previous code was reading
3389 Acceptor.Terminate_Alternative without locking Acceptor, which causes a
3390 race condition whose symptom is to fail to lock Parent. That, in turn,
3391 causes Parent.Awake_Count to be accessed without locking Parent, which
3392 causes another race condition whose symptom is that Parent.Awake_Count
3393 can be off by 1 (either too high or too low). The solution is to lock
3394 Parent unconditionally, and then lock Acceptor, before reading
3395 Acceptor.Terminate_Alternative.
3397 2011-08-04 Arnaud Charlet <charlet@adacore.com>
3399 * debug.adb: Update comment.
3401 2011-08-04 Robert Dewar <dewar@adacore.com>
3403 * par_sco.adb, exp_util.adb, make.adb, a-tags.adb, sem_prag.adb,
3404 sem_util.adb, sem_attr.adb, exp_ch4.adb, g-comlin.adb, g-comlin.ads,
3405 exp_ch6.adb: Minor reformatting.
3407 2011-08-04 Gary Dismukes <dismukes@adacore.com>
3409 * gnat_ugn.texi: Add sentence about the case of compile-time-detected
3412 2011-08-04 Ed Schonberg <schonberg@adacore.com>
3414 * gnat_rm.texi: update Ravenscar desription to reflect Ada2012 RM.
3416 2011-08-04 Thomas Quinot <quinot@adacore.com>
3418 * sinfo.ads: Minor reformatting.
3420 2011-08-04 Emmanuel Briot <briot@adacore.com>
3422 * makeutl.adb, makeutl.ads, prj-nmsc.adb (Complete_Mains): report error
3423 even if there is no location.
3425 2011-08-04 Ed Schonberg <schonberg@adacore.com>
3427 * sem_res.adb, sem_ch4.adb: move check for restriction
3428 No_Task_Hierarchy to resolve_allocator.
3430 2011-08-04 Thomas Quinot <quinot@adacore.com>
3432 * sinfo.adb, sinfo.ads, sem_prag.adb, sem_ch12.adb (Pragma_Enabled):
3433 This flag of N_Pragma nodes is not used, remove it as well as all of
3434 the associated circuitry.
3436 2011-08-04 Javier Miranda <miranda@adacore.com>
3438 * exp_disp.adb (Make_DT): Switch -gnatdQ disables the generation of the
3439 runtime check on duplicated externa tags
3440 * debug.adb Document switch -gnatdQ.
3442 2011-08-04 Gary Dismukes <dismukes@adacore.com>
3444 * a-fihema.ads: Minor typo fix.
3446 2011-08-04 Yannick Moy <moy@adacore.com>
3448 * sem_ch10.adb: Minor comment update.
3450 2011-08-04 Hristian Kirtchev <kirtchev@adacore.com>
3452 * einfo.adb: Update the node field usage to reflect the renaming of
3453 Return_Flag to Return_ Flag_Or_Transient_Decl.
3454 (Return_Flag): Renamed to Return_Flag_Or_Transient_Decl.
3455 (Set_Return_Flag): Renamed to Set_Return_Flag_Or_Transient_Decl.
3456 (Write_Field15_Name): Change Return_Flag to
3457 Return_Flag_Or_Transient_Decl.
3458 * einfo.ads: Rename node field Return_Flag to
3459 Return_Flag_Or_Transient_Decl. Update the associated comment and all
3460 occurrences in entities.
3461 (Return_Flag): Renamed to Return_Flag_Or_Transient_Decl. Update
3462 associated Inline pragma.
3463 (Set_Return_Flag): Renamed to Set_Return_Flag_Or_Transient_Decl. Update
3464 associated Inline pragma.
3465 * exp_ch4.ads, exp_ch4.adb (Expand_N_Expression_With_Actions): New
3467 * exp_ch6.adb (Expand_N_Extended_Return_Statement): Update the calls to
3468 Return_Flag and Set_Return_Flag.
3469 * exp_ch7.adb (Process_Declarations): Add code to recognize hook
3470 objects generated for controlled transients declared inside an
3471 Exception_With_Actions. Update the calls to Return_Flag.
3472 (Process_Object_Declaration): Add code to add a null guard for hook
3473 objects generated for controlled transients declared inside an
3474 Exception_With_Actions. Update related comment.
3475 * exp_util.adb (Has_Controlled_Objects): Add code to recognize hook
3476 objects generated for controlled transients declared inside an
3477 Exception_With_Actions. Update the calls to Return_Flag.
3478 * expander.adb (Expand): Add new case for N_Expression_With_Actions.
3480 2011-08-04 Ed Schonberg <schonberg@adacore.com>
3482 * sem_util.adb:(Wrong_Type): Improve error message on a one-element
3483 positional aggregate.
3485 2011-08-04 Vincent Celier <celier@adacore.com>
3487 * par_sco.adb (Process_Decisions.Output_Header): Check and record pragma
3488 SLOC only for pragmas.
3490 2011-08-04 Emmanuel Briot <briot@adacore.com>
3492 * projects.texi: Minor typo fix.
3494 2011-08-04 Emmanuel Briot <briot@adacore.com>
3496 * prj-nmsc.adb (Check_File): Minor change to traces, to help debugging
3497 on case-sensitive file systems.
3499 2011-08-04 Thomas Quinot <quinot@adacore.com>
3501 * put_scos.adb (Put_SCOs): Do not emit decision SCO for an X decision
3502 nested in a disabled pragma.
3503 * scos.ads, scos.adb, par_sco.ads, par_sco.adb: Record sloc of
3504 enclosing pragma, if any, for X decisions.
3506 2011-08-04 Thomas Quinot <quinot@adacore.com>
3508 * sem_prag.adb: Minor reformatting.
3510 2011-08-04 Vincent Celier <celier@adacore.com>
3512 * a-tags.adb (Check_TSD): Avoid concatenation of strings, as it is not
3513 allowed in no run time mode.
3515 2011-08-04 Vincent Celier <celier@adacore.com>
3517 * make.adb (Check): When -gnatc is used, check for the source file
3518 inside the ALI file with a canonical case file name.
3520 2011-08-04 Emmanuel Briot <briot@adacore.com>
3522 * g-comlin.adb, g-comlin.ads (Add_Switch): Put back support for
3523 overriding the separator.
3525 2011-08-04 Robert Dewar <dewar@adacore.com>
3527 * sem_aggr.adb, par_sco.adb, sem_type.adb, exp_util.adb, exp_ch9.adb,
3528 prj-nmsc.adb, sem_ch13.adb, exp_strm.adb: Minor reformatting.
3530 2011-08-04 Robert Dewar <dewar@adacore.com>
3532 * gnat_rm.texi: Minor documentation fix for pragma Annotate.
3534 2011-08-04 Yannick Moy <moy@adacore.com>
3536 * sem_attr.adb (Analyze_Attribute): add check during pre-analysis that
3537 'Result only appears in postcondition of function.
3539 2011-08-04 Thomas Quinot <quinot@adacore.com>
3541 * a-tags.adb (Check_TSD): When raising PROGRAM_ERROR for a duplicated
3542 external tag, include the value of the external tag in the exception
3545 2011-08-04 Yannick Moy <moy@adacore.com>
3547 * sem_attr.adb (Result): modify error message for misplaced 'Result
3549 2011-08-04 Sergey Rybin <rybin@adacore.com>
3551 * gnat_rm.texi (pragma Annotate): Fix syntax description to make it
3552 clear that the second argument must be an identifier.
3554 2011-08-04 Thomas Quinot <quinot@adacore.com>
3556 * exp_ch9.adb (Build_Barrier_Function): When compiling with
3557 -fpreserve-control-flow, insert an IF statement on the barrier
3558 condition to ensure that a conditional branch instruction is generated.
3560 2011-08-04 Emmanuel Briot <briot@adacore.com>
3562 * prj-part.adb, prj.adb, prj.ads, prj-tree.ads
3563 (Processing_Flags.Ignore_Missing_With): new flag.
3565 2011-08-04 Emmanuel Briot <briot@adacore.com>
3567 * prj-nmsc.adb (Find_Sources, Path_Name_Of): Fix handling of
3568 Source_List_File on case-insensitive systems where the file is actually
3569 on a case-sensitive file system (NFS,...).
3571 2011-08-04 Hristian Kirtchev <kirtchev@adacore.com>
3573 * sem_ch6.adb (Analyze_Function_Return): In a rare case where a
3574 function return contains a controlled [extension] aggregate and the
3575 return statement is not part of a handled sequence of statements, wrap
3576 the return in a block. This ensures that all controlled temporaries
3577 generated during aggregate resolution will be picked up by the
3578 finalization machinery.
3580 2011-08-04 Ed Schonberg <schonberg@adacore.com>
3582 * sem_aggr.adb (Resolve_Aggregate): If aggregate has box-initialized
3583 components, freeze type before resolution, to ensure that default
3584 initializations are present for all components.
3585 * sem_res.adb (Resolve_Actuals): the designated object of an
3586 accces-to-constant type is a legal actual in a call to an
3587 initialization procedure.
3589 2011-08-04 Hristian Kirtchev <kirtchev@adacore.com>
3591 * exp_util.adb (Extract_Renamed_Object): Add N_Type_Conversion and
3592 N_Unchecked_Type_Conversion to the possible containers of a renamed
3595 2011-08-04 Yannick Moy <moy@adacore.com>
3597 * par-ch13.adb (Aspect_Specifications_Present): recognize
3598 "with Identifier'Class =>" as an aspect, so that a meaningful warning
3599 is issued in Strict mode.
3600 * par.adb: Fix typos in comments.
3602 2011-08-04 Yannick Moy <moy@adacore.com>
3604 * sem_attr.adb (Result): modify error message to take into account Post
3605 aspect when compiling Ada 2012 (or newer) code.
3607 2011-08-04 Nicolas Roche <roche@adacore.com>
3609 * env.c (__gnat_clearenv): Avoid use of dynamic size array in order to
3610 remove need for GCC exceptions.
3612 2011-08-04 Vincent Celier <celier@adacore.com>
3614 * makeutl.adb (Do_Complete): Call Debug_Output with the name of the
3615 project, not the source file name.
3616 * prj.adb (Find_Sources.Look_For_Sources): If the source has been
3617 excluded, continue looking. This excluded source will only be returned
3618 if there is no other source with the same base name that is not locally
3621 2011-08-04 Ed Schonberg <schonberg@adacore.com>
3623 * sem_res.adb (Resolve_Intrinsic_Operator): if the result type is
3624 private and one of the operands is a real literal, use a qualified
3625 expression rather than a conversion which is not meaningful to the
3628 2011-08-04 Yannick Moy <moy@adacore.com>
3630 * sem_ch13.adb (Aspect_Loop): when an aspect X and its classwise
3631 corresponding aspect X'Class are allowed, proceed with analysis of the
3632 aspect instead of skipping it.
3634 2011-08-04 Tristan Gingold <gingold@adacore.com>
3636 * s-flocon.adb, s-flocon.ads: Add a body for s-flocon.ads
3637 This will allow to have an Ada implementation for the subprogram.
3639 2011-08-04 Ed Schonberg <schonberg@adacore.com>
3641 * sem_ch3.adb (Analyze_Full_Type_Declaration): If the declaration is a
3642 completion and aspects are present, apply them to the entity for the
3643 type which is currently the partial view, but which is the one that
3645 * sem_ch13.adb (Analyze_Aspect_Specifications): if the predicate
3646 applies to a partial view, indicate that the full view has predicates
3647 and delayed aspects.
3648 (Replace_Type_Reference): Handle properly predicates that apply to the
3649 full view of a private completion.
3651 2011-08-04 Eric Botcazou <ebotcazou@adacore.com>
3653 * layout.adb (Layout_Type): For composite types, do not set Esize.
3654 * freeze.adb (Set_Small_Size): Remove test on alignment and do not
3656 (Size_Known): Look at the RM size of components instead of the Esize.
3657 (Freeze_Record_Type): Look at the RM size instead of the Esize to
3658 issue warning and activate Implicit_Packing.
3659 (Freeze_Entity): Likewise. Do not issue a warning for alias/atomic
3660 if the Esize is not known.
3661 * sem_ch13.adb (Analyze_Attribute_Definition_Clause) <Size>: Set Esize
3662 for elementary types only.
3663 (Analyze_Record_Representation_Clause): Look at the RM size instead
3664 of the Esize to issue errors.
3665 * gcc-interface/decl.c (gnat_to_gnu_entity): Do not set Esize if it
3667 <E_Record_Type>: Look at the RM size instead of the Esize. Remove
3669 Look at the RM size instead of the Esize for types if the latter is
3671 (gnat_to_gnu_field): Use Known_Esize instead of Known_Static_Esize.
3673 2011-08-04 Ed Schonberg <schonberg@adacore.com>
3675 * sem_type.adb: proper handling of equality not involving anonymous
3678 2011-08-04 Hristian Kirtchev <kirtchev@adacore.com>
3680 * exp_ch7.adb (Create_Finalizer): Remove local variables Spec_Nod and
3681 Vis_Decls. When creating a library-level finalizer for a package spec,
3682 both the declaration and body of the finalizer are inserted either in
3683 the visible or private declarations of the package spec.
3685 2011-08-04 Javier Miranda <miranda@adacore.com>
3687 * sem_ch3.adb (Derive_Subprograms): Complete assertion to request the
3688 use of the full-view of a type when invoking Is_Ancestor.
3689 * sem_type.adb (Is_Ancestor): For consistency, when the traversal of
3690 the full-view of private parents is requested, then use also the
3691 full-view of the parent of the first derivation.
3693 2011-08-04 Tristan Gingold <gingold@adacore.com>
3695 * s-taprop-vxworks.adb (Enter_Task): Use System.Float_Control.Reset
3696 instead of the locally imported procedure.
3697 * s-taprop-mingw.adb (Enter_Task): Ditto.
3698 * s-valrea.adb (Scan_Real): Ditto.
3699 * s-imgrea.adb (Set_Image_Real): Ditto.
3700 * s-flocon.ads: Make the package pure.
3702 2011-08-04 Thomas Quinot <quinot@adacore.com>
3704 * sinfo.ads, sinfo.adb (Debug_Statement, Set_Debug_Statement): Remove.
3705 * tbuild.ads, tbuild.adb (Make_Pragma): Adjust accordingly.
3706 * sinfo-cn.ads, sinfo-cn.adb (Change_Name_To_Procedure_Call_Statement):
3707 New subprogram, moved here from...
3708 * par.adb, par-ch5.adb (P_Statement_Name): ... here.
3709 * par-prag.adb (Par.Prag, case Pragma_Debug): Do not perform any
3710 rewriting of the last argument into a procedure call statement here...
3711 * sem_prag.adb (Analyze_Pragma, case Pragma_Debug): ...do it there
3714 2011-08-04 Thomas Quinot <quinot@adacore.com>
3716 * par_sco.adb: Minor reformatting.
3718 2011-08-04 Robert Dewar <dewar@adacore.com>
3720 * erroutc.adb: Minor reformatting.
3722 2011-08-04 Thomas Quinot <quinot@adacore.com>
3724 * par_sco.adb: Comment update.
3726 2011-08-04 Tristan Gingold <gingold@adacore.com>
3728 * s-flocon.ads: New file.
3729 * g-flocon.ads: Now a renaming of s-flocon.
3730 * Makefile.rtl: Add s-flocon.o
3732 2011-08-04 Javier Miranda <miranda@adacore.com>
3734 * exp_strm.adb (Build_Array_Input_Function): if the array type is
3735 constrained, do not attempt to build a subtype of it.
3737 2011-08-04 Yannick Moy <moy@adacore.com>
3739 * errout.ads Change comments: remove 'R'M as an example where quotes
3740 are needed; add ALFA as another case where quotes are not needed
3741 * erroutc.adb (Set_Msg_Insertion_Reserved_Word): add ALFA as another
3742 case where quotes are not needed.
3743 * sem_ch11.adb, sem_ch13.adb, sem_ch2.adb, sem_ch3.adb, sem_ch4.adb,
3744 sem_ch5.adb, sem_ch6.adb, sem_ch9.adb, sem_prag.adb, sem_res.adb:
3745 Remove all occurrences of 'A'L'F'A
3747 2011-08-04 Ed Schonberg <schonberg@adacore.com>
3749 * sem_ch13.adb: check legality of invariant pragma.
3751 2011-08-04 Eric Botcazou <ebotcazou@adacore.com>
3753 * bindgen.adb: Add comments.
3755 2011-08-04 Yannick Moy <moy@adacore.com>
3757 * einfo.adb, einfo.ads: Free Flag254 and make Formal_Proof_On a
3759 * sem_prag.adb (Analyze_Pragma): record the pragma Annotate
3760 (Formal_Proof, On/Off) in the Rep_Item list of the current subprogram.
3762 2011-08-04 Robert Dewar <dewar@adacore.com>
3764 * exp_ch7.adb, exp_ch6.adb, sem_ch3.adb, layout.adb, sem_ch5.adb,
3765 osint-c.ads, sem_util.ads, gnat1drv.adb, targparm.ads, sem_ch6.adb,
3766 sem_ch13.adb, s-pooloc.adb: Minor reformatting.
3768 2011-08-04 Thomas Quinot <quinot@adacore.com>
3770 * s-pooloc.ads, s-pooglo.ads: Minor reformatting
3772 2011-08-04 Thomas Quinot <quinot@adacore.com>
3775 * s-pooloc.adb (Deallocate): Fix the case of deallocating the only
3778 2011-08-04 Robert Dewar <dewar@adacore.com>
3780 * einfo.ads, exp_ch4.adb: Minor reformatting.
3782 2011-08-04 Jerome Lambourg <lambourg@adacore.com>
3784 * back_end.ads (Gen_Or_Update_Object_File): Add more comments.
3786 2011-08-04 Ed Schonberg <schonberg@adacore.com>
3788 * exp_ch4.adb (Expand_Composite_Equality): code cleanup: use component
3789 type in all cases to compute list of primitive operations, because full
3790 view may be an itype that is not attached to the list of declarations.
3792 2011-08-04 Eric Botcazou <ebotcazou@adacore.com>
3794 * bindgen.adb (Gen_Adafinal_Ada): Generate an early return if the
3795 library has already been finalized.
3796 (Gen_Adafinal_C): Likewise.
3797 (Gen_Adainit_Ada): Generate an early return if the library has
3798 already been elaborated.
3799 (Gen_Adainit_C): Likewise.
3800 (Gen_Output_File_Ada): Generate an elaboration flag.
3801 (Gen_Output_File_C): Likewise.
3803 2011-08-04 Hristian Kirtchev <kirtchev@adacore.com>
3805 * exp_ch4.adb (Expand_Allocator_Expression): Disable the generation of
3806 Set_Finalize_Address_Ptr for CodePeer because Finalize_Address was not
3807 built in the first place.
3808 (Expand_N_Allocator): Disable the generation of Set_Finalize_Address_Ptr
3809 for CodePeer because Finalize_Address was not built to begin with.
3810 * exp_ch6.adb (Make_Build_In_Place_Call_In_Allocator): Ditto.
3812 2011-08-04 Pascal Obry <obry@adacore.com>
3814 * adaint.c (__gnat_tmp_name): Use current process id to create temp
3815 filenames, this ensures unicity of filenames across processes.
3817 2011-08-04 Hristian Kirtchev <kirtchev@adacore.com>
3819 * bindgen.adb (Gen_Finalize_Library_Ada): Rename generated routine
3820 Raise_Controlled to Raise_From_Controlled_Operation. Update the
3821 signature of Raise_From_Controlled_Operation by adding flag From_Abort.
3822 Add False as the actual to From_Abort in the generated call to
3823 Raise_From_Controlled_Operation.
3825 2011-08-04 Jerome Lambourg <lambourg@adacore.com>
3827 * osint-c.ads, osint-c.adb (Set_Library_Info_Name): Move to declaration
3828 so that the ali file name can be retrieved from outside of this package.
3829 * back_end.ads, back_end.adb (Gen_Or_Update_Object_File): New method
3830 doing nothing in the general case, but used to update the object file
3831 timestamp if directly generated by the backend.
3832 * gnat1drv.adb (Gnat1drv): Make sure the object file's timestamp is set
3833 to a later time than the ali file one.
3835 2011-08-04 Yannick Moy <moy@adacore.com>
3837 * einfo.adb, einfo.ads (Formal_Proof_On): new flag set on subprogram
3838 entities whose body contains an Annotate pragma which forces formal
3840 * sem_ch11.adb, sem_ch2.adb, sem_ch3.adb, sem_ch4.adb, sem_ch5.adb,
3841 sem_ch6.adb, sem_ch9.adb, sem_res.adb: Adapt call to
3842 Mark_Non_ALFA_Subprogram to pass in a message and node.
3843 * sem_prag.adb (Analyze_Pragma): add treatment of pragma Annotate
3844 (Forma_Proof, On) which sets the flag Formal_Proof_On in the
3845 surrounding subprogram.
3846 * sem_util.adb, sem_util.ads (Mark_Non_ALFA_Subprogram,
3847 Mark_Non_ALFA_Subprogram_Unconditional): if the subprogram being marked
3848 as not in ALFA is annotated with Formal_Proof being On, then an error
3849 is issued based on the additional parameters for message and node.
3850 * snames.ads-tmpl (Name_Formal_Proof): new name for annotation.
3851 * gcc-interface/Make-lang.in: Update dependencies.
3853 2011-08-04 Hristian Kirtchev <kirtchev@adacore.com>
3855 * exp_ch3.adb (Expand_Freeze_Class_Wide_Type): Do not generate
3856 Finalize_Address when CodePeer is enabled.
3858 2011-08-04 Pascal Obry <obry@adacore.com>
3860 * adaint.c (__gnat_tmp_name): Use _tempnam() instead of tempnam() as
3861 the latter returns a pointer to a static buffer which is deallocated
3862 at the end of the routine.
3864 2011-08-04 Yannick Moy <moy@adacore.com>
3866 * sem_ch3.adb (Array_Type_Declaration): move test for type in ALFA
3867 after index creation; mark unconstrained base array type generated as
3868 being in/not in ALFA as well
3869 (Make_Index): mark subtype created as in/not in ALFA
3870 * sem_ch5.adb (Analyze_Iteration_Scheme): mark entity for iterating
3871 over a loop as in/not in ALFA, depending on its type and form of loop
3874 2011-08-04 Hristian Kirtchev <kirtchev@adacore.com>
3876 * exp_ch7.adb (Build_Object_Declarations): Initialize flag Abort
3877 directly to False on .NET and JVM.
3879 2011-08-04 Yannick Moy <moy@adacore.com>
3881 * sem_ch3.adb (Constrain_Enumeration, Constrain_Integer): remove
3882 constraint that subtype must come from source code to be in ALFA, so
3883 that anonymous subtypes can be in ALFA too.
3885 2011-08-04 Yannick Moy <moy@adacore.com>
3887 * sem_ch3.adb (Analyze_Object_Declaration): remove obsolete addition of
3888 reference for ALFA mode.
3889 * lib-xref-alfa.adb, lib-xref.ads (Traverse_Compilation_Unit): make
3890 procedure public so as to use it from formal verification back-end.
3892 2011-08-04 Jerome Lambourg <lambourg@adacore.com>
3894 * g-comlin.adb (For_Each_Simple_Switch.Is_In_Config): Remove the
3895 invalid checks of the Parameter, making Remove_Switch not working
3898 2011-08-04 Arnaud Charlet <charlet@adacore.com>
3900 * targparm.ads: Update header: no run-time exception is needed on this
3903 2011-08-04 Vincent Celier <celier@adacore.com>
3905 * a-fihema.adb: Use System.IO instead of GNAT.IO
3907 2011-08-04 Thomas Quinot <quinot@adacore.com>
3909 * sem_ch3.adb (Access_Definition): Anonymous access to subprogram types
3910 are forbidden in Compiler_Unit mode.
3912 2011-08-04 Robert Dewar <dewar@adacore.com>
3914 * sem_util.adb: Minor reformatting.
3916 2011-08-04 Hristian Kirtchev <kirtchev@adacore.com>
3918 * bindgen.adb (Gen_Finalize_Library_Ada): Update the import string for
3919 library-level finalizers.
3920 (Gen_Finalize_Library_C): Update the import string for library-level
3922 (Gen_Finalize_Library_Defs_C): Update the definition name of a
3923 library-level finalizer.
3924 * exp_ch7.adb: Remove with and use clauses for Stringt.
3925 (Create_Finalizer): Remove local variables Conv_Name, Prag_Decl,
3926 Spec_Decl. Add local variable Body_Id. The names of library-level
3927 finalizers are now manually fully qualified and are no longer external.
3928 A single name is now capable of servicing .NET, JVM and non-VM targets.
3929 Pragma Export is no longer required to provide visibility for the name.
3930 (Create_Finalizer_String): Removed.
3931 (New_Finalizer_Name): New routine which mimics New_..._Name.
3933 2011-08-04 Eric Botcazou <ebotcazou@adacore.com>
3935 * sem_elab.adb (Check_Internal_Call_Continue): Change the type of the
3936 elaboration counter to Standard_Short_Integer.
3937 * sem_util.adb (Build_Elaboration_Entity): Likewise.
3938 * bindgen.adb (Gen_Elab_Externals_Ada): Adjust to above change.
3939 (Gen_Elab_Externals_C): Likewise.
3941 2011-08-04 Ed Falis <falis@adacore.com>
3943 * system-vxworks-arm.ads, system-vxworks-sparcv9.ads,
3944 system-vxworks-ppc.ads, system-vxworks-m68k.ads,
3945 system-vxworks-mips.ads, system-vxworks-x86.ads
3946 (Always_Compatible_Rep): set to False for all VxWorks targets.
3948 2011-08-04 Robert Dewar <dewar@adacore.com>
3950 * par_sco.adb, prj-proc.adb, make.adb, bindgen.adb, prj.adb, prj.ads,
3951 makeutl.adb, makeutl.ads, prj-nmsc.adb, exp_ch5.adb, exp_ch12.adb,
3952 exp_ch7.ads, exp_util.ads, sem_util.ads, g-comlin.ads, exp_ch6.adb,
3953 exp_ch6.ads, lib-xref.ads, exp_ch7.adb, exp_util.adb, exp_dist.adb,
3954 exp_strm.adb, gnatcmd.adb, freeze.adb, g-comlin.adb, lib-xref-alfa.adb,
3955 sem_attr.adb, sem_prag.adb, sem_util.adb, sem_elab.adb, sem_ch8.adb,
3956 sem_ch11.adb, sem_eval.adb, sem_ch13.adb, sem_disp.adb, a-fihema.adb:
3957 Minor reformatting and code reorganization.
3959 2011-08-04 Emmanuel Briot <briot@adacore.com>
3961 * projects.texi: Added doc for aggregate projects.
3963 2011-08-04 Emmanuel Briot <briot@adacore.com>
3965 * prj-proc.adb, prj-nmsc.adb, prj-env.adb (Process_Declarative_Items):
3966 Add support for overriding the Project_Path in aggregate projects.
3968 2011-08-04 Robert Dewar <dewar@adacore.com>
3970 * a-cofove.ads: Minor reformatting.
3972 2011-08-04 Hristian Kirtchev <kirtchev@adacore.com>
3974 * exp_ch7.adb (Build_Adjust_Or_Finalize_Statements): Update the comment
3975 on the generated code.
3976 (Build_Finalize_Statements): Update the comment on the generated code.
3977 (Build_Initialize_Statements): Update the comment on the generated code.
3978 (Build_Object_Declarations): Add local variable Result. The object
3979 declarations are now built in sequence.
3980 * rtsfind.ads: Add RE_Exception_Occurrence_Access to tables RE_Id and
3983 2011-08-04 Robert Dewar <dewar@adacore.com>
3985 * checks.adb, alfa.adb, alfa.ads: Minor reformatting.
3987 2011-08-04 Eric Botcazou <ebotcazou@adacore.com>
3989 * einfo.ads (Elaboration_Entity): Document new definition and use.
3990 (Elaboration_Entity_Required): Adjust to above change.
3991 * exp_attr.adb (Expand_N_Attribute_Reference): Likewise.
3992 * exp_ch12.adb: And with and use for Snames.
3993 (Expand_N_Generic_Instantiation): Test 'Elaborated attribute.
3994 * exp_util.adb (Set_Elaboration_Flag): Likewise.
3995 * sem_attr.adb (Analyze_Attribute) <Check_Library_Unit>: Delete.
3996 <Check_Unit_Name>: Deal with N_Expanded_Name.
3997 <Attribute_Elaborated>: Extend to all unit names.
3998 * sem_elab.adb: And with and use for Uintp.
3999 (Check_Internal_Call_Continue): Adjust to Elaboration_Entity change.
4000 * sem_util.ads (Build_Elaboration_Entity): Adjust comment.
4001 * sem_util.adb (Build_Elaboration_Entity): Change type to Integer.
4002 * bindgen.adb (Gen_Elab_Externals_Ada): New local subprogram taken
4003 from Gen_Adainit_Ada.
4004 (Gen_Elab_Externals_C): Likewise, but taken from Gen_Adainit_C.
4005 (Gen_Adafinal_Ada): Remove redundant test. In the non-main program
4006 case, do not call System.Standard_Library.Adafinal; instead call
4007 finalize_library if needed.
4008 (Gen_Adafinal_C): Likewise.
4009 (Gen_Adainit_Ada): Do not set SSL.Finalize_Library_Objects in the
4010 non-main program case.
4011 (Gen_Adainit_C): Generate a couple of external declarations here.
4012 In the main program case, set SSL.Finalize_Library_Objects.
4013 (Gen_Elab_Calls_Ada): Adjust to Elaboration_Entity change.
4014 (Gen_Elab_Calls_C): Likewise.
4015 (Gen_Finalize_Library_Ada): Likewise. Skip SAL interface units.
4016 (Gen_Finalize_Library_C): Likewise. Generate a full function.
4017 (Gen_Main_C): Put back call to Ada_Final and don't finalize library
4019 (Gen_Output_File_Ada): Generate pragma Linker_Destructor for Ada_Final
4020 if -a is specified. Call Gen_Elab_Externals_Ada. Move around call to
4022 (Gen_Output_File_C): Generate __attribute__((destructor)) for Ada_Final
4023 if -a is specified. Call Gen_Elab_Externals_C. Remove useless couple
4024 of external declarations. Call Gen_Finalize_Library_C.
4026 2011-08-04 Emmanuel Briot <briot@adacore.com>
4028 * prj.adb, prj.ads, makeutl.adb, makeutl.ads (Complete_Mains,
4029 Compute_Compilation_Phases): new subprogram.
4030 (Builder_Data, Builder_Project_Tree_Data): new subprogram and type
4031 The number of mains as well as the various compilation phases that
4032 need to be run are now project tree specific, since various
4033 aggregated trees might have different requirements. In particular,
4034 they do not all require bind or link phases.
4036 2011-08-04 Emmanuel Briot <briot@adacore.com>
4038 * prj.adb, prj.ads, makeutl.adb, makeutl.ads, prj-env.adb
4039 (Project_Tree_Appdata): New type.
4040 It is now possible to associate application-specific data to a project
4041 tree. In particular, this is used in the gprbuild builder to avoid a
4042 number of global tables and htables, especially now that there can be
4043 several project trees loaded at once because of aggregate projects.
4044 (Debug_Name): new procedure.
4045 * projects.texi: Clarify syntax of "**" for Source_Dirs
4047 2011-08-03 Emmanuel Briot <briot@adacore.com>
4049 * prj.ads, makeutl.adb, makeutl.ads (Queue.Insert): now also inserts
4050 the "roots" for a main.
4051 (Fill_From_Project): add support for aggregate projects. Main units
4052 in aggregated projects are now automatically added in the list of
4053 files to build (although this fails later on in gprbuild, because
4054 these files are not using the root proejct tree, so this needs
4056 * gcc-interface/Make-lang.in: Update dependencies.
4058 2011-08-03 Yannick Moy <moy@adacore.com>
4060 * sem_ch4.adb (Analyze_Conditional_Expression): only allow boolean
4061 conditional expression in ALFA.
4062 * sem_res.adb (Resolve_Conditional_Expression): mark non-boolean
4063 expressions as not in ALFA.
4065 2011-08-03 Robert Dewar <dewar@adacore.com>
4067 * a-cofove.adb: Minor reformatting.
4069 2011-08-03 Emmanuel Briot <briot@adacore.com>
4071 * make.adb, prj.adb, prj.ads, makeutl.adb, makeutl.ads
4072 (Insert_Project_Sources, Insert_withed_Sources_For): moved from the
4074 These packages are more logically placed in the Queue package, since
4075 they manipulate the queue. It is also likely that they can be adapted
4076 for gnatmake, thus sharing more code.
4077 (Finish_Program, Fail_Program): moved from the gprbuild sources, so
4078 that we could move the above.
4080 2011-08-03 Emmanuel Briot <briot@adacore.com>
4082 * errutil.adb (Finalize): clean up the list of error messages on exit.
4083 Calling this subprogram multiple times will no longer show duplicate
4084 error messages on stderr.
4086 2011-08-03 Emmanuel Briot <briot@adacore.com>
4088 * g-comlin.adb, g-comlin.ads (Set_Command_Line): ignore the parameter
4089 Getopt_Switches when we have already define a command line
4092 2011-08-03 Yannick Moy <moy@adacore.com>
4094 * sem_ch11.adb (Analyze_Raise_xxx_Error): do not mark such nodes as not
4095 in ALFA. Instead, they are considered as assertions to prove.
4096 * sem_ch4.adb (Analyze_Conditional_Expression): do not always mark such
4097 nodes as not in ALFA. Instead, include conditional expressions in ALFA
4098 if they have no ELSE part, or if they occur in pre- and postconditions,
4099 where the Condition cannot have side-effects in ALFA
4100 (Analyze_Membership_Op): do not mark such nodes as not in ALFA
4101 (Analyze_Type_Conversion): do not always mark such nodes as not in ALFA.
4102 Instead, include type conversion between scalar types in ALFA.
4103 * sem_ch6.adb (Process_Formals): correctly mark a parameter in ALFA
4104 if-and-only-if its type is in ALFA.
4106 2011-08-03 Thomas Quinot <quinot@adacore.com>
4108 * scos.adb, get_scos.adb, put_scos.adb
4109 New code letter for decisions: G (entry guard)
4111 (Traverse_Subprogram_Body): Rename to...
4112 (Traverse_Subprogram_Or_Task_Body): New subrpogram.
4113 (Traverse_Protected_Body): New subprogram
4114 (Traverse_Declarations_Or_Statements): Add traversal of task bodies,
4115 protected bodies and entry bodies.
4117 2011-08-03 Yannick Moy <moy@adacore.com>
4119 * einfo.adb, einfo.ads (Is_Postcondition_Proc): new flag for procedure
4120 entities with get/set subprograms, which is set on procedure entities
4121 generated by the compiler for a postcondition.
4122 * sem_ch6.adb (Process_PPCs): set new flag on postcondition procedures
4123 * alfa.adb, alfa.ads (Get_Entity_For_Decl): new function returning the
4124 entity for a declaration
4125 (Get_Unique_Entity_For_Decl): new function returning an entity which
4126 represents a declaration, so that matching spec and body have the same
4129 2011-08-03 Robert Dewar <dewar@adacore.com>
4131 * a-except-2005.adb, a-cfhama.adb, a-cfhase.adb, a-cfhase.ads,
4132 a-cforma.adb, a-cforse.ads, a-cforse.adb: Minor reformatting
4134 2011-08-03 Yannick Moy <moy@adacore.com>
4136 * lib-xref-alfa.adb (Detect_And_Add_ALFA_Scope): make the subprogram
4137 library-level because retriction No_Implicit_Dynamic_Code in the
4138 front-end prevents its definition as a local subprogram
4139 (Traverse_Compilation_Unit): extract new procedure from Add_ALFA_File,
4140 for reuse in other contexts
4141 (Traverse_Declarations_Or_Statements,
4142 Traverse_Handled_Statement_Sequence, Traverse_Package_Body,
4143 Traverse_Package_Declaration, Traverse_Subprogram_Body): make all these
4144 procedures take a callback parameter to be called on all declarations
4146 (Traverse_All_Compilation_Units): new generic function to traverse a
4147 compilation unit and call a callback parameter on all declarations
4149 2011-08-03 Javier Miranda <miranda@adacore.com>
4151 * sem_prag.adb (Process_Interface_Name): Allow duplicated export names
4152 in Java since they are always enclosed in a namespace that
4153 differentiates them, and overloaded entities are supported by the VM.
4155 2011-08-03 Ed Schonberg <schonberg@adacore.com>
4157 * checks.adb (Determine_Range): If a computed bound of an operation is
4158 outside the range of the base type of the expression, and overflow
4159 checks are enabled, the result is unknown and cannot be used for any
4160 subsequent constant folding.
4161 * sem_eval.adb (Compile_Time_Compare): if the bounds of one operand are
4162 unknown, so is the result of the comparison.
4164 2011-08-03 Hristian Kirtchev <kirtchev@adacore.com>
4166 * a-except-2005.adb (Raise_From_Controlled_Operation): Add new formal
4167 From_Abort. When finalization was triggered by an abort, propagate
4168 Standard'Abort_Signal rather than Program_Error.
4169 * a-except-2005.ads (Raise_From_Controlled_Operation): Add new formal
4171 * a-except.adb (Raise_From_Controlled_Operation): Add new formal
4172 From_Abort. When finalization was triggered by an abort, propagate
4173 Standard'Abort_Signal rather than Program_Error.
4174 * a-except.ads:(Raise_From_Controlled_Operation): Add new formal
4176 * exp_ch7.adb:(Build_Adjust_Or_Finalize_Statements): New local variable
4177 Abort_Id. Update the calls to Build_Object_Declarations and
4178 Build_Raise_Statement to include Abort_Id.
4179 (Build_Adjust_Statements): New local variable Abort_Id. Update the
4180 calls to Build_Object_Declarations and Build_Raise_Statement to include
4182 (Build_Finalize_Statements): New local variable Abort_Id. Update the
4183 calls to Build_Object_Declarations and Build_Raise_Statement to include
4185 (Build_Components): Create an entity for Abort_Id when exceptions are
4186 allowed on the target.
4187 (Build_Finalizer): New local variable Abort_Id.
4188 (Build_Initialize_Statements): New local variable Abort_Id. Update the
4189 calls to Build_Object_Declarations and Build_Raise_Statement to include
4191 (Build_Object_Declarations): Add new formal Abort_Id. Create the
4192 declaration of flag Abort_Id to preserve the original abort status
4193 before finalization code is executed.
4194 (Build_Raise_Statement): Add new formal Abort_Id. Pass Abort_Id to
4195 runtime routine Raise_From_Controlled_Operation.
4196 (Create_Finalizer): Update the call to Build_Raise_Statement to include
4197 Abort_Id. Update the call to Build_Object_Declarations to include
4198 Abort_Id. Update the layout of the finalizer body.
4199 (Make_Handler_For_Ctrl_Operation): Add an actual for From_Abort.
4200 (Process_Transient_Objects): New local variable Abort_Id. Remove the
4201 clunky code to create all flags and objects related to
4202 exception propagation and replace it with a call to
4203 Build_Object_Declarations. Update the call to Build_Raise_Statement to
4205 * exp_ch7.ads (Build_Object_Declarations): Moved from body to spec.
4206 Add new formal Abort_Id and associated comment on its use.
4207 (Build_Raise_Statement): Add new formal Abort_Id and associated comment
4209 * exp_intr.adb (Expand_Unc_Deallocation): New local variable Abort_Id.
4210 Remove the clunky code to create all flags and objects related to
4211 exception propagation and replace it with a call to
4212 Build_Object_Declarations. Update the call to Build_Raise_Statement.
4214 2011-08-03 Eric Botcazou <ebotcazou@adacore.com>
4216 * s-tassta.adb: Fix minor typos.
4218 2011-08-03 Robert Dewar <dewar@adacore.com>
4220 * rtsfind.ads, makeutl.ads, prj.ads, prj.adb, make.adb,
4221 lib-writ.adb, makeutl.adb, s-soflin.ads, clean.adb: Minor reformatting.
4223 2011-08-03 Hristian Kirtchev <kirtchev@adacore.com>
4225 * exp_ch7.adb (Create_Finalizer): Treat freeze nodes in similar fashion
4226 to packages. This ensures that the finalizer body will not end up
4227 inside the freeze node.
4228 (Process_Declarations): Add code to detect whether a freeze node has a
4229 nested finalization collection.
4231 2011-08-03 Pascal Obry <obry@adacore.com>
4233 * g-awk.adb, g-awk.ads: Make GNAT.AWK API compatible with Ada 2005.
4234 (Current_Session): Return a not null access to Session_Type.
4235 (Default_Session): Likewise.
4237 2011-08-03 Robert Dewar <dewar@adacore.com>
4239 * a-cfdlli.adb, bindgen.adb, exp_ch4.adb, exp_ch13.adb, sem_warn.adb,
4240 exp_ch3.adb, exp_ch3.ads: Minor reformatting.
4242 2011-08-03 Pascal Obry <obry@adacore.com>
4244 * g-awk.ads: Minor comment fix.
4246 2011-08-03 Sergey Rybin <rybin@adacore.com>
4248 * tree_io.ads (ASIS_Version_Number): Update because of the changes in
4249 the tree structure related to discriminant constraints.
4250 Original_Discriminant cannot be used any more for computing the
4251 defining name for the reference to a discriminant.
4253 2011-08-03 Ed Schonberg <schonberg@adacore.com>
4255 * sem_disp.adb (Is_Tag_Indeterminate): If the return type of the
4256 function is not visibly tagged, this is not a dispatching call and
4257 therfore is not Tag_Indeterminate, even if the function is marked as
4258 dispatching on result.
4260 2011-08-03 Hristian Kirtchev <kirtchev@adacore.com>
4262 * exp_ch13.adb: Add with and use clauses for Restrict and Rident.
4263 (Expand_N_Free_Statement): Add a guard to protect against run-times
4264 which do not support controlled types.
4265 * exp_ch3.adb (Expand_Freeze_Class_Wide_Type): Add a guard to protect
4266 against run-times which do not support controlled types.
4267 * exp_ch4.adb (Complete_Controlled_Allocation): Add a guard to protect
4268 against run-times which do not support controlled types.
4269 * exp_ch7.adb (Build_Finalization_Collection): Add a guard to protect
4270 against run-times which do not support controlled types.
4271 * exp_util.adb (Needs_Finalization): Code reformatting. Add a guard to
4272 protect against run-times which do not support controlled types.
4274 2011-08-03 Eric Botcazou <ebotcazou@adacore.com>
4276 * exp_intr.adb: Put back with and use clauses for Exp_Ch11.
4277 (Expand_Unc_Deallocation): Expand the AT_END handler at the very end.
4279 2011-08-03 Ed Schonberg <schonberg@adacore.com>
4281 * exp_ch5.adb (Expand_Iterator_Loop): indicate that the cursor is
4282 modified in the source, to prevent spurious warnings when compiling
4285 2011-08-03 Thomas Quinot <quinot@adacore.com>
4287 * a-except-2005.adb: Minor reformatting.
4289 2011-08-03 Ed Schonberg <schonberg@adacore.com>
4291 * sem_warn.adb (Check_One_Unit): if the only mention of a withed unit
4292 is a renaming declaration in the private part of a package, do not emit
4293 a warning that the with_clause could be moved because the renaming may
4294 be used in the body or in a child unit.
4296 2011-08-03 Hristian Kirtchev <kirtchev@adacore.com>
4298 * exp_ch6.adb (Make_Build_In_Place_Call_In_Object_Declaration):
4299 Propagate the Comes_From_Source attribute from the original return
4300 object to the renaming.
4302 2011-08-03 Jose Ruiz <ruiz@adacore.com>
4304 * exp_ch7.adb (Build_Raise_Statement): Do not call
4305 Raise_From_Controlled_Operation when this routine is not present in
4306 the run-time library.
4307 (Cleanup_Protected_Object, Cleanup_Task): For restricted run-time
4308 libraries (Ravenscar), tasks are non-terminating, and protected objects
4309 and tasks can only appear at library level, so we do not want
4310 finalization of protected objects nor tasks.
4311 * exp_intr.adb: Minor clarification in comment.
4312 bindgen.adb (Gen_Adainit_Ada, Gen_Main_C, Gen_Output_File_Ada,
4313 Gen_Output_File_C): Remove references to finalization of library-level
4314 objects when using restricted run-time libraries.
4316 2011-08-03 Ed Schonberg <schonberg@adacore.com>
4318 * sem_ch3.adb (Build_Discriminant_Constraints): Set
4319 Original_Discriminant only if the parent type is a generic formal.
4321 2011-08-03 Hristian Kirtchev <kirtchev@adacore.com>
4323 * exp_ch13.adb: Add with and use clause for Targparm;
4324 (Expand_N_Free_Statement): Prevent the generation of a custom
4325 Deallocate on .NET/JVM targets since this requires pools and address
4327 * exp_ch4.adb (Expand_Allocator_Expression): When compiling for
4328 .NET/JVM targets, attach the newly allocated object to the access
4329 type's finalization collection. Do not generate a call to
4330 Set_Finalize_Address_Ptr on .NET/JVM because this routine does not
4331 exist in the runtime.
4332 (Expand_N_Allocator): When compiling for .NET/JVM targets, do not
4333 create a custom Allocate for object that do not require initialization.
4334 Attach a newly allocated object to the access type's finalization
4335 collection on .NET/JVM.
4336 * exp_ch5.adb (Make_Tag_Ctrl_Assignment): Add special processing for
4337 assignment of controlled types on .NET/JVM. The two hidden pointers
4338 Prev and Next and stored and later restored after the assignment takes
4340 * exp_ch6.adb (Expand_Call): Add local constant Curr_S. Add specialized
4341 kludge for .NET/JVM to recognize a particular piece of code coming from
4342 Heap_Management and change the call to Finalize into Deep_Finalize.
4343 * exp_ch7.adb (Build_Finalization_Collection): Allow the creation of
4344 finalization collections on .NET/JVM only for types derived from
4345 Controlled. Separate the association of storage pools with a collection
4346 and only allow it on non-.NET/JVM targets.
4347 (Make_Attach_Call): New routine.
4348 (Make_Detach_Call): New routine.
4349 (Process_Object_Declarations): Suppress the generation of
4350 build-in-place return object clean up code on .NET/JVM since it uses
4352 * exp_ch7.ads (Make_Attach_Call): New routine.
4353 (Make_Detach_Call): New routine.
4354 * exp_intr.adb Add with and use clause for Targparm.
4355 (Expand_Unc_Deallocation): Detach a controlled object from a collection
4356 on .NET/JVM targets.
4357 * rtsfind.ads: Add entries RE_Attach, RE_Detach and
4358 RE_Root_Controlled_Ptr to tables RE_Id and RE_Unit_Table.
4359 * snames.ads-tmpl: Add name Name_Prev. Move Name_Prev to the special
4360 names used in finalization.
4362 2011-08-03 Hristian Kirtchev <kirtchev@adacore.com>
4364 * a-fihema.adb: Add with and use clauses for System.Soft_Links.
4365 (Attach, Detach): Lock the current task when chaining an object onto a
4368 2011-08-03 Hristian Kirtchev <kirtchev@adacore.com>
4370 * a-except.adb, a-except-2005.adb (Raise_From_Controlled_Operation):
4371 Rewritten to create the message strings when the exception is not
4372 raised by an abort during finalization.
4373 * a-except.ads, a-except-2005.ads: Add pragma Export for procedure
4374 Raise_From_Controlled_Operation and update its associated comment.
4375 * a-fihema.ads, a-fihema.adb: New GNAT unit.
4376 Ada.Finalization.Heap_Management provides key functionality
4377 associated with controlled objects on the heap, their creation,
4378 finalization and reclamation. Type Finalization_Collection is
4379 effectively a wrapper which sits ontop of a storage pool and performs
4380 all necessary bookkeeping for all the objects it contains. Each
4381 access-to-controlled or access-to-class-wide type receives a collection
4382 as part of its expansion. The compiler generates buffer code and
4383 invokes Allocate / Deallocate to create and destroy allocated
4385 * a-finali.adb ("="): Removed.
4386 * a-finali.ads ("="): Removed. Controlled types no longer carry hidden
4387 fields Prev and Next.
4388 * ali.adb (Scan_ALI): Add parsing code to process PF / Has_Finalizer.
4389 A library unit with at least one controlled object on the library level
4390 has a special finalizer which is invoked by the binder. To signal this,
4391 ali files carry field PF.
4392 * ali.ads: New field in type Unit_Record called Has_Finalizer. Add
4393 associated comment on field usage.
4394 * a-tags.adb (Get_RC_Offset): Removed.
4395 (Needs_Finalization): New routine.
4396 * a-tags.ads: Update the structure of the GNAT dispatch tables.
4397 Dispatch tables now carry field Needs_Finalization which provides
4398 runtime indication whether a type is controlled or has controlled
4399 components or both. Remove field RC_Offset.
4400 (Get_RC_Offset): Removed along with its associated pragma Export.
4401 Since tagged types with controlled components no longer carry hidden
4402 field _controller, the special mechanism to retrieve its location is no
4404 (Needs_Finalization): New routine.
4405 * atree.ads, atree.adb (Elist24): New routine.
4406 (Set_Elist24): New routine.
4407 * atree.h: Add a define clause for Elist24.
4408 * bindgen.adb New library-level variable Lib_Final_Built.
4409 (Gen_Adafinal_Ada): Reimplemented. Depending on the restrictions or the
4410 presence of a VM target, the routine generates calls to the proper
4411 library finalization routine.
4412 (Gen_Adainit_Ada): Import Finalize_Library_Objects only on non-VM
4413 targets. Set the correct library finalization routine depending on
4414 whether the library has controlled objects or this is a VM compilation.
4415 (Gen_Finalize_Library_Ada): New routine. This procedure generates calls
4416 to library-level finalizers of compiled units in reverse order of
4417 elaboration. It also produces exception management code and reraises a
4418 potential exception after all units have been finalized.
4419 (Gen_Finalize_Library_C): New routine. This procedure generates calls to
4420 library-level finalizers of compiled units in reverse order of
4422 (Gen_Finalize_Library_Defs_C): New routine. This procedure generates the
4423 definitions of all library-level finalizers available to the compilation
4424 (Gen_Main_Ada): Directly call Adafinal which now contails all target
4426 (Gen_Main_C): Add new local constant Needs_Library_Finalization. Call
4427 System.Standard_Library.Adafinal directly. If the library needs
4428 finalization actions, create the sequence of finalization calls.
4429 (Gen_Output_File_Ada): Alphabetize local variables and constants.
4430 Generate a with clause for System.Soft_Links when compiling for a VM.
4431 Remove the code which imports System.Standard_Library.Adafinal as
4432 Do_Finalize. Generate the library finalization routine.
4433 (Gen_Output_File_C): Add new local constant Needs_Library_Finalization.
4434 If the library needs finalization actions, create all the definitions
4435 of library- level finalizers.
4436 (Has_Finalizer): New routine. Determines whether at least one compiled
4437 unit has a library-level finalizer.
4438 Add type Qualification_Mode.
4439 (Set_Unit_Name): Add a formal which controls the replacement of a dot.
4440 * einfo.adb: New usage of field 15 as Return_Flag.
4441 Remove Finalization_Chain_Entity from the usages of field 19.
4442 Remove Associated_Final_Chain from the usages of field 23.
4443 New usage of field 23 as Associated_Collection.
4444 New usage of field 24 as Finalizer.
4445 New usage of flag 252 as Is_Processed_Transient.
4446 (Associated_Final_Chain): Removed.
4447 (Associated_Collection): New routine.
4448 (Finalization_Chain_Entity): Removed.
4449 (Finalizer): New routine.
4450 (Is_Finalizer): New routine.
4451 (Is_Processed_Transient): New routine.
4452 (Return_Flag): New routine.
4453 (Set_Associated_Final_Chain): Removed.
4454 (Set_Associated_Collection): New routine.
4455 (Set_Finalization_Chain_Entity): Removed.
4456 (Set_Finalizer): New routine.
4457 (Set_Is_Processed_Transient): New routine.
4458 (Set_Return_Flag): New routine.
4459 (Write_Entity_Flags): Include Is_Processed_Transient to the list of
4461 (Write_Field8_Name): Alphabetize the output.
4462 (Write_Field11_Name): Alphabetize the output.
4463 (Write_Field12_Name): Alphabetize the output.
4464 (Write_Field13_Name): Alphabetize the output.
4465 (Write_Field14_Name): Alphabetize the output.
4466 (Write_Field15_Name): Alphabetize the output.
4467 (Write_Field16_Name): Alphabetize the output.
4468 (Write_Field17_Name): Alphabetize the output.
4469 (Write_Field18_Name): Alphabetize the output.
4470 (Write_Field19_Name): Alphabetize the output. Remove the output of
4471 Finalization_Chain_Entity.
4472 (Write_Field20_Name): Alphabetize the output.
4473 (Write_Field21_Name): Alphabetize the output.
4474 (Write_Field22_Name): Alphabetize the output.
4475 (Write_Field23_Name): Alphabetize the output. Remove the output of
4476 Associated_Final_Chain. Add output for Associated_Collection.
4477 (Write_Field24_Name): Alphabetize the output.
4478 (Write_Field25_Name): Add output for Finalizer.
4479 (Write_Field26_Name): Alphabetize the output.
4480 (Write_Field27_Name): Alphabetize the output.
4481 (Write_Field28_Name): Alphabetize the output.
4482 * einfo.ads: Add new field description for Associated_Collection and
4484 Remove Associated_Final_Chain and its uses in nodes.
4485 Remove Finalization_Chain_Entity and its uses in nodes.
4486 Add new field description for Finalizer and its uses in nodes.
4487 Add new synthesized attribute Is_Finalizer.
4488 Add new flag description for Is_Processed_Transient and its uses in
4490 Add new field description for Return_Flag and its uses in nodes.
4491 (Associated_Final_Chain): Removed along with its pragma Inline.
4492 (Associated_Collection): New routine and pragma Inline.
4493 (Finalization_Chain_Entity): Removed along with its pragma Inline.
4494 (Finalizer): New routine and pragma Inline.
4495 (Is_Finalizer): New routine and pragma Inline.
4496 (Is_Processed_Transient): New routine and pragma Inline.
4497 (Return_Flag): New routine and pragma Inline.
4498 (Set_Associated_Final_Chain): Removed along with its pragma Inline.
4499 (Set_Associated_Collection): New routine and pragma Inline.
4500 (Set_Finalization_Chain_Entity): Removed along with its pragma Inline.
4501 (Set_Finalizer): New routine and pragma Inline.
4502 (Set_Is_Processed_Transient): New routine and pragma Inline.
4503 (Set_Return_Flag): New routine and pragma Inline.
4504 * exp_aggr.adb: Alphabetize subprograms.
4505 (Build_Array_Aggr_Code): Remove formal Flist and its associated comment.
4506 (Build_Record_Aggr_Code): Remove formals Flist and Obj along with their
4507 associated comments. Remove local variables External_Final_List and
4509 Rename Ctrl_Stuff_Done to Finalization_Done. Rename local variable A to
4510 Ancestor. Remove the retrieval of finalization lists. Update the call to
4512 (Convert_Aggr_In_Allocator): Remove the retrieval of finalization
4513 lists. Update the call to Late_Expansion.
4514 (Convert_Aggr_In_Assignment): Update the call to Late_Expansion.
4515 (Convert_Aggr_In_Object_Decl): Update the call to Late_Expansion.
4516 (Gen_Assign): Remove the retrieval of the finalization list used to
4517 build the assignment. Update the calls to Make_Init_Call and
4519 (Gen_Ctrl_Actions_For_Aggr): Renamed to Generate_Finalization_Actions.
4520 Remove the mechanism to determine attachment levels and finalization
4521 list retrieval. Remove the processing for coextensions.
4522 (Init_Controller): Removed. Controllers no longer exist.
4523 (Late_Expansion): Remove formals Flist and Obj along with their
4524 associated comments. Update the calls to Build_Record_Aggr_Code and
4525 Build_Array_Aggr_Code.
4526 * exp_ch13.adb (Expand_N_Free_Statement): New routine.
4527 (Expand_N_Freeze_Entity): Add special processing for finalizers which
4528 appear in entry bodies, protected subprograms and task bodies.
4529 * exp_ch13.ads (Expand_N_Free_Statement): New routine.
4530 * exp_ch3.adb (Add_Final_Chain): Removed.
4531 (Build_Array_Init_Proc): Alphabetize local variables.
4532 (Build_Assignment): Alphabetize local variables. Update the call to
4534 (Build_Class_Wide_Master): Rename local variables to better reflect
4536 (Build_Discriminant_Assignments): Code reformatting.
4537 (Build_Init_Call_Thru): Code reformatting.
4538 (Build_Init_Procedure): Code reformatting. Generate a special version
4539 of Deep_Finalize which is capable of finalizing all initialized
4540 components and ignore the rest.
4541 (Build_Init_Statements): Rename local variables to better reflect their
4543 Reimplement the mechanism to include the creation and update of an index
4544 variable called a "counter". It is used as a bookmark for tracing
4545 initialized and non-initialized components.
4546 (Build_Initialization_Call): Remove local variable Controller_Typ.
4547 Alphabetize all local variables. Remove the initialization of the
4548 record controller and update the call to Make_Init_Call.
4549 (Build_Record_Init_Proc): Rename formal Pe to Rec_Ent.
4550 New local variable Counter.
4551 (Constrain_Array): Alphabetize.
4552 (Expand_Freeze_Array_Type): Create a collection instead of a
4554 (Expand_Freeze_Class_Wide_Type): New routine. Creates TSS primitive
4555 Finalize_Address which is used in conjunction with allocated controlled
4557 (Expand_N_Object_Declaration): Remove the creation of a finalization
4558 list for anonymous access types. Update the calls to Make_Init_Call and
4560 (Expand_Freeze_Record_Type): Remove local variable Flist. Remove the
4561 retrieval of finalization lists. Remove the expansion of the record
4562 controller. Create TSS primitive Finalize_Address used in conjunction
4563 with controlled objects on the heap. Create finalization collections
4564 for access-to-controlled record components.
4565 (Expand_Record_Controller): Removed.
4566 (Freeze_Type): Remove the freezing of record controllers. Freezing of
4567 class-wide types now requires additional processing. Create
4568 finalization collections for access-to-controlled types.
4569 (Increment_Counter): New routine.
4570 (Make_Counter): New routine.
4571 (Make_Eq_If): Remove the mention of Name_uController.
4572 (Make_Predefined_Primitive_Specs): There is no longer need to skip
4573 types coming from System.Finalization_Root.
4574 (Predef_Deep_Spec): Reimplemented to reflect the new parameter profiles.
4575 (Predefined_Primitive_Bodies): There is no longer need to skip types
4576 coming from System.Finalization_Root.
4577 (Stream_Operation_OK): Do not generate stream routines for
4578 type Ada.Finalization.Heap_Management.Finalization_Collection.
4579 * exp_ch3.ads: Alphabetize subprograms.
4580 * exp_ch4.adb: Remove with and use clause for Sem_Ch8.
4581 Add with and use clause for Lib.
4582 (Complete_Coextension_Finalization): Removed.
4583 (Complete_Controlled_Allocation): New routine. Create a finalization
4584 collection for anonymous access-to-controlled types. Create a custom
4585 Allocate which interfaces with the back end and the machinery in
4587 (Expand_Allocator_Expression): Add necessary calls to
4588 Complete_Controlled_Allocation. Remove the retrieval of finalization
4589 lists. Update the calls to Make_Adjust_Call. Generate a call to
4590 Ada.Finalization.Heap_Management.Set_Finalize_Address_Ptr to decorate
4591 the associated collection.
4592 (Expand_N_Allocator): Remove the processing for dynamic coextensions.
4593 Code clean up. Remove the retrieval of finalization lists and
4595 Update the call to Make_Init_Call. Generate a call to
4596 Ada.Finalization.Heap_Management.Set_Finalize_Address_Ptr to decorate
4597 the associated collection.
4598 (Get_Allocator_Final_List): Removed. Finalization lists are not
4600 (Suitable_Element): Remove the mention of Name_uController.
4601 * exp_ch5.adb: Remove with and use clauses for Ttypes and Uintp.
4602 (Make_Tag_Ctrl_Assignment): Rewritten to simply do a finalization of
4603 the left hand side, carry out the assignment and adjust the left hand
4605 * exp_ch6.adb (Add_Final_List_Actual_To_Build_In_Place_Call): Removed.
4606 (Add_Collection_Actual_To_Build_In_Place_Call): New routine.
4607 (BIP_Formal_Suffix): Rename BIP_Final_List and BIPfinallist to
4608 BIP_Collection and BIPcollection.
4609 (Build_Heap_Allocator): New routine used to allocate the return object
4610 of a build-in-place function onto a collection.
4611 (Expand_Ctrl_Function_Call): Moved from Exp_Ch7.
4612 (Expand_Call): Do not replace direct calls to Deep routines with their
4614 (Expand_N_Extended_Return_Statement): Give all variables shorter names
4615 and update their occurrences. Add a special return flag to monitor the
4616 [ab]normal execution of the function. The flag is set right before the
4618 Rewrite the mechanism used to allocate a build-in-place return object
4619 on the heap or on a storage pool.
4620 (Is_Direct_Deep_Call): New routine.
4621 (Make_Build_In_Place_Call_In_Allocator): Add a collection to a
4622 build-in-place function call instead of a final list. Build a call to
4623 Set_Finalize_Address_Ptr to decorate the associated collection.
4624 (Make_Build_In_Place_Call_In_Anonymous_Context): Create a temporary in
4625 order to name the build-in-place function call's result for later
4626 finalization. Add a collection to a build-in-place function call
4627 instead of a final list.
4628 (Make_Build_In_Place_Call_In_Assignment): Add a collection to a
4629 build-in-place function call instead of a final list. Remove the code
4630 which moves one final list and transforms it into the actual in a
4631 nested build-in-place call.
4632 (Make_Build_In_Place_Call_In_Object_Declaration): Add a collection to a
4633 build-in-place function call instead of a final list.
4634 (Move_Final_List): Removed.
4635 (Needs_BIP_Collection): New routine.
4636 (Needs_BIP_Final_List): Removed.
4637 * exp_ch6.ads: Replace BIP_Final_List with BIP_Collection in
4638 enumeration type BIP_Formal_Kind.
4639 Update the related comment.
4640 (Needs_BIP_Collection): New routine.
4641 (Needs_BIP_Final_List): Removed.
4642 * exp_ch7.adb: Add with and use clauses for Elists, Exp_Ch6, Stringt
4643 and Ttypes. Remove with and use clauses for Sem_Type. Alphabetize the
4644 majority of subprograms in this unit. Add Name_Finalize_Address to
4645 array Name_Of and TSS_Finalize_Address to array Deep_Name_Of.
4646 (Build_Adjust_Or_Finalize_Statements): Create the adjust or finalization
4647 statements for an array type.
4648 (Build_Adjust_Statements): Create the adjust statements for a record
4650 (Build_Cleanup_Statements): New routine. A procedure which given any
4651 construct containing asynchronous calls, references to _master, or is a
4652 task body, a task allocation or a protected body produces the necessary
4653 runtime calls to clean up these constructs.
4654 (Build_Exception_Handler): New routine.
4655 (Build_Final_List): Removed.
4656 (Build_Finalization_Collection): New routine. A core procedure which
4657 creates a collection to service heap allocated controlled objects
4658 associated with an access-to-controlled type.
4659 (Build_Finalize_Statements): Create the finalization statements for a
4661 (Build_Finalizer): New routine. A core procedure which given any
4662 construct with declarations and/or statements detects all objects which
4663 need any type of clean up (controlled objects, protected objects) and
4664 generates all necessary code to clean up the said objects in the proper
4666 (Build_Finalizer_Call): New routine.
4667 (Build_Initialize_Statements): Create the initialization statements for
4668 an array type. The generated routine contains code to finalize partially
4670 (Build_Object_Declarations): New routine.
4671 (Build_Raise_Statement): New routine.
4672 (Clean_Simple_Protected_Objects): Removed.
4673 (Controller_Component): Removed.
4674 (Enclosing_Function): New routine.
4675 (Expand_Cleanup_Actions): Create a finalizer for a construct which has
4676 either declarations or statements or both.
4677 (Expand_N_Package_Body): Create a finalizer for a non-generic package.
4678 (Expand_N_Package_Declaration): Create a finalizer for a non-generic
4680 (Find_Final_List): Removed.
4681 (Global_Flist_Ref): Removed.
4682 (In_Finalization_Root): Removed.
4683 (Insert_Actions_In_Scope_Around): Determine the range of the transient
4684 scope in terms of tree nodes. Process all transient variables within
4686 (Make_Adjust_Call): Rewritten. There is no longer an attach call
4687 generated after the adjust.
4688 (Make_Attach_Call): Removed.
4689 (Make_Call): New routine.
4690 (Make_Clean): Removed.
4691 (Make_Deep_Array_Body): Rewritten to simply invoke the appropriate
4693 (Make_Deep_Proc): Rewritten to generate the new profile signature used
4695 (Make_Deep_Record_Body): Rewritten to simply invoke the appropriate
4697 (Make_Final_Call): Modified to simply create a call to either
4698 Deep_Finalize or Finalize.
4699 (Make_Finalize_Address_Body): New routine.
4700 (Make_Finalize_Address_Stmts): New routine. A function which produces
4701 TSS primitive Finalize_Address used in conjunction with heap allocated
4703 (Make_Handler_For_Ctrl_Operation): Add specialized code for .NET/JVM.
4704 (Make_Init_Call): Rewritten. There is no longer an attach call
4705 generated after initialization.
4706 (Make_Local_Deep_Finalize): New routine.
4707 (Make_Set_Finalize_Address_Ptr_Call): New routine.
4708 (Make_Transient_Block): Remove the finalization list retrieval and
4710 (Needs_Finalization): Moved to Exp_Util.
4711 (Parent_Field_Type): New routine.
4712 (Preprocess_Components): New routine.
4713 (Process_Transient_Objects): New routine.
4714 (Wrap_HSS_In_Block): New routine.
4715 (Wrap_Transient_Declaration): Remove finalization list management and
4716 controller insertion.
4717 (Wrap_Transient_Expression): Code reformatting.
4718 (Wrap_Transient_Statement): Code reformatting.
4719 * exp_ch7.ads (Build_Final_List): Removed.
4720 (Build_Finalization_Collection): New routine.
4721 (Build_Raise_Statement): New routine.
4722 (Controller_Component): Removed.
4723 (Expand_Ctrl_Function_Call): Moved to Exp_Ch6.
4724 (Find_Final_List): Removed.
4725 (In_Finalization_Root): Removed.
4726 (Is_Simple_Protected_Type): Update related comment.
4727 (Make_Adjust_Call): New parameter profile and associated comments.
4728 (Make_Attach_Call): Removed.
4729 (Make_Final_Call): New parameter profile and associated comments.
4730 (Make_Finalize_Address_Body): New routine.
4731 (Make_Init_Call): New parameter profile and associated comments.
4732 (Make_Local_Deep_Finalize): New routine.
4733 (Make_Set_Finalize_Address_Ptr_Call): New routine.
4734 (Needs_Finalization): Moved to Exp_Util.
4735 * exp_ch9.adb (Add_Object_Pointer): Code reformatting.
4736 (Expand_N_Protected_Body): Remove the handling of finalization lists.
4737 (Find_Protection_Type): Moved to Exp_Util.
4738 * exp_disp.adb: Remove with and use clauses for Exp_Ch7.
4739 (Make_DT): Update sequence of dispatch table initialization. Remove the
4740 initialization of field RC_Offset. Add initialization of field Needs_
4742 * exp_intr.adb (Expand_Unc_Deallocation): Code reformatting.
4743 Reimplement how an object is first finalized, then deallocated.
4744 * exp_strm.adb (Build_Record_Or_Elementary_Input_Function):
4746 * exp_tss.ads: Add special suffix for TSS primitive Finalize_Address.
4747 Register TSS_Finalize_Address with type TSS_Names.
4748 * exp_util.adb (Build_Allocate_Deallocate_Proc): New routine. This core
4749 procedure provides the interface between an allocation / deallocation
4750 and the support machinery in Ada.Finalization.Heap_Management.
4751 (Find_Init_Call): Code reformatting.
4752 (Find_Init_Call_In_List): Code reformatting.
4753 (Find_Protection_Type): Moved from Exp_Ch9.
4754 (Find_Prim_Op): Reimplement to add preference of recovered primitive.
4755 (Has_Controlled_Coextensions): Removed.
4756 (Has_Controlled_Objects): New routine.
4757 (In_Library_Level_Package_Body): New routine.
4758 (Insert_Action_After): New routine.
4759 (Is_Finalizable_Transient): New routine. This predicate determines
4760 whether an object declaration is one of the many variants of controlled
4762 (Is_Null_Access_BIP_Func_Call): New routine.
4763 (Is_Non_BIP_Func_Call): New routine.
4764 (Is_Related_To_Func_Return): New routine.
4765 (Needs_Finalization): Moved from Exp_Ch7.
4766 * exp_util.ads (Build_Allocate_Deallocate_Proc): New routine.
4767 (Find_Protection_Type): Moved from Exp_Ch9.
4768 (Has_Controlled_Coextensions): Removed.
4769 (Has_Controlled_Objects): New routine.
4770 (In_Library_Level_Package_Body): New routine.
4771 (Insert_Action_After): New routine.
4772 (Is_Finalizable_Transient): New routine.
4773 (Is_Null_Access_BIP_Func_Call): New routine.
4774 (Is_Non_BIP_Func_Call): New routine.
4775 (Is_Related_To_Func_Return): New routine.
4776 (Needs_Finalization): Moved from Exp_ch7.
4777 * expander.adb (Expand): Add a case for N_Free_Statement.
4778 * freeze.adb (Freeze_All): Replace the generation of a finalization
4779 list with a collection for access-to-controlled types.
4780 (Freeze_Entity): Code reformatting.
4781 (Freeze_Record_Type): Remove the freezing of a record controller
4783 (Freeze_Subprogram): Code reformatting.
4784 * inline.adb (Cleanup_Scopes): Remove the reset of the scope
4786 * lib-writ.adb (Write_Unit_Information): Output "PF" when a package
4787 has a library-level finalizer.
4788 * lib-writ.ads: Add "PF" to the sequence of unit attributes.
4789 * a-filico.ads, a-filico.adb, s-finimp.ads, s-finimp.adb: Removed.
4790 * Makefile.rtl: Remove a-filico and s-finimp from the list of object
4791 files. Add a-fihema to the list of object files.
4793 Alphabetize the associations in type Is_Parameterless_Attribute.
4794 * rtsfind.ads: Ada.Finalization_List.Controller and
4795 System.Finalization_Implementation are no longer a GNAT unit.
4796 Update the range of type Ada_Finalization_Child. Remove the following
4797 recoverable entities:
4799 RE_Attach_To_Final_List
4803 RE_Finalizable_Ptr_Ptr
4804 RE_Global_Final_List
4805 RE_Limited_Record_Controller
4808 RE_Record_Controller
4809 RE_Simple_List_Controller
4811 Add the following recoverable entities:
4813 RE_Add_Offset_To_Address
4817 RE_Exception_Identity
4818 RE_Finalization_Collection
4819 RE_Finalization_Collection_Ptr
4820 RE_Needs_Finalization
4821 RE_Save_Library_Occurrence
4822 RE_Set_Finalize_Address_Ptr
4823 RE_Set_Storage_Pool_Ptr
4825 * sem_aggr.adb (Resolve_Record_Aggregate): Remove mention of
4827 * sem_aux.adb (First_Discriminant): Remove mention of Name_uController.
4828 (First_Stored_Discriminant): Remove the mention of Name_uController.
4829 * sem_aux.ads: Comment reformatting.
4830 * sem_ch10.adb (Build_Chain): Signal the class-wide creation machinery
4831 to redecorate an already existing class-wide type.
4832 (Decorate_Tagged_Type): New parameter profile and associated comment.
4833 Create a "shadow class-wide type" for a shadow entity.
4834 * sem_ch11.adb (Analyze_Exception_Handlers): Remove the dubious setting
4835 of the final chain along with the associated comment.
4836 * sem_ch3.adb (Access_Type_Declaration): Add new local variable
4837 Full_Desig and set it to the full view of the designated type.
4838 Initialize the finalization collection to empty.
4839 (Build_Derived_Record_Type): Alphabetize local variables. Code
4841 (Collect_Fixed_Components): Remove the mention of Name_uController.
4842 (Create_Constrained_Components): Remove the mention of Name_uController.
4843 (Make_Class_Wide_Type): Add specialized code to redecorate an existing
4844 class-wide type of a shadow entity.
4845 (Process_Full_View): Update the machinery which marks type
4846 Limited_Controlled's entity as limited.
4847 * sem_ch4.adb (Analyze_One_Call): Code reformatting.
4848 * sem_ch6.adb (Create_Extra_Formals): Do not generate a finalization
4849 list, instead make a collection build-in-place formal.
4850 * sem_ch8.adb (Analyze_Object_Renaming): Look at the available view of
4851 a designated type in order to establish a match between the renaming
4852 and the renamed entity.
4853 (Find_Selected_Component): Add guard to prevent spurious exceptions
4854 from being raised on .NET/JVM.
4855 * sem_disp.adb (Check_Dispatching_Operation): Include Finalize_Address
4856 to the list of primitive that need special processing. Update arrays
4857 C_Names and D_Names.
4858 (Replace_Types): Handle class-wide types.
4859 * sem_elab.adb (Check_A_Call): Since Deep_Initialize now has a
4860 different parameter profile, look at the first formal.
4861 * sem_prag.adb: Remove with and use clauses for Exp_Ch7. Add with and
4862 use clauses for Exp_Util.
4863 * sem_res.adb: Remove with and use clauses for Elists.
4864 (Propagate_Coextensions): Removed.
4865 (Resolve_Allocator): Do not propagate the list of coextensions from one
4866 allocator to another.
4867 * sem_util.adb (Build_Actual_Subtype_Of_Component): Rename variable
4868 Deaccessed_T to Desig_Typ.
4869 (Enter_Name): Remove the mention of Name_uController.
4870 (Gather_Components): Remove the mention of Name_uController.
4871 (Incomplete_Or_Private_View): New routine.
4872 (Is_Coextension_Root): Removed.
4873 (Is_Fully_Initialized_Type): Remove the mention of Name_uController.
4874 * sem_util.ads (Incomplete_Or_Private_View): New routine.
4875 (Is_Coextension_Root): Removed.
4876 * s-finroo.ads: Remove with clause for Ada.Unchecked_Conversion.
4877 Controlled types are now derived from a null tagged record. Remove
4878 types Finalizable_Ptr, Finalizable and Empty_Root_Controlled.
4879 * sinfo.adb (Coextensions): Removed.
4880 (Set_Coextensions): Removed.
4881 * sinfo.ads: Remove Coextensions from the explanation of node fields
4882 and its uses in nodes.
4883 Update the field usage of N_Allocator.
4884 (Coextensions): Removed along with its pragma Inline.
4885 (Set_Coextensions): Removed along with its pragma Inline.
4886 * snames.ads-tmpl: Remove names
4891 Name_uLocal_Final_List
4892 Name_Finalization_Root
4899 Name_Finalize_Address
4900 * s-pooglo.adb (Allocate): Add overriding indicator.
4901 (Deallocate): Add overriding indicator.
4902 (Storage_Size): Add overriding indicator.
4903 * s-soflin.adb (Adafinal_NT): Invoke Finalize_Library_Objects rather
4904 than Finalize_Global_List.
4905 (Null_Finalize_Global_List): Removed.
4906 (Save_Library_Occurrence): New routine.
4907 * s-soflin.ads: Remove variable Finalize_Global_List along with its
4908 initialization. Add variable Finalize_Library_Objects along with its
4909 pragma Export. Add variables Library_Exception and
4910 Library_Exception_Set along with their pragma Export.
4911 (Null_Finalize_Global_List): Removed.
4912 (Save_Library_Occurrence): New routine.
4913 * s-tassta.adb (Finalize_Global_Tasks): Call Finalize_Library_Objects
4914 rather than Finalize_Global_List.
4915 * tbuild.adb (Unchecked_Convert_To): Capture and set the parent field
4916 of the constructed node.
4918 2011-08-03 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
4920 * link.c: Include "auto-host.h" before system headers.
4922 2011-08-03 Vincent Celier <celier@adacore.com>
4924 * make.adb (Gnatmake): Add to table Library_Projs only library projects
4925 that are not extended. Do not check if a library project that is
4926 extended should be regenerated. Do not add to table Library_Paths the
4927 libraries that are in extended projects. Link only with libraries that
4928 are in libray projects that are not extended.
4929 * prj-nmsc.adb (Check_Library_Attributes): Do not reset flag Library
4930 for a library project that is extended.
4932 2011-08-03 Gary Dismukes <dismukes@adacore.com>
4934 * sem_ch6.adb (Find_Corresponding_Spec): When in an instance, skip
4935 conforming subprogram renamings that appear to be completions if they
4936 are not fully conformant.
4937 Such renamings are homographs but not completions.
4938 * sem_type.adb (Disambiguate): Handle disambiguation of overloaded
4939 names in a subprogram renaming that appears in an instance.
4941 2011-08-03 Ed Schonberg <schonberg@adacore.com>
4943 * exp_util.adb (Expand_Subtype_From_Expr): if the type is limited but
4944 not immutably limited, build actual subtype from expression to provide
4945 proper bounds to caller.
4947 2011-08-03 Gary Dismukes <dismukes@adacore.com>
4949 * sem_ch8.adb: Minor comment correction.
4951 2011-08-03 Thomas Quinot <quinot@adacore.com>
4953 * exp_strm.adb (Build_Array_Input_Function): In Ada 2005 mode, when
4954 returning a limited array, use an extended return statement.
4956 2011-08-03 Vincent Celier <celier@adacore.com>
4958 * make.adb (Initialize): If --subdirs= is used, but no project file is
4959 specified, attempt to create the specify subdir if it does not already
4960 exist and use it as the object directory as if -D had been specified.
4962 2011-08-03 Arnaud Charlet <charlet@adacore.com>
4964 * s-tpopsp-vms.adb: New file.
4965 * s-taprop-vms.adb: Put back ATCB_Key, since needed by this file on VMS.
4966 * gcc-interfaces/Makefile.in: Use s-taprop-vms.adb on VMS.
4968 2011-08-03 Emmanuel Briot <briot@adacore.com>
4970 * make.adb, makeutl.adb, makeutl.ads, clean.adb (Makeutl.Queue): new
4973 2011-08-03 Yannick Moy <moy@adacore.com>
4975 * cstand.adb (Create_Standard): select Universal_Integer as an ALFA type
4976 * sem_ch3.adb (Array_Type_Declaration): detect array types in ALFA
4977 * sem_util.adb, sem_util.ads (Has_Static_Array_Bounds): new function to
4978 detect that an array has static bounds.
4980 2011-08-03 Thomas Quinot <quinot@adacore.com>
4982 * exp_dist.adb: Minor reformatting.
4984 2011-08-03 Arnaud Charlet <charlet@adacore.com>
4986 * s-taprop-irix.adb, s-taprop-hpux-dce.adb, s-taprop-vms.adb
4987 (ATCB_Key): Removed, not always used.
4989 2011-08-03 Emmanuel Briot <briot@adacore.com>
4991 * gnatcmd.adb, make.adb, prj.adb, prj.ads, makeutl.adb, makeutl.ads,
4992 clean.adb, prj-conf.adb, prj-env.adb, prj-env.ads (Makeutl): remove
4993 most remaining global variables.
4995 2011-08-03 Robert Dewar <dewar@adacore.com>
4997 * gnatcmd.adb, prj-proc.adb, mlib-prj.adb, prj.adb, makeutl.ads,
4998 prj-util.adb, prj-util.ads, prj-conf.adb, prj-env.adb: Minor
5001 2011-08-03 Javier Miranda <miranda@adacore.com>
5003 * exp_util.adb (Is_VM_By_Copy_Actual): Include N_Slide nodes as actuals
5004 that must be passed by copy in VM targets.
5006 2011-08-03 Emmanuel Briot <briot@adacore.com>
5008 * prj.ads, prj-nmsc.adb (Files_Htable): removed this htable, which
5009 duplicates a similar htable now in the project tree.
5011 2011-08-03 Claire Dross <dross@adacore.com>
5013 * a-cfdlli.adb, a-cfhama.adb, a-cfhase.adb, a-cforma.adb, a-cforse.adb,
5014 a-cofove.adb ("=", Length, Is_Empty, Clear, Assign, Copy, Element,
5015 Replace_Element, Query_Element, Update_Element, Move, Insert, Prepend,
5016 Append, Delete, Delete_First, Delete_Last, Reverse_Element, Swap,
5017 Splice, First, First_Element, Last, Last_Element, Next, Previous, Find,
5018 Reverse_Find, Contains, Has_Element, Iterate, Reverse_Iterate, Capacity,
5019 Reserve_Length, Length, Strict_Equal, Left, Right): Data-structure
5022 2011-08-03 Arnaud Charlet <charlet@adacore.com>
5024 * s-taprop-posix.adb, s-taprop-linux.adb, s-taprop-tru64.adb
5025 (ATCB_Key): Removed, not always used.
5026 * s-tpopsp-posix.adb, s-tpopsp-posix-foreign.adb (ATCB_Key): Moved from
5028 * s-tpopsp-tls.adb: New file.
5029 * gcc-interface/Makefile.in: Use TLS implementation of s-tpopsp.adb on
5030 x86/x64/ia64/powerpc/sparc Linux.
5032 2011-08-03 Arnaud Charlet <charlet@adacore.com>
5034 * system-aix.ads, system-aix64.ads: Set ZCX_By_Default to True.
5035 * gcc-interface/Makefile.in: Switch to ZCX by default on AIX ports.
5037 2011-08-03 Thomas Quinot <quinot@adacore.com>
5039 * rtsfind.ads, exp_dist.adb, exp_dist.ads
5040 (Build_From_Any_Call, Build_To_Any_Call, Build_TypeCode_Call):
5041 Fix type selection for mapping integer types to PolyORB types.
5043 2011-08-03 Bob Duff <duff@adacore.com>
5045 * sem_ch7.adb: Minor comment clarification.
5047 2011-08-03 Bob Duff <duff@adacore.com>
5049 * sem_ch13.adb (Analyze_Enumeration_Representation_Clause): If we get
5050 an error analyzing a choice, skip further processing. Further
5051 processing could cause a crash or cascade errors.
5053 2011-08-03 Emmanuel Briot <briot@adacore.com>
5055 * gnatcmd.adb, prj-proc.adb, prj-proc.ads, make.adb, mlib-prj.adb,
5056 prj.adb, prj.ads, makeutl.adb, makeutl.ads, clean.adb, prj-nmsc.adb,
5057 prj-util.adb, prj-util.ads, prj-conf.adb, prj-conf.ads, prj-env.adb,
5058 prj-env.ads (Shared_Project_Tree_Data): new type
5059 An aggregate project and its aggregated trees need to share the common
5060 data structures used for lists of strings, packages,... This makes the
5061 code simpler since otherwise we have to pass the root tree (also used
5062 for the configuration file data) in addition to the current project
5063 tree. This also avoids ambiguities as to which tree should be used.
5064 And finally this saves a bit of memory.
5065 (For_Every_Project_Imported): new parameter Tree.
5066 Since aggregated projects are using a different tree, we need to let
5067 the caller know which tree to use to manipulate the returned project.
5069 2011-08-03 Robert Dewar <dewar@adacore.com>
5071 * prj-proc.adb, exp_util.ads, exp_ch9.adb, make.adb, prj-ext.adb,
5072 prj-ext.ads, alfa.ads, sem_ch4.adb, makeutl.adb, makeutl.ads,
5073 lib-xref-alfa.adb, sem_cat.adb, exp_dist.adb, get_alfa.adb,
5074 prj-env.adb, prj-env.ads, prj-tree.adb, alfa.ads: Minor reformatting.
5076 2011-08-03 Javier Miranda <miranda@adacore.com>
5078 * exp_util.adb, sem_aux.adb, exp_util.ads, sem_aux.ads:
5079 Move routine Is_VM_By_Copy_Actual from sem_aux to exp_util.
5081 2011-08-03 Bob Duff <duff@adacore.com>
5083 * sem_ch8.adb (Is_Primitive_Operator_In_Use): Always check In_Use on
5086 2011-08-03 Joel Brobecker <brobecker@adacore.com brobecker>
5088 * g-sha256.ads, g-sha512.ads, g-sha1.ads, g-sha224.ads, g-sha384.ads,
5089 g-sehash.ads: Fix typo. Update header.
5091 2011-08-03 Thomas Quinot <quinot@adacore.com>
5093 * exp_ch6.adb (Expand_Actuals): Remove Ada_2005 guard on build-in-place
5096 2011-08-03 Gary Dismukes <dismukes@adacore.com>
5098 * sem_ch4.adb (Analyze_Overloaded_Selected_Component): Consider
5099 prefixes of private types along with records, since the selector may be
5101 * sem_res.adb (Resolve_Selected_Component): Consider prefixes of
5102 private types along with records, since the selector may be a
5105 2011-08-03 Emmanuel Briot <briot@adacore.com>
5107 * prj-pp.adb (Pretty_Print): Remove trailing blank line.
5109 2011-08-03 Javier Miranda <miranda@adacore.com>
5111 * sem_aux.adb (Is_VM_By_Copy_Actual): Fix wrong use of
5112 Tagged_Type_Expansion.
5114 2011-08-03 Yannick Moy <moy@adacore.com>
5116 * sem_res.adb (Resolve_Op_Concat_Arg): Do not issue a SPARK
5117 violation when the argument of concatenation is the name of a
5120 2011-08-03 Emmanuel Briot <briot@adacore.com>
5122 * prj-proc.adb, prj-ext.adb, prj-ext.ads, prj-env.adb, prj-env.ads,
5123 prj-tree.adb, prj-tree.ads (Initialize_And_Copy, Copy): new subprograms
5124 (Process_Declarative_Items): new parameter Child_Env.
5126 2011-08-03 Yannick Moy <moy@adacore.com>
5128 * alfa.ads: Update format of ALFA section in ALI file in order to
5129 add a mapping from bodies to specs when both are present.
5130 (ALFA_Scope_Record): Add components for spec file/scope.
5131 * get_alfa.adb (Get_ALFA): Read the new file/scope for spec when
5133 * lib-xref-alfa.adb (Collect_ALFA): After all scopes have been
5134 collected, fill in the spec information when relevant.
5135 * put_alfa.adb (Put_ALFA): Write the new file/scope for spec when
5138 2011-08-03 Eric Botcazou <ebotcazou@adacore.com>
5140 * inline.adb (Add_Inlined_Subprogram): Do not consider the enclosing
5141 code unit to decide whether to add internally generated subprograms.
5143 2011-08-03 Javier Miranda <miranda@adacore.com>
5145 * sem_aux.ads, sem_aux.adb (Is_VM_By_Copy_Actual): New subprogram.
5146 * exp_ch9.adb (Build_Simple_Entry_Call): Handle actuals that must
5147 be handled by copy in VM targets.
5149 2011-08-03 Emmanuel Briot <briot@adacore.com>
5151 * make.adb, makeutl.adb, makeutl.ads (Make.Switches_Of): Share
5152 code with Makeutl.Get_Switches.
5153 * prj-tree.adb: Update comment.
5155 2011-08-03 Thomas Quinot <quinot@adacore.com>
5157 * sem_cat.adb (Validate_RCI_Subprogram_Declaration): Reject a remote
5158 subprogram with a limited formal that does not support external
5161 2011-08-03 Yannick Moy <moy@adacore.com>
5163 * get_alfa.adb (Get_ALFA): add missing Skip_Spaces at start of
5165 * lib-xref-alfa.adb (Add_ALFA_File): split removal of scopes that are
5166 not from current unit in two phases, because it is not possible to
5167 change the table while iterating over its content.
5168 * put_alfa.adb (Put_ALFA): reset current file/scope at each new entity
5170 2011-08-03 Sergey Rybin <rybin@adacore.com>
5172 * vms_data.ads: Add qualifier for gnatmetric --no-static-loop option
5173 * gnat_ugn.texi: Update description of complexity metrics (gnatmetric)
5175 2011-08-03 Ed Schonberg <schonberg@adacore.com>
5177 * sem_res.adb (Resolve_Op_Concat_Arg): if the argument is an aggregate
5178 and the component type is composite, this is ambiguous for predefined
5179 concatenation, but if the node is not overloaded and the entity is a use
5180 -defined function its profile can be used to resolve that aggregate.
5182 2011-08-03 Robert Dewar <dewar@adacore.com>
5184 * exp_ch4.adb: Minor code cleanup.
5186 2011-08-03 Thomas Quinot <quinot@adacore.com>
5188 * exp_dist.adb: Do not generate distribution stubs if serious errors
5189 have been diagnosed.
5191 2011-08-03 Ed Schonberg <schonberg@adacore.com>
5193 * sem_ch4.adb (Try_Primitive_Operation): when checking the validity of
5194 the first formal of a primitive operation, go to the base type to
5195 handle properly an access to a derived type with constrained
5197 * sem_type.adb (Disambiguate): an immediately visible operator hides a
5198 user-defined function that is only use-visible.
5200 2011-08-03 Robert Dewar <dewar@adacore.com>
5202 * sem_aggr.adb, sem_ch3.adb, lib.ads, gnatcmd.adb, prj-proc.adb,
5203 make.adb, lib-writ.adb, prj-part.adb, prj-part.ads, prj-ext.adb,
5204 fname-uf.adb, prj-ext.ads, prj.adb, prj.ads, sem_attr.adb, alfa.adb,
5205 prj-makr.adb, errout.adb, makeutl.adb, makeutl.ads, restrict.ads,
5206 sem_ch6.adb, g-pehage.adb, clean.adb, put_alfa.adb, lib-xref-alfa.adb,
5207 prj-nmsc.adb, prj-nmsc.ads, sem_ch8.adb, prj-pars.ads, exp_aggr.adb,
5208 prj-attr.ads, sem_ch13.adb, get_alfa.adb, prj-env.adb, prj-env.ads,
5209 alfa_test.adb, prj-tree.adb, prj-tree.ads, einfo.ads: Minor reformatting
5211 2011-08-03 Robert Dewar <dewar@adacore.com>
5213 * repinfo.adb (List_Mechanism): Add handling of
5214 Convention_Ada_Pass_By_XXX.
5215 * sem_mech.adb (Set_Mechanism): Ditto.
5216 * sem_prag.adb (Process_Convention): Add entries for
5217 Convention_Ada_Pass_By_XXX.
5218 * snames.adb-tmpl, snames.ads-tmpl: Ditto.
5220 2011-08-03 Pascal Obry <obry@adacore.com>
5222 * makeutl.adb: Minor reformatting.
5224 2011-08-03 Vincent Celier <celier@adacore.com>
5227 (Get_File_Name) If the file cannot be found when there are no config
5228 pragmas file and May_Fail is True, return No_File instead of the file
5229 name, to be consistent.
5231 2011-08-03 Pascal Obry <obry@adacore.com>
5233 * adaint.c (__gnat_is_executable_file_attr): Avoid access
5236 2011-08-03 Javier Miranda <miranda@adacore.com>
5239 (Same_Representation): In VM targets the representation of arrays with
5240 aliased components differs from arrays with non-aliased components.
5242 2011-08-03 Emmanuel Briot <briot@adacore.com>
5244 * prj-proc.adb, prj-attr.adb, prj-attr.ads (Get_Attribute_Index): do
5245 not systematically lower case attribute indexes that contain no "."
5246 Fix definition of several Naming attributes, which take
5247 a unit name as index and therefore should be case insensitive.
5248 Minor refactoring (reduce length of variable names).
5250 2011-08-03 Emmanuel Briot <briot@adacore.com>
5252 * makeutl.adb, makeutl.ads (Get_Switches): new subprogram.
5254 2011-08-03 Emmanuel Briot <briot@adacore.com>
5256 * gnatcmd.adb, prj-proc.adb, prj-proc.ads, make.adb, prj-part.adb,
5257 prj-part.ads, switch-m.adb, switch-m.ads, prj-makr.adb, clean.adb,
5258 prj-pars.adb, prj-pars.ads, prj-conf.adb, prj-conf.ads, prj-tree.adb,
5259 prj-tree.ads (Prj.Tree.Environment): new type.
5261 2011-08-03 Emmanuel Briot <briot@adacore.com>
5263 * prj-proc.adb, prj.ads, makeutl.adb, makeutl.ads, prj-conf.adb,
5264 prj-tree.adb, prj-tree.ads (Environment): new type.
5266 2011-08-03 Emmanuel Briot <briot@adacore.com>
5268 * prj-tree.ads: Remove unused variable.
5270 2011-08-03 Yannick Moy <moy@adacore.com>
5272 * restrict.adb (Restriction_Msg): set "SPARK" all in upper case for
5273 issuing messages related to SPARK restriction violation.
5275 2011-08-03 Ed Schonberg <schonberg@adacore.com>
5277 * sem_ch6.adb: guard against error nodes in return statements.
5279 2011-08-03 Arnaud Charlet <charlet@adacore.com>
5281 * errout.adb (Error_Msg_Internal): the main unit has not been read yet,
5282 a warning can only appear on a configuration file, so emit warning
5283 without further checks.
5285 2011-08-03 Arnaud Charlet <charlet@adacore.com>
5287 * s-interr.ads: add overriding keyword.
5289 2011-08-03 Geert Bosch <bosch@adacore.com>
5291 * exp_attr.adb: Fix minor typo.
5293 2011-08-03 Ed Schonberg <schonberg@adacore.com>
5295 * par-ch4.adb: improve error recovery.
5297 2011-08-03 Emmanuel Briot <briot@adacore.com>
5299 * prj-part.adb, prj-part.ads, prj-makr.adb, prj-pars.adb, prj-conf.adb,
5300 prj-env.adb (Prj.Part.Parse): change parameter Always_Errout_Finalize
5303 2011-08-03 Emmanuel Briot <briot@adacore.com>
5305 * prj-dect.adb (Parse_Attribute_Declaration): make sure we can use
5306 "external" as an attribute name in aggregate projects.
5308 2011-08-03 Jose Ruiz <ruiz@adacore.com>
5310 * s-taprop-vxworks.adb: (Create_Task, Initialize): Ada 2012 pragma CPU
5311 uses CPU numbers starting 1, while VxWorks uses CPU numbers starting
5312 from 0, so we need to adjust.
5314 2011-08-03 Emmanuel Briot <briot@adacore.com>
5316 * prj-proc.adb, prj-ext.adb, prj-ext.ads, makeutl.adb, prj-tree.adb,
5317 prj-tree.ads, gnatcmd.adb, clean.adb (External_References): new type.
5319 2011-08-03 Yannick Moy <moy@adacore.com>
5321 * sem_ch6.adb (New_Overloaded_Entity): only issue error for SPARK
5322 restriction on overloaded entity if the entity is not an operator.
5324 2011-08-03 Yannick Moy <moy@adacore.com>
5326 * sem_ch7.adb, sem_res.adb, sem_attr.adb, restrict.adb,
5327 restrict.ads: Rename remaining Check_Formal_Restriction* into
5328 Check_SPARK_Restriction*.
5330 2011-08-03 Emmanuel Briot <briot@adacore.com>
5332 * prj-proc.adb, prj-part.adb, prj.adb, prj.ads, prj-nmsc.adb,
5333 prj-nmsc.ads, prj-err.adb (Project_Data): now discriminated on its
5335 (Project_Empty): removed
5336 (Empty_Project): new parameter Qualifier
5337 This is used to have fields specific to aggregate projects, cleaner
5338 New field to store the list of aggregated projects.
5339 (Check_Aggregate_Project): removed
5340 (Process_Aggregated_Projects, Free): new subprograms.
5342 2011-08-03 Olivier Hainque <hainque@adacore.com>
5344 * tracebak.c (STOP_FRAME ppc AIX): Stop at null return address as well.
5346 2011-08-03 Ed Schonberg <schonberg@adacore.com>
5348 * sem_ch8.adb (Analyze_Object_Renaming): if the renamed object is an
5349 explicit dereference of an unconstrained type, create a constrained
5350 subtype for it, as is done for function calls that return an
5353 2011-08-03 Thomas Quinot <quinot@adacore.com>
5355 * g-pehage.adb (Finalize): Avoid possible double-free.
5357 2011-08-03 Steve Baird <baird@adacore.com>
5359 * exp_attr.adb (Expand_N_Attribute_Reference): Don't expand
5360 Elab_Spec/Body attrs in CodePeer_Mode.
5362 2011-08-03 Javier Miranda <miranda@adacore.com>
5364 * exp_aggr.adb (Flatten): Convert to positional form aggregates whose
5365 low bound is not known at compile time but they have no others choice.
5366 Done because in this case the bounds can be obtained directly from the
5369 2011-08-03 Ed Falis <falis@adacore.com>
5371 * s-tasinf-vxworks.ads: Update comment to reflect 0 indexing of CPUs
5372 on VxWorks SMP. Remove unusable constant ANY_CPU.
5374 2011-08-03 Emmanuel Briot <briot@adacore.com>
5376 * gnatcmd.adb, make.adb, prj-part.adb, prj-part.ads, prj-makr.adb,
5377 clean.adb, prj-nmsc.adb, prj-pars.adb, prj-conf.adb, prj-env.adb,
5378 prj-env.ads (Prj.Env.Initialize_Default_Project_Path,
5379 Prj.Env.Initialize_Empty): new subprograms
5380 (Get_Env, Find_Project): remove parameter Target_Name.
5382 2011-08-03 Gary Dismukes <dismukes@adacore.com>
5384 * sem_ch3.adb (Build_Derived_Record_Type): Test the Derive_Subps formal
5385 as a condition for the delayed call to Derived_Subprograms done for the
5386 case of the rewriting of a derived type that constrains the
5387 discriminants of its parent type.
5388 Avoids redundant subprogram derivations for private subtype derivations.
5390 2011-08-03 Javier Miranda <miranda@adacore.com>
5392 * exp_aggr.adb (Init_Hidden_Discriminants): New subprogram of
5393 Build_Record_Aggr_Code.
5394 (Build_Record_Aggr_Code): Add missing support to initialize hidden
5395 discriminants in extension aggregates.
5397 2011-08-03 Emmanuel Briot <briot@adacore.com>
5399 * prj-pp.adb (Print): also output project qualifiers, since in
5400 particular "aggregate" is mandatory in an aggregate project.
5402 2011-08-03 Emmanuel Briot <briot@adacore.com>
5404 * prj-part.adb, prj.adb, prj.ads, prj-nmsc.adb, prj-env.adb:
5405 (Debug_Output): new function.
5407 2011-08-03 Eric Botcazou <ebotcazou@adacore.com>
5409 * gnat_ugn.texi: Document -Wstack-usage.
5410 * gcc-interface/misc.c (enumerate_modes): Add guard for ghost FP modes.
5412 2011-08-03 Thomas Quinot <quinot@adacore.com>
5414 * sem_prag.adb Issue an error (not a warning) when a C++ type does not
5415 have keyword LIMITED.
5417 2011-08-03 Yannick Moy <moy@adacore.com>
5419 * alfa.adb, alfa.ads, alfa_test.adb: New files.
5420 * ali.adb (Known_ALI_Lines): add 'C' lines (SCO) and 'F' lines (ALFA)
5421 (Scan_ALI): do not issue a fatal error if parsing known lines after Xref
5422 section (does not happen in compiler, only if code directly calls
5424 * get_alfa.adb, get_alfa.ads: New files.
5425 * lib-writ.adb, lib-writ.ads (Write_ALI): output ALFA information if
5427 * lib-xref-alfa.adb: New file.
5428 * lib-xref.adb, lib-xref.ads
5429 (Xref_Entry): redefine information needed in cross-references for ALFA.
5430 Push ALFA treatments in separated local package.
5431 (Enclosing_Subpragram_Or_Package): treat specially subprogram
5432 identifiers. Return entity of package body instead of spec. Return
5433 Empty for a scope with no location.
5434 (Generate_Reference): adapt to new components for ALFA information.
5435 Remove the need for D references on definitions.
5436 (Is_Local_Reference): moved to ALFA local package
5437 (Output_References): extract subfunction as Extract_Source_Name
5438 (Output_Local_References): remove procedure, replaced by filtering of
5439 cross-references in package ALFA and printing in Put_ALFA.
5440 (Write_Entity_Name): remove procedure
5441 * lib.adb, lib.ads (Extract_Source_Name): extract here function to
5442 print exact name of entity as it appears in source file
5443 (Unit_Ref_Table): make type public for use in Lib.Xref.ALFA
5444 * put_alfa.adb, put_alfa.ads: New files.
5445 * xref_lib.adb (Search_Xref): protect read of cross-references against
5446 reading other sections of the ALI file, in gnatxref
5447 (Search): protect read of cross-references against reading other
5448 sections of the ALI file, in gnatfind.
5449 * gcc-interface/Make-lang.in: Update dependencies.
5451 2011-08-03 Thomas Quinot <quinot@adacore.com>
5453 * sem_ch3.adb: Minor reformatting.
5455 2011-08-03 Jose Ruiz <ruiz@adacore.com>
5457 * s-inmaop-vxworks.adb (Setup_Interrupt_Mask): Do nothing instead of
5458 raising an exception.
5460 2011-08-03 Ed Schonberg <schonberg@adacore.com>
5462 * sem_res.adb (Set_String_Literal_Subtype): if index type is an integer
5463 type, always use 1 as the lower bound or string, even if lower bound of
5464 context is not static, to handle properly null strings in a non-static
5467 2011-08-03 Bob Duff <duff@adacore.com>
5469 * sem_prag.adb (Resolve_Aggregate): An array aggregate with 'others' is
5470 always legal on the right-hand side of an assignment statement; there
5471 is always an applicable index constraint in this case. Therefore, the
5472 check for Pkind = N_Assignment_Statement is now unconditional -- it
5473 doesn't depend on whether Is_Constrained (Typ).
5475 2011-08-03 Robert Dewar <dewar@adacore.com>
5477 * exp_ch5.adb, sem_prag.adb, exp_ch4.adb: Minor reformatting.
5479 2011-08-03 Ed Schonberg <schonberg@adacore.com>
5481 * sem_ch3.adb (Build_Itype_Reference): do not create an itype reference
5482 for an itype created within a generic unit.
5484 2011-08-03 Eric Botcazou <ebotcazou@adacore.com>
5486 * gnat_ugn.texi (Switches for gcc): Make it clearer that -fno-inline
5487 suppresses all inlining.
5489 2011-08-03 Robert Dewar <dewar@adacore.com>
5491 * sem_ch3.adb, sem_res.adb, exp_ch13.adb, exp_disp.adb,
5492 exp_aggr.adb: Minor reformatting.
5494 2011-08-03 Thomas Quinot <quinot@adacore.com>
5496 * exp_ch5.adb (Expand_N_Assignment_Statement): Do not force inlining of
5497 tagged assignment when discriminant checks are suppressed. This is
5498 useless and extremely costly in terms of static stack usage.
5500 2011-08-03 Bob Duff <duff@adacore.com>
5502 * sem_prag.adb (Get_Base_Subprogram): Do not follow Alias for instances
5503 of generics, because this leads to the wrong entity in the wrong scope,
5504 causing (e.g.) pragma Export_Procedure to get an error if the entity is
5506 (Process_Interface_Name): Follow Alias for instances of generics, to
5507 correct for the above change.
5509 2011-08-03 Ed Schonberg <schonberg@adacore.com>
5511 * exp_ch4.adb (Expand_N_Selected_Component): If the discriminant value
5512 is an integer literal it is always safe to replace the reference. In
5513 addition, if the reference appears in the generated code for an object
5514 declaration it is necessary to copy because otherwise the reference
5515 might be to the uninitilized value of the discriminant of the object
5518 2011-08-03 Pascal Obry <obry@adacore.com>
5520 * adaint.c (__gnat_is_executable_file_attr): Fix Win32 circuitry when no
5521 ACL used, in this case we want to check for ending .exe, not .exe
5522 anywhere in the path.
5524 2011-08-03 Sergey Rybin <rybin@adacore.com>
5526 * tree_io.ads (ASIS_Version_Number): Update because of the changes in
5527 the tree structure (semantic decoration of references to record
5530 2011-08-03 Gary Dismukes <dismukes@adacore.com>
5532 * sem_aggr.adb (Analyze_Array_Aggregate): When checking the discrete
5533 choices of a named array aggregate, bail out when any choices are
5534 marked as Errors_Posted.
5536 2011-08-03 Ed Schonberg <schonberg@adacore.com>
5538 * exp_ch13.adb (Expand_N_Freeze_Entity): cleanup determination of scope
5539 in which entity is frozen, to handle properly loop variables in
5542 2011-08-03 Ed Schonberg <schonberg@adacore.com>
5544 * sem_res.adb (Set_String_Literal_Subtype): if the lower bound of the
5545 subtype is not static, compute the upper bound using attributes, to
5546 handle properly index types that are not integer types.
5548 2011-08-03 Bob Duff <duff@adacore.com>
5550 * gnat_rm.texi, gnat_ugn.texi: Fix some dangling URLs.
5551 Update copyright notice.
5553 2011-08-03 Ed Schonberg <schonberg@adacore.com>
5555 * sem_ch3.adb (Build_Discriminant_Constraints): Only use
5556 Original_Discriminant if within an instance.
5557 * sem_ch4.adb (Analyze_Selected_Component): Ditto.
5559 2011-08-03 Thomas Quinot <quinot@adacore.com>
5561 * einfo.ads: Minor reformatting.
5563 2011-08-03 Ed Schonberg <schonberg@adacore.com>
5565 * exp_disp.adb (Check_Premature_Freezing): diagnose the presence of a
5566 composite type with an unfrozen subcomponent, in the profile of a
5567 primitive operation.
5569 2011-08-03 Robert Dewar <dewar@adacore.com>
5571 * sem_util.ads, exp_aggr.adb, exp_ch3.adb: Minor reformatting.
5573 2011-08-03 Ed Schonberg <schonberg@adacore.com>
5575 * sem_ch3.adb (Analyze_Object_Declaration): if a constant object of an
5576 unconstrained type with discriminants is initialized with an aggregate,
5577 use the constrained subtype of the aggregate as the type of the object,
5578 because it is immutable, and this allows the back-end to generate no
5579 code for the object declaration.
5581 2011-08-03 Robert Dewar <dewar@adacore.com>
5583 * exp_ch4.adb (Optimize_Length_Check): Fix bad handling of case where
5584 comparison operand is variable, and turns out to be zero or negative.
5586 2011-08-03 Javier Miranda <miranda@adacore.com>
5589 (Expand_Dispatching_Constructor_Call): Disable expansion of
5590 code required for native targets. Done to avoid generating
5591 references to unavailable runtime entities in VM targets.
5593 (Expand_N_Object_Declaration): Add missing support to handle
5594 the explicit initialization of class-wide interface objects.
5597 2011-08-03 Matthew Heaney <heaney@adacore.com>
5599 * a-cobove.adb (Merge): Move source onto target, instead of using Assign
5601 2011-08-03 Matthew Heaney <heaney@adacore.com>
5603 * a-cbdlli.adb (Splice): move source items from first to last
5605 2011-08-03 Yannick Moy <moy@adacore.com>
5607 * sem_util.ads: comment added.
5609 2011-08-03 Javier Miranda <miranda@adacore.com>
5612 (Expand_Record_Aggregate): In VM targets disable the expansion into
5613 assignments of aggregates whose type is not known at compile time.
5615 2011-08-03 Ed Schonberg <schonberg@adacore.com>
5617 * exp_ch9.adb (Build_Renamed_Formal_Declaration): common procedure for
5618 protected entries and task entries, to build the proper renaming
5619 declaration for entry formals, used in debugging.
5620 * exp_ch2.adb (Expand_Entry_Parameter): handle task and entry
5621 parameters in the same way.
5623 2011-08-02 Robert Dewar <dewar@adacore.com>
5625 * a-direct.adb, sinfo.ads, exp_ch9.adb, scng.adb, sem_util.adb,
5626 sem_util.ads, restrict.ads, par-prag.adb: Minor reformatting and/or
5627 code reorganization.
5629 2011-08-02 Robert Dewar <dewar@adacore.com>
5631 * debug.adb: Debug flag d.P to suppress length comparison optimization
5632 * exp_ch4.adb (Optimize_Length_Comparison): New routine to optimize
5633 comparison of Length by comparing First/Last instead.
5635 2011-08-02 Matthew Heaney <heaney@adacore.com>
5637 * a-cobove.ads: Code clean up.
5639 2011-08-02 Vincent Celier <celier@adacore.com>
5641 * adaint.c (file_names_case_sensitive_cache): New static int.
5642 (__gnat_get_file_names_case_sensitive): Cache the return value in
5643 file_names_case_sensitive_cache at the first invocation, to avoid
5644 multiple calls to getenv.
5646 2011-08-02 Bob Duff <duff@adacore.com>
5648 * sem_ch12.adb (Validate_Derived_Type_Instance): Implement AI05-0218-1.
5650 2011-08-02 Yannick Moy <moy@adacore.com>
5652 * sem_ch3.adb, sem_ch5.adb, sem_ch9.adb, sem_prag.adb, sem.ads,
5653 sem_util.adb, sem_util.ads, sem_res.adb, sem_ch2.adb, sem_ch4.adb,
5654 sem_ch6.adb, sem_ch11.adb: Add semantic flag In_Pre_Post_Expression to
5655 indicate that we are in a precondition or postcondition. This is used in
5656 Mark_Non_ALFA_Subprogram (renaming of Mark_Non_ALFA_Subprogram_Body) to
5657 decide whether to flag the spec or body of the current subprogram as
5660 2011-08-02 Fabien Chouteau <chouteau@adacore.com>
5662 * impunit.adb: Add Ada.Execution_Time.Interrupts in the Ada2012 package
5664 * a-extiin.ads: New file.
5666 2011-08-02 Bob Duff <duff@adacore.com>
5668 * a-direct.adb (Rename): Implement AI05-0231-1. In particular, Rename
5669 now raises Name_Error instead of Use_Error in certain cases. The other
5670 parts of this AI were already implemented properly.
5672 2011-08-02 Vincent Celier <celier@adacore.com>
5674 * link.c: Only import "auto-host.h" when building the gnattools.
5676 2011-08-02 Yannick Moy <moy@adacore.com>
5678 * sem_util.adb: Inter-unit inlining does not work for a subprogram
5679 which calls a local subprogram, so extract subprogram
5680 from Mark_Non_ALFA_Subprogram_Body.
5682 2011-08-02 Javier Miranda <miranda@adacore.com>
5685 (Extract_Dispatching_Call): If the type of the dispatching object is an
5686 access type then return an explicit dereference in the Object out-mode
5689 2011-08-02 Gary Dismukes <dismukes@adacore.com>
5691 * sem_ch3.adb (Analyze_Subtype_Declaration): Generate range
5692 compatibility checks for all indexes of an array subtype, not just the
5693 first. Reset Has_Dynamic_Range_Check on the subtype before each
5694 potential check to ensure that Insert_Range_Checks will not elide any
5695 of the dynamic checks.
5697 2011-08-02 Yannick Moy <moy@adacore.com>
5699 * par-prag.ad (Process_Restrictions_Or_Restriction_Warnings): recognize
5700 SPARK restriction at parsing time.
5701 * scng.adb (Scan): Generate a token Tok_SPARK_Hide for a SPARK HIDE
5702 directive only if the SPARK restriction is set for this unit.
5704 2011-08-02 Yannick Moy <moy@adacore.com>
5706 * sem_ch3.adb, sem_ch5.adb, sem_ch9.adb, sem_util.adb, sem_util.ads,
5707 sem_res.adb, sem_ch2.adb, sem_ch4.adb, sem_ch6.adb,
5708 sem_ch11.adb: Protect call to Current_Subprogram which might be costly
5709 when repeated. Rename Current_Subprogram_Is_Not_In_ALFA into
5710 Mark_Non_ALFA_Subprogram_Body.
5711 Split body of Mark_Non_ALFA_Subprogram_Body to get body small and
5714 2011-08-02 Yannick Moy <moy@adacore.com>
5716 * sem_res.adb: Protect calls to Matching_Static_Array_Bounds which
5719 2011-08-02 Robert Dewar <dewar@adacore.com>
5721 * exp_ch9.adb, exp_sel.adb, restrict.ads, exp_disp.adb, erroutc.ads,
5722 exp_ch3.adb: Minor reformatting.
5724 2011-08-02 Emmanuel Briot <briot@adacore.com>
5726 * adaint.c (__gnat_locate_exec_on_path): only returns executable
5727 files, not any regular file.
5728 (__gnat_locate_file_with_predicate): new subprogram.
5730 2011-08-02 Yannick Moy <moy@adacore.com>
5732 * sinfo.adb, sinfo.ads: Restrict the use of flags
5733 Has_Dynamic_Length_Check and Has_Dynamic_Range_Check to expression
5734 nodes, plus N_Subtype_Declaration for the 2nd one.
5736 2011-08-02 Sergey Rybin <rybin@adacore.com>
5738 * gnat_rm.texi: Ramification of pragma Eliminate documentation
5739 - fix bugs in the description of Source_Trace;
5740 - get rid of UNIT_NAME;
5742 2011-08-02 Javier Miranda <miranda@adacore.com>
5745 (Build_Dispatching_Requeue): Adding support for VM targets
5746 since we cannot directly reference the Tag entity.
5747 * exp_sel.adb (Build_K): Adding support for VM targets.
5748 (Build_S_Assignment): Adding support for VM targets.
5750 (Default_Prim_Op_Position): In VM targets do not restrict availability
5751 of predefined interface primitives to compiling in Ada 2005 mode.
5752 (Is_Predefined_Interface_Primitive): In VM targets this service is not
5753 restricted to compiling in Ada 2005 mode.
5754 (Make_VM_TSD): Generate code that declares and initializes the OSD
5755 record. Needed to support dispatching calls through synchronized
5758 (Make_Predefined_Primitive_Specs): Enable generation of predefined
5759 primitives associated with synchronized interfaces.
5760 (Make_Predefined_Primitive_Bodies): Enable generation of predefined
5761 primitives associated with synchronized interfaces.
5763 2011-08-02 Yannick Moy <moy@adacore.com>
5765 * par-ch11.adb (P_Handled_Sequence_Of_Statements): mark a sequence of
5766 statements hidden in SPARK if preceded by the HIDE directive
5767 (Parse_Exception_Handlers): mark each exception handler in a sequence of
5768 exception handlers as hidden in SPARK if preceded by the HIDE directive
5769 * par-ch6.adb (P_Subprogram): mark a subprogram body hidden in SPARK
5770 if starting with the HIDE directive
5771 * par-ch7.adb (P_Package): mark a package body hidden in SPARK if
5772 starting with the HIDE directive; mark the declarations in a private
5773 part as hidden in SPARK if the private part starts with the HIDE
5775 * restrict.adb, restrict.ads
5776 (Set_Hidden_Part_In_SPARK): record a range of slocs as hidden in SPARK
5777 (Is_In_Hidden_Part_In_SPARK): new function which returns whether its
5778 argument node belongs to a part which is hidden in SPARK
5779 (Check_SPARK_Restriction): do not issue violations on nodes in hidden
5780 parts in SPARK; protect the possibly costly call to
5781 Is_In_Hidden_Part_In_SPARK by a check that the SPARK restriction is on
5782 * scans.ads (Token_Type): new value Tok_SPARK_Hide in enumeration
5783 * scng.adb (Accumulate_Token_Checksum_GNAT_6_3,
5784 Accumulate_Token_Checksum_GNAT_5_03): add case for new token
5786 (Scan): recognize special comment starting with '#' and followed by
5787 SPARK keyword "hide" as a HIDE directive.
5789 2011-08-02 Yannick Moy <moy@adacore.com>
5791 * types.ads, erroutc.ads: Minor reformatting.
5793 2011-08-02 Vincent Celier <celier@adacore.com>
5795 * link.c: Add response file support for cross platforms.
5797 2011-08-02 Ed Schonberg <schonberg@adacore.com>
5799 * sem_aggr.adb (Resolve_Array_Aggregate): when copying the expression
5800 in an association, set parent field of copy before partial analysis.
5801 * sem_res.adb (Resolve_Slice): create reference to itype only when
5802 expansion is enabled.
5804 2011-08-02 Yannick Moy <moy@adacore.com>
5806 * einfo.adb, einfo.ads (Body_Is_In_ALFA, Set_Body_Is_In_ALFA): get/set
5807 for new flag denoting which subprogram bodies are in ALFA
5808 * restrict.adb, sem_ch7.adb: Update comment
5809 * sem_ch11.adb, sem_ch2.adb, sem_ch3.adb, sem_ch4.adb, sem_ch5.adb,
5810 sem_ch9.adb, sem_res.adb: Add calls to
5811 Current_Subprogram_Body_Is_Not_In_ALFA on unsupported constructs.
5812 * sem_ch6.adb (Analyze_Function_Return): add calls to
5813 Current_Subprogram_Body_Is_Not_In_ALFA on return statement in the
5814 middle of the body, and extended return.
5815 (Check_Missing_Return): add calls to Set_Body_Is_In_ALFA with argument
5816 False when missing return.
5817 (Analyze_Subprogram_Body_Helper): initialize the flag Body_Is_In_ALFA
5818 to True for subprograms whose spec is in ALFA. Remove later on the flag
5819 on the entity used for a subprogram body when there exists a separate
5821 * sem_util.adb, sem_util.ads (Current_Subprogram_Body_Is_Not_In_ALFA):
5822 if Current_Subprogram is not Empty, set its flag Body_Is_In_ALFA to
5823 False, otherwise do nothing.
5825 2011-08-02 Robert Dewar <dewar@adacore.com>
5827 * inline.adb, stand.ads, sem_ch6.adb, sem_ch8.adb: Minor reformatting.
5829 2011-08-02 Yannick Moy <moy@adacore.com>
5831 * sem_ch4.ads: minor formatting.
5833 2011-08-02 Yannick Moy <moy@adacore.com>
5835 * sem_aggr.adb, err_vars.ads, sem_ch3.adb, sem_ch5.adb, sem_ch9.adb,
5836 debug.adb, sem_util.adb, sem_res.adb, sem_attr.adb, gnat1drv.adb,
5837 errout.adb, errout.ads, exp_ch6.adb, sem_ch4.adb, restrict.adb,
5838 restrict.ads, sem_ch6.adb, sem_ch8.adb, sem_ch11.adb,
5839 opt.ads: cleanup of SPARK mode
5841 2011-08-02 Yannick Moy <moy@adacore.com>
5843 * cstand.adb (Create_Standard): sets Is_In_ALFA component of standard
5845 * einfo.adb, einfo.ads (Is_In_ALFA): add flag for all entities
5846 (Is_In_ALFA, Set_Is_In_ALFA): new subprograms to access flag Is_In_ALFA
5848 (Analyze_Object_Declaration): set Is_In_ALFA flag for objects
5849 (Constrain_Enumeration): set Is_In_ALFA flag for enumeration subtypes
5850 (Constrain_Integer): set Is_In_ALFA flag for integer subtypes
5851 (Enumeration_Type_Declaration): set Is_In_ALFA flag for enumeration
5853 (Set_Scalar_Range_For_Subtype): unset Is_In_ALFA flag for subtypes with
5855 * sem_ch6.adb (Analyze_Return_Type): unset Is_In_ALFA flag for
5856 functions whose return type is not in ALFA.
5857 (Analyze_Subprogram_Specification): set Is_In_ALFA flag for subprogram
5859 (Process_Formals): unset Is_In_ALFA flag for subprograms if a
5860 parameter's type is not in ALFA.
5861 * stand.ads (Standard_Type_Is_In_ALFA): array defines which standard
5864 2011-08-02 Ed Schonberg <schonberg@adacore.com>
5866 * sem_ch6 (Analyze_Expression_Function): treat the function as
5867 Inline_Always, and introduce a subprogram declaration for it when it is
5869 * inline.adb (Add_Inlined_Body): recognize bodies that come from
5870 expression functions, so that the back-end can determine whether they
5871 can in fact be inlined.
5872 * sem_util.adb (Is_Expression_Function): predicate to determine whether
5873 a function body comes from an expression function.
5875 2011-08-02 Gary Dismukes <dismukes@adacore.com>
5877 * sem_ch6.adb (Check_Conformance): Revise the check for nonconforming
5878 null exclusions to test Can_Never_Be_Null on the anonymous access types
5879 of the formals rather than testing the formals themselves. Exclude this
5880 check in cases where the Old_Formal is marked as a controlling formal,
5881 to avoid issuing spurious errors for bodies completing dispatching
5882 operations (due to the flag not getting set on controlling access
5883 formals in body specs).
5884 (Find_Corresponding_Spec): When checking full and subtype conformance of
5885 subprogram bodies in instances, pass Designated and E in that order, for
5886 consistency with the expected order of the formals (New_Id followed by
5889 2011-08-02 Robert Dewar <dewar@adacore.com>
5891 * sem_ch8.adb: Minor reformatting.
5893 2011-08-02 Ed Schonberg <schonberg@adacore.com>
5895 * sem_ch8.adb (Analyze_Subprogram_Renaming): new procedure
5896 Check_Class_Wide_Actual, to implement AI05-0071, on defaulted
5897 primitive operations of class-wide actuals.
5899 2011-08-02 Javier Miranda <miranda@adacore.com>
5901 * exp_atag.ads, exp_atag.adb
5902 (Build_Common_Dispatching_Select_Statements): Remove argument Loc
5903 since its value is implicitly passed in argument Typ.
5904 * exp_disp.adb (Make_Disp_Conditional_Select_Body,
5905 Make_Disp_Timed_Select_Body): Remove Loc in calls to routine
5906 Build_Common_Dispatching_Select_Statements.
5908 2011-08-02 Robert Dewar <dewar@adacore.com>
5910 * sem_ch3.adb, exp_atag.ads, get_scos.adb, get_scos.ads,
5911 exp_disp.adb, lib-xref.adb, lib-xref.ads: Update comments.
5914 2011-08-02 Robert Dewar <dewar@adacore.com>
5916 * sem_res.adb: Minor reformatting.
5917 * sem_prag.adb: Minor reformatting.
5919 2011-08-02 Javier Miranda <miranda@adacore.com>
5921 * exp_atag.adb, exp_atags.ads
5922 (Build_Common_Dispatching_Select_Statement): Replace argument DT_Ptr
5923 by the tagged type Entity. Required to use this routine in the VM
5924 targets since we do not have available the Tag entity in the VM
5927 (Expand_N_Subprogram_Body): Do not invoke Build_VM_TSDs if package
5928 Ada.Tags has not been previously loaded.
5930 (Expand_N_Package_Declaration, Expand_N_Package_Body): Do not invoke
5931 Build_VM_TSDs if package Ada.Tags has not been previously loaded.
5933 (Enclosing_Dynamic_Scope): Add missing support to handle the full
5934 view of enclosing scopes. Required to handle enclosing scopes that
5935 are synchronized types whose full view is a task type.
5937 (Build_VM_TSDs): Minor code improvement to avoid generating and
5938 analyzing lists with empty nodes.
5939 (Make_Disp_Asynchronous_Select_Body): Add support for VM targets.
5940 (Make_Disp_Conditional_Select_Body): Add support for VM targets.
5941 (Make_Disp_Get_Prim_Op_Kind): Add support for VM targets.
5942 (Make_Disp_Timed_Select_Body): Add support for VM targets.
5943 (Make_Select_Specific_Data_Table): Add support for VM targets.
5944 (Make_VM_TSD): Generate code to initialize the SSD structure of
5947 2011-08-02 Yannick Moy <moy@adacore.com>
5949 * lib-writ.adb (Write_ALI): when ALFA mode is set, write local
5950 cross-references section in ALI.
5951 * lib-xref.adb, lib-xref.ads (Xref_Entry): add components Sub
5952 (enclosing subprogram), Slc (location of Sub) and Sun (unit number of
5954 (Enclosing_Subprogram_Or_Package): new function to return the enclosing
5955 subprogram or package entity of a node
5956 (Is_Local_Reference_Type): new function returns True for references
5957 selected in local cross-references.
5958 (Lt): function extracted from Lt in Output_References
5959 (Write_Entity_Name): function extracted from Output_References
5960 (Generate_Definition): generate reference with type 'D' for definition
5961 of objects (object declaration and parameter specification), with
5962 appropriate locations and units, for use in local cross-references.
5963 (Generate_Reference): update fields Sub, Slc and Sun. Keep newly created
5964 references of type 'I' for initialization in object definition.
5965 (Output_References): move part of function Lt and procedure
5966 Write_Entity_Name outside of the body. Ignore references of types 'D'
5967 and 'I' introduced for local cross-references.
5968 (Output_Local_References): new procedure to output the local
5969 cross-references sections.
5970 (Lref_Entity_Status): new array defining whether an entity is a local
5971 * sem_ch3.adb (Analyze_Object_Declaration): call Generate_Reference
5972 with 'I' type when initialization expression is present.
5973 * get_scos.adb, get_scos.ads: Correct comments and typos
5975 2011-08-02 Javier Miranda <miranda@adacore.com>
5977 * exp_ch6.adb (Expand_N_Subprogram_Body): Enable generation of TSDs in
5979 * exp_ch7.adb (Expand_N_Package_Body): Enable generation of TSDs in
5981 * exp_disp.adb (Build_VM_TSDs): No action needed if the runtime has no
5984 2011-08-02 Vincent Celier <celier@adacore.com>
5986 * prj-nmsc.adb (File_Found): New components Excl_File and Excl_Line
5987 (No_Space_Img): New function
5988 (Find_Excluded_Sources): When reading from a file, record the file name
5989 and the line number for each excluded source.
5990 (Mark_Excluded_Sources): When reporting an error, if the excluded
5991 sources were read from a file, include file name and line number in
5994 2011-08-02 Ed Schonberg <schonberg@adacore.com>
5996 * sem_res.adb (Resolve_Call): implement rule in RM 12.5.1 (23.3/2).
5998 2011-08-02 Robert Dewar <dewar@adacore.com>
6000 * exp_ch7.adb exp_ch6.adb, exp_disp.adb: Minor reformatting
6002 2011-08-02 Javier Miranda <miranda@adacore.com>
6004 * exp_ch6.adb (Expand_N_Subprogram_Body): Temporarily restrict the
6005 generation of TSDs to the DOTNET compiler.
6006 * exp_ch7.adb (Expand_N_Package_Body): Temporarily restrict the
6007 generation of TSDs to the DOTNET compiler.
6009 2011-08-02 Javier Miranda <miranda@adacore.com>
6011 * exp_disp.ads (Build_VM_TSDs): Build the runtime Type Specific Data
6012 record of all the tagged types declared inside library level package
6013 declarations, library level package bodies or library level subprograms.
6014 * exp_disp.adb (Make_VM_TSD): New subprogram that builds the TSD
6015 associated with a given tagged type.
6016 (Build_VM_TSDs): New subprogram.
6017 * exp_ch6.adb (Expand_N_Subprogram_Body): Generate TSDs records of main
6018 compilation units that are subprograms.
6019 * exp_ch7.adb (Expand_N_Package_Body): Generate TSDs of main
6020 compilation units that are package bodies.
6021 (Expand_N_Package_Declaration): Generate TSDs of the main compilation
6022 units that are a package declaration or a package instantiation.
6023 * exp_intr.adb (Expand_Dispatching_Constructor_Call): Minor code
6024 reorganization to improve the error generated by the frontend when the
6025 function Ada.Tags.Secondary_Tag is not available.
6026 * rtsfind.ads (RE_Register_TSD): New runtime entity.
6027 * exp_ch4.adb (Expand_N_Type_Conversion): Minor code cleanup.
6029 2011-08-02 Javier Miranda <miranda@adacore.com>
6031 * exp_disp.adb (Make_DT): Generate call to Check_TSD in Ada 2005 mode.
6033 2011-08-02 Robert Dewar <dewar@adacore.com>
6035 * s-imenne.ads: Minor reformatting.
6037 2011-08-02 Robert Dewar <dewar@adacore.com>
6039 * a-stunau.ads: Add pragma Suppress_Initialization for Big_String
6040 * freeze.adb (Warn_Overlay): Don't warn if initialization suppressed
6041 * s-stalib.ads: Add pragma Suppress_Initialization for Big_String
6043 2011-08-02 Robert Dewar <dewar@adacore.com>
6045 * einfo.ads (Materialize_Entity): Document this is only for renamings
6046 * exp_ch3.adb (Expand_N_Object_Declaration): Make sure we generate
6047 required debug information in the case where we transform the object
6048 declaration into a renaming declaration.
6049 * exp_ch4.adb (Expand_Concatenate): Generate debug info for result
6051 * exp_dbug.ads (Debug_Renaming_Declaration): Document setting of
6054 2011-08-02 Robert Dewar <dewar@adacore.com>
6056 * einfo.ads, einfo.adb (Suppress_Initialization): Replaces
6057 Suppress_Init_Procs.
6058 * exp_ch3.adb, exp_disp.adb, freeze.adb: Use
6059 Suppress_Initialization/Initialization_Suppressed.
6060 * gnat_rm.texi: New documentation for pragma Suppress_Initialization
6061 * sem_aux.ads, sem_aux.adb (Initialization_Suppressed): New function
6062 * sem_dist.adb: Use Suppress_Initialization/Initialization_Suppressed
6063 * sem_prag.adb: New processing for pragma Suppress_Initialization.
6065 2011-08-02 Robert Dewar <dewar@adacore.com>
6067 * gnat_rm.texi, a-tags.ads, sem_prag.adb, sem_ch12.adb, exp_disp.adb:
6070 2011-08-02 Ed Schonberg <schonberg@adacore.com>
6072 * sem_prag.adb (Chain_PPC): Implement AI04-0230: null procedures can
6073 only have inheritable classwide pre/postconditions.
6075 2011-08-02 Javier Miranda <miranda@adacore.com>
6077 * a-tags.ads, a-tags.adb (Check_TSD): New subprogram.
6078 * rtsfind.ads (RE_Check_TSD): New runtime entity.
6079 * exp_disp.adb (Make_DT): Generate call to the new runtime routine that
6080 checks if the external tag of a type is the same as the external tag
6081 of some other declaration.
6083 2011-08-02 Thomas Quinot <quinot@adacore.com>
6085 * s-taskin.ads: Minor reformatting.
6087 2011-08-02 Emmanuel Briot <briot@adacore.com>
6089 * g-comlin.adb (Display_Help): swap the order in which it prints the
6090 short help and the general usage.
6092 2011-08-02 Ed Schonberg <schonberg@adacore.com>
6094 * sem_ch12.adb (Analyze_Generic_Subprogram_Declaration): copy properly
6095 the aspect declarations and attach them to the generic copy for
6096 subsequent analysis.
6097 (Analyze_Subprogram_Instantiation): copy explicitly the aspect
6098 declarations of the generic tree to the new subprogram declarations.
6099 * sem_attr.adb (Check_Precondition_Postcondition): recognize
6100 conditions that apply to a subprogram instance.
6102 2011-08-02 Robert Dewar <dewar@adacore.com>
6104 * gnat_rm.texi: Clarify doc on pragma Source_File_Name[_Project].
6106 2011-08-02 Ed Schonberg <schonberg@adacore.com>
6108 * sem_ch3.adb (Derived_Type_Declaration): When checking that a untagged
6109 private type with a tagged full view is not derived in the immediate
6110 scope of the partial view, (RM 7.3 (7)) use the scope of the base type.
6112 2011-08-02 Robert Dewar <dewar@adacore.com>
6114 * exp_ch4.adb: Minor reformatting.
6116 2011-08-02 Ed Schonberg <schonberg@adacore.com>
6118 * sem_ch5.adb (Analyze_Loop_Statement): If the iteration scheme is an
6119 Ada2012 iterator, the loop will be rewritten during expansion into a
6120 while loop with a cursor and an element declaration. Do not analyze the
6121 body in this case, because if the container is for indefinite types the
6122 actual subtype of the elements will only be determined when the cursor
6123 declaration is analyzed.
6125 2011-08-02 Arnaud Charlet <charlet@adacore.com>
6127 * sem_ch13.adb (Analyze_Attribute_Definition_Clause): Ignore
6128 size/alignment related attributes in CodePeer_Mode.
6130 2011-08-02 Gary Dismukes <dismukes@adacore.com>
6132 * sem_ch3.adb (Check_Ops_From_Incomplete_Type): Remove call to
6133 Prepend_Element, since this can result in the operation getting the
6134 wrong slot in the full type's dispatch table if the full type has
6135 inherited operations. The incomplete type's operation will get added
6136 to the proper position in the full type's primitives
6137 list later in Sem_Disp.Check_Operation_From_Incomplete_Type.
6138 (Process_Incomplete_Dependents): Add Is_Primitive test when checking for
6139 dispatching operations, since there are cases where nonprimitive
6140 subprograms can get added to the list of incomplete dependents (such
6141 as subprograms in nested packages).
6142 * sem_ch6.adb (Process_Formals): First, remove test for being in a
6143 private part when determining whether to add a primitive with a
6144 parameter of a tagged incomplete type to the Private_Dependents list.
6145 Such primitives can also occur in the visible part, and should not have
6146 been excluded from being private dependents.
6147 * sem_ch7.adb (Uninstall_Declarations): When checking the rule of
6148 RM05-3.10.1(9.3/2), test that a subprogram in the Private_Dependents
6149 list of a Taft-amendment incomplete type is a primitive before issuing
6150 an error that the full type must appear in the same unit. There are
6151 cases where nonprimitives can be in the list (such as subprograms in
6153 * sem_disp.adb (Derives_From): Use correct condition for checking that
6154 a formal's type is derived from the type of the corresponding formal in
6155 the parent subprogram (the condition was completely wrong). Add
6156 checking that was missing for controlling result types being derived
6157 from the result type of the parent operation.
6159 2011-08-02 Yannick Moy <moy@adacore.com>
6161 * errout.adb (First_Node): minor renaming
6162 * restrict.adb (Check_Formal_Restriction): put restriction warning on
6165 2011-08-02 Yannick Moy <moy@adacore.com>
6167 * sem_res.adb (Resolve_Logical_Op): ensure N is a binary operator
6168 before accessing operands.
6169 * sem_util.adb (Is_SPARK_Initialization_Expr): follow original nodes to
6170 decide whether an initialization expression respects SPARK rules, as
6171 the plain node is the expanded one. This allows for more valid warnings
6173 * gnat_rm.texi: Minor update.
6175 2011-08-02 Arnaud Charlet <charlet@adacore.com>
6177 * sem_ch13.adb (Analyze_Enumeration_Representation_Clause): Revert
6180 2011-08-02 Robert Dewar <dewar@adacore.com>
6182 * sem_ch3.adb, sem_ch4.adb: Minor reformatting.
6184 2011-08-02 Hristian Kirtchev <kirtchev@adacore.com>
6186 * exp_ch5.adb (Expand_Iterator_Loop): Reformatting. Wrap the original
6187 loop statements and the element renaming declaration with a block when
6188 the element type is controlled.
6190 2011-08-02 Yannick Moy <moy@adacore.com>
6192 * sinfo.ads: Minor formatting.
6194 2011-08-02 Ed Schonberg <schonberg@adacore.com>
6196 * sem_aggr.adb (Add_Association): if the association has a box and no
6197 expression, use the Sloc of the aggregate itself for the new
6199 * errout.adb (First_Node): Exclude nodes with no Sloc, and always use
6202 2011-08-02 Hristian Kirtchev <kirtchev@adacore.com>
6204 * exp_ch5.adb (Expand_Iterator_Loop): Code cleanup and refactoring.
6205 When a container is provided via a function call, generate a renaming
6206 of the function result. This avoids the creation of a transient scope
6207 and the premature finalization of the container.
6208 * exp_ch7.adb (Is_Container_Cursor): Removed.
6209 (Wrap_Transient_Declaration): Remove the supression of the finalization
6210 of the list controller when the declaration denotes a container cursor,
6213 2011-08-02 Yannick Moy <moy@adacore.com>
6215 * restrict.adb (Check_Formal_Restriction): only issue a warning if the
6216 node is from source, instead of the original node being from source.
6218 (Resolve_Array_Aggregate): refine the check for a static expression, to
6219 recognize also static ranges
6220 * sem_ch3.adb, sem_ch3.ads (Analyze_Component_Declaration,
6221 Array_Type_Declaration): postpone the test for the type being a subtype
6222 mark after the type has been resolved, so that component-selection and
6223 expanded-name are discriminated.
6224 (Make_Index, Process_Range_Expr_In_Decl): add a parameter In_Iter_Schm
6225 to distinguish the case of an iteration scheme, so that an error is
6226 issed on a non-static range in SPARK except in an iteration scheme.
6227 * sem_ch5.adb (Analyze_Iteration_Scheme): call Make_Index with
6228 In_Iter_Schm = True.
6229 * sem_ch6.adb (Analyze_Subprogram_Specification): refine the check for
6230 user-defined operators so that they are allowed in renaming
6232 (Find_Selected_Component): refine the check for prefixing of operators
6233 so that they are allowed in renaming. Move the checks for restrictions
6234 on selector name after analysis discriminated between
6235 component-selection and expanded-name.
6236 * sem_res.adb (Resolve_Op_Concat_Arg): do not issue a warning on
6237 concatenation argument of string type if it is static.
6238 * sem_util.adb, sem_util.ads
6239 (Check_Later_Vs_Basic_Declarations): add a new function
6240 Is_Later_Declarative_Item to decice which declarations are allowed as
6241 later items, in the two different modes Ada 83 and SPARK. In the SPARK
6242 mode, add that renamings are considered as later items.
6243 (Enclosing_Package): new function to return the enclosing package
6244 (Enter_Name): correct the rule for homonyms in SPARK
6245 (Is_SPARK_Initialization_Expr): default to returning True on nodes not
6246 from source (result of expansion) to avoid issuing wrong warnings.
6248 2011-08-02 Ed Schonberg <schonberg@adacore.com>
6250 * errout.adb: On anything but an expression First_Node returns its
6253 2011-08-02 Pascal Obry <obry@adacore.com>
6255 * prj-proc.adb, make.adb, makeutl.adb: Minor reformatting.
6257 2011-08-02 Hristian Kirtchev <kirtchev@adacore.com>
6259 * exp_ch5.adb (Expand_Iterator_Loop): Code cleanup and reorganization.
6260 Set the associated loop as the related expression of internally
6262 * exp_ch7.adb (Is_Container_Cursor): New routine.
6263 (Wrap_Transient_Declaration): Supress the finalization of the list
6264 controller when the declaration denotes a container cursor.
6266 2011-08-02 Yannick Moy <moy@adacore.com>
6268 * opt.ads (SPARK_Mode): update comment, SPARK_Mode only set through
6270 * par-ch3.adb (P_Delta_Constraint): remove check in SPARK mode that the
6271 expression is a simple expression. This check cannot be performed in
6272 the semantics, so just drop it.
6273 (P_Index_Or_Discriminant_Constraint): move check that the index or
6274 discriminant is a subtype mark to Analyze_Subtype_Declaration in the
6275 semantics. Other cases were previously checked in the semantics.
6276 * par-ch4.adb (P_Name): move checks that a selector name is not
6277 character literal or an operator symbol to Find_Selected_Component in
6279 * par-ch5.adb (Parse_Decls_Begin_End): move check that basic
6280 declarations are not placed after later declarations in a separate
6281 procedure in Sem_Util (possibly not the best choice?), to be used both
6282 during parsing, for Ada 83 mode, and during semantic analysis, for
6284 * par-endh.adb (Check_End): move check that end label is not missing
6285 to Process_End_Label in the semantics
6286 * par-prag.adb (Process_Restrictions_Or_Restriction_Warnings): remove
6287 the special case for SPARK restriction
6288 * par.adb: use and with Sem_Util, for use in Parse_Decls_Begin_End
6289 * restrict.adb, restrict.ads (Check_Formal_Restriction): add a
6290 parameter Force to issue the error message even on internal node (used
6291 for generated end label). Call Check_Restriction to check when an error
6292 must be issued. In SPARK mode, issue an error message even if the
6293 restriction is not set.
6294 (Check_Restriction): new procedure with an additional out parameter to
6295 inform the caller that a message has been issued
6296 * sem_aggr.adb: Minor modification of message
6297 * sem_attr.adb (Analyze_Attribute): call Check_Formal_Restriction
6298 instead of issuing an error message directly
6299 * sem_ch3.adb (Analyze_Declarations): move here the check that basic
6300 declarations are not placed after later declarations, by calling
6301 Check_Later_Vs_Basic_Declarations
6302 (Analyze_Subtype_Declaration): move here the check that an index or
6303 discriminant constraint must be a subtype mark. Change the check that
6304 a subtype of String must start at one so that it works on subtype marks.
6305 * sem_ch4.adb (Analyze_Call): move here the check that a named
6306 association cannot follow a positional one in a call
6307 * sem_ch5.adb (Check_Unreachable_Code): call Check_Formal_Restriction
6308 instead of issuing an error message directly
6309 * sem_ch8.adb (Find_Selected_Component): move here the check that a
6310 selector name is not a character literal or an operator symbol. Move
6311 here the check that the prefix of an expanded name cannot be a
6312 subprogram or a loop statement.
6313 * sem_util.adb, sem_util.ads (Check_Later_Vs_Basic_Declarations): new
6314 procedure called from parsing and semantics to check that basic
6315 declarations are not placed after later declarations
6316 (Process_End_Label): move here the check that end label is not missing
6318 2011-08-02 Arnaud Charlet <charlet@adacore.com>
6320 * sem_ch13.adb (Analyze_Enumeration_Representation_Clause): Ignore enum
6321 representation clause in codepeer mode, since it confuses CodePeer and
6322 does not bring useful info.
6324 2011-08-02 Ed Falis <falis@adacore.com>
6326 * init.c: initialize fp hw on MILS.
6328 2011-08-02 Ed Schonberg <schonberg@adacore.com>
6330 * errout.adb (First_Node): for bodies, return the node itself (small
6331 optimization). For other nodes, do not check source_unit if the node
6332 comes from Standard.
6334 2011-08-02 Robert Dewar <dewar@adacore.com>
6336 * exp_ch3.adb: Minor comment additions.
6337 * sem_ch13.adb: Minor reformatting.
6339 2011-08-02 Pascal Obry <obry@adacore.com>
6341 * make.adb, makeutl.adb: Removes some superfluous directory separator.
6343 2011-08-02 Robert Dewar <dewar@adacore.com>
6345 * sem_attr.adb: Minor reformatting.
6347 2011-08-02 Robert Dewar <dewar@adacore.com>
6349 * einfo.adb (Has_Default_Aspect): Replaces Has_Default_Value
6350 (Has_Default_Component_Value): Removed
6351 * einfo.ads Comment updates
6352 (Has_Default_Aspect): Replaces Has_Default_Value
6353 (Has_Default_Component_Value): Removed
6355 (Expand_N_Freeze_Entity): Handle Default[_Component]_Value aspects
6357 (Build_Array_Init_Proc): Handle Default_[Component_]Value aspects
6358 (Get_Simple_Init_Val): Handle Default_Value aspect
6359 (Needs_Simple_Initialization): Handle Default_Value aspect
6360 * exp_ch3.ads: Needs_Simple_Initialization
6361 * freeze.adb (Freeze_Entity): Handle Default_[Component_]Value aspect
6362 * par-prag.adb (Pragma_Default[_Component]Value) Removed
6364 (Analyze_Aspect_Specifications): Fix Default[_Component]_Value aspects
6365 * sem_prag.adb (Pragma_Default[_Component]Value) Removed
6366 * snames.ads-tmpl (Pragma_Default[_Component]Value) Removed
6368 2011-08-02 Ed Schonberg <schonberg@adacore.com>
6370 * sem_ch5.adb (Analyze_Iterator_Specification): use base type to locate
6371 package containing iteration primitives.
6372 exp_ch5.adb (Expand_Iterator_Loop): ditto.
6374 2011-08-02 Ed Schonberg <schonberg@adacore.com>
6376 * sem_ch5.adb (Analyze_Iteration_Scheme): For an Ada2012 iterator with
6377 "of", pre-analyze expression in case it is a function call with
6378 finalization actions that must be placed ahead of the loop.
6379 * exp_ch5.adb (Expand_Iterator_Loop): If condition_actions are present
6380 on an Ada2012 iterator, insert them ahead of the rewritten loop.
6382 2011-08-02 Geert Bosch <bosch@adacore.com>
6384 * cstand.adb (Create_Float_Types): Only consider C's long double for
6385 Long_Long_Float, in addition to double.
6387 2011-08-02 Robert Dewar <dewar@adacore.com>
6389 * sem_ch3.adb, sem_ch5.adb, sem_type.adb, switch-c.adb, switch-c.ads,
6390 sem_prag.adb, sem_util.adb, sem_util.ads, sem_res.adb, warnsw.ads,
6391 prepcomp.ads, cstand.adb, stand.ads, a-calfor.adb, s-stusta.adb:
6394 2011-08-02 Ed Schonberg <schonberg@adacore.com>
6396 * sem_attr.adb: handle properly 'Result when it is a prefix of an
6399 2011-08-02 Javier Miranda <miranda@adacore.com>
6401 * einfo.ads, einfo.adb
6402 (Original_Access_Type): Move this attribute to Node26 since there was
6403 an undocumented use of Node21 in E_Access_Subprogram_Type entities
6404 which causes conflicts and breaks the generation of the .NET compiler.
6405 (Interface_Name): Add missing documentation on JGNAT only uses of
6408 2011-08-02 Geert Bosch <bosch@adacore.com>
6410 * cstand.adb (Back_End_Float_Types): Use Elist instead of Nlist
6411 (Find_Back_End_Float_Type): Likewise
6412 (Create_Back_End_Float_Types): Likewise
6413 (Create_Float_Types): Likewise
6414 (Register_Float_Type): Likewise
6415 * sem_ch3.adb (Floating_Point_Type_Declaration): Use Elist instead of
6416 Nlist and split out type selection in new local Find_Base_Type function.
6417 * sem_prag.adb (Process_Import_Predefined_Type): Use Elist instead of
6419 * stand.ads (Predefined_Float_Types): Use Elist instead of Nlist
6421 2011-08-02 Robert Dewar <dewar@adacore.com>
6423 * inline.adb: Minor code reorganization (put Get_Code_Unit_Entity in
6425 * opt.ads: Minor comment change.
6426 * sem_ch12.adb: Minor code reorganization.
6428 2011-08-02 Gary Dismukes <dismukes@adacore.com>
6430 * sem_ch3.adb (Complete_Private_Subtype): Don't append the private
6431 subtype's list of rep items to the list on the full subtype in the case
6432 where the lists are the same.
6434 2011-08-02 Geert Bosch <bosch@adacore.com>
6436 * switch-c.adb (Free): New deallocation procedure to avoid implicitly
6437 using the one from System.Strings, which also deallocates all strings.
6439 2011-08-02 Geert Bosch <bosch@adacore.com>
6441 * gcc-interface/gigi.h, gcc-interface/misc.c (enumerate_modes): New
6443 * gcc-interface/Make-lang.in: Update dependencies.
6445 2011-08-02 Olivier Hainque <hainque@adacore.com>
6447 * gcc-interface/trans.c (Subprogram_Body_to_gnu): Set the function
6450 2011-08-02 Javier Miranda <miranda@adacore.com>
6452 * sem_ch3.adb (Check_Anonymous_Access_Components): Create extra formals
6453 associated with anonymous access to subprograms.
6455 2011-08-02 Geert Bosch <bosch@adacore.com>
6458 (Preprocessing_Symbol_Defs): Move from Prepcomp.Symbol_Definitions.
6459 (Preprocessing_Symbol_Last): Move from Prepcomp.Last_Definition.
6460 * prepcomp.adb (Symbol_Definitions, Last_Definition): Move to opt.ads
6461 (Add_Symbol_Definition): Move to switch-c.adb
6462 (Process_Command_Line_Symbol_Definitions): Adjust references to above.
6463 * prepcomp.ads: Remove dependency on Ada.Unchecked_Deallocation.
6464 (Add_Symbol_Definition): Move to switch-c.adb.
6465 * sem_ch13.adb, sem_prag.adb: Add dependency on Warnsw.
6467 (Set_Dot_Warning_Switch, Set_GNAT_Mode_Warnings, Set_Warning_Switch):
6469 * sem_warn.ads (Warn_On_Record_Holes, Warn_On_Overridden_Size,
6470 Set_Dot_Warning_Switch, Set_GNAT_Mode_Warnings, Set_Warning_Switch):
6472 * switch-c.adb: Replace dependency on Prepcomp and Sem_Warn by Warnsw.
6473 (Add_Symbol_Definition): Moved from Prepcomp.
6474 * switch-c.ads: Update copyright notice. Use String_List instead of
6475 Argument_List, removing dependency on System.OS_Lib.
6477 2011-08-02 Yannick Moy <moy@adacore.com>
6479 * sem_ch3.adb (Analyze_Object_Declaration): issue an error in formal
6480 mode on initialization expression which does not respect SPARK
6482 * sem_util.adb, sem_util.ads (Is_SPARK_Initialization_Expr): determines
6483 if the tree referenced by its argument represents an initialization
6484 expression in SPARK, suitable for initializing an object in an object
6487 2011-08-02 Javier Miranda <miranda@adacore.com>
6489 * exp_ch9.adb (Expand_Access_Protected_Subprogram_Type): Link the
6490 internally generated access to subprogram with its associated protected
6492 * einfo.ads, einfo.adb (Original_Access_Type): New attribute.
6494 2011-08-02 Geert Bosch <bosch@adacore.com>
6496 * cstand.adb (Register_Float_Type): Print information about type to
6497 register, if the Debug_Flag_Dot_B is set.
6498 * debug.adb (Debug_Flag_Dot_B): Document d.b debug option.
6499 * rtsfind.ads (RE_Max_Base_Digits): New run time entity.
6500 * sem_ch3.adb (Floating_Point_Type_Declaration): Allow declarations
6501 with a requested precision of more than Max_Digits digits and no more
6502 than Max_Base_Digits digits, if a range specification is present and the
6503 Predefined_Float_Types list has a suitable type to derive from.
6504 * sem_ch3.adb (Rep_Item_Too_Early): Avoid generating error in the
6505 case of type completion with pragma Import
6507 (Process_Import_Predefined_Type): Processing to complete a type
6508 with pragma Import. Currently supports floating point types only.
6509 (Set_Convention_From_Pragma): Do nothing without underlying type.
6510 (Process_Convention): Guard against absence of underlying type,
6511 which may happen when importing incomplete types.
6512 (Process_Import_Or_Interface): Handle case of importing predefined
6513 types. Tweak error message.
6515 2011-08-02 Eric Botcazou <ebotcazou@adacore.com>
6517 * inline.adb (Add_Inlined_Body): Adjust check for library-level inlined
6518 functions to previous change. Reorganize code slightly.
6520 2011-08-02 Geert Bosch <bosch@adacore.com>
6522 * back_end.ads (Register_Type_Proc): New call back procedure type for
6523 allowing the back end to provide information about available types.
6524 (Register_Back_End_Types): New procedure to register back end types.
6525 * back_end.adb (Register_Back_End_Types): Call the back end to enumerate
6527 * cstand.adb (Back_End_Float_Types): New list for floating point types
6528 supported by the back end.
6529 (Build_Float_Type): Add extra parameter for Float_Rep_Kind.
6530 (Copy_Float_Type): New procedure to make new copies of predefined types.
6531 (Register_Float_Type): New call back procedure to populate the BEFT list
6532 (Find_Back_End_Float_Type): New procedure to find a BEFT by name
6533 (Create_Back_End_Float_Types): New procedure to populate the BEFT list.
6534 (Create_Float_Types): New procedure to create entities for floating
6535 point types predefined in Standard, and put these and any remaining
6536 BEFTs on the Predefined_Float_Types list.
6537 * stand.ads (Predefined_Float_Types): New list for predefined floating
6538 point types that do not have declarations in package Standard.
6540 2011-08-02 Eric Botcazou <ebotcazou@adacore.com>
6542 * inline.adb (Get_Code_Unit_Entity): New local function. Returns the
6543 entity node for the unit containing the parameter.
6544 (Add_Inlined_Body): Use it to find the unit containing the subprogram.
6545 (Add_Inlined_Subprogram): Likewise.
6546 * gcc-interface/Make-lang.in: Update dependencies.
6548 2011-08-02 Thomas Quinot <quinot@adacore.com>
6550 * s-stusta.adb (Print): Make sure Pos is always initialized to a
6553 2011-08-02 Geert Bosch <bosch@adacore.com>
6555 * a-calfor.adb (Image): Simplify, removing unnecessary uses of 'Image.
6557 2011-08-02 Eric Botcazou <ebotcazou@adacore.com>
6559 * sem_type.adb (Covers): Move trivial case to the top and reuse the
6560 computed value of Base_Type.
6562 2011-08-02 Yannick Moy <moy@adacore.com>
6564 * restrict.adb (Check_Restriction): issue an error for any use of
6565 class-wide, even if the No_Dispatch restriction is not set.
6566 * sem_aggr.adb: Correct typos in comments and messages in formal mode
6567 * sem_ch3.adb (Process_Full_View): issue an error in formal mode is,
6568 when completing a private extension, the type named in the private part
6569 is not the same as that named in the visible part.
6570 * sem_res.adb (Resolve_Call): issue an error in formal mode on the use
6571 of an inherited primitive operations of a tagged type or type extension
6572 that returns the tagged type.
6573 * sem_util.adb, sem_util.ads (Is_Inherited_Operation_For_Type): new
6574 function which returns True for an implicit operation inherited by the
6575 derived type declaration for the argument type.
6576 (Is_SPARK_Object_Reference): move to appropriate place in alphabetic
6579 2011-08-02 Ed Schonberg <schonberg@adacore.com>
6581 * sem_ch5.adb (Pre_Analyze_Range): new procedure extracted from
6582 Process_Bounds, to perform analysis with expansion of a range or an
6583 expression that is the iteration scheme for a loop.
6584 (Analyze_Iterator_Specification): If domain of iteration is given by a
6585 function call with a controlled result, as is the case if call returns
6586 a predefined container, ensure that finalization actions are properly
6588 * par-ch3.adb: accept Ada2012 iterator form in P_Discrete_Range.
6590 2011-08-02 Javier Miranda <miranda@adacore.com>
6592 * sem_ch5.adb (Analyze_Iteration_Scheme): Fix typo.
6593 * gcc-interface/Make-lang.in: Update dependencies.
6595 2011-08-02 Javier Miranda <miranda@adacore.com>
6597 * sem_util.ads, sem_util.adb (Is_Variable): Add a new formal to
6598 determine if the analysis is performed using N or Original_Node (N).
6599 * exp_util.adb (Side_Effect_Free): Code cleanup since the new
6600 functionality of routine Is_Variable avoids code duplication.
6601 * checks.adb (Determine_Range): Handle temporaries generated by
6602 Remove_Side_Effects.
6604 2011-08-02 Javier Miranda <miranda@adacore.com>
6606 * exp_ch4.adb (Expand_N_Quantified_Expression): Force reanalysis and
6607 expansion of the condition. Required since the previous analysis was
6608 done with expansion disabled (see Resolve_Quantified_Expression) and
6609 hence checks were not inserted and record comparisons have not been
6612 2011-08-02 Ed Falis <falis@adacore.com>
6614 * s-taprop-vxworks.adb, s-intman-vxworks.adb, s-intman-vxworks.ads:
6617 2011-08-02 Bob Duff <duff@adacore.com>
6619 * opt.ads: Minor comment fix.
6621 2011-08-02 Bob Duff <duff@adacore.com>
6623 * sem_ch12.adb (Analyze_Package_Instantiation,
6624 Analyze_Subprogram_Instantiation): Turn off style checking while
6625 analyzing an instance. Whatever style checks that apply to the generic
6626 unit should apply, so it makes no sense to apply them in an instance.
6627 This was causing trouble when compiling an instance of a runtime
6628 unit that violates the -gnatyO switch.
6629 * stylesw.adb (Set_Style_Check_Options): "when 'O' =>" was missing from
6630 one of the two case statements, causing spurious errors.
6632 2011-08-02 Robert Dewar <dewar@adacore.com>
6634 * uname.adb: Minor reformatting.
6635 * gnatcmd.adb: Minor reformatting.
6636 * exp_attr.adb: Minor reformatting.
6638 2011-08-02 Ed Schonberg <schonberg@adacore.com>
6640 * exp_ch5.adb (Expand_N_Assignment_Statement): under restriction
6641 No_Dispatching_Calls, do not look for the Assign primitive, because
6642 predefined primitives are not created in this case.
6644 2011-08-02 Bob Duff <duff@adacore.com>
6646 * stylesw.ads: Minor comment fixes.
6648 2011-08-02 Robert Dewar <dewar@adacore.com>
6650 * freeze.adb (Add_To_Result): New procedure.
6652 2011-08-02 Jose Ruiz <ruiz@adacore.com>
6654 * exp_attr.adb (Find_Stream_Subprogram): When using a configurable run
6655 time, if the specific run-time routines for handling streams of strings
6656 are not available, use the default mechanism.
6658 2011-08-02 Arnaud Charlet <charlet@adacore.com>
6660 * s-regpat.ads: Fix typo.
6662 2011-08-02 Vincent Celier <celier@adacore.com>
6664 * prj-conf.adb (Get_Or_Create_Configuration_File): If On_Load_Config is
6665 not null, call it to create the in memory config project file without
6666 parsing an existing default config project file.
6668 2011-08-02 Eric Botcazou <ebotcazou@adacore.com>
6670 * atree.adb (Allocate_Initialize_Node): Remove useless temporaries.
6672 2011-08-02 Ed Schonberg <schonberg@adacore.com>
6674 * sem_elim.adb: an abstract subprogram does not need an eliminate
6675 pragma for its descendant to be eliminable.
6677 2011-08-02 Ed Falis <falis@adacore.com>
6679 * init.c: revert to handling before previous checkin for VxWorks
6680 * s-intman-vxworks.adb: delete unnecessary declarations related to
6681 using Ada interrupt facilities for handling signals.
6682 Delete Initialize_Interrupts. Use __gnat_install_handler instead.
6683 * s-intman-vxworks.ads: Import __gnat_install_handler as
6684 Initialize_Interrupts.
6685 * s-taprop-vxworks.adb: Delete Signal_Mask.
6686 (Abort_Handler): change construction of mask to unblock exception
6689 2011-08-02 Jerome Guitton <guitton@adacore.com>
6691 * a-except-2005.adb (Raise_From_Signal_Handler): Call
6692 Debug_Raise_Exception before propagation starts.
6694 2011-08-02 Eric Botcazou <ebotcazou@adacore.com>
6696 * exp_ch6.adb (Expand_Call): Guard restriction checks with a call
6697 to Restriction_Check_Required.
6698 * sem_ch3.adb (Analyze_Object_Declaration): Likewise.
6699 * sem_res.adb (Resolve_Call): Likewise.
6700 * sem_attr.adb (Check_Stream_Attribute): Likewise.
6702 2011-08-02 Bob Duff <duff@adacore.com>
6704 * stylesw.ads: Update comment.
6705 * style.adb: Minor: Use Error_Msg_NE instead of Error_Msg_N.
6706 * errout.ads: Remove obsolete comment.
6708 2011-08-02 Javier Miranda <miranda@adacore.com>
6710 * einfo.ads, einfo.adb (Is_Safe_To_Reevaluate): new function.
6711 (Set_Is_Safe_To_Reevaluate): new procedure.
6712 * sem_ch5.adb (Analyze_Assignment): Add one assertion to ensure that no
6713 assignment is allowed on safe-to-reevaluate variables.
6714 (Analyze_Iteration_Schine.Process_Bounds.One_Bound): Decorate the
6715 temporary created to remove side effects in expressions that use
6716 the secondary stack as safe-to-reevaluate.
6717 * exp_util.adb (Side_Effect_Free): Add missing code to handle well
6718 variables that are not true constants.
6720 2011-08-02 Robert Dewar <dewar@adacore.com>
6722 * sem_ch5.adb, sem_ch7.adb, einfo.ads, sem_util.adb, sem_util.ads,
6723 sem_res.adb, sem_ch6.adb: Minor reformatting.
6725 2011-08-02 Jerome Guitton <guitton@adacore.com>
6727 * a-except-2005.adb (Raise_Current_Excep): Remove obsolete dead code.
6729 2011-08-02 Ed Schonberg <schonberg@adacore.com>
6731 * sem_ch6.adb (New_Overloaded_Entity, Check_Overriding_Indicator): Do
6732 not set Overridden_Operation if subprogram is an initialization
6735 2011-08-02 Yannick Moy <moy@adacore.com>
6737 * par-ch6.adb: Correct obsolete name in comments
6738 * restrict.adb, restrict.ads (Check_Formal_Restriction): new function
6739 which takes two message arguments (existing function takes one), with
6740 second message used for continuation.
6741 * sem_ch5.adb (Analyze_Block_Statement): in formal mode, only reject
6742 block statements that originate from a source block statement, not
6743 generated block statements
6744 * sem_ch6.adb (Analyze_Function_Call): rename L into Actuals, for
6745 symmetry with procedure case
6746 * sem_ch7.adb (Check_One_Tagged_Type_Or_Extension_At_Most): new
6747 function to issue an error in formal mode if a package specification
6748 contains more than one tagged type or type extension.
6749 * sem_res.adb (Resolve_Actuals): in formal mode, check that actual
6750 parameters matching formals of tagged types are objects (or ancestor
6751 type conversions of objects), not general expressions. Issue an error
6752 on view conversions that are not involving ancestor conversion of an
6754 (Resolve_Type_Conversion): in formal mode, issue an error on the
6755 operand of an ancestor type conversion which is not an object
6756 * sem_util.adb, sem_util.ads (Find_Actual): extend the behavior of the
6757 procedure so that it works also for actuals of function calls
6758 (Is_Actual_Tagged_Parameter): new function which determines if its
6759 argument is an actual parameter of a formal of tagged type in a
6761 (Is_SPARK_Object_Reference): new function which determines if the tree
6762 referenced by its argument represents an object in SPARK
6764 2011-08-02 Robert Dewar <dewar@adacore.com>
6766 * sem_ch3.adb: Minor reformatting
6767 Minor comment addition
6768 Minor error msg text change
6770 2011-08-02 Javier Miranda <miranda@adacore.com>
6772 * sem_ch5.adb (Analyze_Iteration_Scheme.Uses_Secondary_Stack): New
6773 function. Used to be more precise when we generate a variable plus one
6774 assignment to remove side effects in the evaluation of the Bound
6776 (Analyze_Iteration_Scheme): Clean attribute analyzed in all the nodes
6777 of the bound expression to force its re-analysis and thus expand the
6778 associated transient scope (if required). Code cleanup replacing the
6779 previous code that declared the constant entity by an invocation to
6780 routine Force_Evaluation which centralizes this work in the frontend.
6782 2011-08-02 Robert Dewar <dewar@adacore.com>
6784 * einfo.adb (Is_Base_Type): Improve efficiency by using a flag table
6785 (Base_Type): Now uses improved Is_Base_Type function
6786 * einfo.ads (Base_Type): Inline this function
6788 2011-08-02 Robert Dewar <dewar@adacore.com>
6790 * sem_prag.adb (Analyze_Pragma): Defend against infinite recursion
6791 (Analyze_Aspect_Specifications): Fix Sloc values for constructed pragmas
6793 2011-08-02 Arnaud Charlet <charlet@adacore.com>
6795 * gcc-interface/Make-lang.in: Update dependencies.
6796 * gcc-interface/Makefile.in: Use s-inmapop-vxworks.adb for all VxWorks
6799 2011-08-02 Yannick Moy <moy@adacore.com>
6801 * par-ch3.adb (P_Delta_Constraint): issue an error in formal mode on
6802 non-simple expression used in delta constraint
6803 (P_Index_Or_Discriminant_Constraint): issue an error in formal mode on
6804 index constraint which is not a subtype mark
6805 * par.adb: With and use Restrict
6806 * sem_ch3.adb (Analyze_Component_Declaration): issue an error in formal
6807 mode on component type which is not a subtype mark and default
6808 expression on component
6809 (Analyze_Subtype_Declaration): issue an error in formal mode on subtype
6810 of string which does not have a lower index bound equal to 1
6811 (Array_Type_Declaration): issue an error in formal mode on index or
6812 component type which is not a subtype mark, and on aliased keyword on
6814 (Derived_Type_Declaration): issue an error in formal mode on interface,
6815 limited or abstract type
6816 (Record_Type_Declaration): issue an error in formal mode on interface
6817 (Record_Type_Definition): issue an error in formal mode on tagged types
6818 and type extensions not declared in the specification of a library unit
6819 package; on null non-tagged record; on variant part
6821 2011-08-02 Vincent Celier <celier@adacore.com>
6823 * prj-nmsc.adb (Check_Library_Attributes): Do not report Library_Dir
6824 not declared for qualified library project when Library_Name is not
6825 declared, but Library_Dir is.
6827 2011-08-02 Robert Dewar <dewar@adacore.com>
6829 * sem_ch13.adb (Analyze_Aspect_Specification): Fix slocs on generated
6830 pragmas (affects aspects [Component_]Default_Value
6831 (Check_Aspect_At_Freeze_Point): For Component_Default_Value, use
6832 component type for the resolution
6834 2011-08-02 Eric Botcazou <ebotcazou@adacore.com>
6836 * einfo.adb (Base_Type): Tune implementation for speed.
6838 2011-08-02 Robert Dewar <dewar@adacore.com>
6840 * freeze.adb: Minor reformatting.
6842 2011-08-02 Thomas Quinot <quinot@adacore.com>
6844 * scos.ads: Update comments.
6846 2011-08-02 Ed Schonberg <schonberg@adacore.com>
6848 * sem_ch3.adb (Build_Derived_Type): Inherit the convention from the
6849 base type, because the parent may be a subtype of a private type whose
6850 convention is established in a private part.
6852 2011-08-02 Hristian Kirtchev <kirtchev@adacore.com>
6854 * exp_ch6.adb (Expand_N_Extended_Return_Statement): Wrap the return
6855 statement in a block when the expansion of the return expression has
6856 created a finalization chain.
6857 * freeze.adb (Freeze_Expression): Alphabetize all choices associated
6858 with the parent node.
6859 Add N_Extended_Return_Statement to handle the case where a transient
6860 object declaration appears in the Return_Object_Declarations list of
6861 an extended return statement.
6863 2011-08-02 Matthew Gingell <gingell@adacore.com>
6865 * adaint.c (__gnat_is_symbolic_link_attr): Supress warning on possibly
6866 unused parameter 'name'.
6868 2011-08-02 Ed Schonberg <schonberg@adacore.com>
6870 * sem_elim.adb (Set_Eliminated): If the overridden operation is an
6871 inherited operation, check whether its alias, which is the source
6872 operastion that it renames, has been marked eliminated.
6874 2011-08-02 Javier Miranda <miranda@adacore.com>
6876 * exp_util.adb (Safe_Prefixed_Reference): Do not consider safe an
6877 in-mode parameter whose type is an access type since it can be used to
6878 modify its designated object. Enforce code that handles as safe an
6879 access type that is not access-to-constant but it is the result of a
6880 previous removal of side-effects.
6881 (Remove_Side_Effects): Minor code reorganization of cases which require
6882 no action. Done to incorporate documentation on new cases uncovered
6883 working in this ticket: no action needed if this routine was invoked
6884 too early and the nodes are not yet decorated.
6885 * sem_res.adb (Resolve_Slice): Minor code cleanup replacling two calls
6886 to routine Remove_Side_Effects by calls to Force_Evaluation since they
6887 were issued with actuals that are implicitly provided by
6890 2011-08-02 Robert Dewar <dewar@adacore.com>
6892 * sem_ch3.adb, sem_res.adb: Minor reformatting.
6894 2011-08-02 Yannick Moy <moy@adacore.com>
6896 * sem_attr.adb (Check_Formal_Restriction_On_Attribute): new procedure
6897 to issue an error in formal mode on attribute not supported in this mode
6898 (Analyze_Attribute): issue errors on standard attributes not supported
6900 * sem_ch3.adb (Modular_Type_Declaration): remove obsolete part of
6901 comment, and issue error in formal mode on modulus which is not a power
6903 (Process_Range_Expr_In_Decl): issue error in formal mode on non-static
6905 * sem_ch8.adb (Find_Type): issue error in formal mode on 'Base in
6907 * sem_res.adb (Resolve_Unary_Op): issue error in formal mode on unary
6908 operator on modular type (except 'not').
6910 2011-08-02 Robert Dewar <dewar@adacore.com>
6912 * gnat_rm.texi: Minor reformatting.
6914 2011-08-02 Arnaud Charlet <charlet@adacore.com>
6916 * s-osinte-linux.ads: Minor comment update and reformatting.
6917 * i-cexten.ads: Make this unit pure, as for its parent.
6918 Will allow its usage in more contexts if needed.
6920 2011-08-02 Robert Dewar <dewar@adacore.com>
6922 * s-utf_32.ads: Minor comment fix.
6924 2011-08-02 Ed Schonberg <schonberg@adacore.com>
6926 * sem_res.adb (Resolve_Actuals): if the subprogram is a primitive
6927 operation of a tagged synchronized type, handle the case where the
6928 controlling argument is overloaded.
6930 2011-08-02 Yannick Moy <moy@adacore.com>
6932 * gnat_rm.texi, opt.ads, sem_prag.adb, snames.ads-tmpl:
6933 Replace pragma SPARK_95 with pragma Restrictions (SPARK)
6934 * par-prag.adb (Process_Restrictions_Or_Restriction_Warnings): set
6935 SPARK mode and formal verification mode on processing SPARK restriction
6936 * s-rident.ads (Restriction_Id): add SPARK restriction in those not
6937 requiring consistency checking.
6939 2011-08-02 Robert Dewar <dewar@adacore.com>
6941 * sem_res.adb: Minor reformatting.
6943 2011-08-02 Robert Dewar <dewar@adacore.com>
6945 * a-cfdlli.ads, a-cfhase.ads, a-cforma.ads, a-cfhama.ads,
6946 a-cforse.ads: Remove unneeded with of Ada.Containers
6947 Remove commented out pragma Inline's
6948 Move specifications of new subprograms to the actual specs
6950 2011-08-02 Yannick Moy <moy@adacore.com>
6952 * a-cfdlli.ads, a-cfhase.ads, a-cforma.ads, a-cfhama.ads,
6953 a-cforse.ads: Update comments.
6955 2011-08-02 Ed Schonberg <schonberg@adacore.com>
6957 * sem_attr.adb: add attribute name when 'Result has the wrong prefix.
6959 2011-08-02 Robert Dewar <dewar@adacore.com>
6961 * a-cfdlli.ads, a-cfhase.ads, a-cforma.ads, a-cfhama.ads,
6962 a-cforse.ads, a-cofove.ads: Minor reformatting.
6964 2011-08-02 Claire Dross <dross@adacore.com>
6966 * a-cfdlli.ads, a-cfhase.ads, a-cforma.ads, a-cfhama.ads, a-cforse.ads,
6967 a-cofove.ads: Add comments.
6969 2011-08-02 Yannick Moy <moy@adacore.com>
6971 * gnat_rm.texi: Document formal containers.
6973 2011-08-02 Emmanuel Briot <briot@adacore.com>
6975 * g-comlin.adb (Goto_Section, Getopt): fix handling of "*" when there
6978 2011-08-02 Robert Dewar <dewar@adacore.com>
6980 * mlib-prj.adb, restrict.ads, sem_aggr.adb, sem_ch12.adb: Minor
6983 2011-08-02 Robert Dewar <dewar@adacore.com>
6985 * aspects.adb: New aspects Default_Value and Default_Component_Value
6986 New format of Aspect_Names table checks for omitted entries
6987 * aspects.ads: Remove mention of Aspect_Cancel and add documentation on
6988 handling of boolean aspects for derived types.
6989 New aspects Default_Value and Default_Component_Value
6990 New format of Aspect_Names table checks for omitted entries
6991 * einfo.ads, einfo.adb (Has_Default_Component_Value): New flag
6992 (Has_Default_Value): New flag
6993 (Has_Default_Component_Value): New flag
6994 (Has_Default_Value): New flag
6995 * par-ch13.adb (P_Aspect_Specifications): New format of Aspect_Names
6997 * par-prag.adb: New pragmas Default_Value and Default_Component_Value
6998 * sem_ch13.adb (Analyze_Aspect_Specifications): New aspects
6999 Default_Value and Default_Component_Value
7000 * sem_prag.adb: New pragmas Default_Value and Default_Component_Value
7001 New aspects Default_Value and Default_Component_Value
7002 * snames.ads-tmpl: New pragmas Default_Value and Default_Component_Value
7003 * sprint.adb: Print N_Aspect_Specification node when called from gdb
7005 2011-08-02 Vincent Celier <celier@adacore.com>
7007 * prj-nmsc.adb (Check_Library_Attributes): For virtual library project,
7008 inherit library kind.
7010 2011-08-02 Ed Schonberg <schonberg@adacore.com>
7012 * sem_res.adb: Add guards in calls to Matching_Static_Array_Bounds.
7015 2011-08-02 Robert Dewar <dewar@adacore.com>
7017 * i-cstrin.ads: Updates to make Interfaces.C.Strings match RM
7019 2011-08-02 Yannick Moy <moy@adacore.com>
7021 * sem_aggr.adb (Resolve_Aggregate): Fix thinko.
7023 2011-08-02 Robert Dewar <dewar@adacore.com>
7025 * impunit.adb: Add comment.
7027 2011-08-02 Yannick Moy <moy@adacore.com>
7029 * sem_aggr.adb (Check_Qualified_Aggregate): new procedure which checks
7030 qualification of aggregates in formal mode
7031 (Is_Top_Level_Aggregate): returns True for an aggregate not contained in
7033 (Resolve_Aggregate): complete the test that an aggregate is adequately
7034 qualified in formal mode
7036 2011-08-02 Pascal Obry <obry@adacore.com>
7038 * make.adb, bindgen.adb, gnatbind.adb: Minor reformatting.
7039 * mlib-prj.adb: Supress warning when compiling binder generated file.
7040 (Build_Library): Supress all warnings when compiling the binder
7043 2011-08-02 Yannick Moy <moy@adacore.com>
7045 * errout.adb, errout.ads (Check_Formal_Restriction): move procedure
7047 * restrict.adb, restrict.ads (Check_Formal_Restriction): ...to here
7048 * sem_aggr.adb, sem_ch5.adb, sem_util.adb:
7049 Add with/use clauses to make Check_Formal_Restriction visible
7051 2011-08-02 Ed Schonberg <schonberg@adacore.com>
7053 * sem_ch12.adb (Check_Generic_Actuals): handle properly actual
7054 in-parameters when type of the generic formal is private in the generic
7055 spec and non-private in the body.
7057 2011-08-02 Claire Dross <dross@adacore.com>
7059 * a-cfdlli.adb, a-cfdlli.ads, a-cfhase.adb, a-cfhase.ads, a-cfhama.adb,
7060 a-cfhama.ads, a-cforse.adb, a-cforse.ads, a-cforma.adb, a-cforma.ads,
7061 a-cofove.adb, a-cofove.ads: New files implementing formal containers.
7062 * impunit.adb, Makefile.rtl: Take new files into account.
7064 2011-08-02 Robert Dewar <dewar@adacore.com>
7066 * sem_aggr.adb, sem_ch3.adb, sem_ch5.adb, make.adb, sem_res.adb,
7067 sem_attr.adb, sem_ch6.adb, sem_ch8.adb: Minor reformatting.
7069 2011-08-02 Yannick Moy <moy@adacore.com>
7071 * sem_aggr.adb (Resolve_Aggregate): disable incorrectly placed check in
7073 * sem_util.adb (Matching_Static_Array_Bounds): proper detection of
7074 matching static array bounds, taking into account the special case of
7076 * sem_ch3.adb: Typo in comment.
7078 2011-08-02 Yannick Moy <moy@adacore.com>
7080 * errout.adb, errout.ads (Check_Formal_Restriction): new procedure
7081 which issues an error in formal mode if its argument node is originally
7083 * sem_ch3.adb (Analyze_Full_Type_Declaration): move test that a type
7084 has a discriminant specification so that it does not include the case
7086 (Derived_Type_Declaration): move here the test that a derived type has a
7087 discriminant specification
7088 * sem_aggr.adb (Resolve_Record_Aggregate): test the presence of the
7089 first element of a component association before accessing its choices
7090 (presence of component association is not enough)
7091 * exp_ch6.adb (Expand_N_Subprogram_Declaration): test if a subprogram
7092 declaration is a library item before accessing the next element in a
7093 list, as library items are not member of lists
7094 * sem_attr.adb, sem_ch11.adb, sem_ch4.adb, sem_ch5.adb, sem_ch6.adb,
7095 sem_ch8.adb, sem_ch9.adb, sem_res.adb, sem_util.adb: use
7096 Check_Formal_Restriction whenever possible.
7098 2011-08-02 Ed Schonberg <schonberg@adacore.com>
7100 * sem_ch3.adb (Find_Type_Of_Object): In ASIS mode, create an itype
7101 reference when needed.
7103 2011-08-02 Bob Duff <duff@adacore.com>
7105 * gnat_ugn.texi: Fix typo.
7107 2011-08-02 Vincent Celier <celier@adacore.com>
7109 * make.adb (Gnatmake): Use MLib.Tgt.Archive_Ext as the extension of
7110 archive file name. Do not use the full path name of archives for Open
7113 2011-08-02 Robert Dewar <dewar@adacore.com>
7115 * sem_ch12.adb, sem_ch11.adb: New calling sequence for
7116 Analyze_Aspect_Specifications
7118 (Analyze_Aspect_Specifications): New handling for boolean aspects
7119 * sem_ch13.ads (Analyze_Aspect_Specifications): New calling sequence
7120 * sem_ch3.adb, sem_ch6.adb, sem_ch7.adb, sem_ch9.adb: New calling
7121 sequence for Analyze_Aspect_Specifications
7122 * sem_prag.adb (Analyze_Pragma): Remove use of Aspect_Cancel entirely
7123 * sinfo.ads, sinfo.adb (Aspect_Cancel): Remove, no longer used
7125 2011-08-02 Robert Dewar <dewar@adacore.com>
7127 * freeze.adb (Freeze_Entity): Remove handling of delayed boolean
7128 aspects, since these no longer exist.
7130 2011-08-02 Robert Dewar <dewar@adacore.com>
7132 * par-ch13.adb (Aspect_Specifications_Present): Always return false on
7133 semicolon, do not try to see if there are aspects following it.
7134 * par-ch3.adb (P_Declarative_Items): Better message for unexpected
7137 2011-08-02 Robert Dewar <dewar@adacore.com>
7139 * sem_ch8.adb, aspects.ads: Minor reformatting.
7141 2011-08-02 Eric Botcazou <ebotcazou@adacore.com>
7143 * sem_ch13.ads (Analyze_Aspect_Specification): Add pragma Inline.
7144 * sem_ch13.adb (Analyze_Non_Null_Aspect_Specifications): New procedure
7146 (Analyze_Aspect_Specifications): ...here. Call above procedure.
7148 2011-08-02 Yannick Moy <moy@adacore.com>
7150 * exp_ch6.adb (Expand_N_Subprogram_Declaration): issue error in formal
7151 mode on subprogram declaration outside of package specification, unless
7152 it is followed by a pragma Import
7153 * sem_ch3.adb (Access_Definition, Access_Subprogram_Declaration,
7154 Access_Type_Declaration): issue error in formal mode on access type
7155 (Analyze_Incomplete_Type_Decl): issue error in formal mode on
7157 (Analyze_Object_Declaration): issue error in formal mode on object
7158 declaration which does not respect SPARK restrictions
7159 (Analyze_Subtype_Declaration): issue error in formal mode on subtype
7160 declaration which does not respect SPARK restrictions
7161 (Constrain_Decimal, Constrain_Float, Constrain_Ordinary_Fixed): issue
7162 error in formal mode on digits or delta constraint
7163 (Decimal_Fixed_Point_Type_Declaration): issue error in formal mode on
7164 decimal fixed point type
7165 (Derived_Type_Declaration): issue error in formal mode on derived type
7166 other than type extensions of tagged record types
7167 * sem_ch6.adb (Process_Formals): remove check in formal mode, redundant
7168 with check on access definition
7169 * sem_ch9.adb (Analyze_Protected_Definition): issue error in formal
7170 mode on protected definition.
7171 (Analyze_Task_Definition): issue error in formal mode on task definition
7173 2011-08-02 Robert Dewar <dewar@adacore.com>
7175 * make.adb, sem_ch8.adb, s-inmaop-vxworks.adb: Minor reformatting.
7177 2011-08-02 Javier Miranda <miranda@adacore.com>
7179 * sem_ch6.adb (Can_Override_Operator): New function.
7180 (Verify_Overriding_Indicator): Add missing code to check overriding
7181 indicator in operators. Fixes regression.
7182 (Check_Overriding_Indicator): Minor reformating after replacing the
7183 code that evaluates if the subprogram can override an operator by
7184 invocations to the above new function.
7186 (Write_Field26_Name): Add missing code to ensure that, following
7187 the documentation in einfo.ads, this field is not shown as attribute
7188 "Static_Initialization" on non-dispatching functions.
7190 2011-08-02 Jose Ruiz <ruiz@adacore.com>
7192 * sem_res.adb (Resolve_Call): A call to
7193 Ada.Real_Time.Timing_Events.Set_Handler violates restriction
7194 No_Relative_Delay (AI-0211) only when it sets a relative timing event,
7195 i.e., when the second parameter is of type Time_Span.
7197 2011-08-02 Vincent Celier <celier@adacore.com>
7199 * make.adb (Gnatmake): use <library dir>/lib<library name>.a to link
7200 with an archive instead of -L<library dir> -l<library name>.
7202 2011-08-02 Ed Schonberg <schonberg@adacore.com>
7204 * sem_ch8.adb (Analyze_Use_Type): If the clause is being re-analyzed,
7205 mark the base types In_Use in addition to making the operations
7208 2011-08-02 Ed Falis <falis@adacore.com>
7210 * init.c: add and setup __gnat_signal_mask for the exception signals
7211 * s-inmaop-vxworks.adb: new file.
7212 * s-intman-vxworks.adb: remove unnecessary initializations and
7214 * s-intman-vxworks.ads: remove unnecessary variable
7215 * s-taprop-vxworks.adb: simplify signal initialization
7217 2011-08-02 Robert Dewar <dewar@adacore.com>
7219 * sem_ch8.adb: Minor code reorganization, comment updates.
7221 2011-08-02 Robert Dewar <dewar@adacore.com>
7223 * sem_res.adb (Matching_Static_Array_Bounds): Moved to Sem_Util
7224 * sem_util.ads, sem_util.adb (Matching_Static_Array_Bounds): Moved
7226 (Matching_Static_Array_Bounds): Use Is_Ok_Static_Expression
7227 (Matching_Static_Array_Bounds): Moved here from Sem_Res
7229 2011-08-02 Ed Schonberg <schonberg@adacore.com>
7231 * atree.h, atree.ads, atree.adb: New subprograms to manipulate Elist5.
7232 * par_ch8.adb (P_Use_Type): initialize Used_Operations for node.
7233 * sinfo.ads, sinfo.adb (Used_Operations): new attribute of
7234 use_type_clauses, to handle more efficiently use_type and use_all_type
7236 * sem_ch8.adb: Rewrite Use_One_Type and End_Use_Type to handle the
7237 Ada2012 Use_All_Type clause.
7238 (Use_Class_Wide_Operations): new procedure.
7240 2011-08-02 Robert Dewar <dewar@adacore.com>
7242 * exp_util.adb, par-ch10.adb, par-ch6.adb, sem.adb, sem_ch6.adb,
7243 sem_ch6.ads, sinfo.adb, sinfo.ads, sprint.adb: Change parameterized
7244 expression to expression function.
7246 2011-08-02 Ed Schonberg <schonberg@adacore.com>
7248 * sem_ch4.adb: transform simple Ada2012 membership into equality only
7249 if types are compatible.
7251 2011-08-02 Yannick Moy <moy@adacore.com>
7253 * sem_res.adb (Matching_Static_Array_Bounds): new function which
7254 returns True if its argument array types have same dimension and same
7255 static bounds at each index.
7256 (Resolve_Actuals): issue an error in formal mode on actuals passed as
7257 OUT or IN OUT paramaters which are not view conversions in SPARK.
7258 (Resolve_Arithmetic_Op): issue an error in formal mode on
7259 multiplication or division with operands of fixed point types which are
7260 not qualified or explicitly converted.
7261 (Resolve_Comparison_Op): issue an error in formal mode on comparisons of
7262 Boolean or array type (except String) operands.
7263 (Resolve_Equality_Op): issue an error in formal mode on equality
7264 operators for array types other than String with non-matching static
7266 (Resolve_Logical_Op): issue an error in formal mode on logical operators
7267 for array types with non-matching static bounds. Factorize the code in
7268 Matching_Static_Array_Bounds.
7269 (Resolve_Qualified_Expression): issue an error in formal mode on
7270 qualified expressions for array types with non-matching static bounds.
7271 (Resolve_Type_Conversion): issue an error in formal mode on type
7272 conversion for array types with non-matching static bounds
7274 2011-08-02 Robert Dewar <dewar@adacore.com>
7276 * par-ch10.adb: Minor code reorganization (use Nkind_In).
7278 2011-08-02 Ed Schonberg <schonberg@adacore.com>
7280 * par-ch9.adb: save location of entry for proper error message.
7282 2011-08-02 Javier Miranda <miranda@adacore.com>
7284 * sem_type.ads, sem_type.adb (Is_Ancestor): Addition of a new formal
7285 (Use_Full_View) which permits this routine to climb through the
7286 ancestors using the full-view of private parents.
7287 * sem_util.adb (Collect_Interfaces_Info, Implements_Interface): Set
7288 Use_Full_View to true in calls to Is_Ancestor.
7289 * sem_disp.adb (Override_Dispatching_Operation): Set Use_Full_View to
7290 true in call to Is_Ancestor.
7291 * exp_ch3.adb (Build_Offset_To_Top_Functions, Initialize_Tag): Set
7292 Use_Full_View to true in call to Is_Ancestor.
7293 * exp_ch7.adb (Controller_Component): Set Use_Full_View to true in
7294 call to Is_Ancestor.
7295 * exp_ch4.adb (Expand_N_Type_Conversion, Tagged_Membership): Set
7296 Use_Full_View to true in calls to Is_Ancestor.
7297 * exp_disp.adb (Expand_Interface_Actuals, Make_Secondary_DT, Make_DT,
7298 Make_Select_Specific_Data_Table, Register_Primitive,
7299 Set_All_DT_Position): Set Use_Full_View to true in calls to Is_Ancestor.
7300 * exp_intr.adb (Expand_Dispatching_Constructor_Call): Set Use_Full_View
7301 to true in call to Is_Ancestor.
7302 * exp_util.adb (Find_Interface_ADT, Find_Interface_Tag): Set
7303 Use_Full_View to true in calls to Is_Ancestor.
7305 (Write_Call_Info): Set Use_Full_View to true in call to Is_Ancestor.
7306 (Write_Type_Info): Set Use_Full_View to true in call to Is_Ancestor.
7308 2011-08-02 Robert Dewar <dewar@adacore.com>
7310 * gnat_rm.texi: Minor reformatting.
7311 * sem_prag.adb: Minor reformatting.
7313 2011-08-02 Tristan Gingold <gingold@adacore.com>
7315 * vms_data.ads: Add VMS qualifier for -gnateP.
7317 2011-08-02 Robert Dewar <dewar@adacore.com>
7319 * par-ch13.adb (P_Aspect_Specification): New meaning of Decl = Empty
7320 * par-ch7.adb (P_Package): Proper placement of aspects for package
7322 * par-endh.adb (Check_End): Ad Is_Sloc parameter
7323 (End_Statements): Add Is_Sloc parameterr
7324 * par.adb (P_Aspect_Specification): New meaning of Decl = Empty
7325 (Check_End): Ad Is_Sloc parameter
7326 (End_Statements): Add Is_Sloc parameterr
7328 2011-08-02 Vincent Celier <celier@adacore.com>
7330 * ug_words: Add VMS qualifier equivalent to -gnateP:
7331 /SYMBOL_PREPROCESSING.
7333 2011-08-02 Jose Ruiz <ruiz@adacore.com>
7335 * gnat-style.texi: For hexadecimal numeric literals the typical
7336 grouping of digits is 4 to represent 2 bytes.
7337 A procedure spec which is split into several lines is indented two
7340 2011-08-02 Yannick Moy <moy@adacore.com>
7342 * exp_aggr.adb (Is_Others_Aggregate): move function to other unit.
7343 * sem_aggr.adb, sem_aggr.ads (Is_Others_Aggregate): move function here
7344 (Resolve_Aggregate): issue errors in formal modes when aggregate is not
7346 (Resolve_Array_Aggregate): issue errors in formal modes on non-static
7347 choice in array aggregate
7348 (Resolve_Extension_Aggregate): issue errors in formal modes on subtype
7350 (Resolve_Record_Aggregate): issue errors in formal modes on mixed
7351 positional and named aggregate for record, or others in record
7352 aggregate, or multiple choice in record aggregate
7353 * sem_res.adb (Resolve_Logical_Op): issue errors in formal mode when
7354 array operands to logical operations AND, OR and XOR do not have the
7355 same static lower and higher bounds
7356 * sem_ch5.adb, sinfo.ads: Correct typos in comments
7358 2011-08-01 Robert Dewar <dewar@adacore.com>
7360 * sem_util.ads, sem_util.adb, sem_ch6.adb (Last_Source_Statement):
7361 Replaces Last_Source_Node_In_Sequence.
7362 * err_vars.ads (Error_Msg_Lang): 16 is OK, don't need 4K
7363 * errout.adb (Set_Error_Msg_Lang): Takes arg with no parens, but stores
7364 parens and blank in string (this was inconsistently implemented).
7366 (Set_Error_Msg_Lang): Takes arg with no parens, but stores parens and
7367 blank in string (this was inconsistently implemented).
7369 (Set_Global_Switches): Set formal mode switches appropriately
7370 * opt.ads, opt.adb: Formal mode is now global switches, more consistent
7372 (Analyze_Pragma, case SPARK_95): Set opt switches appropriately and
7373 call Set_Error_Msg_Lang to set "spark" as language name.
7374 * par.adb: Remove unnecessary call to set formal language for errout
7375 * sem_prag.adb (P_Pragma, case SPARK_95): Set opt switches
7376 appropriately and call Set_Error_Msg_Lang to set "spark" as language
7378 * sem_ch4.adb (Analyze_Concatenation_Operand): remove procedure and
7379 calls to it, moved after resolution so that types are known
7380 * sem_res.adb (Resolve_Op_Concat): issue an error in formal mode if
7381 result of concatenation is not of type String
7382 (Resolve_Op_Concat_Arg): issue an error in formal mode if an operand of
7383 concatenation is not properly restricted
7384 * gnat_rm.texi: Add doc on pragma Spark_95.
7385 * gcc-interface/Makefile.in: Remove obsolete target pairs for
7386 Interfaces.C.* on VMS. Remove s-parame-vms-restrict.ads.
7387 * gcc-interface/Make-lang.in: Update dependencies.
7389 2011-08-01 Javier Miranda <miranda@adacore.com>
7391 * sem_disp.adb (Override_Dispatching_Operation): Enforce strictness of
7392 condition that detects if the overridden operation must replace an
7395 2011-08-01 Javier Miranda <miranda@adacore.com>
7397 * exp_ch4.adb (Expand_N_Case_Expression): Propagate to the expanded
7398 code declarations inserted by Insert_Actions in each alternative of the
7399 N_Case_Expression node.
7401 2011-08-01 Robert Dewar <dewar@adacore.com>
7403 * sem_ch6.adb: Minor code reorganization.
7404 * sem_util.adb: Minor reformatting.
7406 2011-08-01 Pascal Obry <obry@adacore.com>
7408 * prj-env.adb: Remove <prefix>/lib/gpr/<target> project search path.
7409 * gnat_ugn.texi: Add documentation for VERSIONINFO Windows resource.
7411 2011-08-01 Yannick Moy <moy@adacore.com>
7413 * par-ch4.adb (P_Name): issue a syntax error in SPARK mode on character
7414 literal or operator symbol which is prefixed
7415 * sem_attr.adb (Analyze_Access_Attribute): issue an error in formal
7416 mode on access attributes.
7417 * sem_ch4.adb (Analyze_Concatenation_Operand): new procedure to check
7418 that concatenation operands are properly restricted in formal mode
7419 (Analyze_Concatenation, Analyze_Concatenation_Rest): call new procedure
7420 Analyze_Concatenation_Operand. Issue an error in formal mode if the
7421 result of the concatenation has a type different from String.
7422 (Analyze_Conditional_Expression, Analyze_Explicit_Dereference,
7423 Analyze_Quantified_Expression, Analyze_Slice,
7424 Analyze_Null): issue an error in formal mode on unsupported constructs
7426 (Analyze_Block_Statement): only issue error on source block statement
7427 * sem_util.ads, sem_util.adb (Last_Source_Node_In_Sequence): new
7428 function which returns the last node in a list of nodes for which
7429 Comes_From_Source returns True, if any
7430 * sem_ch6.adb (Check_Missing_Return): minor refactoring to use
7431 Last_Source_Node_In_Sequence
7432 * sem_ch8.adb (Analyze_Exception_Renaming, Analyze_Generic_Renaming,
7433 Analyze_Object_Renaming, Analyze_Use_Package): issue an error in formal
7434 mode on unsupported constructs
7435 * sem_ch9.adb Do not return after issuing error in formal mode, as the
7436 rest of the actions may be needed later on since the error is marked as
7438 * sinfo.ads: Typos in comments.
7440 2011-08-01 Pascal Obry <obry@adacore.com>
7442 * projects.texi: Minor editing.
7444 2011-08-01 Yannick Moy <moy@adacore.com>
7446 * err_vars.ads (Error_Msg_Lang, Error_Msg_Langlen): new variables for
7447 insertion character ~~
7448 * errout.ads, errout.adb (Formal_Error_Msg_...): remove procedures
7449 (Set_Error_Msg_Lang): new procedure which fixes the language for use
7450 with insertion character ~~
7451 (Set_Msg_Text): treat insertion character ~~
7452 * par-ch4.adb, par-ch5.adb, par-endh.adb, sem_attr.adb, sem_ch11.adb,
7453 sem_ch3.adb, sem_ch5.adb, sem_ch9.adb, sem_util.adb: Replace calls to
7454 Formal_Error_Msg_... procedures by equivalent Error_Msg_...
7455 procedures. Favor calls to Error_Msg_F(E) over Error_Msg_N(E). Make
7456 errors related to the formal language restriction not serious
7457 (insertion character |).
7458 * par.adb (Par): set formal language for error messages if needed
7459 * sem_ch6.adb (Check_Missing_Return): take into account possible
7460 generated statements at the end of the function
7461 * snames.ads-tmpl (Name_SPARK_95, Pragma_SPARK_95): new variable and
7462 enumeration value to define a new pragma SPARK_95
7463 * opt.ads, opt.adb (SPARK_Version_Type, SPARK_Version_Default,
7464 SPARK_Version): new type and variables to store the SPARK version
7466 (SPARK_Mode): return True when SPARK_Version is set
7467 * par-prag.adb: Correct indentation
7468 (Prag): take Pragma_SPARK_95 into account
7469 * sem_prag.adb (Set_Mechanism_Value, Sig_Flags): take Pragma_SPARK_95
7472 2011-08-01 Robert Dewar <dewar@adacore.com>
7474 * sem_ch3.adb, sem_ch3.ads, sem_ch5.adb, prj-part.adb, par-ch4.adb,
7475 sem_util.adb, sem_ch4.adb, sem_ch6.adb, sem_ch6.ads, sem_ch8.adb,
7476 sem_ch8.ads, sem_ch13.ads, par-ch5.adb, prj-env.ads: Minor reformatting
7478 2011-08-01 Pascal Obry <obry@adacore.com>
7480 * prj-part.ads, prj-part.adb (Parse): Add Target_Name parameter. Pass
7481 Target_Name to Get_Path call.
7482 (Parse_Single_Project): Likewise.
7483 (Post_Parse_Context_Clause): Likewise.
7484 * prj-env.ads, prj-env.adb (Find_Project): Add Target_Name parameter.
7485 Call Initialise_Project_Path with the proper Target_Name.
7486 (Initialize_Project_Path): Add <gnat_root>/<target_name>/lib/gnat
7488 (Get_Path): Add Target_Name parameter. Call Initialise_Project_Path
7489 with the proper Target_Name.
7490 * prj-conf.adb (Get_Or_Create_Configuration_File): Pass Target_Name to
7492 (Parse_Project_And_Apply_Config): Likewise.
7493 * prj-makr.adb (Initialize): Pass empty Target_Name to Parse routine.
7494 This is fine as this part of the code is supporting only native
7496 * prj-pars.adb (Parse): Pass empty Target_Name to Parse routine. This
7497 is fine as this part of the code is supporting only native compilation.
7499 2011-08-01 Yannick Moy <moy@adacore.com>
7501 * sem_util.adb (Enter_Name): issue error in formal mode on declaration
7502 of homonym, unless the homonym is one of the cases allowed in SPARK
7503 * par-ch5.adb (Parse_Decls_Begin_End): issue error in SPARK mode for
7504 package declaration occurring after a body.
7506 2011-08-01 Robert Dewar <dewar@adacore.com>
7508 * checks.adb, exp_ch4.adb: Minor reformatting.
7510 2011-08-01 Javier Miranda <miranda@adacore.com>
7512 * einfo.ads (Access_Disp_Table): Fix documentation.
7513 (Dispatch_Table_Wrappers): Fix documentation.
7515 2011-08-01 Pascal Obry <obry@adacore.com>
7517 * prj-env.adb, prj-env.ads: Minor reformatting.
7519 2011-08-01 Yannick Moy <moy@adacore.com>
7521 * sem_util.ads, sem_util.adb, par.adb, par_util.adb
7522 (Formal_Error_Msg, Formal_Error_Msg_N, Formal_Error_Msg_SP): move
7523 procedures out of these packages.
7524 * errout.ads, errout.adb
7525 (Formal_Error_Msg, Formal_Error_Msg_N, Formal_Error_Msg_SP): move
7526 procedures in of this package
7527 (Formal_Error_Msg_NE): new procedure for wrapper on Error_Msg_NE
7528 * par-ch5.adb (Parse_Decls_Begin_End): issue syntax error in SPARK mode
7529 on misplaced later vs initial declarations, like in Ada 83
7530 * sem_attr.adb (Processing for Analyze_Attribute): issue error in
7531 formal mode on attribute of private type whose full type declaration
7533 * sem_ch3.adb (Analyze_Declarations): issue error in formal mode on a
7534 package declaration inside a package specification
7535 (Analyze_Full_Type_Declaration): issue error in formal mode on
7536 controlled type or discriminant type
7537 * sem_ch6.adb (Analyze_Subprogram_Specification): only issue error on
7538 user-defined operator means that it should come from the source
7539 (New_Overloaded_Entity): issue error in formal mode on overloaded
7541 * sem_ch6.ads, sem_ch13.ads: typos in comments.
7543 2011-08-01 Thomas Quinot <quinot@adacore.com>
7545 * atree.adb: Minor reformatting.
7546 * checks.adb: Minor reformatting.
7548 2011-08-01 Vincent Celier <celier@adacore.com>
7550 * s-parame-vms-ia64.ads: Fix typo in comment
7552 * s-parame-vms-restrict.ads: Removed, unused.
7554 2011-08-01 Javier Miranda <miranda@adacore.com>
7557 (Is_Variable_Size_Array): Remove local subprogram Is_Constant_Bound.
7559 (Constrain_Index): Remove side effects in the evaluation of the bounds.
7560 * sem_ch3.ads, sem_ch3.adb
7561 (Is_Constant_Bound): New extended version of the subprogram that was
7562 previously located inside function Exp_Ch3.Is_Variable_Size_Array.
7563 Moved here since it is shared by routines of sem_ch3 and exp_ch3.
7564 * sem_aux.ads (Constant_Value): Fix typo in comment.
7565 * checks.adb (Generate_Index_Checks): New implementation which, for
7566 array objects with constant bounds, generates the runtime check
7567 referencing the bounds of the array type. For other cases this routine
7568 provides its previous behavior obtaining such values from the array
7570 * sem_res.adb (Set_Slice_Subtype): Link a copied range subtree with its
7572 * atree.adb (New_Copy): Reset flag Is_Overloaded in the new copy since
7573 we cannot have semantic interpretations of the new node.
7575 2011-08-01 Ed Schonberg <schonberg@adacore.com>
7577 * sem_ch6.adb (Fully_Conformant_Expressions): handle quantified
7580 2011-08-01 Arnaud Charlet <charlet@adacore.com>
7582 * sem_ch8.adb: Minor code editing.
7583 * s-vxwext.adb: Remove trailing space.
7584 * freeze.adb, freeze.ads, errout.ads, erroutc.adb: Fix GPLv3 header for
7585 consistency with other files.
7587 2011-08-01 Thomas Quinot <quinot@adacore.com>
7589 * s-auxdec.ads, s-auxdec-vms_64.ads: Minor reformatting.
7591 2011-08-01 Ed Schonberg <schonberg@adacore.com>
7593 * par-ch10.adb: reject parameterized expressions as compilation unit.
7594 * sem_ch4.adb: handle properly conditional expression with overloaded
7595 then_clause and no else_clause.
7597 2011-08-01 Tristan Gingold <gingold@adacore.com>
7599 * s-parame-vms-alpha.ads, s-parame-vms-ia64.ads: Redeclare C_Address
7600 like done by System.Aux_DEC.
7601 * env.c (__gnat_setenv) [VMS]: Put logicals into LNM$PROCESS table.
7603 2011-08-01 Yannick Moy <moy@adacore.com>
7605 * par-endh.adb (Check_End): issue a syntax error in SPARK mode for
7606 missing label at end of declaration (subprogram or package)
7607 * par-ch4.adb (P_Name): issue a syntax error in SPARK mode for mixing
7608 of positional and named parameter association
7609 * par.adb, par-util.adb (Formal_Error_Msg_SP): new wrapper on
7610 Error_Msg_SP which adds a prefix to the error message giving the name
7611 of the formal language analyzed
7612 * sem_ch6.adb (Analyze_Return_Type): issue an error in formal mode for
7613 access result type in subprogram, unconstrained array as result type,.
7614 (Analyze_Subprogram_Declaration): issue an error in formal mode for null
7616 * sem_ch8.adb: Code clean up.
7618 2011-08-01 Javier Miranda <miranda@adacore.com>
7620 * sem_ch7.adb (Uninstall_Declarations): Remove useless code.
7621 * einfo.ads (Access_Disp_Table): Fix documentation.
7622 (Dispatch_Table_Wrappers): Fix documentation.
7623 * einfo.adb (Access_Disp_Table, Dispatch_Table_Wrappers,
7624 Set_Access_Disp_Table, Set_Dispatch_Table_Wrappers): Fix the assertions
7625 to enforce the documentation of this attribute.
7626 (Set_Is_Interface): Cleanup the assertion.
7627 * exp_ch4.adb (Expand_Allocator_Expression, Tagged_Membership): Locate
7628 the Underlying_Type entity before reading attribute Access_Disp_Table.
7629 * exp_disp.adb (Expand_Dispatching_Call, Expand_Interface_Conversion):
7630 Locate the Underlying_Type before reading attribute Access_Disp_Table.
7631 * exp_aggr.adb (Build_Array_Aggr_Code, Build_Record_Aggr_Code): Locate
7632 the Underlying_Type entity before reading attribute Access_Disp_Table.
7633 * exp_ch3.adb (Build_Record_Init_Proc, Expand_N_Object_Declaration):
7634 Locate the Underlying_Type entity before reading attribute
7637 2011-08-01 Ed Schonberg <schonberg@adacore.com>
7639 * s-poosiz.ads: Additional overriding indicators.
7641 2011-08-01 Yannick Moy <moy@adacore.com>
7643 * sem_ch5.adb (Analyze_Exit_Statement): add return after error in
7645 (Analyze_Iteration_Scheme): issue error in formal mode when loop
7646 parameter specification does not include a subtype mark.
7647 * sem_ch6.adb (Analyze_Abstract_Subprogram_Declaration): issue error in
7648 formal mode on abstract subprogram.
7649 (Analyze_Subprogram_Specification): issue error in formal mode on
7650 user-defined operator.
7651 (Process_Formals): issue error in formal mode on access parameter and
7653 * sem_ch9.adb (Analyze_Abort_Statement,
7654 Analyze_Accept_Statement, Analyze_Asynchronous_Select,
7655 Analyze_Conditional_Entry_Call, Analyze_Delay_Relative,
7656 Analyze_Delay_Until, Analyze_Entry_Call_Alternative,
7657 Analyze_Requeue, Analyze_Selective_Accept,
7658 Analyze_Timed_Entry_Call): issue error in formal mode on such constructs
7659 * sem_ch11.adb (Analyze_Raise_Statement, Analyze_Raise_xxx_Error):
7660 issue error in formal mode on user-defined raise statement.
7662 2011-08-01 Thomas Quinot <quinot@adacore.com>
7664 * sem_ch6.adb (Enter_Overloaded_Entity): Do not warn about a
7665 declaration being hidden when overriding an implicit inherited
7667 * par-ch10.adb (P_Compilation_Unit): In syntax check only mode
7668 (-gnats), do not complain about a source file that contains only a
7671 2011-08-01 Ed Schonberg <schonberg@adacore.com>
7673 * sem_ch5.adb (Analyze_Iterator_Scheme): Do not overwrite type of loop
7674 variable if already set.
7676 2011-08-01 Arnaud Charlet <charlet@adacore.com>
7678 * g-socket-dummy.adb, s-osinte-linux.ads, g-socket-dummy.ads,
7679 g-debuti.adb, g-tasloc.adb, g-debuti.ads, g-tasloc.ads,
7680 s-osinte-hpux.ads, g-sercom.adb, g-soliop-solaris.ads, g-sercom.ads,
7681 g-sptain.ads, g-curexc.ads, s-tasloc.adb, s-tasloc.ads, s-tataat.adb,
7682 g-ctrl_c.adb, a-reatim.adb, s-tataat.ads, g-dirope.adb, g-ctrl_c.ads,
7683 g-dirope.ads, g-boubuf.adb, g-calend.adb, g-boubuf.ads, g-souinf.ads,
7684 g-table.adb, g-bytswa-x86.adb, g-wispch.adb, g-io.adb, g-table.ads,
7685 g-wispch.ads, g-io.ads, g-memdum.adb, g-memdum.ads, g-busorg.adb,
7686 g-busorg.ads, g-regpat.adb, g-sothco-dummy.adb, g-encstr.adb,
7687 g-regpat.ads, g-sothco-dummy.ads, s-osinte-aix.ads, g-encstr.ads,
7688 g-sercom-mingw.adb, s-mastop-vms.adb, g-diopit.adb, g-diopit.ads,
7689 s-vxwext.adb, g-dyntab.adb, g-dyntab.ads, g-crc32.adb,
7690 g-sercom-linux.adb, g-crc32.ads, s-regpat.adb, g-flocon.ads,
7691 s-regpat.ads, g-stheme.adb, g-sestin.ads, s-taspri-posix-noaltstack.ads,
7692 g-soliop.ads, s-inmaop-posix.adb, g-locfil.ads, g-enblsp-vms-alpha.adb,
7693 g-socthi-dummy.adb, g-socthi-dummy.ads, gnat.ads, g-moreex.adb,
7694 g-moreex.ads, g-dynhta.adb, g-dynhta.ads, g-deutst.ads, g-htable.adb,
7695 g-cgicoo.adb, g-htable.ads, g-cgicoo.ads, a-interr.adb,
7696 g-socthi-vms.adb, g-socthi-vms.ads, g-hesora.adb, g-bubsor.adb,
7697 g-hesora.ads, g-bubsor.ads, g-md5.adb, g-md5.ads, s-intman-irix.adb,
7698 s-htable.adb, s-osinte-vms.adb, s-htable.ads, s-osinte-vms.ads,
7699 s-taprob.adb, g-bytswa.adb, g-bytswa.ads, s-osinte-solaris-posix.ads,
7700 a-suenco.adb, g-comver.adb, g-comver.ads, g-exctra.adb,
7701 s-osinte-solaris.adb, g-exctra.ads, s-osinte-irix.ads,
7702 s-osinte-solaris.ads, a-caldel-vms.adb, g-socthi-vxworks.adb,
7703 g-expect.adb, g-socthi-vxworks.ads, g-expect.ads, g-comlin.ads,
7704 g-heasor.adb, g-heasor.ads, g-traceb.adb, g-traceb.ads, g-decstr.adb,
7705 g-spipat.adb, g-decstr.ads, g-spipat.ads, s-mastop-tru64.adb,
7706 g-except.ads, g-thread.adb, g-hesorg.adb, g-thread.ads, g-hesorg.ads,
7707 g-expect-vms.adb, a-stuten.ads, g-spchge.adb, g-spchge.ads,
7708 g-u3spch.adb, g-u3spch.ads, g-spitbo.adb, g-spitbo.ads,
7709 s-osinte-dummy.ads, s-osinte-posix.adb, g-pehage.adb, g-pehage.ads,
7710 s-gloloc-mingw.adb, g-sha1.ads, s-traceb-hpux.adb,
7711 g-trasym-unimplemented.adb, g-trasym-unimplemented.ads, g-io_aux.adb,
7712 g-regexp.adb, g-io_aux.ads, g-socthi-mingw.adb, g-regexp.ads,
7713 s-osinte-hpux-dce.adb, g-socthi-mingw.ads, g-cgi.adb,
7714 s-osinte-hpux-dce.ads, g-cgi.ads, g-byorma.adb, g-boumai.ads,
7715 g-byorma.ads, a-caldel.adb, s-regexp.adb, s-regexp.ads,
7716 g-soliop-mingw.ads, g-sptavs.ads, s-osinte-tru64.ads, g-speche.adb,
7717 g-speche.ads, g-socthi.adb, g-stsifd-sockets.adb, g-socthi.ads,
7718 s-osinte-darwin.ads, i-vxwork-x86.ads, g-awk.adb, i-vxwork.ads,
7719 g-awk.ads, g-zspche.adb, g-zspche.ads, g-socket.adb, g-sptabo.ads,
7720 g-socket.ads, g-semaph.adb, g-semaph.ads, s-taspri-posix.ads,
7721 g-enblsp-vms-ia64.adb, g-cgideb.adb, g-cgideb.ads, g-sothco.adb,
7722 s-osinte-freebsd.ads, g-sothco.ads, g-catiio.adb, g-casuti.adb,
7723 g-catiio.ads, g-casuti.ads, g-trasym.adb, g-trasym.ads, s-casuti.adb,
7724 g-os_lib.adb, s-traceb-mastop.adb, g-busora.adb, s-interr-dummy.adb,
7725 g-busora.ads, g-enutst.ads, s-os_lib.adb, a-tasatt.adb,
7726 s-osinte-mingw.ads: Update to GPLv3 run-time license.
7727 Use GNAT instead of GNARL.
7729 2011-08-01 Bob Duff <duff@adacore.com>
7731 * a-cdlili.ads, a-cihama.ads, a-coinve.ads, a-ciorse.ads, a-coorma.ads,
7732 a-cidlli.ads, a-ciormu.ads, a-cihase.ads, a-cohama.ads, a-coorse.ads,
7733 a-ciorma.ads, a-coormu.ads, a-convec.ads, a-cohase.ads: Minor
7736 2011-08-01 Yannick Moy <moy@adacore.com>
7738 * debug.adb (d.D) reverve flag for the SPARK mode
7739 (d.E) reverve flag for SPARK generation mode
7740 (d.F) reverve flag for Why generation mode
7741 * opt.ads, opt.adb (ALFA_Mode, ALFA_Through_SPARK_Mode,
7742 ALFA_Through_Why_Mode, Formal_Verification_Mode, SPARK_Mode): New
7743 functions which return True when the corresponding modes are set
7744 (Formal_Language): return "spark" or "alfa" when in formal verification
7746 * sem_util.ads, sem_util.adb (Formal_Error_Msg): new wrapper on
7747 Error_Msg to prefix the error message with a tag giving the formal
7749 (Formal_Error_Msg_N): new wrapper on Error_Msg_N to prefix the error
7750 message with a tag giving the formal language
7751 * sem_ch5.adb (Analyze_Block_Statement): issue error in formal mode on
7753 (Analyze_Case_Statement): issue error in formal mode on case statement
7754 with a single "others" case alternative
7755 (Analyze_Exit_Statement): issue errors in formal mode on exit
7756 statements which do not respect SPARK restrictions
7757 (Analyze_Goto_Statement): issue error in formal mode on goto statement
7758 (Check_Unreachable_Code): always issue an error (not a warning) in
7759 formal mode on unreachable code (concerns both code after an infinite
7760 loop and after an unconditional jump, both not allowed in SPARK)
7761 * sem_ch6.adb (Analyze_Return_Statement): add call to
7762 Set_Return_Present for a procedure containing a return statement
7763 (already done for functions in Analyze_Function_Return)
7764 (Analyze_Function_Return): issue error in formal mode on extended
7765 return or if return is not last statement in function
7766 (Check_Missing_Return): issue error in formal mode if function does
7767 not end with return or if procedure contains a return
7768 * sem_ch8.ads, sem_ch8.adb (Has_Loop_In_Inner_Open_Scopes): new
7769 function to detect if there is an inner scope of its parameter S which
7772 2011-08-01 Thomas Quinot <quinot@adacore.com>
7774 * sem_ch6.ads: Minor reformatting.
7776 2011-08-01 Javier Miranda <miranda@adacore.com>
7778 * sem_util.adb (Abstract_Interface_List): Complete condition when
7779 processing private type declarations to avoid reading unavailable
7781 (Is_Synchronized_Tagged_Type): Complete condition when processing
7782 private extension declaration nodes to avoid reading unavailable
7785 2011-08-01 Thomas Quinot <quinot@adacore.com>
7787 * sem_ch3.adb: Minor reformatting.
7789 2011-08-01 Thomas Quinot <quinot@adacore.com>
7791 * s-parame-ae653.ads, s-parame-vms-alpha.ads, s-parame-hpux.ads,
7792 i-cpoint.adb, i-cstrin.adb, i-cpoint.ads, i-cstrin.ads,
7793 s-parame-vms-ia64.ads, s-parame.ads, i-c.ads, s-parame-vxworks.ads,
7794 s-parame-vms-restrict.ads: Remove duplicated Interfaces.C.* packages
7795 for VMS, instead parametrize the common implementation with
7796 System.Parameters declarations.
7798 2011-08-01 Eric Botcazou <ebotcazou@adacore.com>
7800 * gnat_rm.texi: Document limitation of Pragma No_Strict_Aliasing.
7802 2011-08-01 Tristan Gingold <gingold@adacore.com>
7804 * seh_init.c: Fix SEH handler installation on win64.
7806 2011-08-01 Ed Schonberg <schonberg@adacore.com>
7808 * sem_ch3.adb (Access_Subprogram_Declaration): in Asis mode, prevent
7809 double analysis of an anonymous access to subprogram, because it can
7810 lead to improper sharing of profiles and a back-end crash.
7812 2011-08-01 Robert Dewar <dewar@adacore.com>
7814 * make.adb, sem_ch4.adb: Minor reformatting.
7815 * gcc-interface/Make-lang.in: Update dependencies.
7816 * sem_util.adb, exp_ch5.adb: Minor reformatting.
7818 2011-08-01 Arnaud Charlet <charlet@adacore.com>
7820 * gnat_rm.texi: Fix definition of Long_Integer.
7822 2011-08-01 Ed Schonberg <schonberg@adacore.com>
7824 * exp_aggr.adb: check limit size of static aggregate unconditionally,
7825 to prevent storage exhaustion.
7826 * exp_ch7.adb (Clean_Simple_Protected_Objects): if the scope being
7827 finalized is a function body, insert the cleanup code before the final
7828 return statement, to prevent spurious warnings.
7829 * s-pooglo.ads: add overriding indicator.
7831 2011-08-01 Ed Schonberg <schonberg@adacore.com>
7833 * sem_ch4.adb (Operator_Check): improve error message when both a
7834 with_clause and a use_clause are needed to make operator usage legal.
7835 * sem_util.ads, sem_util.adb (Unit_Is_Visible): new predicate to
7836 determine whether a compilation unit is visible within an other,
7837 either through a with_clause in the current unit, or a with_clause in
7838 its library unit or one one of its parents.
7840 2011-08-01 Ed Schonberg <schonberg@adacore.com>
7842 * exp_ch5.adb (Expand_N_Iterator_Loop): handle properly an iterator
7843 over an arbitrary expression of an array or container type.
7844 * lib-xref.adb: clarify comment.
7846 2011-08-01 Bob Duff <duff@adacore.com>
7848 * einfo.ads: Minor reformatting.
7849 * debug.adb: Minor comment improvement.
7851 2011-08-01 Javier Miranda <miranda@adacore.com>
7853 * sem_ch4.adb (Try_Object_Operation): For class-wide subprograms do not
7854 consider hidden subprograms as valid candidates.
7856 2011-08-01 Arnaud Charlet <charlet@adacore.com>
7858 * make.adb (Compile): Strip -mxxx switches in CodePeer mode.
7860 2011-08-01 Vasiliy Fofanov <fofanov@adacore.com>
7862 * gnat_ugn.texi: Fix typo.
7864 2011-08-01 Robert Dewar <dewar@adacore.com>
7866 * i-cstrin.adb, sem_util.adb, exp_ch11.adb, sem_ch8.adb,
7867 lib-xref.adb: Minor reformatting
7869 2011-08-01 Gary Dismukes <dismukes@adacore.com>
7871 * exp_ch6.adb (Expand_N_Extended_Return_Statement): Replace test of
7872 when to generate a call to Move_Final_List.
7873 (Has_Controlled_Parts): Remove this function.
7875 2011-08-01 Geert Bosch <bosch@adacore.com>
7877 * par-ch3.adb (P_Discrete_Choice_List): Improve error message for extra
7880 2011-08-01 Thomas Quinot <quinot@adacore.com>
7882 * exp_ch11.adb (Expand_N_Raise_Statement): Mark N_Raise_xxx_Error for
7883 explicit raise of a predefined exception as Comes_From_Source if the
7884 original N_Raise_Statement comes from source.
7886 2011-08-01 Robert Dewar <dewar@adacore.com>
7888 * sinfo.ads: Add comment.
7889 * sem_ch6.adb: Minor reformatting.
7891 2011-08-01 Robert Dewar <dewar@adacore.com>
7893 * freeze.adb (Freeze_Entity): Refine check for bad component size
7894 clause to avoid rejecting confirming clause when atomic/aliased present.
7896 2011-08-01 Ed Schonberg <schonberg@adacore.com>
7898 * sem_ch8.adb (Find_Direct_Name, Analyze_Expanded_Name): use Is_LHS to
7899 better determine whether an entity reference is a write.
7900 * sem_util.adb (Is_LHS): refine predicate to handle assignment to a
7902 * lib-xref.adb (Output_References): Do no suppress a read reference at
7903 the same location as an immediately preceeding modify-reference, to
7904 handle properly in-out actuals.
7906 2011-08-01 Tristan Gingold <gingold@adacore.com>
7908 * env.c (__gnat_setenv) [VMS]: Refine previous change.
7910 2011-08-01 Quentin Ochem <ochem@adacore.com>
7912 * i-cstrin.adb (New_String): Changed implementation, now uses only the
7913 heap to compute the result.
7915 2011-08-01 Robert Dewar <dewar@adacore.com>
7917 * atree.ads: Minor reformatting.
7919 2011-08-01 Emmanuel Briot <briot@adacore.com>
7921 * g-expect.adb (Get_Command_Output): Fix memory leak.
7923 2011-08-01 Geert Bosch <bosch@adacore.com>
7925 * cstand.adb (P_Float_Type): New procedure to print the definition of
7926 predefined fpt types.
7927 (P_Mixed_Name): New procedure to print a name using mixed case
7928 (Print_Standard): Use P_Float_Type for printing floating point types
7929 * einfo.adb (Machine_Emax_Value): Add preliminary support for quad
7930 precision IEEE float.
7932 2011-08-01 Thomas Quinot <quinot@adacore.com>
7934 * sem_ch3.adb: Minor reformatting.
7936 2011-08-01 Ed Schonberg <schonberg@adacore.com>
7938 * sem_ch6.adb (Analyze_Parameterized_Expression): If the expression is
7939 the completion of a generic function, insert the new body rather than
7940 rewriting the original.
7942 2011-08-01 Yannick Moy <moy@adacore.com>
7944 * sinfo.ads, errout.ads: Typos in comments.
7946 2011-08-01 Robert Dewar <dewar@adacore.com>
7948 * par-endh.adb: Minor reformatting.
7950 2011-08-01 Robert Dewar <dewar@adacore.com>
7952 * aspects.ads, aspects.adb: Add aspects for library unit pragmas
7953 (Pre_Post_Aspects): New subtype.
7954 * par-ch12.adb (P_Generic): New syntax for aspects in packages
7955 * par-ch13.adb (P_Aspect_Specifications): Add Semicolon parameter
7956 * par-ch7.adb (P_Package): Remove Decl parameter
7957 (P_Package): Handle new syntax for aspects (before IS)
7958 * par-ch9.adb (P_Protected_Definition): Remove Decl parameter, handle
7960 (P_Task_Definition): Remove Decl parameter, handle new aspect syntax
7961 * par.adb (P_Aspect_Specifications): Add Semicolon parameter
7962 (P_Package): Remove Decl parameter
7963 * sem_ch13.adb (Analyze_Aspect_Specifications): Handle library unit
7965 * sem_ch7.adb (Analyze_Package_Declaration): Analyze new format aspect
7967 * sem_util.ads, sem_util.adb (Static_Boolean): New function
7968 * sinfo.ads: Document new syntax for aspects in packages etc.
7969 * sprint.adb: Handle new syntax of aspects before IS in package
7971 2011-08-01 Thomas Quinot <quinot@adacore.com>
7973 * atree.ads: Minor reformatting.
7974 * sem_prag.adb: Minor reformatting.
7976 2011-08-01 Robert Dewar <dewar@adacore.com>
7978 * exp_util.adb (Insert_Actions): Fix error in handling Actions for
7979 case expr alternative.
7981 2011-08-01 Ed Schonberg <schonberg@adacore.com>
7983 * sem_ch12.adb: Fix typo.
7985 2011-08-01 Geert Bosch <bosch@adacore.com>
7987 * sem_prag.adb (Check_No_Link_Name): New procedure.
7988 (Process_Import_Or_Interface): Use Check_No_Link_Name.
7989 * cstand.adb (Create_Standard): Use Esize (Standard_Long_Long_Float)
7990 instead of Standard_Long_Long_Float_Size global. Preparation for
7991 eventual removal of per type constants.
7992 * exp_util.ads (Get_Stream_Size): New function returning the stream
7993 size value of subtype E.
7994 * exp_util.adb (Get_Stream_Size): Implement new function.
7995 * exp_strm.adb (Build_Elementary_Input_Call): Use Get_Stream_Size
7997 * exp_attr.adb (Attribute_Stream_Size): Use Get_Stream_Size
7999 (Machine_Mantissa_Value): Handle 128-bit quad precision IEEE floats
8001 2011-08-01 Geert Bosch <bosch@adacore.com>
8003 * cstand.adb: Fix comments.
8004 * sem_prag.adb (Analyze_Pragma): Use List_Length instead of explicit
8007 2011-08-01 Robert Dewar <dewar@adacore.com>
8009 * exp_ch4.adb, sem_cat.adb: Minor reformatting.
8011 2011-08-01 Geert Bosch <bosch@adacore.com>
8013 * atree.ads: Fix comment.
8015 2011-08-01 Robert Dewar <dewar@adacore.com>
8017 * aspects.ads, aspects.adb (Aspect_Names): Moved from body to spec.
8018 * par-ch13.adb (P_Aspect_Specifications): Check misspelled aspect name.
8019 * par.adb: Add with for Namet.Sp.
8020 * par-tchk.adb: Minor reformatting.
8022 2011-08-01 Vincent Celier <celier@adacore.com>
8024 * mlib-tgt-specific-vms-alpha.adb, mlib-tgt-specific-vms-ia64.adb
8025 (Build_Dynamic_Library): Use new function Init_Proc_Name to get the name
8026 of the init procedure of a SAL.
8027 * mlib-tgt-vms_common.ads, mlib-tgt-vms_common.adb (Init_Proc_Name):
8030 2011-08-01 Thomas Quinot <quinot@adacore.com>
8032 * exp_ch4.adb, s-tasini.ads, sem_attr.adb, s-soflin.ads: Minor
8035 2011-08-01 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
8037 * adaint.c (__gnat_file_time_name_attr): Get rid of warning.
8039 2011-08-01 Thomas Quinot <quinot@adacore.com>
8041 * sem_util.adb, sem_util.ads (Has_Overriding_Initialize): Make function
8042 conformant with its spec (return True only for types that have
8043 an overriding Initialize primitive operation that prevents them from
8044 having preelaborable initialization).
8045 * sem_cat.adb (Validate_Object_Declaration): Fix test for preelaborable
8046 initialization for controlled types in Ada 2005 or later mode.
8048 2011-08-01 Robert Dewar <dewar@adacore.com>
8050 * aspects.ads, aspects.adb: Add aspect Type_Invariant, Precondition,
8052 (Same_Aspect): New function.
8053 * sem_ch13.adb (Analyze_Aspect_Specifications): Add aspect
8054 Type_Invariant, Precondition, Postcondition.
8055 * snames.ads-tmpl: Add Name_Type_Invariant.
8057 2011-08-01 Robert Dewar <dewar@adacore.com>
8059 * freeze.adb (Freeze_Entity): Don't call Check_Aspect_At_Freeze_Point
8061 (Freeze_All_Ent): Fix error in handling inherited aspects.
8062 * sem_ch13.adb (Analyze_Aspect_Specifications): Skip aspect that is
8063 already analyzed, but don't skip entire processing of a declaration,
8064 that's wrong in some cases of declarations being rewritten.
8065 (Analyze_Aspect_Specification): Set Is_Delayed_Aspect in aspects.
8066 Don't delay for integer, string literals
8067 Treat predicates in usual manner for delay, remove special case code,
8069 (Analyze_Freeze_Entity): Make call to Check_Aspect_At_Freeze_Point
8070 (Build_Predicate_Function): Update saved expression in aspect
8071 (Build_Invariant_Procedure): Update saved expression in aspect
8072 * exp_ch4.adb (Expand_N_Selected_Component): Only do the optimization
8073 of replacement of discriminant references if the reference is simple.
8075 2011-08-01 Robert Dewar <dewar@adacore.com>
8077 * aspects.ads, aspects.adb: Add Static_Predicate and Dynamic_Predicate.
8078 * sem_ch13.adb (Analyze_Aspect_Specification): Add processing for
8079 Static_Predicate and Dynamic_Predicate.
8080 (Build_Predicate_Function): Add processing for Static_Predicate
8081 and Dynamic_Predicate.
8082 * sinfo.ads, sinfo.adb (From_Dynamic_Predicate): New flag
8083 (From_Static_Predicate): New flag
8084 * snames.ads-tmpl: Add Name_Static_Predicate and Name_Dynamic_Predicate
8086 2011-08-01 Robert Dewar <dewar@adacore.com>
8088 * usage.adb: Documentation cleanup for Ada version modes in usage.
8089 * expander.adb: Minor reformatting.
8091 2011-08-01 Robert Dewar <dewar@adacore.com>
8093 * atree.ads: Minor comment fix.
8094 * a-stwifi.adb, a-stzfix.adb, a-strfix.adb, a-ztexio.ads, a-textio.ads,
8095 a-witeio.ads, sem_prag.adb: Minor reformatting.
8097 2011-08-01 Doug Rupp <rupp@adacore.com>
8099 * env.c (__gnat_setenv) [VMS]: Force 32bit on item list structure
8100 pointers. Use descrip.h header file for convenience. Add some
8103 2011-08-01 Robert Dewar <dewar@adacore.com>
8105 * freeze.adb (Freeze_Entity): Call Check_Aspect_At_Freeze_Point
8106 (Freeze_All): Call Check_Aspect_At_End_Of_Declarations
8107 * sem_ch13.ads, sem_ch13.adb (Check_Aspect_At_Freeze_Point):
8109 (Check_Aspect_At_End_Of_Declarations): New procedure
8110 (Analye_Aspect_Specification): Minor changes for above procedures
8111 * sinfo.ads, sinfo.adb (Is_Delayed_Aspect): Now set in aspect
8112 specification node as well.
8114 2011-08-01 Pascal Obry <obry@adacore.com>
8116 * adaint.c (_gnat_stat): GetFilesAttributesEx() would fail on special
8117 Windows files. Use GetFilesAttributes() in this case to check for file
8118 existence instead of returning with an error code.
8120 2011-08-01 Vincent Celier <celier@adacore.com>
8122 * a-stzfix.adb, a-stwifi.adb (Replace_Slice): Fixed computation when
8123 High is above Source length.
8125 2011-08-01 Robert Dewar <dewar@adacore.com>
8127 * a-ztexio.ads, a-textio.ads, a-witeio.ads: Fix comment.
8129 2011-08-01 Robert Dewar <dewar@adacore.com>
8131 * aspects.ads (Boolean_Aspects): New subtype.
8132 * exp_ch13.adb (Expand_Freeze_Entity): Fix errors in handling aspects
8133 for derived types in cases where the parent type and derived type have
8135 * freeze.adb (Freeze_Entity): Fix problems in handling derived type
8136 with aspects when parent type also has aspects.
8137 (Freeze_Entity): Deal with delay of boolean aspects (must evaluate
8138 boolean expression at this point).
8139 * sem_ch13.adb (Analyze_Aspect_Specifications): Delay all aspects in
8140 accordance with final decision on the Ada 2012 feature.
8141 * sinfo.ads, sinfo.adb (Is_Boolean_Aspect): New flag.
8143 2011-08-01 Matthew Heaney <heaney@adacore.com>
8145 * a-chtgbo.adb (Delete_Node_Sans_Free): Replace iterator with selector.
8147 2011-08-01 Pascal Obry <obry@adacore.com>
8149 * a-stzunb-shared.adb, a-strunb-shared.adb, a-stwiun-shared.adb:
8150 Fix Replace_Slice when High is above current string size.
8151 (Replace_Slice): Fix DL computation when High is above current
8154 2011-08-01 Gary Dismukes <dismukes@adacore.com>
8156 * gnat_rm.texi: Add documentation for pragma Static_Elaboration_Desired.
8158 2011-08-01 Matthew Heaney <heaney@adacore.com>
8160 * a-rbtgbo.adb (Delete_Node_Sans_Free): Fixed assignment to left child
8163 2011-08-01 Pascal Obry <obry@adacore.com>
8165 * a-stzunb-shared.adb, a-strunb-shared.adb, a-stwiun-shared.adb: Minor
8168 2011-08-01 Ed Schonberg <schonberg@adacore.com>
8170 * sem_attr.adb (Analyze_Attribute, case 'Access): Handle properly named
8171 access to protected subprograms in generic bodies.
8172 * sem_ch6.adb (Analyze_Subprogram_Declaration): If the context is a
8173 protected type, indicate that the convention of the subprogram is
8174 Convention_Protected, because it may be used in subsequent declarations
8175 within the protected declaration.
8177 2011-08-01 Vincent Celier <celier@adacore.com>
8179 * mlib-prj.adb (Build_Library): Use "ada_" as the prefix for the "init"
8180 and "final" procedures when the name of the library is "ada", to avoid
8181 duplicate symbols "adainit" and "adafinal" in executables.
8183 2011-08-01 Ed Schonberg <schonberg@adacore.com>
8185 * sem_attr.adb (Analyze_Attribute, case 'Result): Handle properly a
8186 quantified expression that appears within a postcondition and uses the
8187 Ada2012 'Result attribute.
8189 2011-07-28 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
8191 * init.c (__gnat_error_handler): Cast reason to int.
8192 (__gnat_install_handler): Explain sa_sigaction use.
8194 2011-07-24 Eric Botcazou <ebotcazou@adacore.com>
8196 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Subprogram_Type>: If the
8197 subprogram has copy-in copy-out parameters, try to promote the mode of
8198 the return type if it is passed in registers.
8200 2011-07-24 Eric Botcazou <ebotcazou@adacore.com>
8202 * gcc-interface/utils2.c (build_binary_op) <ARRAY_REF>: Do not mark the
8203 left operand as addressable.
8205 2011-07-24 Eric Botcazou <ebotcazou@adacore.com>
8207 * gcc-interface/gigi.h (build_function_stub): Remove.
8208 (build_return_expr): Likewise.
8209 (convert_vms_descriptor): Declare.
8210 * gcc-interface/utils.c (convert_vms_descriptor): Make global.
8211 (build_function_stub): Move to...
8212 * gcc-interface/utils2.c (build_return_expr): Move to...
8213 * gcc-interface/trans.c (build_function_stub): ...here.
8214 (build_return_expr): ...here.
8215 (Subprogram_Body_to_gnu): Add local variable for language_function.
8216 Disconnect the parameter attributes cache, if any, once done with it.
8217 Call end_subprog_body only after setting the end_locus.
8218 Build the stub associated with the function, if any, at the very end.
8219 (gnat_to_gnu) <N_Return_Statement>: Remove couple of useless local
8220 variables and streamline control flow.
8222 2011-07-23 Arnaud Charlet <charlet@adacore.com>
8225 * gcc-interface/Makefile.in (powerpc-linux): Remove reference to
8228 2011-07-22 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
8231 * init.c [sun && __SVR4 && !__vxworks] (__gnat_install_handler):
8232 Assign to act.sa_sigaction.
8233 * tracebak.c [USE_GENERIC_UNWINDER] (__gnat_backtrace): Cast
8234 current->return_address to char * before arithmetic.
8236 2011-07-22 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
8238 * init.c [sgi] (__gnat_error_handler): Update sigaction(2) citation.
8239 Correct argument types.
8240 Extract code from reason.
8241 (__gnat_install_handler): Assign to act.sa_sigaction.
8243 2011-07-21 Eric Botcazou <ebotcazou@adacore.com>
8245 * gcc-interface/Make-lang.in (GNAT1_ADA_OBJS): Move ada/b_gnat1.o to...
8246 (GNAT1_OBJS): ...here.
8248 2011-07-15 Eric Botcazou <ebotcazou@adacore.com>
8251 * g-socthi-mingw.adb (Fill): Fix formatting.
8253 * gcc-interface/gigi.h: Move around comment.
8255 2011-07-14 John David Anglin <dave.anglin@nrc-cnrc.gc.ca>
8258 * s-taprop-hpux-dce.adb (Abort_Task): Remove unnecessary cast.
8260 2011-07-14 Florian Weimer <fw@deneb.enyo.de>
8263 * g-socthi-mingw.adb (Fill): Guard against invalid MSG_WAITALL.
8265 2011-07-13 Eric Botcazou <ebotcazou@adacore.com>
8267 * gcc-interface/utils.c (build_vms_descriptor32): Skip the 32-bit
8268 range comparison if Pmode is SImode.
8270 2011-07-12 Laurent GUERBY <laurent@guerby.net>
8271 Eric Botcazou <ebotcazou@adacore.com>
8273 * adadecode.c: Wrap up in extern "C" block.
8274 * adadecode.h: Likewise.
8275 * adaint.c: Likewise. Remove 'const' keyword.
8276 * adaint.h: Likewise.
8278 * atree.h: Likewise.
8280 * cstreams.c: Likewise.
8284 * final.c: Likewise.
8286 * initialize.c: Likewise.
8288 * namet.h: Likewise.
8289 * nlists.h: Likewise.
8290 * raise.c: Likewise.
8291 * raise.h: Likewise.
8292 * repinfo.h: Likewise.
8293 * seh_init.c: Likewise.
8294 * targext.c: Likewise.
8295 * tracebak.c: Likewise.
8296 * uintp.h: Likewise.
8297 * urealp.h: Likewise.
8298 * xeinfo.adb: Wrap up generated C code in extern "C" block.
8299 * xsinfo.adb: Likewise.
8300 * xsnamest.adb: Likewise.
8301 * gcc-interface/gadaint.h: Wrap up in extern "C" block.
8302 * gcc-interface/gigi.h: Wrap up some prototypes in extern "C" block.
8303 * gcc-interface/misc.c: Likewise.
8304 * gcc-interface/Make-lang.in (GCC_LINK): Use LINKER.
8305 (GNAT1_C_OBJS): Remove ada/b_gnat1.o. List ada/seh_init.o and
8306 ada/targext.o here...
8307 (GNAT_ADA_OBJS): ...and not here.
8308 (GNAT1_ADA_OBJS): Add ada/b_gnat1.o.
8309 (GNATBIND_OBJS): Reorder.
8311 2011-07-07 Richard Henderson <rth@redhat.com>
8313 * gcc-interface/misc.c (gnat_init_gcc_eh): Don't call
8314 dwarf2out_frame_init.
8316 2011-07-07 Eric Botcazou <ebotcazou@adacore.com>
8318 * gcc-interface/misc.c (gnat_init): Tweak previous change.
8320 2011-07-07 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
8323 * gcc-interface/Makefile.in: Handle x86_64-solaris2.
8325 2011-07-06 Richard Guenther <rguenther@suse.de>
8327 * gcc-interface/misc.c (gnat_init): Merge calls to
8328 build_common_tree_nodes and build_common_tree_nodes_2.
8329 Re-initialize boolean_false_node.
8331 2011-07-02 Eric Botcazou <ebotcazou@adacore.com>
8332 Olivier Hainque <hainque@adacore.com>
8333 Nicolas Setton <setton@adacore.com>
8335 * gcc-interface/utils.c (record_builtin_type): Set TYPE_ARTIFICIAL on
8336 the type according to the ARTIFICIAL_P parameter.
8337 (create_type_decl): Likewise.
8338 (create_type_stub_decl): Set TYPE_ARTIFICIAL on the type to 1.
8340 2011-07-01 Eric Botcazou <ebotcazou@adacore.com>
8342 * gcc-interface/Make-lang.in (gnat1): Prepend '+' to the command.
8343 (gnatbind): Likewise.
8345 2011-06-29 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
8347 * gcc-interface/Makefile.in (TOOLS_LIBS): Add $(LIBINTL).
8349 2011-06-18 Eric Botcazou <ebotcazou@adacore.com>
8351 * gcc-interface/decl.c (gnat_to_gnu_component_type): Use GNAT_TYPE
8352 local variable throughout. Remove useless call to Base_Type.
8353 (gnat_to_gnu_field): Use GNAT_FIELD_TYPE local variable throughout.
8354 Take it also into account for the volatileness of the field. Set the
8355 TREE_SIDE_EFFECTS flag as well in this case. Reorder some warnings.
8357 2011-06-18 Eric Botcazou <ebotcazou@adacore.com>
8359 * gcc-interface/trans.c (Identifier_to_gnu): Don't set TREE_THIS_NOTRAP
8360 on a dereference built for a by-ref object if it has an address clause.
8362 2011-06-18 Eric Botcazou <ebotcazou@adacore.com>
8364 * einfo.ads (Address_Taken): Document use for the second argument of
8365 Asm_Input and Asm_Output attributes.
8366 * sem_attr.adb (Analyze_Attribute) <Attribute_Asm_Input>: If the second
8367 argument is an entity name, then set Address_Taken on it.
8368 <Attribute_Asm_Output>: Likewise.
8369 * gcc-interface/trans.c (lvalue_required_for_attribute_p): Handle the
8370 Attr_Asm_Input and Attr_Asm_Output attributes explicitly.
8371 (gnat_to_gnu) <N_Code_Statement>: If an operand is going to end up in
8372 memory and is a CONST_DECL, retrieve its corresponding VAR_DECL.
8374 2011-06-16 Joern Rennecke <joern.rennecke@embecosm.com>
8377 * gcc-interface/decl.c (gnat_to_gnu_param): Use pack_cumulative_args.
8379 2011-06-14 Joseph Myers <joseph@codesourcery.com>
8381 * gcc-interface/Make-lang.in (gnatbind$(exeext)): Use ggc-none.o.
8382 (ada/utils.o): Update dependencies.
8383 * gcc-interface/Makefile.in (EXTRA_GNATTOOLS_OBJS): Add
8384 ../../../libcpp/libcpp.a.
8385 * gcc-interface/utils.c: Include common/common-target.h.
8386 (process_attributes): Use targetm_common.have_named_sections.
8388 2011-06-07 Richard Guenther <rguenther@suse.de>
8390 * gcc-interface/misc.c (gnat_init): Do not set size_type_node or call
8393 2011-06-06 Eric Botcazou <ebotcazou@adacore.com>
8395 * gcc-interface/utils2.c (gnat_stabilize_reference): Propagate the
8396 TREE_THIS_NOTRAP flag.
8398 2011-06-06 Eric Botcazou <ebotcazou@adacore.com>
8400 * gcc-interface/utils2.c (gnat_stabilize_reference) <COMPOUND_EXPR>:
8403 2011-06-06 Eric Botcazou <ebotcazou@adacore.com>
8405 * gcc-interface/trans.c (Identifier_to_gnu): Also handle deferred
8406 constants whose full view has discriminants specially.
8408 2011-06-06 Eric Botcazou <ebotcazou@adacore.com>
8410 * gcc-interface/utils.c: Include diagnostic.h.
8411 (gnat_write_global_declarations): Output debug information for all
8412 global type declarations before finalizing the compilation unit.
8413 * gcc-interface/Make-lang.in (ada/utils.o): Add dependency.
8415 2011-05-25 Jakub Jelinek <jakub@redhat.com>
8417 * gcc-interface/utils.c (def_fn_type): Remove extra va_end.
8419 2011-05-25 Kai Tietz <ktietz@redhat.com>
8421 * adaint.c (__gnat_to_canonical_file_list_next): Use array
8422 initialization instead of const/none-const pointer assignment.
8424 2011-05-24 Joseph Myers <joseph@codesourcery.com>
8426 * gcc-interface/Make-lang.in (GNAT1_OBJS): Don't include
8427 $(EXTRA_GNAT1_OBJS).
8428 (GNATBIND_OBJS): Don't include $(EXTRA_GNATBIND_OBJS).
8429 (EXTRA_GNAT1_OBJS, EXTRA_GNATBIND_OBJS): Remove.
8430 (gnat1$(exeext), gnatbind$(exeext)): Use libcommon-target.a.
8431 * gcc-interface/Makefile.in (EXTRA_GNATTOOLS_OBJS): Use
8432 libcommon-target.a instead of prefix.o.
8434 2011-05-21 Joseph Myers <joseph@codesourcery.com>
8437 * gcc-interface/Make-lang.in (gnatbind$(exeext)): Depend on $(LIBDEPS).
8439 2011-05-20 Joseph Myers <joseph@codesourcery.com>
8441 * gcc-interface/Make-lang.in (EXTRA_GNATBIND_OBJS): Remove version.o.
8442 * gcc-interface/Makefile.in (EXTRA_GNATTOOLS_OBJS): Use libcommon.a
8443 instead of version.o.
8445 2011-05-18 Kai Tietz <ktietz@redhat.com>
8447 * gcc-interface/trans.c (Exception_Handler_to_gnu_sjlj): Use
8448 boolean_false_node instead of integer_zero_node.
8449 (convert_with_check): Likewise.
8450 * gcc-interface/decl.c (choices_to_gnu): Likewise.
8452 2011-05-12 Eric Botcazou <ebotcazou@adacore.com>
8454 * gcc-interface/trans.c (call_to_gnu): In the by-reference case, if the
8455 type of the parameter is an unconstrained array, convert the actual to
8456 the type of the formal in the In Out and Out cases as well.
8458 2011-05-11 Nathan Froyd <froydnj@codesourcery.com>
8460 * gcc-interface/utils.c (def_fn_type): Don't call build_function_type;
8461 call build_function_type_array or build_varargs_function_type_array
8463 (create_subprog_type): Don't call build_function_type; call
8464 build_function_type_vec instead.
8466 2011-05-11 Nathan Froyd <froydnj@codesourcery.com>
8468 * gcc-interface/ada-tree.h (TYPE_OBJECT_RECORD_TYPE): Use TYPE_MINVAL.
8469 (TYPE_GCC_MIN_VALUE): Use TYPE_MINVAL.
8470 (TYPE_GCC_MAX_VALUE): Use TYPE_MAXVAL.
8472 2011-05-07 Eric Botcazou <ebotcazou@adacore.com>
8474 * gcc-interface/decl.c (intrin_arglists_compatible_p): Remove spaces.
8476 * gcc-interface/gigi.h (global_bindings_p): Adjust prototype.
8477 * gcc-interface/utils.c (global_bindings_p): Return bool and simplify.
8479 2011-05-05 Nathan Froyd <froydnj@codesourcery.com>
8481 * gcc-interface/trans.c (Case_Statement_to_gnu): Call build_case_label.
8483 2011-05-05 Nathan Froyd <froydnj@codesourcery.com>
8485 * gcc-interface/decl.c (intrin_arglists_compatible_p): Use iterators
8486 instead of accessing TYPE_ARG_TYPES directly.
8487 * gcc-interface/utils.c (handle_nonnull_attribute): Likewise.
8489 2011-05-05 Eric Botcazou <ebotcazou@adacore.com>
8492 * gcc-interface/gigi.h (get_variant_part): Declare.
8493 * gcc-interface/decl.c (get_variant_part): Make global.
8494 * gcc-interface/utils2.c (find_common_type): Do not return T1 if the
8495 types have the same constant size, are record types and T1 has a
8496 variant part while T2 doesn't.
8498 2011-05-05 Eric Botcazou <ebotcazou@adacore.com>
8500 * gcc-interface/utils.c (begin_subprog_body): Do not call
8502 (end_subprog_body): Likewise.
8504 2011-05-04 Richard Guenther <rguenther@suse.de>
8506 * gcc-interface/trans.c (gnat_to_gnu): Remove zero notrunc argument to
8508 (pos_to_constructor): Likewise.
8510 2011-05-03 Nathan Froyd <froydnj@codesourcery.com>
8511 Eric Botcazou <ebotcazou@adacore.com>
8513 * gcc-interface/trans.c (gigi): Call build_function_type_list instead
8514 of build_function_type. Adjust calls to...
8515 (build_raise_check): ...this. Do not take a void_tree parameter.
8516 Call build_function_type_list instead of build_function_type.
8517 Fix head comment and swap couple of conditional blocks.
8519 2011-04-30 Eric Botcazou <ebotcazou@adacore.com>
8521 * gnatvsn.ads (Library_Version): Bump to 4.7.
8522 (Current_Year): Bump to 2011.
8524 2011-04-29 Michael Matz <matz@suse.de>
8526 * gcc-interface/misc.c (gnat_handle_option): Set
8527 warn_maybe_uninitialized.
8529 2011-04-23 Gerald Pfeifer <gerald@pfeifer.com>
8531 * gnat_ugn.texi (Complexity Metrics Control): Update link to
8532 the Watson/McCabe paper.
8534 2011-04-23 Jim Meyering <meyering@redhat.com>
8536 * gnat_ugn.texi (Examples of gnatxref Usage): Fix typo: s/it it/it is/
8538 2011-04-22 Eric Botcazou <ebotcazou@adacore.com>
8540 * gcc-interface/decl.c (make_packable_type): Copy DECL_PARALLEL_TYPE
8543 2011-04-22 Eric Botcazou <ebotcazou@adacore.com>
8545 * gcc-interface/gigi.h (create_subprog_decl): Add ARTIFICIAL_FLAG
8547 * gcc-interface/utils.c (create_subprog_decl): Likewise. Set
8548 DECL_ARTIFICIAL and DECL_NO_INLINE_WARNING_P on the DECL accordingly.
8549 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Subprogram_Type>: Add
8550 ARTIFICIAL_FLAG local variable and pass it to create_subprog_decl.
8551 <all>: Do not set flags on the reused DECL node coming from an alias.
8552 Set DECL_IGNORED_P on the DECL node built for subprograms if they
8553 don't need debug info here...
8554 * gcc-interface/trans.c (Subprogram_Body_to_gnu): ...and not here.
8555 (gigi): Adjust calls to create_subprog_decl.
8556 (build_raise_check): Likewise.
8557 (establish_gnat_vms_condition_handler): Likewise.
8558 (Compilation_Unit_to_gnu): Likewise.
8559 (gnat_to_gnu): Likewise.
8561 2011-04-21 Eric Botcazou <ebotcazou@adacore.com>
8563 * gcc-interface/Makefile.in (NO_SIBLING_ADAFLAGS): Always define.
8564 (NO_REORDER_ADAFLAGS): New variable.
8565 (EXTRA_GNATTOOLS): Always define.
8566 (../stamp-gnatlib1-$(RTSDIR): Copy tsystem.h.
8567 Clean up and adjust list of files compiled with special options.
8568 * gcc-interface/Make-lang.in: Likewise.
8569 (ada/decl.o): Cosmetical change.
8570 (ada/misc.o): Remove dependency on $(PLUGIN_H).
8572 2011-04-20 Jim Meyering <meyering@redhat.com>
8574 * initialize.c (__gnat_initialize): Remove useless if-before-free.
8576 2011-04-17 Eric Botcazou <ebotcazou@adacore.com>
8578 * gcc-interface/Make-lang.in (gnatbind): Replace $(ALL_CFLAGS) with
8579 $(CFLAGS) on the link line.
8581 2011-04-17 Eric Botcazou <ebotcazou@adacore.com>
8583 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Function>: Declare the
8584 padded type built for the return type if it is unconstrained.
8586 2011-04-14 Nathan Froyd <froydnj@codesourcery.com>
8588 * gcc-interface/utils.c (gnat_poplevel): Use block_chainon.
8590 2011-04-12 Nathan Froyd <froydnj@codesourcery.com>
8592 * gcc-interface/ada-tree.h (union lang_tree_node): Check for TS_COMMON
8593 before calling TREE_CHAIN.
8594 * gcc-interface/misc.c (gnat_init_ts): New function.
8595 (LANG_HOOKS_INIT_TS): Define.
8597 2011-04-12 Martin Jambor <mjambor@suse.cz>
8599 * gcc-interface/utils.c (end_subprog_body): Call cgraph_get_create_node
8600 instead of cgraph_node.
8602 2011-04-08 Eric Botcazou <ebotcazou@adacore.com>
8604 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Procedure>: Set minimum
8605 alignment on fields of the RETURN type built for the Copy-In Copy-Out
8608 2011-04-08 Eric Botcazou <ebotcazou@adacore.com>
8610 * gcc-interface/trans.c (Identifier_to_gnu): Do not return initializers
8611 of aggregate types that contain a placeholder.
8613 2011-04-08 Nathan Froyd <froydnj@codesourcery.com>
8615 * gcc-interface/utils.c (handle_sentinel_attribute): Don't use
8617 (handle_type_generic_attribute): Likewise.
8619 2011-04-04 Eric Botcazou <ebotcazou@adacore.com>
8622 * s-oscons-tmplt.c (MSG_WAITALL): Fix thinko in previous change.
8624 2011-04-04 Kai Tietz <ktietz@redhat.com>
8627 * s-oscons-tmplt.c (MSG_WAITALL): Define it for native windows targets
8630 2011-04-02 Eric Botcazou <ebotcazou@adacore.com>
8632 * gcc-interface/utils2.c (build_allocator): In the unconstrained array
8633 type case, do not strip a padding type around the array type.
8635 2011-04-02 Eric Botcazou <ebotcazou@adacore.com>
8637 * gcc-interface/utils.c (update_pointer_to): Finalize named pointer
8640 2011-04-02 Eric Botcazou <ebotcazou@adacore.com>
8642 * gcc-interface/lang.opt (feliminate-unused-debug-types): Delete.
8643 * gcc-interface/misc.c (gnat_handle_option): Remove special handling
8644 code for -feliminate-unused-debug-types.
8645 (gnat_post_options): Likewise.
8647 2011-04-02 Eric Botcazou <ebotcazou@adacore.com>
8649 * gcc-interface/utils.c (gnat_pushdecl): If this is a non-artificial
8650 declaration of a pointer type, then set DECL_ORIGINAL_TYPE to a
8653 2011-04-02 Eric Botcazou <ebotcazou@adacore.com>
8655 * gcc-interface/decl.c (gnat_to_gnu_entity): Do not force the
8656 DECL_ARTIFICIAL flag on enumeration types.
8658 2011-04-02 Eric Botcazou <ebotcazou@adacore.com>
8660 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Array_Type>: Do not make
8661 fat pointer types artificial unconditionally.
8662 <E_Array_Subtype>: Attach the base array type as a parallel type if it
8665 2011-04-02 Eric Botcazou <ebotcazou@adacore.com>
8667 * gcc-interface/gigi.h (get_dummy_type): Declare.
8668 (build_dummy_unc_pointer_types): Likewise.
8669 (finish_fat_pointer_type): Likewise.
8670 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Array_Type>: If a dummy
8671 fat pointer type has been built, complete it in place.
8672 <E_Access_Type>: Call build_dummy_unc_pointer_types to build dummy fat
8673 and thin pointers. Remove useless variable.
8674 (finish_fat_pointer_type): Make global and move to...
8675 * gcc-interface/utils.c (finish_fat_pointer_type): ...here.
8676 (get_dummy_type): New function.
8677 (build_dummy_unc_pointer_types): Likewise.
8678 (gnat_pushdecl): Propage the name to the anonymous variants only.
8679 (update_pointer_to): Only adjust the pointer types in the unconstrained
8682 2011-04-02 Eric Botcazou <ebotcazou@adacore.com>
8684 * gcc-interface/ada-tree.h (DECL_TAFT_TYPE_P): New flag.
8685 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Incomplete_Type>: Set it
8686 if this is a Taft amendment type and the full declaration is available.
8687 * gcc-interface/trans.c (process_type): Likewise.
8688 If there is an old type, mark the new one as used if DECL_TAFT_TYPE_P.
8689 (process_freeze_entity): Likewise.
8690 * gcc-interface/utils.c (dummy_global): New static variable.
8691 (gnat_write_global_declarations): If there are types declared as used
8692 at the global level, insert them in the global hash table.
8694 2011-04-02 Eric Botcazou <ebotcazou@adacore.com>
8696 * gcc-interface/gigi.h (record_builtin_type): Add ARTIFICIAL_P param.
8697 * gcc-interface/utils.c (gnat_pushdecl): If this is a non-artificial
8698 declaration of an array type, then set DECL_ORIGINAL_TYPE to a distinct
8700 (record_builtin_type): Add ARTIFICIAL_P parameter. Set DECL_ARTIFICIAL
8701 flag of the type accordingly.
8702 * gcc-interface/trans.c (gigi): Adjust calls to record_builtin_type.
8704 2011-04-02 Eric Botcazou <ebotcazou@adacore.com>
8706 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Access_Type>: Defer
8707 finalizing types when updating the pointers to the designated type.
8708 <all>: Finalize the deferred types even if we didn't defer processing
8709 of incomplete types in this invocation.
8711 2011-04-01 Olivier Hainque <hainque@adacore.com>
8712 Nicolas Setton <setton@adacore.com>
8713 Eric Botcazou <ebotcazou@adacore.com>
8715 * gcc-interface/misc.c (gnat_descriptive_type): New function.
8716 (LANG_HOOKS_DESCRIPTIVE_TYPE): Redefine to gnat_descriptive_type.
8718 2011-03-28 Kai Tietz <ktietz@redhat.com>
8720 * gcc-interface/Makefile.in (SO_LIB): Handle multilib build for native
8722 (EH_MECHANISM): Use GCC exception mechanism for native Windows targets.
8723 * system-mingw.ads (System): Change ZCX_By_Default default to True.
8725 * raise-gcc.c (PERSONALITY_FUNCTION): Add prototype.
8727 2011-03-28 Tristan Gingold <gingold@adacore.com>
8730 * gcc-interface/Make-lang.in (ada/b_gnat1.adb): Replace ada/b_gnat1.c.
8731 Use ada output of gnatbind.
8732 (ada/b_gnatb.adb): Ditto.
8733 (ada/b_gnat1.o, ada/b_gnatb.o): New rules.
8734 (ada.mostlyclean, ada.stage1)
8735 (ada.stage2, ada.stage3, ada.stage4, ada.stageprofile)
8736 (ada.stagefeedback): Adjust.
8737 * gcc-interface/Makefile.in (b_gnatl.adb): Replace b_gnatl.c.
8738 Use ada output of gnatbind.
8739 (b_gnatm.adb): Ditto.
8740 (b_gnatl.o, b_gnatm.o): New rules.
8742 2011-03-26 Eric Botcazou <ebotcazou@adacore.com>
8744 * gcc-interface/decl.c (gnat_to_gnu_entity) <object>: Create TYPE_DECL
8745 for the padded type built to support a specified size or alignment.
8747 2011-03-26 Eric Botcazou <ebotcazou@adacore.com>
8749 * gcc-interface/gigi.h (finalize_from_with_types): Adjust comment.
8750 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Access_Type>: Defer
8751 unconditionally to the end of the unit when the designated type is
8753 <all>: Rename local variable. Attempt to un-defer types only and do it
8754 for limited_with'ed types as well.
8755 (finalize_from_with_types): Adjust comment. Rename variable and tidy.
8756 * gcc-interface/trans.c (Compilation_Unit_to_gnu): Use GNAT_UNIT
8757 consistently and remove redundant call to finalize_from_with_types.
8759 2011-03-26 Eric Botcazou <ebotcazou@adacore.com>
8761 * inline.adb (Back_End_Cannot_Inline): Lift restriction on calls to
8762 subprograms without a previous spec declared in the same unit.
8763 * gcc-interface/trans.c (Compilation_Unit_to_gnu): Process inlined
8764 subprograms at the end of the unit instead of at the beginning.
8765 * gcc-interface/utils.c (create_subprog_decl): Check that the entity
8766 isn't public for the special handling of non-inline functions nested
8767 inside inline external functions.
8769 2011-03-25 Jeff Law <law@redhat.com>
8771 * gcc-interface/utils.c (def_fn_type): Add missing va_end.
8773 2011-03-24 Eric Botcazou <ebotcazou@adacore.com>
8775 * einfo.ads (Size_Depends_On_Discriminant): Adjust description.
8776 * layout.adb (Compute_Size_Depends_On_Discriminant): New procedure
8777 to compute Set_Size_Depends_On_Discriminant.
8778 (Layout_Type): Call it on array types in back-end layout mode.
8779 * sem_util.adb (Requires_Transient_Scope): Return true for array
8780 types only if the size depends on the value of discriminants.
8781 * gcc-interface/utils2.c (build_binary_op) <MODIFY_EXPR>: Use the RHS
8782 type if the RHS is a call to a function that returns an unconstrained
8783 type with default discriminant.
8785 2011-03-24 Eric Botcazou <ebotcazou@adacore.com>
8787 * gcc-interface/trans.c (gnat_to_gnu): Remove obsolete case of
8788 non-conversion to the nominal result type at the end.
8790 2011-03-23 Eric Botcazou <ebotcazou@adacore.com>
8792 * gcc-interface/trans.c (create_temporary): New function taken from...
8793 (create_init_temporary): ...here. Call it.
8794 (call_to_gnu): Create the temporary for the return value early, if any.
8795 Create it for a function with copy-in/copy-out parameters if there is
8796 no target; in other cases of copy-in/copy-out, use another temporary.
8797 Push the new binding level lazily. Add and rename local variables.
8799 2011-03-23 Eric Botcazou <ebotcazou@adacore.com>
8801 * gcc-interface/decl.c (validate_size): Improve comments and tweak
8803 (set_rm_size): Likewise.
8805 2011-03-23 Eric Botcazou <ebotcazou@adacore.com>
8807 * gcc-interface/decl.c (gnat_to_gnu_entity) <object>: Create TYPE_DECL
8808 for the padded type built in order to support a specified alignment.
8809 Fix incorrect formatting.
8811 2011-03-21 Eric Botcazou <ebotcazou@adacore.com>
8814 * gcc-interface/decl.c (elaborate_expression_1): Localize GNU_DECL.
8816 2011-03-21 Eric Botcazou <ebotcazou@adacore.com>
8818 * gcc-interface/decl.c (components_to_record): Add REORDER parameter,
8819 rename DEBUG_INFO_P into DEBUG_INFO and move P_GNU_REP_LIST parameter
8820 to the end of the list. Adjust recursive call. Rename local variable.
8821 If REORDER is true, reorder components of the record type.
8822 (gnat_to_gnu_entity): Pass OK_To_Reorder_Components flag as argument to
8823 components_to_record and adjust the parameter list.
8825 2011-03-21 Eric Botcazou <ebotcazou@adacore.com>
8827 * gcc-interface/decl.c (elaborate_expression_1): When optimization is
8828 disabled, use the variable for bounds of loop iteration scheme.
8830 2011-03-21 Kai Tietz <ktietz@redhat.com>
8833 * gcc-interface/utils.c (gnat_internal_attribute_table): Add column.
8835 2011-03-17 Eric Botcazou <ebotcazou@adacore.com>
8837 * gcc-interface/decl.c (elaborate_expression_1): Try harder to find
8838 out whether the expression is read-only. Short-circuit placeholder
8839 case and rename a couple of local variables.
8841 2011-03-17 Eric Botcazou <ebotcazou@adacore.com>
8843 * gcc-interface/gigi.h (smaller_form_type_p): Declare.
8844 * gcc-interface/trans.c (smaller_form_type_p): Make global and move...
8845 * gcc-interface/utils.c (smaller_form_type_p): ...to here.
8846 (convert): Deal with conversions from a smaller form type specially.
8848 2011-02-14 Eric Botcazou <ebotcazou@adacore.com>
8850 * gcc-interface/misc.c (gnat_init_options): Do not concatenate -I and
8851 its argument, except for the special -I- switch.
8853 2011-02-12 Gerald Pfeifer <gerald@pfeifer.com>
8855 * gnat_ugn.texi (Compiling Different Versions of Ada): Update link to
8858 2011-02-08 Eric Botcazou <ebotcazou@adacore.com>
8860 * gcc-interface/Makefile.in (x86-64 darwin): Handle multilibs.
8862 2011-02-03 Eric Botcazou <ebotcazou@adacore.com>
8864 * gcc-interface/gigi.h (fill_vms_descriptor): Take GNU_TYPE instead of
8866 * gcc-interface/utils2.c (fill_vms_descriptor): Move from here to...
8867 * gcc-interface/utils.c (fill_vms_descriptor): ...here. Take GNU_TYPE
8868 instead of GNAT_FORMAL. Protect the expression against multiple uses.
8869 Do not generate the check directly, instead instantiate the template
8870 check present in the descriptor.
8871 (make_descriptor_field): Move around.
8872 (build_vms_descriptor32): Build a template check in the POINTER field.
8873 (build_vms_descriptor): Remove useless suffixes.
8874 * gcc-interface/trans.c (call_to_gnu): Adjust fill_vms_descriptor call.
8876 2011-01-26 Eric Botcazou <ebotcazou@adacore.com>
8879 * targext.c: Include target files if IN_RTS is defined.
8881 2011-01-26 Richard Guenther <rguenther@suse.de>
8884 * targext.c: Include config.h.
8885 * gcc-interface/Make-lang.in (ada/targext.o): Add $(CONFIG_H)
8888 2011-01-04 Pascal Obry <obry@adacore.com>
8889 Eric Botcazou <ebotcazou@adacore.com>
8891 * gcc-interface/decl.c: Disable Stdcall convention handling for 64-bit.
8893 2011-01-04 Eric Botcazou <ebotcazou@adacore.com>
8895 * gcc-interface/trans.c (Case_Statement_to_gnu): Put the SLOC of the
8896 end-of-case on the end label and its associated gotos, if any.
8898 2011-01-04 Eric Botcazou <ebotcazou@adacore.com>
8900 * gcc-interface/trans.c (Subprogram_Body_to_gnu): Evaluate the
8901 expressions of the parameter cache within the statement group of
8904 2011-01-04 Olivier Hainque <hainque@adacore.com>
8905 Eric Botcazou <ebotcazou@adacore.com>
8907 * gcc-interface/trans.c (BLOCK_SOURCE_END_LOCATION): Provide default.
8908 (set_end_locus_from_node): New function.
8909 (Subprogram_Body_to_gnu): Use it to mark both the inner BIND_EXPR we
8910 make and the function end_locus.
8911 (Compilation_Unit_to_gnu): Call it instead of a straight Sloc_to_locus
8912 for the elaboration subprogram.
8913 (set_gnu_expr_location_from_node) <default case>: Use it to attempt to
8914 set the end_locus of the expression as well.
8916 2011-01-04 Eric Botcazou <ebotcazou@adacore.com>
8919 * gcc-interface/trans.c (Identifier_to_gnu): In SJLJ mode, do not make
8920 variables that are referenced in exception handlers volatile.
8924 Copyright (C) 2011 Free Software Foundation, Inc.
8926 Copying and distribution of this file, with or without modification,
8927 are permitted in any medium without royalty provided the copyright
8928 notice and this notice are preserved.
8930 * gnat_rm.texi: Ramification of pragma Eliminate documentation
8931 - fix bugs in the description of Source_Trace;
8932 - get rid of UNIT_NAME;
8934 2011-08-02 Javier Miranda <miranda@adacore.com>
8937 (Build_Dispatching_Requeue): Adding support for VM targets
8938 since we cannot directly reference the Tag entity.
8939 * exp_sel.adb (Build_K): Adding support for VM targets.
8940 (Build_S_Assignment): Adding support for VM targets.
8942 (Default_Prim_Op_Position): In VM targets do not restrict availability
8943 of predefined interface primitives to compiling in Ada 2005 mode.
8944 (Is_Predefined_Interface_Primitive): In VM targets this service is not
8945 restricted to compiling in Ada 2005 mode.
8946 (Make_VM_TSD): Generate code that declares and initializes the OSD
8947 record. Needed to support dispatching calls through synchronized
8950 (Make_Predefined_Primitive_Specs): Enable generation of predefined
8951 primitives associated with synchronized interfaces.
8952 (Make_Predefined_Primitive_Bodies): Enable generation of predefined
8953 primitives associated with synchronized interfaces.
8955 2011-08-02 Yannick Moy <moy@adacore.com>
8957 * par-ch11.adb (P_Handled_Sequence_Of_Statements): mark a sequence of
8958 statements hidden in SPARK if preceded by the HIDE directive
8959 (Parse_Exception_Handlers): mark each exception handler in a sequence of
8960 exception handlers as hidden in SPARK if preceded by the HIDE directive
8961 * par-ch6.adb (P_Subprogram): mark a subprogram body hidden in SPARK
8962 if starting with the HIDE directive
8963 * par-ch7.adb (P_Package): mark a package body hidden in SPARK if
8964 starting with the HIDE directive; mark the declarations in a private
8965 part as hidden in SPARK if the private part starts with the HIDE
8967 * restrict.adb, restrict.ads
8968 (Set_Hidden_Part_In_SPARK): record a range of slocs as hidden in SPARK
8969 (Is_In_Hidden_Part_In_SPARK): new function which returns whether its
8970 argument node belongs to a part which is hidden in SPARK
8971 (Check_SPARK_Restriction): do not issue violations on nodes in hidden
8972 parts in SPARK; protect the possibly costly call to
8973 Is_In_Hidden_Part_In_SPARK by a check that the SPARK restriction is on
8974 * scans.ads (Token_Type): new value Tok_SPARK_Hide in enumeration
8975 * scng.adb (Accumulate_Token_Checksum_GNAT_6_3,
8976 Accumulate_Token_Checksum_GNAT_5_03): add case for new token
8978 (Scan): recognize special comment starting with '#' and followed by
8979 SPARK keyword "hide" as a HIDE directive.
8981 2011-08-02 Yannick Moy <moy@adacore.com>
8983 * types.ads, erroutc.ads: Minor reformatting.
8985 2011-08-02 Vincent Celier <celier@adacore.com>
8987 * link.c: Add response file support for cross platforms.
8989 2011-08-02 Ed Schonberg <schonberg@adacore.com>
8991 * sem_aggr.adb (Resolve_Array_Aggregate): when copying the expression
8992 in an association, set parent field of copy before partial analysis.
8993 * sem_res.adb (Resolve_Slice): create reference to itype only when
8994 expansion is enabled.
8996 2011-08-02 Yannick Moy <moy@adacore.com>
8998 * einfo.adb, einfo.ads (Body_Is_In_ALFA, Set_Body_Is_In_ALFA): get/set
8999 for new flag denoting which subprogram bodies are in ALFA
9000 * restrict.adb, sem_ch7.adb: Update comment
9001 * sem_ch11.adb, sem_ch2.adb, sem_ch3.adb, sem_ch4.adb, sem_ch5.adb,
9002 sem_ch9.adb, sem_res.adb: Add calls to
9003 Current_Subprogram_Body_Is_Not_In_ALFA on unsupported constructs.
9004 * sem_ch6.adb (Analyze_Function_Return): add calls to
9005 Current_Subprogram_Body_Is_Not_In_ALFA on return statement in the
9006 middle of the body, and extended return.
9007 (Check_Missing_Return): add calls to Set_Body_Is_In_ALFA with argument
9008 False when missing return.
9009 (Analyze_Subprogram_Body_Helper): initialize the flag Body_Is_In_ALFA
9010 to True for subprograms whose spec is in ALFA. Remove later on the flag
9011 on the entity used for a subprogram body when there exists a separate
9013 * sem_util.adb, sem_util.ads (Current_Subprogram_Body_Is_Not_In_ALFA):
9014 if Current_Subprogram is not Empty, set its flag Body_Is_In_ALFA to
9015 False, otherwise do nothing.
9017 2011-08-02 Robert Dewar <dewar@adacore.com>
9019 * inline.adb, stand.ads, sem_ch6.adb, sem_ch8.adb: Minor reformatting.
9021 2011-08-02 Yannick Moy <moy@adacore.com>
9023 * sem_ch4.ads: minor formatting.
9025 2011-08-02 Yannick Moy <moy@adacore.com>
9027 * sem_aggr.adb, err_vars.ads, sem_ch3.adb, sem_ch5.adb, sem_ch9.adb,
9028 debug.adb, sem_util.adb, sem_res.adb, sem_attr.adb, gnat1drv.adb,
9029 errout.adb, errout.ads, exp_ch6.adb, sem_ch4.adb, restrict.adb,
9030 restrict.ads, sem_ch6.adb, sem_ch8.adb, sem_ch11.adb,
9031 opt.ads: cleanup of SPARK mode
9033 2011-08-02 Yannick Moy <moy@adacore.com>
9035 * cstand.adb (Create_Standard): sets Is_In_ALFA component of standard
9037 * einfo.adb, einfo.ads (Is_In_ALFA): add flag for all entities
9038 (Is_In_ALFA, Set_Is_In_ALFA): new subprograms to access flag Is_In_ALFA
9040 (Analyze_Object_Declaration): set Is_In_ALFA flag for objects
9041 (Constrain_Enumeration): set Is_In_ALFA flag for enumeration subtypes
9042 (Constrain_Integer): set Is_In_ALFA flag for integer subtypes
9043 (Enumeration_Type_Declaration): set Is_In_ALFA flag for enumeration
9045 (Set_Scalar_Range_For_Subtype): unset Is_In_ALFA flag for subtypes with
9047 * sem_ch6.adb (Analyze_Return_Type): unset Is_In_ALFA flag for
9048 functions whose return type is not in ALFA.
9049 (Analyze_Subprogram_Specification): set Is_In_ALFA flag for subprogram
9051 (Process_Formals): unset Is_In_ALFA flag for subprograms if a
9052 parameter's type is not in ALFA.
9053 * stand.ads (Standard_Type_Is_In_ALFA): array defines which standard
9056 2011-08-02 Ed Schonberg <schonberg@adacore.com>
9058 * sem_ch6 (Analyze_Expression_Function): treat the function as
9059 Inline_Always, and introduce a subprogram declaration for it when it is
9061 * inline.adb (Add_Inlined_Body): recognize bodies that come from
9062 expression functions, so that the back-end can determine whether they
9063 can in fact be inlined.
9064 * sem_util.adb (Is_Expression_Function): predicate to determine whether
9065 a function body comes from an expression function.
9067 2011-08-02 Gary Dismukes <dismukes@adacore.com>
9069 * sem_ch6.adb (Check_Conformance): Revise the check for nonconforming
9070 null exclusions to test Can_Never_Be_Null on the anonymous access types
9071 of the formals rather than testing the formals themselves. Exclude this
9072 check in cases where the Old_Formal is marked as a controlling formal,
9073 to avoid issuing spurious errors for bodies completing dispatching
9074 operations (due to the flag not getting set on controlling access
9075 formals in body specs).
9076 (Find_Corresponding_Spec): When checking full and subtype conformance of
9077 subprogram bodies in instances, pass Designated and E in that order, for
9078 consistency with the expected order of the formals (New_Id followed by
9081 2011-08-02 Robert Dewar <dewar@adacore.com>
9083 * sem_ch8.adb: Minor reformatting.
9085 2011-08-02 Ed Schonberg <schonberg@adacore.com>
9087 * sem_ch8.adb (Analyze_Subprogram_Renaming): new procedure
9088 Check_Class_Wide_Actual, to implement AI05-0071, on defaulted
9089 primitive operations of class-wide actuals.
9091 2011-08-02 Javier Miranda <miranda@adacore.com>
9093 * exp_atag.ads, exp_atag.adb
9094 (Build_Common_Dispatching_Select_Statements): Remove argument Loc
9095 since its value is implicitly passed in argument Typ.
9096 * exp_disp.adb (Make_Disp_Conditional_Select_Body,
9097 Make_Disp_Timed_Select_Body): Remove Loc in calls to routine
9098 Build_Common_Dispatching_Select_Statements.
9100 2011-08-02 Robert Dewar <dewar@adacore.com>
9102 * sem_ch3.adb, exp_atag.ads, get_scos.adb, get_scos.ads,
9103 exp_disp.adb, lib-xref.adb, lib-xref.ads: Update comments.
9106 2011-08-02 Robert Dewar <dewar@adacore.com>
9108 * sem_res.adb: Minor reformatting.
9109 * sem_prag.adb: Minor reformatting.
9111 2011-08-02 Javier Miranda <miranda@adacore.com>
9113 * exp_atag.adb, exp_atags.ads
9114 (Build_Common_Dispatching_Select_Statement): Replace argument DT_Ptr
9115 by the tagged type Entity. Required to use this routine in the VM
9116 targets since we do not have available the Tag entity in the VM
9119 (Expand_N_Subprogram_Body): Do not invoke Build_VM_TSDs if package
9120 Ada.Tags has not been previously loaded.
9122 (Expand_N_Package_Declaration, Expand_N_Package_Body): Do not invoke
9123 Build_VM_TSDs if package Ada.Tags has not been previously loaded.
9125 (Enclosing_Dynamic_Scope): Add missing support to handle the full
9126 view of enclosing scopes. Required to handle enclosing scopes that
9127 are synchronized types whose full view is a task type.
9129 (Build_VM_TSDs): Minor code improvement to avoid generating and
9130 analyzing lists with empty nodes.
9131 (Make_Disp_Asynchronous_Select_Body): Add support for VM targets.
9132 (Make_Disp_Conditional_Select_Body): Add support for VM targets.
9133 (Make_Disp_Get_Prim_Op_Kind): Add support for VM targets.
9134 (Make_Disp_Timed_Select_Body): Add support for VM targets.
9135 (Make_Select_Specific_Data_Table): Add support for VM targets.
9136 (Make_VM_TSD): Generate code to initialize the SSD structure of
9139 2011-08-02 Yannick Moy <moy@adacore.com>
9141 * lib-writ.adb (Write_ALI): when ALFA mode is set, write local
9142 cross-references section in ALI.
9143 * lib-xref.adb, lib-xref.ads (Xref_Entry): add components Sub
9144 (enclosing subprogram), Slc (location of Sub) and Sun (unit number of
9146 (Enclosing_Subprogram_Or_Package): new function to return the enclosing
9147 subprogram or package entity of a node
9148 (Is_Local_Reference_Type): new function returns True for references
9149 selected in local cross-references.
9150 (Lt): function extracted from Lt in Output_References
9151 (Write_Entity_Name): function extracted from Output_References
9152 (Generate_Definition): generate reference with type 'D' for definition
9153 of objects (object declaration and parameter specification), with
9154 appropriate locations and units, for use in local cross-references.
9155 (Generate_Reference): update fields Sub, Slc and Sun. Keep newly created
9156 references of type 'I' for initialization in object definition.
9157 (Output_References): move part of function Lt and procedure
9158 Write_Entity_Name outside of the body. Ignore references of types 'D'
9159 and 'I' introduced for local cross-references.
9160 (Output_Local_References): new procedure to output the local
9161 cross-references sections.
9162 (Lref_Entity_Status): new array defining whether an entity is a local
9163 * sem_ch3.adb (Analyze_Object_Declaration): call Generate_Reference
9164 with 'I' type when initialization expression is present.
9165 * get_scos.adb, get_scos.ads: Correct comments and typos
9167 2011-08-02 Javier Miranda <miranda@adacore.com>
9169 * exp_ch6.adb (Expand_N_Subprogram_Body): Enable generation of TSDs in
9171 * exp_ch7.adb (Expand_N_Package_Body): Enable generation of TSDs in
9173 * exp_disp.adb (Build_VM_TSDs): No action needed if the runtime has no
9176 2011-08-02 Vincent Celier <celier@adacore.com>
9178 * prj-nmsc.adb (File_Found): New components Excl_File and Excl_Line
9179 (No_Space_Img): New function
9180 (Find_Excluded_Sources): When reading from a file, record the file name
9181 and the line number for each excluded source.
9182 (Mark_Excluded_Sources): When reporting an error, if the excluded
9183 sources were read from a file, include file name and line number in
9186 2011-08-02 Ed Schonberg <schonberg@adacore.com>
9188 * sem_res.adb (Resolve_Call): implement rule in RM 12.5.1 (23.3/2).
9190 2011-08-02 Robert Dewar <dewar@adacore.com>
9192 * exp_ch7.adb exp_ch6.adb, exp_disp.adb: Minor reformatting
9194 2011-08-02 Javier Miranda <miranda@adacore.com>
9196 * exp_ch6.adb (Expand_N_Subprogram_Body): Temporarily restrict the
9197 generation of TSDs to the DOTNET compiler.
9198 * exp_ch7.adb (Expand_N_Package_Body): Temporarily restrict the
9199 generation of TSDs to the DOTNET compiler.
9201 2011-08-02 Javier Miranda <miranda@adacore.com>
9203 * exp_disp.ads (Build_VM_TSDs): Build the runtime Type Specific Data
9204 record of all the tagged types declared inside library level package
9205 declarations, library level package bodies or library level subprograms.
9206 * exp_disp.adb (Make_VM_TSD): New subprogram that builds the TSD
9207 associated with a given tagged type.
9208 (Build_VM_TSDs): New subprogram.
9209 * exp_ch6.adb (Expand_N_Subprogram_Body): Generate TSDs records of main
9210 compilation units that are subprograms.
9211 * exp_ch7.adb (Expand_N_Package_Body): Generate TSDs of main
9212 compilation units that are package bodies.
9213 (Expand_N_Package_Declaration): Generate TSDs of the main compilation
9214 units that are a package declaration or a package instantiation.
9215 * exp_intr.adb (Expand_Dispatching_Constructor_Call): Minor code
9216 reorganization to improve the error generated by the frontend when the
9217 function Ada.Tags.Secondary_Tag is not available.
9218 * rtsfind.ads (RE_Register_TSD): New runtime entity.
9219 * exp_ch4.adb (Expand_N_Type_Conversion): Minor code cleanup.
9221 2011-08-02 Javier Miranda <miranda@adacore.com>
9223 * exp_disp.adb (Make_DT): Generate call to Check_TSD in Ada 2005 mode.
9225 2011-08-02 Robert Dewar <dewar@adacore.com>
9227 * s-imenne.ads: Minor reformatting.
9229 2011-08-02 Robert Dewar <dewar@adacore.com>
9231 * a-stunau.ads: Add pragma Suppress_Initialization for Big_String
9232 * freeze.adb (Warn_Overlay): Don't warn if initialization suppressed
9233 * s-stalib.ads: Add pragma Suppress_Initialization for Big_String
9235 2011-08-02 Robert Dewar <dewar@adacore.com>
9237 * einfo.ads (Materialize_Entity): Document this is only for renamings
9238 * exp_ch3.adb (Expand_N_Object_Declaration): Make sure we generate
9239 required debug information in the case where we transform the object
9240 declaration into a renaming declaration.
9241 * exp_ch4.adb (Expand_Concatenate): Generate debug info for result
9243 * exp_dbug.ads (Debug_Renaming_Declaration): Document setting of
9246 2011-08-02 Robert Dewar <dewar@adacore.com>
9248 * einfo.ads, einfo.adb (Suppress_Initialization): Replaces
9249 Suppress_Init_Procs.
9250 * exp_ch3.adb, exp_disp.adb, freeze.adb: Use
9251 Suppress_Initialization/Initialization_Suppressed.
9252 * gnat_rm.texi: New documentation for pragma Suppress_Initialization
9253 * sem_aux.ads, sem_aux.adb (Initialization_Suppressed): New function
9254 * sem_dist.adb: Use Suppress_Initialization/Initialization_Suppressed
9255 * sem_prag.adb: New processing for pragma Suppress_Initialization.
9257 2011-08-02 Robert Dewar <dewar@adacore.com>
9259 * gnat_rm.texi, a-tags.ads, sem_prag.adb, sem_ch12.adb, exp_disp.adb:
9262 2011-08-02 Ed Schonberg <schonberg@adacore.com>
9264 * sem_prag.adb (Chain_PPC): Implement AI04-0230: null procedures can
9265 only have inheritable classwide pre/postconditions.
9267 2011-08-02 Javier Miranda <miranda@adacore.com>
9269 * a-tags.ads, a-tags.adb (Check_TSD): New subprogram.
9270 * rtsfind.ads (RE_Check_TSD): New runtime entity.
9271 * exp_disp.adb (Make_DT): Generate call to the new runtime routine that
9272 checks if the external tag of a type is the same as the external tag
9273 of some other declaration.
9275 2011-08-02 Thomas Quinot <quinot@adacore.com>
9277 * s-taskin.ads: Minor reformatting.
9279 2011-08-02 Emmanuel Briot <briot@adacore.com>
9281 * g-comlin.adb (Display_Help): swap the order in which it prints the
9282 short help and the general usage.
9284 2011-08-02 Ed Schonberg <schonberg@adacore.com>
9286 * sem_ch12.adb (Analyze_Generic_Subprogram_Declaration): copy properly
9287 the aspect declarations and attach them to the generic copy for
9288 subsequent analysis.
9289 (Analyze_Subprogram_Instantiation): copy explicitly the aspect
9290 declarations of the generic tree to the new subprogram declarations.
9291 * sem_attr.adb (Check_Precondition_Postcondition): recognize
9292 conditions that apply to a subprogram instance.
9294 2011-08-02 Robert Dewar <dewar@adacore.com>
9296 * gnat_rm.texi: Clarify doc on pragma Source_File_Name[_Project].
9298 2011-08-02 Ed Schonberg <schonberg@adacore.com>
9300 * sem_ch3.adb (Derived_Type_Declaration): When checking that a untagged
9301 private type with a tagged full view is not derived in the immediate
9302 scope of the partial view, (RM 7.3 (7)) use the scope of the base type.
9304 2011-08-02 Robert Dewar <dewar@adacore.com>
9306 * exp_ch4.adb: Minor reformatting.
9308 2011-08-02 Ed Schonberg <schonberg@adacore.com>
9310 * sem_ch5.adb (Analyze_Loop_Statement): If the iteration scheme is an
9311 Ada2012 iterator, the loop will be rewritten during expansion into a
9312 while loop with a cursor and an element declaration. Do not analyze the
9313 body in this case, because if the container is for indefinite types the
9314 actual subtype of the elements will only be determined when the cursor
9315 declaration is analyzed.
9317 2011-08-02 Arnaud Charlet <charlet@adacore.com>
9319 * sem_ch13.adb (Analyze_Attribute_Definition_Clause): Ignore
9320 size/alignment related attributes in CodePeer_Mode.
9322 2011-08-02 Gary Dismukes <dismukes@adacore.com>
9324 * sem_ch3.adb (Check_Ops_From_Incomplete_Type): Remove call to
9325 Prepend_Element, since this can result in the operation getting the
9326 wrong slot in the full type's dispatch table if the full type has
9327 inherited operations. The incomplete type's operation will get added
9328 to the proper position in the full type's primitives
9329 list later in Sem_Disp.Check_Operation_From_Incomplete_Type.
9330 (Process_Incomplete_Dependents): Add Is_Primitive test when checking for
9331 dispatching operations, since there are cases where nonprimitive
9332 subprograms can get added to the list of incomplete dependents (such
9333 as subprograms in nested packages).
9334 * sem_ch6.adb (Process_Formals): First, remove test for being in a
9335 private part when determining whether to add a primitive with a
9336 parameter of a tagged incomplete type to the Private_Dependents list.
9337 Such primitives can also occur in the visible part, and should not have
9338 been excluded from being private dependents.
9339 * sem_ch7.adb (Uninstall_Declarations): When checking the rule of
9340 RM05-3.10.1(9.3/2), test that a subprogram in the Private_Dependents
9341 list of a Taft-amendment incomplete type is a primitive before issuing
9342 an error that the full type must appear in the same unit. There are
9343 cases where nonprimitives can be in the list (such as subprograms in
9345 * sem_disp.adb (Derives_From): Use correct condition for checking that
9346 a formal's type is derived from the type of the corresponding formal in
9347 the parent subprogram (the condition was completely wrong). Add
9348 checking that was missing for controlling result types being derived
9349 from the result type of the parent operation.
9351 2011-08-02 Yannick Moy <moy@adacore.com>
9353 * errout.adb (First_Node): minor renaming
9354 * restrict.adb (Check_Formal_Restriction): put restriction warning on
9357 2011-08-02 Yannick Moy <moy@adacore.com>
9359 * sem_res.adb (Resolve_Logical_Op): ensure N is a binary operator
9360 before accessing operands.
9361 * sem_util.adb (Is_SPARK_Initialization_Expr): follow original nodes to
9362 decide whether an initialization expression respects SPARK rules, as
9363 the plain node is the expanded one. This allows for more valid warnings
9365 * gnat_rm.texi: Minor update.
9367 2011-08-02 Arnaud Charlet <charlet@adacore.com>
9369 * sem_ch13.adb (Analyze_Enumeration_Representation_Clause): Revert
9372 2011-08-02 Robert Dewar <dewar@adacore.com>
9374 * sem_ch3.adb, sem_ch4.adb: Minor reformatting.
9376 2011-08-02 Hristian Kirtchev <kirtchev@adacore.com>
9378 * exp_ch5.adb (Expand_Iterator_Loop): Reformatting. Wrap the original
9379 loop statements and the element renaming declaration with a block when
9380 the element type is controlled.
9382 2011-08-02 Yannick Moy <moy@adacore.com>
9384 * sinfo.ads: Minor formatting.
9386 2011-08-02 Ed Schonberg <schonberg@adacore.com>
9388 * sem_aggr.adb (Add_Association): if the association has a box and no
9389 expression, use the Sloc of the aggregate itself for the new
9391 * errout.adb (First_Node): Exclude nodes with no Sloc, and always use
9394 2011-08-02 Hristian Kirtchev <kirtchev@adacore.com>
9396 * exp_ch5.adb (Expand_Iterator_Loop): Code cleanup and refactoring.
9397 When a container is provided via a function call, generate a renaming
9398 of the function result. This avoids the creation of a transient scope
9399 and the premature finalization of the container.
9400 * exp_ch7.adb (Is_Container_Cursor): Removed.
9401 (Wrap_Transient_Declaration): Remove the supression of the finalization
9402 of the list controller when the declaration denotes a container cursor,
9405 2011-08-02 Yannick Moy <moy@adacore.com>
9407 * restrict.adb (Check_Formal_Restriction): only issue a warning if the
9408 node is from source, instead of the original node being from source.
9410 (Resolve_Array_Aggregate): refine the check for a static expression, to
9411 recognize also static ranges
9412 * sem_ch3.adb, sem_ch3.ads (Analyze_Component_Declaration,
9413 Array_Type_Declaration): postpone the test for the type being a subtype
9414 mark after the type has been resolved, so that component-selection and
9415 expanded-name are discriminated.
9416 (Make_Index, Process_Range_Expr_In_Decl): add a parameter In_Iter_Schm
9417 to distinguish the case of an iteration scheme, so that an error is
9418 issed on a non-static range in SPARK except in an iteration scheme.
9419 * sem_ch5.adb (Analyze_Iteration_Scheme): call Make_Index with
9420 In_Iter_Schm = True.
9421 * sem_ch6.adb (Analyze_Subprogram_Specification): refine the check for
9422 user-defined operators so that they are allowed in renaming
9424 (Find_Selected_Component): refine the check for prefixing of operators
9425 so that they are allowed in renaming. Move the checks for restrictions
9426 on selector name after analysis discriminated between
9427 component-selection and expanded-name.
9428 * sem_res.adb (Resolve_Op_Concat_Arg): do not issue a warning on
9429 concatenation argument of string type if it is static.
9430 * sem_util.adb, sem_util.ads
9431 (Check_Later_Vs_Basic_Declarations): add a new function
9432 Is_Later_Declarative_Item to decice which declarations are allowed as
9433 later items, in the two different modes Ada 83 and SPARK. In the SPARK
9434 mode, add that renamings are considered as later items.
9435 (Enclosing_Package): new function to return the enclosing package
9436 (Enter_Name): correct the rule for homonyms in SPARK
9437 (Is_SPARK_Initialization_Expr): default to returning True on nodes not
9438 from source (result of expansion) to avoid issuing wrong warnings.
9440 2011-08-02 Ed Schonberg <schonberg@adacore.com>
9442 * errout.adb: On anything but an expression First_Node returns its
9445 2011-08-02 Pascal Obry <obry@adacore.com>
9447 * prj-proc.adb, make.adb, makeutl.adb: Minor reformatting.
9449 2011-08-02 Hristian Kirtchev <kirtchev@adacore.com>
9451 * exp_ch5.adb (Expand_Iterator_Loop): Code cleanup and reorganization.
9452 Set the associated loop as the related expression of internally
9454 * exp_ch7.adb (Is_Container_Cursor): New routine.
9455 (Wrap_Transient_Declaration): Supress the finalization of the list
9456 controller when the declaration denotes a container cursor.
9458 2011-08-02 Yannick Moy <moy@adacore.com>
9460 * opt.ads (SPARK_Mode): update comment, SPARK_Mode only set through
9462 * par-ch3.adb (P_Delta_Constraint): remove check in SPARK mode that the
9463 expression is a simple expression. This check cannot be performed in
9464 the semantics, so just drop it.
9465 (P_Index_Or_Discriminant_Constraint): move check that the index or
9466 discriminant is a subtype mark to Analyze_Subtype_Declaration in the
9467 semantics. Other cases were previously checked in the semantics.
9468 * par-ch4.adb (P_Name): move checks that a selector name is not
9469 character literal or an operator symbol to Find_Selected_Component in
9471 * par-ch5.adb (Parse_Decls_Begin_End): move check that basic
9472 declarations are not placed after later declarations in a separate
9473 procedure in Sem_Util (possibly not the best choice?), to be used both
9474 during parsing, for Ada 83 mode, and during semantic analysis, for
9476 * par-endh.adb (Check_End): move check that end label is not missing
9477 to Process_End_Label in the semantics
9478 * par-prag.adb (Process_Restrictions_Or_Restriction_Warnings): remove
9479 the special case for SPARK restriction
9480 * par.adb: use and with Sem_Util, for use in Parse_Decls_Begin_End
9481 * restrict.adb, restrict.ads (Check_Formal_Restriction): add a
9482 parameter Force to issue the error message even on internal node (used
9483 for generated end label). Call Check_Restriction to check when an error
9484 must be issued. In SPARK mode, issue an error message even if the
9485 restriction is not set.
9486 (Check_Restriction): new procedure with an additional out parameter to
9487 inform the caller that a message has been issued
9488 * sem_aggr.adb: Minor modification of message
9489 * sem_attr.adb (Analyze_Attribute): call Check_Formal_Restriction
9490 instead of issuing an error message directly
9491 * sem_ch3.adb (Analyze_Declarations): move here the check that basic
9492 declarations are not placed after later declarations, by calling
9493 Check_Later_Vs_Basic_Declarations
9494 (Analyze_Subtype_Declaration): move here the check that an index or
9495 discriminant constraint must be a subtype mark. Change the check that
9496 a subtype of String must start at one so that it works on subtype marks.
9497 * sem_ch4.adb (Analyze_Call): move here the check that a named
9498 association cannot follow a positional one in a call
9499 * sem_ch5.adb (Check_Unreachable_Code): call Check_Formal_Restriction
9500 instead of issuing an error message directly
9501 * sem_ch8.adb (Find_Selected_Component): move here the check that a
9502 selector name is not a character literal or an operator symbol. Move
9503 here the check that the prefix of an expanded name cannot be a
9504 subprogram or a loop statement.
9505 * sem_util.adb, sem_util.ads (Check_Later_Vs_Basic_Declarations): new
9506 procedure called from parsing and semantics to check that basic
9507 declarations are not placed after later declarations
9508 (Process_End_Label): move here the check that end label is not missing
9510 2011-08-02 Arnaud Charlet <charlet@adacore.com>
9512 * sem_ch13.adb (Analyze_Enumeration_Representation_Clause): Ignore enum
9513 representation clause in codepeer mode, since it confuses CodePeer and
9514 does not bring useful info.
9516 2011-08-02 Ed Falis <falis@adacore.com>
9518 * init.c: initialize fp hw on MILS.
9520 2011-08-02 Ed Schonberg <schonberg@adacore.com>
9522 * errout.adb (First_Node): for bodies, return the node itself (small
9523 optimization). For other nodes, do not check source_unit if the node
9524 comes from Standard.
9526 2011-08-02 Robert Dewar <dewar@adacore.com>
9528 * exp_ch3.adb: Minor comment additions.
9529 * sem_ch13.adb: Minor reformatting.
9531 2011-08-02 Pascal Obry <obry@adacore.com>
9533 * make.adb, makeutl.adb: Removes some superfluous directory separator.
9535 2011-08-02 Robert Dewar <dewar@adacore.com>
9537 * sem_attr.adb: Minor reformatting.
9539 2011-08-02 Robert Dewar <dewar@adacore.com>
9541 * einfo.adb (Has_Default_Aspect): Replaces Has_Default_Value
9542 (Has_Default_Component_Value): Removed
9543 * einfo.ads Comment updates
9544 (Has_Default_Aspect): Replaces Has_Default_Value
9545 (Has_Default_Component_Value): Removed
9547 (Expand_N_Freeze_Entity): Handle Default[_Component]_Value aspects
9549 (Build_Array_Init_Proc): Handle Default_[Component_]Value aspects
9550 (Get_Simple_Init_Val): Handle Default_Value aspect
9551 (Needs_Simple_Initialization): Handle Default_Value aspect
9552 * exp_ch3.ads: Needs_Simple_Initialization
9553 * freeze.adb (Freeze_Entity): Handle Default_[Component_]Value aspect
9554 * par-prag.adb (Pragma_Default[_Component]Value) Removed
9556 (Analyze_Aspect_Specifications): Fix Default[_Component]_Value aspects
9557 * sem_prag.adb (Pragma_Default[_Component]Value) Removed
9558 * snames.ads-tmpl (Pragma_Default[_Component]Value) Removed
9560 2011-08-02 Ed Schonberg <schonberg@adacore.com>
9562 * sem_ch5.adb (Analyze_Iterator_Specification): use base type to locate
9563 package containing iteration primitives.
9564 exp_ch5.adb (Expand_Iterator_Loop): ditto.
9566 2011-08-02 Ed Schonberg <schonberg@adacore.com>
9568 * sem_ch5.adb (Analyze_Iteration_Scheme): For an Ada2012 iterator with
9569 "of", pre-analyze expression in case it is a function call with
9570 finalization actions that must be placed ahead of the loop.
9571 * exp_ch5.adb (Expand_Iterator_Loop): If condition_actions are present
9572 on an Ada2012 iterator, insert them ahead of the rewritten loop.
9574 2011-08-02 Geert Bosch <bosch@adacore.com>
9576 * cstand.adb (Create_Float_Types): Only consider C's long double for
9577 Long_Long_Float, in addition to double.
9579 2011-08-02 Robert Dewar <dewar@adacore.com>
9581 * sem_ch3.adb, sem_ch5.adb, sem_type.adb, switch-c.adb, switch-c.ads,
9582 sem_prag.adb, sem_util.adb, sem_util.ads, sem_res.adb, warnsw.ads,
9583 prepcomp.ads, cstand.adb, stand.ads, a-calfor.adb, s-stusta.adb:
9586 2011-08-02 Ed Schonberg <schonberg@adacore.com>
9588 * sem_attr.adb: handle properly 'Result when it is a prefix of an
9591 2011-08-02 Javier Miranda <miranda@adacore.com>
9593 * einfo.ads, einfo.adb
9594 (Original_Access_Type): Move this attribute to Node26 since there was
9595 an undocumented use of Node21 in E_Access_Subprogram_Type entities
9596 which causes conflicts and breaks the generation of the .NET compiler.
9597 (Interface_Name): Add missing documentation on JGNAT only uses of
9600 2011-08-02 Geert Bosch <bosch@adacore.com>
9602 * cstand.adb (Back_End_Float_Types): Use Elist instead of Nlist
9603 (Find_Back_End_Float_Type): Likewise
9604 (Create_Back_End_Float_Types): Likewise
9605 (Create_Float_Types): Likewise
9606 (Register_Float_Type): Likewise
9607 * sem_ch3.adb (Floating_Point_Type_Declaration): Use Elist instead of
9608 Nlist and split out type selection in new local Find_Base_Type function.
9609 * sem_prag.adb (Process_Import_Predefined_Type): Use Elist instead of
9611 * stand.ads (Predefined_Float_Types): Use Elist instead of Nlist
9613 2011-08-02 Robert Dewar <dewar@adacore.com>
9615 * inline.adb: Minor code reorganization (put Get_Code_Unit_Entity in
9617 * opt.ads: Minor comment change.
9618 * sem_ch12.adb: Minor code reorganization.
9620 2011-08-02 Gary Dismukes <dismukes@adacore.com>
9622 * sem_ch3.adb (Complete_Private_Subtype): Don't append the private
9623 subtype's list of rep items to the list on the full subtype in the case
9624 where the lists are the same.
9626 2011-08-02 Geert Bosch <bosch@adacore.com>
9628 * switch-c.adb (Free): New deallocation procedure to avoid implicitly
9629 using the one from System.Strings, which also deallocates all strings.
9631 2011-08-02 Geert Bosch <bosch@adacore.com>
9633 * gcc-interface/gigi.h, gcc-interface/misc.c (enumerate_modes): New
9635 * gcc-interface/Make-lang.in: Update dependencies.
9637 2011-08-02 Olivier Hainque <hainque@adacore.com>
9639 * gcc-interface/trans.c (Subprogram_Body_to_gnu): Set the function
9642 2011-08-02 Javier Miranda <miranda@adacore.com>
9644 * sem_ch3.adb (Check_Anonymous_Access_Components): Create extra formals
9645 associated with anonymous access to subprograms.
9647 2011-08-02 Geert Bosch <bosch@adacore.com>
9650 (Preprocessing_Symbol_Defs): Move from Prepcomp.Symbol_Definitions.
9651 (Preprocessing_Symbol_Last): Move from Prepcomp.Last_Definition.
9652 * prepcomp.adb (Symbol_Definitions, Last_Definition): Move to opt.ads
9653 (Add_Symbol_Definition): Move to switch-c.adb
9654 (Process_Command_Line_Symbol_Definitions): Adjust references to above.
9655 * prepcomp.ads: Remove dependency on Ada.Unchecked_Deallocation.
9656 (Add_Symbol_Definition): Move to switch-c.adb.
9657 * sem_ch13.adb, sem_prag.adb: Add dependency on Warnsw.
9659 (Set_Dot_Warning_Switch, Set_GNAT_Mode_Warnings, Set_Warning_Switch):
9661 * sem_warn.ads (Warn_On_Record_Holes, Warn_On_Overridden_Size,
9662 Set_Dot_Warning_Switch, Set_GNAT_Mode_Warnings, Set_Warning_Switch):
9664 * switch-c.adb: Replace dependency on Prepcomp and Sem_Warn by Warnsw.
9665 (Add_Symbol_Definition): Moved from Prepcomp.
9666 * switch-c.ads: Update copyright notice. Use String_List instead of
9667 Argument_List, removing dependency on System.OS_Lib.
9669 2011-08-02 Yannick Moy <moy@adacore.com>
9671 * sem_ch3.adb (Analyze_Object_Declaration): issue an error in formal
9672 mode on initialization expression which does not respect SPARK
9674 * sem_util.adb, sem_util.ads (Is_SPARK_Initialization_Expr): determines
9675 if the tree referenced by its argument represents an initialization
9676 expression in SPARK, suitable for initializing an object in an object
9679 2011-08-02 Javier Miranda <miranda@adacore.com>
9681 * exp_ch9.adb (Expand_Access_Protected_Subprogram_Type): Link the
9682 internally generated access to subprogram with its associated protected
9684 * einfo.ads, einfo.adb (Original_Access_Type): New attribute.
9686 2011-08-02 Geert Bosch <bosch@adacore.com>
9688 * cstand.adb (Register_Float_Type): Print information about type to
9689 register, if the Debug_Flag_Dot_B is set.
9690 * debug.adb (Debug_Flag_Dot_B): Document d.b debug option.
9691 * rtsfind.ads (RE_Max_Base_Digits): New run time entity.
9692 * sem_ch3.adb (Floating_Point_Type_Declaration): Allow declarations
9693 with a requested precision of more than Max_Digits digits and no more
9694 than Max_Base_Digits digits, if a range specification is present and the
9695 Predefined_Float_Types list has a suitable type to derive from.
9696 * sem_ch3.adb (Rep_Item_Too_Early): Avoid generating error in the
9697 case of type completion with pragma Import
9699 (Process_Import_Predefined_Type): Processing to complete a type
9700 with pragma Import. Currently supports floating point types only.
9701 (Set_Convention_From_Pragma): Do nothing without underlying type.
9702 (Process_Convention): Guard against absence of underlying type,
9703 which may happen when importing incomplete types.
9704 (Process_Import_Or_Interface): Handle case of importing predefined
9705 types. Tweak error message.
9707 2011-08-02 Eric Botcazou <ebotcazou@adacore.com>
9709 * inline.adb (Add_Inlined_Body): Adjust check for library-level inlined
9710 functions to previous change. Reorganize code slightly.
9712 2011-08-02 Geert Bosch <bosch@adacore.com>
9714 * back_end.ads (Register_Type_Proc): New call back procedure type for
9715 allowing the back end to provide information about available types.
9716 (Register_Back_End_Types): New procedure to register back end types.
9717 * back_end.adb (Register_Back_End_Types): Call the back end to enumerate
9719 * cstand.adb (Back_End_Float_Types): New list for floating point types
9720 supported by the back end.
9721 (Build_Float_Type): Add extra parameter for Float_Rep_Kind.
9722 (Copy_Float_Type): New procedure to make new copies of predefined types.
9723 (Register_Float_Type): New call back procedure to populate the BEFT list
9724 (Find_Back_End_Float_Type): New procedure to find a BEFT by name
9725 (Create_Back_End_Float_Types): New procedure to populate the BEFT list.
9726 (Create_Float_Types): New procedure to create entities for floating
9727 point types predefined in Standard, and put these and any remaining
9728 BEFTs on the Predefined_Float_Types list.
9729 * stand.ads (Predefined_Float_Types): New list for predefined floating
9730 point types that do not have declarations in package Standard.
9732 2011-08-02 Eric Botcazou <ebotcazou@adacore.com>
9734 * inline.adb (Get_Code_Unit_Entity): New local function. Returns the
9735 entity node for the unit containing the parameter.
9736 (Add_Inlined_Body): Use it to find the unit containing the subprogram.
9737 (Add_Inlined_Subprogram): Likewise.
9738 * gcc-interface/Make-lang.in: Update dependencies.
9740 2011-08-02 Thomas Quinot <quinot@adacore.com>
9742 * s-stusta.adb (Print): Make sure Pos is always initialized to a
9745 2011-08-02 Geert Bosch <bosch@adacore.com>
9747 * a-calfor.adb (Image): Simplify, removing unnecessary uses of 'Image.
9749 2011-08-02 Eric Botcazou <ebotcazou@adacore.com>
9751 * sem_type.adb (Covers): Move trivial case to the top and reuse the
9752 computed value of Base_Type.
9754 2011-08-02 Yannick Moy <moy@adacore.com>
9756 * restrict.adb (Check_Restriction): issue an error for any use of
9757 class-wide, even if the No_Dispatch restriction is not set.
9758 * sem_aggr.adb: Correct typos in comments and messages in formal mode
9759 * sem_ch3.adb (Process_Full_View): issue an error in formal mode is,
9760 when completing a private extension, the type named in the private part
9761 is not the same as that named in the visible part.
9762 * sem_res.adb (Resolve_Call): issue an error in formal mode on the use
9763 of an inherited primitive operations of a tagged type or type extension
9764 that returns the tagged type.
9765 * sem_util.adb, sem_util.ads (Is_Inherited_Operation_For_Type): new
9766 function which returns True for an implicit operation inherited by the
9767 derived type declaration for the argument type.
9768 (Is_SPARK_Object_Reference): move to appropriate place in alphabetic
9771 2011-08-02 Ed Schonberg <schonberg@adacore.com>
9773 * sem_ch5.adb (Pre_Analyze_Range): new procedure extracted from
9774 Process_Bounds, to perform analysis with expansion of a range or an
9775 expression that is the iteration scheme for a loop.
9776 (Analyze_Iterator_Specification): If domain of iteration is given by a
9777 function call with a controlled result, as is the case if call returns
9778 a predefined container, ensure that finalization actions are properly
9780 * par-ch3.adb: accept Ada2012 iterator form in P_Discrete_Range.
9782 2011-08-02 Javier Miranda <miranda@adacore.com>
9784 * sem_ch5.adb (Analyze_Iteration_Scheme): Fix typo.
9785 * gcc-interface/Make-lang.in: Update dependencies.
9787 2011-08-02 Javier Miranda <miranda@adacore.com>
9789 * sem_util.ads, sem_util.adb (Is_Variable): Add a new formal to
9790 determine if the analysis is performed using N or Original_Node (N).
9791 * exp_util.adb (Side_Effect_Free): Code cleanup since the new
9792 functionality of routine Is_Variable avoids code duplication.
9793 * checks.adb (Determine_Range): Handle temporaries generated by
9794 Remove_Side_Effects.
9796 2011-08-02 Javier Miranda <miranda@adacore.com>
9798 * exp_ch4.adb (Expand_N_Quantified_Expression): Force reanalysis and
9799 expansion of the condition. Required since the previous analysis was
9800 done with expansion disabled (see Resolve_Quantified_Expression) and
9801 hence checks were not inserted and record comparisons have not been
9804 2011-08-02 Ed Falis <falis@adacore.com>
9806 * s-taprop-vxworks.adb, s-intman-vxworks.adb, s-intman-vxworks.ads:
9809 2011-08-02 Bob Duff <duff@adacore.com>
9811 * opt.ads: Minor comment fix.
9813 2011-08-02 Bob Duff <duff@adacore.com>
9815 * sem_ch12.adb (Analyze_Package_Instantiation,
9816 Analyze_Subprogram_Instantiation): Turn off style checking while
9817 analyzing an instance. Whatever style checks that apply to the generic
9818 unit should apply, so it makes no sense to apply them in an instance.
9819 This was causing trouble when compiling an instance of a runtime
9820 unit that violates the -gnatyO switch.
9821 * stylesw.adb (Set_Style_Check_Options): "when 'O' =>" was missing from
9822 one of the two case statements, causing spurious errors.
9824 2011-08-02 Robert Dewar <dewar@adacore.com>
9826 * uname.adb: Minor reformatting.
9827 * gnatcmd.adb: Minor reformatting.
9828 * exp_attr.adb: Minor reformatting.
9830 2011-08-02 Ed Schonberg <schonberg@adacore.com>
9832 * exp_ch5.adb (Expand_N_Assignment_Statement): under restriction
9833 No_Dispatching_Calls, do not look for the Assign primitive, because
9834 predefined primitives are not created in this case.
9836 2011-08-02 Bob Duff <duff@adacore.com>
9838 * stylesw.ads: Minor comment fixes.
9840 2011-08-02 Robert Dewar <dewar@adacore.com>
9842 * freeze.adb (Add_To_Result): New procedure.
9844 2011-08-02 Jose Ruiz <ruiz@adacore.com>
9846 * exp_attr.adb (Find_Stream_Subprogram): When using a configurable run
9847 time, if the specific run-time routines for handling streams of strings
9848 are not available, use the default mechanism.
9850 2011-08-02 Arnaud Charlet <charlet@adacore.com>
9852 * s-regpat.ads: Fix typo.
9854 2011-08-02 Vincent Celier <celier@adacore.com>
9856 * prj-conf.adb (Get_Or_Create_Configuration_File): If On_Load_Config is
9857 not null, call it to create the in memory config project file without
9858 parsing an existing default config project file.
9860 2011-08-02 Eric Botcazou <ebotcazou@adacore.com>
9862 * atree.adb (Allocate_Initialize_Node): Remove useless temporaries.
9864 2011-08-02 Ed Schonberg <schonberg@adacore.com>
9866 * sem_elim.adb: an abstract subprogram does not need an eliminate
9867 pragma for its descendant to be eliminable.
9869 2011-08-02 Ed Falis <falis@adacore.com>
9871 * init.c: revert to handling before previous checkin for VxWorks
9872 * s-intman-vxworks.adb: delete unnecessary declarations related to
9873 using Ada interrupt facilities for handling signals.
9874 Delete Initialize_Interrupts. Use __gnat_install_handler instead.
9875 * s-intman-vxworks.ads: Import __gnat_install_handler as
9876 Initialize_Interrupts.
9877 * s-taprop-vxworks.adb: Delete Signal_Mask.
9878 (Abort_Handler): change construction of mask to unblock exception
9881 2011-08-02 Jerome Guitton <guitton@adacore.com>
9883 * a-except-2005.adb (Raise_From_Signal_Handler): Call
9884 Debug_Raise_Exception before propagation starts.
9886 2011-08-02 Eric Botcazou <ebotcazou@adacore.com>
9888 * exp_ch6.adb (Expand_Call): Guard restriction checks with a call
9889 to Restriction_Check_Required.
9890 * sem_ch3.adb (Analyze_Object_Declaration): Likewise.
9891 * sem_res.adb (Resolve_Call): Likewise.
9892 * sem_attr.adb (Check_Stream_Attribute): Likewise.
9894 2011-08-02 Bob Duff <duff@adacore.com>
9896 * stylesw.ads: Update comment.
9897 * style.adb: Minor: Use Error_Msg_NE instead of Error_Msg_N.
9898 * errout.ads: Remove obsolete comment.
9900 2011-08-02 Javier Miranda <miranda@adacore.com>
9902 * einfo.ads, einfo.adb (Is_Safe_To_Reevaluate): new function.
9903 (Set_Is_Safe_To_Reevaluate): new procedure.
9904 * sem_ch5.adb (Analyze_Assignment): Add one assertion to ensure that no
9905 assignment is allowed on safe-to-reevaluate variables.
9906 (Analyze_Iteration_Schine.Process_Bounds.One_Bound): Decorate the
9907 temporary created to remove side effects in expressions that use
9908 the secondary stack as safe-to-reevaluate.
9909 * exp_util.adb (Side_Effect_Free): Add missing code to handle well
9910 variables that are not true constants.
9912 2011-08-02 Robert Dewar <dewar@adacore.com>
9914 * sem_ch5.adb, sem_ch7.adb, einfo.ads, sem_util.adb, sem_util.ads,
9915 sem_res.adb, sem_ch6.adb: Minor reformatting.
9917 2011-08-02 Jerome Guitton <guitton@adacore.com>
9919 * a-except-2005.adb (Raise_Current_Excep): Remove obsolete dead code.
9921 2011-08-02 Ed Schonberg <schonberg@adacore.com>
9923 * sem_ch6.adb (New_Overloaded_Entity, Check_Overriding_Indicator): Do
9924 not set Overridden_Operation if subprogram is an initialization
9927 2011-08-02 Yannick Moy <moy@adacore.com>
9929 * par-ch6.adb: Correct obsolete name in comments
9930 * restrict.adb, restrict.ads (Check_Formal_Restriction): new function
9931 which takes two message arguments (existing function takes one), with
9932 second message used for continuation.
9933 * sem_ch5.adb (Analyze_Block_Statement): in formal mode, only reject
9934 block statements that originate from a source block statement, not
9935 generated block statements
9936 * sem_ch6.adb (Analyze_Function_Call): rename L into Actuals, for
9937 symmetry with procedure case
9938 * sem_ch7.adb (Check_One_Tagged_Type_Or_Extension_At_Most): new
9939 function to issue an error in formal mode if a package specification
9940 contains more than one tagged type or type extension.
9941 * sem_res.adb (Resolve_Actuals): in formal mode, check that actual
9942 parameters matching formals of tagged types are objects (or ancestor
9943 type conversions of objects), not general expressions. Issue an error
9944 on view conversions that are not involving ancestor conversion of an
9946 (Resolve_Type_Conversion): in formal mode, issue an error on the
9947 operand of an ancestor type conversion which is not an object
9948 * sem_util.adb, sem_util.ads (Find_Actual): extend the behavior of the
9949 procedure so that it works also for actuals of function calls
9950 (Is_Actual_Tagged_Parameter): new function which determines if its
9951 argument is an actual parameter of a formal of tagged type in a
9953 (Is_SPARK_Object_Reference): new function which determines if the tree
9954 referenced by its argument represents an object in SPARK
9956 2011-08-02 Robert Dewar <dewar@adacore.com>
9958 * sem_ch3.adb: Minor reformatting
9959 Minor comment addition
9960 Minor error msg text change
9962 2011-08-02 Javier Miranda <miranda@adacore.com>
9964 * sem_ch5.adb (Analyze_Iteration_Scheme.Uses_Secondary_Stack): New
9965 function. Used to be more precise when we generate a variable plus one
9966 assignment to remove side effects in the evaluation of the Bound
9968 (Analyze_Iteration_Scheme): Clean attribute analyzed in all the nodes
9969 of the bound expression to force its re-analysis and thus expand the
9970 associated transient scope (if required). Code cleanup replacing the
9971 previous code that declared the constant entity by an invocation to
9972 routine Force_Evaluation which centralizes this work in the frontend.
9974 2011-08-02 Robert Dewar <dewar@adacore.com>
9976 * einfo.adb (Is_Base_Type): Improve efficiency by using a flag table
9977 (Base_Type): Now uses improved Is_Base_Type function
9978 * einfo.ads (Base_Type): Inline this function
9980 2011-08-02 Robert Dewar <dewar@adacore.com>
9982 * sem_prag.adb (Analyze_Pragma): Defend against infinite recursion
9983 (Analyze_Aspect_Specifications): Fix Sloc values for constructed pragmas
9985 2011-08-02 Arnaud Charlet <charlet@adacore.com>
9987 * gcc-interface/Make-lang.in: Update dependencies.
9988 * gcc-interface/Makefile.in: Use s-inmapop-vxworks.adb for all VxWorks
9991 2011-08-02 Yannick Moy <moy@adacore.com>
9993 * par-ch3.adb (P_Delta_Constraint): issue an error in formal mode on
9994 non-simple expression used in delta constraint
9995 (P_Index_Or_Discriminant_Constraint): issue an error in formal mode on
9996 index constraint which is not a subtype mark
9997 * par.adb: With and use Restrict
9998 * sem_ch3.adb (Analyze_Component_Declaration): issue an error in formal
9999 mode on component type which is not a subtype mark and default
10000 expression on component
10001 (Analyze_Subtype_Declaration): issue an error in formal mode on subtype
10002 of string which does not have a lower index bound equal to 1
10003 (Array_Type_Declaration): issue an error in formal mode on index or
10004 component type which is not a subtype mark, and on aliased keyword on
10006 (Derived_Type_Declaration): issue an error in formal mode on interface,
10007 limited or abstract type
10008 (Record_Type_Declaration): issue an error in formal mode on interface
10009 (Record_Type_Definition): issue an error in formal mode on tagged types
10010 and type extensions not declared in the specification of a library unit
10011 package; on null non-tagged record; on variant part
10013 2011-08-02 Vincent Celier <celier@adacore.com>
10015 * prj-nmsc.adb (Check_Library_Attributes): Do not report Library_Dir
10016 not declared for qualified library project when Library_Name is not
10017 declared, but Library_Dir is.
10019 2011-08-02 Robert Dewar <dewar@adacore.com>
10021 * sem_ch13.adb (Analyze_Aspect_Specification): Fix slocs on generated
10022 pragmas (affects aspects [Component_]Default_Value
10023 (Check_Aspect_At_Freeze_Point): For Component_Default_Value, use
10024 component type for the resolution
10026 2011-08-02 Eric Botcazou <ebotcazou@adacore.com>
10028 * einfo.adb (Base_Type): Tune implementation for speed.
10030 2011-08-02 Robert Dewar <dewar@adacore.com>
10032 * freeze.adb: Minor reformatting.
10034 2011-08-02 Thomas Quinot <quinot@adacore.com>
10036 * scos.ads: Update comments.
10038 2011-08-02 Ed Schonberg <schonberg@adacore.com>
10040 * sem_ch3.adb (Build_Derived_Type): Inherit the convention from the
10041 base type, because the parent may be a subtype of a private type whose
10042 convention is established in a private part.
10044 2011-08-02 Hristian Kirtchev <kirtchev@adacore.com>
10046 * exp_ch6.adb (Expand_N_Extended_Return_Statement): Wrap the return
10047 statement in a block when the expansion of the return expression has
10048 created a finalization chain.
10049 * freeze.adb (Freeze_Expression): Alphabetize all choices associated
10050 with the parent node.
10051 Add N_Extended_Return_Statement to handle the case where a transient
10052 object declaration appears in the Return_Object_Declarations list of
10053 an extended return statement.
10055 2011-08-02 Matthew Gingell <gingell@adacore.com>
10057 * adaint.c (__gnat_is_symbolic_link_attr): Supress warning on possibly
10058 unused parameter 'name'.
10060 2011-08-02 Ed Schonberg <schonberg@adacore.com>
10062 * sem_elim.adb (Set_Eliminated): If the overridden operation is an
10063 inherited operation, check whether its alias, which is the source
10064 operastion that it renames, has been marked eliminated.
10066 2011-08-02 Javier Miranda <miranda@adacore.com>
10068 * exp_util.adb (Safe_Prefixed_Reference): Do not consider safe an
10069 in-mode parameter whose type is an access type since it can be used to
10070 modify its designated object. Enforce code that handles as safe an
10071 access type that is not access-to-constant but it is the result of a
10072 previous removal of side-effects.
10073 (Remove_Side_Effects): Minor code reorganization of cases which require
10074 no action. Done to incorporate documentation on new cases uncovered
10075 working in this ticket: no action needed if this routine was invoked
10076 too early and the nodes are not yet decorated.
10077 * sem_res.adb (Resolve_Slice): Minor code cleanup replacling two calls
10078 to routine Remove_Side_Effects by calls to Force_Evaluation since they
10079 were issued with actuals that are implicitly provided by
10082 2011-08-02 Robert Dewar <dewar@adacore.com>
10084 * sem_ch3.adb, sem_res.adb: Minor reformatting.
10086 2011-08-02 Yannick Moy <moy@adacore.com>
10088 * sem_attr.adb (Check_Formal_Restriction_On_Attribute): new procedure
10089 to issue an error in formal mode on attribute not supported in this mode
10090 (Analyze_Attribute): issue errors on standard attributes not supported
10092 * sem_ch3.adb (Modular_Type_Declaration): remove obsolete part of
10093 comment, and issue error in formal mode on modulus which is not a power
10095 (Process_Range_Expr_In_Decl): issue error in formal mode on non-static
10097 * sem_ch8.adb (Find_Type): issue error in formal mode on 'Base in
10099 * sem_res.adb (Resolve_Unary_Op): issue error in formal mode on unary
10100 operator on modular type (except 'not').
10102 2011-08-02 Robert Dewar <dewar@adacore.com>
10104 * gnat_rm.texi: Minor reformatting.
10106 2011-08-02 Arnaud Charlet <charlet@adacore.com>
10108 * s-osinte-linux.ads: Minor comment update and reformatting.
10109 * i-cexten.ads: Make this unit pure, as for its parent.
10110 Will allow its usage in more contexts if needed.
10112 2011-08-02 Robert Dewar <dewar@adacore.com>
10114 * s-utf_32.ads: Minor comment fix.
10116 2011-08-02 Ed Schonberg <schonberg@adacore.com>
10118 * sem_res.adb (Resolve_Actuals): if the subprogram is a primitive
10119 operation of a tagged synchronized type, handle the case where the
10120 controlling argument is overloaded.
10122 2011-08-02 Yannick Moy <moy@adacore.com>
10124 * gnat_rm.texi, opt.ads, sem_prag.adb, snames.ads-tmpl:
10125 Replace pragma SPARK_95 with pragma Restrictions (SPARK)
10126 * par-prag.adb (Process_Restrictions_Or_Restriction_Warnings): set
10127 SPARK mode and formal verification mode on processing SPARK restriction
10128 * s-rident.ads (Restriction_Id): add SPARK restriction in those not
10129 requiring consistency checking.
10131 2011-08-02 Robert Dewar <dewar@adacore.com>
10133 * sem_res.adb: Minor reformatting.
10135 2011-08-02 Robert Dewar <dewar@adacore.com>
10137 * a-cfdlli.ads, a-cfhase.ads, a-cforma.ads, a-cfhama.ads,
10138 a-cforse.ads: Remove unneeded with of Ada.Containers
10139 Remove commented out pragma Inline's
10140 Move specifications of new subprograms to the actual specs
10142 2011-08-02 Yannick Moy <moy@adacore.com>
10144 * a-cfdlli.ads, a-cfhase.ads, a-cforma.ads, a-cfhama.ads,
10145 a-cforse.ads: Update comments.
10147 2011-08-02 Ed Schonberg <schonberg@adacore.com>
10149 * sem_attr.adb: add attribute name when 'Result has the wrong prefix.
10151 2011-08-02 Robert Dewar <dewar@adacore.com>
10153 * a-cfdlli.ads, a-cfhase.ads, a-cforma.ads, a-cfhama.ads,
10154 a-cforse.ads, a-cofove.ads: Minor reformatting.
10156 2011-08-02 Claire Dross <dross@adacore.com>
10158 * a-cfdlli.ads, a-cfhase.ads, a-cforma.ads, a-cfhama.ads, a-cforse.ads,
10159 a-cofove.ads: Add comments.
10161 2011-08-02 Yannick Moy <moy@adacore.com>
10163 * gnat_rm.texi: Document formal containers.
10165 2011-08-02 Emmanuel Briot <briot@adacore.com>
10167 * g-comlin.adb (Goto_Section, Getopt): fix handling of "*" when there
10168 are empty sections.
10170 2011-08-02 Robert Dewar <dewar@adacore.com>
10172 * mlib-prj.adb, restrict.ads, sem_aggr.adb, sem_ch12.adb: Minor
10175 2011-08-02 Robert Dewar <dewar@adacore.com>
10177 * aspects.adb: New aspects Default_Value and Default_Component_Value
10178 New format of Aspect_Names table checks for omitted entries
10179 * aspects.ads: Remove mention of Aspect_Cancel and add documentation on
10180 handling of boolean aspects for derived types.
10181 New aspects Default_Value and Default_Component_Value
10182 New format of Aspect_Names table checks for omitted entries
10183 * einfo.ads, einfo.adb (Has_Default_Component_Value): New flag
10184 (Has_Default_Value): New flag
10185 (Has_Default_Component_Value): New flag
10186 (Has_Default_Value): New flag
10187 * par-ch13.adb (P_Aspect_Specifications): New format of Aspect_Names
10189 * par-prag.adb: New pragmas Default_Value and Default_Component_Value
10190 * sem_ch13.adb (Analyze_Aspect_Specifications): New aspects
10191 Default_Value and Default_Component_Value
10192 * sem_prag.adb: New pragmas Default_Value and Default_Component_Value
10193 New aspects Default_Value and Default_Component_Value
10194 * snames.ads-tmpl: New pragmas Default_Value and Default_Component_Value
10195 * sprint.adb: Print N_Aspect_Specification node when called from gdb
10197 2011-08-02 Vincent Celier <celier@adacore.com>
10199 * prj-nmsc.adb (Check_Library_Attributes): For virtual library project,
10200 inherit library kind.
10202 2011-08-02 Ed Schonberg <schonberg@adacore.com>
10204 * sem_res.adb: Add guards in calls to Matching_Static_Array_Bounds.
10205 Minor reformatting.
10207 2011-08-02 Robert Dewar <dewar@adacore.com>
10209 * i-cstrin.ads: Updates to make Interfaces.C.Strings match RM
10211 2011-08-02 Yannick Moy <moy@adacore.com>
10213 * sem_aggr.adb (Resolve_Aggregate): Fix thinko.
10215 2011-08-02 Robert Dewar <dewar@adacore.com>
10217 * impunit.adb: Add comment.
10219 2011-08-02 Yannick Moy <moy@adacore.com>
10221 * sem_aggr.adb (Check_Qualified_Aggregate): new procedure which checks
10222 qualification of aggregates in formal mode
10223 (Is_Top_Level_Aggregate): returns True for an aggregate not contained in
10225 (Resolve_Aggregate): complete the test that an aggregate is adequately
10226 qualified in formal mode
10228 2011-08-02 Pascal Obry <obry@adacore.com>
10230 * make.adb, bindgen.adb, gnatbind.adb: Minor reformatting.
10231 * mlib-prj.adb: Supress warning when compiling binder generated file.
10232 (Build_Library): Supress all warnings when compiling the binder
10235 2011-08-02 Yannick Moy <moy@adacore.com>
10237 * errout.adb, errout.ads (Check_Formal_Restriction): move procedure
10239 * restrict.adb, restrict.ads (Check_Formal_Restriction): ...to here
10240 * sem_aggr.adb, sem_ch5.adb, sem_util.adb:
10241 Add with/use clauses to make Check_Formal_Restriction visible
10243 2011-08-02 Ed Schonberg <schonberg@adacore.com>
10245 * sem_ch12.adb (Check_Generic_Actuals): handle properly actual
10246 in-parameters when type of the generic formal is private in the generic
10247 spec and non-private in the body.
10249 2011-08-02 Claire Dross <dross@adacore.com>
10251 * a-cfdlli.adb, a-cfdlli.ads, a-cfhase.adb, a-cfhase.ads, a-cfhama.adb,
10252 a-cfhama.ads, a-cforse.adb, a-cforse.ads, a-cforma.adb, a-cforma.ads,
10253 a-cofove.adb, a-cofove.ads: New files implementing formal containers.
10254 * impunit.adb, Makefile.rtl: Take new files into account.
10256 2011-08-02 Robert Dewar <dewar@adacore.com>
10258 * sem_aggr.adb, sem_ch3.adb, sem_ch5.adb, make.adb, sem_res.adb,
10259 sem_attr.adb, sem_ch6.adb, sem_ch8.adb: Minor reformatting.
10261 2011-08-02 Yannick Moy <moy@adacore.com>
10263 * sem_aggr.adb (Resolve_Aggregate): disable incorrectly placed check in
10265 * sem_util.adb (Matching_Static_Array_Bounds): proper detection of
10266 matching static array bounds, taking into account the special case of
10268 * sem_ch3.adb: Typo in comment.
10270 2011-08-02 Yannick Moy <moy@adacore.com>
10272 * errout.adb, errout.ads (Check_Formal_Restriction): new procedure
10273 which issues an error in formal mode if its argument node is originally
10275 * sem_ch3.adb (Analyze_Full_Type_Declaration): move test that a type
10276 has a discriminant specification so that it does not include the case
10278 (Derived_Type_Declaration): move here the test that a derived type has a
10279 discriminant specification
10280 * sem_aggr.adb (Resolve_Record_Aggregate): test the presence of the
10281 first element of a component association before accessing its choices
10282 (presence of component association is not enough)
10283 * exp_ch6.adb (Expand_N_Subprogram_Declaration): test if a subprogram
10284 declaration is a library item before accessing the next element in a
10285 list, as library items are not member of lists
10286 * sem_attr.adb, sem_ch11.adb, sem_ch4.adb, sem_ch5.adb, sem_ch6.adb,
10287 sem_ch8.adb, sem_ch9.adb, sem_res.adb, sem_util.adb: use
10288 Check_Formal_Restriction whenever possible.
10290 2011-08-02 Ed Schonberg <schonberg@adacore.com>
10292 * sem_ch3.adb (Find_Type_Of_Object): In ASIS mode, create an itype
10293 reference when needed.
10295 2011-08-02 Bob Duff <duff@adacore.com>
10297 * gnat_ugn.texi: Fix typo.
10299 2011-08-02 Vincent Celier <celier@adacore.com>
10301 * make.adb (Gnatmake): Use MLib.Tgt.Archive_Ext as the extension of
10302 archive file name. Do not use the full path name of archives for Open
10305 2011-08-02 Robert Dewar <dewar@adacore.com>
10307 * sem_ch12.adb, sem_ch11.adb: New calling sequence for
10308 Analyze_Aspect_Specifications
10310 (Analyze_Aspect_Specifications): New handling for boolean aspects
10311 * sem_ch13.ads (Analyze_Aspect_Specifications): New calling sequence
10312 * sem_ch3.adb, sem_ch6.adb, sem_ch7.adb, sem_ch9.adb: New calling
10313 sequence for Analyze_Aspect_Specifications
10314 * sem_prag.adb (Analyze_Pragma): Remove use of Aspect_Cancel entirely
10315 * sinfo.ads, sinfo.adb (Aspect_Cancel): Remove, no longer used
10317 2011-08-02 Robert Dewar <dewar@adacore.com>
10319 * freeze.adb (Freeze_Entity): Remove handling of delayed boolean
10320 aspects, since these no longer exist.
10322 2011-08-02 Robert Dewar <dewar@adacore.com>
10324 * par-ch13.adb (Aspect_Specifications_Present): Always return false on
10325 semicolon, do not try to see if there are aspects following it.
10326 * par-ch3.adb (P_Declarative_Items): Better message for unexpected
10329 2011-08-02 Robert Dewar <dewar@adacore.com>
10331 * sem_ch8.adb, aspects.ads: Minor reformatting.
10333 2011-08-02 Eric Botcazou <ebotcazou@adacore.com>
10335 * sem_ch13.ads (Analyze_Aspect_Specification): Add pragma Inline.
10336 * sem_ch13.adb (Analyze_Non_Null_Aspect_Specifications): New procedure
10338 (Analyze_Aspect_Specifications): ...here. Call above procedure.
10340 2011-08-02 Yannick Moy <moy@adacore.com>
10342 * exp_ch6.adb (Expand_N_Subprogram_Declaration): issue error in formal
10343 mode on subprogram declaration outside of package specification, unless
10344 it is followed by a pragma Import
10345 * sem_ch3.adb (Access_Definition, Access_Subprogram_Declaration,
10346 Access_Type_Declaration): issue error in formal mode on access type
10347 (Analyze_Incomplete_Type_Decl): issue error in formal mode on
10349 (Analyze_Object_Declaration): issue error in formal mode on object
10350 declaration which does not respect SPARK restrictions
10351 (Analyze_Subtype_Declaration): issue error in formal mode on subtype
10352 declaration which does not respect SPARK restrictions
10353 (Constrain_Decimal, Constrain_Float, Constrain_Ordinary_Fixed): issue
10354 error in formal mode on digits or delta constraint
10355 (Decimal_Fixed_Point_Type_Declaration): issue error in formal mode on
10356 decimal fixed point type
10357 (Derived_Type_Declaration): issue error in formal mode on derived type
10358 other than type extensions of tagged record types
10359 * sem_ch6.adb (Process_Formals): remove check in formal mode, redundant
10360 with check on access definition
10361 * sem_ch9.adb (Analyze_Protected_Definition): issue error in formal
10362 mode on protected definition.
10363 (Analyze_Task_Definition): issue error in formal mode on task definition
10365 2011-08-02 Robert Dewar <dewar@adacore.com>
10367 * make.adb, sem_ch8.adb, s-inmaop-vxworks.adb: Minor reformatting.
10369 2011-08-02 Javier Miranda <miranda@adacore.com>
10371 * sem_ch6.adb (Can_Override_Operator): New function.
10372 (Verify_Overriding_Indicator): Add missing code to check overriding
10373 indicator in operators. Fixes regression.
10374 (Check_Overriding_Indicator): Minor reformating after replacing the
10375 code that evaluates if the subprogram can override an operator by
10376 invocations to the above new function.
10378 (Write_Field26_Name): Add missing code to ensure that, following
10379 the documentation in einfo.ads, this field is not shown as attribute
10380 "Static_Initialization" on non-dispatching functions.
10382 2011-08-02 Jose Ruiz <ruiz@adacore.com>
10384 * sem_res.adb (Resolve_Call): A call to
10385 Ada.Real_Time.Timing_Events.Set_Handler violates restriction
10386 No_Relative_Delay (AI-0211) only when it sets a relative timing event,
10387 i.e., when the second parameter is of type Time_Span.
10389 2011-08-02 Vincent Celier <celier@adacore.com>
10391 * make.adb (Gnatmake): use <library dir>/lib<library name>.a to link
10392 with an archive instead of -L<library dir> -l<library name>.
10394 2011-08-02 Ed Schonberg <schonberg@adacore.com>
10396 * sem_ch8.adb (Analyze_Use_Type): If the clause is being re-analyzed,
10397 mark the base types In_Use in addition to making the operations
10400 2011-08-02 Ed Falis <falis@adacore.com>
10402 * init.c: add and setup __gnat_signal_mask for the exception signals
10403 * s-inmaop-vxworks.adb: new file.
10404 * s-intman-vxworks.adb: remove unnecessary initializations and
10406 * s-intman-vxworks.ads: remove unnecessary variable
10407 * s-taprop-vxworks.adb: simplify signal initialization
10409 2011-08-02 Robert Dewar <dewar@adacore.com>
10411 * sem_ch8.adb: Minor code reorganization, comment updates.
10413 2011-08-02 Robert Dewar <dewar@adacore.com>
10415 * sem_res.adb (Matching_Static_Array_Bounds): Moved to Sem_Util
10416 * sem_util.ads, sem_util.adb (Matching_Static_Array_Bounds): Moved
10418 (Matching_Static_Array_Bounds): Use Is_Ok_Static_Expression
10419 (Matching_Static_Array_Bounds): Moved here from Sem_Res
10421 2011-08-02 Ed Schonberg <schonberg@adacore.com>
10423 * atree.h, atree.ads, atree.adb: New subprograms to manipulate Elist5.
10424 * par_ch8.adb (P_Use_Type): initialize Used_Operations for node.
10425 * sinfo.ads, sinfo.adb (Used_Operations): new attribute of
10426 use_type_clauses, to handle more efficiently use_type and use_all_type
10428 * sem_ch8.adb: Rewrite Use_One_Type and End_Use_Type to handle the
10429 Ada2012 Use_All_Type clause.
10430 (Use_Class_Wide_Operations): new procedure.
10432 2011-08-02 Robert Dewar <dewar@adacore.com>
10434 * exp_util.adb, par-ch10.adb, par-ch6.adb, sem.adb, sem_ch6.adb,
10435 sem_ch6.ads, sinfo.adb, sinfo.ads, sprint.adb: Change parameterized
10436 expression to expression function.
10438 2011-08-02 Ed Schonberg <schonberg@adacore.com>
10440 * sem_ch4.adb: transform simple Ada2012 membership into equality only
10441 if types are compatible.
10443 2011-08-02 Yannick Moy <moy@adacore.com>
10445 * sem_res.adb (Matching_Static_Array_Bounds): new function which
10446 returns True if its argument array types have same dimension and same
10447 static bounds at each index.
10448 (Resolve_Actuals): issue an error in formal mode on actuals passed as
10449 OUT or IN OUT paramaters which are not view conversions in SPARK.
10450 (Resolve_Arithmetic_Op): issue an error in formal mode on
10451 multiplication or division with operands of fixed point types which are
10452 not qualified or explicitly converted.
10453 (Resolve_Comparison_Op): issue an error in formal mode on comparisons of
10454 Boolean or array type (except String) operands.
10455 (Resolve_Equality_Op): issue an error in formal mode on equality
10456 operators for array types other than String with non-matching static
10458 (Resolve_Logical_Op): issue an error in formal mode on logical operators
10459 for array types with non-matching static bounds. Factorize the code in
10460 Matching_Static_Array_Bounds.
10461 (Resolve_Qualified_Expression): issue an error in formal mode on
10462 qualified expressions for array types with non-matching static bounds.
10463 (Resolve_Type_Conversion): issue an error in formal mode on type
10464 conversion for array types with non-matching static bounds
10466 2011-08-02 Robert Dewar <dewar@adacore.com>
10468 * par-ch10.adb: Minor code reorganization (use Nkind_In).
10470 2011-08-02 Ed Schonberg <schonberg@adacore.com>
10472 * par-ch9.adb: save location of entry for proper error message.
10474 2011-08-02 Javier Miranda <miranda@adacore.com>
10476 * sem_type.ads, sem_type.adb (Is_Ancestor): Addition of a new formal
10477 (Use_Full_View) which permits this routine to climb through the
10478 ancestors using the full-view of private parents.
10479 * sem_util.adb (Collect_Interfaces_Info, Implements_Interface): Set
10480 Use_Full_View to true in calls to Is_Ancestor.
10481 * sem_disp.adb (Override_Dispatching_Operation): Set Use_Full_View to
10482 true in call to Is_Ancestor.
10483 * exp_ch3.adb (Build_Offset_To_Top_Functions, Initialize_Tag): Set
10484 Use_Full_View to true in call to Is_Ancestor.
10485 * exp_ch7.adb (Controller_Component): Set Use_Full_View to true in
10486 call to Is_Ancestor.
10487 * exp_ch4.adb (Expand_N_Type_Conversion, Tagged_Membership): Set
10488 Use_Full_View to true in calls to Is_Ancestor.
10489 * exp_disp.adb (Expand_Interface_Actuals, Make_Secondary_DT, Make_DT,
10490 Make_Select_Specific_Data_Table, Register_Primitive,
10491 Set_All_DT_Position): Set Use_Full_View to true in calls to Is_Ancestor.
10492 * exp_intr.adb (Expand_Dispatching_Constructor_Call): Set Use_Full_View
10493 to true in call to Is_Ancestor.
10494 * exp_util.adb (Find_Interface_ADT, Find_Interface_Tag): Set
10495 Use_Full_View to true in calls to Is_Ancestor.
10497 (Write_Call_Info): Set Use_Full_View to true in call to Is_Ancestor.
10498 (Write_Type_Info): Set Use_Full_View to true in call to Is_Ancestor.
10500 2011-08-02 Robert Dewar <dewar@adacore.com>
10502 * gnat_rm.texi: Minor reformatting.
10503 * sem_prag.adb: Minor reformatting.
10505 2011-08-02 Tristan Gingold <gingold@adacore.com>
10507 * vms_data.ads: Add VMS qualifier for -gnateP.
10509 2011-08-02 Robert Dewar <dewar@adacore.com>
10511 * par-ch13.adb (P_Aspect_Specification): New meaning of Decl = Empty
10512 * par-ch7.adb (P_Package): Proper placement of aspects for package
10513 decl/instantiation.
10514 * par-endh.adb (Check_End): Ad Is_Sloc parameter
10515 (End_Statements): Add Is_Sloc parameterr
10516 * par.adb (P_Aspect_Specification): New meaning of Decl = Empty
10517 (Check_End): Ad Is_Sloc parameter
10518 (End_Statements): Add Is_Sloc parameterr
10520 2011-08-02 Vincent Celier <celier@adacore.com>
10522 * ug_words: Add VMS qualifier equivalent to -gnateP:
10523 /SYMBOL_PREPROCESSING.
10525 2011-08-02 Jose Ruiz <ruiz@adacore.com>
10527 * gnat-style.texi: For hexadecimal numeric literals the typical
10528 grouping of digits is 4 to represent 2 bytes.
10529 A procedure spec which is split into several lines is indented two
10532 2011-08-02 Yannick Moy <moy@adacore.com>
10534 * exp_aggr.adb (Is_Others_Aggregate): move function to other unit.
10535 * sem_aggr.adb, sem_aggr.ads (Is_Others_Aggregate): move function here
10536 (Resolve_Aggregate): issue errors in formal modes when aggregate is not
10538 (Resolve_Array_Aggregate): issue errors in formal modes on non-static
10539 choice in array aggregate
10540 (Resolve_Extension_Aggregate): issue errors in formal modes on subtype
10542 (Resolve_Record_Aggregate): issue errors in formal modes on mixed
10543 positional and named aggregate for record, or others in record
10544 aggregate, or multiple choice in record aggregate
10545 * sem_res.adb (Resolve_Logical_Op): issue errors in formal mode when
10546 array operands to logical operations AND, OR and XOR do not have the
10547 same static lower and higher bounds
10548 * sem_ch5.adb, sinfo.ads: Correct typos in comments
10550 2011-08-01 Robert Dewar <dewar@adacore.com>
10552 * sem_util.ads, sem_util.adb, sem_ch6.adb (Last_Source_Statement):
10553 Replaces Last_Source_Node_In_Sequence.
10554 * err_vars.ads (Error_Msg_Lang): 16 is OK, don't need 4K
10555 * errout.adb (Set_Error_Msg_Lang): Takes arg with no parens, but stores
10556 parens and blank in string (this was inconsistently implemented).
10558 (Set_Error_Msg_Lang): Takes arg with no parens, but stores parens and
10559 blank in string (this was inconsistently implemented).
10561 (Set_Global_Switches): Set formal mode switches appropriately
10562 * opt.ads, opt.adb: Formal mode is now global switches, more consistent
10564 (Analyze_Pragma, case SPARK_95): Set opt switches appropriately and
10565 call Set_Error_Msg_Lang to set "spark" as language name.
10566 * par.adb: Remove unnecessary call to set formal language for errout
10567 * sem_prag.adb (P_Pragma, case SPARK_95): Set opt switches
10568 appropriately and call Set_Error_Msg_Lang to set "spark" as language
10570 * sem_ch4.adb (Analyze_Concatenation_Operand): remove procedure and
10571 calls to it, moved after resolution so that types are known
10572 * sem_res.adb (Resolve_Op_Concat): issue an error in formal mode if
10573 result of concatenation is not of type String
10574 (Resolve_Op_Concat_Arg): issue an error in formal mode if an operand of
10575 concatenation is not properly restricted
10576 * gnat_rm.texi: Add doc on pragma Spark_95.
10577 * gcc-interface/Makefile.in: Remove obsolete target pairs for
10578 Interfaces.C.* on VMS. Remove s-parame-vms-restrict.ads.
10579 * gcc-interface/Make-lang.in: Update dependencies.
10581 2011-08-01 Javier Miranda <miranda@adacore.com>
10583 * sem_disp.adb (Override_Dispatching_Operation): Enforce strictness of
10584 condition that detects if the overridden operation must replace an
10587 2011-08-01 Javier Miranda <miranda@adacore.com>
10589 * exp_ch4.adb (Expand_N_Case_Expression): Propagate to the expanded
10590 code declarations inserted by Insert_Actions in each alternative of the
10591 N_Case_Expression node.
10593 2011-08-01 Robert Dewar <dewar@adacore.com>
10595 * sem_ch6.adb: Minor code reorganization.
10596 * sem_util.adb: Minor reformatting.
10598 2011-08-01 Pascal Obry <obry@adacore.com>
10600 * prj-env.adb: Remove <prefix>/lib/gpr/<target> project search path.
10601 * gnat_ugn.texi: Add documentation for VERSIONINFO Windows resource.
10603 2011-08-01 Yannick Moy <moy@adacore.com>
10605 * par-ch4.adb (P_Name): issue a syntax error in SPARK mode on character
10606 literal or operator symbol which is prefixed
10607 * sem_attr.adb (Analyze_Access_Attribute): issue an error in formal
10608 mode on access attributes.
10609 * sem_ch4.adb (Analyze_Concatenation_Operand): new procedure to check
10610 that concatenation operands are properly restricted in formal mode
10611 (Analyze_Concatenation, Analyze_Concatenation_Rest): call new procedure
10612 Analyze_Concatenation_Operand. Issue an error in formal mode if the
10613 result of the concatenation has a type different from String.
10614 (Analyze_Conditional_Expression, Analyze_Explicit_Dereference,
10615 Analyze_Quantified_Expression, Analyze_Slice,
10616 Analyze_Null): issue an error in formal mode on unsupported constructs
10618 (Analyze_Block_Statement): only issue error on source block statement
10619 * sem_util.ads, sem_util.adb (Last_Source_Node_In_Sequence): new
10620 function which returns the last node in a list of nodes for which
10621 Comes_From_Source returns True, if any
10622 * sem_ch6.adb (Check_Missing_Return): minor refactoring to use
10623 Last_Source_Node_In_Sequence
10624 * sem_ch8.adb (Analyze_Exception_Renaming, Analyze_Generic_Renaming,
10625 Analyze_Object_Renaming, Analyze_Use_Package): issue an error in formal
10626 mode on unsupported constructs
10627 * sem_ch9.adb Do not return after issuing error in formal mode, as the
10628 rest of the actions may be needed later on since the error is marked as
10630 * sinfo.ads: Typos in comments.
10632 2011-08-01 Pascal Obry <obry@adacore.com>
10634 * projects.texi: Minor editing.
10636 2011-08-01 Yannick Moy <moy@adacore.com>
10638 * err_vars.ads (Error_Msg_Lang, Error_Msg_Langlen): new variables for
10639 insertion character ~~
10640 * errout.ads, errout.adb (Formal_Error_Msg_...): remove procedures
10641 (Set_Error_Msg_Lang): new procedure which fixes the language for use
10642 with insertion character ~~
10643 (Set_Msg_Text): treat insertion character ~~
10644 * par-ch4.adb, par-ch5.adb, par-endh.adb, sem_attr.adb, sem_ch11.adb,
10645 sem_ch3.adb, sem_ch5.adb, sem_ch9.adb, sem_util.adb: Replace calls to
10646 Formal_Error_Msg_... procedures by equivalent Error_Msg_...
10647 procedures. Favor calls to Error_Msg_F(E) over Error_Msg_N(E). Make
10648 errors related to the formal language restriction not serious
10649 (insertion character |).
10650 * par.adb (Par): set formal language for error messages if needed
10651 * sem_ch6.adb (Check_Missing_Return): take into account possible
10652 generated statements at the end of the function
10653 * snames.ads-tmpl (Name_SPARK_95, Pragma_SPARK_95): new variable and
10654 enumeration value to define a new pragma SPARK_95
10655 * opt.ads, opt.adb (SPARK_Version_Type, SPARK_Version_Default,
10656 SPARK_Version): new type and variables to store the SPARK version
10658 (SPARK_Mode): return True when SPARK_Version is set
10659 * par-prag.adb: Correct indentation
10660 (Prag): take Pragma_SPARK_95 into account
10661 * sem_prag.adb (Set_Mechanism_Value, Sig_Flags): take Pragma_SPARK_95
10664 2011-08-01 Robert Dewar <dewar@adacore.com>
10666 * sem_ch3.adb, sem_ch3.ads, sem_ch5.adb, prj-part.adb, par-ch4.adb,
10667 sem_util.adb, sem_ch4.adb, sem_ch6.adb, sem_ch6.ads, sem_ch8.adb,
10668 sem_ch8.ads, sem_ch13.ads, par-ch5.adb, prj-env.ads: Minor reformatting
10670 2011-08-01 Pascal Obry <obry@adacore.com>
10672 * prj-part.ads, prj-part.adb (Parse): Add Target_Name parameter. Pass
10673 Target_Name to Get_Path call.
10674 (Parse_Single_Project): Likewise.
10675 (Post_Parse_Context_Clause): Likewise.
10676 * prj-env.ads, prj-env.adb (Find_Project): Add Target_Name parameter.
10677 Call Initialise_Project_Path with the proper Target_Name.
10678 (Initialize_Project_Path): Add <gnat_root>/<target_name>/lib/gnat
10680 (Get_Path): Add Target_Name parameter. Call Initialise_Project_Path
10681 with the proper Target_Name.
10682 * prj-conf.adb (Get_Or_Create_Configuration_File): Pass Target_Name to
10683 Part.Parse routine.
10684 (Parse_Project_And_Apply_Config): Likewise.
10685 * prj-makr.adb (Initialize): Pass empty Target_Name to Parse routine.
10686 This is fine as this part of the code is supporting only native
10688 * prj-pars.adb (Parse): Pass empty Target_Name to Parse routine. This
10689 is fine as this part of the code is supporting only native compilation.
10691 2011-08-01 Yannick Moy <moy@adacore.com>
10693 * sem_util.adb (Enter_Name): issue error in formal mode on declaration
10694 of homonym, unless the homonym is one of the cases allowed in SPARK
10695 * par-ch5.adb (Parse_Decls_Begin_End): issue error in SPARK mode for
10696 package declaration occurring after a body.
10698 2011-08-01 Robert Dewar <dewar@adacore.com>
10700 * checks.adb, exp_ch4.adb: Minor reformatting.
10702 2011-08-01 Javier Miranda <miranda@adacore.com>
10704 * einfo.ads (Access_Disp_Table): Fix documentation.
10705 (Dispatch_Table_Wrappers): Fix documentation.
10707 2011-08-01 Pascal Obry <obry@adacore.com>
10709 * prj-env.adb, prj-env.ads: Minor reformatting.
10711 2011-08-01 Yannick Moy <moy@adacore.com>
10713 * sem_util.ads, sem_util.adb, par.adb, par_util.adb
10714 (Formal_Error_Msg, Formal_Error_Msg_N, Formal_Error_Msg_SP): move
10715 procedures out of these packages.
10716 * errout.ads, errout.adb
10717 (Formal_Error_Msg, Formal_Error_Msg_N, Formal_Error_Msg_SP): move
10718 procedures in of this package
10719 (Formal_Error_Msg_NE): new procedure for wrapper on Error_Msg_NE
10720 * par-ch5.adb (Parse_Decls_Begin_End): issue syntax error in SPARK mode
10721 on misplaced later vs initial declarations, like in Ada 83
10722 * sem_attr.adb (Processing for Analyze_Attribute): issue error in
10723 formal mode on attribute of private type whose full type declaration
10725 * sem_ch3.adb (Analyze_Declarations): issue error in formal mode on a
10726 package declaration inside a package specification
10727 (Analyze_Full_Type_Declaration): issue error in formal mode on
10728 controlled type or discriminant type
10729 * sem_ch6.adb (Analyze_Subprogram_Specification): only issue error on
10730 user-defined operator means that it should come from the source
10731 (New_Overloaded_Entity): issue error in formal mode on overloaded
10733 * sem_ch6.ads, sem_ch13.ads: typos in comments.
10735 2011-08-01 Thomas Quinot <quinot@adacore.com>
10737 * atree.adb: Minor reformatting.
10738 * checks.adb: Minor reformatting.
10740 2011-08-01 Vincent Celier <celier@adacore.com>
10742 * s-parame-vms-ia64.ads: Fix typo in comment
10744 * s-parame-vms-restrict.ads: Removed, unused.
10746 2011-08-01 Javier Miranda <miranda@adacore.com>
10749 (Is_Variable_Size_Array): Remove local subprogram Is_Constant_Bound.
10751 (Constrain_Index): Remove side effects in the evaluation of the bounds.
10752 * sem_ch3.ads, sem_ch3.adb
10753 (Is_Constant_Bound): New extended version of the subprogram that was
10754 previously located inside function Exp_Ch3.Is_Variable_Size_Array.
10755 Moved here since it is shared by routines of sem_ch3 and exp_ch3.
10756 * sem_aux.ads (Constant_Value): Fix typo in comment.
10757 * checks.adb (Generate_Index_Checks): New implementation which, for
10758 array objects with constant bounds, generates the runtime check
10759 referencing the bounds of the array type. For other cases this routine
10760 provides its previous behavior obtaining such values from the array
10762 * sem_res.adb (Set_Slice_Subtype): Link a copied range subtree with its
10764 * atree.adb (New_Copy): Reset flag Is_Overloaded in the new copy since
10765 we cannot have semantic interpretations of the new node.
10767 2011-08-01 Ed Schonberg <schonberg@adacore.com>
10769 * sem_ch6.adb (Fully_Conformant_Expressions): handle quantified
10772 2011-08-01 Arnaud Charlet <charlet@adacore.com>
10774 * sem_ch8.adb: Minor code editing.
10775 * s-vxwext.adb: Remove trailing space.
10776 * freeze.adb, freeze.ads, errout.ads, erroutc.adb: Fix GPLv3 header for
10777 consistency with other files.
10779 2011-08-01 Thomas Quinot <quinot@adacore.com>
10781 * s-auxdec.ads, s-auxdec-vms_64.ads: Minor reformatting.
10783 2011-08-01 Ed Schonberg <schonberg@adacore.com>
10785 * par-ch10.adb: reject parameterized expressions as compilation unit.
10786 * sem_ch4.adb: handle properly conditional expression with overloaded
10787 then_clause and no else_clause.
10789 2011-08-01 Tristan Gingold <gingold@adacore.com>
10791 * s-parame-vms-alpha.ads, s-parame-vms-ia64.ads: Redeclare C_Address
10792 like done by System.Aux_DEC.
10793 * env.c (__gnat_setenv) [VMS]: Put logicals into LNM$PROCESS table.
10795 2011-08-01 Yannick Moy <moy@adacore.com>
10797 * par-endh.adb (Check_End): issue a syntax error in SPARK mode for
10798 missing label at end of declaration (subprogram or package)
10799 * par-ch4.adb (P_Name): issue a syntax error in SPARK mode for mixing
10800 of positional and named parameter association
10801 * par.adb, par-util.adb (Formal_Error_Msg_SP): new wrapper on
10802 Error_Msg_SP which adds a prefix to the error message giving the name
10803 of the formal language analyzed
10804 * sem_ch6.adb (Analyze_Return_Type): issue an error in formal mode for
10805 access result type in subprogram, unconstrained array as result type,.
10806 (Analyze_Subprogram_Declaration): issue an error in formal mode for null
10808 * sem_ch8.adb: Code clean up.
10810 2011-08-01 Javier Miranda <miranda@adacore.com>
10812 * sem_ch7.adb (Uninstall_Declarations): Remove useless code.
10813 * einfo.ads (Access_Disp_Table): Fix documentation.
10814 (Dispatch_Table_Wrappers): Fix documentation.
10815 * einfo.adb (Access_Disp_Table, Dispatch_Table_Wrappers,
10816 Set_Access_Disp_Table, Set_Dispatch_Table_Wrappers): Fix the assertions
10817 to enforce the documentation of this attribute.
10818 (Set_Is_Interface): Cleanup the assertion.
10819 * exp_ch4.adb (Expand_Allocator_Expression, Tagged_Membership): Locate
10820 the Underlying_Type entity before reading attribute Access_Disp_Table.
10821 * exp_disp.adb (Expand_Dispatching_Call, Expand_Interface_Conversion):
10822 Locate the Underlying_Type before reading attribute Access_Disp_Table.
10823 * exp_aggr.adb (Build_Array_Aggr_Code, Build_Record_Aggr_Code): Locate
10824 the Underlying_Type entity before reading attribute Access_Disp_Table.
10825 * exp_ch3.adb (Build_Record_Init_Proc, Expand_N_Object_Declaration):
10826 Locate the Underlying_Type entity before reading attribute
10829 2011-08-01 Ed Schonberg <schonberg@adacore.com>
10831 * s-poosiz.ads: Additional overriding indicators.
10833 2011-08-01 Yannick Moy <moy@adacore.com>
10835 * sem_ch5.adb (Analyze_Exit_Statement): add return after error in
10837 (Analyze_Iteration_Scheme): issue error in formal mode when loop
10838 parameter specification does not include a subtype mark.
10839 * sem_ch6.adb (Analyze_Abstract_Subprogram_Declaration): issue error in
10840 formal mode on abstract subprogram.
10841 (Analyze_Subprogram_Specification): issue error in formal mode on
10842 user-defined operator.
10843 (Process_Formals): issue error in formal mode on access parameter and
10844 default expression.
10845 * sem_ch9.adb (Analyze_Abort_Statement,
10846 Analyze_Accept_Statement, Analyze_Asynchronous_Select,
10847 Analyze_Conditional_Entry_Call, Analyze_Delay_Relative,
10848 Analyze_Delay_Until, Analyze_Entry_Call_Alternative,
10849 Analyze_Requeue, Analyze_Selective_Accept,
10850 Analyze_Timed_Entry_Call): issue error in formal mode on such constructs
10851 * sem_ch11.adb (Analyze_Raise_Statement, Analyze_Raise_xxx_Error):
10852 issue error in formal mode on user-defined raise statement.
10854 2011-08-01 Thomas Quinot <quinot@adacore.com>
10856 * sem_ch6.adb (Enter_Overloaded_Entity): Do not warn about a
10857 declaration being hidden when overriding an implicit inherited
10859 * par-ch10.adb (P_Compilation_Unit): In syntax check only mode
10860 (-gnats), do not complain about a source file that contains only a
10863 2011-08-01 Ed Schonberg <schonberg@adacore.com>
10865 * sem_ch5.adb (Analyze_Iterator_Scheme): Do not overwrite type of loop
10866 variable if already set.
10868 2011-08-01 Arnaud Charlet <charlet@adacore.com>
10870 * g-socket-dummy.adb, s-osinte-linux.ads, g-socket-dummy.ads,
10871 g-debuti.adb, g-tasloc.adb, g-debuti.ads, g-tasloc.ads,
10872 s-osinte-hpux.ads, g-sercom.adb, g-soliop-solaris.ads, g-sercom.ads,
10873 g-sptain.ads, g-curexc.ads, s-tasloc.adb, s-tasloc.ads, s-tataat.adb,
10874 g-ctrl_c.adb, a-reatim.adb, s-tataat.ads, g-dirope.adb, g-ctrl_c.ads,
10875 g-dirope.ads, g-boubuf.adb, g-calend.adb, g-boubuf.ads, g-souinf.ads,
10876 g-table.adb, g-bytswa-x86.adb, g-wispch.adb, g-io.adb, g-table.ads,
10877 g-wispch.ads, g-io.ads, g-memdum.adb, g-memdum.ads, g-busorg.adb,
10878 g-busorg.ads, g-regpat.adb, g-sothco-dummy.adb, g-encstr.adb,
10879 g-regpat.ads, g-sothco-dummy.ads, s-osinte-aix.ads, g-encstr.ads,
10880 g-sercom-mingw.adb, s-mastop-vms.adb, g-diopit.adb, g-diopit.ads,
10881 s-vxwext.adb, g-dyntab.adb, g-dyntab.ads, g-crc32.adb,
10882 g-sercom-linux.adb, g-crc32.ads, s-regpat.adb, g-flocon.ads,
10883 s-regpat.ads, g-stheme.adb, g-sestin.ads, s-taspri-posix-noaltstack.ads,
10884 g-soliop.ads, s-inmaop-posix.adb, g-locfil.ads, g-enblsp-vms-alpha.adb,
10885 g-socthi-dummy.adb, g-socthi-dummy.ads, gnat.ads, g-moreex.adb,
10886 g-moreex.ads, g-dynhta.adb, g-dynhta.ads, g-deutst.ads, g-htable.adb,
10887 g-cgicoo.adb, g-htable.ads, g-cgicoo.ads, a-interr.adb,
10888 g-socthi-vms.adb, g-socthi-vms.ads, g-hesora.adb, g-bubsor.adb,
10889 g-hesora.ads, g-bubsor.ads, g-md5.adb, g-md5.ads, s-intman-irix.adb,
10890 s-htable.adb, s-osinte-vms.adb, s-htable.ads, s-osinte-vms.ads,
10891 s-taprob.adb, g-bytswa.adb, g-bytswa.ads, s-osinte-solaris-posix.ads,
10892 a-suenco.adb, g-comver.adb, g-comver.ads, g-exctra.adb,
10893 s-osinte-solaris.adb, g-exctra.ads, s-osinte-irix.ads,
10894 s-osinte-solaris.ads, a-caldel-vms.adb, g-socthi-vxworks.adb,
10895 g-expect.adb, g-socthi-vxworks.ads, g-expect.ads, g-comlin.ads,
10896 g-heasor.adb, g-heasor.ads, g-traceb.adb, g-traceb.ads, g-decstr.adb,
10897 g-spipat.adb, g-decstr.ads, g-spipat.ads, s-mastop-tru64.adb,
10898 g-except.ads, g-thread.adb, g-hesorg.adb, g-thread.ads, g-hesorg.ads,
10899 g-expect-vms.adb, a-stuten.ads, g-spchge.adb, g-spchge.ads,
10900 g-u3spch.adb, g-u3spch.ads, g-spitbo.adb, g-spitbo.ads,
10901 s-osinte-dummy.ads, s-osinte-posix.adb, g-pehage.adb, g-pehage.ads,
10902 s-gloloc-mingw.adb, g-sha1.ads, s-traceb-hpux.adb,
10903 g-trasym-unimplemented.adb, g-trasym-unimplemented.ads, g-io_aux.adb,
10904 g-regexp.adb, g-io_aux.ads, g-socthi-mingw.adb, g-regexp.ads,
10905 s-osinte-hpux-dce.adb, g-socthi-mingw.ads, g-cgi.adb,
10906 s-osinte-hpux-dce.ads, g-cgi.ads, g-byorma.adb, g-boumai.ads,
10907 g-byorma.ads, a-caldel.adb, s-regexp.adb, s-regexp.ads,
10908 g-soliop-mingw.ads, g-sptavs.ads, s-osinte-tru64.ads, g-speche.adb,
10909 g-speche.ads, g-socthi.adb, g-stsifd-sockets.adb, g-socthi.ads,
10910 s-osinte-darwin.ads, i-vxwork-x86.ads, g-awk.adb, i-vxwork.ads,
10911 g-awk.ads, g-zspche.adb, g-zspche.ads, g-socket.adb, g-sptabo.ads,
10912 g-socket.ads, g-semaph.adb, g-semaph.ads, s-taspri-posix.ads,
10913 g-enblsp-vms-ia64.adb, g-cgideb.adb, g-cgideb.ads, g-sothco.adb,
10914 s-osinte-freebsd.ads, g-sothco.ads, g-catiio.adb, g-casuti.adb,
10915 g-catiio.ads, g-casuti.ads, g-trasym.adb, g-trasym.ads, s-casuti.adb,
10916 g-os_lib.adb, s-traceb-mastop.adb, g-busora.adb, s-interr-dummy.adb,
10917 g-busora.ads, g-enutst.ads, s-os_lib.adb, a-tasatt.adb,
10918 s-osinte-mingw.ads: Update to GPLv3 run-time license.
10919 Use GNAT instead of GNARL.
10921 2011-08-01 Bob Duff <duff@adacore.com>
10923 * a-cdlili.ads, a-cihama.ads, a-coinve.ads, a-ciorse.ads, a-coorma.ads,
10924 a-cidlli.ads, a-ciormu.ads, a-cihase.ads, a-cohama.ads, a-coorse.ads,
10925 a-ciorma.ads, a-coormu.ads, a-convec.ads, a-cohase.ads: Minor
10928 2011-08-01 Yannick Moy <moy@adacore.com>
10930 * debug.adb (d.D) reverve flag for the SPARK mode
10931 (d.E) reverve flag for SPARK generation mode
10932 (d.F) reverve flag for Why generation mode
10933 * opt.ads, opt.adb (ALFA_Mode, ALFA_Through_SPARK_Mode,
10934 ALFA_Through_Why_Mode, Formal_Verification_Mode, SPARK_Mode): New
10935 functions which return True when the corresponding modes are set
10936 (Formal_Language): return "spark" or "alfa" when in formal verification
10938 * sem_util.ads, sem_util.adb (Formal_Error_Msg): new wrapper on
10939 Error_Msg to prefix the error message with a tag giving the formal
10941 (Formal_Error_Msg_N): new wrapper on Error_Msg_N to prefix the error
10942 message with a tag giving the formal language
10943 * sem_ch5.adb (Analyze_Block_Statement): issue error in formal mode on
10945 (Analyze_Case_Statement): issue error in formal mode on case statement
10946 with a single "others" case alternative
10947 (Analyze_Exit_Statement): issue errors in formal mode on exit
10948 statements which do not respect SPARK restrictions
10949 (Analyze_Goto_Statement): issue error in formal mode on goto statement
10950 (Check_Unreachable_Code): always issue an error (not a warning) in
10951 formal mode on unreachable code (concerns both code after an infinite
10952 loop and after an unconditional jump, both not allowed in SPARK)
10953 * sem_ch6.adb (Analyze_Return_Statement): add call to
10954 Set_Return_Present for a procedure containing a return statement
10955 (already done for functions in Analyze_Function_Return)
10956 (Analyze_Function_Return): issue error in formal mode on extended
10957 return or if return is not last statement in function
10958 (Check_Missing_Return): issue error in formal mode if function does
10959 not end with return or if procedure contains a return
10960 * sem_ch8.ads, sem_ch8.adb (Has_Loop_In_Inner_Open_Scopes): new
10961 function to detect if there is an inner scope of its parameter S which
10964 2011-08-01 Thomas Quinot <quinot@adacore.com>
10966 * sem_ch6.ads: Minor reformatting.
10968 2011-08-01 Javier Miranda <miranda@adacore.com>
10970 * sem_util.adb (Abstract_Interface_List): Complete condition when
10971 processing private type declarations to avoid reading unavailable
10973 (Is_Synchronized_Tagged_Type): Complete condition when processing
10974 private extension declaration nodes to avoid reading unavailable
10977 2011-08-01 Thomas Quinot <quinot@adacore.com>
10979 * sem_ch3.adb: Minor reformatting.
10981 2011-08-01 Thomas Quinot <quinot@adacore.com>
10983 * s-parame-ae653.ads, s-parame-vms-alpha.ads, s-parame-hpux.ads,
10984 i-cpoint.adb, i-cstrin.adb, i-cpoint.ads, i-cstrin.ads,
10985 s-parame-vms-ia64.ads, s-parame.ads, i-c.ads, s-parame-vxworks.ads,
10986 s-parame-vms-restrict.ads: Remove duplicated Interfaces.C.* packages
10987 for VMS, instead parametrize the common implementation with
10988 System.Parameters declarations.
10990 2011-08-01 Eric Botcazou <ebotcazou@adacore.com>
10992 * gnat_rm.texi: Document limitation of Pragma No_Strict_Aliasing.
10994 2011-08-01 Tristan Gingold <gingold@adacore.com>
10996 * seh_init.c: Fix SEH handler installation on win64.
10998 2011-08-01 Ed Schonberg <schonberg@adacore.com>
11000 * sem_ch3.adb (Access_Subprogram_Declaration): in Asis mode, prevent
11001 double analysis of an anonymous access to subprogram, because it can
11002 lead to improper sharing of profiles and a back-end crash.
11004 2011-08-01 Robert Dewar <dewar@adacore.com>
11006 * make.adb, sem_ch4.adb: Minor reformatting.
11007 * gcc-interface/Make-lang.in: Update dependencies.
11008 * sem_util.adb, exp_ch5.adb: Minor reformatting.
11010 2011-08-01 Arnaud Charlet <charlet@adacore.com>
11012 * gnat_rm.texi: Fix definition of Long_Integer.
11014 2011-08-01 Ed Schonberg <schonberg@adacore.com>
11016 * exp_aggr.adb: check limit size of static aggregate unconditionally,
11017 to prevent storage exhaustion.
11018 * exp_ch7.adb (Clean_Simple_Protected_Objects): if the scope being
11019 finalized is a function body, insert the cleanup code before the final
11020 return statement, to prevent spurious warnings.
11021 * s-pooglo.ads: add overriding indicator.
11023 2011-08-01 Ed Schonberg <schonberg@adacore.com>
11025 * sem_ch4.adb (Operator_Check): improve error message when both a
11026 with_clause and a use_clause are needed to make operator usage legal.
11027 * sem_util.ads, sem_util.adb (Unit_Is_Visible): new predicate to
11028 determine whether a compilation unit is visible within an other,
11029 either through a with_clause in the current unit, or a with_clause in
11030 its library unit or one one of its parents.
11032 2011-08-01 Ed Schonberg <schonberg@adacore.com>
11034 * exp_ch5.adb (Expand_N_Iterator_Loop): handle properly an iterator
11035 over an arbitrary expression of an array or container type.
11036 * lib-xref.adb: clarify comment.
11038 2011-08-01 Bob Duff <duff@adacore.com>
11040 * einfo.ads: Minor reformatting.
11041 * debug.adb: Minor comment improvement.
11043 2011-08-01 Javier Miranda <miranda@adacore.com>
11045 * sem_ch4.adb (Try_Object_Operation): For class-wide subprograms do not
11046 consider hidden subprograms as valid candidates.
11048 2011-08-01 Arnaud Charlet <charlet@adacore.com>
11050 * make.adb (Compile): Strip -mxxx switches in CodePeer mode.
11052 2011-08-01 Vasiliy Fofanov <fofanov@adacore.com>
11054 * gnat_ugn.texi: Fix typo.
11056 2011-08-01 Robert Dewar <dewar@adacore.com>
11058 * i-cstrin.adb, sem_util.adb, exp_ch11.adb, sem_ch8.adb,
11059 lib-xref.adb: Minor reformatting
11061 2011-08-01 Gary Dismukes <dismukes@adacore.com>
11063 * exp_ch6.adb (Expand_N_Extended_Return_Statement): Replace test of
11064 when to generate a call to Move_Final_List.
11065 (Has_Controlled_Parts): Remove this function.
11067 2011-08-01 Geert Bosch <bosch@adacore.com>
11069 * par-ch3.adb (P_Discrete_Choice_List): Improve error message for extra
11070 "," in choice list.
11072 2011-08-01 Thomas Quinot <quinot@adacore.com>
11074 * exp_ch11.adb (Expand_N_Raise_Statement): Mark N_Raise_xxx_Error for
11075 explicit raise of a predefined exception as Comes_From_Source if the
11076 original N_Raise_Statement comes from source.
11078 2011-08-01 Robert Dewar <dewar@adacore.com>
11080 * sinfo.ads: Add comment.
11081 * sem_ch6.adb: Minor reformatting.
11083 2011-08-01 Robert Dewar <dewar@adacore.com>
11085 * freeze.adb (Freeze_Entity): Refine check for bad component size
11086 clause to avoid rejecting confirming clause when atomic/aliased present.
11088 2011-08-01 Ed Schonberg <schonberg@adacore.com>
11090 * sem_ch8.adb (Find_Direct_Name, Analyze_Expanded_Name): use Is_LHS to
11091 better determine whether an entity reference is a write.
11092 * sem_util.adb (Is_LHS): refine predicate to handle assignment to a
11094 * lib-xref.adb (Output_References): Do no suppress a read reference at
11095 the same location as an immediately preceeding modify-reference, to
11096 handle properly in-out actuals.
11098 2011-08-01 Tristan Gingold <gingold@adacore.com>
11100 * env.c (__gnat_setenv) [VMS]: Refine previous change.
11102 2011-08-01 Quentin Ochem <ochem@adacore.com>
11104 * i-cstrin.adb (New_String): Changed implementation, now uses only the
11105 heap to compute the result.
11107 2011-08-01 Robert Dewar <dewar@adacore.com>
11109 * atree.ads: Minor reformatting.
11111 2011-08-01 Emmanuel Briot <briot@adacore.com>
11113 * g-expect.adb (Get_Command_Output): Fix memory leak.
11115 2011-08-01 Geert Bosch <bosch@adacore.com>
11117 * cstand.adb (P_Float_Type): New procedure to print the definition of
11118 predefined fpt types.
11119 (P_Mixed_Name): New procedure to print a name using mixed case
11120 (Print_Standard): Use P_Float_Type for printing floating point types
11121 * einfo.adb (Machine_Emax_Value): Add preliminary support for quad
11122 precision IEEE float.
11124 2011-08-01 Thomas Quinot <quinot@adacore.com>
11126 * sem_ch3.adb: Minor reformatting.
11128 2011-08-01 Ed Schonberg <schonberg@adacore.com>
11130 * sem_ch6.adb (Analyze_Parameterized_Expression): If the expression is
11131 the completion of a generic function, insert the new body rather than
11132 rewriting the original.
11134 2011-08-01 Yannick Moy <moy@adacore.com>
11136 * sinfo.ads, errout.ads: Typos in comments.
11138 2011-08-01 Robert Dewar <dewar@adacore.com>
11140 * par-endh.adb: Minor reformatting.
11142 2011-08-01 Robert Dewar <dewar@adacore.com>
11144 * aspects.ads, aspects.adb: Add aspects for library unit pragmas
11145 (Pre_Post_Aspects): New subtype.
11146 * par-ch12.adb (P_Generic): New syntax for aspects in packages
11147 * par-ch13.adb (P_Aspect_Specifications): Add Semicolon parameter
11148 * par-ch7.adb (P_Package): Remove Decl parameter
11149 (P_Package): Handle new syntax for aspects (before IS)
11150 * par-ch9.adb (P_Protected_Definition): Remove Decl parameter, handle
11152 (P_Task_Definition): Remove Decl parameter, handle new aspect syntax
11153 * par.adb (P_Aspect_Specifications): Add Semicolon parameter
11154 (P_Package): Remove Decl parameter
11155 * sem_ch13.adb (Analyze_Aspect_Specifications): Handle library unit
11157 * sem_ch7.adb (Analyze_Package_Declaration): Analyze new format aspect
11159 * sem_util.ads, sem_util.adb (Static_Boolean): New function
11160 * sinfo.ads: Document new syntax for aspects in packages etc.
11161 * sprint.adb: Handle new syntax of aspects before IS in package
11163 2011-08-01 Thomas Quinot <quinot@adacore.com>
11165 * atree.ads: Minor reformatting.
11166 * sem_prag.adb: Minor reformatting.
11168 2011-08-01 Robert Dewar <dewar@adacore.com>
11170 * exp_util.adb (Insert_Actions): Fix error in handling Actions for
11171 case expr alternative.
11173 2011-08-01 Ed Schonberg <schonberg@adacore.com>
11175 * sem_ch12.adb: Fix typo.
11177 2011-08-01 Geert Bosch <bosch@adacore.com>
11179 * sem_prag.adb (Check_No_Link_Name): New procedure.
11180 (Process_Import_Or_Interface): Use Check_No_Link_Name.
11181 * cstand.adb (Create_Standard): Use Esize (Standard_Long_Long_Float)
11182 instead of Standard_Long_Long_Float_Size global. Preparation for
11183 eventual removal of per type constants.
11184 * exp_util.ads (Get_Stream_Size): New function returning the stream
11185 size value of subtype E.
11186 * exp_util.adb (Get_Stream_Size): Implement new function.
11187 * exp_strm.adb (Build_Elementary_Input_Call): Use Get_Stream_Size
11189 * exp_attr.adb (Attribute_Stream_Size): Use Get_Stream_Size
11191 (Machine_Mantissa_Value): Handle 128-bit quad precision IEEE floats
11193 2011-08-01 Geert Bosch <bosch@adacore.com>
11195 * cstand.adb: Fix comments.
11196 * sem_prag.adb (Analyze_Pragma): Use List_Length instead of explicit
11197 count of arguments.
11199 2011-08-01 Robert Dewar <dewar@adacore.com>
11201 * exp_ch4.adb, sem_cat.adb: Minor reformatting.
11203 2011-08-01 Geert Bosch <bosch@adacore.com>
11205 * atree.ads: Fix comment.
11207 2011-08-01 Robert Dewar <dewar@adacore.com>
11209 * aspects.ads, aspects.adb (Aspect_Names): Moved from body to spec.
11210 * par-ch13.adb (P_Aspect_Specifications): Check misspelled aspect name.
11211 * par.adb: Add with for Namet.Sp.
11212 * par-tchk.adb: Minor reformatting.
11214 2011-08-01 Vincent Celier <celier@adacore.com>
11216 * mlib-tgt-specific-vms-alpha.adb, mlib-tgt-specific-vms-ia64.adb
11217 (Build_Dynamic_Library): Use new function Init_Proc_Name to get the name
11218 of the init procedure of a SAL.
11219 * mlib-tgt-vms_common.ads, mlib-tgt-vms_common.adb (Init_Proc_Name):
11222 2011-08-01 Thomas Quinot <quinot@adacore.com>
11224 * exp_ch4.adb, s-tasini.ads, sem_attr.adb, s-soflin.ads: Minor
11227 2011-08-01 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
11229 * adaint.c (__gnat_file_time_name_attr): Get rid of warning.
11231 2011-08-01 Thomas Quinot <quinot@adacore.com>
11233 * sem_util.adb, sem_util.ads (Has_Overriding_Initialize): Make function
11234 conformant with its spec (return True only for types that have
11235 an overriding Initialize primitive operation that prevents them from
11236 having preelaborable initialization).
11237 * sem_cat.adb (Validate_Object_Declaration): Fix test for preelaborable
11238 initialization for controlled types in Ada 2005 or later mode.
11240 2011-08-01 Robert Dewar <dewar@adacore.com>
11242 * aspects.ads, aspects.adb: Add aspect Type_Invariant, Precondition,
11244 (Same_Aspect): New function.
11245 * sem_ch13.adb (Analyze_Aspect_Specifications): Add aspect
11246 Type_Invariant, Precondition, Postcondition.
11247 * snames.ads-tmpl: Add Name_Type_Invariant.
11249 2011-08-01 Robert Dewar <dewar@adacore.com>
11251 * freeze.adb (Freeze_Entity): Don't call Check_Aspect_At_Freeze_Point
11253 (Freeze_All_Ent): Fix error in handling inherited aspects.
11254 * sem_ch13.adb (Analyze_Aspect_Specifications): Skip aspect that is
11255 already analyzed, but don't skip entire processing of a declaration,
11256 that's wrong in some cases of declarations being rewritten.
11257 (Analyze_Aspect_Specification): Set Is_Delayed_Aspect in aspects.
11258 Don't delay for integer, string literals
11259 Treat predicates in usual manner for delay, remove special case code,
11261 (Analyze_Freeze_Entity): Make call to Check_Aspect_At_Freeze_Point
11262 (Build_Predicate_Function): Update saved expression in aspect
11263 (Build_Invariant_Procedure): Update saved expression in aspect
11264 * exp_ch4.adb (Expand_N_Selected_Component): Only do the optimization
11265 of replacement of discriminant references if the reference is simple.
11267 2011-08-01 Robert Dewar <dewar@adacore.com>
11269 * aspects.ads, aspects.adb: Add Static_Predicate and Dynamic_Predicate.
11270 * sem_ch13.adb (Analyze_Aspect_Specification): Add processing for
11271 Static_Predicate and Dynamic_Predicate.
11272 (Build_Predicate_Function): Add processing for Static_Predicate
11273 and Dynamic_Predicate.
11274 * sinfo.ads, sinfo.adb (From_Dynamic_Predicate): New flag
11275 (From_Static_Predicate): New flag
11276 * snames.ads-tmpl: Add Name_Static_Predicate and Name_Dynamic_Predicate
11278 2011-08-01 Robert Dewar <dewar@adacore.com>
11280 * usage.adb: Documentation cleanup for Ada version modes in usage.
11281 * expander.adb: Minor reformatting.
11283 2011-08-01 Robert Dewar <dewar@adacore.com>
11285 * atree.ads: Minor comment fix.
11286 * a-stwifi.adb, a-stzfix.adb, a-strfix.adb, a-ztexio.ads, a-textio.ads,
11287 a-witeio.ads, sem_prag.adb: Minor reformatting.
11289 2011-08-01 Doug Rupp <rupp@adacore.com>
11291 * env.c (__gnat_setenv) [VMS]: Force 32bit on item list structure
11292 pointers. Use descrip.h header file for convenience. Add some
11295 2011-08-01 Robert Dewar <dewar@adacore.com>
11297 * freeze.adb (Freeze_Entity): Call Check_Aspect_At_Freeze_Point
11298 (Freeze_All): Call Check_Aspect_At_End_Of_Declarations
11299 * sem_ch13.ads, sem_ch13.adb (Check_Aspect_At_Freeze_Point):
11301 (Check_Aspect_At_End_Of_Declarations): New procedure
11302 (Analye_Aspect_Specification): Minor changes for above procedures
11303 * sinfo.ads, sinfo.adb (Is_Delayed_Aspect): Now set in aspect
11304 specification node as well.
11306 2011-08-01 Pascal Obry <obry@adacore.com>
11308 * adaint.c (_gnat_stat): GetFilesAttributesEx() would fail on special
11309 Windows files. Use GetFilesAttributes() in this case to check for file
11310 existence instead of returning with an error code.
11312 2011-08-01 Vincent Celier <celier@adacore.com>
11314 * a-stzfix.adb, a-stwifi.adb (Replace_Slice): Fixed computation when
11315 High is above Source length.
11317 2011-08-01 Robert Dewar <dewar@adacore.com>
11319 * a-ztexio.ads, a-textio.ads, a-witeio.ads: Fix comment.
11321 2011-08-01 Robert Dewar <dewar@adacore.com>
11323 * aspects.ads (Boolean_Aspects): New subtype.
11324 * exp_ch13.adb (Expand_Freeze_Entity): Fix errors in handling aspects
11325 for derived types in cases where the parent type and derived type have
11327 * freeze.adb (Freeze_Entity): Fix problems in handling derived type
11328 with aspects when parent type also has aspects.
11329 (Freeze_Entity): Deal with delay of boolean aspects (must evaluate
11330 boolean expression at this point).
11331 * sem_ch13.adb (Analyze_Aspect_Specifications): Delay all aspects in
11332 accordance with final decision on the Ada 2012 feature.
11333 * sinfo.ads, sinfo.adb (Is_Boolean_Aspect): New flag.
11335 2011-08-01 Matthew Heaney <heaney@adacore.com>
11337 * a-chtgbo.adb (Delete_Node_Sans_Free): Replace iterator with selector.
11339 2011-08-01 Pascal Obry <obry@adacore.com>
11341 * a-stzunb-shared.adb, a-strunb-shared.adb, a-stwiun-shared.adb:
11342 Fix Replace_Slice when High is above current string size.
11343 (Replace_Slice): Fix DL computation when High is above current
11346 2011-08-01 Gary Dismukes <dismukes@adacore.com>
11348 * gnat_rm.texi: Add documentation for pragma Static_Elaboration_Desired.
11350 2011-08-01 Matthew Heaney <heaney@adacore.com>
11352 * a-rbtgbo.adb (Delete_Node_Sans_Free): Fixed assignment to left child
11355 2011-08-01 Pascal Obry <obry@adacore.com>
11357 * a-stzunb-shared.adb, a-strunb-shared.adb, a-stwiun-shared.adb: Minor
11360 2011-08-01 Ed Schonberg <schonberg@adacore.com>
11362 * sem_attr.adb (Analyze_Attribute, case 'Access): Handle properly named
11363 access to protected subprograms in generic bodies.
11364 * sem_ch6.adb (Analyze_Subprogram_Declaration): If the context is a
11365 protected type, indicate that the convention of the subprogram is
11366 Convention_Protected, because it may be used in subsequent declarations
11367 within the protected declaration.
11369 2011-08-01 Vincent Celier <celier@adacore.com>
11371 * mlib-prj.adb (Build_Library): Use "ada_" as the prefix for the "init"
11372 and "final" procedures when the name of the library is "ada", to avoid
11373 duplicate symbols "adainit" and "adafinal" in executables.
11375 2011-08-01 Ed Schonberg <schonberg@adacore.com>
11377 * sem_attr.adb (Analyze_Attribute, case 'Result): Handle properly a
11378 quantified expression that appears within a postcondition and uses the
11379 Ada2012 'Result attribute.
11381 2011-07-28 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
11383 * init.c (__gnat_error_handler): Cast reason to int.
11384 (__gnat_install_handler): Explain sa_sigaction use.
11386 2011-07-24 Eric Botcazou <ebotcazou@adacore.com>
11388 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Subprogram_Type>: If the
11389 subprogram has copy-in copy-out parameters, try to promote the mode of
11390 the return type if it is passed in registers.
11392 2011-07-24 Eric Botcazou <ebotcazou@adacore.com>
11394 * gcc-interface/utils2.c (build_binary_op) <ARRAY_REF>: Do not mark the
11395 left operand as addressable.
11397 2011-07-24 Eric Botcazou <ebotcazou@adacore.com>
11399 * gcc-interface/gigi.h (build_function_stub): Remove.
11400 (build_return_expr): Likewise.
11401 (convert_vms_descriptor): Declare.
11402 * gcc-interface/utils.c (convert_vms_descriptor): Make global.
11403 (build_function_stub): Move to...
11404 * gcc-interface/utils2.c (build_return_expr): Move to...
11405 * gcc-interface/trans.c (build_function_stub): ...here.
11406 (build_return_expr): ...here.
11407 (Subprogram_Body_to_gnu): Add local variable for language_function.
11408 Disconnect the parameter attributes cache, if any, once done with it.
11409 Call end_subprog_body only after setting the end_locus.
11410 Build the stub associated with the function, if any, at the very end.
11411 (gnat_to_gnu) <N_Return_Statement>: Remove couple of useless local
11412 variables and streamline control flow.
11414 2011-07-23 Arnaud Charlet <charlet@adacore.com>
11417 * gcc-interface/Makefile.in (powerpc-linux): Remove reference to
11418 g-trasym-dwarf.adb.
11420 2011-07-22 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
11423 * init.c [sun && __SVR4 && !__vxworks] (__gnat_install_handler):
11424 Assign to act.sa_sigaction.
11425 * tracebak.c [USE_GENERIC_UNWINDER] (__gnat_backtrace): Cast
11426 current->return_address to char * before arithmetic.
11428 2011-07-22 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
11430 * init.c [sgi] (__gnat_error_handler): Update sigaction(2) citation.
11431 Correct argument types.
11432 Extract code from reason.
11433 (__gnat_install_handler): Assign to act.sa_sigaction.
11435 2011-07-21 Eric Botcazou <ebotcazou@adacore.com>
11437 * gcc-interface/Make-lang.in (GNAT1_ADA_OBJS): Move ada/b_gnat1.o to...
11438 (GNAT1_OBJS): ...here.
11440 2011-07-15 Eric Botcazou <ebotcazou@adacore.com>
11443 * g-socthi-mingw.adb (Fill): Fix formatting.
11445 * gcc-interface/gigi.h: Move around comment.
11447 2011-07-14 John David Anglin <dave.anglin@nrc-cnrc.gc.ca>
11450 * s-taprop-hpux-dce.adb (Abort_Task): Remove unnecessary cast.
11452 2011-07-14 Florian Weimer <fw@deneb.enyo.de>
11455 * g-socthi-mingw.adb (Fill): Guard against invalid MSG_WAITALL.
11457 2011-07-13 Eric Botcazou <ebotcazou@adacore.com>
11459 * gcc-interface/utils.c (build_vms_descriptor32): Skip the 32-bit
11460 range comparison if Pmode is SImode.
11462 2011-07-12 Laurent GUERBY <laurent@guerby.net>
11463 Eric Botcazou <ebotcazou@adacore.com>
11465 * adadecode.c: Wrap up in extern "C" block.
11466 * adadecode.h: Likewise.
11467 * adaint.c: Likewise. Remove 'const' keyword.
11468 * adaint.h: Likewise.
11469 * argv.c: Likewise.
11470 * atree.h: Likewise.
11472 * cstreams.c: Likewise.
11474 * exit.c: Likewise.
11476 * final.c: Likewise.
11477 * init.c: Likewise.
11478 * initialize.c: Likewise.
11479 * link.c: Likewise.
11480 * namet.h: Likewise.
11481 * nlists.h: Likewise.
11482 * raise.c: Likewise.
11483 * raise.h: Likewise.
11484 * repinfo.h: Likewise.
11485 * seh_init.c: Likewise.
11486 * targext.c: Likewise.
11487 * tracebak.c: Likewise.
11488 * uintp.h: Likewise.
11489 * urealp.h: Likewise.
11490 * xeinfo.adb: Wrap up generated C code in extern "C" block.
11491 * xsinfo.adb: Likewise.
11492 * xsnamest.adb: Likewise.
11493 * gcc-interface/gadaint.h: Wrap up in extern "C" block.
11494 * gcc-interface/gigi.h: Wrap up some prototypes in extern "C" block.
11495 * gcc-interface/misc.c: Likewise.
11496 * gcc-interface/Make-lang.in (GCC_LINK): Use LINKER.
11497 (GNAT1_C_OBJS): Remove ada/b_gnat1.o. List ada/seh_init.o and
11498 ada/targext.o here...
11499 (GNAT_ADA_OBJS): ...and not here.
11500 (GNAT1_ADA_OBJS): Add ada/b_gnat1.o.
11501 (GNATBIND_OBJS): Reorder.
11503 2011-07-07 Richard Henderson <rth@redhat.com>
11505 * gcc-interface/misc.c (gnat_init_gcc_eh): Don't call
11506 dwarf2out_frame_init.
11508 2011-07-07 Eric Botcazou <ebotcazou@adacore.com>
11510 * gcc-interface/misc.c (gnat_init): Tweak previous change.
11512 2011-07-07 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
11515 * gcc-interface/Makefile.in: Handle x86_64-solaris2.
11517 2011-07-06 Richard Guenther <rguenther@suse.de>
11519 * gcc-interface/misc.c (gnat_init): Merge calls to
11520 build_common_tree_nodes and build_common_tree_nodes_2.
11521 Re-initialize boolean_false_node.
11523 2011-07-02 Eric Botcazou <ebotcazou@adacore.com>
11524 Olivier Hainque <hainque@adacore.com>
11525 Nicolas Setton <setton@adacore.com>
11527 * gcc-interface/utils.c (record_builtin_type): Set TYPE_ARTIFICIAL on
11528 the type according to the ARTIFICIAL_P parameter.
11529 (create_type_decl): Likewise.
11530 (create_type_stub_decl): Set TYPE_ARTIFICIAL on the type to 1.
11532 2011-07-01 Eric Botcazou <ebotcazou@adacore.com>
11534 * gcc-interface/Make-lang.in (gnat1): Prepend '+' to the command.
11535 (gnatbind): Likewise.
11537 2011-06-29 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
11539 * gcc-interface/Makefile.in (TOOLS_LIBS): Add $(LIBINTL).
11541 2011-06-18 Eric Botcazou <ebotcazou@adacore.com>
11543 * gcc-interface/decl.c (gnat_to_gnu_component_type): Use GNAT_TYPE
11544 local variable throughout. Remove useless call to Base_Type.
11545 (gnat_to_gnu_field): Use GNAT_FIELD_TYPE local variable throughout.
11546 Take it also into account for the volatileness of the field. Set the
11547 TREE_SIDE_EFFECTS flag as well in this case. Reorder some warnings.
11549 2011-06-18 Eric Botcazou <ebotcazou@adacore.com>
11551 * gcc-interface/trans.c (Identifier_to_gnu): Don't set TREE_THIS_NOTRAP
11552 on a dereference built for a by-ref object if it has an address clause.
11554 2011-06-18 Eric Botcazou <ebotcazou@adacore.com>
11556 * einfo.ads (Address_Taken): Document use for the second argument of
11557 Asm_Input and Asm_Output attributes.
11558 * sem_attr.adb (Analyze_Attribute) <Attribute_Asm_Input>: If the second
11559 argument is an entity name, then set Address_Taken on it.
11560 <Attribute_Asm_Output>: Likewise.
11561 * gcc-interface/trans.c (lvalue_required_for_attribute_p): Handle the
11562 Attr_Asm_Input and Attr_Asm_Output attributes explicitly.
11563 (gnat_to_gnu) <N_Code_Statement>: If an operand is going to end up in
11564 memory and is a CONST_DECL, retrieve its corresponding VAR_DECL.
11566 2011-06-16 Joern Rennecke <joern.rennecke@embecosm.com>
11568 PR middle-end/46500
11569 * gcc-interface/decl.c (gnat_to_gnu_param): Use pack_cumulative_args.
11571 2011-06-14 Joseph Myers <joseph@codesourcery.com>
11573 * gcc-interface/Make-lang.in (gnatbind$(exeext)): Use ggc-none.o.
11574 (ada/utils.o): Update dependencies.
11575 * gcc-interface/Makefile.in (EXTRA_GNATTOOLS_OBJS): Add
11576 ../../../libcpp/libcpp.a.
11577 * gcc-interface/utils.c: Include common/common-target.h.
11578 (process_attributes): Use targetm_common.have_named_sections.
11580 2011-06-07 Richard Guenther <rguenther@suse.de>
11582 * gcc-interface/misc.c (gnat_init): Do not set size_type_node or call
11585 2011-06-06 Eric Botcazou <ebotcazou@adacore.com>
11587 * gcc-interface/utils2.c (gnat_stabilize_reference): Propagate the
11588 TREE_THIS_NOTRAP flag.
11590 2011-06-06 Eric Botcazou <ebotcazou@adacore.com>
11592 * gcc-interface/utils2.c (gnat_stabilize_reference) <COMPOUND_EXPR>:
11595 2011-06-06 Eric Botcazou <ebotcazou@adacore.com>
11597 * gcc-interface/trans.c (Identifier_to_gnu): Also handle deferred
11598 constants whose full view has discriminants specially.
11600 2011-06-06 Eric Botcazou <ebotcazou@adacore.com>
11602 * gcc-interface/utils.c: Include diagnostic.h.
11603 (gnat_write_global_declarations): Output debug information for all
11604 global type declarations before finalizing the compilation unit.
11605 * gcc-interface/Make-lang.in (ada/utils.o): Add dependency.
11607 2011-05-25 Jakub Jelinek <jakub@redhat.com>
11609 * gcc-interface/utils.c (def_fn_type): Remove extra va_end.
11611 2011-05-25 Kai Tietz <ktietz@redhat.com>
11613 * adaint.c (__gnat_to_canonical_file_list_next): Use array
11614 initialization instead of const/none-const pointer assignment.
11616 2011-05-24 Joseph Myers <joseph@codesourcery.com>
11618 * gcc-interface/Make-lang.in (GNAT1_OBJS): Don't include
11619 $(EXTRA_GNAT1_OBJS).
11620 (GNATBIND_OBJS): Don't include $(EXTRA_GNATBIND_OBJS).
11621 (EXTRA_GNAT1_OBJS, EXTRA_GNATBIND_OBJS): Remove.
11622 (gnat1$(exeext), gnatbind$(exeext)): Use libcommon-target.a.
11623 * gcc-interface/Makefile.in (EXTRA_GNATTOOLS_OBJS): Use
11624 libcommon-target.a instead of prefix.o.
11626 2011-05-21 Joseph Myers <joseph@codesourcery.com>
11629 * gcc-interface/Make-lang.in (gnatbind$(exeext)): Depend on $(LIBDEPS).
11631 2011-05-20 Joseph Myers <joseph@codesourcery.com>
11633 * gcc-interface/Make-lang.in (EXTRA_GNATBIND_OBJS): Remove version.o.
11634 * gcc-interface/Makefile.in (EXTRA_GNATTOOLS_OBJS): Use libcommon.a
11635 instead of version.o.
11637 2011-05-18 Kai Tietz <ktietz@redhat.com>
11639 * gcc-interface/trans.c (Exception_Handler_to_gnu_sjlj): Use
11640 boolean_false_node instead of integer_zero_node.
11641 (convert_with_check): Likewise.
11642 * gcc-interface/decl.c (choices_to_gnu): Likewise.
11644 2011-05-12 Eric Botcazou <ebotcazou@adacore.com>
11646 * gcc-interface/trans.c (call_to_gnu): In the by-reference case, if the
11647 type of the parameter is an unconstrained array, convert the actual to
11648 the type of the formal in the In Out and Out cases as well.
11650 2011-05-11 Nathan Froyd <froydnj@codesourcery.com>
11652 * gcc-interface/utils.c (def_fn_type): Don't call build_function_type;
11653 call build_function_type_array or build_varargs_function_type_array
11655 (create_subprog_type): Don't call build_function_type; call
11656 build_function_type_vec instead.
11658 2011-05-11 Nathan Froyd <froydnj@codesourcery.com>
11660 * gcc-interface/ada-tree.h (TYPE_OBJECT_RECORD_TYPE): Use TYPE_MINVAL.
11661 (TYPE_GCC_MIN_VALUE): Use TYPE_MINVAL.
11662 (TYPE_GCC_MAX_VALUE): Use TYPE_MAXVAL.
11664 2011-05-07 Eric Botcazou <ebotcazou@adacore.com>
11666 * gcc-interface/decl.c (intrin_arglists_compatible_p): Remove spaces.
11668 * gcc-interface/gigi.h (global_bindings_p): Adjust prototype.
11669 * gcc-interface/utils.c (global_bindings_p): Return bool and simplify.
11671 2011-05-05 Nathan Froyd <froydnj@codesourcery.com>
11673 * gcc-interface/trans.c (Case_Statement_to_gnu): Call build_case_label.
11675 2011-05-05 Nathan Froyd <froydnj@codesourcery.com>
11677 * gcc-interface/decl.c (intrin_arglists_compatible_p): Use iterators
11678 instead of accessing TYPE_ARG_TYPES directly.
11679 * gcc-interface/utils.c (handle_nonnull_attribute): Likewise.
11681 2011-05-05 Eric Botcazou <ebotcazou@adacore.com>
11684 * gcc-interface/gigi.h (get_variant_part): Declare.
11685 * gcc-interface/decl.c (get_variant_part): Make global.
11686 * gcc-interface/utils2.c (find_common_type): Do not return T1 if the
11687 types have the same constant size, are record types and T1 has a
11688 variant part while T2 doesn't.
11690 2011-05-05 Eric Botcazou <ebotcazou@adacore.com>
11692 * gcc-interface/utils.c (begin_subprog_body): Do not call
11694 (end_subprog_body): Likewise.
11696 2011-05-04 Richard Guenther <rguenther@suse.de>
11698 * gcc-interface/trans.c (gnat_to_gnu): Remove zero notrunc argument to
11700 (pos_to_constructor): Likewise.
11702 2011-05-03 Nathan Froyd <froydnj@codesourcery.com>
11703 Eric Botcazou <ebotcazou@adacore.com>
11705 * gcc-interface/trans.c (gigi): Call build_function_type_list instead
11706 of build_function_type. Adjust calls to...
11707 (build_raise_check): ...this. Do not take a void_tree parameter.
11708 Call build_function_type_list instead of build_function_type.
11709 Fix head comment and swap couple of conditional blocks.
11711 2011-04-30 Eric Botcazou <ebotcazou@adacore.com>
11713 * gnatvsn.ads (Library_Version): Bump to 4.7.
11714 (Current_Year): Bump to 2011.
11716 2011-04-29 Michael Matz <matz@suse.de>
11718 * gcc-interface/misc.c (gnat_handle_option): Set
11719 warn_maybe_uninitialized.
11721 2011-04-23 Gerald Pfeifer <gerald@pfeifer.com>
11723 * gnat_ugn.texi (Complexity Metrics Control): Update link to
11724 the Watson/McCabe paper.
11726 2011-04-23 Jim Meyering <meyering@redhat.com>
11728 * gnat_ugn.texi (Examples of gnatxref Usage): Fix typo: s/it it/it is/
11730 2011-04-22 Eric Botcazou <ebotcazou@adacore.com>
11732 * gcc-interface/decl.c (make_packable_type): Copy DECL_PARALLEL_TYPE
11735 2011-04-22 Eric Botcazou <ebotcazou@adacore.com>
11737 * gcc-interface/gigi.h (create_subprog_decl): Add ARTIFICIAL_FLAG
11739 * gcc-interface/utils.c (create_subprog_decl): Likewise. Set
11740 DECL_ARTIFICIAL and DECL_NO_INLINE_WARNING_P on the DECL accordingly.
11741 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Subprogram_Type>: Add
11742 ARTIFICIAL_FLAG local variable and pass it to create_subprog_decl.
11743 <all>: Do not set flags on the reused DECL node coming from an alias.
11744 Set DECL_IGNORED_P on the DECL node built for subprograms if they
11745 don't need debug info here...
11746 * gcc-interface/trans.c (Subprogram_Body_to_gnu): ...and not here.
11747 (gigi): Adjust calls to create_subprog_decl.
11748 (build_raise_check): Likewise.
11749 (establish_gnat_vms_condition_handler): Likewise.
11750 (Compilation_Unit_to_gnu): Likewise.
11751 (gnat_to_gnu): Likewise.
11753 2011-04-21 Eric Botcazou <ebotcazou@adacore.com>
11755 * gcc-interface/Makefile.in (NO_SIBLING_ADAFLAGS): Always define.
11756 (NO_REORDER_ADAFLAGS): New variable.
11757 (EXTRA_GNATTOOLS): Always define.
11758 (../stamp-gnatlib1-$(RTSDIR): Copy tsystem.h.
11759 Clean up and adjust list of files compiled with special options.
11760 * gcc-interface/Make-lang.in: Likewise.
11761 (ada/decl.o): Cosmetical change.
11762 (ada/misc.o): Remove dependency on $(PLUGIN_H).
11764 2011-04-20 Jim Meyering <meyering@redhat.com>
11766 * initialize.c (__gnat_initialize): Remove useless if-before-free.
11768 2011-04-17 Eric Botcazou <ebotcazou@adacore.com>
11770 * gcc-interface/Make-lang.in (gnatbind): Replace $(ALL_CFLAGS) with
11771 $(CFLAGS) on the link line.
11773 2011-04-17 Eric Botcazou <ebotcazou@adacore.com>
11775 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Function>: Declare the
11776 padded type built for the return type if it is unconstrained.
11778 2011-04-14 Nathan Froyd <froydnj@codesourcery.com>
11780 * gcc-interface/utils.c (gnat_poplevel): Use block_chainon.
11782 2011-04-12 Nathan Froyd <froydnj@codesourcery.com>
11784 * gcc-interface/ada-tree.h (union lang_tree_node): Check for TS_COMMON
11785 before calling TREE_CHAIN.
11786 * gcc-interface/misc.c (gnat_init_ts): New function.
11787 (LANG_HOOKS_INIT_TS): Define.
11789 2011-04-12 Martin Jambor <mjambor@suse.cz>
11791 * gcc-interface/utils.c (end_subprog_body): Call cgraph_get_create_node
11792 instead of cgraph_node.
11794 2011-04-08 Eric Botcazou <ebotcazou@adacore.com>
11796 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Procedure>: Set minimum
11797 alignment on fields of the RETURN type built for the Copy-In Copy-Out
11800 2011-04-08 Eric Botcazou <ebotcazou@adacore.com>
11802 * gcc-interface/trans.c (Identifier_to_gnu): Do not return initializers
11803 of aggregate types that contain a placeholder.
11805 2011-04-08 Nathan Froyd <froydnj@codesourcery.com>
11807 * gcc-interface/utils.c (handle_sentinel_attribute): Don't use
11809 (handle_type_generic_attribute): Likewise.
11811 2011-04-04 Eric Botcazou <ebotcazou@adacore.com>
11814 * s-oscons-tmplt.c (MSG_WAITALL): Fix thinko in previous change.
11816 2011-04-04 Kai Tietz <ktietz@redhat.com>
11819 * s-oscons-tmplt.c (MSG_WAITALL): Define it for native windows targets
11822 2011-04-02 Eric Botcazou <ebotcazou@adacore.com>
11824 * gcc-interface/utils2.c (build_allocator): In the unconstrained array
11825 type case, do not strip a padding type around the array type.
11827 2011-04-02 Eric Botcazou <ebotcazou@adacore.com>
11829 * gcc-interface/utils.c (update_pointer_to): Finalize named pointer
11832 2011-04-02 Eric Botcazou <ebotcazou@adacore.com>
11834 * gcc-interface/lang.opt (feliminate-unused-debug-types): Delete.
11835 * gcc-interface/misc.c (gnat_handle_option): Remove special handling
11836 code for -feliminate-unused-debug-types.
11837 (gnat_post_options): Likewise.
11839 2011-04-02 Eric Botcazou <ebotcazou@adacore.com>
11841 * gcc-interface/utils.c (gnat_pushdecl): If this is a non-artificial
11842 declaration of a pointer type, then set DECL_ORIGINAL_TYPE to a
11845 2011-04-02 Eric Botcazou <ebotcazou@adacore.com>
11847 * gcc-interface/decl.c (gnat_to_gnu_entity): Do not force the
11848 DECL_ARTIFICIAL flag on enumeration types.
11850 2011-04-02 Eric Botcazou <ebotcazou@adacore.com>
11852 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Array_Type>: Do not make
11853 fat pointer types artificial unconditionally.
11854 <E_Array_Subtype>: Attach the base array type as a parallel type if it
11857 2011-04-02 Eric Botcazou <ebotcazou@adacore.com>
11859 * gcc-interface/gigi.h (get_dummy_type): Declare.
11860 (build_dummy_unc_pointer_types): Likewise.
11861 (finish_fat_pointer_type): Likewise.
11862 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Array_Type>: If a dummy
11863 fat pointer type has been built, complete it in place.
11864 <E_Access_Type>: Call build_dummy_unc_pointer_types to build dummy fat
11865 and thin pointers. Remove useless variable.
11866 (finish_fat_pointer_type): Make global and move to...
11867 * gcc-interface/utils.c (finish_fat_pointer_type): ...here.
11868 (get_dummy_type): New function.
11869 (build_dummy_unc_pointer_types): Likewise.
11870 (gnat_pushdecl): Propage the name to the anonymous variants only.
11871 (update_pointer_to): Only adjust the pointer types in the unconstrained
11874 2011-04-02 Eric Botcazou <ebotcazou@adacore.com>
11876 * gcc-interface/ada-tree.h (DECL_TAFT_TYPE_P): New flag.
11877 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Incomplete_Type>: Set it
11878 if this is a Taft amendment type and the full declaration is available.
11879 * gcc-interface/trans.c (process_type): Likewise.
11880 If there is an old type, mark the new one as used if DECL_TAFT_TYPE_P.
11881 (process_freeze_entity): Likewise.
11882 * gcc-interface/utils.c (dummy_global): New static variable.
11883 (gnat_write_global_declarations): If there are types declared as used
11884 at the global level, insert them in the global hash table.
11886 2011-04-02 Eric Botcazou <ebotcazou@adacore.com>
11888 * gcc-interface/gigi.h (record_builtin_type): Add ARTIFICIAL_P param.
11889 * gcc-interface/utils.c (gnat_pushdecl): If this is a non-artificial
11890 declaration of an array type, then set DECL_ORIGINAL_TYPE to a distinct
11892 (record_builtin_type): Add ARTIFICIAL_P parameter. Set DECL_ARTIFICIAL
11893 flag of the type accordingly.
11894 * gcc-interface/trans.c (gigi): Adjust calls to record_builtin_type.
11896 2011-04-02 Eric Botcazou <ebotcazou@adacore.com>
11898 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Access_Type>: Defer
11899 finalizing types when updating the pointers to the designated type.
11900 <all>: Finalize the deferred types even if we didn't defer processing
11901 of incomplete types in this invocation.
11903 2011-04-01 Olivier Hainque <hainque@adacore.com>
11904 Nicolas Setton <setton@adacore.com>
11905 Eric Botcazou <ebotcazou@adacore.com>
11907 * gcc-interface/misc.c (gnat_descriptive_type): New function.
11908 (LANG_HOOKS_DESCRIPTIVE_TYPE): Redefine to gnat_descriptive_type.
11910 2011-03-28 Kai Tietz <ktietz@redhat.com>
11912 * gcc-interface/Makefile.in (SO_LIB): Handle multilib build for native
11914 (EH_MECHANISM): Use GCC exception mechanism for native Windows targets.
11915 * system-mingw.ads (System): Change ZCX_By_Default default to True.
11917 * raise-gcc.c (PERSONALITY_FUNCTION): Add prototype.
11919 2011-03-28 Tristan Gingold <gingold@adacore.com>
11922 * gcc-interface/Make-lang.in (ada/b_gnat1.adb): Replace ada/b_gnat1.c.
11923 Use ada output of gnatbind.
11924 (ada/b_gnatb.adb): Ditto.
11925 (ada/b_gnat1.o, ada/b_gnatb.o): New rules.
11926 (ada.mostlyclean, ada.stage1)
11927 (ada.stage2, ada.stage3, ada.stage4, ada.stageprofile)
11928 (ada.stagefeedback): Adjust.
11929 * gcc-interface/Makefile.in (b_gnatl.adb): Replace b_gnatl.c.
11930 Use ada output of gnatbind.
11931 (b_gnatm.adb): Ditto.
11932 (b_gnatl.o, b_gnatm.o): New rules.
11934 2011-03-26 Eric Botcazou <ebotcazou@adacore.com>
11936 * gcc-interface/decl.c (gnat_to_gnu_entity) <object>: Create TYPE_DECL
11937 for the padded type built to support a specified size or alignment.
11939 2011-03-26 Eric Botcazou <ebotcazou@adacore.com>
11941 * gcc-interface/gigi.h (finalize_from_with_types): Adjust comment.
11942 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Access_Type>: Defer
11943 unconditionally to the end of the unit when the designated type is
11945 <all>: Rename local variable. Attempt to un-defer types only and do it
11946 for limited_with'ed types as well.
11947 (finalize_from_with_types): Adjust comment. Rename variable and tidy.
11948 * gcc-interface/trans.c (Compilation_Unit_to_gnu): Use GNAT_UNIT
11949 consistently and remove redundant call to finalize_from_with_types.
11951 2011-03-26 Eric Botcazou <ebotcazou@adacore.com>
11953 * inline.adb (Back_End_Cannot_Inline): Lift restriction on calls to
11954 subprograms without a previous spec declared in the same unit.
11955 * gcc-interface/trans.c (Compilation_Unit_to_gnu): Process inlined
11956 subprograms at the end of the unit instead of at the beginning.
11957 * gcc-interface/utils.c (create_subprog_decl): Check that the entity
11958 isn't public for the special handling of non-inline functions nested
11959 inside inline external functions.
11961 2011-03-25 Jeff Law <law@redhat.com>
11963 * gcc-interface/utils.c (def_fn_type): Add missing va_end.
11965 2011-03-24 Eric Botcazou <ebotcazou@adacore.com>
11967 * einfo.ads (Size_Depends_On_Discriminant): Adjust description.
11968 * layout.adb (Compute_Size_Depends_On_Discriminant): New procedure
11969 to compute Set_Size_Depends_On_Discriminant.
11970 (Layout_Type): Call it on array types in back-end layout mode.
11971 * sem_util.adb (Requires_Transient_Scope): Return true for array
11972 types only if the size depends on the value of discriminants.
11973 * gcc-interface/utils2.c (build_binary_op) <MODIFY_EXPR>: Use the RHS
11974 type if the RHS is a call to a function that returns an unconstrained
11975 type with default discriminant.
11977 2011-03-24 Eric Botcazou <ebotcazou@adacore.com>
11979 * gcc-interface/trans.c (gnat_to_gnu): Remove obsolete case of
11980 non-conversion to the nominal result type at the end.
11982 2011-03-23 Eric Botcazou <ebotcazou@adacore.com>
11984 * gcc-interface/trans.c (create_temporary): New function taken from...
11985 (create_init_temporary): ...here. Call it.
11986 (call_to_gnu): Create the temporary for the return value early, if any.
11987 Create it for a function with copy-in/copy-out parameters if there is
11988 no target; in other cases of copy-in/copy-out, use another temporary.
11989 Push the new binding level lazily. Add and rename local variables.
11991 2011-03-23 Eric Botcazou <ebotcazou@adacore.com>
11993 * gcc-interface/decl.c (validate_size): Improve comments and tweak
11995 (set_rm_size): Likewise.
11997 2011-03-23 Eric Botcazou <ebotcazou@adacore.com>
11999 * gcc-interface/decl.c (gnat_to_gnu_entity) <object>: Create TYPE_DECL
12000 for the padded type built in order to support a specified alignment.
12001 Fix incorrect formatting.
12003 2011-03-21 Eric Botcazou <ebotcazou@adacore.com>
12006 * gcc-interface/decl.c (elaborate_expression_1): Localize GNU_DECL.
12008 2011-03-21 Eric Botcazou <ebotcazou@adacore.com>
12010 * gcc-interface/decl.c (components_to_record): Add REORDER parameter,
12011 rename DEBUG_INFO_P into DEBUG_INFO and move P_GNU_REP_LIST parameter
12012 to the end of the list. Adjust recursive call. Rename local variable.
12013 If REORDER is true, reorder components of the record type.
12014 (gnat_to_gnu_entity): Pass OK_To_Reorder_Components flag as argument to
12015 components_to_record and adjust the parameter list.
12017 2011-03-21 Eric Botcazou <ebotcazou@adacore.com>
12019 * gcc-interface/decl.c (elaborate_expression_1): When optimization is
12020 disabled, use the variable for bounds of loop iteration scheme.
12022 2011-03-21 Kai Tietz <ktietz@redhat.com>
12025 * gcc-interface/utils.c (gnat_internal_attribute_table): Add column.
12027 2011-03-17 Eric Botcazou <ebotcazou@adacore.com>
12029 * gcc-interface/decl.c (elaborate_expression_1): Try harder to find
12030 out whether the expression is read-only. Short-circuit placeholder
12031 case and rename a couple of local variables.
12033 2011-03-17 Eric Botcazou <ebotcazou@adacore.com>
12035 * gcc-interface/gigi.h (smaller_form_type_p): Declare.
12036 * gcc-interface/trans.c (smaller_form_type_p): Make global and move...
12037 * gcc-interface/utils.c (smaller_form_type_p): ...to here.
12038 (convert): Deal with conversions from a smaller form type specially.
12040 2011-02-14 Eric Botcazou <ebotcazou@adacore.com>
12042 * gcc-interface/misc.c (gnat_init_options): Do not concatenate -I and
12043 its argument, except for the special -I- switch.
12045 2011-02-12 Gerald Pfeifer <gerald@pfeifer.com>
12047 * gnat_ugn.texi (Compiling Different Versions of Ada): Update link to
12050 2011-02-08 Eric Botcazou <ebotcazou@adacore.com>
12052 * gcc-interface/Makefile.in (x86-64 darwin): Handle multilibs.
12054 2011-02-03 Eric Botcazou <ebotcazou@adacore.com>
12056 * gcc-interface/gigi.h (fill_vms_descriptor): Take GNU_TYPE instead of
12058 * gcc-interface/utils2.c (fill_vms_descriptor): Move from here to...
12059 * gcc-interface/utils.c (fill_vms_descriptor): ...here. Take GNU_TYPE
12060 instead of GNAT_FORMAL. Protect the expression against multiple uses.
12061 Do not generate the check directly, instead instantiate the template
12062 check present in the descriptor.
12063 (make_descriptor_field): Move around.
12064 (build_vms_descriptor32): Build a template check in the POINTER field.
12065 (build_vms_descriptor): Remove useless suffixes.
12066 * gcc-interface/trans.c (call_to_gnu): Adjust fill_vms_descriptor call.
12068 2011-01-26 Eric Botcazou <ebotcazou@adacore.com>
12071 * targext.c: Include target files if IN_RTS is defined.
12073 2011-01-26 Richard Guenther <rguenther@suse.de>
12076 * targext.c: Include config.h.
12077 * gcc-interface/Make-lang.in (ada/targext.o): Add $(CONFIG_H)
12080 2011-01-04 Pascal Obry <obry@adacore.com>
12081 Eric Botcazou <ebotcazou@adacore.com>
12083 * gcc-interface/decl.c: Disable Stdcall convention handling for 64-bit.
12085 2011-01-04 Eric Botcazou <ebotcazou@adacore.com>
12087 * gcc-interface/trans.c (Case_Statement_to_gnu): Put the SLOC of the
12088 end-of-case on the end label and its associated gotos, if any.
12090 2011-01-04 Eric Botcazou <ebotcazou@adacore.com>
12092 * gcc-interface/trans.c (Subprogram_Body_to_gnu): Evaluate the
12093 expressions of the parameter cache within the statement group of
12094 the CICO mechanism.
12096 2011-01-04 Olivier Hainque <hainque@adacore.com>
12097 Eric Botcazou <ebotcazou@adacore.com>
12099 * gcc-interface/trans.c (BLOCK_SOURCE_END_LOCATION): Provide default.
12100 (set_end_locus_from_node): New function.
12101 (Subprogram_Body_to_gnu): Use it to mark both the inner BIND_EXPR we
12102 make and the function end_locus.
12103 (Compilation_Unit_to_gnu): Call it instead of a straight Sloc_to_locus
12104 for the elaboration subprogram.
12105 (set_gnu_expr_location_from_node) <default case>: Use it to attempt to
12106 set the end_locus of the expression as well.
12108 2011-01-04 Eric Botcazou <ebotcazou@adacore.com>
12111 * gcc-interface/trans.c (Identifier_to_gnu): In SJLJ mode, do not make
12112 variables that are referenced in exception handlers volatile.
12116 Copyright (C) 2011 Free Software Foundation, Inc.
12118 Copying and distribution of this file, with or without modification,
12119 are permitted in any medium without royalty provided the copyright
12120 notice and this notice are preserved.